|
@@ -149,8 +149,9 @@
|
|
|
<modify-schedule
|
|
|
v-if="visibleSchedule"
|
|
|
:visible.sync="visibleSchedule"
|
|
|
- :detail-data="updateSchedule.data"
|
|
|
- :title="'修改排期'"
|
|
|
+ :is-delete.sync="isDelete"
|
|
|
+ :detail-data="nowDetailData"
|
|
|
+ :title="DialogTitle"
|
|
|
@update="queryWorkListByTime(calendarView)"
|
|
|
/>
|
|
|
<!-- 排期操作弹框 -->
|
|
@@ -214,6 +215,8 @@ export default {
|
|
|
visible: false,
|
|
|
data: null
|
|
|
},
|
|
|
+ DialogTitle: '新建排期', // 排期弹框标题
|
|
|
+ isDelete: false, // 删除排期操作
|
|
|
teamAndMemberEnum: {},
|
|
|
teamAndMemberMap: {},
|
|
|
teamInfo: null, // 团队信息数据
|
|
@@ -291,13 +294,19 @@ export default {
|
|
|
if (data) {
|
|
|
this.nowDetailData = data
|
|
|
}
|
|
|
- this.$confirm('是否删除此日程', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- this.nowDetailData.origin === 0 ? this.deleteSchedule_0() : this.deleteSchedule_1()
|
|
|
- }).catch(() => {})
|
|
|
+ if (this.nowDetailData.origin === 0) {
|
|
|
+ this.DialogTitle = '删除排期'
|
|
|
+ this.isDelete = true
|
|
|
+ this.visibleSchedule = true
|
|
|
+ } else if (this.nowDetailData.origin === 1) {
|
|
|
+ this.$confirm('是否删除此日程', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.deleteSchedule_0()
|
|
|
+ }).catch(() => {})
|
|
|
+ }
|
|
|
},
|
|
|
async deleteSchedule_1() { // 删除日程
|
|
|
const res = await deleteSelfSchedule(this.nowDetailData.id)
|
|
@@ -334,9 +343,13 @@ export default {
|
|
|
}
|
|
|
const res = await queryWorkListByTime(params)
|
|
|
if (res.code === 200) {
|
|
|
+ let num = 0
|
|
|
this.calendarEvents = res.data.map((item, index) => {
|
|
|
const title = item.origin ? '日程' : '排期'
|
|
|
const require = `${item.requireNames && item.requireNames.length > 0 ? item.requireNames.join(',') : '无'}`
|
|
|
+ if (index >= 1 && item.id === res.data[index - 1].id) {
|
|
|
+ num = num + 1
|
|
|
+ }
|
|
|
return {
|
|
|
id: item.id,
|
|
|
title: `${title}:${item.peopleObject.name}:${item.name}-${item.desc || '无'};所属需求:${require}`,
|
|
@@ -344,8 +357,8 @@ export default {
|
|
|
end: moment(item.endTime).add(1, 'day').toDate(),
|
|
|
detailData: item,
|
|
|
className: item.origin ? 'schedule1' : 'schedule2',
|
|
|
- backgroundColor: this.bgColorList[index % 10],
|
|
|
- textColor: this.colorList[index % 10]
|
|
|
+ backgroundColor: this.bgColorList[(index - num) % 10],
|
|
|
+ textColor: this.colorList[(index - num) % 10]
|
|
|
}
|
|
|
})
|
|
|
}
|