From ae4fb4b7ca7692985af31a6faab8c0d9fc290c4e Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期五, 02 八月 2024 17:08:48 +0800
Subject: [PATCH] 整合富文本

---
 Source/plt-web/plt-web-ui/src/api/modeling/linkType/api.js                   |   20 ++++++
 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue |  145 ++++++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 153 insertions(+), 12 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/api/modeling/linkType/api.js b/Source/plt-web/plt-web-ui/src/api/modeling/linkType/api.js
index bedefe3..73921ce 100644
--- a/Source/plt-web/plt-web-ui/src/api/modeling/linkType/api.js
+++ b/Source/plt-web/plt-web-ui/src/api/modeling/linkType/api.js
@@ -33,3 +33,23 @@
     method: "post",
   });
 }
+
+// 鏌ヤ笟鍔$被鍨嬫帴鍙�
+export function getBizTypes() {
+  return request({
+    url: "/api/linkTypeController/expData",
+    method: "post",
+  });
+}
+
+// 瀵煎嚭
+export function exportStatus  (params) {
+  return request({
+    url: '/api/statusController/exportStatus',
+    method: 'get',
+    headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'},
+    responseType: 'blob',
+    params
+  })
+}
+
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue
index 4aee662..c1a4f57 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue
@@ -238,8 +238,8 @@
         </avue-crud>
       </div>
       <span slot="footer" class="dialog-footer">
-         <el-button>鍙� 娑�</el-button>
-         <el-button type="primary">纭� 瀹�</el-button>
+         <el-button @click="addDialogClose">鍙� 娑�</el-button>
+         <el-button type="primary" @click="addDialogSavaHandler">纭� 瀹�</el-button>
         </span>
 
       <!-- 灞炴�ф睜鍒楄〃 -->
@@ -253,18 +253,23 @@
         @close="dialogAttrClose"
       >
         <avue-crud
-          ref="dialogAttrCrud"
           :key="dialogAttrReload"
+          ref="dialogAttrCrud"
           :data="dialogAttrData"
           :option="dialogAttrOption"
+          :page.sync="attrPage"
           :table-loading="dialogAttrLoading"
           @selection-change="dialogAttrSelectChange"
           @row-click="dialogAttrRowClickHandler"
+          @size-change="attrSizeChange"
+          @current-change="attrCurrentChange"
+          @search-change="attrHandleSearch"
+          @search-reset="attrHandleReset"
         >
         </avue-crud>
         <span slot="footer" class="dialog-footer">
          <el-button @click="dialogAttrClose">鍙� 娑�</el-button>
-         <el-button type="primary">纭� 瀹�</el-button>
+         <el-button type="primary" @click="dialogAttrAddClickHandler">纭� 瀹�</el-button>
         </span>
       </el-dialog>
     </el-dialog>
@@ -272,12 +277,17 @@
     <!-- 涓�鑷存�ф鏌� -->
     <el-dialog
       v-dialogDrag
-      :visible.sync="checkVisible"
+      :visible.sync="conCheckVisible"
       append-to-body="true"
       class="avue-dialog"
       title="涓�鑷存�ф鏌�"
       width="60%"
     >
+      <avue-crud
+        :data="conCheckData"
+        :option="conCheckOption"
+        :table-loading="conCheckLoading">
+      </avue-crud>
     </el-dialog>
   </el-container>
 </template>
@@ -291,23 +301,45 @@
   name: "index",
   data() {
     return {
+      conDefaultCheckData: [], // 淇濈暀涓婁釜鎺ュ彛杩斿洖鐨勬暟鎹�
+      conCheckLoading: false,
+      conCheckOption: {
+        ...basicOption,
+        menu: false,
+        addBtn: false,
+        index: false,
+        selection: false,
+        refreshBtn: false
+      },
+      conCheckData: [],
+      conCheckVisible: false,
+      attrPage: {
+        currentPage: 1,
+        pageSize: 30,
+        total: 0,
+        pageSizes: [30, 50, 100, 200],
+      },
+      searchAttrParams: {},
       dialogAttrReload: Math.random(),
       dialogAttrSelectList: [],
       dialogAttrLoading: false,
       dialogAttrData: [], // 灞炴�ф睜鏂板琛ㄦ牸
       dialogAttrOption: {
         ...basicOption,
+        calcHeight: -60,
         addBtn: false,
         menu: false,
         refreshBtn: false,
-        index:false,
+        index: false,
         highlightCurrentRow: true,
-        height:450,
+        height: 450,
+        searchMenuSpan: 8,
         column: [
           {
             label: '灞炴�у悕',
             prop: 'id',
             sortable: true,
+            search: true,
           },
           {
             label: '灞炴�х被鍨�',
@@ -323,7 +355,7 @@
             label: '璇存槑',
             prop: 'description',
             sortable: true,
-            overHidden:true
+            overHidden: true
           }
         ]
       },
@@ -355,7 +387,6 @@
         selection: false,
         height: 300,
         addBtn: false,
-        delBtn: false,
         // index:false,
         column: [
           {
@@ -482,9 +513,21 @@
 
     // 涓�鑷存�ф鏌�
     checkClickHandler() {
-      this.checkVisible = true;
+      this.conCheckVisible = true;
+      this.conCheckLoading = true;
       checkLinkType().then(res => {
+        if (res.data.code === 200) {
+          const data = res.data.data;
+          this.conDefaultCheckData = data;
+          data.map(item => {
+            // 鑾峰彇 btmCheckMap 瀵硅薄鐨勫睘鎬у悕
+            const keys = Object.keys(item.btmCheckMap);
 
+            return {
+              id: keys[0],
+            }
+          })
+        }
       }).catch(err => {
         this.$message.error(err)
       })
@@ -506,9 +549,15 @@
       this.dialogAttrLoading = true;
       this.attrPollDialogVisible = true;
       this.dialogAttrReload = Math.random(); // 寮哄埗鍒锋柊琛ㄦ牸 瑙e喅琛ㄦ牸閿欒
-      gridAttribute(1, -1, this.searchParams).then(res => {
+      this.getAttrDialogDta()
+    },
+
+    // 鏌ヨ灞炴�ф睜鍒楄〃鏁版嵁
+    getAttrDialogDta() {
+      gridAttribute(this.attrPage.currentPage, this.attrPage.pageSize, this.searchAttrParams).then(res => {
         const data = res.data.data;
         this.dialogAttrData = data;
+        this.attrPage.total = res.data.total;
         this.dialogAttrLoading = false;
       }).catch(err => {
         this.$message.error(err)
@@ -526,8 +575,80 @@
     },
 
     // 娣诲姞灞炴�ф睜 鍏抽棴瀵硅瘽妗�
-    dialogAttrClose(){
+    dialogAttrClose() {
       this.attrPollDialogVisible = false;
+      this.searchAttrParams = {};
+    },
+
+    // 娣诲姞灞炴�ф睜 淇濆瓨
+    dialogAttrAddClickHandler() {
+      let hasDuplicate = false;
+
+      // 鍏堝垱寤轰竴涓复鏃舵暟缁勬潵瀛樺偍涓嶉噸澶嶇殑椤�
+      const newItems = [];
+
+      this.dialogAttrSelectList.forEach(item => {
+        const exists = this.dialogBottomData.some(existingItem => existingItem.id === item.id);
+
+        if (exists) {
+          hasDuplicate = true;
+          return;
+        }
+
+        // 濡傛灉娌℃湁閲嶅椤癸紝鍒欏皢璇ラ」娣诲姞鍒颁复鏃舵暟缁勪腑
+        newItems.push({
+          id: item.id,
+          attributeDataType: item.attributeDataType,
+          defaultValue: item.defaultValue,
+          description: item.description
+        });
+      });
+
+      if (hasDuplicate) {
+        this.$message.error('璇锋鏌ユ槸鍚︽湁娣诲姞閲嶅椤癸紒');
+      } else {
+        // 濡傛灉娌℃湁閲嶅椤癸紝灏嗘柊椤规坊鍔犲埌 dialogBottomData
+        this.dialogBottomData.push(...newItems);
+        this.attrPollDialogVisible = false;
+      }
+    },
+
+    //娣诲姞灞炴�ф睜 鏉℃暟
+    attrSizeChange(val) {
+      this.attrPage.pageSize = val;
+      this.getAttrDialogDta()
+    },
+
+    //娣诲姞灞炴�ф睜 椤电爜
+    attrCurrentChange(val) {
+      this.attrPage.currentPage = val;
+      this.getAttrDialogDta();
+    },
+
+    //娣诲姞灞炴�ф睜 鎼滅储
+    attrHandleSearch(params, done) {
+      this.searchAttrParams = {
+        "conditionMap[id]": "*" + params.id + "*"
+      };
+      this.getAttrDialogDta();
+      done();
+    },
+
+    //娣诲姞灞炴�ф睜 娓呯┖鎼滅储
+    attrHandleReset() {
+      this.searchAttrParams = {};
+      this.getAttrDialogDta();
+    },
+
+    // 鍒涘缓 缂栬緫 瀵硅瘽妗嗗叧闂�
+    addDialogClose() {
+      this.visible = false;
+      this.dialogBottomData = [];
+    },
+
+    // 鍒涘缓缂栬緫 淇濆瓨
+    addDialogSavaHandler() {
+
     }
   }
 }

--
Gitblit v1.9.3