From c83eb18f483819e32ba5e94383adc8a7f8c9014d Mon Sep 17 00:00:00 2001
From: hyt <958868763@qq.com>
Date: Mon, 9 Sep 2024 10:18:12 +0800
Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=B8=AD=E5=BF=83=E6=B7=BB?=
 =?UTF-8?q?=E5=8A=A0=E5=91=A8=E4=B8=89=E5=BC=80=E5=8F=91=20=E5=91=A8?=
 =?UTF-8?q?=E5=9B=9B=E6=BC=94=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/components/base/baseNewForm/index.vue     |   2 +-
 .../distribute/settingForm.vue                |   1 -
 src/views/recordContrast/configData.js        | 148 ++++++++----------
 src/views/recordContrast/rightDialog.vue      |  51 +++---
 4 files changed, 94 insertions(+), 108 deletions(-)

diff --git a/src/components/base/baseNewForm/index.vue b/src/components/base/baseNewForm/index.vue
index bd2ff82..002a420 100644
--- a/src/components/base/baseNewForm/index.vue
+++ b/src/components/base/baseNewForm/index.vue
@@ -398,7 +398,7 @@ export default {
           obj = item
         }
       })
-      this.$emit('onSelect', val, index, indexRow, obj)
+      this.$emit('onSelect', val, index, indexRow, obj,options,this.ruleForm,row)
       if (row.changeRemind) {
         this.$emit('changeRemind', this.ruleForm)
       }
diff --git a/src/views/masterDataOptions/distribute/settingForm.vue b/src/views/masterDataOptions/distribute/settingForm.vue
index 40c5108..6e10227 100644
--- a/src/views/masterDataOptions/distribute/settingForm.vue
+++ b/src/views/masterDataOptions/distribute/settingForm.vue
@@ -565,7 +565,6 @@ export default {
           label: item.name
         })
       })
-
     },
     //编辑获取数据
     async getrowDetails(id) {
diff --git a/src/views/recordContrast/configData.js b/src/views/recordContrast/configData.js
index 0f38ed1..ad8687b 100644
--- a/src/views/recordContrast/configData.js
+++ b/src/views/recordContrast/configData.js
@@ -35,7 +35,7 @@ const tableColumnData = [
   {
     label: '名称',
     prop: 'rightName'
-  },
+  }
 ]
 const tableVersionColumn = [
   {
@@ -65,34 +65,26 @@ const formRow = [
         label: '左应用编码',
         prop: 'leftAppCode',
         tag: 'elInput',
-        span: 12
+        span: 12,
+        disabled: true
       },
       {
         label: '左应用名称',
         prop: 'leftAppName',
-        tag: 'elInput',
-        span: 12
+        tag: 'elSelect',
+        span: 12,
+        options: []
       }
     ]
   },
   {
     elCol: [
-      {
-        label: '主键',
-        prop: 'leftId',
-        tag: 'elInput',
-        span: 12
-      },
       {
         label: '编码',
         prop: 'leftCode',
         tag: 'elInput',
         span: 12
-      }
-    ]
-  },
-  {
-    elCol: [
+      },
       {
         label: '名称',
         prop: 'leftName',
@@ -101,46 +93,44 @@ const formRow = [
       }
     ]
   },
+  {},
   {
     elCol: [
       {
-        label: '应用编码',
+        label: '右应用编码',
         prop: 'rightAppCode',
         tag: 'elInput',
-        span: 12
+        span: 12,
+        disabled: true
       },
       {
-        label: '应用名称',
+        label: '右应用名称',
         prop: 'rightAppName',
-        tag: 'elInput',
-        span: 12
+        tag: 'elSelect',
+        span: 12,
+        options: []
       }
     ]
   },
   {
     elCol: [
-      {
-        label: '主键',
-        prop: 'rightId',
-        tag: 'elInput',
-        span: 12
-      },
       {
         label: '编码',
         prop: 'rightCode',
         tag: 'elInput',
         span: 12
-      }
-    ]
-  },
-  {
-    elCol: [
+      },
       {
         label: '名称',
         prop: 'rightName',
         tag: 'elInput',
         span: 12
-      },
+      }
+    ]
+  },
+  {
+    elCol: [
+
       {
         label: '排序',
         prop: 'sorts',
@@ -159,40 +149,37 @@ const peopleFormRow = [
         label: '左应用编码',
         prop: 'leftAppCode',
         tag: 'elInput',
-        span: 12
+        span: 12,
+        disabled: true
       },
       {
         label: '左应用名称',
         prop: 'leftAppName',
-        tag: 'elInput',
-        span: 12
+        tag: 'elSelect',
+        span: 12,
+        options: []
       }
     ]
   },
   {
     elCol: [
-      {
-        label: '主键',
-        prop: 'leftId',
-        tag: 'elInput',
-        span: 12
-      },
       {
         label: '编码',
         prop: 'leftCode',
         tag: 'elInput',
         span: 12
-      }
-    ]
-  },
-  {
-    elCol: [
+      },
       {
         label: '名称',
         prop: 'leftName',
         tag: 'elInput',
         span: 12
-      },
+      }
+    ]
+  },
+  {
+    elCol: [
+
       {
         label: '手机号',
         prop: 'leftTel',
@@ -200,77 +187,70 @@ const peopleFormRow = [
         type: 'number',
         span: 12
       },
-    ]
-  },
-  {
-    elCol: [
       {
         label: '身份证号',
         prop: 'leftIc',
         tag: 'elInput',
         type: 'number',
         span: 12
-      },
-    ]
-  },
-  {
-    elCol: [
-      {
-        label: '应用编码',
-        prop: 'rightAppCode',
-        tag: 'elInput',
-        span: 12
-      },
-      {
-        label: '应用名称',
-        prop: 'rightAppName',
-        tag: 'elInput',
-        span: 12
       }
     ]
   },
   {
     elCol: [
       {
-        label: '主键',
-        prop: 'rightId',
+        label: '右应用编码',
+        prop: 'rightAppCode',
         tag: 'elInput',
-        span: 12
+        span: 12,
+        disabled: true
       },
+      {
+        label: '右应用名称',
+        prop: 'rightAppName',
+        tag: 'elSelect',
+        span: 12,
+        options: []
+      }
+    ]
+  },
+  {
+    elCol: [
       {
         label: '编码',
         prop: 'rightCode',
         tag: 'elInput',
         span: 12
-      }
-    ]
-  },
-  {
-    elCol: [
+      },
       {
         label: '名称',
         prop: 'rightName',
         tag: 'elInput',
         span: 12
-      },
+      }
+    ]
+  },
+  {
+    elCol: [
+
       {
         label: '手机号',
         prop: 'rightTel',
         tag: 'elInput',
         type: 'number',
         span: 12
-      }
-    ]
-  },
-  {
-    elCol: [
+      },
       {
         label: '身份证号',
         prop: 'rightIc',
         tag: 'elInput',
         type: 'number',
         span: 12
-      },
+      }
+    ]
+  },
+  {
+    elCol: [
       {
         label: '排序',
         prop: 'sorts',
@@ -279,7 +259,7 @@ const peopleFormRow = [
         span: 12
       }
     ]
-  },
+  }
 ]
 const basicsRules = {
   leftCode: [{
@@ -301,7 +281,7 @@ const basicsRules = {
     required: true,
     message: '请填写名称',
     trigger: 'blur'
-  }],
+  }]
 }
 
 // 查看
diff --git a/src/views/recordContrast/rightDialog.vue b/src/views/recordContrast/rightDialog.vue
index 7565087..4245ae6 100644
--- a/src/views/recordContrast/rightDialog.vue
+++ b/src/views/recordContrast/rightDialog.vue
@@ -154,32 +154,38 @@ export default {
     }
   },
   mounted() {
-    this.initSelect()
+
   },
   methods: {
-    // 插件下拉
-    async initSelect() {
-      let res = await authApi(
-        'pluginService',
-        'plugins',
-        'queryPluginsByType',
-        '',
-        {
-          'pluginType': '1'
-        }
-      )
-      if (res.status == 200) {
-        console.log(res.attribute)
-        res.attribute.forEach(item => {
-          this.$set(this.select_dist, item.pluginId, item)
-        })
-        console.log(res.attribute, 'res.attribute插件返回')
-        this.formRow[0].elCol[0].options = res.attribute
+    onSelect(val, index, indexRow, obj, op, form, row) {
+      if (row.prop === 'leftAppName') {
+        this.$set(form, 'leftAppCode', obj.code)
+        this.$set(form, 'leftAppId', obj.value)
+        this.$set(form, 'leftAppName', obj.label)
+      }
+      if (row.prop === 'rightAppName') {
+        this.$set(form, 'rightAppCode', obj.code)
+        this.$set(form, 'rightAppId', obj.value)
+        this.$set(form, 'rightAppName', obj.label)
       }
     },
-    //下拉改变事件
-    onSelect(val, index, indexRow, obj) {
-      this.$set(this.$refs.basicsForm.ruleForm, 'plugName', this.select_dist[val]['pluginName'])
+    // 插件下拉
+    async initSelect() {
+      const res = await authApi('sysApplicationService', '', 'queryEntity', '', {})
+      console.log(res)
+      this.formRow[0].elCol[1].options = []
+      res.attribute.forEach(item => {
+        this.formRow[0].elCol[1].options.push({
+          value: item.id,
+          label: item.name,
+          code: item.appId
+        })
+        this.formRow[3].elCol[1].options.push({
+          value: item.id,
+          label: item.name,
+          code: item.appId
+        })
+      })
     },
     openDialog(type, row, treeType) {
       this.treeType = treeType
@@ -189,6 +195,7 @@ export default {
       } else {
         this.formRow = configData.formRow
       }
+      this.initSelect()
       // this.queryProductClassfy();
       this.submitShow = true
       this.isEdit = false