|
@@ -193,6 +193,7 @@
|
|
// const _ = require('lodash')
|
|
// const _ = require('lodash')
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
|
|
+import dayjs from 'dayjs'
|
|
import {
|
|
import {
|
|
queryTeamInfoList,
|
|
queryTeamInfoList,
|
|
showTeamAndMemberEnum,
|
|
showTeamAndMemberEnum,
|
|
@@ -218,6 +219,7 @@ import bugTableList from '@/views/workbench/bugTableList.vue'
|
|
import statisticsSection from '@/views/workbench/components/statisticsSection'
|
|
import statisticsSection from '@/views/workbench/components/statisticsSection'
|
|
import createDialog from '@/views/workbench/components/createDialog'
|
|
import createDialog from '@/views/workbench/components/createDialog'
|
|
import websocket from '@/views/workbench/mixins/websocket'
|
|
import websocket from '@/views/workbench/mixins/websocket'
|
|
|
|
+import { getAllTime } from '@/utils/global.js'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
@@ -257,7 +259,7 @@ export default {
|
|
activeSchedule: '1', // 日程表和列表切换
|
|
activeSchedule: '1', // 日程表和列表切换
|
|
deleteDialogVisible: false,
|
|
deleteDialogVisible: false,
|
|
createDialog: false, // 新建弹框
|
|
createDialog: false, // 新建弹框
|
|
- selectRangeData: null, // 已选择的范围日期
|
|
|
|
|
|
+ selectRangeData: [], // 已选择的范围日期
|
|
createSchedule: { // 新建日程
|
|
createSchedule: { // 新建日程
|
|
visible: false,
|
|
visible: false,
|
|
data: null
|
|
data: null
|
|
@@ -346,25 +348,34 @@ export default {
|
|
this.showDetail = true
|
|
this.showDetail = true
|
|
this.detailXY = [`${e.jsEvent.clientX - 200}px`, `${e.jsEvent.clientY + 20}px`]
|
|
this.detailXY = [`${e.jsEvent.clientX - 200}px`, `${e.jsEvent.clientY + 20}px`]
|
|
},
|
|
},
|
|
- selectDates(data) { // 日历中选择日期
|
|
|
|
- console.log(data)
|
|
|
|
|
|
+ selectDates(selectionInfo) { // 多选日期新建日程弹框
|
|
|
|
+ this.selectRangeData = [
|
|
|
|
+ dayjs(selectionInfo.startStr).format('YYYY-MM-DD'),
|
|
|
|
+ dayjs(selectionInfo.endStr).subtract(1, 'day').format('YYYY-MM-DD')
|
|
|
|
+ ]
|
|
this.createDialog = true
|
|
this.createDialog = true
|
|
},
|
|
},
|
|
- createSchOrCal(bizId) {
|
|
|
|
|
|
+ createSchOrCal(bizId) { // 创建排期或者日程
|
|
this.createDialog = false
|
|
this.createDialog = false
|
|
- if (!bizId) this.dateClick(this.selectRangeData)
|
|
|
|
|
|
+ if (!bizId) { // 新建日程
|
|
|
|
+ this.dateClick({
|
|
|
|
+ startStr: this.selectRangeData[0].replace(/-/g, '.'),
|
|
|
|
+ endStr: this.selectRangeData[1].replace(/-/g, '.')
|
|
|
|
+ })
|
|
|
|
+ } else { // 新建排期
|
|
|
|
+ this.visibleSchedule = true
|
|
|
|
+ this.isDelete = false
|
|
|
|
+ this.nowDetailData = {
|
|
|
|
+ dayList: getAllTime(...this.selectRangeData),
|
|
|
|
+ bizId: bizId
|
|
|
|
+ }
|
|
|
|
+ this.DialogTitle = '新建排期'
|
|
|
|
+ }
|
|
},
|
|
},
|
|
dateClick(arg) { // 新建日程弹框
|
|
dateClick(arg) { // 新建日程弹框
|
|
this.createSchedule.data = arg
|
|
this.createSchedule.data = arg
|
|
this.createSchedule.visible = true
|
|
this.createSchedule.visible = true
|
|
},
|
|
},
|
|
- select(selectionInfo) { // 多选日期新建日程弹框
|
|
|
|
- this.createSchedule.data = {
|
|
|
|
- startStr: selectionInfo.startStr,
|
|
|
|
- endStr: moment(selectionInfo.endStr).subtract(1, 'day').format('YYYY-MM-DD')
|
|
|
|
- }
|
|
|
|
- this.createSchedule.visible = true
|
|
|
|
- },
|
|
|
|
editSchedule(data) { // 编辑日程弹框
|
|
editSchedule(data) { // 编辑日程弹框
|
|
if (data) {
|
|
if (data) {
|
|
this.nowDetailData = data
|
|
this.nowDetailData = data
|
|
@@ -421,6 +432,7 @@ export default {
|
|
this.showDetail = false
|
|
this.showDetail = false
|
|
this.queryWorkListByTime(this.calendarView)
|
|
this.queryWorkListByTime(this.calendarView)
|
|
this.$message({ type: 'success', message: '删除成功!' })
|
|
this.$message({ type: 'success', message: '删除成功!' })
|
|
|
|
+ this.DialogTitle = '编辑排期'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async queryWorkListByTime(view) { // 获取指定时间段用户日程信息
|
|
async queryWorkListByTime(view) { // 获取指定时间段用户日程信息
|