From 813b237509319b8db2e0ac8c82025b70713aa11c Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期三, 24 四月 2024 10:31:41 +0800 Subject: [PATCH] 操作日志添加模糊查询-集成日志隐藏表格接口参数 --- Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue | 129 ++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 120 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..cc598dd 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; } }; @@ -2246,7 +2357,7 @@ <style lang="scss" scoped> //鍥哄畾鍒楅珮搴� /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