From 3e091224ab26252d8624b42b461ba773ee8bee0f Mon Sep 17 00:00:00 2001 From: gaoshp <291585735@qq.com> Date: 星期日, 03 十一月 2024 19:16:31 +0800 Subject: [PATCH] update --- src/views/console/base/CalenderTab.vue | 31 ++++++++++++++++++++++--------- 1 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/views/console/base/CalenderTab.vue b/src/views/console/base/CalenderTab.vue index 422f0ca..b9dba3f 100644 --- a/src/views/console/base/CalenderTab.vue +++ b/src/views/console/base/CalenderTab.vue @@ -1,7 +1,7 @@ <!-- * @Date: 2024-04-04 22:45:43 * @LastEditors: gaoshp - * @LastEditTime: 2024-10-08 22:01:18 + * @LastEditTime: 2024-10-09 22:59:25 * @FilePath: /cps-web/src/views/console/base/CalenderTab.vue --> <template> @@ -119,7 +119,7 @@ this.drawerInfo = this.selectInfo }, relationWork() { - this.$HTTP.post('/api/blade-cps/group/groupWorkstation', { groupCategory: 1, groupType: 'group_workstation' }).then(res => { + this.$HTTP.post('/api/smis/group/groupWorkstation', { groupCategory: 1, groupType: 'group_workstation' }).then(res => { if (res.code === 200) { this.raworkVisible = true this.workStations = this.formatData(res.data) @@ -183,7 +183,7 @@ }, save(workstationIdList) { console.log(workstationIdList, this.selectInfo) - this.$HTTP.post('/api/blade-cps/calendar/associate-workstation', { + this.$HTTP.post('/api/smis/calendar/associate-workstation', { calendarCode: this.selectInfo.code, workstationIdList }).then(res => { @@ -199,7 +199,7 @@ // console.log(day) }, init() { - this.$HTTP.post('/api/blade-cps/shift/list', { statusList: [1] }).then(res => { + this.$HTTP.post('/api/smis/shift/list', { statusList: [1] }).then(res => { if (res.code === 200) { this.shiftList = res.data } @@ -208,7 +208,7 @@ select(row) { this.months = [] - this.$HTTP.get(`/api/blade-cps/calendar/${row.id}`).then(res => { + this.$HTTP.get(`/api/smis/calendar/${row.id}`).then(res => { if (res.code === 200) { // console.log(res.data) this.setDay(res.data) @@ -228,7 +228,7 @@ }) }, table_del() { - this.$HTTP.delete(`/api/blade-cps/calendar/${this.selectInfo.id}`).then(res => { + this.$HTTP.delete(`/api/smis/calendar/${this.selectInfo.id}`).then(res => { if (res.code == 200) { this.$message.success("鎿嶄綔鎴愬姛"); this.load(true) @@ -266,7 +266,7 @@ }, setDay(data) { let year = data.year - this.$HTTP.post('/api/blade-cps/shift-off-day/list', { + this.$HTTP.post('/api/smis/shift-off-day/list', { year: year, startOffDay: `${year}-01-01`, endOffDay: `${year}-12-31` @@ -282,7 +282,7 @@ }) for (let i = 0; i < 12; i++) { - data.calendarDayVOList.map(v => v.modelId) + let modelIds = [...new Set(data.calendarDayVOList.map(v => v.modelId))] let ext = modelIds.map(v => { let ban = this.shiftListName.find(item => item.id === v) @@ -303,6 +303,8 @@ }, } }) + console.log('---------youxian') + this.months.push({ year: year, month: i, @@ -314,7 +316,18 @@ return moment(item).month() === i }) }, - ...ext + ...ext, + // 浼樺厛 + { + dates: data.calendarDayVOList.filter(item => { + return moment(item.calendarDate).month() === i + }).filter(item => item.isHighPriority).map(item => item.calendarDate), + bar: { + style: { + backgroundColor: 'red', + } + }, + } ] }) } -- Gitblit v1.9.3