From c773bee8a36f1307626a07c6878a3d28b032da81 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 01 八月 2023 09:50:47 +0800
Subject: [PATCH] 分类注入数据回填
---
Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue | 40 +++++---------------
Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue | 12 ------
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue | 52 ++++++++++++--------------
Source/UBCS-WEB/src/components/BatchImport/index.vue | 2 -
4 files changed, 34 insertions(+), 72 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/BatchImport/index.vue b/Source/UBCS-WEB/src/components/BatchImport/index.vue
index c904bf3..d691ea9 100644
--- a/Source/UBCS-WEB/src/components/BatchImport/index.vue
+++ b/Source/UBCS-WEB/src/components/BatchImport/index.vue
@@ -253,7 +253,6 @@
});
},
onSuccess(res) {
- console.log('res',res)
if (Object.keys(res.data).length === 0) {
this.$message.success(this.title + "瀵煎叆鎴愬姛锛�");
this.dialogVisible = false;
@@ -263,7 +262,6 @@
const fileName = res.data.filePath.split("/").pop();
this.$message.error("璇蜂笅杞介敊璇俊鎭枃浠惰繘琛屾煡鐪嬶紒");
downloadErrorFile({ uuid: res.data.fileOid }).then((res2) => {
- console.log('res2',res2)
this.$utilFunc.downloadFileByBlob(res2.data, fileName);
});
}
diff --git a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
index 2fbc819..33e8bfe 100644
--- a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
+++ b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue
@@ -449,7 +449,6 @@
const result = this.$route.query.id.substring(0, index);
const oid = this.selectRow.map(obj => obj.oid).join(",");
changeStatus({ oid: oid, btmname: result, lcStatus: 'Disabled' }).then(res => {
- console.log(res);
if(res.data.code == 200 ){
this.$message.success('鍋滅敤鎴愬姛')
this.onLoad()
@@ -476,7 +475,6 @@
this.$message.warning("璇烽�夋嫨涓�鏉℃暟鎹�");
} else {
let hasEditing = this.selectRow.every(item => item.lcstatus == 'Disabled');
- console.log('hasEditing',hasEditing)
let showMessage = true;
this.selectRow.forEach(item => {
if (this.selectRow.length === 1 && item.lcstatus !== "Disabled" && showMessage) {
@@ -502,7 +500,6 @@
const result = this.$route.query.id.substring(0, index);
const oid = this.selectRow.map(obj => obj.oid).join(",");
changeStatus({ oid: oid, btmname: result, lcStatus: 'Released' }).then(res => {
- console.log(res);
if(res.data.code == 200 ){
this.$message.success('鍚敤鎴愬姛')
this.onLoad()
@@ -535,7 +532,6 @@
// 鍋滅敤-鍙兘鍚敤銆佸洖鏀�
const disabledCount = this.selectRow.filter(item => item.lcstatus === 'Disabled').length;
const releasedCount = this.selectRow.filter(item => item.lcstatus === 'Released').length;
- console.log('hasEditing',disabledCount,releasedCount)
let showMessage = true;
this.selectRow.forEach(item => {
if (this.selectRow.length === 1 && item.lcstatus == "TakeBack" && showMessage) {
@@ -562,7 +558,6 @@
const result = this.$route.query.id.substring(0, index);
const oid = this.selectRow.map(obj => obj.oid).join(",");
changeStatus({ oid: oid, btmname: result, lcStatus: 'TakeBack' }).then(res => {
- console.log(res);
if(res.data.code == 200 ){
this.$message.success('鍥炴敹鎴愬姛')
this.onLoad()
@@ -621,7 +616,6 @@
},
doLayout() {
this.$nextTick(() => {
- console.log(this.$refs)
this.$refs.crud.doLayout();
});
},
@@ -703,7 +697,6 @@
list.forEach((item) => {
this.parameter.ids.push(item.oid);
});
- console.log(this.selectRow)
},
//閫夋嫨
handleSelection(list, row) {
@@ -740,7 +733,6 @@
codeClassifyOid: this.codeClassifyOid,
...val,
}).then((res) => {
- console.log(res);
this.tableData = res.data.data;
this.page.total = res.data.total
});
@@ -770,9 +762,7 @@
//澧炲姞淇濆瓨
AddSumbit(val) {
this.addvisible = false;
- console.log(val)
addSaveCode(val).then(res => {
- console.log(res)
this.$nextTick(() => {
this.onLoad()
})
@@ -780,9 +770,7 @@
},
EditSumbit(val) {
this.editvisible = false;
- console.log(val)
editSaveCode(val).then(res => {
- console.log(res)
this.$nextTick(() => {
this.onLoad()
})
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
index 3f35190..07bd00b 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -414,7 +414,6 @@
}
},
'injectOption.classifyInvokeAttr': function(newVal) {
- console.log('newVal',newVal)
if (newVal === "name") {
this.injectOption.classifyInvokeAttrName='鍒嗙被鍚嶇О'
} else if (newVal === "id") {
@@ -1485,9 +1484,6 @@
})
},
methods: {
- formAttr(row, column) {
- console.log(row,column)
- },
//鏂板鎼滅储
AddFindHandler(){
if(this.SelectValue == 'id'){
@@ -1508,7 +1504,6 @@
},
//鍙傜収閰嶇疆瀛愮粍浠�
echoReferConfig(val){
- console.log('val--',val)
this.referObject=val
this.$set(this.CurrentCell,'referConfig',JSON.stringify(val))
@@ -1529,12 +1524,10 @@
this.$message.warning('璇烽�夋嫨妯℃澘灞炴��')
} else {
this.attrVisible = true;
- console.log(this.attrSelectList)
}
},
//灞炴�у垎缁勬彁浜�
attrHandle() {
- console.log(this.attrSelectList)
this.attrSelectList.forEach(item=>{
item.attributeGroup=this.attrModel
})
@@ -1611,7 +1604,6 @@
//涓氬姟绫诲瀷閫夋嫨
businessSelect(selection, row) {
this.busineSelectList = selection;
- console.log(selection)
},
// 浠庝笟鍔$被鍨嬩腑閫夋嫨鏁版嵁寮圭獥
busineHandle() {
@@ -1670,7 +1662,6 @@
selectHandle(selection, row) {
this.attrOid = row.oid;
this.attrRow = row;
- console.log(row)
},
//琛ㄦ牸閫夋嫨
selectionChange(list) {
@@ -1712,10 +1703,18 @@
referConfig:'',
}
}
- console.log('--',this.referConfigOption)
// 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;
+ }
}else if(column.property == 'componentRule'){
if(this.CurrentCell){
this.CurrentCell.componentRule=this.componentRuleText;
@@ -1733,7 +1732,6 @@
'conditionMap[oid_notequal]': this.CurrentCell.oid,
limit:-1
}).then(res => {
- console.log(res)
this.CascadeData = res.data.data;
})
this.CascadeVisible=true;
@@ -1854,7 +1852,6 @@
},
//楠岃瘉瑙勫垯妫�鏌�
rulesExamine() {
- console.log(this.RulesForm.expressionText)
const regex = new RegExp(this.rulesData.ruleRowBds);
if(regex.test(this.RulesForm.TestContent)){
this.$message.success('鏍¢獙鎴愬姛')
@@ -1879,23 +1876,6 @@
"灞傜骇璁剧疆": this.injectOption.classifyInvokeLevel=='max'?this.injectOption.classifyNumber :'min',
"鏄惁鍙慨鏀�": this.injectOption.classifyInvokeEditFlag
}
- //鍗曞厓鏍肩紪杈戣祴鍊间竴閬�
- // noinspection JSCheckFunctionSignatures
- if(this.CurrentCell){
- //濡傛灉鏄寚瀹氬眰璧嬪�间负鏁板瓧
- if(this.injectOption.classifyInvokeLevel!== 'min'){
- this.CurrentCell.classifyInvokeLevel=this.injectOption.classifyNumber
- }else {
- this.CurrentCell.classifyInvokeLevel='min'
- }
- //鍏朵綑姝e父璧嬪��
- this.CurrentCell.classifyInvokeAttr=this.injectOption.classifyInvokeAttr,
- this.CurrentCell.classifyInvokeAttrName=this.injectOption.classifyInvokeAttrName,
- this.CurrentCell.classifyInvokeEditFlag=this.injectOption.classifyInvokeEditFlag,
- // this.$set(this.CurrentCell, 'classifyInvokeText', data)
- this.CurrentCell.classifyInvokeText = data;
- this.injectHandleReset()
- }else {
//鍕鹃�夋搷浣�
for (const key in this.injectOption) {
this.attrSelectList[0][key] = this.injectOption[key];
@@ -1908,7 +1888,7 @@
this.$set(this.attrSelectList[0],'classifyInvokeText',data)
}
this.injectHandleReset()
- }
+
if(this.injectOption.classifyInvokeLevel !== 'min'){
this.injectOption.classifyInvokeLevel=this.injectOption.classifyNumber;
}else {
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
index 8b4cadb..8e63b85 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -731,11 +731,7 @@
},
watch:{
- FormList:{
- handler(newval,oldval){
- console.log('FormList',newval)
- }
- }
+
},
methods: {
/** 瀵煎叆 */
@@ -746,17 +742,12 @@
ExportExcel(){
if(this.nodeClickList){
exportClassify({oid:this.nodeClickList.oid}).then(res=>{
- console.log(res)
func.downloadFileByBlob(res);
})
}else {
this.$message.warning('璇峰厛閫夋嫨瑕佸鍑虹殑涓婚搴撳垎绫�')
}
},
- //妯℃澘绠$悊宸插彂甯冪紪杈�
- // checkShowEditBtn() {
- // this.showEditBtn = this.Formlist.some(item => item.lcStatus === 'Released');
- // },
//缂栫爜瑙勫垯澶辩劍
CodeFoucus(){
this.MasterdialogVisible=true;
@@ -1203,7 +1194,6 @@
return item.codeclassifyoid == this.nodeClickList.oid
}
})
- console.log('form',this.Formlist)
if(this.Formlist.length >= 1){
this.crudLCStatus=this.Formlist[this.selectRow].lcStatus;
this.crudArray.push(this.Formlist[this.selectRow]);
@@ -1314,7 +1304,6 @@
});
} else {
this.$set(row, "codeclassifyoid", this.nodeClickList.oid)
- console.log(this.nodeClickList)
addSave(row).then(() => {
this.$message({
type: "success",
@@ -1354,20 +1343,6 @@
});
})
},
- //妯℃澘绠$悊琛ㄦ牸鏌ヨ,鍙湁涓�鏉℃暟鎹病蹇呰鍋氭悳绱�
- /*nterFind() {
- if (this.findText == "") {
- gridCodeClassifyTemplate().then(res => {
- this.Formlist = res.data.data
- })
- } else {
- gridCodeClassifyTemplate().then(res => {
- this.Formlist = res.data.data.filter(item => {
- return item.name.includes(this.findText)
- })
- })
- }
- },*/
//鍏嬮殕妯℃澘鏌ヨ
CloneEnterFind(){
gridCodeClassifyTemplate().then(res => {
@@ -1448,8 +1423,29 @@
this.Formlist = res.data.data.filter(item => {
return item.codeclassifyoid == this.nodeClickList.oid
})
- this.crudLCStatus=this.Formlist[this.selectRow].lcStatus;
- this.crudArray.push(this.Formlist[this.selectRow]);
+ gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': res.data.data[this.selectRow].oid,limit:-1}).then(res => {
+ this.ProData = res.data.data;
+ //鍒嗙被娉ㄥ叆鏁版嵁鏍煎紡
+ this.ProData = res.data.data.map((item) => {
+ //濡傛灉鍒嗙被娉ㄥ叆classifyInvokeAttr涓虹┖璇存槑鏄垵濮嬬姸鎬�
+ if(item.classifyInvokeAttr !== ''){
+ if (!item.hasOwnProperty('classifyInvokeText')) { // 妫�鏌lassifyInvokeText灞炴�ф槸鍚﹀瓨鍦�
+ item = {
+ ...item,
+ classifyInvokeText: {
+ "娉ㄥ叆绫诲瀷": item.classifyInvokeAttr,
+ "娉ㄥ叆绫诲瀷鍚嶇О": item.classifyInvokeAttrName,
+ "灞傜骇璁剧疆": item.classifyInvokeLevel,
+ "鏄惁鍙慨鏀�": item.classifyInvokeEditFlag
+ }
+ };
+ }
+ }
+ return item;
+ });
+ }).catch(res => {
+ this.$message.error(res)
+ })
})
} else {
this.FormLoing = true
--
Gitblit v1.9.3