Commit a1c8af42 by 前端

Merge branch 'v3.5.0' into 'master'

V3.5.0

See merge request !8
2 parents 305cbc1c 1184216a
...@@ -100,6 +100,17 @@ const updateTaskContent = params => { ...@@ -100,6 +100,17 @@ const updateTaskContent = params => {
returnAll: true returnAll: true
}) })
} }
// 更改外呼任务跟进人和欢迎语
const verifyOpen = params => {
params.method = 'entmicro.api.system.accident.open.verify'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { export default {
checkTask, checkTask,
createTask, createTask,
...@@ -109,5 +120,6 @@ export default { ...@@ -109,5 +120,6 @@ export default {
phoneStatusPage, phoneStatusPage,
phoneCheck, phoneCheck,
getTaskContent, getTaskContent,
updateTaskContent updateTaskContent,
verifyOpen
} }
<template>
<div class="view-panel">
<img :src="dialogSrc" width="100%" v-if="dialogType == 'img'" />
<video width="100%" autoplay controls :src="dialogSrc" v-else></video>
</div>
</template>
<script>
export default {
name: 'view',
data() {
return {
dialogVisibleImg: true
}
},
props: {
dialogType: String,
dialogSrc: String
},
methods: {
test() {
console.log('点击了按钮')
this.$messenger.send({ message: { from: 11, message: '11111' } })
}
}
}
</script>
\ No newline at end of file \ No newline at end of file
...@@ -11,5 +11,7 @@ import Vue from 'vue' ...@@ -11,5 +11,7 @@ import Vue from 'vue'
// 导入权限按钮 // 导入权限按钮
import _button from '@/components/glsx-button/index' import _button from '@/components/glsx-button/index'
import glsxTable from '@/components/glsx-table/index.vue' import glsxTable from '@/components/glsx-table/index.vue'
import glsxPreview from '@/components/preview/index.vue'
Vue.component('glsx-button', _button) Vue.component('glsx-button', _button)
Vue.component('glsx-preview', glsxPreview)
// Vue.component('glsx-table', glsxTable) // Vue.component('glsx-table', glsxTable)
\ No newline at end of file \ No newline at end of file
<template>
<div class="activity-img-box">
<template v-if="imageUrlArr && imageUrlArr.length > 0">
<div v-for="(item, index) in imageUrlArr" :key="index">
<div class="pic-box" :style="{ width: picOptions.width, height: picOptions.height }">
<img class="photo-activity" :src="item" alt="" />
<div class="mask" :style="{ width: picOptions.width, height: picOptions.height }">
<!-- <div class="pic-pane-close" @click="handleEnlarge(item)">
<img src="@/assets/img/home/view.png" alt="" />
</div> -->
<template v-if="picOptions.isClose">
<div class="pic-pane-close" @click="close('img', index)">
<img src="@/assets/img/home/dele.png" alt="" />
</div>
</template>
</div>
</div>
</div>
</template>
<template v-if="(imageUrlArr && imageUrlArr.length < 9 && limit > 1) || (imageUrlArr&&imageUrlArr.length == 0 && limit == 1)">
<div class="upload-img">
<i class="el-icon-plus avatar-uploader-desc-icon"></i>
<div class="avatar-uploader-desc-word">上传照片</div>
<input type="file" ref="uploadImg" class="upload-img" style="opacity: 0" accept=".jpg, .jpeg, .png" @change="e => handleImgChange(e)" />
</div>
</template>
<el-dialog class="image-dialog" :visible.sync="dialogVisibleImg" width="50%">
<img :src="dialogSrc" width="100%" v-if="dialogType == 'img'" />
<!-- <video width="100%" autoplay controls :src="dialogSrc" v-else></video> -->
</el-dialog>
</div>
</template>
<script>
export default {
props: {
picOptions: {
type: Object,
default: () => {
return {
width: '104px',
height: '104px',
isClose: true
}
}
},
imageUrlArr: {
type: Array,
default: () => []
},
limit: {
type: String,
default: '1'
},
index: {
type: Number,
default: -1
}
},
data() {
return {
dialogVisibleImg: false
}
},
methods: {
// 上传图片
handleImgChange(e) {
this.$notify({
title: '提示',
message: '图片上传中,请稍后'
})
var file = e.srcElement.files[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
}
if (this.imageUrlArr.length > 9) {
this.$message.error('最多上传9张图片')
return
}
reader.readAsDataURL(file)
reader.onload = e => {
const imgFile = e.target.result
const arrBase64 = imgFile.split(',')
const splitStr = file.name.split('.')
const fileUrl = splitStr[splitStr.length - 1] + '@' + arrBase64[1]
this.$apis.common.pictureUpload({ file: fileUrl, compress: this.picOptions.compress || 0 }).then(res => {
if (res) {
this.$notify({
title: '提示',
message: '图片上传成功',
type: 'success'
})
this.imageUrlArr.push(res)
this.$emit('change', { arr: this.imageUrlArr, key: this.picOptions.key, index: this.index })
}
e.target.value = ''
this.$refs.uploadImg.value = ''
})
}
},
// 预览图文
handleEnlarge(src, type) {
this.dialogVisibleImg = true
this.dialogSrc = src
this.dialogType = type ? type : 'img'
},
// 删除图片/视频
close(type, index) {
switch (type) {
case 'radio':
this.videoUrl = ''
this.videoImage = ''
break
case 'img':
this.imageUrlArr.splice(index, 1)
this.$emit('change', { arr: this.imageUrlArr, key: this.picOptions.key, id: 1, index: this.index })
break
default:
this.videoUrl = ''
}
}
}
}
</script>
<style scoped lang="scss">
.activity-img-box {
display: flex;
flex-wrap: wrap;
max-width: 600px;
.pic-box {
position: relative;
width: 104px;
height: 104px;
border-radius: 4px;
margin-right: 8px;
margin-bottom: 5px;
&:hover .mask {
opacity: 1;
}
.pic {
position: absolute;
object-fit: fill;
}
.photo-activity {
position: absolute;
width: 100%;
height: 100%;
}
.mask {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
background: rgba(0, 0, 0, 0.5);
color: #ffffff;
opacity: 0;
top: 0;
right: 0;
width: 104px;
height: 104px;
z-index: 999;
.pic-pane-close {
width: 14px;
height: 14px;
cursor: pointer;
margin-right: 8px;
img{
width:100%;
display: block;
}
}
}
}
.upload-img {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 104px;
height: 104px;
background: rgba(0, 0, 0, 0.04);
border: 1px dashed rgba(0, 0, 0, 0.15);
border-radius: 4px;
input {
position: absolute;
// top: 0;
// left: 0;
width: 104px;
height: 104px;
}
}
.avatar-uploader-desc-word {
font-weight: 400;
font-size: 28rpx;
color: #666666;
}
.image-dialog {
/deep/ {
.el-dialog__header {
border-bottom: 0px;
padding: 0px;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* @version: * @version:
* @Author: limin * @Author: limin
* @Date: 2021-06-07 14:12:32 * @Date: 2021-06-07 14:12:32
* @LastEditors: limin * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2021-09-07 14:38:52 * @LastEditTime: 2022-12-22 14:29:51
*/ */
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js') // let request = require('@/http/request.js')
...@@ -18,7 +18,7 @@ export const fetchConfig = function(isEnv = true) { ...@@ -18,7 +18,7 @@ export const fetchConfig = function(isEnv = true) {
// return Promise.resolve(cfg) // return Promise.resolve(cfg)
// } // }
return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config') return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config') // return new Http().get('https://oss-config.dev.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -395,110 +395,112 @@ export default { ...@@ -395,110 +395,112 @@ export default {
//折线图数据 //折线图数据
async getChart() { async getChart() {
this.$apis.home.getChart({ day: 30, date: this.summaryTime }).then(res => { this.$apis.home.getChart({ day: 30, date: this.summaryTime }).then(res => {
const { custAddList, custEntmicroAdds, custLoseList } = res if (res.custAddList && res.custAddList.length) {
let custAddListData = custAddList.map(item => { const { custAddList, custEntmicroAdds, custLoseList } = res
return item.customerCount let custAddListData = custAddList.map(item => {
}) return item.customerCount
let custAddListAverg = custAddList.map(item => { })
return item.monthAverg let custAddListAverg = custAddList.map(item => {
}) return item.monthAverg
let custAddListRatio = custAddList.map(item => { })
return item.ratio let custAddListRatio = custAddList.map(item => {
}) return item.ratio
let custEntmicroAddsData = custEntmicroAdds.map(item => { })
return item.customerCount let custEntmicroAddsData = custEntmicroAdds.map(item => {
}) return item.customerCount
let custEntmicroAddsAverg = custEntmicroAdds.map(item => { })
return item.monthAverg let custEntmicroAddsAverg = custEntmicroAdds.map(item => {
}) return item.monthAverg
let custEntmicroAddsRatio = custEntmicroAdds.map(item => { })
return item.ratio let custEntmicroAddsRatio = custEntmicroAdds.map(item => {
}) return item.ratio
let custLoseListData = custLoseList.map(item => { })
return item.customerCount let custLoseListData = custLoseList.map(item => {
}) return item.customerCount
let custLoseListAverg = custLoseList.map(item => { })
return item.monthAverg let custLoseListAverg = custLoseList.map(item => {
}) return item.monthAverg
let custLoseListRatio = custLoseList.map(item => { })
return item.ratio let custLoseListRatio = custLoseList.map(item => {
}) return item.ratio
const dateTime = custAddList.map(item => item.dateTime) })
this.optionCoustom = { const dateTime = custAddList.map(item => item.dateTime)
tooltip: { this.optionCoustom = {
trigger: 'item', tooltip: {
formatter(params) { trigger: 'item',
let circleColor formatter(params) {
let Averg let circleColor
let i_name let Averg
if (params.seriesName == '总客户数') { let i_name
circleColor = '#5850FF' if (params.seriesName == '总客户数') {
Averg = custAddListAverg[params.dataIndex] circleColor = '#5850FF'
i_name = custAddListRatio[params.dataIndex] ? 'el-icon-top' : 'el-icon-bottom' Averg = custAddListAverg[params.dataIndex]
} i_name = custAddListRatio[params.dataIndex] ? 'el-icon-top' : 'el-icon-bottom'
if (params.seriesName == '已加企微客户数') { }
circleColor = '#2CCA74' if (params.seriesName == '已加企微客户数') {
Averg = custEntmicroAddsAverg[params.dataIndex] circleColor = '#2CCA74'
i_name = custEntmicroAddsRatio[params.dataIndex] == 1 ? 'el-icon-top' : custEntmicroAddsRatio[params.dataIndex] == -1 ? 'el-icon-bottom' : '' Averg = custEntmicroAddsAverg[params.dataIndex]
} i_name = custEntmicroAddsRatio[params.dataIndex] == 1 ? 'el-icon-top' : custEntmicroAddsRatio[params.dataIndex] == -1 ? 'el-icon-bottom' : ''
if (params.seriesName == '企微流失客户') { }
circleColor = '#FF6D00' if (params.seriesName == '企微流失客户') {
Averg = custLoseListAverg[params.dataIndex] circleColor = '#FF6D00'
i_name = custLoseListRatio[params.dataIndex] ? 'el-icon-top' : 'el-icon-bottom' Averg = custLoseListAverg[params.dataIndex]
i_name = custLoseListRatio[params.dataIndex] ? 'el-icon-top' : 'el-icon-bottom'
}
return params.name + '<br>' + `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${circleColor};"></span>` + params.seriesName + ':' + params.value + `<i class="${i_name}" style="color: ${circleColor}"></i>` + '<br>' + `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${circleColor};"></span>` + (new Date(params.name).getMonth() + 1) + '月均值:' + Averg
} }
return params.name + '<br>' + `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${circleColor};"></span>` + params.seriesName + ':' + params.value + `<i class="${i_name}" style="color: ${circleColor}"></i>` + '<br>' + `<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${circleColor};"></span>` + (new Date(params.name).getMonth() + 1) + '月均值:' + Averg
}
},
legend: {
data: ['总客户数', '已加企微客户数', '企微流失客户'],
x: 'center',
icon: 'stack',
itemHeight: 2,
itemWidth: 12
},
grid: {
left: '3%',
right: '4%',
bottom: 0,
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
color: '#A3A3A3',
data: dateTime
},
yAxis: {
type: 'value',
show: true,
name: '单位:人',
minInterval: 1
},
series: [
{
name: '总客户数',
type: 'line',
lineStyle: { color: '#5850FF ' },
data: custAddListData,
smooth: true
}, },
{ legend: {
name: '已加企微客户数', data: ['总客户数', '已加企微客户数', '企微流失客户'],
type: 'line', x: 'center',
lineStyle: { color: '#2CCA74 ' }, icon: 'stack',
data: custEntmicroAddsData, itemHeight: 2,
smooth: true itemWidth: 12
}, },
{ grid: {
name: '企微流失客户', left: '3%',
type: 'line', right: '4%',
lineStyle: { color: '#FF6D00 ' }, bottom: 0,
data: custLoseListData, containLabel: true
smooth: true },
} xAxis: {
] type: 'category',
boundaryGap: false,
color: '#A3A3A3',
data: dateTime
},
yAxis: {
type: 'value',
show: true,
name: '单位:人',
minInterval: 1
},
series: [
{
name: '总客户数',
type: 'line',
lineStyle: { color: '#5850FF ' },
data: custAddListData,
smooth: true
},
{
name: '已加企微客户数',
type: 'line',
lineStyle: { color: '#2CCA74 ' },
data: custEntmicroAddsData,
smooth: true
},
{
name: '企微流失客户',
type: 'line',
lineStyle: { color: '#FF6D00 ' },
data: custLoseListData,
smooth: true
}
]
}
this.getView()
} }
this.getView()
}) })
}, },
async getOpen() { async getOpen() {
......
<template> <template>
<div class="help-main" v-loading="loading"> <div class="help-main" v-loading="loading">
<div class="help-container"> <!-- <div class="help-container">
<div class="help-header scrm-p020"> <div class="help-header scrm-p020">
<div class="help-header-title">道路救援卡</div> <div class="help-header-title">道路救援卡</div>
</div> </div>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div> -->
<div class="help-store-container"> <div class="help-store-container">
<div class="help-container"> <div class="help-container">
<div class="help-header scrm-p020"> <div class="help-header scrm-p020">
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<div class="help-container"> <div class="help-container">
<div class="help-header scrm-p020"> <div class="help-header scrm-p020">
<div class="help-header-title">联系方式</div> <div class="help-header-title">联系方式</div>
<div class="help-header-config" @click="handleAdd">新增</div> <div class="help-header-config" @click="handleAdd" v-if="tableData.length == 0">新增</div>
</div> </div>
<div class="contact-tabel scrm-p20"> <div class="contact-tabel scrm-p20">
<GLTable :hasPage="false" ref="taskForm" :tableData="tableData" :tableTotal="tableTotal" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable :hasPage="false" ref="taskForm" :tableData="tableData" :tableTotal="tableTotal" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
...@@ -184,15 +184,15 @@ ...@@ -184,15 +184,15 @@
</div> </div>
<GLDialog title="提示" class="gl-form-min gl-form-page" @onOk="handleSure" @onCancel="dialogVisible = false" :visible.sync="dialogVisible"> <GLDialog title="提示" class="gl-form-min gl-form-page" @onOk="handleSure" @onCancel="dialogVisible = false" :visible.sync="dialogVisible">
<el-form ref="addForm" :model="addForm" class="code-body-form" label-width="120px" :rules="addRules"> <el-form ref="addForm" :model="addForm" class="code-body-form" label-width="120px" :rules="addRules">
<el-form-item label="号码备注:" prop="remark" size="small" class="form-w40"> <el-form-item label="姓名:" prop="remark" size="small" class="form-w40">
<el-input size="small" v-model.trim="addForm.remark" placeholder="请输入号码备注" maxlength="6"></el-input> <el-input size="small" v-model.trim="addForm.remark" placeholder="请输入姓名" maxlength="6"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="联系方式:" prop="contactInformation" size="small" class="form-w40"> <el-form-item label="联系方式:" prop="contactInformation" size="small" class="form-w40">
<el-input size="small" v-model.trim="addForm.contactInformation" placeholder="请输入联系方式" maxlength="15"></el-input> <el-input size="small" v-model.trim="addForm.contactInformation" placeholder="请输入联系方式" maxlength="15"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="同步到卡片:" prop="configName" size="small" class="form-w40"> <!-- <el-form-item label="同步到卡片:" prop="configName" size="small" class="form-w40">
<el-switch v-model="addForm.isShow" :active-value="0" :inactive-value="-1"></el-switch> <el-switch v-model="addForm.isShow" :active-value="0" :inactive-value="-1"></el-switch>
</el-form-item> </el-form-item> -->
</el-form> </el-form>
</GLDialog> </GLDialog>
<GLDialog title="提示" @onOk="handleDelSure" @onCancel="dialogVisibleDel = false" type="error" content="是否删除?" :visible.sync="dialogVisibleDel" mode="small"></GLDialog> <GLDialog title="提示" @onOk="handleDelSure" @onCancel="dialogVisibleDel = false" type="error" content="是否删除?" :visible.sync="dialogVisibleDel" mode="small"></GLDialog>
...@@ -234,20 +234,20 @@ export default { ...@@ -234,20 +234,20 @@ export default {
listName: 'data', listName: 'data',
tableColumns: [ tableColumns: [
{ {
label: '号码备注', label: '姓名',
prop: 'remark' prop: 'remark'
}, },
{ {
label: '联系电话', label: '联系电话',
prop: 'contactInformation' prop: 'contactInformation'
}, },
{ // {
label: '同步到卡片', // label: '同步到卡片',
prop: 'isShow', // prop: 'isShow',
formatter: cellValue => { // formatter: cellValue => {
return cellValue.isShow == 0 ? '是' : '否' // return cellValue.isShow == 0 ? '是' : '否'
} // }
}, // },
{ {
label: '操作', label: '操作',
prop: 'optionBtns', prop: 'optionBtns',
...@@ -258,7 +258,7 @@ export default { ...@@ -258,7 +258,7 @@ export default {
] ]
}, },
addRules: { addRules: {
remark: [{ required: true, message: '请输入号码备注', trigger: 'blur' }], remark: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
contactInformation: [{ required: true, message: '请输入联系电话', trigger: 'blur' }] contactInformation: [{ required: true, message: '请输入联系电话', trigger: 'blur' }]
} }
} }
...@@ -269,11 +269,11 @@ export default { ...@@ -269,11 +269,11 @@ export default {
}, },
listContact() { listContact() {
this.$apis.helpCard.listContact({}).then(res => { this.$apis.helpCard.listContact({}).then(res => {
this.tableData = res this.tableData = res || []
this.loading = false this.loading = false
this.$nextTick(() => { // this.$nextTick(() => {
this.createImage() // this.createImage()
}) // })
}) })
}, },
cardConfigChecked(val) { cardConfigChecked(val) {
...@@ -460,7 +460,7 @@ export default { ...@@ -460,7 +460,7 @@ export default {
} }
}, },
handleConfig() { handleConfig() {
const { followStaffName, followStaff } = this const { followStaffName, followStaff ,qrCode} = this
let staff = [] let staff = []
if (followStaffName) { if (followStaffName) {
const name = followStaffName.split(',') const name = followStaffName.split(',')
...@@ -473,7 +473,7 @@ export default { ...@@ -473,7 +473,7 @@ export default {
}) })
} }
this.$refs.configForm.init(this.dracScrmWelcomeConfigDTOS, staff) this.$refs.configForm.init(this.dracScrmWelcomeConfigDTOS, staff,qrCode)
}, },
changeBackground() { changeBackground() {
this.$refs.cardForm.init(this.backgroundId) this.$refs.cardForm.init(this.backgroundId)
...@@ -544,7 +544,7 @@ export default { ...@@ -544,7 +544,7 @@ export default {
//详情 //详情
async getConfigDetail() { async getConfigDetail() {
this.loading = true this.loading = true
const { merchantName, merchantAddress, id, backgroundId, followStaffName, configId, followStaff, dracScrmWelcomeConfigDTOS, businessUuid, miniprogramCode } = await this.$apis.helpCard.getConfigDetail({}) const { merchantName, merchantAddress, id, backgroundId, followStaffName, configId, followStaff, dracScrmWelcomeConfigDTOS, businessUuid, miniprogramCode,qrCode } = await this.$apis.helpCard.getConfigDetail({})
this.merchantName = merchantName ? merchantName : '' this.merchantName = merchantName ? merchantName : ''
this.merchantAddress = merchantAddress ? merchantAddress : '' this.merchantAddress = merchantAddress ? merchantAddress : ''
this.backgroundId = backgroundId this.backgroundId = backgroundId
...@@ -555,6 +555,7 @@ export default { ...@@ -555,6 +555,7 @@ export default {
this.followStaffName = followStaffName ? followStaffName : '' this.followStaffName = followStaffName ? followStaffName : ''
this.followStaff = followStaff ? followStaff : '' this.followStaff = followStaff ? followStaff : ''
this.dracScrmWelcomeConfigDTOS = dracScrmWelcomeConfigDTOS ? dracScrmWelcomeConfigDTOS : [] this.dracScrmWelcomeConfigDTOS = dracScrmWelcomeConfigDTOS ? dracScrmWelcomeConfigDTOS : []
this.qrCode = qrCode
this.listContact() this.listContact()
}, },
validFirst() { validFirst() {
......
<template> <template>
<div class="activity-main"> <div class="activity-main">
<el-drawer class="activity-drawer" size="50%" title="跟进员配置" :visible.sync="drawer" :before-close="handleClose" :append-to-body="true"> <el-drawer class="activity-drawer" size="70%" title="跟进员配置" :visible.sync="drawer" :before-close="handleClose" :append-to-body="true">
<div class="market-container"> <div class="gl-form-page gl-form-min">
<div v-if="title || $slots.title"> <el-form label-width="154px" :model="form" size="small" :rules="rule">
<slot name="title">{{ title }}</slot> <el-form-item label="配置方式:" prop="configuration">
</div> <el-radio-group v-model="form.configuration" @change="changeConfig">
<div class="config-item"> <el-radio :label="1">直接配置</el-radio>
<div class="market-title"> <el-radio :label="2">活码上传</el-radio>
<label>*</label> </el-radio-group>
跟进专员: </el-form-item>
</el-form>
</div>
<div class="optional-wrap" v-show="form.configuration == 1">
<div class="market-container">
<div v-if="title || $slots.title">
<slot name="title">{{ title }}</slot>
</div> </div>
<div class="market-content"> <div class="config-item">
<el-button size="small" @click="handleAddEmp"> <div class="market-title">
<i class="el-icon-plus"></i> <label>*</label>
选择专员 跟进专员:
</el-button> </div>
<div class="el-input-tag input-tag-wrapper" v-show="staffInfo.length"> <div class="market-content">
<GLFull :label="tag.staffName" :identi="`${tag.staffId}`" labelWidth="110" textType="user" :haveClose="true" v-for="(tag, idx) in staffInfo" :key="idx" @handleRemove="removeStaff(idx)"></GLFull> <el-button size="small" @click="handleAddEmp">
<i class="el-icon-plus"></i>
选择专员
</el-button>
<div class="el-input-tag input-tag-wrapper" v-show="staffInfo.length">
<GLFull :label="tag.staffName" :identi="`${tag.staffId}`" labelWidth="110" textType="user" :haveClose="true" v-for="(tag, idx) in staffInfo" :key="idx" @handleRemove="removeStaff(idx)"></GLFull>
</div>
</div> </div>
</div> </div>
</div> <div class="config-item">
<div class="config-item"> <div class="market-title">
<div class="market-title"> <label>*</label>
<label>*</label> 配置欢迎语:
配置欢迎语: </div>
</div> <div class="market-content" v-if="drawer">
<div class="market-content" v-if="drawer"> <GLEditor ref="welcome" :btnList="btnList" @previewWord="previewForm"></GLEditor>
<GLEditor ref="welcome" :btnList="btnList" @previewWord="previewForm"></GLEditor> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="preview-wrap" v-show="form.configuration == 2">
<preview :picOptions="picOptions" :imageUrlArr="form.qrCodeArr" @change="changeqrCode"></preview>
<div class="preview-text" @click="handleView">预览</div>
<div class="el-form-item__error" v-if="qrCodeFlag">请上传图片</div>
<div class="text-tip">建议大小:不超过1M</div>
</div>
<div class="drawer-btn"> <div class="drawer-btn">
<el-button @click="drawer = false" size="small"> <el-button @click="drawer = false" size="small">取消</el-button>
取消
</el-button>
<el-button type="primary" @click="handleSaveConfig" size="small">提交</el-button> <el-button type="primary" @click="handleSaveConfig" size="small">提交</el-button>
</div> </div>
</el-drawer> </el-drawer>
<select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp> <select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp>
<el-dialog class="image-dialog" :visible.sync="dialogVisibleImg" width="30%">
<big-view ref="viewForm" v-if="dialogVisibleImg" :dialogSrc="dialogSrc" :dialogType="dialogType"></big-view>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import selectEmp from '@/components/selectEmp' import selectEmp from '@/components/selectEmp/emp.vue'
import preview from '@/components/preview/index.vue'
import bigView from '@/components/big-view/index.vue'
export default { export default {
name: 'marketConfig', name: 'marketConfig',
components: { components: {
selectEmp selectEmp,
preview,
bigView
}, },
props: { props: {
title: { title: {
...@@ -60,7 +83,10 @@ export default { ...@@ -60,7 +83,10 @@ export default {
}, },
data() { data() {
return { return {
dialogVisibleImg: false,
qrCodeFlag: false,
drawer: false, drawer: false,
dialogType: '',
staffInfo: [], staffInfo: [],
welcomeStatus: false, welcomeStatus: false,
btnList: [ btnList: [
...@@ -178,10 +204,48 @@ export default { ...@@ -178,10 +204,48 @@ export default {
templateSaveApi: this.$apis.welcomeword.templateSave, templateSaveApi: this.$apis.welcomeword.templateSave,
templateDetailApi: this.$apis.welcomeword.templateDetail templateDetailApi: this.$apis.welcomeword.templateDetail
} }
] ],
rule: {
configuration: [{ required: true, message: '请选择配置方式', trigger: 'change' }]
},
form: {
configuration: 1,
qrCode: '',
qrCodeArr: []
},
picOptions: {
width: '104px',
height: '104px',
key: 'qrCode',
isClose: true
}
} }
}, },
methods: { methods: {
//视频预览
handleView(index) {
this.dialogType = 'img'
this.dialogVisibleImg = true
this.dialogSrc = this.form.qrCode
},
//清空数据
changeConfig() {
if (this.form.configuration == 1) {
this.form.qrCode = ''
this.form.qrCodeArr = []
this.qrCodeFlag = false
} else {
const preview = [{ attContent: '', attNum: 1, mediaId: '', attType: 1 }]
this.$nextTick(() => {
this.$refs.welcome.updateList(preview)
})
this.staffInfo = []
}
},
changeqrCode(val) {
this[val.key + 'Flag'] = false
this.form[val.key] = val.arr[0]
},
handleAddEmp() { handleAddEmp() {
this.staffStatus = false this.staffStatus = false
this.$refs.selectEmpForm.init(this.staffInfo) this.$refs.selectEmpForm.init(this.staffInfo)
...@@ -197,42 +261,68 @@ export default { ...@@ -197,42 +261,68 @@ export default {
} }
}) })
}, },
init(previewList, staff) { init(previewList, staff, qrCode) {
const preview = this.$common.utils.deepClone(previewList)
this.drawer = true this.drawer = true
this.$nextTick(() => { if (qrCode) {
preview.map(item => { this.form.configuration = 2
if (item.attType == 7) { this.staffInfo = staff
item.attContent = JSON.parse(item.attContent) this.form.qrCode = qrCode
} this.form.qrCodeArr = [qrCode]
} else {
this.form.configuration = 1
const preview = this.$common.utils.deepClone(previewList)
this.$nextTick(() => {
preview.map(item => {
if (item.attType == 7) {
item.attContent = JSON.parse(item.attContent)
}
})
this.$refs.welcome.updateList(preview)
}) })
this.$refs.welcome.updateList(preview) }
})
this.staffInfo = staff
}, },
handleSaveConfig() { handleSaveConfig() {
const param = {} let param = {}
let staffId = [] if (this.form.configuration == 1) {
this.staffInfo.forEach(item => { let staffId = []
staffId.push(item.staffId) this.staffInfo.forEach(item => {
}) staffId.push(item.staffId)
if (staffId.length == 0) { })
this.$message.error('请选择跟进专员') if (staffId.length == 0) {
return this.$message.error('请选择跟进专员')
} return
param.followStaff = staffId.join(',')
const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
if (previewList.length == 0) {
this.$message.error('请填写欢迎语')
return
}
const attachmentList = previewList.map(item => {
if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
} }
return item param.followStaff = staffId.join(',')
}) const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
param.welcomeInfo = attachmentList if (previewList.length == 0) {
this.$message.error('请填写欢迎语')
return
}
const attachmentList = previewList.map(item => {
if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
return item
})
param.welcomeInfo = attachmentList
param.qrCode = ''
} else {
if (this.form.qrCode == '') {
this.$message.error('请上传活码')
return
}
param.welcomeInfo = [
{
attContent: '',
attNum: 1,
mediaId: '',
attType: 1
}
]
param.followStaff = ''
param.qrCode = this.form.qrCode
}
this.$emit('handleConfigChecked', param) this.$emit('handleConfigChecked', param)
this.drawer = false this.drawer = false
} }
...@@ -306,10 +396,40 @@ export default { ...@@ -306,10 +396,40 @@ export default {
padding-right: 20px; padding-right: 20px;
height: 64px; height: 64px;
border-top: 1px solid #e6e6e6; border-top: 1px solid #e6e6e6;
position: absolute;
width: 100%;
bottom: 0px;
}
.optional-wrap {
background: #f9f9f9;
padding: 20px;
margin-left: 154px;
margin-right: 20px;
margin: 10px 20px 20px 174px;
}
.text-tip {
font-weight: 400;
font-size: 14px;
color: #999999;
margin-bottom: 35px;
margin-top: 8px;
}
.preview-wrap {
margin: 10px 0 200px 174px;
position: relative;
.preview-text {
font-weight: 400;
font-size: 14px;
color: #5850ff;
position: absolute;
top: 90px;
left: 118px;
white-space: nowrap;
cursor: pointer;
}
.el-form-item__error {
margin-top: 5px;
}
} }
</style> </style>
<style>
/* .activity-drawer {
z-index: 3000 !important;
} */
</style>
...@@ -67,7 +67,8 @@ ...@@ -67,7 +67,8 @@
进站续保 进站续保
</div> </div>
</div> </div>
<div class="use-operation" @click="$router.push('/home/helpCard')">立即使用</div> <div class="use-operation" @click="$router.push('/home/helpCard')" v-if="verifyOpenStatus">立即使用</div>
<div class="use-operation" v-else>尚未该订阅服务</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -83,10 +84,20 @@ export default { ...@@ -83,10 +84,20 @@ export default {
}, },
data() { data() {
return { return {
activeName: 'first' activeName: 'first',
verifyOpenStatus: false
} }
}, },
methods: {} mounted() {
this.verifyOpen()
},
methods: {
verifyOpen() {
this.$apis.aiCard.verifyOpen({}).then(res => {
this.verifyOpenStatus = res && res.data
})
}
}
} }
</script> </script>
......
...@@ -5,75 +5,66 @@ const publicPath = node_env ? `/child/${packageName}/` : '/' ...@@ -5,75 +5,66 @@ const publicPath = node_env ? `/child/${packageName}/` : '/'
const resolve = dir => path.join(__dirname, dir) const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://img02.glsx.com.cn/' const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const cdn = { const cdn = {
css: [ css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.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`
]
} }
module.exports = { module.exports = {
outputDir: `dist`, outputDir: `dist`,
publicPath, publicPath,
assetsDir: 'static', assetsDir: 'static',
productionSourceMap: false, productionSourceMap: false,
configureWebpack: { configureWebpack: {
resolve: { resolve: {
alias: { alias: {
'@': resolve('src'), '@': resolve('src'),
assets: resolve('src/assets'), assets: resolve('src/assets'),
views: resolve('src/views'), views: resolve('src/views'),
components: resolve('src/components') components: resolve('src/components')
} }
},
output: {
library: `${packageName}-[name]`,
libraryTarget: 'umd', // 把微应用打包成 umd 库格式
jsonpFunction: `webpackJsonp_${packageName}`
},
externals: {
'vue': 'Vue',
'element-ui': 'ELEMENT',
'vue-router': 'VueRouter',
'vuex': 'Vuex',
'axios': 'axios',
'echarts': 'echarts'
}
}, },
devServer: { output: {
hot: true, library: `${packageName}-[name]`,
disableHostCheck: true, libraryTarget: 'umd', // 把微应用打包成 umd 库格式
host: process.env.VUE_APP_HOST, jsonpFunction: `webpackJsonp_${packageName}`
port: process.env.VUE_APP_PORT,
headers: {
'Access-Control-Allow-Origin': '*' // 主应用获取子应用时跨域响应头
}
}, },
chainWebpack: config => { externals: {
config.plugin('html') vue: 'Vue',
.tap(args => { 'element-ui': 'ELEMENT',
// args[0].minify.removeComments = false; 'vue-router': 'VueRouter',
args[0].cdn = cdn vuex: 'Vuex',
return args axios: 'axios',
}) echarts: 'echarts'
config.plugins.delete('preload') // TODO: need test
config.plugins.delete('prefetch') // TODO: need test
config.module
.rule('fonts')
.test(/.(ttf|otf|eot|woff|woff2)$/)
.use('url-loader')
.loader('url-loader')
.tap(options => {
options = {
// limit: 10000,
name: '/static/fonts/[name].[ext]'
}
return options
})
.end()
} }
},
devServer: {
hot: true,
disableHostCheck: true,
host: process.env.VUE_APP_HOST,
port: process.env.VUE_APP_PORT,
headers: {
'Access-Control-Allow-Origin': '*' // 主应用获取子应用时跨域响应头
}
},
chainWebpack: config => {
config.plugin('html').tap(args => {
// args[0].minify.removeComments = false;
args[0].cdn = cdn
return args
})
config.plugins.delete('preload') // TODO: need test
config.plugins.delete('prefetch') // TODO: need test
config.module
.rule('fonts')
.test(/.(ttf|otf|eot|woff|woff2)$/)
.use('url-loader')
.loader('url-loader')
.tap(options => {
options = {
// limit: 10000,
name: '/static/fonts/[name].[ext]'
}
return options
})
.end()
}
} }
\ 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!