diff --git a/src/views/components_web/distWork/distWork.vue b/src/views/components_web/distWork/distWork.vue
index 9c66e719..0715f02c 100644
--- a/src/views/components_web/distWork/distWork.vue
+++ b/src/views/components_web/distWork/distWork.vue
@@ -621,9 +621,9 @@
-
+
@@ -1172,9 +1172,9 @@ export default {
this.getIsCheckSecondLevel(topIndex);
this.getIsCheckAll();
},
- /*
- *选择负责人
- */
+ /**
+ * 选择负责人
+ */
handleCheckedOnlyOne(topIndex, user, e) {
//三级change事件
if (e) {
@@ -1219,12 +1219,14 @@ export default {
var haveDataCount = 0;
for (var j = 0; j < this.listDept.length; j++) {
//全选checkbox状态
+
if (this.listDept[j].listUser.length > 0) {
haveDataCount++;
if (this.listDept[j].selected == true) {
checkCount++;
}
}
+
}
if ((checkCount == haveDataCount) && checkCount !== 0 && haveDataCount !== 0) {
this.ischeckAll = true;
diff --git a/src/views/main_web/workspace/service.js b/src/views/main_web/workspace/service.js
index 5b386530..da4ed955 100644
--- a/src/views/main_web/workspace/service.js
+++ b/src/views/main_web/workspace/service.js
@@ -38,4 +38,11 @@ export async function fetchFolderFileList(folderId, userId) {
export async function createSubFolder(folderGroupData) {
const res = await fetchApi('folder/createSubfolder', folderGroupData);
return wrapErrorHint(res);
+}
+/**
+ * 添加历史文件
+ */
+export async function AddArchMilesStone(fileInfo){
+ const res = await fetchApi('file/AddArchMilesStone', fileInfo);
+ return wrapErrorHint(res);
}
\ No newline at end of file
diff --git a/src/views/main_web/workspace/workspace.vue b/src/views/main_web/workspace/workspace.vue
index 2c8f860d..10aca46d 100644
--- a/src/views/main_web/workspace/workspace.vue
+++ b/src/views/main_web/workspace/workspace.vue
@@ -3086,6 +3086,7 @@ export default {
this.dbClickSelectedFolderGroupData != null &&
JSON.stringify(this.dbClickSelectedFolderGroupData) != "{}"
) {
+ console.log("我要更新当前文件夹啦");
this.intoFoldergroup(this.dbClickSelectedFolderGroupData);
} else {
this.listFiles();
@@ -5277,11 +5278,12 @@ export default {
/**
* 保存历史文件
*/
- createMilestone: function (file) {
- if (this.isCreating) {
+ async createMilestone(file){
+ if(this.isCreating){
return;
}
- if (file.status == 1 && file.modifyUserID != sessionStorage.userId) {
+ /** 当共享且其他人在编辑时 */
+ if(file.Status ==2 && file.ModifyUserId !==sessionStorage.userId){
this.$notify({
title: "温馨提示",
message: "其他人编辑中,不能设置历史文件",
@@ -5289,52 +5291,90 @@ export default {
offset: 100,
duration: 5000,
});
- return;
+ 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);
+ 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={
Id:sessionStorage.userId,
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,
FolderName:this.folderGroupData.FolderName,
TemplateId:this.nowFolder.templateId,
@@ -6497,8 +6536,12 @@ export default {
CreateTime:new Date(),
ModifyUserId:sessionStorage.userId,
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);
if (Res.Code != -1) {
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 参数对象