Browse Source

接口调试

zhangyu 5 years ago
parent
commit
176a1c84b5

+ 6 - 6
src/components/data_admin/buildTask/table/modelTable.vue

@@ -14,7 +14,7 @@
         </el-table-column>
         <el-table-column prop="LocalId" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column prop="Category" :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="100"></el-table-column>
-        <el-table-column prop="CadId" label="BIM ID" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="BIMID" label="BIM ID" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column prop="TaskState" label="任务执行情况" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column prop="action" label="操作" min-width="100">
           <template slot-scope="scope">
@@ -103,11 +103,9 @@ export default {
           {
             Name: 'equipment',
             Cascade: [{ Name: 'component' }]
-          }, {
-            Name: 'equipmentList'
           }
         ],
-        Orders: "createTime desc, Id asc",
+        Orders: "CreateTime desc, TaskId asc",
         PageNumber: this.page.pageNumber,
         PageSize: this.page.pageSize
       }
@@ -121,9 +119,11 @@ export default {
         params.Filters += `;Category='${this.paramsData.category}'`
       }
       queryModelTask(params, res => {
-        debugger
         this.page.total = res.Total;
-        this.tableData = res.Content[0].EquipmentList || []
+        this.tableData = res.Content.map(item => {
+          item.TaskState = this.taskStateMap[item.TaskState]
+          return item
+        })
       })
     },
     // 删除关系

+ 6 - 4
src/components/data_admin/buildTask/taskStatistics.vue

@@ -3,10 +3,10 @@
 		<div class="statistics-all flex-row">
       <div class="statistics-progress">
         <div class="statistics-progress-num">
-          <p>{{progress + '%'}}</p>
+          <p>{{taskProgress + '%'}}</p>
           <p>完成情况</p>
         </div>
-        <el-progress :width="90" type="circle" :percentage="progress" :show-text="false"></el-progress>
+        <el-progress :width="90" type="circle" :percentage="taskProgress" :show-text="false"></el-progress>
       </div>
       <div class="statistics-all-box flex-col">
         <span>总任务:<b>{{allCount}}</b></span>
@@ -43,8 +43,10 @@ export default {
   },
   computed: {
     ...mapGetters("layout", ["projectId", "secret", "userId" ]),
-    progress(){
-      return Math.round(this.alreadyCount/this.allCount*100)
+    taskProgress(){
+      if(typeof this.alreadyCount == 'number' && typeof this.allCount == 'number'){
+        return Math.round(this.alreadyCount/this.allCount*100)
+      }
     }
   },
   data() {