Commit 33f0f17f by yangming

new

1 parent 7e03ef30
Showing 48 changed files with 6843 additions and 806 deletions
import Vue from 'vue'
// import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import ElementUI from 'element-ui'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import render from './render'
Vue.use(ElementUI)
Vue.use(GLTable)
// import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable)
import 'glsx-components/src/theme/theme.scss'
import '@/assets/css/common.scss'
let routes = []
let router = null
let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) {
const { response, request, sign, secret } = await fetchConfig()
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
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.$setGlobalState = globalState.actions.setGlobalState
const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData)
subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase })
}
export async function mount(props) {
console.log('11111', props)
const insts = render(props.routerBase, routes)
router = insts.router
instance = insts.vm
}
export async function unmount() {
instance.$destroy()
instance.$el.innerHTML = ''
instance = null
router = null
}
function subscribe({ messenger }) {
messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v)
})
}
\ No newline at end of file
import Vue from 'vue'
// import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import ElementUI from 'element-ui'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import render from './render'
Vue.use(ElementUI)
Vue.use(GLTable)
// import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable)
// import 'glsx-components/src/theme/theme.scss'
import 'glsx-components/dist/glsx-components.css'
import '@/assets/css/common.scss'
let routes = []
let router = null
let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) {
const { response, request, sign, secret } = await fetchConfig()
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
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.$setGlobalState = globalState.actions.setGlobalState
const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData)
subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase })
}
export async function mount(props) {
console.log('11111', props)
const insts = render(props.routerBase, routes)
router = insts.router
instance = insts.vm
}
export async function unmount() {
instance.$destroy()
instance.$el.innerHTML = ''
instance = null
router = null
}
function subscribe({ messenger }) {
messenger.subscribe(v => {
console.log(`监听到子应用${v.from}发来消息:`, v)
})
}
\ No newline at end of file
<template>
<div class="scrm-main">
<div class="enterprise-panel" v-loading="loading">
<div class="enterprise-title">
企业自建应用接入流程
<span>(适合没有自己技术团队的企业,接入即可使用全部功能)</span>
</div>
<div
class="step-panel"
:style="{
'min-height': boxHeight + 'px'
}"
>
<div class="step-right scrm-box-f">
<div class="enterprise-step-box">
<div class="el-steps el-steps--horizontal">
<div class="el-step is-horizontal" style="flex-basis: 50%; margin-right: 0px">
<div class="el-step__head" :class="{ 'is-finish': active == 1 }">
<div class="el-step__line" style="margin-right: 0px">
<i class="el-step__line-inner" style="transition-delay: 0ms; border-width: 0px; width: 0%"></i>
</div>
<div class="el-step__icon is-text">
<div class="el-step__icon-inner">1</div>
</div>
<div class="el-step__main el-step__desc">
<div class="el-step__title" :class="{ 'is-finish': active == 1 }">第一步</div>
<div class="el-step__description" :class="{ 'is-finish': active == 1 }">管理员授权绑定企业</div>
</div>
</div>
</div>
<div class="el-step is-horizontal" style="flex-basis: 50%; margin-right: 0px">
<div class="el-step__head" :class="{ 'is-finish': active == 2 }">
<div class="el-step__line" style="margin-right: 0px">
<i class="el-step__line-inner" style="transition-delay: -150ms; border-width: 0px; width: 0%"></i>
</div>
<div class="el-step__icon is-text">
<!---->
<div class="el-step__icon-inner">2</div>
</div>
<div class="el-step__main el-step__desc">
<div class="el-step__title" :class="{ 'is-finish': active == 2 }">第二步</div>
<div class="el-step__description" :class="{ 'is-finish': active == 2 }">管理员授权配置</div>
</div>
</div>
</div>
<div class="el-step is-horizontal is-flex" style="flex-basis: 50%; max-width: 33.3333%">
<div class="el-step__head" :class="{ 'is-finish': active == 3 }">
<div class="el-step__line"><i class="el-step__line-inner"></i></div>
<div class="el-step__icon is-text">
<!---->
<div class="el-step__icon-inner">3</div>
</div>
<div class="el-step__main el-step__desc">
<div class="el-step__title" :class="{ 'is-finish': active == 3 }">第三步</div>
<div class="el-step__description" :class="{ 'is-finish': active == 3 }">配置完成</div>
</div>
</div>
</div>
</div>
<div
class="config-box"
v-if="active == 1"
:style="{
'min-height': boxHeight - 140 + 'px'
}"
>
<div>
<div class="config-box-h1">初次使用客户,需要企业微信超级管理员授权绑定企业,具体如下:</div>
<div class="config-box-h2">
未注册企业微信的用户,请先前往企业微信的官网进行注册。
<a @click="jumpUrl('https://work.weixin.qq.com/wework_admin/loginpage_wx?from=myhome')">
企业微信官网
<i class="el-icon-d-arrow-right"></i>
</a>
</div>
<div class="config-box-h3">1.企业微信超级管理员扫码授权接入嘀加企微管家</div>
<div class="config-box-qrcode" style="width: 50%" v-if="qrcodeUrl">
<div class="config-use-qrcode">
<img :src="qrcodeUrl" />
<div class="qrcode-refresh" v-if="checkStatus != 'never'">
<div class="qrcode-status" v-if="checkStatus == 'succ'">
<i class="el-icon-circle-check"></i>
<div>完成</div>
</div>
<div class="qrcode-status qrcode-status-ing" v-if="checkStatus == 'ing'">
<i class="el-icon-loading"></i>
</div>
<div class="qrcode-status" v-if="checkStatus == 'expired'" @click="handleRefresh">
<i class="el-icon-refresh"></i>
<div>刷新</div>
</div>
</div>
</div>
<div class="config-use-desc">请联系超级管理员用企业微信扫码接入</div>
</div>
<div class="config-box-qrcode" style="width: 50%" v-else>
<div class="config-use-qrcode">
<img src="@/assets/img/qrcode.png" />
<div class="qrcode-refresh">
<div class="qrcode-status">
<i class="el-icon-circle-check"></i>
<div>完成</div>
</div>
</div>
</div>
</div>
<div class="config-form-panel" v-if="applicationList && applicationList.length > 0">
<div>
<div class="config-box-h3 text-bettwn" style="margin-bottom: 20px">
<span>2.填写嘀加企微管家门店秘钥secret</span>
<div class="config-box-link">
<span @click="jumpUrl('http://qcimg01.glsx.net/upload/temporary/illustrate.html')">
查看如何获取
<i class="el-icon-d-arrow-right"></i>
</span>
</div>
</div>
<div class="config-box-form">
<div class="config-box-input" v-for="(item, index) in applicationList" :key="index">
<label v-if="item.appCode == 'DJQWGJ'">*Secret:</label>
<label v-if="item.appCode == 'WBLXR'">*客户联系Secret:</label>
<label v-if="item.appCode == 'TXLTBZS'">*通讯录Secret:</label>
<input type="text" :readonly="toStatus" v-model="item.appSecret" class="config-item-input" />
</div>
</div>
</div>
<div class="config-box-qrcode">
<div class="config-box-h3">如未成功,请加我微信帮您接入</div>
<div class="config-use-qrcode">
<img src="@/assets/img/qrcode.png" alt="" />
</div>
<div class="config-use-desc">联系电话:18824231191</div>
</div>
</div>
</div>
</div>
<div
class="config-box config-box-second"
v-if="active == 2"
:style="{
'min-height': boxHeight - 160 + 'px'
}"
>
<div>
<div class="config-box-h1">如若完整使用本系统,还需要企业微信超级管理员完成以下授权配置。</div>
<div class="config-form-panel">
<div>
<div class="config-box-h3 text-bettwn">
<span>通讯录接收事件服务配置</span>
<span class="config-box-link" @click="jumpUrl('http://qcimg01.glsx.net/upload/temporary/illustration.html')">
查看如何配置
<i class="el-icon-d-arrow-right"></i>
</span>
</div>
<div class="config-box-form">
<div class="config-box-input">
<label>*URL:</label>
<input type="text" readonly v-model="callbackUrl" class="config-item-input" />
<span @click="cloneText(callbackUrl)">
复制
<img src="@/assets/img/enterprise/clone.png" />
</span>
</div>
<div class="config-box-input">
<label>*Token:</label>
<input type="text" readonly v-model="token" class="config-item-input" />
<span @click="cloneText(token)">
复制
<img src="@/assets/img/enterprise/clone.png" />
</span>
</div>
<div class="config-box-input">
<label>*EncodingAESKey:</label>
<input type="text" readonly v-model="encodingAesKey" class="config-item-input" />
<span @click="cloneText(encodingAesKey)">
复制
<img src="@/assets/img/enterprise/clone.png" />
</span>
</div>
<div class="config-box-link step-link">
<span>
</span>
<el-button type="primary" size="mini" class="step-jump" @click="jumpUrl('https://work.weixin.qq.com/wework_admin/loginpage_wx?from=myhome')">打开企业微信</el-button>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class="config-box config-box-third"
v-if="active == 3"
:style="{
'min-height': boxHeight - 110 + 'px'
}"
>
<div>
<div class="config-box-h1"></div>
<div class="config-box-qrcode config-qrcode-finish">
<div class="config-finish">
<img src="@/assets/img/enterprise/config.png" />
</div>
</div>
<div class="config-box-h4" v-if="$globalState.session.merchantModel == 2">进入首页即可开始您的营销获客之旅。</div>
<div class="config-box-h4" v-if="$globalState.session.merchantModel == 1">配置完成后,您需先创建您的门店,门店关联企微后,方可使用</div>
<div style="margin-top: 15px">
<div class="step-jump-home" @click="jumpHome" v-if="$globalState.session.merchantModel == 2">
前往首页
<i class="el-icon-d-arrow-right"></i>
</div>
<div class="step-jump-home" @click="jumpStore" v-if="$globalState.session.merchantModel == 1">
去创建门店
<i class="el-icon-d-arrow-right"></i>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<el-button type="primary" v-show="active == 2" @click="handlePrev">上一步</el-button>
<el-button type="primary" v-show="active == 3" @click="handlePrev">返回上一步</el-button>
<el-button type="primary" v-show="active == 1 && statusQrcode != 'SUCCESS' && statusQrcode != 'SERVER_CHECK'" @click="handleNext">确定</el-button>
<el-button type="primary" v-show="active == 1 && (statusQrcode == 'SUCCESS' || statusQrcode == 'SERVER_CHECK')" @click="handleNext">下一步</el-button>
<el-button type="primary" v-show="active == 2 && statusQrcode != 'SUCCESS'" @click="handleNext">确定</el-button>
<el-button type="primary" v-show="active == 2 && statusQrcode == 'SUCCESS'" @click="handleNext">下一步</el-button>
</div>
</div>
<div class="enterprise-dialog" v-show="dialogStatus">
<div class="enterprise-dialog-warpper">
<div class="dialog-close-btn" @click="dialogStatus = false">{{ dialogTime }}s</div>
<div class="enterprise-warpper-logo">
<img src="@/assets/img/enterprise/wechat.png" />
<span>></span>
<span>></span>
<img src="@/assets/img/enterprise/dj.png" />
</div>
<div class="enterprise-warpper-desc">使用嘀加SCRM系统,需先接入企业微信,成功接入后系统后台功能方可使用!</div>
<div class="dialog-footer">
<el-button type="primary" @click="dialogStatus = false">立即接入</el-button>
</div>
</div>
</div>
</div>
</template>
<script>
import util from '@/utils/util'
export default {
name: 'index',
data() {
return {
loading: false,
boxHeight: 0,
toStatus: false,
token: '',
callbackUrl: '',
encodingAesKey: '',
checkStatus: 'never',
entryStatus: true,
qrcodeUrl: '',
dialogTime: 5,
active: 0,
dialogStatus: false,
Secret: '',
SecretContact: '',
SecretCode: '',
timer: null,
timerQrcode: null,
statusQrcode: '',
URL: '',
nextStatus: false,
Token: '',
Secret_1: '',
Secret_2: '',
Secret_3: '',
applicationList: [],
checkResult: 0
}
},
watch: {
active(val) {
if (val == 3) {
this.toStatus = true
}
}
},
methods: {
jumpUrl(url) {
window.open(url)
},
jumpHome() {
this.$router.push('/home/index?id=2')
},
jumpStore() {
this.$history.push('/settings/account/index')
},
handleGetSecret() {
for (let i in this.applicationList) {
if (this.applicationList[i].appSecret === '' || this.applicationList[i].appSecret === null) {
this.$message({
message: '请填写Secret',
type: 'error'
})
return
}
}
if (this.checkStatus != 'succ' && this.qrcodeUrl) {
this.$message({
message: '请联系超级管理员用企业微信扫码接入',
type: 'error'
})
return
}
let params = {
apps: this.applicationList
}
this.$apis.ww.getSecret(params).then(res => {
if (res) {
this.statusQrcode == 'SUCCESS' ? (this.active = 3) : (this.active = 2)
}
})
},
cloneText(msg) {
util.cloneText(msg)
this.$message({
message: '复制成功',
type: 'success'
})
},
handleNext() {
if (this.active == 1) {
if (this.statusQrcode == 'SUCCESS') {
this.nextStatus ? (this.active = 2) : (this.active = 3)
} else {
this.handleGetSecret()
}
return
}
if (this.active == 2) {
if (this.statusQrcode == 'SUCCESS') {
this.active++
} else {
this.getStatus()
// this.$message({
// message: "消息服务器未验证",
// type: "warning",
// });
}
}
},
handlePrev() {
if (this.active == 3) {
this.nextStatus = true
}
this.active--
},
closeDalog() {
this.dialogTime--
if (this.dialogTime == 0) {
this.dialogStatus = false
clearInterval(this.timer)
}
},
//检测二维码
getCheckStatus() {
this.$apis.ww
.getCheckStatus({
status: this.checkStatus
})
.then(res => {
if (res) {
if (res.status == 'succ') {
clearInterval(this.timerQrcode)
this.getReportStatus('succ')
this.getAccess()
return
} else if (res.status == 'ing') {
this.getReportStatus('scan')
} else {
this.getReportStatus('new')
}
this.checkStatus = res.status
} else {
this.checkStatus = 'expired'
this.getReportStatus('expired')
clearInterval(this.timerQrcode)
}
})
},
//获取二维码
getQrcode() {
this.$apis.ww.getQrcode({ loginType: 'login_admin' }).then(res => {
this.qrcodeUrl = res.qrcodeUrl
this.timerQrcode = setInterval(this.getCheckStatus, 3000)
})
},
//企微授权接入
getAccess() {
this.$apis.ww.getAccess({}).then(res => {
if (res) {
this.checkStatus = 'succ'
this.getStatus()
} else {
this.checkStatus = 'expired'
}
})
},
//检测二维码
getStatus() {
this.loading = true
this.$apis.ww.getStatus({}).then(res => {
this.loading = false
this.statusQrcode = res.status
if (res.applicationList) {
res.applicationList.forEach((item, index) => {
if (item.appCode == 'DJQWGJ') {
this.applicationList[0] = item
}
if (item.appCode == 'WBLXR') {
this.applicationList[1] = item
}
if (item.appCode == 'TXLTBZS') {
this.applicationList[2] = item
}
})
if (this.applicationList) {
let index = res.applicationList.findIndex(item => {
return item.appCode == 'TXLTBZS'
})
this.callbackUrl = this.applicationList[index].callbackUrl
this.token = this.applicationList[index].token
this.encodingAesKey = this.applicationList[index].encodingAesKey
this.checkResult = this.applicationList[index].checkResult
}
}
if (this.statusQrcode == 'NEVER') {
this.active = 1
this.dialogStatus = true
this.timer = setInterval(this.closeDalog, 1000)
this.getQrcode()
} else if (this.statusQrcode == 'SUCCESS') {
this.active = 3
} else if (this.statusQrcode == 'SERVER_CHECK') {
this.active = 2
} else {
this.active = 1
}
})
},
//上报
getReportStatus(sts) {
let operation
let status
if (this.entryStatus || !sts) {
operation = 'get'
status = 'succ'
} else {
operation = 'check'
status = sts
}
var a = this.$apis.ww
.getReportStatus({
loginType: 'login_admin',
operation: operation,
status: status
})
.then(res => {
this.entryStatus = false
})
},
//刷新
handleRefresh() {
this.checkStatus = 'never'
this.getQrcode()
}
},
mounted() {
let clientHeight = document.documentElement.clientHeight
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.boxHeight = clientHeight - 200
this.getStatus()
},
beforeDestroy() {
clearInterval(this.timerQrcode)
}
}
</script>
<style scoped lang="scss">
.scrm-main {
// position: relative;
}
.enterprise-step-box {
padding-top: 40px;
width: 80%;
margin: 0 auto;
}
.el-steps {
transform: translateX(-30px);
}
.el-step.is-vertical .el-step__head {
width: 32px;
}
.el-step__line {
background: rgba(0, 0, 0, 0.15);
}
.el-step__icon {
width: 32px;
height: 32px;
border: 1px solid rgba(0, 0, 0, 0.15);
}
.el-step.is-horizontal .el-step__line {
top: 14px;
left: 100px;
right: 4%;
}
.el-step__icon-inner {
color: rgba(0, 0, 0, 0.25);
}
.el-step__head.is-finish {
color: #ffffff;
border-color: #5850ff;
}
.el-step__desc {
position: absolute;
display: inline-block;
top: -5px;
left: 36px;
width: 134px;
color: rgba(0, 0, 0, 0.45);
}
.el-step__head.is-finish .el-step__icon-inner {
color: #ffffff;
}
.el-step__head.is-finish .el-step__line {
background: #5850ff;
}
.el-step__head.is-finish .el-step__icon.is-text {
background-color: #5850ff;
}
.el-step__title {
font-size: 17px;
}
.el-step__description {
font-size: 13px;
}
.el-step__title.is-wait {
color: #999999;
}
.el-step__title.is-finish {
color: #333333;
font-weight: 700;
}
.el-step__description.is-finish {
color: #666666;
}
.enterprise-title {
margin-bottom: 15px;
font-size: 20px;
font-weight: 600;
color: #424242;
line-height: 20px;
> span {
font-size: 12px;
font-weight: 500;
color: #aaaaaa;
margin: 0 10px;
}
}
.footer-panel {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0px;
height: 64px;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
.step-panel {
display: flex;
margin-bottom: 55px;
position: relative;
.step-left {
width: 220px;
padding: 40px 20px;
box-sizing: border-box;
.step-box {
height: 300px;
margin: 0 auto;
text-align: center;
}
}
.step-right {
flex: 1;
.config-box {
display: flex;
justify-content: center;
align-items: center;
padding: 40px 0px;
&.config-box-second {
width: 600px;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
.config-form-panel {
justify-content: center;
}
}
&.config-box-third {
text-align: center;
padding: 0px;
display: flex;
justify-content: center;
align-items: center;
}
&-h1 {
height: 25px;
font-size: 18px;
font-weight: 600;
color: #424242;
line-height: 25px;
letter-spacing: 1px;
text-align: center;
}
&-h2 {
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
letter-spacing: 1px;
margin-top: 10px;
text-align: center;
> a {
cursor: pointer;
font-size: 12px;
font-weight: 600;
color: #5850ff;
}
}
&-h3 {
margin: 30px 0px 10px 0px;
font-size: 14px;
font-weight: 600;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
margin-left: 10px;
&.text-bettwn {
display: flex;
justify-content: space-between;
.config-box-link {
font-size: 12px;
font-weight: 600;
color: #6e65ff;
line-height: 30px;
i {
font-weight: 600;
}
}
}
}
.config-box-form {
margin-left: 10px;
}
&-h4 {
font-weight: 500;
color: #8d8d8d;
line-height: 20px;
letter-spacing: 1px;
}
.config-finish {
width: 240px;
height: 240px;
margin-bottom: 40px;
}
.step-jump-home {
cursor: pointer;
font-size: 16px;
font-weight: 500;
color: #6e65ff;
line-height: 22px;
letter-spacing: 1px;
}
.config-box-qrcode {
width: 300px;
text-align: center;
.config-box-h4 {
font-size: 14px;
font-weight: 500;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
}
.config-use-qrcode {
position: relative;
width: 120px;
height: 120px;
margin: 14px auto;
position: relative;
.qrcode-refresh {
position: absolute;
width: 120px;
height: 120px;
top: 0px;
left: 0px;
background: rgba(255, 255, 255, 0.8);
}
.qrcode-status {
position: absolute;
top: 32px;
left: 44px;
font-size: 14px;
font-weight: 500;
color: #5850ff;
line-height: 20px;
letter-spacing: 1px;
> i {
font-size: 32px;
color: #5850ff;
}
&.qrcode-status-ing {
top: 42px;
}
}
}
.config-use-desc {
font-size: 12px;
font-weight: 400;
color: #a0a0a0;
line-height: 17px;
letter-spacing: 1px;
}
}
.config-form-panel {
display: flex;
.config-box-qrcode {
margin-top: 36px;
}
}
.config-box-form {
.config-box-input {
width: 600px;
height: 32px;
background: #ffffff;
border-radius: 2px;
border: 1px solid #e8e8ea;
font-size: 12px;
line-height: 32px;
padding-left: 10px;
margin-bottom: 32px;
color: #999999;
display: flex;
align-items: center;
> label {
font-weight: 500;
color: #333333;
line-height: 28px;
letter-spacing: 1px;
font-size: 12px;
}
.config-item-input {
flex: 1;
color: #999999;
font-size: 12px;
border: none;
appearance: none;
outline: none;
}
> span {
cursor: pointer;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 20px;
}
img {
width: 14px;
height: 14px;
margin-right: 10px;
margin-top: 3px;
cursor: pointer;
display: inline-block;
}
}
.config-box-link {
width: 610px;
font-size: 12px;
font-weight: 400;
color: #a0a0a0;
line-height: 30px;
&.step-link {
display: flex;
justify-content: space-between;
}
> span {
cursor: pointer;
font-weight: 600;
color: #5850ff;
}
}
}
}
}
}
.config-qrcode-finish {
margin: 0 auto;
}
.step-ul {
padding: 30px;
}
.step-li {
position: relative;
padding: 0 30px;
list-style: none;
min-height: 100px;
border-left: 2px solid #ccc;
padding-bottom: 20px;
.step-two-panel {
margin-top: 20px;
padding: 20px;
display: flex;
justify-content: space-around;
.step-use-qrcode {
width: 100px;
height: 100px;
border: 1px solid #333333;
margin: 20px auto;
}
}
.step-three-panel {
margin-top: 20px;
display: flex;
.service-config-border {
border: 1px solid #cccccc;
width: 500px;
margin-right: 30px;
}
.service-config-title {
height: 40px;
line-height: 40px;
background: #f4f6fc;
padding: 0px 20px;
}
.service-config-item {
line-height: 30px;
height: 30px;
border-bottom: 1px solid #cccccc;
padding-left: 10px;
}
.service-config-operation {
height: 46px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0px 10px;
}
}
.step-jump {
margin: 0px 8px;
}
}
.step-li:last-child {
border: none;
}
.step-li:before {
content: '';
display: block;
position: absolute;
margin-left: -6px;
top: 0;
left: -5px;
width: 22px;
height: 22px;
line-height: 22px;
text-align: center;
background: #e6e9ff;
color: #fff;
font-size: 14px;
border-radius: 50%;
}
.enterprise-dialog {
position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
z-index: 2001;
background: rgba(0, 0, 0, 0.3);
.enterprise-dialog-warpper {
position: relative;
margin: 0 auto 50px;
background: #fff;
border-radius: 2px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
box-sizing: border-box;
width: 40%;
height: 260px;
border-radius: 4px;
margin-top: 15vh;
padding: 10px 62px;
.dialog-close-btn {
position: absolute;
top: 16px;
right: 16px;
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
background: #ffffff;
border: 1px solid #999999;
border-radius: 50%;
font-size: 16px;
color: #999999;
}
.enterprise-warpper-logo {
display: flex;
justify-content: center;
align-items: center;
margin-top: 20px;
> img {
width: 56px;
height: 56px;
&:first-child {
margin-right: 30px;
}
&:last-child {
margin-left: 20px;
}
}
> span {
font-size: 30px;
font-weight: 400;
color: #6e65ff;
line-height: 42px;
margin-right: 10px;
&:nth-child(2) {
color: #008df1;
}
}
}
.enterprise-warpper-desc {
font-size: 18px;
font-weight: 400;
color: #3a3a3a;
line-height: 25px;
margin: 20px 0px;
text-align: center;
}
.dialog-footer {
margin: 0 auto;
text-align: center;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="scrm-main">
<div class="enterprise-panel" v-loading="loading">
<div class="enterprise-title">
企业自建应用接入流程
<span>(适合没有自己技术团队的企业,接入即可使用全部功能)</span>
</div>
<div
class="step-panel"
:style="{
'min-height': boxHeight + 'px'
}"
>
<div class="step-right scrm-box-f">
<div class="enterprise-step-box">
<div class="el-steps el-steps--horizontal">
<div class="el-step is-horizontal" style="flex-basis: 50%; margin-right: 0px">
<div class="el-step__head" :class="{ 'is-finish': active == 1 }">
<div class="el-step__line" style="margin-right: 0px">
<i class="el-step__line-inner" style="transition-delay: 0ms; border-width: 0px; width: 0%"></i>
</div>
<div class="el-step__icon is-text">
<div class="el-step__icon-inner">1</div>
</div>
<div class="el-step__main el-step__desc">
<div class="el-step__title" :class="{ 'is-finish': active == 1 }">第一步</div>
<div class="el-step__description" :class="{ 'is-finish': active == 1 }">管理员授权绑定企业</div>
</div>
</div>
</div>
<div class="el-step is-horizontal" style="flex-basis: 50%; margin-right: 0px">
<div class="el-step__head" :class="{ 'is-finish': active == 2 }">
<div class="el-step__line" style="margin-right: 0px">
<i class="el-step__line-inner" style="transition-delay: -150ms; border-width: 0px; width: 0%"></i>
</div>
<div class="el-step__icon is-text">
<!---->
<div class="el-step__icon-inner">2</div>
</div>
<div class="el-step__main el-step__desc">
<div class="el-step__title" :class="{ 'is-finish': active == 2 }">第二步</div>
<div class="el-step__description" :class="{ 'is-finish': active == 2 }">管理员授权配置</div>
</div>
</div>
</div>
<div class="el-step is-horizontal is-flex" style="flex-basis: 50%; max-width: 33.3333%">
<div class="el-step__head" :class="{ 'is-finish': active == 3 }">
<div class="el-step__line"><i class="el-step__line-inner"></i></div>
<div class="el-step__icon is-text">
<!---->
<div class="el-step__icon-inner">3</div>
</div>
<div class="el-step__main el-step__desc">
<div class="el-step__title" :class="{ 'is-finish': active == 3 }">第三步</div>
<div class="el-step__description" :class="{ 'is-finish': active == 3 }">配置完成</div>
</div>
</div>
</div>
</div>
<div
class="config-box"
v-if="active == 1"
:style="{
'min-height': boxHeight - 140 + 'px'
}"
>
<div>
<div class="config-box-h1">初次使用客户,需要企业微信超级管理员授权绑定企业,具体如下:</div>
<div class="config-box-h2">
未注册企业微信的用户,请先前往企业微信的官网进行注册。
<a @click="jumpUrl('https://work.weixin.qq.com/wework_admin/loginpage_wx?from=myhome')">
企业微信官网
<i class="el-icon-d-arrow-right"></i>
</a>
</div>
<div class="config-box-h3">1.企业微信超级管理员扫码授权接入嘀加企微管家</div>
<div class="config-box-qrcode" style="width: 50%" v-if="qrcodeUrl">
<div class="config-use-qrcode">
<img :src="qrcodeUrl" />
<div class="qrcode-refresh" v-if="checkStatus != 'never'">
<div class="qrcode-status" v-if="checkStatus == 'succ'">
<i class="el-icon-circle-check"></i>
<div>完成</div>
</div>
<div class="qrcode-status qrcode-status-ing" v-if="checkStatus == 'ing'">
<i class="el-icon-loading"></i>
</div>
<div class="qrcode-status" v-if="checkStatus == 'expired'" @click="handleRefresh">
<i class="el-icon-refresh"></i>
<div>刷新</div>
</div>
</div>
</div>
<div class="config-use-desc">请联系超级管理员用企业微信扫码接入</div>
</div>
<div class="config-box-qrcode" style="width: 50%" v-else>
<div class="config-use-qrcode">
<img src="@/assets/img/qrcode.png" />
<div class="qrcode-refresh">
<div class="qrcode-status">
<i class="el-icon-circle-check"></i>
<div>完成</div>
</div>
</div>
</div>
</div>
<div class="config-form-panel" v-if="applicationList && applicationList.length > 0">
<div>
<div class="config-box-h3 text-bettwn" style="margin-bottom: 20px">
<span>2.填写嘀加企微管家门店秘钥secret</span>
<div class="config-box-link">
<span @click="jumpUrl('http://qcimg01.glsx.net/upload/temporary/illustrate.html')">
查看如何获取
<i class="el-icon-d-arrow-right"></i>
</span>
</div>
</div>
<div class="config-box-form">
<div class="config-box-input" v-for="(item, index) in applicationList" :key="index">
<label v-if="item.appCode == 'DJQWGJ'">*Secret:</label>
<label v-if="item.appCode == 'WBLXR'">*客户联系Secret:</label>
<label v-if="item.appCode == 'TXLTBZS'">*通讯录Secret:</label>
<input type="text" :readonly="toStatus" v-model="item.appSecret" class="config-item-input" />
</div>
</div>
</div>
<div class="config-box-qrcode">
<div class="config-box-h3">如未成功,请加我微信帮您接入</div>
<div class="config-use-qrcode">
<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/lianghh.png" alt="" />
</div>
<div class="config-use-desc">联系电话:18824231191</div>
</div>
</div>
</div>
</div>
<div
class="config-box config-box-second"
v-if="active == 2"
:style="{
'min-height': boxHeight - 160 + 'px'
}"
>
<div>
<div class="config-box-h1">如若完整使用本系统,还需要企业微信超级管理员完成以下授权配置。</div>
<div class="config-form-panel">
<div>
<div class="config-box-h3 text-bettwn">
<span>通讯录接收事件服务配置</span>
<span class="config-box-link" @click="jumpUrl('http://qcimg01.glsx.net/upload/temporary/illustration.html')">
查看如何配置
<i class="el-icon-d-arrow-right"></i>
</span>
</div>
<div class="config-box-form">
<div class="config-box-input">
<label>*URL:</label>
<input type="text" readonly v-model="callbackUrl" class="config-item-input" />
<span @click="cloneText(callbackUrl)">
复制
<img src="@/assets/img/enterprise/clone.png" />
</span>
</div>
<div class="config-box-input">
<label>*Token:</label>
<input type="text" readonly v-model="token" class="config-item-input" />
<span @click="cloneText(token)">
复制
<img src="@/assets/img/enterprise/clone.png" />
</span>
</div>
<div class="config-box-input">
<label>*EncodingAESKey:</label>
<input type="text" readonly v-model="encodingAesKey" class="config-item-input" />
<span @click="cloneText(encodingAesKey)">
复制
<img src="@/assets/img/enterprise/clone.png" />
</span>
</div>
<div class="config-box-link step-link">
<span>
</span>
<el-button type="primary" size="mini" class="step-jump" @click="jumpUrl('https://work.weixin.qq.com/wework_admin/loginpage_wx?from=myhome')">打开企业微信</el-button>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class="config-box config-box-third"
v-if="active == 3"
:style="{
'min-height': boxHeight - 110 + 'px'
}"
>
<div>
<div class="config-box-h1"></div>
<div class="config-box-qrcode config-qrcode-finish">
<div class="config-finish">
<img src="@/assets/img/enterprise/config.png" />
</div>
</div>
<div class="config-box-h4" v-if="$globalState.session.merchantModel == 2">进入首页即可开始您的营销获客之旅。</div>
<div class="config-box-h4" v-if="$globalState.session.merchantModel == 1">配置完成后,您需先创建您的门店,门店关联企微后,方可使用</div>
<div style="margin-top: 15px">
<div class="step-jump-home" @click="jumpHome" v-if="$globalState.session.merchantModel == 2">
前往首页
<i class="el-icon-d-arrow-right"></i>
</div>
<div class="step-jump-home" @click="jumpStore" v-if="$globalState.session.merchantModel == 1">
去创建门店
<i class="el-icon-d-arrow-right"></i>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<el-button type="primary" v-show="active == 2" @click="handlePrev">上一步</el-button>
<el-button type="primary" v-show="active == 3" @click="handlePrev">返回上一步</el-button>
<el-button type="primary" v-show="active == 1 && statusQrcode != 'SUCCESS' && statusQrcode != 'SERVER_CHECK'" @click="handleNext">确定</el-button>
<el-button type="primary" v-show="active == 1 && (statusQrcode == 'SUCCESS' || statusQrcode == 'SERVER_CHECK')" @click="handleNext">下一步</el-button>
<el-button type="primary" v-show="active == 2 && statusQrcode != 'SUCCESS'" @click="handleNext">确定</el-button>
<el-button type="primary" v-show="active == 2 && statusQrcode == 'SUCCESS'" @click="handleNext">下一步</el-button>
</div>
</div>
<div class="enterprise-dialog" v-show="dialogStatus">
<div class="enterprise-dialog-warpper">
<div class="dialog-close-btn" @click="dialogStatus = false">{{ dialogTime }}s</div>
<div class="enterprise-warpper-logo">
<img src="@/assets/img/enterprise/wechat.png" />
<span>></span>
<span>></span>
<img src="@/assets/img/enterprise/dj.png" />
</div>
<div class="enterprise-warpper-desc">使用嘀加SCRM系统,需先接入企业微信,成功接入后系统后台功能方可使用!</div>
<div class="dialog-footer">
<el-button type="primary" @click="dialogStatus = false">立即接入</el-button>
</div>
</div>
</div>
</div>
</template>
<script>
import util from '@/utils/util'
export default {
name: 'index',
data() {
return {
loading: false,
boxHeight: 0,
toStatus: false,
token: '',
callbackUrl: '',
encodingAesKey: '',
checkStatus: 'never',
entryStatus: true,
qrcodeUrl: '',
dialogTime: 5,
active: 0,
dialogStatus: false,
Secret: '',
SecretContact: '',
SecretCode: '',
timer: null,
timerQrcode: null,
statusQrcode: '',
URL: '',
nextStatus: false,
Token: '',
Secret_1: '',
Secret_2: '',
Secret_3: '',
applicationList: [],
checkResult: 0
}
},
watch: {
active(val) {
if (val == 3) {
this.toStatus = true
}
}
},
methods: {
jumpUrl(url) {
window.open(url)
},
jumpHome() {
this.$router.push('/home/index?id=2')
},
jumpStore() {
this.$history.push('/settings/account/index')
},
handleGetSecret() {
for (let i in this.applicationList) {
if (this.applicationList[i].appSecret === '' || this.applicationList[i].appSecret === null) {
this.$message({
message: '请填写Secret',
type: 'error'
})
return
}
}
if (this.checkStatus != 'succ' && this.qrcodeUrl) {
this.$message({
message: '请联系超级管理员用企业微信扫码接入',
type: 'error'
})
return
}
let params = {
apps: this.applicationList
}
this.$apis.ww.getSecret(params).then(res => {
if (res) {
this.statusQrcode == 'SUCCESS' ? (this.active = 3) : (this.active = 2)
}
})
},
cloneText(msg) {
util.cloneText(msg)
this.$message({
message: '复制成功',
type: 'success'
})
},
handleNext() {
if (this.active == 1) {
if (this.statusQrcode == 'SUCCESS') {
this.nextStatus ? (this.active = 2) : (this.active = 3)
} else {
this.handleGetSecret()
}
return
}
if (this.active == 2) {
if (this.statusQrcode == 'SUCCESS') {
this.active++
} else {
this.getStatus()
// this.$message({
// message: "消息服务器未验证",
// type: "warning",
// });
}
}
},
handlePrev() {
if (this.active == 3) {
this.nextStatus = true
}
this.active--
},
closeDalog() {
this.dialogTime--
if (this.dialogTime == 0) {
this.dialogStatus = false
clearInterval(this.timer)
}
},
//检测二维码
getCheckStatus() {
this.$apis.ww
.getCheckStatus({
status: this.checkStatus
})
.then(res => {
if (res) {
if (res.status == 'succ') {
clearInterval(this.timerQrcode)
this.getReportStatus('succ')
this.getAccess()
return
} else if (res.status == 'ing') {
this.getReportStatus('scan')
} else {
this.getReportStatus('new')
}
this.checkStatus = res.status
} else {
this.checkStatus = 'expired'
this.getReportStatus('expired')
clearInterval(this.timerQrcode)
}
})
},
//获取二维码
getQrcode() {
this.$apis.ww.getQrcode({ loginType: 'login_admin' }).then(res => {
this.qrcodeUrl = res.qrcodeUrl
this.timerQrcode = setInterval(this.getCheckStatus, 3000)
})
},
//企微授权接入
getAccess() {
this.$apis.ww.getAccess({}).then(res => {
if (res) {
this.checkStatus = 'succ'
this.getStatus()
} else {
this.checkStatus = 'expired'
}
})
},
//检测二维码
getStatus() {
this.loading = true
this.$apis.ww.getStatus({}).then(res => {
this.loading = false
this.statusQrcode = res.status
if (res.applicationList) {
res.applicationList.forEach((item, index) => {
if (item.appCode == 'DJQWGJ') {
this.applicationList[0] = item
}
if (item.appCode == 'WBLXR') {
this.applicationList[1] = item
}
if (item.appCode == 'TXLTBZS') {
this.applicationList[2] = item
}
})
if (this.applicationList) {
let index = res.applicationList.findIndex(item => {
return item.appCode == 'TXLTBZS'
})
this.callbackUrl = this.applicationList[index].callbackUrl
this.token = this.applicationList[index].token
this.encodingAesKey = this.applicationList[index].encodingAesKey
this.checkResult = this.applicationList[index].checkResult
}
}
if (this.statusQrcode == 'NEVER') {
this.active = 1
this.dialogStatus = true
this.timer = setInterval(this.closeDalog, 1000)
this.getQrcode()
} else if (this.statusQrcode == 'SUCCESS') {
this.active = 3
} else if (this.statusQrcode == 'SERVER_CHECK') {
this.active = 2
} else {
this.active = 1
}
})
},
//上报
getReportStatus(sts) {
let operation
let status
if (this.entryStatus || !sts) {
operation = 'get'
status = 'succ'
} else {
operation = 'check'
status = sts
}
var a = this.$apis.ww
.getReportStatus({
loginType: 'login_admin',
operation: operation,
status: status
})
.then(res => {
this.entryStatus = false
})
},
//刷新
handleRefresh() {
this.checkStatus = 'never'
this.getQrcode()
}
},
mounted() {
let clientHeight = document.documentElement.clientHeight
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.boxHeight = clientHeight - 200
this.getStatus()
},
beforeDestroy() {
clearInterval(this.timerQrcode)
}
}
</script>
<style scoped lang="scss">
.scrm-main {
// position: relative;
}
.enterprise-step-box {
padding-top: 40px;
width: 80%;
margin: 0 auto;
}
.el-steps {
transform: translateX(-30px);
}
.el-step.is-vertical .el-step__head {
width: 32px;
}
.el-step__line {
background: rgba(0, 0, 0, 0.15);
}
.el-step__icon {
width: 32px;
height: 32px;
border: 1px solid rgba(0, 0, 0, 0.15);
}
.el-step.is-horizontal .el-step__line {
top: 14px;
left: 100px;
right: 4%;
}
.el-step__icon-inner {
color: rgba(0, 0, 0, 0.25);
}
.el-step__head.is-finish {
color: #ffffff;
border-color: #5850ff;
}
.el-step__desc {
position: absolute;
display: inline-block;
top: -5px;
left: 36px;
width: 134px;
color: rgba(0, 0, 0, 0.45);
}
.el-step__head.is-finish .el-step__icon-inner {
color: #ffffff;
}
.el-step__head.is-finish .el-step__line {
background: #5850ff;
}
.el-step__head.is-finish .el-step__icon.is-text {
background-color: #5850ff;
}
.el-step__title {
font-size: 17px;
}
.el-step__description {
font-size: 13px;
}
.el-step__title.is-wait {
color: #999999;
}
.el-step__title.is-finish {
color: #333333;
font-weight: 700;
}
.el-step__description.is-finish {
color: #666666;
}
.enterprise-title {
margin-bottom: 15px;
font-size: 20px;
font-weight: 600;
color: #424242;
line-height: 20px;
> span {
font-size: 12px;
font-weight: 500;
color: #aaaaaa;
margin: 0 10px;
}
}
.footer-panel {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0px;
height: 64px;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
.step-panel {
display: flex;
margin-bottom: 55px;
position: relative;
.step-left {
width: 220px;
padding: 40px 20px;
box-sizing: border-box;
.step-box {
height: 300px;
margin: 0 auto;
text-align: center;
}
}
.step-right {
flex: 1;
.config-box {
display: flex;
justify-content: center;
align-items: center;
padding: 40px 0px;
&.config-box-second {
width: 600px;
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
.config-form-panel {
justify-content: center;
}
}
&.config-box-third {
text-align: center;
padding: 0px;
display: flex;
justify-content: center;
align-items: center;
}
&-h1 {
height: 25px;
font-size: 18px;
font-weight: 600;
color: #424242;
line-height: 25px;
letter-spacing: 1px;
text-align: center;
}
&-h2 {
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
letter-spacing: 1px;
margin-top: 10px;
text-align: center;
> a {
cursor: pointer;
font-size: 12px;
font-weight: 600;
color: #5850ff;
}
}
&-h3 {
margin: 30px 0px 10px 0px;
font-size: 14px;
font-weight: 600;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
margin-left: 10px;
&.text-bettwn {
display: flex;
justify-content: space-between;
.config-box-link {
font-size: 12px;
font-weight: 600;
color: #6e65ff;
line-height: 30px;
i {
font-weight: 600;
}
}
}
}
.config-box-form {
margin-left: 10px;
}
&-h4 {
font-weight: 500;
color: #8d8d8d;
line-height: 20px;
letter-spacing: 1px;
}
.config-finish {
width: 240px;
height: 240px;
margin-bottom: 40px;
}
.step-jump-home {
cursor: pointer;
font-size: 16px;
font-weight: 500;
color: #6e65ff;
line-height: 22px;
letter-spacing: 1px;
}
.config-box-qrcode {
width: 300px;
text-align: center;
.config-box-h4 {
font-size: 14px;
font-weight: 500;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
}
.config-use-qrcode {
position: relative;
width: 120px;
height: 120px;
margin: 14px auto;
position: relative;
.qrcode-refresh {
position: absolute;
width: 120px;
height: 120px;
top: 0px;
left: 0px;
background: rgba(255, 255, 255, 0.8);
}
.qrcode-status {
position: absolute;
top: 32px;
left: 44px;
font-size: 14px;
font-weight: 500;
color: #5850ff;
line-height: 20px;
letter-spacing: 1px;
> i {
font-size: 32px;
color: #5850ff;
}
&.qrcode-status-ing {
top: 42px;
}
}
}
.config-use-desc {
font-size: 12px;
font-weight: 400;
color: #a0a0a0;
line-height: 17px;
letter-spacing: 1px;
}
}
.config-form-panel {
display: flex;
.config-box-qrcode {
margin-top: 36px;
}
}
.config-box-form {
.config-box-input {
width: 600px;
height: 32px;
background: #ffffff;
border-radius: 2px;
border: 1px solid #e8e8ea;
font-size: 12px;
line-height: 32px;
padding-left: 10px;
margin-bottom: 32px;
color: #999999;
display: flex;
align-items: center;
> label {
font-weight: 500;
color: #333333;
line-height: 28px;
letter-spacing: 1px;
font-size: 12px;
}
.config-item-input {
flex: 1;
color: #999999;
font-size: 12px;
border: none;
appearance: none;
outline: none;
}
> span {
cursor: pointer;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 20px;
}
img {
width: 14px;
height: 14px;
margin-right: 10px;
margin-top: 3px;
cursor: pointer;
display: inline-block;
}
}
.config-box-link {
width: 610px;
font-size: 12px;
font-weight: 400;
color: #a0a0a0;
line-height: 30px;
&.step-link {
display: flex;
justify-content: space-between;
}
> span {
cursor: pointer;
font-weight: 600;
color: #5850ff;
}
}
}
}
}
}
.config-qrcode-finish {
margin: 0 auto;
}
.step-ul {
padding: 30px;
}
.step-li {
position: relative;
padding: 0 30px;
list-style: none;
min-height: 100px;
border-left: 2px solid #ccc;
padding-bottom: 20px;
.step-two-panel {
margin-top: 20px;
padding: 20px;
display: flex;
justify-content: space-around;
.step-use-qrcode {
width: 100px;
height: 100px;
border: 1px solid #333333;
margin: 20px auto;
}
}
.step-three-panel {
margin-top: 20px;
display: flex;
.service-config-border {
border: 1px solid #cccccc;
width: 500px;
margin-right: 30px;
}
.service-config-title {
height: 40px;
line-height: 40px;
background: #f4f6fc;
padding: 0px 20px;
}
.service-config-item {
line-height: 30px;
height: 30px;
border-bottom: 1px solid #cccccc;
padding-left: 10px;
}
.service-config-operation {
height: 46px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0px 10px;
}
}
.step-jump {
margin: 0px 8px;
}
}
.step-li:last-child {
border: none;
}
.step-li:before {
content: '';
display: block;
position: absolute;
margin-left: -6px;
top: 0;
left: -5px;
width: 22px;
height: 22px;
line-height: 22px;
text-align: center;
background: #e6e9ff;
color: #fff;
font-size: 14px;
border-radius: 50%;
}
.enterprise-dialog {
position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
z-index: 2001;
background: rgba(0, 0, 0, 0.3);
.enterprise-dialog-warpper {
position: relative;
margin: 0 auto 50px;
background: #fff;
border-radius: 2px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
box-sizing: border-box;
width: 40%;
height: 260px;
border-radius: 4px;
margin-top: 15vh;
padding: 10px 62px;
.dialog-close-btn {
position: absolute;
top: 16px;
right: 16px;
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
background: #ffffff;
border: 1px solid #999999;
border-radius: 50%;
font-size: 16px;
color: #999999;
}
.enterprise-warpper-logo {
display: flex;
justify-content: center;
align-items: center;
margin-top: 20px;
> img {
width: 56px;
height: 56px;
&:first-child {
margin-right: 30px;
}
&:last-child {
margin-left: 20px;
}
}
> span {
font-size: 30px;
font-weight: 400;
color: #6e65ff;
line-height: 42px;
margin-right: 10px;
&:nth-child(2) {
color: #008df1;
}
}
}
.enterprise-warpper-desc {
font-size: 18px;
font-weight: 400;
color: #3a3a3a;
line-height: 25px;
margin: 20px 0px;
text-align: center;
}
.dialog-footer {
margin: 0 auto;
text-align: center;
}
}
}
</style>
\ No newline at end of file
<template>
<div className="scrm-main">
<div class="follow-header">
<p>
为不同的业务部门设置对应的跟进专员,方便后续业务部门创办相关的活动时能为其成员创建活动和发送企微消息,引导其跟进活动。跟进专员接收任务后可转发给客户/客户群,拥有“添加外部联系人权限”的员工才允许设置为跟进专员。
<a class="follow-process-a" @click="jumpUrl('https://open.work.weixin.qq.com/help2/pc/16853?person_id=1&is_tencent=')">
企微管理员为员工“设置外部联系人权限”流程
<i class="el-icon-d-arrow-right"></i>
</a>
</p>
</div>
<div class="follow-form" :style="{ 'min-height': formHeight + 'px' }">
<el-form :inline="true" :model="searchForm" class="follow-form-item">
<el-form-item label="跟进专员类型">
<el-select size="small" v-model="searchForm.followerTypeId" placeholder="请选择">
<el-option v-for="item in optionsType" :key="item.id" :label="item.followName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="员工搜索">
<el-input size="small" v-model="searchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch" size="small">查询</el-button>
</el-form-item>
<el-form-item class="follow-form-jump">
<GLButton fn="新增" size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</GLButton>
</el-form-item>
</el-form>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="删除" type="text" @click="handleDele(scope.scope)">删除</GLButton>
</template>
</GLTable>
</div>
<el-drawer class="drawer-panel" size="60%" title="添加跟进员工" :visible.sync="drawer" :direction="direction" :before-close="handleClose">
<add-sale ref="drawerForm" @closeDrawer="closeDrawer" @handSelectdEmp="handSelectdEmp"></add-sale>
</el-drawer>
</div>
</template>
<script>
import addSale from './components/addSale'
export default {
name: 'index',
components: {
addSale
},
data() {
return {
formHeight: 300,
drawer: false,
direction: 'rtl',
searchForm: {
followerTypeId: '',
staffName: ''
},
optionsType: [
{
value: '',
label: '全部'
},
{
value: '1',
label: '新车跟进专员'
},
{
value: '2',
label: '售后跟进专员'
}
],
scope: {
scope: ''
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
tableOption: true,
mutiSelectName: 'user',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
},
{
label: '手机号',
prop: 'staffPhone'
},
{
label: '首次开通时间',
prop: 'followerCreatedTime'
},
{
label: '是否有外部联系人权限',
prop: 'isAddOutsider',
formatter: cellValue => {
return {
0: '是',
1: '否'
}[cellValue.isAddOutsider]
}
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0
}
},
watch: {
drawer(val) {
if (!val) {
this.listEntFollowerType()
}
}
},
methods: {
jumpUrl(url) {
window.open(url)
},
openDrawer() {
this.drawer = true
this.$nextTick(() => {
this.$refs.drawerForm.init()
})
},
beforeSearchFn() {
return new Promise(resolve => {
// 调接口前,操作
resolve()
})
},
handleClose() {
this.drawer = false
},
closeDrawer() {
this.handleClose()
},
handSelectdEmp(followerTypeId, userIds) {
var params = {
followerTypeId,
userIds
}
this.$apis.emp.saveFollowerStaff(params).then(res => {
if (res) {
this.handleClose()
this.handleSearch()
}
})
},
handleSearch() {
var params = {
...JSON.parse(JSON.stringify(this.searchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum
}
this.$apis.emp.listFollowerStaffByPage(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
if (res.data && res.data.length == []) {
this.$refs.table.setTableHeightFun()
}
})
},
listEntFollowerType() {
this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => {
this.optionsType = [{ followName: '全部', id: '' }].concat(res)
})
},
handleDele(scope) {
this.$confirm('是否删除该员工?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$apis.emp.deleteFollowerStaff({ userId: scope.userId }).then(res => {
if (res) {
this.$message({
type: 'success',
message: '删除成功!'
})
}
this.handleSearch()
})
})
.catch(() => {})
}
},
mounted() {
this.listEntFollowerType()
this.handleSearch()
this.formHeight = document.documentElement.clientHeight - 230
}
}
</script>
<style scoped lang="scss">
.follow-header {
background: #ffffff;
line-height: 20px;
padding: 20px;
font-size: 15px;
color: rgba(0, 0, 0, 0.65);
position: relative;
p {
// width: 70%;
}
.follow-process-a {
text-decoration: underline;
line-height: 24px;
color: #5850ff;
cursor: pointer;
}
}
.follow-form {
min-height: calc(100% - 200px);
margin-top: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
/deep/ {
.el-form-item {
margin-right: 20px;
}
.el-button {
margin-left: 20px;
}
}
&-item {
position: relative;
.follow-form-jump {
position: absolute;
right: 0px;
margin-right: 0px;
}
}
}
.drawer-panel {
/deep/ .el-drawer__body {
overflow-y: auto;
}
}
</style>
\ No newline at end of file
<template>
<div className="scrm-main">
<div class="follow-header">
<p>
为不同的业务部门设置对应的跟进专员,方便后续业务部门创办相关的活动时能为其成员创建活动和发送企微消息,引导其跟进活动。跟进专员接收任务后可转发给客户/客户群,拥有“添加外部联系人权限”的员工才允许设置为跟进专员。
<a class="follow-process-a" @click="jumpUrl('https://open.work.weixin.qq.com/help2/pc/16853?person_id=1&is_tencent=')">
企微管理员为员工“设置外部联系人权限”流程
<i class="el-icon-d-arrow-right"></i>
</a>
</p>
</div>
<div class="follow-form" :style="{ 'min-height': formHeight + 'px' }">
<el-form :inline="true" :model="searchForm" class="follow-form-item">
<el-form-item label="跟进专员类型">
<el-select size="small" v-model="searchForm.followerTypeId" placeholder="请选择">
<el-option v-for="item in optionsType" :key="item.id" :label="item.followName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="员工搜索">
<el-input size="small" v-model="searchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch" size="small">查询</el-button>
</el-form-item>
<el-form-item class="follow-form-jump">
<GLButton fn="新增" size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</GLButton>
</el-form-item>
</el-form>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="删除" type="text" @click="handleDele(scope.scope)">删除</GLButton>
</template>
</GLTable>
</div>
<el-drawer class="drawer-panel" size="60%" title="添加跟进员工" :visible.sync="drawer" :direction="direction" :before-close="handleClose">
<add-sale ref="drawerForm" @closeDrawer="closeDrawer" @handSelectdEmp="handSelectdEmp"></add-sale>
</el-drawer>
</div>
</template>
<script>
import addSale from './components/addSale'
export default {
name: 'index',
components: {
addSale
},
data() {
return {
formHeight: 300,
drawer: false,
direction: 'rtl',
searchForm: {
followerTypeId: '',
staffName: ''
},
optionsType: [
{
value: '',
label: '全部'
},
{
value: '1',
label: '新车跟进专员'
},
{
value: '2',
label: '售后跟进专员'
}
],
scope: {
scope: ''
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
tableOption: true,
mutiSelectName: 'user',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
},
{
label: '手机号',
prop: 'staffPhone'
},
{
label: '首次开通时间',
prop: 'followerCreatedTime'
},
{
label: '是否有外部联系人权限',
prop: 'isAddOutsider',
formatter: cellValue => {
return {
0: '是',
1: '否'
}[cellValue.isAddOutsider]
}
},
{
label: '操作',
prop: 'auth-button',
width: '140px',
addHtml: 'auth-button',
fixed: 'right'
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0
}
},
watch: {
drawer(val) {
if (!val) {
this.listEntFollowerType()
}
}
},
methods: {
jumpUrl(url) {
window.open(url)
},
openDrawer() {
this.drawer = true
this.$nextTick(() => {
this.$refs.drawerForm.init()
})
},
beforeSearchFn() {
return new Promise(resolve => {
// 调接口前,操作
resolve()
})
},
handleClose() {
this.drawer = false
},
closeDrawer() {
this.handleClose()
},
handSelectdEmp(followerTypeId, userIds) {
var params = {
followerTypeId,
userIds
}
this.$apis.emp.saveFollowerStaff(params).then(res => {
if (res) {
this.handleClose()
this.handleSearch()
}
})
},
handleSearch() {
var params = {
...JSON.parse(JSON.stringify(this.searchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum
}
this.$apis.emp.listFollowerStaffByPage(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
if (res.data && res.data.length == []) {
this.$refs.table.setTableHeightFun()
}
})
},
listEntFollowerType() {
this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => {
this.optionsType = [{ followName: '全部', id: '' }].concat(res)
})
},
handleDele(scope) {
this.$confirm('是否删除该员工?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$apis.emp.deleteFollowerStaff({ userId: scope.userId }).then(res => {
if (res) {
this.$message({
type: 'success',
message: '删除成功!'
})
}
this.handleSearch()
})
})
.catch(() => {})
}
},
mounted() {
this.listEntFollowerType()
this.handleSearch()
this.formHeight = document.documentElement.clientHeight - 230
}
}
</script>
<style scoped lang="scss">
.follow-header {
background: #ffffff;
line-height: 20px;
padding: 20px;
font-size: 15px;
color: rgba(0, 0, 0, 0.65);
position: relative;
p {
// width: 70%;
}
.follow-process-a {
text-decoration: underline;
line-height: 24px;
color: #5850ff;
cursor: pointer;
}
}
.follow-form {
min-height: calc(100% - 200px);
margin-top: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
/deep/ {
.el-form-item {
margin-right: 20px;
}
.el-button {
margin-left: 20px;
}
}
&-item {
position: relative;
.follow-form-jump {
position: absolute;
right: 0px;
margin-right: 0px;
}
}
}
.drawer-panel {
/deep/ .el-drawer__body {
overflow-y: auto;
}
}
</style>
\ No newline at end of file
<template>
<div className="scrm-main">
<div class="follow-header">
<p>
为不同的业务部门设置对应的跟进专员,方便后续业务部门创办相关的活动时能为其成员创建活动和发送企微消息,引导其跟进活动。跟进专员接收任务后可转发给客户/客户群,拥有“添加外部联系人权限”的员工才允许设置为跟进专员。
<a class="follow-process-a" @click="jumpUrl('https://open.work.weixin.qq.com/help2/pc/16853?person_id=1&is_tencent=')">
企微管理员为员工“设置外部联系人权限”流程
<i class="el-icon-d-arrow-right"></i>
</a>
</p>
</div>
<div class="follow-form" :style="{ 'min-height': formHeight + 'px' }">
<el-form :inline="true" :model="searchForm" class="follow-form-item">
<el-form-item label="跟进专员类型">
<el-select size="small" v-model="searchForm.followerTypeId" placeholder="请选择">
<el-option v-for="item in optionsType" :key="item.id" :label="item.followName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="员工搜索">
<el-input size="small" v-model="searchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch" size="small">查询</el-button>
</el-form-item>
<el-form-item class="follow-form-jump">
<GLButton fn="新增" size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</GLButton>
</el-form-item>
</el-form>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="删除" type="text" @click="handleDele(scope.scope)">删除</GLButton>
</template>
</GLTable>
</div>
<el-drawer class="drawer-panel" size="60%" title="添加跟进员工" :visible.sync="drawer" :direction="direction" :before-close="handleClose">
<add-sale ref="drawerForm" @closeDrawer="closeDrawer" @handSelectdEmp="handSelectdEmp"></add-sale>
</el-drawer>
</div>
</template>
<script>
import addSale from './components/addSale'
export default {
name: 'index',
components: {
addSale
},
data() {
return {
formHeight: 300,
drawer: false,
direction: 'rtl',
searchForm: {
followerTypeId: '',
staffName: ''
},
optionsType: [
{
value: '',
label: '全部'
},
{
value: '1',
label: '新车跟进专员'
},
{
value: '2',
label: '售后跟进专员'
}
],
scope: {
scope: ''
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
tableOption: true,
mutiSelectName: 'user',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
},
{
label: '手机号',
prop: 'staffPhone'
},
{
label: '首次开通时间',
prop: 'followerCreatedTime'
},
{
label: '是否有外部联系人权限',
prop: 'isAddOutsider',
formatter: cellValue => {
return {
0: '是',
1: '否'
}[cellValue.isAddOutsider]
}
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0
}
},
watch: {
drawer(val) {
if (!val) {
this.listEntFollowerType()
}
}
},
methods: {
jumpUrl(url) {
window.open(url)
},
openDrawer() {
this.drawer = true
this.$nextTick(() => {
this.$refs.drawerForm.init()
})
},
beforeSearchFn() {
return new Promise(resolve => {
// 调接口前,操作
resolve()
})
},
handleClose() {
this.drawer = false
},
closeDrawer() {
this.handleClose()
},
handSelectdEmp(followerTypeId, userIds) {
var params = {
followerTypeId,
userIds
}
this.$apis.emp.saveFollowerStaff(params).then(res => {
if (res) {
this.handleClose()
this.handleSearch()
}
})
},
handleSearch() {
var params = {
...JSON.parse(JSON.stringify(this.searchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum
}
this.$apis.emp.listFollowerStaffByPage(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
if (res.data && res.data.length == []) {
this.$refs.table.setTableHeightFun()
}
})
},
listEntFollowerType() {
this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => {
this.optionsType = [{ followName: '全部', id: '' }].concat(res)
})
},
handleDele(scope) {
this.$confirm('是否删除该员工?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$apis.emp.deleteFollowerStaff({ userId: scope.userId }).then(res => {
if (res) {
this.$message({
type: 'success',
message: '删除成功!'
})
}
this.handleSearch()
})
})
.catch(() => {})
}
},
mounted() {
this.listEntFollowerType()
this.handleSearch()
this.formHeight = document.documentElement.clientHeight - 230
}
}
</script>
<style scoped lang="scss">
.follow-header {
background: #ffffff;
line-height: 20px;
padding: 20px;
font-size: 15px;
color: rgba(0, 0, 0, 0.65);
position: relative;
p {
// width: 70%;
}
.follow-process-a {
text-decoration: underline;
line-height: 24px;
color: #5850ff;
cursor: pointer;
}
}
.follow-form {
min-height: calc(100% - 200px);
margin-top: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
/deep/ {
.el-form-item {
margin-right: 20px;
}
.el-button {
margin-left: 20px;
}
}
&-item {
position: relative;
.follow-form-jump {
position: absolute;
right: 0px;
margin-right: 0px;
}
}
}
.drawer-panel {
/deep/ .el-drawer__body {
overflow-y: auto;
}
}
</style>
\ No newline at end of file
<template>
<div className="scrm-main">
<div class="follow-header">
<p>
为不同的业务部门设置对应的跟进专员,方便后续业务部门创办相关的活动时能为其成员创建活动和发送企微消息,引导其跟进活动。跟进专员接收任务后可转发给客户/客户群,拥有“添加外部联系人权限”的员工才允许设置为跟进专员。
<a class="follow-process-a" @click="jumpUrl('https://open.work.weixin.qq.com/help2/pc/16853?person_id=1&is_tencent=')">
企微管理员为员工“设置外部联系人权限”流程
<i class="el-icon-d-arrow-right"></i>
</a>
</p>
</div>
<div class="follow-form" :style="{ 'min-height': formHeight + 'px' }">
<el-form :inline="true" :model="searchForm" class="follow-form-item">
<el-form-item label="跟进专员类型">
<el-select size="small" v-model="searchForm.followerTypeId" placeholder="请选择">
<el-option v-for="item in optionsType" :key="item.id" :label="item.followName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="员工搜索">
<el-input size="small" v-model="searchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch" size="small">查询</el-button>
</el-form-item>
<el-form-item class="follow-form-jump">
<GLButton fn="新增" size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</GLButton>
</el-form-item>
</el-form>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<template slot="auth-button" slot-scope="scope" :data="scope.scope" width="100">
<GLButton fn="删除" type="text" @click="handleDele(scope.scope)">删除</GLButton>
</template>
</GLTable>
</div>
<el-drawer class="drawer-panel" size="60%" title="添加跟进员工" :visible.sync="drawer" :direction="direction" :before-close="handleClose">
<add-sale ref="drawerForm" @closeDrawer="closeDrawer" @handSelectdEmp="handSelectdEmp"></add-sale>
</el-drawer>
</div>
</template>
<script>
import addSale from './components/addSale'
export default {
name: 'index',
components: {
addSale
},
data() {
return {
formHeight: 300,
drawer: false,
direction: 'rtl',
searchForm: {
followerTypeId: '',
staffName: ''
},
optionsType: [
{
value: '',
label: '全部'
},
{
value: '1',
label: '新车跟进专员'
},
{
value: '2',
label: '售后跟进专员'
}
],
scope: {
scope: ''
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
tableOption: true,
mutiSelectName: 'user',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
},
{
label: '手机号',
prop: 'staffPhone'
},
{
label: '首次开通时间',
prop: 'followerCreatedTime'
},
{
label: '是否有外部联系人权限',
prop: 'isAddOutsider',
formatter: cellValue => {
return {
0: '是',
1: '否'
}[cellValue.isAddOutsider]
}
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0
}
},
watch: {
drawer(val) {
if (!val) {
this.listEntFollowerType()
}
}
},
methods: {
jumpUrl(url) {
window.open(url)
},
openDrawer() {
this.drawer = true
this.$nextTick(() => {
this.$refs.drawerForm.init()
})
},
beforeSearchFn() {
return new Promise(resolve => {
// 调接口前,操作
resolve()
})
},
handleClose() {
this.drawer = false
},
closeDrawer() {
this.handleClose()
},
handSelectdEmp(followerTypeId, userIds) {
var params = {
followerTypeId,
userIds
}
this.$apis.emp.saveFollowerStaff(params).then(res => {
if (res) {
this.handleClose()
this.handleSearch()
}
})
},
handleSearch() {
var params = {
...JSON.parse(JSON.stringify(this.searchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum
}
this.$apis.emp.listFollowerStaffByPage(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
if (res.data && res.data.length == []) {
this.$refs.table.setTableHeightFun()
}
})
},
listEntFollowerType() {
this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => {
this.optionsType = [{ followName: '全部', id: '' }].concat(res)
})
},
handleDele(scope) {
this.$confirm('是否删除该员工?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$apis.emp.deleteFollowerStaff({ userId: scope.userId }).then(res => {
if (res) {
this.$message({
type: 'success',
message: '删除成功!'
})
}
this.handleSearch()
})
})
.catch(() => {})
}
},
mounted() {
this.listEntFollowerType()
this.handleSearch()
this.formHeight = document.documentElement.clientHeight - 230
}
}
</script>
<style scoped lang="scss">
.follow-header {
background: #ffffff;
line-height: 20px;
padding: 20px;
font-size: 15px;
color: rgba(0, 0, 0, 0.65);
position: relative;
p {
// width: 70%;
}
.follow-process-a {
text-decoration: underline;
line-height: 24px;
color: #5850ff;
cursor: pointer;
}
}
.follow-form {
min-height: calc(100% - 200px);
margin-top: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
/deep/ {
.el-form-item {
margin-right: 20px;
}
.el-button {
margin-left: 20px;
}
}
&-item {
position: relative;
.follow-form-jump {
position: absolute;
right: 0px;
margin-right: 0px;
}
}
}
.drawer-panel {
/deep/ .el-drawer__body {
overflow-y: auto;
}
}
</style>
\ No newline at end of file
<template>
<div className="scrm-main">
<div class="follow-header">
<p>
为不同的业务部门设置对应的跟进专员,方便后续业务部门创办相关的活动时能为其成员创建活动和发送企微消息,引导其跟进活动。跟进专员接收任务后可转发给客户/客户群,拥有“添加外部联系人权限”的员工才允许设置为跟进专员。
<a class="follow-process-a" @click="jumpUrl('https://open.work.weixin.qq.com/help2/pc/16853?person_id=1&is_tencent=')">
企微管理员为员工“设置外部联系人权限”流程
<i class="el-icon-d-arrow-right"></i>
</a>
</p>
</div>
<div class="follow-form" :style="{ 'min-height': formHeight + 'px' }">
<el-form :inline="true" :model="searchForm" class="follow-form-item">
<el-form-item label="跟进专员类型">
<el-select size="small" v-model="searchForm.followerTypeId" placeholder="请选择">
<el-option v-for="item in optionsType" :key="item.id" :label="item.followName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="员工搜索">
<el-input size="small" v-model="searchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch" size="small">查询</el-button>
</el-form-item>
<el-form-item class="follow-form-jump">
<GLButton fn="新增" size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</GLButton>
</el-form-item>
</el-form>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<template slot="auth-button" slot-scope="scope" :data="scope.scope" width="100px">
<GLButton fn="删除" type="text" @click="handleDele(scope.scope)">删除</GLButton>
</template>
</GLTable>
</div>
<el-drawer class="drawer-panel" size="60%" title="添加跟进员工" :visible.sync="drawer" :direction="direction" :before-close="handleClose">
<add-sale ref="drawerForm" @closeDrawer="closeDrawer" @handSelectdEmp="handSelectdEmp"></add-sale>
</el-drawer>
</div>
</template>
<script>
import addSale from './components/addSale'
export default {
name: 'index',
components: {
addSale
},
data() {
return {
formHeight: 300,
drawer: false,
direction: 'rtl',
searchForm: {
followerTypeId: '',
staffName: ''
},
optionsType: [
{
value: '',
label: '全部'
},
{
value: '1',
label: '新车跟进专员'
},
{
value: '2',
label: '售后跟进专员'
}
],
scope: {
scope: ''
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
tableOption: true,
mutiSelectName: 'user',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
},
{
label: '手机号',
prop: 'staffPhone'
},
{
label: '首次开通时间',
prop: 'followerCreatedTime'
},
{
label: '是否有外部联系人权限',
prop: 'isAddOutsider',
formatter: cellValue => {
return {
0: '是',
1: '否'
}[cellValue.isAddOutsider]
}
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0
}
},
watch: {
drawer(val) {
if (!val) {
this.listEntFollowerType()
}
}
},
methods: {
jumpUrl(url) {
window.open(url)
},
openDrawer() {
this.drawer = true
this.$nextTick(() => {
this.$refs.drawerForm.init()
})
},
beforeSearchFn() {
return new Promise(resolve => {
// 调接口前,操作
resolve()
})
},
handleClose() {
this.drawer = false
},
closeDrawer() {
this.handleClose()
},
handSelectdEmp(followerTypeId, userIds) {
var params = {
followerTypeId,
userIds
}
this.$apis.emp.saveFollowerStaff(params).then(res => {
if (res) {
this.handleClose()
this.handleSearch()
}
})
},
handleSearch() {
var params = {
...JSON.parse(JSON.stringify(this.searchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum
}
this.$apis.emp.listFollowerStaffByPage(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
if (res.data && res.data.length == []) {
this.$refs.table.setTableHeightFun()
}
})
},
listEntFollowerType() {
this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => {
this.optionsType = [{ followName: '全部', id: '' }].concat(res)
})
},
handleDele(scope) {
this.$confirm('是否删除该员工?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$apis.emp.deleteFollowerStaff({ userId: scope.userId }).then(res => {
if (res) {
this.$message({
type: 'success',
message: '删除成功!'
})
}
this.handleSearch()
})
})
.catch(() => {})
}
},
mounted() {
this.listEntFollowerType()
this.handleSearch()
this.formHeight = document.documentElement.clientHeight - 230
}
}
</script>
<style scoped lang="scss">
.follow-header {
background: #ffffff;
line-height: 20px;
padding: 20px;
font-size: 15px;
color: rgba(0, 0, 0, 0.65);
position: relative;
p {
// width: 70%;
}
.follow-process-a {
text-decoration: underline;
line-height: 24px;
color: #5850ff;
cursor: pointer;
}
}
.follow-form {
min-height: calc(100% - 200px);
margin-top: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
/deep/ {
.el-form-item {
margin-right: 20px;
}
.el-button {
margin-left: 20px;
}
}
&-item {
position: relative;
.follow-form-jump {
position: absolute;
right: 0px;
margin-right: 0px;
}
}
}
.drawer-panel {
/deep/ .el-drawer__body {
overflow-y: auto;
}
}
</style>
\ No newline at end of file
<template>
<div className="scrm-main">
<div class="follow-header">
<p>
为不同的业务部门设置对应的跟进专员,方便后续业务部门创办相关的活动时能为其成员创建活动和发送企微消息,引导其跟进活动。跟进专员接收任务后可转发给客户/客户群,拥有“添加外部联系人权限”的员工才允许设置为跟进专员。
<a class="follow-process-a" @click="jumpUrl('https://open.work.weixin.qq.com/help2/pc/16853?person_id=1&is_tencent=')">
企微管理员为员工“设置外部联系人权限”流程
<i class="el-icon-d-arrow-right"></i>
</a>
</p>
</div>
<div class="follow-form" :style="{ 'min-height': formHeight + 'px' }">
<el-form :inline="true" :model="searchForm" class="follow-form-item">
<el-form-item label="跟进专员类型">
<el-select size="small" v-model="searchForm.followerTypeId" placeholder="请选择">
<el-option v-for="item in optionsType" :key="item.id" :label="item.followName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="员工搜索">
<el-input size="small" v-model="searchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch" size="small">查询</el-button>
</el-form-item>
<el-form-item class="follow-form-jump">
<GLButton fn="新增" size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</GLButton>
</el-form-item>
</el-form>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="删除" type="text" @click="handleDele(scope.scope)">删除</GLButton>
</template>
</GLTable>
</div>
<el-drawer class="drawer-panel" size="60%" title="添加跟进员工" :visible.sync="drawer" :direction="direction" :before-close="handleClose">
<add-sale ref="drawerForm" @closeDrawer="closeDrawer" @handSelectdEmp="handSelectdEmp"></add-sale>
</el-drawer>
</div>
</template>
<script>
import addSale from './components/addSale'
export default {
name: 'index',
components: {
addSale
},
data() {
return {
formHeight: 300,
drawer: false,
direction: 'rtl',
searchForm: {
followerTypeId: '',
staffName: ''
},
optionsType: [
{
value: '',
label: '全部'
},
{
value: '1',
label: '新车跟进专员'
},
{
value: '2',
label: '售后跟进专员'
}
],
scope: {
scope: ''
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
tableOption: true,
mutiSelectName: 'user',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
},
{
label: '手机号',
prop: 'staffPhone'
},
{
label: '首次开通时间',
prop: 'followerCreatedTime'
},
{
label: '是否有外部联系人权限',
prop: 'isAddOutsider',
formatter: cellValue => {
return {
0: '是',
1: '否'
}[cellValue.isAddOutsider]
}
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0
}
},
watch: {
drawer(val) {
if (!val) {
this.listEntFollowerType()
}
}
},
methods: {
jumpUrl(url) {
window.open(url)
},
openDrawer() {
this.drawer = true
this.$nextTick(() => {
this.$refs.drawerForm.init()
})
},
beforeSearchFn() {
return new Promise(resolve => {
// 调接口前,操作
resolve()
})
},
handleClose() {
this.drawer = false
},
closeDrawer() {
this.handleClose()
},
handSelectdEmp(followerTypeId, userIds) {
var params = {
followerTypeId,
userIds
}
this.$apis.emp.saveFollowerStaff(params).then(res => {
if (res) {
this.handleClose()
this.handleSearch()
}
})
},
handleSearch() {
var params = {
...JSON.parse(JSON.stringify(this.searchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum
}
this.$apis.emp.listFollowerStaffByPage(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
if (res.data && res.data.length == []) {
this.$refs.table.setTableHeightFun()
}
})
},
listEntFollowerType() {
this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => {
this.optionsType = [{ followName: '全部', id: '' }].concat(res)
})
},
handleDele(scope) {
this.$confirm('是否删除该员工?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$apis.emp.deleteFollowerStaff({ userId: scope.userId }).then(res => {
if (res) {
this.$message({
type: 'success',
message: '删除成功!'
})
}
this.handleSearch()
})
})
.catch(() => {})
}
},
mounted() {
this.listEntFollowerType()
this.handleSearch()
this.formHeight = document.documentElement.clientHeight - 230
}
}
</script>
<style scoped lang="scss">
.follow-header {
background: #ffffff;
line-height: 20px;
padding: 20px;
font-size: 15px;
color: rgba(0, 0, 0, 0.65);
position: relative;
p {
// width: 70%;
}
.follow-process-a {
text-decoration: underline;
line-height: 24px;
color: #5850ff;
cursor: pointer;
}
}
.follow-form {
min-height: calc(100% - 200px);
margin-top: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
/deep/ {
.el-form-item {
margin-right: 20px;
}
.el-button {
margin-left: 20px;
}
}
&-item {
position: relative;
.follow-form-jump {
position: absolute;
right: 0px;
margin-right: 0px;
}
}
}
.drawer-panel {
/deep/ .el-drawer__body {
overflow-y: auto;
}
}
</style>
\ No newline at end of file
<template>
<div className="scrm-main">
<div class="follow-header">
<p>
为不同的业务部门设置对应的跟进专员,方便后续业务部门创办相关的活动时能为其成员创建活动和发送企微消息,引导其跟进活动。跟进专员接收任务后可转发给客户/客户群,拥有“添加外部联系人权限”的员工才允许设置为跟进专员。
<a class="follow-process-a" @click="jumpUrl('https://open.work.weixin.qq.com/help2/pc/16853?person_id=1&is_tencent=')">
企微管理员为员工“设置外部联系人权限”流程
<i class="el-icon-d-arrow-right"></i>
</a>
</p>
</div>
<div class="follow-form" :style="{ 'min-height': formHeight + 'px' }">
<el-form :inline="true" :model="searchForm" class="follow-form-item">
<el-form-item label="跟进专员类型">
<el-select size="small" v-model="searchForm.followerTypeId" placeholder="请选择">
<el-option v-for="item in optionsType" :key="item.id" :label="item.followName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="员工搜索">
<el-input size="small" v-model="searchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch" size="small">查询</el-button>
</el-form-item>
<el-form-item class="follow-form-jump">
<GLButton fn="新增" size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</GLButton>
</el-form-item>
</el-form>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<template slot="optionBtns" slot-scope="scope">
<GLButton fn="删除" type="text" @click="handleDele(scope.scope)">删除</GLButton>
</template>
</GLTable>
</div>
<el-drawer class="drawer-panel" size="60%" title="添加跟进员工" :visible.sync="drawer" :direction="direction" :before-close="handleClose">
<add-sale ref="drawerForm" @closeDrawer="closeDrawer" @handSelectdEmp="handSelectdEmp"></add-sale>
</el-drawer>
</div>
</template>
<script>
import addSale from './components/addSale'
export default {
name: 'index',
components: {
addSale
},
data() {
return {
formHeight: 300,
drawer: false,
direction: 'rtl',
searchForm: {
followerTypeId: '',
staffName: ''
},
optionsType: [
{
value: '',
label: '全部'
},
{
value: '1',
label: '新车跟进专员'
},
{
value: '2',
label: '售后跟进专员'
}
],
scope: {
scope: ''
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
tableOption: true,
mutiSelectName: 'user',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
},
{
label: '手机号',
prop: 'staffPhone'
},
{
label: '首次开通时间',
prop: 'followerCreatedTime'
},
{
label: '是否有外部联系人权限',
prop: 'isAddOutsider',
formatter: cellValue => {
return {
0: '是',
1: '否'
}[cellValue.isAddOutsider]
}
},
{
label: '操作',
prop: 'optionBtns',
width: '140px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0
}
},
watch: {
drawer(val) {
if (!val) {
this.listEntFollowerType()
}
}
},
methods: {
jumpUrl(url) {
window.open(url)
},
openDrawer() {
this.drawer = true
this.$nextTick(() => {
this.$refs.drawerForm.init()
})
},
beforeSearchFn() {
return new Promise(resolve => {
// 调接口前,操作
resolve()
})
},
handleClose() {
this.drawer = false
},
closeDrawer() {
this.handleClose()
},
handSelectdEmp(followerTypeId, userIds) {
var params = {
followerTypeId,
userIds
}
this.$apis.emp.saveFollowerStaff(params).then(res => {
if (res) {
this.handleClose()
this.handleSearch()
}
})
},
handleSearch() {
var params = {
...JSON.parse(JSON.stringify(this.searchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum
}
this.$apis.emp.listFollowerStaffByPage(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
if (res.data && res.data.length == []) {
this.$refs.table.setTableHeightFun()
}
})
},
listEntFollowerType() {
this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => {
this.optionsType = [{ followName: '全部', id: '' }].concat(res)
})
},
handleDele(scope) {
this.$confirm('是否删除该员工?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$apis.emp.deleteFollowerStaff({ userId: scope.userId }).then(res => {
if (res) {
this.$message({
type: 'success',
message: '删除成功!'
})
}
this.handleSearch()
})
})
.catch(() => {})
}
},
mounted() {
this.listEntFollowerType()
this.handleSearch()
this.formHeight = document.documentElement.clientHeight - 230
}
}
</script>
<style scoped lang="scss">
.follow-header {
background: #ffffff;
line-height: 20px;
padding: 20px;
font-size: 15px;
color: rgba(0, 0, 0, 0.65);
position: relative;
p {
// width: 70%;
}
.follow-process-a {
text-decoration: underline;
line-height: 24px;
color: #5850ff;
cursor: pointer;
}
}
.follow-form {
min-height: calc(100% - 200px);
margin-top: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
/deep/ {
.el-form-item {
margin-right: 20px;
}
.el-button {
margin-left: 20px;
}
}
&-item {
position: relative;
.follow-form-jump {
position: absolute;
right: 0px;
margin-right: 0px;
}
}
}
.drawer-panel {
/deep/ .el-drawer__body {
overflow-y: auto;
}
}
</style>
\ No newline at end of file
<template>
<div className="scrm-main">
<div class="follow-header">
<p>
为不同的业务部门设置对应的跟进专员,方便后续业务部门创办相关的活动时能为其成员创建活动和发送企微消息,引导其跟进活动。跟进专员接收任务后可转发给客户/客户群,拥有“添加外部联系人权限”的员工才允许设置为跟进专员。
<a class="follow-process-a" @click="jumpUrl('https://open.work.weixin.qq.com/help2/pc/16853?person_id=1&is_tencent=')">
企微管理员为员工“设置外部联系人权限”流程
<i class="el-icon-d-arrow-right"></i>
</a>
</p>
</div>
<div class="follow-form" :style="{ 'min-height': formHeight + 'px' }">
<el-form :inline="true" :model="searchForm" class="follow-form-item">
<el-form-item label="跟进专员类型">
<el-select size="small" v-model="searchForm.followerTypeId" placeholder="请选择">
<el-option v-for="item in optionsType" :key="item.id" :label="item.followName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="员工搜索">
<el-input size="small" v-model="searchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch" size="small">查询</el-button>
</el-form-item>
<el-form-item class="follow-form-jump">
<GLButton fn="新增" size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</GLButton>
</el-form-item>
</el-form>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<div slot="optionBtns" slot-scope="scope">
<GLButton fn="删除" type="text" @click="handleDele(scope.scope)">删除</GLButton>
</div>
</GLTable>
</div>
<el-drawer class="drawer-panel" size="60%" title="添加跟进员工" :visible.sync="drawer" :direction="direction" :before-close="handleClose">
<add-sale ref="drawerForm" @closeDrawer="closeDrawer" @handSelectdEmp="handSelectdEmp"></add-sale>
</el-drawer>
</div>
</template>
<script>
import addSale from './components/addSale'
export default {
name: 'index',
components: {
addSale
},
data() {
return {
formHeight: 300,
drawer: false,
direction: 'rtl',
searchForm: {
followerTypeId: '',
staffName: ''
},
optionsType: [
{
value: '',
label: '全部'
},
{
value: '1',
label: '新车跟进专员'
},
{
value: '2',
label: '售后跟进专员'
}
],
scope: {
scope: ''
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
tableOption: true,
mutiSelectName: 'user',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
},
{
label: '手机号',
prop: 'staffPhone'
},
{
label: '首次开通时间',
prop: 'followerCreatedTime'
},
{
label: '是否有外部联系人权限',
prop: 'isAddOutsider',
formatter: cellValue => {
return {
0: '是',
1: '否'
}[cellValue.isAddOutsider]
}
},
{
label: '操作',
prop: 'optionBtns',
width: '140px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0
}
},
watch: {
drawer(val) {
if (!val) {
this.listEntFollowerType()
}
}
},
methods: {
jumpUrl(url) {
window.open(url)
},
openDrawer() {
this.drawer = true
this.$nextTick(() => {
this.$refs.drawerForm.init()
})
},
beforeSearchFn() {
return new Promise(resolve => {
// 调接口前,操作
resolve()
})
},
handleClose() {
this.drawer = false
},
closeDrawer() {
this.handleClose()
},
handSelectdEmp(followerTypeId, userIds) {
var params = {
followerTypeId,
userIds
}
this.$apis.emp.saveFollowerStaff(params).then(res => {
if (res) {
this.handleClose()
this.handleSearch()
}
})
},
handleSearch() {
var params = {
...JSON.parse(JSON.stringify(this.searchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum
}
this.$apis.emp.listFollowerStaffByPage(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
if (res.data && res.data.length == []) {
this.$refs.table.setTableHeightFun()
}
})
},
listEntFollowerType() {
this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => {
this.optionsType = [{ followName: '全部', id: '' }].concat(res)
})
},
handleDele(scope) {
this.$confirm('是否删除该员工?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$apis.emp.deleteFollowerStaff({ userId: scope.userId }).then(res => {
if (res) {
this.$message({
type: 'success',
message: '删除成功!'
})
}
this.handleSearch()
})
})
.catch(() => {})
}
},
mounted() {
this.listEntFollowerType()
this.handleSearch()
this.formHeight = document.documentElement.clientHeight - 230
}
}
</script>
<style scoped lang="scss">
.follow-header {
background: #ffffff;
line-height: 20px;
padding: 20px;
font-size: 15px;
color: rgba(0, 0, 0, 0.65);
position: relative;
p {
// width: 70%;
}
.follow-process-a {
text-decoration: underline;
line-height: 24px;
color: #5850ff;
cursor: pointer;
}
}
.follow-form {
min-height: calc(100% - 200px);
margin-top: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
/deep/ {
.el-form-item {
margin-right: 20px;
}
.el-button {
margin-left: 20px;
}
}
&-item {
position: relative;
.follow-form-jump {
position: absolute;
right: 0px;
margin-right: 0px;
}
}
}
.drawer-panel {
/deep/ .el-drawer__body {
overflow-y: auto;
}
}
</style>
\ No newline at end of file
<template>
<div className="scrm-main">
<div class="follow-header">
<p>
为不同的业务部门设置对应的跟进专员,方便后续业务部门创办相关的活动时能为其成员创建活动和发送企微消息,引导其跟进活动。跟进专员接收任务后可转发给客户/客户群,拥有“添加外部联系人权限”的员工才允许设置为跟进专员。
<a class="follow-process-a" @click="jumpUrl('https://open.work.weixin.qq.com/help2/pc/16853?person_id=1&is_tencent=')">
企微管理员为员工“设置外部联系人权限”流程
<i class="el-icon-d-arrow-right"></i>
</a>
</p>
</div>
<div class="follow-form" :style="{ 'min-height': formHeight + 'px' }">
<el-form :inline="true" :model="searchForm" class="follow-form-item">
<el-form-item label="跟进专员类型">
<el-select size="small" v-model="searchForm.followerTypeId" placeholder="请选择">
<el-option v-for="item in optionsType" :key="item.id" :label="item.followName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="员工搜索">
<el-input size="small" v-model="searchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch" size="small">查询</el-button>
</el-form-item>
<el-form-item class="follow-form-jump">
<GLButton fn="新增" size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</GLButton>
</el-form-item>
</el-form>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="删除" type="text" @click="handleDele(scope.scope)">删除</GLButton>
</template>
</GLTable>
</div>
<el-drawer class="drawer-panel" size="60%" title="添加跟进员工" :visible.sync="drawer" :direction="direction" :before-close="handleClose">
<add-sale ref="drawerForm" @closeDrawer="closeDrawer" @handSelectdEmp="handSelectdEmp"></add-sale>
</el-drawer>
</div>
</template>
<script>
import addSale from './components/addSale'
export default {
name: 'index',
components: {
addSale
},
data() {
return {
formHeight: 300,
drawer: false,
direction: 'rtl',
searchForm: {
followerTypeId: '',
staffName: ''
},
optionsType: [
{
value: '',
label: '全部'
},
{
value: '1',
label: '新车跟进专员'
},
{
value: '2',
label: '售后跟进专员'
}
],
scope: {
scope: ''
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
tableOption: true,
mutiSelectName: 'user',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
},
{
label: '手机号',
prop: 'staffPhone'
},
{
label: '首次开通时间',
prop: 'followerCreatedTime'
},
{
label: '是否有外部联系人权限',
prop: 'isAddOutsider',
formatter: cellValue => {
return {
0: '是',
1: '否'
}[cellValue.isAddOutsider]
}
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0
}
},
watch: {
drawer(val) {
if (!val) {
this.listEntFollowerType()
}
}
},
methods: {
jumpUrl(url) {
window.open(url)
},
openDrawer() {
this.drawer = true
this.$nextTick(() => {
this.$refs.drawerForm.init()
})
},
beforeSearchFn() {
return new Promise(resolve => {
// 调接口前,操作
resolve()
})
},
handleClose() {
this.drawer = false
},
closeDrawer() {
this.handleClose()
},
handSelectdEmp(followerTypeId, userIds) {
var params = {
followerTypeId,
userIds
}
this.$apis.emp.saveFollowerStaff(params).then(res => {
if (res) {
this.handleClose()
this.handleSearch()
}
})
},
handleSearch() {
var params = {
...JSON.parse(JSON.stringify(this.searchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum
}
this.$apis.emp.listFollowerStaffByPage(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
if (res.data && res.data.length == []) {
this.$refs.table.setTableHeightFun()
}
})
},
listEntFollowerType() {
this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => {
this.optionsType = [{ followName: '全部', id: '' }].concat(res)
})
},
handleDele(scope) {
this.$confirm('是否删除该员工?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$apis.emp.deleteFollowerStaff({ userId: scope.userId }).then(res => {
if (res) {
this.$message({
type: 'success',
message: '删除成功!'
})
}
this.handleSearch()
})
})
.catch(() => {})
}
},
mounted() {
this.listEntFollowerType()
this.handleSearch()
this.formHeight = document.documentElement.clientHeight - 230
}
}
</script>
<style scoped lang="scss">
.follow-header {
background: #ffffff;
line-height: 20px;
padding: 20px;
font-size: 15px;
color: rgba(0, 0, 0, 0.65);
position: relative;
p {
// width: 70%;
}
.follow-process-a {
text-decoration: underline;
line-height: 24px;
color: #5850ff;
cursor: pointer;
}
}
.follow-form {
min-height: calc(100% - 200px);
margin-top: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
/deep/ {
.el-form-item {
margin-right: 20px;
}
.el-button {
margin-left: 20px;
}
}
&-item {
position: relative;
.follow-form-jump {
position: absolute;
right: 0px;
margin-right: 0px;
}
}
}
.drawer-panel {
/deep/ .el-drawer__body {
overflow-y: auto;
}
}
</style>
\ No newline at end of file
<template>
<div className="scrm-main">
<div class="follow-header">
<p>
为不同的业务部门设置对应的跟进专员,方便后续业务部门创办相关的活动时能为其成员创建活动和发送企微消息,引导其跟进活动。跟进专员接收任务后可转发给客户/客户群,拥有“添加外部联系人权限”的员工才允许设置为跟进专员。
<a class="follow-process-a" @click="jumpUrl('https://open.work.weixin.qq.com/help2/pc/16853?person_id=1&is_tencent=')">
企微管理员为员工“设置外部联系人权限”流程
<i class="el-icon-d-arrow-right"></i>
</a>
</p>
</div>
<div class="follow-form" :style="{ 'min-height': formHeight + 'px' }">
<el-form :inline="true" :model="searchForm" class="follow-form-item">
<el-form-item label="跟进专员类型">
<el-select size="small" v-model="searchForm.followerTypeId" placeholder="请选择">
<el-option v-for="item in optionsType" :key="item.id" :label="item.followName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="员工搜索">
<el-input size="small" v-model="searchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch" size="small">查询</el-button>
</el-form-item>
<el-form-item class="follow-form-jump">
<GLButton fn="新增" size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</GLButton>
</el-form-item>
</el-form>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="删除" type="text" @click="handleDele(scope.scope)">删除</GLButton>
</template>
</GLTable>
</div>
<el-drawer class="drawer-panel" size="60%" title="添加跟进员工" :visible.sync="drawer" :direction="direction" :before-close="handleClose">
<add-sale ref="drawerForm" @closeDrawer="closeDrawer" @handSelectdEmp="handSelectdEmp"></add-sale>
</el-drawer>
</div>
</template>
<script>
import addSale from './components/addSale'
export default {
name: 'index',
components: {
addSale
},
data() {
return {
formHeight: 300,
drawer: false,
direction: 'rtl',
searchForm: {
followerTypeId: '',
staffName: ''
},
optionsType: [
{
value: '',
label: '全部'
},
{
value: '1',
label: '新车跟进专员'
},
{
value: '2',
label: '售后跟进专员'
}
],
scope: {
scope: ''
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
tableOption: true,
mutiSelectName: 'user',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
},
{
label: '手机号',
prop: 'staffPhone'
},
{
label: '首次开通时间',
prop: 'followerCreatedTime'
},
{
label: '是否有外部联系人权限',
prop: 'isAddOutsider',
formatter: cellValue => {
return {
0: '是',
1: '否'
}[cellValue.isAddOutsider]
}
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0
}
},
watch: {
drawer(val) {
if (!val) {
this.listEntFollowerType()
}
}
},
methods: {
jumpUrl(url) {
window.open(url)
},
openDrawer() {
this.drawer = true
this.$nextTick(() => {
this.$refs.drawerForm.init()
})
},
beforeSearchFn() {
return new Promise(resolve => {
// 调接口前,操作
resolve()
})
},
handleClose() {
this.drawer = false
},
closeDrawer() {
this.handleClose()
},
handSelectdEmp(followerTypeId, userIds) {
var params = {
followerTypeId,
userIds
}
this.$apis.emp.saveFollowerStaff(params).then(res => {
if (res) {
this.handleClose()
this.handleSearch()
}
})
},
handleSearch() {
var params = {
...JSON.parse(JSON.stringify(this.searchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum
}
this.$apis.emp.listFollowerStaffByPage(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
if (res.data && res.data.length == []) {
this.$refs.table.setTableHeightFun()
}
})
},
listEntFollowerType() {
this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => {
this.optionsType = [{ followName: '全部', id: '' }].concat(res)
})
},
handleDele(scope) {
this.$confirm('是否删除该员工?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$apis.emp.deleteFollowerStaff({ userId: scope.userId ,userOneId: scope.userOneId}).then(res => {
if (res) {
this.$message({
type: 'success',
message: '删除成功!'
})
}
this.handleSearch()
})
})
.catch(() => {})
}
},
mounted() {
this.listEntFollowerType()
this.handleSearch()
this.formHeight = document.documentElement.clientHeight - 230
}
}
</script>
<style scoped lang="scss">
.follow-header {
background: #ffffff;
line-height: 20px;
padding: 20px;
font-size: 15px;
color: rgba(0, 0, 0, 0.65);
position: relative;
p {
// width: 70%;
}
.follow-process-a {
text-decoration: underline;
line-height: 24px;
color: #5850ff;
cursor: pointer;
}
}
.follow-form {
min-height: calc(100% - 200px);
margin-top: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
/deep/ {
.el-form-item {
margin-right: 20px;
}
.el-button {
margin-left: 20px;
}
}
&-item {
position: relative;
.follow-form-jump {
position: absolute;
right: 0px;
margin-right: 0px;
}
}
}
.drawer-panel {
/deep/ .el-drawer__body {
overflow-y: auto;
}
}
</style>
\ No newline at end of file
<template>
<div className="scrm-main">
<div class="follow-header">
<p>
为不同的业务部门设置对应的跟进专员,方便后续业务部门创办相关的活动时能为其成员创建活动和发送企微消息,引导其跟进活动。跟进专员接收任务后可转发给客户/客户群,拥有“添加外部联系人权限”的员工才允许设置为跟进专员。
<a class="follow-process-a" @click="jumpUrl('https://open.work.weixin.qq.com/help2/pc/16853?person_id=1&is_tencent=')">
企微管理员为员工“设置外部联系人权限”流程
<i class="el-icon-d-arrow-right"></i>
</a>
</p>
</div>
<div class="follow-form" :style="{ 'min-height': formHeight + 'px' }">
<el-form :inline="true" :model="searchForm" class="follow-form-item">
<el-form-item label="跟进专员类型">
<el-select size="small" v-model="searchForm.followerTypeId" placeholder="请选择">
<el-option v-for="item in optionsType" :key="item.id" :label="item.followName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="员工搜索">
<el-input size="small" v-model="searchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch" size="small">查询</el-button>
</el-form-item>
<el-form-item class="follow-form-jump">
<GLButton fn="新增" size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</GLButton>
</el-form-item>
</el-form>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<GLButton fn="删除" type="text" @click="handleDele(scope.scope)">删除</GLButton>
</template>
</GLTable>
</div>
<el-drawer class="drawer-panel" size="60%" title="添加跟进员工" :visible.sync="drawer" :direction="direction" :before-close="handleClose">
<add-sale ref="drawerForm" @closeDrawer="closeDrawer" @handSelectdEmp="handSelectdEmp"></add-sale>
</el-drawer>
</div>
</template>
<script>
import addSale from './components/addSale'
export default {
name: 'index',
components: {
addSale
},
data() {
return {
formHeight: 300,
drawer: false,
direction: 'rtl',
searchForm: {
followerTypeId: '',
staffName: ''
},
optionsType: [
{
value: '',
label: '全部'
},
{
value: '1',
label: '新车跟进专员'
},
{
value: '2',
label: '售后跟进专员'
}
],
scope: {
scope: ''
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
tableOption: true,
mutiSelectName: 'user',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
},
{
label: '手机号',
prop: 'staffPhone'
},
{
label: '首次开通时间',
prop: 'followerCreatedTime'
},
{
label: '是否有外部联系人权限',
prop: 'isAddOutsider',
formatter: cellValue => {
return {
0: '是',
1: '否'
}[cellValue.isAddOutsider]
}
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0
}
},
watch: {
drawer(val) {
if (!val) {
this.listEntFollowerType()
}
}
},
methods: {
jumpUrl(url) {
window.open(url)
},
openDrawer() {
this.drawer = true
this.$nextTick(() => {
this.$refs.drawerForm.init()
})
},
beforeSearchFn() {
return new Promise(resolve => {
// 调接口前,操作
resolve()
})
},
handleClose() {
this.drawer = false
},
closeDrawer() {
this.handleClose()
},
handSelectdEmp(followerTypeId, userIds) {
var params = {
followerTypeId,
userIds
}
this.$apis.emp.saveFollowerStaff(params).then(res => {
if (res) {
this.handleClose()
this.handleSearch()
}
})
},
handleSearch() {
var params = {
...JSON.parse(JSON.stringify(this.searchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum
}
this.$apis.emp.listFollowerStaffByPage(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
if (res.data && res.data.length == []) {
this.$refs.table.setTableHeightFun()
}
})
},
listEntFollowerType() {
this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => {
this.optionsType = [{ followName: '全部', id: '' }].concat(res)
})
},
handleDele(scope) {
this.$confirm('是否删除该员工?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$apis.emp.deleteFollowerStaff({ userId: scope.userId, userOneId: scope.userOneId }).then(res => {
if (res) {
this.$message({
type: 'success',
message: '删除成功!'
})
}
this.handleSearch()
})
})
.catch(() => {})
}
},
mounted() {
this.listEntFollowerType()
this.handleSearch()
this.formHeight = document.documentElement.clientHeight - 230
}
}
</script>
<style scoped lang="scss">
.follow-header {
background: #ffffff;
line-height: 20px;
padding: 20px;
font-size: 15px;
color: rgba(0, 0, 0, 0.65);
position: relative;
p {
// width: 70%;
}
.follow-process-a {
text-decoration: underline;
line-height: 24px;
color: #5850ff;
cursor: pointer;
}
}
.follow-form {
min-height: calc(100% - 200px);
margin-top: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
/deep/ {
.el-form-item {
margin-right: 20px;
}
.el-button {
margin-left: 20px;
}
}
&-item {
position: relative;
.follow-form-jump {
position: absolute;
right: 0px;
margin-right: 0px;
}
}
}
.drawer-panel {
/deep/ .el-drawer__body {
overflow-y: auto;
}
}
</style>
\ No newline at end of file
<template>
<div class="output-panel">
<div id="echartOutput"></div>
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'echartOutput',
data() {
return {}
},
props: {
outputCircle: {
type: Object
}
},
watch: {
outputCircle: {
handler(value) {
console.log(value)
this.getOutput()
},
deep: true
}
},
methods: {
getOutput() {
var chartDom = document.getElementById('echartOutput')
var myChart = echarts.init(chartDom)
var option
option = {
tooltip: {
trigger: 'item',
formatter: function (params) {
console.log(params)
return '占比 ' + params.value + '%' + '<br>' + params.data.name + ': ' + params.data.ratio
}
},
legend: {
left: 'left',
top: '2%',
data: [
{
name: '精品升级',
icon: 'circle'
},
{
name: '商城',
icon: 'circle'
},
{
name: '会员套餐',
icon: 'circle'
},
{
name: '其他',
icon: 'circle'
}
]
},
color: ['#FE9C1C', '#716AFF', '#3DA4F4', '#5850FF', '#34911A'],
series: [
{
name: '访问来源',
type: 'pie',
radius: '70%',
center: ['50%', '53%'],
data: [
{ value: this.outputCircle.boutiqueUpgradeTotalOutputValueRadio, name: '精品升级', unit: '%', ratio: this.outputCircle.boutiqueUpgradeTotalOutputValue },
{ value: this.outputCircle.shopmallTotalOutputValueRadio, name: '商城', unit: '%', ratio: this.outputCircle.shopmallTotalOutputValue },
{ value: this.outputCircle.equityTotalOutputValueRadio, name: '会员套餐', unit: '%', ratio: this.outputCircle.equityTotalOutputValue },
{ value: this.outputCircle.otherTotalOutputValueRadio, name: '其他', unit: '%', ratio: this.outputCircle.otherTotalOutputValue }
],
itemStyle: {
normal: {
label: {
show: true
},
labelLine: {
show: true,
length: 10
}
}
}
}
]
}
option && myChart.setOption(option)
}
}
}
</script>
<style lang="scss" scoped>
.output-panel {
width: 100%;
}
#echartOutput {
height: 260px;
}
</style>>
\ No newline at end of file
<template>
<div class="output-panel">
<div id="echartOutput"></div>
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'echartOutput',
data() {
return {}
},
props: {
outputCircle: {
type: Object
}
},
watch: {
outputCircle: {
handler(value) {
console.log(value)
this.getOutput()
},
deep: true
}
},
methods: {
getOutput() {
var chartDom = document.getElementById('echartOutput')
var myChart = echarts.init(chartDom)
var option
option = {
tooltip: {
trigger: 'item',
formatter: function (params) {
console.log(params)
return '占比 ' + params.value + '%' + '<br>' + params.data.name + ': ' + params.data.ratio
}
},
legend: {
left: 'left',
top: '2%',
data: [
{
name: '精品升级',
icon: 'circle'
},
{
name: '商城',
icon: 'circle'
},
{
name: '会员套餐',
icon: 'circle'
},
{
name: '其他',
icon: 'circle'
}
]
},
color: ['#FE9C1C', '#716AFF', '#3DA4F4', '#5850FF', '#34911A'],
series: [
{
name: '访问来源',
type: 'pie',
radius: '70%',
center: ['50%', '53%'],
data: [
{ value: this.outputCircle.boutiqueUpgradeTotalOutputValueRadio, name: '精品升级', unit: '%', ratio: this.outputCircle.boutiqueUpgradeTotalOutputValue },
{ value: this.outputCircle.shopmallTotalOutputValueRadio, name: '商城', unit: '%', ratio: this.outputCircle.shopmallTotalOutputValue },
{ value: this.outputCircle.equityTotalOutputValueRadio, name: '会员套餐', unit: '%', ratio: this.outputCircle.equityTotalOutputValue },
{ value: this.outputCircle.otherTotalOutputValueRadio, name: '其他', unit: '%', ratio: this.outputCircle.otherTotalOutputValue }
],
itemStyle: {
normal: {
label: {
show: true
},
labelLine: {
show: true,
length: 10
}
}
}
}
]
}
option && myChart.setOption(option)
myChart.on("click", (res)=>{
console.log(res)
});
}
}
}
</script>
<style lang="scss" scoped>
.output-panel {
width: 100%;
}
#echartOutput {
height: 260px;
}
</style>>
\ No newline at end of file
<template>
<div class="output-panel">
<div id="echartOutput"></div>
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'echartOutput',
data() {
return {}
},
props: {
outputCircle: {
type: Object
}
},
watch: {
outputCircle: {
handler(value) {
this.getOutput()
},
deep: true
}
},
methods: {
getOutput() {
var chartDom = document.getElementById('echartOutput')
var myChart = echarts.init(chartDom)
var option
option = {
tooltip: {
trigger: 'item',
formatter: function (params) {
console.log(params)
return '占比 ' + params.value + '%' + '<br>' + params.data.name + ': ' + params.data.ratio
}
},
legend: {
left: 'left',
top: '2%',
data: [
{
name: '精品升级',
icon: 'circle'
},
{
name: '商城',
icon: 'circle'
},
{
name: '会员套餐',
icon: 'circle'
},
{
name: '其他',
icon: 'circle'
}
]
},
color: ['#FE9C1C', '#716AFF', '#3DA4F4', '#5850FF', '#34911A'],
series: [
{
name: '访问来源',
type: 'pie',
radius: '70%',
center: ['50%', '53%'],
data: [
{ value: this.outputCircle.boutiqueUpgradeTotalOutputValueRadio, name: '精品升级', unit: '%', ratio: this.outputCircle.boutiqueUpgradeTotalOutputValue },
{ value: this.outputCircle.shopmallTotalOutputValueRadio, name: '商城', unit: '%', ratio: this.outputCircle.shopmallTotalOutputValue },
{ value: this.outputCircle.equityTotalOutputValueRadio, name: '会员套餐', unit: '%', ratio: this.outputCircle.equityTotalOutputValue },
{ value: this.outputCircle.otherTotalOutputValueRadio, name: '其他', unit: '%', ratio: this.outputCircle.otherTotalOutputValue }
],
itemStyle: {
normal: {
label: {
show: true
},
labelLine: {
show: true,
length: 10
}
}
}
}
]
}
option && myChart.setOption(option)
myChart.on("click", (res)=>{
console.log(res)
});
}
}
}
</script>
<style lang="scss" scoped>
.output-panel {
width: 100%;
}
#echartOutput {
height: 260px;
}
</style>>
\ No newline at end of file
<template>
<div class="output-panel">
<div id="echartOutput"></div>
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'echartOutput',
data() {
return {}
},
props: {
outputCircle: {
type: Object
}
},
watch: {
outputCircle: {
handler(value) {
this.getOutput()
},
deep: true
}
},
methods: {
getOutput() {
var chartDom = document.getElementById('echartOutput')
var myChart = echarts.init(chartDom)
var option
option = {
tooltip: {
trigger: 'item',
formatter: function (params) {
return '占比 ' + params.value + '%' + '<br>' + params.data.name + ': ' + params.data.ratio
}
},
legend: {
left: 'left',
top: '2%',
data: [
{
name: '精品升级',
icon: 'circle'
},
{
name: '商城',
icon: 'circle'
},
{
name: '会员套餐',
icon: 'circle'
},
{
name: '其他',
icon: 'circle'
}
]
},
color: ['#FE9C1C', '#716AFF', '#3DA4F4', '#5850FF', '#34911A'],
series: [
{
name: '访问来源',
type: 'pie',
radius: '70%',
center: ['50%', '53%'],
data: [
{ value: this.outputCircle.boutiqueUpgradeTotalOutputValueRadio, name: '精品升级', unit: '%', ratio: this.outputCircle.boutiqueUpgradeTotalOutputValue },
{ value: this.outputCircle.shopmallTotalOutputValueRadio, name: '商城', unit: '%', ratio: this.outputCircle.shopmallTotalOutputValue },
{ value: this.outputCircle.equityTotalOutputValueRadio, name: '会员套餐', unit: '%', ratio: this.outputCircle.equityTotalOutputValue },
{ value: this.outputCircle.otherTotalOutputValueRadio, name: '其他', unit: '%', ratio: this.outputCircle.otherTotalOutputValue }
],
itemStyle: {
normal: {
label: {
show: true
},
labelLine: {
show: true,
length: 10
}
}
}
}
]
}
option && myChart.setOption(option)
myChart.on("click", (res)=>{
console.log(res)
});
}
}
}
</script>
<style lang="scss" scoped>
.output-panel {
width: 100%;
}
#echartOutput {
height: 260px;
}
</style>>
\ No newline at end of file
<template>
<div class="output-panel">
<div id="echartOutput"></div>
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'echartOutput',
data() {
return {}
},
props: {
outputCircle: {
type: Object
}
},
watch: {
outputCircle: {
handler(value) {
this.getOutput()
},
deep: true
}
},
methods: {
getOutput() {
var chartDom = document.getElementById('echartOutput')
var myChart = echarts.init(chartDom)
var option
option = {
tooltip: {
trigger: 'item',
formatter: function (params) {
return '占比 ' + params.value + '%' + '<br>' + params.data.name + ': ' + params.data.ratio
}
},
legend: {
left: 'left',
top: '2%',
data: [
{
name: '精品升级',
icon: 'circle'
},
{
name: '商城',
icon: 'circle'
},
{
name: '会员套餐',
icon: 'circle'
},
{
name: '其他',
icon: 'circle'
}
]
},
color: ['#FE9C1C', '#716AFF', '#3DA4F4', '#5850FF', '#34911A'],
series: [
{
name: '访问来源',
type: 'pie',
radius: '70%',
center: ['50%', '53%'],
data: [
{ value: this.outputCircle.boutiqueUpgradeTotalOutputValueRadio, name: '精品升级', unit: '%', ratio: this.outputCircle.boutiqueUpgradeTotalOutputValue },
{ value: this.outputCircle.shopmallTotalOutputValueRadio, name: '商城', unit: '%', ratio: this.outputCircle.shopmallTotalOutputValue },
{ value: this.outputCircle.equityTotalOutputValueRadio, name: '会员套餐', unit: '%', ratio: this.outputCircle.equityTotalOutputValue },
{ value: this.outputCircle.otherTotalOutputValueRadio, name: '其他', unit: '%', ratio: this.outputCircle.otherTotalOutputValue }
],
itemStyle: {
normal: {
label: {
show: true
},
labelLine: {
show: true,
length: 10
}
}
}
}
]
}
option && myChart.setOption(option)
myChart.on("click", (res)=>{
console.log(res.data.name)
});
}
}
}
</script>
<style lang="scss" scoped>
.output-panel {
width: 100%;
}
#echartOutput {
height: 260px;
}
</style>>
\ No newline at end of file
<template>
<div class="output-panel">
<div id="echartOutput"></div>
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'echartOutput',
data() {
return {}
},
props: {
outputCircle: {
type: Object
}
},
watch: {
outputCircle: {
handler(value) {
this.getOutput()
},
deep: true
}
},
methods: {
getOutput() {
var chartDom = document.getElementById('echartOutput')
var myChart = echarts.init(chartDom)
var option
option = {
tooltip: {
trigger: 'item',
formatter: function (params) {
return '占比 ' + params.value + '%' + '<br>' + params.data.name + ': ' + params.data.ratio
}
},
legend: {
left: 'left',
top: '2%',
data: [
{
name: '精品升级',
icon: 'circle'
},
{
name: '商城',
icon: 'circle'
},
{
name: '会员套餐',
icon: 'circle'
},
{
name: '其他',
icon: 'circle'
}
]
},
color: ['#FE9C1C', '#716AFF', '#3DA4F4', '#5850FF', '#34911A'],
series: [
{
name: '访问来源',
type: 'pie',
radius: '70%',
center: ['50%', '53%'],
data: [
{ value: this.outputCircle.boutiqueUpgradeTotalOutputValueRadio, name: '精品升级', unit: '%', ratio: this.outputCircle.boutiqueUpgradeTotalOutputValue },
{ value: this.outputCircle.shopmallTotalOutputValueRadio, name: '商城', unit: '%', ratio: this.outputCircle.shopmallTotalOutputValue },
{ value: this.outputCircle.equityTotalOutputValueRadio, name: '会员套餐', unit: '%', ratio: this.outputCircle.equityTotalOutputValue },
{ value: this.outputCircle.otherTotalOutputValueRadio, name: '其他', unit: '%', ratio: this.outputCircle.otherTotalOutputValue }
],
itemStyle: {
normal: {
label: {
show: true
},
labelLine: {
show: true,
length: 10
}
}
}
}
]
}
option && myChart.setOption(option)
myChart.on('click', res => {
let url
switch (res.data.name) {
case '精品升级':
url = '/services/inSale/upgrade'
break
case '商城':
url = '/marketing/orderManage/index'
break
case '会员套餐':
url = '/marketing/memberCenter/center'
break
}
this.history.push(url)
})
}
}
}
</script>
<style lang="scss" scoped>
.output-panel {
width: 100%;
}
#echartOutput {
height: 260px;
}
</style>>
\ No newline at end of file
<template>
<div class="output-panel">
<div id="echartOutput"></div>
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'echartOutput',
data() {
return {}
},
props: {
outputCircle: {
type: Object
}
},
watch: {
outputCircle: {
handler(value) {
this.getOutput()
},
deep: true
}
},
methods: {
getOutput() {
var chartDom = document.getElementById('echartOutput')
var myChart = echarts.init(chartDom)
var option
option = {
tooltip: {
trigger: 'item',
formatter: function (params) {
return '占比 ' + params.value + '%' + '<br>' + params.data.name + ': ' + params.data.ratio
}
},
legend: {
left: 'left',
top: '2%',
data: [
{
name: '精品升级',
icon: 'circle'
},
{
name: '商城',
icon: 'circle'
},
{
name: '会员套餐',
icon: 'circle'
},
{
name: '其他',
icon: 'circle'
}
]
},
color: ['#FE9C1C', '#716AFF', '#3DA4F4', '#5850FF', '#34911A'],
series: [
{
name: '访问来源',
type: 'pie',
radius: '70%',
center: ['50%', '53%'],
data: [
{ value: this.outputCircle.boutiqueUpgradeTotalOutputValueRadio, name: '精品升级', unit: '%', ratio: this.outputCircle.boutiqueUpgradeTotalOutputValue },
{ value: this.outputCircle.shopmallTotalOutputValueRadio, name: '商城', unit: '%', ratio: this.outputCircle.shopmallTotalOutputValue },
{ value: this.outputCircle.equityTotalOutputValueRadio, name: '会员套餐', unit: '%', ratio: this.outputCircle.equityTotalOutputValue },
{ value: this.outputCircle.otherTotalOutputValueRadio, name: '其他', unit: '%', ratio: this.outputCircle.otherTotalOutputValue }
],
itemStyle: {
normal: {
label: {
show: true
},
labelLine: {
show: true,
length: 10
}
}
}
}
]
}
option && myChart.setOption(option)
myChart.on('click', res => {
let url
switch (res.data.name) {
case '精品升级':
url = '/services/inSale/upgrade'
break
case '商城':
url = '/marketing/orderManage/index'
break
case '会员套餐':
url = '/marketing/memberCenter/center'
break
}
this.$history.push(url)
})
}
}
}
</script>
<style lang="scss" scoped>
.output-panel {
width: 100%;
}
#echartOutput {
height: 260px;
}
</style>>
\ No newline at end of file
<template>
<div class="output-panel">
<div id="echartOutput"></div>
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'echartOutput',
data() {
return {}
},
props: {
outputCircle: {
type: Object
}
},
watch: {
outputCircle: {
handler(value) {
this.getOutput()
},
deep: true
}
},
methods: {
getOutput() {
var chartDom = document.getElementById('echartOutput')
var myChart = echarts.init(chartDom)
var option
option = {
tooltip: {
trigger: 'item',
formatter: function (params) {
return '占比 ' + params.value + '%' + '<br>' + params.data.name + ': ' + params.data.ratio
}
},
legend: {
left: 'left',
top: '2%',
data: [
{
name: '精品升级',
icon: 'circle'
},
{
name: '商城',
icon: 'circle'
},
{
name: '会员套餐',
icon: 'circle'
},
{
name: '其他',
icon: 'circle'
}
]
},
color: ['#FE9C1C', '#716AFF', '#3DA4F4', '#5850FF', '#34911A'],
series: [
{
name: '访问来源',
type: 'pie',
radius: '70%',
center: ['50%', '53%'],
data: [
{ value: this.outputCircle.boutiqueUpgradeTotalOutputValueRadio, name: '精品升级', unit: '%', ratio: this.outputCircle.boutiqueUpgradeTotalOutputValue },
{ value: this.outputCircle.shopmallTotalOutputValueRadio, name: '商城', unit: '%', ratio: this.outputCircle.shopmallTotalOutputValue },
{ value: this.outputCircle.equityTotalOutputValueRadio, name: '会员套餐', unit: '%', ratio: this.outputCircle.equityTotalOutputValue },
{ value: this.outputCircle.otherTotalOutputValueRadio, name: '其他', unit: '%', ratio: this.outputCircle.otherTotalOutputValue }
],
itemStyle: {
normal: {
label: {
show: true
},
labelLine: {
show: true,
length: 10
}
}
}
}
]
}
option && myChart.setOption(option)
myChart.on('click', res => {
let url
switch (res.data.name) {
case '精品升级':
url = '/services/inSale/upgrade'
break
case '商城':
url = '/marketing/orderManage/index'
break
case '会员套餐':
url = '/marketing/memberCenter/setmeal'
break
}
this.$history.push(url)
})
}
}
}
</script>
<style lang="scss" scoped>
.output-panel {
width: 100%;
}
#echartOutput {
height: 260px;
}
</style>>
\ No newline at end of file
const path = require('path')
const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production'
const publicPath = node_env ? `/child/${packageName}/` : '/'
const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://cdn.bootcdn.net/'
const cdn = {
css: [
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`
],
js: [
`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`,
`${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`,
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`,
`${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`,
`${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`
]
}
module.exports = {
outputDir: `../dist/${packageName}`,
publicPath,
assetsDir: 'static',
productionSourceMap: false,
configureWebpack: {
resolve: {
alias: {
'@': resolve('src'),
assets: resolve('src/assets'),
views: resolve('src/views'),
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: {
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
const path = require('path')
const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production'
const publicPath = node_env ? `/child/${packageName}/` : '/'
const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const cdn = {
css: [
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`
],
js: [
`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`,
`${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`,
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`,
`${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`,
`${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`
]
}
module.exports = {
outputDir: `../dist/${packageName}`,
publicPath,
assetsDir: 'static',
productionSourceMap: false,
configureWebpack: {
resolve: {
alias: {
'@': resolve('src'),
assets: resolve('src/assets'),
views: resolve('src/views'),
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: {
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
const path = require('path')
const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production'
const publicPath = node_env ? `/child/${packageName}/` : '/'
const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const cdn = {
css: [
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`
],
js: [
`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`,
`${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`,
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`,
`${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`,
`${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`
]
}
module.exports = {
outputDir: `../dist/${packageName}`,
publicPath,
assetsDir: 'static',
productionSourceMap: false,
configureWebpack: {
resolve: {
alias: {
'@': resolve('src'),
assets: resolve('src/assets'),
views: resolve('src/views'),
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: {
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
const path = require('path')
const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production'
const publicPath = node_env ? `/child/${packageName}/` : '/'
const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://cdn.bootcdn.net/'
const cdn = {
css: [
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`
],
js: [
`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`,
`${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`,
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`,
`${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`,
`${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`
]
}
module.exports = {
outputDir: `../dist/${packageName}`,
publicPath,
assetsDir: 'static',
productionSourceMap: false,
configureWebpack: {
resolve: {
alias: {
'@': resolve('src'),
assets: resolve('src/assets'),
views: resolve('src/views'),
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: {
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
const path = require('path')
const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production'
const publicPath = node_env ? `/child/${packageName}/` : '/'
const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const cdn = {
css: [
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`
],
js: [
`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`,
`${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`,
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`,
`${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`,
`${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`
]
}
module.exports = {
outputDir: `../dist/${packageName}`,
publicPath,
assetsDir: 'static',
productionSourceMap: false,
configureWebpack: {
resolve: {
alias: {
'@': resolve('src'),
assets: resolve('src/assets'),
views: resolve('src/views'),
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: {
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
const plugins = ['@vue/babel-plugin-transform-vue-jsx']
// 生产环境移除console
if (process.env.NODE_ENV === 'production') { //在这判断 是否为 生产环境
plugins.push('transform-remove-console')
}
module.exports = {
plugins: plugins,
presets: ["@vue/cli-plugin-babel/preset"]
};
\ No newline at end of file
}
\ No newline at end of file
......@@ -12,7 +12,7 @@
"core-js": "^3.4.4",
"el-tree-transfer": "^2.2.6",
"glsx-common": "^1.4.6",
"glsx-components": "^1.2.3",
"glsx-components": "^1.2.8",
"glsx-table": "^1.0.9"
},
"devDependencies": {
......
......@@ -30,7 +30,7 @@ export default {
line-height: 36px;
}
#app {
background: #F4F5FA;
background: #f4f5fa;
padding: 0px 20px 20px 40px;
position: absolute;
box-sizing: border-box;
......

9.36 KB | W: | H:

97.1 KB | W: | H:

src/assets/img/qrcode.png
src/assets/img/qrcode.png
src/assets/img/qrcode.png
src/assets/img/qrcode.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -9,12 +9,13 @@ Vue.use(ElementUI)
Vue.use(GLTable)
// 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 '@/assets/css/common.scss'
let routes = []
let router = null
let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState }) {
export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) {
const { response, request, sign, secret } = await fetchConfig()
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
......@@ -22,10 +23,10 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
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.$setGlobalState = globalState.actions.setGlobalState
Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData)
subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase })
}
export async function mount(props) {
console.log('11111', props)
......
......@@ -3,64 +3,71 @@
</template>
<script>
import * as echarts from "echarts";
import * as echarts from 'echarts'
export default {
name: "linechart",
name: 'linechart',
props: {
echartId: {
type: String,
default: "",
default: ''
},
echartData: {
type: Array,
type: Array
}
},
data() {
return {};
return {}
},
watch: {
echartData(value) {
let data = value.map(item=>{
return item.customerCount
})
let dateTime = value.map(item=>{
let data
if (value[0].customerCount == 0 || value[0].customerCount) {
data = value.map(item => {
return item.customerCount
})
} else {
data = value.map(item => {
return item.outputValue
})
}
let dateTime = value.map(item => {
return item.dateTime
})
this.getChartTotal(dateTime,data);
this.getChartTotal(dateTime, data)
}
},
methods: {
getChartTotal(dateTime,lineData) {
var chartDom = document.getElementById(this.echartId);
var myChart = echarts.init(chartDom);
var option;
getChartTotal(dateTime, lineData) {
var chartDom = document.getElementById(this.echartId)
var myChart = echarts.init(chartDom)
var option
option = {
xAxis: {
type: "category",
type: 'category',
boundaryGap: false,
data: dateTime,
data: dateTime
},
yAxis: {
type: "value",
show: false,
type: 'value',
show: false
},
grid: {
bottom: 0,
top: 0,
top: 0
},
series: [
{
data: lineData,
type: "line",
symbol: "none",
color: "#5850FF",
type: 'line',
symbol: 'none',
color: '#5850FF',
areaStyle: {
color: {
type: "linear",
type: 'linear',
x: 0,
y: 0,
x2: 0,
......@@ -68,24 +75,24 @@ export default {
colorStops: [
{
offset: 0,
color: "#5850FF", // 100% 处的颜色
color: '#5850FF' // 100% 处的颜色
},
{
offset: 1,
color: "#FFFFFF", // 0% 处的颜色
},
color: '#FFFFFF' // 0% 处的颜色
}
],
global: false, // 缺省为 false
},
},
},
],
};
global: false // 缺省为 false
}
}
}
]
}
option && myChart.setOption(option);
},
option && myChart.setOption(option)
}
}
};
}
</script>
<style scoped lang="scss">
......
......@@ -45,7 +45,9 @@
<div class="summary-progress-bar">
<div class="summary-progress-barout"></div>
<div class="summary-progress-barin" :style="{ width: (100 * item.custCount) / custSortMax + '%' }"></div>
<div class="summary-progress-avg" :style="{ width: (100 * custAvergCount) / custSortMax + '%' }"></div>
<el-tooltip class="item" effect="dark" :content="'门店企微客户数均值:' + custAvergCount" placement="top">
<div class="summary-progress-avg" :style="{ width: (100 * custAvergCount) / custSortMax + '%' }"></div>
</el-tooltip>
</div>
<div class="summary-progress-value">{{ item.custCount }}</div>
</div>
......@@ -99,6 +101,9 @@
<div class="summary-progress-bar">
<div class="summary-progress-barout"></div>
<div class="summary-progress-barin" :style="{ width: (100 * item.totalOutputValue) / totalOutputValueMax + '%' }"></div>
<el-tooltip class="item" effect="dark" :content="'各门店产值均值:' + averageValue" placement="top">
<div class="summary-progress-avg" :style="{ width: (100 * averageValue) / totalOutputValueMax + '%' }"></div>
</el-tooltip>
</div>
<div class="summary-progress-value">{{ item.totalOutputValue }}</div>
</div>
......@@ -127,6 +132,7 @@ export default {
rankHeight: 0,
custSortMax: 0,
totalOutputValueMax: 0,
averageValue: 0,
custAvergCount: 0,
chartStatus: false,
radioStore: '1',
......@@ -142,12 +148,12 @@ export default {
},
watch: {
monthValue() {
if(this.radioOutput == 3) {
if (this.radioOutput == 3) {
let year = this.monthValue.split('年')
let month = year[1].split('月')
this.getOutput(year[0] + '-' + month[0] + '-01', util.getCurrentMonthLast(year[0] + '-' + month[0]))
}
},
}
},
methods: {
jumpStore() {
......@@ -177,9 +183,10 @@ export default {
.then(res => {
this.outputRank = res
this.totalOutputValueMax = 0
this.averageValue = res ? res[0].averageValue : 0
this.outputRank.forEach(item => {
if (item.totalOutputValue >= this.totalOutputValueMax) {
this.totalOutputValueMax = item.totalOutputValue
this.totalOutputValueMax = item.totalOutputValue ? item.totalOutputValue : 1
}
})
})
......@@ -206,17 +213,18 @@ export default {
}
this.custSortMax = 0
this.custSortList.forEach(item => {
if (item.addEntmicroCount >= this.custSortMax) {
this.custSortMax = item.addEntmicroCount
if (item.custCount >= this.custSortMax) {
this.custSortMax = item.custCount ? item.custCount : 1
}
})
console.log(this.custSortMax)
})
}
},
mounted() {
let clientHeight = document.documentElement.clientHeight
this.rankHeight = clientHeight - 486
this.rankHeight = clientHeight - 490
this.getSort()
this.getOutput()
}
......@@ -247,6 +255,9 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
span {
font-weight: 600;
}
}
.summary-time-select {
position: relative;
......
......@@ -4,63 +4,63 @@
<div class="summary-title">汇总</div>
<div class="summary-time">
<span>统计截止至</span>
<el-date-picker @change="changeTime" value-format="yyyy-MM-dd" v-model="summaryTime" type="date" placeholder="选择日期" :clearable="false" :picker-options="pickerOptions"></el-date-picker>
<el-date-picker @change="changeTime" 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-customer-panel">
<div class="summary-item">
<div class="summary-item-title">
<span>客户总数</span>
<span>门店客户总数</span>
<el-popover placement="top" title="说明" width="400" trigger="hover" content="累计至统计截止时间,旗下各门店的客户数之和,按手机号和企微去重。数据模块中的缩略面积图为每日新增客户数最近30天的趋势图。">
<img src="@/assets/img/question.png" slot="reference" />
</el-popover>
</div>
<div class="summary-item-total">{{ customerCount ? customerCount : '- -' }}</div>
<div class="summary-item-total">{{ customerCount ? customerCount : '--' }}</div>
<div class="summary-item-number">
未加企微客户数:
<span>{{ notAddEntmicroCount ? notAddEntmicroCount : '- -' }}</span>
<span>{{ notAddEntmicroCount ? notAddEntmicroCount : '--' }}</span>
</div>
<linechart :echartId="echartId1" :echartData="custAddList" v-if="!custAddListEmpty"></linechart>
<div class="chart-empty-null" v-if="custAddListEmpty">暂无数据</div>
</div>
<div class="summary-item">
<div class="summary-item-title">
<span>企微客户总数</span>
<span>门店企微客户总数</span>
<el-popover placement="top" title="说明" width="400" trigger="hover" content="累计至统计截止时间,旗下各门店已加企业微信的客户数之和,客户按企业微信号和手机号去重。数据模块中的缩略面积图为每日新增企微客户数最近30天的趋势图。">
<img src="@/assets/img/question.png" slot="reference" />
</el-popover>
</div>
<div class="summary-item-total">
{{ addEntmicroCount ? addEntmicroCount : '- -' }}
{{ addEntmicroCount ? addEntmicroCount : '--' }}
</div>
<div class="summary-item-number">
当日新增:
<span>{{ newEntmicroCount ? newEntmicroCount : '- -' }}</span>
<span>{{ newEntmicroCount ? newEntmicroCount : '--' }}</span>
</div>
<linechart :echartId="echartId2" :echartData="custEntmicroAdds" v-if="!custEntmicroAddsEmpty"></linechart>
<div class="chart-empty-null" v-if="custEntmicroAddsEmpty">暂无数据</div>
</div>
<div class="summary-item">
<div class="summary-item-title">
<span>企微流失客户数</span>
<span>门店企微流失客户数</span>
<el-popover placement="top" title="说明" width="400" trigger="hover" content="累计至统计截止时间,旗下各门店客户中,删除或者拉黑企业微信的人数之和,客户按企业微信号和手机号去重。数据模块中的缩略面积图为每日流失客户数最近30天的趋势图。">
<img src="@/assets/img/question.png" slot="reference" />
</el-popover>
</div>
<div class="summary-item-total">
{{ entmicroLoseCount ? entmicroLoseCount : '- -' }}
{{ entmicroLoseCount ? entmicroLoseCount : '--' }}
</div>
<div class="summary-item-number">
当日新增:
<span>{{ todayEntmicroLoseCount ? todayEntmicroLoseCount : '- -' }}</span>
<span>{{ todayEntmicroLoseCount ? todayEntmicroLoseCount : '--' }}</span>
</div>
<linechart :echartId="echartId3" :echartData="custLoseList" v-if="!custLoseListEmpty"></linechart>
<div class="chart-empty-null" v-if="custLoseListEmpty">暂无数据</div>
</div>
<div class="summary-item">
<div class="summary-item-title">
<span>总产值</span>
<el-popover placement="top" title="说明" width="400" trigger="hover" content="累计至统计截止时间,旗下各门店产值之和。产值统计的业务包括:精品升级、直播业务(这一期没有不做)、商城(秒杀、商品、券)、门店会员服务套餐。数据模块中的缩略面积图为每日产值最近30天的趋势图。">
<span>门店总产值</span>
<el-popover placement="top" title="说明" width="400" trigger="hover" content="累计至统计截止时间,旗下各门店产值之和。产值统计的业务包括:精品升级、商城(秒杀、商品、券)、门店会员服务套餐。数据模块中的缩略面积图为每日产值最近30天的趋势图。">
<img src="@/assets/img/question.png" slot="reference" />
</el-popover>
</div>
......@@ -176,7 +176,7 @@ export default {
})
this.totalOutputValueEmpty = outputList.every(item => item == 0)
this.$nextTick(() => {
this.outputList = outputList
this.outputList = outputValueTotalList
})
let outputListHalf = outputValueTotalList.slice(15)
......@@ -187,7 +187,7 @@ export default {
return item.monthAverg
})
let radioOutput = outputListHalf.map(item => {
return item.ratio
return item.radio
})
this.$apis.home.getChart({ day: 30, date: this.summaryTime }).then(res => {
const custAddList_30 = res.custAddList
......@@ -245,7 +245,7 @@ export default {
if (params.seriesName == '每日新增产值') {
circleColor = '#2CCA74'
Averg = outputAverg[params.dataIndex]
i_name = radioOutput[params.dataIndex] ? 'el-icon-top' : 'el-icon-bottom'
i_name = radioOutput[params.dataIndex] == 1 ? 'el-icon-top' : radioOutput[params.dataIndex] == -1 ?'el-icon-bottom': ''
}
if (params.seriesName == '每日企微流失客户') {
circleColor = '#FF6D00'
......@@ -344,7 +344,7 @@ export default {
color: #3a3a3a;
justify-content: space-between;
align-items: center;
padding: 10px 20px;
padding: 20px;
margin-bottom: 20px;
.summary-title {
color: #3a3a3a;
......
......@@ -8,71 +8,42 @@
<div
class="step-panel"
:style="{
'min-height': boxHeight + 'px',
'min-height': boxHeight + 'px'
}"
>
<div class="step-right scrm-box-f">
<div class="enterprise-step-box">
<div class="el-steps el-steps--horizontal">
<div
class="el-step is-horizontal"
style="flex-basis: 50%; margin-right: 0px"
>
<div class="el-step is-horizontal" style="flex-basis: 50%; margin-right: 0px">
<div class="el-step__head" :class="{ 'is-finish': active == 1 }">
<div class="el-step__line" style="margin-right: 0px">
<i
class="el-step__line-inner"
style="transition-delay: 0ms; border-width: 0px; width: 0%"
></i>
<i class="el-step__line-inner" style="transition-delay: 0ms; border-width: 0px; width: 0%"></i>
</div>
<div class="el-step__icon is-text">
<div class="el-step__icon-inner">1</div>
</div>
<div class="el-step__main el-step__desc">
<div class="el-step__title" :class="{ 'is-finish': active == 1 }">
第一步
</div>
<div
class="el-step__description"
:class="{ 'is-finish': active == 1 }"
>
管理员授权绑定企业
</div>
<div class="el-step__title" :class="{ 'is-finish': active == 1 }">第一步</div>
<div class="el-step__description" :class="{ 'is-finish': active == 1 }">管理员授权绑定企业</div>
</div>
</div>
</div>
<div
class="el-step is-horizontal"
style="flex-basis: 50%; margin-right: 0px"
>
<div class="el-step is-horizontal" style="flex-basis: 50%; margin-right: 0px">
<div class="el-step__head" :class="{ 'is-finish': active == 2 }">
<div class="el-step__line" style="margin-right: 0px">
<i
class="el-step__line-inner"
style="transition-delay: -150ms; border-width: 0px; width: 0%"
></i>
<i class="el-step__line-inner" style="transition-delay: -150ms; border-width: 0px; width: 0%"></i>
</div>
<div class="el-step__icon is-text">
<!---->
<div class="el-step__icon-inner">2</div>
</div>
<div class="el-step__main el-step__desc">
<div class="el-step__title" :class="{ 'is-finish': active == 2 }">
第二步
</div>
<div
class="el-step__description"
:class="{ 'is-finish': active == 2 }"
>
管理员授权配置
</div>
<div class="el-step__title" :class="{ 'is-finish': active == 2 }">第二步</div>
<div class="el-step__description" :class="{ 'is-finish': active == 2 }">管理员授权配置</div>
</div>
</div>
</div>
<div
class="el-step is-horizontal is-flex"
style="flex-basis: 50%; max-width: 33.3333%"
>
<div class="el-step is-horizontal is-flex" style="flex-basis: 50%; max-width: 33.3333%">
<div class="el-step__head" :class="{ 'is-finish': active == 3 }">
<div class="el-step__line"><i class="el-step__line-inner"></i></div>
<div class="el-step__icon is-text">
......@@ -80,15 +51,8 @@
<div class="el-step__icon-inner">3</div>
</div>
<div class="el-step__main el-step__desc">
<div class="el-step__title" :class="{ 'is-finish': active == 3 }">
第三步
</div>
<div
class="el-step__description"
:class="{ 'is-finish': active == 3 }"
>
配置完成
</div>
<div class="el-step__title" :class="{ 'is-finish': active == 3 }">第三步</div>
<div class="el-step__description" :class="{ 'is-finish': active == 3 }">配置完成</div>
</div>
</div>
</div>
......@@ -97,26 +61,19 @@
class="config-box"
v-if="active == 1"
:style="{
'min-height': boxHeight - 140 + 'px',
'min-height': boxHeight - 140 + 'px'
}"
>
<div>
<div class="config-box-h1">
初次使用客户,需要企业微信超级管理员授权绑定企业,具体如下:
</div>
<div class="config-box-h1">初次使用客户,需要企业微信超级管理员授权绑定企业,具体如下:</div>
<div class="config-box-h2">
未注册企业微信的用户,请先前往企业微信的官网进行注册。<a
@click="
jumpUrl(
'https://work.weixin.qq.com/wework_admin/loginpage_wx?from=myhome'
)
"
>企业微信官网>></a
>
</div>
<div class="config-box-h3">
1.企业微信超级管理员扫码授权接入嘀加企微管家
未注册企业微信的用户,请先前往企业微信的官网进行注册。
<a @click="jumpUrl('https://work.weixin.qq.com/wework_admin/loginpage_wx?from=myhome')">
企业微信官网
<i class="el-icon-d-arrow-right"></i>
</a>
</div>
<div class="config-box-h3">1.企业微信超级管理员扫码授权接入嘀加企微管家</div>
<div class="config-box-qrcode" style="width: 50%" v-if="qrcodeUrl">
<div class="config-use-qrcode">
<img :src="qrcodeUrl" />
......@@ -125,17 +82,10 @@
<i class="el-icon-circle-check"></i>
<div>完成</div>
</div>
<div
class="qrcode-status qrcode-status-ing"
v-if="checkStatus == 'ing'"
>
<div class="qrcode-status qrcode-status-ing" v-if="checkStatus == 'ing'">
<i class="el-icon-loading"></i>
</div>
<div
class="qrcode-status"
v-if="checkStatus == 'expired'"
@click="handleRefresh"
>
<div class="qrcode-status" v-if="checkStatus == 'expired'" @click="handleRefresh">
<i class="el-icon-refresh"></i>
<div>刷新</div>
</div>
......@@ -154,48 +104,32 @@
</div>
</div>
</div>
<div
class="config-form-panel"
v-if="applicationList && applicationList.length > 0"
>
<div class="config-form-panel" v-if="applicationList && applicationList.length > 0">
<div>
<div class="config-box-h3" style="margin-bottom: 20px">
2.填写嘀加企微管家门店秘钥secret
<div class="config-box-h3 text-bettwn" style="margin-bottom: 20px">
<span>2.填写嘀加企微管家门店秘钥secret</span>
<div class="config-box-link">
<span @click="jumpUrl('http://qcimg01.glsx.net/upload/temporary/illustrate.html')">
查看如何获取
<i class="el-icon-d-arrow-right"></i>
</span>
</div>
</div>
<div class="config-box-form">
<div
class="config-box-input"
v-for="(item, index) in applicationList"
:key="index"
>
<div class="config-box-input" v-for="(item, index) in applicationList" :key="index">
<label v-if="item.appCode == 'DJQWGJ'">*Secret:</label>
<label v-if="item.appCode == 'WBLXR'">*客户联系Secret:</label>
<label v-if="item.appCode == 'TXLTBZS'">*通讯录Secret:</label>
<input
type="text"
:readonly="toStatus"
v-model="item.appSecret"
class="config-item-input"
/>
</div>
<div class="config-box-link">
<span
@click="
jumpUrl(
'http://qcimg01.glsx.net/upload/temporary/illustrate.html'
)
"
>查看如何获取 >></span
>
<input type="text" :readonly="toStatus" v-model="item.appSecret" class="config-item-input" />
</div>
</div>
</div>
<div class="config-box-qrcode">
<div class="config-box-h3">如未成功,请加我微信帮您接入</div>
<div class="config-use-qrcode">
<img src="@/assets/img/qrcode.png" alt="" />
<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/lianghh.png" alt="" />
</div>
<div class="config-use-desc">微信号:458711332</div>
<div class="config-use-desc">联系电话:18824231191</div>
</div>
</div>
</div>
......@@ -204,73 +138,50 @@
class="config-box config-box-second"
v-if="active == 2"
:style="{
'min-height': boxHeight - 160 + 'px',
'min-height': boxHeight - 160 + 'px'
}"
>
<div>
<div class="config-box-h1">
如若完整使用本系统,还需要企业微信超级管理员完成以下授权配置。
</div>
<div class="config-box-h1">如若完整使用本系统,还需要企业微信超级管理员完成以下授权配置。</div>
<div class="config-form-panel">
<div>
<div class="config-box-h3">通讯录接收事件服务配置</div>
<div class="config-box-h3 text-bettwn">
<span>通讯录接收事件服务配置</span>
<span class="config-box-link" @click="jumpUrl('http://qcimg01.glsx.net/upload/temporary/illustration.html')">
查看如何配置
<i class="el-icon-d-arrow-right"></i>
</span>
</div>
<div class="config-box-form">
<div class="config-box-input">
<label>*URL:</label>
<input
type="text"
readonly
v-model="callbackUrl"
class="config-item-input"
/>
<span @click="cloneText(callbackUrl)"
>复制 <img src="@/assets/img/enterprise/clone.png"
/></span>
<input type="text" readonly v-model="callbackUrl" class="config-item-input" />
<span @click="cloneText(callbackUrl)">
复制
<img src="@/assets/img/enterprise/clone.png" />
</span>
</div>
<div class="config-box-input">
<label>*Token:</label>
<input
type="text"
readonly
v-model="token"
class="config-item-input"
/>
<span @click="cloneText(token)"
>复制 <img src="@/assets/img/enterprise/clone.png"
/></span>
<input type="text" readonly v-model="token" class="config-item-input" />
<span @click="cloneText(token)">
复制
<img src="@/assets/img/enterprise/clone.png" />
</span>
</div>
<div class="config-box-input">
<label>*EncodingAESKey:</label>
<input
type="text"
readonly
v-model="encodingAesKey"
class="config-item-input"
/>
<span @click="cloneText(encodingAesKey)"
>复制 <img src="@/assets/img/enterprise/clone.png"
/></span>
<input type="text" readonly v-model="encodingAesKey" class="config-item-input" />
<span @click="cloneText(encodingAesKey)">
复制
<img src="@/assets/img/enterprise/clone.png" />
</span>
</div>
<div class="config-box-link step-link">
<span
@click="
jumpUrl(
'http://qcimg01.glsx.net/upload/temporary/illustration.html'
)
"
>查看如何配置 >></span
>
<el-button
type="primary"
size="mini"
class="step-jump"
@click="
jumpUrl(
'https://work.weixin.qq.com/wework_admin/loginpage_wx?from=myhome'
)
"
>打开企业微信</el-button
>
<span>
</span>
<el-button type="primary" size="mini" class="step-jump" @click="jumpUrl('https://work.weixin.qq.com/wework_admin/loginpage_wx?from=myhome')">打开企业微信</el-button>
</div>
</div>
</div>
......@@ -281,7 +192,7 @@
class="config-box config-box-third"
v-if="active == 3"
:style="{
'min-height': boxHeight - 110 + 'px',
'min-height': boxHeight - 110 + 'px'
}"
>
<div>
......@@ -291,26 +202,16 @@
<img src="@/assets/img/enterprise/config.png" />
</div>
</div>
<div class="config-box-h4" v-if="$globalState.session.merchantModel == 2">
进入首页即可开始您的营销获客之旅。
</div>
<div class="config-box-h4" v-if="$globalState.session.merchantModel == 1">
配置完成后,您需先创建您的门店,门店关联企微后,方可使用
</div>
<div class="config-box-h4" v-if="$globalState.session.merchantModel == 2">进入首页即可开始您的营销获客之旅。</div>
<div class="config-box-h4" v-if="$globalState.session.merchantModel == 1">配置完成后,您需先创建您的门店,门店关联企微后,方可使用</div>
<div style="margin-top: 15px">
<div
class="step-jump-home"
@click="jumpHome"
v-if="$globalState.session.merchantModel == 2"
>
前往首页>>
<div class="step-jump-home" @click="jumpHome" v-if="$globalState.session.merchantModel == 2">
前往首页
<i class="el-icon-d-arrow-right"></i>
</div>
<div
class="step-jump-home"
@click="jumpStore"
v-if="$globalState.session.merchantModel == 1"
>
去创建门店>>
<div class="step-jump-home" @click="jumpStore" v-if="$globalState.session.merchantModel == 1">
去创建门店
<i class="el-icon-d-arrow-right"></i>
</div>
</div>
</div>
......@@ -322,60 +223,28 @@
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px',
width: footerWidth + 'px'
}"
>
<el-button type="primary" v-show="active == 2" @click="handlePrev"
>上一步</el-button
>
<el-button type="primary" v-show="active == 3" @click="handlePrev"
>返回上一步</el-button
>
<el-button
type="primary"
v-show="
active == 1 && statusQrcode != 'SUCCESS' && statusQrcode != 'SERVER_CHECK'
"
@click="handleNext"
>确定</el-button
>
<el-button
type="primary"
v-show="
active == 1 && (statusQrcode == 'SUCCESS' || statusQrcode == 'SERVER_CHECK')
"
@click="handleNext"
>下一步</el-button
>
<el-button type="primary" v-show="active == 2" @click="handlePrev">上一步</el-button>
<el-button type="primary" v-show="active == 3" @click="handlePrev">返回上一步</el-button>
<el-button type="primary" v-show="active == 1 && statusQrcode != 'SUCCESS' && statusQrcode != 'SERVER_CHECK'" @click="handleNext">确定</el-button>
<el-button type="primary" v-show="active == 1 && (statusQrcode == 'SUCCESS' || statusQrcode == 'SERVER_CHECK')" @click="handleNext">下一步</el-button>
<el-button
type="primary"
v-show="active == 2 && statusQrcode != 'SUCCESS'"
@click="handleNext"
>确定</el-button
>
<el-button
type="primary"
v-show="active == 2 && statusQrcode == 'SUCCESS'"
@click="handleNext"
>下一步</el-button
>
<el-button type="primary" v-show="active == 2 && statusQrcode != 'SUCCESS'" @click="handleNext">确定</el-button>
<el-button type="primary" v-show="active == 2 && statusQrcode == 'SUCCESS'" @click="handleNext">下一步</el-button>
</div>
</div>
<div class="enterprise-dialog" v-show="dialogStatus">
<div class="enterprise-dialog-warpper">
<div class="dialog-close-btn" @click="dialogStatus = false">
{{ dialogTime }}s
</div>
<div class="dialog-close-btn" @click="dialogStatus = false">{{ dialogTime }}s</div>
<div class="enterprise-warpper-logo">
<img src="@/assets/img/enterprise/wechat.png" />
<span>></span>
<span>></span>
<img src="@/assets/img/enterprise/dj.png" />
</div>
<div class="enterprise-warpper-desc">
使用嘀加SCRM系统,需先接入企业微信,成功接入后系统后台功能方可使用!
</div>
<div class="enterprise-warpper-desc">使用嘀加SCRM系统,需先接入企业微信,成功接入后系统后台功能方可使用!</div>
<div class="dialog-footer">
<el-button type="primary" @click="dialogStatus = false">立即接入</el-button>
</div>
......@@ -385,105 +254,105 @@
</template>
<script>
import util from "@/utils/util";
import util from '@/utils/util'
export default {
name: "index",
name: 'index',
data() {
return {
loading: false,
boxHeight: 0,
toStatus: false,
token: "",
callbackUrl: "",
encodingAesKey: "",
checkStatus: "never",
token: '',
callbackUrl: '',
encodingAesKey: '',
checkStatus: 'never',
entryStatus: true,
qrcodeUrl: "",
qrcodeUrl: '',
dialogTime: 5,
active: 0,
dialogStatus: false,
Secret: "",
SecretContact: "",
SecretCode: "",
Secret: '',
SecretContact: '',
SecretCode: '',
timer: null,
timerQrcode: null,
statusQrcode: "",
URL: "",
statusQrcode: '',
URL: '',
nextStatus: false,
Token: "",
Secret_1: "",
Secret_2: "",
Secret_3: "",
Token: '',
Secret_1: '',
Secret_2: '',
Secret_3: '',
applicationList: [],
checkResult: 0,
};
checkResult: 0
}
},
watch: {
active(val) {
if (val == 3) {
this.toStatus = true;
this.toStatus = true
}
},
}
},
methods: {
jumpUrl(url) {
window.open(url);
window.open(url)
},
jumpHome() {
this.$router.push("/home/index?id=2");
this.$router.push('/home/index?id=2')
},
jumpStore() {
this.$history.push("/settings/account/index");
this.$history.push('/settings/account/index')
},
handleGetSecret() {
for (let i in this.applicationList) {
if (this.applicationList[i].appSecret === "" || this.applicationList[i].appSecret === null) {
if (this.applicationList[i].appSecret === '' || this.applicationList[i].appSecret === null) {
this.$message({
message: "请填写Secret",
type: "error",
});
return;
message: '请填写Secret',
type: 'error'
})
return
}
}
if (this.checkStatus != "succ" && this.qrcodeUrl) {
if (this.checkStatus != 'succ' && this.qrcodeUrl) {
this.$message({
message: "请联系超级管理员用企业微信扫码接入",
type: "error",
});
return;
message: '请联系超级管理员用企业微信扫码接入',
type: 'error'
})
return
}
let params = {
apps: this.applicationList,
};
this.$apis.ww.getSecret(params).then((res) => {
apps: this.applicationList
}
this.$apis.ww.getSecret(params).then(res => {
if (res) {
this.statusQrcode == "SUCCESS" ? (this.active = 3) : (this.active = 2);
this.statusQrcode == 'SUCCESS' ? (this.active = 3) : (this.active = 2)
}
});
})
},
cloneText(msg) {
util.cloneText(msg);
util.cloneText(msg)
this.$message({
message: "复制成功",
type: "success",
});
message: '复制成功',
type: 'success'
})
},
handleNext() {
if (this.active == 1) {
if (this.statusQrcode == "SUCCESS") {
this.nextStatus ? (this.active = 2) : (this.active = 3);
if (this.statusQrcode == 'SUCCESS') {
this.nextStatus ? (this.active = 2) : (this.active = 3)
} else {
this.handleGetSecret();
this.handleGetSecret()
}
return;
return
}
if (this.active == 2) {
if (this.statusQrcode == "SUCCESS") {
this.active++;
if (this.statusQrcode == 'SUCCESS') {
this.active++
} else {
this.getStatus();
this.getStatus()
// this.$message({
// message: "消息服务器未验证",
// type: "warning",
......@@ -493,141 +362,141 @@ export default {
},
handlePrev() {
if (this.active == 3) {
this.nextStatus = true;
this.nextStatus = true
}
this.active--;
this.active--
},
closeDalog() {
this.dialogTime--;
this.dialogTime--
if (this.dialogTime == 0) {
this.dialogStatus = false;
clearInterval(this.timer);
this.dialogStatus = false
clearInterval(this.timer)
}
},
//检测二维码
getCheckStatus() {
this.$apis.ww
.getCheckStatus({
status: this.checkStatus,
status: this.checkStatus
})
.then((res) => {
.then(res => {
if (res) {
if (res.status == "succ") {
clearInterval(this.timerQrcode);
this.getReportStatus("succ");
this.getAccess();
return;
} else if (res.status == "ing") {
this.getReportStatus("scan");
if (res.status == 'succ') {
clearInterval(this.timerQrcode)
this.getReportStatus('succ')
this.getAccess()
return
} else if (res.status == 'ing') {
this.getReportStatus('scan')
} else {
this.getReportStatus("new");
this.getReportStatus('new')
}
this.checkStatus = res.status;
this.checkStatus = res.status
} else {
this.checkStatus = "expired";
this.getReportStatus("expired");
clearInterval(this.timerQrcode);
this.checkStatus = 'expired'
this.getReportStatus('expired')
clearInterval(this.timerQrcode)
}
});
})
},
//获取二维码
getQrcode() {
this.$apis.ww.getQrcode({ loginType: "login_admin" }).then((res) => {
this.qrcodeUrl = res.qrcodeUrl;
this.timerQrcode = setInterval(this.getCheckStatus, 3000);
});
this.$apis.ww.getQrcode({ loginType: 'login_admin' }).then(res => {
this.qrcodeUrl = res.qrcodeUrl
this.timerQrcode = setInterval(this.getCheckStatus, 3000)
})
},
//企微授权接入
getAccess() {
this.$apis.ww.getAccess({}).then((res) => {
this.$apis.ww.getAccess({}).then(res => {
if (res) {
this.checkStatus = "succ";
this.getStatus();
this.checkStatus = 'succ'
this.getStatus()
} else {
this.checkStatus = "expired";
this.checkStatus = 'expired'
}
});
})
},
//检测二维码
getStatus() {
this.loading = true;
this.$apis.ww.getStatus({}).then((res) => {
this.loading = false;
this.statusQrcode = res.status;
this.loading = true
this.$apis.ww.getStatus({}).then(res => {
this.loading = false
this.statusQrcode = res.status
if (res.applicationList) {
res.applicationList.forEach((item,index)=> {
if(item.appCode == 'DJQWGJ') {
this.applicationList[0] = item;
res.applicationList.forEach((item, index) => {
if (item.appCode == 'DJQWGJ') {
this.applicationList[0] = item
}
if(item.appCode == 'WBLXR') {
this.applicationList[1] = item;
if (item.appCode == 'WBLXR') {
this.applicationList[1] = item
}
if(item.appCode == 'TXLTBZS') {
this.applicationList[2] = item;
if (item.appCode == 'TXLTBZS') {
this.applicationList[2] = item
}
});
})
if (this.applicationList) {
let index = res.applicationList.findIndex((item) => {
return item.appCode == "TXLTBZS";
});
this.callbackUrl = this.applicationList[index].callbackUrl;
this.token = this.applicationList[index].token;
this.encodingAesKey = this.applicationList[index].encodingAesKey;
this.checkResult = this.applicationList[index].checkResult;
let index = res.applicationList.findIndex(item => {
return item.appCode == 'TXLTBZS'
})
this.callbackUrl = this.applicationList[index].callbackUrl
this.token = this.applicationList[index].token
this.encodingAesKey = this.applicationList[index].encodingAesKey
this.checkResult = this.applicationList[index].checkResult
}
}
if (this.statusQrcode == "NEVER") {
this.active = 1;
this.dialogStatus = true;
this.timer = setInterval(this.closeDalog, 1000);
this.getQrcode();
} else if (this.statusQrcode == "SUCCESS") {
this.active = 3;
} else if (this.statusQrcode == "SERVER_CHECK") {
this.active = 2;
if (this.statusQrcode == 'NEVER') {
this.active = 1
this.dialogStatus = true
this.timer = setInterval(this.closeDalog, 1000)
this.getQrcode()
} else if (this.statusQrcode == 'SUCCESS') {
this.active = 3
} else if (this.statusQrcode == 'SERVER_CHECK') {
this.active = 2
} else {
this.active = 1;
this.active = 1
}
});
})
},
//上报
getReportStatus(sts) {
let operation;
let status;
let operation
let status
if (this.entryStatus || !sts) {
operation = "get";
status = "succ";
operation = 'get'
status = 'succ'
} else {
operation = "check";
status = sts;
operation = 'check'
status = sts
}
var a = this.$apis.ww
.getReportStatus({
loginType: "login_admin",
loginType: 'login_admin',
operation: operation,
status: status,
status: status
})
.then(res => {
this.entryStatus = false
})
.then((res) => {
this.entryStatus = false;
});
},
//刷新
handleRefresh() {
this.checkStatus = "never";
this.getQrcode();
},
this.checkStatus = 'never'
this.getQrcode()
}
},
mounted() {
let clientHeight = document.documentElement.clientHeight;
this.footerLeft = document.querySelector(".base-container-right").offsetLeft;
this.footerWidth = document.documentElement.clientWidth - this.footerLeft;
this.boxHeight = clientHeight - 200;
this.getStatus();
let clientHeight = document.documentElement.clientHeight
this.footerLeft = document.querySelector('.base-container-right').offsetLeft
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
this.boxHeight = clientHeight - 200
this.getStatus()
},
beforeDestroy() {
clearInterval(this.timerQrcode);
},
};
clearInterval(this.timerQrcode)
}
}
</script>
<style scoped lang="scss">
......@@ -791,6 +660,19 @@ export default {
line-height: 20px;
letter-spacing: 1px;
margin-left: 10px;
&.text-bettwn {
display: flex;
justify-content: space-between;
.config-box-link {
font-size: 12px;
font-weight: 600;
color: #6e65ff;
line-height: 30px;
i {
font-weight: 600;
}
}
}
}
.config-box-form {
margin-left: 10px;
......@@ -997,7 +879,7 @@ export default {
border: none;
}
.step-li:before {
content: "";
content: '';
display: block;
position: absolute;
margin-left: -6px;
......
......@@ -2,39 +2,19 @@
<div class="drawer-sale-panel">
<el-form label-width="150px" :model="addForm">
<div class="scrm-textRight sale-reload">
<el-button
size="small"
slot="append"
type="primary"
@click="syncEntmicroIsOutsiderStaff"
:loading="loading"
>同步有外部联系人权限的员工</el-button
>
<el-button size="small" slot="append" type="primary" @click="syncEntmicroIsOutsiderStaff" :loading="loading">同步有外部联系人权限的员工</el-button>
</div>
<el-form-item label="请选择员工">
<div class="sale-select">
<div class="el-input-tag input-tag-wrapper" @click="foucusTagInput">
<el-tag
v-for="(tag, idx) in innerTags"
:key="idx"
closable
:disable-transitions="false"
@close="remove(tag)"
>
<el-tag effect="plain" type="info" v-for="(tag, idx) in innerTags" :key="idx" closable :disable-transitions="false" @close="remove(tag)">
<i class="el-icon-user-solid"></i>
{{ tag.staffName }}
</el-tag>
<el-input
size="small"
v-model.trim="newTag"
placeholder="选择员工"
@input="inputTag"
style="outline: none; border: none"
></el-input>
<el-input size="small" v-model.trim="newTag" placeholder="选择员工" @input="inputTag" style="outline: none; border: none"></el-input>
</div>
<div><el-button size="small" class="sale-select-btn" type="primary" @click="searchEmp"
>查询</el-button
></div>
<div><el-button size="small" class="sale-select-btn" type="primary" @click="searchEmp">查询</el-button></div>
</div>
<div>
<div class="select-sale-panel">
......@@ -45,33 +25,16 @@
</el-form-item>
<el-form-item label="请选择跟进员工类型">
<div class="emp-type">
<div
@click="handleType(index)"
:class="{ checked: typeIndex == index }"
class="emp-type-btn"
v-for="(item, index) in empType"
:key="index"
>
<div @click="handleType(index)" :class="{ checked: typeIndex == index }" class="emp-type-btn" v-for="(item, index) in empType" :key="index">
{{ item.followName }}
<i class="el-icon-error" @click="delEmpType(item,index)" v-if="!item.commonFlag"></i>
<i class="el-icon-error" @click="delEmpType(item, index)" v-if="!item.commonFlag"></i>
</div>
</div>
<div class="sale-select">
<el-input
size="small"
v-model="empTypeValue"
placeholder="添加类型名称"
maxlength="8"
show-word-limit
>
</el-input>
<div><el-button size="small" class="sale-select-btn" type="primary" @click="addEmpType"
>新增</el-button
></div>
</div>
<div class="sale-type-desc">
跟进员工类型最多新增30个,已新增{{ empType.length - 3 }}个
<el-input size="small" v-model="empTypeValue" placeholder="添加类型名称" maxlength="8" show-word-limit></el-input>
<div><el-button size="small" class="sale-select-btn" type="primary" @click="addEmpType">新增</el-button></div>
</div>
<div class="sale-type-desc">跟进员工类型最多新增30个,已新增{{ empType.length - empTypeF.length }}个</div>
</el-form-item>
<el-form-item style="text-align: center">
<el-button @click="onCancel" size="small">取消</el-button>
......@@ -82,12 +45,12 @@
</template>
<script>
import selectEmp from "./selectEmp";
import selectEmp from './selectEmp'
export default {
name: "addSale",
name: 'addSale',
components: {
selectEmp,
selectEmp
},
data() {
......@@ -96,116 +59,116 @@ export default {
addForm: {},
typeIndex: 0,
empType: [],
empTypeValue: "",
newTag: "",
empTypeF: [],
empTypeValue: '',
newTag: '',
innerTags: [],
dialog_temp: {},
};
dialog_temp: {}
}
},
methods: {
init() {
this.newTag = "";
this.innerTags = [];
this.empTypeValue = "";
if(this.$refs.selectEmpTabel.listTree.length != 0) {
this.$refs.selectEmpTabel.listEntmicroStaff();
this.$refs.selectEmpTabel.clearSelection();
this.newTag = ''
this.innerTags = []
this.empTypeValue = ''
if (this.$refs.selectEmpTabel.listTree.length != 0) {
this.$refs.selectEmpTabel.listEntmicroStaff()
this.$refs.selectEmpTabel.clearSelection()
}
},
selectTable(val) {
this.innerTags = val;
this.innerTags = val
},
listEntFollowerType() {
this.$apis.emp
.listEntFollowerType({ merchantId: this.$globalState.session.merchantId })
.then((res) => {
this.empType = res;
});
this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => {
this.empType = res
this.empTypeF = res.filter(item => item.commonFlag)
})
},
handleType(index) {
this.typeIndex = index;
this.typeIndex = index
},
foucusTagInput() {
if (this.readOnly || !this.$el.querySelector(".tag-input")) {
return;
if (this.readOnly || !this.$el.querySelector('.tag-input')) {
return
} else {
this.$el.querySelector(".tag-input").focus();
this.$el.querySelector('.tag-input').focus()
}
},
remove(row) {
this.$refs.selectEmpTabel.clearSelect(row);
this.$refs.selectEmpTabel.clearSelect(row)
},
//查询
searchEmp() {
this.$refs.selectEmpTabel.listEntmicroStaff(this.newTag);
this.$refs.selectEmpTabel.listEntmicroStaff(this.newTag)
},
addEmpType() {
if (!this.empTypeValue) {
this.$message.error("请输入类型名称");
return;
this.$message.error('请输入类型名称')
return
}
if(this.empType.length == 33) {
this.$message.error("跟进员工类型最多新增30个");
return;
if (this.empType.length == 33) {
this.$message.error('跟进员工类型最多新增30个')
return
}
let params = {
followName: this.empTypeValue,
merchantid: this.$globalState.session.merchantId,
};
this.$apis.emp.saveFollowerType(params).then((res) => {
this.listEntFollowerType();
});
this.empTypeValue = "";
merchantid: this.$globalState.session.merchantId
}
this.$apis.emp.saveFollowerType(params).then(res => {
this.listEntFollowerType()
})
this.empTypeValue = ''
},
delEmpType(item,index) {
this.$apis.emp.deleteFollowerType({ id: item.id }).then((res) => {
if(res) {
this.listEntFollowerType();
this.typeIndex = 0;
delEmpType(item, index) {
this.$apis.emp.deleteFollowerType({ id: item.id }).then(res => {
if (res) {
this.listEntFollowerType()
this.typeIndex = 0
}
});
})
},
syncEntmicroIsOutsiderStaff() {
this.loading = true;
this.loading = true
let params = {
departmentId: 1,
merchantId: this.$globalState.session.merchantId,
};
this.$apis.emp.syncEntmicroIsOutsiderStaff(params).then((res) => {
merchantId: this.$globalState.session.merchantId
}
this.$apis.emp.syncEntmicroIsOutsiderStaff(params).then(res => {
if (res) {
this.$refs.selectEmpTabel.listEntmicroStaff();
this.$refs.selectEmpTabel.listEntmicroStaff()
this.$message({
message: "同步成功",
type: "success",
});
message: '同步成功',
type: 'success'
})
}
this.loading = false;
});
this.loading = false
})
},
onSubmit() {
if(this.innerTags.length == 0) {
this.$message({
message: "请选择员工",
type: "error",
});
if (this.innerTags.length == 0) {
this.$message({
message: '请选择员工',
type: 'error'
})
return
}
let userIds = [];
this.innerTags.forEach((item) => {
userIds.push(item.userId);
});
this.$emit("handSelectdEmp", this.empType[this.typeIndex].id, userIds);
let userIds = []
this.innerTags.forEach(item => {
userIds.push(item.userId)
})
this.$emit('handSelectdEmp', this.empType[this.typeIndex].id, userIds)
},
onCancel() {
this.$emit("closeDrawer");
},
this.$emit('closeDrawer')
}
},
mounted() {
this.listEntFollowerType();
},
};
this.listEntFollowerType()
}
}
</script>
<style scoped lang="scss">
......@@ -265,7 +228,7 @@ export default {
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #606266;
color: #666;
display: inline-block;
outline: none;
padding: 0 10px 0 5px;
......@@ -286,6 +249,11 @@ export default {
width: auto;
flex: 1;
}
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
}
.el-tag {
......
<template>
<div className="scrm-main">
<div class="follow-header">
<p>为不同的业务部门设置对应的跟进专员,方便后续业务部门创办相关的活动时能为其成员创建活动和发送企微消息,引导其跟进活动。跟进专员接收任务后可转发给客户/客户群,拥有“添加外部联系人权限”的员工才允许设置为跟进专员。<a class="follow-process-a" @click="jumpUrl('https://open.work.weixin.qq.com/help2/pc/16853?person_id=1&is_tencent=')">企微管理员为员工“设置外部联系人权限”流程>></a></p>
<p>
为不同的业务部门设置对应的跟进专员,方便后续业务部门创办相关的活动时能为其成员创建活动和发送企微消息,引导其跟进活动。跟进专员接收任务后可转发给客户/客户群,拥有“添加外部联系人权限”的员工才允许设置为跟进专员。
<a class="follow-process-a" @click="jumpUrl('https://open.work.weixin.qq.com/help2/pc/16853?person_id=1&is_tencent=')">
企微管理员为员工“设置外部联系人权限”流程
<i class="el-icon-d-arrow-right"></i>
</a>
</p>
</div>
<div class="follow-form" :style="{'min-height': formHeight+'px'}">
<div class="follow-form" :style="{ 'min-height': formHeight + 'px' }">
<el-form :inline="true" :model="searchForm" class="follow-form-item">
<el-form-item label="跟进专员类型">
<el-select
size="small"
v-model="searchForm.followerTypeId"
placeholder="请选择"
>
<el-option
v-for="item in optionsType"
:key="item.id"
:label="item.followName"
:value="item.id"
>
</el-option>
<el-select size="small" v-model="searchForm.followerTypeId" placeholder="请选择">
<el-option v-for="item in optionsType" :key="item.id" :label="item.followName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="员工搜索">
<el-input
size="small"
v-model="searchForm.staffName"
placeholder="请输入员工姓名"
></el-input>
<el-input size="small" v-model="searchForm.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch" size="small">查询</el-button>
</el-form-item>
<el-form-item class="follow-form-jump">
<el-button
size="small"
icon="el-icon-plus"
type="primary"
@click="openDrawer"
class="scrm-mr10"
>跟进专员</el-button
>
<GLButton fn="新增" size="small" icon="el-icon-plus" type="primary" @click="openDrawer">跟进专员</GLButton>
</el-form-item>
</el-form>
<GLTable
ref="table"
:layout="layout"
:tableData="tableData"
:tableTotal="tableTotal"
:pageConf="pageConf"
:tableParams="tableParams"
@refreshTable="handleSearch"
>
<GLTable ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch">
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="handleDele(scope.scope)">删除</el-button>
<GLButton fn="删除" type="text" @click="handleDele(scope.scope)">删除</GLButton>
</template>
</GLTable>
</div>
<el-drawer
class="drawer-panel"
size="60%"
title="添加跟进员工"
:visible.sync="drawer"
:direction="direction"
:before-close="handleClose"
>
<add-sale
ref="drawerForm"
@closeDrawer="closeDrawer"
@handSelectdEmp="handSelectdEmp"
></add-sale>
<el-drawer class="drawer-panel" size="60%" title="添加跟进员工" :visible.sync="drawer" :direction="direction" :before-close="handleClose">
<add-sale ref="drawerForm" @closeDrawer="closeDrawer" @handSelectdEmp="handSelectdEmp"></add-sale>
</el-drawer>
</div>
</template>
<script>
import addSale from "./components/addSale";
import addSale from './components/addSale'
export default {
name: "index",
name: 'index',
components: {
addSale,
addSale
},
data() {
return {
formHeight: 300,
drawer: false,
direction: "rtl",
direction: 'rtl',
searchForm: {
followerTypeId: "",
staffName: "",
followerTypeId: '',
staffName: ''
},
optionsType: [
{
value: "",
label: "全部",
value: '',
label: '全部'
},
{
value: "1",
label: "新车跟进专员",
value: '1',
label: '新车跟进专员'
},
{
value: "2",
label: "售后跟进专员",
},
value: '2',
label: '售后跟进专员'
}
],
scope: {
scope: "",
scope: ''
},
pageConf: { pageSize: "pageSize", pageNum: "pageNum", totalCount: "total" },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数
tableParams: {
tableOption: true,
mutiSelectName: "user",
mutiSelectName: 'user',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: "姓名",
prop: "staffName"
label: '姓名',
prop: 'staffName'
},
{
label: "部门",
prop: "departmentName"
label: '部门',
prop: 'departmentName'
},
{
label: "跟进专员类型",
prop: "followerTypeName"
label: '跟进专员类型',
prop: 'followerTypeName'
},
{
label: "手机号",
prop: "staffPhone"
label: '手机号',
prop: 'staffPhone'
},
{
label: "首次开通时间",
prop: "followerCreatedTime"
label: '首次开通时间',
prop: 'followerCreatedTime'
},
{
label: "是否有外部联系人权限",
prop: "isAddOutsider",
formatter: (cellValue) => {
label: '是否有外部联系人权限',
prop: 'isAddOutsider',
formatter: cellValue => {
return {
0: "是",
1: "否",
}[cellValue.isAddOutsider];
},
},
],
0: '是',
1: '否'
}[cellValue.isAddOutsider]
}
}
]
},
layout: "sizes, prev, pager, next, jumper, ->, total",
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0,
};
tableTotal: 0
}
},
watch: {
drawer(val) {
if (!val) {
this.listEntFollowerType();
this.listEntFollowerType()
}
},
}
},
methods: {
jumpUrl(url) {
window.open(url)
},
openDrawer() {
this.drawer = true;
this.drawer = true
this.$nextTick(() => {
this.$refs.drawerForm.init();
this.$refs.drawerForm.init()
})
},
beforeSearchFn() {
return new Promise((resolve) => {
return new Promise(resolve => {
// 调接口前,操作
resolve();
});
resolve()
})
},
handleClose() {
this.drawer = false;
this.drawer = false
},
closeDrawer() {
this.handleClose();
this.handleClose()
},
handSelectdEmp(followerTypeId, userIds) {
var params = {
followerTypeId,
userIds,
};
this.$apis.emp.saveFollowerStaff(params).then((res) => {
userIds
}
this.$apis.emp.saveFollowerStaff(params).then(res => {
if (res) {
this.handleClose();
this.handleSearch();
this.handleClose()
this.handleSearch()
}
});
})
},
handleSearch() {
var params = {
...JSON.parse(JSON.stringify(this.searchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
};
this.$apis.emp.listFollowerStaffByPage(params).then((res) => {
this.tableData = res.data;
this.tableTotal = res.count;
pageNum: this.$refs.table.page.pageNum
}
this.$apis.emp.listFollowerStaffByPage(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
if (res.data && res.data.length == []) {
this.$refs.table.setTableHeightFun();
this.$refs.table.setTableHeightFun()
}
});
})
},
listEntFollowerType() {
this.$apis.emp
.listEntFollowerType({ merchantId: this.$globalState.session.merchantId })
.then((res) => {
this.optionsType = [{ followName: "全部", id: "" }].concat(res);
});
this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => {
this.optionsType = [{ followName: '全部', id: '' }].concat(res)
})
},
handleDele(scope) {
this.$confirm("是否删除该员工?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
this.$confirm('是否删除该员工?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$apis.emp.deleteFollowerStaff({ userId: scope.userId }).then((res) => {
this.$apis.emp.deleteFollowerStaff({ userId: scope.userId, userOneId: scope.userOneId }).then(res => {
if (res) {
this.$message({
type: "success",
message: "删除成功!",
});
type: 'success',
message: '删除成功!'
})
}
this.handleSearch();
});
this.handleSearch()
})
})
.catch(() => {
});
},
.catch(() => {})
}
},
mounted() {
this.listEntFollowerType();
this.handleSearch();
this.formHeight = document.documentElement.clientHeight - 190;
},
};
this.listEntFollowerType()
this.handleSearch()
this.formHeight = document.documentElement.clientHeight - 230
}
}
</script>
<style scoped lang="scss">
.follow-header {
background: #ffffff;
line-height: 20px;
padding: 10px 20px;
padding: 20px;
font-size: 15px;
color: rgba(0, 0, 0, 0.65);
position: relative;
......@@ -267,17 +229,26 @@ export default {
margin-top: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 10px;
padding: 20px;
/deep/ {
.el-form-item {
margin-right: 20px;
}
.el-button {
margin-left: 20px;
}
}
&-item {
position: relative;
.follow-form-jump {
position: absolute;
right: 0px;
margin-right: 0px;
}
}
}
.drawer-panel {
/deep/ .el-drawer__body{
/deep/ .el-drawer__body {
overflow-y: auto;
}
}
......
......@@ -31,14 +31,14 @@
</div>
<div class="accurate-content">
<div class="accurate-content-l">
<div class="accurate-title">续费策略</div>
<div class="accurate-title">智能营销</div>
<div class="accurate-desc">
提前给需要续费的客户精准推送续费活动,提高复购率。支持企业微信、短信、智能语音电话推送。
门店可通过智能短信,结合权益会员、服务套餐、商城卡券向用户进行智能营销同时实现用户线上化。
</div>
</div>
<div class="accurate-use-btn">
<el-button type="primary" size="small" @click="jumpSquare">立即使用</el-button>
<el-button type="primary" size="small" @click="jumpMarket">立即使用</el-button>
</div>
</div>
</div>
......@@ -54,6 +54,9 @@ export default {
methods: {
jumpSquare() {
this.$history.push('/drainage/square/drainage')
},
jumpMarket() {
this.$history.push('/drainage/market/index')
}
},
};
......
......@@ -8,14 +8,14 @@
<img src="@/assets/img/question.png" slot="reference" />
</el-popover>
</div>
<div class="view-title-num">{{ totalOutputValue ? totalOutputValue : '¥ - -' }}</div>
<div class="view-title-num">{{ totalOutputValue ? '¥' + totalOutputValue : '¥ - -' }}</div>
</div>
<div class="view-chart">
<output-echart :output="output"></output-echart>
<!-- <div class="view-chart-empty">
<output-echart :outputCircle="output" v-show="output.boutiqueUpgradeTotalOutputValueRadio || output.shopmallTotalOutputValueRadio || output.otherTotalOutputValueRadio"></output-echart>
<div class="view-chart-empty" v-show="!(output.boutiqueUpgradeTotalOutputValueRadio || output.shopmallTotalOutputValueRadio || output.otherTotalOutputValueRadio)">
<img src="@/assets/img/empty.png" />
<div>暂无数据</div>
</div> -->
</div>
</div>
</div>
<div class="chart-home-right">
......@@ -26,7 +26,7 @@
<img src="@/assets/img/question.png" slot="reference" />
</el-popover>
</div>
<div class="view-title-num">{{ currentDayTotalOutputValue ? currentDayTotalOutputValue : '¥ - -' }}</div>
<div class="view-title-num">{{ currentDayTotalOutputValue ? '¥' + currentDayTotalOutputValue : '¥ - -' }}</div>
</div>
<linechart echartId="customerId1" :echartData="totalOutputValueTrends" echartHeight="90"></linechart>
......@@ -34,14 +34,14 @@
<div class="view-value-panle">
<div class="view-value-p">
<div class="view-value">当日新增精品升级产值</div>
<div class="view-value-price" style="color: #fe9c1c">{{ currentDayBoutiqueUpgradeTotalOutputValue ? currentDayBoutiqueUpgradeTotalOutputValue : '¥ - -' }}</div>
<div class="view-value-price" style="color: #fe9c1c">{{ currentDayBoutiqueUpgradeTotalOutputValue ? '¥' + currentDayBoutiqueUpgradeTotalOutputValue : '¥ - -' }}</div>
</div>
<linechart echartId="customerId2" :echartData="boutiqueUpgradeOutputValueTrends" echartHeight="70"></linechart>
</div>
<div class="view-value-panle">
<div class="view-value-p">
<div class="view-value">当日新增商城产值</div>
<div class="view-value-price" style="color: #716aff">{{ currentDayShopmallTotalOutputValue ? currentDayShopmallTotalOutputValue : '¥ - -' }}</div>
<div class="view-value-price" style="color: #716aff">{{ currentDayShopmallTotalOutputValue ?'¥' + currentDayShopmallTotalOutputValue : '¥ - -' }}</div>
</div>
<linechart echartId="customerId3" :echartData="shopmallOutputValueTrends" echartHeight="70"></linechart>
</div>
......@@ -67,6 +67,7 @@ export default {
boutiqueUpgradeOutputValueTrends: [],
liveOutputValueTrends: [],
equityOutputValueTrends: [],
equityTotalOutputValue: 0,
totalOutputValue: 0,
todayTotalOutputValue: 0,
todayShopmallTotalOutputValue: 0,
......@@ -104,6 +105,7 @@ export default {
this.boutiqueUpgradeOutputValueTrends = res.boutiqueUpgradeOutputValueTrends
this.liveOutputValueTrends = res.liveOutputValueTrends
this.equityOutputValueTrends = res.equityOutputValueTrends
this.equityTotalOutputValue = res.equityTotalOutputValue
})
}
},
......@@ -122,6 +124,7 @@ export default {
padding: 20px;
.view-chart {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
......@@ -154,6 +157,9 @@ export default {
font-weight: 500;
color: #333333;
line-height: 22px;
&:first-child {
margin-right: 20px;
}
.view-value-price {
margin: 20px 0px;
}
......@@ -168,7 +174,7 @@ export default {
color: #333333;
line-height: 18px;
.view-title-num {
font-size: 14px;
font-size: 26px;
> span {
font-size: 26px;
}
......
<template>
<div :id="echartId" class="chart-line" :style="{ height: echartHeight + 'px' }"></div>
<div>
<div :id="echartId" class="chart-line" :style="{ height: echartHeight + 'px' }" v-show="status"></div>
<div :style="{ height: echartHeight + 'px' }" v-show="!status"></div>
</div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'linechart',
data() {
return {
status: true
}
},
props: {
echartId: {
type: String,
......@@ -21,10 +28,6 @@ export default {
}
},
data() {
return {}
},
watch: {
echartData: {
handler(value) {
......@@ -35,7 +38,7 @@ export default {
let dateTime = value.map(item => {
return item.dateTime
})
console.log(data)
this.status = data.some(item=>item)
this.getChartTotal(dateTime, data)
},
deep: true
......@@ -60,6 +63,8 @@ export default {
},
grid: {
bottom: 0,
right: 0,
left: 0,
top: 0
},
series: [
......
......@@ -21,10 +21,6 @@ export default {
url: '/drainage/channel/index'
},
{
name: '批量加好友',
url: '/drainage/friends/index'
},
{
name: '群发助手',
status: 1,
url: '/marketing/customerTransform/index'
......
......@@ -4,7 +4,7 @@
<div class="operational-icon"><img src="@/assets/img/home/service1.png" /></div>
<div class="operational-title">新车售前打包增值方案</div>
<div class="operational-desc">4S店会员权益服务——赚钱 、锁客两不误</div>
<div class="operational-btn" @click="jumpSquare('/services/inSale/introduct')">立即使用</div>
<div class="operational-btn" @click="jumpSquare('/services/beforeSale/introduct')">立即使用</div>
</div>
<div class="operational-item scrm-box-f">
<div class="operational-icon"><img src="@/assets/img/home/service2.png" /></div>
......@@ -16,7 +16,7 @@
<div class="operational-icon"><img src="@/assets/img/home/service3.png" /></div>
<div class="operational-title">售后直播代运营服务</div>
<div class="operational-desc">专业直播带货服务,助力商家直播带货,快速提高销量</div>
<div class="operational-btn" @click="jumpSquare('/services/inSale/introduct')">立即使用</div>
<div class="operational-btn" @click="jumpSquare('/services/afterSales/index')">立即使用</div>
</div>
</div>
</template>
......
......@@ -10,20 +10,20 @@ export default {
name: 'echartOutput',
data() {
return {
permissions: [1211]
}
return {}
},
props: {
output: {
outputCircle: {
type: Object
}
},
watch: {
output() {
this.getOutput()
outputCircle: {
handler(value) {
this.getOutput()
},
deep: true
}
},
methods: {
getOutput() {
......@@ -33,23 +33,30 @@ export default {
option = {
tooltip: {
trigger: 'item'
trigger: 'item',
formatter: function (params) {
return '占比 ' + params.value + '%' + '<br>' + params.data.name + ': ' + params.data.ratio
}
},
legend: {
left: 'left',
top: '5%',
top: '2%',
data: [
{
name: '精品升级',
icon: 'circle',
icon: 'circle'
},
{
name: '商城',
icon: 'circle',
icon: 'circle'
},
{
name: '会员套餐',
icon: 'circle'
},
{
{
name: '其他',
icon: 'circle',
icon: 'circle'
}
]
},
......@@ -58,17 +65,45 @@ export default {
{
name: '访问来源',
type: 'pie',
center: ['50%', '58%'],
radius: '70%',
center: ['50%', '53%'],
data: [
{ value: this.output.boutiqueUpgradeTotalOutputValueRadio, name: '精品升级' },
{ value: this.output.shopmallTotalOutputValueRadio, name: '商城' },
{ value: this.output.otherTotalOutputValueRadio, name: '其他' }
]
{ value: this.outputCircle.boutiqueUpgradeTotalOutputValueRadio, name: '精品升级', unit: '%', ratio: this.outputCircle.boutiqueUpgradeTotalOutputValue },
{ value: this.outputCircle.shopmallTotalOutputValueRadio, name: '商城', unit: '%', ratio: this.outputCircle.shopmallTotalOutputValue },
{ value: this.outputCircle.equityTotalOutputValueRadio, name: '会员套餐', unit: '%', ratio: this.outputCircle.equityTotalOutputValue },
{ value: this.outputCircle.otherTotalOutputValueRadio, name: '其他', unit: '%', ratio: this.outputCircle.otherTotalOutputValue }
],
itemStyle: {
normal: {
label: {
show: true
},
labelLine: {
show: true,
length: 10
}
}
}
}
]
}
option && myChart.setOption(option)
myChart.on('click', res => {
let url
switch (res.data.name) {
case '精品升级':
url = '/services/inSale/upgrade'
break
case '商城':
url = '/marketing/orderManage/index'
break
case '会员套餐':
url = '/marketing/memberCenter/setmeal'
break
}
this.$history.push(url)
})
}
}
}
......@@ -79,6 +114,6 @@ export default {
width: 100%;
}
#echartOutput {
height: 280px;
height: 260px;
}
</style>>
\ No newline at end of file
<template>
<div class="scrm-box-f scrm-p20">
<div class="scrm-box-f scrm-p20-f">
<div class="view-prise-panel">
<div class="view-prise-l">
<div class="view-l-title">
......@@ -19,7 +19,7 @@
<div class="view-num-panel">
<div class="view-num-y">
<img class="accurate-img" src="@/assets/img/home/count1.png" alt="" />
<div class="view-customer-desc">企微客户数</div>
<div class="view-customer-desc">已加企微客户数</div>
<div class="view-customer-num">
<span class="f26">{{ addEntmicroCount ? addEntmicroCount : "- -" }}</span>人
</div>
......@@ -39,9 +39,9 @@
}}</span
>人
</div>
<div class="view-loss-btn">
<!-- <div class="view-loss-btn">
<el-button type="primary" size="small" :class="{'emp-btn': !notAddEntmicroCount}" @click="getBackUp">立即召回</el-button>
</div>
</div> -->
</div>
</div>
<div class="view-prise-r">
......@@ -50,7 +50,7 @@
当日新增客户数<div><span class="f26">{{ newCustomerCount ? newCustomerCount : "- -" }}</span>人</div>
</div>
<div class="view-h-desc">
当日新增企微客户数:<span class="f26">{{ newEntmicroCount ? newEntmicroCount : "- -" }}</span>人
当日新增已加企微客户数:<span class="f26">{{ newEntmicroCount ? newEntmicroCount : "- -" }}</span>人
</div>
</div>
<div class="view-prise-h">
......@@ -64,7 +64,7 @@
</div>
<div class="view-prise-f">
<div class="view-h-title">
当日企微流失数<div><span class="f26"
当日企微流失客户数<div><span class="f26"
>{{ todayEntmicroLoseCount ? todayEntmicroLoseCount : "- -" }}</span>人</div>
</div>
</div>
......@@ -129,6 +129,9 @@ export default {
</script>
<style lang="scss" scoped>
.scrm-p20-f {
padding: 20px 20px 5px 20px;
}
.f26{
font-size: 26px!important;
}
......@@ -140,7 +143,7 @@ export default {
display: flex;
.view-prise-l {
width: 60%;
padding: 0px 40px 20px 0px;
padding: 0px 40px 0px 0px;
border-right: 1px solid rgba(0, 0, 0, 0.06);
.view-l-title {
display: flex;
......
......@@ -6,19 +6,15 @@
class="header-panel"
:style="{
height: headHeight + 'px',
'font-size': headHeight / 5 + 'px',
'font-size': headHeight / 5 + 'px'
}"
>
<img
class="info-consulting-icon"
src="@/assets/img/home/home-header.png"
alt=""
/>
<img class="info-consulting-icon" src="@/assets/img/home/home-header.png" alt="" />
<div
class="jump-mf-btn"
@click="jumpSqure"
:style="{
left: headWidth / 1.36 + 'px',
left: headWidth / 1.36 + 'px'
}"
>
立即使用
......@@ -28,16 +24,7 @@
<div class="home-statistics-title">企业数据概览</div>
<div class="summary-time">
<span>统计截止至 </span>
<el-date-picker
size="mall"
value-format="yyyy-MM-dd"
v-model="summaryTime"
type="date"
placeholder="选择日期"
:clearable="false"
:picker-options="pickerOptions"
>
</el-date-picker>
<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"></overview-enterprise>
......@@ -63,7 +50,7 @@
class="guide-btn"
:style="{
left: guideLeft + guideWidth / 2 + imgWidth / 2 - 40 - borderLeft + 'px',
top: guideTop + guideHeight + imgHeight + 50 - borderTop + 'px',
top: guideTop + guideHeight + imgHeight + 50 - borderTop + 'px'
}"
>
我知道了
......@@ -74,7 +61,7 @@
class="guide-btn"
:style="{
left: guideLeft - imgWidth / 2 - borderLeft + 'px',
top: guideTop + imgHeight / 2 + 'px',
top: imgHeight + 50 + 'px'
}"
>
我知道了
......@@ -85,7 +72,7 @@
class="guide-btn"
:style="{
left: guideLeft + guideWidth / 4 + imgWidth / 2 - 100 - borderLeft + 'px',
top: guideTop - guideWidth / 4 + imgHeight - 50 - borderTop + 'px',
top: guideTop - guideWidth / 4 + imgHeight - 50 - borderTop + 'px'
}"
>
我知道了
......@@ -99,7 +86,7 @@
width: imgWidth + 'px',
height: imgHeight + 'px',
left: guideLeft + guideWidth / 2 - borderLeft + 'px',
top: guideTop + guideHeight + 20 - borderTop + 'px',
top: guideTop + guideHeight + 20 - borderTop + 'px'
}"
/>
<img
......@@ -112,7 +99,7 @@
width: imgWidth + 'px',
height: imgHeight + 'px',
left: guideLeft - imgWidth - borderLeft + 'px',
top: guideTop - borderTop - 40 + 'px',
top: '50px'
}"
/>
<img
......@@ -124,7 +111,7 @@
:style="{
width: guideWidth / 1.5 + 'px',
left: guideLeft + guideWidth / 4 - borderLeft + 'px',
top: guideTop - guideWidth / 4 - borderTop + 'px',
top: guideTop - guideWidth / 4 - borderTop + 'px'
}"
/>
......@@ -135,7 +122,7 @@
width: guideWidth + 'px',
height: guideHeight + 'px',
left: guideLeft + 'px',
top: guideTop + 'px',
top: guideTop + 'px'
}"
></div>
<div
......@@ -145,7 +132,7 @@
width: guideWidth + 'px',
height: guideHeight + 'px',
left: guideLeft + 'px',
top: guideTop + 'px',
top: guideTop + 'px'
}"
></div>
<div
......@@ -155,7 +142,7 @@
width: guideWidth + 'px',
height: guideHeight + 'px',
left: guideLeft + 'px',
top: guideTop + 'px',
top: guideTop + 'px'
}"
></div>
</div>
......@@ -164,15 +151,15 @@
</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 operationalServices from "./components/operational-services";
import enterpriseInformation from "./components/enterprise-information";
import accurateMarketing from "./components/accurate-marketing";
import util from '@/utils/util'
import overviewEnterprise from './components/overview-enterprise'
import customerEchart from './components/customer-echart'
import marketingTools from './components/marketing-tools'
import operationalServices from './components/operational-services'
import enterpriseInformation from './components/enterprise-information'
import accurateMarketing from './components/accurate-marketing'
export default {
name: "home",
name: 'home',
components: {
overviewEnterprise,
......@@ -180,29 +167,29 @@ export default {
customerEchart,
marketingTools,
enterpriseInformation,
accurateMarketing,
accurateMarketing
},
data() {
return {
summaryTime: util.getBeforeDate(),
pickerOptions: {
disabledDate: (time) => {
return time.getTime() > Date.now();
},
disabledDate: time => {
return time.getTime() > Date.now()
}
},
guideStatus: false,
step: 1,
headHeight: 0,
headWidth: 0,
guideWidth: "",
guideHeight: "",
guideWidth: '',
guideHeight: '',
guideLeft: 0,
guideTop: 0,
guideRight: 0,
imgHeight: 0,
imgWidth: 0,
};
imgWidth: 0
}
},
methods: {
......@@ -211,76 +198,77 @@ export default {
},
handleNext(val) {
if (val == 3) {
this.guideStatus = false;
document.documentElement.scrollTop = 0;
document.body.parentNode.style.overflowY = "auto";
this.guideStatus = false
document.documentElement.scrollTop = 0
document.body.parentNode.style.overflowY = 'auto'
} else {
this.step++;
this.getRezie();
this.step++
this.getRezie()
}
},
getRezie() {
this.borderLeft = document.querySelector(".el-main").offsetLeft + 38;
this.borderTop = document.querySelector(".el-main").offsetTop;
this.borderLeft = document.querySelector('.el-main').offsetLeft + 38
this.borderTop = document.querySelector('.el-main').offsetTop
if (this.step == 1) {
this.guideWidth = document.querySelector(".header-panel").offsetWidth + 5;
this.guideHeight = this.headHeight;
this.imgWidth = this.guideWidth / 2;
this.imgHeight = (this.imgWidth * 246) / 541;
this.guideLeft = this.borderLeft;
this.guideTop =
document.querySelector(".header-panel").offsetTop + this.borderTop - 2;
this.guideWidth = document.querySelector('.header-panel').offsetWidth + 5
this.guideHeight = this.headHeight
this.imgWidth = this.guideWidth / 2
this.imgHeight = (this.imgWidth * 246) / 541
this.guideLeft = this.borderLeft
this.guideTop = document.querySelector('.header-panel').offsetTop + this.borderTop - 2
} else if (this.step == 2) {
this.guideWidth = document.querySelector(".consult-box").offsetWidth;
this.guideHeight = document.querySelector(".consult-box").offsetHeight;
this.imgHeight = this.guideHeight / 2;
this.imgWidth = (this.imgHeight * 759) / 128;
this.guideLeft =
document.querySelector(".consult-box").offsetLeft + this.borderLeft - 42;
this.guideTop = document.querySelector(".consult-box").offsetTop + this.borderTop;
setTimeout(() => {
document.querySelectorAll('.nav-text')[1].querySelector('.el-popover__reference').click()
this.$nextTick(() => {
const contactEl = document.querySelector('.com-nav-contact').parentNode
const cloneEl = contactEl.cloneNode(true)
cloneEl.style.opacity = 1
document.body.appendChild(cloneEl)
this.guideWidth = cloneEl.offsetWidth
this.guideHeight = cloneEl.offsetHeight
this.imgHeight = this.guideHeight / 2
this.imgWidth = (this.imgHeight * 759) / 128
this.guideLeft = cloneEl.offsetLeft - 2
this.guideTop = cloneEl.offsetTop
})
}, 10)
} else {
let domWrapper = document.querySelector(".main-panel");
let top = domWrapper.scrollHeight - domWrapper.offsetHeight - 150;
this.guideLeft =
document.querySelector(".operational-panel-s").offsetLeft +
this.borderLeft -
40;
this.guideTop =
document.querySelector(".operational-panel-s").offsetTop -
top -
10 +
this.borderTop;
this.guideWidth = document.querySelector(".operational-panel-s").offsetWidth + 5;
this.guideHeight =
document.querySelector(".operational-panel-s").offsetHeight + 10;
document.querySelector(".main-panel").scrollTop = top;
this.imgWidth = this.guideWidth / 1.5;
this.imgHeight = (this.imgWidth * 222) / 668;
const contactEl = document.querySelectorAll('.com-nav-contact')[1].parentNode
document.body.removeChild(contactEl)
let domWrapper = document.querySelector('.main-panel')
let top = domWrapper.scrollHeight - domWrapper.offsetHeight - 150
this.guideLeft = document.querySelector('.operational-panel-s').offsetLeft + this.borderLeft - 40
this.guideTop = document.querySelector('.operational-panel-s').offsetTop - top - 10 + this.borderTop
this.guideWidth = document.querySelector('.operational-panel-s').offsetWidth + 5
this.guideHeight = document.querySelector('.operational-panel-s').offsetHeight + 10
document.querySelector('.main-panel').scrollTop = top
this.imgWidth = this.guideWidth / 1.5
this.imgHeight = (this.imgWidth * 222) / 668
}
},
findLogin() {
this.$apis.home.findLoginCount({ loginType: 1 }).then((res) => {
this.$apis.home.findLoginCount({ loginType: 1 }).then(res => {
if (res) {
this.guideStatus = true;
this.getRezie();
this.guideStatus = true
this.getRezie()
}
});
},
})
}
},
mounted() {
this.headHeight = document.querySelector(".header-panel").offsetWidth / 8;
this.headWidth = document.querySelector(".header-panel").offsetWidth;
window.addEventListener("resize", () => {
this.headHeight = document.querySelector(".header-panel").offsetWidth / 8;
this.headWidth = document.querySelector(".header-panel").offsetWidth;
});
this.findLogin();
this.headHeight = document.querySelector('.header-panel').offsetWidth / 8
this.headWidth = document.querySelector('.header-panel').offsetWidth
window.addEventListener('resize', () => {
this.headHeight = document.querySelector('.header-panel').offsetWidth / 8
this.headWidth = document.querySelector('.header-panel').offsetWidth
})
// this.findLogin()
},
beforeDestroy() {
window.removeEventListener("resize");
},
};
window.removeEventListener('resize')
}
}
</script>
<style lang="scss" scoped>
......@@ -350,10 +338,11 @@ export default {
}
.main-left {
flex: 1;
margin-right: 20px;
// margin-right: 20px;
}
.main-right {
width: 230px;
display: none;
}
.h-overview-content {
border: 1px solid #000000;
......
......@@ -3,7 +3,7 @@ const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production'
const publicPath = node_env ? `/child/${packageName}/` : '/'
const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://cdn.bootcdn.net/'
const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const cdn = {
css: [
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!