Commit 17c40614 by 杨明

Merge branch 'v3.23.1' of http://192.168.3.233:8090/saas/scrm-micro-scene into v3.23.1

2 parents 264be84d e5ca3e02
......@@ -156,6 +156,7 @@ const getTaskList = params => {
method: 'post',
data: params,
noSessionId: true,
sign: false
})
}
//触达类型列表
......
......@@ -2,12 +2,12 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-04 13:37:31
* @LastEditTime: 2024-01-04 13:39:03
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @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" :conditionInfo="conditionInfo" @closeCondition="closeCondition"></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>
......@@ -246,6 +246,7 @@ import editCondition from './editCondition'
import SelectTag from './SelectTag'
import ModelDialog from './Model.vue'
import model from '@/mixins/model'
import { utils } from 'glsx-common'
export default {
mixins: [model],
components: {
......@@ -276,7 +277,7 @@ export default {
statVisible: false,
conditionVisible: false,
tplVisible: false,
taskType: 1
sopItem: {}
}
},
created() {},
......@@ -287,6 +288,7 @@ export default {
methods: {
//获取已选择标签
handleTagSelect(data) {
console.log(data)
let dataTag = [],
options
data.forEach(group => {
......@@ -294,7 +296,7 @@ export default {
labelList.forEach(label => {
dataTag.push({
groupId: group.labelGroup.id,
groupName: group.labelGroup.id,
groupName: group.labelGroup.name,
groupType: group.labelType,
labelId: label.id,
labelName: label.name
......@@ -308,13 +310,41 @@ export default {
}
this.updateParam(options)
},
recursionTreeTag(selectItem, dataTag) {
if (dataTag.length == 0) return
selectItem.push({
labelGroup: {
id: dataTag[0].groupId,
name: dataTag[0].groupName
},
labelType: dataTag[0].groupType,
labelList: []
})
for (let i = 0; i < dataTag.length; i++) {
let len = selectItem.length - 1,
item = dataTag[i]
if (selectItem[len].labelGroup.id == item.groupId) {
selectItem[len].labelList.push({
id: item.labelId,
name: item.labelName
})
dataTag.splice(i--, 1)
}
}
if (dataTag.length > 0) {
this.recursionTreeTag(selectItem, dataTag)
}
// return selectItem
},
//设置条件
setCriteria(item) {
let selectItem = []
let dataTag = utils.deepClone(item.dataTag)
this.recursionTreeTag(selectItem, dataTag)
this.sopItem = item
this.$refs.selectTagRef.init()
this.$refs.selectTagRef.init(selectItem)
},
updateContent(data) {
console.log(data)
let taskParam = data,
options = {
taskParam,
......@@ -323,10 +353,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,
......@@ -336,14 +365,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
}
})
// {
//
// }
},
/* 编辑内容
* 门店助手跟进提醒
......@@ -352,8 +379,8 @@ export default {
* 企微群发/企微朋友圈
*/
editContent(item) {
console.log(item)
this.sopItem = item
this.taskType = item.taskType
this.tplVisible = true
},
dialogClose(val) {
......
<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!