Skip to content

Commit

Permalink
feat: 周期任务通知方式数据显示不对问题修复 --bug=120383214 (#7615)
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 24257
  • Loading branch information
ywywZhou authored Nov 20, 2024
1 parent 0026b40 commit 29cce60
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@
:project_id="project_id"
:is-view-mode="true"
:notify-type-list="[{ text: $t('任务状态') }]"
:notify-type-extra-info="notifyTypeExtraInfo"
:receiver-group="receiverGroup">
</NotifyTypeConfig>
<NoData v-else></NoData>
Expand Down Expand Up @@ -296,6 +297,7 @@
selectedNodes: [],
notifyType: [[]],
receiverGroup: [],
notifyTypeExtraInfo: {},
saveLoading: false,
periodicRule: {
required: true,
Expand Down Expand Up @@ -506,8 +508,9 @@
// 获取流程模板的通知配置
const { notify_receivers, notify_type } = templateData
this.notifyType = [notify_type.success.slice(0), notify_type.fail.slice(0)]
const receiverGroup = JSON.parse(notify_receivers).receiver_group
const { receiver_group: receiverGroup, extra_info: extraInfo = {} } = JSON.parse(notify_receivers)
this.receiverGroup = receiverGroup && receiverGroup.slice(0)
this.notifyTypeExtraInfo = extraInfo
const pipelineDate = JSON.parse(templateData.pipeline_tree)
this.selectedNodes = Object.keys(pipelineDate.activities)
this.templateData = Object.assign({}, templateData, { pipeline_tree: pipelineDate })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,12 @@
project_id: [String, Number]
},
data () {
const formData = {
notifyType: tools.deepClone(this.notifyType),
notifyTypeExtraInfo: tools.deepClone(this.notifyTypeExtraInfo),
receiverGroup: tools.deepClone(this.receiverGroup)
}
return {
formData,
formData: {
notifyType: [[]],
receiverGroup: [],
notifyTypeExtraInfo: {}
},
notifyTypeLoading: false,
allNotifyTypeList: [],
notifyGroupLoading: false,
Expand All @@ -153,6 +152,26 @@
return list
}
},
watch: {
notifyType: {
handler (val) {
this.formData.notifyType = tools.deepClone(val)
},
immediate: true
},
receiverGroup: {
handler (val) {
this.formData.receiverGroup = tools.deepClone(val)
},
immediate: true
},
notifyTypeExtraInfo: {
handler (val) {
this.formData.notifyTypeExtraInfo = tools.deepClone(val)
},
immediate: true
}
},
created () {
this.getNotifyTypeList()
if (!this.common) {
Expand Down

0 comments on commit 29cce60

Please sign in to comment.