chenrui  1 жил өмнө
parent
commit
8806ff8d93

+ 20 - 1
src/views/createtable/index.vue

@@ -1203,7 +1203,26 @@ export default {
     },
     handleCheckedCitiesChanges (value) {
       this.tableFlag = value
-    }
+    },
+    //获取表单下拉数据
+    changeSelect (code) {
+      if (code == 'tasktype' && this.tableForm[code] == 1) {
+        this.vflag = true
+      }
+      if (code == 'passparameters') return
+      const datas = this.$store.state.auth.authMsg
+      if (!datas?.length) return
+      const ndata = datas.filter(item => item.labelcode && item.pagecode == code)
+      if (ndata?.length) {
+        const nitem = ndata[0]
+        const nval = this.tableForm[code]
+        const { dropdownlistlabel, labelcode, dropdownlistid } = nitem
+        const wdata = this.tableOptions[code].filter(item => item[dropdownlistid] == nval)
+        if (!wdata.length) return
+        const witem = wdata[0]
+        this.tableForm[labelcode] = witem[dropdownlistlabel]
+      }
+    },
   },
 }
 </script>