Commit eee69293 by 王志慧

fixed

1 parent e54faf39
...@@ -68,13 +68,13 @@ ...@@ -68,13 +68,13 @@
<div class="task-type flex"> <div class="task-type flex">
受众客户:全旅程阶段客户 受众客户:全旅程阶段客户
<div> <div>
<div v-if="value.dataTag&&value.dataTag.length>0" class="flex"> <div v-if="value.dataTag && value.dataTag.length > 0" class="flex">
、标签客户 、标签客户
<div class="tag" v-for="tag in value.dataTag" :key="tag.labelId">{{ tag.labelName }}</div> <div class="tag" v-for="tag in value.dataTag" :key="tag.labelId">{{ tag.labelName }}</div>
</div> </div>
</div> </div>
</div> </div>
<div class="task-type-edit" @click="setCriteria(value)" v-show="[ 7, 8, 9].includes(value.taskType)"> <div class="task-type-edit" @click="setCriteria(value)" v-show="[7, 8, 9].includes(value.taskType)">
<img src="@/assets/config/icon-edit.png" /> <img src="@/assets/config/icon-edit.png" />
<a>设置条件</a> <a>设置条件</a>
</div> </div>
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
</div> </div>
<!-- --> <!-- -->
<div class="step-item-name flex-column-center"> <div class="step-item-name flex-column-center">
<div v-if="value.taskType == 9||value.taskType ==10" class="task-type"> <div v-if="[7, 8, 9,10].includes(value.taskType)" class="task-type">
{{ stage_prefix[value.taskType].label }} {{ stage_prefix[value.taskType].label }}
<span v-for="(tpl, index) in value.taskParam && value.taskParam.attContentList" :key="index"> <span v-for="(tpl, index) in value.taskParam && value.taskParam.attContentList" :key="index">
<template v-if="tpl.attType == 1">{{ tpl.attContent }}</template> <template v-if="tpl.attType == 1">{{ tpl.attContent }}</template>
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<a>编辑内容</a> <a>编辑内容</a>
</div> </div>
</div> </div>
<div class="task-tpl-wrap flex" v-if="value.taskType == 9||value.taskType==10"> <div class="task-tpl-wrap flex" v-if="[8, 9,10].includes(value.taskType)">
<div v-for="(tpl, index) in value.taskParam && value.taskParam.attContentList" :key="index"> <div v-for="(tpl, index) in value.taskParam && value.taskParam.attContentList" :key="index">
<img class="tpl-img" :src="tpl.attContent" v-if="tpl.attType == 2" /> <img class="tpl-img" :src="tpl.attContent" v-if="tpl.attType == 2" />
<div v-if="tpl.attType == 7" class="mini-program flex"> <div v-if="tpl.attType == 7" class="mini-program flex">
...@@ -247,7 +247,7 @@ const STAGE_PREFIX = Object.freeze({ ...@@ -247,7 +247,7 @@ const STAGE_PREFIX = Object.freeze({
}) })
import statDialog from './statDialog' import statDialog from './statDialog'
import editCondition from './editCondition' import editCondition from './editCondition'
import SelectTag from './selectTag' import SelectTag from './SelectTag'
import ModelDialog from './Model.vue' import ModelDialog from './Model.vue'
import model from '@/mixins/model' import model from '@/mixins/model'
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
...@@ -354,6 +354,7 @@ export default { ...@@ -354,6 +354,7 @@ export default {
this.updateParam(options) this.updateParam(options)
}, },
updateParam(options) { updateParam(options) {
console.log(options)
let { day, stage, stageid, taskType, nodeId } = this.sopItem let { day, stage, stageid, taskType, nodeId } = this.sopItem
let dataTag = options.dataTag || this.sopItem.dataTag, let dataTag = options.dataTag || this.sopItem.dataTag,
taskParam = options.taskParam || this.sopItem.taskParam, taskParam = options.taskParam || this.sopItem.taskParam,
...@@ -363,11 +364,14 @@ export default { ...@@ -363,11 +364,14 @@ export default {
stageid, stageid,
time: this.stage_time[this.sopItem.taskType], time: this.stage_time[this.sopItem.taskType],
taskType, taskType,
taskParam, dataTag,
dataTag taskParam
}
if (taskType == 7) {
data.taskParam.content = taskParam.attachments[0].attContent;
delete data.taskParam.attachments
} }
this.$apis.journeyConfig.updateParam({ nodeId, data }).then(res => { this.$apis.journeyConfig.updateParam({ nodeId, data }).then(res => {
console.log(res)
if (res == 'success') { if (res == 'success') {
this.$parent.getDetail() this.$parent.getDetail()
this.tplVisible = false this.tplVisible = false
...@@ -381,7 +385,6 @@ export default { ...@@ -381,7 +385,6 @@ export default {
* 企微群发/企微朋友圈 * 企微群发/企微朋友圈
*/ */
editContent(item) { editContent(item) {
console.log(item)
this.sopItem = item this.sopItem = item
this.tplVisible = true this.tplVisible = true
}, },
...@@ -396,7 +399,7 @@ export default { ...@@ -396,7 +399,7 @@ export default {
label, label,
editable, editable,
conditionsList: conditionsList, conditionsList: conditionsList,
index:k index: k
} }
this.conditionVisible = true this.conditionVisible = true
}, },
...@@ -418,9 +421,9 @@ export default { ...@@ -418,9 +421,9 @@ export default {
let title = '' let title = ''
try { try {
title = JSON.parse(str.paramRemark).title title = JSON.parse(str.paramRemark).title
} catch(e) { } catch (e) {
console.log(e) console.log(e)
}; }
return title return title
// return (str.split('-')[n] || '').replace('文字备注:', '') // return (str.split('-')[n] || '').replace('文字备注:', '')
}, },
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
</el-form-item> </el-form-item>
</template> </template>
<el-form-item :label="labelName+':'"> <el-form-item :label="labelName + ':'">
<GLEditor ref="welcome" :form="'customer'" style="line-height: 12px; width: 580px" boxHeight="200" :btnList="btnList" @previewWord="previewForm"></GLEditor> <GLEditor ref="welcome" :form="'customer'" :mapList="mapList" style="line-height: 12px; width: 580px" boxHeight="200" :btnList="btnList" @previewWord="previewForm"></GLEditor>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="explain" v-show="taskType == 8 || taskType == 9"> <div class="explain" v-show="taskType == 8 || taskType == 9">
...@@ -80,26 +80,76 @@ export default { ...@@ -80,26 +80,76 @@ export default {
}, },
followList: [], followList: [],
btnList: [ btnList: [],
{ mapList: {
name: '表情', 客户人数: '${dataSize}'
funcName: '', }
type: 'expression', }
limitSize: 10
}, },
{ watch: {
name: '图片', tplVisible(newVal) {
funcName: '', this.visible = newVal
togetherItem: [ATT_TYPE.TEXT], this.getFollowListType()
type: 'img', if (this.taskParam) {
// togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片 this.tplForm = {
// limitSize: 10, //限制图片大小 ...this.taskParam
// limitNum: 2, //限制图片数量 }
// limitWidth: 10000, //限制单张图片宽度 if (this.tplForm.attContentList.length) {
// limitHeight: 10000,//限制单张图片高度 this.$nextTick(() => {
// Isdraggable: true, //图片拖拽 this.$refs.welcome && this.$refs.welcome.updateList(this.tplForm.attContentList)
uploadApi: this.$apis.common.pictureUpload })
}
}
},
taskType(newVal) {
console.log(newVal)
this.changeEdit(newVal)
switch (this.taskType) {
case 7:
this.title = '企微提醒模版'
this.labelName = '提醒内容'
break
case 5:
this.title = '门店助手提醒模版'
this.labelName = '提醒内容'
break
case 8:
case 9:
this.title = '营销模板'
this.labelName = '营销内容'
break
case 10:
this.title = '短信模版'
this.labelName = '短信内容'
break
}
}
}, },
methods: {
renderParameter(options) {
let { id, type } = options
let obj = {
3: `{"appId":"wxe10067a63c1856ac","title":"送您一张专属权益服务卡","page":"packageShopmall/packageEquity/pages/freecard/freecard?id=${id}&merchantId={1}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-qy-10004.png"}`,
4: `{"appId":"wxe10067a63c1856ac","title":"专属权益服务套餐","page":"packageShopmall/packageEquity/pages/package/package?id=${id}&merchantId={1}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-qy-10004.png"}`,
2: `{"appId":"wxe10067a63c1856ac","title":"送您一张商城优惠券","page":"packageShopmall/packageMall/pages/coupon/coupon?couponId=${id}&merchantId=&{1}&issueDate={3}&nodeId={2}&sopId={3},"pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-yh-10004.png"}`,
5: `{"appId":"wxe10067a63c1856ac","title":"您有一个秒杀活动可参加","page":"packageShopmall/packageMall/pages/detail/detail?isActivity=true&id=${id}&merchantId={1}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-ms-10004.png"}`,
8: `{"appId":"wxe10067a63c1856ac","title":"您有一个众筹活动可参加","page":"pages/crowdfunding/index/index?isActivity=true&id=${id}&merchantId={1}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-ms-10004.png"}`,
7: `{"appId":"wxe10067a63c1856ac","title":"您有一个新资讯,请及时查看","page":"packageMine/pages/questionnaire/questionnaire?id=${id}&merchantId={1}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-ms-10004.png"}`,
6: `{"appId":"wxe10067a63c1856ac","title":"您有一个新资讯,请及时查看","page":"pages/psdView/psdView?id=${id}&merchantId={1}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-ms-10004.png"}`
}
return obj[type]
},
changeEdit(taskType) {
console.log(taskType)
if (taskType == 7 || taskType == 5) {
this.btnList = [
{
type: '客户人数',
name: '客户人数'
}
]
} else if (taskType == 10) {
this.btnList = [
{ {
name: '活动', name: '活动',
type: 'activity', type: 'activity',
...@@ -180,86 +230,29 @@ export default { ...@@ -180,86 +230,29 @@ export default {
materialListApi: this.$apis.welcomeword.getMaterialListApi materialListApi: this.$apis.welcomeword.getMaterialListApi
// pdfNo: 1 // pdfNo: 1
// videoNo: 1 // videoNo: 1
}
]
} else {
this.btnList = [
{
name: '表情',
funcName: '',
type: 'expression',
limitSize: 10
}, },
{ {
name: '视频', name: '图片',
funcName: '', funcName: '',
type: 'video',
togetherItem: [ATT_TYPE.TEXT], togetherItem: [ATT_TYPE.TEXT],
// limitSize: 10, //限制视频大小 type: 'img',
// togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片 // togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
limitNum: 1, //限制视频数量 // limitSize: 10, //限制图片大小
// limitWidth: 1280, //限制视频宽度 // limitNum: 2, //限制图片数量
// limitHeight: 720, //限制视频高度 // limitWidth: 10000, //限制单张图片宽度
limitTime: 30, //限制视频时长 // limitHeight: 10000,//限制单张图片高度
paramsType: 'form-data', // Isdraggable: true, //图片拖拽
uploadApi: this.$apis.common.compressVideo uploadApi: this.$apis.common.pictureUpload
}
]
}
},
watch: {
tplVisible(newVal) {
this.visible = newVal
this.getFollowListType()
if (this.taskParam) {
this.tplForm = {
...this.taskParam
}
if (this.tplForm.attContentList.length) {
this.$nextTick(() => {
this.$refs.welcome && this.$refs.welcome.updateList(this.tplForm.attContentList)
})
}
}
},
taskType(newVal) {
this.changeEdit(newVal, 999999)
switch (this.taskType) {
case 7:
this.title = '企微提醒模版'
this.labelName = '提醒内容'
break
case 5:
this.title = '门店助手提醒模版'
this.labelName = '提醒内容'
break
case 8:
case 9:
this.title = '营销模板'
this.labelName = '营销内容'
break
case 10:
this.title = '短信模版'
this.labelName = '短信内容'
break
}
}
},
methods: {
renderParameter(options) {
let { id, type } = options
let obj = {
3: `{"appId":"wxe10067a63c1856ac","title":"送您一张专属权益服务卡","page":"packageShopmall/packageEquity/pages/freecard/freecard?id=${id}&merchantId={1}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-qy-10004.png"}`,
4: `{"appId":"wxe10067a63c1856ac","title":"专属权益服务套餐","page":"packageShopmall/packageEquity/pages/package/package?id=${id}&merchantId={1}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-qy-10004.png"}`,
2: `{"appId":"wxe10067a63c1856ac","title":"送您一张商城优惠券","page":"packageShopmall/packageMall/pages/coupon/coupon?couponId=${id}&merchantId=&{1}&issueDate={3}&nodeId={2}&sopId={3},"pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-yh-10004.png"}`,
5: `{"appId":"wxe10067a63c1856ac","title":"您有一个秒杀活动可参加","page":"packageShopmall/packageMall/pages/detail/detail?isActivity=true&id=${id}&merchantId={1}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-ms-10004.png"}`,
8: `{"appId":"wxe10067a63c1856ac","title":"您有一个众筹活动可参加","page":"pages/crowdfunding/index/index?isActivity=true&id=${id}&merchantId={1}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-ms-10004.png"}`,
7: `{"appId":"wxe10067a63c1856ac","title":"您有一个新资讯,请及时查看","page":"packageMine/pages/questionnaire/questionnaire?id=${id}&merchantId={1}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-ms-10004.png"}`,
6: `{"appId":"wxe10067a63c1856ac","title":"您有一个新资讯,请及时查看","page":"pages/psdView/psdView?id=${id}&merchantId={1}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-ms-10004.png"}`
}
return obj[type]
}, },
changeEdit(taskType) {
if (taskType == 7 || taskType == 5) {
this.btnList = [
{
type: 'dataSize',
name: '客户人数'
}
]
} else if (taskType == 10) {
this.btnList = [
{ {
name: '活动', name: '活动',
type: 'activity', type: 'activity',
...@@ -340,6 +333,20 @@ export default { ...@@ -340,6 +333,20 @@ export default {
materialListApi: this.$apis.welcomeword.getMaterialListApi materialListApi: this.$apis.welcomeword.getMaterialListApi
// pdfNo: 1 // pdfNo: 1
// videoNo: 1 // videoNo: 1
},
{
name: '视频',
funcName: '',
type: 'video',
togetherItem: [ATT_TYPE.TEXT],
// limitSize: 10, //限制视频大小
// togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
limitNum: 1, //限制视频数量
// limitWidth: 1280, //限制视频宽度
// limitHeight: 720, //限制视频高度
limitTime: 30, //限制视频时长
paramsType: 'form-data',
uploadApi: this.$apis.common.compressVideo
} }
] ]
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!