Commit dfc74ffd by 杨明

fixed

1 parent ee1a9614
......@@ -1874,51 +1874,6 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true
},
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"ssri": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
......@@ -1927,28 +1882,6 @@
"requires": {
"minipass": "^3.1.1"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
}
}
},
......@@ -13268,6 +13201,75 @@
}
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-style-loader": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz",
......
import { http } from '@/main'
//活动列表
const byGroupIdSop = params => {
return http({
url: 'process/sop/api/sopInsts/byGroupId',
method: 'get',
data: params,
sign: false
})
}
//活动列表
const getInstIdDetail = params => {
return http({
url: 'process/sop/api/sopInsts/' + params.instId,
method: 'get',
// data: params,
sign: false
})
}
export default { byGroupIdSop, getInstIdDetail }
......@@ -5,7 +5,7 @@ html {
margin: 0;
padding: 0;
overflow: hidden;
background-color: #F4F5FA;
background-color: #f4f5fa;
}
.live-room .container {
......@@ -30,7 +30,12 @@ html {
border-radius: 4px;
vertical-align: middle;
}
.p20 {
padding: 20px;
}
.plr20 {
padding: 0px 20px;
}
.live-room .back-orange {
background-color: #fdb757;
}
......@@ -53,9 +58,20 @@ html {
.live-room .m-r-8 {
margin-right: 8px;
}
.m-r-10 {
margin-right: 10px;
}
.m-t-10 {
margin-bottom: 10px;
}
.flex {
display: flex;
}
.flex-center {
display: flex;
align-items: center;
justify-content: center;
}
.bg-fff {
background: #ffffff;
}
......
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-12-22 22:14:09
* @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="journey-main">
<div class="bg-fff pb20 journey-config gl-form-page">
<el-form ref="form" :model="addForm" label-width="150px" rules="rules">
<el-form-item label="旅程名称:" :size="size" prop="name">
<el-input v-model="addForm.name"></el-input>
</el-form-item>
<el-form-item label="圈化人群的方式:" :size="size">
<el-select v-model="addForm.region" placeholder="请选择">
<el-option label="膨胀金" value="shanghai"></el-option>
<el-option label="其他" value="beijing"></el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<div class="journey-step bg-fff pb20">
<div class="journey-step-title border-title">
客户旅程阶段配置
</div>
<div class="journey-step-body">
<div class="journey-step-title">
<span>旅程名称</span>
<span>操作</span>
</div>
<div class="journey-step-info" v-for="(val, k) in configList" :key="k">
<collapse-item :stepItem="val" :activityInfo="activityInfo">
<el-button type="text" @click="handleAdd">新增</el-button>
<el-button type="text">编辑</el-button>
<el-button type="text" @click="handleDelete">删除</el-button>
</collapse-item>
<div class="journey-add-panel" v-if="addStatus && k == addNo">
<div class="flex-column-center ">
<el-input></el-input>
<div class="mark-item">
<label>手动标记:</label>
<el-radio-group v-model="radio">
<el-radio :label="3">支持</el-radio>
<el-radio :label="6">不支持</el-radio>
</el-radio-group>
</div>
</div>
<div class="mark-operate">
<el-button type="text">保存</el-button>
<el-button type="text" @click.stop="addStatus = false">取消</el-button>
</div>
</div>
</div>
</div>
<div class="journey-add" @click="addStep" v-if="!addStatus">
<i class="el-icon-circle-plus-outline"></i>
新建旅程阶段
</div>
</div>
<concatActivity :conditionVisible="conditionVisible" v-if="conditionVisible"></concatActivity>
</div>
</template>
<script>
import CollapseItem from './components/CollapseItem'
import concatActivity from './components/concatActivity'
export default {
components: {
CollapseItem,
concatActivity
},
data() {
return {
conditionVisible: false,
addStatus: false,
journeyStatus: 1,
activityInfo: {},
configList: [],
addForm: {
name: ''
},
rules: {
name: [{ required: true, message: '请输入旅程名称', trigger: 'blur' }]
}
}
},
mounted() {
const query = this.$route.query
this.query = query
this.getDetail()
},
methods: {
handleAdd() {
this.conditionVisible = true
},
handleDelete() {
this.$confirm('是否确定提交?', '提示', {
confirmButtonText: '是',
cancelButtonText: '否',
type: 'warning'
})
.then(() => {
this.$message({
type: 'success',
message: '删除成功!'
})
})
.catch(() => {})
},
addStep() {
this.addStatus = true
this.configList.push({})
this.addNo = this.configList.length - 1
},
getDetail() {
this.$apis.journeyModel.getInstIdDetail({ instId: 'xblc185' }).then(res => {
const instParam = JSON.parse(res.instParam)
const stages = instParam.stages
const instStatus = res.instStatus
this.activityInfo = instParam.customData
const activityId = this.activityInfo.activityId
if (instStatus == 0 && !activityId) {
this.journeyStatus = 1
}
if (instStatus == 0 && activityId) {
this.journeyStatus = 2
}
if (instStatus == 1 && activityId) {
this.journeyStatus = 3
}
if (instStatus == -1 && activityId) {
this.journeyStatus = 4
}
const nodes = res.nodes
const configList = []
for (let k in stages) {
let list = []
for (let v of nodes) {
if (v.nodeParam && JSON.parse(v.nodeParam).stage == stages[k].value) {
list.push(JSON.parse(v.nodeParam))
}
}
list = list.filter(item => item.day)
list.sort((a, b) => {
return a.day - b.day
})
const sopList = this.groupBy(list, 'day')
configList.push({
label: stages[k].value,
isExpaned: false,
conditionsList: stages[k].conditions || [],
sopList
})
}
this.configList = configList
})
},
groupBy(list, name) {
const m = new Map()
list.map(item => {
m.set(item[name], [...(m.get(item[name]) || ''), item])
})
return [...m.values()]
}
}
}
</script>
<style lang="scss" scoped>
.concat-color {
/deep/ .el-icon-warning {
color: #5850ff;
}
}
.journey-main {
.journey-config {
margin-bottom: 16px;
padding: 20px;
}
.journey-step {
padding-bottom: 30px;
}
.journey-step-config {
&:first-child {
margin-bottom: 20px;
}
i {
font-size: 14px;
&.el-icon-warning {
color: #fdb757;
}
&.el-icon-success {
color: #2cca74;
}
}
span {
font-size: 14px;
color: #666666;
margin-left: 5px;
display: inline-block;
width: 166px;
}
}
.journey-step-body {
border: 1px solid #e5e5e5;
margin: 32px 20px 0px;
.journey-step-title {
height: 52px;
font-size: 14px;
color: #333333;
line-height: 52px;
padding: 0px 120px 0px 40px;
background: #f4f6fc;
display: flex;
justify-content: space-between;
}
}
.journey-add-panel {
padding: 0px 20px;
height: 52px;
background: #e9e8ff;
border: 1px solid #e5e5e5;
display: flex;
align-items: center;
justify-content: space-between;
/deep/ {
.el-input {
width: 232px;
height: 32px;
background: #ffffff;
border: 1px solid #e5e5e5;
border-radius: 4px;
}
.el-input__inner {
height: 32px;
}
}
.mark-item {
margin-left: 30px;
font-size: 14px;
color: #333333;
}
}
.journey-add {
display: flex;
align-items: center;
margin-left: 20px;
margin-top: 20px;
cursor: pointer;
i {
font-size: 20px;
margin-right: 6px;
}
font-size: 12px;
color: #5850ff;
}
}
</style>
<style lang="scss">
.concat-color {
.el-icon-warning {
color: #5850ff;
}
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-27 11:29:17
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-12-25 14:02:33
* @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
-->
<template>
<GLDialog title="关联营销活动" mode="big" class="gl-form-page gl-form-min" @onOk="handleSure" :before-close="handleClose" @onCancel="handleClose" :visible.sync="conditionVisible">
<div class="dialog-body">
<div class="condition-item">
<label>客户旅程:</label>
<span>续保招揽旅程</span>
</div>
<div class="condition-item">
<label>旅程阶段:</label>
<span>意向客户</span>
</div>
<condition></condition>
<div class="condition-item flex">
<label>进入条件:</label>
<div class="condition-panel" v-if="status == 1">
<el-select v-model="value" placeholder="请选择" :size="size">
<el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select v-model="value" placeholder="请选择" :size="size">
<el-option v-for="item in grOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div class="condition-panel" v-if="status == 2">
<el-select v-model="value" placeholder="请选择" :size="size" class="m-r-10">
<el-option v-for="item in JourneyOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div class="condition-panel" v-if="status == 3">
<div class="condition-select flex">
<el-select v-model="value" placeholder="请选择" :size="size" class="m-r-10">
<el-option v-for="item in JourneyOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select v-model="value" placeholder="请选择" :size="size" class="m-r-10">
<el-option v-for="item in conditionOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<div class="condition-input">
<el-input></el-input>
</div>
<span>天&nbsp;&nbsp;切换到此旅程阶段</span>
</div>
<div class="condition-more">
<div class="flex-column-center m-t-10" v-for="(item, k) in conditionList" :key="item.id">
<label>并且满足</label>
<el-select v-model="value" placeholder="请选择" :size="size" class="condition-1">
<el-option v-for="item in JourneyOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select v-model="value" placeholder="请选择" :size="size" class="condition-2">
<el-option v-for="item in JourneyOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<i class="el-icon-delete" @click="delCondition(k)"></i>
</div>
<div class="condition-add" @click="addCondition">
<i class="el-icon-circle-plus-outline"></i>
添加条件
</div>
</div>
</div>
</div>
</div>
</GLDialog>
</template>
<script>
import condition from './condition'
export default {
components: {
condition
},
props: {
conditionVisible: Boolean
},
data() {
return {
status: 1,
typeOptions: [
{
label: '基于国任任务'
},
{
label: '基于页面行为'
}
],
grOptions: [
{
label: '成功续保导入系统的客户'
}
],
membersVisible: false,
typeVisible: false,
selectData: [],
conditionList: [{ id: 1 }, { id: 2 }],
JourneyOptions: [
{
label: '客户旅程'
},
{
label: '旅程阶段'
},
{
label: '手动标记'
},
{
label: '条件类型'
}
],
conditionOptions: [
{
label: '等于'
}
]
}
},
methods: {
delCondition(k) {
this.conditionList.splice(k, 1)
},
addCondition() {
this.conditionList.push({
id: this.conditionList.length
})
},
// 成员弹窗
handleConfirm() {
console.log(this.$refs.membersForm.innerTags)
if (this.$refs.membersForm.innerTags.length) {
// this.basicForm.userList = this.$refs.membersForm.innerTags
this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags)
this.selectData = this.basicForm.userList
this.openMembers()
this.isUpdate = true
this.editStatus = true
} else {
this.$message({
type: 'error',
message: '请选择成员'
})
}
},
handleCloseType() {
this.typeVisible = false
},
handleAddEmp() {
this.membersVisible = true
}
}
}
</script>
<style lang="scss" scoped>
.dialog-body {
padding: 0px 50px;
}
.require {
color: red;
}
.condition-item {
line-height: 30px;
font-size: 14px;
color: #666666;
.condition-more {
background: #f9f9f9;
padding: 20px;
margin-top: 10px;
.condition-1 {
width: 284px;
margin: 0 10px;
}
.condition-2 {
width: 136px;
}
i {
color: #999999;
margin-left: 10px;
cursor: pointer;
}
.condition-add {
display: flex;
align-items: center;
margin-top: 10px;
cursor: pointer;
i {
font-size: 20px;
margin-right: 6px;
color: #5850ff;
}
font-size: 12px;
color: #5850ff;
}
}
.condition-input {
a {
color: #5850ff;
}
/deep/ {
.el-input {
width: 136px;
margin: 0px 4px;
}
.el-input__inner {
height: 32px;
line-height: 32px;
}
}
}
span {
color: #333333;
}
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-25 13:34:43
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-12-25 15:12:16
* @FilePath: \scrm-micro-peregrination\src\views\journeyModel\components\condition.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script>
export default {
data() {
return {
conditionList: [
{
conditions: [
{
actionId: 5,
id: 1,
name: '进入旅程',
operators: [
{ id: 1, name: '等于', value: '=' },
{ id: 2, name: '不等于', value: '<>' }
]
},
{ actionId: 5, id: 2, name: '排除以下旅程阶段的客户', operators: [{ id: 8, name: '不包含', value: 'nin' }] }
],
id: 5,
name: '进入旅程',
type: 1
},
{
conditions: [
{ actionId: 6, id: 3, name: '进入旅程', value:'',operators: [{ id: 1, name: '等于', value: '=' }] },
{ actionId: 6, id: 4, name: '排除以下旅程阶段的客户', operators: [{ id: 8, name: '不包含', value: 'nin' }] }
],
id: 6,
name: '进入旅程',
type: 2
},
{ conditions: [{ actionId: 8, id: 5, name: '成功续保导入系统的客户', operators: [] }], id: 8, name: '基于国任业务', type: 2 },
{
conditions: [
{
type: 'select',
value: 7,
operators: [
{ actionId: 9, id: 6, name: '页面停留', operators: [] },
{ actionId: 9, id: 7, name: '页面点击', conditions: [{ type: 'input', unit: '秒', value: 1 },{ type: 'input', unit: '秒', value: 2 }] }
]
}
],
id: 9,
name: '基于页面行为',
type: 2
},
{ conditions: [], id: 1, name: '在膨胀金活动种导入的客户', type: 1 },
{ conditions: [], id: 2, name: '在膨胀金活动中下订的客户', type: 1 },
{ conditions: [], id: 3, name: '在膨胀金关联的AI电话中回复高意向的客户', type: 1 },
{ conditions: [], id: 4, name: '查看膨胀金活动的客户', type: 1 },
{ conditions: [], id: 7, name: '添加企微好友', type: 2 }
],
type:1
}
},
render() {
const conditionType = (
<el-select v-model={this.type} placeholder="请选择" size="small" class="condition-1">
{this.conditionList.map(item => {
return <el-option key={item.id} label={item.name} value={item.id}></el-option>
})}
</el-select>
)
return <div class="condition-panel">{conditionType}</div>
}
}
</script>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-25 14:31:26
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-12-25 15:02:38
* @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
-->
<template>
<el-drawer title="编辑" :visible.sync="drawerVisible" direction="rtl" :before-close="handleClose" size="720px">
<div class="drawer-body">
<div class="sop-item flex-column-center">
<label>*</label>
<span>请设置营销时间:</span>
<el-input-number v-model="num" @change="handleChange" :min="1" :max="1000" :size="size"></el-input-number>
<span>天后,当日</span>
<el-time-picker v-model="value1" :size="size"></el-time-picker>
<span>发送</span>
</div>
<div class="sop-item flex">
<label>*</label>
<span>请选择触达方式:</span>
<div class="select-panel">
<div class="select-item" v-for="(item, index) in list" :key="index">
<div class="select-value">
<el-radio v-model="radio" :value="index"></el-radio>
<span>{{ item.label }}</span>
</div>
<div class="select-desc">
{{ item.desc }}
</div>
</div>
</div>
</div>
</div>
<div class="demo-drawer__footer">
<el-button @click="cancelForm" :size="size">取消</el-button>
<el-button type="primary" @click="saveForm" :size="size">保存</el-button>
</div>
</el-drawer>
</template>
<script>
export default {
props: {
drawerVisible: Boolean
},
data() {
return {
radio: '1',
list: [
{
label: '门店助手',
desc: '本功能将给跟进员工推送1v1任务,由员工向每个客户微信转发对应的营销内容。'
},
{
label: '门店助手',
desc: '本功能将给跟进员工推送1v1任务,由员工向每个客户微信转发对应的营销内容。'
}
]
}
}
}
</script>
<style scoped lang="scss">
.drawer-body {
padding: 30px;
height: calc(100vh - 140px);
.sop-item {
font-size: 14px;
color: #333333;
margin-bottom: 20px;
> label {
color: #eb4e4e;
}
.select-item {
margin-bottom: 20px;
.select-value {
font-size: 14px;
color: #333333;
span {
margin-left: -35px;
}
}
.select-desc {
font-size: 12px;
color: #999999;
line-height: 24px;
margin-left: 20px;
}
}
}
}
.demo-drawer__footer {
text-align: right;
padding: 10px;
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-12-22 20:18:32
* @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="journey-main">
<div class="bg-fff p20">
<GLCombiForm ref="formSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="byGroupIdSop" @handleRest="handleReset"></GLCombiForm>
<div class="journey-header">
<el-button class="operate-btn" type="primary" size="small" @click="addJourney" plain>新增旅程</el-button>
</div>
<div class="journey-body" v-if="journeyList.length">
<div class="journey-item" v-for="item in journeyList" :key="item.id">
<div class="journey-item-head flex-column-center ">
<img src="@/assets/config/icon-1.png" />
<span>{{ item.instName }}</span>
<a @click="handleEdit(item)">编辑</a>
<div :class="{ 'journey-item-status flex-center': true, 'is-disable': item.instStatus == -1 || item.instStatus == 0 }">
<i :class="`${getStatusValue(item, 'icon')}`"></i>
<span>{{ getStatusValue(item, 'label') }}</span>
</div>
</div>
<div class="journey-item-body">
<div class="journey-process">
<div class="journey-process-item" v-for="(p, index) in item.journeyItem" :key="index">
<img src="@/assets/config/icon-next.png" class="journey-status" v-if="index != item.journeyItem.length - 1" />
<img src="@/assets/config/icon-end.png" class="journey-status" v-else />
<div class="journey-step__main">
<div class="journey-step-icon"></div>
<div class="journey-step-desc">{{ p.label }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="empty-panel" v-else>
<div class="empty-img">
<img src="@/assets/config/empty.png" />
</div>
<div class="empty-txt">
暂无数据
</div>
</div>
</div>
</div>
</template>
<script>
const STATUS = [
{ label: '已启用', value: 1, icon: 'el-icon-check' },
{ label: '未启用', value: 0, icon: 'el-icon-close' },
{ label: '已禁用', value: -1, icon: 'el-icon-remove-outline' }
]
export default {
data() {
return {
searchForm: {
instStatus: [1, 0]
},
journeyAllList: [],
searchFormData: [
{
label: '旅程',
name: 'instId',
type: 'select',
optionList: [],
optionId: 'instId',
optionLabel: 'instName'
},
{
label: '状态',
name: 'instStatus',
type: 'select',
optionList: STATUS,
optionId: 'value',
optionLabel: 'label',
multiple: true
}
],
journeyList: []
// journeyList: [
// {
// id: 1,
// title: '续保客户旅程1',
// status: 1,
// journeyItem: [
// {
// label: '待跟进',
// process: 1
// },
// {
// label: '有意向',
// process: 2
// },
// {
// label: '可报价',
// process: 3
// },
// {
// label: '已成交',
// process: 4
// },
// {
// label: '战败',
// process: 5
// }
// ]
// },
// {
// id: 2,
// title: '续保客户旅程2',
// status: 2,
// journeyItem: []
// },
// {
// id: 2,
// title: '续保客户旅程3',
// status: 3,
// journeyItem: []
// }
// ]
}
},
mounted() {
this.byGroupIdSop()
},
methods: {
addJourney() {
this.$router.push('/journeyModel/add')
},
async byGroupIdSop() {
const res = await this.$apis.journeyModel.byGroupIdSop({ groupId: this.$globalState.session.merchantId, pageNumber: 1 })
this.journeyAllList = res.list || []
this.journeyAllList.forEach(item => {
const stages = JSON.parse(item.instParam).stages
item.journeyItem = []
let process = 0
for (let k in stages) {
process++
item.journeyItem.push({
label: stages[k].value,
process
})
}
this.searchFormData[0].optionList = this.$common.utils.deepClone(this.journeyAllList)
this.handleSearch()
})
},
//状态值映射
getStatusValue(val, prop) {
if (!val || !prop) return
return STATUS.find(item => item.value == val.instStatus)[prop]
},
handleEdit(item) {
this.$router.push({
path: '/journeyConfig/config',
query: {
title: item.instName,
instId: item.instId
}
})
},
async handleSearch() {
const { instStatus, instId } = this.searchForm
this.journeyList = this.journeyAllList
if (instId) {
this.journeyList = this.journeyList.filter(item => item.instId == instId)
}
if (instStatus && instStatus.length) {
this.journeyList = this.journeyList.filter(item => instStatus.includes(item.instStatus))
}
},
handleReset() {
this.searchForm = {}
this.byGroupIdSop()
}
}
}
</script>
<style lang="scss" scoped>
.empty-panel {
font-size: 16px;
color: #999999;
text-align: center;
height: calc(100vh - 290px);
.empty-img {
width: 268px;
height: 88;
margin: 60px auto 4px;
}
}
.journey-header {
text-align: right;
margin-bottom: 10px;
}
.journey-item {
border: 1px solid #f0f0fb;
border-radius: 4px;
&-head {
height: 50px;
padding-left: 16px;
border-bottom: 1px solid #f0f0fb;
img {
width: 30px;
height: 30px;
}
> span {
font-size: 16px;
color: #333333;
margin: 0px 10px;
}
a {
font-size: 14px;
color: #5850ff;
cursor: pointer;
}
.journey-item-status {
margin-left: auto;
width: 84px;
height: 28px;
background-image: linear-gradient(108deg, #2cca74 0%, #16ced2 100%);
border-radius: 2px 0 0 2px;
color: #ffffff;
font-size: 14px;
&.is-disable {
background-image: linear-gradient(108deg, #acacca 0%, #c9bcd0 100%);
}
i {
margin-right: 4px;
&.el-icon-remove-outline {
transform: rotate(180deg);
}
}
}
}
&-body {
padding: 32px;
display: flex;
// justify-content: center;
.journey-process {
display: flex;
flex-wrap: nowrap;
overflow-x: auto;
&-item {
position: relative;
flex: 0 0 195px;
width: 195px;
height: 88px;
&:last-child {
flex: 0 0 88px;
width: 88px;
}
.journey-status {
position: absolute;
height: 88px;
width: auto;
}
.journey-step__main {
position: absolute;
width: 88px;
text-align: center;
top: 15px;
margin: auto;
.journey-step-icon {
margin: 5px auto;
}
.journey-step-desc {
font-size: 14px;
color: #333333;
}
}
}
}
}
}
.journey-step-icon {
width: 25px;
height: 24px;
background: url('../../assets/config/sop_icon.png');
background-size: 100% 100%;
}
.step-icon-2 {
background: url('../../assets/config/icon-sprites.png') -10px -10px;
}
.step-icon-3 {
background: url('../../assets/config/icon-sprites.png') -55px -10px;
}
.step-icon-4 {
background: url('../../assets/config/icon-sprites.png') -10px -54px;
}
.step-icon-5 {
background: url('../../assets/config/icon-sprites.png') -55px -54px;
}
.step-icon-1 {
background: url('../../assets/config/icon-sprites.png') -54px -142px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!