From 083e907c2567ba53c892a45cf2605172715922ab Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期三, 10 七月 2024 17:03:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue |  136 ++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 127 insertions(+), 9 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
index 982fa57..bfa9643 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -1,6 +1,7 @@
 <template>
   <div>
-    <div v-if="this.crudArrayFlag" class="app" style="display: flex;flex-wrap: wrap; display: inline-block">
+    <div v-if="this.crudArrayFlag" class="app"
+         style="display: flex;flex-wrap: wrap; display: inline-block;height: 80px">
       <el-button-group>
         <!--鏂板-->
         <span v-if="permissionList.busineStatus">
@@ -318,6 +319,20 @@
         :referConfigOption="referConfigOption"
         @setReferConfigValue="setReferConfigValue"
       ></refer-config-dialog>
+      <!--杩戜箟璇嶆煡璇㈣鍒�      -->
+      <el-dialog :visible.sync="synonymVisible" append-to-body title="杩戜箟璇嶆煡璇㈣鍒�">
+        <avue-crud v-loading="sysonymLoading" :data="synonymData" :option="synonymOption" @selection-change="sysChange">
+          <template slot="lcStatus" slot-scope="{row}">
+            <el-tag v-if="row.lcStatus === 'Released'" type="success">鍚敤</el-tag>
+            <el-tag v-else type="danger">鍋滅敤</el-tag>
+          </template>
+        </avue-crud>
+        <div slot="footer" class="dialog-footer">
+          <el-button type="info" @click="sysClear">娓呯┖</el-button>
+          <el-button type="primary" @click="sysnonymSubmit">纭畾</el-button>
+          <el-button @click="sysnonymCancel">鍙栨秷</el-button>
+        </div>
+      </el-dialog>
 
     </div>
 
@@ -401,7 +416,14 @@
 </template>
 
 <script>
-import {AttrByBtm, gridCodeClassifyTemplateAttr, batchAddSave, copyto, listByFlag} from '@/api/template/templateAttr'
+import {
+  AttrByBtm,
+  gridCodeClassifyTemplateAttr,
+  batchAddSave,
+  copyto,
+  listByFlag,
+  codeSynonym
+} from '@/api/template/templateAttr'
 import {getList} from "@/api/refer/table";
 import func from "@/util/func";
 import {getCurrentInstance} from "vue";
@@ -519,6 +541,48 @@
   },
   data() {
     return {
+      sysSelectData: [],
+      sysonymLoading: false,
+      synonymOption: {
+        addBtn: false,
+        editBtn: false,
+        delBtn: false,
+        refreshBtn: false,
+        columnBtn: false,
+        menu: false,
+        selection: true,
+        column: [
+          {
+            label: '缂栫爜',
+            prop: 'id',
+            align: 'center'
+          },
+          {
+            label: '鍚嶇О',
+            prop: 'name',
+            align: 'center'
+          },
+          {
+            label: '婧愬��',
+            prop: 'sourceValue',
+            align: 'center'
+          },
+          {
+            label: '鍚屼箟璇�',
+            prop: 'synonymValue',
+            align: 'center'
+          },
+          {
+            label: '鍚仠鐘舵��',
+            prop: 'lcStatus',
+            align: 'center',
+            slot: true
+          },
+        ]
+      },
+      synonymData: [],
+      //杩戜箟璇嶆煡璇㈣鍒�
+      synonymVisible: false,
       //琛ㄦ牸楂樺害
       dynamicHeight: '',
       // 淇濆瓨鍗曞厓鏍肩姸鎬�
@@ -812,7 +876,7 @@
           },
           {
             label: "鍙",
-            prop: "readonlyFlag",
+            prop: "readOnlyFlag",
           },
           {
             label: "鍒楄〃鎺掑簭",
@@ -1290,6 +1354,12 @@
             edit: "switch"
           },
           {
+            label: '杩戜箟璇嶆煡璇㈣鍒�',
+            prop: 'sysonymRuleOidsText',
+            cell: false,
+            edit: 'refer'
+          },
+          {
             label: "鐩镐技鏌ラ噸灞炴��",
             prop: "sameRepeatAttrFlag",
             width: 110,
@@ -1316,7 +1386,7 @@
           },
           {
             label: "鍙",
-            prop: "readonlyFlag",
+            prop: "readOnlyFlag",
             cell: false,
             edit: "switch"
           },
@@ -1328,7 +1398,7 @@
           },
           {
             label: "澶氳鏂囨湰",
-            prop: "textareaFlag",
+            prop: "textAreaFlag",
             cell: false,
             edit: "switch"
           },
@@ -1543,13 +1613,13 @@
         value: 'tableDisplayFlag',
         label: '鍒楄〃鏄剧ず'
       }, {
-        value: 'readonlyFlag',
+        value: 'readOnlyFlag',
         label: '鍙'
       }, {
         value: 'sortAttrFlag',
         label: '鍒楄〃鎺掑簭'
       }, {
-        value: 'textareaFlag',
+        value: 'textAreaFlag',
         label: '澶氳鏂囨湰'
       }, {
         value: 'imageFlag',
@@ -1598,7 +1668,7 @@
       if (this.editStyleFlag) {
         return '800px'
       } else {
-        return 'calc(100vh - 565px)'
+        return 'calc(100vh - 602px)'
       }
     }
   },
@@ -1612,6 +1682,35 @@
     })
   },
   methods: {
+    //杩戜箟璇嶆煡璇㈣鍒欏彇娑�
+    sysnonymCancel() {
+      this.synonymVisible = false;
+    },
+    //杩戜箟璇嶆煡璇㈣鍒欑‘瀹�
+    sysnonymSubmit() {
+      if (this.sysSelectData.length <= 0) {
+        this.$message.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒')
+      } else {
+        const newArray = this.sysSelectData.map(obj => obj.oid);
+        const newString = newArray.join(',');
+        const newArrayName = this.sysSelectData.map(obj => obj.name);
+        const newStringName = newArrayName.join(',')
+        this.$set(this.CurrentCell, 'sysonymRuleOids', newString)
+        //text
+        this.$set(this.CurrentCell, 'sysonymRuleOidsText', newStringName)
+        this.$set(this.CurrentCell, 'sysonymRuleOidsData', this.sysSelectData)
+        this.AddCellFlag = true;
+        this.synonymVisible = false;
+      }
+    },
+    sysClear(){
+      this.CurrentCell.sysonymRuleOidsText = "";
+      this.CurrentCell.sysonymRuleOidsData = "";
+      this.AddCellFlag = true;
+    },
+    sysChange(row) {
+      this.sysSelectData = row;
+    },
     //鏂板鎼滅储
     AddFindHandler() {
       if (this.SelectValue == 'id') {
@@ -1876,6 +1975,7 @@
     //琛ㄦ牸琛岀紪杈�
     handleCellClicks(row, column) {
       if (this.editOpenFlag) {
+        this.AddCellFlag = false;
         this.editingRows = row;
         this.editShows = column.property;
         this.rowOid = row.oid;
@@ -1941,6 +2041,17 @@
             if (this.CurrentCell.attributeGroup !== '') {
               this.attrModel = this.CurrentCell.attributeGroup
             }
+          },
+          sysonymRuleOidsText: () => {
+            this.sysonymLoading = true
+            codeSynonym('1', '-1', 'Released').then(res => {
+              this.synonymData = res.data.data.records;
+              this.sysonymLoading = false;
+            }).catch(() => {
+              this.$message.error('璇锋鏌ユ帶鍒跺彴閿欒淇℃伅锛�')
+            })
+
+            this.synonymVisible = true;
           }
         };
 
@@ -2244,9 +2355,16 @@
 </script>
 
 <style lang="scss" scoped>
+
+/deep/ .el-table__fixed-body-wrapper {
+  .el-table__body {
+    padding-bottom: 15px;
+  }
+}
+
 //鍥哄畾鍒楅珮搴�
 /deep/ .el-table__fixed {
-  height: calc(100vh - 584px) !important;
+  height: calc(100vh - 618px) !important;
 }
 
 ///deep/ .el-table__fixed[v-if='editStyleFlag'] {

--
Gitblit v1.9.3