Prechádzať zdrojové kódy

设备工单优化界面

username 4 rokov pred
rodič
commit
8ef49586c9
1 zmenil súbory, kde vykonal 16 pridanie a 7 odobranie
  1. 16 7
      src/components/job/job_solve.vue

+ 16 - 7
src/components/job/job_solve.vue

@@ -2,7 +2,7 @@
   <el-container style="border: #000000;height: 100%;" v-if="visible">
     <avue-form ref="form" v-model="jobSolve" :option="option" @submit="submit">
       <template slot-scope="scope" slot="menuForm">
-        <el-button icon="el-icon-delete" @click="clearForm">清空</el-button>
+        <el-button icon="el-icon-delete" @click="clearForm" v-if="jobSolve.jobStatus===1">清空</el-button>
       </template>
     </avue-form>
   </el-container>
@@ -12,6 +12,7 @@
 import {
   update
 } from "@/api/order/deviceorder";
+
 export default {
   props: {
     visible: "",
@@ -65,12 +66,11 @@ export default {
             label: '处理人',
             prop: 'handlePerson',
             span: 12,
-
           }, {
             label: '联系方式',
             prop: 'handlePhone',
             row: true,
-            span: 12
+            span: 12,
           }, {
             label: '处理状态',
             prop: 'jobStatus',
@@ -96,7 +96,7 @@ export default {
 
     }
   },
-  mounted() {
+/*  mounted() {
     console.log("状态"+this.jobSolve.jobStatus);
     if (this.jobSolve.jobStatus == 2) {
       this.option.submitBtn = false;
@@ -105,7 +105,7 @@ export default {
       this.option.submitBtn = true;
       this.option.emptyBtn = false;
     }
-  },
+  },*/
   methods: {
     clearForm(){
       this.jobSolve.remark="";
@@ -113,8 +113,17 @@ export default {
       this.jobSolve.handlePerson="";
     },
     init() {
-      this.option.submitBtn = true;
-      this.option.emptyBtn = false;
+      if (this.jobSolve.jobStatus === 2) {
+        for(const item of this.option.group[1].column){
+          item.disabled = true;
+        }
+        this.option.submitBtn = false;
+      } else {
+        for(const item of this.option.group[1].column){
+          item.disabled = item.prop==="alarmTime";
+        }
+        this.option.submitBtn = true;
+      }
     },
     submit() {
       update(this.jobSolve).then(() => {