Commit 46bed926 by 前端

Merge branch 'chenwq_dev_v2.0.0' into 'v2.0.0'

Chenwq dev v2.0.0

See merge request !18
2 parents beee0f63 34d5bc97
......@@ -832,15 +832,9 @@
}
},
"@babel/runtime-corejs3": {
<<<<<<< HEAD
"version": "7.17.7",
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.17.7.tgz",
"integrity": "sha512-TvliGJjhxis5m7xIMvlXH/xG8Oa/LK0SCUCyfKD6nLi42n5fB4WibDJ0g9trmmBB6hwpMNx+Lzbxy9/4gpMaVw==",
=======
"version": "7.17.2",
"resolved": "https://registry.npmmirror.com/@babel/runtime-corejs3/-/runtime-corejs3-7.17.2.tgz",
"integrity": "sha512-NcKtr2epxfIrNM4VOmPKO46TvDMCBhgi2CrSHaEarrz+Plk2K5r9QemmOFTGpZaoKnWoGH5MO+CzeRsih/Fcgg==",
>>>>>>> e167aa26c7dfce32bd8ee294ac3a9ce110d8b8fa
"requires": {
"core-js-pure": "^3.20.2",
"regenerator-runtime": "^0.13.4"
......@@ -848,11 +842,7 @@
"dependencies": {
"regenerator-runtime": {
"version": "0.13.9",
<<<<<<< HEAD
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
=======
"resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
>>>>>>> e167aa26c7dfce32bd8ee294ac3a9ce110d8b8fa
"integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
}
}
......@@ -1678,7 +1668,7 @@
},
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/abbrev/-/abbrev-1.1.1.tgz",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"accepts": {
......@@ -1856,7 +1846,7 @@
},
"are-we-there-yet": {
"version": "1.1.7",
"resolved": "https://registry.npmmirror.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz",
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz",
"integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==",
"requires": {
"delegates": "^1.0.0",
......@@ -3529,11 +3519,7 @@
},
"core-js-pure": {
"version": "3.21.1",
<<<<<<< HEAD
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.21.1.tgz",
=======
"resolved": "https://registry.npmmirror.com/core-js-pure/-/core-js-pure-3.21.1.tgz",
>>>>>>> e167aa26c7dfce32bd8ee294ac3a9ce110d8b8fa
"integrity": "sha512-12VZfFIu+wyVbBebyHmRTuEE/tZrB4tJToWcwAMcsp3h4+sHR+fMJWbKpYiCRWlhFBq+KNyO8rIV9rTkeVmznQ=="
},
"core-util-is": {
......@@ -5423,7 +5409,7 @@
},
"fstream": {
"version": "1.0.12",
"resolved": "https://registry.npmmirror.com/fstream/-/fstream-1.0.12.tgz",
"resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz",
"integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==",
"requires": {
"graceful-fs": "^4.1.2",
......@@ -5493,7 +5479,7 @@
},
"gaze": {
"version": "1.1.3",
"resolved": "https://registry.npmmirror.com/gaze/-/gaze-1.1.3.tgz",
"resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz",
"integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==",
"requires": {
"globule": "^1.0.0"
......@@ -5658,7 +5644,7 @@
},
"globule": {
"version": "1.3.3",
"resolved": "https://registry.npmmirror.com/globule/-/globule-1.3.3.tgz",
"resolved": "https://registry.npmjs.org/globule/-/globule-1.3.3.tgz",
"integrity": "sha512-mb1aYtDbIjTu4ShMB85m3UzjX9BVKe9WCzsnfMSZk+K5GpIbBOexgg4PPCt5eHDEG5/ZQAUX2Kct02zfiPLsKg==",
"requires": {
"glob": "~7.1.1",
......@@ -6429,7 +6415,7 @@
},
"in-publish": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/in-publish/-/in-publish-2.0.1.tgz",
"resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.1.tgz",
"integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ=="
},
"indent-string": {
......@@ -6706,7 +6692,7 @@
},
"is-finite": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/is-finite/-/is-finite-1.1.0.tgz",
"resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz",
"integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w=="
},
"is-fullwidth-code-point": {
......@@ -6925,7 +6911,7 @@
},
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"js-levenshtein": {
......@@ -7885,7 +7871,7 @@
},
"node-gyp": {
"version": "3.8.0",
"resolved": "https://registry.npmmirror.com/node-gyp/-/node-gyp-3.8.0.tgz",
"resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz",
"integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==",
"requires": {
"fstream": "^1.0.0",
......@@ -8125,7 +8111,7 @@
},
"npmlog": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/npmlog/-/npmlog-4.1.2.tgz",
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
"requires": {
"are-we-there-yet": "~1.1.2",
......@@ -8458,7 +8444,7 @@
},
"osenv": {
"version": "0.1.5",
"resolved": "https://registry.npmmirror.com/osenv/-/osenv-0.1.5.tgz",
"resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
"requires": {
"os-homedir": "^1.0.0",
......@@ -10724,7 +10710,7 @@
},
"sortablejs": {
"version": "1.10.2",
"resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.10.2.tgz",
"resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.2.tgz",
"integrity": "sha512-YkPGufevysvfwn5rfdlGyrGjt7/CRHwvRPogD/lC+TnvcN29jDpCifKP+rBqf+LRldfXSTh+0CGLcSg0VIxq3A=="
},
"source-list-map": {
......@@ -10929,7 +10915,7 @@
},
"stdout-stream": {
"version": "1.4.1",
"resolved": "https://registry.npmmirror.com/stdout-stream/-/stdout-stream-1.4.1.tgz",
"resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz",
"integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==",
"requires": {
"readable-stream": "^2.0.1"
......@@ -11208,7 +11194,7 @@
},
"tar": {
"version": "2.2.2",
"resolved": "https://registry.npmmirror.com/tar/-/tar-2.2.2.tgz",
"resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz",
"integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==",
"requires": {
"block-stream": "*",
......@@ -11472,7 +11458,7 @@
},
"true-case-path": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/true-case-path/-/true-case-path-1.0.3.tgz",
"resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz",
"integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==",
"requires": {
"glob": "^7.1.2"
......@@ -12055,7 +12041,7 @@
},
"vuedraggable": {
"version": "2.24.3",
"resolved": "https://registry.npmmirror.com/vuedraggable/-/vuedraggable-2.24.3.tgz",
"resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.24.3.tgz",
"integrity": "sha512-6/HDXi92GzB+Hcs9fC6PAAozK1RLt1ewPTLjK0anTYguXLAeySDmcnqE8IC0xa7shvSzRjQXq3/+dsZ7ETGF3g==",
"requires": {
"sortablejs": "1.10.2"
......@@ -12068,11 +12054,7 @@
},
"wangeditor": {
"version": "4.7.12",
<<<<<<< HEAD
"resolved": "https://registry.npmjs.org/wangeditor/-/wangeditor-4.7.12.tgz",
=======
"resolved": "https://registry.npmmirror.com/wangeditor/-/wangeditor-4.7.12.tgz",
>>>>>>> e167aa26c7dfce32bd8ee294ac3a9ce110d8b8fa
"integrity": "sha512-5KOIpQ0+idKvDTkjZOp7RHYXA97FyJ9mjwy+zQUdMUCqZItlEXzvVOYtOlHkJr/HcbwgIz/7f/trGFggZK5X4g==",
"requires": {
"@babel/runtime": "^7.11.2",
......@@ -12081,35 +12063,21 @@
},
"dependencies": {
"@babel/runtime": {
<<<<<<< HEAD
"version": "7.17.7",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.7.tgz",
"integrity": "sha512-L6rvG9GDxaLgFjg41K+5Yv9OMrU98sWe+Ykmc6FDJW/+vYZMhdOMKkISgzptMaERHvS2Y2lw9MDRm2gHhlQQoA==",
=======
"version": "7.17.2",
"resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.17.2.tgz",
"integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==",
>>>>>>> e167aa26c7dfce32bd8ee294ac3a9ce110d8b8fa
"requires": {
"regenerator-runtime": "^0.13.4"
}
},
"regenerator-runtime": {
"version": "0.13.9",
<<<<<<< HEAD
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
=======
"resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
>>>>>>> e167aa26c7dfce32bd8ee294ac3a9ce110d8b8fa
"integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
},
"tslib": {
"version": "2.3.1",
<<<<<<< HEAD
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
=======
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.1.tgz",
>>>>>>> e167aa26c7dfce32bd8ee294ac3a9ce110d8b8fa
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
}
}
......@@ -12493,7 +12461,7 @@
},
"wide-align": {
"version": "1.1.5",
"resolved": "https://registry.npmmirror.com/wide-align/-/wide-align-1.1.5.tgz",
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",
"integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",
"requires": {
"string-width": "^1.0.2 || 2 || 3 || 4"
......
import { http } from '@/main'
// 标签获取客户列表
const getCustomerByTagListApi = params => {
params.method = 'entmicro.api.customer.getCustomerPageByTag'
params.source = 'scrm-home'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const getSopInfoListApi = params => {
params.method = 'scrm.api.sop.sopInfo.listWithPage'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// sop基本信息
const getSopBaseInfoApi = params => {
params.method = 'scrm.api.sop.sopInfo.getBaseBySopId'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
//sop分析-触达率-筛选框
const getEventListApi = params => {
params.method = 'scrm.api.sop.sopEvent.listWithPage'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// sop分析-触达率列表
const getSopCustomerStatisticsListApi = params => {
params.method = 'scrm.api.sop.sopCustomer.listStatisticsWithPage'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// sop分析-员工完成率列表
const getSopStaffTaskListApi = params => {
params.method = 'scrm.api.sop.staffTaskStatistics.listWithPage'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// 校验当前商户的企微群发任务情况
const getTaskStatusApi = params => {
params.method = 'scrm.api.sop.task.merchantWWMsgTaskStatusCheck'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// sop营销事件次数分析
const parseEventCountApi = params => {
params.method = 'scrm.api.sop.sopEvent.parseEventCount'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true
})
}
// 删除sop事件
const deleteSopEventApi = params => {
params.method = 'scrm.api.sop.sopInfo.delete'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 结束sop事件
const endSopEventApi = params => {
params.method = 'scrm.api.sop.sopInfo.updateEndStatus'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 事件进行中,修改sop事件列表
// const insertOrUpdateSopEventApi = params => {
// params.method = 'scrm.api.sop.sopEvent.insertOrUpdate'
// return http({
// url: 'rop-scrm-sop/router',
// method: 'POST',
// data: params,
// sign: true,
// returnAll: true
// })
// }
// 事件进行中,批量编辑sop
const batchEditSopEventApi = params => {
params.method = 'scrm.api.sop.sopEvent.batchEdit'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 新增或者事件未开始,新增/修改sop
const insertOrUpdateSopApi = params => {
params.method = 'scrm.api.sop.sopInfo.insertOrUpdate'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const getSopInfoDetailApi = params => {
params.method = 'scrm.api.sop.sopInfo.getDetailBySopId'
return http({
url: 'rop-scrm-sop/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'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
// 朋友圈模板
const getMomentListApi = params => {
params.method = 'marketing.api.moment.page'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
export default { getCustomerByTagListApi, getSopInfoListApi, getSopBaseInfoApi, getEventListApi, getSopCustomerStatisticsListApi, getSopStaffTaskListApi, getTaskStatusApi, parseEventCountApi, deleteSopEventApi, endSopEventApi, batchEditSopEventApi, insertOrUpdateSopApi, getSopInfoDetailApi, getGroupListApi, getMaterialListApi, getMomentListApi }
......@@ -199,6 +199,10 @@ html {
margin-bottom: 60px;
}
.marketing .m-r-10 {
margin-right: 10px;
}
.marketing .m-r-20 {
margin-right: 20px;
}
......@@ -229,6 +233,10 @@ html {
background-color: #999999;
}
.marketing .txt-blue {
color: #5850ff;
}
.marketing .txt-grey {
color: #999999;
}
......
......@@ -55,9 +55,9 @@
</div>
<!-- radio -->
<el-radio-group v-else-if="item.type === 'radio'" v-model="formObj[item.name]" :disabled="item.isDisabled" @change="item.handleRadioChange">
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio>
<el-radio v-for="subItem in item.optionList" :key="subItem[item.optionId]" :disabled="subItem.isDisabled" :label="subItem[item.optionId]">{{ subItem[item.optionLabel] }}</el-radio>
</el-radio-group>
<el-date-picker v-else-if="item.type === 'datePicker'" v-model="formObj[item.name]" :type="item.dateType || 'daterange'" :style="{ width: item.width || defaultWidth }" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOption[item.pickerOptions]"></el-date-picker>
<el-date-picker v-else-if="item.type === 'datePicker'" v-model="formObj[item.name]" :type="item.dateType || 'daterange'" :disabled="item.isDisabled" :value-format="item.valueFormat" :style="{ width: item.width || defaultWidth }" :clearable="item.isClear || false" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="item.customPickerOptions || pickerOption[item.pickerOptions]"></el-date-picker>
<template v-else-if="item.type === 'upload'">
<p class="photo-top-tips">{{ item.topTips }}</p>
<div v-if="!item.isDisabled" :style="{ width: item.width || defaultWidth }">
......
......@@ -12,7 +12,7 @@ module.exports = {
response: {
data_key: 'data',
message_key: 'message',
code_key: ['code', 'returnCode'],
code_key: 'code',
code_success_value: '0',
errId_logout_value: '21',
code_message_map: {}
......@@ -21,34 +21,6 @@ module.exports = {
// baseURL: 'http://scrm.test.glsx.com.cn/',
// baseURL: 'http://192.168.2.42:8064/',
baseURL: 'http://scrm.dev.glsx.com.cn/',
<<<<<<< HEAD
// baseURL: 'http://192.168.1.78:8065/',
// 设置超时时间
timeout: 180000,
// 携带凭证
withCredentials: true,
// 返回数据类型
responseType: 'json'
},
request2: {
// baseURL: 'http://scrm.test.glsx.com.cn/',
// baseURL: 'http://192.168.2.42:8064/',
baseURL: 'http://ismv.branch.glsx.com.cn/',
// baseURL: 'http://192.168.1.78:8065/',
// 设置超时时间
timeout: 180000,
// 携带凭证
withCredentials: true,
// 返回数据类型
responseType: 'json'
},
request_common: {
// baseURL: 'http://scrm.test.glsx.com.cn/',
// baseURL: 'http://192.168.2.42:8064/',
baseURL: 'http://didicb.glsx.com.cn/',
// baseURL: 'http://192.168.1.78:8065/',
=======
>>>>>>> e167aa26c7dfce32bd8ee294ac3a9ce110d8b8fa
// 设置超时时间
timeout: 180000,
// 携带凭证
......@@ -68,13 +40,6 @@ module.exports = {
format: 'json',
source: ''
},
sign_common: {
app_key: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0',
format: 'json',
source: 'glsx'
},
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b',
cdn: 'https://www.xxx.cn/static'
}
}
\ No newline at end of file
<template>
<div>
<base-info v-show="activeName == 'baseInfo'" :routeInfo="routeInfo"></base-info>
<edit-event v-show="activeName == 'editEvent'"></edit-event>
<base-info v-show="activeName == 'baseInfo'" ref="baseInfoRef" :routeInfo="routeInfo" @handleTabChange="jumpEvent"></base-info>
<edit-event v-if="activeName == 'editEvent'" :eventObj="eventObj" :condLimitObj="condLimitObj" @handleTabChange="jumpBaseInfo" @handleInfoConfirm="handleInfoConfirm"></edit-event>
</div>
</template>
......@@ -14,10 +14,22 @@ export default {
data() {
return {
activeName: 'baseInfo',
// activeName: 'editEvent',
routeInfo: {
// add-新增;edit-编辑;look-查看
addOrEdit: 'add',
id: ''
},
// 编辑-标记idx
eventIndex: '',
condLimitObj: {
// 1-有;0-无
hasPhone: 0,
hasQw: 0
},
eventObj: {
addOrEdit: 'add',
info: {}
}
}
},
......@@ -27,11 +39,32 @@ export default {
editEvent
},
mounted() {
created() {
this.routeInfo = this.$route.query
},
methods: {}
methods: {
jumpBaseInfo(obj) {
this.activeName = obj.activeName
},
handleInfoConfirm(info) {
// console.log(info)
// console.log(this.$refs.baseInfoRef.editForm.eventList)
this.eventObj.addOrEdit == 'add' ? this.$refs.baseInfoRef.editForm.eventList.push(info.baseInfo) : this.$set(this.$refs.baseInfoRef.editForm.eventList, this.eventIndex, info.baseInfo)
console.log(this.$refs.baseInfoRef.editForm)
this.$refs.baseInfoRef.dealSopTime()
this.jumpBaseInfo({ activeName: 'baseInfo' })
},
jumpEvent(obj) {
this.$set(this.eventObj, 'addOrEdit', obj.addOrEdit)
this.$set(this.eventObj, 'info', obj.info)
this.eventIndex = obj.eventIndex
this.$set(this.condLimitObj, 'hasPhone', obj.condLimitObj.hasPhone)
this.$set(this.condLimitObj, 'hasQw', obj.condLimitObj.hasQw)
this.activeName = obj.activeName
}
}
}
</script>
......
<!-- 朋友圈模板弹窗 -->
<template>
<glsx-dialog title="选择朋友圈模板" :isVisible.sync="isNicknameVisible" width="1088px" @confirmDialog="handleNicknameConfirm" @closeDialog="handleNicknameClose" class="relateStore">
<div class="model-panel">
<div class="model-panel-tab">
<label>活动类型:</label>
<el-tabs v-model="activeName" @tab-click="handleClick" type="card">
<!-- 0-纯文字,1-单图+文,2-多图+文,3-视频+文,4-链接+文 -->
<el-tab-pane label="单图文" name="1"></el-tab-pane>
<el-tab-pane label="多图文" name="2"></el-tab-pane>
<el-tab-pane label="文字+视频" name="3"></el-tab-pane>
<el-tab-pane label="文字" name="0"></el-tab-pane>
<!-- <el-tab-pane label="文字+链接" name="4"></el-tab-pane> -->
</el-tabs>
</div>
<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 v-if="item.showVideoContent.length">
<video class="model-item-img" :src="item.showVideoContent[0].attContent" controls="controls"/>
</div>
<div v-if="!item.showVideoContent.length && item.showImgContent.length">
<img class="model-item-img" :src="item.showImgContent[0].attContent"/>
</div>
<div class="model-item-content" :title="item.showTxtContent">{{ item.showTxtContent }}</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="[10, 20, 30, 40]" :page-size="pageSize" :total="tableTotal" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
</div>
</glsx-dialog>
</template>
<script>
import glsxDialog from '@/components/glsx-dialog'
export default {
name: 'nicknameModel',
data() {
return {
// searchForm: {
// groupId: '',
// businessType: ''
// },
// searchFormData: [
// {
// label: '素材分组',
// name: 'groupId',
// type: 'select',
// optionList: [],
// optionId: 'id',
// optionLabel: 'NicknameGroupName',
// optionsName: 'groupList'
// },
// {
// label: '素材类型',
// name: 'businessType',
// type: 'select',
// optionList: [],
// optionId: 'confId',
// optionLabel: 'confName',
// optionsName: 'businessTypeList'
// }
// ],
// selectedData: [],
// selectingData: [],
// needTip: ['editProduct'],
activeName: '1',
modelList: [],
selectItem: {
id: ''
},
// 分页
pageNum: 1,
pageSize: 10,
tableTotal: 0
}
},
props: {
isNicknameVisible: {
type: Boolean,
default: false
}
// storeApi: {
// type: Function,
// default: () => {}
// },
// storeSelected: {
// type: Array,
// default: () => []
// }
// storeSearchForm: {
// type: Object,
// default: () => {}
// }
// 去掉表格中某些字段
// noTableField: {
// type: Array,
// default: () => []
// }
},
components: {
glsxDialog
},
mounted() {
// this.selectedData = this.storeSelected
// this.selectedData.forEach(item => {
// item.merchantNo = item.merchantId ? (item.merchantId + '') : item.merchantNo
// })
// this.getSelectingList()
this.getModelList()
},
methods: {
handleClick() {
this.pageNum = 1
this.getModelList()
},
handleSelectItem(item) {
this.selectItem = item
},
getModelList() {
var params = {
materialType: this.activeName,
pageNum: this.pageNum,
pageSize: this.pageSize
}
this.$apis.sop.getMomentListApi(params).then(res => {
this.modelList = res.data
// attType (1文本,2图片,3视频,4链接,5小程序,6附件,7活动)
// attContent 附件内容
this.modelList.forEach(item => {
// 文字
let txtObj = item.attachmentList.find(k => k.attType == 1)
item.showTxtContent = txtObj ? txtObj.attContent : ''
// 图片
let imgList = item.attachmentList.filter(k => k.attType == 2)
item.showImgContent = imgList || []
// 视频
let videoList = item.attachmentList.filter(k => k.attType == 3)
item.showVideoContent = videoList || []
})
this.tableTotal = res.count
})
},
handleSizeChange(val) {
this.pageSize = val
this.getModelList()
},
handleCurrentChange(val) {
this.pageNum = val
this.getModelList()
},
handleNicknameConfirm() {
console.log(this.selectItem)
// activeName 0-纯文字,1-单图+文,2-多图+文,3-视频+文,4-链接+文
var valToType = {
0: 4,
1: 1,
2: 2,
3: 3
}
// objectType 对象类型(1朋友圈模板-单图文,2朋友圈模板-多图文,3朋友圈模板-文字+视频,4朋友圈模板-文字,5优惠券-商城券,6活动-权益卡使用,7活动-权益套餐,8活动-秒杀活动)
this.$emit('handleNicknameConfirm', {
objectId: this.selectItem.id,
objectType: valToType[this.activeName],
objectName: '',
showTxtContent: this.selectItem.showTxtContent,
showImgContent: this.selectItem.showImgContent,
showVideoContent: this.selectItem.showVideoContent,
additionalType: 4
})
},
handleNicknameClose() {
this.$emit('handleNicknameClose')
}
}
}
</script>
<style lang="scss" scoped>
.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;
}
}
}
.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: 180px;
margin-right: 33px;
margin-bottom: 24px;
// padding: 12px 16px;
position: relative;
height: 156px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e6e6e6;
// padding: 14px 24px;
box-sizing: border-box;
&:nth-child(5n) {
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 {
width: 180px;
height: 100px;
}
&-content {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 16px;
height: 16px;
margin: 8px 16px;
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>
<div class="select-cutomer">
<div class="title">备注:为确保营销渠道正常触达,仅支持选择同条件客户(是否加企微、是否有手机号)</div>
<div class="flex-default">
<div class="customer-list">
<div v-show="selectedLabelList.length != 0" class="tag-box">
<span class="tag-label">用户标签:</span>
<div class="el-input-tag input-tag-wrapper">
<span v-for="(tag, idx) in selectedLabelList" :key="idx">
<el-tag v-for="(tagItem, idx1) in tag.labelList" :key="idx1" :size="size" type="info" :disable-transitions="false">{{ tagItem.name }}</el-tag>
</span>
</div>
</div>
<GLTable ref="customerRef" :getListApi="getListApi" :pageConf="pageConf" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" @selectionTable="handleSelectionTable"></GLTable>
</div>
<div class="selected-list">
<p class="list-title p-16">已选({{ selectedSum }})</p>
<div class="list-customers" :style="{ height: heightBox + 'px' }">
<el-tag v-for="(item, idx) in selectedCustomerList" :key="idx" :size="size" type="info" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ item.customerName }}
</el-tag>
</div>
</div>
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
export default {
name: 'selectCustomer',
data() {
return {
url: url,
searchForm: {},
customerList: [],
selectedSum: 0,
heightBox: 200,
// 表格
getListApi: this.$apis.sop.getCustomerByTagListApi,
tableParams: {
listName: 'data',
// 行数据的key
mutiSelectUniqueKey: 'id',
checkSelectKey: 'id',
checkSelectVal: [],
// 多选ref的名称
mutiSelectName: 'list',
tableColumns: [
{
label: '客户名称',
prop: 'customerName',
line: 1,
width: '110px'
},
{
label: '客户手机号',
prop: 'customerPhone',
width: '110px',
formatter: cellValue => {
return cellValue.customerPhone || '-'
}
},
{
label: '性别',
prop: 'customerSex',
width: '60px',
formatter: cellValue => {
return this.baseData.sexList.find(item => item.confId == cellValue.customerSex).confName
}
},
{
label: '是否加企微',
prop: 'isJoin',
formatter: cellValue => {
return this.baseData.joinList.find(item => item.confId == cellValue.isJoin).confName
}
},
{
label: '添加客户时间',
prop: 'addTime',
width: '160px'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
baseData: {
sexList: [
{
confId: 0,
confName: '未知'
},
{
confId: 1,
confName: '男'
},
{
confId: 2,
confName: '女'
}
],
joinList: [
{
confId: 0,
confName: '否'
},
{
confId: 1,
confName: '是'
}
]
}
}
},
props: {
selectedLabelList: {
type: Array,
default: () => []
},
selectedCustomerList: {
type: Array,
default: () => []
},
condLimitObj: {
type: Object,
default: () => {
return {
// 1-有;0-无
hasPhone: 0,
hasQw: 0
}
}
}
},
watch: {
selectedCustomerList: {
handler() {
this.selectedSum = this.selectedCustomerList.length
},
deep: true
}
},
mounted() {
let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 0.15 * clientHeight - 350
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm = {
// labelStandInfoList: []
tagLists: []
}
this.selectedLabelList.length &&
this.selectedLabelList.forEach(item => {
item.labelList.forEach(subItem => {
// this.searchForm.labelStandInfoList.push({
this.searchForm.tagLists.push({
groupId: item.labelGroup.id,
groupName: item.labelGroup.name,
groupType: item.labelType,
labelId: subItem.id,
labelName: subItem.name
})
})
})
resolve()
})
},
setTableFinishFun() {
this.tableList = this.$refs.customerRef.data
this.recoverySelected()
//接收到的数据为空
this.$refs.customerRef.data.length ? (this.$refs.customerRef.tableHeightValues = '') : this.$refs.customerRef.setTableHeightFun()
},
recoverySelected() {
this.selectedCustomerList.forEach(row => {
var idx = this.tableList.findIndex(k => k.id == row.id)
if (idx != -1) {
this.$refs.customerRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.tableList[idx], true)
}
})
// 找到不符合条件的,变为不可选
this.tableParams.checkSelectVal = []
if (this.selectedCustomerList.length) {
this.tableList.forEach((row, idx) => {
if (row.isJoin != this.condLimitObj.hasQw || !!row.customerPhone != this.condLimitObj.hasPhone) {
this.tableParams.checkSelectVal.push(row.id)
this.$refs.customerRef.$refs[this.tableParams.mutiSelectName + 'MutiTable'].toggleRowSelection(this.tableList[idx], false)
}
})
}
},
dealCondLimit(val) {
this.condLimitObj.hasQw = val.isJoin
this.condLimitObj.hasPhone = val.customerPhone ? 1 : 0
},
handleSelectionTable(val) {
// 未选客户时,筛选客户条件
if (!this.selectedCustomerList.length) {
this.dealCondLimit(val[0])
}
this.selectedCustomerList = JSON.parse(JSON.stringify(val))
this.recoverySelected()
// console.log(this.selectedCustomerList)
}
}
}
</script>
<style lang="scss" scoped>
.select-cutomer {
.title {
margin-bottom: 12px;
}
.tag-box {
display: flex;
margin: 20px 16px;
.tag-label {
display: inline-block;
height: 30px;
line-height: 30px;
}
.input-tag-wrapper {
max-height: 75px;
overflow: auto;
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding: 5px;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 648px;
display: flex;
align-items: center;
font-size: 14px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
}
.customer-list {
width: calc(100% - 280px);
border: 1px solid #eeeeee;
margin-right: 10px;
}
.p-16 {
padding: 16px;
}
.selected-list {
width: 280px;
border-radius: 2px;
border: 1px solid #eeeeee;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
.list-title {
font-size: 16px;
border-bottom: 1px solid #f1f1f1;
}
.list-customers {
// box-sizing: border-box;
// height: 61vh;
padding: 10px;
overflow-y: scroll;
}
.customer-box {
padding: 16px;
.customer-label {
color: #999999;
margin-bottom: 14px;
}
.customer-content {
border-bottom: 1px solid #e5e5e5;
.customer-item {
margin-bottom: 20px;
display: inline-flex;
align-items: center;
.muti-icon {
cursor: pointer;
}
.customer-coupon-name {
display: inline-block;
width: 109px;
margin: 0 5px 0 7px;
}
.customer-sum {
display: inline-block;
width: 82px;
text-align: right;
.el-input-number--mini .el-input__inner {
padding: 0 10px;
}
.sum-input {
display: inline-block;
width: 82px;
}
.el-input--mini .el-input__inner {
border: 0px;
}
.el-input-number--mini .el-input-number__decrease,
.el-input-number--mini .el-input-number__increase {
width: 20px !important;
border: 0px;
background-color: #fff;
}
}
.customer-tips {
display: inline-block;
font-size: 12px;
height: 18px;
line-height: 18px;
color: #999999;
background-color: #eeeded;
margin-right: 7px;
}
}
.customer-item:last-child {
margin-bottom: 0;
}
}
.customer-content:last-child {
border-bottom: 0px;
}
}
}
}
</style>
<template>
<div class="tag-main">
<el-dialog title="选择标签" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<div class="tag-panel">
<el-dialog :title="activeName == 'tag' ? '选择标签' : '选择客户'" :visible.sync="dialogVisible" width="1080px" :before-close="handleClose">
<div v-show="activeName == 'tag'" class="tag-panel">
<div class="tag-panel-select">
<div class="tag-title">预选标签</div>
<div class="tag-select-box">
......@@ -42,6 +42,7 @@
</div>
</div>
</div>
<select-customer v-if="activeName == 'cutomer'" ref="customerRef" :selectedLabelList="selectedLabelList" :condLimitObj.sync="condLimitObj" :selectedCustomerList.sync="selectedCustomerList"></select-customer>
<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="dialogVisible = false">取 消</el-button>
......@@ -54,10 +55,12 @@
<script>
import { utils } from 'glsx-common'
import util from '@/utils/util'
import selectCustomer from './selectCustomer.vue'
export default {
name: 'activityModel',
data() {
return {
activeName: 'tag',
heightBox: 200,
dialogVisible: false,
labelGroupName: '',
......@@ -88,9 +91,14 @@ export default {
// isIndeterminate: false,
// checkAll: false
// }
]
],
selectedLabelList: [],
selectedCustomerList: []
}
},
components: {
selectCustomer
},
watch: {
labelTreeRets: {
handler() {
......@@ -112,7 +120,10 @@ export default {
init(item) {
this.labelGroupName = ''
this.dialogVisible = true
this.querylabeltree(item)
this.activeName = 'tag'
this.selectedCustomerList = item.customerInfoList ? JSON.parse(JSON.stringify(item.customerInfoList)) : ''
this.condLimitObj = JSON.parse(JSON.stringify(item.condLimitObj))
this.querylabeltree(item.tagList)
},
handleSearch() {
this.searchStatus = true
......@@ -180,8 +191,7 @@ export default {
},
//选中
handleSelect() {
this.dialogVisible = false
let labelTreeRets = this.labelTreeRets
this.selectedLabelList = this.labelTreeRets
.map(item => {
if (item.tagChecked) {
return {
......@@ -192,8 +202,15 @@ export default {
}
})
.filter(item => item)
console.log(labelTreeRets)
this.$emit('tagSelected', labelTreeRets)
console.log(this.selectedLabelList)
// 标签
if (this.activeName == 'tag') {
this.activeName = 'cutomer'
return false
}
// 客户
this.$emit('tagSelected', { selectedLabelList: this.selectedLabelList, selectedCustomerList: this.$refs.customerRef.selectedCustomerList, condLimitObj: this.$refs.customerRef.condLimitObj })
this.dialogVisible = false
},
handleReset() {
this.labelGroupName = ''
......@@ -297,7 +314,7 @@ export default {
margin: 8px 0;
display: inline-flex;
align-items: center;
/deep/.el-radio__inner{
/deep/.el-radio__inner {
box-shadow: none !important;
}
/deep/.el-radio__label {
......
......@@ -28,11 +28,11 @@
</div>
</div>
<div class="sop-box" :style="{ 'padding-bottom': sopList.length ? '2px' : '12px' }">
<div class="chart-box sop-flex">
<div class="chart-box sop-flex" v-show="sopList.length">
<div class="chart-item" v-for="item in sopList" :key="item.id">
<p>{{ item.sopName }}</p>
<div :id="'sopPie' + item.id" class="chart-pie"></div>
<p>2021.10.28-2022.10.28</p>
<p>{{ item.dateRange }}</p>
<div class="sop-btns">
<GLButton class="btn-item" :size="size" type="primary" fn="分析sop" @click="handleJump('sopAnalysisList', item)">sop分析</GLButton>
<GLButton class="btn-item" :size="size" type="primary" fn="编辑sop" @click="handleEdit('edit', item)">编辑</GLButton>
......@@ -40,6 +40,10 @@
</div>
</div>
</div>
<div v-show="!sopList.length" class="txt-center">
<img src="@/assets/empty.png" />
<p class="m-t-10">暂无数据</p>
</div>
</div>
</div>
</div>
......@@ -47,6 +51,7 @@
<script>
import * as echarts from 'echarts'
import * as moment from 'moment'
export default {
name: 'sopIndex',
data() {
......@@ -90,60 +95,12 @@ export default {
}
]
},
sopList: [
{
id: '1',
sopName: 'sop的名称1',
// 1-未开始;2-进行中;3-已结束
sopStatus: '2',
sopStatistics: {
finishEventCount: 10,
eventCount: 100
}
},
{
id: '2',
sopName: 'sop的名称2',
sopStatus: '2',
sopStatistics: {
finishEventCount: 22,
eventCount: 100
}
},
{
id: '3',
sopName: 'sop的名称3',
sopStatus: '2',
sopStatistics: {
finishEventCount: 100,
eventCount: 100
}
},
{
id: '4',
sopName: 'sop的名称4',
sopStatus: '2',
sopStatistics: {
finishEventCount: 59,
eventCount: 100
}
},
{
id: '5',
sopName: 'sop的名称5',
sopStatus: '2',
sopStatistics: {
finishEventCount: 13,
eventCount: 100
}
}
]
sopList: []
}
},
mounted() {
this.dealListData()
this.drawPie()
this.getList()
},
methods: {
......@@ -168,7 +125,7 @@ export default {
})
if (res.code == '0') {
fn && fn()
// this.handleSearch()
this.getList()
}
})
}
......@@ -176,14 +133,40 @@ export default {
})
},
getList() {
var params = {
sopStatus: 2,
pageNum: 1,
pageSize: 999999
}
this.$apis.sop.getSopInfoListApi(params).then(res => {
// console.log(res)
this.sopList = res.list
this.dealListData()
this.$nextTick(() => {
this.drawPie()
})
})
},
// 数据处理
dealListData() {
this.sopList.forEach(item => {
item.completedPercent = Math.round((item.sopStatistics.finishEventCount / item.sopStatistics.eventCount) * 100).toFixed(0)
item.dateRange =
moment(item.startDate)
.format('YYYY-MM-DD')
.replace(/-/g, '.') +
(item.endDate
? '-' +
moment(item.endDate)
.format('YYYY-MM-DD')
.replace(/-/g, '.')
: '')
})
},
drawPie() {
console.log(this.sopList)
this.sopList.forEach(item => {
let chartDom = document.getElementById('sopPie' + item.id)
let myChart = echarts.init(chartDom)
......@@ -199,7 +182,7 @@ export default {
},
{
value: item.sopStatistics.eventCount - item.sopStatistics.finishEventCount,
name: '总营销事件'
name: '未触发的营销事件'
}
]
......@@ -209,7 +192,7 @@ export default {
// 结束
handleEnd(row) {
this.secondConfirm('结束', '结束sop后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'zoneList', 'deleteZoneApi', { id: row.id })
this.secondConfirm('结束', '结束sop后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'sop', 'endSopEventApi', { sopId: row.id })
},
// 1-新增;2-编辑
......
......@@ -4,29 +4,29 @@
<div class="container">
<div class="title m-b-20">
SOP名称:
<span>这是某次营销sop</span>
<span>{{ sopInfo.sopName }}</span>
</div>
<div class="analysis-box flex-default">
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
营销时间总数
营销事件总数
<img src="@/assets/sop/sop-event.png" />
</div>
<p class="analysis-num">20</p>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.eventCount : '-' }}</p>
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
已完成事件数
<img src="@/assets/sop/completed-event.png" />
</div>
<p class="analysis-num">12</p>
<p class="analysis-num">{{ sopInfo.sopStatistics ? sopInfo.sopStatistics.finishEventCount : '-' }}</p>
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
完成率
</div>
<p class="analysis-num">60%</p>
<p class="analysis-num">{{ sopInfo.completedPercent + '%' }}</p>
<div id="completePie" class="chart-pie"></div>
</div>
</div>
......@@ -34,7 +34,7 @@
<p class="m-b-10">日营销事件明细</p>
<!-- 表格区域 开始 -->
<GLTable ref="giftListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun"></GLTable>
<GLTable ref="completeListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end -->
</div>
</div>
......@@ -44,7 +44,6 @@
import * as echarts from 'echarts'
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { aToExport } from '@/common/constant'
import { pieOption } from './pieOption'
export default {
name: 'completeList',
......@@ -52,83 +51,108 @@ export default {
return {
size: 'small',
url: url,
sopInfo: {
sopStatistics: {}
},
searchForm: {},
// 表格
getListApi: this.$apis.giftBag.getListApi,
getListApi: this.$apis.sop.getEventListApi,
tableParams: {
listName: 'list',
tableColumns: [
{
label: '营销事件',
prop: 'name'
prop: 'sopName',
formatter: cellValue => {
var repeatTxt = ''
var weekToTxt = {
1: '一',
2: '二',
3: '三',
4: '四',
5: '五',
6: '六',
7: '日'
}
switch(cellValue.repeatMode) {
case 1:
repeatTxt = ' 每天重复推送至'
break
case 2:
repeatTxt = ' 每周' + weekToTxt[cellValue.repeatTime] + '重复推送至'
break
case 3:
repeatTxt = ' 每月' + cellValue.repeatTime + '重复推送至'
break
}
return cellValue.eventStartDate + ' ' + cellValue.eventTime + (cellValue.repeatFlag == 'Y' ? repeatTxt : ' 单次')+ (cellValue.repeatFlag == 'Y' ? ' ' + cellValue.eventEndDate : '')
}
},
{
label: '营销渠道',
prop: 'remarkName',
width: '200'
prop: 'pushChannelType',
width: '140',
formatter: cellValue => {
var pushChannelTypeList = {
1: '企业微信',
2: '短信',
3: '微信朋友圈'
}
return pushChannelTypeList[cellValue.pushChannelType]
}
},
{
label: '营销事件总数',
prop: 'anticipatedCost',
prop: 'eventStatistics',
width: '140',
formatter: cellValue => {
return (cellValue.anticipatedCost / 100).toFixed(2)
return cellValue.eventStatistics ? cellValue.eventStatistics.eventCount : '-'
}
},
{
label: '已完成事件数',
prop: 'staffList',
prop: 'eventStatistics',
width: '140',
formatter: cellValue => {
return cellValue.staffList.map(item => item.staffName).join(',')
return cellValue.eventStatistics ? cellValue.eventStatistics.finishEventCount : '-'
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
baseData: {
commentStatusList: [
{
confId: '0',
confName: '未发布'
},
{
confId: '1',
confName: '已发布'
}
]
}
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
props: {
sopId: {
type: String,
default: ''
}
},
mounted() {
this.drawPie()
this.getBaseInfo()
},
methods: {
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.$apis[apiModule][apiName](apiParams).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
fn && fn()
this.handleSearch()
}
})
}
}
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm.sopId = this.sopId
resolve()
})
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.giftListRef.data.length ? (this.$refs.giftListRef.tableHeightValues = '') : this.$refs.giftListRef.setTableHeightFun()
this.$refs.completeListRef.data.length ? (this.$refs.completeListRef.tableHeightValues = '') : this.$refs.completeListRef.setTableHeightFun()
},
getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => {
this.sopInfo = res
this.sopInfo.completedPercent = Math.round((this.sopInfo.sopStatistics.finishEventCount / this.sopInfo.sopStatistics.eventCount) * 100).toFixed(0)
this.drawPie()
})
},
drawPie() {
......@@ -139,23 +163,21 @@ export default {
// option.series[0].name = item.sopName
option.series[0].data = [
{
value: 60,
value: this.sopInfo.sopStatistics.finishEventCount,
name: '已触发的营销事件'
},
{
value: 40,
value: this.sopInfo.sopStatistics.eventCount - this.sopInfo.sopStatistics.finishEventCount,
name: '未触发的营销事件'
}
]
console.log(option)
option && myChart.setOption(option)
},
handleSearch() {
this.$refs.giftListRef.refreshTable()
}
// handleSearch() {
// this.$refs.completeListRef.refreshTable()
// }
}
}
</script>
......
......@@ -4,7 +4,7 @@
<div class="container">
<div class="title m-b-20">
SOP名称:
<span>这是某次营销sop</span>
<span>{{ sopInfo.sopName }}</span>
</div>
<div class="analysis-box flex-default">
......@@ -13,20 +13,18 @@
已下发任务总数
<img src="@/assets/sop/task-total.png" />
</div>
<p class="analysis-num">20</p>
<p class="analysis-num">{{ sopInfo.sopStatistics.issuedTaskCount }}</p>
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
已完成任务数
<img src="@/assets/sop/task.png" />
</div>
<p class="analysis-num">12</p>
<p class="analysis-num">{{ sopInfo.sopStatistics.finishEventCount }}</p>
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
总任务完成率
</div>
<p class="analysis-num">60%</p>
<div class="analysis-title-block m-b-20">总任务完成率</div>
<p class="analysis-num">{{ sopInfo.taskPercent + '%' }}</p>
<div id="completePie" class="chart-pie"></div>
</div>
</div>
......@@ -34,7 +32,7 @@
<p class="m-b-10">员工任务明细</p>
<!-- 表格区域 开始 -->
<GLTable ref="giftListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun"></GLTable>
<GLTable ref="staffListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"></GLTable>
<!-- 表格区域 end -->
</div>
</div>
......@@ -44,63 +42,58 @@
import * as echarts from 'echarts'
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { aToExport } from '@/common/constant'
import { pieOption } from './pieOption'
export default {
name: 'completeList',
name: 'staffList',
data() {
return {
size: 'small',
url: url,
sopInfo: {
sopStatistics: {}
},
searchForm: {},
isCheckStatus: false,
// 表格
getListApi: this.$apis.giftBag.getListApi,
getListApi: this.$apis.sop.getSopStaffTaskListApi,
tableParams: {
listName: 'list',
tableColumns: [
{
label: '员工名称',
prop: 'name'
prop: 'userName'
},
{
label: '已完成任务数',
prop: 'remarkName',
width: '200'
prop: 'finishTaskCount'
},
{
label: '已下发任务数',
prop: 'anticipatedCost',
formatter: cellValue => {
return (cellValue.anticipatedCost / 100).toFixed(2)
}
prop: 'issuedTaskCount'
},
{
label: '个人完成率',
prop: 'staffList',
prop: 'percent',
formatter: cellValue => {
return cellValue.staffList.map(item => item.staffName).join(',')
return cellValue.issuedTaskCount ? ((cellValue.finishTaskCount - cellValue.issuedTaskCount) / 100).toFixed(2) + '%' : '0%'
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
baseData: {
commentStatusList: [
{
confId: '0',
confName: '未发布'
},
{
confId: '1',
confName: '已发布'
}
]
}
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
}
},
props: {
sopId: {
type: String,
default: ''
}
},
mounted() {
this.drawPie()
this.getTaskStatus()
this.getBaseInfo()
},
methods: {
......@@ -126,9 +119,31 @@ export default {
})
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchForm.sopId = this.sopId
this.isCheckStatus ? resolve() : reject()
})
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.giftListRef.data.length ? (this.$refs.giftListRef.tableHeightValues = '') : this.$refs.giftListRef.setTableHeightFun()
this.$refs.staffListRef.data.length ? (this.$refs.staffListRef.tableHeightValues = '') : this.$refs.staffListRef.setTableHeightFun()
},
getTaskStatus() {
this.$apis.sop.getTaskStatusApi({}).then(res => {
this.isCheckStatus = true
this.$refs.staffListRef.refreshTable()
})
},
getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => {
this.sopInfo = res
this.sopInfo.taskPercent = this.sopInfo.sopStatistics.issuedTaskCount ? Math.round((this.sopInfo.sopStatistics.finishTaskCount / this.sopInfo.sopStatistics.issuedTaskCount) * 100).toFixed(0) : 0
this.drawPie()
})
},
drawPie() {
......@@ -136,15 +151,14 @@ export default {
let myChart = echarts.init(chartDom)
let option = JSON.parse(JSON.stringify(pieOption))
// option.series[0].name = item.sopName
option.series[0].data = [
{
value: 60,
name: '已触发的营销事件'
value: this.sopInfo.sopStatistics.finishTaskCount,
name: '已完成的事件数'
},
{
value: 40,
name: '未触发的营销事件'
value: this.sopInfo.sopStatistics.issuedTaskCount - this.sopInfo.sopStatistics.finishTaskCount,
name: '未完成的事件数'
}
]
......@@ -154,7 +168,7 @@ export default {
},
handleSearch() {
this.$refs.giftListRef.refreshTable()
this.$refs.staffListRef.refreshTable()
}
}
}
......
......@@ -4,7 +4,7 @@
<div class="container">
<div class="title m-b-20">
SOP名称:
<span>这是某次营销sop</span>
<span>{{ sopInfo.sopName }}</span>
</div>
<div>
......@@ -21,20 +21,20 @@
客户总数
<img src="@/assets/sop/customer-total.png" />
</div>
<p class="analysis-num">20</p>
<p class="analysis-num">{{ sopInfo.customerCount || '-'}}</p>
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
已触达客户数
<img src="@/assets/sop/touch-customer.png" />
</div>
<p class="analysis-num">12</p>
<p class="analysis-num">{{ selectedEventInfo.eventStatistics ? selectedEventInfo.eventStatistics.reachCustomerCount : '-' }}</p>
</div>
<div class="analysis-block">
<div class="analysis-title-block m-b-20">
触达率
</div>
<p class="analysis-num">60%</p>
<p class="analysis-num">{{ sopInfo.touchPercent + '%' }}</p>
<div id="completePie" class="chart-pie"></div>
</div>
</div>
......@@ -42,7 +42,7 @@
<p class="m-b-10">客户触达明细</p>
<!-- 表格区域 开始 -->
<GLTable ref="giftListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<GLTable ref="touchListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLButton type="text" fn="编辑" @click="handleEdit('edit', scope.scope)">编辑</GLButton>
<GLButton type="text" fn="删除" @click="handleDelete(scope.scope)">删除</GLButton>
......@@ -57,94 +57,123 @@
import * as echarts from 'echarts'
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { aToExport } from '@/common/constant'
import { pieOption } from './pieOption'
export default {
name: 'completeList',
name: 'touchList',
data() {
return {
size: 'small',
url: url,
searchForm: {
name: '',
staffName: '',
createDate: []
sopId: '',
eventId: ''
},
sopInfo: {},
selectedEventInfo: {
eventStatistics: {}
},
tableSearchForm: {},
// 搜索
searchFormData: [
{
label: '营销事件',
name: 'name',
name: 'eventId',
type: 'select',
width: '415px'
width: '415px',
optionList: [],
optionId: 'id',
optionLabel: 'confName',
optionsName: 'sopEventList',
changeAttr: (val, targetItem) => {
this.searchForm.eventId = val
this.selectedEventInfo = this.baseData.sopEventList.find(item => item.id == val)
this.getBaseInfo()
this.$refs.touchListRef.refreshTable()
}
}
],
// 表格
getListApi: this.$apis.giftBag.getListApi,
getListApi: this.$apis.sop.getSopCustomerStatisticsListApi,
tableParams: {
listName: 'list',
tableColumns: [
{
label: '客户名称',
prop: 'name'
prop: 'customerName'
},
{
label: '客户手机号',
prop: 'remarkName',
width: '200'
prop: 'customerPhone',
width: '110'
},
{
label: '初次查看事件',
prop: 'anticipatedCost',
prop: 'firstViewDate',
formatter: cellValue => {
return (cellValue.anticipatedCost / 100).toFixed(2)
return dayjs(cellValue.firstViewDate).format('YYYY-MM-DD HH:mm:ss') || '未查看'
}
},
{
label: '营销事件总数',
prop: 'staffList',
formatter: cellValue => {
return cellValue.staffList.map(item => item.staffName).join(',')
}
label: '查看次数',
prop: 'viewCount'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
baseData: {
commentStatusList: [
{
confId: '0',
confName: '未发布'
},
{
confId: '1',
confName: '已发布'
}
]
sopEventList: []
}
}
},
props: {
sopId: {
type: String,
default: ''
}
},
mounted() {
this.drawPie()
this.getOptionsList('searchFormData')
this.getBaseData()
},
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createDate.length) {
params.startTime = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.endTime = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
getBaseInfo() {
this.$apis.sop.getSopBaseInfoApi({ sopId: this.sopId }).then(res => {
this.sopInfo = res
this.sopInfo.touchPercent = Math.round((this.selectedEventInfo.eventStatistics.reachCustomerCount / this.sopInfo.customerCount) * 100).toFixed(0)
this.drawPie()
})
},
getBaseData() {
var params = {
sopId: this.sopId,
pageNum: 1,
pageSize: 999999
}
var pushChannelTypeList = {
1: '企业微信',
2: '短信',
3: '微信朋友圈'
}
delete params.createDate
return params
this.$apis.sop.getEventListApi(params).then(res => {
this.baseData.sopEventList = res.list
console.log(res)
this.baseData.sopEventList.forEach(item => {
item.confName = item.eventStartDate + (item.repeatFlag == 'Y' ? '-' + item.eventEndDate : '') + ' ' + item.eventTime + ' ' + pushChannelTypeList[item.pushChannelType]
})
this.getOptionsList('searchFormData', false)
this.searchForm.eventId = this.baseData.sopEventList[0].id
this.selectedEventInfo = this.baseData.sopEventList[0]
this.getBaseInfo()
this.$refs.touchListRef.refreshTable()
})
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
resolve()
return new Promise((resolve, reject) => {
this.searchForm.sopId = this.sopId
this.baseData.sopEventList.length ? resolve() : reject()
})
},
......@@ -162,7 +191,7 @@ export default {
})
if (res.code == '0') {
fn && fn()
this.handleSearch()
// this.handleSearch()
}
})
}
......@@ -170,13 +199,6 @@ export default {
})
},
handleExport() {
var params = this.getParams()
this.$apis.giftBag.giftExportApi(params).then(res => {
aToExport(res)
})
},
handleDelete(row) {
this.secondConfirm('删除', '是否确认删除该礼包?', 'giftBag', 'deleteGiftApi', { id: row.id })
},
......@@ -231,7 +253,7 @@ export default {
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.giftListRef.data.length ? (this.$refs.giftListRef.tableHeightValues = '') : this.$refs.giftListRef.setTableHeightFun()
this.$refs.touchListRef.data.length ? (this.$refs.touchListRef.tableHeightValues = '') : this.$refs.touchListRef.setTableHeightFun()
},
drawPie() {
......@@ -239,15 +261,14 @@ export default {
let myChart = echarts.init(chartDom)
let option = JSON.parse(JSON.stringify(pieOption))
// option.series[0].name = item.sopName
option.series[0].data = [
{
value: 60,
name: '已触发的营销事件'
value: this.selectedEventInfo.eventStatistics.reachCustomerCount,
name: '已触达的客户数'
},
{
value: 40,
name: '未触发的营销事件'
value: this.sopInfo.customerCount - this.selectedEventInfo.eventStatistics.reachCustomerCount,
name: '未触达的客户数'
}
]
......@@ -256,9 +277,9 @@ export default {
option && myChart.setOption(option)
},
handleSearch() {
this.$refs.giftListRef.refreshTable()
}
// handleSearch() {
// this.$refs.touchListRef.refreshTable()
// }
}
}
</script>
......
......@@ -3,13 +3,13 @@
<div class="sop-analysis">
<el-tabs v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane label="完成率分析" name="compleList">
<complete-list v-if="activeName == 'compleList'"></complete-list>
<complete-list v-if="activeName == 'compleList'" :sopId="routeInfo.id"></complete-list>
</el-tab-pane>
<el-tab-pane label="触达率分析" name="touchList">
<touch-list v-if="activeName == 'touchList'"></touch-list>
<touch-list v-if="activeName == 'touchList'" :sopId="routeInfo.id"></touch-list>
</el-tab-pane>
<el-tab-pane label="员工完成率分析" name="staffList">
<staff-list v-if="activeName == 'staffList'"></staff-list>
<staff-list v-show="activeName == 'staffList'" :sopId="routeInfo.id"></staff-list>
</el-tab-pane>
</el-tabs>
<el-button :size="size" class="sop-back-btn" type="primary" @click="handleBack">返回</el-button>
......@@ -25,7 +25,10 @@ export default {
data() {
return {
activeName: 'compleList',
size: 'small'
size: 'small',
routeInfo: {
id: ''
}
}
},
......@@ -35,7 +38,9 @@ export default {
staffList
},
mounted() { },
created() {
this.routeInfo = this.$route.query
},
methods: {
handleTabClick() { },
......
......@@ -18,10 +18,10 @@
<!-- 表格区域 开始 -->
<GLTable ref="sopListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleJump('sopAnalysisList', scope.scope)">sop分析</el-button>
<el-button type="text" @click="handleEnd(scope.scope)">结束</el-button>
<el-button type="text" @click="handleEdit('edit', scope.scope)">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
<el-button v-if="scope.scope.sopStatus != 1" type="text" @click="handleJump('sopAnalysisList', scope.scope)">sop分析</el-button>
<el-button v-if="scope.scope.sopStatus == 2" type="text" @click="handleEnd(scope.scope)">结束</el-button>
<el-button v-if="scope.scope.sopStatus != 3" type="text" @click="handleEdit('edit', scope.scope)">编辑</el-button>
<el-button v-if="scope.scope.sopStatus == 1" type="text" @click="handleDelete(scope.scope)">删除</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
......@@ -39,53 +39,64 @@ export default {
size: 'small',
url: url,
searchForm: {
zoneName: '',
status: []
sopName: '',
sopStatus: ''
},
// tableSearchForm: {},
// 搜索
searchFormData: [
{
label: 'sop名称',
name: 'zoneName',
name: 'sopName',
type: 'input',
isClear: true,
maxlength: 20
},
{
label: '营销状态',
name: 'status',
type: 'select'
name: 'sopStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'sopStatusList'
}
],
// 表格
getListApi: this.$apis.proManage.getListApi,
getListApi: this.$apis.sop.getSopInfoListApi,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: 'sop名称',
prop: 'goodsName'
prop: 'sopName'
},
{
label: '营销时间',
prop: 'createdDate',
width: '180',
prop: 'startDate',
width: '220',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
return dayjs(cellValue.startDate).format('YYYY-MM-DD') + (cellValue.endDate ? '-' + dayjs(cellValue.endDate).format('YYYY-MM-DD') : '')
}
},
{
label: '营销状态',
prop: 'goodsName'
prop: 'sopStatus',
formatter: cellValue => {
return this.baseData.sopStatusList.find(item => item.confId == cellValue.sopStatus).confName
}
},
{
label: '完成度',
prop: 'goodsName'
prop: 'sopStatistics',
formatter: cellValue => {
return cellValue.sopStatistics ? Math.round((cellValue.sopStatistics.finishEventCount / cellValue.sopStatistics.eventCount) * 100).toFixed(0) + '%' : '-'
}
},
{
label: '创建人',
prop: 'goodsName'
prop: 'createdBy'
},
{
label: '创建时间',
......@@ -97,16 +108,35 @@ export default {
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
baseData: {
sopStatusList: [
{
confId: 1,
confName: '未开始'
},
{
confId: 2,
confName: '进行中'
},
{
confId: 3,
confName: '已结束'
}
]
}
}
},
mounted() { },
mounted() {
this.getOptionsList('searchFormData')
},
methods: {
handleJump(path) {
handleJump(path, row = {}) {
this.$router.push({
path: '/sop/' + path
path: '/sop/' + path,
query: row ? { id: row.id } : ''
})
},
// getParams() {
......@@ -163,11 +193,37 @@ export default {
// 结束
handleEnd(row) {
this.secondConfirm('结束', '结束sop后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'zoneList', 'deleteZoneApi', { id: row.id })
this.secondConfirm('结束', '结束sop后,将不再进行营销任务自动推送,且不可恢复。是否确定结束?', 'sop', 'endSopEventApi', { sopId: row.id })
},
handleDelete(row) {
this.secondConfirm('删除', 'sop删除后,不可恢复。是否确定删除?', 'proManage', 'deleteZoneApi', { id: row.id })
this.secondConfirm('删除', 'sop删除后,不可恢复。是否确定删除?', 'sop', 'deleteSopEventApi', { sopId: row.id })
},
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)
}
}
})
}
},
setTableFinishFun() {
......@@ -181,8 +237,8 @@ export default {
handleReset() {
this.searchForm = {
zoneName: '',
status: []
sopName: '',
sopStatus: ''
}
this.handleSearch()
}
......
......@@ -6,7 +6,7 @@ const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const cdn = {
css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`],
js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`]
js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`, `${CDN_DOMAIN}ajax/libs/moment/2.24.0/moment.js`]
}
module.exports = {
outputDir: `../dist/${packageName}`,
......@@ -33,7 +33,8 @@ module.exports = {
'vue-router': 'VueRouter',
vuex: 'Vuex',
axios: 'axios',
echarts: 'echarts'
echarts: 'echarts',
moment: 'moment'
}
},
devServer: {
......@@ -67,4 +68,4 @@ module.exports = {
})
.end()
}
}
\ No newline at end of file
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!