Quellcode durchsuchen

Merge remote-tracking branch 'origin/master'

yuhan vor 1 Jahr
Ursprung
Commit
422d292d67

+ 7 - 6
src/views/module_cmms/spotcheck/modules/SpotcheckForm.vue

@@ -11,12 +11,12 @@
           </a-col> -->
           <a-col :span="12">
             <a-form-model-item label="设备名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentid">
-              <j-search-select-tag v-model="model.equipmentid" dict="tpm_equipment,equipmentname,id" placeholder="请选择设备" @change="handleChange"/>
+              <j-search-select-tag v-model="model.equipmentid" dict="tpm_equipment,equipmentname,id" placeholder="请选择设备" @change="handleChange" :disabled="disabledEdit"/>
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
             <a-form-model-item label="点检内容名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="contentname">
-              <a-input v-model="model.contentname" placeholder="请输入所属点检内容名称" :disabled="disableds" ></a-input>
+              <a-input v-model="model.contentname" placeholder="请输入所属点检内容名称" disabled ></a-input>
             </a-form-model-item>
           </a-col>
           <!-- <a-col :span="12">
@@ -150,7 +150,7 @@
         modelWX:{
         },
         // 单个禁填
-        disableds: false,
+        disabledEdit: false,
         // 点检结果(-1为报修,1为其他结果)
         resultStatus: 1,
         labelCol: {
@@ -244,24 +244,25 @@
     methods: {
       add () {
         this.edit(this.modelDefault);
-        this.disableds = true
+        this.disabledEdit = false
         // 第二版
         // this.model = this.dataList
         // this.model.id = ""
       },
       // 监听选择的设备
       handleChange(value){
-        console.log(value)
         getAction(`/cmmsSpotcheck/cmmsSpotcheck/getInfoByEquipmentid/${value}`).then((res) => {
+          console.log(999,res)
           // this.model = res.result
           this.model.contentname = res.result.contentname
+          this.model.contentcode = res.result.contentcode
           this.model.spotcheckdate = res.result.spotcheckdate
           this.model.cmmsSpotcheckTitemList = res.result.cmmsSpotcheckTitemList
           this.model.id = ""
         })
       },
       edit (record) {
-        this.disableds = true
+        this.disabledEdit = true
         getAction(`/cmmsSpotcheck/cmmsSpotcheck/getInfoBySpotcheckid/${record.id}`).then((res) => {
             this.model = res.result
             const b = res.result.files.map((res) => {

+ 3 - 1
src/views/module_cmms/spotcheckContent/modules/SpotcheckContentForm.vue

@@ -18,7 +18,7 @@
               </a-col>
               <a-col :span="12">
                 <a-form-model-item label="选择设备" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentid">
-                  <j-search-select-tag v-model="model.equipmentid" dict="tpm_equipment,equipmentname,id"  />
+                  <j-search-select-tag v-model="model.equipmentid" dict="tpm_equipment,equipmentname,id" :disabled="disabledEdit" />
                 </a-form-model-item>
               </a-col>
               <a-col :span="12">
@@ -99,6 +99,7 @@
           xs: { span: 24 },
           sm: { span: 16 },
         },
+        disabledEdit: false,
         confirmLoading: false,
         validatorRules: {
           contentname: [
@@ -172,6 +173,7 @@
         this.visible = true;
       },
       edit (record) {
+        this.disabledEdit = true
         getAction(this.url.queryById, record).then((res) => {
             console.log(88,res)
             this.model = res.result

+ 6 - 2
src/views/module_cmms/spotcheckItem/modules/SpotcheckItemForm.vue

@@ -14,7 +14,7 @@
               <j-tree-select
                 ref="treeSelect"
                 placeholder="请选择设备类型"
-                multiple
+                :multiple="multiples"
                 v-model="model.equipmenttreeid"
                 dict="tpm_equipment_tree,name,id"
                 pidField="parentid"
@@ -85,6 +85,7 @@
           xs: { span: 24 },
           sm: { span: 16 },
         },
+        multiples: false,
         confirmLoading: false,
         validatorRules: {
           itemname: [
@@ -112,10 +113,13 @@
     },
     methods: {
       add () {
-        this.edit(this.modelDefault);
+        // this.edit(this.modelDefault);
+        this.multiples = true;
+        this.visible = true;
       },
       edit (record) {
         this.model = Object.assign({}, record);
+        this.multiples = false;
         this.visible = true;
       },
       submitForm () {

+ 3 - 1
src/views/module_cmms/upkeepPlan/modules/UpkeepPlanForm.vue

@@ -18,7 +18,7 @@
               </a-col>
               <a-col :span="12">
                 <a-form-model-item label="选择设备" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentid">
-                  <j-search-select-tag v-model="model.equipmentid" dict="tpm_equipment,equipmentname,id"  style="width: 100%"/>
+                  <j-search-select-tag v-model="model.equipmentid" dict="tpm_equipment,equipmentname,id" :disabled="disabledEdit" style="width: 100%"/>
                     <!-- <a-button type="primary" icon="search" /> -->
                 </a-form-model-item>
               </a-col>
@@ -187,6 +187,7 @@
           xs: { span: 24 },
           sm: { span: 18 },
         },
+        disabledEdit: false,
         confirmLoading: false,
         validatorRules: {
           planname: [
@@ -268,6 +269,7 @@
       },
       edit (record) {
         // this.model = Object.assign({}, record);
+        this.disabledEdit = true
         getAction(this.url.queryById, record).then((res) => {
             console.log(88,res)
             this.model = res.result