Commit 4e1bb9fc by 李长胜

修改

1 parent a7171aa8
{ {
"name": "scrm-sub-blog", "name": "custom",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
"core-js": "^3.4.4", "core-js": "^3.4.4",
"echarts": "^5.2.0", "echarts": "^5.2.0",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.4", "glsx-common": "^1.4.6",
"glsx-components": "^1.0.5", "glsx-components": "^1.0.8",
"glsx-table": "^1.1.0", "glsx-table": "^1.1.0",
"sha1": "^1.1.1", "sha1": "^1.1.1",
"vue": "^2.6.10", "vue": "^2.6.10",
......
...@@ -18,6 +18,15 @@ ...@@ -18,6 +18,15 @@
sign: true sign: true
}) })
} }
export function syncCustomerBase(params){
params.method='cn.com.glsx.entmicro.synchro.syncCustomerBase'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export function getTableDetail(params){ export function getTableDetail(params){
params.method='org.ore.api.customer.base.detail' params.method='org.ore.api.customer.base.detail'
return http({ return http({
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
}) })
} }
export function getAllTagTree (params){ export function getAllTagTree (params){
params.method='datahub.api.label.querylabeltree' params.method='datahub.api.label.querylabeltree'
return http({ return http({
...@@ -70,6 +71,15 @@ ...@@ -70,6 +71,15 @@
sign: true sign: true
}) })
} }
export function syncCustomer(params){
params.method='cn.com.glsx.entmicro.synchro.syncCustomer'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export function getTableDetail(params){ export function getTableDetail(params){
params.method='org.ore.api.customer.detail' params.method='org.ore.api.customer.detail'
......
...@@ -83,8 +83,8 @@ export default { ...@@ -83,8 +83,8 @@ export default {
// }, // },
legend: { legend: {
x: 'center', x: 'center',
y: 'bottom', // y: 'bottom',
// bottom: "bottom", bottom: '50px',
// textStyle: { // textStyle: {
// //图例的公用文本样式。 // //图例的公用文本样式。
// fontSize: 14, // fontSize: 14,
...@@ -96,7 +96,7 @@ export default { ...@@ -96,7 +96,7 @@ export default {
}, },
grid: { grid: {
//直角坐标系内绘图网格 //直角坐标系内绘图网格
bottom: '15%', //grid 组件离容器下侧的距离。 bottom: '20%', //grid 组件离容器下侧的距离。
left: '1%', left: '1%',
right: '5%', right: '5%',
containLabel: true //grid 区域是否包含坐标轴的刻度标签。 containLabel: true //grid 区域是否包含坐标轴的刻度标签。
...@@ -105,10 +105,11 @@ export default { ...@@ -105,10 +105,11 @@ export default {
//dataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息,或者概览数据整体,或者去除离群点的影响。#bed0f7 //dataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息,或者概览数据整体,或者去除离群点的影响。#bed0f7
{ {
bottom: '30px', bottom: '30px',
type: 'inside',
show: true, show: true,
// backgroundColor: '#ff0000', // backgroundColor: '#ff0000',
// borderColor: '#ff0000', // borderColor: '#ff0000',
height: '5%', height: '1%',
// borderColor: '#8FDFFE', // borderColor: '#8FDFFE',
// backgroundColor: '#8fdffe99', // backgroundColor: '#8fdffe99',
...@@ -116,7 +117,7 @@ export default { ...@@ -116,7 +117,7 @@ export default {
handleColor: '#bed0f7', handleColor: '#bed0f7',
handleSize: 20, handleSize: 15,
handleStyle: { handleStyle: {
borderColor: '#bed0f7', borderColor: '#bed0f7',
...@@ -152,14 +153,14 @@ export default { ...@@ -152,14 +153,14 @@ export default {
{ {
type: 'value', type: 'value',
name: '单位:人', name: '单位:人',
// min: 0, min: 0,
// max: 35000, max: 100,
// interval: 5000, interval: 10,
axisLabel: { axisLabel: {
formatter: '{value}' formatter: '{value}'
}, },
splitLine: { splitLine: {
show: true //是否显示分割线 show: false //是否显示分割线
} }
}, },
{ {
...@@ -172,7 +173,7 @@ export default { ...@@ -172,7 +173,7 @@ export default {
formatter: '{value}' formatter: '{value}'
}, },
splitLine: { splitLine: {
show: true //是否显示分割线 show: false //是否显示分割线
} }
} }
], ],
......
...@@ -38,7 +38,9 @@ export default { ...@@ -38,7 +38,9 @@ export default {
var maxData = this.entmicroAddCustomerCount + this.entmicroNotAddCustomerCount var maxData = this.entmicroAddCustomerCount + this.entmicroNotAddCustomerCount
option = { option = {
tooltip: {}, tooltip: {
formatter: ' {c}人'
},
xAxis: { xAxis: {
max: maxData, // 以x轴为基准,进行象形图的重复画图,最大值为100(可调整),为了下方好处理我调整为100 max: maxData, // 以x轴为基准,进行象形图的重复画图,最大值为100(可调整),为了下方好处理我调整为100
splitLine: { show: false }, // x轴 轴线什么的都不需要 splitLine: { show: false }, // x轴 轴线什么的都不需要
......
<template> <template>
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<!-- 有图标无数据文字情况 --> <!-- 有图标无数据文字情况 -->
<div class="nodata" v-if="type=='hasIconText'"> <div class="nodata" v-if="type == 'hasIconText'">
<img src="@/assets/clientDataOverview/nodata.png" alt=""> <img src="@/assets/clientDataOverview/nodata.png" alt="" />
<p>暂无数据</p> <p>暂无数据</p>
</div> </div>
<!-- 没有图标有无数据文字 --> <!-- 没有图标有无数据文字 -->
<div class="nodata" v-if="type=='hasText'"> <div class="nodata" v-if="type == 'hasText'">
<p>暂无数据</p> <p>暂无数据</p>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
type: { type: {
type: String, type: String,
default: '' default: ''
},
},
} }
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.scrm-sub-client-container{ .scrm-sub-client-container {
.nodata{ .nodata {
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 50%; top: 50%;
transform: translate(-50%,-50%); transform: translate(-50%, -50%);
z-index: 9; z-index: 9;
p{ p {
height: 22px; height: 22px;
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #000000; color: #000000;
line-height: 22px; line-height: 22px;
......
...@@ -17,6 +17,12 @@ ...@@ -17,6 +17,12 @@
<span>收起</span> <span>收起</span>
</div> </div>
</div> </div>
<div class="firstRowBtn" v-if="!expande && isShowBtns">
<el-button plain @click="resetTable" size="small">重置</el-button>
<el-button type="primary" @click="searchTable" size="small">查询</el-button>
<el-button type="primary" @click="syncClick" :loading="ploading" size="small">同步数据</el-button>
</div>
<div class="itemWidth">
<el-form-item v-for="(item, index) in formList" :key="index" :label="item.label || ''"> <el-form-item v-for="(item, index) in formList" :key="index" :label="item.label || ''">
<template> <template>
<template v-if="item.type === 'input'"> <template v-if="item.type === 'input'">
...@@ -37,11 +43,12 @@ ...@@ -37,11 +43,12 @@
<slot name="form-slot"></slot> <slot name="form-slot"></slot>
</template> </template>
</el-form-item> </el-form-item>
<el-form-item> <!-- <el-form-item>
<template> <template>
<slot name="formsearch-slot"></slot> <slot name="formsearch-slot"></slot>
</template> </template>
</el-form-item> </el-form-item> -->
</div>
</el-form> </el-form>
</div> </div>
</template> </template>
...@@ -68,21 +75,37 @@ export default { ...@@ -68,21 +75,37 @@ export default {
labelWidth: { labelWidth: {
type: String, type: String,
default: 'auto' default: 'auto'
},
ploading: {
type: Boolean,
default: false
},
isHasSyncBtn: {
type: Boolean,
default: false
} }
}, },
data() { data() {
return { return {
expande: true, expande: true,
needShowExpande: false, needShowExpande: false,
FormHeight: 0 FormHeight: 0,
isShowBtns: true
} }
}, },
mounted() { mounted() {
console.log('搜索表单') var sf = document.getElementById('searchForm')
this.$nextTick(() => { this.$nextTick(() => {
if (sf.clientWidth < 1280 && this.isHasSyncBtn) {
console.log(sf.clientWidth, 'sf')
document.querySelector('.itemWidth').style.maxWidth = 700 + 'px'
}
if (sf.clientWidth < 952 && this.isHasSyncBtn) {
this.isShowBtns = false
}
let lineHeight = 75 let lineHeight = 75
if (document.getElementById('searchForm').offsetHeight > lineHeight * 2) { if (document.getElementById('searchForm').offsetHeight > lineHeight * 2) {
console.log('第一次searchForm高度', document.getElementById('searchForm').offsetHeight) // console.log('第一次searchForm高度', document.getElementById('searchForm').offsetHeight)
this.expande = false this.expande = false
this.needShowExpande = true this.needShowExpande = true
} else { } else {
...@@ -102,14 +125,28 @@ export default { ...@@ -102,14 +125,28 @@ export default {
// console.log('窗口发生改变了哟!') // console.log('窗口发生改变了哟!')
// }, 100) // }, 100)
// }) // })
window.onresize = () => { // window.onresize = () => {
return (() => { // return (() => {
// if (resizeTimer) clearTimeout(resizeTimer)
// resizeTimer = setTimeout(function() {
// window.location.reload() //浏览器重新从服务器请求资源,在http请求头中不会包含缓存标记
// // that.FormHeight = document.getElementById('searchForm').offsetHeight
// if (sf.clientWidth < 952 && that.isHasSyncBtn) {
// that.isShowBtns = false
// }
// }, 100)
// })()
// }
window.addEventListener('resize', () => {
if (resizeTimer) clearTimeout(resizeTimer) if (resizeTimer) clearTimeout(resizeTimer)
resizeTimer = setTimeout(function() { resizeTimer = setTimeout(function() {
that.FormHeight = document.getElementById('searchForm').offsetHeight window.location.reload() //浏览器重新从服务器请求资源,在http请求头中不会包含缓存标记
// that.FormHeight = document.getElementById('searchForm').offsetHeight
if (sf.clientWidth < 952 && that.isHasSyncBtn) {
that.isShowBtns = false
}
}, 100) }, 100)
})() })()
}
}, },
watch: { watch: {
...@@ -131,12 +168,20 @@ export default { ...@@ -131,12 +168,20 @@ export default {
onInput(e) { onInput(e) {
this.$emit('input', e) this.$emit('input', e)
}, },
resetTable() {
this.$emit('resetTable')
},
searchTable() {
this.$emit('searchTable')
},
syncClick() {
this.$emit('syncClick')
},
// openClose(){ // openClose(){
// console.log( document.getElementById('searchForm').offsetHeight); // console.log( document.getElementById('searchForm').offsetHeight);
// document.getElementById('searchForm').offsetHeight=172; // document.getElementById('searchForm').offsetHeight=172;
// } // }
expandeClick() { expandeClick() {
console.log('expandeClick')
this.expande = !this.expande this.expande = !this.expande
setTimeout(() => { setTimeout(() => {
this.$emit('setTableHeightEvent') this.$emit('setTableHeightEvent')
...@@ -151,6 +196,17 @@ export default { ...@@ -151,6 +196,17 @@ export default {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
// height: 50px; // height: 50px;
.firstRowBtn {
position: absolute;
right: 60px;
.el-button + .el-button {
margin-left: 20px;
}
}
.itemWidth {
max-width: 1050px;
min-width: 660px;
}
.expande-button-wrap { .expande-button-wrap {
position: absolute; position: absolute;
right: 0; right: 0;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
*/ */
// 本地环境配置 // 本地环境配置
module.exports = { module.exports = {
title: 'scrm-sub-blog', title: 'custom',
response: { response: {
data_key: 'data', data_key: 'data',
message_key: 'message', message_key: 'message',
......
/*
* @Descripttion:
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-09-18 11:51:29
* http://192.168.3.171:7300/mock/6136bea6ceeb5a5c2bec6950/ 冯支:http://192.168.1.74:8089
*/
// 本地环境配置
module.exports = { module.exports = {
title: 'scrm-sub-blog', title: 'custom',
response: { response: {
data_key: 'data', data_key: 'data',
message_key: 'message', message_key: 'message',
...@@ -7,6 +17,10 @@ module.exports = { ...@@ -7,6 +17,10 @@ module.exports = {
code_success_value: '0', code_success_value: '0',
code_message_map: {} code_message_map: {}
}, },
// 王小龙:http://192.168.2.98:8091/rop-scrm-datahub 冯支:http://192.168.3.191:8064/rop-scrm-entmicro/
/* 开发环境的域名:http://scrm.dev.glsx.com.cn/rop-scrm-datahub 测试:https://scrm.test.glsx.com.cn
http://scrm.dev.glsx.com.cn/rop-scrm-entmicro http://scrm.test.glsx.com.cn/
*/
request: { request: {
baseURL: 'http://scrm.test.glsx.com.cn', baseURL: 'http://scrm.test.glsx.com.cn',
// 设置超时时间 // 设置超时时间
...@@ -17,10 +31,10 @@ module.exports = { ...@@ -17,10 +31,10 @@ module.exports = {
responseType: 'json' responseType: 'json'
}, },
sign: { sign: {
app_key: '48e5e13229b82c1b4e6e8c96151f0637', appKey: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0', v: '1.0.0',
format: 'json', format: 'json',
source: '' source: 'client-sub-custom'
}, },
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b', secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b',
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js') // let request = require('@/http/request.js')
let cfg = require('./conf.js') let cfg = require('./conf.js')
import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function(isEnv = true) { export const fetchConfig = function(isEnv = true) {
if (isEnv) { if (isEnv) {
...@@ -16,8 +17,9 @@ export const fetchConfig = function(isEnv = true) { ...@@ -16,8 +17,9 @@ export const fetchConfig = function(isEnv = true) {
Object.assign(request, { timeout }) Object.assign(request, { timeout })
return Promise.resolve(cfg) return Promise.resolve(cfg)
} }
//return window.fetch('https://', {}).then(res => res.json()) // https://oss-config.test.glsx.com.cn/mock/6136bea6ceeb5a5c2bec6950/base
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' }) // https://oss-config.test.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config
return new Http().get('https://oss-config.test.glsx.com.cn/mock/616d28231072f92988f059fb/home/config')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
import Vue from 'vue' import Vue from 'vue'
import { Message, Button, ButtonGroup, Form, FormItem, Input, Radio, RadioGroup, Checkbox, CheckboxGroup, Switch, Select, Option, TimePicker, Col, DatePicker, Tree,Row,Table,TableColumn,Dialog,Pagination,Loading,Tooltip,Divider } from 'element-ui' import {Scrollbar,Popover, Message, Button, ButtonGroup, Form, FormItem, Input, Radio, RadioGroup, Checkbox, CheckboxGroup, Switch, Select, Option, TimePicker, Col, DatePicker, Tree,Row,Table,TableColumn,Dialog,Pagination,Loading,Tooltip,Divider } from 'element-ui'
Vue.use(Scrollbar)
Vue.use(Popover)
Vue.use(Button) Vue.use(Button)
Vue.use(ButtonGroup) Vue.use(ButtonGroup)
Vue.use(Form) Vue.use(Form)
......
...@@ -59,6 +59,24 @@ const staticRoutes = Object.freeze([ ...@@ -59,6 +59,24 @@ const staticRoutes = Object.freeze([
component: resolve => require([`@/views/expand/index.vue`], resolve), component: resolve => require([`@/views/expand/index.vue`], resolve),
meta: {} meta: {}
}, },
{
name: 'employee',
path: "/employee/index",
component: resolve => require([`@/views/employee/index.vue`], resolve),
meta: {}
},
{
name: 'employee',
path: "/employee/detail",
component: resolve => require([`@/views/employee/detail.vue`], resolve),
meta: {}
},
{
name: 'employee',
path: "/employee/add",
component: resolve => require([`@/views/employee/add.vue`], resolve),
meta: {}
}
]) ])
export default staticRoutes export default staticRoutes
......
...@@ -13,7 +13,7 @@ let routes = [] ...@@ -13,7 +13,7 @@ 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 }) {
const { response, request, sign, secret } = await fetchConfig() const { response, request, sign, secret } = await fetchConfig(globalState.configSwitch)//globalState.configSwitch
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
......
...@@ -16,8 +16,8 @@ import render from './render' ...@@ -16,8 +16,8 @@ import render from './render'
import { routes } from '@/router' import { routes } from '@/router'
export async function start() { export async function start() {
if (window.__POWERED_BY_QIANKUN__) return if (window.__POWERED_BY_QIANKUN__) return
const { response, request, sign, secret } = await fetchConfig() const { response, request, sign, secret } = await fetchConfig(true)
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: 'mini-ab3d905b-5148-42ba-86dd-8ec6a51b9b86-rop' } }) Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: 'mini-f27a0943-8fbf-4b21-a7a1-8e82a117ba39-rop' } })
Vue.use(GLButton,GLTable, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) Vue.use(GLButton,GLTable, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
render('/', routes) render('/', routes)
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
color:$btnBlue; color:$btnBlue;
&:hover{ &:hover{
color: #9994FF; color: #9994FF;
cursor: pointer;
} }
} }
.pure-blue-text{ .pure-blue-text{
......
...@@ -40,5 +40,8 @@ ...@@ -40,5 +40,8 @@
} }
// 子系统不设外边距 // 子系统不设外边距
.scrm-sub-client-container{ .scrm-sub-client-container{
padding: 20px 20px 20px 40px; padding: 0 20px 20px 40px;
}
.el-table .cell{
// line-height: 20px!important;
} }
\ No newline at end of file \ No newline at end of file
...@@ -12,12 +12,12 @@ const overThousandFilter = (val) => { ...@@ -12,12 +12,12 @@ const overThousandFilter = (val) => {
}; };
//来源 value值转为对应label(来源) //来源 value值转为对应label(来源)
const toLabel=(value)=> { const toLabel=(value)=> {
if (!value) { if (value!==0 && !value) {
return return
} }
let sourceList=JSON.parse(window.localStorage.getItem('sourceList')); let sourceList=JSON.parse(window.localStorage.getItem('sourceList'));
let curElement =sourceList.find(item => { let curElement =sourceList.find(item => {
return item.value == value return item.value === value
}) })
return curElement.label return curElement.label
......
...@@ -260,7 +260,7 @@ export default { ...@@ -260,7 +260,7 @@ export default {
top: 365px; top: 365px;
height: 20px; height: 20px;
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
...@@ -272,7 +272,7 @@ export default { ...@@ -272,7 +272,7 @@ export default {
top: 389px; top: 389px;
height: 25px; height: 25px;
font-size: 18px; font-size: 18px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600; font-weight: 600;
color: #716aff; color: #716aff;
line-height: 25px; line-height: 25px;
......
<template> <template>
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<!-- <div class="forbidClickLayer"></div> -->
<template v-if="isShowModal"> <template v-if="isShowModal">
<div class="modalLayer"></div> <div class="modalLayer"></div>
<img class="tipPanel" src="@/assets/clientDataOverview/allPicture.png" alt="" /> <img class="tipPanel" src="@/assets/clientDataOverview/allPicture.png" alt="" />
...@@ -10,6 +9,7 @@ ...@@ -10,6 +9,7 @@
</template> </template>
<div class="bannerWrapBox" @click="goNextPage" v-if="!isHasCustomerCountBanner"> <div class="bannerWrapBox" @click="goNextPage" v-if="!isHasCustomerCountBanner">
<!-- <img src="@/assets/clientDetail/defaultAvator.png" class="inTimeBtn" alt="" /> -->
<img class="bannerWrap" src="@/assets/clientDataOverview/companyBanner.png" alt="" /> <img class="bannerWrap" src="@/assets/clientDataOverview/companyBanner.png" alt="" />
</div> </div>
<h3 class="pageSubTitle">客户分层</h3> <h3 class="pageSubTitle">客户分层</h3>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<span class="person-text">人</span> <span class="person-text">人</span>
</span> </span>
<span v-if="!isEmptyObj"> <span v-if="!isEmptyObj">
占比:{{ topDataObj.purposePercent * 100 || 0 }}% 占比:{{ purposePercent }}%
<i class="triangle" :class="{ active: !isNoBuyUp }" v-if="!isEmptyObj"></i> <i class="triangle" :class="{ active: !isNoBuyUp }" v-if="!isEmptyObj"></i>
</span> </span>
<!-- <i class="vertical-line"></i> --> <!-- <i class="vertical-line"></i> -->
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
</span> </span>
<span v-if="!isEmptyObj"> <span v-if="!isEmptyObj">
占比:{{ topDataObj.purchasePercent * 100 || 0 }}% 占比:{{ purchasePercent }}%
<i class="triangle" :class="{ active: !isBuyUp }" v-if="!isEmptyObj"></i> <i class="triangle" :class="{ active: !isBuyUp }" v-if="!isEmptyObj"></i>
</span> </span>
...@@ -175,6 +175,7 @@ ...@@ -175,6 +175,7 @@
</template> </template>
<script> <script>
// import $ from 'jquery'
import { getDataOverview, getDataOverviewBarMap } from '@/api/modules/clientDataOverview' import { getDataOverview, getDataOverviewBarMap } from '@/api/modules/clientDataOverview'
import { getLoginCount } from '@/api/modules/loginCount' import { getLoginCount } from '@/api/modules/loginCount'
import pieEchart from '@/components/echarts/pieEchart' import pieEchart from '@/components/echarts/pieEchart'
...@@ -193,16 +194,6 @@ export default { ...@@ -193,16 +194,6 @@ export default {
pictorialBar, pictorialBar,
noData noData
}, },
// filters: {
// overThousandFilter: function (val) {
// if (val < 1000) return val;
// let a = val + "";
// let b = a.split("");
// b.splice(-3, 0, ",");
// return b.join("");
// },
// },
data() { data() {
return { return {
isShowModal: false, isShowModal: false,
...@@ -272,6 +263,14 @@ export default { ...@@ -272,6 +263,14 @@ export default {
}, },
isShowData() { isShowData() {
return Object.keys(this.topDataObj).length > 0 && this.topDataObj.customerCount > 0 ? true : false return Object.keys(this.topDataObj).length > 0 && this.topDataObj.customerCount > 0 ? true : false
},
purposePercent() {
if (this.topDataObj.purposePercent) return (this.topDataObj.purposePercent * 100).toFixed(2) || 0
return 0
},
purchasePercent() {
if (this.topDataObj.purchasePercent) return (this.topDataObj.purchasePercent * 100).toFixed(2) || 0
return 0
} }
}, },
created() { created() {
...@@ -294,6 +293,7 @@ export default { ...@@ -294,6 +293,7 @@ export default {
//引流企微按钮暂时效果 //引流企微按钮暂时效果
toGuideCompanyWechat() { toGuideCompanyWechat() {
window.open('https://www.baidu.com', '_blank') window.open('https://www.baidu.com', '_blank')
// $('.subtitle').hide()
}, },
showModalLayer() { showModalLayer() {
var baseNavEle = document.querySelector('.scrm-base-nav') var baseNavEle = document.querySelector('.scrm-base-nav')
...@@ -363,26 +363,33 @@ export default { ...@@ -363,26 +363,33 @@ export default {
//获取上面的数据 //获取上面的数据
getDataOverviewFun() { getDataOverviewFun() {
// const res = await getDataOverview() // const res = await getDataOverview()
getDataOverview({}) getDataOverview({}).then(res => {
.then(res => {
if (!res) { if (!res) {
return return
} }
console.log('上面', res)
this.topDataObj = res this.topDataObj = res
this.titles[0].num = res.newCarCustomerCount
this.titles[1].num = res.needRenewalCustomerCount
this.titles[2].num = res.burseholderCustomerCount
this.titles[4].num = res.silenceCustomerCount
// this.titles[0].num = res.newCarCustomerCount
// this.titles[1].num = res.needRenewalCustomerCount
// this.titles[2].num = res.burseholderCustomerCount
// this.titles[4].num = res.silenceCustomerCount
console.log(res, '这是上面数据')
this.isNoBuyUp = res.purposeUp this.isNoBuyUp = res.purposeUp
this.isBuyUp = res.purchaseUp this.isBuyUp = res.purchaseUp
if (this.topDataObj.customerCount > 0) { if (this.topDataObj.customerCount > 0) {
this.isHasCustomerCountBanner = true this.isHasCustomerCountBanner = true
} }
console.log(this.isHasCustomerCountBanner, 'true/fasle')
this.$set(this.titles[0], 'num', res.newCarCustomerCount)
this.$set(this.titles[1], 'num', res.needRenewalCustomerCount)
this.$set(this.titles[2], 'num', res.burseholderCustomerCount)
this.$set(this.titles[3], 'num', res.silenceCustomerCount)
}) })
.catch(err => { // .catch(err => {
console.log('错误信息:', err) // console.log('错误信息:', err)
}) // })
}, },
//首次进来获取下方柱状图数据(一进来默认传7天) //首次进来获取下方柱状图数据(一进来默认传7天)
async getDataOverviewBarMapFun(dayCount = 7) { async getDataOverviewBarMapFun(dayCount = 7) {
...@@ -435,33 +442,8 @@ export default { ...@@ -435,33 +442,8 @@ export default {
.person-text { .person-text {
font-size: 16px !important; font-size: 16px !important;
} }
.forbidClickLayer {
position: fixed;
z-index: 95;
background-color: rgba(0, 0, 0, 0.79);
width: 1px;
height: 1px;
border-radius: 100%;
border: 5000px solid rgba(0, 0, 0, 0.79);
// width: 100%;
// height: 100%;
}
.modalLayer {
// position: fixed;
// z-index: 99;
// // width: 100%;
// // height: 100%;
// top: 120px; //125px;
// right: 50%; //320px;
// width: 160px; //160px;
// height: 90px; //90px;
// filter: blur(15px);
// border-radius: 50% / 50%;
// box-shadow: 0 0 0 2000px #000000;
// background-color: #000000;
// opacity: 0.79;
.modalLayer {
position: fixed; position: fixed;
z-index: 99; z-index: 99;
top: 20px; top: 20px;
...@@ -508,7 +490,14 @@ export default { ...@@ -508,7 +490,14 @@ export default {
} }
.bannerWrapBox { .bannerWrapBox {
width: 100%; width: 100%;
> img { // position: relative;
// .inTimeBtn {
// position: absolute;
// bottom: 20px;
// right: 50px;
// }
.bannerWrap {
width: 100%; width: 100%;
// height: 146px; // height: 146px;
...@@ -521,7 +510,6 @@ export default { ...@@ -521,7 +510,6 @@ export default {
margin: 20px 0; margin: 20px 0;
height: 20px; height: 20px;
font-size: 20px; font-size: 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 700; font-weight: 700;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
...@@ -610,7 +598,6 @@ export default { ...@@ -610,7 +598,6 @@ export default {
top: 365px; top: 365px;
height: 20px; height: 20px;
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
...@@ -622,7 +609,7 @@ export default { ...@@ -622,7 +609,7 @@ export default {
top: 389px; top: 389px;
height: 25px; height: 25px;
font-size: 18px; font-size: 18px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600; font-weight: 600;
color: #716aff; color: #716aff;
line-height: 25px; line-height: 25px;
...@@ -634,7 +621,7 @@ export default { ...@@ -634,7 +621,7 @@ export default {
top: 365px; top: 365px;
height: 20px; height: 20px;
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
...@@ -646,7 +633,6 @@ export default { ...@@ -646,7 +633,6 @@ export default {
right: 57px; right: 57px;
top: 389px; top: 389px;
font-size: 18px; font-size: 18px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600; font-weight: 600;
color: #fe9c1c; color: #fe9c1c;
line-height: 25px; line-height: 25px;
...@@ -921,7 +907,7 @@ export default { ...@@ -921,7 +907,7 @@ export default {
height: 80px; height: 80px;
.one1 { .one1 {
margin-top: 30px; margin-top: 30px;
height: 44px; height: 36px;
position: relative; position: relative;
span { span {
position: absolute; position: absolute;
...@@ -941,7 +927,7 @@ export default { ...@@ -941,7 +927,7 @@ export default {
left: 38.4%; left: 38.4%;
} }
span:nth-child(3) { span:nth-child(3) {
left: 57%; left: 54%;
} }
} }
.one2 { .one2 {
...@@ -962,7 +948,7 @@ export default { ...@@ -962,7 +948,7 @@ export default {
left: 38.4%; left: 38.4%;
} }
span:nth-child(2) { span:nth-child(2) {
left: 57%; left: 54%;
} }
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<div class="header"> <div class="header">
<div class="vehicleGroupName"> <div class="vehicleGroupName">
<span>奥迪车友群</span> <span>{{ groupName }}</span>
</div> </div>
<button class="backBtn" @click="goBack">返回客户群管理</button> <button class="backBtn" @click="goBack">返回客户群管理</button>
</div> </div>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</p> </p>
<p> <p>
<span>创建时间</span> <span>创建时间</span>
<span class="ellipsis-1" style="width:100%;">{{ leftPanelList.createDate }}</span> <span class="ellipsis-1" :title="leftPanelList.createDate">{{ leftPanelList.createDate }}</span>
</p> </p>
</div> </div>
<div class="rightWrap"> <div class="rightWrap">
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<span>客户列表</span> <span>客户列表</span>
<span>{{ clientTableDataNum || 0 }}个</span> <span>{{ clientTableDataNum || 0 }}个</span>
</p> </p>
<search-form class="searchTop border-shadow" :formModel="searchForm" :formList="clientGroupFormList"> <search-form class="searchTop border-shadow" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<!-- :size="btn_size" --> <!-- :size="btn_size" -->
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<GLTable ref="clientGroupDetail" @setTableFinishFun="setTableFinishFun" :tableId="$route.query.id" :hasNum="true" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchForm" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url"> <GLTable ref="clientGroupDetail" @setTableFinishFun="setTableFinishFun" :tableId="$route.query.id" :hasNum="true" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchForm" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span slot="customerName" slot-scope="scope"> <span slot="customerName" slot-scope="scope">
<span>{{ scope.scope.customerName }}</span> <span>{{ scope.scope.customerName }}</span>
<span class="blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span> <span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span>
</span> </span>
<span slot="customerSex" slot-scope="scope"> <span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : '女' }}</span> <span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : '女' }}</span>
...@@ -80,6 +80,7 @@ export default { ...@@ -80,6 +80,7 @@ export default {
name: 'clientGroupDetail', name: 'clientGroupDetail',
data() { data() {
return { return {
groupName: this.$route.query.groupName,
url: url, url: url,
leftPanelList: {}, leftPanelList: {},
searchForm: {}, searchForm: {},
...@@ -210,6 +211,9 @@ export default { ...@@ -210,6 +211,9 @@ export default {
resolve() resolve()
}) })
}, },
setTableHeightEvent() {
this.$refs.clientGroupManage.setTableHeightFun()
},
setTableFinishFun(content) { setTableFinishFun(content) {
this.clientTableDataNum = content.length this.clientTableDataNum = content.length
}, },
...@@ -227,7 +231,7 @@ export default { ...@@ -227,7 +231,7 @@ export default {
}, },
goDetail(id) { goDetail(id) {
this.$router.push({ this.$router.push({
name: '/clientManage/clientDetail', path: '/clientManage/clientDetail',
query: { query: {
id: id id: id
} }
...@@ -277,7 +281,7 @@ export default { ...@@ -277,7 +281,7 @@ export default {
.leftWrap { .leftWrap {
width: 240px; width: 240px;
// height: 877px; // height: 877px;
min-height: calc(100vh - 92px); min-height: 270px; //calc(100vh - 92px);
background-color: #fff; background-color: #fff;
box-sizing: border-box; box-sizing: border-box;
.avator { .avator {
......
<template> <template>
<div> <div>
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<p class="pageTitle">客户群管理</p> <!-- <p class="pageTitle">客户群管理</p> -->
<div class="pageContent"> <div class="pageContent">
<search-form class="searchTop border-shadow" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent"> <search-form class="searchTop border-shadow" :isHasSyncBtn="true" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent" @resetTable="resetTable" @searchTable="searchTable" @syncClick="syncClick">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="syncClick" :loading="sloading">同步数据</el-button>
</span> </span>
</search-form> </search-form>
<!-- <basic-table ref="clientGroupTable" :tableParams="tableParams" :getListApi="getListApi" :searchForm="searchForm" :hasNum="true"> <!-- <basic-table ref="clientGroupTable" :tableParams="tableParams" :getListApi="getListApi" :searchForm="searchForm" :hasNum="true">
...@@ -14,14 +15,14 @@ ...@@ -14,14 +15,14 @@
<el-button v-for="(j, idx) in tableParams.tableOption.btnList" :key="idx" :type="j.type || 'text'" :size="btn_size" @click="btnClick(j.pType, scope.scope)">{{ j.name }}</el-button> <el-button v-for="(j, idx) in tableParams.tableOption.btnList" :key="idx" :type="j.type || 'text'" :size="btn_size" @click="btnClick(j.pType, scope.scope)">{{ j.name }}</el-button>
</span> </span>
</basic-table> --> </basic-table> -->
<GLTable ref="clientGroupManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :searchForm="searchForm" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }"> <GLTable ref="clientGroupManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :searchForm="searchFormTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="status" slot-scope="scope"> <span slot="status" slot-scope="scope">
<!-- <span class="dot" :class="scope.scope.enableStatus ? DICTSTATUS[scope.scope.enableStatus].split(',')[1] : ''"></span> --> <!-- <span class="dot" :class="scope.scope.enableStatus ? DICTSTATUS[scope.scope.enableStatus].split(',')[1] : ''"></span> -->
<span class="statusText" :class="scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[1] : ''">{{ scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[0] : '--' }}</span> <span class="statusText" :class="scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[1] : ''">{{ scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[0] : '--' }}</span>
</span> </span>
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <auth-button :data="scope.scope"></auth-button> --> <!-- <auth-button :data="scope.scope"></auth-button> -->
<span @click="goDetail(scope.scope.id)" class="blue-text">详情</span> <span @click="goDetail(scope.scope.id, scope.scope.custGroupName)" class="blue-text">详情</span>
</template> </template>
</GLTable> </GLTable>
</div> </div>
...@@ -30,18 +31,21 @@ ...@@ -30,18 +31,21 @@
</template> </template>
<script> <script>
import { getTableList } from '@/api/modules/clientGroupManage' import { getTableList, syncCustomerBase } from '@/api/modules/clientGroupManage'
import url from '@/assets/clientDataOverview/nodata.png' import url from '@/assets/clientDataOverview/nodata.png'
export default { export default {
name: 'clientManage', name: 'clientManage',
data() { data() {
return { return {
url: url, url: url,
sloading: false,
titles: [ titles: [
{ name: '客户群总数', num: 100, rate: '+10%', isUp: true, tips: '群提示消息1' }, { name: '客户群总数', num: 100, rate: '+10%', isUp: true, tips: '群提示消息1' },
{ name: '新增客户群数', num: 100, rate: '+10%', isUp: true, tips: '群提示消息2' } { name: '新增客户群数', num: 100, rate: '+10%', isUp: true, tips: '群提示消息2' }
], ],
searchForm: {}, searchForm: {},
searchFormTable: {},
clientGroupFormList: [ clientGroupFormList: [
{ {
type: 'daterange', type: 'daterange',
...@@ -107,7 +111,8 @@ export default { ...@@ -107,7 +111,8 @@ export default {
}, },
{ {
label: '创建时间', label: '创建时间',
prop: 'addTime' prop: 'addTime',
width: 188
} }
], ],
tableOption: { tableOption: {
...@@ -134,6 +139,22 @@ export default { ...@@ -134,6 +139,22 @@ export default {
}, },
methods: { methods: {
syncClick() {
let _this = this
_this.sloading = true
syncCustomerBase({})
.then(res => {
if (!res) {
return
}
_this.sloading = false
this.$message.success('已同步客户群')
this.$refs.clientGroupManage.refreshTable()
})
.catch(err => {
_this.sloading = false
})
},
setTableHeightEvent() { setTableHeightEvent() {
this.$refs.clientGroupManage.setTableHeightFun() this.$refs.clientGroupManage.setTableHeightFun()
}, },
...@@ -142,14 +163,14 @@ export default { ...@@ -142,14 +163,14 @@ export default {
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
console.log(this.searchForm) this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.daterange) { if (this.searchFormTable.daterange) {
this.searchForm.beginTime = this.searchForm.daterange[0] this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchForm.endTime = this.searchForm.daterange[1] this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchForm.daterange
} else { } else {
if (this.searchForm.beginTime) delete this.searchForm.beginTime && delete this.searchForm.endTime if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
} }
delete this.searchFormTable.daterange
resolve() resolve()
}) })
}, },
...@@ -159,13 +180,21 @@ export default { ...@@ -159,13 +180,21 @@ export default {
this.$refs.clientGroupManage.refreshTable() this.$refs.clientGroupManage.refreshTable()
}, },
btnClick(ptype, scope) {}, btnClick(ptype, scope) {},
goDetail(id) { goDetail(id, name) {
this.$router.push({ this.$router.push({
name: '/clientGroupManage/clientGroupDetail', path: '/clientGroupManage/clientGroupDetail',
query: { query: {
id: id id: id,
groupName: name
} }
}) })
// this.$history.push({
// path: '/clientGroupManage/clientGroupDetail',
// params: {
// id: id,
// groupName: name
// }
// })
} }
} }
} }
...@@ -179,7 +208,6 @@ export default { ...@@ -179,7 +208,6 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
height: 20px; height: 20px;
font-size: 20px; font-size: 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 700; font-weight: 700;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
...@@ -187,6 +215,7 @@ export default { ...@@ -187,6 +215,7 @@ export default {
} }
.pageContent { .pageContent {
padding: 6px 20px 30px; padding: 6px 20px 30px;
// min-width: 1300px;
background-color: #fff; background-color: #fff;
.el-button + .el-button { .el-button + .el-button {
margin-left: 20px; margin-left: 20px;
...@@ -206,9 +235,9 @@ export default { ...@@ -206,9 +235,9 @@ export default {
// font-weight: 400; // font-weight: 400;
// color: #666666; // color: #666666;
// } // }
.glsx-table { // .glsx-table {
margin-top: 20px; // margin-top: 20px;
} // }
} }
} }
</style> </style>
...@@ -14,33 +14,38 @@ ...@@ -14,33 +14,38 @@
</div> </div>
<p> <p>
<span>客户名称</span> <span>客户名称</span>
<span>{{ leftPanelInfo.customerName }}</span> <span class="ellipsis-1" :title="leftPanelInfo.customerName">
<span>
{{ leftPanelInfo.customerName }}
<span style="color:#5850ff">{{ leftPanelInfo.type == 1 ? '@微信' : leftPanelInfo.type == 2 ? '@企微' : '' }}</span>
</span>
</span>
</p> </p>
<p> <p>
<span>联系电话</span> <span>联系电话</span>
<span>{{ leftPanelInfo.customerPhone }}</span> <span class="ellipsis-1">{{ leftPanelInfo.customerPhone }}</span>
</p> </p>
<p> <p>
<span>微信号</span> <span>微信号</span>
<span>{{ leftPanelInfo.weChatId || '待完善' }}</span> <span class="ellipsis-1">{{ leftPanelInfo.weChatId || '待完善' }}</span>
</p> </p>
<p> <p>
<span>性别</span> <span>性别</span>
<span>{{ leftPanelInfo.customerSex == 0 ? '未知' : leftPanelInfo.customerSex == 1 ? '男' : leftPanelInfo.customerSex == 2 ? '女' : '' }}</span> <span class="ellipsis-1">{{ leftPanelInfo.customerSex == 0 ? '未知' : leftPanelInfo.customerSex == 1 ? '男' : leftPanelInfo.customerSex == 2 ? '女' : '' }}</span>
</p> </p>
<p> <p>
<span>企业简称</span> <span>企业简称</span>
<span>{{ leftPanelInfo.corpName }}</span> <span class="ellipsis-1">{{ leftPanelInfo.corpName || '待完善' }}</span>
</p> </p>
<p> <p>
<span>职务</span> <span>职务</span>
<span>{{ leftPanelInfo.position }}</span> <span class="ellipsis-1">{{ leftPanelInfo.position || '待完善' }}</span>
</p> </p>
<p> <p v-if="leftPanelInfo.type == 2">
<span>类型</span> <span>类型</span>
<span>{{ leftPanelInfo.type == 1 ? '微信用户' : leftPanelInfo.type == 2 ? '企微用户' : '' }}</span> <span class="ellipsis-1">{{ leftPanelInfo.type == 1 ? '微信用户' : leftPanelInfo.type == 2 ? '企微用户' : '' }}</span>
</p> </p>
<p> <p v-if="leftPanelInfo.isJoin == 1">
<span>是否加企微</span> <span>是否加企微</span>
<!-- 1-是,2-否 --> <!-- 1-是,2-否 -->
<span>{{ leftPanelInfo.isJoin == 1 ? '是' : leftPanelInfo.isJoin == 0 ? '否' : '' }}</span> <span>{{ leftPanelInfo.isJoin == 1 ? '是' : leftPanelInfo.isJoin == 0 ? '否' : '' }}</span>
...@@ -70,8 +75,8 @@ ...@@ -70,8 +75,8 @@
<span>{{ vehicleTableData.length || 0 }}辆</span> <span>{{ vehicleTableData.length || 0 }}辆</span>
</p> </p>
<!--1. 车辆信息表 --> <!--1. 车辆信息表 -->
<el-table :data="vehicleTableData" style="width: 100%" :header-cell-style="{ background: '#F4F6FC', color: '#333333', fontSize: '14px' }"> <el-table :data="vehicleTableData" style="width: 100%" :row-style="{ height: 88 + 'px' }" :header-cell-style="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<el-table-column prop="standNo" label="车架号(后6位)" align="center"> <el-table-column prop="standNo" label="车架号(后6位)" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.standNo.substring(scope.row.standNo.length - 6) }}</span> <span>{{ scope.row.standNo.substring(scope.row.standNo.length - 6) }}</span>
</template> </template>
...@@ -89,9 +94,9 @@ ...@@ -89,9 +94,9 @@
<el-table-column prop="vehicleModelYear" label="年款" align="center"></el-table-column> <el-table-column prop="vehicleModelYear" label="年款" align="center"></el-table-column>
<el-table-column prop="vehiclePrice" label="购车价格" align="center"></el-table-column> <el-table-column prop="vehiclePrice" label="购车价格" align="center"></el-table-column>
<el-table-column prop="buyTime" label="购车时间" align="center"></el-table-column> <el-table-column prop="buyTime" label="购车时间" align="center"></el-table-column>
<el-table-column prop="insBgnTime" label="保险开始时间" align="center"></el-table-column> <el-table-column prop="insBgnTime" label="保险开始时间" align="center" width="120"></el-table-column>
<el-table-column prop="insEndTime" label="保险到期时间" align="center"></el-table-column> <el-table-column prop="insEndTime" label="保险到期时间" align="center" width="120"></el-table-column>
<el-table-column prop="maintRecTime" label="最近保养时间" align="center"></el-table-column> <el-table-column prop="maintRecTime" label="最近保养时间" align="center" width="120"></el-table-column>
<!-- 无数据插槽用法 --> <!-- 无数据插槽用法 -->
<!-- <div slot="empty" class="emptyBg"> <!-- <div slot="empty" class="emptyBg">
<img src="@/assets/clientDataOverview/nodata.png" alt=""> <img src="@/assets/clientDataOverview/nodata.png" alt="">
...@@ -104,14 +109,14 @@ ...@@ -104,14 +109,14 @@
</p> </p>
<!-- <div></div> --> <!-- <div></div> -->
<!--2. 员工跟进表 --> <!--2. 员工跟进表 -->
<glsx-table :hasNum="false" :tableData="employTableList" :hasPage="false" :tableParams="tableParams" :headerStyle="{ background: '#F4F6FC', color: '#333333', fontSize: '14px' }"> <GLTable :hasNum="false" :tableData="employTableList" :hasPage="false" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="addWay" slot-scope="scope"> <span slot="addWay" slot-scope="scope">
<span>{{ scope.scope.addWay | toLabel }}</span> <span>{{ scope.scope.addWay | toLabel }}</span>
</span> </span>
<span slot="addType" slot-scope="scope"> <span slot="addType" slot-scope="scope">
<span>{{ scope.scope.addType == 1 ? '微信' : '企微' }}</span> <span>{{ addTypeToLable(scope.scope.addType) }}</span>
</span> </span>
</glsx-table> </GLTable>
<!-- <el-table :data="employTableList" style="width: 100%" :header-cell-style="{ background: '#F4F6FC', color: '#333333', fontSize: '14px' }"> <!-- <el-table :data="employTableList" style="width: 100%" :header-cell-style="{ background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<el-table-column prop="staffName" label="跟进员工" align="center"></el-table-column> <el-table-column prop="staffName" label="跟进员工" align="center"></el-table-column>
<el-table-column prop="departmentName" label="所属部门" align="center"></el-table-column> <el-table-column prop="departmentName" label="所属部门" align="center"></el-table-column>
...@@ -134,8 +139,12 @@ ...@@ -134,8 +139,12 @@
</p> </p>
<!-- <div>所属客户群表格,待定</div> --> <!-- <div>所属客户群表格,待定</div> -->
<!-- 3.所属客户群 --> <!-- 3.所属客户群 -->
<el-table :data="clientGroupTableList" style="width: 100%" :header-cell-style="{ background: '#F4F6FC', color: '#333333', fontSize: '14px' }"> <el-table :data="clientGroupTableList" style="width: 100%" :row-style="{ height: 88 + 'px' }" :header-cell-style="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<el-table-column prop="groupName" label="客户群名称" align="center"></el-table-column> <el-table-column label="客户群名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.groupName || '群聊(默认)' }}</span>
</template>
</el-table-column>
<el-table-column prop="groupHostName" label="群主" align="center"></el-table-column> <el-table-column prop="groupHostName" label="群主" align="center"></el-table-column>
<el-table-column prop="membersNumber" label="成员数" align="center"></el-table-column> <el-table-column prop="membersNumber" label="成员数" align="center"></el-table-column>
<el-table-column prop="groupNickName" label="本群昵称" align="center"></el-table-column> <el-table-column prop="groupNickName" label="本群昵称" align="center"></el-table-column>
...@@ -178,18 +187,12 @@ export default { ...@@ -178,18 +187,12 @@ export default {
data() { data() {
return { return {
leftPanelInfo: {}, leftPanelInfo: {},
labelIdList: [], //存放用户被标记标签的id
tagsList: [ tagsList: [
// { labelName: '一般', labelId: 1 }, // { labelName: '一般', labelId: 1 },
// { name: '初次沟通', id: 2 } // { name: '初次沟通', id: 2 }
], ],
vehicleTableData: [ vehicleTableData: [],
// {
// date: '123456',
// name: '粤B 3****1',
// address: '奥迪',
// xi: '2021款 RS 5.2.9TSportback 暗精版'
// },
],
//员工跟进 //员工跟进
tableParams: { tableParams: {
listName: 'staffFollows', listName: 'staffFollows',
...@@ -205,7 +208,8 @@ export default { ...@@ -205,7 +208,8 @@ export default {
}, },
{ {
label: '添加时间', label: '添加时间',
prop: 'addTime' prop: 'addTime',
width: 105
}, },
{ {
label: '来源', label: '来源',
...@@ -215,7 +219,8 @@ export default { ...@@ -215,7 +219,8 @@ export default {
{ {
label: '添加类型', label: '添加类型',
prop: 'addType', prop: 'addType',
addHtml: 'addType' addHtml: 'addType',
width: 170
}, },
{ {
label: '备注手机号', label: '备注手机号',
...@@ -237,58 +242,28 @@ export default { ...@@ -237,58 +242,28 @@ export default {
//弹窗数据 //弹窗数据
tagsDialogTitle: '添加标签', tagsDialogTitle: '添加标签',
tagsVisible: false, tagsVisible: false,
roleForm: {
tagsName: '', companyTagsList: [],
initTagsGroup: '', ownShopTagsList: [],
tagsList: []
},
companyTagsList: [
// {
// name: '标签一',
// arr: [
// { name: '一般', checked: true, id: 1, original: true },
// { name: '重要', checked: false, id: 2 },
// { name: '核心', checked: false, id: 3 }
// ]
// },
// {
// name: '标签二',
// arr: [
// { name: '初次沟通', checked: true, id: 11, original: true },
// { name: '持续跟进', checked: false, id: 12 },
// { name: '意向车主', checked: false, id: 13 }
// ]
// }
],
ownShopTagsList: [
// {
// name: '性别',
// arr: [
// { name: '一般', checked: true, id: 21, original: true },
// { name: '重要', checked: false, id: 22 },
// { name: '核心', checked: true, id: 23, original: true }
// ]
// },
// {
// name: '省份',
// arr: [
// { name: '初次沟通', checked: true, id: 31, original: true },
// { name: '持续跟进', checked: false, id: 32 },
// { name: '意向车主意向车主意向车主意向车好', checked: false, id: 33 }
// ]
// }
],
allTagsList: [], //企业自店的所有的加起来 allTagsList: [], //企业自店的所有的加起来
submitTagsList: [], submitTagsList: [],
storeTagList: [], storeTagList: [],
labelIdList: [] merchantId: 10001001
} }
}, },
created() { created() {
// this.getPageDetail() if (window.__POWERED_BY_QIANKUN__) {
this.getSingleClientTag() //运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId
}
this.getPageDetail()
this.getSingleClientTag(this.$route.query.id, this.merchantId)
}, },
methods: { methods: {
addTypeToLable(num) {
return num === 0 ? '成员主动添加' : num === 1 ? '客户主动添加' : num === 2 ? '成员共享/管理员分配' : ''
},
goDetail(id) { goDetail(id) {
this.$router.push({ this.$router.push({
path: '/clientGroupManage/clientGroupDetail', path: '/clientGroupManage/clientGroupDetail',
...@@ -306,14 +281,18 @@ export default { ...@@ -306,14 +281,18 @@ export default {
getSingleClientTag(param) getSingleClientTag(param)
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
console.log(res.userLabelUnitList, 'kkk') console.log(res, 'kkk')
if (!res.userLabelUnitList) {
return
}
let filterArr = [] let filterArr = []
res.userLabelUnitList.forEach(item => { res.userLabelUnitList.forEach(item => {
filterArr.push(...item.labelInfoList) filterArr.push(...item.labelInfoList)
}) })
this.tagsList = filterArr this.tagsList = filterArr
console.log(this.tagsList, '当前被选中的标签') this.labelIdList = filterArr.map(item => item.labelId)
// console.log(this.tagsList, '当前被选中的标签')
} else { } else {
this.$message.error(res.message) this.$message.error(res.message)
} }
...@@ -355,20 +334,40 @@ export default { ...@@ -355,20 +334,40 @@ export default {
} }
}, },
getAllTags() { getAllTags() {
getAllTagTree({ 'labelTreeReq.shopId': 10001001 }) getAllTagTree({ 'labelTreeReq.shopId': this.merchantId })
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
console.log(res.data.labelTreeRets, '标签树') console.log(res.data.labelTreeRets, '标签树')
let companyArr = res.data.labelTreeRets.filter(item => item.labelType == '企业标签') let companyArr = res.data.labelTreeRets.filter(item => item.labelType == '企业标签')
companyArr.forEach(item => item.labelList.forEach(ele => (ele.checked = false))) companyArr.forEach(item =>
item.labelList.forEach(ele => {
ele.checked = false
ele.original = false
})
)
let ownShopArr = res.data.labelTreeRets.filter(ele => ele.labelType == '自店标签') let ownShopArr = res.data.labelTreeRets.filter(ele => ele.labelType == '自店标签')
ownShopArr.forEach(item => item.labelList.forEach(ele => (ele.checked = false))) ownShopArr.forEach(item =>
item.labelList.forEach(ele => {
ele.checked = false
ele.original = false
})
)
// console.log(companyArr, ownShopArr, '企业标签自店标签') // console.log(companyArr, ownShopArr, '企业标签自店标签')
this.companyTagsList = companyArr this.companyTagsList = companyArr
this.ownShopTagsList = ownShopArr this.ownShopTagsList = ownShopArr
this.allTagsList = [...this.companyTagsList, ...this.ownShopTagsList] this.allTagsList = [...this.companyTagsList, ...this.ownShopTagsList]
this.allTagsList.forEach(item =>
item.labelList.forEach(ele => {
for (let i = 0; i < this.labelIdList.length; i++) {
if (ele.id == this.labelIdList[i]) {
ele.checked = true
ele.original = true
}
}
})
)
} else { } else {
this.$message.error(res.message) this.$message.error(res.message)
} }
...@@ -379,18 +378,11 @@ export default { ...@@ -379,18 +378,11 @@ export default {
this.handleClose() this.handleClose()
}, },
handleConfirm() { handleConfirm() {
this.$refs.roleForm.$children[0].validate(valid => { // if (this.roleForm.tagsList.length <= 0) {
if (!valid) { // this.$message.warning('至少要添加一个标签')
return // return false
} // }
if (this.roleForm.tagsList.length <= 0) {
this.$message.warning('至少要添加一个标签')
// this.$message({
// message: '警告哦,这是一条警告消息',
// type: 'warning'
// });
return false
}
//后台要求循环掉接口 //后台要求循环掉接口
//满足条件进行提交 //满足条件进行提交
// let param = { // let param = {
...@@ -400,37 +392,33 @@ export default { ...@@ -400,37 +392,33 @@ export default {
// } // }
this.submitTagsList.forEach((item, index) => { this.submitTagsList.forEach((item, index) => {
let param = { let param = {
'req.OneId': 14120314541863, 'req.OneId': this.$route.query.id,
'req.labelGroupId': item.labelGroup.id, 'req.labelGroupId': item.labelGroup.id
'req.labelIdList': item.labelList.filter(ele => ele.id) // 'req.labelIdList': item.labelList.map(ele => ele.id)
} }
var ids = item.labelList.map(ele => ele.id)
param['req.labelIdList'] = ids
console.log(param, '参数') console.log(param, '参数')
// addSingleClientTag({ addSingleClientTag(param)
// 'req.OneId': 14120314541863, .then(res => {
// 'req.labelGroupId': item.labelGroup.id, if (res.code == 0) {
// 'req.labelIdList': item.labelList.filter(ele => ele.id) if (index == this.submitTagsList.length - 1) {
// }) this.$message.success('添加成功')
// .then(res => {
// if (res.code == 0) {
// if (index == this.submitTagsList.length - 1) {
// this.$message.success('添加成功')
// this.handleClose() this.handleClose()
// this.getSingleClientTag() this.getSingleClientTag(this.$route.query.id, this.merchantId)
// } }
// } else { } else {
// this.$message.error(res.message) this.$message.error(res.message)
// } }
// }) })
// .catch(err => { .catch(err => {
// console.error(err, '错误捕获') console.error(err, '错误捕获')
// })
}) })
}) })
}, },
handleClose() { handleClose() {
if (this.tagsVisible) { if (this.tagsVisible) {
// && this.$refs.roleForm this.$refs.roleForm.$children[0].resetFields()
this.companyTagsList = [] this.companyTagsList = []
this.ownShopTagsList = [] this.ownShopTagsList = []
} }
...@@ -453,7 +441,7 @@ export default { ...@@ -453,7 +441,7 @@ export default {
return { return {
...item, ...item,
labelList: item.labelList.filter(e => { labelList: item.labelList.filter(e => {
if (e.checked) { if (e.checked && !original) {
return e return e
} }
}) })
...@@ -596,7 +584,7 @@ export default { ...@@ -596,7 +584,7 @@ export default {
} }
} }
.tagsWrap { .tagsWrap {
min-height: 112px; min-height: 74px;
border: 1px solid #e8e8ea; border: 1px solid #e8e8ea;
padding: 20px 10px; padding: 20px 10px;
display: flex; display: flex;
......
{
"TreeData":[
{
"dataFrom":"企微",
"labelGroup":{
"id":"1",
"name":"是否企微客户"
},
"labelType":"企业标签",
"labelList":[
{
"id":1,
"name":"企微客户"
},
{
"id":2,
"name":"非企微客户"
}
]
},
{
"dataFrom":"企微",
"labelGroup":{
"id":"2",
"name":"评价"
},
"labelType":"企业标签",
"labelList":[
{
"id":3,
"name":"优秀"
},
{
"id":4,
"name":"一般"
},
{
"id":5,
"name":"较差"
}
]
},
{
"dataFrom":"企微",
"labelGroup":{
"id":"3",
"name":"百家姓"
},
"labelType":"企业标签",
"labelList":[
{
"id":6,
"name":"赵"
},
{
"id":7,
"name":"钱"
},
{
"id":8,
"name":"孙"
},
{
"id":9,
"name":"李"
}
]
},
{
"dataFrom":"企微",
"labelGroup":{
"id":"7",
"name":"存档客户"
},
"labelType":"自店标签",
"labelList":[
{
"id":55,
"name":"张三"
},
{
"id":56,
"name":"李四"
}
]
}
]
}
\ No newline at end of file \ No newline at end of file
<!--
* @Descripttion:
* @version: X3版本
* @Author: lily
* @Date: 2021-10-12 10:21:48
* @LastEditors: lily
* @LastEditTime: 2021-10-12 11:01:29
-->
<template>
<div class="wrapper">
<!-- 头部部分 -->
<div class="header">
<el-input v-model="input" placeholder="请输入内容"></el-input>
</div>
<!-- table部分 -->
<div class="main">
<div class="table-box">
<el-table class="table-list__box" ref="tableList" :data="dataList" :height="tableHeight" border stripe tooltip-effect="dark">
<el-table-column v-for="column in columns" :key="column.key" :prop="column.key" :label="column.label" :width="column.width" :min-width="150" sortable show-overflow-tooltip filter-placement="bottom"></el-table-column>
</el-table>
<!-- 分页 -->
<div class="pagination__wrapper">
<cd-pagination ref="pager" :total="pagination.total" :currPage="pagination.pageNow" :pageSize="pagination.pageSize"></cd-pagination>
</div>
</div>
</div>
</div>
</template>
<script>
const columns = [
{ key: 'accountName', label: '登录账号', width: 120 },
{ key: 'phone', label: '登录手机', width: 120 },
{ key: 'userName', label: '用户名称', width: 120 },
{ key: 'email', label: '登录邮箱', width: 210 },
{ key: 'orgNames', label: '所属组织', width: 210 },
{ key: 'roleName', label: '所属角色', width: 210 },
{ key: 'memo', label: '备注', width: 120 },
{ key: 'updateTime', label: '最后操作时间' }
]
import demo from '@/common/demo.json'
export default {
name: 'clientDemo',
components: {},
data() {
return {
input: '',
columns,
dataList: [],
tableHeight: null,
pagination: {
pageNow: 1,
pageSize: 20,
pages: 0,
total: 0
}
}
},
mounted() {
setTimeout(() => {
let height = this.$refs.tableList.$el.parentElement.clientHeight
this.tableHeight = `${height}px`
console.log(this.tableHeight, 'tableHeight')
})
this.dataList = demo.data.rows.concat([])
}
}
</script>
<style lang="scss" scoped>
.wrapper {
background: #fff !important;
height: 100%;
display: flex;
flex-direction: column;
}
.header {
padding: 20px 8px;
background: #ccc;
}
.main {
flex: 1;
overflow: hidden;
}
.table-box {
height: 100%;
display: flex;
flex: auto;
flex-direction: column;
overflow: hidden;
}
</style>
<template> <template>
<div> <div>
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<p class="pageTitle">客户管理</p> <!-- <p class="pageTitle">客户管理</p> -->
<div class="pageContent"> <div class="pageContent">
<search-form class="searchTop border-shadow" :formModel="searchForm" :formList="clientManageFormList" @setTableHeightEvent="setTableHeightEvent"> <search-form :ploading="sloading" :isHasSyncBtn="true" class="searchTop border-shadow" :formModel="searchForm" :formList="clientManageFormList" @setTableHeightEvent="setTableHeightEvent" @resetTable="resetTable" @searchTable="searchTable" @syncClick="syncClick">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<!-- :id="tableParams.btnId" --> <!-- :id="tableParams.btnId" -->
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="syncClick" :loading="sloading">同步数据</el-button>
</span> </span>
</search-form> </search-form>
<GLTable ref="clientManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchForm" :noDataImg="url" :pageConf="pageConf" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }"> <GLTable ref="clientManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :noDataImg="url" :pageConf="pageConf" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="customerName" slot-scope="scope"> <span slot="customerName" slot-scope="scope">
<el-tooltip effect="dark" :content="scope.scope.customerName" placement="top"> <el-tooltip effect="dark" :content="scope.scope.customerName" placement="top">
<span class="ellipsis-1" style="display:inline-block;max-width:70px;text-align:left;">{{ scope.scope.customerName }}</span> <span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span>
</el-tooltip> </el-tooltip>
<span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span> <span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span>
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
<span slot="addWay" slot-scope="scope"> <span slot="addWay" slot-scope="scope">
<el-tooltip effect="dark" :content="toLabel(scope.scope.addWay)" placement="top"> <el-tooltip effect="dark" :content="toLabel(scope.scope.addWay)" placement="top">
<span style="display:inline-block;max-width:120px;text-align:left;">{{ toLabel(scope.scope.addWay) }}</span> <span style="display: inline-block; max-width: 120px; text-align: left">{{ toLabel(scope.scope.addWay) }}</span>
</el-tooltip> </el-tooltip>
</span> </span>
...@@ -37,7 +38,7 @@ ...@@ -37,7 +38,7 @@
</span> </span>
<span slot="status" slot-scope="scope"> <span slot="status" slot-scope="scope">
<!-- <span class="dot" :class="scope.scope.enableStatus ? DICTSTATUS[scope.scope.enableStatus].split(',')[1] : ''"></span> --> <!-- <span class="dot" :class="scope.scope.enableStatus ? DICTSTATUS[scope.scope.enableStatus].split(',')[1] : ''"></span> -->
<span class="statusText" :class="{ 'red-text': scope.scope.status, 'green-text': scope.scope.status == 0 }">{{ scope.scope.status ? CLIENTSTATUS[scope.scope.status].split(',')[0] : '正常' }}</span> <span class="statusText" :class="{ 'red-text': scope.scope.status === -1, 'green-text': scope.scope.status == 0 }">{{ statusText(scope.scope.status) }}</span>
</span> </span>
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <auth-button :data="scope.scope"></auth-button> --> <!-- <auth-button :data="scope.scope"></auth-button> -->
...@@ -50,15 +51,17 @@ ...@@ -50,15 +51,17 @@
</template> </template>
<script> <script>
import { getTableList, getDictionaryFun } from '@/api/modules/clientManage' import { getTableList, getDictionaryFun, syncCustomer } from '@/api/modules/clientManage'
import url from '@/assets/clientDataOverview/nodata.png' import url from '@/assets/clientDataOverview/nodata.png'
export default { export default {
name: 'clientManage', name: 'clientManage',
data() { data() {
return { return {
url: url, url: url,
sloading: false,
CLIENTSTATUS: this.$Constants.CLIENT_STATUS, CLIENTSTATUS: this.$Constants.CLIENT_STATUS,
searchForm: {}, searchForm: {},
searchFormTable: {},
clientManageFormList: [ clientManageFormList: [
{ {
type: 'daterange', type: 'daterange',
...@@ -86,7 +89,7 @@ export default { ...@@ -86,7 +89,7 @@ export default {
}, },
{ {
label: '删除好友', label: '删除好友',
value: 1 value: -1
} }
] ]
}, },
...@@ -154,7 +157,8 @@ export default { ...@@ -154,7 +157,8 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: 'User_id', label: 'User_id',
prop: 'oneId' prop: 'oneId',
width: 180
}, },
{ {
label: '客户名称', label: '客户名称',
...@@ -170,7 +174,8 @@ export default { ...@@ -170,7 +174,8 @@ export default {
{ {
label: '性别', label: '性别',
prop: 'customerSex', prop: 'customerSex',
addHtml: 'customerSex' addHtml: 'customerSex',
width: 80
}, },
{ {
label: '跟进员工', label: '跟进员工',
...@@ -184,16 +189,19 @@ export default { ...@@ -184,16 +189,19 @@ export default {
{ {
label: '是否加企微', //1. 加入,0.未加入 label: '是否加企微', //1. 加入,0.未加入
prop: 'isJoin', prop: 'isJoin',
addHtml: 'isJoin' addHtml: 'isJoin',
width: 95
}, },
{ {
label: '当前状态', label: '当前状态',
prop: 'status', prop: 'status',
addHtml: 'status' addHtml: 'status',
width: 80
}, },
{ {
label: '添加时间', label: '添加时间',
prop: 'addTime' prop: 'addTime',
width: 188
} }
], ],
tableOption: { tableOption: {
...@@ -215,19 +223,22 @@ export default { ...@@ -215,19 +223,22 @@ export default {
}, },
methods: { methods: {
statusText(text) {
return text === -1 ? '删除好友' : text === 0 ? '正常' : ''
},
setTableHeightEvent() { setTableHeightEvent() {
this.$refs.clientManage.setTableHeightFun() this.$refs.clientManage.setTableHeightFun()
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
console.log(this.searchForm) this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.daterange) { if (this.searchFormTable.daterange) {
this.searchForm.beginTime = this.searchForm.daterange[0] this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchForm.endTime = this.searchForm.daterange[1] this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchForm.daterange
} else { } else {
if (this.searchForm.beginTime) delete this.searchForm.beginTime && delete this.searchForm.endTime if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
} }
delete this.searchFormTable.daterange
resolve() resolve()
}) })
}, },
...@@ -243,6 +254,8 @@ export default { ...@@ -243,6 +254,8 @@ export default {
value: item.dictValue value: item.dictValue
} }
}) })
data.unshift({ label: '全部', value: '' })
this.sourceList = data || [] this.sourceList = data || []
if (data && data.length > 0) { if (data && data.length > 0) {
window.localStorage.setItem('sourceList', JSON.stringify(data)) window.localStorage.setItem('sourceList', JSON.stringify(data))
...@@ -260,11 +273,11 @@ export default { ...@@ -260,11 +273,11 @@ export default {
}, },
//来源 value值转为对应label //来源 value值转为对应label
toLabel(value) { toLabel(value) {
if (!value) { if (value !== 0 && !value) {
return return
} }
let curElement = this.sourceList.find(item => { let curElement = this.sourceList.find(item => {
return item.value == value return item.value === value
}) })
return curElement.label return curElement.label
...@@ -273,6 +286,22 @@ export default { ...@@ -273,6 +286,22 @@ export default {
searchTable() { searchTable() {
this.$refs.clientManage.refreshTable() this.$refs.clientManage.refreshTable()
}, },
syncClick() {
let _this = this
_this.sloading = true
syncCustomer({})
.then(res => {
if (!res) {
return false
}
_this.sloading = false
_this.$message.success('已同步客户')
_this.$refs.clientManage.refreshTable()
})
.catch(err => {
_this.sloading = false
})
},
//重置表格 //重置表格
resetTable() { resetTable() {
this.searchForm = {} this.searchForm = {}
...@@ -299,7 +328,6 @@ export default { ...@@ -299,7 +328,6 @@ export default {
position: relative; position: relative;
height: 20px; height: 20px;
font-size: 20px; font-size: 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 700; font-weight: 700;
color: #333333; color: #333333;
line-height: 20px; line-height: 20px;
...@@ -307,6 +335,7 @@ export default { ...@@ -307,6 +335,7 @@ export default {
} }
.pageContent { .pageContent {
padding: 6px 20px 30px; padding: 6px 20px 30px;
// min-width: 1300px;
background-color: #fff; background-color: #fff;
.el-button + .el-button { .el-button + .el-button {
margin-left: 20px; margin-left: 20px;
...@@ -326,9 +355,9 @@ export default { ...@@ -326,9 +355,9 @@ export default {
// font-weight: 400; // font-weight: 400;
// color: #666666; // color: #666666;
// } // }
.glsx-table { // .glsx-table {
margin-top: 20px; // margin-top: 20px;
} // }
} }
} }
</style> </style>
<template>
<div class="scrm-sub-client-container">
<el-button type="primary" icon="el-icon-plus">创建员工</el-button>
<div class="pageContent">
<search-form :ploading="sloading" class="searchTop border-shadow" :formModel="searchForm" :formList="clientManageFormList" @setTableHeightEvent="setTableHeightEvent" @resetTable="resetTable" @searchTable="searchTable">
<span class="inline-b" slot="form-slot">
<!-- :id="tableParams.btnId" -->
<el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="syncClick" :loading="sloading">同步数据</el-button>
</span>
</search-form>
</div>
</div>
</template>
<script>
export default {
data() {
return {}
}
}
</script>
<style lang="scss" scoped>
.scrm-sub-client-container {
}
</style>
<template> <template>
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<p class="pageTitle">标签管理</p> <!-- <p class="pageTitle">标签管理</p> -->
<button class="addTagsBtn" @click="btnClick('create')">添加标签组</button> <button class="addTagsBtn" @click="btnClick('create')">添加标签组</button>
<!-- <button class="addTagsBtn" @click="btnClick('edit')">修改标签组</button> --> <!-- <button class="addTagsBtn" @click="btnClick('edit')">修改标签组</button> -->
<span class="toptips"> <span class="toptips">
<span>共有{{ numberObj.groupCount || 0 }}个标签组,{{ numberObj.bizLabelCount || 0 }}个企业标签,{{ numberObj.rcLabelCount || 0 }}个自店标签</span> <span>共有{{ numberObj.groupCount || 0 }}个标签组,{{ numberObj.bizLabelCount || 0 }}个企业标签,{{ numberObj.rcLabelCount || 0 }}个自店标签</span>
<span class="iconPanelWrap" v-if="!isFirstShow"> <span class="iconPanelWrap" v-if="!isFirstShow">
<img src="@/assets/tagsManage/question.png" alt="" /> <el-popover placement="top" width="560" trigger="hover" content="企业标签为全局标签,员工可在企微APP端客户详情、客户跟进等模块查看和打标签,最多3000个;自店标签为企业商户自有标签,员工可在企微APP端客户跟进等模块查看和打标签,最多3000个;行业标签为通过大数据算法规则生成的标签">
<span class="tipsPanel">企业标签为全局标签,员工可在企微APP端客户详情、客户跟进等模块查看和打标签,最多3000个;自店标签为企业商户自有标签,员工可在企微APP端客户跟进等模块查看和打标签,最多3000个;行业标签为通过大数据算法规则生成的标签</span> <img src="@/assets/tagsManage/question.png" slot="reference" alt="" />
</el-popover>
<!-- <span class="tipsPanel">企业标签为全局标签,员工可在企微APP端客户详情、客户跟进等模块查看和打标签,最多3000个;自店标签为企业商户自有标签,员工可在企微APP端客户跟进等模块查看和打标签,最多3000个;行业标签为通过大数据算法规则生成的标签</span> -->
</span> </span>
</span> </span>
<div class="initPanel" v-if="isFirstShow"> <div class="initPanel" v-if="isFirstShow">
...@@ -25,18 +28,20 @@ ...@@ -25,18 +28,20 @@
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
</span> </span>
</search-form> </search-form>
<GLTable @setTableFinishFun="setTableFinishFun" ref="tagsManage" :hasNum="true" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" noDataText="你当前还没有添加的标签" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }"> <!-- noDataText="你当前还没有添加的标签" -->
<GLTable @setTableFinishFun="setTableFinishFun" ref="tagsManage" :hasNum="true" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<span slot="labelGroup" slot-scope="scope"> <span slot="labelGroup" slot-scope="scope">
<span>{{ scope.scope.labelGroup.name }}</span> <span>{{ scope.scope.labelGroup.name }}</span>
</span> </span>
<span slot="labelList" slot-scope="scope"> <span slot="labelList" slot-scope="scope">
<div id="allTagsWrap" class="allTagsWrap" :class="[expande ? 'expande' : 'close']"> <!-- :class="[expande ? 'expande' : 'close']" -->
<div id="allTagsWrap" class="allTagsWrap">
<span v-for="(item, index) in scope.scope.labelList" :key="index" class="ellipsis-1 tag-box-wrap"> <span v-for="(item, index) in scope.scope.labelList" :key="index" class="ellipsis-1 tag-box-wrap">
<el-tooltip class="item" :content="item.name" placement="top"> <el-tooltip class="item" :content="item.name" placement="top">
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
</el-tooltip> </el-tooltip>
</span> </span>
<div class="expande-button-wrap" v-if="needShowExpande"> <!-- <div class="expande-button-wrap" v-if="needShowExpande">
<div class="expande-button" @click="expandeClick" v-if="!expande"> <div class="expande-button" @click="expandeClick" v-if="!expande">
<i class="el-icon-arrow-down"></i> <i class="el-icon-arrow-down"></i>
<span>展开</span> <span>展开</span>
...@@ -45,7 +50,7 @@ ...@@ -45,7 +50,7 @@
<i class="el-icon-arrow-up"></i> <i class="el-icon-arrow-up"></i>
<span>收起</span> <span>收起</span>
</div> </div>
</div> </div> -->
</div> </div>
</span> </span>
<template slot="auth-button" slot-scope="scope"> <template slot="auth-button" slot-scope="scope">
...@@ -67,8 +72,8 @@ ...@@ -67,8 +72,8 @@
</el-select> </el-select>
<span class="tagTipMsg" v-if="tagDialogTitle == '添加标签组'">企业标签和自店标签分别最多3000个</span> <span class="tagTipMsg" v-if="tagDialogTitle == '添加标签组'">企业标签和自店标签分别最多3000个</span>
<span class="tagTipMsg" v-else> <span class="tagTipMsg" v-else>
{{ tagForm.initTagsGroup }}最多3000个,已创建 {{ tagForm.initTagsGroup == 1 ? '企业标签' : '自店标签' }}最多3000个,已创建
<span class="pure-blue-text">{{ editTagList.length }}</span> <span class="pure-blue-text">{{ tagForm.initTagsGroup == 1 ? numberObj.bizLabelCount : numberObj.rcLabelCount }}</span>
个 个
</span> </span>
<!-- 企业标签最多3000个,已创建3个 --> <!-- 企业标签最多3000个,已创建3个 -->
...@@ -77,7 +82,7 @@ ...@@ -77,7 +82,7 @@
<div slot="tagsInput-type"> <div slot="tagsInput-type">
<div class="tagsWrap" v-if="tagDialogTitle == '编辑标签组'"> <div class="tagsWrap" v-if="tagDialogTitle == '编辑标签组'">
<span class="tag" :class="{ inputWrapShow: item.inputVisible }" v-for="item in editTagList" :key="item.id"> <span class="tag" :class="{ inputWrapShow: item.inputVisible }" v-for="item in editTagList" :key="item.id">
<el-input class="input-new-tag" v-if="item.inputVisible" v-model.trim="item.name" ref="saveTagInput" size="small" @blur="handleInputConfirm(item.name, item.id)" @keyup.enter.native="handleInputConfirm(item.name, item.id)"></el-input> <el-input class="input-new-tag" maxlength="30" show-word-limit v-if="item.inputVisible" v-model.trim="item.name" ref="saveTagInput" size="small" @blur="handleInputConfirm(item.name, item.id)" @keyup.enter.native="handleInputConfirm(item.name, item.id)"></el-input>
<el-tooltip class="item" :content="item.name" placement="top"> <el-tooltip class="item" :content="item.name" placement="top">
<span class="ellipsis-1" v-if="!item.inputVisible">{{ item.name }}</span> <span class="ellipsis-1" v-if="!item.inputVisible">{{ item.name }}</span>
</el-tooltip> </el-tooltip>
...@@ -121,8 +126,8 @@ export default { ...@@ -121,8 +126,8 @@ export default {
return { return {
numberObj: {}, numberObj: {},
url: url, url: url,
isFirstShow: true, isFirstShow: false,
searchForm: { 'labelTreeReq.shopId': 10001001 }, searchForm: {},
clientPartFormList: [ clientPartFormList: [
{ {
type: 'select', type: 'select',
...@@ -235,27 +240,19 @@ export default { ...@@ -235,27 +240,19 @@ export default {
//控制展开收起按钮 //控制展开收起按钮
expande: true, expande: true,
needShowExpande: false, needShowExpande: false,
FormHeight: 0 merchantId: 10001001 //子系统默认这个门店id
} }
}, },
created() { created() {
this.getLoginCountFun() if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId
}
this.searchForm = { 'labelTreeReq.shopId': this.merchantId }
// this.getLoginCountFun()
this.getTableTagNumFun() this.getTableTagNumFun()
}, },
watch: {
// FormHeight: {
// handler(val) {
// let lineHeight = 50 //22
// if (val > lineHeight * 2) {
// this.expande = false
// this.needShowExpande = true
// } else {
// this.needShowExpande = false
// this.expande = true
// }
// }
// }
},
methods: { methods: {
expandeClick() { expandeClick() {
// console.log('expandeClick') // console.log('expandeClick')
...@@ -271,19 +268,22 @@ export default { ...@@ -271,19 +268,22 @@ export default {
this.$refs.tagsManage.setTableHeightFun() this.$refs.tagsManage.setTableHeightFun()
}, },
setTableFinishFun(content) { setTableFinishFun(content) {
console.log('表格完成', content) console.log('表格完成', this.$refs.tagsManage.data)
this.$nextTick(() => { this.$refs.tagsManage.data.forEach(item => {
let lineHeight = 50 item.expande = true
console.log('allTagsWrap', document.getElementById('allTagsWrap')) item.needShowExpande = false
if (document.getElementById('allTagsWrap').offsetHeight > lineHeight * 2) {
console.log('包含该行标签的div的高度:', document.getElementById('allTagsWrap').offsetHeight)
this.expande = false
this.needShowExpande = true
} else {
this.needShowExpande = false
this.expande = true
}
}) })
// this.$nextTick(() => {
// let lineHeight = 65
// if (document.getElementById('allTagsWrap').offsetHeight > lineHeight * 2) {
// console.log('包含该行标签的div的高度:', document.getElementById('allTagsWrap').offsetHeight)
// this.expande = false
// this.needShowExpande = true
// } else {
// this.needShowExpande = false
// this.expande = true
// }
// })
}, },
getLoginCountFun() { getLoginCountFun() {
//loginType:3是查客户数据概览浏览次数 //loginType:3是查客户数据概览浏览次数
...@@ -293,7 +293,7 @@ export default { ...@@ -293,7 +293,7 @@ export default {
}) })
}, },
getTableTagNumFun() { getTableTagNumFun() {
getTableTagNum({ shopId: 10001001 }).then(res => { getTableTagNum({ shopId: this.merchantId }).then(res => {
if (!res) { if (!res) {
return false return false
} }
...@@ -307,7 +307,7 @@ export default { ...@@ -307,7 +307,7 @@ export default {
}, },
//重置表格 //重置表格
resetTable() { resetTable() {
this.searchForm = { 'labelTreeReq.shopId': 10001001 } this.searchForm = { 'labelTreeReq.shopId': this.merchantId }
// searchForm: { 'labelTreeReq.shopId': 10001001 }, // searchForm: { 'labelTreeReq.shopId': 10001001 },
this.$refs.tagsManage.refreshTable() this.$refs.tagsManage.refreshTable()
}, },
...@@ -358,16 +358,22 @@ export default { ...@@ -358,16 +358,22 @@ export default {
} }
if (this.tagDialogTitle == '添加标签组') { if (this.tagDialogTitle == '添加标签组') {
this.newAddTagFun() this.newAddTagFun()
this.handleClose()
} else { } else {
//修改标签(允许同时增加标签) //修改标签(允许同时增加标签)
let isHasEmpty = this.editTagList.some(ele => ele.name == '')
if (isHasEmpty) {
this.$message.warning('不能提交空标签')
return
}
this.updateTagFun() this.updateTagFun()
if (this.tagForm.tagsList.length > 0) { if (this.tagForm.tagsList.length > 0) {
//过滤掉没有输入值得标签输入框 //过滤掉没有输入值得标签输入框
this.tagForm.tagsList = this.tagForm.tagsList.filter(item => item.name != '') this.tagForm.tagsList = this.tagForm.tagsList.filter(item => item.name != '')
this.newAddTagFun() this.newAddTagFun()
} }
}
this.handleClose() this.handleClose()
}
}) })
}, },
handleClose() { handleClose() {
...@@ -393,7 +399,7 @@ export default { ...@@ -393,7 +399,7 @@ export default {
//满足条件进行提交 //满足条件进行提交
let params = {} let params = {}
params['labelDTO.dataFrom'] = 'cs' params['labelDTO.dataFrom'] = 'cs'
params.shopId = '10001001' params['labelDTO.shopId'] = this.merchantId
// params.staffId = '员工A' // params.staffId = '员工A'
params['labelDTO.labelGroup.name'] = this.tagForm.tagsName params['labelDTO.labelGroup.name'] = this.tagForm.tagsName
params['labelDTO.labelType'] = this.tagForm.initTagsGroup == 1 ? '企业标签' : '自店标签' params['labelDTO.labelType'] = this.tagForm.initTagsGroup == 1 ? '企业标签' : '自店标签'
...@@ -411,6 +417,7 @@ export default { ...@@ -411,6 +417,7 @@ export default {
// this.tagForm.tagsList = [] // this.tagForm.tagsList = []
this.resetTable() //刷新下表格 this.resetTable() //刷新下表格
this.getTableTagNumFun()
} }
}) })
}, },
...@@ -426,7 +433,9 @@ export default { ...@@ -426,7 +433,9 @@ export default {
name: item.name name: item.name
} }
}) })
param['labelDTO.labelList'] = editTagList param['labelDTO.labelList'] = editTagList
updateTag(param).then(res => { updateTag(param).then(res => {
if (!res) { if (!res) {
return return
...@@ -468,10 +477,10 @@ export default { ...@@ -468,10 +477,10 @@ export default {
handleInputConfirm(inputValue, id) { handleInputConfirm(inputValue, id) {
let value = inputValue let value = inputValue
if (String(value).length == 0) { // if (String(value).length == 0) {
this.$message.warning('不能清空标签') // this.$message.warning('不能清空标签')
return // return
} // }
this.editTagList.forEach(i => { this.editTagList.forEach(i => {
if (i.id == id) { if (i.id == id) {
...@@ -489,7 +498,7 @@ export default { ...@@ -489,7 +498,7 @@ export default {
.scrm-sub-client-container { .scrm-sub-client-container {
.pageTitle { .pageTitle {
position: relative; position: relative;
margin-top: 30px; // margin-top: 30px;
margin-bottom: 20px; margin-bottom: 20px;
height: 20px; height: 20px;
font-size: 20px; font-size: 20px;
...@@ -505,6 +514,7 @@ export default { ...@@ -505,6 +514,7 @@ export default {
border-radius: 4px; border-radius: 4px;
padding: 0 20px; padding: 0 20px;
color: #fff; color: #fff;
font-size: 14px;
&:hover { &:hover {
background-color: $lightBtnBlue; background-color: $lightBtnBlue;
} }
...@@ -524,9 +534,7 @@ export default { ...@@ -524,9 +534,7 @@ export default {
display: inline-block; display: inline-block;
padding: 6px 10px 10px; padding: 6px 10px 10px;
box-sizing: border-box; box-sizing: border-box;
height: 66px;
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
line-height: 22px; line-height: 22px;
...@@ -610,13 +618,18 @@ export default { ...@@ -610,13 +618,18 @@ export default {
} }
} }
} }
.close {
overflow: hidden;
height: 65px;
}
.tag-box-wrap { .tag-box-wrap {
display: inline-block; display: inline-block;
margin-right: 10px; margin-right: 10px;
// margin-bottom: 10px; margin-bottom: 10px;
padding: 0 10px; padding: 0 10px;
box-sizing: border-box; box-sizing: border-box;
min-width: 76px; min-width: 76px;
max-width: 200px;
height: 26px; height: 26px;
line-height: 26px; line-height: 26px;
border-radius: 4px; border-radius: 4px;
......
...@@ -17,6 +17,7 @@ const cdn = { ...@@ -17,6 +17,7 @@ const cdn = {
`${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`,
// `${CDN_DOMAIN}ajax/libs/axios/0.21.0/axios.min.js`, // `${CDN_DOMAIN}ajax/libs/axios/0.21.0/axios.min.js`,
`${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js` `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`
] ]
} }
module.exports = { module.exports = {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!