Commit 47f81ddd by zhangquan

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

2 parents 53da1317 2a5cdc82
Showing 54 changed files with 2965 additions and 56 deletions
...@@ -1864,7 +1864,6 @@ ...@@ -1864,7 +1864,6 @@
"thread-loader": "^2.1.3", "thread-loader": "^2.1.3",
"url-loader": "^2.2.0", "url-loader": "^2.2.0",
"vue-loader": "^15.9.2", "vue-loader": "^15.9.2",
"vue-loader-v16": "npm:vue-loader@^16.1.0",
"vue-style-loader": "^4.1.2", "vue-style-loader": "^4.1.2",
"webpack": "^4.0.0", "webpack": "^4.0.0",
"webpack-bundle-analyzer": "^3.8.0", "webpack-bundle-analyzer": "^3.8.0",
......
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-07 16:54:06
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-26 10:26:30
* @FilePath: \scrm-micro-journey\src\api\modules\journeyConfig.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { http_sop, http_merchant } from '@/main'
//查询模板实例客户分页列表
const getCustomersList = params => {
return http_sop({
url: `process/sop/api/sopInsts/customers`,
method: 'get',
data: params,
sign: false
})
}
//查询模板实例客户详细信息
const getCustomersDetail = params => {
return http_sop({
url: `process/sop/api/sopInsts/customers/detail`,
method: 'get',
data: params,
sign: false
})
}
//查询模板实例客户详细信息
const stageUpdate = params => {
return http_sop({
url: `process/sop/api/sopInsts/customers/stageUpdate`,
method: 'post',
data: params,
noSessionId: true,
sign: false
})
}
//查询模板实例客户详细信息
const exportExcel = params => {
return http_sop({
url: `process/sop/api/sopInsts/customers/export`,
method: 'get',
data: params,
sign: false
})
}
/**
* 状态刷新
*/
const refreshInst = params => {
return http_sop({
url: `process/sop/api/inst/refresh/${params.instId}`,
method: 'get',
// data: params,
sign: false
})
}
/**获取跟进员工 */
const getFindMerchantStaffList = params => {
params.method = 'merchants.api.open.findMerchantStaffList'
return http_merchant({
url: '/rop-merchants/router',
data: params
})
}
export default { getCustomersList, getCustomersDetail, stageUpdate, exportExcel, refreshInst, getFindMerchantStaffList }
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-07 16:54:06
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-26 10:26:03
* @FilePath: \scrm-micro-journey\src\api\modules\journeyConfig.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { http, http_sop } from '@/main'
//活动列表
const activityPage = params => {
params.method = `scrm.api.shopmall.bulge.activity.page`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//活动详情
const getActivityDetailApi = params => {
params.method = `scrm.api.shopmall.activity.detail`
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
//活动任务详情
const findMarketingTask = params => {
params.method = `marketing.api.supermarket.findMarketingTask`
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//活动列表
const byGroupIdSop = params => {
return http_sop({
url: 'process/sop/api/sopInsts/byGroupId',
method: 'get',
data: params,
sign: false
})
}
//活动列表
const getInstIdDetail = params => {
return http_sop({
url: 'process/sop/api/sopInsts/' + params.instId,
method: 'get',
// data: params,
sign: false
})
}
//更新SOP门店模板实例状态
const setSopInsts = params => {
return http_sop({
url: `process/sop/api/sopInsts/${params.instId}/status`,
method: 'post',
data: params.status,
noSessionId: true,
sign: false
})
}
//更新SOP门店模板实例初始参数里的门店自定义参数(关联活动)
const concatActivity = params => {
return http_sop({
url: `process/sop/api/sopInsts/${params.instId}/instParam/customData`,
method: 'post',
data: params.data,
noSessionId: true,
sign: false
})
}
const activityRelInfo = params => {
params.method = `marketing.api.supermarket.activityRelInfo`
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
export default { activityPage, byGroupIdSop, getInstIdDetail, setSopInsts, concatActivity, findMarketingTask, getActivityDetailApi, activityRelInfo }
...@@ -5,7 +5,7 @@ html { ...@@ -5,7 +5,7 @@ html {
margin: 0; margin: 0;
padding: 0; padding: 0;
overflow: hidden; overflow: hidden;
background-color: #F4F5FA; background-color: #f4f5fa;
} }
.live-room .container { .live-room .container {
...@@ -20,37 +20,133 @@ html { ...@@ -20,37 +20,133 @@ html {
.live-room.p-t-20 { .live-room.p-t-20 {
padding-top: 20px; padding-top: 20px;
} }
.live-room .table-circle { .live-room .table-circle {
display: inline-block; display: inline-block;
width: 6px; width: 6px;
height: 6px; height: 6px;
border-radius: 4px; border-radius: 4px;
}
img {
width: 100%;
height: 100%;
vertical-align: middle; vertical-align: middle;
} }
.live-room .back-orange { .bg-fff {
background-color: #fdb757; background: #ffffff;
} }
.live-room .back-blue { .p10 {
background-color: #5850ff; padding: 10px;
} }
.live-room .back-grey { .p20 {
background-color: #999999; padding: 20px;
} }
.live-room .back-green { .pl10 {
background-color: #2cca74; padding-left: 10px;
} }
.live-room .back-red { .pl20 {
background-color: #eb4e4e; padding-left: 20px;
} }
.live-room .m-r-8 { .live-room .m-r-8 {
margin-right: 8px; margin-right: 8px;
} }
.message-Z-zinde, .message-Z-zinde,
.live-room .message-Z-zinde { .live-room .message-Z-zinde {
z-index: 9999 !important; z-index: 9999 !important;
} }
.pb10 {
padding-bottom: 10px;
}
.pb20 {
padding-bottom: 20px;
}
.flex {
display: flex;
}
.flex-center {
display: flex;
justify-content: center;
align-items: center;
}
.flex-row-center {
display: flex;
justify-content: center;
}
.flex-column-center {
display: flex;
align-items: center;
}
.flex-space-between {
display: flex;
justify-content: space-between;
align-items: center;
}
.border-title {
height: 56px;
background: #ffffff;
padding: 20px;
box-sizing: border-box;
font-weight: 600;
font-size: 16px;
color: #333333;
border-bottom: 1px solid #e5e5e5;
}
.journey {
.el-tabs__item {
height: 20px !important;
line-height: 10px !important;
}
.el-tabs__item {
box-sizing: border-box;
width: 120px;
height: 48px !important;
line-height: 48px !important;
font-size: 14px;
text-align: center;
border: 0 !important;
color: #666666;
background: #fafafa;
border-radius: 4px 4px 0px 0px;
border: 1px solid #eeedff;
padding: 0;
margin-right: 1px;
}
.el-tabs__active-bar {
display: none;
}
.el-tabs__header {
margin: 0 !important;
}
.el-tabs__item.is-active {
color: #5850ff;
background: #ffffff !important;
border-radius: 4px 4px 0px 0px;
}
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
...@@ -148,7 +148,42 @@ const stateList = [{ ...@@ -148,7 +148,42 @@ const stateList = [{
confName: '已下架' confName: '已下架'
}, },
] ]
function getExplorer () {
var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null
if (ua.match(/msie/) != null || ua.match(/trident/) != null) {
browserType = 'IE'
} else if (ua.match(/firefox/) != null) {
browserType = '火狐'
} else if (ua.match(/ubrowser/) != null) {
browserType = 'UC'
} else if (ua.match(/opera/) != null) {
browserType = '欧朋'
} else if (ua.match(/bidubrowser/) != null) {
browserType = '百度'
} else if (ua.match(/metasr/) != null) {
browserType = '搜狗'
} else if (ua.match(/tencenttraveler/) != null || ua.match(/qqbrowse/) != null) {
browserType = 'QQ'
} else if (ua.match(/maxthon/) != null) {
browserType = '遨游'
} else {
browserType = '谷歌'
}
return browserType
}
function exportFn (url) {
let browserType = getExplorer()
if (browserType == 'QQ') {
window.open(url)
return
}
let iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = url
document.body.appendChild(iframe)
}
export { export {
limitPrice, limitPrice,
orderManageStatusList, orderManageStatusList,
...@@ -159,5 +194,7 @@ export { ...@@ -159,5 +194,7 @@ export {
memberTypeList, memberTypeList,
stateList, stateList,
orderTypesList, orderTypesList,
orderStatusList orderStatusList,
exportFn,
getExplorer
} }
\ No newline at end of file \ No newline at end of file
...@@ -8,32 +8,69 @@ ...@@ -8,32 +8,69 @@
*/ */
// 本地环境配置 // 本地环境配置
module.exports = { module.exports = {
title: 'scrm-sub-marketing',
response: { response: {
data_key: 'data', data_key: 'data',
message_key: 'message', message_key: 'message',
code_key: 'code', code_key: ['code', 'returnCode'],
code_success_value: '0', code_success_value: '0',
errId_logout_value: '21', errId_logout_value: '21',
code_message_map: {} code_message_map: {}
},
response_sop: {
data_key: 'data',
message_key: 'message',
code_key: ['code', 'returnCode'],
code_success_value: '200',
errId_logout_value: '21',
code_message_map: {}
}, },
request: { request: {
// baseURL: 'http://scrm.test.glsx.com.cn/', baseURL: "//scrm.test.glsx.com.cn",
baseURL: 'http://192.168.2.42:8064/', // 设置超时时间
// 设置超时时间 timeout: 180000,
timeout: 180000, // 携带凭证
// 携带凭证 withCredentials: true,
withCredentials: true, // 返回数据类型
// 返回数据类型 responseType: 'json'
responseType: 'json' },
request_sop: {
baseURL: "//gateway.platform.test.glsx.com.cn",
// 设置超时时间
timeout: 180000,
// 携带凭证
withCredentials: true,
// 返回数据类型
responseType: 'json'
},
request_merchant: {
baseURL: "//rop-merchant.test.glsx.com.cn",
// 设置超时时间
timeout: 180000,
// 携带凭证
withCredentials: true,
// 返回数据类型
responseType: 'json'
},
request_common: {
baseURL: "//didicb.glsx.com.cn",
// 设置超时时间
timeout: 180000,
// 携带凭证
withCredentials: true,
// 返回数据类型
responseType: 'json'
}, },
sign: { sign: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637', appKey: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0', v: '1.0.0',
format: 'json', format: 'json',
source: '' source: 'scrm-home'
}, },
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b', sign_common: {
app_key: '48e5e13229b82c1b4e6e8c96151f0637',
cdn: 'https://www.xxx.cn/static' v: '1.0.0',
} format: 'json',
source: 'glsx'
},
secret: "c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b",
}
\ No newline at end of file \ No newline at end of file
...@@ -4,19 +4,22 @@ ...@@ -4,19 +4,22 @@
* @Author: limin * @Author: limin
* @Date: 2021-06-07 14:12:32 * @Date: 2021-06-07 14:12:32
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-18 11:20:21 * @LastEditTime: 2023-09-27 12:06:04
*/ */
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js') // let request = require('@/http/request.js')
let cfg = require('./conf.js') let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function(common) { export const fetchConfig = function (common) {
// let { request } = cfg
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
let params = { moduleName: 'scene', mockUrl: 'https://oss-config.glsx.com.cn/mock/63c12a2e28a427953783403b/link/config', httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } } let params = { moduleName: 'scene', mockUrl: 'https://oss-config.glsx.com.cn/mock/63c12a2e28a427953783403b/link/config', httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } }
return common.utils.getConfig(params) return common.utils.getConfig(params)
} }
export const config = { export const config = {
install(vue, cfg) { install (vue, cfg) {
vue.prototype.$config = cfg vue.prototype.$config = cfg
} }
} }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: limin * @Author: limin
* @Date: 2021-08-13 14:12:11 * @Date: 2021-08-13 14:12:11
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-23 17:20:32 * @LastEditTime: 2023-09-22 20:06:55
* @FilePath: \scrm\scrm-sub-blog\src\main.js * @FilePath: \scrm\scrm-sub-blog\src\main.js
*/ */
import Vue from 'vue' import Vue from 'vue'
...@@ -21,3 +21,5 @@ start() ...@@ -21,3 +21,5 @@ start()
export { bootstrap, mount, unmount } from '@/setup' export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
export const http_common = params => Vue.prototype.$http_common(params) export const http_common = params => Vue.prototype.$http_common(params)
export const http_sop = params => Vue.prototype.$http_sop(params)
export const http_merchant = params => Vue.prototype.$http_merchant(params)
...@@ -2,7 +2,11 @@ ...@@ -2,7 +2,11 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2022-11-23 11:06:49 * @Date: 2022-11-23 11:06:49
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-25 09:39:53 <<<<<<< HEAD
* @LastEditTime: 2023-09-27 12:07:58
=======
* @LastEditTime: 2023-09-25 09:59:38
>>>>>>> e728fa5b69f3ed7e05a72000ab34add4d75d5961
* @FilePath: \live\src\setup\qiankun.js * @FilePath: \live\src\setup\qiankun.js
* @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
*/ */
...@@ -20,7 +24,7 @@ let instance = null ...@@ -20,7 +24,7 @@ let instance = null
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) { export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret, sign_common, request_common } = await fetchConfig(common) const { response, request, sign, secret, sign_common, request_common, response_sop, request_sop, request_merchant } = await fetchConfig(common)
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
...@@ -28,7 +32,11 @@ export async function bootstrap({ history, common, messenger, globalState, route ...@@ -28,7 +32,11 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue.prototype.$message = message Vue.prototype.$message = message
Vue.prototype.$messageBox = messageBox Vue.prototype.$messageBox = messageBox
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_sop = new common.Http({ response: response_sop, request: request_sop, sign, secret, alert: message.error, headers: { token: globalState.session.token, 'Content-Type': 'application/json' } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } }) Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
Vue.prototype.$http_merchant = new common.Http({ response, request:request_merchant, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData) routes = getRoutes(routesData)
subscribe({ messenger }) subscribe({ messenger })
......
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:23:03
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-05 17:23:24
* @FilePath: \scrm-micro-journey\src\views\journey\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<div> <div
555 class="journey"
v-loading="loading"
>
<div class="container">
<div class="sticky">
<GLCombiForm
ref="showSearch"
:rowNumber="2"
:formObj="searchForm"
:formData="searchFormData"
:searchSelectObj="searchSelectObj"
@handleOk="handleSearch"
@handleRest="handleReset"
:key="FormKey"
></GLCombiForm>
<div :class="['sticky-btns', { hiddenExport: viewType == 1 }]">
<div class="btns">
<el-button
type="default"
@click="refreshInst"
plain
>状态刷新</el-button>
<el-button
type="default"
@click="changeViewType"
>切换为{{ viewType == 1 ? '列表' : '看板' }}视图</el-button>
<el-button
type="default"
@click="handleExport"
>导出</el-button>
</div>
</div>
</div>
<template v-if="viewType == 1">
<div class="journey-data-view">
<data-view
:params="tableSearchForm"
ref="dataView"
:stageList="stageList"
></data-view>
</div>
</template>
<template v-else>
<div class="flex">
<div class="flex-default tabs">
<template v-if="stageList && stageList.length">
<template v-for="(i, index) in stageList">
<template>
<div
:class="['tab', { active: searchForm.sopJourneyStage == i.value }]"
:key="index"
@click="changeTab(i.value)"
>
{{ i.label }}
</div>
</template>
</template>
</template>
</div>
</div>
<div class="journey-table">
<journey-table
ref="table"
:params="tableSearchForm"
:stageList="stageList"
></journey-table>
</div>
</template>
</div>
</div> </div>
</template> </template>
<script type="text/ecmascript-6">
import { combiFormConfig } from './index/config'
import journeyTable from './index/table.vue'
import dataView from './index/dataView.vue'
import { exportFn } from '@/common/constant'
import dayjs from 'dayjs'
export default {
mixins: [combiFormConfig],
components: {
journeyTable,
dataView
},
name: '',
data () {
return {
viewType: 1,
journeyList: [],
FormKey: Date.now(),
loading: false
}
},
mounted () {
this.getList()
this.getFindMerchantStaffList()
},
methods: {
getFindMerchantStaffList () {
const { merchantId } = this.$globalState.session
this.$apis.journey.getFindMerchantStaffList({
merchantNo: merchantId,
staffLabelFlag: true
}).then(res => {
console.log(res)
let optionList = []
res && res.length && res.map(e => optionList.push({
confId: e.staffPhone,
confName: e.staffName
}))
this.searchFormData.find(e => e.name == 'sopFollowUpPersonPhone').optionList = optionList
})
},
getList () {
this.$apis.journeyConfig.byGroupIdSop({ groupId: this.$globalState.session.merchantId, pageNumber: 1 }).then(res => {
this.journeyList = res.list || []
this.journeyList.forEach(item => {
const stages = JSON.parse(item.instParam).stages
item.journeyItem = []
item.journeyItem = [{
label: '全部',
value: ''
}]
for (let k in stages) {
item.journeyItem.push({
label: stages[k].value,
value: stages[k].value, // 后台要求改成label值 20230927
disabled: !stages[k].editable
})
}
})
this.searchFormData[0].optionList = this.journeyList
const { instId } = this.$route.query
this.searchForm.sopJourneyId = instId?instId:this.journeyList[0].instId
this.getStage(this.searchForm.sopJourneyId)
this.handleSearch()
})
},
changeTab (val) {
console.log(val)
this.searchForm.sopJourneyStage = val
this.handleSearch()
},
getParams () {
const tempParams = this.getSelectInputParams(),
searchForm = JSON.parse(JSON.stringify(this.searchForm))
if (searchForm.time) {
let sopJourneyEnterTimeBegin = dayjs(searchForm.time[0]).format('YYYY-MM-DD')
let sopJourneyEnterTimeEnd = dayjs(searchForm.time[1]).format('YYYY-MM-DD')
searchForm.sopJourneyEnterTimeBegin = `${sopJourneyEnterTimeBegin} 00:00:00`
searchForm.sopJourneyEnterTimeEnd = `${sopJourneyEnterTimeEnd} 23:59:59`
}
delete searchForm.time
this.tableSearchForm = {
...searchForm,
...tempParams
}
},
handleSearch () {
this.getParams()
const { viewType, $refs } = this,
el = viewType == 1 ? $refs.dataView : $refs.table,
{ sopJourneyId } = this.tableSearchForm
if (!sopJourneyId) return
this.$nextTick(() => {
el.refreshTable()
})
},
handleReset () {
const { journeyList } = this
if (!journeyList.length) return
this.searchForm = {
sopJourneyStage: '',
sopJourneyId: journeyList[0].instId
}
this.searchSelectObj = this.$options.data.call(this).searchSelectObj
this.FormKey = Date.now()
this.handleSearch()
},
handleExport () {
const { sopJourneyId } = this.tableSearchForm
if (!sopJourneyId) return
this.getParams()
this.$apis.journey.exportExcel({ ...this.tableSearchForm, pageSize: 10000, pageNumber: 1 }).then(res => {
if (res.secureUrl) exportFn(res.secureUrl)
})
},
changeViewType () {
this.viewType = this.viewType == 1 ? 0 : 1
},
/**状态刷新 */
async refreshInst () {
const { sopJourneyId } = this.tableSearchForm,
{ refreshTime } = this
if (!sopJourneyId) return
if (refreshTime && Date.now() - refreshTime < 1e4) return this.$message('数据正在刷新中,请勿频繁提交')
try {
this.loading = true
const res = await this.$apis.journey.refreshInst({
instId: sopJourneyId
})
this.loading = false
this.refreshTime = Date.now()
this.handleSearch()
} catch (error) {
this.loading = false
}
}
}
}
</script>
<style scoped lang="scss">
.journey {
padding: 20px;
background-color: #fff;
.flex-default.tabs {
border-bottom: none;
display: flex;
gap: 1px;
height: 40px;
.tab {
background: #fafafa;
border: 1px solid #e5e5e5;
border-radius: 4px 4px 0 0;
border-bottom: none;
height: 40px;
line-height: 40px;
width: fit-content;
min-width: 86px;
padding: 0 20px;
text-align: center;
cursor: pointer;
box-sizing: border-box;
color: #666;
}
.active,
.tab:hover {
background-color: #fff;
color: #5850ff;
}
}
&-table-box {
padding: 20px;
border: 1px solid #e5e5e5;
}
&-data-view {
height: calc(100vh - 224px);
}
.sticky {
position: relative;
z-index: 2;
&-btns {
position: absolute;
right: 0;
bottom: -33px;
overflow: hidden;
.el-button + .el-button {
margin-left: 8px;
}
.btns {
transition: all 0.25s;
.el-button {
padding: 8px 15px;
min-width: 60px;
}
}
}
.hiddenExport {
.btns {
transform: translateX(68px);
}
}
}
}
</style>
let _this = null
const defaultFormData = {
sopJourneyStage: ''
}
import * as dayjs from 'dayjs'
export default {
created() {
_this = this
},
data() {
return {
refreshTime: '',
searchForm: {
...defaultFormData
},
searchSelectObj: {
keyword: {
attr: 'customerPhone',
value: ''
}
},
searchFormData: [
{
label: '旅程',
name: 'sopJourneyId',
type: 'select',
labelWidth: 56,
optionList: [],
optionId: 'instId',
optionLabel: 'instName',
changeAttr: e => {
this.getStage(e)
}
},
{
label: '旅程阶段',
name: 'sopJourneyStage',
type: 'select',
labelWidth: 56,
optionList: [],
optionId: 'value',
optionLabel: 'label'
},
{
type: 'selectInput',
selectName: 'keyword',
isClear: true,
inputWidth: '320px',
selectWidth: '110px',
selectOption: [
{
label: '客户电话',
name: 'customerPhone'
},
{
label: '客户姓名',
name: 'customerName'
},
{
label: '微信昵称',
name: 'wechatNickname'
}
],
handleSelectChange(value) {
_this.searchSelectObj.keyword.value = ''
}
},
{
label: '跟进人',
name: 'sopFollowUpPersonPhone',
type: 'select',
labelWidth: 56,
optionList: [],
optionId: 'confId',
optionLabel: 'confName'
},
{
label: '进入旅程时间',
name: 'time',
type: 'datePicker',
labelWidth: 72,
isClear: true,
customPickerOptions: {
disabledDate(val) {
let disabled = true,
startTime = dayjs().subtract(1, 'year'),
endTime = dayjs(),
date = dayjs(val)
if (startTime < date && dayjs(date) < endTime) disabled = false
return disabled
}
}
}
],
stageList: [],
tableSearchForm: {
...defaultFormData
}
}
},
watch: {
// watchJourney: {
// immediate: true,
// handler (newval) {
// //清空旅程阶段并调用旅程阶段接口
// console.log(newval)
// }
// },
'searchForm.a'(newval) {
//清空旅程阶段并调用旅程阶段接口
console.log(newval, 'a')
}
},
// computed: {
// watchJourney () {
// return this.searchForm.a
// }
// },
methods: {
getStage(e) {
console.log(_this.searchFormData)
const step = _this.searchFormData.find(i => i.name === 'sopJourneyStage')
let optionList = _this.journeyList.find(i => i.instId == e).journeyItem
step.optionList = optionList
this.stageList = step.optionList
console.log(this.stageList)
},
getSelectInputParams() {
const list = Object.keys(this.searchSelectObj)
var params = {}
list.forEach(i => {
const item = this.searchSelectObj[i]
item.value && (params[item.attr] = item.value)
})
return params
}
}
}
import combiFormConfig from './combiFormConfig'
export {
combiFormConfig
}
\ No newline at end of file \ No newline at end of file
<template>
<div class="data-view">
<div class="title">旅程看板</div>
<div class="carousel-box">
<template v-if="dataViewLoading">
<template v-if="viewList.length">
<el-carousel
ref="carousel"
:autoplay="false"
:loop="false"
indicator-position="none"
height="100%"
arrow="never"
class="carousel"
@change="viewIndex = $event"
>
<template v-for="(i, index) in viewList">
<template>
<el-carousel-item
:key="index"
class="carousel-item"
>
<template v-for="(c, cindex) in i">
<template>
<div
:key="cindex"
class="group"
>
<div class="title">
<div class="text flex">
<div class="icon">
<img :src="`https://img01.glsx.com.cn/weapp/resource/saas/scrm/data-view-sop-${cindex}.png`">
</div>
{{ c.title }}
</div>
<div class="line-box">
<div
class="line"
:style="[{ width: c.width }]"
></div>
</div>
</div>
<el-scrollbar class="content">
<template v-if="c.list.length">
<template v-for="(item, ind) in c.list">
<template>
<div
:key="ind"
class="item"
>
<div class="top flex">
<div class="icon">
<template v-if="item.wechatAvatarUrl">
<img :src="item.wechatAvatarUrl" />
</template>
<template v-else>
<img src="@/assets/icon/default-avatar.png" />
</template>
</div>
<div class="text">
<div class="name">
{{item.customerName || ''}}
<template v-if="item.wechatNickname">
@{{item.wechatNickname}}
</template>
</div>
{{ item.customerPhone }}
</div>
</div>
<div class="bottom flex">
<div class="left text-hide">进入该阶段:第{{ item.day }}天</div>
<div class="right text-hide">跟进人:{{ item.sopFollowUpPersonName }}</div>
</div>
</div>
</template>
</template>
</template>
<template v-else>
<div class="nothing">
<img src="@/assets/icon/nodata.png" />
</div>
</template>
</el-scrollbar>
</div>
</template>
</template>
</el-carousel-item>
</template>
</template>
</el-carousel>
<div
class="arrow left"
@click="$refs.carousel.prev()"
>
<img :src="viewIndex == 0 ? leftIcon : leftActiveIcon" />
</div>
<div
class="arrow right"
@click="$refs.carousel.next()"
>
<img :src="viewIndex < viewList.length - 1 ? rightActiveIcon : rightIcon" />
</div>
</template>
<template v-else>
<div class="nothing">
<img :src="nothing">
暂无数据
</div>
</template>
</template>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import * as dayjs from 'dayjs'
import nothing from '@/assets/icon/data-view-nothing.png'
export default {
name: '',
props: {
params: {
type: Object,
default: () => { }
},
stageList: {
type: Array,
default: () => { }
},
},
data () {
return {
dataViewLoading: true,
viewList: [],
viewIndex: 0,
leftIcon: require('@/assets/icon/left.png'),
leftActiveIcon: require('@/assets/icon/left-active.png'),
rightIcon: require('@/assets/icon/right.png'),
rightActiveIcon: require('@/assets/icon/right-active.png'),
pageNumber: 1,
nothing,
}
},
mounted () {
this.refreshTable()
},
methods: {
async refreshTable () {
function splitArrayIntoChunks (arr, chunkSize) {
const weight = 1 / arr.length
return arr.reduce((result, item, index) => {
const chunkIndex = Math.floor(index / chunkSize)
item.width = `${(weight * index + weight) * 100}%`
result[chunkIndex] = result[chunkIndex] || []
result[chunkIndex].push(item)
return result
}, [])
}
const params = {
...JSON.parse(JSON.stringify(this.params)),
pageSize: 9999,
pageNumber: this.pageNumber
}
const stageList = this.stageList,
arr = [],
{ sopJourneyStage } = params
for (let k of stageList) {
if (k.value) {
params.sopJourneyStage = k.value
let list = []
if (!sopJourneyStage || sopJourneyStage == k.value) {
this.dataViewLoading = false
const { list: apiList } = await this.$apis.journey.getCustomersList(params)
list = apiList
}
list.length &&
list.forEach((e) => {
e.day = dayjs().diff(dayjs(e.sopJourneyStageEnterTime).format('YYYY/MM/DD'), 'day')
})
arr.push({
title: k.label,
list
})
}
}
this.viewList = splitArrayIntoChunks(arr, 4)
this.dataViewLoading = true
},
}
}
</script>
<style scoped lang="scss">
.flex {
display: flex;
align-items: center;
}
.data-view {
height: 100%;
.title {
font-weight: 500;
font-size: 16px;
color: #333333;
padding: 8px 0 16px;
}
.carousel-box {
height: calc(100% - 40px);
position: relative;
.carousel {
height: 100%;
&-item {
display: flex;
gap: 8px;
.group {
width: 25%;
height: 100%;
background: #f9f9fe;
border-radius: 4px;
.title {
height: 60px;
background: #f0efff;
border-radius: 4px 4px 0 0;
box-sizing: border-box;
padding: 10px 16px;
.text {
font-weight: 500;
font-size: 16px;
color: #5850ff;
.icon {
width: 30px;
height: 30px;
margin-right: 8px;
}
}
.line-box {
height: 2px;
background: #d6d4f8;
border-radius: 1px;
margin-top: 8px;
.line {
height: 100%;
background-color: #5850ff;
border-radius: 1px;
transition: all 0.25s;
}
}
}
.content {
height: calc(100% - 60px);
overflow-y: scroll;
box-sizing: border-box;
padding: 16px 16px 8px;
position: relative;
/deep/.el-scrollbar__wrap {
width: 100%;
&::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
}
&::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.item {
height: 91px;
background: #ffffff;
border-radius: 4px;
margin-bottom: 8px;
.top {
border-bottom: 1px solid #f0efff;
padding: 8px;
.icon {
width: 40px;
height: 40px;
margin-right: 8px;
overflow: hidden;
border-radius: 100%;
}
.text {
font-size: 12px;
color: #666666;
.name {
font-weight: 500;
font-size: 14px;
color: #333333;
margin-bottom: 4px;
}
}
}
.bottom {
height: 33px;
justify-content: space-between;
padding: 0 8px;
font-size: 12px;
color: #666666;
.text-hide {
flex: 1;
}
.right {
text-align: right;
}
}
}
.nothing {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 270px;
height: 112px;
}
}
}
}
}
&:hover {
.arrow {
display: block;
}
}
.arrow {
display: none;
position: absolute;
width: 36px;
height: 36px;
top: 50%;
transform: translateY(-50%) scale(1.15);
z-index: 2;
cursor: pointer;
opacity: 0;
animation: show-arrow 0.25s forwards;
}
.left {
left: -12px;
}
.right {
right: -12px;
}
@keyframes show-arrow {
to {
opacity: 1;
transform: translateY(-50%) scale(1);
}
}
.nothing {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
font-size: 16px;
color: #999999;
img {
width: 270px;
height: 112px;
}
}
}
}
</style>
<template>
<div class="journey-table">
<GLTable
ref="tableRef"
:noDataImg="url"
:tableParams="tableParams"
:tableData="tableData"
:pageConf="pageConf"
@refreshTable="refreshTable"
:tableTotal="tableTotal"
>
<div
class="table-btns"
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
></GLTableButton>
</div>
</GLTable>
<el-drawer
:visible.sync="showDrawer"
direction="rtl"
size="720px"
>
<template #title>
<div class="drawer-title">编辑客户旅程</div>
</template>
<div class="customer-detail">
<div class="info flex">
<div class="icon">
<template v-if="userInfo.icon">
<img :src="userInfo.icon" />
</template>
<template v-else>
<img src="@/assets/icon/default-avatar.png" />
</template>
</div>
<div class="text">
<div class="name">{{ userInfo.customerName }}</div>
{{ userInfo.customerPhone }}
</div>
</div>
<div class="tags">
<div class="label">旅程阶段:</div>
<template v-for="(i, index) in stageList">
<template v-if="index != 0">
<div
:key="index"
class="tags-item flex"
>
<el-button
:class="['text',{disabled:i.disabled}, { active: index == stageIndex }]"
:disabled="i.disabled"
@click="editStage(index)"
>{{ i.label }}</el-button>
<div class="arrow"></div>
</div>
</template>
</template>
</div>
<div class="file">
<div class="title flex">
<div class="icon">
<img src="@/assets/icon/file.png" />
</div>
智能档案
</div>
<template v-for="(i, index) in fileObject">
<template>
<div
:key="index"
class="file-item flex"
>
<div class="label">{{ i.label }}:</div>
<div class="value">
<template v-if="userInfo.carMaintenanceInsurances && userInfo.carMaintenanceInsurances[0]">
{{ userInfo.carMaintenanceInsurances[0][i.key] }}
</template>
</div>
</div>
</template>
</template>
</div>
</div>
<div class="footer flex">
<el-button
type="default"
@click="showDrawer = false"
>取消</el-button>
<el-button
type="primary"
@click="handleConfirm"
>确定</el-button>
</div>
</el-drawer>
</div>
</template>
<script type="text/ecmascript-6">
import url from '@/assets/empty.png'
import * as dayjs from 'dayjs'
export default {
name: '',
props: {
params: {
type: Object,
default: () => { }
},
stageList: {
type: Object,
default: () => { }
}
},
data () {
return {
userInfo: {
carMaintenanceInsurances: [{}]
},
tableSearchForm: {},
tableData: [],
tableTotal: 0,
url,
// 表格
tableParams: {
listName: 'list',
tableOption: {
width: '62px'
},
tableColumns: [
{
label: '客户姓名',
prop: 'customerName',
minWidth: '100px'
},
{
label: '客户电话',
prop: 'customerPhone',
minWidth: '100px'
},
{
label: '微信昵称',
prop: 'wechatNickname',
minWidth: '100px'
},
{
label: '旅程',
minWidth: '200px',
formatter: cell => {
const { journeyList } = this.$parent
return journeyList.find(e => e.instId == this.params.sopJourneyId).instName
}
},
{
label: '进入旅程时间',
prop: 'sopJourneyEnterTime',
minWidth: '160px'
},
{
label: '所处旅程天数',
minWidth: '160px',
formatter: cell => {
return `${dayjs().diff(cell.sopJourneyEnterTime, 'day')}天`
}
},
{
label: '旅程阶段',
prop: 'sopJourneyStage',
minWidth: '100px'
},
{
label: '所处旅程阶段天数',
minWidth: '160px',
formatter: cell => {
return `${dayjs().diff(cell.sopJourneyStageEnterTime, 'day')}天`
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNumber', totalCount: 'total' },
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: '编辑',
attrs: {
type: 'text'
},
condition: row => true,
listeners: {
click: row => {
this.showDrawer = true
this.getCustomersDetail(row)
}
}
},
],
showDrawer: false,
stageIndex: '',
fileObject: [
{
label: '车牌号',
key: 'carNumber'
},
{
label: '车架号',
key: 'carVin'
},
{
label: '品牌车型',
key: 'carModel'
},
{
label: '购车日期',
key: 'carBuyDate'
},
{
label: '近期保养',
key: 'carPreviousMaintenanceDate'
},
{
label: '保险到期日期',
key: 'carCpyInsEndTime'
}
]
}
},
mounted () {
this.refreshTable()
console.log(this.stageList)
},
methods: {
refreshTable () {
this.$nextTick(() => {
if (!this.params.sopJourneyId) return
const params = {
...JSON.parse(JSON.stringify(this.params)),
pageSize: this.$refs.tableRef.page.pageSize,
pageNumber: this.$refs.tableRef.page.pageNumber
}
this.loading = true
this.$apis.journey.getCustomersList(params).then(res => {
this.loading = false
if (res) {
res?.list?.map(e =>{
e.sopJourneyEnterTime = dayjs(e.sopJourneyEnterTime).format('YYYY/MM/DD')
e.sopJourneyStageEnterTime = dayjs(e.sopJourneyStageEnterTime).format('YYYY/MM/DD')
})
console.log(res.list)
this.tableData = res.list
this.tableTotal = res.total || 0
}
})
})
},
getCustomersDetail (row) {
this.$apis.journey.getCustomersDetail({ oneId: row.oneId, sopJourneyId: row.sopJourneyId, orgId: row.orgId }).then(res => {
res.carMaintenanceInsurances.map(e => {
e.carBuyDate = e.carBuyDate ? dayjs(e.carBuyDate).format('YYYY-MM-DD') : ''
e.carPreviousMaintenanceDate = e.carPreviousMaintenanceDate ? dayjs(e.carPreviousMaintenanceDate).format('YYYY-MM-DD') : ''
e.carCpyInsEndTime = e.carCpyInsEndTime ? dayjs(e.carCpyInsEndTime).format('YYYY-MM-DD') : ''
})
this.userInfo = res
this.stageIndex = this.stageList.findIndex(i => i.label == this.userInfo.sopJourneyStage)
console.log(JSON.parse(JSON.stringify(res)))
})
},
editStage (index) {
this.stageIndex = index
this.userInfo.sopJourneyStage = this.stageList[index].label
},
async handleConfirm () {
const { oneId, sopJourneyId, orgId, sopJourneyStage } = this.userInfo
try {
const res = await this.$apis.journey.stageUpdate({ oneId, sopJourneyId, orgId, sopJourneyStage, oprBy: this.$globalState.session.accountName })
if (res) {
this.showDrawer = false
this.$message({
message: '更新成功',
type: 'success'
})
this.refreshTable()
} else throw '更新失败'
} catch (error) {
this.showDrawer = false
this.$message.error(error)
}
}
}
}
</script>
<style scoped lang="scss">
.flex {
display: flex;
align-items: center;
}
.journey-table {
padding: 20px;
border: 1px solid #e5e5e5;
border-radius: 0 4px 4px 4px;
/deep/.el-drawer__header {
margin-bottom: 0;
padding-top: 0;
}
.drawer-title {
font-weight: 500;
font-size: 20px;
color: #333333;
padding: 16px 0;
}
.customer-detail {
height: calc(100% - 63px);
box-sizing: border-box;
border: 1px solid #e5e5e5;
border-right: none;
border-left: none;
padding: 20px;
.info {
.icon {
width: 40px;
height: 40px;
margin-right: 8px;
border-radius: 100%;
overflow: hidden;
}
.text {
font-size: 12px;
color: #666666;
.name {
font-weight: 500;
font-size: 14px;
color: #333333;
margin-bottom: 4px;
}
}
}
.tags {
font-size: 14px;
color: #333333;
display: flex;
flex-wrap: wrap;
margin-top: 20px;
.label {
line-height: 24px;
}
&-item {
margin-bottom: 8px;
.text {
height: 24px;
border-radius: 2px;
padding: 0 8px;
background: #eeedff;
color: #5850ff;
line-height: 24px;
border: none;
&:hover {
opacity: 0.75;
}
}
.disabled {
background: #f3f3f3 !important;
color: #666666 !important;
}
.active {
background: #5850ff !important;
color: #fff !important;
}
.arrow {
margin: 0 4px;
width: 32px;
height: 4px;
position: relative;
&::before {
position: absolute;
width: 100%;
height: 1px;
content: '';
left: 0;
bottom: 0;
background: #5850ff;
}
&::after {
position: absolute;
right: 0;
-webkit-clip-path: polygon(0 0, 0% 100%, 100% 100%);
clip-path: polygon(0 0, 0% 100%, 100% 100%);
bottom: 0;
width: 4px;
height: 4px;
content: '';
background: #5850ff;
}
}
&:last-of-type {
.arrow {
display: none;
}
}
}
}
.file {
margin-top: 12px;
background: #f9f9fe;
padding: 0 20px 20px;
.title {
border-bottom: 1px solid #ebebf9;
height: 46px;
padding-left: 20px;
font-weight: 500;
font-size: 16px;
color: #333333;
width: calc(100% + 40px);
transform: translateX(-20px);
.icon {
width: 20px;
height: 20px;
margin-right: 4px;
}
}
&-item {
margin-top: 16px;
.label {
color: #666666;
margin-left: auto;
width: 120px;
text-align: right;
}
.value {
width: calc(100% - 100px);
line-height: 20px;
}
}
}
}
.footer {
height: 63px;
padding-right: 20px;
box-shadow: none;
justify-content: flex-end;
}
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-10-17 15:00:21
* @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 }" @click="handleExpand(item)">
<div class="collapse-item-tab flex-column-center pl20">
<i class="el-icon-caret-bottom" v-show="stepItem.isExpaned"></i>
<i class="el-icon-caret-right" v-show="!stepItem.isExpaned"></i>
<div class="tab-label">
{{ stepItem.label }}
</div>
</div>
<div class="collapse-item-panel" :style="{ display: stepItem.isExpaned ? 'block' : 'none' }">
<div class="task-item">
<template>
<div class="task-item-head flex-column-center">
<div class="task-item-icon">
<img src="@/assets/config/log.png" />
</div>
<div class="task-item-name">进入条件</div>
<div class="task-item-desc">(描述用户触发何种条件后,将自动变更为该旅程阶段)</div>
</div>
<div class="progress-item-content bg-fff" v-if="stepItem.conditionsList.length">
<div class="progress-item" v-for="(v, k) in stepItem.conditionsList" :key="k">
<span>条件{{ k + 1 }}</span>
<span>{{ spiltString(v, 0) }}</span>
<img src="@/assets/config/arrow.png" v-if="spiltString(v, 1)" />
<span>{{ spiltString(v, 1) }}</span>
</div>
</div>
<div class="empty-panel" v-else>
<div class="empty-img">
<img src="@/assets/empty.png" />
</div>
<div class="empty-txt">
暂无进入条件
</div>
</div>
</template>
<template>
<div class="task-item-sop flex">
<div class="task-sop-l">
<div class="task-item-head flex-column-center">
<div class="task-item-icon">
<img src="@/assets/config/sop.png" />
</div>
<div class="task-item-name">SOP任务</div>
<div class="task-item-desc">(系统面向当前旅程阶段客户的营销计划)</div>
</div>
<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-day">
<img src="@/assets/config/step-border.png" />
<span>第{{ v[0].day }}天</span>
</div>
<div class="step-item-content">
<div v-for="(value, key) in v" :key="key" class="step-time-item flex-column-center">
<div>
<div class="step-item-desc">
<span>[{{ stage_time[value.taskType] }}]发送 | {{ stage[value.taskType] }} |{{ stage_info[value.taskType] }}</span>
</div>
<div class="step-item-name" v-if="value.taskType">{{ stage_prefix[value.taskType].key ? activityInfo[stage_prefix[value.taskType].key] : remind(stage_prefix[value.taskType], k) }}</div>
</div>
<!-- <div class="step-detail-btn" @click="getEmpDetail">详情</div> -->
</div>
</div>
</div>
</div>
<div class="empty-panel" v-else>
<div class="empty-img">
<img src="@/assets/empty.png" />
</div>
<div class="empty-txt">
暂无SOP任务
</div>
</div>
</div>
<div class="task-sop-calendar">
<div class="task-item-head flex-column-center">
<div class="task-item-icon">
<img src="@/assets/config/calendar.png" />
</div>
<div class="task-item-name">SOP日历</div>
</div>
<div class="task-item-content bg-fff">
<div class="calendar-panel">
<div class="calendar-item" v-for="(v, k) in stepItem.sopList" :key="k">
<div class="calendar-day">第{{ v[0].day }}天</div>
<div class="calendar-time flex-column-center" v-for="(value, key) in v" :key="key">
<el-popover placement="top-start" width="100" trigger="click">
<div class="popover-panel" v-for="(t, pkey) in v" :key="pkey">
<div class="flex-column-center">
<span>{{ stage_time[t.taskType] }}</span>
<div :class="['stage-icon', `stage-${stage_icon[t.taskType]}`]"></div>
</div>
<div class="stage-desc">{{ stage[t.taskType] }}</div>
</div>
<div slot="reference" class="flex-column-center" v-if="v.length <= 2">
<span>{{ stage_time[value.taskType] }}</span>
<div :class="['stage-icon', `stage-${stage_icon[value.taskType]}`]"></div>
</div>
<div slot="reference" class="flex-column-center" v-if="v.length > 2 && key == 0">
<span>3条内容</span>
</div>
</el-popover>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
</div>
</div>
<!-- <emp-detail v-if="empVisible" :empVisible="empVisible"></emp-detail> -->
</div>
</template>
<script>
const STAGE = Object.freeze({
4: '门店助手1v1',
3: '门店助手朋友圈',
1: '发送短信',
2: 'AI外呼',
5: '跟进提醒',
6: '客户信息查询'
})
const ICON = Object.freeze({
4: 1,
3: 2,
1: 3,
2: 4,
5: 5,
6: 6
})
const STAGE_INFO = Object.freeze({
4: '本功能将给跟进员工推送1v1任务,由员工向每个客户微信转发对应的营销内容。',
3: '本功能将给跟进员工推送朋友圈任务,由员工一键将营销内容发布微信朋友圈',
1: '本功能将给跟进员工推送短信营销任务,由员工一键确认后系统自动推送营销短信给客户',
2: '本功能将给跟进员工推送AI外呼任务,由员工一键确认后AI外呼平台自动对客户进行外呼',
5: '本功能将给跟进员工推送跟进提醒,提醒员工给客户打一个电话或其他跟进行为。',
6: '本功能配合第三方平台,定时获取到保信息并更新。'
})
const STAGE_TIME = Object.freeze({
4: '09:00',
3: '09:00',
1: '09:00',
2: '16:00',
5: '09:00',
6: '09:00'
})
const STAGE_PREFIX = Object.freeze({
4: {
key: 'activityName'
},
3: {
key: 'activityName'
},
1: {
key: 'textMessage',
label: '短信模版:'
},
2: {
key: 'aiSpeech',
label: 'AI话术模版:'
},
5: {
意向客户: '提醒内容:您有[客户人数] 位客户已进入[旅程阶段],请及时跟进。',
保费报价: ['提醒内容:您有客户保费已出,请尽快联系并提供车险报价。', '提醒内容:3天前您有客户保费已出,请尽快跟进并通过门店助手反馈跟进情况(成功 或者 战败)']
},
6: '查询内容:到保日期'
})
// import empDetail from './empDetail'
export default {
components: {
// empDetail
},
props: {
stepItem: {
type: Object,
default: () => {}
},
activityInfo: {
type: Object,
default: () => {}
}
},
data() {
return {
stage: STAGE,
stage_icon: ICON,
stage_info: STAGE_INFO,
stage_time: STAGE_TIME,
stage_prefix: STAGE_PREFIX,
empVisible: false
}
},
created() {},
methods: {
remind(v, k) {
if (typeof v == 'string') return v
if (this.stepItem.label == '保费报价') {
return v[this.stepItem.label][k]
} else {
return v[this.stepItem.label]
}
},
spiltString(str, n) {
return (str.split('-')[n] || '').replace('文字备注:', '')
},
//查看详情
getEmpDetail() {
this.empVisible = true
},
//展开收起
handleExpand() {
this.stepItem.isExpaned = !this.stepItem.isExpaned
}
}
}
</script>
<style lang="scss" scoped>
.empty-panel {
background: #fff;
padding: 10px;
font-size: 12px;
color: #666666;
text-align: center;
margin: 10px 0px;
.empty-img {
width: 48px;
height: 30px;
margin: 10px auto 4px;
}
}
.collapse-item {
overflow: hidden;
height: 51px;
cursor: pointer;
&.is-active {
height: auto;
}
.collapse-item-tab {
height: 50px;
border-bottom: 1px solid #e5e5e5;
i {
cursor: pointer;
margin-right: 2px;
}
.tab-label {
font-weight: 600;
font-size: 14px;
color: #1d2129;
}
}
.collapse-item-panel {
background: #f7f7fc;
padding: 16px;
transition: all 0.3s;
.task-item {
&-head {
.task-item-icon {
width: 20px;
height: 20px;
}
.task-item-name {
color: #333333;
font-size: 14px;
margin-left: 10px;
}
.task-item-desc {
color: #999999;
font-size: 12px;
}
}
.task-sop-l {
flex: 1;
}
.task-sop-calendar {
width: 296px;
margin-left: 16px;
}
}
.progress-item-content {
padding: 16px;
margin: 10px 0px;
display: grid;
grid-template-columns: 50% 50%;
row-gap: 20px;
.progress-item {
position: relative;
padding-left: 20px;
min-width: 50%;
height: 32px;
display: flex;
align-items: center;
img {
width: 32px;
height: 4px;
margin: 0 10px;
}
span {
display: inline-block;
&:first-child {
margin-right: 40px;
width: 48px;
}
&:last-child {
width: 80px;
}
}
&::before {
content: '';
position: absolute;
width: 6px;
height: 6px;
background: #5850ff;
border-radius: 50%;
left: 0px;
top: 12px;
}
}
}
.task-item-content {
padding: 16px;
margin-top: 10px;
height: calc(100% - 70px);
.step-item-day {
position: relative;
img {
width: 216px;
height: 52px;
}
span {
position: absolute;
top: 18px;
left: 52px;
}
}
.step-item {
.step-time-item {
padding: 12px 16px;
background: #f9fafe;
.step-detail-btn {
margin-left: auto;
font-size: 14px;
color: #5850ff;
cursor: pointer;
}
&:not(:first-child) {
margin-top: 20px;
}
}
&:last-child {
.step-item-content {
border: none;
}
}
}
.step-item-content {
padding: 16px 22px 20px;
border-left: 1px dashed #b8b9ff;
margin: -10px 0px -10px 20px;
}
.step-item-desc {
font-size: 14px;
color: #c6c6c6;
}
.step-item-name {
font-size: 14px;
color: #333333;
margin-top: 8px;
}
.calendar-panel {
display: grid;
grid-template-columns: repeat(4, 25%);
row-gap: 12px;
.calendar-item {
.calendar-day {
font-size: 12px;
color: #c6c6c6;
}
.calendar-time {
line-height: 20px;
/deep/ {
.el-popover__reference-wrapper {
display: flex;
align-items: center;
.el-popover__reference {
height: 32px;
line-height: 32px;
}
&:hover {
span {
color: #5850ff;
}
.stage-1 {
background: url('../../../assets/config/calendar-icon.png') -114px -62px;
}
.stage-2 {
background: url('../../../assets/config/calendar-icon.png') -10px -10px;
}
.stage-3 {
background: url('../../../assets/config/calendar-icon.png') -62px -10px;
}
.stage-4 {
background: url('../../../assets/config/calendar-icon.png') -62px -166px;
}
.stage-5 {
background: url('../../../assets/config/calendar-icon.png') -10px -114px;
}
.stage-6 {
background: url('../../../assets/config/calendar-icon.png') -62px -114px;
}
.stage-7 {
background: url('../../../assets/config/calendar-icon.png') -114px -114px;
}
}
}
}
span {
font-size: 14px;
color: #666666;
text-decoration: underline;
cursor: pointer;
}
}
}
}
}
}
}
.stage-desc {
font-size: 12px;
color: #333333;
}
.stage-icon {
width: 32px;
height: 32px;
transform: scale(0.5);
}
.stage-2 {
background: url('../../../assets/config/calendar-icon.png') -62px -62px;
}
.stage-3 {
background: url('../../../assets/config/calendar-icon.png') -114px -10px;
}
.stage-1 {
background: url('../../../assets/config/calendar-icon.png') -10px -62px;
}
.stage-4 {
background: url('../../../assets/config/calendar-icon.png') -166px -10px;
}
.stage-5 {
background: url('../../../assets/config/calendar-icon.png') -166px -62px;
}
.stage-6 {
background: url('../../../assets/config/calendar-icon.png') -166px -114px;
}
.stage-7 {
background: url('../../../assets/config/calendar-icon.png') -10px -166px;
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-08 11:02:19
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-08 11:13:18
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\components\empDetail.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<GLDialog title="查看详情" @onOk="handleSure" :before-close="handleClose" @onCancel="handleClose" :visible.sync="empVisible">
<div class="dialog-body">
<div class="task-wrap">
<div class="task-item" v-for="(item, index) in taskInfo" :key="index">
<span>{{ item.label }}</span>
</div>
</div>
</div>
</GLDialog>
</template>
<script>
export default {
props: {
empVisible: Boolean
},
data() {
return {
taskInfo: [
{
label: '需执行客户数量'
},
{
label: '已下达任务数量'
},
{
label: '需执行任务员工数'
}
]
}
},
methods: {
//获取活动信息
getActivity() {
console.log(this.addForm.activityId)
},
init() {
this.empVisible = true
this.getActivityList()
},
//关联活动
handleSure() {
this.$refs.addForm.validate(valid => {
if (valid) {
this.handleClose()
this.$emit('setProcess')
}
})
},
handleClose() {
this.empVisible = false
}
}
}
</script>
<style lang="scss" scoped>
.dialog-body {
padding: 16px;
}
</style>
<template>
<GLDialog title="关联营销活动" class="gl-form-page gl-form-min" @onOk="handleSure" :before-close="handleClose" @onCancel="handleClose" :visible.sync="dialogVisible">
<el-form v-loading="loading" ref="addForm" :model="addForm" class="code-body-form" label-width="154px" :rules="addRules">
<el-form-item label="客户旅行:" size="small">
<el-input v-model="addForm.name" :disabled="true"></el-input>
</el-form-item>
<el-form-item label="活动链接:" size="small" prop="activityId">
<div class="flex-column-center">
<el-select filterable v-model="addForm.activityId" placeholder="请选择" @change="getActivity" :disabled="journeyStatus == 3 || journeyStatus == 4">
<el-option v-for="item in activityList" :key="item.id" :label="item.activityName" :value="item.id"></el-option>
</el-select>
<div class="add-btn-a" @click="jumpActivity">创建活动</div>
</div>
</el-form-item>
</el-form>
<div class="activity-detail-border">
<div class="activity-detail-title flex-column-center">
<img src="@/assets/config/a-icon.png" />
<span>营销活动详情</span>
</div>
<div class="activity-detail-info">
<div class="activity-detail-item">
<label>客户数量:</label>
<span>{{ activityInfo.customerNum }}人</span>
</div>
<div class="activity-detail-item">
<label>关联员工:</label>
<div class="emp-wrap">
<div class="emp-item" v-for="(val, i) in activityInfo.staffList" :key="i">
<i class="el-icon-user-solid"></i>
<span>{{ val.staffName }}</span>
</div>
</div>
</div>
<div class="activity-detail-item">
<label>AI话术:</label>
<span>{{ activityInfo.talkNameList[0] }}</span>
</div>
<div class="activity-detail-item">
<label>营销短信:</label>
<span>{{ activityInfo.messageList[0] }}</span>
</div>
</div>
</div>
</GLDialog>
</template>
<script>
import util from '@/utils/util'
export default {
props: {
journeyStatus: Number
},
data() {
return {
dialogVisible: false,
addForm: {
name: this.$route.query.title
},
activityInfo: {
talkNameList: [],
messageList: [],
staffList: []
},
activityList: [],
addRules: {
activityId: [{ required: true, message: '请选择活动链接', trigger: 'change' }]
}
}
},
methods: {
//获取活动信息
getActivity() {
this.$apis.journeyConfig.activityRelInfo({ id: this.addForm.activityId }).then(res => {
if (res) {
this.activityInfo = res
}
})
},
init(info) {
this.dialogVisible = true
this.getActivityList()
if (info.activityId) {
this.addForm.activityId = info.activityId
this.getActivity()
}
},
//创建活动
jumpActivity() {
util.openUrl(`${location.origin}/tools/activityLink/marketingActivity?addOrEdit=add&subscribe=5&$title=新建活动`)
},
//活动列表
getActivityList() {
this.$apis.journeyConfig.activityPage({ pageSize: 10000, currentPage: 1, activityStatus: 2 }).then(res => {
this.activityList = res.list || []
})
},
//关联活动
handleSure() {
if (this.journeyStatus == 3 || this.journeyStatus == 4) {
this.handleClose()
return
}
this.$refs.addForm.validate(valid => {
if (valid) {
this.handleClose()
const { activityName, activityUrl, talkNameList, messageList } = this.activityInfo
this.$emit('setProcess', {
activityId: this.addForm.activityId, // 活动id
activityName,
activityUrl,
aiSpeech: talkNameList[0],
textMessage: messageList[0]
})
}
})
},
handleClose() {
this.dialogVisible = false
}
}
}
</script>
<style lang="scss" scoped>
.add-btn-a {
cursor: pointer;
color: #5850ff;
}
.activity-detail-border {
width: 580px;
background: #f9f9fe;
margin: 20px auto;
.activity-detail-title {
height: 40px;
border-bottom: 1px solid #e5e5e5;
padding-left: 20px;
img {
width: 20px;
height: 20px;
}
span {
font-size: 16px;
color: #333333;
}
}
.activity-detail-info {
padding: 20px;
.activity-detail-item {
font-size: 14px;
margin-bottom: 10px;
display: flex;
align-items: center;
.emp-wrap {
display: flex;
flex-wrap: wrap;
gap: 8px;
.emp-item {
border: 1px solid #e8e8ea;
border-radius: 4px;
padding: 4px;
font-size: 12px;
i {
color: #75acff;
}
}
}
label {
color: #666666;
display: inline-block;
width: 80px;
text-align: right;
margin-right: 5px;
}
span {
color: #333333;
flex: 1;
}
}
}
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-25 19:37:31
* @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">
<template v-for="(item, index) in statusList">
<div class="journey-step-config" v-if="journeyStatus == item.status" :key="index">
<i :class="`${item.icon}`"></i>
<span>{{ item.describe }}</span>
<el-button :type="item.isDisabled ? 'info' : 'primary'" :size="size" @click="item.clickFun" :disabled="item.isDisabled">{{ item.btnName }}</el-button>
</div>
</template>
</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-info" v-for="(val, k) in configList" :key="k">
<collapse-item :stepItem="val" :activityInfo="activityInfo"></collapse-item>
</div>
</div>
</div>
<related-activity ref="activityForm" @setProcess="setProcess" :journeyStatus="journeyStatus"></related-activity>
</div>
</template>
<script>
import CollapseItem from './components/CollapseItem'
import relatedActivity from './components/relatedActivity'
export default {
components: { CollapseItem, relatedActivity },
data() {
return {
journeyStatus: 1,
activityInfo: {},
statusList: [
{
describe: '步骤一:关联营销活动',
icon: 'el-icon-warning',
isDisabled: false,
status: 1,
btnName: '去关联',
clickFun: () => {
this.handleConcat()
}
},
{
describe: '步骤二:启用客户旅程',
icon: 'el-icon-warning',
isDisabled: true,
status: 1,
btnName: '去开启',
clickFun: () => {
this.haneldOpen()
}
},
{
describe: '步骤一:已关联营销活动',
icon: 'el-icon-success',
isDisabled: false,
status: 2,
btnName: '去查看',
clickFun: () => {
this.concatActivity()
}
},
{
describe: '步骤二:启用客户旅程',
icon: 'el-icon-warning',
isDisabled: false,
status: 2,
btnName: '去开启',
clickFun: () => {
this.haneldOpen()
}
},
{
describe: '步骤一:已关联营销活动',
icon: 'el-icon-success',
isDisabled: false,
status: 3,
btnName: '去查看',
clickFun: () => {
this.concatActivity()
}
},
{
describe: '步骤二:已启用客户旅程',
icon: 'el-icon-success',
isDisabled: false,
status: 3,
btnName: '去停用',
clickFun: () => {
this.handleClose(-1)
}
},
{
describe: '步骤一:已关联营销活动',
icon: 'el-icon-success',
isDisabled: false,
status: 4,
btnName: '去查看',
clickFun: () => {
this.concatActivity()
}
},
{
describe: '步骤二:已停用客户旅程',
icon: 'el-icon-success',
isDisabled: true,
status: 4,
btnName: '已停用'
}
],
configList: [],
configList2: [
{
label: '可报价',
isExpaned: false,
taskList: [
{
status: [1, 2],
name: '进入条件',
desc: '描述用户触发何种条件后,将自动变更为该旅程阶',
progressList: [
{
name: '33'
},
{
name: '33'
},
{
name: '33'
}
]
}
]
},
{
label: '有意向',
isExpaned: false,
taskList: [
{
status: [1, 2],
name: '进入条件',
desc: '描述用户触发何种条件后,将自动变更为该旅程阶',
progressList: [
{
name: '33'
}
],
sopList: [
{
day: '第一天',
times: [
{
time: '7:00',
process: 1
},
{
time: '8:00',
process: 2
},
{
time: '9:00',
process: 3
}
]
},
{
day: '第二天',
times: [
{
time: '7:00',
process: 1
},
{
time: '8:00',
process: 2
}
]
},
{
day: '第三天'
},
{
day: '第四天'
},
{
day: '第五天'
}
]
}
]
}
]
}
},
mounted() {
const query = this.$route.query
this.query = query
this.getDetail()
},
methods: {
getDetail() {
this.$apis.journeyConfig.getInstIdDetail({ instId: this.query.instId }).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()]
},
//关闭
handleClose() {
this.handleConfirm('关闭提示', '确定关闭', '旅程关闭后将禁用无法重新开启', '', () => {
this.setSopInsts(-1)
})
},
setSopInsts(status) {
this.$apis.journeyConfig.setSopInsts({ instId: this.query.instId, status }).then(res => {
this.getDetail()
})
},
//关联活动成功
setProcess(data) {
this.$apis.journeyConfig.concatActivity({ instId: this.query.instId, data }).then(res => {
this.getDetail()
})
},
handleConfirm(title, btnName, content, customClass, callback) {
this.$confirm(content, title, {
confirmButtonText: btnName,
cancelButtonText: '取消',
customClass,
type: 'warning'
})
.then(() => {
callback()
})
.catch(() => {})
},
//开启
haneldOpen() {
this.handleConfirm('开启提示', '确定开启', '旅程开启后将无法修改关联的活动链接', '', () => {
this.setSopInsts(1)
})
},
//关联活动
handleConcat() {
this.handleConfirm('关联提示', '前往关联', '当前旅程尚未关联活动链接,请关联后再尝试开启', 'concat-color', this.concatActivity)
},
//打开活动
concatActivity() {
this.$refs.activityForm.init(this.activityInfo)
}
}
}
</script>
<style lang="scss" scoped>
.concat-color {
/deep/ .el-icon-warning {
color: #5850ff;
}
}
.journey-main {
.journey-config {
margin-bottom: 16px;
padding: 20px;
}
.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;
}
}
</style>
<style lang="scss">
.concat-color {
.el-icon-warning {
color: #5850ff;
}
}
</style>
...@@ -2,12 +2,288 @@ ...@@ -2,12 +2,288 @@
* @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-09-05 17:24:18 * @LastEditTime: 2023-10-15 09:47:05
* @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
--> -->
<template> <template>
<div> <div class="journey-main">
6666 <div class="bg-fff p20">
<GLCombiForm ref="formSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="byGroupIdSop" @handleRest="handleReset"></GLCombiForm>
<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', `step-icon-${p.process}`]"></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> </div>
</template> </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: {
async byGroupIdSop() {
const res = await this.$apis.journeyConfig.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-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;
}
.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>
...@@ -297,6 +297,10 @@ export default { ...@@ -297,6 +297,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.headPortrait {
width: 16px;
height: 12px;
}
.scrm-sub-client-container { .scrm-sub-client-container {
/deep/ .el-table .cell { /deep/ .el-table .cell {
text-overflow: clip; text-overflow: clip;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!