Commit 4bf33f6e by xuyl

查看任务修复

1 parent 6dbca4aa
...@@ -20,23 +20,31 @@ export default { ...@@ -20,23 +20,31 @@ export default {
data(){ data(){
return{ return{
basicInfoList:[ basicInfoList:[
{infoName:'业务场景:',infoVal:'businessSceneName'}, {infoName:'业务场景:',infoVal:'businessSceneName',id:'businessSceneName'},
{infoName:'商户:',infoVal:'merchantName'}, {infoName:'商户:',infoVal:'merchantName',id:'merchantName'},
{infoName:'活动/产品:',infoVal:'activityName'}, {infoName:'活动/产品:',infoVal:'activityName',id:'activityName'},
{infoName:'任务指定人群:',infoVal:'crowdName'}, {infoName:'任务指定人群:',infoVal:'crowdName',id:'crowdName'},
{infoName:'发放渠道:',infoVal:'channelName'}, {infoName:'发放渠道:',infoVal:'channelName',id:'channelName'},
{infoName:'备注:',infoVal:'remark'}, {infoName:'备注:',infoVal:'remark',id:'remark'},
] ]
} }
}, },
created() { watch: {
this.basicInfoList.map(item => { basicInfo:{
Object.keys(this.basicInfo).forEach(key => { handler(newVal,oldVal){
if (item.infoVal == key) { if (!oldVal || newVal !== oldVal) {
item.infoVal = this.basicInfo[key] this.basicInfoList.map(item => {
Object.keys(newVal).forEach(key => {
if (item.id == key) {
item.infoVal = newVal[key]
}
})
})
} }
}) },
}) immediate: true,
deep: true
}
} }
} }
</script> </script>
......
...@@ -55,9 +55,18 @@ export default { ...@@ -55,9 +55,18 @@ export default {
activeName: '' activeName: ''
} }
}, },
created() { watch: {
this.activeName = this.taskPlanList && this.taskPlanList[0].activityTime taskPlanList:{
} handler(newVal,oldVal){
if (!oldVal || newVal !== oldVal) {
this.activeName = newVal && newVal[0].activityTime
this.taskPlanList = newVal
}
},
immediate: true,
deep: true
}
},
} }
</script> </script>
......
...@@ -23,7 +23,9 @@ export default { ...@@ -23,7 +23,9 @@ export default {
data(){ data(){
return{ return{
hasbasicInfo:false, hasbasicInfo:false,
hastaskPlanList:false hastaskPlanList:false,
basicInfo:{},
taskPlanList:[]
} }
}, },
methods: { methods: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!