|
|
@@ -3390,6 +3390,7 @@ export default { |
|
|
|
let thisApp = this; |
|
|
|
if(res.Code === 0) { |
|
|
|
notify.success(res.Msg); |
|
|
|
this.listFiles(); |
|
|
|
} else { |
|
|
|
notify.info(res.Msg); |
|
|
|
return; |
|
|
@@ -4291,7 +4292,6 @@ export default { |
|
|
|
const flagRes = await services.changeFileWorkStatus(fileId, 2); |
|
|
|
if(flagRes.Code !== 0) return; |
|
|
|
file.workStatus = 2; |
|
|
|
// file.status = 2; |
|
|
|
file.modifyUserId = sessionStorage.userId; |
|
|
|
this.refreshPages(); |
|
|
|
// var archid = file.archID; |
|
|
@@ -4494,56 +4494,27 @@ export default { |
|
|
|
/** |
|
|
|
* 协作文件点击文件事件:直接打开文件 |
|
|
|
*/ |
|
|
|
fileClickColl: function (file) { |
|
|
|
if (this.isClient) { |
|
|
|
if (file.extension == "map") { |
|
|
|
this.instanceType = 1; |
|
|
|
this.showApp = true; |
|
|
|
this.mapAddress = file.alias; |
|
|
|
this.appInstanceTitle = "应用查看-" + file.archName; |
|
|
|
} else if (file.extension == "svfzip") { |
|
|
|
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; |
|
|
|
this.gisShowUrl = file.alias; |
|
|
|
this.appInstanceTitle = "应用查看-" + file.archName; |
|
|
|
} else if ( |
|
|
|
file.extension == "png" || |
|
|
|
file.extension == "jpg" || |
|
|
|
file.extension == "bmp" || |
|
|
|
file.extension == "gif" || |
|
|
|
file.extension == "jpeg" |
|
|
|
) { |
|
|
|
this.showImage = true; |
|
|
|
this.imageUrl = this.imgSrc + file.alias; |
|
|
|
} else { |
|
|
|
if(!fileIsDownloaded(file)) return; |
|
|
|
// 客户端打开文件 |
|
|
|
var archid = file.archID; |
|
|
|
var filename = file.archName + "." + file.extension; |
|
|
|
if (file.version > 1) { |
|
|
|
filename = file.archName + file.version + "." + file.extension; |
|
|
|
} |
|
|
|
var folderID = file.folderID; |
|
|
|
var folderName = this.listUserFolders[this.nowFolderIndex].folderName; |
|
|
|
var projID = file.projID; |
|
|
|
var type = "open"; |
|
|
|
system.openFile( |
|
|
|
archid, |
|
|
|
filename, |
|
|
|
folderID, |
|
|
|
type, |
|
|
|
sessionStorage.projName, |
|
|
|
folderName |
|
|
|
); |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.openOffice(file); |
|
|
|
fileClickColl: async function (file) { |
|
|
|
if(!this.isClient) return; |
|
|
|
if(!fileIsDownloaded(file)) return; |
|
|
|
// 客户端打开文件 |
|
|
|
const { archName, extension, id: fileId, nodeName: folderName } = file; |
|
|
|
// const { folderName } = this.nowFolder; |
|
|
|
const localWorkspacePrefix = this.localWorkspacePrefix; |
|
|
|
const filePath = `${localWorkspacePrefix}\\${folderName}\\${archName}${extension ? `.${extension}` : ''}`; |
|
|
|
|
|
|
|
if(file.workStatus === FileWorkStatus.WORKING && sessionStorage.userId !== file.modifyUserId) { |
|
|
|
notify.warning('文件正在工作编辑中,请耐心等待'); |
|
|
|
return; |
|
|
|
} |
|
|
|
system.openFile(filePath); |
|
|
|
// 将文件状态设置为编辑中 |
|
|
|
// const flagRes = await services.changeFileWorkStatus(fileId, 2); |
|
|
|
// if(flagRes.Code !== 0) return; |
|
|
|
// file.workStatus = 2; |
|
|
|
// file.modifyUserId = sessionStorage.userId; |
|
|
|
this.refreshPages(); |
|
|
|
// this.openOffice(file); |
|
|
|
this.listCollaborationFiles(); |
|
|
|
}, |
|
|
|
/** |
|
|
|