Commit ee1a9614 by 前端

Merge branch 'v3.19.0' into 'master'

合并V3.19.0

See merge request !15
2 parents 48c52ffa f30a7563
...@@ -1874,6 +1874,51 @@ ...@@ -1874,6 +1874,51 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true "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": { "ssri": {
"version": "8.0.1", "version": "8.0.1",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
...@@ -1882,6 +1927,28 @@ ...@@ -1882,6 +1927,28 @@
"requires": { "requires": {
"minipass": "^3.1.1" "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"
}
} }
} }
}, },
...@@ -13201,75 +13268,6 @@ ...@@ -13201,75 +13268,6 @@
} }
} }
}, },
"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": { "vue-style-loader": {
"version": "4.1.3", "version": "4.1.3",
"resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz", "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz",
......
...@@ -6,7 +6,10 @@ ...@@ -6,7 +6,10 @@
* @FilePath: \live\src\api\modules\common.js * @FilePath: \live\src\api\modules\common.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
*/ */
import { http_common } from '@/main' import { http_merchant,http_common } from '@/main'
const defaultPath = 'scrm.api.carlife.'
const pictureUpload = params => { const pictureUpload = params => {
params.method = 'glsx.accounts.biz.common.pictureUpload' params.method = 'glsx.accounts.biz.common.pictureUpload'
return http_common({ return http_common({
...@@ -17,6 +20,17 @@ const pictureUpload = params => { ...@@ -17,6 +20,17 @@ const pictureUpload = params => {
noSignAttr: ['file'] noSignAttr: ['file']
}) })
} }
const getMerchantList = params => {
params.method = 'merchants.api.open.findMerchantListByPage'
return http_merchant({
url: 'rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
pictureUpload pictureUpload,
getMerchantList
} }
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-12 09:30:11
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-25 10:43:38
* @FilePath: \scrm-micro-drainage\src\api\modules\businessCard.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http, http_tag } from '@/main'
const getListApi = params => {
// params.method = '/sop/sopTpls'
return http({
url: '/process/sop/api/sopInsts',
method: 'get',
data: params,
sign: true
})
}
// 获取所有的模板列表
const getTplList = params => {
// params.method = '/sop/sopTpls'
return http({
url: '/process/sop/api/sopTpls/list',
method: 'get',
data: params,
sign: true
})
}
const getSOPDetailsApi = (params) => {
// params.method = '/sop/sopTpls'
return http({
url: '/process/sop/api/sopTpls/' + params.tplId,
method: 'GET',
data: params,
sign: true
})
}
const getInsDetailsApi = (params) => {
// params.method = '/sop/sopTpls'
return http({
url: '/process/sop/api/sopInsts/' + params.instId,
method: 'GET',
data: params,
sign: true
})
}
const sopInstsApi = (params) => {
return http({
url: '/process/sop/api/sopInsts',
method: 'POST',
data: params,
sign: false,
noSessionId:true,
returnAll:true
})
}
export default {
getListApi,
getSOPDetailsApi,
getInsDetailsApi,
getTplList,
sopInstsApi
}
...@@ -12,6 +12,9 @@ html { ...@@ -12,6 +12,9 @@ html {
background: #ffffff; background: #ffffff;
padding: 20px; padding: 20px;
} }
.live-room .container-nop {
background: #ffffff;
}
.live-room .m-b-20 { .live-room .m-b-20 {
margin-bottom: 20px; margin-bottom: 20px;
...@@ -50,7 +53,99 @@ html { ...@@ -50,7 +53,99 @@ html {
.live-room .m-r-8 { .live-room .m-r-8 {
margin-right: 8px; margin-right: 8px;
} }
.flex {
display: flex;
}
.bg-fff {
background: #ffffff;
}
.message-Z-zinde, .message-Z-zinde,
.live-room .message-Z-zinde { .live-room .message-Z-zinde {
z-index: 9999 !important; z-index: 9999 !important;
} }
.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;
}
.operate-wrap {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
.table-title {
height: 32px;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 16px;
color: #333333;
line-height: 32px;
}
.operate-btn {
.el-button {
margin-left: 8px;
}
.export-btn {
margin-left: 8px;
}
}
}
import Vue from 'vue'
// export default new Vue()
const Bus = new Vue()
export default Bus
<!-- 弹窗 -->
<template>
<div>
<GLDialog :bigTitle="bigTitle" :title="title" :mode="mode" :visible.sync="isVisible" :show-close="showClose" :before-close="handleClose" :close-on-click-modal="false" :width="width">
<span slot="title">
{{ title }}
<span class="dialog-sub-title">
<slot name="sub-title"></slot>
</span>
</span>
<slot></slot>
<div slot="footer">
<slot name="btn-start"></slot>
<el-button type="primary" :size="btnSize" @click="handleConfirm">{{ btnOkLabel }}</el-button>
<el-button v-if="!noCancel" :size="btnSize" @click="handleClose">取消</el-button>
<slot name="btn-middle"></slot>
</div>
</GLDialog>
</div>
</template>
<script>
export default {
name: 'glsx-dialog',
data() {
return {}
},
props: {
title: {
type: String,
default: ''
},
isVisible: {
type: Boolean,
default: false
},
showClose: {
type: Boolean,
default: true
},
btnOkLabel: {
type: String,
default: '确定'
},
noCancel: {
type: Boolean,
default: false
},
width: {
type: String,
default: '580px'
},
btnSize: {
type: String,
default: 'small'
},
mode:{
type: String,
default: 'mid'
},
bigTitle:{
type: String,
default: ''
}
},
methods: {
handleClose() {
this.$emit('closeDialog')
},
handleConfirm() {
this.$emit('confirmDialog')
}
}
}
</script>
<style scoped>
.dialog-sub-title {
font-size: 12px;
color: #666666;
}
</style>
...@@ -12,7 +12,8 @@ let cfg = require('./conf.js') ...@@ -12,7 +12,8 @@ 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 params = { moduleName: 'peregrination', mockUrl: 'https://oss-config.glsx.com.cn/mock/63c12a2e28a427953783403b/link/config', httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } } let params = { moduleName: 'peregrination', mockUrl: 'https://oss-config.glsx.com.cn/mock/63c12a2e28a427953783403b/peregrination/config', httpOptions: { Headers: { refererurl: location.href }, request: { timeout: 30000 } } }
console.log(common.utils.getConfig(params))
return common.utils.getConfig(params) return common.utils.getConfig(params)
} }
export const config = { export const config = {
......
...@@ -14,10 +14,14 @@ import '@/assets/css/public.scss' ...@@ -14,10 +14,14 @@ import '@/assets/css/public.scss'
import '@/components' import '@/components'
// import 'glsx-components/dist/glsx-components.css' // import 'glsx-components/dist/glsx-components.css'
import { start } from '@/setup' import { start } from '@/setup'
import Bus from '../src/bus' //这是我的路径,正确引用你们的路径
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.prototype.$apis = apis Vue.prototype.$apis = apis
Vue.prototype.$bus = Bus
Vue.prototype.size = 'small' Vue.prototype.size = 'small'
start() 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_merchant = params => Vue.prototype.$http_merchant(params)
export const http_common = params => Vue.prototype.$http_common(params) export const http_common = params => Vue.prototype.$http_common(params)
...@@ -7,34 +7,60 @@ ...@@ -7,34 +7,60 @@
* @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
*/ */
import Vue from 'vue' import Vue from 'vue'
import { message, messageBox } from '@/plugins/element.js' import {message, messageBox} from '@/plugins/element.js'
import { fetchConfig } from '@/config' import {fetchConfig} from '@/config'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建) import {GLButton, GLTable} from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router' import {getRoutes} from '@/router'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import render from './render' import render from './render'
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
let routes = [] let routes = []
let router = null let router = null
let instance = null let instance = null
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
export async function bootstrap({ history, common, messenger, globalState }) {
const { response, request, sign, secret, sign_common, request_common } = await fetchConfig(common) export async function bootstrap({history, common, messenger, globalState}) {
const {response, request, sign, secret, sign_common, request_common, request_merchant,response_sop} = 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
Vue.prototype.$common = common Vue.prototype.$common = common
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({
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 } }) response:response_sop,
request,
sign,
secret,
alert: message.error,
headers: {token: globalState.session.token, 'Content-Type': 'application/json'}
})
Vue.prototype.$http_merchant = new common.Http({
response,
request: request_merchant,
sign,
secret,
alert: message.error,
headers: {token: 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.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) 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})
} }
export async function mount(props) { export async function mount(props) {
const insts = render(props.routerBase, routes) const insts = render(props.routerBase, routes)
router = insts.router router = insts.router
...@@ -48,7 +74,7 @@ export async function unmount() { ...@@ -48,7 +74,7 @@ export async function unmount() {
router = null router = null
} }
function subscribe({ messenger }) { function subscribe({messenger}) {
messenger.subscribe(v => { messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v) console.log(`监听到子应用${v.from}发来消息:`, v)
}) })
......
<template>
<div class="live-room">
<div class="m-b-20">
<step-bar @changeStep="changeIndex">
<template slot="center">
<div class="journey-step bg-fff pb20">
<div class="journey-step-title border-title">
{{ titleConfig[currentIndex] }}
</div>
<div class="journey-step-body">
<SelJourneyTemplate v-show="currentIndex == '0'" ref="journeyTemplat"></SelJourneyTemplate>
<div v-if="currentIndex == '1'">
<!-- <div class="journey-step-info" v-for="(val, k) in configList" :key="k">-->
<!-- configList-->
<collapse-item-tpl ref="collapseRef" :configList="configList"
:isDisabled="isDisabled"></collapse-item-tpl>
<!-- </div>-->
</div>
<DistributionStore v-if="currentIndex == '2'"></DistributionStore>
</div>
</div>
</template>
</step-bar>
</div>
</div>
</template>
<script>
import StepBar from './components/StepBar.vue'
import CollapseItemTpl from './components/CollapseItemTpl'
import SelJourneyTemplate from "./components/selJourneyTemplate";
import DistributionStore from "./components/DistributionStore";
export default {
components: {
StepBar,
SelJourneyTemplate,
CollapseItemTpl,
DistributionStore
},
name: "add",
data() {
return {
ruleForm: {
name: '',
region: ''
},
rules: {
region: [
{required: true, message: '请选择活动区域', trigger: 'change'}
],
},
titleConfig: {
'0': '旅程模板',
'1': '客户旅程阶段',
'2': '分配门店'
},
isDisabled: false,
currentIndex: 0,
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() {
// this.$bus.$off('whetherToProceedNext')
this.$bus.$on('whetherToProceedNext', (data) => {
const query = data.tplId
this.getDetail(query)
})
},
methods: {
changeIndex(currentInex) {
this.currentIndex = currentInex
},
getDetail(val) {
this.$apis.journeyConfig.getSOPDetailsApi({tplId: val}).then(res => {
const tplParamDef = JSON.parse(res.tplParamDef)
const stages = tplParamDef.stages.defaultValue
const customData = tplParamDef.customData.defaultValue
const nodes = res.nodes
const configList = []
for (let k in stages) {
let list = []
for (let v of nodes) {
if (v.nodeParamDef && JSON.parse(v.nodeParamDef).stage.defaultValue == stages[k].value) {
list.push({
...JSON.parse(v.nodeParamDef),
nodeSkipable: v.nodeSkipable,
nodeId: v.nodeId,
nodeSkip: '0',
nodeVisible: v.nodeVisible,// nodeVisible 0 节点不可见 1 可见
customData
})
}
}
list = list.filter(item => item.day)
list.sort((a, b) => {
return a.day.defaultValue - b.day.defaultValue
})
let sopList = this.groupBy(list, 'day.defaultValue')
sopList = sopList.map(function (arr) {
return arr.filter(function (obj) {
// nodeVisible 0 节点不可见 1 可见
return obj.nodeVisible == 1;
});
});
configList.push({
label: stages[k].value,
isExpaned: true,
conditionsList: stages[k].conditions || [],
sopList
})
}
console.log(configList, 'configList')
this.configList = configList
})
},
groupBy(list, name) {
const m = new Map()
list.map(item => {
m.set(item['day']['defaultValue'], [...(m.get(item['day']['defaultValue']) || ''), item])
})
return [...m.values()]
},
//关闭
handleClose() {
this.handleConfirm('关闭提示', '确定关闭', '旅程关闭后将禁用无法重新开启', '', () => {
this.journeyStatus = 4
})
},
//关联活动成功
setProcess() {
this.journeyStatus = 2
},
handleConfirm(title, btnName, content, customClass, callback) {
this.$confirm(content, title, {
confirmButtonText: btnName,
cancelButtonText: '取消',
customClass,
type: 'warning'
})
.then(() => {
callback()
})
.catch(() => {
})
},
//开启
haneldOpen() {
this.handleConfirm('开启提示', '确定开启', '旅程开启后将无法修改关联的活动链接', '', () => {
this.journeyStatus = 3
})
},
//关联活动
handleConcat() {
this.handleConfirm('关联提示', '前往关联', '当前旅程尚未关联活动链接,请关联后再尝试开启', 'concat-color', this.concatActivity)
},
//打开活动
concatActivity() {
this.$refs.activityForm.init()
},
changeNode(val) {
console.log(val)
}
},
}
</script>
<style lang="scss" scoped>
/deep/ .journey-step-body {
min-height: calc(100vh - 350px);
}
</style>
<style lang="scss">
.concat-color {
.el-icon-warning {
color: #5850ff;
}
}
</style>
<template>
<div class="container">
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true"
:formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="merchantHtml">
<el-button type="default" class="el-icon-plus" v-if="!isDisabled" @click="handleOpen">分配门店</el-button>
<div class="mer-des">请选择门店分配旅程模版</div>
<GLTable ref="memberCenterRef"
:tableData="tableData"
:hasPage="false"
:tableParams="tableParams">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
</div>
</glsx-combi-form>
<MerchantStore v-if="relateStoreVisible" ref="relateStore" :dialogVisible="relateStoreVisible"
:storeSelected="selectedList" :merchantInfo="editForm"
@handleRelateStoreConfirm="handleRelateStoreConfirm"
@handleRelateStoreClose="handleRelateStoreClose"></MerchantStore>
</div>
</template>
<script>
import MerchantStore from "views/journeyConfig/components/merchantStore";
export default {
name: "DistributionStore",
components: {
MerchantStore
},
data() {
return {
editChildRef: 'editChildRef',
editForm: {
merchantId: '',
merchantName: ''
},
editFormData: [
{
label: '可见商户',
name: 'merchantId',
addHtml: 'merchantHtml'
}
],
editRule: {
merchantId: [{
required: true, validator: (rule, value, callback) => {
if (this.editForm.merchantId) {
callback()
} else {
callback(new Error(`请选择门店`))
}
}, trigger: 'change'
}],
},
selectedList: [],
tableData: [],
relateStoreVisible: false,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '商户号',
prop: 'groupId',
},
{
label: '商户名称',
prop: 'groupName',
}
],
},
// 表格按钮
tableButtonList: [
{
type: 'el-button',
name: '删除',
attrs: {
type: 'text'
},
listeners: {
click: () => {
this.tableData = []
this.editForm={
merchantId: '',
merchantName: ''
}
}
}
}
],
}
},
methods: {
handleOpen() {
this.tableData = []
this.relateStoreVisible = !this.relateStoreVisible
},
//搜索门店table
handleSearchStore() {
this.$refs.relateStore.handleCurrentChange(1)
},
handleRelateStoreConfirm(selectedData) {
if (!selectedData.merchantId && !selectedData.merchantName){
this.$message.error('请选择门店')
return
}
this.editForm = selectedData
this.$refs.editFormRef.$refs[this.editChildRef].clearValidate('merchantId')
selectedData.merchantId && (this.editForm.merchantId = selectedData.merchantId)
selectedData.merchantName && ((this.editForm.merchantName = selectedData.merchantName), (this.merchantFlag = false))
this.tableData.push({
groupId: selectedData.merchantId,
groupName: selectedData.merchantName,
})
this.handleRelateStoreClose()
},
handleRelateStoreClose() {
this.relateStoreVisible = false
},
handleVertify() {
this.$refs.editFormRef.$refs[this.editChildRef]?.validate(valid => {
if (!this.editForm.merchantName) {
this.merchantFlag = true
return
}
this.$bus.$emit('saveEvent', {isNext: valid, sopTplGrants: this.tableData})
})
}
},
mounted() {
this.$bus.$on('vertifyMerchant', data => {
this.handleVertify()
})
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-form-item__content {
width: 80% !important;
}
.mer-des{
color: #C6C6C6;
font-size: 12px;
}
</style>
<template>
<div>
<div class="step-bar container m-b-20">
<div v-for="(step, index) in steps" :key="index" class="step ">
<div :class="['step-content', { 'active': index === currentStep },{ 'completed': index < currentStep }]">
<div class="step-circle">{{ currentStep > index ? '' : index + 1 }}</div>
<div class="step-label">{{ step }}</div>
</div>
<div class="step-line" v-if="index < steps.length - 1"></div>
</div>
</div>
<div class="center">
<slot name="center"></slot>
</div>
<div class="button-container">
<el-button v-if="currentStep > 0" @click="previousStep" class="previous-button">上一步</el-button>
<el-button v-if="currentStep == 0" @click="cancelOptions" class="previous-button">取消</el-button>
<el-button type="primary" v-if="currentStep < steps.length - 1" @click="nextStep" class="next-button">下一步
</el-button>
<el-button type="primary" v-if="currentStep == steps.length - 1" class="previous-button" @click="saveTemplate">
保存
</el-button>
</div>
</div>
</template>
<script>
export default {
data() {
return {
currentStep: 0, // 当前步骤
isNext: false,
steps: ['选择旅程模版', '配置旅程SOP', '分配门店'], // 步骤条的文本
tplId: '',
sopTplGrants: null,
nodes:[]
};
},
methods: {
previousStep() {
if (this.currentStep > 0) {
this.currentStep--;
this.$emit('changeStep', this.currentStep)
}
},
nextStep() {
// 每次进入先把isNext赋值为false 校验通过后再赋值为true
this.isNext = false
if (this.currentStep == 0) {
this.$bus.$emit('vertifyTemplate', {currentStep: this.currentStep})
}
if (this.currentStep < this.steps.length - 1 && (this.isNext || this.currentStep == 1)) {
this.currentStep++;
this.$emit('changeStep', this.currentStep)
}
},
cancelOptions() {
this.$router.back()
},
saveTemplate() {
// 校验门店
this.isNext = false
this.$bus.$emit('vertifyMerchant', {currentStep: this.currentStep})
let params = {
tplId: this.tplId,
sopTplGrants:this.sopTplGrants,
nodes:this.nodes
}
if (this.isNext){
this.$apis.journeyConfig.sopInstsApi(params).then(res=>{
if (res && res.code == 200 ){
console.log(res)
this.$message.success('创建模板实例成功')
this.$router.back()
}else{
this.$message.error(res.message)
}
}).catch(err => {
console.log(err + 'err')
})
}
}
},
mounted() {
this.$bus.$on('whetherToProceedNext', (data) => {
this.isNext = data.isNext
this.tplId = data.tplId
})
this.$bus.$on('saveEvent', (data) => {
this.isNext = data.isNext
this.sopTplGrants = data.sopTplGrants
})
this.$bus.$on('sopListSet',data =>{
this.nodes = data.sopList
})
}
};
</script>
<style lang="scss" scoped>
.step-bar {
display: flex;
align-items: center;
justify-content: center;
.step {
display: flex;
align-items: center;
//margin: 0 10px;
&::before {
content: '';
flex-grow: 1;
height: 2px;
background-color: #ccc;
margin-right: 5px;
}
&:first-child::before {
display: none;
}
& .active {
.step-circle {
border-color: #5850FF;
background: #5850FF;
color: #ffffff;
}
.step-label {
color: #5850FF;
}
}
& .completed {
.step-circle {
border-color: #5850FF;
&::after {
content: "√";
color: #5850FF;
font-size: 20px;
}
}
}
.step-line {
height: 1px;
width: 200px;
background: #ccc;
margin-left: 10px;
}
.step-content {
display: flex;
align-items: center;
}
.step-circle {
width: 40px;
height: 40px;
border-radius: 50%;
border: 2px solid #ccc;
display: flex;
align-items: center;
justify-content: center;
}
.step-label {
margin-left: 10px;
text-align: center;
}
}
}
//.center{
// min-height: 700px;
//}
.button-container {
//bottom: 0;
display: flex;
justify-content: center;
margin-top: 20px;
.previous-button,
.next-button {
padding: 10px 20px;
margin: 0 10px;
}
}
</style>
<template>
<div class="select-store">
<!-- width="600px" -->
<GLDialog bigTitle="选择门店"
mode="big"
:visible.sync="dialogVisible"
:before-close="handleClose"
:close-on-click-modal="false"
@onOk="handleConfirm"
@onCancel="handleClose">
<glsx-combi-form ref="showSearch"
class="single-merchant"
labelWidth="105px"
:formObj="searchForm"
:formData="searchFormData">
<span slot="footer">
<el-button class="btn" :size="size"
type="primary"
@click="resetTable">查询</el-button>
</span>
</glsx-combi-form>
<!-- : :hasPage="false"
:getListApi="getListApi"
:tableData="storeList" -->
<GLTable ref="storeRef"
:noDataImg="url"
:tableTotal="total"
:searchForm="searchForm"
:tableParams="tableParams"
:pageConf="pageConf"
@refreshTable="getList"
:tableData="storeList"
:hasNum="false"
:setTableFinishFun="setTableFinishFun">
<div slot="radioHtml"
class="store-table"
slot-scope="scope">
<el-radio v-model="merchantId"
:label="scope.scope.merchantNo"
@click.native="handleClick(scope.scope)"></el-radio>
</div>
</GLTable>
<!-- <span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleClose">取 消</el-button>
<el-button size="small" type="primary" @click="handleConfirm">确 定</el-button>
</span> -->
</GLDialog>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'selectStore',
data() {
return {
url: url,
searchForm: {
merchantId: '',
merchantName: ''
},
// getListApi: this.$apis.common.getMerchantList,
total: 0,
storeList: [],
heightBox: 200,
merchantId: '',
merchantName: '',
// 搜索
searchFormData: [
{
label: '商户名称',
name: 'merchantName',
type: 'input',
placeholder: '请输入商户名称',
width: '300px',
labelWidth: '10px'
},
{
label: '商户ID',
name: 'merchantId',
type: 'input',
inputType: 'number',
placeholder: '请输入商户ID',
width: '300px',
labelWidth: '10px'
}
],
pageConfig: {
pageSize: 10,
pageNum: 1
},
tableParams: {
listName: 'list',
// tableOption: true,
// 行数据的key
// mutiSelectUniqueKey: 'staffId',
// checkSelectKey: 'staffId',
// checkSelectVal: [],
// 多选ref的名称
// mutiSelectName: 'list',
tableColumns: [
{
label: '',
prop: '',
width: 80,
addHtml: 'radioHtml'
},
{
label: '序号',
prop: 'idx',
width: 80
},
{
label: '商户名称',
prop: 'merchantName',
formatter: cellValue => {
return cellValue.merchantName || '-'
}
},
{
label: '商户id',
prop: 'merchantNo',
formatter: cellValue => {
return cellValue.merchantNo || '-'
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
baseData: {}
}
},
props: {
dialogVisible: {
type: Boolean,
default: false
},
storeSearchForm: {
type: Object
},
merchantInfo: {
required: true
}
// merchantId: {
// type: String,
//
// }
// orderCode: {
// type: String,
// required: true
// }
},
mounted() {
// this.userInfo = this.$globalState.session
let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 425
this.merchantId = this.merchantInfo.merchantId
this.merchantName = this.merchantInfo.merchantName
this.getList()
},
methods: {
getList(pageCon) {
pageCon && (this.pageConfig = pageCon)
var params = {
merchantAccountLevel:[4],
merchantId: this.merchantId,
...this.searchForm,
...this.pageConfig
// merchantId: '44209390',
}
this.$apis.common.getMerchantList(params).then(res => {
this.storeList = res.data
this.total = res.count
// // this.storeList = res.staffUnitList
// // var page = this.$refs.staffRef.page
// // // 添加序号
// pageConfig
let nowIndex = this.pageConfig.pageSize * (this.pageConfig.pageNum - 1)
this.storeList.forEach((item, index) => {
item.idx = index + 1 + nowIndex
})
// this.$refs.staffRef.tableHeightValues = '460px'
// })
})
},
resetTable() {
this.$refs.storeRef.page.currentPage = 1
this.getList()
},
setTableFinishFun() {
// console.log(this.$refs.staffRef.data)
// this.storeList = this.$refs.staffRef.data
//接收到的数据为空
this.$refs.staffRef.tableHeightValues = '460px'
},
handleClick(val) {
// let { merchantId, merchantName } =val
this.merchantId = val.merchantNo
this.merchantName = val.merchantName
// let temp = JSON.parse(JSON.stringify(val))
// delete temp.idx
// this.staffUuid = val.uuid
// this.store = val
},
handleClose() {
this.$emit('handleRelateStoreClose')
},
handleConfirm() {
// if (!this.staffUuid)
// return this.$message({
// message: '请先选择员工',
// type: 'error'
// })
// let parmas = {
// subOrderCode: this.orderCode,
// staffUuid: this.staffUuid
// }
// this.$apis.orderManage.signerOrder(parmas).then(res => {
// console.log(res)
// })
// this.staffUuid
this.$emit('handleRelateStoreConfirm', {
merchantId: this.merchantId,
merchantName: this.merchantName
})
}
}
}
</script>
<style lang="scss">
.select-store {
.storeDailog {
width: 500px;
}
.single-merchant{
.el-form {
display: flex;
.el-form-item{
display: flex;
}
.el-form-item:nth-child(2){
margin-right: 12px!important;
}
.btn{
margin-top: 1px;
}
}
}
.title {
margin-bottom: 12px;
}
.customer-tag-box {
display: flex;
margin: 20px 16px;
.tag-label {
display: inline-block;
height: 30px;
line-height: 30px;
}
.input-tag-wrapper {
max-height: 75px;
overflow: auto;
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding: 5px;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 648px;
display: flex;
align-items: center;
cursor: pointer;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
}
// .customer-list {
// width: calc(100% - 280px);
// margin-right: 10px;
// }
.p-16 {
padding: 16px;
}
.store-table .el-radio__label {
display: none;
}
}
</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 != 1">
<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.total }}人</span>
</div>
<div class="activity-detail-item">
<label>关联员工:</label>
<div class="emp-wrap">
<div class="emp-item" v-for="(val, i) in activityInfo.emp" :key="i">
<i class="el-icon-user-solid"></i>
<span>{{ val.username }}</span>
</div>
</div>
</div>
<div class="activity-detail-item">
<label>AI话术:</label>
<span>{{ activityInfo.ai }}人</span>
</div>
<div class="activity-detail-item">
<label>营销短信:</label>
<span>{{ activityInfo.message }}人</span>
</div>
</div>
</div>
</GLDialog>
</template>
<script>
export default {
props: {
journeyStatus: Number
},
data() {
return {
dialogVisible: false,
addForm: {},
activityInfo: {
message: '【东莞睿博】千元礼包,钜惠来袭,诚邀参与#活动名称#活动',
total: 20,
emp: [{ username: '张珊' }, { username: '李即' }],
ai: '沃尔沃续保招揽AI话术'
},
activityList: [],
addRules: {
activityId: [{ required: true, message: '请选择活动链接', trigger: 'change' }]
}
}
},
methods: {
//获取活动信息
getActivity() {
console.log(this.addForm.activityId)
},
init() {
this.dialogVisible = true
this.getActivityList()
},
//创建活动
jumpActivity() {
this.$history.push(`/link/activityLink/marketingActivity?addOrEdit=add&subscribe=5&$title=新建活动`)
},
//活动列表
getActivityList() {
this.$apis.journeyConfig.activityPage({ pageSize: 10000, currentPage: 1 }).then(res => {
this.activityList = res.list || []
})
},
//关联活动
handleSure() {
this.$refs.addForm.validate(valid => {
if (valid) {
this.handleClose()
this.$emit('setProcess')
}
})
},
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;
}
}
}
}
</style>
<template>
<div class="journey-template">
<el-form :model="tplList" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="旅程模板" prop="tplId">
<el-select v-model="tplList.tplId" placeholder="请选择旅程模板">
<el-option
v-for="(item,index) in templateArr"
:key="index"
:label="item.tplName" :value="item.tplId"></el-option>
</el-select>
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
name: "selJourneyTemplate",
data() {
return {
tplList: {
tplId: ''
},
rules: {
tplId: [
{required: true, message: '请选择旅程模块', trigger: 'change'}
],
},
templateArr: null
}
},
mounted() {
this.$bus.$on('vertifyTemplate', (data) => {
this.$refs.ruleForm?.validate((valid) => {
// 是否可以进行下一步
this.$bus.$emit('whetherToProceedNext', {isNext: valid, tplId: this.tplList.tplId})
});
})
},
async created() {
await this.getTplList()
},
methods: {
getTplList() {
this.$apis.journeyConfig.getTplList().then(res => {
this.templateArr = res
if (res.length == 1){
this.tplList.tplId = res[0].tplId
}
})
}
}
}
</script>
<style lang="scss" scoped>
.demo-ruleForm {
padding: 32px 65px;
}
.el-select{
width: 350px;
}
</style>
const searchConfig ={
data(){
return{
tableSearchForm:{},
searchFormData:[
{
label: '模板ID',
name: 'instId',
type: 'input',
maxlength:20
},
{
label: '模板名称',
name: 'instName',
type: 'input',
maxlength:20
}
]
}
}
}
export default searchConfig
const tableConfig = {
data() {
return {
getListApi: this.$apis.journeyConfig.getListApi,
pageConf: {pageSize: 'pageSize', pageNum: 'pageNumber', totalCount: 'total'},
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '模板ID',
prop: 'instId',
},
{
label: '旅程模板名称',
prop: 'instName',
},
{
label: '旅程阶段',
prop: 'instRemark',
addHtml: 'instRemark',
width:320
},
{
label: '门店名称',
prop: 'sopTplGrant',
formatter: cellValue => {
return cellValue.sopTplGrant && cellValue.sopTplGrant.groupName
}
},
{
label: '创建时间',
prop: 'createTime',
},
{
label: '修改时间',
prop: 'updateTime',
}
],
},
tableButtonList: [
{
type: 'el-button',
name: '模板实例详情',
attrs: {
type: 'text'
},
listeners: {
click: row => this.gotoDetails(row.instId)
}
}
],
}
}
}
export default tableConfig
<template>
<div class="live-room">
<div class="journey-step bg-fff pb20 setHeight">
<div class="journey-step-title border-title">
客户旅程阶段
</div>
<div class="journey-step-body">
<collapse-item ref="collapseRef" :configList="configList" :isDisabled="isDisabled"></collapse-item>
</div>
</div>
</div>
</template>
<script>
import CollapseItem from './components/CollapseItem'
export default {
components: {
CollapseItem,
},
data() {
return {
configList: [
// {
// 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: '第五天'
// }
// ]
// }
// ]
// }
],
isDisabled: true
}
},
mounted() {
const query = this.$route.query || ''
this.getDetail(query.id)
},
methods: {
getDetail(val) {
this.$apis.journeyConfig.getInsDetailsApi({instId: val}).then(res => {
const instParam = JSON.parse(res.instParam)
const stages = instParam.stages
const customData = instParam.customData
// .defaultValue
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),
nodeSkip: v.nodeSkip,
nodeVisible: v.nodeVisible,
nodeId: v.nodeId,
customData
})
}
}
list = list.filter(item => item.day)
list.sort((a, b) => {
return a.day - b.day
})
let sopList = this.groupBy(list, 'day')
sopList = sopList.map(function (arr) {
return arr.filter(function (obj) {
// nodeVisible 0 节点不可见 1 可见
// nodeSkip 0 节点不跳过 1 节点跳过
return obj.nodeSkip == 0 && obj.nodeVisible == 1;
});
});
configList.push({
label: stages[k].value,
isExpaned: true,
conditionsList: stages[k].conditions || [],
sopList
})
}
console.log(configList, 'configList')
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>
.setHeight {
min-height: calc(100vh - 120px);
padding-bottom: 20px;
}
</style>
...@@ -7,7 +7,101 @@ ...@@ -7,7 +7,101 @@
* @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 class="live-room">
<div class="container">
<GLCombiForm ref="showSearch" class="search-wrap" :rowNumber="1" :formObj="tableSearchForm"
:formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset">
</GLCombiForm>
<div class="operate-wrap">
<span class="table-title">旅程模板实例列表</span>
<div> <div>
6666 <el-button class="operate-btn" type="primary" size="small" @click="createJourneyTemplate" plain>创建旅程模板实例
</el-button>
</div>
</div>
<GLTable ref="memberCenterRef" @setTableFinishFun="setTableFinishFun" :searchForm="tableSearchForm"
:tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf"
:beforeSearchFn="beforeSearchFn">
<div slot="instRemark" slot-scope="scope" style="display:flex">
<div v-for="(item,index) in handleStage(scope)" :key="index">
<div v-if="index <= 3" style="display:flex">
{{ item.name }}
<span>{{ getCommaSeparator('less', index, scope) }}</span>
</div>
<div v-if="index > 3">
<el-popover placement="top" width="600" trigger="hover"
content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<span slot="reference" style="cursor: pointer">...</span>
<div class="entmicro-hover" style="display:flex">
<div v-for="(item,index) in handleStage(scope)" :key="index">
<div style="display:flex">
{{ item.name }}
<span>{{ getCommaSeparator('more', index, scope) }}</span>
</div>
</div>
</div>
</el-popover>
</div>
</div>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
</div>
</div> </div>
</template> </template>
<script>
import searchConfig from './config/search-config'
import tableConfig from "./config/table-config";
export default {
mixins: [searchConfig, tableConfig],
data() {
return {}
},
methods: {
createJourneyTemplate() {
this.$router.push('./add')
},
gotoDetails(id) {
this.$router.push({
path: './details', query: {id}
})
},
handleSearch() {
this.$refs.memberCenterRef.refreshTable()
},
handleReset() {
this.tableSearchForm = {},
this.$refs.memberCenterRef.refreshTable()
},
getCommaSeparator(lessOrMore, index, scope) {
return lessOrMore == 'less' ? index < this.handleStage(scope).length - 1 && index !== 3 ? '、' : '' : index < this.handleStage(scope).length - 1 ? '、' : ''
},
handleStage(scope) {
let stages = JSON.parse(scope.scope.instParam).stages
let list = []
for (let k in stages) {
list.push({
name: stages[k].value
})
}
return list
}
}
}
</script>
<style>
.v-modal {
z-index: 1000 !important;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!