Commit b90c9e2b by 前端

Merge branch 'v3.23.1' into 'master'

V3.23.1

See merge request !16
2 parents ee1a9614 5a8ebae6
...@@ -15,6 +15,11 @@ ...@@ -15,6 +15,11 @@
"js-message": "1.0.7" "js-message": "1.0.7"
} }
}, },
"@amap/amap-jsapi-loader": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz",
"integrity": "sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw=="
},
"@ampproject/remapping": { "@ampproject/remapping": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz",
...@@ -1874,51 +1879,6 @@ ...@@ -1874,51 +1879,6 @@
"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",
...@@ -1927,28 +1887,6 @@ ...@@ -1927,28 +1887,6 @@
"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"
}
} }
} }
}, },
...@@ -2644,6 +2582,14 @@ ...@@ -2644,6 +2582,14 @@
"integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==",
"dev": true "dev": true
}, },
"axios": {
"version": "0.21.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"requires": {
"follow-redirects": "^1.14.0"
}
},
"babel-eslint": { "babel-eslint": {
"version": "10.1.0", "version": "10.1.0",
"resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz",
...@@ -13005,6 +12951,21 @@ ...@@ -13005,6 +12951,21 @@
"integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==", "integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==",
"dev": true "dev": true
}, },
"uppercamelcase": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/uppercamelcase/-/uppercamelcase-1.1.0.tgz",
"integrity": "sha512-C7YEMvhgrvTEKEEVqA7LXNID/1TvvIwYZqNIKLquS6y/MGSkRQAav9LnTTILlC1RqUM8eTVBOe1U/fnB652PRA==",
"requires": {
"camelcase": "^1.2.1"
},
"dependencies": {
"camelcase": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
"integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g=="
}
}
},
"uri-js": { "uri-js": {
"version": "4.4.1", "version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
...@@ -13188,6 +13149,14 @@ ...@@ -13188,6 +13149,14 @@
"csstype": "^3.1.0" "csstype": "^3.1.0"
} }
}, },
"vue-amap": {
"version": "0.5.10",
"resolved": "https://registry.npmjs.org/vue-amap/-/vue-amap-0.5.10.tgz",
"integrity": "sha512-9ViNCev1vx32+zZ5RvF/TmUZNbwL9QrdA2/OnD2GlXMfQBkJy7D08Vb7379t6guqnopDPtWJ8K6gg72h9+4GUg==",
"requires": {
"uppercamelcase": "^1.1.0"
}
},
"vue-cli-plugin-element": { "vue-cli-plugin-element": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/vue-cli-plugin-element/-/vue-cli-plugin-element-1.0.1.tgz", "resolved": "https://registry.npmjs.org/vue-cli-plugin-element/-/vue-cli-plugin-element-1.0.1.tgz",
...@@ -13268,6 +13237,75 @@ ...@@ -13268,6 +13237,75 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-style-loader": { "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",
...@@ -14044,6 +14082,39 @@ ...@@ -14044,6 +14082,39 @@
"dayjs": "^1.8.25" "dayjs": "^1.8.25"
} }
}, },
"word-edit": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/word-edit/-/word-edit-1.3.5.tgz",
"integrity": "sha512-9vc+0V3l+QNXrmsZQd800DuE2aftlNxloFPCgJz6hnn68DrimH3IP9UM2xliBkld8I6FHtHAMLZWhlMuJ6f5Nw==",
"requires": {
"@amap/amap-jsapi-loader": "^1.0.1",
"core-js": "^3.6.5",
"dayjs": "^1.11.10",
"element-ui": "^2.15.6",
"glsx-common": "^1.4.9",
"vue": "^2.6.11",
"vue-amap": "^0.5.10",
"vuedraggable": "^2.24.3"
},
"dependencies": {
"dayjs": {
"version": "1.11.10",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz",
"integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ=="
},
"glsx-common": {
"version": "1.4.9",
"resolved": "https://registry.npmjs.org/glsx-common/-/glsx-common-1.4.9.tgz",
"integrity": "sha512-RQWGOGEXUPNmHkZn7n+eukkXp6L/mOfsgMo4gFtrt80ZDxGaznHMg7Isi4+IrEdvVdzp8Cju0eiCTddnZfdsJg==",
"requires": {
"axios": "^0.21.3",
"md5": "^2.3.0",
"qs": "^6.10.1",
"sha1": "^1.1.1"
}
}
}
},
"word-wrap": { "word-wrap": {
"version": "1.2.3", "version": "1.2.3",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
"dayjs": "^1.10.7", "dayjs": "^1.10.7",
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"glsx-common": "^2.0.4", "glsx-common": "^2.0.4",
"glsx-components": "^1.2.5" "glsx-components": "^1.2.5",
"word-edit": "^1.3.5"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0", "@vue/cli-plugin-babel": "^4.1.0",
......
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-22 19:44:09
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-02 19:04:29
* @FilePath: \scrm-micro-peregrination\src\api\modules\journeyModel.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { http } from '@/main'
//活动列表
const byGroupIdSop = params => {
return http({
url: 'process/sop/api/sopInsts/byGroupId',
method: 'get',
data: params,
sign: false
})
}
const sopTplsList = params => {
return http({
url: '/process/sop/api/sopTpls',
method: 'get',
data: params,
sign: false
})
}
//活动列表
const getInstIdDetail = params => {
return http({
url: '/process/sop/api/sopTpls/' + params.instId,
method: 'get',
// data: params,
sign: false
})
}
//触达类型列表
const SopTplNodeProtosList = params => {
return http({
url: '/process/sop/api/SopTplNodeProtos/list',
method: 'get',
data: params,
sign: false
})
}
//新增更新模板
const sopTplsSave = params => {
return http({
url: '/process/sop/api/sopTpls',
method: 'post',
data: params,
sign: false,
noSessionId:true
})
}
//圈人方式全部列表
const sopDataTypesList = params => {
return http({
url: '/process/sop/api/sopDataTypes/list',
method: 'get',
sign: false
})
}
//圈人方式全部列表
const sopConditionList = params => {
return http({
url: '/process/sop/api/sopData/condition/list',
method: 'get',
data: params,
sign: false
})
}
export default { byGroupIdSop, sopTplsList, getInstIdDetail, SopTplNodeProtosList, sopTplsSave, sopDataTypesList, sopConditionList }
...@@ -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 {
...@@ -30,7 +30,12 @@ html { ...@@ -30,7 +30,12 @@ html {
border-radius: 4px; border-radius: 4px;
vertical-align: middle; vertical-align: middle;
} }
.p20 {
padding: 20px;
}
.plr20 {
padding: 0px 20px;
}
.live-room .back-orange { .live-room .back-orange {
background-color: #fdb757; background-color: #fdb757;
} }
...@@ -53,9 +58,20 @@ html { ...@@ -53,9 +58,20 @@ html {
.live-room .m-r-8 { .live-room .m-r-8 {
margin-right: 8px; margin-right: 8px;
} }
.m-r-10 {
margin-right: 10px;
}
.m-t-10 {
margin-bottom: 10px;
}
.flex { .flex {
display: flex; display: flex;
} }
.flex-center {
display: flex;
align-items: center;
justify-content: center;
}
.bg-fff { .bg-fff {
background: #ffffff; background: #ffffff;
} }
...@@ -149,3 +165,11 @@ html { ...@@ -149,3 +165,11 @@ html {
} }
} }
} }
.el-popover.el-popper.popover-dialog {
padding: 10px !important;
.popover-panel {
background: #f7f7fc;
padding: 5px 20px 5px 5px;
margin-bottom: 10px;
}
}
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2024-01-03 12:23:36
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-16 15:03:58
* @FilePath: \scrm-micro-peregrination\src\mixins\model.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { mapActions, mapState } from 'vuex'
export default {
data() {
return {
...mapActions('model', ['setModelList'])
}
},
computed: {
...mapState('model', ['modelList'])
},
mounted() {
if (!this.modelList) {
this.setModelList()
}
},
methods: {
...mapActions('model', ['setModelList']),
spiltString(data, n) {
let title = ''
try {
title += JSON.parse(data.paramRemark).title
} catch (error) {
console.log(error)
}
if (!data.flag) {
return data.name
}
const val = data.conditions.find(i => i.id == data.flag)
try {
title += JSON.parse(val.paramRemark).title
let day = ''
if (val.operators && val.operators.length) {
val.operators.forEach(item => {
if (item.value) {
day = [item.name, item.value]
}
})
}
if (/\[.*\]/.test(title) && day.length == 2) {
title = title.replace(/\[.*?\]/, day[0]).replace(/\[.*?\]/, day[1])
}
} catch (error) {
console.log(error)
}
val &&
val.subConditions &&
val.subConditions.length &&
val.subConditions.forEach(i => {
i.operators.forEach(o => {
if (o.value) {
title += `并且满足${i.name}${o.name}${o.value}${o.unit?o.unit:''},`
}
})
})
return title.replace(/,+$/, '')
}
}
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @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-05 16:08:47 * @LastEditTime: 2024-01-03 10:01:50
* @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
*/ */
......
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-27 16:50:15
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-12-28 20:29:30
* @FilePath: \scrm-micro-peregrination\src\store\modules\model.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import api from '@/api'
export default {
namespaced: true,
state: {
modelList: null
},
mutations: {
// 设置模块阶段
SET_MODEL(state, data) {
state.modelList = data
}
},
actions: {
// 设置分页大小
async setModelList({ commit }, data) {
const res = await api.journeyModel.SopTplNodeProtosList({})
commit('SET_MODEL', res)
}
}
}
...@@ -12,8 +12,7 @@ ...@@ -12,8 +12,7 @@
<div v-if="currentIndex == '1'"> <div v-if="currentIndex == '1'">
<!-- <div class="journey-step-info" v-for="(val, k) in configList" :key="k">--> <!-- <div class="journey-step-info" v-for="(val, k) in configList" :key="k">-->
<!-- configList--> <!-- configList-->
<collapse-item-tpl ref="collapseRef" :configList="configList" <collapse-item-tpl ref="collapseRef" :configList="configList" :isDisabled="isDisabled"></collapse-item-tpl>
:isDisabled="isDisabled"></collapse-item-tpl>
<!-- </div>--> <!-- </div>-->
</div> </div>
<DistributionStore v-if="currentIndex == '2'"></DistributionStore> <DistributionStore v-if="currentIndex == '2'"></DistributionStore>
...@@ -22,15 +21,14 @@ ...@@ -22,15 +21,14 @@
</template> </template>
</step-bar> </step-bar>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import StepBar from './components/StepBar.vue' import StepBar from './components/StepBar.vue'
import CollapseItemTpl from './components/CollapseItemTpl' import CollapseItemTpl from './components/CollapseItemTpl'
import SelJourneyTemplate from "./components/selJourneyTemplate"; import SelJourneyTemplate from './components/selJourneyTemplate'
import DistributionStore from "./components/DistributionStore"; import DistributionStore from './components/DistributionStore'
export default { export default {
components: { components: {
...@@ -39,7 +37,7 @@ export default { ...@@ -39,7 +37,7 @@ export default {
CollapseItemTpl, CollapseItemTpl,
DistributionStore DistributionStore
}, },
name: "add", name: 'add',
data() { data() {
return { return {
ruleForm: { ruleForm: {
...@@ -47,9 +45,7 @@ export default { ...@@ -47,9 +45,7 @@ export default {
region: '' region: ''
}, },
rules: { rules: {
region: [ region: [{ required: true, message: '请选择活动区域', trigger: 'change' }]
{required: true, message: '请选择活动区域', trigger: 'change'}
],
}, },
titleConfig: { titleConfig: {
'0': '旅程模板', '0': '旅程模板',
...@@ -144,18 +140,17 @@ export default { ...@@ -144,18 +140,17 @@ export default {
}, },
mounted() { mounted() {
// this.$bus.$off('whetherToProceedNext') // this.$bus.$off('whetherToProceedNext')
this.$bus.$on('whetherToProceedNext', (data) => { this.$bus.$on('whetherToProceedNext', data => {
const query = data.tplId const query = data.tplId
this.getDetail(query) this.getDetail(query)
}) })
}, },
methods: { methods: {
changeIndex(currentInex) { changeIndex(currentInex) {
this.currentIndex = currentInex this.currentIndex = currentInex
}, },
getDetail(val) { getDetail(val) {
this.$apis.journeyConfig.getSOPDetailsApi({tplId: val}).then(res => { this.$apis.journeyConfig.getSOPDetailsApi({ tplId: val }).then(res => {
const tplParamDef = JSON.parse(res.tplParamDef) const tplParamDef = JSON.parse(res.tplParamDef)
const stages = tplParamDef.stages.defaultValue const stages = tplParamDef.stages.defaultValue
const customData = tplParamDef.customData.defaultValue const customData = tplParamDef.customData.defaultValue
...@@ -168,9 +163,10 @@ export default { ...@@ -168,9 +163,10 @@ export default {
list.push({ list.push({
...JSON.parse(v.nodeParamDef), ...JSON.parse(v.nodeParamDef),
nodeSkipable: v.nodeSkipable, nodeSkipable: v.nodeSkipable,
nodeProtoId: v.nodeProtoId,
nodeId: v.nodeId, nodeId: v.nodeId,
nodeSkip: '0', nodeSkip: '0',
nodeVisible: v.nodeVisible,// nodeVisible 0 节点不可见 1 可见 nodeVisible: v.nodeVisible, // nodeVisible 0 节点不可见 1 可见
customData customData
}) })
} }
...@@ -180,22 +176,22 @@ export default { ...@@ -180,22 +176,22 @@ export default {
return a.day.defaultValue - b.day.defaultValue return a.day.defaultValue - b.day.defaultValue
}) })
let sopList = this.groupBy(list, 'day.defaultValue') let sopList = this.groupBy(list, 'day.defaultValue')
sopList = sopList.map(function (arr) { sopList = sopList.map(function(arr) {
return arr.filter(function (obj) { return arr.filter(function(obj) {
// nodeVisible 0 节点不可见 1 可见 // nodeVisible 0 节点不可见 1 可见
return obj.nodeVisible == 1; return obj.nodeVisible == 1
}); })
}); })
configList.push({ configList.push({
label: stages[k].value, label: stages[k].value,
isExpaned: true, isExpaned: true,
editable: stages[k].editable,
conditionsList: stages[k].conditions || [], conditionsList: stages[k].conditions || [],
sopList sopList
}) })
} }
console.log(configList, 'configList') console.log(configList, 'configList')
this.configList = configList this.configList = configList
}) })
}, },
groupBy(list, name) { groupBy(list, name) {
...@@ -222,11 +218,10 @@ export default { ...@@ -222,11 +218,10 @@ export default {
customClass, customClass,
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
callback() callback()
}) })
.catch(() => { .catch(() => {})
})
}, },
//开启 //开启
haneldOpen() { haneldOpen() {
...@@ -245,8 +240,7 @@ export default { ...@@ -245,8 +240,7 @@ export default {
changeNode(val) { changeNode(val) {
console.log(val) console.log(val)
} }
}, }
} }
</script> </script>
......
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-22 19:29:52
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-08 09:20:15
* @FilePath: \scrm-micro-peregrination\src\views\journeyConfig\config\table-config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
const tableConfig = { const tableConfig = {
data() { data() {
return { return {
getListApi: this.$apis.journeyConfig.getListApi, getListApi: this.$apis.journeyConfig.getListApi,
pageConf: {pageSize: 'pageSize', pageNum: 'pageNumber', totalCount: 'total'}, pageConf: { pageSize: 'pageSize', pageNum: 'pageNumber', totalCount: 'total' },
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: true, tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '模板ID', label: '模板ID',
prop: 'instId', prop: 'instId'
}, },
{ {
label: '旅程模板名称', label: '旅程模板名称',
prop: 'instName', prop: 'instName'
}, },
{ {
label: '旅程阶段', label: '旅程阶段',
prop: 'instRemark', prop: 'instRemark',
addHtml: 'instRemark', addHtml: 'instRemark',
width:320 width: 320
}, },
{ {
label: '门店名称', label: '门店名称',
prop: 'sopTplGrant', prop: 'sopTplGrant',
formatter: cellValue => { formatter: cellValue => {
return cellValue.sopTplGrant && cellValue.sopTplGrant.groupName return cellValue.sopTplGrant && cellValue.sopTplGrant.groupName
} }
}, },
{ {
label: '创建时间', label: '创建时间',
prop: 'createTime', prop: 'createTime'
}, },
{ {
label: '修改时间', label: '修改时间',
prop: 'updateTime', prop: 'updateTime'
} }
], ]
}, },
tableButtonList: [ tableButtonList: [
{ {
type: 'el-button', type: 'el-button',
name: '模板实例详情', name: '模板实例详情',
attrs: { attrs: {
type: 'text' type: 'text'
}, },
listeners: { listeners: {
click: row => this.gotoDetails(row.instId) click: row => this.gotoDetails(row.instId)
}
}
}
],
} }
]
} }
}
} }
export default tableConfig export default tableConfig
...@@ -16,7 +16,7 @@ import CollapseItem from './components/CollapseItem' ...@@ -16,7 +16,7 @@ import CollapseItem from './components/CollapseItem'
export default { export default {
components: { components: {
CollapseItem, CollapseItem
}, },
data() { data() {
return { return {
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
}, },
methods: { methods: {
getDetail(val) { getDetail(val) {
this.$apis.journeyConfig.getInsDetailsApi({instId: val}).then(res => { this.$apis.journeyConfig.getInsDetailsApi({ instId: val }).then(res => {
const instParam = JSON.parse(res.instParam) const instParam = JSON.parse(res.instParam)
const stages = instParam.stages const stages = instParam.stages
const customData = instParam.customData const customData = instParam.customData
...@@ -126,6 +126,7 @@ export default { ...@@ -126,6 +126,7 @@ export default {
nodeSkip: v.nodeSkip, nodeSkip: v.nodeSkip,
nodeVisible: v.nodeVisible, nodeVisible: v.nodeVisible,
nodeId: v.nodeId, nodeId: v.nodeId,
nodeProtoId: v.nodeProtoId,
customData customData
}) })
} }
...@@ -135,16 +136,17 @@ export default { ...@@ -135,16 +136,17 @@ export default {
return a.day - b.day return a.day - b.day
}) })
let sopList = this.groupBy(list, 'day') let sopList = this.groupBy(list, 'day')
sopList = sopList.map(function (arr) { sopList = sopList.map(function(arr) {
return arr.filter(function (obj) { return arr.filter(function(obj) {
// nodeVisible 0 节点不可见 1 可见 // nodeVisible 0 节点不可见 1 可见
// nodeSkip 0 节点不跳过 1 节点跳过 // nodeSkip 0 节点不跳过 1 节点跳过
return obj.nodeSkip == 0 && obj.nodeVisible == 1; return obj.nodeSkip == 0 && obj.nodeVisible == 1
}); })
}); })
configList.push({ configList.push({
label: stages[k].value, label: stages[k].value,
isExpaned: true, isExpaned: true,
editable: stages[k].editable,
conditionsList: stages[k].conditions || [], conditionsList: stages[k].conditions || [],
sopList sopList
}) })
......
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-27 11:29:17
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-09 17:17:26
* @FilePath: \scrm-micro-scene\src\views\journeyConfig\components\relatedActivity.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<GLDialog title="关联营销活动" mode="big" class="gl-form-page gl-form-min" @onOk="handleSure" :before-close="handleClose" @onCancel="handleClose" :visible.sync="activityVisible">
<div class="dialog-body">
<div class="condition-item">
<label>客户旅程:</label>
<span>{{ activityConfig.name }}</span>
</div>
<div class="condition-item">
<label>旅程阶段:</label>
<span>{{ activityConfig.label }}</span>
</div>
<div class="condition-item flex">
<label>进入条件:</label>
<condition ref="conditionForm"></condition>
</div>
<!-- <div class="condition-item flex">
<label>进入条件:</label>
<div class="condition-panel" v-if="status == 1">
<el-select v-model="value" placeholder="请选择" :size="size">
<el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select v-model="value" placeholder="请选择" :size="size">
<el-option v-for="item in grOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div class="condition-panel" v-if="status == 2">
<el-select v-model="value" placeholder="请选择" :size="size" class="m-r-10">
<el-option v-for="item in JourneyOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<div class="condition-panel" v-if="status == 3">
<div class="condition-select flex">
<el-select v-model="value" placeholder="请选择" :size="size" class="m-r-10">
<el-option v-for="item in JourneyOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select v-model="value" placeholder="请选择" :size="size" class="m-r-10">
<el-option v-for="item in conditionOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<div class="condition-input">
<el-input></el-input>
</div>
<span>天&nbsp;&nbsp;切换到此旅程阶段</span>
</div>
<div class="condition-more">
<div class="flex-column-center m-t-10" v-for="(item, k) in conditionList" :key="item.id">
<label>并且满足</label>
<el-select v-model="value" placeholder="请选择" :size="size" class="condition-1">
<el-option v-for="item in JourneyOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-select v-model="value" placeholder="请选择" :size="size" class="condition-2">
<el-option v-for="item in JourneyOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<i class="el-icon-delete" @click="delCondition(k)"></i>
</div>
<div class="condition-add" @click="addCondition">
<i class="el-icon-circle-plus-outline"></i>
添加条件
</div>
</div>
</div>
</div> -->
</div>
</GLDialog>
</template>
<script>
import condition from './condition'
export default {
components: {
condition
},
props: {
activityVisible: Boolean,
activityConfig: {
type: Object,
default: () => {}
}
},
data() {
return {
conditionInfo: '',
status: 1,
typeOptions: [
{
label: '基于国任任务'
},
{
label: '基于页面行为'
}
],
grOptions: [
{
label: '成功续保导入系统的客户'
}
],
membersVisible: false,
selectData: [],
conditionList: [{ id: 1 }, { id: 2 }],
JourneyOptions: [
{
label: '客户旅程'
},
{
label: '旅程阶段'
},
{
label: '手动标记'
},
{
label: '条件类型'
}
],
conditionOptions: [
{
label: '等于'
}
]
}
},
methods: {
handleClose() {
this.$emit('closeActivity')
},
delCondition(k) {
this.conditionList.splice(k, 1)
},
addCondition() {
this.conditionList.push({
id: this.conditionList.length
})
},
handleSure() {
//条件序号condition_i
let { conditionList, conditionListAll, condition_i } = this.$refs.conditionForm,
isInput = true
if (!conditionList.conditions) {
this.$message({
type: 'error',
message: '请选择进入条件',
customClass: 'error-tips'
})
return
}
conditionList.conditions.forEach(i => {
if (i.operators && i.operators.length) {
isInput = false
i.operators.forEach(o => {
if (o.value) {
isInput = true
}
})
}
conditionListAll.conditions.forEach(j => {
if (i.id == j.id) {
j.operators = i.operators
j.subConditions = i.subConditions
}
})
})
if (!isInput) {
this.$message({
type: 'error',
message: '请完善条件',
customClass: 'error-tips'
})
return
}
this.$emit('closeActivity', { conditionList: { ...conditionListAll, flag: conditionList.flag }, condition_i })
},
handleAddEmp() {
this.membersVisible = true
}
}
}
</script>
<style lang="scss" scoped>
.dialog-body {
padding: 0px 50px;
}
.require {
color: red;
}
.condition-item {
line-height: 30px;
font-size: 14px;
color: #666666;
.condition-more {
background: #f9f9f9;
padding: 20px;
margin-top: 10px;
.condition-1 {
width: 284px;
margin: 0 10px;
}
.condition-2 {
width: 136px;
}
i {
color: #999999;
margin-left: 10px;
cursor: pointer;
}
.condition-add {
display: flex;
align-items: center;
margin-top: 10px;
cursor: pointer;
i {
font-size: 20px;
margin-right: 6px;
color: #5850ff;
}
font-size: 12px;
color: #5850ff;
}
}
.condition-input {
a {
color: #5850ff;
}
/deep/ {
.el-input {
width: 136px;
margin: 0px 4px;
}
.el-input__inner {
height: 32px;
line-height: 32px;
}
}
}
span {
color: #333333;
}
}
</style>
<style>
.error-tips {
z-index: 99999 !important;
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-25 13:34:43
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-16 10:47:30
* @FilePath: \scrm-micro-peregrination\src\views\journeyModel\components\condition.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div>
<div class="condition-select flex">
<el-select v-model="step" placeholder="请选择" :size="size" @change="selectStep">
<el-option v-for="item in stepList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<div class="flex">
<el-select v-model="conditionList.flag" placeholder="请选择" :size="size" class="m-r-10" v-if="conditionList.conditions && conditionList.conditions.length > 1">
<el-option v-for="item in conditionList.conditions" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
<template v-if="condition && condition.operators && condition.operators.length">
<el-select v-model="operators" @change="condition.operators[operators].value = ''" placeholder="请选择" :size="size" class="m-r-10">
<el-option v-for="(item, index) in condition.operators" :key="index" :label="item.name" :value="index"></el-option>
</el-select>
<div class="condition-input" v-if="condition.operators[operators]">
<el-input v-model="condition.operators[operators].value" maxLength="3" oninput="value=value.replace(/^0+|[^1-9\d]/g, '')"></el-input>
</div>
<span>天&nbsp;&nbsp;切换到此旅程阶段</span>
</template>
</div>
</div>
<div class="condition-more" v-if="condition && condition.subConditions">
<div>
<template>
<div class="flex-column-center m-t-10" v-for="(item, k) in condition.subConditions" :key="item.id">
<label>并且满足</label>
<el-select v-model="item.name" placeholder="请选择" :size="size" class="condition-1" v-if="item.operators">
<el-option v-for="itm in [item.name]" :key="itm" :label="itm" :value="itm"></el-option>
</el-select>
<el-select v-model="item.value" @change="setInputValue(item.operators)" placeholder="请选择" :size="size" class="condition-1" v-if="item.operators">
<el-option v-for="(itm, i) in item.operators" :key="i" :label="itm.name" :value="i"></el-option>
</el-select>
<div class="condition-input" v-if="item.operators[item.value].style == 'input'">
<el-input v-model="item.operators[item.value].value"></el-input>
</div>
<el-select v-model="item.operators[item.value].value" placeholder="请选择" :size="size" class="condition-2" v-if="item.operators[item.value].style == 'select'">
<el-option v-for="i in journeyList" :key="i" :label="i" :value="i"></el-option>
</el-select>
<span>{{ item.operators[item.value].unit }}</span>
<i class="el-icon-delete" @click="delCondition(condition.subConditions, k)"></i>
</div>
<div class="condition-add" @click="addCondition(condition.subConditions)">
<i class="el-icon-circle-plus-outline"></i>
添加条件
</div>
</template>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
step: null,
addFinal: {},
addInfo: {},
condition_i: null,
conditionIndex: 0,
operators: 0,
conditionList: [],
condition: '',
journeyList: [],
stepList: []
}
},
inject: ['stepList', 'app'],
mounted() {
const stepList = this.app.stepList || []
stepList.forEach(item => {
item.flag = ''
item.conditions.forEach(i => {
if (i.subConditions)
i.subConditions.forEach(j => {
j.value = 0
})
})
})
this.stepList = stepList
this.journeyList = this.app.journeyList.filter(i => i)
},
watch: {
'conditionList.flag'(val) {
if (!this.conditionList.conditions.length) return
if (!val) {
val = this.conditionList.conditions[0]
this.conditionList.flag = val.id
}
this.condition = this.conditionList.conditions.find(i => i.id == val)
}
},
methods: {
setInputValue(arr) {
for (let i in arr) {
arr[i].value = ''
}
},
// mergeArr(arr1, arr2, val) {
// // 遍历数组 arr1
// arr1.forEach(a1 => {
// // 在数组 arr2 中查找相同 id 的对象
// const obj = arr2.find(a2 => a1.id === a2.id)
// // 如果找到匹配的对象,则进行覆盖
// if (obj[val] && typeof obj[val] != 'object' && obj[val] != a1[val]) {
// Object.assign(a1, obj)
// }
// })
// },
// contrastObj(obj1, obj2) {
// for (let i in obj1) {
// if (Array.isArray(obj1[i])) {
// this.mergeArr(obj1[i], obj2[i])
// }
// }
// },
setCondition(val, index) {
this.step = val.id
this.conditionListAll = this.$common.utils.deepClone(val)
this.conditionList = this.$common.utils.deepClone(val)
if (this.conditionList.conditions) this.conditionList.conditions = this.conditionList.conditions.filter(i => !i.isHide)
this.condition_i = index
this.condition = this.conditionList.conditions && this.conditionList.conditions[0]
const _conditions = this.stepList.find(i => i.id == val.id).conditions
_conditions.forEach(i => {
if (i.id == this.condition.id && this.condition.subConditions.length == 0 && i.subConditions.length > 0) {
this.condition.subConditions = this.$common.utils.deepClone(i.subConditions)
}
})
console.log(this.condition, _conditions, 'this.conditionList')
},
// 保存最后一项用于新增
delCondition(val, k) {
if (val.length == 1) {
this.addInfo = this.$common.utils.deepClone(val[0])
}
val.splice(k, 1)
},
// 新增条件
addCondition(val) {
let l = val.length,
prop = this.$common.utils.deepClone(val[l - 1])
if (!prop) prop = this.addInfo
console.log(prop, 'prop')
prop.id++
val.push(prop)
},
selectStep(e) {
const conditions = this.stepList.find(item => {
return item.id == e
})
this.conditionListAll = this.$common.utils.deepClone(conditions)
this.conditionList = this.$common.utils.deepClone(conditions)
if (this.conditionList.conditions) this.conditionList.conditions = this.conditionList.conditions.filter(i => !i.isHide)
this.condition = this.conditionList.conditions[0]
}
}
}
</script>
<style lang="scss" scoped>
.dialog-body {
padding: 0px 50px;
}
.require {
color: red;
}
.condition-item {
line-height: 30px;
font-size: 14px;
color: #666666;
.condition-more {
background: #f9f9f9;
padding: 20px;
margin-top: 10px;
.condition-1 {
width: 136px;
margin: 0 10px;
}
.condition-2 {
width: 136px;
}
i {
color: #999999;
margin-left: 10px;
cursor: pointer;
}
.condition-add {
display: flex;
align-items: center;
margin-top: 10px;
cursor: pointer;
i {
font-size: 20px;
margin-right: 6px;
color: #5850ff;
}
font-size: 12px;
color: #5850ff;
}
}
.condition-input {
a {
color: #5850ff;
}
/deep/ {
.el-input {
width: 136px;
margin: 0px 4px;
}
.el-input__inner {
height: 32px;
line-height: 32px;
}
}
}
span {
color: #333333;
}
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-25 14:31:26
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-15 15:19:05
* @FilePath: \scrm-micro-peregrination\src\views\journeyModel\components\sopItem.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AEVid
-->
<template>
<el-drawer title="编辑" :visible.sync="drawerVisible" direction="rtl" :before-close="handleClose" size="720px">
<div class="drawer-body">
<div class="sop-item flex-column-center">
<label>*</label>
<span>请设置营销时间:</span>
<el-input-number v-model="day" :min="1" :max="999" :size="size"></el-input-number>
<span>天后,当日</span>
<el-time-picker :picker-options="rangeStart" v-model="time" :size="size" format="HH:mm" value-format="HH:mm"></el-time-picker>
<span>发送</span>
</div>
<div class="sop-item flex">
<label>*</label>
<span>请选择触达方式:</span>
<div class="select-panel">
<div class="select-item" v-for="item in modelList" :key="item.id">
<div class="select-value">
<el-radio v-model="nodeKey" :label="item.id">{{ item.nodeName }}</el-radio>
</div>
<div class="select-desc">
{{ item.desc }}
</div>
</div>
</div>
</div>
</div>
<div class="demo-drawer__footer">
<el-button @click="handleClose" :size="size">取消</el-button>
<el-button type="primary" @click="saveForm" :size="size">保存</el-button>
</div>
</el-drawer>
</template>
<script>
export default {
props: {
drawerVisible: {
type: Boolean,
default: false
}
},
data() {
return {
rangeStart: {
selectableRange: '09:00:00 - 22:00:00' // 09:00:00 - 22:00:00的时间才可以选择
},
nodeKey: '',
day: 0,
time: '09:00',
list: [],
modelList: []
}
},
inject: ['app'],
watch: {
drawerVisible(val) {
if (val) {
this.time = '09:00'
this.getModelList()
}
}
},
methods: {
getModelList() {
this.$apis.journeyModel.SopTplNodeProtosList({ dataTypeCode: this.app.dataTypeCode, groupCode: 'notify' }).then(res => {
this.modelList = res
})
},
showError(message) {
this.$message({
type: 'error',
message
})
},
saveForm() {
if (!this.day) {
return this.showError('请设置营销时间')
}
if (!this.time) {
return this.showError('请设置营销时间')
}
if (!this.nodeKey) {
return this.showError('请选择触达方式')
}
const model = {
time: this.time,
day: this.day,
nodeProtoId: this.nodeKey
}
this.$emit('closeDrawer', model)
},
setForm(val) {
const { day, time, taskType } = val
this.day = day
this.time = time
this.nodeKey = taskType
},
handleClose() {
this.$emit('closeDrawer')
},
SopTplNodeProtosList() {
this.$apis.journeyModel.SopTplNodeProtosList({}).then(res => {
this.list = res
})
}
}
}
</script>
<style scoped lang="scss">
.drawer-body {
padding: 30px;
height: calc(100vh - 140px);
.sop-item {
font-size: 14px;
color: #333333;
margin-bottom: 20px;
> label {
color: #eb4e4e;
}
.select-item {
margin-bottom: 20px;
.select-value {
font-size: 14px;
color: #333333;
span {
margin-left: -35px;
}
}
.select-desc {
font-size: 12px;
color: #999999;
line-height: 24px;
margin-left: 20px;
}
}
}
}
.demo-drawer__footer {
text-align: right;
padding: 10px;
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-11 15:09:07
* @FilePath: \scrm-micro-journey\src\views\journeyConfig\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="journey-main">
<div class="bg-fff p20">
<GLCombiForm ref="formSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="byGroupIdSop" @handleRest="handleReset"></GLCombiForm>
<div class="journey-header">
<el-button class="operate-btn" type="primary" size="small" @click="addJourney" plain>新增旅程</el-button>
</div>
<div class="journey-body" v-if="journeyList.length">
<div class="journey-item" v-for="item in journeyList" :key="item.id">
<div class="journey-item-head flex-column-center ">
<img src="@/assets/config/icon-1.png" />
<span>{{ item.tplName }}</span>
<a @click="handleEdit(item)">编辑</a>
</div>
<div class="journey-item-body">
<div class="journey-process">
<div class="journey-process-item" v-for="(p, index) in item.journeyItem" :key="index">
<img src="@/assets/config/icon-next.png" class="journey-status" v-if="index != item.journeyItem.length - 1" />
<img src="@/assets/config/icon-end.png" class="journey-status" v-else />
<div class="journey-step__main">
<div class="journey-step-icon"></div>
<div class="journey-step-desc">{{ p.label }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="empty-panel" v-else>
<div class="empty-img">
<img src="@/assets/config/empty.png" />
</div>
<div class="empty-txt">
暂无数据
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
searchForm: {
tplStatus: [1, 0]
},
journeyAllList: [],
searchFormData: [
{
label: '旅程',
name: 'tplId',
type: 'select',
optionList: [],
optionId: 'tplId',
optionLabel: 'tplName'
}
],
journeyList: []
// journeyList: [
// {
// id: 1,
// title: '续保客户旅程1',
// status: 1,
// journeyItem: [
// {
// label: '待跟进',
// process: 1
// },
// {
// label: '有意向',
// process: 2
// },
// {
// label: '可报价',
// process: 3
// },
// {
// label: '已成交',
// process: 4
// },
// {
// label: '战败',
// process: 5
// }
// ]
// },
// {
// id: 2,
// title: '续保客户旅程2',
// status: 2,
// journeyItem: []
// },
// {
// id: 2,
// title: '续保客户旅程3',
// status: 3,
// journeyItem: []
// }
// ]
}
},
mounted() {
this.byGroupIdSop()
},
methods: {
addJourney() {
this.$router.push('/journeyModel/add')
},
async byGroupIdSop() {
const res = await this.$apis.journeyModel.sopTplsList({ pageNumber: 1 })
this.journeyAllList = res.list || []
this.journeyAllList.forEach(item => {
const tplParamDef = JSON.parse(item.tplParamDef)
const stages = tplParamDef.stages.defaultValue
item.journeyItem = []
let process = 0
console.log(stages, 'stages')
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()
})
},
handleEdit(item) {
this.$router.push({
path: '/journeyModel/add',
query: {
title: item.tplName,
instId: item.tplId
}
})
},
async handleSearch() {
const { tplId } = this.searchForm
this.journeyList = this.journeyAllList
console.log(this.journeyAllList, 'this.journeyAllList')
if (tplId) {
this.journeyList = this.journeyList.filter(item => item.tplId == tplId)
}
},
handleReset() {
this.searchForm = {}
this.byGroupIdSop()
}
}
}
</script>
<style lang="scss" scoped>
.empty-panel {
font-size: 16px;
color: #999999;
text-align: center;
height: calc(100vh - 290px);
.empty-img {
width: 268px;
height: 88;
margin: 60px auto 4px;
}
}
.journey-header {
text-align: right;
margin-bottom: 10px;
}
.journey-item {
border: 1px solid #f0f0fb;
border-radius: 4px;
&-head {
height: 50px;
padding-left: 16px;
border-bottom: 1px solid #f0f0fb;
img {
width: 30px;
height: 30px;
}
> span {
font-size: 16px;
color: #333333;
margin: 0px 10px;
}
a {
font-size: 14px;
color: #5850ff;
cursor: pointer;
}
.journey-item-status {
margin-left: auto;
width: 84px;
height: 28px;
background-image: linear-gradient(108deg, #2cca74 0%, #16ced2 100%);
border-radius: 2px 0 0 2px;
color: #ffffff;
font-size: 14px;
&.is-disable {
background-image: linear-gradient(108deg, #acacca 0%, #c9bcd0 100%);
}
i {
margin-right: 4px;
&.el-icon-remove-outline {
transform: rotate(180deg);
}
}
}
}
&-body {
padding: 32px;
display: flex;
// justify-content: center;
.journey-process {
display: flex;
flex-wrap: nowrap;
overflow-x: auto;
&-item {
position: relative;
flex: 0 0 195px;
width: 195px;
height: 88px;
&:last-child {
flex: 0 0 88px;
width: 88px;
}
.journey-status {
position: absolute;
height: 88px;
width: auto;
}
.journey-step__main {
position: absolute;
width: 88px;
text-align: center;
top: 15px;
margin: auto;
.journey-step-icon {
margin: 5px auto;
}
.journey-step-desc {
font-size: 14px;
color: #333333;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 0px 6px;
}
}
}
}
}
}
.journey-step-icon {
width: 25px;
height: 24px;
background: url('../../assets/config/sop_icon.png');
background-size: 100% 100%;
}
.step-icon-2 {
background: url('../../assets/config/icon-sprites.png') -10px -10px;
}
.step-icon-3 {
background: url('../../assets/config/icon-sprites.png') -55px -10px;
}
.step-icon-4 {
background: url('../../assets/config/icon-sprites.png') -10px -54px;
}
.step-icon-5 {
background: url('../../assets/config/icon-sprites.png') -55px -54px;
}
.step-icon-1 {
background: url('../../assets/config/icon-sprites.png') -54px -142px;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!