Commit 4e1bb9fc by 李长胜

修改

1 parent a7171aa8
{
"name": "scrm-sub-blog",
"name": "custom",
"version": "0.1.0",
"private": true,
"scripts": {
......@@ -13,8 +13,8 @@
"core-js": "^3.4.4",
"echarts": "^5.2.0",
"element-ui": "^2.4.5",
"glsx-common": "^1.4.4",
"glsx-components": "^1.0.5",
"glsx-common": "^1.4.6",
"glsx-components": "^1.0.8",
"glsx-table": "^1.1.0",
"sha1": "^1.1.1",
"vue": "^2.6.10",
......
......@@ -18,6 +18,15 @@
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){
params.method='org.ore.api.customer.base.detail'
return http({
......
......@@ -34,6 +34,7 @@
})
}
export function getAllTagTree (params){
params.method='datahub.api.label.querylabeltree'
return http({
......@@ -70,6 +71,15 @@
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){
params.method='org.ore.api.customer.detail'
......
......@@ -83,8 +83,8 @@ export default {
// },
legend: {
x: 'center',
y: 'bottom',
// bottom: "bottom",
// y: 'bottom',
bottom: '50px',
// textStyle: {
// //图例的公用文本样式。
// fontSize: 14,
......@@ -96,7 +96,7 @@ export default {
},
grid: {
//直角坐标系内绘图网格
bottom: '15%', //grid 组件离容器下侧的距离。
bottom: '20%', //grid 组件离容器下侧的距离。
left: '1%',
right: '5%',
containLabel: true //grid 区域是否包含坐标轴的刻度标签。
......@@ -105,10 +105,11 @@ export default {
//dataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息,或者概览数据整体,或者去除离群点的影响。#bed0f7
{
bottom: '30px',
type: 'inside',
show: true,
// backgroundColor: '#ff0000',
// borderColor: '#ff0000',
height: '5%',
height: '1%',
// borderColor: '#8FDFFE',
// backgroundColor: '#8fdffe99',
......@@ -116,7 +117,7 @@ export default {
handleColor: '#bed0f7',
handleSize: 20,
handleSize: 15,
handleStyle: {
borderColor: '#bed0f7',
......@@ -152,14 +153,14 @@ export default {
{
type: 'value',
name: '单位:人',
// min: 0,
// max: 35000,
// interval: 5000,
min: 0,
max: 100,
interval: 10,
axisLabel: {
formatter: '{value}'
},
splitLine: {
show: true //是否显示分割线
show: false //是否显示分割线
}
},
{
......@@ -172,7 +173,7 @@ export default {
formatter: '{value}'
},
splitLine: {
show: true //是否显示分割线
show: false //是否显示分割线
}
}
],
......
......@@ -38,7 +38,9 @@ export default {
var maxData = this.entmicroAddCustomerCount + this.entmicroNotAddCustomerCount
option = {
tooltip: {},
tooltip: {
formatter: ' {c}人'
},
xAxis: {
max: maxData, // 以x轴为基准,进行象形图的重复画图,最大值为100(可调整),为了下方好处理我调整为100
splitLine: { show: false }, // x轴 轴线什么的都不需要
......
<template>
<div class="scrm-sub-client-container">
<!-- 有图标无数据文字情况 -->
<div class="nodata" v-if="type=='hasIconText'">
<img src="@/assets/clientDataOverview/nodata.png" alt="">
<p>暂无数据</p>
</div>
<!-- 没有图标有无数据文字 -->
<div class="nodata" v-if="type=='hasText'">
<p>暂无数据</p>
</div>
<div class="scrm-sub-client-container">
<!-- 有图标无数据文字情况 -->
<div class="nodata" v-if="type == 'hasIconText'">
<img src="@/assets/clientDataOverview/nodata.png" alt="" />
<p>暂无数据</p>
</div>
<!-- 没有图标有无数据文字 -->
<div class="nodata" v-if="type == 'hasText'">
<p>暂无数据</p>
</div>
</div>
</template>
<script>
export default {
props: {
type: {
type: String,
default: ''
},
},
export default {
props: {
type: {
type: String,
default: ''
}
}
}
</script>
<style lang="scss" scoped>
.scrm-sub-client-container{
.nodata{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
z-index: 9;
p{
height: 22px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
line-height: 22px;
}
.scrm-sub-client-container {
.nodata {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
z-index: 9;
p {
height: 22px;
font-size: 14px;
font-weight: 400;
color: #000000;
line-height: 22px;
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -17,31 +17,38 @@
<span>收起</span>
</div>
</div>
<el-form-item v-for="(item, index) in formList" :key="index" :label="item.label || ''">
<template>
<template v-if="item.type === 'input'">
<el-input v-model="formModel[item.prop]" :type="item.inputType || 'text'" :placeholder="item.placeholder || '请输入'" :readonly="item.readonly || false" @keyup.enter.native="onInput"></el-input>
<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 || ''">
<template>
<template v-if="item.type === 'input'">
<el-input v-model="formModel[item.prop]" :type="item.inputType || 'text'" :placeholder="item.placeholder || '请输入'" :readonly="item.readonly || false" @keyup.enter.native="onInput"></el-input>
</template>
<template v-else-if="item.type === 'select'">
<el-select v-model="formModel[item.prop]" :placeholder="item.placeholder || '请选择'">
<el-option v-for="i in item.options" :key="i[item.value] || i.value" :label="i[item.key] || i.label" :value="i[item.value] || i.value" :disabled="i.disabled"></el-option>
</el-select>
</template>
<template v-else-if="item.type === 'daterange'">
<el-date-picker v-model="formModel[item.prop]" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="item.pickerOptions || {}"></el-date-picker>
</template>
</template>
<template v-else-if="item.type === 'select'">
<el-select v-model="formModel[item.prop]" :placeholder="item.placeholder || '请选择'">
<el-option v-for="i in item.options" :key="i[item.value] || i.value" :label="i[item.key] || i.label" :value="i[item.value] || i.value" :disabled="i.disabled"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<template>
<slot name="form-slot"></slot>
</template>
<template v-else-if="item.type === 'daterange'">
<el-date-picker v-model="formModel[item.prop]" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="item.pickerOptions || {}"></el-date-picker>
</el-form-item>
<!-- <el-form-item>
<template>
<slot name="formsearch-slot"></slot>
</template>
</template>
</el-form-item>
<el-form-item>
<template>
<slot name="form-slot"></slot>
</template>
</el-form-item>
<el-form-item>
<template>
<slot name="formsearch-slot"></slot>
</template>
</el-form-item>
</el-form-item> -->
</div>
</el-form>
</div>
</template>
......@@ -68,21 +75,37 @@ export default {
labelWidth: {
type: String,
default: 'auto'
},
ploading: {
type: Boolean,
default: false
},
isHasSyncBtn: {
type: Boolean,
default: false
}
},
data() {
return {
expande: true,
needShowExpande: false,
FormHeight: 0
FormHeight: 0,
isShowBtns: true
}
},
mounted() {
console.log('搜索表单')
var sf = document.getElementById('searchForm')
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
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.needShowExpande = true
} else {
......@@ -102,14 +125,28 @@ export default {
// console.log('窗口发生改变了哟!')
// }, 100)
// })
window.onresize = () => {
return (() => {
if (resizeTimer) clearTimeout(resizeTimer)
resizeTimer = setTimeout(function() {
that.FormHeight = document.getElementById('searchForm').offsetHeight
}, 100)
})()
}
// window.onresize = () => {
// 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)
resizeTimer = setTimeout(function() {
window.location.reload() //浏览器重新从服务器请求资源,在http请求头中不会包含缓存标记
// that.FormHeight = document.getElementById('searchForm').offsetHeight
if (sf.clientWidth < 952 && that.isHasSyncBtn) {
that.isShowBtns = false
}
}, 100)
})()
},
watch: {
......@@ -131,12 +168,20 @@ export default {
onInput(e) {
this.$emit('input', e)
},
resetTable() {
this.$emit('resetTable')
},
searchTable() {
this.$emit('searchTable')
},
syncClick() {
this.$emit('syncClick')
},
// openClose(){
// console.log( document.getElementById('searchForm').offsetHeight);
// document.getElementById('searchForm').offsetHeight=172;
// }
expandeClick() {
console.log('expandeClick')
this.expande = !this.expande
setTimeout(() => {
this.$emit('setTableHeightEvent')
......@@ -151,6 +196,17 @@ export default {
position: relative;
overflow: hidden;
// height: 50px;
.firstRowBtn {
position: absolute;
right: 60px;
.el-button + .el-button {
margin-left: 20px;
}
}
.itemWidth {
max-width: 1050px;
min-width: 660px;
}
.expande-button-wrap {
position: absolute;
right: 0;
......
......@@ -9,7 +9,7 @@
*/
// 本地环境配置
module.exports = {
title: 'scrm-sub-blog',
title: 'custom',
response: {
data_key: 'data',
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 = {
title: 'scrm-sub-blog',
title: 'custom',
response: {
data_key: 'data',
message_key: 'message',
......@@ -7,8 +17,12 @@ module.exports = {
code_success_value: '0',
code_message_map: {}
},
request: {
baseURL: 'http://scrm.test.glsx.com.cn',
// 王小龙: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: {
baseURL: 'http://scrm.test.glsx.com.cn',
// 设置超时时间
timeout: 180000,
// 携带凭证
......@@ -17,10 +31,10 @@ module.exports = {
responseType: 'json'
},
sign: {
app_key: '48e5e13229b82c1b4e6e8c96151f0637',
appKey: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0',
format: 'json',
source: ''
format: 'json',
source: 'client-sub-custom'
},
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b',
......
......@@ -9,18 +9,20 @@
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
let cfg = require('./conf.js')
import { Http } from 'glsx-common'
let timeout = 30000 //超时时间
export const fetchConfig = function(isEnv = true) {
if (isEnv) {
let { request } = cfg
Object.assign(request, { timeout })
return Promise.resolve(cfg)
}
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
if (isEnv) {
let { request } = cfg
Object.assign(request, { timeout })
return Promise.resolve(cfg)
}
// https://oss-config.test.glsx.com.cn/mock/6136bea6ceeb5a5c2bec6950/base
// 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 = {
install(vue, cfg) {
vue.prototype.$config = cfg
}
}
install(vue, cfg) {
vue.prototype.$config = cfg
}
}
\ No newline at end of file
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(ButtonGroup)
Vue.use(Form)
......
......@@ -59,6 +59,24 @@ const staticRoutes = Object.freeze([
component: resolve => require([`@/views/expand/index.vue`], resolve),
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
......
......@@ -13,7 +13,7 @@ let routes = []
let router = null
let instance = null
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.$messenger = messenger
Vue.prototype.$globalState = globalState
......
......@@ -16,8 +16,8 @@ import render from './render'
import { routes } from '@/router'
export async function start() {
if (window.__POWERED_BY_QIANKUN__) return
const { response, request, sign, secret } = await fetchConfig()
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: 'mini-ab3d905b-5148-42ba-86dd-8ec6a51b9b86-rop' } })
const { response, request, sign, secret } = await fetchConfig(true)
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'] })
render('/', routes)
......
......@@ -18,6 +18,7 @@
color:$btnBlue;
&:hover{
color: #9994FF;
cursor: pointer;
}
}
.pure-blue-text{
......
......@@ -40,5 +40,8 @@
}
// 子系统不设外边距
.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
......@@ -12,12 +12,12 @@ const overThousandFilter = (val) => {
};
//来源 value值转为对应label(来源)
const toLabel=(value)=> {
if (!value) {
if (value!==0 && !value) {
return
}
let sourceList=JSON.parse(window.localStorage.getItem('sourceList'));
let curElement =sourceList.find(item => {
return item.value == value
return item.value === value
})
return curElement.label
......
......@@ -260,7 +260,7 @@ export default {
top: 365px;
height: 20px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 20px;
......@@ -272,7 +272,7 @@ export default {
top: 389px;
height: 25px;
font-size: 18px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #716aff;
line-height: 25px;
......@@ -615,4 +615,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
<template>
<div class="scrm-sub-client-container">
<!-- <div class="forbidClickLayer"></div> -->
<template v-if="isShowModal">
<div class="modalLayer"></div>
<img class="tipPanel" src="@/assets/clientDataOverview/allPicture.png" alt="" />
......@@ -10,6 +9,7 @@
</template>
<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="" />
</div>
<h3 class="pageSubTitle">客户分层</h3>
......@@ -49,7 +49,7 @@
<span class="person-text">人</span>
</span>
<span v-if="!isEmptyObj">
占比:{{ topDataObj.purposePercent * 100 || 0 }}%
占比:{{ purposePercent }}%
<i class="triangle" :class="{ active: !isNoBuyUp }" v-if="!isEmptyObj"></i>
</span>
<!-- <i class="vertical-line"></i> -->
......@@ -89,7 +89,7 @@
</span>
<span v-if="!isEmptyObj">
占比:{{ topDataObj.purchasePercent * 100 || 0 }}%
占比:{{ purchasePercent }}%
<i class="triangle" :class="{ active: !isBuyUp }" v-if="!isEmptyObj"></i>
</span>
......@@ -175,6 +175,7 @@
</template>
<script>
// import $ from 'jquery'
import { getDataOverview, getDataOverviewBarMap } from '@/api/modules/clientDataOverview'
import { getLoginCount } from '@/api/modules/loginCount'
import pieEchart from '@/components/echarts/pieEchart'
......@@ -193,16 +194,6 @@ export default {
pictorialBar,
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() {
return {
isShowModal: false,
......@@ -272,6 +263,14 @@ export default {
},
isShowData() {
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() {
......@@ -294,6 +293,7 @@ export default {
//引流企微按钮暂时效果
toGuideCompanyWechat() {
window.open('https://www.baidu.com', '_blank')
// $('.subtitle').hide()
},
showModalLayer() {
var baseNavEle = document.querySelector('.scrm-base-nav')
......@@ -363,26 +363,33 @@ export default {
//获取上面的数据
getDataOverviewFun() {
// const res = await getDataOverview()
getDataOverview({})
.then(res => {
if (!res) {
return
}
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
getDataOverview({}).then(res => {
if (!res) {
return
}
console.log('上面', res)
this.topDataObj = res
this.isNoBuyUp = res.purposeUp
this.isBuyUp = res.purchaseUp
if (this.topDataObj.customerCount > 0) {
this.isHasCustomerCountBanner = true
}
})
.catch(err => {
console.log('错误信息:', err)
})
// 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.isBuyUp = res.purchaseUp
if (this.topDataObj.customerCount > 0) {
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 => {
// console.log('错误信息:', err)
// })
},
//首次进来获取下方柱状图数据(一进来默认传7天)
async getDataOverviewBarMapFun(dayCount = 7) {
......@@ -435,33 +442,8 @@ export default {
.person-text {
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;
z-index: 99;
top: 20px;
......@@ -508,7 +490,14 @@ export default {
}
.bannerWrapBox {
width: 100%;
> img {
// position: relative;
// .inTimeBtn {
// position: absolute;
// bottom: 20px;
// right: 50px;
// }
.bannerWrap {
width: 100%;
// height: 146px;
......@@ -521,7 +510,6 @@ export default {
margin: 20px 0;
height: 20px;
font-size: 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 700;
color: #333333;
line-height: 20px;
......@@ -610,7 +598,6 @@ export default {
top: 365px;
height: 20px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 20px;
......@@ -622,7 +609,7 @@ export default {
top: 389px;
height: 25px;
font-size: 18px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #716aff;
line-height: 25px;
......@@ -634,7 +621,7 @@ export default {
top: 365px;
height: 20px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 20px;
......@@ -646,7 +633,6 @@ export default {
right: 57px;
top: 389px;
font-size: 18px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #fe9c1c;
line-height: 25px;
......@@ -921,7 +907,7 @@ export default {
height: 80px;
.one1 {
margin-top: 30px;
height: 44px;
height: 36px;
position: relative;
span {
position: absolute;
......@@ -941,7 +927,7 @@ export default {
left: 38.4%;
}
span:nth-child(3) {
left: 57%;
left: 54%;
}
}
.one2 {
......@@ -962,7 +948,7 @@ export default {
left: 38.4%;
}
span:nth-child(2) {
left: 57%;
left: 54%;
}
}
}
......
......@@ -2,7 +2,7 @@
<div class="scrm-sub-client-container">
<div class="header">
<div class="vehicleGroupName">
<span>奥迪车友群</span>
<span>{{ groupName }}</span>
</div>
<button class="backBtn" @click="goBack">返回客户群管理</button>
</div>
......@@ -33,7 +33,7 @@
</p>
<p>
<span>创建时间</span>
<span class="ellipsis-1" style="width:100%;">{{ leftPanelList.createDate }}</span>
<span class="ellipsis-1" :title="leftPanelList.createDate">{{ leftPanelList.createDate }}</span>
</p>
</div>
<div class="rightWrap">
......@@ -41,7 +41,7 @@
<span>客户列表</span>
<span>{{ clientTableDataNum || 0 }}个</span>
</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">
<!-- :size="btn_size" -->
<el-button plain @click="resetTable">重置</el-button>
......@@ -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">
<span slot="customerName" slot-scope="scope">
<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 slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : '女' }}</span>
......@@ -80,6 +80,7 @@ export default {
name: 'clientGroupDetail',
data() {
return {
groupName: this.$route.query.groupName,
url: url,
leftPanelList: {},
searchForm: {},
......@@ -210,6 +211,9 @@ export default {
resolve()
})
},
setTableHeightEvent() {
this.$refs.clientGroupManage.setTableHeightFun()
},
setTableFinishFun(content) {
this.clientTableDataNum = content.length
},
......@@ -227,7 +231,7 @@ export default {
},
goDetail(id) {
this.$router.push({
name: '/clientManage/clientDetail',
path: '/clientManage/clientDetail',
query: {
id: id
}
......@@ -277,7 +281,7 @@ export default {
.leftWrap {
width: 240px;
// height: 877px;
min-height: calc(100vh - 92px);
min-height: 270px; //calc(100vh - 92px);
background-color: #fff;
box-sizing: border-box;
.avator {
......
<template>
<div>
<div class="scrm-sub-client-container">
<p class="pageTitle">客户群管理</p>
<!-- <p class="pageTitle">客户群管理</p> -->
<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">
<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>
<!-- <basic-table ref="clientGroupTable" :tableParams="tableParams" :getListApi="getListApi" :searchForm="searchForm" :hasNum="true">
......@@ -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>
</span>
</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 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>
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <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>
</GLTable>
</div>
......@@ -30,18 +31,21 @@
</template>
<script>
import { getTableList } from '@/api/modules/clientGroupManage'
import { getTableList, syncCustomerBase } from '@/api/modules/clientGroupManage'
import url from '@/assets/clientDataOverview/nodata.png'
export default {
name: 'clientManage',
data() {
return {
url: url,
sloading: false,
titles: [
{ name: '客户群总数', num: 100, rate: '+10%', isUp: true, tips: '群提示消息1' },
{ name: '新增客户群数', num: 100, rate: '+10%', isUp: true, tips: '群提示消息2' }
],
searchForm: {},
searchFormTable: {},
clientGroupFormList: [
{
type: 'daterange',
......@@ -107,7 +111,8 @@ export default {
},
{
label: '创建时间',
prop: 'addTime'
prop: 'addTime',
width: 188
}
],
tableOption: {
......@@ -134,6 +139,22 @@ export default {
},
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() {
this.$refs.clientGroupManage.setTableHeightFun()
},
......@@ -142,14 +163,14 @@ export default {
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
console.log(this.searchForm)
if (this.searchForm.daterange) {
this.searchForm.beginTime = this.searchForm.daterange[0]
this.searchForm.endTime = this.searchForm.daterange[1]
delete this.searchForm.daterange
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchFormTable.daterange) {
this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1]
} 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()
})
},
......@@ -159,13 +180,21 @@ export default {
this.$refs.clientGroupManage.refreshTable()
},
btnClick(ptype, scope) {},
goDetail(id) {
goDetail(id, name) {
this.$router.push({
name: '/clientGroupManage/clientGroupDetail',
path: '/clientGroupManage/clientGroupDetail',
query: {
id: id
id: id,
groupName: name
}
})
// this.$history.push({
// path: '/clientGroupManage/clientGroupDetail',
// params: {
// id: id,
// groupName: name
// }
// })
}
}
}
......@@ -179,7 +208,6 @@ export default {
margin-bottom: 20px;
height: 20px;
font-size: 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 700;
color: #333333;
line-height: 20px;
......@@ -187,6 +215,7 @@ export default {
}
.pageContent {
padding: 6px 20px 30px;
// min-width: 1300px;
background-color: #fff;
.el-button + .el-button {
margin-left: 20px;
......@@ -206,9 +235,9 @@ export default {
// font-weight: 400;
// color: #666666;
// }
.glsx-table {
margin-top: 20px;
}
// .glsx-table {
// margin-top: 20px;
// }
}
}
</style>
{
"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
<!--
* @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>
<div>
<div class="scrm-sub-client-container">
<p class="pageTitle">客户管理</p>
<!-- <p class="pageTitle">客户管理</p> -->
<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">
<!-- :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>
<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">
<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>
<span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span>
......@@ -28,7 +29,7 @@
<span slot="addWay" slot-scope="scope">
<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>
</span>
......@@ -37,7 +38,7 @@
</span>
<span slot="status" slot-scope="scope">
<!-- <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>
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <auth-button :data="scope.scope"></auth-button> -->
......@@ -50,15 +51,17 @@
</template>
<script>
import { getTableList, getDictionaryFun } from '@/api/modules/clientManage'
import { getTableList, getDictionaryFun, syncCustomer } from '@/api/modules/clientManage'
import url from '@/assets/clientDataOverview/nodata.png'
export default {
name: 'clientManage',
data() {
return {
url: url,
sloading: false,
CLIENTSTATUS: this.$Constants.CLIENT_STATUS,
searchForm: {},
searchFormTable: {},
clientManageFormList: [
{
type: 'daterange',
......@@ -86,7 +89,7 @@ export default {
},
{
label: '删除好友',
value: 1
value: -1
}
]
},
......@@ -154,7 +157,8 @@ export default {
tableColumns: [
{
label: 'User_id',
prop: 'oneId'
prop: 'oneId',
width: 180
},
{
label: '客户名称',
......@@ -170,7 +174,8 @@ export default {
{
label: '性别',
prop: 'customerSex',
addHtml: 'customerSex'
addHtml: 'customerSex',
width: 80
},
{
label: '跟进员工',
......@@ -184,16 +189,19 @@ export default {
{
label: '是否加企微', //1. 加入,0.未加入
prop: 'isJoin',
addHtml: 'isJoin'
addHtml: 'isJoin',
width: 95
},
{
label: '当前状态',
prop: 'status',
addHtml: 'status'
addHtml: 'status',
width: 80
},
{
label: '添加时间',
prop: 'addTime'
prop: 'addTime',
width: 188
}
],
tableOption: {
......@@ -215,19 +223,22 @@ export default {
},
methods: {
statusText(text) {
return text === -1 ? '删除好友' : text === 0 ? '正常' : ''
},
setTableHeightEvent() {
this.$refs.clientManage.setTableHeightFun()
},
beforeSearchFn() {
return new Promise((resolve, reject) => {
console.log(this.searchForm)
if (this.searchForm.daterange) {
this.searchForm.beginTime = this.searchForm.daterange[0]
this.searchForm.endTime = this.searchForm.daterange[1]
delete this.searchForm.daterange
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchFormTable.daterange) {
this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1]
} 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()
})
},
......@@ -243,6 +254,8 @@ export default {
value: item.dictValue
}
})
data.unshift({ label: '全部', value: '' })
this.sourceList = data || []
if (data && data.length > 0) {
window.localStorage.setItem('sourceList', JSON.stringify(data))
......@@ -260,11 +273,11 @@ export default {
},
//来源 value值转为对应label
toLabel(value) {
if (!value) {
if (value !== 0 && !value) {
return
}
let curElement = this.sourceList.find(item => {
return item.value == value
return item.value === value
})
return curElement.label
......@@ -273,6 +286,22 @@ export default {
searchTable() {
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() {
this.searchForm = {}
......@@ -299,7 +328,6 @@ export default {
position: relative;
height: 20px;
font-size: 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 700;
color: #333333;
line-height: 20px;
......@@ -307,6 +335,7 @@ export default {
}
.pageContent {
padding: 6px 20px 30px;
// min-width: 1300px;
background-color: #fff;
.el-button + .el-button {
margin-left: 20px;
......@@ -326,9 +355,9 @@ export default {
// font-weight: 400;
// color: #666666;
// }
.glsx-table {
margin-top: 20px;
}
// .glsx-table {
// margin-top: 20px;
// }
}
}
</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>
......@@ -17,6 +17,7 @@ const cdn = {
`${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/echarts/5.1.2/echarts.min.js`
]
}
module.exports = {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!