From 60b85aceab18112006f8494bb9ddfbe353221e04 Mon Sep 17 00:00:00 2001 From: kun <1422840143@qq.com> Date: Fri, 31 May 2024 13:08:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/index.js | 20 ++++----- .../configManage/personnelAccess.vue | 10 ++--- .../projectganttChart.vue | 45 +++++++++++++------ 3 files changed, 46 insertions(+), 29 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 086b8534..a738dc15 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -52,25 +52,25 @@ export default new Vuex.Store({ // FILEURL:'http://182.90.224.237:51234/image/', // UPLOADURL: "http://http://192.168.34.155:19111/upload/image/", // 洁本地 // FILEURL: "http://http://192.168.34.155:19111/image/", //洁本地 - // UPLOADURL:'http://192.168.34.221:9111/upload/image/',// 郭圣雄本地 - // FILEURL:'http://192.168.34.221:9111/image/',//郭圣雄本地 - // WORKFLOWURL: "http://192.168.34.138:88/#/workspace/forms", //坤工作流地址(本地) + UPLOADURL:'http://192.168.34.221:9111/upload/image/',// 郭圣雄本地 + FILEURL:'http://192.168.34.221:9111/image/',//郭圣雄本地 + WORKFLOWURL: "http://192.168.34.138:88/#/workspace/forms", //坤工作流地址(本地) // WORKFLOWURL: "http://192.168.34.126:88/#/workspace/forms", //罗峰工作流地址(本地) // UPLOADURL:'http://182.90.224.237:51234/upload/image/',// 郭圣雄远程 // FILEURL:'http://182.90.224.237:51234/image/',//郭圣雄远程 // UPLOADURL:'http://42.180.188.17:11211/upload/image',//测试 // FILEURL:'http://42.180.188.17:11211/image/',//测试 - BASEURL: baseUrl - ? baseUrl - : window.location.protocol + "//" + window.location.host + "/", //正式环境 - UPLOADURL: - window.location.protocol + "//" + window.location.host + "/upload/image", //正式环境 - FILEURL: window.location.protocol + "//" + window.location.host + "/image/", //正式环境 + // BASEURL: baseUrl + // ? baseUrl + // : window.location.protocol + "//" + window.location.host + "/", //正式环境 + // UPLOADURL: + // window.location.protocol + "//" + window.location.host + "/upload/image", //正式环境 + // FILEURL: window.location.protocol + "//" + window.location.host + "/image/", //正式环境 // WORKFLOWURL: 'http://47.93.215.234:19998/#/workspace/forms',//鞍钢平台工作流地址(弃用) // WORKFLOWURL: 'http://47.93.215.234:19098/#/workspace/forms',//鞍钢测试平台工作流地址(弃用) // WORKFLOWURL: 'http://42.180.188.17:19998/#/workspace/forms',//鞍钢平台工作流地址 - WORKFLOWURL: "http://42.180.188.17:19098/#/workspace/forms", //鞍钢测试平台工作流地址 + // WORKFLOWURL: "http://42.180.188.17:19098/#/workspace/forms", //鞍钢测试平台工作流地址 //--------------------------------------------------------------------------------------------- // BASEURL: baseUrl // ? baseUrl diff --git a/src/views/projectFront/configManage/personnelAccess.vue b/src/views/projectFront/configManage/personnelAccess.vue index 78852609..66b616d3 100644 --- a/src/views/projectFront/configManage/personnelAccess.vue +++ b/src/views/projectFront/configManage/personnelAccess.vue @@ -860,16 +860,16 @@ export default { for (let i = 0; i < id.split(",").length; i++) { arr.push(id.split(",")[i]); } - console.log(arr, 777888); this.$nextTick(() => { - this.$refs.treeRef.setCheckedKeys([]); - arr.map((item) => { - this.$refs.treeRef.setChecked(this.findNodeById(item), true); - }); + this.$refs.treeRef.setCheckedKeys(arr); + // arr.map((item) => { + // this.$refs.treeRef.setChecked(this.findNodeById(item), true); + // }); }); } }); }, + // 判断是否有子元素 findNodeById(id) { function findNode(nodes, id) { for (let i = 0; i < nodes.length; i++) { diff --git a/src/views/projectFront/progressManagementAg/projectganttChart.vue b/src/views/projectFront/progressManagementAg/projectganttChart.vue index d86d9b06..ec6a9918 100644 --- a/src/views/projectFront/progressManagementAg/projectganttChart.vue +++ b/src/views/projectFront/progressManagementAg/projectganttChart.vue @@ -231,14 +231,14 @@ top: '10px', left: calcLeft(gantt, forTimesFn(p), index) + 'px', }" - v-show="isShowTip(p, index + 1)" + v-show="isShowTip(p, index)" >
查看里程碑节点
- 日期:{{ isShowDate(p, index + 1) }} - 里程碑:{{ isShowLcText(p, index + 1) }} + 日期:{{ isShowDate(p, index) }} + 里程碑:{{ isShowLcText(p, index) }}
@@ -1251,26 +1251,36 @@ export default { // ? offsetLeft * (index + 1) + offsetLeft // : offsetLeft * (index + 1) + offsetLeft + 10; // } - return offsetLeft * (index + 1) + return offsetLeft * index }, isShowDate(obj, dayAfter) { // 获取当前日期 - const today = moment(obj.startDate); - - // 计算2天后的日期 - const twoDaysLater = today.add(dayAfter, "days").format("YYYY-MM-DD"); - return twoDaysLater; + const today = moment(obj.startDate) + // 计算多少天后的日期 + let daysLaterDate = ""; + if(dayAfter === 0){ + daysLaterDate = today.format("YYYY-MM-DD"); + } else { + daysLaterDate = today.add(dayAfter, "days").format("YYYY-MM-DD"); + } + return daysLaterDate; }, isShowLcText(obj, dayAfter) { let responseResult = ""; // 获取当前日期 - const today = moment(obj.startDate); + const today = moment(obj.startDate) - // 计算2天后的日期 + // 计算多少天后的日期 const twoDaysLater = today.add(dayAfter, "days").format("YYYY-MM-DD"); + let daysLaterDate = ""; + if(dayAfter === 0){ + daysLaterDate = today.format("YYYY-MM-DD"); + } else { + daysLaterDate = today.add(dayAfter, "days").format("YYYY-MM-DD"); + } if (obj.xzMilestoneList) { obj.xzMilestoneList.map((item) => { - if (item.milestoneTime == twoDaysLater) { + if (item.milestoneTime == daysLaterDate) { responseResult = item.milestoneName; } }); @@ -1285,15 +1295,22 @@ export default { return responseResult; }, isShowTip(obj, dayAfter) { + console.log(dayAfter,123456789) let responseResult = false; // 获取当前日期 const today = moment(obj.startDate); - // 计算2天后的日期 + // 计算多少天后的日期 const twoDaysLater = today.add(dayAfter, "days").format("YYYY-MM-DD"); + let daysLaterDate = ""; + if(dayAfter === 0){ + daysLaterDate = today.format("YYYY-MM-DD"); + } else { + daysLaterDate = today.add(dayAfter, "days").format("YYYY-MM-DD"); + } if (obj.xzMilestoneList) { obj.xzMilestoneList.map((item) => { - if (item.milestoneTime == twoDaysLater) { + if (item.milestoneTime == daysLaterDate) { responseResult = true; } });