From db78e86024c5cc3928bdd837e148204d59bd4fbb Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期四, 07 十一月 2024 12:10:13 +0800
Subject: [PATCH] 业务类型和链接类型添加修改调整

---
 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue |   72 ++++++++++++++++++------------------
 1 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue
index 88a6823..6885a07 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/businessType/index.vue
@@ -229,17 +229,18 @@
         </div>
       </el-form>
       <div class="bottomForm">
-        <h3 style="margin-bottom: 10px;">灞炴�ф睜鍒楄〃</h3>
         <avue-crud
+          size="mini"
           :data="dialogAttrData"
           :option="dialogAttrOption"
           @row-del="dialogBottomAttrDel">
           <template slot="menuLeft">
-            <el-button icon="el-icon-plus" size="small" type="primary" @click="addDialogClickHandler">鍒涘缓</el-button>
+            <h3 style="display: inline-block;margin-right: 20px;margin-bottom: 10px;">灞炴�ф睜鍒楄〃</h3>
+            <el-button icon="el-icon-plus" size="mini" type="primary" @click="addDialogClickHandler">鍒涘缓</el-button>
           </template>
         </avue-crud>
       </div>
-      <span slot="footer" class="dialog-footer avue-dialog__footer">
+      <span slot="footer" class="dialog-footer">
          <el-button type="primary" @click="addDialogSavaHandler">纭� 瀹�</el-button>
          <el-button @click="addDialogClose">鍙� 娑�</el-button>
         </span>
@@ -271,8 +272,8 @@
       >
       </avue-crud>
       <span slot="footer" class="dialog-footer">
-         <el-button @click="dialogAttrClose">鍙� 娑�</el-button>
          <el-button type="primary" @click="dialogAttrAddClickHandler">纭� 瀹�</el-button>
+         <el-button @click="dialogAttrClose">鍙� 娑�</el-button>
         </span>
     </el-dialog>
 
@@ -496,6 +497,7 @@
         index: false,
         selection: false,
         refreshBtn: false,
+        header:false,
         column: [
           {
             label: '绫诲瀷鍚�',
@@ -577,12 +579,16 @@
         height: 450,
         searchMenuSpan: 8,
         header: false,
+        selectable:function(row){
+          return row.selectable;
+        },
         column: [
           {
             label: '灞炴�у悕',
             prop: 'id',
             sortable: true,
             search: true,
+            width:260
           },
           {
             label: '灞炴�х被鍨�',
@@ -594,6 +600,7 @@
             label: '鍒濆鍊�',
             prop: 'defaultValue',
             sortable: true,
+            width: 200
           },
           {
             label: '璇存槑',
@@ -623,8 +630,10 @@
         editBtn: false,
         refreshBtn: false,
         selection: false,
-        height: 210,
+        height: 220,
         addBtn: false,
+        gridBtn:false,
+        columnBtn:false,
         menuWidth:100,
         // index:false,
         column: [
@@ -632,12 +641,14 @@
             label: '灞炴�у悕',
             prop: 'id',
             sortable: true,
+            width:260,
           },
           {
 
             prop: 'btmTypeId',
             label: '涓氬姟绫诲瀷',
-            sortable: true
+            sortable: true,
+            width: 200
           },
           {
             label: '灞炴�х被鍨�',
@@ -649,7 +660,7 @@
             label: '鍒濆鍊�',
             prop: 'defaultValue',
             sortable: true,
-            width:150,
+            width:200,
           },
           {
             label: '璇存槑',
@@ -673,22 +684,26 @@
           {
             prop: 'id',
             label: '灞炴�у悕',
-            sortable: true
+            sortable: true,
+            width:260
           },
           {
             prop: 'btmTypeId',
             label: '涓氬姟绫诲瀷',
-            sortable: true
+            sortable: true,
+            width:200
           },
           {
             prop: 'attributeDataType',
             label: '灞炴�х被鍨�',
-            sortable: true
+            sortable: true,
+            width:150
           },
           {
             prop: 'defaultValue',
             label: '榛樿鍊�',
-            sortable: true
+            sortable: true,
+            width: 200
           },
           {
             prop: 'description',
@@ -929,8 +944,11 @@
     // 鏌ヨ灞炴�ф睜鍒楄〃鏁版嵁
     getAttrDialogDta() {
       gridAttribute(this.attrPage.currentPage, this.attrPage.pageSize, this.searchAttrParams).then(res => {
-        const data = res.data.data;
-        this.dialogAttrSaveData = data;
+        const data = res.data.data.map(item=>{
+          item.selectable=!this.dialogAttrData.some(existingItem => existingItem.id === item.id);
+          return item;
+        });
+        this.dialogAttrSaveData=data;
         this.attrPage.total = res.data.total;
         this.dialogAttrLoading = false;
       }).catch(err => {
@@ -951,7 +969,9 @@
 
     // 娣诲姞灞炴�ф睜 琛岀偣鍑�
     dialogAttrRowClickHandler(row) {
-
+      if(!row.selectable){
+        return;
+      }
       func.rowClickHandler(
         row,
         this.$refs.dialogAttrCrud,
@@ -999,35 +1019,15 @@
 
     // 娣诲姞灞炴�ф睜 淇濆瓨
     dialogAttrAddClickHandler() {
-      let hasDuplicate = false;
-
-      // 鍏堝垱寤轰竴涓复鏃舵暟缁勬潵瀛樺偍涓嶉噸澶嶇殑椤�
-      const newItems = [];
-
       this.dialogAttrSelectList.forEach(item => {
-        const exists = this.dialogAttrData.some(existingItem => existingItem.id === item.id);
-
-        if (exists) {
-          hasDuplicate = true;
-          return;
-        }
-
-        // 濡傛灉娌℃湁閲嶅椤癸紝鍒欏皢璇ラ」娣诲姞鍒颁复鏃舵暟缁勪腑
-        newItems.push({
+        this.dialogAttrData.push({
           id: item.id,
           attributeDataType: item.attributeDataType,
           defaultValue: item.defaultValue,
           description: item.description
         });
       });
-
-      if (hasDuplicate) {
-        this.$message.error('璇锋鏌ユ槸鍚︽湁娣诲姞閲嶅椤癸紒');
-      } else {
-        // 濡傛灉娌℃湁閲嶅椤癸紝灏嗘柊椤规坊鍔犲埌 dialogAttrData
-        this.dialogAttrData.push(...newItems);
-        this.attrPollDialogVisible = false;
-      }
+      this.attrPollDialogVisible = false;
     },
 
     // 灞炴�ф睜鍒犻櫎

--
Gitblit v1.9.3