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,8 +385,7 @@ export default { ...@@ -381,8 +385,7 @@ export default {
* 企微群发/企微朋友圈 * 企微群发/企微朋友圈
*/ */
editContent(item) { editContent(item) {
console.log(item) this.sopItem = item
this.sopItem = item
this.tplVisible = true this.tplVisible = true
}, },
dialogClose(val) { dialogClose(val) {
...@@ -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,122 +80,10 @@ export default { ...@@ -80,122 +80,10 @@ export default {
}, },
followList: [], followList: [],
btnList: [ btnList: [],
{ mapList: {
name: '表情', 客户人数: '${dataSize}'
funcName: '', }
type: 'expression',
limitSize: 10
},
{
name: '图片',
funcName: '',
togetherItem: [ATT_TYPE.TEXT],
type: 'img',
// togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
// limitSize: 10, //限制图片大小
// limitNum: 2, //限制图片数量
// limitWidth: 10000, //限制单张图片宽度
// limitHeight: 10000,//限制单张图片高度
// Isdraggable: true, //图片拖拽
uploadApi: this.$apis.common.pictureUpload
},
{
name: '活动',
type: 'activity',
funName: 'activity',
togetherItem: [ATT_TYPE.TEXT],
funParams: [
{
itemName: '权益卡试用',
itemValue: 3,
itemType: 'card',
getInterfaceApi: this.$apis.welcomeword.getCard,
params: {
tryAble: 1,
merchantId: this.$globalState.session.merchantId
}
},
{
itemName: '权益套餐',
itemValue: 4,
itemType: 'package',
getInterfaceApi: this.$apis.welcomeword.getPackage,
params: {
state: 1
}
},
{
itemName: '商城券',
itemValue: 2,
itemType: 'coupon',
getInterfaceApi: this.$apis.welcomeword.getMerchant,
params: {
discountTypes: [2, 3, 4],
directionalFlag: 1, // 1所有人可用2定向礼包专用3关联优惠券
validType: 'valid',
status: 2
}
},
{
itemName: '秒杀活动',
itemValue: 5,
itemType: 'activity',
getInterfaceApi: this.$apis.welcomeword.getActivity,
params: {
// activityStatus: 2,
activityStatusList: [1, 2],
currentPage: 1
}
},
{
itemName: '众筹活动',
itemValue: 8,
itemType: 'crowdfunding',
getInterfaceApi: this.$apis.welcomeword.crowdfundingActivity,
params: {
currentPage: 1,
activityStatus: 2
}
},
{
itemName: '问卷调查',
itemValue: 7,
itemType: 'questionnaire',
getInterfaceApi: this.$apis.welcomeword.activityQuestionnaireForm,
params: {
merchantId: this.$globalState.session.merchantId,
statuses: [0, 1]
}
}
]
},
{
name: '素材',
type: 'material',
funName: 'material',
togetherItem: [ATT_TYPE.TEXT],
fileType: true,
groupListApi: this.$apis.welcomeword.getGroupListApi,
materialListApi: this.$apis.welcomeword.getMaterialListApi
// pdfNo: 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
}
]
} }
}, },
watch: { watch: {
...@@ -214,7 +102,8 @@ export default { ...@@ -214,7 +102,8 @@ export default {
} }
}, },
taskType(newVal) { taskType(newVal) {
this.changeEdit(newVal, 999999) console.log(newVal)
this.changeEdit(newVal)
switch (this.taskType) { switch (this.taskType) {
case 7: case 7:
this.title = '企微提醒模版' this.title = '企微提醒模版'
...@@ -251,10 +140,11 @@ export default { ...@@ -251,10 +140,11 @@ export default {
return obj[type] return obj[type]
}, },
changeEdit(taskType) { changeEdit(taskType) {
console.log(taskType)
if (taskType == 7 || taskType == 5) { if (taskType == 7 || taskType == 5) {
this.btnList = [ this.btnList = [
{ {
type: 'dataSize', type: '客户人数',
name: '客户人数' name: '客户人数'
} }
] ]
...@@ -342,6 +232,123 @@ export default { ...@@ -342,6 +232,123 @@ export default {
// videoNo: 1 // videoNo: 1
} }
] ]
} else {
this.btnList = [
{
name: '表情',
funcName: '',
type: 'expression',
limitSize: 10
},
{
name: '图片',
funcName: '',
togetherItem: [ATT_TYPE.TEXT],
type: 'img',
// togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
// limitSize: 10, //限制图片大小
// limitNum: 2, //限制图片数量
// limitWidth: 10000, //限制单张图片宽度
// limitHeight: 10000,//限制单张图片高度
// Isdraggable: true, //图片拖拽
uploadApi: this.$apis.common.pictureUpload
},
{
name: '活动',
type: 'activity',
funName: 'activity',
togetherItem: [ATT_TYPE.TEXT],
funParams: [
{
itemName: '权益卡试用',
itemValue: 3,
itemType: 'card',
getInterfaceApi: this.$apis.welcomeword.getCard,
params: {
tryAble: 1,
merchantId: this.$globalState.session.merchantId
}
},
{
itemName: '权益套餐',
itemValue: 4,
itemType: 'package',
getInterfaceApi: this.$apis.welcomeword.getPackage,
params: {
state: 1
}
},
{
itemName: '商城券',
itemValue: 2,
itemType: 'coupon',
getInterfaceApi: this.$apis.welcomeword.getMerchant,
params: {
discountTypes: [2, 3, 4],
directionalFlag: 1, // 1所有人可用2定向礼包专用3关联优惠券
validType: 'valid',
status: 2
}
},
{
itemName: '秒杀活动',
itemValue: 5,
itemType: 'activity',
getInterfaceApi: this.$apis.welcomeword.getActivity,
params: {
// activityStatus: 2,
activityStatusList: [1, 2],
currentPage: 1
}
},
{
itemName: '众筹活动',
itemValue: 8,
itemType: 'crowdfunding',
getInterfaceApi: this.$apis.welcomeword.crowdfundingActivity,
params: {
currentPage: 1,
activityStatus: 2
}
},
{
itemName: '问卷调查',
itemValue: 7,
itemType: 'questionnaire',
getInterfaceApi: this.$apis.welcomeword.activityQuestionnaireForm,
params: {
merchantId: this.$globalState.session.merchantId,
statuses: [0, 1]
}
}
]
},
{
name: '素材',
type: 'material',
funName: 'material',
togetherItem: [ATT_TYPE.TEXT],
fileType: true,
groupListApi: this.$apis.welcomeword.getGroupListApi,
materialListApi: this.$apis.welcomeword.getMaterialListApi
// pdfNo: 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!