From 08110ca678e3316f8adfad451a6a7fd5f845893d Mon Sep 17 00:00:00 2001
From: lihang <lihang@vci-tech.com>
Date: 星期四, 13 七月 2023 11:13:37 +0800
Subject: [PATCH] 业务类型增加生命周期的处理
---
Source/UBCS-WEB/src/views/code/code.vue | 47 ++++++++++++++++++++++++++++++++++++++---------
1 files changed, 38 insertions(+), 9 deletions(-)
diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index 807ace5..275d740 100644
--- a/Source/UBCS-WEB/src/views/code/code.vue
+++ b/Source/UBCS-WEB/src/views/code/code.vue
@@ -99,6 +99,13 @@
@click="clearAllCodeSec">
娓呯┖鐮佸��
</el-button>
+ <el-button
+ size="small"
+ icon="el-icon-guide"
+ plain
+ @click="escapeOwner">
+ 杞Щ鎵�鏈夎��
+ </el-button>
</template>
</avue-crud>
</basic-container>
@@ -1394,6 +1401,11 @@
});
}else {
this.codeClassifyForm.oid = this.selectedFixedOrCodeclassifyValue.attributes.oid;
+ // 鍒嗙被鐮佹锛屽瓙鍒嗙被鍜岀埗鍒嗙被涔嬮棿涓嶈兘鐩镐簰鏇存敼
+ if(this.checkClassUpdate(this.codefixedsecOrCodeclassifysecOid,this.codeClassifyForm.codeClassifySecOid)){
+ return;
+ }
+ this.$delete(this.codeClassifyForm,"parentClassifyValueOid");
editCodeClassifyValue(this.codeClassifyForm).then(() => {
this.loadClassifyValueData({"oid":this.codefixedsecOrCodeclassifysecOid})
this.$message({
@@ -1430,6 +1442,9 @@
});
});
}else{
+ if(this.checkClassUpdate(this.codefixedsecOrCodeclassifysecOid,this.codeClassifyForm.codeClassifySecOid)){
+ return;
+ }
//鍒嗙被鐮佹鐮佸�煎垹闄�
this.$confirm("鏄惁鍒犻櫎杩欐潯鏁版嵁锛熷鏋滆寮曠敤灏嗕笉鑳借鍒犻櫎锛�", {
confirmButtonText: "纭畾",
@@ -1450,7 +1465,6 @@
});
});
}
-
},
//瀵瑰浐瀹氱爜鍊艰〃杩涜锛氫笂绉汇�佷笅绉汇�佺Щ闄ゆ搷浣�
codeFixedValueOpetion(condition,row){
@@ -1490,10 +1504,13 @@
},
//瀵瑰垎绫荤爜鍊艰〃杩涜锛氫笂绉汇�佷笅绉汇�佺Щ闄ゆ搷浣�
codeClassifyValueOpetion(condition){
+ if(this.checkClassUpdate(this.codefixedsecOrCodeclassifysecOid,this.codeClassifyForm.codeClassifySecOid)){
+ return;
+ }
//姝ゅ娑夊強鍒版繁娴呮嫹璐濋棶棰橈紝浣嗘槸鎵ц涓婁笅绉讳繚瀛樻搷浣滀箣鍚庝細閲嶆柊鍔犺浇treedata锛屾墍浠ュ奖鍝嶄笉澶�
let currentTreeList = this.getCodeClassifyValueTreeData();
let saveData = [];
- console.log(currentTreeList.treeList);
+ // console.log(currentTreeList.treeList);
if(condition == 'up'){
if(currentTreeList.index-1>=0){
// 璋冩暣椤哄簭
@@ -1513,8 +1530,6 @@
this.saveCodeFixedOrClassifyValueOption('classifyValue',saveData);
}
}
- console.log(saveData);
- console.log(this.classifyValueTreeData);
},
//閫変腑琚皟鏁撮『搴忕殑涓や釜鏍戠殑鑺傜偣
getCodeClassifyValueTreeData(){
@@ -1553,7 +1568,7 @@
}
},
//涓婄Щ涓嬬Щ绛夋搷浣滅殑淇濆瓨
- saveCodeFixedOrClassifyValueOption(condition,editOrderNumdata){
+ async saveCodeFixedOrClassifyValueOption(condition,editOrderNumdata){
//淇濆瓨瀵瑰浐瀹氱爜娈电爜鍊肩殑涓婄Щ涓嬬Щ绉诲嚭绛夋搷浣�
if(condition == "fixedValue"){
let data = {
@@ -1572,7 +1587,7 @@
});
}else {
//淇濆瓨瀵瑰垎绫荤爜鍊肩爜娈电爜鍊肩殑涓婄Щ涓嬬Щ绉诲嚭绛夋搷浣�
- saveCodeClassifyValueOrder({
+ await saveCodeClassifyValueOrder({
"codeClassifySecOid": this.codefixedsecOrCodeclassifysecOid,
"dtoList": JSON.stringify(editOrderNumdata),
}).then(() => {
@@ -1611,7 +1626,21 @@
this.codeClassifyForm.id = node.attributes.id;
this.codeClassifyForm.name = node.attributes.name;
this.codeClassifyForm.parentClassifyValueOid = node.attributes.oid;
- //console.log(this.codeClassifyForm);
+ // console.log(this.codeClassifyForm);
+ },
+ /**
+ * 鍒嗙被鐮佹鐮佸�硷紝淇敼銆佸垹闄ゃ�佷笂涓嬬Щ涔嬪墠锛屾鏌ユ槸鍚︿负瀛愬垎绫诲拰鐖跺垎绫讳箣闂寸浉浜掓洿鏀�
+ * @currentRowClassOid 褰撳墠閫変腑琛宱id
+ * @updateClassOid 瑕佷慨鏀圭殑鍒嗙被鐮佸�紀id
+ */
+ checkClassUpdate(currentRowClassOid,updateClassOid){
+ if(currentRowClassOid!=updateClassOid){
+ this.$message({
+ type: "error",
+ message: "鎿嶄綔澶辫触銆愬瓙鍒嗙被涓庣埗鍒嗙被涔嬮棿涓嶈兘鐩镐簰淇敼鐮佸�笺��!"
+ });
+ }
+ return currentRowClassOid!=updateClassOid;
},
@@ -1982,7 +2011,7 @@
this.sendGridCodeBasicSec({"pkCodeRule":this.selectionList[this.selectionList.length-1].oid},false);
},
// 涓婄Щ涓嬬Щ鍩虹鐮佹
- upOrderNum(row){
+ async upOrderNum(row){
if(!this.tipsMessage(this.selectionList)){
return;
}
@@ -1994,7 +2023,7 @@
this.$message.warning("鏈幏鍙栧埌蹇呭~鍙傛暟!");
return;
}
- upOrderNum(row.oid).then(() => {
+ await upOrderNum(row.oid).then(() => {
this.loadBasic(this.selectionList[0]);
this.$message({
type: "success",
--
Gitblit v1.9.3