From 8cdc917cd8727ed16e21258f51c0ef4cca51c113 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期一, 10 七月 2023 11:02:44 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS-WEB/src/components/Tree/attrCrud.vue | 43 +++++++++++++++++++++++++------------------
1 files changed, 25 insertions(+), 18 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
index 63aa823..c111117 100644
--- a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -270,12 +270,12 @@
@blur="saveRows"></el-input>
<el-input-number size="small" controls-position="right" v-if="editingRows === row && editShows== item.prop && item.edit == 'number'" v-model="row[item.prop]"
@blur="saveRows" :style="{width:(item.width-10)+'px'}"></el-input-number>
- <el-select v-model="row[item.prop]" filterable allow-create default-first-option slot="prepend" v-if="editingRows === row && editShows== item.prop && item.edit == 'select' " @focus="DataChangeHandler(item.editConfig,index)">
+ <el-select v-model="row[item.prop]" filterable allow-create default-first-option slot="prepend" v-if="editingRows === row && editShows== item.prop && item.edit == 'select' " @blur="selectChangeHandler(item.editConfig,index)">
<el-option
v-for="optionItem in item.data"
- :key="optionItem.key"
- :label="optionItem.value"
- :value="optionItem.key">
+ :key="optionItem.dictValue"
+ :label="optionItem.dictValue"
+ :value="optionItem.dictValue">
</el-option>
</el-select>
<el-switch
@@ -304,6 +304,7 @@
<script>
import {AttrByBtm, gridCodeClassifyTemplateAttr, batchAddSave, copyto,listByFlag} from '@/api/template/templateAttr'
+import {getList} from "@/api/refer/table";
export default {
name: "attrCrud .vue",
@@ -1359,7 +1360,11 @@
)
},
created() {
-
+ this.option.column.forEach((item,index) => {
+ if (item.edit == 'select') {
+ this.selectChangeHandler(item.editConfig,index)
+ }
+ })
},
methods: {
formAttr(row, column) {
@@ -1389,17 +1394,20 @@
this.$set(this.CurrentCell,'referConfig',JSON.stringify(val))
},
- //鏃堕棿涓嬫媺鏍煎紡
- DataChangeHandler(editConfig,index){
+ //鍙緭鍙�変笅鎷�
+ selectChangeHandler(editConfig,index){
+ let that=this;
+ /*if(that.option.column[index].data && that.option.column[index].data.length>=0){
+ return;
+ }*/
listByFlag(editConfig.extraParams).then(res=>{
- console.log(res);
- this.option.column[index].data=res;
+ that.option.column[index].data=res.data.data;
})
},
//灞炴�у垎缁勬寜閽�
attrVisibleHandle() {
if (this.attrSelectList < 1) {
- this.$message.warning('璇烽�夋嫨涓�鏉℃ā鏉垮睘鎬�')
+ this.$message.warning('璇烽�夋嫨妯℃澘灞炴��')
} else {
this.attrVisible = true;
console.log(this.attrSelectList)
@@ -1646,11 +1654,9 @@
},
//楠岃瘉瑙勫垯鎸夐挳
ruleAddHandler(){
- if(this.attrSelectList.length>1){
- this.$message.warning('鍙兘閫夋嫨涓�鏉℃暟鎹�')
- }else if(this.attrSelectList.length<1){
- this.$message.warning('璇烽�夋嫨涓�鎻愭ā鏉垮睘鎬�')
- }else if(this.attrSelectList.length === 1){
+ if (this.attrSelectList < 1) {
+ this.$message.warning('璇烽�夋嫨妯℃澘灞炴��')
+ } else{
this.rulesVisible=true
}
@@ -1667,11 +1673,12 @@
},
// 楠岃瘉瑙勫垯纭畾
rulesHandle() {
- if(this.CurrentCell.length>0){
+ if(this.CurrentCell){
this.$set(this.CurrentCell,'verifyRule',this.RulesForm.expressionText)
}else {
- console.log(this.attrSelectList)
- this.$set(this.attrSelectList[0],'verifyRule',this.RulesForm.expressionText)
+ this.attrSelectList.forEach((item)=>{
+ this.$set(item,'verifyRule',this.RulesForm.expressionText)
+ })
this.rulesremove()
}
this.rulesVisible = false
--
Gitblit v1.10.0