sunyize %!s(int64=2) %!d(string=hai) anos
pai
achega
d9dda77759

+ 9 - 1
src/views/lotCheck/modules/TaskList.vue

@@ -90,6 +90,7 @@
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
+        :rowClassName="tableRowClassName"
         :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         class="j-table-force-nowrap"
         @change="handleTableChange">
@@ -262,6 +263,11 @@ export default {
     },
   },
   methods: {
+    tableRowClassName(record, index) {
+      if (record.taskState == 1) {
+        return 'blue'
+      }
+    },
     // 显示添加页面
     showAdd() {
       this.$emit('goAdd');
@@ -354,5 +360,7 @@ export default {
 </script>
 
 <style scoped>
-
+/deep/.ant-table-tbody .blue{
+  background-color: rgb(212 245 222 / 50%) !important
+}
 </style>

+ 11 - 2
src/views/smscheck/modules/TaskList.vue

@@ -79,6 +79,7 @@
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
+        :rowClassName="tableRowClassName"
         :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         class="j-table-force-nowrap"
         @change="handleTableChange">
@@ -249,6 +250,12 @@
       },
     },
     methods: {
+
+      tableRowClassName(record, index) {
+        if (record.taskState == 1) {
+          return 'blue'
+        }
+      },
       // 显示添加页面
       showAdd() {
         this.$emit('goAdd');
@@ -341,5 +348,7 @@
 </script>
 
 <style scoped>
-
-</style>
+/deep/.ant-table-tbody .blue{
+  background-color: rgb(212 245 222 / 50%) !important
+}
+</style>

+ 0 - 1
src/views/truckCheck/TaskUploadData.vue

@@ -3849,7 +3849,6 @@ export default {
 
           }
         })
-        debugger
         this. dateDate()
       }
     },

+ 32 - 2
src/views/truckCheck/modules/TaskList.vue

@@ -90,6 +90,7 @@
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
+        :rowClassName="tableRowClassName"
         :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         class="j-table-force-nowrap"
         @change="handleTableChange">
@@ -138,6 +139,9 @@
         <template v-slot:taskName="text, record">
           <a @click="showCheckList(record)">{{ text }}</a>
         </template>
+        <template v-slot:state="status">
+          <a-badge :status="status | statusTypeFilter" :text="status | statusFilter"/>
+        </template>
       </a-table>
     </div>
     <!-- table区域 end -->
@@ -193,7 +197,8 @@ export default {
           title: '任务状态',
           align: "center",
           sorter: true,
-          dataIndex: 'taskState_dictText'
+          dataIndex: 'taskState',
+          scopedSlots: { customRender: 'state' }
         },
         {
           title: '任务开始时间',
@@ -245,6 +250,24 @@ export default {
       autoSearch: false,
     }
   },
+  filters: {
+    statusTypeFilter(type) {
+      const statusTypeMap = {
+        '0': 'error',
+        '1': 'processing',
+        '2': 'success'
+      }
+      return statusTypeMap[type]
+    },
+    statusFilter(status) {
+      const statusMap = {
+        '0': '未开始',
+        '1': '进行中',
+        '2': '已完成',
+      }
+      return statusMap[status]
+    }
+  },
   created() {
     this.queryParam.taskState = this.$route.query.state;
     //直接加载url.list接口数据
@@ -262,6 +285,11 @@ export default {
     },
   },
   methods: {
+    tableRowClassName(record, index) {
+      if (record.taskState == 1) {
+        return 'blue'
+      }
+    },
     // 显示添加页面
     showAdd() {
       this.$emit('goAdd');
@@ -354,5 +382,7 @@ export default {
 </script>
 
 <style scoped>
-
+/deep/.ant-table-tbody .blue{
+  background-color: rgb(212 245 222 / 50%) !important
+}
 </style>