Browse Source

展示历史文件

master
revive 4 years ago
parent
commit
5c6ad9c59b
1 changed files with 23 additions and 13 deletions
  1. +23
    -13
      src/views/main_web/workspace/workspace.vue

+ 23
- 13
src/views/main_web/workspace/workspace.vue View File

@@ -2421,7 +2421,7 @@
>{{ currentMilestone.archName }}</span
>
<span class="widthtext1 minitext"
>版本{{ currentMilestone.number }}</span
>版本{{ currentMilestone.version }}</span
>
<span class="widthtext minitext">{{
currentMilestone.strCreateTime
@@ -2446,7 +2446,7 @@
<span class="widthfile midtext" :title="item.archName">{{
item.archName
}}</span>
<span class="widthtext1 minitext">版本{{ item.number }}</span>
<span class="widthtext1 minitext">版本{{ item.version }}</span>
<span class="widthtext minitext">{{ item.strCreateTime }}</span>
<a
href="javascript:;"
@@ -3054,6 +3054,8 @@ export default {
return file.milestone != 2;
})
},


oneOf(target, list) {
return list.indexOf(target) !== -1;
},
@@ -3762,7 +3764,7 @@ export default {
const projId = this.projId;
const workList = await services.fetchWorkFlow(projId, userId);
const folderList = workList.slice(1);
console.log(folderList);
this.listUserFolders = folderList;
if(!folderList.length) return;
if (this.$route.params.folderId != undefined) {
@@ -3863,6 +3865,8 @@ export default {
const data = await services.fetchFolderFileList(currentFolder.id, userId);
if(!data) return;
const folderResInfo = data;
console.log(111)
console.log(data);
const folderFileList = this.folderFileList = {
listAllFiles:null,
listBreadFolderGroups: null,
@@ -4013,14 +4017,10 @@ export default {
*/
async loadListCommonFiles(currentFolder,userId) {
//this.myPublicFilesList=[];
if(currentFolder.folder.length==0){
console.log("公共文件如下")
console.log(this.myPublicFilesList)
return this.myPublicFilesList;
}else{
this.myPublicFilesList.push(currentFolder.myFile);
this.myPublicFilesList.push(currentFolder.workFile);
if(currentFolder.folder.length==0){
return this.myPublicFilesList;
}
await Promise.all(currentFolder.folder.map(async (item) => {
//耗时操作
@@ -4204,6 +4204,16 @@ export default {
this.openOffice(file);
}
},
/**
* 获取历史文件过滤
*/
getMilstoneFile(archName){
var files=this.folderFileList.listMyFiles.concat([]);
files.push(...this.folderFileList.listOtherFiles);
return files.filter(file=>{
return(file.archName===archName && file.milestone===2)
})
},
/**
* 点击文件事件:直接打开文件
*/
@@ -5296,9 +5306,9 @@ export default {
});
return;
}
this.currentMilestone=file;
this.dialogFileHistory = true;
this.loadFileMilestones(file);
this.listMilestones=this.getMilstoneFile(file.archName);
this.currentArchID = file.archID;
},
/**
@@ -5306,7 +5316,7 @@ export default {
*/
currMilestoneChange: function () {
if (this.currentMilestone.check) {
this.currentMileArchID = this.currentMilestone.archID;
this.currentMileArchID = this.currentMilestone.id;
this.listMilestones.forEach((milestone) => {
milestone.check = false;
});
@@ -5471,7 +5481,7 @@ export default {
* 设置历史文件
*/
setMilestones: function () {
if (this.currentMileArchID == this.currentMilestone.archID) {
if (this.currentMileArchID == this.currentMilestone.id) {
this.dialogFileHistory = false;
return;
}


Loading…
Cancel
Save