瀏覽代碼

[VersionBeta] V.1.0.0.0

[Adds]
1.刷新修改
master
xzx 4 年之前
父節點
當前提交
3a169f046d
共有 1 個檔案被更改,包括 35 行新增136 行删除
  1. +35
    -136
      src/views/main_web/workspace.vue

+ 35
- 136
src/views/main_web/workspace.vue 查看文件

@@ -2179,14 +2179,7 @@ export default {
},
mounted: function() {
window["refreshFiles"] = () => {
if (
this.dbClickSelectedFolderGroupData != null &&
JSON.stringify(this.dbClickSelectedFolderGroupData) != "{}"
) {
this.intoFoldergroup();
} else {
this.listFiles();
}
this.refreshPages();
};
window.addEventListener("scroll", this.onscroll, true);
this.loadProjManager();
@@ -2223,6 +2216,16 @@ export default {
}
},
methods: {
/**
* 刷新页面
*/
refreshPages(){
if ( this.dbClickSelectedFolderGroupData != null && JSON.stringify(this.dbClickSelectedFolderGroupData) != "{}") {
this.intoFoldergroup();
} else {
this.listFiles();
}
},
/***
* 切换文件显示类型
* 0:我的文件 1:工作文件
@@ -2554,13 +2557,12 @@ export default {
"{}"
) {
thisApp.folderGroupBreads = [];
thisApp.listFiles();
thisApp.refreshPages();
} else {
thisApp.intoFoldergroup(
thisApp.dbClickSelectedFolderGroupData
);
}

if (thisApp.fileindex == 1 && file.commonStatus == 1) {
thisApp.loadListCommonFiles();
}
@@ -2614,7 +2616,7 @@ export default {
) == "{}"
) {
thisApp.folderGroupBreads = [];
thisApp.listFiles();
thisApp.refreshPages();
} else {
thisApp.intoFoldergroup(
thisApp.dbClickSelectedFolderGroupData
@@ -2662,18 +2664,7 @@ export default {
offset: 100,
duration: 2500
});
if (
thisApp.dbClickSelectedFolderGroupData == null ||
JSON.stringify(thisApp.dbClickSelectedFolderGroupData) ==
"{}"
) {
thisApp.folderGroupBreads = [];
thisApp.listFiles();
} else {
thisApp.intoFoldergroup(
thisApp.dbClickSelectedFolderGroupData
);
}
thisApp.refreshPages();
if (thisApp.fileindex == 1 && file.commonStatus == 1) {
thisApp.loadListCommonFiles();
}
@@ -2720,19 +2711,7 @@ export default {
offset: 100,
duration: 2500
});
if (
thisApp.dbClickSelectedFolderGroupData == null ||
JSON.stringify(
thisApp.dbClickSelectedFolderGroupData
) == "{}"
) {
thisApp.folderGroupBreads = [];
thisApp.listFiles();
} else {
thisApp.intoFoldergroup(
thisApp.dbClickSelectedFolderGroupData
);
}
thisApp.refreshPages();
if (thisApp.fileindex == 1 && file.commonStatus == 1) {
thisApp.loadListCommonFiles();
}
@@ -3242,7 +3221,6 @@ export default {
.then(function(response) {
if (response.data.state == 1) {
back.openFile(archid, filename, folderID, type);
thisApp.listFiles();
} else {
thisApp.$notify({
title: "温馨提示",
@@ -3267,22 +3245,9 @@ export default {
offset: 30,
duration: 5000
});
thisApp.listFiles();
thisApp.loading = false;
return;
var folderName =
thisApp.listUserFolders[thisApp.nowFolderIndex].folderName;
back.openFile(
archid,
filename,
folderID,
type,
sessionStorage.projName,
folderName
);
thisApp.refreshPages();
}
}
thisApp.loading = false;
})
.catch(function(error) {
console.log(error);
@@ -3341,10 +3306,6 @@ export default {
this.appInstanceTitle = "应用查看-" + file.archName;
} else if (file.extension == "svfzip") {
window.open(file.showUrl, file.archName);
// this.showApp = true;
// this.instanceType = 2;
// this.forgeShowUrl = file.showUrl;
// this.appInstanceTitle = "应用查看-" + file.archName;
} else if (file.extension == "supermap") {
this.instanceType = 3;
this.showApp = true;
@@ -3382,7 +3343,6 @@ export default {
.then(function(response) {
if (response.data.state == 1) {
back.openFile(archid, filename, folderID, type);
thisApp.listFiles();
} else {
thisApp.$notify({
title: "温馨提示",
@@ -3407,22 +3367,9 @@ export default {
offset: 30,
duration: 5000
});
thisApp.listFiles();
thisApp.loading = false;
return;
var folderName =
thisApp.listUserFolders[thisApp.nowFolderIndex].folderName;
back.openFile(
archid,
filename,
folderID,
type,
sessionStorage.projName,
folderName
);
thisApp.refreshPages();
}
}
thisApp.loading = false;
})
.catch(function(error) {
console.log(error);
@@ -3857,13 +3804,7 @@ export default {
offset: 100,
duration: 2500
});
if(thisApp.dbClickSelectedFolderGroupData==null
|| JSON.stringify(thisApp.dbClickSelectedFolderGroupData)=='{}'){
//thisApp.listFolders();
thisApp.listFiles()
}else{
thisApp.intoFoldergroup(thisApp.dbClickSelectedFolderGroupData)
}
thisApp.refreshPages();
})
.catch(function(error) {
console.log(error);
@@ -4051,7 +3992,7 @@ export default {
thisApp.newMap.showName = "";
thisApp.newMap.description = "";
if (response.data.state == 1) {
this.listFiles();
thisApp.refreshPages();
this.$notify({
title: "恭喜您",
message: "地图应用创建成功!",
@@ -4111,7 +4052,7 @@ export default {
thisApp.newSuperMap.showName = "";
thisApp.newSuperMap.description = "";
if (response.data.state == 1) {
this.listFiles();
thisApp.refreshPages();
this.$notify({
title: "恭喜您",
message: "地图应用创建成功!",
@@ -4259,7 +4200,7 @@ export default {
duration: 2500
});
thisApp.loadListCommonFiles();
thisApp.listFiles();
thisApp.refreshPages();
} else {
thisApp.$notify({
title: "温馨提示",
@@ -4296,7 +4237,7 @@ export default {
duration: 2500
});
thisApp.loadListCommonFiles();
thisApp.listFiles();
thisApp.refreshPages();
} else {
thisApp.$notify({
title: "温馨提示",
@@ -4400,13 +4341,7 @@ export default {
})
.then(response => {
if (response.data.state == 1) {
//thisApp.listFiles();
if(this.dbClickSelectedFolderGroupData!=null
&& JSON.stringify(this.dbClickSelectedFolderGroupData)!='{}'){
this.intoFoldergroup(this.dbClickSelectedFolderGroupData);
}else{
this.listFiles();
}
thisApp.refreshPages();
this.$notify({
title: "恭喜您",
message: response.data.message,
@@ -4501,7 +4436,7 @@ export default {
duration: 5000
});
thisApp.dialogFileHistory = false;
thisApp.listFiles();
thisApp.refreshPages();
} else {
this.$notify({
title: "温馨提示",
@@ -4652,7 +4587,7 @@ export default {
duration: 2500
});
thisApp.dialogCopyAndMove = false;
thisApp.listFiles();
thisApp.refreshPages();
var nowFile = response.data.data;
var newFileName = nowFile.archName + "." + nowFile.extension;
if (thisApp.isClient) {
@@ -4870,7 +4805,6 @@ export default {
this.timer = setInterval(() => {
this.listFiles();
}, 3 * 1000);
// this.loadMyAppInstanceList();//zxm
},
/**
* 查看上一个文件夹文件
@@ -4906,12 +4840,7 @@ export default {
goFolder: function(index) {
this.nowFolderIndex = index;
this.nowFolder = this.listUserFolders[this.nowFolderIndex];
if(this.dbClickSelectedFolderGroupData!=null
&& JSON.stringify(this.dbClickSelectedFolderGroupData)!='{}'){
this.intoFoldergroup(this.dbClickSelectedFolderGroupData);
}else{
this.listFiles();
}
this.refreshPages();
this.closeAppManagePain();
sessionStorage.nowFolderIndex = index;
},
@@ -4928,7 +4857,6 @@ export default {
onSearch: function() {
var thisApp = this;
this.isShowMyAppInstanceList = false;

if (thisApp.searchArchName == "") {
this.listFiles();
} else {
@@ -5206,6 +5134,7 @@ export default {
} else {
this.intoFoldergroup(this.dbClickSelectedFolderGroupData);
}
this.isShowNewFiledialog = false;
this.$notify({
title: "恭喜您",
message: "文件上传成功!",
@@ -5294,6 +5223,7 @@ export default {
createFileSure: function() {
var actionUrl = "";
var fileId = "";
var thisApp=this;
if (this.createType == 1) {
actionUrl = encodeURI(process.env.API_HOST + "archives/cloudfile");
fileId = this.currentCloudFile.fileID;
@@ -5317,7 +5247,7 @@ export default {
})
.then(response => {
if (response.data.state == 1) {
this.listFiles();
thisApp.refreshPages();
this.$notify({
title: "恭喜您",
message: response.data.message,
@@ -5555,6 +5485,7 @@ export default {
* 点击确定 保存文件夹组
*/
createFolderGroupSure: function() {
var thisApp=this;
if (
this.folderGroupData.folderGroupName == null ||
this.folderGroupData.folderGroupName == ""
@@ -5581,15 +5512,7 @@ export default {
.then(response => {
this.dialogNewFolderGroup = false;
if (response.data.state == 1) {
if (
this.dbClickSelectedFolderGroupData == null ||
JSON.stringify(this.dbClickSelectedFolderGroupData) == "{}"
) {
this.folderGroupBreads = [];
this.listFiles();
} else {
this.intoFoldergroup(this.dbClickSelectedFolderGroupData);
}
thisApp.refreshPages();
this.$notify({
title: "恭喜您",
message: "文件夹创建成功!",
@@ -5837,15 +5760,7 @@ export default {
duration: 2500
});
thisApp.dialogCopyAndMove = false;
if (
thisApp.dbClickSelectedFolderGroupData == null ||
JSON.stringify(thisApp.dbClickSelectedFolderGroupData) == "{}"
) {
thisApp.folderGroupBreads = [];
thisApp.listFiles();
} else {
thisApp.intoFoldergroup(thisApp.dbClickSelectedFolderGroupData);
}
thisApp.refreshPages();
} else {
thisApp.$notify({
title: "温馨提示",
@@ -5900,7 +5815,7 @@ export default {
JSON.stringify(thisApp.dbClickSelectedFolderGroupData) == "{}"
) {
thisApp.folderGroupBreads = [];
thisApp.listFiles();
thisApp.refreshPages();
} else {
thisApp.intoFoldergroup(thisApp.dbClickSelectedFolderGroupData);
}
@@ -5986,15 +5901,7 @@ export default {
})
.then(response => {
if (response.data.state == 1) {
if (
thisApp.dbClickSelectedFolderGroupData == null ||
JSON.stringify(thisApp.dbClickSelectedFolderGroupData) == "{}"
) {
thisApp.folderGroupBreads = [];
thisApp.listFiles();
} else {
thisApp.intoFoldergroup(thisApp.dbClickSelectedFolderGroupData);
}
thisApp.refreshPages();
thisApp.$notify({
title: "恭喜您",
message: "操作成功!",
@@ -6010,15 +5917,7 @@ export default {
offset: 100,
duration: 5000
});
if (
thisApp.dbClickSelectedFolderGroupData == null ||
JSON.stringify(thisApp.dbClickSelectedFolderGroupData) == "{}"
) {
thisApp.folderGroupBreads = [];
thisApp.listFiles();
} else {
thisApp.intoFoldergroup(thisApp.dbClickSelectedFolderGroupData);
}
thisApp.refreshPages();
}
})
.catch(error => {