|
@@ -399,6 +399,11 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
initData(data) {
|
|
|
+ if (this.type === 'bug') {
|
|
|
+ data.noticeConditionList.map(item => {
|
|
|
+ item.timeUnit === 'DAY' ? item.greaterTime = item.greaterTime + 'D' : item.greaterTime = item.greaterTime + 'H'
|
|
|
+ })
|
|
|
+ }
|
|
|
this.formData = {
|
|
|
type: data.type,
|
|
|
id: data.id,
|
|
@@ -538,13 +543,17 @@ export default {
|
|
|
this.showBugListEnum()
|
|
|
}
|
|
|
let i = 1
|
|
|
+ let number = 1
|
|
|
+ while (number <= 24) {
|
|
|
+ number >= 6 ? this.rangDaysList.push({ label: `大于${number}小时`, value: `${number}H` }) : ''
|
|
|
+ number++
|
|
|
+ }
|
|
|
while (i <= 100) {
|
|
|
- this.rangDaysList.push({ label: `大于${i}天`, value: i })
|
|
|
+ this.rangDaysList.push({ label: `大于${i}天`, value: `${i}D` })
|
|
|
this.DaysList.push({ label: `${i}天`, value: i })
|
|
|
this.continuityDaysList.push({ label: `连续${i}天`, value: i })
|
|
|
i++
|
|
|
}
|
|
|
-
|
|
|
this.continuityDaysList.unshift({ label: `每天`, value: -1 })
|
|
|
},
|
|
|
changeNoticeItem(item) { // 修改条件
|
|
@@ -562,7 +571,7 @@ export default {
|
|
|
type: this.typeList[0].value, // 1 需求状态 2 需求事件 3 任务状态 4 任务事件
|
|
|
status: 0,
|
|
|
triggerEvent: this.triggerList[0].code, // 触发事件
|
|
|
- greaterTime: 1, // 大于的时间
|
|
|
+ greaterTime: this.type === 'bug' ? 1 + 'D' : 1, // 大于的时间
|
|
|
lessTime: 3 // 提前提醒的时间
|
|
|
})
|
|
|
},
|
|
@@ -625,6 +634,14 @@ export default {
|
|
|
dChat: this.noticeList.DChart ? this.DChartList : [],
|
|
|
dChatGroup: this.noticeList.Group ? this.GroupList : []
|
|
|
}
|
|
|
+ if (this.type === 'bug') {
|
|
|
+ const numDay = this.formData.noticeConditionList[0].greaterTime
|
|
|
+ const str = numDay.split('')
|
|
|
+ const targetStr = str[str.length - 1]
|
|
|
+ this.formData.noticeConditionList[0].timeUnit = targetStr === 'D' ? 'DAY' : 'HOUR'
|
|
|
+ const num = numDay.slice(0, numDay.length - 1)
|
|
|
+ this.$set(this.formData.noticeConditionList[0], 'greaterTime', num)
|
|
|
+ }
|
|
|
this.data && !this.copy ? this.updateBizNoticeSetting() : this.addBizNoticeSetting()
|
|
|
},
|
|
|
async addBizNoticeSetting() { // 新增通知
|