|
@@ -190,6 +190,11 @@ export default {
|
|
|
type: Boolean,
|
|
|
default: false,
|
|
|
required: false
|
|
|
+ },
|
|
|
+ copy: {// 复制
|
|
|
+ type: Boolean,
|
|
|
+ default: false,
|
|
|
+ required: false
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
@@ -271,7 +276,12 @@ export default {
|
|
|
handler(newV) {
|
|
|
this.show = newV
|
|
|
},
|
|
|
- deep: true,
|
|
|
+ immediate: true
|
|
|
+ },
|
|
|
+ copy: {
|
|
|
+ handler(newV) {
|
|
|
+ this.copy = newV
|
|
|
+ },
|
|
|
immediate: true
|
|
|
},
|
|
|
'formData.clientId': { // 客户端改变,版本默认取第一个版本
|
|
@@ -282,7 +292,7 @@ export default {
|
|
|
'noticeList.Email': {
|
|
|
handler(newV, oldV) {
|
|
|
if (newV) {
|
|
|
- if (this.EmailList.length === 0) this.EmailList.push({ types: 0, member: false, teams: [], customStaffs: [] })
|
|
|
+ if (this.EmailList.length === 0) this.EmailList.push({ type: 0, member: false, teams: [], customStaffs: [] })
|
|
|
} else {
|
|
|
this.EmailList = []
|
|
|
}
|
|
@@ -291,7 +301,7 @@ export default {
|
|
|
'noticeList.DChart': {
|
|
|
handler(newV, oldV) {
|
|
|
if (newV) {
|
|
|
- if (this.DChartList.length === 0) this.DChartList.push({ types: 0, member: false, teams: [], customStaffs: [] })
|
|
|
+ if (this.DChartList.length === 0) this.DChartList.push({ type: 0, member: false, teams: [], customStaffs: [] })
|
|
|
} else {
|
|
|
this.DChartList = []
|
|
|
}
|
|
@@ -319,11 +329,17 @@ export default {
|
|
|
noticeTime: data.noticeTime // 通知时刻
|
|
|
}
|
|
|
if (data.noticeSetting.email && data.noticeSetting.email.length > 0) {
|
|
|
- this.EmailList = data.noticeSetting.email || []
|
|
|
+ this.EmailList = Array(data.noticeSetting.email.length).fill({ type: 0, member: false, teams: [], customStaffs: [] })
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.EmailList = data.noticeSetting.email
|
|
|
+ })
|
|
|
this.noticeList.Email = true
|
|
|
}
|
|
|
if (data.noticeSetting.dChat && data.noticeSetting.dChat.length > 0) {
|
|
|
- this.DChartList = data.noticeSetting.dChat || []
|
|
|
+ this.DChartList = Array(data.noticeSetting.dChat.length).fill({ type: 0, member: false, teams: [], customStaffs: [] })
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.DChartList = data.noticeSetting.dChat
|
|
|
+ })
|
|
|
this.noticeList.DChart = true
|
|
|
}
|
|
|
if (data.noticeSetting.dChatGroup && data.noticeSetting.dChatGroup.length > 0) {
|
|
@@ -390,11 +406,11 @@ export default {
|
|
|
},
|
|
|
init() {
|
|
|
if (this.type === 'require') {
|
|
|
- this.typeList = [{ label: '需求状态', value: 0 }, { label: '需求事件', value: 1 }]
|
|
|
+ this.typeList = [{ label: '需求状态', value: 1 }, { label: '需求事件', value: 2 }]
|
|
|
this.noticeGroupList = [{ label: '需求成员', value: 0 }, { label: '团队', value: 1 }, { label: '自定义人员', value: 2 }]
|
|
|
this.showRequireStatusEnum()
|
|
|
} else {
|
|
|
- this.typeList = [{ label: '任务状态', value: 0 }, { label: '任务事件', value: 1 }]
|
|
|
+ this.typeList = [{ label: '任务状态', value: 3 }, { label: '任务事件', value: 4 }]
|
|
|
this.noticeGroupList = [{ label: '任务成员', value: 0 }, { label: '团队', value: 1 }, { label: '自定义人员', value: 2 }]
|
|
|
this.showTaskStatusEnum()
|
|
|
}
|
|
@@ -424,7 +440,7 @@ export default {
|
|
|
this.formData.noticeConditionList.splice(index, 1)
|
|
|
},
|
|
|
addMembers(list) { // 添加成员
|
|
|
- list.push({ types: 0, member: false, teams: [], customStaffs: [] })
|
|
|
+ list.push({ type: 0, member: false, teams: [], customStaffs: [] })
|
|
|
},
|
|
|
removeMembers(list, index) { // 移除成员
|
|
|
list.splice(index, 1)
|
|
@@ -479,10 +495,10 @@ export default {
|
|
|
}
|
|
|
this.formData.noticeSetting = {
|
|
|
email: this.noticeList.Email ? this.EmailList : [],
|
|
|
- dchat: this.noticeList.DChart ? this.DChartList : [],
|
|
|
- dchatGroup: this.noticeList.Group ? this.GroupList : []
|
|
|
+ dChat: this.noticeList.DChart ? this.DChartList : [],
|
|
|
+ dChatGroup: this.noticeList.Group ? this.GroupList : []
|
|
|
}
|
|
|
- this.data ? this.updateBizNoticeSetting() : this.addBizNoticeSetting()
|
|
|
+ this.data && !this.copy ? this.updateBizNoticeSetting() : this.addBizNoticeSetting()
|
|
|
},
|
|
|
async addBizNoticeSetting() { // 新增通知
|
|
|
const res = await addBizNoticeSetting(this.formData)
|