Commit 10b88bf8 by 前端

Merge branch 'xuyl_dev_v2.12.0' into 'v2.12.0'

查看任务修复

See merge request !31
2 parents 568320bc a7a21e9e
......@@ -8,7 +8,7 @@
<template v-if='item.platformMerchantMissionMaterialResponseList && item.platformMerchantMissionMaterialResponseList.length'>
<div v-for='(sub,idx,) in item.platformMerchantMissionMaterialResponseList' :key='idx'>
<template v-if="sub.materialType == '1'">
<p>{{sub.materialContent}}</p>
<p v-html='tramWord(sub.materialContent)'></p>
</template>
<template v-if="sub.materialType == '2'">
<img class='displayImg' :src='sub.materialContent'>
......@@ -42,7 +42,7 @@
<script>
import { taskManagementApi } from '@/api/taskManagement'
import emoji from '@/utils/emo'
export default {
name: 'TaskDetails',
props: {
......@@ -55,6 +55,20 @@ export default {
return {}
},
methods: {
tramWord(val) {
let htm = val.replace(/\[([\u4E00-\u9FA56]{1,4}|OK|NO|666)]/gi, function(res) {
let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
}
return `<img style='width:25px;height:25px' src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
})
return htm
},
async copy(id) {
await taskManagementApi.getStaffMissionLink({ missionId: id }).then(res => {
if (res.code == '0' && res.data) {
......@@ -115,8 +129,4 @@ export default {
width: 500px;
height: 300px;
}
.displayContent{
display: inline-block;
width: 800px;
}
</style>
......@@ -20,23 +20,31 @@ export default {
data(){
return{
basicInfoList:[
{infoName:'业务场景:',infoVal:'businessSceneName'},
{infoName:'商户:',infoVal:'merchantName'},
{infoName:'活动/产品:',infoVal:'activityName'},
{infoName:'任务指定人群:',infoVal:'crowdName'},
{infoName:'发放渠道:',infoVal:'channelName'},
{infoName:'备注:',infoVal:'remark'},
{infoName:'业务场景:',infoVal:'businessSceneName',id:'businessSceneName'},
{infoName:'商户:',infoVal:'merchantName',id:'merchantName'},
{infoName:'活动/产品:',infoVal:'activityName',id:'activityName'},
{infoName:'任务指定人群:',infoVal:'crowdName',id:'crowdName'},
{infoName:'发放渠道:',infoVal:'channelName',id:'channelName'},
{infoName:'备注:',infoVal:'remark',id:'remark'},
]
}
},
created() {
this.basicInfoList.map(item => {
Object.keys(this.basicInfo).forEach(key => {
if (item.infoVal == key) {
item.infoVal = this.basicInfo[key]
watch: {
basicInfo:{
handler(newVal,oldVal){
if (!oldVal || newVal !== oldVal) {
this.basicInfoList.map(item => {
Object.keys(newVal).forEach(key => {
if (item.id == key) {
item.infoVal = newVal[key]
}
})
})
}
})
})
},
immediate: true,
deep: true
}
}
}
</script>
......
......@@ -55,9 +55,18 @@ export default {
activeName: ''
}
},
created() {
this.activeName = this.taskPlanList && this.taskPlanList[0].activityTime
}
watch: {
taskPlanList:{
handler(newVal,oldVal){
if (!oldVal || newVal !== oldVal) {
this.activeName = newVal && newVal[0].activityTime
this.taskPlanList = newVal
}
},
immediate: true,
deep: true
}
},
}
</script>
......
......@@ -23,7 +23,9 @@ export default {
data(){
return{
hasbasicInfo:false,
hastaskPlanList:false
hastaskPlanList:false,
basicInfo:{},
taskPlanList:[]
}
},
methods: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!