wenhongquan 3 жил өмнө
parent
commit
5fddae9edd

+ 24 - 0
src/views/task/detail/index.vue

@@ -12,6 +12,12 @@
           >
           <el-button
             type="primary"
+            v-if="taskinfo.status == 4"
+            @click="showpf = true"
+            >转 派</el-button
+          >
+          <el-button
+            type="primary"
             v-if="taskinfo.status == 2"
             @click="showbh = true"
             >驳 回</el-button
@@ -963,7 +969,25 @@ const taskinfo = ref({
 
 onMounted(() => {
   getTask(Number(route.params.id)).then((res) => {
+    var templist = {};
+    var list = res.data.tblTaskLogList;
+    for (var i in list) {
+      var log = list[i];
+      if (templist.hasOwnProperty(log.taskStatus + "")) {
+
+        if (moment(templist[log.taskStatus + ""].createTime).unix() - moment(log.createTime).unix() < 0) {
+          templist[log.taskStatus + ""] = log;
+        }
+      } else {
+         templist[log.taskStatus+""] = log;
+      }
+    }
+    var lists = [];
+    for (var i in templist) {
+      lists.push(templist[i]);
+    }
     taskinfo.value = res.data;
+    taskinfo.value.tblTaskLogList = lists;
   });
 });
 </script>