chris 3 anos atrás
pai
commit
682ac0e814

+ 49 - 49
src/components/work-flow/node-edit.vue

@@ -64,10 +64,10 @@
 </template>
 
 <script>
-import { getWorkType } from "@/api/crafts";
-import { workTypeMasterList } from "@/api/worktype";
+import { getWorkType } from '@/api/crafts'
+import { workTypeMasterList } from '@/api/worktype'
 export default {
-  name: "nodeEdit",
+  name: 'nodeEdit',
   props: {
     data: {
       type: Object,
@@ -83,7 +83,7 @@ export default {
       default: false
     }
   },
-  data() {
+  data () {
     return {
       // 工种列表
       workTypeOptions: [],
@@ -91,102 +91,102 @@ export default {
       operatorIdOptions: [],
       node: {},
       form: {
-        nodeName: "",
-        workTypeId: "",
+        nodeName: '',
+        workTypeId: '',
         operatorId: []
       },
       rules: {
         nodeName: [
-          { required: true, message: "请输入节点名称", trigger: "blur" }
+          { required: true, message: '请输入节点名称', trigger: 'blur' }
         ],
         workTypeId: [
-          { required: true, message: "请选择工种", trigger: "blur" }
+          { required: true, message: '请选择工种', trigger: 'blur' }
         ],
         operatorId: [
-          { required: true, message: "请选择操作人", trigger: "blur" }
+          { required: true, message: '请选择操作人', trigger: 'blur' }
         ]
       }
-    };
+    }
   },
   watch: {
-    data(val) {
-      this.node = val;
+    data (val) {
+      this.node = val
       this.form = {
         ...this.form,
         ...this.node
-      };
+      }
     },
-    disabled(val) {
-      this.disabled = val;
+    disabled (val) {
+      this.disabled = val
     }
   },
-  activated() {},
-  created() {
-    this.getWorkTypeOptions();
+  activated () {},
+  created () {
+    this.getWorkTypeOptions()
   },
   computed: {},
-  mounted() {
-    this.node = this.data;
+  mounted () {
+    this.node = this.data
     this.form = {
       ...this.form,
       ...this.node
-    };
+    }
     if (this.node.operatorId) {
-      this.form.operatorId = this.node.operatorId.split(",");
+      this.form.operatorId = this.node.operatorId.split(',')
     }
 
-    this.getOperatorList();
+    this.getOperatorList()
   },
   methods: {
-    getWorkTypeOptions() {
-      this.workTypeOptions = [];
+    getWorkTypeOptions () {
+      this.workTypeOptions = []
       getWorkType().then(({ data }) => {
-        if (data && data.code === "200") {
-          this.workTypeOptions = data.data;
+        if (data && data.code === '200') {
+          this.workTypeOptions = data.data
         }
-      });
+      })
     },
     // 按工种ID查询操作人列表
-    getOperatorList() {
+    getOperatorList () {
       if (this.node.workTypeId) {
         workTypeMasterList(this.node.workTypeId).then(({ data }) => {
-          if (data && data.code === "200") {
-            this.operatorIdOptions = [];
+          if (data && data.code === '200') {
+            this.operatorIdOptions = []
             data.data.forEach(item => {
-              this.operatorIdOptions.push(item);
-            });
+              this.operatorIdOptions.push(item)
+            })
           }
-        });
+        })
       }
     },
     // 校验表单
-    validateFormData() {
+    validateFormData () {
       return new Promise((resolve, reject) => {
-        this.$refs["form"].validate(valid => {
+        this.$refs['form'].validate(valid => {
           if (!valid) {
             // eslint-disable-next-line prefer-promise-reject-errors
-            reject();
-            return;
+            reject()
+            return
           }
-          resolve();
-        });
-      });
+          resolve()
+        })
+      })
     },
     // 获取表单数据
-    formData() {
-      const form = { ...this.form, operatorName: "" };
+    formData () {
+      const form = { ...this.form, operatorName: '' }
       if (this.form.operatorId != null) {
-        form.operatorId = this.form.operatorId.toString();
+        form.operatorId = this.form.operatorId.toString()
         this.form.operatorId.forEach(id => {
-          var op = this.operatorIdOptions.find(t => t.userId == id);
+          let op = this.operatorIdOptions.find(t => t.userId === id)
           if (op.name != null) {
-            form.operatorName += op.name + " ";
+            form.operatorName += op.name + ' '
           }
-        });
+        })
       }
-      return form;
+      return form
     }
   }
-};
+}
 </script>
 <style scoped></style>

+ 4 - 3
src/views/modules/process/process.vue

@@ -44,9 +44,10 @@
                 </div>
           </div>
           <div class='confirmBox'>
-              <el-button :disabled="list.length == 0" type='success' size='medium' style='padding:8px 18px; margin-left:20px; font-size:14px;' @click="deploy">部署</el-button>
-              <el-button :disabled="list.length == 0" type='primary' size='medium' style='padding:8px 18px; margin-left:20px; font-size:14px;' @click="replace">重置</el-button>
-              <el-button :disabled="list.length == 0" type='success' size='medium' style='padding:8px 18px; margin-left:20px; font-size:14px;' @click="confirm">提交</el-button>
+              <el-button :disabled="list.length === 0" type='success' size='medium' style='padding:8px 18px; margin-left:20px; font-size:14px;' @click="deploy">部署</el-button>
+              <el-button :disabled="list.length === 0" type='primary' size='medium' style='padding:8px 18px; margin-left:20px; font-size:14px;' @click="replace">重置</el-button>
+              <el-button :disabled="list.length === 0" type='success' size='medium' style='padding:8px 18px; margin-left:20px; font-size:14px;' @click="confirm">提交</el-button>
+<!--            <span>说明</span>-->
           </div>
         </div>
       </div>

+ 2 - 2
src/views/modules/tech/crafts-detail.vue

@@ -93,7 +93,7 @@ export default {
       visible: false,
       isFlow: false,
       id: 0,
-      productName: "",
+      productName: '',
       dataForm: {},
       stepList: [],
       logList: [],
@@ -109,7 +109,7 @@ export default {
       this.visible = true
       this.isFlow = !!(businessType && businessType !== '')
       this.id = id || 0
-      this.productName = productName;
+      this.productName = productName
       this.dataForm = {}
       this.stepList = []
       this.logList = []

+ 1 - 1
src/views/modules/tech/crafts-management.vue

@@ -241,7 +241,7 @@
       detailHandle (id, productName) {
         this.detailVisible = true
         this.$nextTick(() => {
-          this.$refs.detail.init(id, "", productName)
+          this.$refs.detail.init(id, '', productName)
         })
       }
     }