zhaomiao 3 years ago
parent
commit
f47c24ac45

+ 7 - 5
src/assets/js/healthManagement/healthManagement.js

@@ -10,6 +10,7 @@ export default {
       },
       loading_line:false,
       fj: "",
+      uu:[],
       fc: "MHS_FDC",
       Date1: "",
       Date2: "",
@@ -321,6 +322,9 @@ export default {
     fail_tj() {
       this.$message.error("失败!");
     },
+    fm_data(row, column, cellValue, index){
+      return this.Moment(cellValue).format('yyyy-MM-DD hh:mm:ss a');
+    },
     async currentRecommend() {
       const currentRecommend = await this.API.post(
         "/recommen/getRecommenmainDay1"
@@ -362,7 +366,7 @@ export default {
       const unfinishedList = await this.API.post(
         "/recommen/unfinishedList",
         digital
-      );
+      )
       this.UnfinishedList = unfinishedList.data;
     },
     async complateList() {
@@ -453,9 +457,8 @@ export default {
         "/recommen/findLocationTreeByWtId",
         digital
       ).then((res)=>{
-        debugger
         this.tree = res.data;
-        console.log(this.tree+"---")
+        this.uu.push(res.data[0].id);
       });
       this.dialogTableVisible_ls = true;
     },
@@ -469,10 +472,9 @@ export default {
       digital1.append("isAsc", "asc");
       digital1.append("location", id);
       this.API.post(
-        "/recommen/findLocationTreeByWtId",
+        "/recommen/findWobugeqByLocation",
         digital1
       ).then((res)=>{
-        debugger
         this.treeData = res.data;
       });
     },

+ 13 - 10
src/views/healthManagement/healthManagement.vue

@@ -270,9 +270,9 @@
                 </el-table-column>
                 <el-table-column prop="wtid" label="风机编号" width="180">
                 </el-table-column>
-                <el-table-column prop="operationdate" label="任务开始时间" width="210">
+                <el-table-column prop="operationdate" label="任务开始时间" :formatter="fm_data" width="210">
                 </el-table-column>
-                <el-table-column prop="1613721600000" label="任务结束时间" width="210">
+                <el-table-column prop="prodtdepttime" label="任务结束时间" :formatter="fm_data" width="210">
                 </el-table-column>
                 <el-table-column prop="reason" label="检修原因" width="620">
                 </el-table-column>
@@ -340,9 +340,9 @@
                 </el-table-column>
                 <el-table-column prop="wtid" label="风机编号" width="180">
                 </el-table-column>
-                <el-table-column prop="operationdate" label="任务开始时间" width="210">
+                <el-table-column prop="operationdate" label="任务开始时间" :formatter="fm_data" width="210">
                 </el-table-column>
-                <el-table-column prop="1613721600000" label="任务结束时间" width="210">
+                <el-table-column prop="prodtdepttime" label="任务结束时间" :formatter="fm_data" width="210">
                 </el-table-column>
                 <el-table-column prop="reason" label="检修原因" width="521">
                 </el-table-column>
@@ -885,7 +885,10 @@
           <div class="tree">
             <div class="l" style="width:33%">
               <el-tree
+                node-key="id"
+                highlight-current:true
                 :data="tree"
+                :default-expanded-keys="uu"
                 :props="defaultProps"
                 accordion
                 @node-click="handleNodeClick">
@@ -902,32 +905,32 @@
                   type="index">
                 </el-table-column>
                 <el-table-column
-                  prop="date"
+                  prop="xqms"
                   label="消缺描述"
                   width="180">
                 </el-table-column>
                 <el-table-column
-                  prop="name"
+                  prop="xqry"
                   label="消缺人员"
                   width="90">
                 </el-table-column>
                 <el-table-column
-                  prop="address"
+                  prop="xqsj"
                   label="消缺时间"
                   width="90">
                 </el-table-column>
                 <el-table-column
-                  prop="address"
+                  prop="ghbj"
                   label="更换部件"
                   width="90">
                 </el-table-column>
                 <el-table-column
-                  prop="address"
+                  prop="ghyy"
                   label="更换原因"
                   width="180">
                 </el-table-column>
                 <el-table-column
-                  prop="address"
+                  prop="ghsl"
                   label="更换数量"
                   width="90">
                 </el-table-column>