Commit 35b63cd0 by 杨明

fixed

1 parent d2bec2e4
Showing 80 changed files with 2702 additions and 217 deletions
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"core-js": "^3.4.4", "core-js": "^3.4.4",
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.4.6", "glsx-components": "^1.4.8",
"glsx-table": "^1.0.9" "glsx-table": "^1.0.9"
}, },
"devDependencies": { "devDependencies": {
......
<template> <template>
<div id="app"> <div id="app">
<router-view /> <keep-alive include="aiCard">
<router-view />
</keep-alive>
</div> </div>
</template> </template>
...@@ -17,12 +19,31 @@ export default { ...@@ -17,12 +19,31 @@ export default {
gs: '' gs: ''
} }
}, },
watch: {
$route(to) {
document.querySelector('.el-main .el-scrollbar__wrap').scrollTo(0, 0)
}
},
beforeDestroy() {
document.onkeydown = function() {
return true
}
},
created() { created() {
document.onkeydown = function() {
var evt = window.event || arguments[0]
if (evt && evt.keyCode == 13) {
if (typeof evt.cancelBubble != 'undefined') evt.cancelBubble = true
if (typeof evt.stopPropagation == 'function') evt.stopPropagation()
return false
}
return true
}
this.myMsg = this.msg this.myMsg = this.msg
this.myMessage = this.message this.myMessage = this.message
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.parent-child-communication { .parent-child-communication {
...@@ -40,4 +61,4 @@ export default { ...@@ -40,4 +61,4 @@ export default {
overflow-y: auto; overflow-y: auto;
height: 100%; height: 100%;
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
//校验外呼任务名称重复
const checkTask = params => {
params.method = 'entmicro.api.outbound.call.merchant.check.task.name'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//创建任务
const createTask = params => {
params.method = 'entmicro.api.outbound.call.merchant.create.task'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//删除任务
const taskDelete = params => {
params.method = 'entmicro.api.outbound.call.merchant.task.delete'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//任务列表
const taskPage = params => {
params.method = 'entmicro.api.outbound.call.merchant.task.page'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//任务详情
const taskDetail = params => {
params.method = 'entmicro.api.outbound.task.detail'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//任务详情
const phoneStatusPage = params => {
params.method = 'entmicro.api.outbound.task.phoneStatus.page'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//任务详情
const phoneCheck = params => {
params.method = 'entmicro.api.outbound.call.phone.check'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
checkTask,
createTask,
taskDelete,
taskPage,
taskDetail,
phoneStatusPage,
phoneCheck
}
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http_common } from '@/main'
const pictureUpload = params => {
params.method = 'glsx.accounts.biz.common.pictureUpload'
return http_common({
url: '/router?method=glsx.accounts.biz.common.pictureUpload',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file']
})
}
export default {
pictureUpload
}
/**
* 新增参数sign 判断接口是否需要sign签名
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http } from '@/main'
const getFollower = params => {
params.method = 'entmicro.api.staff.listFollowerStaffByPage'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const getStaffList = params => {
params.method = 'entmicro.api.staff.findStaffByMerchantId'
return http({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
const findAllByPage = params => {
params.method = 'entmicro.api.dracIm.findAllByPage'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//删除联系方式
const deleteContact = params => {
params.method = 'entmicro.api.drac.rescue.deleteContact'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//救援卡详情
const getConfigDetail = params => {
params.method = 'entmicro.api.drac.rescue.config.getConfigDetail'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//救援卡联系方式列表
const listContact = params => {
params.method = 'entmicro.api.drac.rescue.listContact'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//道路救援卡客户列表查询接口
const listCustomer = params => {
params.method = 'entmicro.api.drac.rescue.listCustomer'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//道路救援卡客户列表查询接口
const listCustomerExport = params => {
params.method = 'entmicro.api.drac.rescue.listCustomerExport'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//保存救援卡配置
const saveConfig = params => {
params.method = 'entmicro.api.drac.rescue.saveConfig'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//保存联系方式
const saveContact = params => {
params.method = 'entmicro.api.drac.rescue.saveContact'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//道路救援卡客户列表查询接口
const updateConfig = params => {
params.method = 'entmicro.api.drac.rescue.config.updateConfig'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//编辑联系方式
const updateContact = params => {
params.method = 'entmicro.api.drac.rescue.updateContact'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const validFirst = params => {
params.method = 'entmicro.api.drac.rescue.config.validFirst'
return http({
url: 'rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getStaffList,
getFollower,
findAllByPage,
deleteContact,
getConfigDetail,
listContact,
listCustomer,
listCustomerExport,
saveConfig,
saveContact,
updateConfig,
updateContact,
validFirst
}
import { http } from '@/main'
const path = 'entmicro.api.mass.'
const URL = 'rop-scrm-entmicro/router'
//权益卡
const getCard = params => {
params.method = 'scrm.api.equity.open.card.price.list.by.merchantid'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//权益卡
const merchant = params => {
params.method = 'scrm.api.equity.open.card.price.list.by.merchantid'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//是否开通权益
const merchantOpen = params => {
params.method = 'scrm.api.equity.service.merchant.config.get'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
//优惠券
const getCoupon = params => {
params.method = 'scrm.api.boutiquecoupon.coupon.page'
return http({
url: '/rop-scrm-boutiquecoupon/router',
method: 'POST',
data: params,
sign: true
})
}
//套餐
const getPackage = params => {
params.method = 'scrm.api.equity.package.info.list.with.page'
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const getMerchant = params => {
params.method = 'scrm.api.coupon.list.merchant'
return http({
url: 'rop-scrm-coupon/router',
method: 'POST',
data: params,
sign: true
})
}
//秒杀活动
const getActivity = params => {
params.method = 'scrm.api.shopmall.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取素材组列表
const getGroupListApi = params => {
params.method = 'marketing.api.material.group.list'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取素材列表
const getMaterialListApi = params => {
// params.method = 'marketing.api.material.page'
params.method = 'marketing.api.material.sop.page'
return http({
url: 'rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//模板列表
const templatePage = params => {
params.method = `${path}template.page.search`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
//模板保存
const templateSave = params => {
params.method = `${path}template.save`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
//模板更新
const templateUpdate = params => {
params.method = `${path}template.update`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
//模板创建人
const createdNameList = params => {
params.method = `${path}template.created.name.list`
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
export default {
getCard,
merchant,
getActivity,
getPackage,
getMerchant,
getCoupon,
merchantOpen,
getGroupListApi,
getMaterialListApi,
templatePage,
createdNameList,
templateUpdate,
templateSave
}
...@@ -98,10 +98,11 @@ img { ...@@ -98,10 +98,11 @@ img {
.scrm-p20 { .scrm-p20 {
padding: 20px; padding: 20px;
} }
.scrm-p020 {
padding: 0px 20px;
}
.scrm-box-f { .scrm-box-f {
background: #ffffff; background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
} }
.count-item-question { .count-item-question {
width: 14px; width: 14px;
......

644 Bytes | W: | H:

527 Bytes | W: | H:

src/assets/img/question.png
src/assets/img/question.png
src/assets/img/question.png
src/assets/img/question.png
  • 2-up
  • Swipe
  • Onion skin
<template>
<div class="square-main" v-loading="loading">
<el-dialog title="选择跟进专员" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm">
<el-form-item size="small" label="员工">
<el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item size="small" class="emp-form-btn">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable :hasNum="false" v-if="dialogVisible" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable">
<div slot="options" slot-scope="scope" @change="changeSelect">
<el-radio :label="scope.scope.id" v-model="selectId"></el-radio>
</div>
</GLTable>
<span slot="footer" class="dialog-footer">
<a class="dialog-jump" @click="jumpUrl">新增专员</a>
<el-button size="small" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { utils } from 'glsx-common'
import util from '@/utils/util'
export default {
name: 'selectEmp',
data() {
return {
selectId: '',
loading: false,
dialogVisible: false,
tableSearchForm: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'data',
tableOption: false,
// 行数据的key
mutiSelectUniqueKey: 'id',
tableColumns: [
{
label: '',
prop: '',
addHtml: 'options',
width: 100
},
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0,
selectItem: [],
selectEmp: []
}
},
methods: {
jumpUrl() {
util.openTab(location.origin + '/settings/followUp/index')
},
getFollower() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum
}
this.$apis.helpCard.getFollower(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
})
},
init(item) {
if (item.length == 0) {
this.selectId = ''
}
this.tableSearchForm = {}
this.dialogVisible = true
this.$nextTick(() => {
this.$refs.table.page.pageNum = 1
this.getFollower()
})
},
handleSearch() {
this.getFollower()
},
selectionTable(val) {
this.selectItem = val
},
handleClose() {
this.handleCancel()
},
handleCancel: utils.debounce(function() {
this.dialogVisible = false
}, 300),
changeSelect() {
let list = this.tableData.filter(item => {
return item['id'] == this.selectId
})
this.selectEmp = {
id: list[0].id,
staffName: list[0].staffName
}
},
handleSelect: utils.debounce(function() {
this.loading = true
const { selectEmp } = this
console.log(selectEmp)
if (selectEmp.length == 0) {
this.$message.error('请选择员工')
return
}
this.loading = false
this.dialogVisible = false
this.$emit('selectTable', [selectEmp])
}, 300)
}
}
</script>
<style lang="scss" scoped>
.emp-form-btn {
margin-left: 20px;
}
.dialog-jump {
color: #5850ff;
float: left;
line-height: 24px;
text-decoration: underline;
cursor: pointer;
}
.square-main {
/deep/ {
.el-radio__label {
display: none;
}
.el-table {
height: 40vh;
overflow-y: auto;
}
.el-table::before {
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
}
}
</style>
<template>
<div class="square-main" v-loading="loading">
<el-dialog title="选择跟进专员" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm">
<el-form-item size="small" label="员工">
<el-input v-model="tableSearchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item size="small" class="emp-form-btn">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable v-if="dialogVisible" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable"></GLTable>
<span slot="footer" class="dialog-footer">
<a class="dialog-jump" @click="jumpUrl">新增专员</a>
<el-button size="small" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { utils } from 'glsx-common'
import util from '@/utils/util'
export default {
name: 'selectEmp',
data() {
return {
loading: false,
dialogVisible: false,
tableSearchForm: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'data',
tableOption: false,
// 行数据的key
mutiSelectUniqueKey: 'id',
// 多选ref的名称
mutiSelectName: 'salelist',
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0,
selectItem: [],
selectEmp: []
}
},
methods: {
jumpUrl() {
util.openTab(location.origin + '/settings/followUp/index')
},
getFollower() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum
}
this.$apis.helpCard.getFollower(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
this.tableData.forEach(item => {
this.selectEmp.forEach((itm, index) => {
if (itm.staffId == item.id) {
this.$refs.table.$refs.salelistMutiTable.toggleRowSelection(item)
this.selectEmp.splice(index, 1)
}
})
})
})
},
init(item) {
this.tableSearchForm = {}
this.selectEmp = JSON.parse(JSON.stringify(item))
this.dialogVisible = true
this.$nextTick(() => {
this.$refs.table.page.pageNum = 1
this.getFollower()
})
},
handleSearch() {
this.getFollower()
},
selectionTable(val) {
this.selectItem = val
},
handleClose() {
this.handleCancel()
},
handleCancel: utils.debounce(function() {
this.dialogVisible = false
this.$refs.table.$refs.salelistMutiTable.clearSelection()
}, 300),
handleSelect: utils.debounce(function() {
this.loading = true
let selectEmp = this.selectEmp.map(item => {
return {
id: item.staffId,
staffName: item.staffName
}
})
const selectItem = this.selectItem.concat(selectEmp)
if (selectItem.length == 0) {
this.$message.error('请选择员工')
return
}
this.loading = false
this.dialogVisible = false
this.$emit('selectTable', this.selectItem.concat(selectEmp))
this.$refs.table.$refs.salelistMutiTable.clearSelection()
}, 300)
}
}
</script>
<style lang="scss" scoped>
.emp-form-btn {
margin-left: 20px;
}
.dialog-jump {
color: #5850ff;
float: left;
line-height: 24px;
text-decoration: underline;
cursor: pointer;
}
.square-main {
/deep/ {
.el-table {
height: 40vh;
overflow-y: auto;
}
.el-table::before {
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
}
}
</style>
...@@ -12,15 +12,16 @@ let cfg = require('./conf.js') ...@@ -12,15 +12,16 @@ let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function(isEnv = true) { export const fetchConfig = function(isEnv = true) {
// if (isEnv) { // if (isEnv) {
// let { request } = cfg // let { request } = cfg
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
// 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.dev.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
return new Http().get('https://oss-config.test.glsx.com.cn/mock/618a32851072f92988f05a17/drainage/config')
} }
export const config = { export const config = {
install(vue, cfg) {
vue.prototype.$config = cfg
}
}
\ No newline at end of file \ No newline at end of file
install(vue, cfg) {
vue.prototype.$config = cfg
}
}
...@@ -15,6 +15,6 @@ import { start } from '@/setup' ...@@ -15,6 +15,6 @@ import { start } from '@/setup'
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.prototype.$apis = apis Vue.prototype.$apis = apis
start() start()
export { bootstrap, mount, unmount }
from '@/setup'
export const http = params => Vue.prototype.$http(params)
\ No newline at end of file \ No newline at end of file
export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params)
export const http_common = params => Vue.prototype.$http_common(params)
const staticRoutes = Object.freeze([{ const staticRoutes = Object.freeze([
name: 'Home', {
path: '/home/index', name: 'Home',
meta: {}, path: '/home/index',
component: resolve => require([`@/views/home/index.vue`], resolve) meta: {},
} component: resolve => require([`@/views/home/index.vue`], resolve)
},
{
name: 'aiCard',
path: '/home/aiCard',
meta: {},
component: resolve => require([`@/views/home/aiCard.vue`], resolve)
}
]) ])
export default staticRoutes
\ No newline at end of file \ No newline at end of file
export default staticRoutes
...@@ -2,48 +2,52 @@ import Vue from 'vue' ...@@ -2,48 +2,52 @@ import Vue from 'vue'
// import { message } from '@/plugins/element.js' // import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLButton, GLTable, GLFull } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import GLEditor from 'glsx-components/src/packages/Editor'
import render from './render' import render from './render'
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
// import GLTable from '@/components/glsx-table/index' Vue.use(GLEditor)
// Vue.component('GLTable', GLTable) Vue.use(GLFull)
// import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable)
// import 'glsx-components/src/theme/theme.scss' // import 'glsx-components/src/theme/theme.scss'
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
import '@/assets/css/common.scss' import '@/assets/css/common.scss'
let routes = [] let routes = []
let router = null let router = null
let instance = null let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) { export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) {
const { response, request, sign, secret } = await fetchConfig() const { response, request, sign, secret, request_common, sign_common } = await fetchConfig()
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
const routesData = common.utils.deepClone(globalState.routers) const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData) routes = getRoutes(routesData)
subscribe({ messenger }) subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase }) Vue.use(GLButton, { routes, routerBase })
} }
export async function mount(props) { export async function mount(props) {
console.log('11111', props) console.log('11111', props)
const insts = render(props.routerBase, routes) const insts = render(props.routerBase, routes)
router = insts.router router = insts.router
instance = insts.vm instance = insts.vm
} }
export async function unmount() { export async function unmount() {
instance.$destroy() instance.$destroy()
instance.$el.innerHTML = '' instance.$el.innerHTML = ''
instance = null instance = null
router = null router = null
} }
function subscribe({ messenger }) { function subscribe({ messenger }) {
messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v)
})
}
\ No newline at end of file \ No newline at end of file
messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v)
})
}
...@@ -12,77 +12,22 @@ import Vue from 'vue' ...@@ -12,77 +12,22 @@ import Vue from 'vue'
import store from '@/store' import store from '@/store'
import { VueRouter } from '@/router' import { VueRouter } from '@/router'
const render = (base, routes) => { const render = (base, routes) => {
const router = new VueRouter({ const router = new VueRouter({
base, base,
routes, routes,
mode: 'history' mode: 'history',
}) scrollBehavior() {
router.beforeEach((to, from, next) => { return {
let modelStatus = false; x: 0,
let menuStatus = false; y: 0
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST']) }
menu.forEach(item => { }
if (!item.children) { })
return const vm = new Vue({
} router,
item.children.forEach(itm => { store,
if (itm.path == '/enterpriseWechat/index') { render: h => h(App)
menuStatus = true; }).$mount('#app')
} return { router, vm }
})
})
if (menuStatus && Vue.prototype.$globalState.session.merchantModel == 1 && Vue.prototype.$globalState.session.accountLevel == 1) {
modelStatus = true;
}
if (menuStatus && Vue.prototype.$globalState.session.merchantModel == 2 && Vue.prototype.$globalState.session.accountLevel == 4) {
modelStatus = true;
}
if (!sessionStorage.getItem('wxStatus') && (to.path == '/home/index' || to.path == '/ehome/index') && modelStatus) {
Vue.prototype.$apis.ww.getStatus({}).then((res) => {
if (res.status != 'SUCCESS') {
Vue.prototype.$history.push('/settings/enterpriseWechat/index')
sessionStorage.setItem('wxStatus', 1)
} else {
sessionStorage.setItem('wxAcess', 1)
next()
}
})
} else {
next();
}
})
// router.beforeEach((to, from, next) => {
// let modelStatus = false;
// let menu = JSON.parse(sessionStorage.getItem('SCRM_BASE_MENULIST'));
// let menuStatus = menu[0].children.find(item => {
// return item.path.indexOf('enterpriseWechat/index') != -1
// })
// if (menuStatus && Vue.prototype.$globalState.session.merchantModel == 1 && Vue.prototype.$globalState.session.accountLevel == 1) {
// modelStatus = true;
// }
// if (menuStatus && Vue.prototype.$globalState.session.merchantModel == 2 && Vue.prototype.$globalState.session.accountLevel == 4) {
// modelStatus = true;
// }
// if (!sessionStorage.getItem('wxStatus') && (to.path == '/home/index' || to.path == '/ehome/index') && modelStatus) {
// Vue.prototype.$apis.ww.getStatus({}).then((res) => {
// if (res.status != 'SUCCESS') {
// next('/enterpriseWechat/index')
// sessionStorage.setItem('wxStatus', 1)
// } else {
// sessionStorage.setItem('wxAcess', 1)
// next()
// }
// })
// } else {
// next();
// }
// })
const vm = new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
return { router, vm }
} }
export default render
\ No newline at end of file \ No newline at end of file
export default render
import { Message } from 'element-ui' import { Message } from 'element-ui'
let util = {} let util = {}
util.cloneText = function (message) { util.cloneText = function(message) {
let input = document.createElement('input') let input = document.createElement('input')
input.value = message input.value = message
document.body.appendChild(input) document.body.appendChild(input)
input.select() input.select()
input.setSelectionRange(0, input.value.length), document.execCommand('Copy') input.setSelectionRange(0, input.value.length), document.execCommand('Copy')
document.body.removeChild(input) document.body.removeChild(input)
Message.success('复制成功') Message.success('复制成功')
} }
util.getBeforeDate = function (sign = '-') { util.getBeforeDate = function(sign = '-') {
let day = new Date(); let day = new Date()
let month = day.getMonth() + 1; let month = day.getMonth() + 1
let date = day.getDate(); let date = day.getDate()
if (month < 10) month = '0' + month; if (month < 10) month = '0' + month
if (date < 10) date = '0' + date; if (date < 10) date = '0' + date
var s = day.getFullYear() + sign + month + sign + date; var s = day.getFullYear() + sign + month + sign + date
return s; return s
} }
util.getTimeFomat = function (time,sign = '-') { util.getTimeFomat = function(time, sign = '-') {
let day = new Date(time); let day = new Date(time)
let month = day.getMonth() + 1; let month = day.getMonth() + 1
let date = day.getDate(); let date = day.getDate()
let hour = day.getHours(); let hour = day.getHours()
let mm = day.getMinutes() let mm = day.getMinutes()
if (month < 10) month = '0' + month; if (month < 10) month = '0' + month
if (date < 10) date = '0' + date; if (date < 10) date = '0' + date
if (hour < 10) hour = '0' + hour; if (hour < 10) hour = '0' + hour
if (mm < 10) mm = '0' + mm; if (mm < 10) mm = '0' + mm
var s = day.getFullYear() + sign + month + sign + date + ' ' + hour + ':' + mm; var s = day.getFullYear() + sign + month + sign + date + ' ' + hour + ':' + mm
return s; return s
} }
util.getBetweenDate = function (day, num, str = '-') { util.getBetweenDate = function(day, num, str = '-') {
var today = new Date(day); var today = new Date(day)
var nowTime = today.getTime(); var nowTime = today.getTime()
var ms = 24 * 3600 * 1000 * (num - 1); var ms = 24 * 3600 * 1000 * (num - 1)
today.setTime(parseInt(nowTime - ms)); today.setTime(parseInt(nowTime - ms))
var oYear = today.getFullYear(); var oYear = today.getFullYear()
var oMoth = (today.getMonth() + 1).toString(); var oMoth = (today.getMonth() + 1).toString()
if (oMoth.length <= 1) oMoth = '0' + oMoth; if (oMoth.length <= 1) oMoth = '0' + oMoth
var oDay = today.getDate().toString(); var oDay = today.getDate().toString()
if (oDay.length <= 1) oDay = '0' + oDay; if (oDay.length <= 1) oDay = '0' + oDay
return oYear + str + oMoth + str + oDay; return oYear + str + oMoth + str + oDay
} }
util.getBeforeMonth = function (days) { util.getBeforeMonth = function(days) {
let month = new Date().getMonth() + 1; let month = new Date().getMonth() + 1
let year = new Date().getFullYear(); let year = new Date().getFullYear()
let arr = new Array(); let arr = new Array()
for (let i = 0; i < days; i++) { for (let i = 0; i < days; i++) {
if (month <= 0) { if (month <= 0) {
year = year - 1; year = year - 1
month = month + 12; month = month + 12
}
if (month < 10) month = '0' + month;
arr[i] = year + '年' + month + '月'
month--
} }
return arr; if (month < 10) month = '0' + month
arr[i] = year + '年' + month + '月'
month--
}
return arr
} }
util.getPrevMonth = function () { util.getPrevMonth = function() {
let month = new Date().getMonth(); let month = new Date().getMonth()
let year = new Date().getFullYear(); let year = new Date().getFullYear()
if(month == 0) { if (month == 0) {
year = year - 1 year = year - 1
month = 12 month = 12
} }
return year + '年' + month + '月'; return year + '年' + month + '月'
}
util.getCurrentMonthLast = function(date) {
var endDate = new Date(date)
var month = endDate.getMonth()
var nextMonth = ++month
var nextMonthFirstDay = new Date(endDate.getFullYear(), nextMonth, 1)
var oneDay = 1000 * 60 * 60 * 24
var dateString = new Date(nextMonthFirstDay - oneDay)
return dateString.toLocaleDateString().replace(new RegExp('/', 'g'), '-') //toLocaleDateString() 返回 如:2018/8/31
} }
util.getCurrentMonthLast = function (date) { util.openUrl = function(url) {
var endDate = new Date(date); const link = document.createElement('a')
var month = endDate.getMonth(); link.href = url
var nextMonth = ++month; link.click()
var nextMonthFirstDay = new Date(endDate.getFullYear(), nextMonth, 1);
var oneDay = 1000 * 60 * 60 * 24;
var dateString = new Date(nextMonthFirstDay - oneDay);
return dateString.toLocaleDateString().replace(new RegExp('/', 'g'), "-"); //toLocaleDateString() 返回 如:2018/8/31
} }
util.openUrl = function (url) { util.openTab = function(url) {
const link = document.createElement('a') const link = document.createElement('a')
link.href = url link.href = url
link.click() link.target = '_blank'
link.rel = 'opener'
link.click()
} }
export default util
\ No newline at end of file \ No newline at end of file
export default util
...@@ -21,13 +21,13 @@ ...@@ -21,13 +21,13 @@
</el-popover> </el-popover>
</div> </div>
<div class="summary-item-total"> <div class="summary-item-total">
<div > <div>
{{ totalNewCustomerCount }} {{ totalNewCustomerCount }}
<span>人</span> <span>人</span>
</div> </div>
<div class="summary-radio" :class="{ 'radio-green': totalCountDayToDayRadio > 0, 'radio-red': totalCountDayToDayRadio < 0 }"> <div class="summary-radio" :class="{ 'radio-green': totalCountDayToDayRadio > 0, 'radio-red': totalCountDayToDayRadio < 0 }">
日环比: 日环比:
<span>{{ totalCountDayToDayRadio | valueF}}</span> <span>{{ totalCountDayToDayRadio | valueF }}</span>
<i class="el-icon-caret-top" v-if="totalCountDayToDayRadio > 0"></i> <i class="el-icon-caret-top" v-if="totalCountDayToDayRadio > 0"></i>
<i class="el-icon-caret-bottom" v-if="totalCountDayToDayRadio < 0"></i> <i class="el-icon-caret-bottom" v-if="totalCountDayToDayRadio < 0"></i>
</div> </div>
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</div> </div>
<div class="summary-radio" :class="{ 'radio-green': entmicroCountDayToDayRadio > 0, 'radio-red': entmicroCountDayToDayRadio < 0 }"> <div class="summary-radio" :class="{ 'radio-green': entmicroCountDayToDayRadio > 0, 'radio-red': entmicroCountDayToDayRadio < 0 }">
日环比: 日环比:
<span>{{ entmicroCountDayToDayRadio | valueF}}</span> <span>{{ entmicroCountDayToDayRadio | valueF }}</span>
<i class="el-icon-caret-top" v-if="entmicroCountDayToDayRadio > 0"></i> <i class="el-icon-caret-top" v-if="entmicroCountDayToDayRadio > 0"></i>
<i class="el-icon-caret-bottom" v-if="entmicroCountDayToDayRadio < 0"></i> <i class="el-icon-caret-bottom" v-if="entmicroCountDayToDayRadio < 0"></i>
</div> </div>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</div> </div>
<div class="summary-radio" :class="{ 'radio-green': lostCountDayToDayRadio > 0, 'radio-red': lostCountDayToDayRadio < 0 }"> <div class="summary-radio" :class="{ 'radio-green': lostCountDayToDayRadio > 0, 'radio-red': lostCountDayToDayRadio < 0 }">
日环比: 日环比:
<span>{{ lostCountDayToDayRadio | valueF}}</span> <span>{{ lostCountDayToDayRadio | valueF }}</span>
<i class="el-icon-caret-top" v-if="lostCountDayToDayRadio > 0"></i> <i class="el-icon-caret-top" v-if="lostCountDayToDayRadio > 0"></i>
<i class="el-icon-caret-bottom" v-if="lostCountDayToDayRadio < 0"></i> <i class="el-icon-caret-bottom" v-if="lostCountDayToDayRadio < 0"></i>
</div> </div>
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
</div> </div>
<div class="summary-radio" :class="{ 'radio-green': dayRadio > 0, 'radio-red': dayRadio < 0 }"> <div class="summary-radio" :class="{ 'radio-green': dayRadio > 0, 'radio-red': dayRadio < 0 }">
日环比: 日环比:
<span>{{ dayRadio | valueF}}</span> <span>{{ dayRadio | valueF }}</span>
<i class="el-icon-caret-top" v-if="dayRadio > 0"></i> <i class="el-icon-caret-top" v-if="dayRadio > 0"></i>
<i class="el-icon-caret-bottom" v-if="dayRadio < 0"></i> <i class="el-icon-caret-bottom" v-if="dayRadio < 0"></i>
</div> </div>
...@@ -185,7 +185,6 @@ ...@@ -185,7 +185,6 @@
<custom-detail ref="customForm"></custom-detail> <custom-detail ref="customForm"></custom-detail>
</div> </div>
</template> </template>
<script> <script>
import customDetail from './detail/customDetail.vue' import customDetail from './detail/customDetail.vue'
import util from '@/utils/util' import util from '@/utils/util'
...@@ -251,11 +250,11 @@ export default { ...@@ -251,11 +250,11 @@ export default {
components: { components: {
customDetail customDetail
}, },
filters: { filters: {
valueF(val) { valueF(val) {
if(val == null) { if (val == null) {
return '--' return '--'
}else { } else {
return val + '%' return val + '%'
} }
} }
...@@ -520,7 +519,6 @@ export default { ...@@ -520,7 +519,6 @@ export default {
} }
} }
}, },
mounted() { mounted() {
this.getViewData() this.getViewData()
this.getChart() this.getChart()
...@@ -535,7 +533,6 @@ export default { ...@@ -535,7 +533,6 @@ export default {
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.summary-header { .summary-header {
display: flex; display: flex;
...@@ -576,7 +573,6 @@ export default { ...@@ -576,7 +573,6 @@ export default {
height: 172px; height: 172px;
padding: 0.5vw 1vw; padding: 0.5vw 1vw;
box-sizing: border-box; box-sizing: border-box;
margin-right: 20px; margin-right: 20px;
background: linear-gradient(360deg, #f7f7ff 0%, #f3f5f8 100%); background: linear-gradient(360deg, #f7f7ff 0%, #f3f5f8 100%);
&:last-of-type { &:last-of-type {
......
<template>
<div class="help-main">
<div class="help-tabel scrm-box-f">
<GLTable v-show="taskNum" @setTableFinishFun="setTableFinishFun" :noDataImg="url" ref="taskForm" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="handleDel(scope.scope)" :disabled="scope.scope.taskStatus == 2 || scope.scope.taskStatus == 3">删除</el-button>
<el-button type="text" @click="goDetail(scope.scope)" v-if="activeIndex == 2">数据详情</el-button>
</div>
<template slot="taskStatus" slot-scope="scope">
<div :class="['task_icon', `task_icon${scope.scope.taskStatus}`]">{{ taskStatus(scope.scope.taskStatus) }}</div>
</template>
<template slot="phoneCount" slot-scope="scope">
<div class="process-box" v-if="activeIndex == 1">
<div class="process-bar">
<div class="process-bar-item" :style="{ width: calcNum(scope.scope) }"></div>
</div>
<div class="process-val">{{ calcNum(scope.scope) }}</div>
</div>
<div class="process-box" v-if="activeIndex == 2">
<div class="process-bar">
<div class="process-bar-item" :style="{ width: '100%' }"></div>
</div>
<div class="process-val">{{ scope.scope.executedCount ? scope.scope.executedCount : 0 }}</div>
</div>
</template>
</GLTable>
<div class="tabel-null" v-show="taskNum == 0">
<div class="tabel-null-panel">
<div class="null-image"><img src="@/assets/img/empty.png" /></div>
<div class="null-desc">
暂无数据,
<label @click="$parent.handleAdd">添加数据</label>
</div>
</div>
</div>
</div>
<GLDialog title="提示" @onOk="handleDelSure" @onCancel="dialogVisibleDel = false" type="error" content="是否删除?" :visible.sync="dialogVisibleDel" mode="small"></GLDialog>
</div>
</template>
<script>
const TASK_STATUS = [
{
label: '待执行',
value: 1
},
{
label: '执行中',
value: 2
},
{
label: '执行中',
value: 3
},
{
label: '已完成',
value: 4
}
]
export default {
name: 'resultStatistics',
data() {
return {
isFirstEnter: false,
taskNum: 0,
dialogVisibleDel: false,
taskId: '',
tableSearchForm: {},
createTime: '',
dialogVisible: true,
getListApi: this.$apis.aiCard.taskPage,
tableParams: {
tableOption: false,
checkSelectKey: 'id',
checkSelectVal: [],
hasNum: false,
listName: 'data',
tableColumns: []
},
tableColumns1: [
{
label: '任务名称',
prop: 'taskName',
minWidth: 140,
line: 1
},
{
label: '状态',
prop: 'taskStatus',
minWidth: 140,
addHtml: 'taskStatus'
},
{
label: '进度',
prop: 'phoneCount',
minWidth: 200,
addHtml: 'phoneCount'
},
{
label: '创建时间',
prop: 'createdTime'
},
{
label: '操作',
prop: 'optionBtns',
width: '90px',
addHtml: 'optionBtns',
fixed: 'right'
}
],
tableColumns2: [
{
label: '任务名称',
prop: 'taskName',
minWidth: 140,
line: 1
},
{
label: '状态',
prop: 'taskStatus',
addHtml: 'taskStatus'
},
{
label: '执行总数',
prop: 'phoneCount',
width: 200,
addHtml: 'phoneCount'
},
{
label: '已通过申请',
prop: 'passCount',
width: 200,
line: 1
},
{
label: '不存在的手机号用户',
prop: 'unExistCount',
width: 200,
line: 1
},
{
label: '提交时间',
prop: 'submitTime',
width: 170
},
{
label: '操作',
prop: 'optionBtns',
width: '160px',
addHtml: 'optionBtns',
fixed: 'right'
}
],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: []
}
}
},
props: {
activeIndex: Number
},
activated() {
if (!this.isFirstEnter) {
this.handleSeach()
}
this.isFirstEnter = false
},
watch: {
activeIndex(val) {
if (val == 2) {
this.tableParams.tableColumns = this.tableColumns2
} else {
this.tableParams.tableColumns = this.tableColumns1
}
this.handleSeach()
}
},
created() {
this.isFirstEnter = true
this.tableParams.tableColumns = this.tableColumns1
},
methods: {
calcNum(val) {
let count = '0%'
if (val.phoneCount) {
count = (100 * val.executedCount) / val.phoneCount
count = (count > 100 ? 100 : Number.isInteger(count) ? count : count.toFixed(2)) + '%'
}
return count
},
taskStatus(status) {
return TASK_STATUS.find(item => item.value == status).label
},
//删除
handleDel(scope) {
this.taskId = scope.id
this.dialogVisibleDel = true
},
handleDelSure() {
const { taskId, activeIndex } = this
this.$apis.aiCard.taskDelete({ taskId, deleteType: activeIndex }).then(res => {
this.dialogVisibleDel = false
this.handleSeach()
})
},
handleSeach() {
this.$refs.taskForm.refreshTable()
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm.taskStatus = this.activeIndex == 1 ? 1 : 4
resolve()
})
},
setTableFinishFun(val) {
this.taskNum = val.length
this.$refs.taskForm.data.length ? (this.$refs.taskForm.tableHeightValues = '') : this.$refs.taskForm.setTableHeightFun()
},
goDetail(scope) {
this.$router.push('/home/taskDetail?id=' + scope.id)
}
}
}
</script>
<style lang="scss" scoped>
.scrm-box-f {
padding: 20px;
}
.tabel-null {
min-height: calc(100vh - 480px);
display: flex;
justify-content: center;
align-items: center;
&-panel {
.null-image {
margin: 5px auto;
width: 64px;
}
.null-desc {
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 22px;
label {
color: #5850ff;
cursor: pointer;
}
}
}
}
.process-box {
display: flex;
align-items: center;
width: 200px;
.process-bar {
margin-right: 6px;
}
.process-val {
width: 80px;
}
}
.process-bar {
width: 100%;
height: 6px;
background: #e7e7e7;
position: relative;
border-radius: 6px;
.process-bar-item {
position: absolute;
top: 0px;
border-radius: 6px;
left: 0px;
height: 6px;
background: #5850ff;
}
}
.task_icon {
position: relative;
&::after {
content: '';
position: absolute;
top: 4px;
left: -10px;
width: 6px;
height: 6px;
border-radius: 4px;
}
&.task_icon1 {
&::after {
background: #fdb757;
}
}
&.task_icon2 {
&::after {
background: #5850ff;
}
}
&.task_icon3 {
&::after {
background: #5850ff;
}
}
&.task_icon4 {
&::after {
background: #2cca74;
}
}
}
.select-panel {
display: flex;
margin-bottom: 10px;
justify-content: space-between;
align-items: center;
.help-tabel-name {
font-size: 16px;
color: #333333;
text-align: left;
line-height: 16px;
font-weight: 500;
}
.help-select-date {
display: flex;
align-items: center;
.select-date-input {
margin-right: 10px;
}
}
}
</style>
<template>
<div class="activity-main">
<el-drawer class="activity-drawer" size="50%" title="跟进员配置" :visible.sync="drawer" :before-close="handleClose" :append-to-body="true">
<div class="market-container">
<div v-if="title || $slots.title">
<slot name="title">{{ title }}</slot>
</div>
<div class="config-item">
<div class="market-title">
<label>*</label>
跟进专员:
</div>
<div class="market-content">
<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 class="config-item">
<div class="market-title">
<label>*</label>
配置欢迎语:
</div>
<div class="market-content" v-if="drawer">
<GLEditor ref="welcome" :btnList="btnList" @previewWord="previewForm"></GLEditor>
</div>
</div>
</div>
<div class="drawer-btn">
<el-button @click="drawer = false" size="small">
取消
</el-button>
<el-button type="primary" @click="handleSaveConfig" size="small">提交</el-button>
</div>
</el-drawer>
<select-emp @selectTable="selectTable" ref="selectEmpForm"></select-emp>
</div>
</template>
<script>
import selectEmp from '@/components/selectEmp'
export default {
name: 'marketConfig',
components: {
selectEmp
},
props: {
title: {
type: String,
default: ''
},
boxHeight: {
type: Number,
default: 200
}
},
data() {
return {
drawer: false,
staffInfo: [],
welcomeStatus: false,
btnList: [
{
name: '表情',
funcName: '',
type: 'expression',
limitSize: 10
},
{
name: '图片',
funcName: '',
type: 'img',
// togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
// limitSize: 10, //限制图片大小
// limitNum: 2, //限制图片数量
// limitWidth: 10000, //限制单张图片宽度
// limitHeight: 10000,//限制单张图片高度
// Isdraggable: true, //图片拖拽
uploadApi: this.$apis.common.pictureUpload
},
// {
// name: '视频',
// funcName: '',
// type: 'video',
// // limitSize: 10,//限制视频大小
// // togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
// // limitNum: 2,//限制视频数量
// // limitWidth: 10000,//限制视频宽度
// // limitHeight: 10000,//限制视频高度
// // limitTime: 2,//限制视频时长
// uploadApi: this.$apis.common.pictureUpload
// },
// {
// name: '昵称',
// type: 'nickname',
// funName: 'nickname'
// },
{
name: '活动',
type: 'activity',
funName: 'activity',
funParams: [
{
itemName: '权益卡试用',
itemValue: 3,
itemType: 'card',
getInterfaceApi: this.$apis.welcomeword.getCard,
params: {
tryAble: 1,
merchantId: this.$globalState.session.merchantId
}
},
{
itemName: '权益套餐',
itemValue: 4,
itemType: 'package',
getInterfaceApi: this.$apis.welcomeword.getPackage,
params: {}
},
{
itemName: '商城券',
itemValue: 2,
itemType: 'coupon',
getInterfaceApi: this.$apis.welcomeword.getMerchant,
params: {
discountTypes: [2, 3, 4],
directionalFlag: 1, // 1所有人可用2定向礼包专用3关联优惠券
validType: 'valid'
}
},
{
itemName: '秒杀活动',
itemValue: 5,
itemType: 'activity',
getInterfaceApi: this.$apis.welcomeword.getActivity,
params: {
activityStatus: 2,
currentPage: 1
}
},
{
itemName: '无忧服务',
itemValue: 6,
itemType: 'merchant',
getInterfaceApi: this.$apis.welcomeword.merchant,
merchantOpen: {
merchantOpenApi: this.$apis.welcomeword.merchantOpen,
params: {
merchantId: this.$globalState.session.merchantId
}
},
params: {
merchantId: this.$globalState.session.merchantId
}
}
]
},
{
name: '素材',
type: 'material',
funName: 'material',
groupListApi: this.$apis.welcomeword.getGroupListApi,
materialListApi: this.$apis.welcomeword.getMaterialListApi
// videoNo: true
// pdfNo: true
},
{
name: '模板',
type: 'message',
funName: 'message',
getSearchApi: this.$apis.welcomeword.createdNameList,
templateApi: this.$apis.welcomeword.templatePage,
templateUpdateApi: this.$apis.welcomeword.templateUpdate,
templateSaveApi: this.$apis.welcomeword.templateSave,
templateDetailApi: this.$apis.welcomeword.templateDetail
}
]
}
},
methods: {
handleAddEmp() {
this.staffStatus = false
this.$refs.selectEmpForm.init(this.staffInfo)
},
removeStaff(index) {
this.staffInfo.splice(index, 1)
},
selectTable(item) {
this.staffInfo = item.map(item => {
return {
staffId: item.id,
staffName: item.staffName
}
})
},
init(previewList, staff) {
const preview = this.$common.utils.deepClone(previewList)
this.drawer = true
this.$nextTick(() => {
preview.map(item => {
if (item.attType == 7) {
item.attContent = JSON.parse(item.attContent)
}
})
this.$refs.welcome.updateList(preview)
})
this.staffInfo = staff
},
handleSaveConfig() {
const param = {}
let staffId = []
this.staffInfo.forEach(item => {
staffId.push(item.staffId)
})
if (staffId.length == 0) {
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.welcomeInfo = attachmentList
this.$emit('handleConfigChecked', param)
this.drawer = false
}
}
}
</script>
<style lang="scss" scoped>
.activity-drawer {
/deep/ .el-drawer__header {
border-bottom: 1px solid #e6e6e6;
padding: 18px 20px;
margin-bottom: 20px;
}
}
.market-container {
padding: 0px 20px 20px;
height: calc(100% - 84px);
}
.input-tag-wrapper {
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;
max-height: 68px;
overflow: auto;
flex-wrap: wrap;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 450px;
display: flex;
align-items: center;
margin-top: 6px;
font-size: 14px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
.config-item {
display: flex;
margin: 15px;
.market-title {
width: 120px;
text-align: right;
font-size: 14px;
color: #333333;
text-align: right;
line-height: 20px;
font-weight: 400;
margin-right: 6px;
label {
color: #eb4e4e;
}
}
.market-content {
flex: 1;
}
}
.drawer-btn {
display: flex;
align-items: center;
justify-content: flex-end;
padding-right: 20px;
height: 64px;
border-top: 1px solid #e6e6e6;
}
</style>
<style>
/* .activity-drawer {
z-index: 3000 !important;
} */
</style>
<template>
<div class="help-main">
<el-drawer class="help-drawer" size="1080px" title="更换卡背景" :visible.sync="drawer" :before-close="handleClose">
<div class="market-container">
<div class="help-drawer-h4">预览</div>
<div class="drawer-overview">
<img :src="require(`@/assets/img/home/card${selectIndex}.png`)" alt="" />
</div>
<div class="help-drawer-h4">名片模板</div>
<div class="drawer-card">
<div @click="selectIndex = item" v-for="item in 4" :key="item" :class="{ 'card-item': true, 'card-checked': selectIndex == item }">
<img :src="require(`@/assets/img/home/card${item}.png`)" alt="" />
<i class="el-icon-success" v-if="selectIndex == item"></i>
</div>
</div>
</div>
<div class="drawer-btn">
<el-button @click="drawer = false" size="small">
取消
</el-button>
<el-button type="primary" @click="handleSaveConfig" size="small">提交</el-button>
</div>
</el-drawer>
</div>
</template>
<script>
export default {
name: 'marketConfig',
data() {
return {
selectIndex: 1,
drawer: false
}
},
methods: {
init(idx) {
this.selectIndex = idx
this.drawer = true
},
handleSaveConfig() {
this.drawer = false
this.$emit('cardConfigChecked', this.selectIndex)
}
}
}
</script>
<style lang="scss" scoped>
.help-drawer {
/deep/ .el-drawer__header {
border-bottom: 1px solid #e6e6e6;
padding: 18px 20px;
margin-bottom: 20px;
font-size: 20px;
}
.market-container {
padding: 20px;
height: calc(100vh - 164px);
overflow: auto;
.help-drawer-h4 {
font-size: 14px;
color: #666666;
line-height: 20px;
font-weight: 500;
margin-bottom: 10px;
}
.drawer-overview {
height: 304px;
width: auto;
margin-bottom: 20px;
img {
width: auto;
height: 100%;
}
}
.drawer-card {
display: flex;
.card-item {
cursor: pointer;
width: 224px;
height: 224px;
background: #ffffff;
border-radius: 8px;
border: 1px solid #e5e5e5;
margin-right: 24px;
padding: 16px;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
img {
width: 100%;
height: auto;
}
&.card-checked {
box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.1);
border: 1px solid #5850ff;
position: relative;
i {
position: absolute;
top: 6px;
right: 6px;
color: #5850ff;
font-size: 16px;
}
}
&:last-child {
margin-right: 0px;
}
}
}
}
.drawer-btn {
display: flex;
align-items: center;
justify-content: flex-end;
padding-right: 20px;
height: 64px;
border-top: 1px solid #e6e6e6;
}
}
</style>
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
</div> </div>
<div class="summary-radio" :class="{ 'radio-green': outputEchartData.boutiqueUpgradeDayRadio > 0, 'radio-red': outputEchartData.boutiqueUpgradeDayRadio < 0 }"> <div class="summary-radio" :class="{ 'radio-green': outputEchartData.boutiqueUpgradeDayRadio > 0, 'radio-red': outputEchartData.boutiqueUpgradeDayRadio < 0 }">
日环比: 日环比:
<span>{{ outputEchartData.boutiqueUpgradeDayRadio | valueF}}</span> <span>{{ outputEchartData.boutiqueUpgradeDayRadio | valueF }}</span>
<i class="el-icon-caret-top" v-if="outputEchartData.boutiqueUpgradeDayRadio > 0"></i> <i class="el-icon-caret-top" v-if="outputEchartData.boutiqueUpgradeDayRadio > 0"></i>
<i class="el-icon-caret-bottom" v-if="outputEchartData.boutiqueUpgradeDayRadio < 0"></i> <i class="el-icon-caret-bottom" v-if="outputEchartData.boutiqueUpgradeDayRadio < 0"></i>
</div> </div>
...@@ -174,9 +174,9 @@ export default { ...@@ -174,9 +174,9 @@ export default {
}, },
filters: { filters: {
valueF(val) { valueF(val) {
if(val == null) { if (val == null) {
return '--' return '--'
}else { } else {
return val + '%' return val + '%'
} }
} }
...@@ -424,7 +424,10 @@ export default { ...@@ -424,7 +424,10 @@ export default {
} }
@media screen and (max-width: 1560px) { @media screen and (max-width: 1560px) {
.summary-item-total { .summary-item-total {
font-size: 16px!important; font-size: 12px !important;
span {
font-size: 12px;
}
} }
} }
</style> </style>
...@@ -561,7 +561,10 @@ export default { ...@@ -561,7 +561,10 @@ export default {
} }
@media screen and (max-width: 1560px) { @media screen and (max-width: 1560px) {
.summary-item-total { .summary-item-total {
font-size: 16px!important; font-size: 12px !important;
span {
font-size: 12px !important;
}
} }
} }
</style> </style>
<template>
<div class="help-main">
<div class="help-tabel scrm-box-f">
<div class="help-tabel-form">
<GLCombiForm ref="formSearch" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="select-panel">
<div class="help-tabel-name">客户统计</div>
<div class="help-select-date">
<el-radio-group class="select-date-input" v-model="dateInterval" size="small" @change="handleSearch">
<el-radio-button label="1">今日</el-radio-button>
<el-radio-button label="2">本周</el-radio-button>
<el-radio-button label="3">本月</el-radio-button>
<el-radio-button label="4">今年</el-radio-button>
</el-radio-group>
<el-button type="primary" plain size="small" @click="handleImport">导出</el-button>
</div>
</div>
<GLTable @setTableFinishFun="setTableFinishFun" :noDataImg="url" ref="taskForm" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="goDetail(scope.scope)">客户详情</el-button>
</div>
</GLTable>
</div>
</div>
</div>
</template>
<script>
import util from '@/utils/util'
export default {
name: 'resultStatistics',
data() {
return {
dateInterval: 1,
value1: [],
tableSearchForm: {
customerName: '',
nickName: '',
customerPhone: '',
isFollow: '',
staffId: '',
followTime: '',
createTime: ''
},
searchFormData: [
{
label: '客户姓名',
name: 'customerName',
type: 'input',
placeholder: ''
},
{
label: '客户昵称',
name: 'nickName',
type: 'input',
placeholder: ''
},
{
label: '联系电话',
name: 'customerPhone',
type: 'input',
placeholder: ''
},
{
label: '发起日期',
name: 'createTime',
type: 'datePicker',
placeholder: '',
isClear: true,
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now()
}
}
},
{
label: '跟进日期',
name: 'followTime',
type: 'datePicker',
placeholder: '',
isClear: true,
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now()
}
}
},
{
type: 'select',
// prop: 'isJoin',
name: 'isFollow',
label: '是否跟进',
placeholder: '请选择',
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: null
},
{
label: '是',
value: 0
},
{
label: '否',
value: -1
}
]
},
{
type: 'select',
name: 'staffId',
// prop: 'staffId',
noFilter: false,
optionLabel: 'label',
optionId: 'value',
label: '跟进员工',
placeholder: '请输入跟进员工',
optionList: []
}
],
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now()
}
},
createTime: '',
dialogVisible: true,
getListApi: this.$apis.helpCard.listCustomer,
tableParams: {
tableOption: false,
checkSelectKey: 'id',
checkSelectVal: [],
hasNum: false,
listName: 'data',
tableColumns: [
{
label: '客户名称',
prop: 'customerName',
width: 300,
line: 1
},
{
label: '客户昵称',
prop: 'nickName',
width: 300,
formatter: cellValue => {
return cellValue.nickName ? cellValue.nickName + (cellValue.type == 1 ? '@微信' : cellValue.type == 2 ? '@企微' : '') : '--'
},
line: 1
},
{
label: '联系电话',
prop: 'customerPhone',
width: 200,
line: 1
},
{
label: '跟进员工',
prop: 'followStaff',
width: 120
},
{
label: '是否跟进',
prop: 'isFollow',
width: '100px',
formatter: cellValue => {
return cellValue.isFollow == 0 ? '是' : '否'
}
},
{
label: '跟进结果',
prop: 'followResult',
width: 150,
line: 1
},
{
label: '发起时间',
prop: 'applyTime',
width: '220px'
},
{
label: '跟进时间',
prop: 'followTime',
width: '220px'
},
{
label: '操作',
prop: 'optionBtns',
width: '90px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
baseData: {
allMerchantList: [],
roleList: [],
staffStatusList: []
}
}
},
mounted() {
this.getStaffList()
},
methods: {
handleImport() {
this.$apis.helpCard.listCustomerExport(this.getParams()).then(res => {
util.openUrl(res)
})
},
//获取跟进员工
getStaffList() {
this.$apis.helpCard.getStaffList({}).then(res => {
if (res.length == 0) {
return ''
}
const staff = res.map(item => {
return {
label: item.staffName,
value: item.id
}
})
staff.unshift({ label: '全部', value: null })
this.searchFormData.find(item => item.name == 'staffId').optionList = staff
})
},
handleSearch() {
this.$refs.taskForm.refreshTable()
},
handleReset() {
this.tableSearchForm = {}
this.$refs.taskForm.refreshTable()
},
getParams() {
if (this.tableSearchForm.createTime) {
this.tableSearchForm.beginTime = new Date(this.tableSearchForm.createTime[0]).toLocaleDateString().replace(/\//g, '-')
this.tableSearchForm.endTime = new Date(this.tableSearchForm.createTime[1]).toLocaleDateString().replace(/\//g, '-')
} else {
delete this.tableSearchForm.beginTime
delete this.tableSearchForm.endTime
}
if (this.tableSearchForm.followTime) {
this.tableSearchForm.followBeginTime = new Date(this.tableSearchForm.followTime[0]).toLocaleDateString().replace(/\//g, '-')
this.tableSearchForm.followEndTime = new Date(this.tableSearchForm.followTime[1]).toLocaleDateString().replace(/\//g, '-')
} else {
delete this.tableSearchForm.followBeginTime
delete this.tableSearchForm.followEndTime
}
this.tableSearchForm.dateInterval = this.dateInterval
delete this.tableSearchForm.createTime
delete this.tableSearchForm.followTime
return this.tableSearchForm
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
resolve()
})
},
setTableFinishFun() {
this.$refs.taskForm.data.length ? (this.$refs.taskForm.tableHeightValues = '') : this.$refs.taskForm.setTableHeightFun()
},
goDetail(scope) {
util.openTab(location.origin + '/custom/clientManage/clientDetail?id=' + scope.oneId)
}
}
}
</script>
<style lang="scss" scoped>
.scrm-box-f {
padding: 20px;
}
.select-panel {
display: flex;
margin-bottom: 10px;
justify-content: space-between;
align-items: center;
.help-tabel-name {
font-size: 16px;
color: #333333;
text-align: left;
line-height: 16px;
font-weight: 500;
}
.help-select-date {
display: flex;
align-items: center;
.select-date-input {
margin-right: 10px;
/deep/ {
.el-radio-button:focus:not(.is-focus):not(:active):not(.is-disabled) {
box-shadow: none;
}
}
}
}
}
</style>
<template>
<div class="help-main">
<div class="help-main-header">
<div class="help-main-title">
道路救援卡配置
<el-popover placement="top" width="340" trigger="hover" content="配置道路救援卡中显示的联系号码及员工企微">
<img src="@/assets/img/question.png" slot="reference" class="count-item-question" />
</el-popover>
</div>
<div class="help-main-view"><el-button type="primary" size="small" @click="$refs.imageForm.clickHandler()">预览</el-button></div>
</div>
<el-tabs v-model="activeName">
<el-tab-pane label="配置救援码" name="first"></el-tab-pane>
<el-tab-pane label="效果统计" name="second"></el-tab-pane>
</el-tabs>
<component :is="activeName == 'first' ? 'card-config' : 'result-statistics'" ref="configForm"></component>
<el-image class="preview-panel" style="width: 100px; height: 0px" ref="imageForm" :src="url" :preview-src-list="srcList"></el-image>
</div>
</template>
<script>
import cardConfig from './components/cardConfig'
import resultStatistics from './components/resultStatistics'
import url from '@/assets/img/home/preview.png'
export default {
name: 'helpCard',
components: {
cardConfig,
resultStatistics
},
data() {
return {
url,
srcList: [url],
activeName: 'first'
}
},
methods: {}
}
</script>
<style lang="scss" scoped>
.help-main-header {
display: flex;
justify-content: space-between;
.help-main-title {
font-size: 20px;
color: #333333;
font-weight: 500;
img {
width: 16px;
height: 16px;
}
}
}
.preview-panel {
/deep/ {
.el-image-viewer__img {
width: 320px;
height: 624px;
}
.el-icon-circle-close {
color: #fff;
}
}
}
</style>
<template>
<div class="scrm-main">
<div class="main-panel" :class="{ 'main-isScroll': guideStatus }">
<div class="main-left">
<div class="summary-panel-time">
<div class="summary-time">
<span>统计截止至</span>
<el-date-picker size="small" value-format="yyyy-MM-dd" v-model="summaryTime" type="date" placeholder="选择日期" :clearable="false" :picker-options="pickerOptions"></el-date-picker>
</div>
</div>
<div class="summary-panel">
<div class="home-statistics-title">
客户概览
<span class="home-title-radio">企微客户占比</span>
<span class="home-title-radio" style="color: #5850ff">{{ entmicroCountRadio }}%</span>
</div>
<!-- <div class="summary-time">
<span>统计截止至 </span>
<el-date-picker size="small" value-format="yyyy-MM-dd" v-model="summaryTime" type="date" placeholder="选择日期" :clearable="false" :picker-options="pickerOptions"></el-date-picker>
</div> -->
</div>
<overview-enterprise :summaryTime="summaryTime" @getEntmicroRadio="getEntmicroRadio"></overview-enterprise>
<div class="home-statistics-title">产值概览</div>
<customer-echart :summaryTimeFomat="summaryTime"></customer-echart>
<div class="home-overview-content"></div>
<div class="home-statistics-title">权益服务</div>
<accurate-marketing :summaryTimeFomat="summaryTime"></accurate-marketing>
<div class="home-statistics-title">精选营销工具</div>
<marketing-tools></marketing-tools>
</div>
<!-- <el-popover placement="left" width="240" trigger="hover">
<div class="qrcode-img">
<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/lianghh.png">
</div>
<div class="main-contact-panel" slot="reference">
<div class="contact-icon"><i class="el-icon-chat-dot-square"></i></div>
<div class="contact-desc">联系我们</div>
</div>
</el-popover> -->
</div>
</div>
</template>
<script>
import util from '@/utils/util'
import overviewEnterprise from './components/overview-enterprise'
import customerEchart from './components/customer-echart'
import marketingTools from './components/marketing-tools'
import accurateMarketing from './components/accurate-marketing'
export default {
name: 'home',
components: {
overviewEnterprise,
customerEchart,
marketingTools,
accurateMarketing
},
data() {
return {
summaryTime: util.getBeforeDate(),
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now()
}
},
entmicroCountRadio: 0,
guideStatus: false,
step: 1,
headHeight: 0,
headWidth: 0,
guideWidth: '',
guideHeight: '',
guideLeft: 0,
guideTop: 0,
guideRight: 0,
imgHeight: 0,
imgWidth: 0
}
},
methods: {
jumpSqure() {
this.$history.push('/drainage/square/index')
},
getEntmicroRadio(value) {
this.entmicroCountRadio = value
}
},
mounted() {}
}
</script>
<style lang="scss" scoped>
.box-fixed {
position: fixed;
width: 100%;
height: 100%;
left: 0px;
top: 0px;
background: rgba(0, 0, 0, 0.1);
}
.header-panel {
width: 100%;
position: relative;
.jump-mf-btn {
position: absolute;
background: #f4c647;
border-radius: 4px;
padding: 6px 9px;
font-size: 10px;
font-weight: 500;
color: #ffffff;
line-height: 12px;
cursor: pointer;
bottom: 8px;
left: 73.5% !important;
}
> img {
width: 100%;
height: 100%;
}
}
.main-isScroll {
position: absolute;
overflow-y: hidden;
height: 100%;
padding: 0px 20px 20px 40px;
box-sizing: border-box;
width: 100%;
top: 0px;
left: 0px;
}
.main-panel {
width: 100%;
}
.summary-panel-time {
text-align: right;
/deep/ {
.el-date-editor.el-input,
.el-date-editor.el-input__inner {
width: 130px;
}
}
}
.summary-panel {
display: flex;
justify-content: space-between;
align-items: center;
.home-statistics-title {
margin-top: 0px;
}
/deep/ .el-date-editor.el-input,
.el-date-editor.el-input__inner {
width: 100px;
line-height: 32px;
height: 32px;
}
}
.home-statistics-title {
font-size: 20px;
font-weight: 600;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
margin-bottom: 20px;
margin-top: 20px;
.home-title-radio {
font-size: 14px;
font-weight: 400;
color: #333333;
}
}
.operational-panel-s {
margin-top: 20px;
}
.main-left {
width: 100%;
// flex: 1;
// margin-right: 20px;
}
.main-right {
// width: 230px;
// display: none;
}
.h-overview-content {
border: 1px solid #000000;
margin-top: 10px;
padding: 10px;
}
.enterprise-statistics {
display: flex;
justify-content: space-between;
}
.statistics-time {
span {
margin-right: 6px;
}
}
.guide-panel {
.guide-btn {
cursor: pointer;
z-index: 1000;
position: absolute;
background: #5850ff;
border-radius: 4px;
padding: 12px 20px;
color: #ffffff;
display: inline-block;
}
.guide-box {
position: relative;
width: 100%;
height: 100%;
}
.guide-box-highlight {
position: fixed;
outline: 5000px solid rgba(0, 0, 0, 0.75);
border: 2px solid #ffffff;
border-radius: 4px;
&.border-b {
border-color: #5850ff;
}
}
.guide-step-1 {
z-index: 999;
height: auto;
position: absolute;
top: 10px;
left: 10px;
}
.guide-step-2 {
z-index: 999;
width: auto;
position: absolute;
top: 10px;
}
.guide-step-3 {
z-index: 999;
height: auto;
position: absolute;
}
}
.qrcode-img {
width: 200px;
height: 200px;
}
.main-contact-panel {
cursor: pointer;
position: fixed;
bottom: 100px;
right: 25px;
width: 52px;
height: 142px;
background: #5850ff;
box-shadow: 0px 3px 6px -4px rgba(0, 0, 0, 0.12), 0px 6px 16px 0px rgba(0, 0, 0, 0.08), 0px 9px 28px 8px rgba(0, 0, 0, 0.05);
border-radius: 4px;
text-align: center;
padding: 16px 0px;
box-sizing: border-box;
.contact-desc {
font-size: 14px;
font-weight: 400;
color: #ffffff;
line-height: 20px;
margin: 0 auto;
width: 20px;
}
.contact-icon {
margin-bottom: 6px;
font-size: 20px;
font-weight: 400;
color: #ffffff;
line-height: 20px;
}
}
</style>
<!-- -->
<template>
<div class="container-detail">
<div class="ai-main-header">
<div class="ai-main-title">
离店客户加企微
</div>
<div class="ai-main-desc">系统将通过AI机器人,使用门店的福利官企微号自动添加客户,并自动发放客户福利权益。</div>
</div>
<div class="outbound-info">
<div class="outbound-info-title flex">
离店客户加好友概览
</div>
<div class="outbound-info-wrap">
<div class="general">
<div class="general-item" v-for="(item, index) in statisticsList" :key="index">
<div class="general-item-icon">
<img :src="item.logo" />
</div>
<div>
<div class="general-item-title">{{ item.describe }}</div>
<div class="general-item-num">
{{ item.value(detailData) }}
<span class="font-14;color3;m-l-4">人</span>
</div>
</div>
</div>
</div>
<div class="chart" id="lineRef"></div>
<GLCombiForm :rowNumber="1" class="searchForm" ref="detailsSearch" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable ref="detailsTable" :searchForm="searchForm" :pageConf="pageConf" :tableParams="tableParams" :getListApi="getListApi">
<template slot="phoneStatus" slot-scope="scope">
<div :class="['task_icon', `task_icon${scope.scope.phoneStatus}`]">{{ taskStatus(scope.scope.phoneStatus) }}</div>
</template>
</GLTable>
</div>
</div>
</div>
</template>
<script>
const TASK_STATUS = [
{
label: '该用户不存在',
value: 1
},
{
label: '待发送好友申请',
value: 2
},
{
label: '已发送申请',
value: 3
},
{
label: '申请通过',
value: 4
}
]
import * as echarts from 'echarts'
export default {
data() {
return {
id: this.$route.query.id ? this.$route.query.id : '',
getListApi: this.$apis.aiCard.phoneStatusPage,
detailData: {},
myChart: null,
searchForm: {
phone: '',
status: '',
id: this.$route.query.id ? this.$route.query.id : ''
},
outboundParams: [
{
label: '任务名称',
prop: 'taskName',
span: 12
},
{
label: '选择话术机器人:',
prop: 'robotName',
span: 12
},
{
label: '外呼主叫号码:',
prop: 'callerNums',
span: 12
},
{
label: '外呼时间:',
addHtml: 'dialTime',
span: 12
},
{
label: '重播设置:',
addHtml: 'retryTimes',
span: 12
},
{
label: '号码过滤:',
prop: 'numTypeFilterList',
span: 12
}
],
searchFormData: [
{
label: '手机号',
name: 'phone',
type: 'input'
}
],
statisticsList: [
{
logo: require('../../assets/img/ai/customer.png'),
describe: '客户总数',
value: obj => {
return obj.phoneCount ? obj.phoneCount : 0
}
},
{
logo: require('../../assets/img/ai/apply.png'),
describe: '通过申请',
value: obj => {
return obj.passNums ? obj.passNums : 0
}
},
{
logo: require('../../assets/img/ai/user.png'),
describe: '不存在的手机号用户',
value: obj => {
return obj.noneUserNums ? obj.noneUserNums : 0
}
}
],
// 表格参数
tableParams: {
listName: 'data',
tableColumns: [
{
label: '手机号',
prop: 'phone'
},
{
label: '状态',
prop: 'phoneStatus',
addHtml: 'phoneStatus'
}
]
},
pageConf: {
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'count'
}
}
},
mounted() {
this.taskbaseDetails()
let chartDom = document.getElementById('lineRef')
this.myChart = echarts.init(chartDom)
window.addEventListener('resize', () => {
this.myChart.resize()
})
},
methods: {
taskStatus(status) {
const val = TASK_STATUS.find(item => item.value == status)
return val ? val.label : '--'
},
taskbaseDetails() {
let params = {
id: this.id
}
this.$apis.aiCard.taskDetail(params).then(res => {
if (res) {
this.detailData = res
this.initCanvas(this.detailData.phoneStatusDailyCharts)
}
})
},
handleSearch() {
this.$refs.detailsTable.refreshTable()
},
handleReset() {
this.searchForm = {
phone: '',
status: '',
id: this.$route.query.id ? this.$route.query.id : ''
}
this.handleSearch()
},
initCanvas(lineValue) {
const x_data = lineValue && lineValue.length ? lineValue.map(item => item.dailyDate) : []
const y_data = lineValue && lineValue.length ? lineValue.map(item => item.passedCounts) : []
console.log(x_data, y_data)
this.option = {
tooltip: {
show: true,
axisPointer: {
// type: 'cross'
}
},
grid: {
right: '90x',
left: '90px'
},
minInterval: 1,
xAxis: {
type: 'category',
data: x_data
},
yAxis: {
type: 'value'
},
series: [
{
// symbol: 'none',
data: y_data,
type: 'line',
smooth: true,
areaStyle: {
color: 'rgba(88,80,255, 0.15)'
}
}
]
}
this.myChart.clear()
this.myChart.setOption(this.option)
},
btnClick() {}
}
}
</script>
<style scoped lang="scss">
.task_icon {
position: relative;
&::after {
content: '';
position: absolute;
top: 4px;
left: -10px;
width: 6px;
height: 6px;
border-radius: 4px;
}
&.task_icon1 {
&::after {
background: #999999;
}
}
&.task_icon2 {
&::after {
background: #fdb757;
}
}
&.task_icon3 {
&::after {
background: #5850ff;
}
}
&.task_icon4 {
&::after {
background: #2cca74;
}
}
}
.container-detail {
padding: 20px 0;
overflow-y: scroll;
height: 100%;
.ai-main-header {
background: #fff;
padding: 16px 20px;
margin-bottom: 16px;
.ai-main-title {
font-size: 20px;
color: #333333;
font-weight: 600;
}
.ai-main-desc {
margin-top: 10px;
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 22px;
}
}
.outbound-info {
width: 100%;
height: auto;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
margin-bottom: 10px;
&-title {
line-height: 28px;
font-size: 16px;
font-weight: 600;
color: #333333;
padding: 15px 0 15px 20px;
border-bottom: 1px solid #e5e5e5;
}
.glsx-rows-wrap {
padding: 32px 76px;
}
&-wrap {
padding: 20px 16px;
box-sizing: border-box;
background: #ffffff;
.general {
display: flex;
align-items: center;
margin: 0 40px 20px 40px;
.general-item {
width: 274px;
height: 100px;
background: #f9fafc;
border-radius: 4px;
padding: 20px 16px;
display: flex;
box-sizing: border-box;
margin-right: 16px;
&-icon {
width: 48px;
height: 48px;
margin-right: 16px;
img {
width: 100%;
}
}
&-title {
font-size: 14px;
color: #333333;
line-height: 20px;
margin-bottom: 10px;
}
&-num {
font-size: 26px;
font-weight: bold;
color: #333;
line-height: 31px;
}
}
}
.chart {
height: 320px;
}
}
}
.m-b-7 {
margin-bottom: 70px;
}
.footer-btn {
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
background-color: #fff;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!