Commit 33f0f17f by yangming

new

1 parent 7e03ef30
Showing 48 changed files with 4384 additions and 179 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 = { module.exports = {
plugins: plugins,
presets: ["@vue/cli-plugin-babel/preset"] presets: ["@vue/cli-plugin-babel/preset"]
};
\ No newline at end of file \ No newline at end of file
}
\ No newline at end of file \ No newline at end of file
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"core-js": "^3.4.4", "core-js": "^3.4.4",
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.2.3", "glsx-components": "^1.2.8",
"glsx-table": "^1.0.9" "glsx-table": "^1.0.9"
}, },
"devDependencies": { "devDependencies": {
......
...@@ -30,7 +30,7 @@ export default { ...@@ -30,7 +30,7 @@ export default {
line-height: 36px; line-height: 36px;
} }
#app { #app {
background: #F4F5FA; background: #f4f5fa;
padding: 0px 20px 20px 40px; padding: 0px 20px 20px 40px;
position: absolute; position: absolute;
box-sizing: border-box; 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) ...@@ -9,12 +9,13 @@ Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
// import GLTable from '@/components/glsx-table/index' // import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable) // 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' import '@/assets/css/common.scss'
let routes = [] let routes = []
let router = null let router = null
let instance = null let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState }) { export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) {
const { response, request, sign, secret } = await fetchConfig() const { response, request, sign, secret } = await fetchConfig()
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
...@@ -22,10 +23,10 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt ...@@ -22,10 +23,10 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: ElementUI.Message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState // Vue.prototype.$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) const routesData = common.utils.deepClone(globalState.routers)
routes = getRoutes(routesData) routes = getRoutes(routesData)
subscribe({ messenger }) subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase })
} }
export async function mount(props) { export async function mount(props) {
console.log('11111', props) console.log('11111', props)
......
...@@ -3,64 +3,71 @@ ...@@ -3,64 +3,71 @@
</template> </template>
<script> <script>
import * as echarts from "echarts"; import * as echarts from 'echarts'
export default { export default {
name: "linechart", name: 'linechart',
props: { props: {
echartId: { echartId: {
type: String, type: String,
default: "", default: ''
}, },
echartData: { echartData: {
type: Array, type: Array
} }
}, },
data() { data() {
return {}; return {}
}, },
watch: { watch: {
echartData(value) { echartData(value) {
let data = value.map(item=>{ let data
return item.customerCount if (value[0].customerCount == 0 || value[0].customerCount) {
}) data = value.map(item => {
let dateTime = value.map(item=>{ return item.customerCount
})
} else {
data = value.map(item => {
return item.outputValue
})
}
let dateTime = value.map(item => {
return item.dateTime return item.dateTime
}) })
this.getChartTotal(dateTime,data); this.getChartTotal(dateTime, data)
} }
}, },
methods: { methods: {
getChartTotal(dateTime,lineData) { getChartTotal(dateTime, lineData) {
var chartDom = document.getElementById(this.echartId); var chartDom = document.getElementById(this.echartId)
var myChart = echarts.init(chartDom); var myChart = echarts.init(chartDom)
var option; var option
option = { option = {
xAxis: { xAxis: {
type: "category", type: 'category',
boundaryGap: false, boundaryGap: false,
data: dateTime, data: dateTime
}, },
yAxis: { yAxis: {
type: "value", type: 'value',
show: false, show: false
}, },
grid: { grid: {
bottom: 0, bottom: 0,
top: 0, top: 0
}, },
series: [ series: [
{ {
data: lineData, data: lineData,
type: "line", type: 'line',
symbol: "none", symbol: 'none',
color: "#5850FF", color: '#5850FF',
areaStyle: { areaStyle: {
color: { color: {
type: "linear", type: 'linear',
x: 0, x: 0,
y: 0, y: 0,
x2: 0, x2: 0,
...@@ -68,24 +75,24 @@ export default { ...@@ -68,24 +75,24 @@ export default {
colorStops: [ colorStops: [
{ {
offset: 0, offset: 0,
color: "#5850FF", // 100% 处的颜色 color: '#5850FF' // 100% 处的颜色
}, },
{ {
offset: 1, offset: 1,
color: "#FFFFFF", // 0% 处的颜色 color: '#FFFFFF' // 0% 处的颜色
}, }
], ],
global: false, // 缺省为 false global: false // 缺省为 false
}, }
}, }
}, }
], ]
}; }
option && myChart.setOption(option); option && myChart.setOption(option)
}, }
} }
}; }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
......
...@@ -45,7 +45,9 @@ ...@@ -45,7 +45,9 @@
<div class="summary-progress-bar"> <div class="summary-progress-bar">
<div class="summary-progress-barout"></div> <div class="summary-progress-barout"></div>
<div class="summary-progress-barin" :style="{ width: (100 * item.custCount) / custSortMax + '%' }"></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>
<div class="summary-progress-value">{{ item.custCount }}</div> <div class="summary-progress-value">{{ item.custCount }}</div>
</div> </div>
...@@ -99,6 +101,9 @@ ...@@ -99,6 +101,9 @@
<div class="summary-progress-bar"> <div class="summary-progress-bar">
<div class="summary-progress-barout"></div> <div class="summary-progress-barout"></div>
<div class="summary-progress-barin" :style="{ width: (100 * item.totalOutputValue) / totalOutputValueMax + '%' }"></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>
<div class="summary-progress-value">{{ item.totalOutputValue }}</div> <div class="summary-progress-value">{{ item.totalOutputValue }}</div>
</div> </div>
...@@ -127,6 +132,7 @@ export default { ...@@ -127,6 +132,7 @@ export default {
rankHeight: 0, rankHeight: 0,
custSortMax: 0, custSortMax: 0,
totalOutputValueMax: 0, totalOutputValueMax: 0,
averageValue: 0,
custAvergCount: 0, custAvergCount: 0,
chartStatus: false, chartStatus: false,
radioStore: '1', radioStore: '1',
...@@ -142,12 +148,12 @@ export default { ...@@ -142,12 +148,12 @@ export default {
}, },
watch: { watch: {
monthValue() { monthValue() {
if(this.radioOutput == 3) { if (this.radioOutput == 3) {
let year = this.monthValue.split('年') let year = this.monthValue.split('年')
let month = year[1].split('月') let month = year[1].split('月')
this.getOutput(year[0] + '-' + month[0] + '-01', util.getCurrentMonthLast(year[0] + '-' + month[0])) this.getOutput(year[0] + '-' + month[0] + '-01', util.getCurrentMonthLast(year[0] + '-' + month[0]))
} }
}, }
}, },
methods: { methods: {
jumpStore() { jumpStore() {
...@@ -177,9 +183,10 @@ export default { ...@@ -177,9 +183,10 @@ export default {
.then(res => { .then(res => {
this.outputRank = res this.outputRank = res
this.totalOutputValueMax = 0 this.totalOutputValueMax = 0
this.averageValue = res ? res[0].averageValue : 0
this.outputRank.forEach(item => { this.outputRank.forEach(item => {
if (item.totalOutputValue >= this.totalOutputValueMax) { if (item.totalOutputValue >= this.totalOutputValueMax) {
this.totalOutputValueMax = item.totalOutputValue this.totalOutputValueMax = item.totalOutputValue ? item.totalOutputValue : 1
} }
}) })
}) })
...@@ -206,17 +213,18 @@ export default { ...@@ -206,17 +213,18 @@ export default {
} }
this.custSortMax = 0 this.custSortMax = 0
this.custSortList.forEach(item => { this.custSortList.forEach(item => {
if (item.addEntmicroCount >= this.custSortMax) { if (item.custCount >= this.custSortMax) {
this.custSortMax = item.addEntmicroCount this.custSortMax = item.custCount ? item.custCount : 1
} }
}) })
console.log(this.custSortMax)
}) })
} }
}, },
mounted() { mounted() {
let clientHeight = document.documentElement.clientHeight let clientHeight = document.documentElement.clientHeight
this.rankHeight = clientHeight - 486 this.rankHeight = clientHeight - 490
this.getSort() this.getSort()
this.getOutput() this.getOutput()
} }
...@@ -247,6 +255,9 @@ export default { ...@@ -247,6 +255,9 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
span {
font-weight: 600;
}
} }
.summary-time-select { .summary-time-select {
position: relative; position: relative;
......
...@@ -4,63 +4,63 @@ ...@@ -4,63 +4,63 @@
<div class="summary-title">汇总</div> <div class="summary-title">汇总</div>
<div class="summary-time"> <div class="summary-time">
<span>统计截止至</span> <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> </div>
<div class="summary-customer-panel"> <div class="summary-customer-panel">
<div class="summary-item"> <div class="summary-item">
<div class="summary-item-title"> <div class="summary-item-title">
<span>客户总数</span> <span>门店客户总数</span>
<el-popover placement="top" title="说明" width="400" trigger="hover" content="累计至统计截止时间,旗下各门店的客户数之和,按手机号和企微去重。数据模块中的缩略面积图为每日新增客户数最近30天的趋势图。"> <el-popover placement="top" title="说明" width="400" trigger="hover" content="累计至统计截止时间,旗下各门店的客户数之和,按手机号和企微去重。数据模块中的缩略面积图为每日新增客户数最近30天的趋势图。">
<img src="@/assets/img/question.png" slot="reference" /> <img src="@/assets/img/question.png" slot="reference" />
</el-popover> </el-popover>
</div> </div>
<div class="summary-item-total">{{ customerCount ? customerCount : '- -' }}</div> <div class="summary-item-total">{{ customerCount ? customerCount : '--' }}</div>
<div class="summary-item-number"> <div class="summary-item-number">
未加企微客户数: 未加企微客户数:
<span>{{ notAddEntmicroCount ? notAddEntmicroCount : '- -' }}</span> <span>{{ notAddEntmicroCount ? notAddEntmicroCount : '--' }}</span>
</div> </div>
<linechart :echartId="echartId1" :echartData="custAddList" v-if="!custAddListEmpty"></linechart> <linechart :echartId="echartId1" :echartData="custAddList" v-if="!custAddListEmpty"></linechart>
<div class="chart-empty-null" v-if="custAddListEmpty">暂无数据</div> <div class="chart-empty-null" v-if="custAddListEmpty">暂无数据</div>
</div> </div>
<div class="summary-item"> <div class="summary-item">
<div class="summary-item-title"> <div class="summary-item-title">
<span>企微客户总数</span> <span>门店企微客户总数</span>
<el-popover placement="top" title="说明" width="400" trigger="hover" content="累计至统计截止时间,旗下各门店已加企业微信的客户数之和,客户按企业微信号和手机号去重。数据模块中的缩略面积图为每日新增企微客户数最近30天的趋势图。"> <el-popover placement="top" title="说明" width="400" trigger="hover" content="累计至统计截止时间,旗下各门店已加企业微信的客户数之和,客户按企业微信号和手机号去重。数据模块中的缩略面积图为每日新增企微客户数最近30天的趋势图。">
<img src="@/assets/img/question.png" slot="reference" /> <img src="@/assets/img/question.png" slot="reference" />
</el-popover> </el-popover>
</div> </div>
<div class="summary-item-total"> <div class="summary-item-total">
{{ addEntmicroCount ? addEntmicroCount : '- -' }} {{ addEntmicroCount ? addEntmicroCount : '--' }}
</div> </div>
<div class="summary-item-number"> <div class="summary-item-number">
当日新增: 当日新增:
<span>{{ newEntmicroCount ? newEntmicroCount : '- -' }}</span> <span>{{ newEntmicroCount ? newEntmicroCount : '--' }}</span>
</div> </div>
<linechart :echartId="echartId2" :echartData="custEntmicroAdds" v-if="!custEntmicroAddsEmpty"></linechart> <linechart :echartId="echartId2" :echartData="custEntmicroAdds" v-if="!custEntmicroAddsEmpty"></linechart>
<div class="chart-empty-null" v-if="custEntmicroAddsEmpty">暂无数据</div> <div class="chart-empty-null" v-if="custEntmicroAddsEmpty">暂无数据</div>
</div> </div>
<div class="summary-item"> <div class="summary-item">
<div class="summary-item-title"> <div class="summary-item-title">
<span>企微流失客户数</span> <span>门店企微流失客户数</span>
<el-popover placement="top" title="说明" width="400" trigger="hover" content="累计至统计截止时间,旗下各门店客户中,删除或者拉黑企业微信的人数之和,客户按企业微信号和手机号去重。数据模块中的缩略面积图为每日流失客户数最近30天的趋势图。"> <el-popover placement="top" title="说明" width="400" trigger="hover" content="累计至统计截止时间,旗下各门店客户中,删除或者拉黑企业微信的人数之和,客户按企业微信号和手机号去重。数据模块中的缩略面积图为每日流失客户数最近30天的趋势图。">
<img src="@/assets/img/question.png" slot="reference" /> <img src="@/assets/img/question.png" slot="reference" />
</el-popover> </el-popover>
</div> </div>
<div class="summary-item-total"> <div class="summary-item-total">
{{ entmicroLoseCount ? entmicroLoseCount : '- -' }} {{ entmicroLoseCount ? entmicroLoseCount : '--' }}
</div> </div>
<div class="summary-item-number"> <div class="summary-item-number">
当日新增: 当日新增:
<span>{{ todayEntmicroLoseCount ? todayEntmicroLoseCount : '- -' }}</span> <span>{{ todayEntmicroLoseCount ? todayEntmicroLoseCount : '--' }}</span>
</div> </div>
<linechart :echartId="echartId3" :echartData="custLoseList" v-if="!custLoseListEmpty"></linechart> <linechart :echartId="echartId3" :echartData="custLoseList" v-if="!custLoseListEmpty"></linechart>
<div class="chart-empty-null" v-if="custLoseListEmpty">暂无数据</div> <div class="chart-empty-null" v-if="custLoseListEmpty">暂无数据</div>
</div> </div>
<div class="summary-item"> <div class="summary-item">
<div class="summary-item-title"> <div class="summary-item-title">
<span>总产值</span> <span>门店总产值</span>
<el-popover placement="top" title="说明" width="400" trigger="hover" content="累计至统计截止时间,旗下各门店产值之和。产值统计的业务包括:精品升级、直播业务(这一期没有不做)、商城(秒杀、商品、券)、门店会员服务套餐。数据模块中的缩略面积图为每日产值最近30天的趋势图。"> <el-popover placement="top" title="说明" width="400" trigger="hover" content="累计至统计截止时间,旗下各门店产值之和。产值统计的业务包括:精品升级、商城(秒杀、商品、券)、门店会员服务套餐。数据模块中的缩略面积图为每日产值最近30天的趋势图。">
<img src="@/assets/img/question.png" slot="reference" /> <img src="@/assets/img/question.png" slot="reference" />
</el-popover> </el-popover>
</div> </div>
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
}) })
this.totalOutputValueEmpty = outputList.every(item => item == 0) this.totalOutputValueEmpty = outputList.every(item => item == 0)
this.$nextTick(() => { this.$nextTick(() => {
this.outputList = outputList this.outputList = outputValueTotalList
}) })
let outputListHalf = outputValueTotalList.slice(15) let outputListHalf = outputValueTotalList.slice(15)
...@@ -187,7 +187,7 @@ export default { ...@@ -187,7 +187,7 @@ export default {
return item.monthAverg return item.monthAverg
}) })
let radioOutput = outputListHalf.map(item => { let radioOutput = outputListHalf.map(item => {
return item.ratio return item.radio
}) })
this.$apis.home.getChart({ day: 30, date: this.summaryTime }).then(res => { this.$apis.home.getChart({ day: 30, date: this.summaryTime }).then(res => {
const custAddList_30 = res.custAddList const custAddList_30 = res.custAddList
...@@ -245,7 +245,7 @@ export default { ...@@ -245,7 +245,7 @@ export default {
if (params.seriesName == '每日新增产值') { if (params.seriesName == '每日新增产值') {
circleColor = '#2CCA74' circleColor = '#2CCA74'
Averg = outputAverg[params.dataIndex] 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 == '每日企微流失客户') { if (params.seriesName == '每日企微流失客户') {
circleColor = '#FF6D00' circleColor = '#FF6D00'
...@@ -344,7 +344,7 @@ export default { ...@@ -344,7 +344,7 @@ export default {
color: #3a3a3a; color: #3a3a3a;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 10px 20px; padding: 20px;
margin-bottom: 20px; margin-bottom: 20px;
.summary-title { .summary-title {
color: #3a3a3a; color: #3a3a3a;
......
...@@ -2,39 +2,19 @@ ...@@ -2,39 +2,19 @@
<div class="drawer-sale-panel"> <div class="drawer-sale-panel">
<el-form label-width="150px" :model="addForm"> <el-form label-width="150px" :model="addForm">
<div class="scrm-textRight sale-reload"> <div class="scrm-textRight sale-reload">
<el-button <el-button size="small" slot="append" type="primary" @click="syncEntmicroIsOutsiderStaff" :loading="loading">同步有外部联系人权限的员工</el-button>
size="small"
slot="append"
type="primary"
@click="syncEntmicroIsOutsiderStaff"
:loading="loading"
>同步有外部联系人权限的员工</el-button
>
</div> </div>
<el-form-item label="请选择员工"> <el-form-item label="请选择员工">
<div class="sale-select"> <div class="sale-select">
<div class="el-input-tag input-tag-wrapper" @click="foucusTagInput"> <div class="el-input-tag input-tag-wrapper" @click="foucusTagInput">
<el-tag <el-tag effect="plain" type="info" v-for="(tag, idx) in innerTags" :key="idx" closable :disable-transitions="false" @close="remove(tag)">
v-for="(tag, idx) in innerTags" <i class="el-icon-user-solid"></i>
:key="idx"
closable
:disable-transitions="false"
@close="remove(tag)"
>
{{ tag.staffName }} {{ tag.staffName }}
</el-tag> </el-tag>
<el-input <el-input size="small" v-model.trim="newTag" placeholder="选择员工" @input="inputTag" style="outline: none; border: none"></el-input>
size="small"
v-model.trim="newTag"
placeholder="选择员工"
@input="inputTag"
style="outline: none; border: none"
></el-input>
</div> </div>
<div><el-button size="small" class="sale-select-btn" type="primary" @click="searchEmp" <div><el-button size="small" class="sale-select-btn" type="primary" @click="searchEmp">查询</el-button></div>
>查询</el-button
></div>
</div> </div>
<div> <div>
<div class="select-sale-panel"> <div class="select-sale-panel">
...@@ -45,33 +25,16 @@ ...@@ -45,33 +25,16 @@
</el-form-item> </el-form-item>
<el-form-item label="请选择跟进员工类型"> <el-form-item label="请选择跟进员工类型">
<div class="emp-type"> <div class="emp-type">
<div <div @click="handleType(index)" :class="{ checked: typeIndex == index }" class="emp-type-btn" v-for="(item, index) in empType" :key="index">
@click="handleType(index)"
:class="{ checked: typeIndex == index }"
class="emp-type-btn"
v-for="(item, index) in empType"
:key="index"
>
{{ item.followName }} {{ 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> </div>
<div class="sale-select"> <div class="sale-select">
<el-input <el-input size="small" v-model="empTypeValue" placeholder="添加类型名称" maxlength="8" show-word-limit></el-input>
size="small" <div><el-button size="small" class="sale-select-btn" type="primary" @click="addEmpType">新增</el-button></div>
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 }}个
</div> </div>
<div class="sale-type-desc">跟进员工类型最多新增30个,已新增{{ empType.length - empTypeF.length }}个</div>
</el-form-item> </el-form-item>
<el-form-item style="text-align: center"> <el-form-item style="text-align: center">
<el-button @click="onCancel" size="small">取消</el-button> <el-button @click="onCancel" size="small">取消</el-button>
...@@ -82,12 +45,12 @@ ...@@ -82,12 +45,12 @@
</template> </template>
<script> <script>
import selectEmp from "./selectEmp"; import selectEmp from './selectEmp'
export default { export default {
name: "addSale", name: 'addSale',
components: { components: {
selectEmp, selectEmp
}, },
data() { data() {
...@@ -96,116 +59,116 @@ export default { ...@@ -96,116 +59,116 @@ export default {
addForm: {}, addForm: {},
typeIndex: 0, typeIndex: 0,
empType: [], empType: [],
empTypeValue: "", empTypeF: [],
newTag: "", empTypeValue: '',
newTag: '',
innerTags: [], innerTags: [],
dialog_temp: {}, dialog_temp: {}
}; }
}, },
methods: { methods: {
init() { init() {
this.newTag = ""; this.newTag = ''
this.innerTags = []; this.innerTags = []
this.empTypeValue = ""; this.empTypeValue = ''
if(this.$refs.selectEmpTabel.listTree.length != 0) { if (this.$refs.selectEmpTabel.listTree.length != 0) {
this.$refs.selectEmpTabel.listEntmicroStaff(); this.$refs.selectEmpTabel.listEntmicroStaff()
this.$refs.selectEmpTabel.clearSelection(); this.$refs.selectEmpTabel.clearSelection()
} }
}, },
selectTable(val) { selectTable(val) {
this.innerTags = val; this.innerTags = val
}, },
listEntFollowerType() { listEntFollowerType() {
this.$apis.emp this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => {
.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }) this.empType = res
.then((res) => { this.empTypeF = res.filter(item => item.commonFlag)
this.empType = res; })
});
}, },
handleType(index) { handleType(index) {
this.typeIndex = index; this.typeIndex = index
}, },
foucusTagInput() { foucusTagInput() {
if (this.readOnly || !this.$el.querySelector(".tag-input")) { if (this.readOnly || !this.$el.querySelector('.tag-input')) {
return; return
} else { } else {
this.$el.querySelector(".tag-input").focus(); this.$el.querySelector('.tag-input').focus()
} }
}, },
remove(row) { remove(row) {
this.$refs.selectEmpTabel.clearSelect(row); this.$refs.selectEmpTabel.clearSelect(row)
}, },
//查询 //查询
searchEmp() { searchEmp() {
this.$refs.selectEmpTabel.listEntmicroStaff(this.newTag); this.$refs.selectEmpTabel.listEntmicroStaff(this.newTag)
}, },
addEmpType() { addEmpType() {
if (!this.empTypeValue) { if (!this.empTypeValue) {
this.$message.error("请输入类型名称"); this.$message.error('请输入类型名称')
return; return
} }
if(this.empType.length == 33) { if (this.empType.length == 33) {
this.$message.error("跟进员工类型最多新增30个"); this.$message.error('跟进员工类型最多新增30个')
return; return
} }
let params = { let params = {
followName: this.empTypeValue, followName: this.empTypeValue,
merchantid: this.$globalState.session.merchantId, merchantid: this.$globalState.session.merchantId
}; }
this.$apis.emp.saveFollowerType(params).then((res) => { this.$apis.emp.saveFollowerType(params).then(res => {
this.listEntFollowerType(); this.listEntFollowerType()
}); })
this.empTypeValue = ""; this.empTypeValue = ''
}, },
delEmpType(item,index) { delEmpType(item, index) {
this.$apis.emp.deleteFollowerType({ id: item.id }).then((res) => { this.$apis.emp.deleteFollowerType({ id: item.id }).then(res => {
if(res) { if (res) {
this.listEntFollowerType(); this.listEntFollowerType()
this.typeIndex = 0; this.typeIndex = 0
} }
}); })
}, },
syncEntmicroIsOutsiderStaff() { syncEntmicroIsOutsiderStaff() {
this.loading = true; this.loading = true
let params = { let params = {
departmentId: 1, departmentId: 1,
merchantId: this.$globalState.session.merchantId, merchantId: this.$globalState.session.merchantId
}; }
this.$apis.emp.syncEntmicroIsOutsiderStaff(params).then((res) => { this.$apis.emp.syncEntmicroIsOutsiderStaff(params).then(res => {
if (res) { if (res) {
this.$refs.selectEmpTabel.listEntmicroStaff(); this.$refs.selectEmpTabel.listEntmicroStaff()
this.$message({ this.$message({
message: "同步成功", message: '同步成功',
type: "success", type: 'success'
}); })
} }
this.loading = false; this.loading = false
}); })
}, },
onSubmit() { onSubmit() {
if(this.innerTags.length == 0) { if (this.innerTags.length == 0) {
this.$message({ this.$message({
message: "请选择员工", message: '请选择员工',
type: "error", type: 'error'
}); })
return return
} }
let userIds = []; let userIds = []
this.innerTags.forEach((item) => { this.innerTags.forEach(item => {
userIds.push(item.userId); userIds.push(item.userId)
}); })
this.$emit("handSelectdEmp", this.empType[this.typeIndex].id, userIds); this.$emit('handSelectdEmp', this.empType[this.typeIndex].id, userIds)
}, },
onCancel() { onCancel() {
this.$emit("closeDrawer"); this.$emit('closeDrawer')
}, }
}, },
mounted() { mounted() {
this.listEntFollowerType(); this.listEntFollowerType()
}, }
}; }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
...@@ -265,7 +228,7 @@ export default { ...@@ -265,7 +228,7 @@ export default {
border-radius: 4px; border-radius: 4px;
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
box-sizing: border-box; box-sizing: border-box;
color: #606266; color: #666;
display: inline-block; display: inline-block;
outline: none; outline: none;
padding: 0 10px 0 5px; padding: 0 10px 0 5px;
...@@ -286,6 +249,11 @@ export default { ...@@ -286,6 +249,11 @@ export default {
width: auto; width: auto;
flex: 1; flex: 1;
} }
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
} }
.el-tag { .el-tag {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!