damon227 1 жил өмнө
parent
commit
276b9933be

+ 11 - 0
src/views/modules/common/upload-component-v2.vue

@@ -28,6 +28,7 @@
           @click="submitUpload"
           >开始上传</el-button
         >
+        <el-button v-if="templateCode !== ''" size="small" @click="downloadTemplate">下载模板</el-button>
       </el-upload>
     </el-col>
     <!-- 图片预览 -->
@@ -87,6 +88,10 @@ export default {
     value: {
       type: Array,
       default: () => []
+    },
+    templateCode: {
+      type: String,
+      default: ''
     }
   },
   watch: {
@@ -186,6 +191,12 @@ export default {
           files.length
         } 个文件,共选择了 ${files.length + fileList.length} 个文件`
       )
+    },
+    // 下载模板
+    downloadTemplate () {
+      if (this.templateCode !== '') {
+        location.href = this.$http.adornUrl(`/file-service/minio-file/systemTable/download/${this.templateCode}`)
+      }
     }
   }
 }

+ 1 - 0
src/views/modules/common/upload-component.vue

@@ -32,6 +32,7 @@
           @click="submitUpload"
           >开始上传</el-button
         >
+        
       </el-upload>
     </el-col>
     <!-- 图片预览 -->

+ 9 - 9
src/views/modules/works/work.vue

@@ -154,21 +154,21 @@
             v-if="
               isAuth('work:clt:complete') &&
               Number(scope.row.state) === 2 &&
-              (scope.row.nodeType == null ||
-                scope.row.nodeType === 'start' ||
-                scope.row.nodeType === 'produce')
+              (scope.row.taskType == null ||
+                scope.row.taskType === 'start' ||
+                scope.row.taskType === 'produce')
             "
             type="text"
             size="small"
             @click="completeTask(scope.row.taskId)"
-            >完成</el-button
+            >报工</el-button
           >
           <el-button
             v-if="
               isAuth('work:clt:check') &&
               Number(scope.row.state) === 2 &&
-              (scope.row.nodeType === 'check' ||
-                scope.row.nodeType === 't-check')
+              (scope.row.taskType === 'check' ||
+                scope.row.taskType === 't-check')
             "
             type="text"
             size="small"
@@ -179,8 +179,8 @@
             v-if="
                 isAuth('work:clt:check') &&
                 Number(scope.row.state) === 2 &&
-                (scope.row.nodeType === 'check' ||
-                  scope.row.nodeType === 't-check')
+                (scope.row.taskType === 'check' ||
+                  scope.row.taskType === 't-check')
               "
             type="text"
             size="small"
@@ -191,7 +191,7 @@
             v-if="
               isAuth('work:clt:damage') &&
               Number(scope.row.state) === 2 &&
-              (scope.row.nodeType == null || scope.row.nodeType === 'produce')
+              (scope.row.taskType == null || scope.row.taskType === 'produce')
             "
             type="text"
             size="small"