Commit cc8674f7 by 前端

Merge branch 'v3.23.1' into 'master'

V3.23.1

See merge request !5
2 parents 49c769cd 2302cbac
Showing 65 changed files with 4260 additions and 411 deletions
...@@ -1879,51 +1879,6 @@ ...@@ -1879,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",
...@@ -1932,28 +1887,6 @@ ...@@ -1932,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"
}
} }
} }
}, },
...@@ -2649,6 +2582,14 @@ ...@@ -2649,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",
...@@ -13026,6 +12967,21 @@ ...@@ -13026,6 +12967,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",
...@@ -13209,6 +13165,14 @@ ...@@ -13209,6 +13165,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",
...@@ -13289,6 +13253,75 @@ ...@@ -13289,6 +13253,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",
...@@ -14065,6 +14098,39 @@ ...@@ -14065,6 +14098,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",
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
"echarts": "^5.4.3", "echarts": "^5.4.3",
"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",
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* @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_common,http_upload } from '@/main'
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 +17,19 @@ const pictureUpload = params => { ...@@ -17,6 +17,19 @@ const pictureUpload = params => {
noSignAttr: ['file'] noSignAttr: ['file']
}) })
} }
const compressVideo = params => {
// params.method = '/video/compression/upload'
// params.sessionId = session
// let paramsVideo = JSON.(params)
return http_upload({
url: '/rpc-scrm-entmicro-container/video/compression/upload',
method: 'POST',
data: params,
sign: false,
noSignAttr: ['file']
})
}
export default { export default {
pictureUpload pictureUpload,
compressVideo
} }
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-07 16:54:06 * @Date: 2023-09-07 16:54:06
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-26 10:26:03 * @LastEditTime: 2024-01-04 15:17:51
* @FilePath: \scrm-micro-journey\src\api\modules\journeyConfig.js * @FilePath: \scrm-micro-journey\src\api\modules\journeyConfig.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, http_sop } from '@/main' import { http, http_sop } from '@/main';
let session = 'mini-c38a80dd-cf48-4491-8933-fb2eb57fb4ca-rop'
//活动列表 //活动列表
const activityPage = params => { const activityPage = params => {
params.method = `scrm.api.shopmall.bulge.activity.page` params.method = `scrm.api.shopmall.bulge.activity.page`
...@@ -17,6 +18,16 @@ const activityPage = params => { ...@@ -17,6 +18,16 @@ const activityPage = params => {
sign: true sign: true
}) })
} }
const authorizeMerchant = params => {
params.method = `entmicro.api.department.authorizeMerchant`
return http({
url: 'rop-scrm-entmicro/router',
method: 'get',
data: params,
sign: true
})
}
//活动详情 //活动详情
const getActivityDetailApi = params => { const getActivityDetailApi = params => {
params.method = `scrm.api.shopmall.activity.detail` params.method = `scrm.api.shopmall.activity.detail`
...@@ -76,6 +87,17 @@ const concatActivity = params => { ...@@ -76,6 +87,17 @@ const concatActivity = params => {
sign: false sign: false
}) })
} }
//更新SOP模板实例节点输入参数
const updateParam = params => {
return http_sop({
url: `process/sop/api/sopInstNodes/${params.nodeId}/updateParam`,
method: 'post',
data:params.data,
noSessionId: true,
sign: false
})
}
const activityRelInfo = params => { const activityRelInfo = params => {
params.method = `marketing.api.supermarket.activityRelInfo` params.method = `marketing.api.supermarket.activityRelInfo`
return http({ return http({
...@@ -85,5 +107,86 @@ const activityRelInfo = params => { ...@@ -85,5 +107,86 @@ const activityRelInfo = params => {
sign: true sign: true
}) })
} }
//选择成员
const listDepartmentTree = params => {
params.method = 'entmicro.api.department.listDepartmentTree'
return http({
url: 'rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
const querylabeltree = params => {
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
params.sessionId = session
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
// 跟进专员类型查询
const getFollowListType = params => {
params.method = 'entmicro.api.staff.listEntFollowerType'
// params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 跟进专员类型查询
const getStaffList = params => {
params.method = 'entmicro.api.staff.listFollowerStaffByPage'
// params.sessionId = session
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
// 查询任务详情
const getTaskList = params => {
return http_sop({
url: `/process/sop/api/sopInsts/getTaskList`,
method: 'post',
data: params,
noSessionId: true,
sign: false
})
}
//触达类型列表
const SopTplNodeProtosList = params => {
return http_sop({
url: '/process/sop/api/SopTplNodeProtos/list',
method: 'get',
data: params,
sign: false
})
}
//条件列表
const sopConditionList = params => {
return http_sop({
url: '/process/sop/api/sopData/condition/list',
method: 'get',
data: params,
sign: false
})
}
//条件列表
const setStageData = params => {
return http_sop({
url: `/process/sop/api/sopInsts/${params.instId}/instParam/stageData`,
method: 'post',
data: params.data,
noSessionId: true,
sign: false
})
}
export default { activityPage, byGroupIdSop, getInstIdDetail, setSopInsts, concatActivity, findMarketingTask, getActivityDetailApi, activityRelInfo } // entmicro.api.staff.listFollowerStaffByPage 跟进专员类型查询员工
export default {authorizeMerchant, setStageData,sopConditionList,SopTplNodeProtosList,getTaskList,updateParam,getStaffList,getFollowListType,querylabeltree,activityPage, byGroupIdSop, getInstIdDetail, setSopInsts, concatActivity, findMarketingTask, getActivityDetailApi, activityRelInfo, listDepartmentTree }
import { http, http_merchant } from '@/main'
const path = 'entmicro.api.mass.'
const URL = 'rop-scrm-entmicro/router'
//权益卡
const getCard = params => {
params.method = 'scrm.api.equity.open.card.price.list.by.merchantid'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//权益卡
const merchant = params => {
params.method = 'scrm.api.equity.open.card.price.list.by.merchantid'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//是否开通权益
const merchantOpen = params => {
params.method = 'scrm.api.equity.service.merchant.config.get'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//优惠券
const getCoupon = params => {
params.method = 'scrm.api.boutiquecoupon.coupon.page'
return http({
url: '/rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
//套餐
const getPackage = params => {
params.method = 'scrm.api.equity.package.info.list.with.page'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const getMerchant = params => {
params.method = 'scrm.api.coupon.list.merchant'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
//秒杀活动
const getActivity = params => {
params.method = 'scrm.api.shopmall.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取素材组列表
const getGroupListApi = params => {
params.method = 'marketing.api.material.group.list'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取素材列表
const getMaterialListApi = params => {
// params.method = 'marketing.api.material.page'
params.method = 'marketing.api.material.sop.page'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
// 众筹模式活动
const crowdfundingActivity = params => {
params.method = 'scrm.api.shopmall.crowdfunding.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//膨胀金活动
const bulgeActivity = params => {
params.method = 'scrm.api.shopmall.bulge.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
//问卷调查
const activityQuestionnaireForm = params => {
params.method = 'marketing.api.activityQuestionnaireForm.page'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//模板列表
const templatePage = params => {
params.method = `${path}template.page.search`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
//模板保存
const templateSave = params => {
params.method = `${path}template.save`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
//模板更新
const templateUpdate = params => {
params.method = `${path}template.update`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
//模板创建人
const createdNameList = params => {
params.method = `${path}template.created.name.list`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
const templateDetail = params => {
params.method = `${path}template.detail`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
const findMerchantListByPage = params => {
params.method = 'merchants.api.open.findMerchantListByPage'
return http_merchant({
url: '/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
const channelPreview = params => {
params.method = `scrm.api.shopmall.discover.channel.merchant.preview`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getCard,
merchant,
getActivity,
getPackage,
getMerchant,
getCoupon,
merchantOpen,
getGroupListApi,
getMaterialListApi,
templatePage,
createdNameList,
templateUpdate,
templateSave,
templateDetail,
crowdfundingActivity,
bulgeActivity,
findMerchantListByPage,
channelPreview,
activityQuestionnaireForm
}
...@@ -33,7 +33,18 @@ img { ...@@ -33,7 +33,18 @@ img {
height: 100%; height: 100%;
vertical-align: middle; vertical-align: middle;
} }
.m-b-20 {
margin-bottom: 20px;
}
.m-b-10 {
margin-bottom: 10px;
}
.m-t-20 {
margin-top: 20px;
}
.m-t-10 {
margin-top: 10px;
}
.bg-fff { .bg-fff {
background: #ffffff; background: #ffffff;
} }
...@@ -53,7 +64,9 @@ img { ...@@ -53,7 +64,9 @@ img {
.pl20 { .pl20 {
padding-left: 20px; padding-left: 20px;
} }
.plr20 {
padding: 0px 20px;
}
.live-room .m-r-8 { .live-room .m-r-8 {
margin-right: 8px; margin-right: 8px;
} }
...@@ -153,4 +166,12 @@ img { ...@@ -153,4 +166,12 @@ img {
.customMessageClass { .customMessageClass {
z-index: 9999 !important; z-index: 9999 !important;
}
\ No newline at end of file \ No newline at end of file
}
.el-popover.el-popper.popover-dialog {
padding: 10px !important;
.popover-panel {
background: #f7f7fc;
padding: 5px 20px 5px 5px;
margin-bottom: 10px;
}
}
<template>
<div class="square-main">
<GLDialog bigTitle="选择活动" :append-to-body="true" :hasFooter="true" :visible.sync="dialogVisible" width="1098px" mode="big">
<div class="model-panel" v-loading="loading">
<div class="model-panel-tab">
<el-tabs v-model="activeName" @tab-click="handleClick">
<template v-for="(item, index) in activityList">
<el-tab-pane :label="item.itemName" :name="item.itemValue" v-if="itemType != 'merchant'" :key="index"></el-tab-pane>
<el-tab-pane :label="item.itemName" v-if="openFlag && itemType == 'itemType'" :key="index"></el-tab-pane>
</template>
</el-tabs>
</div>
<div class="model-item-panel" v-if="modelList.length > 0">
<div class="model-item" :class="{ checked: selectItem == item }" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)">
<div class="item-icon" v-if="selectItem == item"><i class="el-icon-check"></i></div>
<div class="item-icon-b" v-else>
<img src="@/assets/welcomeWord/coupon.png" alt="" v-if="selectType == 'coupon'" />
<img src="@/assets/welcomeWord/gift.png" alt="" v-else />
</div>
<template v-if="selectType == 'card'">
<div class="model-item-title" :title="item.equityName">{{ item.equityName }}</div>
<div class="model-item-content">领取方式:免费领用</div>
<div class="model-item-content"></div>
<div class="model-item-content model-item-contents">
试用天数:
<span>{{ item.freeDay }}天</span>
</div>
</template>
<template v-else-if="selectType == 'package'">
<div class="model-item-title" :title="item.packageName">{{ item.packageName }}</div>
<div class="model-item-content">领取方式:付费购买</div>
<div class="model-item-content"></div>
<div class="model-item-content model-item-contents">
销售价格:
<span>{{ item.packagePrice }}元</span>
</div>
</template>
<template v-else-if="selectType == 'coupon'">
<div class="model-item-title" :title="item.couponName">{{ item.couponName }}</div>
<div class="model-item-content" v-if="item.effectiveType == 3">有效期:无限制</div>
<div class="model-item-content" v-if="item.effectiveType == 6">有效期:{{ item.effectiveDays }}天</div>
<div class="model-item-content" v-if="item.effectiveType == 2">有效期:{{ item.effectiveStartTime ? item.effectiveStartTime.split(' ')[0] : '' }}~{{ item.effectiveEndTime ? item.effectiveEndTime.split(' ')[0] : '' }}</div>
<div class="model-item-content">
使用途径:
{{ item.useChannel == 1 ? '线上商品' : '到店核销' }}
</div>
<div class="model-item-content model-item-contents">
数量:
<span>{{ item.residueAmount }}</span>
</div>
</template>
<template v-else-if="selectType == 'activity'">
<div class="model-item-title" :title="item.activityName">{{ item.activityName }}</div>
<div class="model-item-content"></div>
<div class="model-item-content">
开始时间:
{{ item.startTime }}
</div>
<div class="model-item-content">
结束时间:
{{ item.endTime }}
</div>
</template>
<template v-else-if="selectType == 'crowdfunding' || selectType == 'bulge'">
<div class="model-item-title" :title="item.activityName">{{ item.activityName }}</div>
<div class="model-item-content"></div>
<div class="model-item-content">开始时间:{{ item.startTime }}</div>
<div class="model-item-content">结束时间:{{ item.endTime }}</div>
</template>
<template v-else-if="selectType == 'questionnaire'">
<div class="model-item-title" :title="item.name">{{ item.name }}</div>
<div class="model-item-content">卡片标题:</div>
<div class="model-item-content">{{ item.title }}</div>
</template>
<template v-else>
<div class="model-item-title" :title="item.couponName">{{ item.equityName }}</div>
<div class="model-item-content">获取方式:需先购买无忧服务套餐</div>
<div class="model-item-content">获取限制:每个服务套餐限领一次</div>
<div class="model-item-content model-item-weight">
赠送天数:
<span>{{ item.effectiveType == 2 ? item.effectivedDay + '天' : '永久有效' }}</span>
</div>
</template>
</div>
</div>
<div class="model-item-empty" v-else v-loading="loading">
<img src="@/assets/empty.png" />
<div class="empty-item">暂无数据</div>
</div>
<el-pagination v-if="selectType != 'card' && selectType != 'merchant'" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[12, 24, 36, 48]" :page-size="pageSize" :total="tableTotal" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect" v-show="modelList.length">确 定</el-button>
<el-button size="small" type="primary" @click="handleOpen" v-show="modelList.length == 0 && selectType == 'coupon' && memberMenu">立即添加</el-button>
<el-button size="small" type="primary" @click="handleOpen" v-show="modelList.length == 0 && selectType == 'package' && couponMenu">立即添加</el-button>
<el-button size="small" type="primary" @click="handleOpen" v-show="modelList.length == 0 && selectType == 'activity' && activityMenu">立即添加</el-button>
</span>
</GLDialog>
</div>
</template>
<script>
const openUrl = function(url) {
const link = document.createElement('a')
link.href = url
link.target = '_blank'
link.rel = 'opener'
link.click()
}
export default {
name: 'ActivityModel',
data() {
return {
dialogVisible: false,
couponMenu: false,
loading: false,
activeName: 3,
modelList: [],
pageNum: 1,
pageSize: 12,
tableTotal: 0,
openFlag: 0,
selectItem: {
id: ''
}
}
},
props: {
activityList: {
type: Array,
default: () => []
}
},
computed: {
selectType() {
return this.activityList.length ? this.activityList.find(act => act.itemValue == this.activeName).itemType : ''
},
miniType() {
return this.activityList.length ? this.activityList.find(act => act.itemValue == this.activeName).miniType : ''
}
},
methods: {
handleSelectItem(item) {
this.selectItem = item
if (item.equityClassId) {
this.selectItem.id = item.equityClassId
}
console.log(this.selectItem)
},
handleSelect() {
if (!this.selectItem.id) {
this.$message({
type: 'error',
message: '请选择活动'
})
return
}
this.dialogVisible = false
const marketingId = this.selectItem.id ? this.selectItem.id : this.selectItem.equityClassId
let marketingName = ''
switch (this.selectType) {
case 'card':
marketingName = this.selectItem.equityName
break
case 'package':
marketingName = this.selectItem.packageName
break
case 'activity':
case 'crowdfunding':
marketingName = this.selectItem.activityName
break
case 'coupon':
marketingName = this.selectItem.couponName
break
case 'questionnaire':
marketingName = this.selectItem.name
break
default:
marketingName = this.selectItem.equityName
}
//const marketingName = this.selectType == 'card' ? this.selectItem.equityName : this.selectType == 'package' ? this.selectItem.packageName : this.selectType == 'activity' || this.selectType == 'crowdfunding' ? this.selectItem.activityName : this.selectType == 'coupon' ? this.selectItem.couponName : this.selectItem.equityName
const { equityName, packageName, couponName, activityName, name, effectivedDay, effectiveType, endTime, startTime, residueAmount, packagePrice, freeDay } = this.selectItem
const otherContent = { equityName, packageName, couponName, activityName: activityName || name, effectivedDay, effectiveType, endTime, startTime, residueAmount, packagePrice, freeDay }
const marketingContent = { ...otherContent, selectType: this.selectType }
const params = {}
if (this.selectType == 'crowdfunding') {
params.url = this.selectItem.url
params.desc = this.selectItem.promotion
params.title = this.selectItem.forwardTitle
params.picurl = this.selectItem.activityImg
}
if (this.selectType == 'questionnaire') {
params.marketingUrl = this.selectItem.cardCover
params.marketingTitle = this.selectItem.cardTitle
}
this.$emit('selectActivity', { marketingId, marketingType: this.activeName, miniType: this.miniType, marketingName, marketingContent, ...params })
},
handleSizeChange(val) {
this.pageSize = val
this.getModelList()
},
handleCurrentChange(val) {
this.pageNum = val
this.getModelList()
},
handleOpen() {
let url
switch (this.selectType) {
case 'coupon':
url = '/marketing/couponManage/index'
break
case 'package':
url = '/marketing/memberCenter/setmealAddUpdate?%24title=%25E5%2588%259B%25E5%25BB%25BA%25E5%25A5%2597%25E9%25A4%2590'
break
case 'activity':
url = '/marketing/seckillActivity/editActivity/1'
break
}
openUrl(location.origin + url)
this.dialogVisible = false
},
getModelList() {
this.modelList = []
this.loading = true
let params = {
pageSize: this.pageSize,
pageNum: this.pageNum
}
const activityChecked = this.activityList.find(act => act.itemValue == this.activeName)
if (activityChecked && activityChecked.params && activityChecked.params.currentPage) {
console.log(activityChecked.params.currentPage)
activityChecked.params.currentPage = this.pageNum
}
Object.assign(params, activityChecked.params)
activityChecked
.getInterfaceApi(params)
.then(res => {
this.modelList = res.list ? res.list : res.data ? res.data : res
this.tableTotal = res.total || res.count || 0
this.loading = false
})
.catch(() => {
this.loading = false
})
},
merchantOpen() {
let channel = null
if (location.host == 'scrm.cgacar.com') {
channel = 2
}
const activityMerchant = this.activityList.find(act => act.itemType == 'merchant')
if (activityMerchant) {
let params = { channel, ...activityMerchant.merchantOpen.params }
activityMerchant.merchantOpen.merchantOpenApi(params).then(res => {
this.openFlag = res.openFlag
})
}
},
init() {
this.merchantOpen()
this.couponMenu = false
this.activityMenu = false
this.memberMenu = false
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
menu.forEach(item => {
if (item.name == 'marketing') {
if (!item.children) {
return
}
item.children.forEach(itm => {
console.log(itm.path)
if (itm.path == '/couponManage/index') {
this.couponMenu = true
}
if (itm.path == '/seckillActivity/index') {
this.activityMenu = true
}
if (itm.path == '^') {
this.memberMenu = true
}
})
}
})
this.dialogVisible = true
this.getModelList()
this.selectItem = {}
},
handleClick() {
this.getModelList()
}
}
}
</script>
<style lang="scss" scoped>
.square-main {
/deep/ {
.el-dialog__footer {
text-align: center;
}
.el-dialog__body {
padding: 14px 30px 20px;
}
}
}
.model-panel {
.model-panel-tab {
margin-bottom: 18px;
label {
// font-size: 16px;
// font-weight: 400;
// color: #000000;
// line-height: 24px;
}
/deep/ {
.el-checkbox:last-of-type {
margin-right: 8px;
}
.el-tabs__nav {
// border: 0;
}
.el-tabs__header {
// border: 0;
// background-color: #f4f6fc;
// margin: 0px;
}
.el-tabs__item {
// border: none;
// width: 180px;
// height: 32px;
// line-height: 32px;
// margin: 2px;
// text-align: center;
}
.el-tabs__item.is-active {
font-weight: 600;
padding: 0 20px;
border-bottom: 2px solid #5850ff;
}
}
}
.model-item-empty {
> img {
display: block;
margin: 50px auto 0px;
width: 60px;
height: auto;
}
.empty-item {
text-align: center;
font-size: 14px;
font-weight: 400;
color: #000000;
line-height: 22px;
margin-bottom: 30px;
}
}
.model-item-panel {
// display: grid;
// grid-template-columns: repeat(4, 25%);
// grid-row-gap: 10px;
max-height: 38vh;
overflow: auto;
display: flex;
flex-wrap: wrap;
align-items: stretch;
flex-direction: row;
.model-item {
width: 248px;
margin-right: 16px;
margin-bottom: 16px;
position: relative;
height: 128px;
background: #f9f9f9;
border-radius: 4px;
padding: 14px 16px;
box-sizing: border-box;
.item-icon {
position: absolute;
right: 0px;
bottom: 0px;
width: 16px;
height: 16px;
background: #5850ff;
border-radius: 4px 0px 0px 0px;
display: flex;
justify-content: center;
align-items: center;
i {
color: #fff;
}
}
.item-icon-b {
position: absolute;
right: -1px;
bottom: -1px;
img {
width: 30px;
height: 30px;
}
}
&:nth-child(4n) {
margin-right: 0px;
}
&.checked {
border: 2px solid #5850ff;
}
&-qrcode {
position: absolute;
right: 10px;
bottom: 10px;
width: 60px;
height: 60px;
border: 1px solid #979797;
}
&-title {
font-size: 16px;
font-weight: 600;
color: #333333;
line-height: 25px;
margin-bottom: 5px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
&-content {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 16px;
height: 16px;
margin-top: 6px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
&.model-item-weight {
line-height: 20px;
height: 20px;
}
span {
color: #5850ff;
font-size: 20px;
}
}
&-contents {
line-height: 22px;
height: 22px;
}
}
}
}
</style>
<!-- 素材弹窗 -->
<template>
<GLDialog bigTitle="选择素材" :append-to-body="true" :hasFooter="true" :visible.sync="isMaterialVisible" width="1088px" class="relateStore" mode="big">
<GLCombiForm :rowNumber="1" class="material-search" ref="showSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="model-panel">
<div class="model-item-panel" v-if="modelList.length > 0" v-loading="loading">
<div class="model-item" :class="{ checked: selectItem.id == item.id }" v-for="(item, index) in modelList" :key="index" @click="handleSelectItem(item)">
<div class="model-image">
<img src="@/assets/welcomeWord/pdf_r.png" v-if="item.materialType == 1" />
<template v-if="item.materialType != 1">
<img v-if="item.materialContent && item.materialContent.urlType == 'img' && item.materialContent.imgSrc.length == 1" class="img-material" :src="item.materialContent.materialUrl" />
<div :style="`background-image: url('${item.materialContent.materialUrl}')`" class="image-panel" v-if="item.materialContent && item.materialContent.urlType == 'img' && item.materialContent.imgSrc.length > 1">
<div class="image-panel-filter"><img src="@/assets/welcomeWord/imgNum.png" /></div>
<div class="image-panel-num">{{ item.materialContent.imgSrc.length }}</div>
</div>
<div class="video-panel" v-if="item.materialContent && item.materialContent.urlType == 'video'">
<video id="video" width="100%" height="100%" preload loop muted>
<source :src="item.materialContent.materialUrl" type="video/mp4" />
</video>
<i class="el-icon-video-play"></i>
</div>
</template>
<img src="@/assets/welcomeWord/text.png" v-if="!item.materialContent.materialUrl && item.materialType != 1" />
</div>
<div class="model-content">
<div class="model-content-title">{{ item.materialContentRpcResponse.materialName }}</div>
<div class="model-content-html" v-html="item.htmlText"></div>
</div>
</div>
</div>
<div class="model-item-empty" v-else v-loading="loading">
<img src="@/assets/empty.png" />
<div class="empty-item">暂无数据</div>
</div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageNum" :page-sizes="[12, 24, 36, 48]" :page-size="pageSize" :total="tableTotal" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="isMaterialVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleMaterialConfirm">确 定</el-button>
</span>
</GLDialog>
</template>
<script>
export default {
name: 'materialModel',
data() {
return {
isMaterialVisible: false,
searchForm: {
groupId: '',
materialType: ''
},
searchFormData: [
{
label: '素材分组',
name: 'groupId',
type: 'select',
optionList: [],
optionId: 'id',
optionLabel: 'materialGroupName',
optionsName: 'groupList'
},
{
label: '素材类型',
name: 'materialType',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'materialTypeList'
}
],
modelList: [],
selectItem: {
id: ''
},
// 分页
pageNum: 1,
pageSize: 12,
tableTotal: 0,
baseData: {
groupList: [],
materialTypeList: [
{
confId: 1,
confName: 'PDF'
},
{
confId: 3,
confName: '图文'
}
]
}
}
},
props: {
materialList: Object
},
methods: {
init() {
this.getBaseData()
this.getModelList()
this.isMaterialVisible = true
},
getBaseData() {
const params = this.materialList.params || {}
this.materialList.groupListApi(params).then(res => {
this.baseData.groupList = res
this.getOptionsList('searchFormData')
})
},
handleSelectItem(item) {
this.selectItem = item
},
getimgsrc(htmlstr) {
var reg = /<img.+?src=('|")?([^'"]+)('|")?(?:\s+|\/?>)/gim
var arr = []
var tem
while ((tem = reg.exec(htmlstr))) {
arr.push(tem[2])
}
return arr
},
getvideosrc(htmlstr) {
var reg = /<video.+?src=('|")?([^'"]+)('|")?(?:\s+|\/?>)/gim
var arr = []
var tem
while ((tem = reg.exec(htmlstr))) {
arr.push(tem[2])
}
return arr
},
getModelList() {
var params = {
...this.searchForm,
status: 0,
pageNum: this.pageNum,
pageSize: this.pageSize,
...this.materialList.params
}
this.materialList.materialListApi(params).then(res => {
this.modelList = res.data
this.tableTotal = res.count
let tableData = []
this.modelList.forEach(item => {
if (item.materialType == 1) {
this.$set(item, 'materialContent', { pdfSrc: decodeURIComponent(item.materialContentRpcResponse.materialUrl) })
return
}
let html = decodeURIComponent(item.materialContentRpcResponse.materialUrl)
let imgSrc = this.getimgsrc(html) || []
let videoSrc = this.getvideosrc(html)
if (item.imageUrlList && item.imageUrlList.length) {
imgSrc = [...imgSrc, ...item.imageUrlList]
}
if (item.videoUrl) videoSrc = videoSrc.concat(item.videoUrl)
let imgHtml = html.match(/<img.*?(?:>|\/>)/g) || []
let videoHtml = html.match(/<video.*?<\/video>/g) || []
let materialUrl, urlType, imgCount
if (imgSrc.length) {
materialUrl = imgSrc[0]
urlType = 'img'
imgCount = imgSrc.length
for (let i = 0; i < imgHtml.length; i++) {
html = html.replace(imgHtml[i], '')
}
}
if (videoSrc.length) {
materialUrl = videoSrc[0]
urlType = 'video'
for (let i = 0; i < videoHtml.length; i++) {
html = html.replace(videoHtml[i], '')
}
}
this.$set(item, 'htmlText', html.replace(/<p>/, '<p style="display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;word-break: break-all;-webkit-box-orient: vertical;">'))
html = html
.replace(/<p><\/p>/g, '')
.replace(/<p>([\s\S]+?)<\/p>/g, '\n$1')
.replace(/<[^>]+>/g, '')
if (materialUrl) {
this.$set(item, 'materialContent', { materialUrl, imgCount, urlType, imgSrc, videoSrc, html })
} else {
this.$set(item, 'materialContent', { html })
}
})
})
},
handleReset() {
this.searchForm = {
groupId: '',
materialType: ''
}
this.handleSearch()
},
handleSearch() {
this.pageNum = 1
this.getModelList()
},
handleSizeChange(val) {
this.pageSize = val
this.getModelList()
},
handleCurrentChange(val) {
this.pageNum = val
this.getModelList()
},
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', this.$common.utils.deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
handleMaterialConfirm() {
console.log(this.selectItem)
this.isMaterialVisible = false
this.$emit('handleMaterialConfirm', {
objectId: this.selectItem.id,
objectName: this.selectItem.materialContentRpcResponse.materialName,
materialContent: this.selectItem.materialContent
})
}
}
}
</script>
<style lang="scss" scoped>
.relateStore {
/deep/ {
.gl-operate {
margin-left: 10px;
}
}
}
.material-search {
/deep/ {
.el-form-item--small {
width: auto !important;
}
}
}
.model-panel {
.model-panel-tab {
display: flex;
align-items: center;
margin-bottom: 18px;
label {
font-size: 16px;
font-weight: 400;
color: #000000;
line-height: 24px;
}
/deep/ {
.el-checkbox:last-of-type {
margin-right: 8px;
}
.el-tabs__nav {
border: 0;
}
.el-tabs__header {
border: 0;
background-color: #f4f6fc;
margin: 0px;
}
.el-tabs__item {
border: none;
width: 180px;
height: 32px;
line-height: 32px;
margin: 2px;
text-align: center;
}
.el-tabs__item.is-active {
background-color: #fff;
border-radius: 4px;
font-weight: 600;
}
.el-pagination {
padding: 5px;
}
}
}
.model-item-empty {
> img {
display: block;
margin: 50px auto 0px;
width: 60px;
height: auto;
}
.empty-item {
text-align: center;
font-size: 14px;
font-weight: 400;
color: #000000;
line-height: 22px;
margin-bottom: 30px;
}
}
.model-item-panel {
// display: grid;
// grid-template-columns: repeat(4, 25%);
// grid-row-gap: 10px;
max-height: 38vh;
overflow: auto;
display: flex;
flex-wrap: wrap;
align-items: stretch;
flex-direction: row;
.model-item {
width: 23%;
margin-right: 2%;
margin-bottom: 24px;
padding: 12px 16px;
position: relative;
text-align: center;
// height: 128px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e6e6e6;
padding: 14px 24px;
box-sizing: border-box;
display: flex;
&:nth-child(4n) {
margin-right: 0px;
}
.image-panel {
border-radius: 2px;
background-size: 100% 100%;
position: relative;
width: 60px;
height: 60px;
.image-panel-filter {
position: absolute;
top: 0px;
left: 0px;
width: 60px;
height: 60px;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
img {
width: 36px;
height: 36px;
}
}
.image-panel-num {
position: absolute;
font-size: 12px;
top: 25px;
left: 25px;
color: rgba(255, 255, 255, 0.8);
}
}
.video-panel {
margin-right: 10px;
width: 60px;
height: 60px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
video {
position: absolute;
object-fit: fill;
}
.el-icon-video-play {
z-index: 10;
font-size: 20px;
color: #fff;
cursor: pointer;
}
}
.model-image {
width: 60px;
height: 60px;
img {
width: 60px;
height: 60px;
}
video {
width: 60px;
height: 60px;
object-fit: fill;
}
}
.model-content {
margin-left: 10px;
text-align: left;
width: calc(100% - 60px);
&-title {
font-size: 14px;
color: #333333;
line-height: 21px;
font-weight: 400;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
width: 100%;
}
p {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
width: calc(100% - 120px);
font-size: 12px !important;
color: #666666;
line-height: 21px;
font-weight: 400;
}
.model-content-html {
line-height: 14px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
word-break: break-all;
-webkit-box-orient: vertical;
> p {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
word-break: break-all;
-webkit-box-orient: vertical;
}
}
}
&:nth-child(4n) {
margin-right: 0px;
}
&.checked {
background: rgba(88, 80, 255, 0.1);
border: 1px solid #5850ff;
}
&-qrcode {
position: absolute;
right: 10px;
bottom: 10px;
width: 60px;
height: 60px;
border: 1px solid #979797;
}
&-title {
font-size: 18px;
font-weight: 600;
color: #333333;
line-height: 25px;
margin-bottom: 5px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.img-pdf {
width: 40px;
height: 40px;
margin-top: 10px;
}
.img-material {
width: 72px;
height: 72px;
object-fit: fill;
}
&-content {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 16px;
height: 16px;
margin-top: 6px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
&.model-item-weight {
line-height: 20px;
height: 20px;
}
span {
color: #5850ff;
font-size: 20px;
}
}
&-contents {
line-height: 22px;
height: 22px;
}
}
}
}
</style>
...@@ -23,3 +23,5 @@ export const http = params => Vue.prototype.$http(params) ...@@ -23,3 +23,5 @@ 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_sop = params => Vue.prototype.$http_sop(params)
export const http_merchant = params => Vue.prototype.$http_merchant(params) export const http_merchant = params => Vue.prototype.$http_merchant(params)
export const http_upload = params => Vue.prototype.$http_upload(params)
export default {
data() {
return {
journeyStatus: 0,
statusList: [],
noConfig: false,
activityType: {
1: [
{
describe: '步骤一:关联营销活动',
icon: 'el-icon-warning',
isDisabled: false,
status: [1],
with: 165,
btnName: '去关联',
clickFun: () => {
this.handleConcat()
}
},
{
describe: '步骤二:启用客户旅程',
icon: 'el-icon-warning',
isDisabled: true,
with: 165,
status: [1],
btnName: '去开启',
clickFun: () => {
this.haneldOpen()
}
},
{
describe: '步骤一:已关联营销活动',
icon: 'el-icon-success',
isDisabled: false,
status: [2],
with: 165,
btnName: '去查看',
clickFun: () => {
this.concatActivity()
}
},
{
describe: '步骤二:启用客户旅程',
icon: 'el-icon-warning',
isDisabled: false,
with: 165,
status: [2],
btnName: '去开启',
clickFun: () => {
this.haneldOpen()
}
},
{
describe: '步骤一:已关联营销活动',
icon: 'el-icon-success',
isDisabled: false,
with: 165,
status: [3],
btnName: '去查看',
clickFun: () => {
this.concatActivity()
}
},
{
describe: '步骤二:已启用客户旅程',
icon: 'el-icon-success',
with: 165,
isDisabled: false,
status: [3],
btnName: '去停用',
clickFun: () => {
this.handleClose(-1)
}
},
{
describe: '步骤一:已关联营销活动',
icon: 'el-icon-success',
isDisabled: false,
with: 165,
status: [4],
btnName: '去查看',
clickFun: () => {
this.concatActivity()
}
},
{
describe: '步骤二:已停用客户旅程',
icon: 'el-icon-success',
with: 165,
isDisabled: true,
status: [4],
btnName: '已停用'
}
],
2: [
{
describe: '客户旅程 未开启',
icon: 'el-icon-warning',
isDisabled: false,
with: 115,
status: [1, 2],
btnName: '去启用',
clickFun: () => {
this.haneldOpenQY()
}
},
{
describe: '客户旅程 已开启',
icon: 'el-icon-success',
isDisabled: false,
status: [3],
with: 115,
btnName: '去停用',
clickFun: () => {
this.handleClose(-1)
}
},
{
describe: '客户旅程 已停用',
icon: 'el-icon-warning',
isDisabled: true,
with: 115,
status: [4],
btnName: '已停用'
}
]
}
}
},
mounted() {
this.statusList = this.activityType[2]
const query = this.$route.query
this.query = query
this.getDetail()
},
methods: {
getDetail(order) {
this.$apis.journeyConfig.getInstIdDetail({ instId: this.query.instId }).then(res => {
console.log(res,'res')
const instParam = JSON.parse(res.instParam)
this.dataTypeCode = instParam.dataTypeCode
this.noConfig = false
//xbpzj 关联续保膨胀金
if (this.dataTypeCode == 'xbpzj') {
this.statusList = this.activityType[1]
} else {
this.statusList = this.activityType[2]
}
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) {
this.journeyStatus = 3
}
if (instStatus == -1) {
this.journeyStatus = 4
}
const nodes = res.nodes.filter(item=>item.nodeSkip!=1)
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), nodeId: v.instNodeId, nodeProtoId: v.nodeProtoId })
}
}
list = list.filter(item => item.day)
list.sort((a, b) => {
return a.day - b.day
})
list.forEach(i => {
if ([5, 7, 8, 9, 10].includes(i.taskType) && !i.taskParam) {
this.noConfig = true
}
})
if (stages[k].conditions && this.dataTypeCode == 'xbpzj') {
stages[k].conditions.forEach(con => {
const condition = con.conditions.filter(i => i.isHide)
if (condition.length && condition.length == 1) {
if (!condition[0].operators[0].value) {
this.noConfig = true
}
}
})
}
const sopList = this.groupBy(list, 'day')
configList.push({
order: k,
label: stages[k].value,
isExpaned: order == k ? true : false,
editable: stages[k].editable,
conditionsList: stages[k].conditions || [],
sopList,
instStatus
})
}
this.configList = configList
})
},
async openAllConfig() {
const supMerchantNo = await this.$apis.journeyConfig.authorizeMerchant({ merchantId: this.$globalState.session.merchantId })
await this.$apis.journeyConfig.concatActivity({ instId: this.query.instId, data: { supMerchantNo } })
this.setSopInsts(1)
},
async haneldOpenQY() {
if (this.noConfig) {
this.handleConfirm('开启提示', '确定', '请完善进入条件及SOP任务后,再启动客户旅程。', '', () => {
// this.openAllConfig()
})
} else {
this.openAllConfig()
}
}
}
}
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2024-01-03 15:15:25
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-15 14:52:50
* @FilePath: \scrm-micro-scene\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']),
//获取sop映射字段
stageInfo(i) {
if (this.modelList) {
return this.modelList.find(item => {
if (item.id == i) {
return item
}
})
} else {
return {
nodeName: '',
desc: ''
}
}
}
}
}
...@@ -2,11 +2,7 @@ ...@@ -2,11 +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
<<<<<<< HEAD
* @LastEditTime: 2023-09-27 12:07:58 * @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
*/ */
...@@ -17,12 +13,15 @@ import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限 ...@@ -17,12 +13,15 @@ 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 { GLEditor } from 'word-edit'
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
import 'word-edit/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)
Vue.use(GLEditor)
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, response_sop, request_sop, request_merchant, tmplUrl } = await fetchConfig(common) const { response, request, sign, secret, sign_common, request_common, response_sop, request_sop, request_merchant, tmplUrl } = await fetchConfig(common)
Vue.prototype.$tmplUrl = tmplUrl Vue.prototype.$tmplUrl = tmplUrl
...@@ -36,6 +35,14 @@ export async function bootstrap({ history, common, messenger, globalState, route ...@@ -36,6 +35,14 @@ export async function bootstrap({ history, common, messenger, globalState, route
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_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.$http_merchant = new common.Http({ response, request:request_merchant, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http_upload = new common.Http({
response: { ...response, data_key: 'result', code_success_value: true, code_key: 'success' },
request,
sign,
secret,
alert: message.error,
headers: { token: globalState.session.token, 'Content-Type': 'multipart/form-data' }
})
// 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)
......
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-27 16:50:15
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-03 15:19:16
* @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.journeyConfig.SopTplNodeProtosList({})
commit('SET_MODEL', res)
}
}
}
<template> <template>
<div <div class="journey" v-loading="loading">
class="journey"
v-loading="loading"
>
<div class="container"> <div class="container">
<div class="sticky"> <div class="sticky">
<GLCombiForm <GLCombiForm ref="showSearch" :rowNumber="2" :formObj="searchForm" :formData="searchFormData" :searchSelectObj="searchSelectObj" @handleOk="handleSearch" @handleRest="handleReset" :key="FormKey"></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="['sticky-btns', { hiddenExport: viewType == 1 }]">
<div class="btns"> <div class="btns">
<el-button <el-button type="default" @click="refreshInst" plain>状态刷新</el-button>
type="default" <el-button type="default" @click="changeViewType">切换为{{ viewType == 1 ? '列表' : '看板' }}视图</el-button>
@click="refreshInst" <el-button type="default" @click="handleExport">导出</el-button>
plain
>状态刷新</el-button>
<el-button
type="default"
@click="changeViewType"
>切换为{{ viewType == 1 ? '列表' : '看板' }}视图</el-button>
<el-button
type="default"
@click="handleExport"
>导出</el-button>
</div> </div>
</div> </div>
</div> </div>
<template v-if="viewType == 1"> <template v-if="viewType == 1">
<div class="journey-data-view"> <div class="journey-data-view">
<data-view <data-view :params="tableSearchForm" ref="dataView" :stageList="stageList"></data-view>
:params="tableSearchForm"
ref="dataView"
:stageList="stageList"
></data-view>
</div> </div>
</template> </template>
<template v-else> <template v-else>
...@@ -48,11 +22,7 @@ ...@@ -48,11 +22,7 @@
<template v-if="stageList && stageList.length"> <template v-if="stageList && stageList.length">
<template v-for="(i, index) in stageList"> <template v-for="(i, index) in stageList">
<template> <template>
<div <div :class="['tab', { active: searchForm.sopJourneyStage == i.value }]" :key="index" @click="changeTab(i.value)">
:class="['tab', { active: searchForm.sopJourneyStage == i.value }]"
:key="index"
@click="changeTab(i.value)"
>
{{ i.label }} {{ i.label }}
</div> </div>
</template> </template>
...@@ -61,11 +31,7 @@ ...@@ -61,11 +31,7 @@
</div> </div>
</div> </div>
<div class="journey-table"> <div class="journey-table">
<journey-table <journey-table ref="table" :params="tableSearchForm" :stageList="stageList"></journey-table>
ref="table"
:params="tableSearchForm"
:stageList="stageList"
></journey-table>
</div> </div>
</template> </template>
</div> </div>
...@@ -125,6 +91,7 @@ export default { ...@@ -125,6 +91,7 @@ export default {
value: '' value: ''
}] }]
for (let k in stages) { for (let k in stages) {
item.journeyItem.push({ item.journeyItem.push({
label: stages[k].value, label: stages[k].value,
value: stages[k].value, // 后台要求改成label值 20230927 value: stages[k].value, // 后台要求改成label值 20230927
......
...@@ -4,29 +4,13 @@ ...@@ -4,29 +4,13 @@
<div class="carousel-box"> <div class="carousel-box">
<template v-if="dataViewLoading"> <template v-if="dataViewLoading">
<template v-if="viewList.length"> <template v-if="viewList.length">
<el-carousel <el-carousel ref="carousel" :autoplay="false" :loop="false" indicator-position="none" height="100%" arrow="never" class="carousel" @change="viewIndex = $event">
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 v-for="(i, index) in viewList">
<template> <template>
<el-carousel-item <el-carousel-item :key="index" class="carousel-item">
:key="index"
class="carousel-item"
>
<template v-for="(c, cindex) in i"> <template v-for="(c, cindex) in i">
<template> <template>
<div <div :key="cindex" class="group" v-loading="c.loading">
:key="cindex"
class="group"
v-loading="c.loading"
>
<div class="title"> <div class="title">
<div class="text flex"> <div class="text flex">
<div class="icon"> <div class="icon">
...@@ -35,10 +19,7 @@ ...@@ -35,10 +19,7 @@
{{ c.title }} {{ c.title }}
</div> </div>
<div class="line-box"> <div class="line-box">
<div <div class="line" :style="[{ width: c.width }]"></div>
class="line"
:style="[{ width: c.width }]"
></div>
</div> </div>
</div> </div>
<div <div
...@@ -52,10 +33,7 @@ ...@@ -52,10 +33,7 @@
<template v-if="c.list.length"> <template v-if="c.list.length">
<template v-for="(item, ind) in c.list"> <template v-for="(item, ind) in c.list">
<template> <template>
<div <div :key="ind" class="item">
:key="ind"
class="item"
>
<div class="top flex"> <div class="top flex">
<div class="icon"> <div class="icon">
<template v-if="item.wechatAvatarUrl"> <template v-if="item.wechatAvatarUrl">
...@@ -75,7 +53,7 @@ ...@@ -75,7 +53,7 @@
</div> </div>
<div class="bottom flex"> <div class="bottom flex">
<div class="left text-hide">进入该阶段:第{{ item.day }}天</div> <div class="left text-hide">进入该阶段:第{{ item.day }}天</div>
<div class="right text-hide">跟进人:{{ item.sopFollowUpPersonName }}</div> <div class="right text-hide">跟进人:{{ item.sopFollowUpPersonName || '--' }}</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -94,16 +72,10 @@ ...@@ -94,16 +72,10 @@
</template> </template>
</template> </template>
</el-carousel> </el-carousel>
<div <div class="arrow left" @click="$refs.carousel.prev()">
class="arrow left"
@click="$refs.carousel.prev()"
>
<img :src="viewIndex == 0 ? leftIcon : leftActiveIcon" /> <img :src="viewIndex == 0 ? leftIcon : leftActiveIcon" />
</div> </div>
<div <div class="arrow right" @click="$refs.carousel.next()">
class="arrow right"
@click="$refs.carousel.next()"
>
<img :src="viewIndex < viewList.length - 1 ? rightActiveIcon : rightIcon" /> <img :src="viewIndex < viewList.length - 1 ? rightActiveIcon : rightIcon" />
</div> </div>
</template> </template>
...@@ -163,15 +135,14 @@ export default { ...@@ -163,15 +135,14 @@ export default {
methods: { methods: {
// 下拉加载 // 下拉加载
async infiniteLoad (cindex, index) { async infiniteLoad (cindex, index) {
// console.log(this.pageCount, this.pageNumber)
if (this.viewList[index][cindex].list.length == 0) return if (this.viewList[index][cindex].list.length == 0) return
if (this.viewList[index][cindex].list.length == this.pageCount[cindex]) return if (this.viewList[index][cindex].list.length == this.pageCount[cindex]) return
this.pageNumber[cindex]++ this.pageNumber[cindex]++
const params = { const params = {
...JSON.parse(JSON.stringify(this.params)), ...this.$common.utils.deepClone(this.params),
pageSize: 10, pageSize: 10,
pageNumber: this.pageNumber[cindex], pageNumber: this.pageNumber[cindex],
sopJourneyStage: this.stageList[cindex].value sopJourneyStage: this.stageList[cindex+1].value
} }
let { list } = await this.$apis.journey.getCustomersList(params) let { list } = await this.$apis.journey.getCustomersList(params)
list.length && list.length &&
...@@ -193,7 +164,7 @@ export default { ...@@ -193,7 +164,7 @@ export default {
}, []) }, [])
} }
const params = { const params = {
...JSON.parse(JSON.stringify(this.params)), ...this.$common.utils.deepClone(this.params),
pageSize: 10, pageSize: 10,
pageNumber: 1 pageNumber: 1
} }
...@@ -220,6 +191,7 @@ export default { ...@@ -220,6 +191,7 @@ export default {
k != 0 && this.$set(this.pageNumber, k - 1, 1) k != 0 && this.$set(this.pageNumber, k - 1, 1)
const { list: apiList, total } = await this.$apis.journey.getCustomersList(params) const { list: apiList, total } = await this.$apis.journey.getCustomersList(params)
console.log(total,'total')
list = apiList list = apiList
k != 0 && this.$set(this.pageCount, k - 1, total) k != 0 && this.$set(this.pageCount, k - 1, total)
} }
...@@ -344,6 +316,7 @@ export default { ...@@ -344,6 +316,7 @@ export default {
} }
.bottom { .bottom {
height: 33px; height: 33px;
line-height: 33px;
justify-content: space-between; justify-content: space-between;
padding: 0 8px; padding: 0 8px;
font-size: 12px; font-size: 12px;
......
<template> <template>
<div class="journey-table"> <div class="journey-table">
<GLTable <GLTable ref="tableRef" :noDataImg="url" :tableParams="tableParams" :tableData="tableData" :pageConf="pageConf" @refreshTable="refreshTable" :tableTotal="tableTotal">
ref="tableRef" <div class="table-btns" slot="auth-button" slot-scope="scope">
:noDataImg="url" <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope"></GLTableButton>
: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> </div>
</GLTable> </GLTable>
<el-drawer <el-drawer :visible.sync="showDrawer" direction="rtl" size="720px">
:visible.sync="showDrawer"
direction="rtl"
size="720px"
>
<template #title> <template #title>
<div class="drawer-title">编辑客户旅程</div> <div class="drawer-title">编辑客户旅程</div>
</template> </template>
...@@ -47,15 +28,8 @@ ...@@ -47,15 +28,8 @@
<div class="label">旅程阶段:</div> <div class="label">旅程阶段:</div>
<template v-for="(i, index) in stageList"> <template v-for="(i, index) in stageList">
<template v-if="index != 0"> <template v-if="index != 0">
<div <div :key="index" class="tags-item flex">
:key="index" <el-button :class="['text', { disabled: i.disabled }, { active: index == stageIndex }]" :disabled="i.disabled" @click="editStage(index)">{{ i.label }}</el-button>
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 class="arrow"></div>
</div> </div>
</template> </template>
...@@ -70,10 +44,7 @@ ...@@ -70,10 +44,7 @@
</div> </div>
<template v-for="(i, index) in fileObject"> <template v-for="(i, index) in fileObject">
<template> <template>
<div <div :key="index" class="file-item flex">
:key="index"
class="file-item flex"
>
<div class="label">{{ i.label }}:</div> <div class="label">{{ i.label }}:</div>
<div class="value"> <div class="value">
<template v-if="userInfo.carMaintenanceInsurances && userInfo.carMaintenanceInsurances[0]"> <template v-if="userInfo.carMaintenanceInsurances && userInfo.carMaintenanceInsurances[0]">
...@@ -86,14 +57,8 @@ ...@@ -86,14 +57,8 @@
</div> </div>
</div> </div>
<div class="footer flex"> <div class="footer flex">
<el-button <el-button type="default" @click="showDrawer = false">取消</el-button>
type="default" <el-button type="primary" @click="handleConfirm">确定</el-button>
@click="showDrawer = false"
>取消</el-button>
<el-button
type="primary"
@click="handleConfirm"
>确定</el-button>
</div> </div>
</el-drawer> </el-drawer>
</div> </div>
......
...@@ -2,18 +2,19 @@ ...@@ -2,18 +2,19 @@
* @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-10-17 15:00:21 * @LastEditTime: 2024-01-16 15:58:18
* @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 :class="{ 'collapse-item': true, 'is-active': stepItem.isExpaned }" @click="handleExpand(item)"> <div :class="{ 'collapse-item': true, 'is-active': stepItem.isExpaned }" ref="collapseRef">
<div class="collapse-item-tab flex-column-center pl20"> <div class="collapse-item-tab flex-column-center plr20" @click="handleExpand(item)">
<i class="el-icon-caret-bottom" v-show="stepItem.isExpaned"></i> <i class="el-icon-caret-bottom" v-show="stepItem.isExpaned"></i>
<i class="el-icon-caret-right" v-show="!stepItem.isExpaned"></i> <i class="el-icon-caret-right" v-show="!stepItem.isExpaned"></i>
<div class="tab-label"> <div class="tab-label">
{{ stepItem.label }} {{ stepItem.label }}
</div> </div>
<div class="tab-sop" @click.stop="showStat" v-if="stepItem.instStatus == 1">SOP执行统计</div>
</div> </div>
<div class="collapse-item-panel" :style="{ display: stepItem.isExpaned ? 'block' : 'none' }"> <div class="collapse-item-panel" :style="{ display: stepItem.isExpaned ? 'block' : 'none' }">
<div class="task-item"> <div class="task-item">
...@@ -22,24 +23,29 @@ ...@@ -22,24 +23,29 @@
<div class="task-item-icon"> <div class="task-item-icon">
<img src="@/assets/config/log.png" /> <img src="@/assets/config/log.png" />
</div> </div>
<div class="task-item-name">进入条件</div> <div class="task-item-name">
<div class="task-item-desc">(描述用户触发何种条件后,将自动变更为该旅程阶段)</div> 进入条件
<el-popover placement="top" width="300" trigger="hover">
<div>描述用户触发何种条件后,将自动变更为该旅程阶段</div>
<img src="@/assets/icon-tip.png" class="question" slot="reference" alt="" />
</el-popover>
</div>
<div class="task-item-desc">该旅程阶段{{ stepItem.editable ? '' : '不' }}支持手动标记</div>
</div> </div>
<div class="progress-item-content bg-fff" v-if="stepItem.conditionsList.length"> <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"> <div class="progress-item" v-for="(v, k) in stepItem.conditionsList" :key="k">
<span>条件{{ k + 1 }}</span> <div class="progress-item-num">
<span>{{ spiltString(v, 0) }}</span> <span>条件{{ k + 1 }}</span>
<img src="@/assets/config/arrow.png" v-if="spiltString(v, 1)" /> <span>{{ spiltString(v) }}</span>
<span>{{ spiltString(v, 1) }}</span> </div>
<div class="progress-edit" @click="showEdit(v, k)">编辑</div>
</div> </div>
</div> </div>
<div class="empty-panel" v-else> <div class="empty-panel" v-else>
<div class="empty-img"> <div class="empty-img">
<img src="@/assets/empty.png" /> <img src="@/assets/empty.png" />
</div> </div>
<div class="empty-txt"> <div class="empty-txt">暂无进入条件</div>
暂无进入条件
</div>
</div> </div>
</template> </template>
<template> <template>
...@@ -49,8 +55,13 @@ ...@@ -49,8 +55,13 @@
<div class="task-item-icon"> <div class="task-item-icon">
<img src="@/assets/config/sop.png" /> <img src="@/assets/config/sop.png" />
</div> </div>
<div class="task-item-name">SOP任务</div> <div class="task-item-name">
<div class="task-item-desc">(系统面向当前旅程阶段客户的营销计划)</div> SOP任务
<el-popover placement="top" width="300" trigger="hover">
<div>系统面向当前旅程阶段客户的营销计划</div>
<img src="@/assets/icon-tip.png" class="question" slot="reference" alt="" />
</el-popover>
</div>
</div> </div>
<div class="task-item-content bg-fff" v-if="stepItem.sopList.length"> <div class="task-item-content bg-fff" v-if="stepItem.sopList.length">
<div class="step-item" v-for="(v, k) in stepItem.sopList" :key="k"> <div class="step-item" v-for="(v, k) in stepItem.sopList" :key="k">
...@@ -62,9 +73,55 @@ ...@@ -62,9 +73,55 @@
<div v-for="(value, key) in v" :key="key" class="step-time-item flex-column-center"> <div v-for="(value, key) in v" :key="key" class="step-time-item flex-column-center">
<div> <div>
<div class="step-item-desc"> <div class="step-item-desc">
<span>[{{ stage_time[value.taskType] }}]发送 | {{ stage[value.taskType] }} |{{ stage_info[value.taskType] }}</span> <span>[{{ value.time }}]发送 | {{ stageInfo(value.nodeProtoId).nodeName }} |{{ stageInfo(value.nodeProtoId).desc }}</span>
</div>
<div class="step-item-name flex-column-center" v-if="value.taskType">
<div class="task-type flex">
受众客户:全旅程阶段客户
<div>
<div v-if="value.dataTag && value.dataTag.length > 0" class="flex">
、标签客户
<div class="tag" v-for="tag in value.dataTag" :key="tag.labelId">{{ tag.labelName }}</div>
</div>
</div>
</div>
<div class="task-type-edit" @click="setCriteria(value)" v-show="[7, 8, 9].includes(value.taskType)">
<img src="@/assets/config/icon-edit.png" />
<a>设置条件</a>
</div>
</div>
<!-- 仅企微提醒、企微群发、企微朋友圈展示 -->
<div class="step-item-name flex-column-center" v-show="[7, 8, 9].includes(value.taskType)">
<div class="task-type">跟进员工类型:{{ value.taskParam ? value.taskParam.followName : '' }}</div>
</div>
<!-- -->
<div class="step-item-name flex-column-center">
<div v-if="[5, 7, 8, 9, 10].includes(value.taskType)" class="task-type">
{{ stage_prefix[value.taskType].label }}
<span v-for="(tpl, index) in value.taskParam && value.taskParam.attContentList" :key="index">
<template v-if="tpl.attType == 1">{{ tpl.attContent }}</template>
</span>
</div>
<div class="task-type" v-else>{{ stage_prefix[value.taskType].label }}{{ stage_prefix[value.taskType].key ? activityInfo[stage_prefix[value.taskType].key] : remind(stage_prefix[value.taskType], k) }}</div>
<div class="task-type-edit" @click="editContent(value)" v-show="[5, 7, 8, 9, 10].includes(value.taskType)">
<img src="@/assets/config/icon-edit.png" />
<a>编辑内容</a>
</div>
</div>
<div class="task-tpl-wrap flex" v-if="[8, 9, 10].includes(value.taskType)">
<div v-for="(tpl, index) in value.taskParam && value.taskParam.attContentList" :key="index">
<img class="tpl-img" :src="tpl.attContent" v-if="tpl.attType == 2" />
<div v-if="tpl.attType == 7" class="mini-program flex">
<img class="icon" src="@/assets/gift.png" />
{{ tpl.attContent.marketingName }}
</div>
<div v-if="tpl.attType == 6" class="mini-program flex">
<img class="icon" src="@/assets/gift.png" />
{{ JSON.parse(tpl.attContent).fileName }}
</div>
<video class="tpl-video" type="video/mp4" v-if="tpl.attType == 3" width="100%" height="100%" :src="tpl.attContent"></video>
</div>
</div> </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>
<!-- <div class="step-detail-btn" @click="getEmpDetail">详情</div> --> <!-- <div class="step-detail-btn" @click="getEmpDetail">详情</div> -->
</div> </div>
...@@ -75,9 +132,7 @@ ...@@ -75,9 +132,7 @@
<div class="empty-img"> <div class="empty-img">
<img src="@/assets/empty.png" /> <img src="@/assets/empty.png" />
</div> </div>
<div class="empty-txt"> <div class="empty-txt">暂无SOP任务</div>
暂无SOP任务
</div>
</div> </div>
</div> </div>
<div class="task-sop-calendar"> <div class="task-sop-calendar">
...@@ -92,18 +147,16 @@ ...@@ -92,18 +147,16 @@
<div class="calendar-item" v-for="(v, k) in stepItem.sopList" :key="k"> <div class="calendar-item" v-for="(v, k) in stepItem.sopList" :key="k">
<div class="calendar-day">第{{ v[0].day }}天</div> <div class="calendar-day">第{{ v[0].day }}天</div>
<div class="calendar-time flex-column-center" v-for="(value, key) in v" :key="key"> <div class="calendar-time flex-column-center" v-for="(value, key) in v" :key="key">
<el-popover placement="top-start" width="100" trigger="click"> <el-popover popper-class="popover-dialog" placement="top-start" width="100" trigger="click">
<div class="popover-panel" v-for="(t, pkey) in v" :key="pkey"> <div class="popover-panel" v-for="(t, pkey) in v" :key="pkey">
<div class="flex-column-center"> <div class="flex-column-center">
<span>{{ stage_time[t.taskType] }}</span> <span>{{ t.time }}</span>
<div :class="['stage-icon', `stage-${stage_icon[t.taskType]}`]"></div>
</div> </div>
<div class="stage-desc">{{ stage[t.taskType] }}</div> <div class="stage-desc">{{ stageInfo(t.nodeProtoId).nodeName }}</div>
</div> </div>
<div slot="reference" class="flex-column-center" v-if="v.length <= 2"> <div slot="reference" class="flex-column-center" v-if="v.length <= 2">
<span>{{ stage_time[value.taskType] }}</span> <span>{{ value.time }}</span>
<div :class="['stage-icon', `stage-${stage_icon[value.taskType]}`]"></div>
</div> </div>
<div slot="reference" class="flex-column-center" v-if="v.length > 2 && key == 0"> <div slot="reference" class="flex-column-center" v-if="v.length > 2 && key == 0">
<span>3条内容</span> <span>3条内容</span>
...@@ -118,17 +171,24 @@ ...@@ -118,17 +171,24 @@
</template> </template>
</div> </div>
</div> </div>
<!-- <emp-detail v-if="empVisible" :empVisible="empVisible"></emp-detail> --> <stat-dialog v-if="statVisible" :statVisible="statVisible" :stageid="stageid"></stat-dialog>
<edit-condition v-if="conditionVisible" :conditionVisible="conditionVisible" :order="stepItem.order" :conditionInfo="conditionInfo" @closeCondition="closeCondition"></edit-condition>
<select-tag ref="selectTagRef" @tagSelected="handleTagSelect"></select-tag>
<model-dialog :tplVisible="tplVisible" v-bind="sopItem" @dialogClose="dialogClose" @confirm="updateContent"></model-dialog>
</div> </div>
</template> </template>
<script> <script>
const STAGE = Object.freeze({ const STAGE = Object.freeze({
4: '门店助手1v1', 1: '门店助手短信',
3: '门店助手朋友圈',
1: '发送短信',
2: 'AI外呼', 2: 'AI外呼',
3: '门店助手朋友圈',
4: '门店助手1v1',
5: '跟进提醒', 5: '跟进提醒',
6: '客户信息查询' 6: '客户信息查询',
7: '企微提醒',
8: '企微群发',
9: '企微朋友圈',
10: '发送短信'
}) })
const ICON = Object.freeze({ const ICON = Object.freeze({
4: 1, 4: 1,
...@@ -138,28 +198,14 @@ const ICON = Object.freeze({ ...@@ -138,28 +198,14 @@ const ICON = Object.freeze({
5: 5, 5: 5,
6: 6 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({ const STAGE_PREFIX = Object.freeze({
4: { 4: {
key: 'activityName' key: 'activityName',
label: '活动名称:'
}, },
3: { 3: {
key: 'activityName' key: 'activityName',
label: '活动名称:'
}, },
1: { 1: {
key: 'textMessage', key: 'textMessage',
...@@ -167,18 +213,43 @@ const STAGE_PREFIX = Object.freeze({ ...@@ -167,18 +213,43 @@ const STAGE_PREFIX = Object.freeze({
}, },
2: { 2: {
key: 'aiSpeech', key: 'aiSpeech',
label: 'AI话术模版:' label: '话术模版:'
}, },
5: { 5: {
意向客户: '提醒内容:您有[客户人数] 位客户已进入[旅程阶段],请及时跟进。', key: 'aiSpeech',
保费报价: ['提醒内容:您有客户保费已出,请尽快联系并提供车险报价。', '提醒内容:3天前您有客户保费已出,请尽快跟进并通过门店助手反馈跟进情况(成功 或者 战败)'] label: '提醒模版:'
}, },
6: '查询内容:到保日期' 6: '查询内容:到保日期',
7: {
key: 'aiSpeech',
label: '提醒模版:'
},
8: {
key: 'aiSpeech',
label: '营销模版:'
},
9: {
key: 'aiSpeech',
label: '营销模版:'
},
10: {
key: 'textMessage',
label: '短信模版:'
}
}) })
// import empDetail from './empDetail' import statDialog from './statDialog'
import editCondition from './editCondition'
import SelectTag from './selectTag'
import ModelDialog from './Model.vue'
import model from '@/mixins/model'
import { utils } from 'glsx-common'
export default { export default {
mixins: [model],
components: { components: {
// empDetail statDialog,
editCondition,
SelectTag,
ModelDialog
}, },
props: { props: {
stepItem: { stepItem: {
...@@ -192,16 +263,142 @@ export default { ...@@ -192,16 +263,142 @@ export default {
}, },
data() { data() {
return { return {
conditionInfo: {},
stage: STAGE, stage: STAGE,
stage_icon: ICON,
stage_info: STAGE_INFO,
stage_time: STAGE_TIME,
stage_prefix: STAGE_PREFIX, stage_prefix: STAGE_PREFIX,
empVisible: false stage_icon: ICON,
empVisible: false,
statVisible: false,
conditionVisible: false,
tplVisible: false,
sopItem: {}
} }
}, },
created() {}, created() {},
mounted() {
},
methods: { methods: {
//获取已选择标签
handleTagSelect(data) {
let dataTag = [],
options
data.forEach(group => {
let labelList = group.labelList
labelList.forEach(label => {
dataTag.push({
groupId: group.labelGroup.id,
groupName: group.labelGroup.name,
groupType: group.labelType,
labelId: label.id,
labelName: label.name
})
})
})
options = {
dataTag,
taskParam: ''
}
this.updateParam(options)
},
recursionTreeTag(selectItem, dataTag) {
if (dataTag.length == 0) return
selectItem.push({
labelGroup: {
id: dataTag[0].groupId,
name: dataTag[0].groupName
},
labelType: dataTag[0].groupType,
labelList: []
})
for (let i = 0; i < dataTag.length; i++) {
let len = selectItem.length - 1,
item = dataTag[i]
if (selectItem[len].labelGroup.id == item.groupId) {
selectItem[len].labelList.push({
id: item.labelId,
name: item.labelName
})
dataTag.splice(i--, 1)
}
}
if (dataTag.length > 0) {
this.recursionTreeTag(selectItem, dataTag)
}
},
//设置条件
setCriteria(item) {
let selectItem = []
let dataTag = utils.deepClone(item.dataTag)
this.recursionTreeTag(selectItem, dataTag)
this.sopItem = item
this.$refs.selectTagRef.init(selectItem)
},
updateContent(data) {
let taskParam = data,
options = {
taskParam,
dataTag: ''
}
this.updateParam(options)
},
updateParam(options) {
console.log(options, this.sopItem)
let { day, stage, stageid, taskType, nodeId, time } = this.sopItem
let dataTag = options.dataTag || this.sopItem.dataTag,
taskParam = options.taskParam || this.sopItem.taskParam,
data = {
day,
stage,
stageid,
time,
taskType,
dataTag,
taskParam: taskParam ? taskParam : {}
}
if (taskType == 7||taskType == 5) {
data.taskParam.content = taskParam && taskParam.attachments && taskParam.attachments.length ? taskParam.attachments[0].attContent : ''
delete data.taskParam.attachments
}
this.$apis.journeyConfig.updateParam({ nodeId, data }).then(res => {
if (res == 'success') {
this.$parent.getDetail(this.stepItem.order)
this.tplVisible = false
}
})
},
/* 编辑内容
* 门店助手跟进提醒
* 企微提醒
* 发送短信
* 企微群发/企微朋友圈
*/
editContent(item) {
this.sopItem = item
this.tplVisible = true
},
dialogClose(val) {
this.tplVisible = val
},
showEdit(v, k) {
const { title } = this.$route.query,
{ label, conditionsList, editable, flag } = this.stepItem
this.conditionInfo = {
title,
flag,
label,
editable,
conditionsList: conditionsList,
index: k
}
this.conditionVisible = true
},
closeCondition() {
this.conditionVisible = false
},
showStat() {
this.stageid = this.stepItem.order.slice(5)
this.statVisible = true
},
remind(v, k) { remind(v, k) {
if (typeof v == 'string') return v if (typeof v == 'string') return v
if (this.stepItem.label == '保费报价') { if (this.stepItem.label == '保费报价') {
...@@ -210,8 +407,44 @@ export default { ...@@ -210,8 +407,44 @@ export default {
return v[this.stepItem.label] return v[this.stepItem.label]
} }
}, },
spiltString(str, n) { spiltString(data, n) {
return (str.split('-')[n] || '').replace('文字备注:', '') 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(/,+$/, '')
}, },
//查看详情 //查看详情
getEmpDetail() { getEmpDetail() {
...@@ -225,6 +458,11 @@ export default { ...@@ -225,6 +458,11 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.question {
width: 16px;
height: 16px;
vertical-align: bottom;
}
.empty-panel { .empty-panel {
background: #fff; background: #fff;
padding: 10px; padding: 10px;
...@@ -257,6 +495,12 @@ export default { ...@@ -257,6 +495,12 @@ export default {
font-size: 14px; font-size: 14px;
color: #1d2129; color: #1d2129;
} }
.tab-sop {
font-weight: 400;
font-size: 14px;
color: #5850ff;
margin-left: auto;
}
} }
.collapse-item-panel { .collapse-item-panel {
background: #f7f7fc; background: #f7f7fc;
...@@ -276,6 +520,7 @@ export default { ...@@ -276,6 +520,7 @@ export default {
.task-item-desc { .task-item-desc {
color: #999999; color: #999999;
font-size: 12px; font-size: 12px;
margin-left: auto;
} }
} }
.task-sop-l { .task-sop-l {
...@@ -289,16 +534,26 @@ export default { ...@@ -289,16 +534,26 @@ export default {
.progress-item-content { .progress-item-content {
padding: 16px; padding: 16px;
margin: 10px 0px; margin: 10px 0px;
display: grid;
grid-template-columns: 50% 50%;
row-gap: 20px; row-gap: 20px;
position: relative;
.progress-edit {
position: absolute;
top: 50%;
right: 20px;
font-size: 14px;
line-height: 20px;
color: #5850ff;
margin-top: -10px;
}
.progress-item { .progress-item {
position: relative; position: relative;
padding-left: 20px; padding-left: 20px;
min-width: 50%;
height: 32px; height: 32px;
display: flex; display: flex;
align-items: center; align-items: center;
.progress-item-num {
flex: 1;
}
img { img {
width: 32px; width: 32px;
height: 4px; height: 4px;
...@@ -311,7 +566,7 @@ export default { ...@@ -311,7 +566,7 @@ export default {
width: 48px; width: 48px;
} }
&:last-child { &:last-child {
width: 80px; // width: 80px;
} }
} }
&::before { &::before {
...@@ -354,7 +609,7 @@ export default { ...@@ -354,7 +609,7 @@ export default {
cursor: pointer; cursor: pointer;
} }
&:not(:first-child) { &:not(:first-child) {
margin-top: 20px; margin-top: 10px;
} }
} }
&:last-child { &:last-child {
...@@ -376,6 +631,60 @@ export default { ...@@ -376,6 +631,60 @@ export default {
font-size: 14px; font-size: 14px;
color: #333333; color: #333333;
margin-top: 8px; margin-top: 8px;
line-height: 20px;
.task-type {
// max-width: calc(100% - 150px);
.tag {
color: #666666;
line-height: 16px;
padding: 3px 6px;
background: #fafbfe;
border: 1px solid #e8e8ea;
border-radius: 3px;
display: inline-block;
margin-left: 6px;
}
}
.task-type-edit {
width: 80px;
color: #5850ff;
margin-left: 10px;
img {
width: 14px;
height: 14px;
}
a {
font-size: 12px;
color: #5850ff;
}
}
}
.task-tpl-wrap {
margin-top: 8px;
.tpl-img {
width: 24px;
height: 24px;
margin-right: 6px;
}
.mini-program {
height: 32px;
padding: 8px;
box-sizing: border-box;
background: #ffffff;
border-radius: 2px;
font-size: 12px;
color: #333333;
align-items: center;
.icon {
width: 16px;
height: 16px;
margin-right: 8px;
}
}
.tpl-video {
width: 24px;
height: 24px;
}
} }
.calendar-panel { .calendar-panel {
display: grid; display: grid;
......
<template>
<GLDialog v-if="visible" :title="title" :visible.sync="visible" mode="big" :before-close="handleClose">
<el-form :model="tplForm" class="basic-form" :rules="tplRules" ref="tplForm" label-width="154px">
<template v-if="[7, 8, 9].includes(taskType)">
<el-form-item label="跟进员工类型:" prop="followerTypeId">
<el-select v-model="tplForm.followerTypeId" @change="valueChange" @focus="groupFocus" :size="size" value-key="id" placeholder="请选择">
<el-option v-for="item in followList" :key="item.id" :label="item.followName" :value="item.id"></el-option>
</el-select>
</el-form-item>
</template>
<el-form-item :label="labelName + ':'">
<GLEditor ref="welcome" :form="'customer'" :mapList="mapList" style="line-height: 12px; width: 580px" :maxNum="maxNum" boxHeight="200" :btnList="btnList" @previewWord="previewForm"></GLEditor>
</el-form-item>
</el-form>
<div class="explain" v-show="taskType == 8 || taskType == 9">
说明:
<div>
素材和活动属于营销链接,与图片、视频最多仅支持选择一种类型;
<br />
营销链接最多可在素材和活动中各选一个;
<br />
图片支持格式:.jpg .png,最多可上传9张,大小不超过10M,尺寸不超过1080*1080;
<br />
视频支持格式:.mp4,最多可上传1个,大小不超过10M,时长不超过30s。
<br />
</div>
</div>
<div class="explain" v-show="taskType == 5 || taskType == 7">
示例
<div>
· 设定内容:您有{客户人数}位客户已进入可报价3天,请及时进行报价跟进。
<br />
· 实际发送内容:您有10位客户已进入可报价3天,请及时进行报价跟进。
<br />
</div>
</div>
<div class="explain" v-show="taskType == 10">提示:请及时联系运营人员完成短信签名认证,否则将影响短信发送</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="handleClose">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span>
</GLDialog>
</template>
<script>
const ATT_TYPE = {
TEXT: 1,
IMAGE: 2,
VEDIO: 3,
URL: 4,
MINIPROGRAM: 5,
FILE: 6,
ACTIVITY: 7
}
export default {
props: {
tplVisible: Boolean,
taskType: {
type: String,
default: '7'
},
taskParam: {
type: Object,
default: () => {}
}
},
data() {
return {
visible: false,
maxNum:50,
labelName: '',
tplForm: {
followerTypeId: '',
staffUserIds: '',
attachments: [],
attContentList: []
},
tplRules: {
followerTypeId: [{ required: true, message: '请选择员工类型', trigger: 'change' }]
},
followList: [],
btnList: [],
mapList: {
客户人数: '${dataSize}'
}
}
},
watch: {
tplVisible(newVal) {
this.visible = newVal
this.getFollowListType()
if (this.taskParam) {
this.tplForm = {
...this.taskParam
}
if (this.tplForm.attContentList.length) {
this.$nextTick(() => {
this.$refs.welcome && this.$refs.welcome.updateList(this.tplForm.attContentList)
})
}
}
},
taskType(newVal) {
this.changeEdit(newVal)
switch (this.taskType) {
case 7:
this.title = '企微提醒模版'
this.labelName = '提醒内容'
this.maxNum = 50
break
case 5:
this.title = '门店助手提醒模版'
this.labelName = '提醒内容'
this.maxNum = 50
break
case 8:
case 9:
this.title = '营销模板'
this.labelName = '营销内容'
this.maxNum = 200
break
case 10:
this.title = '短信模版'
this.labelName = '短信内容'
this.maxNum = 50
break
}
}
},
methods: {
renderParameter(options) {
let { id, type } = options
let obj = {
3: `{"appId":"wxe10067a63c1856ac","title":"送您一张专属权益服务卡","page":"packageShopmall/packageEquity/pages/freecard/freecard?id=${id}&merchantId={1}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-qy-10004.png"}`,
4: `{"appId":"wxe10067a63c1856ac","title":"专属权益服务套餐","page":"packageShopmall/packageEquity/pages/package/package?id=${id}&merchantId={1}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-qy-10004.png"}`,
2: `{"appId":"wxe10067a63c1856ac","title":"送您一张商城优惠券","page":"packageShopmall/packageMall/pages/coupon/coupon?couponId=${id}&merchantId=&{1}&issueDate={3}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-yh-10004.png"}`,
5: `{"appId":"wxe10067a63c1856ac","title":"您有一个秒杀活动可参加","page":"packageShopmall/packageMall/pages/detail/detail?isActivity=true&id=${id}&merchantId={1}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-ms-10004.png"}`,
8: `{"appId":"wxe10067a63c1856ac","title":"您有一个众筹活动可参加","page":"pages/crowdfunding/index/index?isActivity=true&id=${id}&merchantId={1}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-ms-10004.png"}`,
7: `{"appId":"wxb818f6bc908c52fc","title":"您有一个新资讯,请及时查看","page":"packageMine/pages/questionnaire/questionnaire?id=${id}&merchantId={1}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-ms-10004.png"}`,
6: `{"appId":"wxe10067a63c1856ac","title":"您有一个新资讯,请及时查看","page":"pages/psdView/psdView?id=${id}&merchantId={1}&nodeId={2}&sopId={3}","pic_url":"http://img01.glsx.com.cn/upload/biz/dracMini-ms-10004.png"}`
}
return obj[type]
},
changeEdit(taskType) {
if (taskType == 7 || taskType == 5) {
this.btnList = [
{
type: '客户人数',
name: '客户人数'
}
]
} else if (taskType == 10) {
this.btnList = [
{
name: '活动',
type: 'activity',
funName: 'activity',
togetherItem: [ATT_TYPE.TEXT],
funParams: [
{
itemName: '权益卡试用',
itemValue: 3,
itemType: 'card',
getInterfaceApi: this.$apis.welcomeword.getCard,
params: {
tryAble: 1,
merchantId: this.$globalState.session.merchantId
}
},
{
itemName: '权益套餐',
itemValue: 4,
itemType: 'package',
getInterfaceApi: this.$apis.welcomeword.getPackage,
params: {
state: 1
}
},
{
itemName: '商城券',
itemValue: 2,
itemType: 'coupon',
getInterfaceApi: this.$apis.welcomeword.getMerchant,
params: {
discountTypes: [2, 3, 4],
directionalFlag: 1, // 1所有人可用2定向礼包专用3关联优惠券
validType: 'valid',
status: 2
}
},
{
itemName: '秒杀活动',
itemValue: 5,
itemType: 'activity',
getInterfaceApi: this.$apis.welcomeword.getActivity,
params: {
// activityStatus: 2,
activityStatusList: [1, 2],
currentPage: 1
}
},
{
itemName: '众筹活动',
itemValue: 8,
itemType: 'crowdfunding',
getInterfaceApi: this.$apis.welcomeword.crowdfundingActivity,
params: {
currentPage: 1,
activityStatus: 2
}
},
{
itemName: '问卷调查',
itemValue: 7,
itemType: 'questionnaire',
getInterfaceApi: this.$apis.welcomeword.activityQuestionnaireForm,
params: {
merchantId: this.$globalState.session.merchantId,
statuses: [0, 1]
}
}
]
},
{
name: '素材',
type: 'material',
funName: 'material',
togetherItem: [ATT_TYPE.TEXT],
fileType: true,
groupListApi: this.$apis.welcomeword.getGroupListApi,
materialListApi: this.$apis.welcomeword.getMaterialListApi
// pdfNo: 1
// videoNo: 1
}
]
} else {
this.btnList = [
{
name: '表情',
funcName: '',
type: 'expression',
limitSize: 10
},
{
name: '图片',
funcName: '',
togetherItem: [ATT_TYPE.TEXT],
type: 'img',
// togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
limitSize: 10, //限制图片大小
limitNum: 9, //限制图片数量
limitWidth: 10800, //限制单张图片宽度
limitHeight: 1080, //限制单张图片高度
// Isdraggable: true, //图片拖拽
uploadApi: this.$apis.common.pictureUpload
},
{
name: '活动',
type: 'activity',
funName: 'activity',
togetherItem: [ATT_TYPE.TEXT],
funParams: [
{
itemName: '权益卡试用',
itemValue: 3,
itemType: 'card',
getInterfaceApi: this.$apis.welcomeword.getCard,
params: {
tryAble: 1,
merchantId: this.$globalState.session.merchantId
}
},
{
itemName: '权益套餐',
itemValue: 4,
itemType: 'package',
getInterfaceApi: this.$apis.welcomeword.getPackage,
params: {
state: 1
}
},
{
itemName: '商城券',
itemValue: 2,
itemType: 'coupon',
getInterfaceApi: this.$apis.welcomeword.getMerchant,
params: {
discountTypes: [2, 3, 4],
directionalFlag: 1, // 1所有人可用2定向礼包专用3关联优惠券
validType: 'valid',
status: 2
}
},
{
itemName: '秒杀活动',
itemValue: 5,
itemType: 'activity',
getInterfaceApi: this.$apis.welcomeword.getActivity,
params: {
// activityStatus: 2,
activityStatusList: [1, 2],
currentPage: 1
}
},
{
itemName: '众筹活动',
itemValue: 8,
itemType: 'crowdfunding',
getInterfaceApi: this.$apis.welcomeword.crowdfundingActivity,
params: {
currentPage: 1,
activityStatus: 2
}
},
{
itemName: '问卷调查',
itemValue: 7,
itemType: 'questionnaire',
getInterfaceApi: this.$apis.welcomeword.activityQuestionnaireForm,
params: {
merchantId: this.$globalState.session.merchantId,
statuses: [0, 1]
}
}
]
},
{
name: '素材',
type: 'material',
funName: 'material',
togetherItem: [ATT_TYPE.TEXT],
fileType: true,
groupListApi: this.$apis.welcomeword.getGroupListApi,
materialListApi: this.$apis.welcomeword.getMaterialListApi
// pdfNo: 1
// videoNo: 1
},
{
name: '视频',
funcName: '',
type: 'video',
togetherItem: [ATT_TYPE.TEXT],
limitSize: 10, //限制视频大小
// togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
limitNum: 1, //限制视频数量
// limitWidth: 1280, //限制视频宽度
// limitHeight: 720, //限制视频高度
limitTime: 30, //限制视频时长
paramsType: 'form-data',
uploadApi: this.$apis.common.compressVideo
}
]
}
},
//跟进员工类型
getFollowListType() {
this.$apis.journeyConfig.getFollowListType({ flag: 0 }).then(res => {
this.followList = res
})
},
//根据跟进员工类型获取员工
valueChange(val) {
let staffUserIds = []
this.$apis.journeyConfig.getStaffList({ followerTypeId: val, pageNum: 1, pageSize: 9999 }).then(res => {
res.data.forEach(val => {
staffUserIds.push(val.userId)
})
this.tplForm.staffUserIds = staffUserIds.join(',')
this.tplForm.followName = this.followList.filter(item => item.id == val)[0].followName
})
},
previewForm(val) {
const value = this.$common.utils.deepClone(val)
if (value[0] && !value[0].attContent) value.splice(0, 1)
this.tplForm.attContentList = this.$common.utils.deepClone(value)
value.forEach(activity => {
let opts
if (activity.attType == 7) {
opts = {
type: activity.attContent.marketingType,
id: activity.attContent.marketingId
}
activity.attContent = this.renderParameter(opts)
activity.attType = 4
} else if (activity.attType == 6) {
opts = {
type: activity.attType,
id: JSON.parse(activity.attContent).objectId
}
activity.attContent = this.renderParameter(opts)
activity.attType = 4
}
})
this.tplForm.attachments = value
},
handleClose() {
this.$emit('dialogClose', false)
},
handleSelect() {
this.$refs.tplForm.validate(valid => {
if (valid) {
if (this.tplForm.attachments.length == 0) {
this.$message.error(`请输入${this.labelName}`)
return
}
this.$emit('confirm', this.tplForm)
}
})
}
}
}
</script>
<style scoped lang="scss">
.explain {
font-size: 14px;
color: #999999;
line-height: 22px;
margin: -12px 0 0 154px;
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-27 11:29:17
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-16 15:35:01
* @FilePath: \scrm-micro-scene\src\views\journeyConfig\components\relatedActivity.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<GLDialog title="编辑条件" mode="big" class="gl-form-page gl-form-min" @onOk="handleSure" :before-close="handleClose" @onCancel="handleClose" :visible.sync="conditionVisible">
<div class="dialog-body">
<div class="condition-item" v-for="(item, index) in conditionItem" :key="index">
<label>{{ item.label }}:</label>
<span v-if="item.mark">{{ item.mark(conditionInfo[item.name]) }}</span>
<span v-else-if="item.getName">{{ item.getName(conditionInfo[item.name]) }}</span>
<span v-else>{{ conditionInfo[item.name] }}</span>
</div>
<div class="condition-panel" v-if="configInfoList.length == 2">
<div class="flex">
<label class="condition-label">企微成员范围:</label>
<div class="condition-select m-l">
<div class="m-b-10">
<el-radio-group v-model="empType">
<el-radio :label="index" v-for="(item, index) in configInfoList" :key="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</div>
<template v-if="empType == 0">
<el-button size="small" @click="handleAddEmp">
<i class="el-icon-plus"></i>
选择成员
</el-button>
<div class="sale-select" v-show="this.userList && this.userList.length != 0">
<div :key="key" class="el-input-tag input-tag-wrapper">
<el-tag effect="plain" type="info" v-for="(tag, idx) in this.userList" :key="idx" closable :disable-transitions="false" @close="remove(tag, idx)">
<i class="el-icon-user-solid"></i>
{{ tag.staffName }}
</el-tag>
</div>
</div>
</template>
</div>
</div>
</div>
<template v-if="conditionsList">
<div class="condition-select flex">
<div class="flex">
<el-select v-model="conditionList.flag" disabled="true" placeholder="请选择" :size="size" class="m-r-10" v-if="conditionList && 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 disabled="true" 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 disabled="true" v-model="condition.operators[operators].value"></el-input>
</div>
<span>天&nbsp;&nbsp;切换到此旅程阶段</span>
</template>
</div>
</div>
<div class="condition-more" v-if="condition && condition.subConditions && condition.subConditions.length">
<div>
<template>
<div class="flex-column-center m-t-10" v-for="item in condition.subConditions" :key="item.id">
<template v-if="item.operators[item.value].value">
<label>并且满足</label>
<el-select disabled="true" 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 disabled="true" v-model="item.value" @change="item.operators[item.value].value = ''" 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 disabled="true" v-model="item.operators[item.value].value"></el-input>
</div>
<el-select disabled="true" 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>
</template>
<!-- <i class="el-icon-delete" v-if="conditionInfo.editable" @click="delCondition(condition.subConditions, k)"></i> -->
</div>
<!-- <div v-if="conditionInfo.editable" class="condition-add" @click="addCondition(condition.subConditions)">
<i class="el-icon-circle-plus-outline"></i>
添加条件
</div> -->
</template>
</div>
</div>
</template>
<div class="flex-column-center m-t-20" v-if="configInfoList.length == 1">
<label class="require">*</label>
<label class="condition-label">页面配置:</label>
<div class="condition-select m-l">
<div class="condition-input">
<span>当前页面营销活动为</span>
<el-input style="width: 284px;" v-model="activityName"></el-input>
<a @click="typeVisible = true">编辑页面</a>
</div>
</div>
</div>
</div>
<GLDialog :bigTitle="'选择成员'" mode="big" :append-to-body="true" :visible.sync="membersVisible" @onOk="handleConfirm" @onCancel="membersVisible = !membersVisible">
<selectEmp ref="membersForm" v-if="membersVisible" :selectData="userList"></selectEmp>
</GLDialog>
<select-type :typeVisible="typeVisible" v-if="typeVisible" @handleCloseType="handleCloseType"></select-type>
<activity-model ref="activity" @selectActivity="selectActivity" :activityList="activityList"></activity-model>
<material-model ref="material" :materialList="materialList" @handleMaterialConfirm="handleMaterialConfirm"></material-model>
</GLDialog>
</template>
<script>
import selectEmp from './selectEmp'
import selectType from './selectType'
import materialModel from '@/components/model/materialModel'
import activityModel from '@/components/model/activityModel'
export default {
components: {
selectEmp,
materialModel,
activityModel,
selectType
},
props: {
conditionVisible: Boolean,
order: String,
conditionInfo: {
type: Object,
default: () => {}
}
},
data() {
return {
typeName: '',
empType: 0,
operators: 0,
userList: [],
conditionsList: [],
condition: [],
materialList: {
name: '素材',
type: 'material',
funName: 'material',
miniType: 8,
fileType: true,
groupListApi: this.$apis.welcomeword.getGroupListApi,
materialListApi: this.$apis.welcomeword.getMaterialListApi,
params: {
merchant: this.$globalState.session.merchantId
}
},
activityList: [
{
itemName: '权益卡试用',
itemValue: 3,
itemType: 'card',
miniType: 1,
getInterfaceApi: this.$apis.welcomeword.getCard,
params: {
tryAble: 1,
merchantId: this.$globalState.session.merchantId
}
},
{
itemName: '权益套餐',
itemValue: 4,
miniType: 2,
itemType: 'package',
getInterfaceApi: this.$apis.welcomeword.getPackage,
params: {
state: 1
}
},
{
itemName: '商城券',
itemValue: 2,
itemType: 'coupon',
miniType: 4,
getInterfaceApi: this.$apis.welcomeword.getMerchant,
params: {
discountTypes: [2, 3, 4],
directionalFlag: 1, // 1所有人可用2定向礼包专用3关联优惠券
validType: 'valid',
status: 2
}
},
{
itemName: '秒杀活动',
itemValue: 5,
miniType: 3,
itemType: 'activity',
getInterfaceApi: this.$apis.welcomeword.getActivity,
params: {
// activityStatus: 3,
activityStatusList: [1, 2],
currentPage: 1
}
},
{
itemName: '众筹活动',
itemValue: 6,
miniType: 5,
itemType: 'crowdfunding',
getInterfaceApi: this.$apis.welcomeword.crowdfundingActivity,
params: {
currentPage: 1,
activityStatus: 2
}
},
// 膨胀金活动
{
itemName: '膨胀金活动',
itemValue: 7,
itemType: 'crowdfunding',
miniType: 6,
getInterfaceApi: this.$apis.welcomeword.bulgeActivity,
params: {
currentPage: 1,
activityStatus: 2
}
},
{
itemName: '问卷调查',
miniType: 7,
itemValue: 8,
itemType: 'questionnaire',
getInterfaceApi: this.$apis.welcomeword.activityQuestionnaireForm,
params: {
merchantId: this.$globalState.session.merchantId,
statuses: [0, 1]
}
}
],
membersVisible: false,
typeVisible: false,
selectData: [],
configInfoList: [],
conditionItem: [
{
label: '客户旅程',
name: 'title'
},
{
label: '旅程阶段',
name: 'label'
},
{
label: '手动标记',
name: 'editable',
mark: value => {
return value ? '允许' : '不允许'
}
},
{
label: '条件类型',
name: 'conditionsList',
getName: value => {
return this.typeName
}
}
]
}
},
computed: {
activityName() {
if (this.configInfoList.length && this.configInfoList[0].operators) {
if (this.configInfoList[0].operators[0].value.match(/\d+\+\d+\+(.+)/)) return this.configInfoList[0].operators[0].value.match(/\d+\+\d+\+(.+)/)[1]
}
return ''
}
},
// 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)
// console.log(this.condition, 'this.condition')
// }
// },
mounted() {
const { index } = this.conditionInfo,
{ dataTypeCode, conditions, flag, name } = this.$common.utils.deepClone(this.conditionInfo.conditionsList[index]),
condition = conditions.filter(i => i.isHide)
this.configInfoList = this.$common.utils.deepClone(condition)
this.typeName = name
// const conditionsList = conditions.filter(i => !i.isHide),
// idx = conditionsList.findIndex(i => i.id == flag)
// this.conditionsList = conditionsList[idx > -1 ? idx : 0]
this.conditionList = this.$common.utils.deepClone(this.conditionInfo.conditionsList[index])
this.conditionListAll = this.$common.utils.deepClone(this.conditionList)
// this.conditionList.flag = flag
if (this.conditionList.conditions) this.conditionList.conditions = this.conditionList.conditions.filter(i => !i.isHide)
this.condition = this.conditionList.conditions[0]
if (this.configInfoList.length == 2) {
this.empType = 1
this.configInfoList.forEach(i => {
let desc = i.operators[0] && i.operators[0].desc
if (desc) {
desc = typeof desc == 'string' ? JSON.parse(desc) : desc
this.empType = 0
for (let k in desc) {
this.userList.push({
staffName: desc[k],
userId: k
})
}
}
})
}
if (this.conditionList.flag) this.condition = this.conditionList.conditions.find(i => i.id == this.conditionList.flag)
this.$apis.journeyConfig.sopConditionList({ dataTypeCode }).then(res => {
this.stepList = res
})
},
methods: {
remove(val, idx) {
this.userList.splice(idx, 1)
},
handleMaterialConfirm(val) {
const { objectId, objectName } = val
this.configInfoList[0].operators[0].value = `8+${objectId}+${objectName}`
},
selectActivity(val) {
const { marketingName, marketingId, miniType } = val
console.log(marketingName, marketingId, miniType)
this.configInfoList[0].operators[0].value = `${miniType}+${marketingId}+${marketingName}`
},
// 成员弹窗
handleConfirm() {
console.log(this.$refs.membersForm.innerTags)
if (this.$refs.membersForm.innerTags.length) {
this.membersVisible = false
this.userList = this.$refs.membersForm.innerTags
} else {
this.$message({
type: 'error',
message: '请选择成员'
})
}
},
handleSure() {
if (this.configInfoList.length == 1) {
if (!this.activityName) {
return this.$message({
type: 'error',
message: '请配置营销活动'
})
}
}
if (this.configInfoList.length == 2) {
if (this.empType == 0) {
const userId = this.userList.map(i => i.userId),
staffName = this.userList.map(i => i.staffName),
desc = {}
for (let i = 0; i < userId.length; i++) {
desc[userId[i]] = staffName[i]
}
this.configInfoList[0].operators[0].value = userId.join(',')
this.configInfoList[0].operators[0].desc = JSON.stringify(desc) // desc
} else {
this.configInfoList[1].operators = []
this.configInfoList[0].operators[0].value = ''
this.configInfoList[0].operators[0].desc = ''
}
}
this.conditionList.conditions.forEach(i => {
this.conditionListAll.conditions.forEach(j => {
if (i.id == j.id) {
j.operators = i.operators
j.subConditions = i.subConditions
}
})
})
this.configInfoList.forEach(i => {
this.conditionListAll.conditions.forEach(j => {
if (i.id == j.id) {
j.operators = i.operators
j.subConditions = i.subConditions
}
})
})
this.conditionInfo.conditionsList[this.conditionInfo.index] = { ...this.conditionListAll, flag: this.conditionList.flag }
const { editable, label, order } = this.$parent.stepItem,
{ instId } = this.$route.query,
data = {
[`${order}`]: {
conditions: this.conditionInfo.conditionsList,
editable,
value: label
}
}
this.$apis.journeyConfig.setStageData({ instId, data }).then(res => {
this.$parent.$parent.getDetail(this.order)
})
this.$emit('closeCondition')
},
handleClose() {
this.$emit('closeCondition')
},
handleCloseType(val) {
this.typeVisible = false
if (val) {
const type = { 1: 'activity', 2: 'material' }
this.$refs[type[val]].init()
}
},
handleAddEmp() {
this.membersVisible = true
},
delCondition(val, k) {
val.splice(k, 1)
},
addCondition(val) {
const l = val.length,
prop = this.$common.utils.deepClone(val[l - 1])
prop.id++
val.push(prop)
}
}
}
</script>
<style lang="scss" scoped>
.dialog-body {
padding: 0px 50px;
}
.require {
color: red;
}
.sale-select {
display: flex;
align-items: center;
// width: 50%;
}
.condition-select {
margin-left: 70px;
line-height: 32px;
&.m-l {
margin-left: 0px;
}
}
.condition-more {
margin-left: 70px;
padding: 20px;
margin-top: 10px;
&:has(.condition-1) {
background: #f9f9f9;
}
.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;
margin-left: 10px;
}
/deep/ {
.el-input {
width: 136px;
margin: 0px 4px;
}
.el-input__inner {
height: 32px;
line-height: 32px;
}
}
}
.input-tag-wrapper {
max-height: 75px;
width: 500px;
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 5px 0px 5px;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
// width: 50%;
display: flex;
align-items: center;
margin-top: 6px;
font-size: 14px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
.el-tag {
margin-right: 4px;
height: 26px;
line-height: 24px;
margin-bottom: 5px;
// background: #fff !important;
}
.condition-item {
line-height: 30px;
font-size: 14px;
color: #666666;
span {
color: #333333;
}
}
.condition-panel {
background: #f9f9f9;
padding: 20px 80px;
margin-left: 70px;
.flex-column-center {
margin-bottom: 10px;
}
.condition-label {
width: 100px;
line-height: 32px;
}
.condition-input {
a {
color: #5850ff;
margin-left: 10px;
}
/deep/ {
.el-input {
width: 136px;
margin: 0px 4px;
}
.el-input__inner {
height: 32px;
background: #eeeeee;
line-height: 32px;
margin-bottom: 6px;
}
}
}
}
</style>
<template>
<GLDialog :title="modelTitle" :visible.sync="dialogVisible" width="70%" :before-close="handleClose"></GLDialog>
</template>
<script>
export default {
data() {
return {
modelTitle: ''
}
}
}
</script>
<style scoped lang="scss"></style>
<template>
<div class="member-wrapper">
<div class="member-left">
<div class="member-title">
预选
<span>仅筛选有外部客户联系人的成员</span>
</div>
<div class="member-content">
<el-form :inline="true" class="member-form" :model="searchForm" @submit.native.prevent>
<el-form-item label="所在门店/部门" style="margin-bottom: 0;">
<el-popover ref="popover" placement="bottom" width="215" trigger="click" v-model="popoverVisible" @show="onShowPopover" @hide="onHidePopover">
<el-tree class="select-tree" :data="treeData" :props="defaultProps" default-expand-all @node-click="handleNodeClick"></el-tree>
<el-input v-model="searchForm.department" slot="reference" :size="size" readonly placeholder="请选择所在门店/部门" :class="{ rotate: popoverVisible }" suffix-icon="el-icon-arrow-down" @keyup.enter.native="search"></el-input>
</el-popover>
</el-form-item>
<el-form-item label="姓名" style="margin-bottom: 0;">
<el-input :size="size" v-model.trim="searchForm.name" @keyup.enter.native="search" clearable placeholder="请输入姓名搜索"></el-input>
</el-form-item>
<el-form-item label="跟进专员类型">
<el-select v-model="searchForm.status" clearable :size="size" placeholder="全部">
<el-option v-for="item in state" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item>
<el-checkbox v-model="searchForm.checked">仅看跟进专员</el-checkbox>
</el-form-item>-->
<el-form-item style="margin-bottom: 0;">
<el-button type="primary" :size="size" @click="search">查询</el-button>
</el-form-item>
</el-form>
<div class="table-content" style="max-height: 456px;">
<GLTable v-loading="loading" ref="empTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" :noDataImg="url" @selectionTable="selectionTable" @row-click="rowClick">
<div slot="staffName" slot-scope="scope">
<span>{{ scope.scope.staffName }}</span>
<span class="staff-title" v-show="scope.scope.staffTitle">{{ scope.scope.staffTitle }}</span>
</div>
</GLTable>
</div>
</div>
<div class="member-checked">
<el-checkbox v-model="checked" @change="checkChange">仅看跟进专员</el-checkbox>
</div>
</div>
<div class="member-right">
<div class="member-title">已选</div>
<div class="member-name">成员名称({{ innerTags.length }}项)</div>
<div class="input-tag-wrapper">
<div class="tag-box">
<el-tag v-for="(tag, idx) in innerTags" :key="idx" type="info" closable :disable-transitions="false" @close="remove(innerTags[idx])">
<i class="el-icon-user-solid"></i>
{{ tag.staffName }}
</el-tag>
</div>
</div>
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
props: ['selectData'],
data() {
return {
state: [],
stateList: [],
url: url,
searchForm: {},
checked: '',
treeData: [],
defaultProps: {
children: 'children',
label: 'departmentName'
},
popoverVisible: false,
loading: false,
// 表格参数
tableParams: {
checkSelectKey: 'userId',
checkSelectVal: [],
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'userId',
// 多选ref的名称
mutiSelectName: 'salelist',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '姓名',
prop: 'staffName',
addHtml: 'staffName'
},
{
label: '所在门店/部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerName',
formatter: cellValue => {
return cellValue.followerName ? cellValue.followerName : '-'
}
}
]
},
tableEmpData: [],
allTreeData: [],
currentTreeData: [],
innerTags: []
}
},
mounted() {
this.listDepartmentTree(false)
},
methods: {
selectionTable(val) {
console.log(val)
this.innerTags = this.$common.utils.deepClone(val)
// this.$emit('selectTable', val)
},
// 清空搜索条件
resetSearch() {
this.searchForm = {}
this.tableEmpData = this.allTreeData
},
// 显示时触发
onShowPopover() {
this.popoverVisible = true
},
// 隐藏时触发
onHidePopover() {
this.popoverVisible = false
},
unique(arr) {
let res = new Set()
return arr.filter(item => {
let id = JSON.stringify(item)
if (res.has(id)) {
return false
} else {
res.add(id)
return true
}
})
},
listDepartmentTree(isFollowerStaff) {
const params = { addChildrensFlag: true }
this.loading = true
params.isHavCustomer = true
params.isFollowerStaff = isFollowerStaff
this.$apis.journeyConfig.listDepartmentTree(params).then(res => {
console.log(res)
this.loading = false
if (res) {
this.tableEmpData = this.getEmployee(res)
this.allTreeData = this.getEmployee(res)
this.currentTreeData = this.getEmployee(res)
this.treeData = res
this.$refs.empTable.tableHeightValues = this.tableEmpData.length ? '' : '230px'
if (this.selectData && this.selectData.length) {
this.selectData.forEach(item => {
this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(item)
})
this.selectData = []
}
res[0].entmicroStaffResponses.forEach(e => {
this.state.push({ value: e.followerTypeId, label: e.followerName })
})
this.state = this.unique(this.state)
} else {
this.treeData = []
}
})
},
handleNodeClick(data) {
console.log(data)
this.searchForm.department = data.departmentName
this.currentTreeData = data
this.onHidePopover()
},
getEmployee(d, arr = []) {
d.reverse().forEach(i => {
if (i.entmicroStaffResponses) {
i.entmicroStaffResponses.forEach(j => {
const flag = arr.find(m => m.userId == j.userId)
if (!flag) {
arr.push(j)
}
})
}
if (i.children) {
this.getEmployee(i.children, arr)
}
})
return arr
},
search() {
this.tableEmpData = []
const data = this.currentTreeData
const keyword = this.searchForm.name
const status = this.searchForm.status
let arr = []
// this.loading = true
console.log(keyword, data, this.tableEmpData)
if (data instanceof Array) {
if (keyword) {
data.forEach(i => {
if (i.staffName.indexOf(keyword) != -1) {
this.tableEmpData.push(i)
}
})
} else {
console.log(this.allTreeData, '---')
this.tableEmpData = this.allTreeData
}
} else if (data instanceof Object) {
if (data.entmicroStaffResponses) {
if (keyword) {
data.entmicroStaffResponses.forEach(i => {
if (i.staffName.indexOf(keyword) != -1) {
this.tableEmpData.push(i)
}
})
} else {
this.tableEmpData = this.tableEmpData.concat(data.entmicroStaffResponses)
}
}
if (data.children) {
data.children.forEach(i => {
if (i.entmicroStaffResponses) {
i.entmicroStaffResponses.forEach(j => {
if (keyword) {
if (j.staffName.indexOf(keyword) != -1) {
const flag = this.tableEmpData.find(m => m.userId == j.userId)
if (!flag) {
this.tableEmpData.push(j)
}
}
} else {
const flag = this.tableEmpData.find(m => m.userId == j.userId)
if (!flag) {
this.tableEmpData.push(j)
}
}
})
}
})
}
}
this.stateList = this.tableEmpData
if (status) {
this.tableEmpData = []
this.stateList.forEach(i => {
if (String(i.followerTypeId).indexOf(status) != -1) {
this.tableEmpData.push(i)
}
})
} else {
this.tableEmpData = this.stateList
}
},
remove(item) {
// var idx = this.innerTags.findIndex(k => k.userId == item.userId)
// this.innerTags.splice(idx, 1)
if (this.tableEmpData.map(k => k.userId).includes(item.userId)) {
var i = this.tableEmpData.findIndex(k => k.userId == item.userId)
this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(this.tableEmpData[i])
console.log(item, this.tableEmpData[i])
}
// this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(item)
},
rowClick(row) {
this.$refs.empTable.$refs.salelistMutiTable.toggleRowSelection(row)
},
checkChange(val) {
console.log(val)
this.searchForm = {}
this.listDepartmentTree(val)
}
}
}
</script>
<style lang="scss">
.el-input.el-input--suffix.rotate .el-input__suffix .el-icon-arrow-down {
transform: rotate(-180deg);
}
.select-tree {
max-height: 400px;
overflow-y: scroll;
}
.staff-title {
position: relative;
font-size: 12px;
padding: 0 10px;
line-height: 12px;
color: #999;
&::before {
content: '';
position: absolute;
top: 50%;
left: 5px;
transform: translateY(-50%);
display: inline-block;
width: 1px;
height: 12px;
background-color: #999;
}
}
.member-wrapper {
display: flex;
.member-title {
font-size: 16px;
font-weight: 600;
line-height: 22px;
margin-bottom: 6px;
span {
display: inline-block;
padding-left: 5px;
font-size: 12px;
color: #999;
font-size: 500;
}
}
.member-left {
width: calc(100% - 286px);
.member-content {
border: 1px solid #eee;
.member-form {
padding: 10px 20px;
}
.table-content {
max-height: 456px;
overflow: auto;
border-top: 1px solid #eee;
}
}
.member-checked {
text-align: right;
margin-top: 10px;
}
}
.member-right {
width: 286px;
margin-left: 14px;
.member-name {
font-size: 14px;
color: #333;
line-height: 20px;
padding: 18px;
border: 1px solid #eee;
}
}
}
.tag-box {
height: 100%;
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
border: 1px solid #eee;
border-top: none;
box-sizing: border-box;
color: #606266;
display: inline-block;
padding: 8px 10px;
line-height: 32px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 100%;
height: calc(100% - 86px);
display: flex;
align-items: center;
max-height: 500px;
overflow: auto;
// margin-bottom: 10px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
/deep/ input {
/* input { */
/* background-color: red!important; 调试用的样式 */
outline: none !important;
border: none !important;
}
/deep/ .el-input {
min-width: 150px;
width: auto;
flex: 1;
}
}
.el-tag {
margin-right: 10px;
line-height: 22px;
margin-bottom: 5px;
height: 24px;
}
</style>
<template>
<div class="tag-main select-tag">
<GLDialog bigTitle="选择标签" mode="big" :visible.sync="dialogVisible" :before-close="handleClose">
<div class="tag-panel">
<div class="tag-panel-select">
<div class="tag-title">选择标签</div>
<div class="tag-select-box">
<div class="tag-box-header">
<el-input size="small" v-model="labelGroupName" placeholder="请输入搜索内容"></el-input>
<el-button size="small" type="primary" @click="handleSearch">查询</el-button>
</div>
<div class="checkbox-group-box" :style="{ height: heightBox + 'px' }" v-loading="loading">
<div style="margin-bottom: 8px" v-for="(item, index) in labelTreeRets" :key="index">
<span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }" @click.self="item.checked = !item.checked"></span>
<el-checkbox :indeterminate="item.isIndeterminate" v-model="item.checkAll" @change="handleCheckAllChange(item.checkAll, index)">{{ item.labelGroup.name }}({{ item.tagChecked.length }}/{{ item.labelList.length }} 项)</el-checkbox>
<div style="margin: 15px 0"></div>
<el-checkbox-group class="tag-group" v-model="item.tagChecked" @change="handleCheckedChange(item.tagChecked, index)" v-if="item.checked">
<el-checkbox v-for="(itm, idx) in item.labelList" :label="itm" :key="idx">{{ itm.name }}</el-checkbox>
</el-checkbox-group>
</div>
</div>
</div>
</div>
<div class="tag-panel-selected">
<div class="tag-title">
已选标签
<!-- <image src="@/assets/icon-info.png"/>-->
<el-tooltip effect="light" popper-class="tool-gltip">
<img class="tag-img" src="@/assets/icon-tip.png" alt="" />
<div slot="content">
<div class="tag-content">
<p class="tag-ex">说明:</p>
<p>
标签组内已选标签取
<span class="tag-ex">并集(或)</span>
,即满足一个条件即可、标签组之间取
<span class="tag-ex">交集(且)</span>
,即同时满足标签组条件。
</p>
<img src="@/assets/groupTips.png" alt="" />
</div>
</div>
</el-tooltip>
</div>
<div class="tag-select-box">
<div class="tag-box-header">
标签名称({{ selectNum }}项)
<span @click="clearTag">清空</span>
</div>
<div class="tag-selected-box" :style="{ height: heightBox + 'px' }">
<div v-show="!!selectNum" class="tag-line-and" :style="{ height: heightBox + 'px' }">
<p class="tag-line"></p>
<p class="tag-and" :style="{ top: heightBox / 2 - 20 + 'px' }">且</p>
</div>
<div class="label-box">
<div v-for="(item, index) in labelTreeRetSelect" :key="index">
<p class="tag-selected-label" v-show="item.tagChecked.length">{{ item.labelGroup.name }}:</p>
<span v-for="(tag, idx) in item.tagChecked" :key="idx">
<span class="tag-txt" v-show="idx != 0">或</span>
<el-tag :title="tag.name" type="info" class="customer-tag-selected-item" :key="idx" v-if="tag" closable :disable-transitions="false" @close="remove(item, idx)">
{{ tag.name.length > 11 ? tag.name.slice(0, 11) + '...' : tag.name }}
</el-tag>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<a class="dialog-jump" @click="jumpUrl" v-if="this.$globalState.session.accountLevel == 4 && this.$globalState.session.merchantModel == 2">没有意向标签?点我创建</a>
<el-button size="small" @click="handleClose">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span>
</GLDialog>
</div>
</template>
<script>
import { utils } from 'glsx-common'
import util from '@/utils/util'
export default {
name: 'activityModel',
props: {
labelTypesStr: {
type: String,
default: '自店标签,企业标签,系统标签'
},
isGroupTag: {
type: Boolean,
default: false
}
},
data() {
return {
loading: false,
heightBox: 200,
dialogVisible: false,
labelGroupName: '',
selectNum: 0,
searchStatus: false,
labelTreeRetSelect: [],
labelTreeRets: []
}
},
watch: {
labelTreeRetSelect: {
handler() {
this.selectNum = 0
this.labelTreeRetSelect.forEach(item => {
this.selectNum += item.tagChecked.length
})
},
deep: true
}
},
methods: {
clearTag() {
this.labelTreeRets.forEach(item => {
this.labelTreeRetSelect.forEach(itm => {
item.tagChecked =[];
itm.tagChecked=[]
})
})
this.labelTreeRets.forEach((item, index) => {
this.$nextTick(() => {
this.handleCheckedChange(item.tagChecked, index, 1)
})
})
},
jumpUrl() {
util.openUrl(location.origin + '/custom/tagsManage/index')
this.dialogVisible = false
},
init(item) {
this.labelGroupName = ''
this.labelTreeRetSelect = []
this.dialogVisible = true
this.querylabeltree(item)
},
handleSearch() {
this.searchStatus = true
this.querylabeltree()
},
querylabeltree(selectItem) {
this.loading = true
this.$apis.journeyConfig
.querylabeltree({
labelTreeReq: {
pageNum: 1,
pageSize: 1000,
shopId: this.$globalState.session.merchantId,
// shopId:'44209846',
labelGroupName: this.labelGroupName,
labelTypesStr: this.labelTypesStr,
edition: this.$globalState.session.merchantModel,
belongType: this.isGroupTag ? 2 : 1
}
})
.then(res => {
if (selectItem && selectItem.length > 0) {
this.labelTreeRets = res.labelTreeRets.map(item => {
return {
labelGroup: item.labelGroup,
labelList: item.labelList,
labelType: item.labelType,
checked: false,
tagChecked: [],
isIndeterminate: false,
checkAll: false
}
})
//回显
selectItem.forEach(item => {
this.labelTreeRets.forEach(tag => {
if (item.labelGroup.id == tag.labelGroup.id) {
let labelList = []
item.labelList.forEach(x => {
labelList.push(x.id)
})
this.$nextTick(() => {
tag.tagChecked = tag.labelList.filter(i => labelList.includes(i.id))
})
}
})
})
this.labelTreeRets.forEach((item, index) => {
this.$nextTick(() => {
this.handleCheckedChange(item.tagChecked, index, 1)
})
})
this.$nextTick(() => {
this.labelTreeRetSelect = utils.deepClone(this.labelTreeRets)
})
} else {
this.labelTreeRets = res.labelTreeRets.map(item => {
return {
labelGroup: item.labelGroup,
labelList: item.labelList,
labelType: item.labelType,
checked: false,
tagChecked: [],
isIndeterminate: false,
checkAll: false
}
})
this.labelTreeRets.forEach((item, index) => {
this.labelTreeRetSelect.forEach(itm => {
if (itm.labelGroup.id == item.labelGroup.id && itm.tagChecked.length > 0) {
let tagChecked = []
itm.tagChecked.forEach(x => {
tagChecked.push(x.id)
})
this.$nextTick(() => {
item.tagChecked = item.labelList.filter(i => tagChecked.includes(i.id))
})
this.$nextTick(() => {
this.handleCheckedChange(itm.tagChecked, index, 1)
})
}
})
})
if (this.labelTreeRetSelect.length == 0) {
this.labelTreeRetSelect = utils.deepClone(this.labelTreeRets)
}
}
this.$nextTick(() => {
this.loading = false
})
})
},
handleClose() {
this.labelTreeRetSelect = []
this.dialogVisible = false
},
remove(items, idx) {
items.tagChecked.splice(idx, 1)
this.labelTreeRets.forEach(item => {
this.labelTreeRetSelect.forEach(itm => {
if (item.labelGroup.id == itm.labelGroup.id) {
let tagChecked = []
itm.tagChecked.forEach(x => {
tagChecked.push(x.id)
})
this.$nextTick(() => {
item.tagChecked = item.labelList.filter(i => tagChecked.includes(i.id))
})
}
if (item.tagChecked.length == 0) {
this.$nextTick(() => {
item.checkAll = false
})
}
})
})
this.labelTreeRets.forEach((item, index) => {
this.$nextTick(() => {
this.handleCheckedChange(item.tagChecked, index, 1)
})
})
},
//选中
handleSelect() {
this.dialogVisible = false
let labelTreeRets = this.labelTreeRetSelect
.map(item => {
if (item.tagChecked.length) {
return {
labelGroup: item.labelGroup,
labelList: item.tagChecked,
labelType: item.labelType
}
}
})
.filter(item => item)
this.$emit('tagSelected', labelTreeRets)
},
//全选
handleCheckAllChange(val, index) {
if (val) {
this.labelTreeRets[index].tagChecked = []
this.labelTreeRets[index].labelList.forEach(item => {
this.labelTreeRets[index].tagChecked.push(item)
})
} else {
this.labelTreeRets[index].tagChecked = []
}
this.labelTreeRets[index].isIndeterminate = false
this.labelTreeRets.forEach(item => {
this.labelTreeRetSelect.forEach(itm => {
if (item.labelGroup.id == itm.labelGroup.id) {
itm.tagChecked = utils.deepClone(item.tagChecked)
}
})
})
},
//选中
handleCheckedChange(value, index, status) {
let checkedCount = value.length
this.labelTreeRets[index].checkAll = checkedCount === this.labelTreeRets[index].labelList.length
this.labelTreeRets[index].isIndeterminate = checkedCount > 0 && checkedCount < this.labelTreeRets[index].labelList.length
if (!status) {
this.labelTreeRets.forEach(item => {
this.labelTreeRetSelect.forEach(itm => {
if (item.labelGroup.id == itm.labelGroup.id) {
itm.tagChecked = utils.deepClone(item.tagChecked)
}
})
})
}
}
},
mounted() {
let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 350
}
}
</script>
<style lang="scss" scoped>
.dialog-jump {
color: #5850ff;
float: left;
line-height: 24px;
text-decoration: underline;
cursor: pointer;
}
.select-tag {
.label-box {
margin-left: 42px;
height: 100%;
overflow-y: scroll;
.el-tag {
margin-right: 0px;
}
}
.tag-selected-label {
margin: 9px 0;
}
.tag-line-and {
position: relative;
}
.tag-line {
position: absolute;
left: 17px;
border: 1px solid rgba(88, 80, 255, 1);
border-width: 0 0 0 1px;
height: 100%;
}
.tag-and {
position: absolute;
background: #efeeff;
border: 1px solid rgba(88, 80, 255, 1);
border-radius: 4px;
padding: 10px;
z-index: 20;
}
.tag-txt {
padding: 0 8px;
}
.customer-tag-selected-item {
background: #f4f6fc !important;
border: 1px solid rgba(232, 232, 234, 1) !important;
border-radius: 4px;
height: 26px;
line-height: 26px;
margin-bottom: 10px;
}
}
.tag-panel {
display: flex;
.tag-panel-select {
width: 60%;
/deep/ {
.el-checkbox__label {
width: 100%;
vertical-align: middle;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
word-wrap: break-word;
}
}
}
.tag-panel-selected {
width: 40%;
margin-left: 10px;
.tag-box-header {
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
padding: 0 16px !important;
span {
color: #5850ff;
}
}
}
.tag-title {
font-size: 16px;
font-weight: 400;
color: #333333;
line-height: 22px;
.tag-img {
display: inline-block;
width: 14px;
height: 14px;
}
}
.tag-select-box {
margin-top: 10px;
border-radius: 2px;
border: 1px solid #eeeeee;
padding: 6px;
.tag-box-header {
box-sizing: border-box;
display: flex;
height: 56px;
align-items: center;
border-bottom: 1px solid #eeeeee;
margin: -6px;
margin-bottom: 10px;
padding: 0px 6px;
/deep/ {
.el-input {
width: 60%;
margin-right: 10px;
}
}
}
.tag-selected-item {
margin: 0px 6px 6px 0px;
height: 26px;
line-height: 24px;
font-size: 14px;
color: #666;
max-width: auto !important;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.el-tree-node__expand-icon {
color: #5850ff;
font-size: 16px;
}
.tag-group {
margin-left: 40px;
display: flex;
flex-wrap: wrap;
.el-checkbox {
width: 40%;
margin-bottom: 6px;
display: flex;
align-items: center;
}
}
}
}
.checkbox-group-box {
overflow: auto;
}
.tag-selected-box {
min-height: 200px;
display: flex;
}
/deep/ .el-tooltip__popper.is-light {
width: 1000px !important;
}
.tool-gltip {
/deep/.el-tooltip__popper.is-light {
width: 1000px !important;
}
/deep/.el-tooltip__popper {
width: 1000px !important;
}
.tag-content {
background: #fff;
overflow: hidden;
width: 500px;
paddding: 10px;
p {
margin: 3px 0;
}
.tag-ex {
color: #333333;
font-weight: 600;
}
}
}
</style>
<style>
.tool-gltip {
max-width: 520px !important;
width: 520px !important;
}
</style>
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-12-22 16:01:13
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2024-01-09 18:04:31
* @FilePath: \scrm-micro-scene\src\views\journeyConfig\components\selectType.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<GLDialog title="编辑页面" class="activity-dialog" mode="small" :append-to-body="true" cancelText="取消" okText="下一步" :visible.sync="typeVisible" @onOk="handleConfirm" @onCancel="handleClose" :before-close="handleClose">
<div class="dialog-body flex">
<label>选择页面类型:</label>
<el-radio-group v-model="type">
<el-radio :label="1">营销活动</el-radio>
<el-radio :label="2">营销素材</el-radio>
</el-radio-group>
</div>
<activity-model ref="activity" @selectActivity="selectActivity" :activityList="activityList"></activity-model>
<material-model ref="material" :materialList="materialList" @handleMaterialConfirm="handleMaterialConfirm"></material-model>
</GLDialog>
</template>
<script>
import materialModel from '@/components/model/materialModel'
import activityModel from '@/components/model/activityModel'
export default {
components: {
materialModel,
activityModel
},
props: {
typeVisible: Boolean
},
data() {
return {
type: 1
}
},
methods: {
handleClose() {
this.$emit('handleCloseType')
},
handleConfirm() {
this.$emit('handleCloseType', this.type)
}
}
}
</script>
<style scoped lang="scss">
.activity-dialog {
/deep/.el-dialog__body {
height: 100px;
padding: 40px;
box-sizing: border-box;
}
}
</style>
<template>
<GLDialog title="SOP执行统计" :visible.sync="statVisible" width="70%" :before-close="handleClose" :hasFooter="false">
<div class="dialog-body">
<GLTable v-loading="loading" :searchForm="tableSearchForm" :hasNum="true" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" ref="leadManage" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams"></GLTable>
</div>
</GLDialog>
</template>
<script>
const STAGE = Object.freeze({
1: '门店助手短信',
2: 'AI外呼',
3: '门店助手朋友圈',
4: '门店助手1v1',
5: '跟进提醒',
6: '客户信息查询',
7: '企微提醒',
8: '企微群发',
9: '企微朋友圈',
10: '发送短信'
})
export default {
props: {
statVisible: Boolean,
stageid:Number
},
data() {
return {
stage: STAGE,
loading:false,
tableSearchForm:{},
getListApi: this.$apis.journeyConfig.getTaskList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNumber', totalCount: 'total' },
tableParams: {
listName: 'list',
tableColumns: [
{
label: '营销计划',
prop: 'plan'
},
{
label: '触达方式',
prop: 'taskType',
formatter: cellValue => {
return this.stage[cellValue.taskType] ? this.stage[cellValue.taskType] : '--'
}
},
{
label: '今日营销客户数',
prop: 'todayCusCount'
},
{
label: '今日下发任务数',
prop: 'todayTaskCount',
formatter:cellValue => {
return cellValue.taskType!=10 ? cellValue.todayTaskCount : '--'
}
},
{
label: '累计营销客户数',
prop: 'totalCusCount'
},
{
label: '累计下发任务数',
prop: 'totalTaskCount'
}
]
}
}
},
created() {
const query = this.$route.query
this.query = query
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.loading = true
this.tableSearchForm = {
instId:this.query.instId,
stageid:this.stageid
}
resolve()
})
},
setTableFinishFun() {
this.loading = false
},
handleClose() {
this.$parent.statVisible = false
}
}
}
</script>
<style scoped lang="scss"></style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08 * @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-09-25 19:37:31 * @LastEditTime: 2024-01-16 17:12:02
* @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
--> -->
...@@ -10,17 +10,15 @@ ...@@ -10,17 +10,15 @@
<div class="journey-main"> <div class="journey-main">
<div class="bg-fff pb20 journey-config"> <div class="bg-fff pb20 journey-config">
<template v-for="(item, index) in statusList"> <template v-for="(item, index) in statusList">
<div class="journey-step-config" v-if="journeyStatus == item.status" :key="index"> <div class="journey-step-config" v-if="item.status.includes(journeyStatus)" :key="index">
<i :class="`${item.icon}`"></i> <i :class="`${item.icon}`"></i>
<span>{{ item.describe }}</span> <span :style="{'width':item.with+'px'}">{{ item.describe }}</span>
<el-button :type="item.isDisabled ? 'info' : 'primary'" :size="size" @click="item.clickFun" :disabled="item.isDisabled">{{ item.btnName }}</el-button> <el-button :type="item.isDisabled ? 'info' : 'primary'" :size="size" @click="item.clickFun" :disabled="item.isDisabled" :plain="item.plain">{{ item.btnName }}</el-button>
</div> </div>
</template> </template>
</div> </div>
<div class="journey-step bg-fff pb20"> <div class="journey-step bg-fff pb20">
<div class="journey-step-title border-title"> <div class="journey-step-title border-title">客户旅程阶段</div>
客户旅程阶段
</div>
<div class="journey-step-body"> <div class="journey-step-body">
<div class="journey-step-info" v-for="(val, k) in configList" :key="k"> <div class="journey-step-info" v-for="(val, k) in configList" :key="k">
<collapse-item :stepItem="val" :activityInfo="activityInfo"></collapse-item> <collapse-item :stepItem="val" :activityInfo="activityInfo"></collapse-item>
...@@ -33,91 +31,13 @@ ...@@ -33,91 +31,13 @@
<script> <script>
import CollapseItem from './components/CollapseItem' import CollapseItem from './components/CollapseItem'
import relatedActivity from './components/relatedActivity' import relatedActivity from './components/relatedActivity'
import config from '@/mixins/config'
export default { export default {
components: { CollapseItem, relatedActivity }, components: { CollapseItem, relatedActivity },
mixins: [config],
data() { data() {
return { return {
journeyStatus: 1,
activityInfo: {}, 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: [], configList: [],
configList2: [ configList2: [
{ {
...@@ -202,55 +122,8 @@ export default { ...@@ -202,55 +122,8 @@ export default {
] ]
} }
}, },
mounted() { mounted() {},
const query = this.$route.query
this.query = query
this.getDetail()
},
methods: { 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) { groupBy(list, name) {
const m = new Map() const m = new Map()
list.map(item => { list.map(item => {
...@@ -289,6 +162,11 @@ export default { ...@@ -289,6 +162,11 @@ export default {
}, },
//开启 //开启
haneldOpen() { haneldOpen() {
if(this.noConfig) {
this.handleConfirm('开启提示', '确定', 'SOP内容未配置完整', '', () => {
})
return
}
this.handleConfirm('开启提示', '确定开启', '旅程开启后将无法修改关联的活动链接', '', () => { this.handleConfirm('开启提示', '确定开启', '旅程开启后将无法修改关联的活动链接', '', () => {
this.setSopInsts(1) this.setSopInsts(1)
}) })
...@@ -316,8 +194,8 @@ export default { ...@@ -316,8 +194,8 @@ export default {
padding: 20px; padding: 20px;
} }
.journey-step-config { .journey-step-config {
&:first-child { &:not(:first-child) {
margin-bottom: 20px; margin-top: 20px;
} }
i { i {
font-size: 14px; font-size: 14px;
...@@ -333,7 +211,7 @@ export default { ...@@ -333,7 +211,7 @@ export default {
color: #666666; color: #666666;
margin-left: 5px; margin-left: 5px;
display: inline-block; display: inline-block;
width: 166px; width: 156px;
} }
} }
.journey-step-body { .journey-step-body {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-09-05 17:24:08 * @Date: 2023-09-05 17:24:08
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-10-15 09:47:05 * @LastEditTime: 2024-01-10 09:14:20
* @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
--> -->
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<img src="@/assets/config/icon-next.png" class="journey-status" v-if="index != item.journeyItem.length - 1" /> <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 /> <img src="@/assets/config/icon-end.png" class="journey-status" v-else />
<div class="journey-step__main"> <div class="journey-step__main">
<div :class="['journey-step-icon', `step-icon-${p.process}`]"></div> <div class="journey-step-icon"></div>
<div class="journey-step-desc">{{ p.label }}</div> <div class="journey-step-desc">{{ p.label }}</div>
</div> </div>
</div> </div>
...@@ -261,6 +261,10 @@ export default { ...@@ -261,6 +261,10 @@ export default {
.journey-step-desc { .journey-step-desc {
font-size: 14px; font-size: 14px;
color: #333333; color: #333333;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 0px 6px;
} }
} }
} }
...@@ -270,6 +274,8 @@ export default { ...@@ -270,6 +274,8 @@ export default {
.journey-step-icon { .journey-step-icon {
width: 25px; width: 25px;
height: 24px; height: 24px;
background: url('../../assets/config/sop_icon.png');
background-size: 100% 100%;
} }
.step-icon-2 { .step-icon-2 {
background: url('../../assets/config/icon-sprites.png') -10px -10px; background: url('../../assets/config/icon-sprites.png') -10px -10px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!