Commit 1ae1df09 by 王志慧

fixed

1 parent de7ce800
......@@ -146,6 +146,9 @@ const getTaskList = params => {
method: 'post',
data: params,
noSessionId: true,
sign: false
})
}
//触达类型列表
const SopTplNodeProtosList = params => {
return http_sop({
......
......@@ -7,7 +7,7 @@
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div :class="{ 'collapse-item': true, 'is-active': stepItem.isExpaned }">
<div :class="{ 'collapse-item': true, 'is-active': stepItem.isExpaned }" ref="collapseRef">
<div class="collapse-item-tab flex-column-center plr20" @click="handleExpand(item)">
<i class="el-icon-caret-bottom" v-show="stepItem.isExpaned"></i>
<i class="el-icon-caret-right" v-show="!stepItem.isExpaned"></i>
......@@ -161,7 +161,7 @@
<stat-dialog v-if="statVisible" :statVisible="statVisible"></stat-dialog>
<edit-condition v-if="conditionVisible" :conditionVisible="conditionVisible"></edit-condition>
<select-tag ref="selectTagRef" @tagSelected="handleTagSelect"></select-tag>
<model-dialog :tplVisible="tplVisible" :taskType="taskType" @dialogClose="dialogClose" @confirm="updateContent"></model-dialog>
<model-dialog :tplVisible="tplVisible" v-bind="sopItem" @dialogClose="dialogClose" @confirm="updateContent"></model-dialog>
</div>
</template>
<script>
......@@ -275,7 +275,7 @@ export default {
statVisible: false,
conditionVisible: false,
tplVisible: false,
taskType: 1
sopItem: {}
}
},
created() {},
......@@ -286,6 +286,7 @@ export default {
methods: {
//获取已选择标签
handleTagSelect(data) {
console.log(data)
let dataTag = [],
options
data.forEach(group => {
......@@ -307,8 +308,41 @@ export default {
}
this.updateParam(options)
},
recursionTreeTag(selectItem,dataTag){
console.log(selectItem,dataTag)
if(dataTag.length ==0) return;
selectItem.push({
labelGroup: {
id: dataTag[0].groupId,
name: dataTag[0].groupName
},
labelList:[]
})
dataTag.forEach((tag,index)=>{
let len =selectItem.length-1
if(selectItem[len].labelGroup.id==tag.groupId){
selectItem[len].labelType = tag.groupType
selectItem[len].labelList.push({
id:tag.labelId,
name:tag.labelName
})
dataTag.splice(index--,1)
}
})
if(dataTag.length>0){
this.recursionTreeTag(selectItem,dataTag)
}
console.log(selectItem,'selectItem1111111111')
// return selectItem
},
//设置条件
setCriteria(item) {
let selectItem=[];
// this.recursionTreeTag(selectItem,item.dataTag)
console.log(item,'item')
this.sopItem = item
this.$refs.selectTagRef.init()
},
......@@ -322,10 +356,9 @@ export default {
this.updateParam(options)
},
updateParam(options) {
console.log(this.sopItem)
let { day, stage, stageid, taskType, nodeId } = this.sopItem
let dataTag = options.dataTag || this.sopItem.dataTag,
taskParam = options.taskParam || {},
taskParam = options.taskParam || this.sopItem.taskParam,
data = {
day,
stage,
......@@ -335,14 +368,12 @@ export default {
taskParam,
dataTag
}
console.log(data)
this.$apis.journeyConfig.updateParam({ nodeId, data }).then(res => {
console.log(res)
if (res.code == 200) {
this.$parent.getDetail()
this.tplVisible = false
}
})
// {
//
// }
},
/* 编辑内容
* 门店助手跟进提醒
......@@ -351,14 +382,14 @@ export default {
* 企微群发/企微朋友圈
*/
editContent(item) {
console.log(item)
this.sopItem = item
this.taskType = item.taskType
this.tplVisible = true
},
dialogClose(val) {
this.tplVisible = val
},
showEdit() {
showEdit(value) {
this.conditionVisible = true
},
showStat() {
......@@ -373,7 +404,7 @@ export default {
}
},
spiltString(str) {
const title = JSON.parse(str.paramRemark).title
const title = 'JSON.parse(str.paramRemark).title'
return title
// return (str.split('-')[n] || '').replace('文字备注:', '')
},
......
<template>
<GLDialog :title="title" :visible.sync="visible" mode="big" :before-close="handleClose">
<GLDialog v-if="visible" :title="title" :visible.sync="visible" mode="big" :before-close="handleClose">
<el-form :model="tplForm" class="basic-form" :rules="tplRules" ref="tplForm" label-width="154px">
<template v-if="[7, 8, 9, 10].includes(taskType)">
<el-form-item label="跟进员工类型:">
......@@ -50,6 +50,10 @@ export default {
taskType: {
type: String,
default: '7'
},
taskParam: {
type: Object,
default: () => {}
}
},
data() {
......@@ -58,7 +62,8 @@ export default {
tplForm: {
followerTypeId: '',
staffUserIds: '',
attachments: []
attachments: [],
attContentList: []
},
tplRules: {
// userList: [{ validator: validatorUser, trigger: 'change' }],
......@@ -182,9 +187,19 @@ export default {
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)
this.changeEdit(newVal, 999999)
switch (this.taskType) {
case 7:
this.title = '企微提醒模版'
......@@ -202,9 +217,6 @@ export default {
}
}
},
mounted() {
this.merchantId = this.$globalState.session.merchantId
},
methods: {
renderParameter(options) {
let { marketingId, marketingType } = options
......@@ -323,21 +335,19 @@ export default {
staffUserIds.push(val.userId)
})
this.tplForm.staffUserIds = staffUserIds.join(',')
this.tplForm.followName = this.followList.filter(item=>item.id ==val )[0].followName
this.tplForm.followName = this.followList.filter(item => item.id == val)[0].followName
})
},
previewForm(val) {
const value = this.$common.utils.deepClone(val)
console.log(value, 111111111111)
if (value[0] && !value[0].attContent) value.splice(0, 1)
this.tplForm.attContentList=this.$common.utils.deepClone(value)
this.tplForm.attContentList = this.$common.utils.deepClone(value)
value.forEach(activity => {
if (activity.attType == 7) {
activity.attType = 4
activity.attContent = this.renderParameter(activity.attContent)
}
})
console.log(this.tplForm)
this.tplForm.attachments = value
},
handleClose() {
......
......@@ -6,16 +6,29 @@
</GLDialog>
</template>
<script>
const STAGE = Object.freeze({
1: '门店助手短信',
2: 'AI外呼',
3: '门店助手朋友圈',
4: '门店助手1v1',
5: '跟进提醒',
6: '客户信息查询',
7: '企微提醒',
8: '企微群发',
9: '企微朋友圈',
10: '发送短信'
})
export default {
props: {
statVisible: Boolean
},
data() {
return {
stage: STAGE,
loading:false,
tableSearchForm:{},
getListApi: this.$apis.journeyConfig.getTaskList,
pageConf: { pageSize: 'pageNumber', pageNum: 'pageNumber', totalCount: 'total' },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNumber', totalCount: 'total' },
tableParams: {
listName: 'list',
tableColumns: [
......@@ -25,7 +38,10 @@ export default {
},
{
label: '触达方式',
prop: 'taskType'
prop: 'taskType',
formatter: cellValue => {
return this.stage[cellValue.taskType] ? this.stage[cellValue.taskType] : '--'
}
},
{
label: '今日营销客户数',
......@@ -55,7 +71,6 @@ export default {
beforeSearchFn() {
return new Promise(resolve => {
this.loading = true
console.log(1111111111)
this.tableSearchForm = {
instId:this.query.instId
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!