From 1f2566489ee6e435f4d464f8b33d9d214fdf139f Mon Sep 17 00:00:00 2001
From: yuxc <653031404@qq.com>
Date: 星期三, 02 八月 2023 17:40:02 +0800
Subject: [PATCH] 1、解决通用查询时map字段重复问题。
---
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue | 57 +++++++++++++++++++++++++++++++++------------------------
1 files changed, 33 insertions(+), 24 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
index 7a950f4..5c1747a 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -1,7 +1,6 @@
<template>
<div>
<div style="display: flex;flex-wrap: wrap;" v-if="this.crudArrayFlag" class="app">
-
<el-button-group>
<!--鏂板-->
<el-button v-if="attrEditVisible == false && attrFlagChiledren==false && editOpenFlag && (!checkStatus || crudLCStatus=='Editing' )" size="small" type="primary" icon="el-icon-plus" plain @click="busineHandle">娣诲姞 {{ msg }}</el-button>
@@ -89,6 +88,12 @@
<el-dialog :visible.sync="enumVisible" append-to-body title="鏋氫妇娉ㄥ叆" :before-close="this.enumBeforeClose">
<!-- 娓叉煋琛ㄦ牸鍙婃寜閽� -->
<!-- 娓叉煋琛ㄦ牸鍙婃寜閽� -->
+ <el-alert
+ title="璇锋柊澧炲悗鐐瑰嚮鍗曞厓鏍艰緭鍏ユ灇涓炬暟鎹�"
+ type="success"
+ style="margin-bottom: 10px;display: inline-block"
+ :closable="false">
+ </el-alert>
<div>
<el-button icon="el-icon-plus" type="primary" @click="addRow">鏂板</el-button>
<el-table :data="tableData" style="width: 100%" @cell-click="handleCellClick"
@@ -1800,29 +1805,33 @@
},
//鏋氫妇娉ㄥ叆淇濆瓨
enumAddHandle() {
- let hasError = false; // 娣诲姞涓�涓彉閲�
- this.tableData.forEach((item, index) => {
- if (item.key === '') {
- this.$message.warning(`绗�${index + 1}琛岀殑閫夐」鍊间笉鑳戒负绌篳);
- hasError = true;
- return;
- } else if (item.value === '') {
- this.$message.warning(`绗�${index + 1}琛岀殑閫夐」涓枃鏍囩涓嶈兘涓虹┖`);
- hasError = true;
- return;
- }
- });
- // 淇濆瓨鎵ц閫昏緫
- if (!hasError) {
- if (this.CurrentCell) {
- this.$set(this.CurrentCell, 'enumString', JSON.stringify(this.tableData));
- this.enumVisible = false;
- } else {
- this.$set(this.attrSelectList[0], 'enumString', JSON.stringify(this.tableData));
- this.tableData=[];
- this.enumVisible = false;
- }
- }
+ if(this.tableData.length>=1){
+ let hasError = false; // 娣诲姞涓�涓彉閲�
+ this.tableData.forEach((item, index) => {
+ if (item.key === '') {
+ this.$message.warning(`绗�${index + 1}琛岀殑閫夐」鍊间笉鑳戒负绌篳);
+ hasError = true;
+ return;
+ } else if (item.value === '') {
+ this.$message.warning(`绗�${index + 1}琛岀殑閫夐」涓枃鏍囩涓嶈兘涓虹┖`);
+ hasError = true;
+ return;
+ }
+ });
+ // 淇濆瓨鎵ц閫昏緫
+ if (!hasError) {
+ if (this.CurrentCell) {
+ this.$set(this.CurrentCell, 'enumString', JSON.stringify(this.tableData));
+ this.enumVisible = false;
+ } else {
+ this.$set(this.attrSelectList[0], 'enumString', JSON.stringify(this.tableData));
+ this.tableData=[];
+ this.enumVisible = false;
+ }
+ }
+ }else {
+ this.$message.warning('璇锋坊鍔犳灇涓炬敞鍏ユ暟鎹紒')
+ }
},
// 灏嗘鍦ㄧ紪杈戠殑琛岀殑鐘舵�佸彉涓� null锛屽嵆閫�鍑虹紪杈戠姸鎬�
saveRow() {
--
Gitblit v1.10.0