|
@@ -3086,6 +3086,7 @@ export default { |
|
|
this.dbClickSelectedFolderGroupData != null && |
|
|
this.dbClickSelectedFolderGroupData != null && |
|
|
JSON.stringify(this.dbClickSelectedFolderGroupData) != "{}" |
|
|
JSON.stringify(this.dbClickSelectedFolderGroupData) != "{}" |
|
|
) { |
|
|
) { |
|
|
|
|
|
console.log("我要更新当前文件夹啦"); |
|
|
this.intoFoldergroup(this.dbClickSelectedFolderGroupData); |
|
|
this.intoFoldergroup(this.dbClickSelectedFolderGroupData); |
|
|
} else { |
|
|
} else { |
|
|
this.listFiles(); |
|
|
this.listFiles(); |
|
@@ -5277,11 +5278,12 @@ export default { |
|
|
/** |
|
|
/** |
|
|
* 保存历史文件 |
|
|
* 保存历史文件 |
|
|
*/ |
|
|
*/ |
|
|
createMilestone: function (file) { |
|
|
|
|
|
if (this.isCreating) { |
|
|
|
|
|
|
|
|
async createMilestone(file){ |
|
|
|
|
|
if(this.isCreating){ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (file.status == 1 && file.modifyUserID != sessionStorage.userId) { |
|
|
|
|
|
|
|
|
/** 当共享且其他人在编辑时 */ |
|
|
|
|
|
if(file.Status ==2 && file.ModifyUserId !==sessionStorage.userId){ |
|
|
this.$notify({ |
|
|
this.$notify({ |
|
|
title: "温馨提示", |
|
|
title: "温馨提示", |
|
|
message: "其他人编辑中,不能设置历史文件", |
|
|
message: "其他人编辑中,不能设置历史文件", |
|
@@ -5289,52 +5291,90 @@ export default { |
|
|
offset: 100, |
|
|
offset: 100, |
|
|
duration: 5000, |
|
|
duration: 5000, |
|
|
}); |
|
|
}); |
|
|
return; |
|
|
|
|
|
|
|
|
return; |
|
|
} |
|
|
} |
|
|
this.isCreating = true; |
|
|
this.isCreating = true; |
|
|
var thisApp = this; |
|
|
|
|
|
this.$axios({ |
|
|
|
|
|
method: "get", |
|
|
|
|
|
url: encodeURI( |
|
|
|
|
|
process.env.API_HOST + |
|
|
|
|
|
"archives/milestone/" + |
|
|
|
|
|
file.archID + |
|
|
|
|
|
"/" + |
|
|
|
|
|
sessionStorage.userId + |
|
|
|
|
|
"/" + |
|
|
|
|
|
this.dbClickSelectedFolderGroupData.folderGroupID |
|
|
|
|
|
), |
|
|
|
|
|
data: { |
|
|
|
|
|
archid: file.archID, |
|
|
|
|
|
userid: sessionStorage.userId, |
|
|
|
|
|
foldergroupid: this.dbClickSelectedFolderGroupData.folderGroupID, |
|
|
|
|
|
}, |
|
|
|
|
|
}) |
|
|
|
|
|
.then((response) => { |
|
|
|
|
|
if (response.data.state == 1) { |
|
|
|
|
|
thisApp.refreshPages(); |
|
|
|
|
|
this.$notify({ |
|
|
|
|
|
title: "恭喜您", |
|
|
|
|
|
message: response.data.message, |
|
|
|
|
|
type: "success", |
|
|
|
|
|
offset: 100, |
|
|
|
|
|
duration: 2500, |
|
|
|
|
|
}); |
|
|
|
|
|
thisApp.isCreating = false; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$notify({ |
|
|
|
|
|
title: "温馨提示", |
|
|
|
|
|
message: response.data.message, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
offset: 100, |
|
|
|
|
|
duration: 5000, |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.catch((error) => { |
|
|
|
|
|
console.log(error); |
|
|
|
|
|
|
|
|
file.ModifyUserId=sessionStorage.userId; |
|
|
|
|
|
file.ModifyTime=new Date(); |
|
|
|
|
|
const Res = await services.AddArchMilesStone(file); |
|
|
|
|
|
if(Res.Code !=-1){ |
|
|
|
|
|
this.refreshPages(); |
|
|
|
|
|
this.$notify({ |
|
|
|
|
|
title: "恭喜您", |
|
|
|
|
|
message: "成功保存历史文件", |
|
|
|
|
|
type: "success", |
|
|
|
|
|
offset: 100, |
|
|
|
|
|
duration: 2500, |
|
|
|
|
|
}); |
|
|
|
|
|
this.isCreating = false; |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$notify({ |
|
|
|
|
|
title: "温馨提示", |
|
|
|
|
|
message: Res.Msg, |
|
|
|
|
|
type: "error", |
|
|
|
|
|
offset: 100, |
|
|
|
|
|
duration: 5000, |
|
|
}); |
|
|
}); |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
// createMilestone: function (file) { |
|
|
|
|
|
// if (this.isCreating) { |
|
|
|
|
|
// return; |
|
|
|
|
|
// } |
|
|
|
|
|
// if (file.status == 1 && file.modifyUserID != sessionStorage.userId) { |
|
|
|
|
|
// this.$notify({ |
|
|
|
|
|
// title: "温馨提示", |
|
|
|
|
|
// message: "其他人编辑中,不能设置历史文件", |
|
|
|
|
|
// type: "warning", |
|
|
|
|
|
// offset: 100, |
|
|
|
|
|
// duration: 5000, |
|
|
|
|
|
// }); |
|
|
|
|
|
// return; |
|
|
|
|
|
// } |
|
|
|
|
|
// this.isCreating = true; |
|
|
|
|
|
// var thisApp = this; |
|
|
|
|
|
// this.$axios({ |
|
|
|
|
|
// method: "get", |
|
|
|
|
|
// url: encodeURI( |
|
|
|
|
|
// process.env.API_HOST + |
|
|
|
|
|
// "archives/milestone/" + |
|
|
|
|
|
// file.archID + |
|
|
|
|
|
// "/" + |
|
|
|
|
|
// sessionStorage.userId + |
|
|
|
|
|
// "/" + |
|
|
|
|
|
// this.dbClickSelectedFolderGroupData.folderGroupID |
|
|
|
|
|
// ), |
|
|
|
|
|
// data: { |
|
|
|
|
|
// archid: file.archID, |
|
|
|
|
|
// userid: sessionStorage.userId, |
|
|
|
|
|
// foldergroupid: this.dbClickSelectedFolderGroupData.folderGroupID, |
|
|
|
|
|
// }, |
|
|
|
|
|
// }) |
|
|
|
|
|
// .then((response) => { |
|
|
|
|
|
// if (response.data.state == 1) { |
|
|
|
|
|
// thisApp.refreshPages(); |
|
|
|
|
|
// this.$notify({ |
|
|
|
|
|
// title: "恭喜您", |
|
|
|
|
|
// message: response.data.message, |
|
|
|
|
|
// type: "success", |
|
|
|
|
|
// offset: 100, |
|
|
|
|
|
// duration: 2500, |
|
|
|
|
|
// }); |
|
|
|
|
|
// thisApp.isCreating = false; |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.$notify({ |
|
|
|
|
|
// title: "温馨提示", |
|
|
|
|
|
// message: response.data.message, |
|
|
|
|
|
// type: "error", |
|
|
|
|
|
// offset: 100, |
|
|
|
|
|
// duration: 5000, |
|
|
|
|
|
// }); |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// .catch((error) => { |
|
|
|
|
|
// console.log(error); |
|
|
|
|
|
// }); |
|
|
|
|
|
// }, |
|
|
/** |
|
|
/** |
|
|
* 获取历史文件记录 |
|
|
* 获取历史文件记录 |
|
|
*/ |
|
|
*/ |
|
@@ -6483,8 +6523,7 @@ export default { |
|
|
this.folderGroupData={ |
|
|
this.folderGroupData={ |
|
|
Id:sessionStorage.userId, |
|
|
Id:sessionStorage.userId, |
|
|
ProjId:sessionStorage.projId, |
|
|
ProjId:sessionStorage.projId, |
|
|
SuperId:this.nowFolder.id, |
|
|
|
|
|
LevelId:this.nowFolder.levelId, |
|
|
|
|
|
|
|
|
//SuperId:this.nowFolder.id,//this.dbClickSelectedFolderGroupData.id,//this.nowFolder.id, |
|
|
FirstFolderId:this.nowFolder.firstFolderId, |
|
|
FirstFolderId:this.nowFolder.firstFolderId, |
|
|
FolderName:this.folderGroupData.FolderName, |
|
|
FolderName:this.folderGroupData.FolderName, |
|
|
TemplateId:this.nowFolder.templateId, |
|
|
TemplateId:this.nowFolder.templateId, |
|
@@ -6497,8 +6536,12 @@ export default { |
|
|
CreateTime:new Date(), |
|
|
CreateTime:new Date(), |
|
|
ModifyUserId:sessionStorage.userId, |
|
|
ModifyUserId:sessionStorage.userId, |
|
|
ModifyTime:new Date(), |
|
|
ModifyTime:new Date(), |
|
|
} |
|
|
|
|
|
console.log(this.folderGroupData); |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
if(this.dbClickSelectedFolderGroupData.id){ |
|
|
|
|
|
this.folderGroupData.SuperId=this.dbClickSelectedFolderGroupData.id; |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.folderGroupData.SuperId=this.nowFolder.id |
|
|
|
|
|
} |
|
|
const Res = await services.createSubFolder(this.folderGroupData); |
|
|
const Res = await services.createSubFolder(this.folderGroupData); |
|
|
if (Res.Code != -1) { |
|
|
if (Res.Code != -1) { |
|
|
this.refreshPages(); |
|
|
this.refreshPages(); |
|
@@ -6583,58 +6626,97 @@ export default { |
|
|
/** |
|
|
/** |
|
|
* 双击文件夹组名称 进入文件夹 |
|
|
* 双击文件夹组名称 进入文件夹 |
|
|
*/ |
|
|
*/ |
|
|
intoFoldergroup: function (foldergroup) { |
|
|
|
|
|
// console.log('intoFoldergroup: ', foldergroup); |
|
|
|
|
|
if (foldergroup == null || JSON.stringify(foldergroup) == "{}") { |
|
|
|
|
|
this.$notify({ |
|
|
|
|
|
title: "温馨提示", |
|
|
|
|
|
message: "请选中文件或新建文件夹", |
|
|
|
|
|
type: "info", |
|
|
|
|
|
offset: 100, |
|
|
|
|
|
duration: 2500, |
|
|
|
|
|
}); |
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
async intoFoldergroup(foldergroup){ |
|
|
|
|
|
//console.log("当前双击进入的文件的信息"+this.dbClickSelectedFolderGroupData.id) |
|
|
|
|
|
this.dbClickSelectedFolderGroupData=foldergroup; |
|
|
|
|
|
this.isShowWorkt=false; |
|
|
|
|
|
this.isShowBread=true; |
|
|
|
|
|
const userId = this.userId; |
|
|
|
|
|
const nowFolder=this.dbClickSelectedFolderGroupData; |
|
|
|
|
|
const res = await services.fetchFolderFileList(nowFolder.id,userId); |
|
|
|
|
|
if(!res) return; |
|
|
|
|
|
const folderResInfo = res; |
|
|
|
|
|
const folderFileList = this.folderFileList={ |
|
|
|
|
|
listAllFiles:null, |
|
|
|
|
|
listBreadFolderGroups:folderResInfo.listBreadFolderGroups, |
|
|
|
|
|
//我的文件 |
|
|
|
|
|
listFolderGroups: folderResInfo.folder, |
|
|
|
|
|
listMyFiles: folderResInfo.myFile, |
|
|
|
|
|
// 工作文件 |
|
|
|
|
|
listOtherFiles: folderResInfo.workFile, |
|
|
|
|
|
listOtherFolderGroups: null, |
|
|
} |
|
|
} |
|
|
this.dbClickSelectedFolderGroupData = foldergroup; |
|
|
|
|
|
this.isShowWorkt = false; |
|
|
|
|
|
this.isShowBread = true; |
|
|
|
|
|
var param = { |
|
|
|
|
|
folderId: foldergroup.Id, |
|
|
|
|
|
foldergroupId: foldergroup.FirstFolderId, |
|
|
|
|
|
levelId: foldergroup.LevelId, |
|
|
|
|
|
userId: sessionStorage.userId, |
|
|
|
|
|
}; |
|
|
|
|
|
this.$axios({ |
|
|
|
|
|
method: "get", |
|
|
|
|
|
url: encodeURI( |
|
|
|
|
|
process.env.API_HOST + "folders/foldergroup/intofoldergroup" |
|
|
|
|
|
), |
|
|
|
|
|
params: param, |
|
|
|
|
|
}).then((response) => { |
|
|
|
|
|
if (response.data.state == 1) { |
|
|
|
|
|
//如果是我的文件下的文件和文件组 :0;否则是工作文件下的文件和文件组 :1 |
|
|
|
|
|
if (this.currentPageType == 0) { |
|
|
|
|
|
// 加载我的文件 |
|
|
|
|
|
this.myFilesList = response.data.data.listMyFiles; |
|
|
|
|
|
//zxm+ 加载我的文件夹组 |
|
|
|
|
|
this.myListFolderGroups = response.data.data.listFolderGroups; |
|
|
|
|
|
//zxm+ 加载文件分组面包屑 |
|
|
|
|
|
this.folderGroupBreads = response.data.data.listBreadFolderGroups; |
|
|
|
|
|
} else { |
|
|
|
|
|
// 加载我的文件 |
|
|
|
|
|
this.myFilesList = response.data.data.listOtherFiles; |
|
|
|
|
|
//zxm+ 加载我的文件夹组 |
|
|
|
|
|
this.myListFolderGroups = response.data.data.listOtherFolderGroups; |
|
|
|
|
|
//zxm+ 加载文件分组面包屑 |
|
|
|
|
|
this.folderGroupBreads = response.data.data.listBreadFolderGroups; |
|
|
|
|
|
} |
|
|
|
|
|
clearInterval(this.timer); |
|
|
|
|
|
this.timer = setInterval(() => { |
|
|
|
|
|
this.intoFoldergroup(foldergroup); |
|
|
|
|
|
}, 3 * 1000); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
if (this.currentPageType == 0) { |
|
|
|
|
|
// 加载我的文件 |
|
|
|
|
|
this.myFilesList = this.folderFileList.listMyFiles; |
|
|
|
|
|
// 加载我的文件夹 zxm+ |
|
|
|
|
|
this.myListFolderGroups = this.folderFileList.listFolderGroups; |
|
|
|
|
|
this.folderGroupBreads =this.folderFileList.folderGroupBreads; |
|
|
|
|
|
} else { |
|
|
|
|
|
// 加载工作文件 |
|
|
|
|
|
this.myFilesList = this.folderFileList.listOtherFiles; |
|
|
|
|
|
// 加载工作文件分组 zxm+ |
|
|
|
|
|
this.myListFolderGroups = this.folderFileList.listOtherFolderGroups; |
|
|
|
|
|
this.folderGroupBreads =this.folderFileList.folderGroupBreads; |
|
|
|
|
|
} |
|
|
|
|
|
clearInterval(this.timer); |
|
|
|
|
|
this.timer = setInterval(() => { |
|
|
|
|
|
this.intoFoldergroup(foldergroup); |
|
|
|
|
|
}, 8 * 1000); |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
// intoFoldergroup: function (foldergroup) { |
|
|
|
|
|
// // console.log('intoFoldergroup: ', foldergroup); |
|
|
|
|
|
// if (foldergroup == null || JSON.stringify(foldergroup) == "{}") { |
|
|
|
|
|
// this.$notify({ |
|
|
|
|
|
// title: "温馨提示", |
|
|
|
|
|
// message: "请选中文件或新建文件夹", |
|
|
|
|
|
// type: "info", |
|
|
|
|
|
// offset: 100, |
|
|
|
|
|
// duration: 2500, |
|
|
|
|
|
// }); |
|
|
|
|
|
// return; |
|
|
|
|
|
// } |
|
|
|
|
|
// this.dbClickSelectedFolderGroupData = foldergroup; |
|
|
|
|
|
// this.isShowWorkt = false; |
|
|
|
|
|
// this.isShowBread = true; |
|
|
|
|
|
// var param = { |
|
|
|
|
|
// folderId: foldergroup.Id, |
|
|
|
|
|
// foldergroupId: foldergroup.FirstFolderId, |
|
|
|
|
|
// levelId: foldergroup.LevelId, |
|
|
|
|
|
// userId: sessionStorage.userId, |
|
|
|
|
|
// }; |
|
|
|
|
|
// this.$axios({ |
|
|
|
|
|
// method: "get", |
|
|
|
|
|
// url: encodeURI( |
|
|
|
|
|
// process.env.API_HOST + "folders/foldergroup/intofoldergroup" |
|
|
|
|
|
// ), |
|
|
|
|
|
// params: param, |
|
|
|
|
|
// }).then((response) => { |
|
|
|
|
|
// if (response.data.state == 1) { |
|
|
|
|
|
// //如果是我的文件下的文件和文件组 :0;否则是工作文件下的文件和文件组 :1 |
|
|
|
|
|
// if (this.currentPageType == 0) { |
|
|
|
|
|
// // 加载我的文件 |
|
|
|
|
|
// this.myFilesList = response.data.data.listMyFiles; |
|
|
|
|
|
// //zxm+ 加载我的文件夹组 |
|
|
|
|
|
// this.myListFolderGroups = response.data.data.listFolderGroups; |
|
|
|
|
|
// //zxm+ 加载文件分组面包屑 |
|
|
|
|
|
// this.folderGroupBreads = response.data.data.listBreadFolderGroups; |
|
|
|
|
|
// } else { |
|
|
|
|
|
// // 加载我的文件 |
|
|
|
|
|
// this.myFilesList = response.data.data.listOtherFiles; |
|
|
|
|
|
// //zxm+ 加载我的文件夹组 |
|
|
|
|
|
// this.myListFolderGroups = response.data.data.listOtherFolderGroups; |
|
|
|
|
|
// //zxm+ 加载文件分组面包屑 |
|
|
|
|
|
// this.folderGroupBreads = response.data.data.listBreadFolderGroups; |
|
|
|
|
|
// } |
|
|
|
|
|
// clearInterval(this.timer); |
|
|
|
|
|
// this.timer = setInterval(() => { |
|
|
|
|
|
// this.intoFoldergroup(foldergroup); |
|
|
|
|
|
// }, 3 * 1000); |
|
|
|
|
|
// } |
|
|
|
|
|
// }); |
|
|
|
|
|
// }, |
|
|
/** |
|
|
/** |
|
|
* 点击文件分组面包屑 |
|
|
* 点击文件分组面包屑 |
|
|
* obj 参数对象 |
|
|
* obj 参数对象 |
|
|