Bläddra i källkod

fix(formParserDialog): 移除edit属性并添加view控制禁用状态,铁和总经理咨询费能填写

liujt 7 månader sedan
förälder
incheckning
2a8c5a2f20
1 ändrade filer med 23 tillägg och 10 borttagningar
  1. 23 10
      src/views/bpm/handleTask/formParser/formParserDialog.vue

+ 23 - 10
src/views/bpm/handleTask/formParser/formParserDialog.vue

@@ -14,7 +14,6 @@
       v-if="Object.keys(form?.formJson || {}).length !== 0"
       :data="jsonData"
       :value="form.valueJson"
-      :edit="false"
       ref="generateForm"
     >
       <template v-slot:blank_adopzrdd="scope">
@@ -43,6 +42,7 @@
           <el-input
             v-model="scope.model.eom_contact.name"
             style="width: 100%"
+            :disabled="view"
           ></el-input>
         </div>
       </template>
@@ -52,6 +52,7 @@
           <el-input
             v-model="scope.model.manage_workorder.code"
             style="width: 100%"
+            :disabled="view"
           ></el-input>
         </div>
       </template>
@@ -230,18 +231,21 @@ export default {
       index: '',
       jsonData: {},
       width: '30%',
-      isSaveLoading: false
+      isSaveLoading: false,
+      view: true
     };
   },
-  modelWidth() {
-    let width =
-      this.jsonData.config?.platform && this.jsonData.config.platform === 'pc'
-        ? 1100
-        : 450;
-    if (this.form?.taskDefinitionKey == 'CGYSP') {
-      return (width = '70%');
+  computed: {
+    modelWidth() {
+      let width =
+        this.jsonData.config?.platform && this.jsonData.config.platform === 'pc'
+          ? 1100
+          : 450;
+      if (this.form?.taskDefinitionKey == 'CGYSP') {
+        return (width = '70%');
+      }
+      return width + 'px';
     }
-    return width + 'px';
   },
   methods: {
     open(row) {
@@ -256,6 +260,15 @@ export default {
           };
           // item.url = item.url && item.url.replace('/api', this.APIUrl);
         });
+        this.$nextTick(async() => {
+          let data = await this.$refs.generateForm.getData(false);
+          console.log('data~~~~~', data);
+          // this.$refs.generateForm.disabled(['input_bonus_distribution_ratio', 'input_manager_approval_fee'], true)
+          let arr = Object.keys(data)?.filter((item) => item != 'input_bonus_distribution_ratio' && item != 'input_manager_approval_fee')
+          console.log(arr, 'arr');
+          this.$refs.generateForm.disabled(arr, true)
+        })
+        
     },
     cancel() {
       this.$emit('update:formParserDialogFlag', false);