economic.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <div class="economic">
  3. <ul class="economicList">
  4. <li class="ecoLi" v-for="item in dataList" @tap="toDetail(item)">
  5. <div class="ecoRow">
  6. <span>任务编号:{{item.temName}}</span>
  7. <div :class="item.saveType==0?'ytb':'wtb'">{{ item.saveType==0?'已填报':'未填报' }}</div>
  8. </div>
  9. <div class="ecoRow2">
  10. 要求完成日期:{{item.requireFinishTime}}
  11. </div>
  12. </li>
  13. </ul>
  14. <div v-if="false">
  15. <div class="noMsgBox">
  16. <img src="https://www.idea-co-sf.com/gardenProduct/image/youxiang.png">
  17. <span class="msgInfo">暂无消息</span>
  18. </div>
  19. <button class="backToHome" @click="backToHome">返回首页</button>
  20. </div>
  21. </div>
  22. </template>
  23. <script>
  24. import { fillControllerList,getUserLocalStorageInfo } from "@/js_sdk/http.js";
  25. export default {
  26. name: "",
  27. data(){
  28. return{
  29. dataList:[],
  30. pages: {
  31. pageNum: 1,
  32. pageSize: 10,
  33. enterId: getUserLocalStorageInfo().userId
  34. },
  35. }
  36. },
  37. created(){
  38. this.getList()
  39. },
  40. onPullDownRefresh() {
  41. this.dataList = []
  42. this.getList()
  43. setTimeout(function () {
  44. uni.stopPullDownRefresh();
  45. }, 1000);
  46. },
  47. methods:{
  48. backToHome(){
  49. uni.switchTab({
  50. url: "/pages/index/index",
  51. });
  52. },
  53. toDetail(item){
  54. uni.navigateTo({
  55. url:'/pages/subPackages/economicDevelopmentReport/detail?id='+item.id
  56. })
  57. },
  58. // 获取填报列表
  59. async getList() {
  60. await fillControllerList(this.pages).then(res => {
  61. if (res.rows.length) {
  62. this.isDownLoading = false
  63. this.dataList.push(...res.rows)
  64. this.isUpLoading = false
  65. if (this.dataList.length >= res.total) {
  66. this.upFinished = true
  67. }
  68. } else if (res.errno == 426) {
  69. Toast(res.errmsg)
  70. } else {
  71. this.dataList = []
  72. this.isDownLoading = false
  73. this.isUpLoading = false
  74. this.upFinished = true
  75. }
  76. this.isRef = true
  77. })
  78. },
  79. }
  80. }
  81. </script>
  82. <style lang="scss">
  83. .economic{
  84. .economicList{
  85. display: flex;
  86. flex-direction: column;
  87. align-items: center;
  88. .ecoLi{
  89. width: 686rpx;
  90. box-sizing: border-box;
  91. background: white;
  92. border-radius: 16rpx;
  93. margin: 24rpx 0;
  94. padding: 32rpx;
  95. .ecoRow{
  96. font-size: 32rpx;
  97. color: #333333;
  98. display: flex;
  99. justify-content: space-between;
  100. align-items: center;
  101. .ytb{
  102. background:rgba(0, 0, 0, 0.05);
  103. color: rgba(153, 153, 153, 1);
  104. padding: 1.5vw 3vw;
  105. border-radius: 5px;
  106. white-space: nowrap;
  107. font-size: 28rpx;
  108. }
  109. .wtb{
  110. background:rgba(29, 24, 188, 0.05);
  111. color: rgba(29, 24, 188, 1);
  112. padding: 1.5vw 3vw;
  113. border-radius: 5px;
  114. white-space: nowrap;
  115. font-size: 28rpx;
  116. }
  117. }
  118. .ecoRow2{
  119. font-size: 30rpx;
  120. color: #666666;
  121. margin-top: 16rpx;
  122. }
  123. }
  124. }
  125. .noMsgBox{
  126. display: flex;
  127. flex-direction: column;
  128. align-items: center;
  129. width: 90vw;
  130. margin-left: 5vw;
  131. position: relative;
  132. .msgInfo{
  133. color: rgba(3, 101, 249, 1);
  134. font-size: 48rpx;
  135. }
  136. img{
  137. width: 600rpx;
  138. height: 600rpx;
  139. margin-top: 150rpx;
  140. }
  141. }
  142. .backToHome{
  143. width: 90vw;
  144. margin-left: 5vw;
  145. margin-top: 168rpx;
  146. border-radius: 8rpx !important;
  147. padding: 24rpx;
  148. background: rgba(3, 101, 249, 1);
  149. color: white;
  150. font-size: 36rpx;
  151. }
  152. }
  153. </style>