Commit beee0f63 by 前端

Merge branch 'kuangyq_dev_v2.0.0' into 'v2.0.0'

Kuangyq dev v2.0.0

See merge request !17
2 parents e167aa26 12799a45
...@@ -832,9 +832,15 @@ ...@@ -832,9 +832,15 @@
} }
}, },
"@babel/runtime-corejs3": { "@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", "version": "7.17.2",
"resolved": "https://registry.npmmirror.com/@babel/runtime-corejs3/-/runtime-corejs3-7.17.2.tgz", "resolved": "https://registry.npmmirror.com/@babel/runtime-corejs3/-/runtime-corejs3-7.17.2.tgz",
"integrity": "sha512-NcKtr2epxfIrNM4VOmPKO46TvDMCBhgi2CrSHaEarrz+Plk2K5r9QemmOFTGpZaoKnWoGH5MO+CzeRsih/Fcgg==", "integrity": "sha512-NcKtr2epxfIrNM4VOmPKO46TvDMCBhgi2CrSHaEarrz+Plk2K5r9QemmOFTGpZaoKnWoGH5MO+CzeRsih/Fcgg==",
>>>>>>> e167aa26c7dfce32bd8ee294ac3a9ce110d8b8fa
"requires": { "requires": {
"core-js-pure": "^3.20.2", "core-js-pure": "^3.20.2",
"regenerator-runtime": "^0.13.4" "regenerator-runtime": "^0.13.4"
...@@ -842,7 +848,11 @@ ...@@ -842,7 +848,11 @@
"dependencies": { "dependencies": {
"regenerator-runtime": { "regenerator-runtime": {
"version": "0.13.9", "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", "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
>>>>>>> e167aa26c7dfce32bd8ee294ac3a9ce110d8b8fa
"integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
} }
} }
...@@ -3519,7 +3529,11 @@ ...@@ -3519,7 +3529,11 @@
}, },
"core-js-pure": { "core-js-pure": {
"version": "3.21.1", "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", "resolved": "https://registry.npmmirror.com/core-js-pure/-/core-js-pure-3.21.1.tgz",
>>>>>>> e167aa26c7dfce32bd8ee294ac3a9ce110d8b8fa
"integrity": "sha512-12VZfFIu+wyVbBebyHmRTuEE/tZrB4tJToWcwAMcsp3h4+sHR+fMJWbKpYiCRWlhFBq+KNyO8rIV9rTkeVmznQ==" "integrity": "sha512-12VZfFIu+wyVbBebyHmRTuEE/tZrB4tJToWcwAMcsp3h4+sHR+fMJWbKpYiCRWlhFBq+KNyO8rIV9rTkeVmznQ=="
}, },
"core-util-is": { "core-util-is": {
...@@ -12054,7 +12068,11 @@ ...@@ -12054,7 +12068,11 @@
}, },
"wangeditor": { "wangeditor": {
"version": "4.7.12", "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", "resolved": "https://registry.npmmirror.com/wangeditor/-/wangeditor-4.7.12.tgz",
>>>>>>> e167aa26c7dfce32bd8ee294ac3a9ce110d8b8fa
"integrity": "sha512-5KOIpQ0+idKvDTkjZOp7RHYXA97FyJ9mjwy+zQUdMUCqZItlEXzvVOYtOlHkJr/HcbwgIz/7f/trGFggZK5X4g==", "integrity": "sha512-5KOIpQ0+idKvDTkjZOp7RHYXA97FyJ9mjwy+zQUdMUCqZItlEXzvVOYtOlHkJr/HcbwgIz/7f/trGFggZK5X4g==",
"requires": { "requires": {
"@babel/runtime": "^7.11.2", "@babel/runtime": "^7.11.2",
...@@ -12063,21 +12081,35 @@ ...@@ -12063,21 +12081,35 @@
}, },
"dependencies": { "dependencies": {
"@babel/runtime": { "@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", "version": "7.17.2",
"resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.17.2.tgz", "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.17.2.tgz",
"integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==", "integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==",
>>>>>>> e167aa26c7dfce32bd8ee294ac3a9ce110d8b8fa
"requires": { "requires": {
"regenerator-runtime": "^0.13.4" "regenerator-runtime": "^0.13.4"
} }
}, },
"regenerator-runtime": { "regenerator-runtime": {
"version": "0.13.9", "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", "resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
>>>>>>> e167aa26c7dfce32bd8ee294ac3a9ce110d8b8fa
"integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
}, },
"tslib": { "tslib": {
"version": "2.3.1", "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", "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.1.tgz",
>>>>>>> e167aa26c7dfce32bd8ee294ac3a9ce110d8b8fa
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
} }
} }
......
import { http } from '@/main'
const defaultPath = 'marketing.api.material.'
//获取素材组列表
const getMaterialList = params => {
params.method = `${defaultPath}group.list`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true
})
}
//删除素材组列表
const deleteMaterialList = params => {
params.method = `${defaultPath}group.delete`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true,
returnAll: true
})
}
//素材组详情
const materialGroupDetail = params => {
params.method = `${defaultPath}group.detail`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true
})
}
//素材组创建
const addMaterialGroup = params => {
params.method = `${defaultPath}group.insert`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true
})
}
//素材组编辑
const editMaterialGroup = params => {
params.method = `${defaultPath}group.update`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true,
returnAll: true
})
}
//素材删除
const materialDelete = params => {
params.method = `${defaultPath}delete`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true,
returnAll: true
})
}
//素材详情
const materialDetail = params => {
params.method = `${defaultPath}detail`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true
})
}
//素材列表
const materialList = params => {
params.method = `${defaultPath}page`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true
})
}
//素材创建
const materialInsert = params => {
params.method = `${defaultPath}insert`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true
})
}
//素材编辑
const materialEdit = params => {
params.method = `${defaultPath}update`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true,
returnAll: true
})
}
// 素材详情阅读人员明细
const readDetailPage = params => {
params.method = `${defaultPath}customerReadDetailPage`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true
})
}
// 素材详情数据概览
const dataOverview = params => {
params.method = `${defaultPath}dataOverview`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true
})
}
// 素材详情阅读人员明细
const sendDetailPage = params => {
params.method = `${defaultPath}employeeSendDetailPage`
return http({
url: 'rop-scrm-marketing/router',
method: 'post',
data: params,
sign: true
})
}
const findAllDictData = params => {
params.method = 'merchants.api.menu.findAllDictData'
return http({
url: 'http://rop-merchant.dev.glsx.com.cn/rop-merchants/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getMaterialList,
deleteMaterialList,
materialGroupDetail,
addMaterialGroup,
materialDelete,
materialDetail,
materialList,
materialEdit,
materialInsert,
editMaterialGroup,
readDetailPage,
dataOverview,
sendDetailPage,
findAllDictData
}
\ No newline at end of file \ No newline at end of file
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot> <slot v-if="item.addHtml" :name="item.addHtml" :scope="item"></slot>
<span v-else-if="item.type === 'showTxt'">{{ formObj[item.name] }}</span> <span v-else-if="item.type === 'showTxt'">{{ formObj[item.name] }}</span>
<div v-else-if="item.type === 'input'"> <div v-else-if="item.type === 'input'">
<el-input :placeholder="item.placeholder || '请输入' + item.label" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :rows="item.rows || 2" :style="{ width: item.width || defaultWidth }" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)"> <el-input :placeholder="item.placeholder || '请输入' + item.label" :prefix-icon="item.prefixIcon" v-model.trim="formObj[item.name]" :disabled="item.isDisabled" :maxlength="item.maxlength" :clearable="item.isClear || false" :type="item.inputType || 'text'" :rows="item.rows || 2" :style="{ width: item.width || defaultWidth }" :show-word-limit="item.showLimit || false" :show-password="item.showPass || false" @keydown.native="e => handleInputDown(e, item)">
<span v-if="item.prepend" slot="prepend">{{ item.prepend }}</span> <span v-if="item.prepend" slot="prepend">{{ item.prepend }}</span>
<span v-if="item.append" slot="append">{{ item.append }}</span> <span v-if="item.append" slot="append">{{ item.append }}</span>
</el-input> </el-input>
......
...@@ -12,7 +12,7 @@ module.exports = { ...@@ -12,7 +12,7 @@ module.exports = {
response: { response: {
data_key: 'data', data_key: 'data',
message_key: 'message', message_key: 'message',
code_key: 'code', code_key: ['code', 'returnCode'],
code_success_value: '0', code_success_value: '0',
errId_logout_value: '21', errId_logout_value: '21',
code_message_map: {} code_message_map: {}
...@@ -21,6 +21,34 @@ module.exports = { ...@@ -21,6 +21,34 @@ module.exports = {
// baseURL: 'http://scrm.test.glsx.com.cn/', // baseURL: 'http://scrm.test.glsx.com.cn/',
// baseURL: 'http://192.168.2.42:8064/', // baseURL: 'http://192.168.2.42:8064/',
baseURL: 'http://scrm.dev.glsx.com.cn/', 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, timeout: 180000,
// 携带凭证 // 携带凭证
...@@ -40,6 +68,12 @@ module.exports = { ...@@ -40,6 +68,12 @@ module.exports = {
format: 'json', format: 'json',
source: '' source: ''
}, },
sign_common: {
app_key: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0',
format: 'json',
source: 'glsx'
},
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b', secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b',
cdn: 'https://www.xxx.cn/static' cdn: 'https://www.xxx.cn/static'
......
...@@ -267,7 +267,11 @@ const staticRoutes = Object.freeze([{ ...@@ -267,7 +267,11 @@ const staticRoutes = Object.freeze([{
component: resolve => require([`@/views/material/materialDetail.vue`], resolve), component: resolve => require([`@/views/material/materialDetail.vue`], resolve),
meta: {} meta: {}
}, },
//朋友圈营销 {
name: 'addMaterial',
path: '/material/addMaterial',
component: resolve => require([`@/views/material/addMaterial.vue`], resolve),
},
{ {
name: 'friendGroup', name: 'friendGroup',
path: '/friendGroup/index', path: '/friendGroup/index',
......
...@@ -15,7 +15,7 @@ Vue.use(ElementUI) ...@@ -15,7 +15,7 @@ Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
Vue.use(GLFooter) Vue.use(GLFooter)
export async function bootstrap({ history, common, messenger, globalState, routerBase }) { export async function bootstrap({ history, common, messenger, globalState, routerBase }) {
const { response, request, request2, sign, secret, sign_common, request_common } = await fetchConfig() const { response, request, request2, sign, secret, sign_common, request_common } = await fetchConfig(false)
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
......
...@@ -195,7 +195,11 @@ export default { ...@@ -195,7 +195,11 @@ export default {
}) })
}, },
merchantOpen() { merchantOpen() {
this.$apis.customerTransform.merchantOpen({ merchantId: this.$globalState.session.merchantId }).then(res => { let channel = null
if (location.host == 'scrm.cgacar.com') {
channel = 2
}
this.$apis.customerTransform.merchantOpen({ merchantId: this.$globalState.session.merchantId, channel }).then(res => {
this.openFlag = res.openFlag this.openFlag = res.openFlag
}) })
}, },
......
<template> <template>
<div> <div>
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="!dialogVisible"> <el-dialog :title="title" :visible.sync="dialogVisible" width="720px" :before-close="!dialogVisible">
<el-form ref="materialGroupAddForm" :model="materialGroupAddForm" label-width="120px" :rules="materialGroupAddRules"> <el-form ref="materialGroupAddForm" :model="materialGroupAddForm" label-width="110px" :rules="materialGroupAddRules">
<el-form-item label="分组名称:" prop="groupName"> <el-form-item label="分组名称:" prop="materialGroupName">
<el-input v-model="materialGroupAddForm.groupName" maxlength="8" show-word-limit></el-input> <el-input v-model="materialGroupAddForm.materialGroupName" maxlength="8" show-word-limit :size="size" placeholder="请输入分组名称" style="width: 567px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="业务类型:" prop="businessType"> <el-form-item label="业务类型:" prop="businessType">
<el-checkbox-group v-model="materialGroupAddForm.businessType" @change="handleCheckChange"> <el-checkbox-group class="checkbox-group" :max="3" v-model="materialGroupAddForm.businessType">
<el-checkbox v-for="value in businessTypes" :key="value" :label="value">{{ value }}</el-checkbox> <el-checkbox v-for="item in businessTypes" :key="item.id" :label="item.dictLabel"></el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
<span class="tips">添加业务类型,该素材组里面的所有素材均会添加此业务类型</span>
</el-form> </el-form>
<span>添加业务类型,该素材组里面的所有素材均会添加此业务类型</span>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button> <el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="submitForm">确定创建</el-button> <el-button type="primary" @click="submitForm">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -23,17 +23,24 @@ ...@@ -23,17 +23,24 @@
<script> <script>
export default { export default {
name: 'addMaterialGroupDia', name: 'addMaterialGroupDia',
props: {
eventBus: Object,
businessTypes: {
type: Array
}
},
data() { data() {
return { return {
title: '新增素材组', title: '创建素材组',
dialogVisible: false, dialogVisible: false,
materialGroupAddForm: { materialGroupAddForm: {
groupName: '', id: '',
materialGroupName: '',
businessType: [] businessType: []
}, },
businessTypes: ['整车/新车','保养','维修','车险','二手车','改装','汽车金融','零配件/精品','通用(节假日等关怀素材)'], groupCounter: [],
materialGroupAddRules: { materialGroupAddRules: {
groupName: [ materialGroupName: [
{ required: true, message: '请输入分组名称', trigger: 'blur' }, { required: true, message: '请输入分组名称', trigger: 'blur' },
{ max: 16, message: '分组名称最长为8个字', trigger: 'blur' } { max: 16, message: '分组名称最长为8个字', trigger: 'blur' }
] ]
...@@ -41,30 +48,85 @@ export default { ...@@ -41,30 +48,85 @@ export default {
} }
}, },
methods: { methods: {
init(value) { init(addOrEdit, value, group) {
// console.log(value, '~~~~'); // this.findAllDictData('business_type')
if (value == 1) { console.log(value, '123')
this.dialogVisible = true
this.materialGroupAddForm = { this.materialGroupAddForm = {
groupName: '', materialGroupName: '',
businessType: [] businessType: []
} }
this.groupCounter = group
if (addOrEdit == 2) {
this.title = '编辑素材组'
if (!value) {
this.materialGroupAddForm.materialGroupName = '新车素材组'
return
} }
this.dialogVisible = true var params = {}
params.id = value.id
this.$apis.material.materialGroupDetail(params).then(res => {
console.log(res, '---')
this.materialGroupAddForm = res
if (res.businessType) {
this.materialGroupAddForm.businessType = this.materialGroupAddForm.businessType.split(',')
} else {
this.materialGroupAddForm.businessType = []
}
})
}
// Object.assign(this.materialGroupAddForm, value)
},
// 获取所有业务类型
findAllDictData(dictType) {
var params = {
dictType
}
this.$apis.material.findAllDictData(params).then(res => {
if (res) {
if (dictType == 'business_type') {
this.businessTypes = res
}
}
})
}, },
// 创建 // 创建
submitForm() { submitForm() {
this.$refs.materialGroupAddForm.validate((valid) => { console.log(this.materialGroupAddForm)
this.$refs.materialGroupAddForm.validate(valid => {
if (valid) { if (valid) {
this.$emit('addMaterialGroup', this.materialGroupAddForm) // 判断是创建还是编辑
if (this.materialGroupAddForm.id) {
this.eventBus.$emit('editMaterialGroup', this.materialGroupAddForm)
this.dialogVisible = false
return
}
// 判断素材组名称是否重复
var groupName = []
this.groupCounter.forEach(item => {
groupName.push(item.materialGroupName)
})
var idx = groupName.indexOf(this.materialGroupAddForm.materialGroupName)
if (idx != -1) {
this.$message({
message: '素材组名称不能重复',
type: 'warning'
})
return
}
this.eventBus.$emit('addMaterialGroup', this.materialGroupAddForm)
this.dialogVisible = false this.dialogVisible = false
} else { } else {
alert('请输入分组名称') this.$message({
return false; message: '请输入素材组名称',
type: 'warning'
})
return false
} }
}); })
}, },
handleCheckChange(val) { handleCheckChange(val) {
console.log(val); console.log(val)
this.materialGroupAddForm.businessType = val this.materialGroupAddForm.businessType = val
// console.log(this.materialGroupAddForm); // console.log(this.materialGroupAddForm);
} }
...@@ -72,5 +134,22 @@ export default { ...@@ -72,5 +134,22 @@ export default {
} }
</script> </script>
<style> <style lang="scss" scope>
.checkbox-group {
width: 567px;
box-sizing: border-box;
background: #f5f5f5;
padding: 16px 0 0 16px;
.el-checkbox {
width: 140px;
margin: 0;
padding: 0;
}
}
.tips {
font-size: 12px;
color: #666666;
display: block;
margin: -10px 0 0 110px;
}
</style> </style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="introduct">
<el-dialog title="功能介绍" :visible.sync="introductionDialog" width="1080px" :before-close="handleClose">
<p>营销素材——将业务资料、经典案例、活动等以链接、PDF形式上传在营销素材库中,企业成员可在企业微信聊天侧边栏或者嘀加企微管家工作台中,一键发给客户,支持雷达追踪,并将客户的阅读等关键行为记录到客户动态中,并给客户打上指定标签。</p>
<h3>我的优势</h3>
<p class="list">1、门店可以为不同的业务部门提供不同的营销素材,规范营销内容;</p>
<p class="list">2、员工能便捷的在企业微信聊天侧边栏及嘀加企微管家工作台上直接使用营销素材,避免自己设计素材的烦恼;</p>
<p class="list">3、捕获客户对素材的交互行为并主动通知员工,获取客户的兴趣点,为业务转化提供参考依据。</p>
<!-- <div class="img_div"> -->
<img class="img_div" src="@/assets/material/introduction.png" alt="">
<!-- </div> -->
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleClose">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'functionIntroduc',
props: {
introductionDialog: {
type: Boolean,
default: false
}
},
data() {
return {
dialogVisible: this.introductionDialog
}
},
methods: {
handleClose() {
this.$emit('closeIntroductDia', this.dialogVisible);
}
}
}
</script>
<style>
.img_div {
height: 334px;
/* margin: 0 20px; */
}
p {
margin: 0 0 20px 32px;
}
h3 {
font-size: 17px;
margin: 0 0 16px 32px;
}
.list {
margin: 0 0 20px 32px;
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="material-group">
<div class="all-group">
<div>全部素材组 ({{ groupCounter.length }})</div>
<div>
<el-button class="add_btn" icon="el-icon-plus" :size="size" @click="handleAddGroup(1)">新建</el-button>
</div>
</div>
<ul>
<li v-for="(item, index) in groupCounter" :key="index" @click="handleGroup(item)">
<img src="@/assets/material/file.png" alt="" style="vertical-align: middle">
<div class="group-name">{{ item.materialGroupName }}</div>
<el-popover placement="right" trigger="hover">
<div>
<ul>
<li @click="handleStick(item)">{{ item.orderTime ? '取消置顶' : '置顶' }}</li>
<li @click="handleAddGroup(2,item)">修改</li>
<li @click="handleDeleteGroup(item.id)" v-if="item.isDefault == -1">删除</li>
</ul>
</div>
<i slot="reference" class="el-icon-more"></i>
</el-popover>
</li>
</ul>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
export default {
name: 'materialGroup',
props: { eventBus: Object },
data() {
return {
// 素材组数量
groupCounter: [],
materialGroup: {
id: "",
materialGroupName: "",
orderValue: "",
isDefault: ""
}
}
},
mounted() {
this.eventBus.$on('addMaterialGroup', data => {
data.businessType = data.businessType.toString()
this.$apis.material.addMaterialGroup(data).then(res => {
if (res) {
this.getMaterialList()
}
})
})
this.eventBus.$on('editMaterialGroup', data => {
data.businessType = data.businessType.toString()
this.$apis.material.editMaterialGroup(data).then(res => {
if (res) {
this.getMaterialList()
}
})
})
this.materialInsert()
this.getMaterialList()
},
methods: {
// 创建素材组
materialInsert() {
var params = {}
params.isDefault = 0
this.$apis.material.addMaterialGroup(params).then(res => {
if (res) {
this.getMaterialList()
}
})
},
// 获取全部素材组
getMaterialList() {
this.$apis.material.getMaterialList({}).then(res => {
console.log(res);
this.groupCounter = res
})
},
// 点击素材组获取素材
handleGroup(item) {
var params = {}
params.groupId = item.id
params.pageNum = 1
params.pageSize = 10
this.$emit('getList', params, item)
},
// 打开1-新增, 2-编辑 素材组弹框
handleAddGroup(addOrEdit, value) {
console.log(addOrEdit, value)
this.$emit('openAddDialog', addOrEdit, value, this.groupCounter)
},
// 素材组置顶
handleStick(row) {
console.log(row, 'orderFlagorderFlag');
var params = {}
params.id = row.id
// 置顶
if (!row.orderTime) {
var date = new Date()
var stickDate = dayjs(date).format('YYYY-MM-DD HH:mm:ss')
params.orderTime = stickDate
params.orderFlag = true
console.log(params);
this.secondConfirm('提示', '确定置顶该素材组吗?', 'material', 'editMaterialGroup', params)
return
}
// 取消置顶
params.orderFlag = false
this.secondConfirm('提示', '确定取消置顶该素材组吗?', 'material', 'editMaterialGroup', params)
},
// 素材组删除
handleDeleteGroup(rowId) {
this.secondConfirm('提示', '删除素材组,该素材组下的所有素材均会被删除,请谨慎操作', 'material', 'deleteMaterialList', { id: rowId })
},
// 二次确认
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' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
fn && fn()
this.getMaterialList()
}
})
}
}
})
},
}
}
</script>
<style lang="scss">
.el-popover {
min-width: 80px;
&:hover {
cursor: pointer
}
}
.material-group {
.all-group {
font-size: 16px;
font-weight: 600;
padding: 24px 16px 0 16px;
display: flex;
justify-content: space-between;
.el-button {
margin-top: -13px;
}
}
ul {
li {
text-align: left;
padding: 18px 16px 16px 18px;
i {
font-size: 16px;
padding-top: 6px;
position: absolute;
right: 16px;
transform:rotate(90deg);
}
}
}
}
ul {
padding: 0;
text-align: center;
margin-block-start: 0;
margin-block-end: 0;
li {
list-style: none;
padding: 5px;
position: relative;
&:hover {
color: #5850FF;
}
}
}
.add_btn {
color: #5850FF;
}
.group-name {
display: inline-flex;
margin-left: 8px;
}
</style>
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<div> <div>
<glsx-combi-form ref="readPerDetailFormRef" :formObj="searchForm" :formData="readPerDetailFormData" :inline="true"> <glsx-combi-form ref="readPerDetailFormRef" :formObj="searchForm" :formData="readPerDetailFormData" :inline="true">
<span slot="footer" slot-scope="scope" class="select-pro"> <span slot="footer" slot-scope="scope" class="select-pro">
<el-button type="default" :size="size" @click="handleSearch(scope)">查询</el-button>
<el-button type="default" :size="size" @click="handleReset(scope)">重置</el-button> <el-button type="default" :size="size" @click="handleReset(scope)">重置</el-button>
<el-button type="primary" :size="size" @click="handleSearch(scope)">查询</el-button>
</span> </span>
</glsx-combi-form> </glsx-combi-form>
<GLTable ref="readPerDetailRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :tableData="readPerDetailTableData" :pageConf="pageConf" :tableTotal="tableTotal"> <GLTable ref="readPerDetailRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf">
</GLTable> </GLTable>
</div> </div>
</template> </template>
...@@ -15,33 +15,50 @@ ...@@ -15,33 +15,50 @@
import url from "@/assets/empty.png" import url from "@/assets/empty.png"
export default { export default {
name: 'readPerDetail', name: 'readPerDetail',
props: ['materialId'],
data() { data() {
return { return {
url, url,
searchForm: { searchForm: {
staffName: '' customerName: '',
customerPhone: '',
staffName: '',
materialId: this.materialId,
}, },
getListApi: this.$apis.material.readDetailPage,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
readPerDetailFormData: [ readPerDetailFormData: [
{ {
label: '客户名称:', label: '名称:',
name: 'cunstormName', name: 'customerName',
maxlength: 10, maxlength: 10,
type: 'input',
placeholder: '请输入名称'
},{
label: '客户手机号:',
name: 'customerPhone',
placeholder: '请输入客户手机号',
type: 'input' type: 'input'
}, },
{ {
label: '发送人:', label: '发送人:',
name: 'staffName', name: 'staffName',
maxlength: 10, maxlength: 10,
placeholder: '请输入发送人',
type: 'input' type: 'input'
} }
], ],
tableParams: { tableParams: {
listName: 'list', listName: 'data',
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: '客户名称', label: '客户名称',
prop: 'cunstormName' prop: 'customerName'
},
{
label: '电话号码',
prop: 'customerPhone'
}, },
{ {
label: '发送人', label: '发送人',
...@@ -49,11 +66,11 @@ export default { ...@@ -49,11 +66,11 @@ export default {
}, },
{ {
label: '所属企微成员', label: '所属企微成员',
prop: 'resdTimes' prop: 'departName'
}, },
{ {
label: '阅读次数', label: '阅读次数',
prop: 'readTimes' prop: 'readNumber'
}, },
{ {
label: '首次阅读时间', label: '首次阅读时间',
...@@ -66,6 +83,22 @@ export default { ...@@ -66,6 +83,22 @@ export default {
] ]
} }
} }
},
methods: {
// 搜索
handleSearch() {
this.$refs.readPerDetailRef.refreshTable()
},
// 重置
handleReset() {
this.searchForm = {
customerName: '',
customerPhone: '',
staffName: '',
materialId: this.materialId
}
this.handleSearch()
},
} }
} }
</script> </script>
......
<template>
<div class="tag-main">
<el-dialog title="选择标签" :visible.sync="dialogVisible" width="50%" :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="请输入搜索内容" clearable @keydown.enter.native="handleSearch"></el-input>
<el-button size="small" type="primary" @click="handleSearch">查询</el-button>
<el-button size="small" @click="handleReset">重置</el-button>
</div>
<div class="checkbox-group-box" :style="{ height: heightBox + 'px' }">
<div style="margin-bottom: 8px" class="checkbox-box" v-for="(item, index) in labelTreeRets" :key="index" @click="item.checked = !item.checked">
<span class="el-tree-node__expand-icon el-icon-caret-right" :class="{ expanded: item.checked }" @click="item.checked = !item.checked"></span>
{{ item.labelGroup.name }}
<el-tag :size="size">{{ item.labelType }}</el-tag>
<el-radio-group class="tag-group" v-model="item.tagChecked" v-show="item.checked">
<div v-for="(itm, idx) in item.labelList" :key="idx" class="radio-tag">
<el-tooltip effect="dark" placement="top" :disabled="itm.name.length < 8">
<el-radio class="radio-text" :label="itm">{{ itm.name }}</el-radio>
<div slot="content">{{ itm.name }}</div>
</el-tooltip>
</div>
</el-radio-group>
</div>
</div>
</div>
</div>
<div class="tag-panel-selected">
<div class="tag-title">已选标签</div>
<div class="tag-select-box">
<div class="tag-box-header">标签名称({{ selectNum }}项)</div>
<div class="tag-selected-box" :style="{ height: heightBox + 'px' }">
<template v-for="item in labelTreeRets">
<el-tag :title="item.tagChecked.name" v-if="item.tagChecked" type="info" class="tag-selected-item" :key="item.tagChecked" closable :disable-transitions="false" @close="remove(item, idx)">
{{ item.tagChecked.name }}
</el-tag>
</template>
</div>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button size="small" type="primary" @click="handleSelect">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import util from '@/utils/util'
export default {
name: 'activityModel',
data() {
return {
heightBox: 200,
dialogVisible: false,
labelGroupName: '',
selectNum: 0,
searchStatus: false,
labelTreeRets: []
}
},
watch: {
labelTreeRets: {
handler() {
this.selectNum = 0
this.labelTreeRets.forEach(item => {
if (item.tagChecked) {
this.selectNum++
}
})
},
deep: true
}
},
methods: {
jumpUrl() {
util.openUrl(location.origin + '/custom/tagsManage/index')
this.dialogVisible = false
},
init(item) {
console.log(item, '23232');
this.labelGroupName = ''
this.dialogVisible = true
this.querylabeltree(item)
},
handleSearch() {
this.searchStatus = true
this.querylabeltree()
},
querylabeltree(selectItem) {
console.log(selectItem, '-----')
this.$apis.customerTransform
.querylabeltree({
labelTreeReq: {
pageNum: 1,
pageSize: 1000,
shopId: this.$globalState.session.merchantId,
labelGroupName: this.labelGroupName,
edition: this.$globalState.session.merchantModel
}
})
.then(res => {
if (selectItem && selectItem.length > 0) {
console.log(res.labelTreeRets)
this.labelTreeRets = res.labelTreeRets.map(item => {
return {
labelType: item.labelType,
labelGroup: item.labelGroup,
labelList: item.labelList,
checked: false,
tagChecked: null,
isIndeterminate: false,
checkAll: false
}
})
//回显
selectItem.forEach(item => {
this.labelTreeRets.forEach(tag => {
if (item.labelGroup.id == tag.labelGroup.id) {
let labelId = item.labelList[0].id
let index = tag.labelList.findIndex(iem => iem.id == labelId)
console.log(index)
// tag.tagChecked = item.tagChecked
tag.tagChecked = tag.labelList[index]
}
})
})
console.log(this.labelTreeRets)
} else {
this.labelTreeRets = res.labelTreeRets.map(item => {
return {
labelType: item.labelType,
labelGroup: item.labelGroup,
labelList: item.labelList,
checked: false,
tagChecked: null,
isIndeterminate: false,
checkAll: false
}
})
}
})
},
remove(item, idx) {
item.tagChecked = null
},
//选中
handleSelect() {
if (this.selectNum > 3) {
this.$message({
message: '最多选择三个标签',
type: 'warning'
})
return
}
this.dialogVisible = false
let labelTreeRets = this.labelTreeRets
.map(item => {
if (item.tagChecked) {
return {
labelGroup: item.labelGroup,
labelType: item.labelType,
labelList: [item.tagChecked]
}
}
})
.filter(item => item)
console.log(labelTreeRets)
this.$emit('tagSelected', labelTreeRets)
},
handleReset() {
this.labelGroupName = ''
this.querylabeltree()
}
},
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;
}
.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 {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
padding-left: 20px !important;
}
}
.tag-title {
font-size: 16px;
font-weight: 400;
color: #333333;
line-height: 22px;
}
.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: 200px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.el-tree-node__expand-icon {
color: #5850ff;
font-size: 16px;
}
.tag-group {
margin-left: 26px;
display: flex;
flex-wrap: wrap;
.radio-tag {
display: inline-block;
width: 50%;
.el-radio {
margin: 8px 0;
display: inline-flex;
align-items: center;
/deep/.el-radio__inner{
box-shadow: none !important;
}
/deep/.el-radio__label {
display: inline-block;
max-width: 120px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
word-wrap: break-word;
}
}
}
}
}
}
.checkbox-group-box {
overflow: auto;
.checkbox-box {
cursor: pointer;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 20px;
/deep/ {
.el-tag {
color: #aaa5fa !important;
font-size: 12px;
border: none;
background: rgba($color: #5850ff, $alpha: 0.1);
}
}
}
}
.tag-selected-box {
min-height: 200px;
}
</style>
...@@ -2,53 +2,57 @@ ...@@ -2,53 +2,57 @@
<div> <div>
<glsx-combi-form ref="staffSendFormRef" :formObj="searchForm" :formData="staffSendFormData" :inline="true"> <glsx-combi-form ref="staffSendFormRef" :formObj="searchForm" :formData="staffSendFormData" :inline="true">
<span slot="footer" slot-scope="scope" class="select-pro"> <span slot="footer" slot-scope="scope" class="select-pro">
<el-button type="default" :size="size" @click="handleSearch(scope)">查询</el-button> <el-button type="primary" :size="size" @click="handleSearch(scope)">查询</el-button>
<el-button type="default" :size="size" @click="handleReset(scope)">重置</el-button>
</span> </span>
</glsx-combi-form> </glsx-combi-form>
<GLTable ref="materialRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :tableData="staffSendTableData" :pageConf="pageConf" :tableTotal="tableTotal"> <GLTable ref="staffSendDetailRef" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams"></GLTable>
</GLTable>
</div> </div>
</template> </template>
<script> <script>
import url from "@/assets/empty.png" import url from '@/assets/empty.png'
export default { export default {
name: 'staffSendDetail', name: 'staffSendDetail',
props: ['materialId'],
data() { data() {
return { return {
url, url,
searchForm: { searchForm: {
staffName: '' materialId: this.$route.query.id,
employeeName: ''
}, },
staffSendFormData: [ staffSendFormData: [
{ {
label: '姓名:', label: '',
name: 'staffName', name: 'employeeName',
type: 'input' type: 'input',
placeholder: '请输入姓名',
prefixIcon: 'el-icon-search'
} }
], ],
getListApi: this.$apis.material.sendDetailPage,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableParams: { tableParams: {
listName: 'list', listName: 'data',
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: '姓名', label: '姓名',
prop: 'staffName' prop: 'employeeName'
}, },
{ {
label: '发送次数', label: '发送次数',
prop: 'sendTimes', prop: 'sendNumber',
sortable: true sortable: true
}, },
{ {
label: '阅读次数', label: '阅读次数',
prop: 'resdTimes', prop: 'readNumber',
sortable: true sortable: true
}, },
{ {
label: '阅读人数', label: '阅读人数',
prop: 'readPer' prop: 'readPeopleNumber'
}, },
{ {
label: '打开率', label: '打开率',
...@@ -57,10 +61,23 @@ export default { ...@@ -57,10 +61,23 @@ export default {
] ]
} }
} }
},
methods: {
// 搜索
handleSearch() {
this.$refs.staffSendDetailRef.refreshTable()
},
// 重置
handleReset() {
this.searchForm = {
staffName: '',
materialId: this.$route.query.id,
}
this.handleSearch()
}
} }
} }
</script> </script>
<style lang="" scoped> <style lang="" scoped>
</style> </style>
...@@ -5,42 +5,80 @@ ...@@ -5,42 +5,80 @@
</template> </template>
<script> <script>
// import E from 'wangeditor' import E from 'wangeditor'
export default { export default {
name: 'textBox', name: 'textBox',
data() { data() {
return { return {
editor: '',
content: '', content: '',
editorOption: {}, editorOption: {}
} }
}, },
mounted() { mounted() {
// this.getEdit() this.getEdit()
}, },
methods: { methods: {
// getEdit() { getEdit() {
// var editor = new E('#div-demo') const _this = this;
this.editor = new E('#div-demo')
this.editor.config.uploadImgShowBase64 = true
this.editor.config.showMenuTooltips = true
this.editor.config.menuTooltipPosition = 'down'
this.editor.config.height = 400
this.editor.config.width = 500
this.editor.config.uploadVideoServer = '/api/upload-video'
this.editor.config.excludeMenus = ['code']
this.editor.config.onchange = html => {
// console.log(html);
this.content = html // 绑定当前逐渐地值
this.$emit('change', this.content) // 将内容同步到父组件中
}
this.editor.config.customUploadImg = function (resultFiles, insertImgFn) {
console.log(resultFiles)
var file = resultFiles[0]
var reader = new FileReader()
// 默认1MB
const limitSize = 10
const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) {
_this.$message.error('上传图片大小不能超过' + limitSize + 'MB!')
return true
}
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
_this.$apis.common.pictureUpload({ file: base64 }).then(res => {
if (res) {
// console.log(res)
insertImgFn(res)
}
})
// resultFiles 是 input 中选中的文件列表
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
// editor.config.uploadImgShowBase64 = true // 上传图片,返回结果,将图片插入到编辑器中
// editor.config.showMenuTooltips = true
// editor.config.menuTooltipPosition = 'down'
// editor.config.height = 400
// editor.config.uploadVideoServer = '/api/upload-video'
// editor.config.excludeMenus = [
// 'code'
// ]
// editor.create() }
// } }
this.editor.config.onchangeTimeout = 5000
this.editor.create()
},
setEdit(html) {
this.$nextTick(() => {
this.editor.txt.html(html)
})
}
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
#div-demo { #div-demo {
margin-top: 40px; margin: 16px 300px 0 0;
} }
.el-form .editor{ .el-form .editor {
margin-top: 20px; margin-top: 20px;
} }
.myQuillEditor { .myQuillEditor {
...@@ -48,3 +86,8 @@ export default { ...@@ -48,3 +86,8 @@ export default {
height: 200px; height: 200px;
} }
</style> </style>
<style>
.w-e-text-container {
z-index: 1 !important;
}
</style>
\ No newline at end of file \ 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!