Browse Source

模型文件状态变更完善

zhangyu 5 years ago
parent
commit
2475bc3931
2 changed files with 13 additions and 11 deletions
  1. 9 6
      src/components/model/file/floorTable.vue
  2. 4 5
      src/views/model/file/index.vue

+ 9 - 6
src/components/model/file/floorTable.vue

@@ -21,25 +21,29 @@
       <el-table-column prop="UserName" label="上传人"></el-table-column>
       <el-table-column prop="address" align="center" label="操作" width="240">
         <template slot-scope="scope">
-          <div class="operate" v-show="!scope.row.isDown">
+          <div class="operate" v-show="scope.row.Status == 4">
             <el-button type="primary" size="mini" class="iconfont icon-download" @click="downloadModel(scope.row)"></el-button>
             <el-button type="primary" size="mini" class="iconfont icon-replace" @click="repliaceModel(scope.row)"></el-button>
             <el-button type="primary" size="mini" class="iconfont icon-Log" @click="queryModelLog(scope.row)"></el-button>
           </div>
           <div
             :class="['upLoad-loading']"
-            v-show="scope.row.isDown">
+            v-show="scope.row.Status != 4">
             <div class="progress">
               <el-progress
                 :text-inside="false"
                 :stroke-width="20" :percentage="100"
-                :color="scope.row.Status == 1 || scope.row.Status == 10 || scope.row.Status == 11?'#909399':'#67C23A'"></el-progress>
+                :color="scope.row.Status?'#909399':'#67C23A'"></el-progress>
             </div>
             <div class="progress-right">
-              <span v-show="!scope.row.Status">上传中</span>
+              <span v-if="!scope.row.Status">上传中</span>
               <span v-show="scope.row.Status == 1">等待检查...</span>
-              <span v-show="scope.row.Status == 10">模型检查中</span>
+              <span v-show="scope.row.Status == 10">模型检查中...</span>
               <span v-show="scope.row.Status == 11">未通过检查</span>
+              <span v-show="scope.row.Status == 2">等待数据导出...</span>
+              <span v-show="scope.row.Status == 21">模型数据导出失败</span>
+              <span v-show="scope.row.Status == 3">处理导出数据中...</span>
+              <span v-show="scope.row.Status == 31">同步到数据中心失败</span>
             </div>
           </div>
         </template>
@@ -102,7 +106,6 @@ export default {
             } else if (precent == 101) {
               // 如过precent == 101 则返回结果为suceess 不能关闭进度条,
               item.precent = 100;
-              item.isDown = false;
               this.$emit("percentFinish");
             }
             return;

+ 4 - 5
src/views/model/file/index.vue

@@ -231,13 +231,13 @@ export default {
                * 4: 正常(所有用户可操作:下载、替换、查看历史)
                */
               if (item.Status == 2 || item.Status == 20 || item.Status == 21 || item.Status == 3 || item.Status == 31 || item.Status == 4) {
-                Object.assign(item, { isDown: false, precent: 0 });
+                Object.assign(item, { precent: 0 });
               } else {
-                Object.assign(item, { isDown: true, precent: 100 });
+                Object.assign(item, { precent: 100 });
                 if (this.persentList.length != 0) {
                   this.persentList.forEach(pItem => {
                     if (item.Id == pItem.Id) {
-                      Object.assign(item, { isDown: true, precent: pItem.precent ? pItem.precent : 0 });
+                      Object.assign(item, { precent: pItem.precent ? pItem.precent : 0 });
                     }
                   });
                 }
@@ -303,10 +303,9 @@ export default {
           Id: data.replaceModelItem.Id,
           precent: 0
         });
-        // 修改isdown得值
+        // 修改precent得值
         this.tableData.map(item => {
           if (item.Id == data.replaceModelItem.Id) {
-            item.isDown = true;
             item.precent = 0;
           }
         });