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

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

View File

@ -927,7 +927,7 @@
openNode(obj, node, tree) {//
if(obj.folder==false){
// 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{
this.closeCreatePopover();
this.openRepositoryList(node.data.currId);