解决左侧数据不同步问题/相关代码提交

This commit is contained in:
zhal 2022-10-31 17:18:46 +08:00
parent 30a54b9d8d
commit 703a9a427d
2 changed files with 17 additions and 13 deletions

View File

@ -1097,22 +1097,22 @@
break; break;
} }
} }
if(this.singleSelectedRepository.folder==true && this.crrentUserId!='admin'){
this.$message({message: '文件夹不可进行移动操作!!',type: 'warning'});
return;
}
if(this.singleSelectedRepository.versionStatus!="") {
if (this.singleSelectedRepository.versionStatus.isPublish == true) {
this.$message({message: '当前文件已处于发布状态,不可进行移动文件操作!!', type: 'warning'});
return;
}
}
console.log(this.singleSelectedRepository) console.log(this.singleSelectedRepository)
//repository //repository
if(undefined == this.singleSelectedRepository.id || null == this.singleSelectedRepository.id){ if(undefined == this.singleSelectedRepository.id || null == this.singleSelectedRepository.id){
this.singleSelectedRepository = this.mainRepository; this.singleSelectedRepository = this.mainRepository;
} }
if(this.singleSelectedRepository.folder==true && this.crrentUserId!='admin'){
this.$message({message: '文件夹不可进行移动操作!!',type: 'warning'});
return;
}
if (this.singleSelectedRepository.isPublish == true) {
this.$message({message: '当前文件已处于发布状态,不可进行移动文件操作!!', type: 'warning'});
return;
}
this.moveRepository.visible = true; this.moveRepository.visible = true;
}, },
moveFiles() {// moveFiles() {//
@ -1131,15 +1131,14 @@
this.$message({message: '当前文件已处于发布状态,不可进行移动文件操作!!',type: 'warning'}); this.$message({message: '当前文件已处于发布状态,不可进行移动文件操作!!',type: 'warning'});
return; return;
} }
} }
} }
} }
this.moveRepository.visible = true; this.moveRepository.visible = true;
}, },
saveMoveRepositoryResult(data) {// saveMoveRepositoryResult(data) {//
if (data.length == 0) { if (data.length == 0) {
this.$message({message: '未选择要移入的目标文件,移动操作被取消',type: 'warning'}); this.$message({message: '未选择要移入的目标文件,移动操作被取消',type: 'warning'});
return; return;
@ -1147,6 +1146,8 @@
this.moveRepository.visible = false; this.moveRepository.visible = false;
// //
const that = this; const that = this;
that.tableLoading = true;
let sourceData = JSON.stringify(that.checkedRepositorys); let sourceData = JSON.stringify(that.checkedRepositorys);
if (this.moveRepository.type == 'single') { if (this.moveRepository.type == 'single') {
let tmpArr = []; let tmpArr = [];
@ -1196,6 +1197,7 @@
params.data.sourceData = JSON.stringify(tempArr); params.data.sourceData = JSON.stringify(tempArr);
// //
awsuiAxios.post(params).then(function (ro) { awsuiAxios.post(params).then(function (ro) {
that.tableLoading = false;
if(ro.result == 'ok') { if(ro.result == 'ok') {
that.$message({ that.$message({
message: '移动成功', message: '移动成功',
@ -1225,6 +1227,7 @@
}else{ }else{
// //
awsuiAxios.post(params).then(function (ro) { awsuiAxios.post(params).then(function (ro) {
that.tableLoading = false;
if(ro.result == 'ok') { if(ro.result == 'ok') {
that.$message({ that.$message({
message: '移动成功', message: '移动成功',
@ -1806,6 +1809,7 @@
} }
}; };
awsuiAxios.post(data).then(function (ro) { awsuiAxios.post(data).then(function (ro) {
debugger;
if(ro.result == 'ok') { if(ro.result == 'ok') {
that.$refs.repositoryInfo.openRepositoryInfoDlg(that, mainRepository.id, mainRepository.version, type, mainRepository.isUse, mainRepository.isPublish, mainRepository.isStop, mainRepository.isApproval, mainRepository.methodId); that.$refs.repositoryInfo.openRepositoryInfoDlg(that, mainRepository.id, mainRepository.version, type, mainRepository.isUse, mainRepository.isPublish, mainRepository.isStop, mainRepository.isApproval, mainRepository.methodId);
}else{ }else{

View File

@ -927,7 +927,7 @@
openNode(obj, node, tree) {// openNode(obj, node, tree) {//
if(obj.folder==false){ if(obj.folder==false){
// window.open(node.data.url, '_blank'); // // window.open(node.data.url, '_blank'); //
openDesigner(this.$store.getters.getTeamIdFn, node.data.id, this.$store.state.sessionId); openDesigner(this.$store.getters.getTeamIdFn, node.data.currId, this.$store.state.sessionId);
}else{ }else{
this.closeCreatePopover(); this.closeCreatePopover();
this.openRepositoryList(node.data.currId); this.openRepositoryList(node.data.currId);