From d0b163b5f1114a93b5d0f04e77a00ed8adb91894 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期四, 14 十二月 2023 20:18:37 +0800
Subject: [PATCH] 整合代码
---
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue | 43 +++++++++++++++++++++++++++++--------------
1 files changed, 29 insertions(+), 14 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
index 50deca2..eb130ce 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -320,12 +320,13 @@
></refer-config-dialog>
</div>
- <div>
+
<el-table v-if="this.crudArrayFlag"
ref="referAttrCrud"
v-loading="loading"
:data="ProData"
:height="this.tableHeight"
+ :header-cell-style="{background:'#FAFAFA',color:'#505050'}"
border
style="width: 100%"
@select="selectHandle"
@@ -358,13 +359,14 @@
@blur="saveRows(row)"
></el-input>
<el-input-number v-if="editingRows === row && editShows== item.prop && item.edit == 'number'"
+ v-show="!AddCellFlag"
v-model="row[item.prop]"
:style="{width:(item.width-10)+'px'}"
controls-position="right"
size="small" @blur="saveRows"></el-input-number>
- <el-select v-if="editingRows === row && editShows== item.prop && item.edit == 'select' " slot="prepend"
+ <el-select v-if="editingRows === row && editShows== item.prop && item.edit == 'select' " slot="prepend" :clearable="true"
v-model="row[item.prop]" allow-create default-first-option
- filterable
+ filterable v-show="!AddCellFlag"
@blur="selectChangeHandler(item.editConfig,index)">
<el-option
v-for="optionItem in item.data"
@@ -395,7 +397,6 @@
</el-table-column>
</el-table>
</div>
- </div>
</template>
<script>
@@ -1108,6 +1109,8 @@
index: true,
indexFixed:false,
selectionFixed:false,
+ columnBtn: false,
+ refreshBtn:false,
border: true,
addBtn: false,
menu: false,
@@ -1555,7 +1558,6 @@
},
computed: {
...mapGetters(["permission"]),
- //椤甸潰鎸夐挳鏉冮檺
permissionList() {
return {
busineStatus: this.vaildData(this.permission.classifyTree.attr_add, false),
@@ -1718,7 +1720,10 @@
attrTableWidth: 120,
ts: ""
})
- this.ProData.push(JSON.parse(JSON.stringify(this.busineAddList)))
+ // 灏嗚嫳鏂囩紪鍙疯浆鎹负灏忓啓
+ let { id, ...res } = this.busineAddList;
+ this.busineAddList = { id: id.toLowerCase(), ...res };
+ this.ProData.push(JSON.parse(JSON.stringify(this.busineAddList)));
}
})
this.addVisible = false;
@@ -1800,6 +1805,7 @@
this.attrSelectList = [row];
this.$refs.referAttrCrud.setCurrentRow(row);
this.$refs.referAttrCrud.toggleRowSelection(row); //閫変腑褰撳墠琛�
+
this.attrOid = row.oid;
this.attrRow = row;
},
@@ -1851,8 +1857,8 @@
// 鏂板嚱鏁扮敤浜庢墽琛宐atchAddSave鏂规硶
const executeBatchAddSave = () => {
batchAddSave(JSON.parse(JSON.stringify(this.ProData))).then(res => {
- this.$message.success('淇濆瓨鎴愬姛')
this.editOpenFlag = false;
+ this.$message.success('淇濆瓨鎴愬姛')
// 璋冪敤鐖剁粍浠朵慨鏀规寜閽姸鎬�
this.$emit('editCloseChildren')
this.AddCellFlag = true;
@@ -2063,16 +2069,23 @@
const regex = new RegExp(this.rulesData.ruleRowBds);
if (regex.test(this.RulesForm.TestContent)) {
this.$message.success('鏍¢獙鎴愬姛')
+ }else {
+ this.$message.error('鏍¢獙澶辫触')
}
},
//鐐瑰嚮鍒嗙被娉ㄥ叆鎸夐挳
injectBtn() {
if (this.attrSelectList.length > 1) {
this.$message.warning('鍙兘閫夋嫨涓�鏉℃ā鏉挎暟鎹�')
- } else if (this.attrSelectList.length < 1) {
+ return;
+ }
+ if (this.attrSelectList.length < 1) {
this.$message.warning('璇烽�夋嫨涓�鏉℃ā鏉挎暟鎹�')
- } else if (this.attrSelectList.length === 1) {
+ return;;
+ }
+ if (this.attrSelectList.length === 1) {
this.injectVisible = true;
+ return;
}
},
//鍒嗙被娉ㄥ叆淇濆瓨
@@ -2105,15 +2118,17 @@
} else {
this.injectOption.classifyNumber = 0;
}
+ // console.log(this.ProData)
this.injectVisible = false;
},
//鍒嗙被娉ㄥ叆娓呯┖
injectHandleReset() {
- this.$set(this.CurrentCell, 'classifyInvokeText', '')
- this.$set(this.CurrentCell, 'classifyInvokeAttr:', '')
- this.$set(this.CurrentCell, 'classitwInvokeAttrName', '')
- this.$set(this.CurrentCell, 'classifyInvokeEditFlag', 'false')
- this.$set(this.CurrentCell, 'classifyInvokeLevel', 'none')
+ this.CurrentCell.classifyInvokeText = null;
+ this.CurrentCell.classifyInvokeAttr = '';
+ this.CurrentCell.classifyInvokeAttrName = '';
+ this.CurrentCell.classifyInvokeEditFlag = '';
+ this.CurrentCell.classifyInvokeLevel = null;
+ // console.log(this.ProData)
this.injectVisible = false;
},
// 鍒嗙被娉ㄥ叆鍙栨秷
--
Gitblit v1.9.3