Commit 2818c118 by 杨明

fixed

1 parent dfc74ffd
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-22 19:44:09
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-12-27 16:24:11
* @FilePath: \scrm-micro-peregrination\src\api\modules\journeyModel.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { http } from '@/main' import { http } from '@/main'
//活动列表 //活动列表
...@@ -9,6 +17,15 @@ const byGroupIdSop = params => { ...@@ -9,6 +17,15 @@ const byGroupIdSop = params => {
sign: false sign: false
}) })
} }
const sopTplsList = params => {
return http({
url: '/process/sop/api/sopTpls',
method: 'get',
data: params,
sign: false
})
}
//活动列表 //活动列表
const getInstIdDetail = params => { const getInstIdDetail = params => {
return http({ return http({
...@@ -18,4 +35,31 @@ const getInstIdDetail = params => { ...@@ -18,4 +35,31 @@ const getInstIdDetail = params => {
sign: false sign: false
}) })
} }
export default { byGroupIdSop, getInstIdDetail } //触达类型列表
const SopTplNodeProtosList = params => {
return http({
url: '/process/sop/api/SopTplNodeProtos/list',
method: 'get',
// data: params,
sign: false
})
}
//新增更新模板
const sopTplsSave = params => {
return http({
url: '/process/sop/api/sopTpls',
method: 'post',
data: params,
sign: false
})
}
//圈人方式全部列表
const sopDataTypesList = params => {
return http({
url: '/process/sop/api/sopDataTypes/list',
method: 'get',
sign: false
})
}
export default { byGroupIdSop, sopTplsList, getInstIdDetail, SopTplNodeProtosList, sopTplsSave, sopDataTypesList }
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-27 16:50:15
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-12-27 17:11:10
* @FilePath: \scrm-micro-peregrination\src\store\modules\model.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
export default {
namespaced: true,
state: {
model: '',
STEP: ''
},
mutations: {
// 设置模块阶段
SET_MODEL(state, data) {
state.model = data
},
SET_STEP(state, data) {
state.STEP = data
}
}
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08 * @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-12-22 22:14:09 * @LastEditTime: 2023-12-27 20:38:17
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue * @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
</el-form-item> </el-form-item>
<el-form-item label="圈化人群的方式:" :size="size"> <el-form-item label="圈化人群的方式:" :size="size">
<el-select v-model="addForm.region" placeholder="请选择"> <el-select v-model="addForm.region" placeholder="请选择">
<el-option label="膨胀金" value="shanghai"></el-option> <el-option :label="item.name" :value="item.code" :key="item.code" v-for="item in sopDataTypes"></el-option>
<el-option label="其他" value="beijing"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -31,24 +30,26 @@ ...@@ -31,24 +30,26 @@
<span>操作</span> <span>操作</span>
</div> </div>
<div class="journey-step-info" v-for="(val, k) in configList" :key="k"> <div class="journey-step-info" v-for="(val, k) in configList" :key="k">
<collapse-item :stepItem="val" :activityInfo="activityInfo"> <template v-if="val.label">
<el-button type="text" @click="handleAdd">新增</el-button> <collapse-item :stepItem="val" :activityInfo="activityInfo" @openDrawer="openDrawer" @openCondition="openCondition">
<el-button type="text">编辑</el-button> <el-button type="text" @click.stop="openCondition()">新增</el-button>
<el-button type="text" @click="handleDelete">删除</el-button> <el-button type="text" @click.stop="handleEditJ(k)">编辑</el-button>
<el-button type="text" @click.stop="handleDelete(k)">删除</el-button>
</collapse-item> </collapse-item>
</template>
<div class="journey-add-panel" v-if="addStatus && k == addNo"> <div class="journey-add-panel" v-if="addStatus && k == addNo">
<div class="flex-column-center "> <div class="flex-column-center ">
<el-input></el-input> <el-input v-model="modelInput.label"></el-input>
<div class="mark-item"> <div class="mark-item">
<label>手动标记:</label> <label>手动标记:</label>
<el-radio-group v-model="radio"> <el-radio-group v-model="modelInput.editable">
<el-radio :label="3">支持</el-radio> <el-radio :label="true">支持</el-radio>
<el-radio :label="6">不支持</el-radio> <el-radio :label="false">不支持</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
</div> </div>
<div class="mark-operate"> <div class="mark-operate">
<el-button type="text">保存</el-button> <el-button type="text" @click.stop="saveStep">保存</el-button>
<el-button type="text" @click.stop="addStatus = false">取消</el-button> <el-button type="text" @click.stop="addStatus = false">取消</el-button>
</div> </div>
</div> </div>
...@@ -59,24 +60,34 @@ ...@@ -59,24 +60,34 @@
新建旅程阶段 新建旅程阶段
</div> </div>
</div> </div>
<concatActivity :conditionVisible="conditionVisible" v-if="conditionVisible"></concatActivity> <div class="model-footer">
<el-button size="small" type="primary" @click.stop="cancelModel">取消</el-button>
<el-button size="small" type="primary" @click.stop="saveModel">确认</el-button>
</div>
<concatActivity :activityVisible="activityVisible" v-if="activityVisible" @closeActivity="closeActivity"></concatActivity>
<sop-item :drawerVisible="drawerVisible" @closeDrawer="closeDrawer"></sop-item>
</div> </div>
</template> </template>
<script> <script>
import CollapseItem from './components/CollapseItem' import CollapseItem from './components/CollapseItem'
import concatActivity from './components/concatActivity' import concatActivity from './components/concatActivity'
import sopItem from './components/sopItem'
export default { export default {
components: { components: {
CollapseItem, CollapseItem,
concatActivity concatActivity,
sopItem
}, },
data() { data() {
return { return {
conditionVisible: false, drawerVisible: false,
sopDataTypes: [],
activityVisible: false,
addStatus: false, addStatus: false,
journeyStatus: 1, journeyStatus: 1,
activityInfo: {}, activityInfo: {},
configList: [], configList: [],
modelInput: {},
addForm: { addForm: {
name: '' name: ''
}, },
...@@ -88,19 +99,83 @@ export default { ...@@ -88,19 +99,83 @@ export default {
mounted() { mounted() {
const query = this.$route.query const query = this.$route.query
this.query = query this.query = query
this.getDetail() this.addForm.name = query.title
if (this.query.instId) this.getDetail()
this.sopDataTypesList()
}, },
methods: { methods: {
handleAdd() { openDrawer() {
this.conditionVisible = true this.drawerVisible = true
},
closeDrawer(val) {
if (val) {
const time = new Date(val.time).toLocaleTimeString()
}
this.drawerVisible = false
},
closeActivity() {
this.activityVisible = false
},
openCondition() {
console.log(888)
this.activityVisible = true
},
saveModel() {
const stage = this.configList.map((item, k) => {
return {
['stage' + (k + 1)]: {
editable: item.editable,
conditions: [],
value: ''
}
}
})
const nodes = []
this.configList.forEach(i => {
i.sopList.forEach(days => {
days.forEach(k => {
nodes.push({
nodeParamDef: JSON.stringify({
stage: {
defaultValue: k.stage,
day: { defaultValue: k.day },
time: {
defaultValue: k.time
}
}
}),
nodeProtoId: k.taskType
})
})
})
})
const dataTypeCode = {
defaultValue: this.addForm.region,
stages: {
defaultValue: stage
}
}
let params = {
tplId: this.query.instId,
tplIame: this.addForm.name,
tplParamDef: JSON.stringify(dataTypeCode),
nodes
}
console.log(params)
this.$apis.journeyModel.sopTplsSave(params).then(res => {
console.log(res)
})
}, },
handleDelete() { handleDelete(k) {
this.$confirm('是否确定提交?', '提示', { this.$confirm('是否确定提交?', '提示', {
confirmButtonText: '是', confirmButtonText: '是',
cancelButtonText: '否', cancelButtonText: '否',
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
this.configList.splice(k, 1)
this.$message({ this.$message({
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
...@@ -108,13 +183,41 @@ export default { ...@@ -108,13 +183,41 @@ export default {
}) })
.catch(() => {}) .catch(() => {})
}, },
saveStep() {
const len = this.addNo,
{ label, editable } = this.modelInput
Object.assign(this.configList[len], { label, editable })
this.addStatus = false
},
handleEditJ(i) {
this.addNo = i
this.addStatus = true
this.modelInput = {
label: this.configList[i].label,
editable: this.configList[i].editable
}
},
addStep() { addStep() {
this.addStatus = true this.addStatus = true
this.configList.push({}) this.modelInput = {
label: '',
editable: false
}
this.configList.push({
label: '',
isExpaned: false,
conditionsList: [],
sopList: []
})
this.addNo = this.configList.length - 1 this.addNo = this.configList.length - 1
}, },
sopDataTypesList() {
this.$apis.journeyModel.sopDataTypesList({}).then(res => {
this.sopDataTypes = res
})
},
getDetail() { getDetail() {
this.$apis.journeyModel.getInstIdDetail({ instId: 'xblc185' }).then(res => { this.$apis.journeyModel.getInstIdDetail({ instId: 'xblc7' }).then(res => {
const instParam = JSON.parse(res.instParam) const instParam = JSON.parse(res.instParam)
const stages = instParam.stages const stages = instParam.stages
const instStatus = res.instStatus const instStatus = res.instStatus
...@@ -149,6 +252,7 @@ export default { ...@@ -149,6 +252,7 @@ export default {
configList.push({ configList.push({
label: stages[k].value, label: stages[k].value,
isExpaned: false, isExpaned: false,
editable: stages[k].value,
conditionsList: stages[k].conditions || [], conditionsList: stages[k].conditions || [],
sopList sopList
}) })
...@@ -262,4 +366,8 @@ export default { ...@@ -262,4 +366,8 @@ export default {
color: #5850ff; color: #5850ff;
} }
} }
.model-footer {
margin: 30px auto;
text-align: center;
}
</style> </style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08 * @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-12-25 14:35:14 * @LastEditTime: 2023-12-27 20:33:10
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue * @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -11,9 +11,7 @@ ...@@ -11,9 +11,7 @@
<div class="collapse-item-tab flex-column-center plr20" @click="handleExpand(item)"> <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-bottom" v-show="stepItem.isExpaned"></i>
<i class="el-icon-caret-right" v-show="!stepItem.isExpaned"></i> <i class="el-icon-caret-right" v-show="!stepItem.isExpaned"></i>
<div class="tab-label"> <div class="tab-label">{{ stepItem.label }}</div>
{{ stepItem.label }}
</div>
<div class="tab-operate"> <div class="tab-operate">
<slot></slot> <slot></slot>
</div> </div>
...@@ -35,7 +33,7 @@ ...@@ -35,7 +33,7 @@
<img src="@/assets/config/arrow.png" v-if="spiltString(v, 1)" /> <img src="@/assets/config/arrow.png" v-if="spiltString(v, 1)" />
<span>{{ spiltString(v, 1) }}</span> <span>{{ spiltString(v, 1) }}</span>
</div> </div>
<div class="progress-edit" @click="showEdit">编辑</div> <div class="progress-edit" @click.stop="showEdit">编辑</div>
</div> </div>
<div class="empty-panel" v-else> <div class="empty-panel" v-else>
<div class="empty-img"> <div class="empty-img">
...@@ -56,14 +54,14 @@ ...@@ -56,14 +54,14 @@
<div class="task-item-name">SOP任务</div> <div class="task-item-name">SOP任务</div>
<div class="task-item-desc">(系统面向当前旅程阶段客户的营销计划)</div> <div class="task-item-desc">(系统面向当前旅程阶段客户的营销计划)</div>
<div class="task-item-add"> <div class="task-item-add">
<el-button class="el-icon-plus" :size="size" type="primary" plain>增加新内容</el-button> <el-button class="el-icon-plus" :size="size" type="primary" plain @click.stop="addSop">增加新内容</el-button>
</div> </div>
</div> </div>
<div class="task-item-content bg-fff" v-if="stepItem.sopList.length"> <div class="task-item-content bg-fff" v-if="stepItem.sopList.length">
<div class="step-item" v-for="(v, k) in stepItem.sopList" :key="k"> <div class="step-item" v-for="(v, k) in stepItem.sopList" :key="k">
<div class="step-item-day"> <div class="step-item-day">
<img src="@/assets/config/step-border.png" /> <img src="@/assets/config/step-border.png" />
<span>第{{ v[0].day }}天</span> <span v-if="v.length">第{{ v[0].day }}天</span>
</div> </div>
<div class="step-item-content"> <div class="step-item-content">
<div v-for="(value, key) in v" :key="key" class="step-time-item flex-column-center"> <div v-for="(value, key) in v" :key="key" class="step-time-item flex-column-center">
...@@ -99,7 +97,7 @@ ...@@ -99,7 +97,7 @@
<div class="task-item-content bg-fff"> <div class="task-item-content bg-fff">
<div class="calendar-panel"> <div class="calendar-panel">
<div class="calendar-item" v-for="(v, k) in stepItem.sopList" :key="k"> <div class="calendar-item" v-for="(v, k) in stepItem.sopList" :key="k">
<div class="calendar-day">第{{ v[0].day }}天</div> <div class="calendar-day" v-if="v.length">第{{ v[0].day }}天</div>
<div class="calendar-time flex-column-center" v-for="(value, key) in v" :key="key"> <div class="calendar-time flex-column-center" v-for="(value, key) in v" :key="key">
<el-popover placement="top-start" width="100" trigger="click"> <el-popover placement="top-start" width="100" trigger="click">
<div class="popover-panel" v-for="(t, pkey) in v" :key="pkey"> <div class="popover-panel" v-for="(t, pkey) in v" :key="pkey">
...@@ -128,8 +126,6 @@ ...@@ -128,8 +126,6 @@
</div> </div>
</div> </div>
<stat-dialog v-if="statVisible" :statVisible="statVisible"></stat-dialog> <stat-dialog v-if="statVisible" :statVisible="statVisible"></stat-dialog>
<edit-condition v-if="conditionVisible" :conditionVisible="conditionVisible"></edit-condition>
<sop-item :drawerVisible="drawerVisible"></sop-item>
</div> </div>
</template> </template>
<script> <script>
...@@ -186,12 +182,12 @@ const STAGE_PREFIX = Object.freeze({ ...@@ -186,12 +182,12 @@ const STAGE_PREFIX = Object.freeze({
}, },
6: '查询内容:到保日期' 6: '查询内容:到保日期'
}) })
import sopItem from './sopItem'
// import editCondition from './editCondition'
// import editCondition from './editCondition'
import { mapMutations, mapState } from 'vuex'
export default { export default {
components: { components: {
sopItem // sopItem
// statDialog, // statDialog,
// editCondition // editCondition
}, },
...@@ -215,13 +211,48 @@ export default { ...@@ -215,13 +211,48 @@ export default {
empVisible: false, empVisible: false,
statVisible: false, statVisible: false,
conditionVisible: false, conditionVisible: false,
drawerVisible:true drawerVisible: false
} }
}, },
created() {}, created() {},
computed: {
...mapState('model', ['STEP', 'model'])
},
watch: {
STEP: {
handler(val) {
if (this.model == this.stepItem.label) {
this.addSopList(val)
}
},
deep: true
}
},
methods: { methods: {
...mapMutations('model', ['SET_MODEL']),
addSop() {
this.SET_MODEL(this.stepItem.label)
this.$emit('openDrawer')
},
addSopList(val) {
console.log(val, this.stepItem, '33333')
const i = this.stepItem.sopList.findIndex(i => {
console.log(i, 'i')
if (i && i[0]) return i[0].day == val.day
}),
model = {
day: val.day,
stage: this.model,
taskType: val.nodeProtoId
}
if (i > -1) {
this.stepItem.sopList[i].push(model)
} else {
this.stepItem.sopList.push([model])
}
},
showEdit() { showEdit() {
this.conditionVisible = true this.$emit('openCondition')
}, },
showStat() { showStat() {
this.statVisible = true this.statVisible = true
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-27 11:29:17 * @Date: 2023-09-27 11:29:17
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-12-25 14:02:33 * @LastEditTime: 2023-12-27 20:35:05
* @FilePath: \scrm-micro-scene\src\views\journeyConfig\components\relatedActivity.vue * @FilePath: \scrm-micro-scene\src\views\journeyConfig\components\relatedActivity.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
<template> <template>
<GLDialog title="关联营销活动" mode="big" class="gl-form-page gl-form-min" @onOk="handleSure" :before-close="handleClose" @onCancel="handleClose" :visible.sync="conditionVisible"> <GLDialog title="关联营销活动" mode="big" class="gl-form-page gl-form-min" @onOk="handleSure" :before-close="handleClose" @onCancel="handleClose" :visible.sync="activityVisible">
<div class="dialog-body"> <div class="dialog-body">
<div class="condition-item"> <div class="condition-item">
<label>客户旅程:</label> <label>客户旅程:</label>
...@@ -74,7 +74,7 @@ export default { ...@@ -74,7 +74,7 @@ export default {
condition condition
}, },
props: { props: {
conditionVisible: Boolean activityVisible: Boolean
}, },
data() { data() {
return { return {
...@@ -93,7 +93,6 @@ export default { ...@@ -93,7 +93,6 @@ export default {
} }
], ],
membersVisible: false, membersVisible: false,
typeVisible: false,
selectData: [], selectData: [],
conditionList: [{ id: 1 }, { id: 2 }], conditionList: [{ id: 1 }, { id: 2 }],
JourneyOptions: [ JourneyOptions: [
...@@ -144,7 +143,7 @@ export default { ...@@ -144,7 +143,7 @@ export default {
} }
}, },
handleCloseType() { handleCloseType() {
this.typeVisible = false this.$emit('')
}, },
handleAddEmp() { handleAddEmp() {
this.membersVisible = true this.membersVisible = true
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-25 14:31:26 * @Date: 2023-12-25 14:31:26
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-12-25 15:02:38 * @LastEditTime: 2023-12-27 17:00:33
* @FilePath: \scrm-micro-peregrination\src\views\journeyModel\components\sopItem.vue * @FilePath: \scrm-micro-peregrination\src\views\journeyModel\components\sopItem.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AEVid * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AEVid
--> -->
...@@ -12,19 +12,19 @@ ...@@ -12,19 +12,19 @@
<div class="sop-item flex-column-center"> <div class="sop-item flex-column-center">
<label>*</label> <label>*</label>
<span>请设置营销时间:</span> <span>请设置营销时间:</span>
<el-input-number v-model="num" @change="handleChange" :min="1" :max="1000" :size="size"></el-input-number> <el-input-number v-model="day" :min="1" :max="1000" :size="size"></el-input-number>
<span>天后,当日</span> <span>天后,当日</span>
<el-time-picker v-model="value1" :size="size"></el-time-picker> <el-time-picker v-model="time" :size="size"></el-time-picker>
<span>发送</span> <span>发送</span>
</div> </div>
<div class="sop-item flex"> <div class="sop-item flex">
<label>*</label> <label>*</label>
<span>请选择触达方式:</span> <span>请选择触达方式:</span>
<div class="select-panel"> <div class="select-panel">
<div class="select-item" v-for="(item, index) in list" :key="index"> <div class="select-item" v-for="item in list" :key="item.id">
<div class="select-value"> <div class="select-value">
<el-radio v-model="radio" :value="index"></el-radio> <el-radio v-model="nodeKey" :label="item.id"></el-radio>
<span>{{ item.label }}</span> <span>{{ item.nodeName }}</span>
</div> </div>
<div class="select-desc"> <div class="select-desc">
{{ item.desc }} {{ item.desc }}
...@@ -34,29 +34,46 @@ ...@@ -34,29 +34,46 @@
</div> </div>
</div> </div>
<div class="demo-drawer__footer"> <div class="demo-drawer__footer">
<el-button @click="cancelForm" :size="size">取消</el-button> <el-button @click="handleClose" :size="size">取消</el-button>
<el-button type="primary" @click="saveForm" :size="size">保存</el-button> <el-button type="primary" @click="saveForm" :size="size">保存</el-button>
</div> </div>
</el-drawer> </el-drawer>
</template> </template>
<script> <script>
import { mapMutations } from 'vuex'
export default { export default {
props: { props: {
drawerVisible: Boolean drawerVisible: Boolean
}, },
data() { data() {
return { return {
radio: '1', nodeKey: '',
list: [ day: 0,
{ time: '',
label: '门店助手', list: []
desc: '本功能将给跟进员工推送1v1任务,由员工向每个客户微信转发对应的营销内容。' }
},
mounted() {
this.SopTplNodeProtosList()
}, },
{ methods: {
label: '门店助手', ...mapMutations('model', ['SET_STEP']),
desc: '本功能将给跟进员工推送1v1任务,由员工向每个客户微信转发对应的营销内容。' saveForm() {
const model = {
time: this.time,
day: this.day,
nodeProtoId: this.nodeKey
} }
] this.$emit('closeDrawer', model)
this.SET_STEP(model)
},
handleClose() {
this.$emit('closeDrawer')
},
SopTplNodeProtosList() {
this.$apis.journeyModel.SopTplNodeProtosList({}).then(res => {
this.list = res
})
} }
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08 * @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-12-22 20:18:32 * @LastEditTime: 2023-12-27 19:57:15
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue * @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
<div class="journey-item" v-for="item in journeyList" :key="item.id"> <div class="journey-item" v-for="item in journeyList" :key="item.id">
<div class="journey-item-head flex-column-center "> <div class="journey-item-head flex-column-center ">
<img src="@/assets/config/icon-1.png" /> <img src="@/assets/config/icon-1.png" />
<span>{{ item.instName }}</span> <span>{{ item.tplName }}</span>
<a @click="handleEdit(item)">编辑</a> <a @click="handleEdit(item)">编辑</a>
<div :class="{ 'journey-item-status flex-center': true, 'is-disable': item.instStatus == -1 || item.instStatus == 0 }"> <div :class="{ 'journey-item-status flex-center': true, 'is-disable': item.tplStatus == -1 || item.tplStatus == 0 }">
<i :class="`${getStatusValue(item, 'icon')}`"></i> <i :class="`${getStatusValue(item, 'icon')}`"></i>
<span>{{ getStatusValue(item, 'label') }}</span> <span>{{ getStatusValue(item, 'label') }}</span>
</div> </div>
...@@ -59,21 +59,21 @@ export default { ...@@ -59,21 +59,21 @@ export default {
data() { data() {
return { return {
searchForm: { searchForm: {
instStatus: [1, 0] tplStatus: [1, 0]
}, },
journeyAllList: [], journeyAllList: [],
searchFormData: [ searchFormData: [
{ {
label: '旅程', label: '旅程',
name: 'instId', name: 'tplId',
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'instId', optionId: 'tplId',
optionLabel: 'instName' optionLabel: 'tplName'
}, },
{ {
label: '状态', label: '状态',
name: 'instStatus', name: 'tplStatus',
type: 'select', type: 'select',
optionList: STATUS, optionList: STATUS,
optionId: 'value', optionId: 'value',
...@@ -133,12 +133,14 @@ export default { ...@@ -133,12 +133,14 @@ export default {
this.$router.push('/journeyModel/add') this.$router.push('/journeyModel/add')
}, },
async byGroupIdSop() { async byGroupIdSop() {
const res = await this.$apis.journeyModel.byGroupIdSop({ groupId: this.$globalState.session.merchantId, pageNumber: 1 }) const res = await this.$apis.journeyModel.sopTplsList({ pageNumber: 1 })
this.journeyAllList = res.list || [] this.journeyAllList = res.list || []
this.journeyAllList.forEach(item => { this.journeyAllList.forEach(item => {
const stages = JSON.parse(item.instParam).stages const tplParamDef = JSON.parse(item.tplParamDef)
const stages = tplParamDef.stages.defaultValue
item.journeyItem = [] item.journeyItem = []
let process = 0 let process = 0
console.log(stages, 'stages')
for (let k in stages) { for (let k in stages) {
process++ process++
item.journeyItem.push({ item.journeyItem.push({
...@@ -152,27 +154,30 @@ export default { ...@@ -152,27 +154,30 @@ export default {
}, },
//状态值映射 //状态值映射
getStatusValue(val, prop) { getStatusValue(val, prop) {
console.log(val, 'fff')
if (!val || !prop) return if (!val || !prop) return
return STATUS.find(item => item.value == val.instStatus)[prop] return STATUS.find(item => item.value == val.tplStatus)[prop]
}, },
handleEdit(item) { handleEdit(item) {
this.$router.push({ this.$router.push({
path: '/journeyConfig/config', path: '/journeyModel/add',
query: { query: {
title: item.instName, title: item.tplName,
instId: item.instId instId: item.tplId
} }
}) })
}, },
async handleSearch() { async handleSearch() {
const { instStatus, instId } = this.searchForm const { tplStatus, tplId } = this.searchForm
this.journeyList = this.journeyAllList this.journeyList = this.journeyAllList
if (instId) { console.log(this.journeyAllList, 'this.journeyAllList')
this.journeyList = this.journeyList.filter(item => item.instId == instId) if (tplId) {
this.journeyList = this.journeyList.filter(item => item.tplId == tplId)
} }
if (instStatus && instStatus.length) { if (tplStatus && tplStatus.length) {
this.journeyList = this.journeyList.filter(item => instStatus.includes(item.instStatus)) this.journeyList = this.journeyList.filter(item => tplStatus.includes(item.tplStatus))
} }
console.log(this.journeyList, 5555)
}, },
handleReset() { handleReset() {
this.searchForm = {} this.searchForm = {}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!