From 89428d6f5f78ef9f0a3dcb7f51d1aaea11d556fa Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期三, 02 八月 2023 10:46:03 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue | 51 ++++++++++++++++++++++++++++++++-------------------
1 files changed, 32 insertions(+), 19 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
index 07bd00b..56e9efa 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>
@@ -14,7 +13,7 @@
</el-button-group>
<el-button-group>
<!-- 淇濆瓨-->
- <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" size="small" type="success" plain @click="addsHandler" icon="el-icon-check">淇濆瓨</el-button>
+ <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" size="small" type="success" plain @click.prevent="addsHandler" icon="el-icon-check">淇濆瓨</el-button>
<!-- 棰勮鎺掑簭-->
<el-button size="small" @click="orderHandle" icon="el-icon-arrow-down">棰勮鎺掑簭</el-button>
<!-- 鍒犻櫎-->
@@ -166,11 +165,11 @@
</div>
</el-dialog>
<!-- 灞炴�у垎缁�-->
- <el-dialog :visible.sync="attrVisible" append-to-body style="width: 800px; left:30vw;top: 10vh ;"
+ <el-dialog :visible.sync="attrVisible" append-to-body :before-close="attrClose" style="width: 800px; left:30vw;top: 10vh ;"
title="杈撳叆鍒嗙粍鐨勫悕绉�">
<el-form ref="form" label-width="70px">
<el-form-item label="灞炴�у垎缁�">
- <el-input v-model="attrModel"></el-input>
+ <el-input v-model="attrModel" autofocus></el-input>
</el-form-item>
<div style="display: flex;justify-content: flex-end">
<el-button size="small" type="primary" @click="attrHandle">鎻愪氦</el-button>
@@ -218,7 +217,7 @@
</el-dialog>
<!-- 鍏ㄥ睆缂栬緫-->
<el-dialog :visible.sync="attrEditVisible" append-to-body fullscreen="true" :before-close="escEdit" >
- <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" :editStyleFlag="editStyleFlag" :editOpenFlag="editOpenFlag" :crudArrayFlag="this.crudArrayFlag"></attrCrud>
+ <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" @editCloseChildren="editClose" :editStyleFlag="editStyleFlag" :editOpenFlag="editOpenFlag" :crudArrayFlag="this.crudArrayFlag"></attrCrud>
</el-dialog>
<!-- 缁勫悎瑙勫垯-->
<formula-editor :systemVariableTableData="systemVariableTableData"
@@ -1536,13 +1535,16 @@
}else {
this.$set(this.attrSelectList[0], 'attributeGroup', this.attrModel)
}
- this.attrModel = "";
- this.attrVisible = false;
+ this.attrClose()
},
//灞炴�у垎缁勬竻绌�
attrRemove() {
this.attrModel = ""
},
+ attrClose(){
+ this.attrModel = "";
+ this.attrVisible=false
+ },
//琛ㄦ牸鏁版嵁
CrudRend() {
if (this.crudOid != '') {
@@ -1677,15 +1679,16 @@
this.attrRow = row;
},
//淇濆瓨
- addsHandler() {
+ addsHandler(event) {
batchAddSave(JSON.parse(JSON.stringify(this.ProData))).then(res => {
this.$message.success('淇濆瓨鎴愬姛')
- this.editOpenFlag=false
+ this.editOpenFlag=false;
+ // 璋冪敤鐖剁粍浠朵慨鏀规寜閽姸鎬�
+ this.$emit('editCloseChildren')
}).catch(()=>{
this.$message.warning('淇濆瓨澶辫触锛岃鏌ョ湅鎺у埗鍙拌緭鍑猴紒')
})
},
-
//琛ㄦ牸琛岀紪杈�
handleCellClicks(row, column) {
if(this.editOpenFlag){
@@ -1706,14 +1709,16 @@
// this.$refs.referConfigFormDialog.onloadAttrData();
}else if(column.property == 'classifyInvokeText'){
this.injectVisible=true;
- this.injectOption.classifyInvokeAttr=this.CurrentCell.classifyInvokeAttr;
- this.injectOption.classifyInvokeAttrName=this.CurrentCell.classifyInvokeAttrName;
- this.injectOption.classifyInvokeEditFlag=this.CurrentCell.classifyInvokeEditFlag;
- if(this.CurrentCell.classifyInvokeLevel == 'min'){
- this.injectOption.classifyInvokeLevel='min'
- }else {
- this.injectOption.classifyInvokeLevel='max'
- this.injectOption.classifyNumber=this.CurrentCell.classifyInvokeLevel;
+ if (this.CurrentCell.classifyInvokeAttr != '') {
+ this.injectOption = {
+ classifyInvokeAttr: this.CurrentCell.classifyInvokeAttr,
+ classifyInvokeAttrName: this.CurrentCell.classifyInvokeAttrName,
+ classifyInvokeEditFlag: this.CurrentCell.classifyInvokeEditFlag,
+ classifyInvokeLevel: this.CurrentCell.classifyInvokeLevel == 'min' ? 'min' : 'max',
+ classifyNumber: this.CurrentCell.classifyInvokeLevel == 'min' ? '' : this.CurrentCell.classifyInvokeLevel
+ };
+ } else {
+ this.injectHandleReset();
}
}else if(column.property == 'componentRule'){
if(this.CurrentCell){
@@ -1740,6 +1745,9 @@
this.rulesVisible=true;
}else if(column.property == 'attributeGroup'){
this.attrVisible = true;
+ if(this.CurrentCell.attributeGroup !== ''){
+ this.attrModel=this.CurrentCell.attributeGroup
+ }
}
}
},
@@ -1907,7 +1915,8 @@
},
// 鍒嗙被娉ㄥ叆鍙栨秷
injectRemove() {
- this.injectVisible = false
+ this.injectVisible = false;
+ this.injectHandleReset()
},
//灞炴�фā鏉胯〃鏍煎崟鍏冩牸鐐瑰嚮浜嬩欢
//琛ㄦ牸鎿嶄綔鏍忓垹闄�
@@ -1994,6 +2003,10 @@
editOpen(){
this.editOpenFlag=true;
},
+ //瀹氫箟涓�涓叧闂紪杈戠殑鏂规硶渚涘瓙缁勪欢浣跨敤
+ editClose(){
+ this.editOpenFlag=false;
+ },
//鎵归噺璁剧疆switch
batchSetFlag(value){
this.attrSelectList.forEach(item=>{
--
Gitblit v1.10.0