From ae98953f6d2cccba8e97c92de0dee12515bd0eef Mon Sep 17 00:00:00 2001 From: kim131 <1035828775@qq.com> Date: Wed, 20 Jan 2021 17:02:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=8C=87=E6=B4=BE=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E7=9A=84=E5=91=98=E5=B7=A5=E4=B9=9F=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E6=8C=87=E6=B4=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/css/main.css | 1 + .../components_web/projDetail/projDetail.vue | 52 ++++++++++++++++--- .../main_web/workspace/workspace.new.vue | 30 +++++++---- 3 files changed, 66 insertions(+), 17 deletions(-) diff --git a/public/static/css/main.css b/public/static/css/main.css index cf3a2112..db178923 100644 --- a/public/static/css/main.css +++ b/public/static/css/main.css @@ -464,6 +464,7 @@ ul { width: calc(100vw - 120px); margin: 0 auto; padding: 0 0 10px 0; + overflow: hidden; } .yiyun_section_top { margin-top: 10px; diff --git a/src/views/components_web/projDetail/projDetail.vue b/src/views/components_web/projDetail/projDetail.vue index fe8ee7e8..0a1569c0 100644 --- a/src/views/components_web/projDetail/projDetail.vue +++ b/src/views/components_web/projDetail/projDetail.vue @@ -95,7 +95,7 @@
模板概况
+ @click.stop="isShowTemplateSummary = true, isEnterEditPropValue = false">模板概况
项目管理权限
@@ -154,7 +154,7 @@ :title="nowProject.TempName" :showUserCenter="false" :showBackBtn="true" >
+ @click.stop="handleEditTemplate"> {{`${isEnterEditPropValue ? "完成编辑" : "修改"}`}}
@@ -303,7 +303,9 @@ import NestTemp from '../project/nestTemp.vue'; isDistworkDone: false,//是否有进行过工作指派 isDistworkSuccess: false,//每一次工作指派是否成功 - lastFolderId: '' + lastFolderId: '',//最后一个进行工作指派的节点的id + originPropListCopy: [], + } }, components: { @@ -392,6 +394,18 @@ import NestTemp from '../project/nestTemp.vue'; this.$bus.$off('enterNestTemp', this.enterNestTemp); }, methods: { + // 点击了编辑模板概况的按钮 + handleEditTemplate() { + this.isEnterEditPropValue = !this.isEnterEditPropValue; + // 此时完成编辑 -> 提示编辑成功等信息 + if(!this.isEnterEditPropValue) { + this.originPropListCopy = this.listProjProp; + this.$notify({ + type: ["success"], + message: '修改模板概况成功' + }) + } + }, /** * 进入嵌套模板 */ @@ -458,6 +472,8 @@ import NestTemp from '../project/nestTemp.vue'; this.nowProject = {...this.nowProject}; this.listProjProp=projectInfoRes.Data.CustomProps; this.listProjProp = [...this.listProjProp]; + + this.originPropListCopy = cloneDeep(this.listProjProp); this.coverSrc=projectInfoRes.Data.ShowImgUrl; }, async coverUploadSuccess(file) { @@ -482,7 +498,22 @@ import NestTemp from '../project/nestTemp.vue'; }, returnToDistWorkClick() { - this.isShowTemplateSummary = false; + // 未点击完成编辑按钮 -》 概况信息未保存 + if(this.isEnterEditPropValue) { + this.$confirm("是否保存当前项目的模板概况信息", "", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }).then(async () => { + this.isShowTemplateSummary = false; + this.originPropListCopy = this.listProjProp; + + }).catch(() => { + this.listProjProp = this.originPropListCopy; + }) + } else { + this.isShowTemplateSummary = false; + } }, // 点击返回按钮 显示项目概况页面 showProjDetailClick() { @@ -1089,15 +1120,18 @@ import NestTemp from '../project/nestTemp.vue'; ]); // const deptHeadList = deptList[0].children || []; let oList = this.plainTreeNodes(deptList, userList); - if(oList.length == 0) { - // 如果人员没有设置部门的话 + + // 如果人员没有设置部门的话 + const aloneUserList = this.userList.filter(user => user.deptId == "0"); + if(aloneUserList.length > 0) { const emptyDept = {}; emptyDept.id = "0"; emptyDept.deptName = sessionStorage.CompanyName || ""; emptyDept.listUser = []; - emptyDept.listUser.push(...userList); + emptyDept.listUser.push(...aloneUserList); oList.push(emptyDept); } + oList.forEach(item=>{ // console.log(1) // console.log(item.listUser) @@ -1437,6 +1471,7 @@ import NestTemp from '../project/nestTemp.vue'; padding: 0 24px; height: calc(100vh - 126px); overflow: scroll; + background-color: #f8f8f8; .cover-container { height: 226px; margin: 0 0 32px 0; @@ -1571,12 +1606,13 @@ import NestTemp from '../project/nestTemp.vue'; } .template-summary { + background-color: #f8f8f8; .summary-wrap { height: calc(100vh - 126px - 16px); overflow: scroll; padding: 0 24px; margin: 16px 0 0 0; - background-color: #fcfcfc; + background-color: #f8f8f8; /* 编辑状态下的模板自定义字段输入框 */ .prop-value-input { diff --git a/src/views/main_web/workspace/workspace.new.vue b/src/views/main_web/workspace/workspace.new.vue index 5c0233e6..a5e6727c 100644 --- a/src/views/main_web/workspace/workspace.new.vue +++ b/src/views/main_web/workspace/workspace.new.vue @@ -290,8 +290,8 @@
-
-
+
+
@@ -656,8 +656,10 @@ export default { mounted: function () { this.hackWorkLine = this.$refs.hackworkline; window.addEventListener("scroll", this.onscroll, true); - this.listenBottomHeight(); - window.addEventListener("resize", this.listenBottomHeight, true); + this.coopFileBox = document.getElementById('coopFileBox'); + + + // window.addEventListener("resize", this.listenBottomHeight, true); if(this.isClient) { this.initWorkspaceDropEvent(); } @@ -683,7 +685,7 @@ export default { }, destroyed: function () { window.removeEventListener("scroll", this.onscroll); - window.removeEventListener("resize", this.listenBottomHeight); + // window.removeEventListener("resize", this.listenBottomHeight); // window.removeEventListener("mouseenter", this.setIconMouseEnter); window.clearTimeout(this.timerIns); @@ -715,6 +717,10 @@ export default { subFolderList() { const uniqSubFolderList = uniqBy(this.workSubFolderList.concat(this.tempWorkSubFolderList), folder => folder.id); return uniqSubFolderList + }, + // 得到协作文件展示区域的实际高度 + coopBoxRealHeight() { + return document.getElementById('coopFileBox') ? document.getElementById('coopFileBox').offsetHeight : 0; } }, methods: { @@ -1142,14 +1148,17 @@ export default { // } }, listenBottomHeight() { - let oDivH = document.getElementById('coopFileBox') ? document.getElementById("coopFileBox").offsetHeight : 0; - let oShodow = document.getElementById("bottomoShodow"); - console.log(oDivH) + let oDivH = document.getElementById('coopFileBox') ? document.getElementById("coopFileBox").offsetHeight: 0; + // let oShodow = document.getElementById("bottomoShodow"); + const target = document.getElementById('coopFileBox') + + if (oDivH > 259) { this.showadow = true; } else { this.showadow = false; } + console.log(oDivH, this.showadow); }, onSocketFileChangeDetected({ data }){ try { @@ -1264,7 +1273,7 @@ export default { this.currentFolder = folder; this.breadcrumbFolderList.push(folder); } else if(flag == 1) { - this.listenBottomHeight(); + // this.listenBottomHeight(); this.currentFolderInCoop = folder; this.breadcrumbFolderListInCoop.push(folder); } @@ -1825,6 +1834,9 @@ export default { } }, watch: { + coopBoxRealHeight(val) { + this.showadow = val> 259; + }, isShowSearchBar(val) { if(!val) { if(this.currentBtnIndex == 0) {