Commit 8d33f35c by 前端

Merge branch 'v2.1.0' into 'develop'

V2.1.0

See merge request !64
2 parents a36156ba 26d8348e
Showing 58 changed files with 2589 additions and 871 deletions
......@@ -15,7 +15,7 @@
"echarts": "^5.2.0",
"element-ui": "^2.4.5",
"glsx-common": "^1.4.6",
"glsx-components": "^1.3.3",
"glsx-components": "^1.4.2",
"glsx-table": "^1.1.0",
"jquery": "^3.6.0",
"sha1": "^1.1.1",
......
......@@ -26,7 +26,7 @@
</div>
<img src="./assets/logo.png" alt="" srcset="" />
</div> -->
<keep-alive exclude="clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd,guestGroupDetail,group,viewCustomers,crowdDetail,crowdAdd,crowdManage">
<keep-alive exclude="clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd,guestGroupDetail,group,viewCustomers,crowdDetail,crowdAdd,crowdManage,leadBasicInfo,leadAllocation,leadManage">
<router-view></router-view>
</keep-alive>
</div>
......@@ -57,5 +57,16 @@ export default {
padding: 20px 0;
line-height: 36px;
}
#app {
background: #f4f5fa;
padding: 0px 20px 20px 20px;
position: absolute;
box-sizing: border-box;
width: 100%;
top: 0px;
left: 0px;
overflow-y: auto;
height: 100%;
}
</style>
>
......@@ -121,3 +121,14 @@ export function clientManageExportApi(params) {
sign: true
})
}
//根据userId完善客户手机号
export function perfectCustomerPhone(params) {
params.method = `entmicro.api.customer.perfectCustomerPhone`
return http3({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
/**
* 新增参数sign 判断接口是否需要sign签名(默认有,不必写)
*/
/**
* 用法 : this.$apis.demo.GETLISTDEVICEFILEUNSTOCK(...)
* @param {*} params
* @returns
*/
import { http, http3 } from '@/main'
// http 对应的域名http://ismv.branch.glsx.com.cn
// 线索管理查询数据
export function getTableList(params) {
params.method = 'scrm.api.wwbench.clue.list'
return http({
// http://192.168.1.144:7231
url: '/rop-scrm-wwbench/router',
method: 'POST',
data: params,
sign: true
})
}
export function getBaseInfo(params) {
params.method = 'scrm.api.wwbench.clue.detail'
return http({
// http://192.168.1.144:7231
url: '/rop-scrm-wwbench/router',
method: 'POST',
data: params,
sign: true
})
}
// 企微后台获取已选择跟进员工
export function getfollowstaff(params) {
params.method = 'scrm.api.wwbench.clue.staff.get'
return http({
// http://192.168.1.144:7231
url: '/rop-scrm-wwbench/router',
method: 'POST',
data: params,
sign: true
})
}
// 获取可选跟进员工
function selectableStaff(params) {
params.method = 'scrm.api.wwbench.clue.consultant.list'
return http({
// http://192.168.1.144:7231
url: '/rop-scrm-wwbench/router',
method: 'POST',
data: params,
sign: true
})
}
// 企微后台新增或编辑跟进员工
export function editfollowstaff(params) {
params.method = 'scrm.api.wwbench.clue.staff.insertOrUpdate'
return http({
// http://192.168.1.144:7231
url: '/rop-scrm-wwbench/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
selectableStaff
}
\ No newline at end of file
......@@ -9,95 +9,91 @@
import { http, http3 } from '@/main'
// const url = 'http://192.168.3.181:9636/rop-scrm-datahub/router'
export function getTableList(params) {
// params.method='scrm.api.datahub.label.querylabeltree'
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
// params.method='scrm.api.datahub.label.querylabeltree'
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
//计算表格上面的数量
export function getTableTagNum(params) {
// params.method='scrm.api.datahub.label.queryLabelCount'
params.method = 'scrm.api.datahub.labelgroup.queryLabelCount'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
// params.method='scrm.api.datahub.label.queryLabelCount'
params.method = 'scrm.api.datahub.labelgroup.queryLabelCount'
})
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
export function newAddTag(params) {
// params.method='scrm.api.datahub.label.addlabel'
params.method = 'scrm.api.datahub.labelgroup.addLabel'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
// params.method='scrm.api.datahub.label.addlabel'
params.method = 'scrm.api.datahub.labelgroup.addLabel'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//修改标签
export function updateTag(params) {
// params.method='scrm.api.datahub.label.updatelabel'
params.method = 'scrm.api.datahub.labelgroup.updateLabel'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
// params.method='scrm.api.datahub.label.updatelabel'
params.method = 'scrm.api.datahub.labelgroup.updateLabel'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
//获取单条数据labelList数组
export function queryLabelListByGroupId(params) {
// params.method='scrm.api.datahub.label.queryLabelListByGroupId'
params.method = 'scrm.api.datahub.labelgroup.queryLabelListByGroupId'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
// params.method='scrm.api.datahub.label.queryLabelListByGroupId'
params.method = 'scrm.api.datahub.labelgroup.queryLabelListByGroupId'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 查看客户
export function getCustomersList(params) {
params.method = 'entmicro.api.customer.getCustomerPageByTag'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'entmicro.api.customer.getCustomerPageByTag'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//根据groupId查询标签列表
export function getLabelList(params) {
params.method = 'scrm.api.datahub.labelgroup.queryLabelDetailByGroupId'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'scrm.api.datahub.labelgroup.queryLabelDetailByGroupId'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
// 根据标签获取客户列表导出
export function exportLabelList(params) {
params.method = 'entmicro.api.customer.customerPageByTagExport'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
\ No newline at end of file
params.method = 'entmicro.api.customer.customerPageByTagExport'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
@import '@/styles/variables.scss';
.el-tag {
color: #666!important;
font-size: 14px!important;
height: 26px;
line-height: 26px;
color: #666 !important;
font-size: 14px !important;
height: 26px;
line-height: 26px;
}
.el-tag.el-tag--info {
background: transparent !important;
border: 1px solid #e8e8ea !important;
border-radius: 4px;
color: #666;
background: transparent !important;
border: 1px solid #e8e8ea !important;
border-radius: 4px;
color: #666;
}
.el-tag.el-tag--info.el-tag--plain {
background: transparent !important;
background: transparent !important;
}
::-webkit-scrollbar {
/*滚动条整体样式*/
width: 6px;
height: 4px;
}
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 4px;
background-color: rgba(144, 147, 153, 0.3);
}
.el-message--info {
// ::-webkit-scrollbar {
// /*滚动条整体样式*/
// width: 6px;
// height: 4px;
// }
// ::-webkit-scrollbar-thumb {
// /*滚动条里面小方块*/
// border-radius: 4px;
// background-color: rgba(144, 147, 153, 0.3);
// }
.el-message--info {
height: 40px;
background: #e6e9ff;
border: 1px solid $btnBlue;
border-radius: 4px;
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
}
.el-message .el-icon-info {
}
.el-message .el-icon-info {
color: $btnBlue;
font-size: 16px;
}
.white-hide{
}
.white-hide {
box-sizing: border-box;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.color-6{
color:#666666;
}
.color-3{
color:#333333;
}
.color-71{
}
.color-6 {
color: #666666;
}
.color-3 {
color: #333333;
}
.color-71 {
color: #717171;
}
.color-58{
}
.color-58 {
color: #5850ff;
}
.color-9{
}
.color-9 {
color: #999999;
}
.flex-start{
}
.flex-start {
align-items: flex-start;
display: flex;
}
.flex{
display:flex;
}
.flex {
display: flex;
align-items: center;
flex-wrap: wrap;
}
.flex-between{
display:flex;
}
.flex-between {
display: flex;
align-items: center;
justify-content: space-between;
}
.font-12{
}
.font-12 {
font-size: 12px;
}
.font-20{
}
.font-20 {
font-size: 20px;
}
.font-14{
}
.font-14 {
font-size: 14px;
}
.font-16{
}
.font-16 {
font-size: 16px;
}
.hand{
}
.hand {
cursor: pointer;
}
.mg2{
margin-left:20px;
margin-right:20px;
}
\ No newline at end of file
}
.mg2 {
margin-left: 20px;
margin-right: 20px;
}
.mgt10 {
margin-top: 10px;
}
.circleStatusRed {
width: 6px;
height: 6px;
border-radius: 50%;
background: #eb4e4e;
display: inline-block;
vertical-align: middle;
margin-right: 8px;
}
.circleStatusGray {
width: 6px;
height: 6px;
border-radius: 50%;
background: #999999;
display: inline-block;
vertical-align: middle;
margin-right: 8px;
}
.circleStatusGreen {
width: 6px;
height: 6px;
border-radius: 50%;
background: #2cca74;
display: inline-block;
vertical-align: middle;
margin-right: 8px;
}
.circleStatusYellow {
width: 6px;
height: 6px;
border-radius: 50%;
background: #fdb757;
display: inline-block;
vertical-align: middle;
margin-right: 8px;
}
.circleStatusPurple {
width: 6px;
height: 6px;
border-radius: 50%;
background: #5850FF;
display: inline-block;
vertical-align: middle;
margin-right: 8px;
}
\ No newline at end of file

448 Bytes | W: | H:

608 Bytes | W: | H:

src/assets/tagsManage/question.png
src/assets/tagsManage/question.png
src/assets/tagsManage/question.png
src/assets/tagsManage/question.png
  • 2-up
  • Swipe
  • Onion skin
export const Constants = {
CLIENT_STATUS: {
'0': '正常, green-text',
'1': '删除好友, red-text'
......@@ -153,6 +152,51 @@ export const Constants = {
0: '未激活',
1: '已激活',
2: '已过期'
}
},
DESCRIBEDATA: [
{
name: '潜在意向客户',
info: '无购车且无其他交易行为的所有客户'
},
{
name: '潜在意向客户已加微',
info: '在潜在意向客户中,已加企微的客户'
},
{
name: '潜在意向客户未加微',
info: '在潜在意向客户中,未加企微的客户'
},
{
name: '基盘客户',
info: '有购车或其他交易行为的所有客户'
},
{
name: '基盘客户已加微',
info: '在基盘客户中,已加企微的客户'
},
{
name: '基盘客户未加微',
info: '在基盘客户中,未加企微的客户'
},
{
name: '新车客户',
info: '购车时间3个月的客户'
},
{
name: '车险待续保客户',
info: '近一个月内车险即将到期的客户'
},
{
name: '新车待首保客户',
info: '购车时间5~7个月内,且无保养记录的客户'
},
{
name: '沉默客户',
info: '超过180天未到店的客户'
},
{
name: '已加企微,待匹配客户',
info: '已加企微,且未匹配到潜在意向和基盘客户的客户'
}
]
}
<template>
<div class="full-container">
<el-tooltip placement="top" v-if="hoverStatus">
<div slot="content">
<template v-if="$slots.default"><slot></slot></template>
<template v-else>
{{ label }}
</template>
</div>
<div :class="[line ? 'full-text-line' : 'full-text']" :style="{ width: labelWidth + 'px', '-webkit-line-clamp': line }">
<template v-if="$slots.default"><slot></slot></template>
<template v-else>
{{ label }}
</template>
</div>
</el-tooltip>
<div :class="[line ? 'full-text-line' : 'full-text', identification]" v-else @mouseenter="hoverFun" :style="{ width: labelWidth + 'px', '-webkit-line-clamp': line }">
<template v-if="$slots.default"><slot></slot></template>
<template v-else>
{{ label }}
</template>
</div>
</div>
</template>
<script>
export default {
name: 'GLFull',
data() {
return {
hoverStatus: false
}
},
props: {
identification: {
type: String,
default: ''
},
label: {
type: String,
default: ''
},
labelWidth: {
type: Number,
default: 100
},
line: {
type: Number,
default: 0
}
},
methods: {
hoverFun() {
this.hoverStatus = this.identification ? document.querySelector(`.${this.identification}`).scrollWidth > this.labelWidth : document.querySelector(`.full-text`).scrollWidth > this.labelWidth
}
}
}
</script>
<style scoped lang="scss">
.full-container {
display: inline-block;
}
.full-text {
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.full-text-line {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
word-break: break-all;
}
</style>
......@@ -72,8 +72,8 @@ export default {
{
name: '客户总数',
type: 'pie',
radius: '91.5px',
center: ['50%', '68%'],
radius: '118px',
center: ['50%', '65%'],
stillShowZeroSum: false,
data: this.pieData,
// data: [
......
......@@ -7,7 +7,7 @@
<el-col :span="12" :key="index">
<div class="label-wrap">
<label>{{ params.label }}</label>
<span>{{ list[params.prop]? list[params.prop]: '--'}}</span>
<span>{{ list[params.prop] ? list[params.prop] : '--' }}</span>
</div>
</el-col>
</template>
......@@ -47,7 +47,7 @@ export default {
padding: 20px 0;
box-sizing: border-box;
background: #f5f5f5;
margin-bottom:10px;
margin-bottom: 10px;
.el-row {
&:last-child {
margin-bottom: -20px;
......@@ -84,4 +84,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
<template>
<div class="square-main" v-loading="loading">
<el-dialog title="选择跟进专员" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
<el-form :inline="true" :model="tableSearchForm">
<el-form-item size="small" label="员工">
<el-input v-model="tableSearchForm.username" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item size="small">
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-form-item>
</el-form>
<GLTable :hasNum="false" v-if="dialogVisible" @refreshTable="handleSearch" ref="table" :layout="layout" :tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams">
<div slot="options" slot-scope="scope">
<!-- @click.prevent.native="checkRadio(scope.scope.userOneid)" -->
<el-radio :label="scope.scope.userOneid" v-model="selectId"></el-radio>
</div>
</GLTable>
<span slot="footer" class="dialog-footer">
<a class="dialog-jump" @click="jumpUrl">新增专员</a>
<el-button size="small" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { utils } from 'glsx-common'
import util from '@/utils/util'
export default {
name: 'selectEmp',
data() {
return {
selectId: null,
// loading: false,
dialogVisible: false,
tableSearchForm: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'data',
tableOption: false,
// 行数据的key
mutiSelectUniqueKey: 'id',
tableColumns: [
{
label: '',
prop: '',
addHtml: 'options'
},
{
label: '姓名',
prop: 'staffName'
},
// {
// label: '部门',
// prop: 'departmentName'
// },
{
label: '跟进专员类型',
prop: 'followerName'
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0,
selectEmp: [],
typeselect: '',
selectUuid: ''
}
},
methods: {
// checkRadio(val) {
// val === this.selectId ? (this.selectId = '') : (this.selectId = val)
// },
jumpUrl() {
util.openUrl(location.origin + '/settings/followUp/index')
},
selectableStaff(type) {
this.typeselect = type
let params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
type
}
this.$apis.leadManage.selectableStaff(params).then(res => {
this.tableData = res.list ? res.list : []
this.tableTotal = res.total
})
},
init(type, uuid) {
this.selectId = uuid
this.tableSearchForm = {}
this.dialogVisible = true
this.$nextTick(() => {
this.$refs.table.page.pageNum = 1
this.selectableStaff(type)
})
},
handleSearch() {
let type = this.typeselect
this.selectableStaff(type)
},
handleClose() {
this.handleCancel()
},
handleCancel: utils.debounce(function() {
this.dialogVisible = false
}, 300),
handleSelect: utils.debounce(function() {
if (!this.selectId) {
this.$message.error('请选择员工')
return
}
let list = this.tableData.filter(item => {
return item['userOneid'] == this.selectId
})
let selectEmp = {
userId: list[0].userId,
userName: list[0].staffName,
userUuid: list[0].userOneid
}
this.dialogVisible = false
this.$emit('selectTable', selectEmp)
}, 300)
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
box-shadow: none;
}
/deep/ .el-radio__label {
display: none;
}
.dialog-jump {
color: #5850ff;
float: left;
line-height: 24px;
text-decoration: underline;
cursor: pointer;
}
.square-main {
/deep/ {
.el-table {
height: 40vh;
overflow-y: auto;
}
.el-table::before {
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
}
}
</style>
<template>
<div class="el-descriptions">
<div class="el-descriptions__body">
<table class="el-descriptions__table is-bordered">
<tbody v-for="(item, index) in tableModel" :key="index">
<tr class="el-descriptions-row">
<template v-for="(trTtem, idx) in item.colList">
<th :key="idx" :colspan="trTtem.thColspan" class="el-descriptions-item__cell el-descriptions-item__label is-bordered-label">{{ trTtem.label }}</th>
<td :key="idx" :colspan="trTtem.tdColspan" class="el-descriptions-item__cell el-descriptions-item__content" :style="{ color: trTtem.color }">{{ showData[trTtem.name]? showData[trTtem.name] : ' — '}}</td>
</template>
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script>
export default {
name: 'ylDescriptions',
props: {
tableModel: {
type: Array,
default: () => []
},
showData: {
type: Object,
default: () => {}
}
}
}
</script>
<style lang="scss" scoped>
.el-descriptions .is-bordered {
table-layout: auto;
margin: 25px 20px 40px 44px;
}
.el-descriptions__body .el-descriptions__table {
border-collapse: collapse;
table-layout: fixed;
}
.el-descriptions :not(.is-bordered) .el-descriptions-item__cell {
padding-bottom: 12px;
}
.el-descriptions .is-bordered .el-descriptions-item__cell {
border: 1px solid #ebeef5;
padding: 12px 10px;
}
.el-descriptions-item__label.is-bordered-label {
font-weight: 700;
color: #333333;
background: #f4f6fc;
}
.el-descriptions :not(.is-bordered) .el-descriptions-item__cell {
padding-bottom: 12px;
}
.el-descriptions .is-bordered .el-descriptions-item__cell {
border: 1px solid #e8e8ea;
padding: 7px 10px;
}
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell {
box-sizing: border-box;
text-align: left;
font-weight: 400;
line-height: 1.5;
width: 118px;
vertical-align: middle;
font-size: 14px;
}
.el-descriptions-item__content {
word-break: break-word;
overflow-wrap: break-word;
min-width: 238px;
}
</style>
......@@ -15,7 +15,7 @@ import '@/assets/css/public.scss'
// import 'glsx-components/dist/glsx-components.css'
import './styles/index.scss'
import { start } from '@/setup'
import glsxTable from 'glsx-table';
import glsxTable from 'glsx-table'
import { message } from './plugins/element.js'
import filters from '@/utils/filters'
import * as echarts from 'echarts'
......@@ -27,7 +27,7 @@ Vue.use(VueAnimateNumber)
Vue.config.productionTip = false
Vue.prototype.$apis = apis
Vue.use(glsxTable);
Vue.use(glsxTable)
Vue.prototype.$message = message
Vue.prototype.size = 'small'
// Vue.prototype.btn_size = 'mini'
......@@ -39,7 +39,6 @@ Vue.prototype.$echarts = echarts
Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key])
})
start()
export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params)
export const http2 = params => Vue.prototype.$http2(params)
......
import { getCustomersList, exportLabelList } from '@/api/modules/tagsManage'
import { getStaffList } from '@/api/modules/clientManage'
export default {
data() {
return {
tagHeight: 0,
tagHeightStatus: false,
tagCheckItem: [],
allListParams: [],
crowdForm: {
crowdName: '',
crowdDesc: ''
}
}
},
mounted() {
this.getStaffList()
this.getCustomersListData()
},
watch: {
tagCheckItem: {
handler() {
if (this.tagCheckItem.length == 0) {
this.tagHeight = 0
}
this.allListParams = []
const tagNode = this.$common.utils.deepClone(this.tagCheckItem)
tagNode.forEach(group_item => {
group_item.children.forEach(label_item => {
if (label_item) {
this.allListParams.push({
groupId: group_item.id,
groupName: group_item.name,
groupType: group_item.labelType,
labelId: label_item.id,
labelName: label_item.name
})
}
})
})
this.getCustomersListData()
},
deep: true
},
tagHeight: {
handler(val) {
if (val == 0) {
setTimeout(() => {
this.tagHeightStatus = false
}, 300)
} else {
this.tagHeightStatus = true
}
},
deep: true
}
},
methods: {
//获取跟进员工
getStaffList() {
getStaffList({}).then(res => {
if (res.length == 0) {
return ''
}
const id = this.tagsPartFormList.findIndex(item => {
return item.name == 'followStaff'
})
const staff = res.map(item => {
return {
label: item.staffName,
value: item.staffName
}
})
staff.unshift({ label: '全部', value: '' })
this.$nextTick(() => {
this.tagsPartFormList[id].optionList = staff
})
console.log(this.tagsPartFormList[id])
})
},
tagLength(children) {
return children.filter(item => item).length
},
goDetail(scope) {
this.$router.push('/clientManage/clientDetail?id=' + scope.oneId)
},
jumpGroup() {
this.$router.push({
path: '/crowdManage/index',
query: {
selectTab: 1
}
})
},
//删除标签组
removeItem(index) {
this.tagCheckItem.splice(index, 1)
this.$refs.tagTree.getTreeNode(this.tagCheckItem)
},
treeScroll(id) {
const h = document.querySelector('.node_' + id).offsetTop
this.$refs.tagTree.handleScroll(h)
},
//获取选中的标签并排序
getCheckItem(item) {
const tree_id = []
const labelTree = this.$common.utils.deepClone(this.$refs.tagTree.labelTree)
labelTree.forEach(tree_node => {
tree_node.children.forEach(t_node => {
tree_id.push(t_node.id)
})
})
this.tagCheckItem = []
let group_all = item.getCheckedNodes().filter(item => item.labelType)
let group_Label = item.getCheckedNodes().filter(item => !item.children)
let label_id = []
group_Label.forEach(item => {
label_id.push(item.id)
})
let group_half = item.getHalfCheckedNodes().filter(item => item.labelType)
let group = [...group_half, ...group_all].sort((a, b) => {
return tree_id.indexOf(a.id) - tree_id.indexOf(b.id)
})
this.tagCheckItem = this.$common.utils.deepClone(group)
group.forEach((tag, idx) => {
tag.children.forEach((item, index) => {
if (!label_id.includes(item.id)) {
this.tagCheckItem[idx].children[index] = null
}
})
})
this.tagCheckItem.forEach(tag => {
tag.children = tag.children.filter(item => item)
})
},
//导出
handleExport() {
const params = {
...JSON.parse(JSON.stringify({ tagLists: this.allListParams })),
combineType: 2
}
exportLabelList(params).then(res => {
this.$Utils.exportFn(res)
})
},
//客户列表
getCustomersListData() {
if (this.searchForm.createTime) {
this.searchForm.beginTime = new Date(this.searchForm.createTime[0]).toLocaleDateString().replace(/-/g, '/')
this.searchForm.endTime = new Date(this.searchForm.createTime[1]).toLocaleDateString().replace(/-/g, '/')
}
delete this.searchForm.createTime
const tagLists = this.$common.utils.deepClone(this.allListParams)
this.userLoading = true
const params = {
...JSON.parse(JSON.stringify({ tagLists })),
...JSON.parse(JSON.stringify(this.searchForm)),
combineType: 2,
pageSize: this.$refs.viewCustomers.page.pageSize,
pageNum: this.$refs.viewCustomers.page.pageNum
}
getCustomersList(params)
.then(res => {
this.userLoading = false
this.tableData = res.data
this.tableTotal = res.count
this.$nextTick(() => {
if (tagLists.length == 0) {
document.querySelector('.noDataText').innerText = '当前未选择标签,快去选择标签查看客户吧!'
} else {
document.querySelector('.noDataText') ? (document.querySelector('.noDataText').innerText = '暂无数据') : ''
}
})
if (this.tableData == 0) {
this.$refs.viewCustomers.setTableHeightFun()
} else {
this.$refs.viewCustomers.tableHeightValues = ''
}
})
.catch(err => {
this.userLoading = false
})
},
//创建人群
groupConfirmDialog() {
console.log(this.allListParams)
if (this.tagCheckItem.length == 0) {
this.$message.error('必须选择一个标签')
return
}
if (!this.crowdForm.crowdName) {
this.$message.error('请输入人群名称')
return
}
const tagCombine = this.allListParams.reduce((prev, cur) => {
const index = prev.findIndex(group => cur.groupId == group.groupId)
if (index == -1) {
return prev.concat({ groupId: cur.groupId, labelIdList: [cur.labelId] })
} else {
prev[index].labelIdList.push(cur.labelId)
return prev
}
}, [])
const params = {
'req.merchantId': this.merchantId,
'req.crowdType': 2, //类型 1-推荐 2-自定义
'req.crowdName': this.crowdForm.crowdName,
'req.crowdDesc': this.crowdForm.crowdDesc,
'req.tagCombine': JSON.stringify(tagCombine)
}
this.$apis.crowdManage
.addCrowd(params)
.then(res => {
if (res.data.code == 0) {
this.groupVisible = false
this.successVisible = true
} else {
this.$message({
type: 'error',
message: res.data.message
})
}
})
.catch(err => {
this.$message({
type: 'error',
message: err.message
})
})
}
}
}
......@@ -12,25 +12,25 @@ const staticRoutes = Object.freeze([{
},
{
name: 'clientDataOverview',
path: "/clientDataOverview/index",
path: '/clientDataOverview/index',
component: resolve => require([`@/views/clientDataOverview/index.vue`], resolve),
meta: {}
},
{
name: 'clientDataOverview',
path: "/clientDataOverview/group/:id",
path: '/clientDataOverview/group/:id',
component: resolve => require([`@/views/clientDataOverview/group.vue`], resolve),
meta: {}
},
{
name: 'clientManage',
path: "/clientManage/index",
path: '/clientManage/index',
component: resolve => require([`@/views/clientManage/index.vue`], resolve),
meta: {}
},
{
name: 'clientDetail',
path: "/clientManage/clientDetail",
path: '/clientManage/clientDetail',
component: resolve => require([`@/views/clientManage/clientDetail.vue`], resolve),
meta: {}
},
......@@ -38,92 +38,110 @@ const staticRoutes = Object.freeze([{
// name: 'clientDemo',
// path: "/clientManage/clientDemo",
// component: resolve => require([`@/views/clientManage/demo.vue`], resolve),
// meta: {}
// meta: {}
// },
{
name: 'clientGroupManage',
path: "/clientGroupManage/index",
path: '/clientGroupManage/index',
component: resolve => require([`@/views/clientGroupManage/index.vue`], resolve),
meta: {}
},
{
name: 'clientGroupDetail',
path: "/clientGroupManage/clientGroupDetail",
path: '/clientGroupManage/clientGroupDetail',
component: resolve => require([`@/views/clientGroupManage/clientGroupDetail.vue`], resolve),
meta: {}
},
{
name: 'tagsManage',
path: "/tagsManage/index",
path: '/tagsManage/index',
component: resolve => require([`@/views/tagsManage/index.vue`], resolve),
meta: {}
},
{
name: 'viewCustomers',
path: "/tagsManage/viewCustomers/:info/:type",
path: '/tagsManage/viewCustomers/:info/:type',
component: resolve => require([`@/views/tagsManage/viewCustomers.vue`], resolve),
meta: {},
meta: {}
},
{
name: 'expand',
path: "/expand/index",
path: '/expand/index',
component: resolve => require([`@/views/expand/index.vue`], resolve),
meta: {}
},
{
name: 'employee',
path: "/employee/index",
path: '/employee/index',
component: resolve => require([`@/views/employee/index.vue`], resolve),
meta: {}
},
{
name: 'employee',
path: "/employee/detail",
path: '/employee/detail',
component: resolve => require([`@/views/employee/detail.vue`], resolve),
meta: {}
},
{
name: 'employee',
path: "/employee/add",
path: '/employee/add',
component: resolve => require([`@/views/employee/add.vue`], resolve),
meta: {}
},
{
name: 'guestGuest',
path: "/guestGroup/index",
path: '/guestGroup/index',
component: resolve => require([`@/views/guestGroup/index.vue`], resolve),
meta: {}
},
{
name: 'guestAdd',
path: "/guestGroup/add/:id",
path: '/guestGroup/add/:id',
component: resolve => require([`@/views/guestGroup/add.vue`], resolve),
meta: {}
},
{
name: 'guestDetail',
path: "/guestGroup/detail/:id",
path: '/guestGroup/detail/:id',
component: resolve => require([`@/views/guestGroup/detail.vue`], resolve),
meta: {}
},
{
name: 'crowdManage',
path: "/crowdManage/index",
path: '/crowdManage/index',
component: resolve => require([`@/views/crowdManage/index.vue`], resolve),
meta: {}
},
{
name: 'crowdAdd',
path: "/crowdManage/crowdAdd",
path: '/crowdManage/crowdAdd',
component: resolve => require([`@/views/crowdManage/crowdAdd.vue`], resolve),
meta: {}
},
{
name: 'crowdDetail',
path: "/crowdManage/crowdDetail:id",
path: '/crowdManage/crowdDetail:id',
component: resolve => require([`@/views/crowdManage/crowdDetail.vue`], resolve),
meta: {}
},
{
name: 'leadManage',
path: '/leadManage/index',
component: resolve => require([`@/views/leadManage/index.vue`], resolve),
meta: {}
},
{
name: 'leadAllocation',
path: '/leadManage/leadAllocation',
component: resolve => require([`@/views/leadManage/leadAllocation.vue`], resolve),
meta: {}
},
{
name: 'leadBasicInfo',
path: '/leadManage/leadBasicInfo/:id/:type',
component: resolve => require([`@/views/leadManage/leadBasicInfo.vue`], resolve),
meta: {}
}
])
export default staticRoutes
// {
......
......@@ -2,19 +2,21 @@ import Vue from 'vue'
import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config'
import ElementUI from 'element-ui'
import { GLButton, GLTable } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { GLButton, GLTable, GLCombiForm } from 'glsx-components' //权限按钮 (根据权限动态创建)
import GLFull from '@/components/GLFull'
import { getRoutes } from '@/router'
import render from './render'
Vue.use(ElementUI)
Vue.use(GLTable)
Vue.use(GLCombiForm)
Vue.component('GLFull', GLFull)
import 'glsx-components/dist/glsx-components.css'
let routes = []
let router = null
let instance = null
// http:调的是新版标签的接口,http2:调的是客户相关接口;http3:企微授权那边的接口 目前导出接口都测试的:http3
export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) {
const { response, request,request2,request3, request4,sign, secret, sign_common, request_common } = await fetchConfig(globalState.configSwitch)//globalState.configSwitch
export async function bootstrap({ name, id, history, common, messenger, globalState, routerBase }) {
const { response, request, request2, request3, request4, sign, secret, sign_common, request_common } = await fetchConfig(globalState.configSwitch) //globalState.configSwitch
Vue.prototype.$history = history
Vue.prototype.$messenger = messenger
Vue.prototype.$globalState = globalState
......@@ -24,7 +26,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
Vue.prototype.$http3 = new common.Http({ response, request: request3, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$http4 = new common.Http({ response, request: request4, sign, secret, alert: message.error, headers: { token: 'scrm-base-e2d4f962-4ca3-4044-83e7-01ba314d8e3d-rop' } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: "mini-14eda653-4284-4165-bb85-325bb82a516d-rop" } })
Vue.prototype.$http_common = new common.Http({ response, signWay: "md5", request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
Vue.prototype.$http_common = new common.Http({ response, signWay: 'md5', request: request_common, sign: sign_common, secret, alert: ElementUI.Message.error, headers: { TGT: globalState.session.token } })
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
//Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const routesData = common.utils.deepClone(globalState.routers)
......@@ -38,7 +40,6 @@ export async function mount(props) {
router = insts.router
instance = insts.vm
}
export async function unmount() {
instance.$destroy()
instance.$el.innerHTML = ''
......
@import './variables.scss';
@import './common.scss';
@import './resetelement.scss';
@import "./variables.scss";
@import "./common.scss";
@import "./resetelement.scss";
body,
html {
width: 100%;
......@@ -34,10 +34,10 @@ button {
// 子系统不设外边距
.scrm-sub-client-container {
padding: 0 20px 20px 40px;
// padding: 0 20px 20px 40px;
box-sizing: border-box;
}
.el-table .cell {
// line-height: 20px!important;
}
\ No newline at end of file
}
//过滤器
/* eslint-disable */
const overThousandFilter = (val) => {
if(typeof(val)!='number'){
return false;
}
if (val < 1000) return val;
let a = val + "";
let b = a.split("");
b.splice(-3, 0, ",");
return b.join("");
};
//来源 value值转为对应label(来源)
const toLabel=(value)=> {
if (value!==0 && !value) {
return
}
let sourceList=JSON.parse(window.localStorage.getItem('sourceList'));
let curElement =sourceList.find(item => {
return item.value === value
})
return curElement.label
}
import Vue from 'vue'
const overThousandFilter = val => {
if (typeof val != 'number') {
return false
}
if (val < 1000) return val
let a = val + ''
let b = a.split('')
b.splice(-3, 0, ',')
return b.join('')
}
//来源 value值转为对应label(来源)
const toLabel = value => {
if (value !== 0 && !value) {
return
}
let sourceList = JSON.parse(window.localStorage.getItem('sourceList'))
if (sourceList) {
let curElement = sourceList.find(item => {
return item.value === value
})
return curElement.label
}
}
const tagType = value => {
let type = ''
if (JSON.parse(sessionStorage.getItem('SCRM_BASE_SESSION')).merchantModel == 1) {
type = '集团'
} else {
type = '企业'
}
return type
}
export default {
overThousandFilter,
toLabel
};
overThousandFilter,
toLabel,
tagType
}
export function debounce(fn, delay, triggerNow) {
var t = null;
console.log('ceshi')
var debounced = function(){
var _self = this,
args = arguments;
if(t){
clearTimeout(t);
}
if(triggerNow){
var exec = !t;
t = setTimeout(function(){
t = null;
}, delay);
var t = null
console.log('ceshi')
var debounced = function() {
var _self = this,
args = arguments
if (t) {
clearTimeout(t)
}
if (triggerNow) {
var exec = !t
if(exec){
// 初次进来
fn.apply(_self, args);
}
}else{
t = setTimeout(function(){
fn.apply(_self, args);
}, delay);
t = setTimeout(function() {
t = null
}, delay)
if (exec) {
// 初次进来
fn.apply(_self, args)
}
} else {
t = setTimeout(function() {
fn.apply(_self, args)
}, delay)
}
}
debounced.remove = function(){
clearTimeout(t);
t = null;
debounced.remove = function() {
clearTimeout(t)
t = null
}
return debounced;
}
return debounced
}
//格式化日期
export const formatDate = (date, fmt) => {
  if (!date) {
    date = new Date();
  }
  let o = {
    "M+": date.getMonth() + 1, //月份
    "d+": date.getDate(), //日
    "h+": date.getHours(), //小时
    "m+": date.getMinutes(), //分
    "s+": date.getSeconds(), //秒
    "q+": Math.floor((date.getMonth() + 3) / 3), //季度
    S: date.getMilliseconds(), //毫秒  1-3 位  只能一位占位符
    "U+": date.getMilliseconds() //毫秒   可以1-3位占位符
  };
  fmt = fmt || "yyyy-MM-dd hh:mm";
  if (/(y+)/.test(fmt))
    fmt = fmt.replace(
      RegExp.$1,
      (date.getFullYear() + "").substr(4 - RegExp.$1.length)
    );
  for (let k in o)
    if (new RegExp("(" + k + ")").test(fmt))
      fmt = fmt.replace(
        RegExp.$1,
        RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)
      );
  return fmt;
};
export const formatDate = (date, fmt) => {
if (!date) {
date = new Date()
}
let o = {
'M+': date.getMonth() + 1, //月份
'd+': date.getDate(), //日
'h+': date.getHours(), //小时
'm+': date.getMinutes(), //分
's+': date.getSeconds(), //秒
'q+': Math.floor((date.getMonth() + 3) / 3), //季度
S: date.getMilliseconds(), //毫秒  1-3 位  只能一位占位符
'U+': date.getMilliseconds() //毫秒   可以1-3位占位符
}
fmt = fmt || 'yyyy-MM-dd hh:mm'
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
for (let k in o) if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length))
return fmt
}
//正则表示式是干什么的? 字符串匹配利器(难,规则多)
export function formatDate2(date, fmt) {
//1.获取年份
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
}
//2.获取
//M+ ->正则表达式一个规则
......@@ -79,16 +69,16 @@ export function formatDate2(date, fmt) {
'h+': date.getHours(),
'm+': date.getMinutes(),
's+': date.getSeconds()
};
}
for (let k in o) {
if (new RegExp(`(${k})`).test(fmt)) {
let str = o[k] + '';
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : padLeftZero(str));
let str = o[k] + ''
fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : padLeftZero(str))
}
}
return fmt;
};
return fmt
}
//填补左边的零(一般返回字符串最后两位)
function padLeftZero (str) {
return ('00' + str).substr(str.length);
};
function padLeftZero(str) {
return ('00' + str).substr(str.length)
}
import { Message } from 'element-ui'
let util = {}
util.cloneText = function (message) {
let input = document.createElement('input')
input.value = message
document.body.appendChild(input)
input.select()
input.setSelectionRange(0, input.value.length), document.execCommand('Copy')
document.body.removeChild(input)
Message.success('复制成功')
util.cloneText = function(message) {
let input = document.createElement('input')
input.value = message
document.body.appendChild(input)
input.select()
input.setSelectionRange(0, input.value.length), document.execCommand('Copy')
document.body.removeChild(input)
Message.success('复制成功')
}
util.getBeforeDate = function (sign = '-') {
let day = new Date();
let month = day.getMonth() + 1;
let date = day.getDate();
if (month < 10) month = '0' + month;
if (date < 10) date = '0' + date;
var s = day.getFullYear() + sign + month + sign + date;
return s;
util.getBeforeDate = function(sign = '-') {
let day = new Date()
let month = day.getMonth() + 1
let date = day.getDate()
if (month < 10) month = '0' + month
if (date < 10) date = '0' + date
var s = day.getFullYear() + sign + month + sign + date
return s
}
util.getBeforeMonth = function (days) {
let month = new Date().getMonth() + 1;
let year = new Date().getFullYear();
let arr = new Array();
for (let i = 0; i < days; i++) {
if (month <= 0) {
year = year - 1;
month = month + 12;
}
if (month < 10) month = '0' + month;
arr[i] = year + '年' + month + '月'
month--
util.getBeforeMonth = function(days) {
let month = new Date().getMonth() + 1
let year = new Date().getFullYear()
let arr = new Array()
for (let i = 0; i < days; i++) {
if (month <= 0) {
year = year - 1
month = month + 12
}
return arr;
if (month < 10) month = '0' + month
arr[i] = year + '年' + month + '月'
month--
}
return arr
}
/**
* 格式化时间
* @param {Array} time
*/
util.formatTime = function (time) {
return {
startTime: time ? time[0] + ' ' + '00:00:00' : '',
endTime: time ? time[1] + ' ' + '23:59:59' : ''
}
util.formatTime = function(time) {
return {
startTime: time ? time[0] + ' ' + '00:00:00' : '',
endTime: time ? time[1] + ' ' + '23:59:59' : ''
}
}
util.tringToDate = function (dateStr, separator) {
if (!separator) {
separator = "-";
}
var dateArr = dateStr.split(separator);
var year = parseInt(dateArr[0]);
var month;
//处理月份为04这样的情况
if (dateArr[1].indexOf("0") == 0) {
month = parseInt(dateArr[1].substring(1));
} else {
month = parseInt(dateArr[1]);
}
var day = parseInt(dateArr[2]);
var date = new Date(year, month - 1, day);
return date;
util.tringToDate = function(dateStr, separator) {
if (!separator) {
separator = '-'
}
var dateArr = dateStr.split(separator)
var year = parseInt(dateArr[0])
var month
//处理月份为04这样的情况
if (dateArr[1].indexOf('0') == 0) {
month = parseInt(dateArr[1].substring(1))
} else {
month = parseInt(dateArr[1])
}
var day = parseInt(dateArr[2])
var date = new Date(year, month - 1, day)
return date
}
util.getDay = function (num, str = '-') {
var today = new Date();
var nowTime = today.getTime();
var ms = 24 * 3600 * 1000 * num;
today.setTime(parseInt(nowTime + ms));
var oYear = today.getFullYear();
var oMoth = (today.getMonth() + 1).toString();
if (oMoth.length <= 1) oMoth = '0' + oMoth;
var oDay = today.getDate().toString();
if (oDay.length <= 1) oDay = '0' + oDay;
return oYear + str + oMoth + str + oDay;
util.getDay = function(num, str = '-') {
var today = new Date()
var nowTime = today.getTime()
var ms = 24 * 3600 * 1000 * num
today.setTime(parseInt(nowTime + ms))
var oYear = today.getFullYear()
var oMoth = (today.getMonth() + 1).toString()
if (oMoth.length <= 1) oMoth = '0' + oMoth
var oDay = today.getDate().toString()
if (oDay.length <= 1) oDay = '0' + oDay
return oYear + str + oMoth + str + oDay
}
util.openUrl = function (url) {
const link = document.createElement('a')
link.href = url
link.target = '_blank'
link.rel = 'opener'
link.click()
util.openUrl = function(url) {
const link = document.createElement('a')
link.href = url
link.target = '_blank'
link.rel = 'opener'
link.click()
}
util.debounce = function(fn, timer) {
var t = null
return function() {
if (t) {
clearTimeout(t)
}
t = setTimeout(() => {
fn.apply(this, arguments)
}, timer)
}
}
util.downloadIamge = function (imgsrc, name = new Date().getTime()) {
//下载图片地址和图片名
var image = new Image();
// 解决跨域 Canvas 污染问题
image.setAttribute("crossOrigin", "anonymous");
image.onload = function () {
var canvas = document.createElement("canvas");
canvas.width = image.width;
canvas.height = image.height;
var context = canvas.getContext("2d");
context.drawImage(image, 0, 0, image.width, image.height);
var url = canvas.toDataURL("image/png"); //得到图片的base64编码数据
util.downloadIamge = function(imgsrc, name = new Date().getTime()) {
//下载图片地址和图片名
var image = new Image()
// 解决跨域 Canvas 污染问题
image.setAttribute('crossOrigin', 'anonymous')
image.onload = function() {
var canvas = document.createElement('canvas')
canvas.width = image.width
canvas.height = image.height
var context = canvas.getContext('2d')
context.drawImage(image, 0, 0, image.width, image.height)
var url = canvas.toDataURL('image/png') //得到图片的base64编码数据
var a = document.createElement("a"); // 生成一个a元素
var event = new MouseEvent("click"); // 创建一个单击事件
a.download = name || "photo"; // 设置图片名称
a.href = url; // 将生成的URL设置为a.href属性
a.dispatchEvent(event); // 触发a的单击事件
};
image.src = imgsrc;
var a = document.createElement('a') // 生成一个a元素
var event = new MouseEvent('click') // 创建一个单击事件
a.download = name || 'photo' // 设置图片名称
a.href = url // 将生成的URL设置为a.href属性
a.dispatchEvent(event) // 触发a的单击事件
}
image.src = imgsrc
}
export default util
\ No newline at end of file
export default util
<template>
<div class="scrm-sub-client-container">
<div class="head-container">
<div class="head-container-title color-3 font-20">{{ crowdForm.crowdName }}</div>
<div class="head-container-content color-6 font-14">{{ crowdForm.crowdDesc }}</div>
<template v-if="crowdType == ''">
<div class="head-container-title color-3 font-20">{{ $Constants.DESCRIBEDATA[id - 1].name }}</div>
<div class="head-container-content color-6 font-14">{{ $Constants.DESCRIBEDATA[id - 1].info }}</div>
</template>
<template v-else>
<div class="head-container-title color-3 font-20">{{ crowdForm.crowdName }}</div>
<div class="head-container-content color-6 font-14">{{ crowdForm.crowdDesc }}</div>
</template>
<!-- <div class="reminder font-14 color-3">企业标签 | 自动更新</div> -->
<div class="back color-58 font-14" @click="goBack">返回人群管理</div>
</div>
<div class="main-container">
<GLCombiForm ref="formSearch" :formObj="tableSearchForm" :formData="tagsPartFormList" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="main-container-head flex-between">
<div class="main-container-head-title color-3 font-20">
全部客户
<span class="main-container-head-number font-14">{{ totalCount }}个</span>
</div>
<el-button type="primary" class="export flex" @click="handleExport()">导出</el-button>
<GLButton size="small" @click="handleExport" class="export" fn="导出">导出</GLButton>
</div>
<GLTable ref="groupRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :noDataImg="url" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<span slot="customerName" class="flex-center" slot-scope="scope">
<span slot="customerName" slot-scope="scope" style="display:flex;align-items:center">
<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>
</el-tooltip>
<span style="font-size: 12px" :class="[scope.scope.type == 1 ? 'pure-blue-text' : '', scope.scope.type == 2 ? 'pure-yello-text' : '']">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span>
</span>
<!-- 企微名称 -->
<div slot="nickNameList" slot-scope="scope" class="expandImg">
......@@ -40,6 +45,9 @@
</span>
</div>
</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="goDetail(scope.scope)" class="blue-text">详情</el-button>
</div>
</GLTable>
</div>
</div>
......@@ -47,6 +55,7 @@
<script>
import { getCustomerList, getcrowdManageList, customerClusterListExport } from '@/api/modules/clientDataOverview'
import { getStaffList } from '@/api/modules/clientManage'
import url from '@/assets/empty.png'
export default {
name: 'group',
......@@ -54,7 +63,62 @@ export default {
return {
getListApi: this.$route.params.crowdType ? getcrowdManageList : getCustomerList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableSearchForm: {},
tableSearchForm: {
customerPhone: '',
nickName: '',
customerName: '',
followStaff: '',
audi: '',
carNumber: '',
isJoin: ''
},
tagsPartFormList: [
{
type: 'select',
name: 'followStaff',
optionId: 'value',
optionLabel: 'label',
optionList: [],
label: '跟进员工'
},
{
type: 'input',
name: 'customerPhone',
label: '联系电话'
},
{
type: 'input',
name: 'nickName',
label: '企微名称'
},
{
type: 'input',
name: 'customerName',
label: '客户名称'
},
{
type: 'select',
name: 'isJoin',
label: '是否加企微',
optionId: 'value',
optionLabel: 'label',
placeholder: '请选择',
optionList: [
{
value: '',
label: '全部'
},
{
value: '1',
label: '是'
},
{
value: '0',
label: '否'
}
]
}
],
crowdForm: {},
id: this.$route.params.id ? this.$route.params.id : '',
crowdType: this.$route.params.crowdType ? this.$route.params.crowdType : '',
......@@ -67,48 +131,62 @@ export default {
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName',
minWidth: '120'
minWidth: 150
},
{
label: '企微名称',
prop: 'nickNameList',
addHtml: 'nickNameList',
minWidth: 200
minWidth: 220
},
{
label: '联系电话',
prop: 'customerPhone',
minWidth: '110'
minWidth: 130
},
{
label: '车牌号',
prop: 'carNumber'
prop: 'carNumber',
minWidth: 120
},
{
label: '车架号(后6位)',
label: '车架号',
prop: 'carVin',
minWidth: '110'
minWidth: 140,
line:1
},
{
label: '车系',
prop: 'audi',
line: 2
minWidth: 170
},
{
label: '跟进员工',
prop: 'followStaff',
// addHtml: 'followStaff',
minWidth: 140
minWidth: 170
},
{
label: '是否加企微', //1. 加入,0.未加入
prop: 'isJoinName',
width: 100
width: 130
},
{
label: '购车时间',
prop: 'buyDate',
width: 130
},
{
label: '添加时间',
prop: 'addTime',
width: 150
width: 130
},
{
label: '操作',
prop: 'optionBtns',
width: '62px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
......@@ -120,21 +198,55 @@ export default {
let { id } = this
this.init(id)
},
computed: {
describe() {
let id = this.id - 1
return this.describeData[id]
}
mounted() {
this.getStaffList()
},
methods: {
//获取跟进员工
getStaffList() {
getStaffList({}).then(res => {
if (res.length == 0) {
return ''
}
const id = this.tagsPartFormList.findIndex(item => {
return item.name == 'followStaff'
})
const staff = res.map(item => {
return {
label: item.staffName,
value: item.staffName
}
})
staff.unshift({ label: '全部', value: '' })
this.$nextTick(() => {
this.tagsPartFormList[id].optionList = staff
})
console.log(this.tagsPartFormList[id])
})
},
handleSearch() {
this.$refs.groupRef.refreshTable()
},
handleReset() {
this.tableSearchForm = {
crowdId: this.id
}
this.$refs.groupRef.refreshTable()
},
init(id) {
this.tableSearchForm = {
crowdId: id
}
// 通过人群Id查询人群详情
this.getCrowdDetails()
if (this.crowdType) {
this.getCrowdDetails()
}
// this.getTotalCount()
},
goDetail(scope) {
this.$router.push('/clientManage/clientDetail?id=' + scope.oneId)
},
getCrowdDetails() {
let params = {
'req.crowdId': this.id
......@@ -173,7 +285,6 @@ export default {
@import '@/styles/variables.scss';
.expandImg {
display: flex;
justify-content: center;
.smallFontSize {
margin-left: 2px;
height: 20px;
......@@ -250,14 +361,8 @@ export default {
line-height: 20px;
}
.export {
width: 74px;
height: 32px;
box-sizing: border-box;
// font-weight: 400;
padding: 6px 23px;
// background: #ffffff;
// border-radius: 4px;
// border: 1px solid rgba(105, 105, 105, 0.3);
color: #5850ff;
border: 1px solid #5850ff;
}
}
}
......
......@@ -187,7 +187,6 @@ export default {
position: relative;
height: 20px;
font-size: 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 700;
color: #333333;
line-height: 20px;
......@@ -284,7 +283,6 @@ export default {
top: 365px;
height: 20px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 20px;
......@@ -296,7 +294,6 @@ export default {
right: 57px;
top: 389px;
font-size: 18px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #fe9c1c;
line-height: 25px;
......
......@@ -7,7 +7,7 @@
<button class="backBtn" @click="goBack">返回客户群管理</button>
</div>
<div class="content">
<div class="leftWrap">
<div class="leftWrap" :style="{ height: heightBox + 'px' }">
<div class="avator">
<img src="@/assets/clientDetail/defaultAvator.png" alt="" />
</div>
......@@ -42,26 +42,30 @@
</el-tooltip>
</p>
</div>
<div class="rightWrap">
<div class="choseRow">
<div class="choseItem" :class="{ activeItem: currentIndex == index }" v-for="(item, index) in titles" :key="index" @click="tabClick(index)">
<span>
{{ item.name }}
<template>({{ item.personNum || 0 }})个</template>
</span>
<div class="rightWrap" :style="{ 'min-height': heightBox + 'px' }">
<div class="rightWrapBtn" style="display: flex">
<div class="choseRow">
<div class="choseItem" :class="{ activeItem: currentIndex == index }" v-for="(item, index) in titles" :key="index" @click="tabClick(index)">
<span>
{{ item.name }}
<template>({{ item.personNum || 0 }})个</template>
</span>
</div>
<el-button style="border: 1px solid #5850ff; color: #5850ff; right: 0px; position: absolute;background:none;" size="small" @click="handleExport(currentIndex)">导出</el-button>
</div>
</div>
<template v-if="currentIndex == 0">
<client ref="childComp" :url="url" @goDetail="goDetail" ></client>
<client ref="childCompClient" :url="url" @goDetail="goDetail"></client>
</template>
<template v-if="currentIndex == 1">
<follow-employee ref="childComp" :url="url" ></follow-employee>
<follow-employee ref="childCompFollow" :url="url"></follow-employee>
</template>
<template v-if="currentIndex == 2">
<leave-group-client ref="childComp" :url="url" @goDetail="goDetail"></leave-group-client>
<leave-group-client ref="childCompLeave" :url="url" @goDetail="goDetail"></leave-group-client>
</template>
<template v-if="currentIndex == 3">
<potential-client ref="childComp" :url="url"></potential-client>
<potential-client ref="childCompPotential" :url="url"></potential-client>
</template>
<basic-dialog title="" width="547px" :isVisible="dialogVisible" btnOkLabel="我知道了" :isHasCancelBtn="false" @confirmDialog="handleConfirm" @closeDialog="handleClose">
......@@ -121,6 +125,8 @@ export default {
},
created() {
this.getTableDetail()
let clientHeight = document.documentElement.clientHeight
this.heightBox = clientHeight - 175
},
// watch: {
......@@ -143,20 +149,31 @@ export default {
// this.$set(this.titles[0], 'personNum', num)
// }
// },
handleExport(currentIndex) {
if (currentIndex == 0) {
this.$refs.childCompClient.handleExport()
} else if (currentIndex == 1) {
this.$refs.childCompFollow.handleExport()
} else if (currentIndex == 2) {
this.$refs.childCompLeave.handleExport()
} else {
this.$refs.childCompPotential.handleExport()
}
},
tabClick(index) {
this.currentIndex = index
},
async getTableDetail(id = this.$route.query.id) {
const res = await getTableDetail({ id: id,pageNum:1,pageSize:10 })
const res = await getTableDetail({ id: id, pageNum: 1, pageSize: 10 })
console.log('获取客户群数据', res)
if (!res) {
return false
}
this.leftPanelList = res
this.$set(this.titles[0], 'personNum', res.allCount)
this.$set(this.titles[1], 'personNum', res.staffCount)
this.$set(this.titles[2], 'personNum', res.quitCount)
this.$set(this.titles[3], 'personNum', res.potentialCount)
this.$set(this.titles[0], 'personNum', res.allCount)
this.$set(this.titles[1], 'personNum', res.staffCount)
this.$set(this.titles[2], 'personNum', res.quitCount)
this.$set(this.titles[3], 'personNum', res.potentialCount)
},
goBack() {
......@@ -235,7 +252,7 @@ export default {
.leftWrap {
width: 240px;
// height: 877px;
min-height: 270px; //calc(100vh - 92px);
min-height: 370px; //calc(100vh - 92px);
background-color: #fff;
box-sizing: border-box;
.avator {
......@@ -284,40 +301,43 @@ export default {
background-color: #fff;
padding: 20px;
padding-top: 50px;
.choseRow {
position: absolute;
width: 100%;
left: 0;
top: 0;
.rightWrapBtn {
display: flex;
background-color: $bgColor;
z-index: 10;
.choseItem {
height: 40px;
line-height: 40px;
width: 180px;
box-sizing: border-box;
background: #ffffff;
text-align: center;
border: 1px solid #eeedff;
cursor: pointer;
&:first-child {
border-left: 0;
}
span {
font-weight: 400;
font-size: 14px;
color: #37383a;
.choseRow {
position: absolute;
width: 100%;
left: 0;
top: 0;
display: flex;
background-color: $bgColor;
z-index: 10;
.choseItem {
height: 40px;
line-height: 40px;
width: 180px;
box-sizing: border-box;
background: #ffffff;
text-align: center;
border: 1px solid #eeedff;
cursor: pointer;
&:first-child {
border-left: 0;
}
span {
font-weight: 400;
font-size: 14px;
color: #37383a;
}
}
}
.activeItem {
border-radius: 4px 4px 0 0;
span {
color: $btnBlue;
font-weight: 600;
.activeItem {
border-radius: 4px 4px 0 0;
span {
color: $btnBlue;
font-weight: 600;
}
box-sizing: border-box;
border-bottom: 0 !important;
}
box-sizing: border-box;
border-bottom: 0 !important;
}
}
......@@ -344,7 +364,7 @@ export default {
}
}
}
/deep/ .el-dialog__header {
/deep/ .el-dialog__header {
border: 0;
}
/deep/ .el-dialog__body {
......
......@@ -60,8 +60,6 @@
<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>
</el-tooltip>
<span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : scope.scope.type == null ? '' :''}}</span>
</span>
<span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
......
<template>
<div class="sub-container">
<search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<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="handleExport">导出</el-button>
</span>
</search-form>
<GLCombiForm class="sub-form-style" :formObj="searchForm" :formData="clientGroupFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 -->
<!-- <div class="leadList">
<div>
<span></span>
</div>
<el-button size="small" @click="handleExport">导出</el-button>
</div> -->
<GLTable ref="clientGroupDetail" @setTableFinishFun="setTableFinishFun" :hasNum="true" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span slot="customerName" class="flex-center" slot-scope="scope">
<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>
</el-tooltip>
<span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : scope.scope.type == null ? '' :''}}</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 == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
......@@ -31,7 +28,7 @@
</template>
<script>
import { getDetailTableList,clientExportApi } from '@/api/modules/clientGroupManage'
import { getDetailTableList, clientExportApi } from '@/api/modules/clientGroupManage'
export default {
props: {
url: {
......@@ -45,9 +42,10 @@ export default {
searchFormTable: {},
clientGroupFormList: [
{
type: 'daterange',
prop: 'daterange',
type: 'datePicker',
name: 'daterange',
label: '入群时间',
valueFormat: 'yyyy-MM-dd',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
......@@ -56,10 +54,12 @@ export default {
},
{
type: 'select',
prop: 'customerSex',
name: 'customerSex',
label: '性别',
optionLabel: 'label',
optionId: 'value',
placeholder: '请选择性别',
options: [
optionList: [
{
label: '全部',
value: null
......@@ -81,14 +81,14 @@ export default {
{
type: 'input',
inputType: 'text',
prop: 'groupNickName',
name: 'groupNickName',
label: '本群昵称',
placeholder: '请输入本群昵称'
},
{
type: 'input',
inputType: 'text',
prop: 'customerName',
name: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
}
......@@ -101,7 +101,7 @@ export default {
{
label: '本群昵称',
prop: 'groupNickName',
minWidth:120
minWidth: 120
},
{
label: '客户名称',
......@@ -112,7 +112,7 @@ export default {
{
label: '手机号码',
prop: 'customerPhone',
minWidth:120
minWidth: 120
},
{
label: '性别',
......@@ -123,21 +123,21 @@ export default {
label: '入群方式',
prop: 'joinScene',
addHtml: 'joinScene',
minWidth:120
minWidth: 150
},
{
label: '邀请人',
prop: 'invitorName',
minWidth:120
minWidth: 120
},
{
label: '入群时间',
prop: 'joinTime',
width: 140
width: 170
}
],
tableOption: {
width: 80,
width: 62,
btnList: [
{
name: '详情',
......@@ -156,10 +156,10 @@ export default {
}
},
methods: {
getParams(){
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
......@@ -199,7 +199,7 @@ export default {
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
},
//导出
handleExport(){
handleExport() {
var params = this.getParams()
clientExportApi(params).then(res => {
this.$Utils.exportFn(res)
......@@ -221,9 +221,26 @@ export default {
}
</script>
<style lang="scss" scope>
<style lang="scss" scoped>
.sub-container {
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
.leadList {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
div {
text-align: center;
span:nth-child(1) {
font-weight: 600;
font-size: 16px;
}
}
/deep/ .el-button {
color: #5850ff;
border: 1px solid #5850ff;
}
}
}
</style>
\ No newline at end of file
</style>
<template>
<div class="sub-container">
<search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<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="handleExport">导出</el-button>
</span>
</search-form>
<GLCombiForm class="sub-form-style" :formObj="searchForm" :formData="clientGroupFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<!-- <div class="leadList">
<div>
<span></span>
</div>
<el-button size="small" @click="handleExport">导出</el-button>
</div> -->
<GLTable ref="clientGroupDetail" @setTableFinishFun="setTableFinishFun" :hasNum="true" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
</span>
......@@ -23,7 +22,7 @@
</template>
<script>
import { getDetailStaffTableList,followEmployeeExportApi } from '@/api/modules/clientGroupManage'
import { getDetailStaffTableList, followEmployeeExportApi } from '@/api/modules/clientGroupManage'
export default {
props: {
url: {
......@@ -37,9 +36,10 @@ export default {
searchFormTable: {},
clientGroupFormList: [
{
type: 'daterange',
prop: 'daterange',
type: 'datePicker',
name: 'daterange',
label: '入群时间',
valueFormat: 'yyyy-MM-dd',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
......@@ -48,10 +48,12 @@ export default {
},
{
type: 'select',
prop: 'customerSex',
name: 'customerSex',
label: '性别',
optionLabel: 'label',
optionId: 'value',
placeholder: '请选择性别',
options: [
optionList: [
{
label: '全部',
value: null
......@@ -73,14 +75,14 @@ export default {
{
type: 'input',
inputType: 'text',
prop: 'groupNickName',
name: 'groupNickName',
label: '本群昵称',
placeholder: '请输入本群昵称'
},
{
type: 'input',
inputType: 'text',
prop: 'customerName',
name: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
}
......@@ -94,18 +96,17 @@ export default {
{
label: '本群昵称',
prop: 'groupNickName',
minWidth:120
minWidth: 120
},
{
label: '员工名称',
prop: 'staffName',
minWidth: 150
},
{
label: '手机号码',
prop: 'customerPhone',
minWidth:120
minWidth: 120
},
{
label: '性别',
......@@ -116,20 +117,19 @@ export default {
label: '入群方式',
prop: 'joinScene',
addHtml: 'joinScene',
minWidth:120
minWidth: 150
},
{
label: '邀请人',
prop: 'invitorName',
minWidth:120
minWidth: 120
},
{
label: '入群时间',
prop: 'joinTime',
width: 140
width: 170
}
]
},
getListApi: getDetailStaffTableList,
clientTableDataNum: 0
......@@ -141,10 +141,10 @@ export default {
}
},
methods: {
getParams(){
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
......@@ -164,7 +164,7 @@ export default {
// }
// resolve()
// })
return new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve()
})
......@@ -183,8 +183,8 @@ export default {
// }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
},
//导出
handleExport(){
//导出
handleExport() {
var params = this.getParams()
followEmployeeExportApi(params).then(res => {
this.$Utils.exportFn(res)
......@@ -206,9 +206,33 @@ export default {
}
</script>
<style lang="scss" scope>
<style lang="scss" scoped>
.sub-container {
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
.leadList {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
div {
text-align: center;
span:nth-child(1) {
font-weight: 600;
font-size: 16px;
}
}
/deep/ .el-button {
color: #5850ff;
border: 1px solid #5850ff;
}
}
// /deep/.sub-form-style {
// @media screen and (min-width: 1440px) and (max-width: 1720px) {
// .glsx-combi-form .el-form-item--small {
// width: 50%;
// }
// }
// }
}
</style>
\ No newline at end of file
</style>
<template>
<div class="sub-container">
<search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<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="handleExport">导出</el-button>
</span>
</search-form>
<GLCombiForm class="sub-form-style" :formObj="searchForm" :formData="clientGroupFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<!-- <div class="leadList">
<div>
<span></span>
</div>
<el-button size="small" @click="handleExport">导出</el-button>
</div> -->
<GLTable ref="clientGroupDetail" @setTableFinishFun="setTableFinishFun" :hasNum="true" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span slot="customerName" class="flex-center" 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>
</el-tooltip>
<span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : scope.scope.type == null ? '' :''}} </span>
</span>
<span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
......@@ -29,7 +27,7 @@
</template>
<script>
import { getDetailQuitTableList,leaveGroupExportApi } from '@/api/modules/clientGroupManage'
import { getDetailQuitTableList, leaveGroupExportApi } from '@/api/modules/clientGroupManage'
export default {
props: {
url: {
......@@ -43,9 +41,10 @@ export default {
searchFormTable: {},
clientGroupFormList: [
{
type: 'daterange',
prop: 'daterange',
type: 'datePicker',
name: 'daterange',
label: '入群时间',
valueFormat: 'yyyy-MM-dd',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
......@@ -54,10 +53,12 @@ export default {
},
{
type: 'select',
prop: 'customerSex',
name: 'customerSex',
label: '性别',
placeholder: '请选择性别',
options: [
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: null
......@@ -79,14 +80,14 @@ export default {
{
type: 'input',
inputType: 'text',
prop: 'groupNickName',
name: 'groupNickName',
label: '本群昵称',
placeholder: '请输入本群昵称'
},
{
type: 'input',
inputType: 'text',
prop: 'customerName',
name: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
}
......@@ -98,7 +99,7 @@ export default {
{
label: '本群昵称',
prop: 'groupNickName',
minWidth:120
minWidth: 120
},
{
label: '客户名称',
......@@ -109,7 +110,7 @@ export default {
{
label: '手机号码',
prop: 'customerPhone',
minWidth:120
minWidth: 120
},
{
label: '性别',
......@@ -120,21 +121,21 @@ export default {
label: '入群方式',
prop: 'joinScene',
addHtml: 'joinScene',
minWidth:120
minWidth: 140
},
{
label: '邀请人',
prop: 'invitorName',
minWidth:120
minWidth: 120
},
{
label: '入群时间',
prop: 'joinTime',
width: 140
width: 170
}
],
tableOption: {
width: 80,
width: 60,
btnList: [
{
name: '详情',
......@@ -153,10 +154,10 @@ export default {
}
},
methods: {
getParams(){
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
......@@ -176,7 +177,7 @@ export default {
// }
// resolve()
// })
return new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve()
})
......@@ -194,8 +195,8 @@ export default {
// }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
},
//导出
handleExport(){
//导出
handleExport() {
var params = this.getParams()
leaveGroupExportApi(params).then(res => {
this.$Utils.exportFn(res)
......@@ -217,9 +218,33 @@ export default {
}
</script>
<style lang="scss" scope>
<style lang="scss" scoped>
.sub-container {
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
.leadList {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
div {
text-align: center;
span:nth-child(1) {
font-weight: 600;
font-size: 16px;
}
}
/deep/ .el-button {
color: #5850ff;
border: 1px solid #5850ff;
}
}
// /deep/ .sub-form-style {
// @media screen and (min-width: 1440px) and (max-width: 1720px) {
// .glsx-combi-form .el-form-item--small {
// width: 50%;
// }
// }
// }
}
</style>
\ No newline at end of file
</style>
<template>
<div class="sub-container">
<search-form class="searchTop border-shadow" :isHasSyncBtn="true" :isThreeRowShow="true" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<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="handleExport">导出</el-button>
</span>
</search-form>
<GLCombiForm :formObj="searchForm" :formData="clientGroupFormList" @handleOk="searchTable" @handleRest="resetTable">n></GLCombiForm>
<!-- <div class="leadList">
<div>
<span></span>
</div>
<el-button size="small" @click="handleExport">导出</el-button>
</div> -->
<!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 -->
<GLTable ref="clientGroupDetail" @setTableFinishFun="setTableFinishFun" :hasNum="true" :pageConf="pageConf" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span slot="customerName" class="flex-center" 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>
</el-tooltip>
<span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : scope.scope.type == null ? '' :''}} </span>
</span>
<span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
......@@ -30,7 +28,7 @@
</template>
<script>
import { getDetailPotentialTableList,potentialClientExportApi } from '@/api/modules/clientGroupManage'
import { getDetailPotentialTableList, potentialClientExportApi } from '@/api/modules/clientGroupManage'
export default {
props: {
url: {
......@@ -44,9 +42,10 @@ export default {
searchFormTable: {},
clientGroupFormList: [
{
type: 'daterange',
prop: 'daterange',
type: 'datePicker',
name: 'daterange',
label: '入群时间',
valueFormat: 'yyyy-MM-dd',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
......@@ -80,7 +79,7 @@ export default {
{
type: 'input',
inputType: 'text',
prop: 'groupNickName',
name: 'groupNickName',
label: '本群昵称',
placeholder: '请输入本群昵称'
}
......@@ -115,9 +114,9 @@ export default {
{
label: '入群时间',
prop: 'joinTime',
width: 140
width: 170
}
],
]
// tableOption: {
// width: 80,
// btnList: [
......@@ -138,10 +137,10 @@ export default {
}
},
methods: {
getParams(){
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
......@@ -161,7 +160,7 @@ export default {
// }
// resolve()
// })
return new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve()
})
......@@ -179,8 +178,8 @@ export default {
// }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
},
//导出
handleExport(){
//导出
handleExport() {
var params = this.getParams()
potentialClientExportApi(params).then(res => {
this.$Utils.exportFn(res)
......@@ -202,9 +201,26 @@ export default {
}
</script>
<style lang="scss" scope>
<style lang="scss" scoped>
.sub-container {
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
.leadList {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
div {
text-align: center;
span:nth-child(1) {
font-weight: 600;
font-size: 16px;
}
}
/deep/ .el-button {
color: #5850ff;
border: 1px solid #5850ff;
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -2,27 +2,29 @@
<div>
<div class="scrm-sub-client-container">
<!-- <p class="pageTitle">客户群管理</p> -->
<!-- :style="{ 'min-height': heightBox + 'px' }" -->
<div class="pageContent">
<search-form class="searchTop border-shadow" :isHasSyncBtn="true" :showDefaultTime="false" :merchantModel="merchantModel" :accountLevel="accountLevel" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent" @resetTable="resetTable" @searchTable="searchTable" @handleExport="handleExport" @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="handleExport">导出</el-button>
<!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)"允许所有人同步 -->
<!-- <el-button type="primary" @click="syncClick" :loading="sloading">同步数据</el-button> -->
</span>
</search-form>
<GLCombiForm :formObj="searchForm" :formData="clientGroupFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<div class="leadList">
<div>
<span></span>
</div>
<GLButton size="small" @click="handleExport" class="export" fn="导出">导出</GLButton>
</div>
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="clientGroupManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :searchForm="searchFormTable" :tableParams="tableParams">
<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>
<span slot="delFlag" slot-scope="scope">
<span :class="{ circleStatusGreen: scope.scope.delFlag == 0, circleStatusGray: scope.scope.delFlag == -1 }"></span>
{{ scope.scope.delFlag == -1 ? '已解散' : scope.scope.delFlag == 0 ? '正常' : '' }}
</span>
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <auth-button :data="scope.scope"></auth-button> -->
<span @click="goDetail(scope.scope.id, scope.scope.custGroupName)" class="blue-text">
{{scope.scope.delFlag == '0' ? '详情' : scope.scope.delFlag == '-1' ? '' : ''}}
</span>
{{ scope.scope.delFlag == '0' ? '详情' : scope.scope.delFlag == '-1' ? '' : '' }}
</span>
<!-- <GLButton @click="goDetail(scope.scope.id, scope.scope.custGroupName)" fn="客户群详情" type="text">详情</GLButton> -->
</template>
</GLTable>
......@@ -42,15 +44,14 @@ export default {
isReload: true,
url: url,
sloading: false,
searchForm: {
},
searchForm: {},
searchFormTable: {},
clientGroupFormList: [
{
type: 'daterange',
prop: 'daterange',
type: 'datePicker',
name: 'daterange',
label: '创建时间',
valueFormat: 'yyyy-MM-dd',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
......@@ -60,30 +61,32 @@ export default {
{
type: 'input',
inputType: 'text',
prop: 'custGroupName',
name: 'custGroupName',
label: '群聊名称',
placeholder: '请输入群聊名称'
},
{
type: 'input',
inputType: 'text',
prop: 'groupHostName',
name: 'groupHostName',
label: '群主',
placeholder: '请输入群主'
},
{
type: 'input',
inputType: 'text',
prop: 'groupAdminName',
name: 'groupAdminName',
label: '管理员',
placeholder: '请输入管理员'
},
{
type: 'select',
prop: 'creationMethod',
name: 'creationMethod',
label: '创建方式',
placeholder: '请选择',
options: [
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: null
......@@ -100,10 +103,12 @@ export default {
},
{
type: 'select',
prop: 'delFlag',
name: 'delFlag',
label: '群聊状态',
placeholder: '请选择',
options: [
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: null
......@@ -127,6 +132,7 @@ export default {
{
label: '群聊名称',
prop: 'custGroupName',
line: 1,
minWidth: 160
},
{
......@@ -137,17 +143,17 @@ export default {
{
label: '当前客户数',
prop: 'totalCount',
minWidth: 100
minWidth: 110
},
{
label: '当日新增入群客户数',
prop: 'newCustomerCount',
minWidth: 150
minWidth: 170
},
{
label: '当日新增退群客户数',
prop: 'delCustomerCount',
minWidth: 150
minWidth: 170
},
{
label: '当前跟进员工数',
......@@ -156,11 +162,13 @@ export default {
},
{
label: '群主',
prop: 'groupHostName'
prop: 'groupHostName',
minWidth: 130
},
{
label: '管理员',
prop: 'groupAdminName'
prop: 'groupAdminName',
minWidth: 100
},
{
label: '创建方式',
......@@ -173,19 +181,17 @@ export default {
{
label: '群聊状态',
prop: 'delFlag',
width: 95,
formatter: cellValue => {
return cellValue.delFlag == 0 ? '正常' : cellValue.delFlag == -1 ? '已解散' : ''
},
width: 120,
addHtml: 'delFlag'
},
{
label: '创建时间',
prop: 'addTime',
width: 140
width: 180
}
],
tableOption: {
width: 170
width: 80
// btnList: [
// {
// name: '详情',
......@@ -209,6 +215,8 @@ export default {
//运行在qiankun容器中
this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel
// let clientHeight = document.documentElement.clientHeight
// this.heightBox = clientHeight - 135
}
},
// watch: {
......@@ -222,10 +230,10 @@ export default {
// }
// }
// },
beforeDestroy() {
deactivated() {
this.$message.closeAll()
},
mounted() {
activated() {
this.wxTips()
},
methods: {
......@@ -243,7 +251,7 @@ export default {
getStatus({}).then(res => {
if (res.status != 'SUCCESS') {
const h = this.$createElement
this.$message({
this.messageTips = this.$message({
showClose: true,
duration: 0,
message: h('p', null, [h('span', null, '此功能需完成【企业微信授权】后方可使用! '), h('span', { on: { click: this.jumpWx }, style: { marginRight: '150px', cursor: 'pointer', color: '#5850ff' } }, ['企业微信授权 ', h('i', { class: 'el-icon-d-arrow-right' }, '')])])
......@@ -307,7 +315,7 @@ export default {
} else {
if (params.beginTime) delete params.beginTime && delete params.endTime
}
console.log('params',params)
console.log('params', params)
delete params.daterange
return params
},
......@@ -363,13 +371,30 @@ export default {
letter-spacing: 1px;
}
.pageContent {
.leadList {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
div {
text-align: center;
span:nth-child(1) {
font-weight: 600;
font-size: 16px;
}
}
/deep/ .el-button {
color: #5850ff;
border: 1px solid #5850ff;
}
}
.glsx-table {
/deep/ .el-table__fixed,
/deep/ .el-table__fixed-right {
height: 100% !important; //设置高优先,以覆盖内联样式
}
}
padding: 6px 20px 30px;
padding: 20px 20px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// min-width: 1300px;
background-color: #fff;
......
......@@ -217,7 +217,10 @@ export default {
label: '标签组类型',
prop: 'groupType',
width: 180,
align: 'left'
align: 'left',
formatter: cellValue => {
return cellValue.groupType == '企业标签' && this.$globalState.session.merchantModel == 1 ? '集团标签' : cellValue.groupType
}
},
{
label: '标签',
......@@ -335,16 +338,21 @@ export default {
this.$apis.crowdManage
.addCrowd(params)
.then(res => {
if (res) {
if (res.data.code == 0) {
this.$message({
type: 'success',
message: '操作成功!'
})
this.$router.push('/crowdManage/index')
this.$router.push({
path: '/crowdManage/index',
query: {
selectTab: 1
}
})
} else {
this.$message({
type: 'error',
message: '操作失败'
message: res.data.message
})
}
})
......@@ -656,7 +664,7 @@ export default {
}
},
destroyed() {
window.removeEventListener('scroll', this.initHeight)
window.removeEventListener('scroll', this.initHeight, true)
}
}
</script>
......@@ -666,8 +674,7 @@ export default {
.container {
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
height: calc(100vh - 164px);
overflow-y: auto;
margin-bottom: 80px;
// padding: 20px;
.title {
......@@ -895,7 +902,7 @@ export default {
width: 100%;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
z-index:999;
z-index: 999;
.el-button:nth-child(2) {
margin-left: 20px;
}
......
......@@ -46,7 +46,7 @@
</div>
<div class="footer-panel">
<div>
<el-button type="primary" @click="$router.go(-1)">返回</el-button>
<el-button type="primary" @click="goBack">返回</el-button>
</div>
</div>
<el-dialog title="人群规则说明" class="crowd-dialog" width="720px" :before-close="handleClose" :visible.sync="dialogRuleVisible" :show-close="isShowCloseBtn">
......@@ -127,6 +127,9 @@ export default {
label: '标签组类型',
prop: 'groupType',
width: 180,
formatter: cellValue => {
return cellValue.groupType == '企业标签' && this.$globalState.session.merchantModel == 1 ? '集团标签' : cellValue.groupType
},
align: 'left'
},
{
......@@ -150,6 +153,14 @@ export default {
},
mounted() {},
methods: {
goBack() {
this.$router.push({
path: '/crowdManage/index',
query: {
selectTab: 1
}
})
},
//获取标签数据
getCrowdDetails() {
let params = {
......
......@@ -10,13 +10,13 @@
</el-tab-pane>
</el-tabs>
<div class="pageContent">
<search-form class="searchTop border-shadow" :formModel="searchForm" :formList="tagsPartFormList" @setTableHeightEvent="setTableHeightEvent">
<search-form class="searchTop border-shadow" :formModel="searchForm" :formList="tagsPartFormList">
<span class="inline-b" slot="form-slot">
<!-- <el-button @click="resetTable" plain>重置</el-button> -->
<el-button class="searchBtn" type="primary" @click="searchTable">查询</el-button>
</span>
</search-form>
<GLTable class="crowdTable" @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="crowdManage" :hasNum="false" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams" :headerStyle="{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }">
<GLTable class="crowdTable" @setTableHeightEvent="setTableHeightEvent" @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="crowdManage" :hasNum="false" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams">
<span slot="crowdName" slot-scope="scope">
<span class="line-ellipsis">{{ scope.scope.crowdName.slice(0, 24) }}</span>
</span>
......@@ -66,15 +66,16 @@ export default {
label: '人群名称',
prop: 'crowdName',
addHtml: 'crowdName',
align: 'left'
align: 'left',
minWidth: 160
// width: 431
},
{
label: '人群描述',
prop: 'crowdDesc',
addHtml: 'crowdDesc',
align: 'left'
// width: 431
align: 'left',
minWidth: 160
},
{
label: '人数',
......@@ -107,17 +108,7 @@ export default {
}
this.searchForm = { 'req.merchantId': this.merchantId, 'req.crowdType': this.crowdType }
},
mounted() {
//没数据的时候要算高度
setTimeout(() => {
// if (!this.$refs.crowdManage.data.length) {
this.loading = true
this.$refs.crowdManage.setTableHeightFun()
this.loading = false
// }
}, 200)
},
mounted() {},
methods: {
btnClick(type, data) {
if (type == 'detail') {
......@@ -131,17 +122,23 @@ export default {
addClick() {
this.$router.push('/crowdManage/crowdAdd')
},
setTableHeightEvent() {
this.$refs.clientGroupDetail.setTableHeightFun()
setTableFinishFun() {
console.log(this.$refs.crowdManage.data.length)
if (!this.$refs.crowdManage.data.length) {
this.$nextTick(() => this.$refs.crowdManage.setTableHeightFun())
} else {
this.$refs.crowdManage.tableHeightValues = ''
}
},
handleClick() {
this.searchForm = { 'req.keyword': '' }
this.searchTable()
setTimeout(() => {
this.$refs.crowdManage.setTableHeightFun()
}, 200)
},
beforeSearchFn() {
if (this.$route.query.selectTab) {
this.activeName = 'second'
// window.history.pushState(null, null, location.origin + location.pathname)
}
return new Promise(resolve => {
const crowdType = this.activeName == 'first' ? 1 : 2
this.searchForm = Object.assign(this.searchForm, { 'req.merchantId': this.merchantId, 'req.crowdType': crowdType })
......
......@@ -10,20 +10,7 @@
</el-form-item>
</el-form>
<div class="table-box">
<GLTable
:key="key"
v-if="dialogVisible"
ref="followTable"
:layout="layout"
:tableData="tableData"
:hasNum="false"
:tableTotal="tableTotal"
:pageConf="pageConf"
:tableParams="tableParams"
@refreshTable="handleSearch"
@selectionTable="selectionTable"
@row-click="rowClick"
></GLTable>
<GLTable :key="key" v-if="dialogVisible" ref="followTable" :layout="layout" :tableData="tableData" :hasNum="false" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams" @refreshTable="handleSearch" @selectionTable="selectionTable" @row-click="rowClick"></GLTable>
<div class="form-tips">必须配置至少1个跟进专员</div>
</div>
<span slot="footer" class="dialog-footer">
......@@ -153,7 +140,7 @@ export default {
}, 300)
}
}
</script>
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
......@@ -189,4 +176,4 @@ export default {
.table-box {
position: relative;
}
</style>
\ No newline at end of file
</style>
......@@ -222,15 +222,15 @@ export default {
height: 32px;
line-height: 32px;
}
::-webkit-scrollbar {
/*滚动条整体样式*/
width: 6px;
height: 4px;
}
// ::-webkit-scrollbar {
// /*滚动条整体样式*/
// width: 6px;
// height: 4px;
// }
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 4px;
background-color: rgba(144, 147, 153, 0.3);
}
// ::-webkit-scrollbar-thumb {
// /*滚动条里面小方块*/
// border-radius: 4px;
// background-color: rgba(144, 147, 153, 0.3);
// }
</style>
......@@ -11,15 +11,13 @@
<img src="@/assets/guestCustom/chat-logo.png" alt />
</div>
<div class="group-name-info">
<div>{{groupInfo.groupName}}</div>
<div
class="group-name-info-count"
>{{groupInfo.userList ? groupInfo.userList.length : 0}}人</div>
<div>{{ groupInfo.groupName }}</div>
<div class="group-name-info-count">{{ groupInfo.userList ? groupInfo.userList.length : 0 }}人</div>
</div>
</div>
<div class="text-info">
已建群数量:
<span class="group-number">{{groupInfo.groupCount}}</span>
<span class="group-number">{{ groupInfo.groupCount }}</span>
</div>
</div>
</div>
......@@ -40,12 +38,7 @@
<el-popover placement="top" width="600" trigger="hover">
<span slot="reference">...({{ followList.length }})</span>
<div class="entmicro-hover">
<el-tag
type="info"
v-for="(i, index) in followList"
:key="index"
:disable-transitions="false"
>
<el-tag type="info" v-for="(i, index) in followList" :key="index" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }}
</el-tag>
......@@ -67,12 +60,7 @@
<el-popover placement="top" width="600" trigger="hover">
<span slot="reference">...({{ memberList.length }})</span>
<div class="entmicro-hover">
<el-tag
type="info"
v-for="(i, index) in memberList"
:key="index"
:disable-transitions="false"
>
<el-tag type="info" v-for="(i, index) in memberList" :key="index" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }}
</el-tag>
......@@ -92,20 +80,9 @@
<i class="el-icon-refresh"></i>
更新数据
</div>
<div class="text-info">更新于:{{currentTime}}</div>
<div class="text-info">更新于:{{ currentTime }}</div>
</div>
<GLTable
class="table"
:searchForm="searchForm"
ref="groupDetail"
:hasNum="false"
:getListApi="getListApi"
:beforeSearchFn="beforeSearchFn"
:noDataImg="url"
:pageConf="pageConf"
:tableParams="tableParams"
:tableData="tableData"
>
<GLTable class="table" :searchForm="searchForm" ref="groupDetail" :hasNum="false" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :tableParams="tableParams" :tableData="tableData">
<span slot="customerName" slot-scope="scope">
<div class="">
<!-- <div class="customer-img">
......@@ -113,9 +90,7 @@
</div>-->
<div class="customer-name">
{{ scope.scope.customerName }}
<label
class="origin"
>{{ WECHANT_TYPE[scope.scope.type]}}</label>
<label class="origin">{{ WECHANT_TYPE[scope.scope.type] }}</label>
</div>
</div>
</span>
......@@ -135,10 +110,7 @@
class="statusText"
v-if="scope.scope.delFlag == '0'"
>使用</span> -->
<span
class="statusText"
:class="{ 'red-text': scope.scope.delFlag == '-1' }"
>{{ scope.scope.delFlag == '0' ? '使用' : scope.scope.delFlag == '-1' ? '解散于' : '' }}</span>
<span class="statusText" :class="{ 'red-text': scope.scope.delFlag == '-1' }">{{ scope.scope.delFlag == '0' ? '使用' : scope.scope.delFlag == '-1' ? '解散于' : '' }}</span>
<span v-if="scope.scope.delFlag == '-1'" class="gray-text">{{ scope.scope.disMiss }}</span>
</span>
</GLTable>
......@@ -198,32 +170,32 @@ export default {
{
label: '客户',
prop: 'customerName',
addHtml: 'customerName',
addHtml: 'customerName'
//align: 'left'
// width: 200
},
{
label: '创建时间',
prop: 'createdTime',
prop: 'createdTime'
//align: 'left'
// width: 200
},
{
label: '现群名称',
prop: 'chatName',
prop: 'chatName'
//align: 'left'
},
{
label: '现群主',
prop: 'createdBy',
// minWidth: '180px',
addHtml: 'groupOwner',
addHtml: 'groupOwner'
//align: 'left'
},
{
label: '状态',
prop: 'status',
addHtml: 'status',
addHtml: 'status'
// width: 250,
//align: 'left'
}
......@@ -607,7 +579,6 @@ export default {
height: 100%;
}
}
}
}
.entmicro {
......@@ -654,4 +625,4 @@ i {
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
</style>
\ No newline at end of file
</style>
......@@ -9,53 +9,24 @@
</div>
<div class="container">
<search-form
class="searchTop border-shadow"
:formModel="searchForm"
:formList="searchFormData"
labelWidth="70px"
>
<search-form class="searchTop border-shadow" :formModel="searchForm" :formList="searchFormData" labelWidth="70px">
<span class="inline-b" style="float: right" slot="form-slot">
<el-button type="primary" @click="searchTable">查询</el-button>
</span>
</search-form>
<!-- 表格区域 开始 -->
<GLTable
ref="gueastGroup"
@setTableFinishFun="setTableFinishFun"
:noDataImg="url"
:getListApi="getListApi"
:searchForm="searchForm"
:tableParams="tableParams"
:pageConf="pageConf"
>
<GLTable ref="gueastGroup" @setTableFinishFun="setTableFinishFun" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf">
<div slot="entmicro-name" class="entmicro" slot-scope="scope">
<!-- <span v-for="(i, index) in scope.scope.userList" :key="index">
{{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }}
<span
v-show="scope.scope.userList.length - 1 != index"
>;</span>
</span>-->
<div class="entmicro-tag" v-for="(tag, idx) in scope.scope.userList" :key="idx">
<el-tag type="info" v-if="idx < 9" :disable-transitions="false">
<el-tag type="info" v-if="idx < 2" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ tag.staffName }}{{ tag.departmentName ? `(${tag.departmentName})` : '' }}
</el-tag>
<el-tag type="info" v-if="scope.scope.userList.length > 9 && idx == 9">
<el-popover
placement="top"
width="600"
trigger="hover"
content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
>
<el-tag type="info" v-if="scope.scope.userList.length > 2 && idx == 2">
<el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<span slot="reference">...({{ scope.scope.userList.length }})</span>
<div class="entmicro-hover">
<el-tag
type="info"
v-for="(i, index) in scope.scope.userList"
:key="index"
:disable-transitions="false"
>
<el-tag type="info" v-for="(i, index) in scope.scope.userList" :key="index" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }}
</el-tag>
......@@ -65,20 +36,14 @@
</div>
</div>
<span slot="status" slot-scope="scope">
<span
class="statusText"
:class="{ 'red-text': scope.scope.status === '2', 'green-text': scope.scope.status === '1' }"
>{{ scope.scope.status == '1' ? '启用' : '停用' }}</span>
<span :class="{ circleStatusGray: scope.scope.status === 2, circleStatusGreen: scope.scope.status === 1 }"></span>
<span>{{ scope.scope.status == '1' ? '启用' : '停用' }}</span>
</span>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<!-- <el-button type="text" @click="btnClick('edit', scope.scope)">修改</el-button>
<el-button type="text" @click="btnClick('detail', scope.scope)">查看详情</el-button>-->
<GLButton type="text" @click="btnClick('edit', scope.scope)" fn="修改群组">修改</GLButton>
<GLButton
type="text"
@click="btnClick('status', scope.scope)"
fn="启用禁用"
>{{ scope.scope.status == 1 ? '停用' : '启用' }}</GLButton>
<GLButton type="text" @click="btnClick('status', scope.scope)" fn="启用禁用">{{ scope.scope.status == 1 ? '停用' : '启用' }}</GLButton>
<GLButton type="text" @click="btnClick('detail', scope.scope)" fn="客户群详情">查看详情</GLButton>
<!-- <el-button
type="text"
......@@ -121,29 +86,31 @@ export default {
{
label: '群聊名称',
prop: 'groupName',
width: 200
// minWidth: 90,
line: 1
},
{
label: '默认成员',
prop: 'entmicroName',
minWidth: '100px',
minWidth: 250,
addHtml: 'entmicro-name'
},
{
label: '创建时间',
prop: 'createdTime',
width: 180
line: 1,
minWidth: 110
},
{
label: '状态',
prop: 'status',
width: '80px',
minWidth: 130,
addHtml: 'status'
},
{
label: '操作',
prop: 'optionBtns',
width: '140px',
width: '170px',
addHtml: 'optionBtns',
fixed: 'right'
}
......@@ -245,6 +212,9 @@ export default {
// if (val.path == '/guestGroup/index') this.searchTable()
// }
// },
beforeDestroy() {
this.$message.closeAll()
},
mounted() {
this.wxTips()
},
......@@ -343,6 +313,34 @@ export default {
<style lang="scss" scoped>
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
.searchTop {
/deep/ .el-form-item:nth-child(2) {
position: static !important;
.el-form-item__content {
margin-left: 15px !important;
}
}
}
/deep/.search-form {
.itemWidth {
display: flex;
.el-form-item {
display: flex;
}
}
.el-form-item__content {
width: auto;
display: inline-block;
margin-left: 0px !important;
.el-input {
width: 415px;
.el-input__inner {
width: 415px;
}
}
}
}
.btn-header {
margin-bottom: 20px;
}
......@@ -417,8 +415,5 @@ export default {
.search-form .el-form-item:last-child {
float: right;
}
.search-form .el-form-item__content {
width: 215px;
}
}
</style>
<template>
<div>
<div class="scrm-sub-client-container">
<div class="pageContent" :style="{ height: clientHeight + 'px' }">
<!-- 售前线索跟进员工 -->
<div class="drainage-form-item">
<label>
售前线索跟进员工
<el-popover placement="top" width="400" trigger="hover" content="请在首页-跟进专员模块里创建售前专员,并选择员工来跟进新车询价、试驾预约线索。">
<img src="@/assets/leadManage/grayquestion.png" slot="reference" class="count-item-question" />
</el-popover>
:
</label>
<div style="position: relative">
<el-button size="small" @click="handleAddEmp(1)">
<i class="el-icon-plus"></i>
选择跟进专员
</el-button>
<span class="drainage-coutom-count">
只能选择
<span class="count">1</span>
个
</span>
<div class="el-input-tag input-tag-wrapper" v-if="choicedStaff.beforeUserName">
<el-tag effect="plain" type="info" :key="idx" :disable-transitions="false" closable @close="handleClose(1)">
<i class="el-icon-user-solid"></i>
{{ this.choicedStaff.beforeUserName }}
</el-tag>
</div>
</div>
</div>
<!-- 售后线索跟进员工 -->
<div class="drainage-form-item">
<label>
售后线索跟进员工
<el-popover placement="top" width="400" trigger="hover" content="请在首页-跟进专员模块里创建售后专员,并选择员工来跟进维保预约、救援服务线索。">
<img src="@/assets/leadManage/grayquestion.png" slot="reference" class="count-item-question" />
</el-popover>
:
</label>
<div style="position: relative">
<el-button size="small" @click="handleAddEmp(2)">
<i class="el-icon-plus"></i>
选择跟进专员
</el-button>
<span class="drainage-coutom-count">
只能选择
<span class="count">1</span>
个
</span>
<div class="el-input-tag input-tag-wrapper" v-if="choicedStaff.afterUserName">
<el-tag effect="plain" type="info" :key="idx" :disable-transitions="false" closable @close="handleClose(2)">
<i class="el-icon-user-solid"></i>
{{ choicedStaff.afterUserName }}
</el-tag>
</div>
</div>
</div>
</div>
</div>
<select-emp ref="selectEmpForm" @selectTable="selectTable"></select-emp>
<GLFooter class="gl-footer">
<el-button @click="goback()">取消</el-button>
<el-button type="primary" @click="comEmployee()">确定</el-button>
</GLFooter>
</div>
</template>
<script>
import { getfollowstaff, editfollowstaff } from '@/api/modules/leadManage'
import selectEmp from '@/components/selectEmp'
export default {
name: 'leadAllocation',
components: { selectEmp },
data() {
return {
choicedStaff: {
afterUserId: '',
afterUserName: '',
afterUserUuid: '',
beforeUserId: '',
beforeUserName: '',
beforeUserUuid: ''
}, //已选择的员工
clientHeight: '',
type: ''
}
},
created() {
this.getStaff()
},
mounted() {
this.clientHeight = document.documentElement.clientHeight - 180
},
methods: {
// 删除跟进员工
handleClose(tag) {
if (tag == 1) {
;(this.choicedStaff.beforeUserId = ''), (this.choicedStaff.beforeUserName = ''), (this.choicedStaff.beforeUserUuid = '')
}
if (tag == 2) {
;(this.choicedStaff.afterUserId = ''), (this.choicedStaff.afterUserName = ''), (this.choicedStaff.afterUserUuid = '')
}
},
// 获取到跟进员工
getStaff() {
getfollowstaff({}).then(res => {
this.choicedStaff = res
})
},
goback() {
this.$router.push({ path: '/leadManage/index' })
},
// 确认修改跟进员工
comEmployee() {
let params = this.choicedStaff
editfollowstaff(params).then(res => {
if (!res) {
return
}
this.goback()
this.$message.success('修改成功')
})
},
//选择跟进员工的类型和高亮
handleAddEmp(type) {
this.type = type
if (this.type == 1) {
this.$refs.selectEmpForm.init(type, this.choicedStaff.beforeUserUuid)
}
if (this.type == 2) {
this.$refs.selectEmpForm.init(type, this.choicedStaff.afterUserUuid)
}
},
// 跟进员工列表选择回显在页面
selectTable(item) {
if (this.type == 1) {
;(this.choicedStaff.beforeUserId = item.userId), (this.choicedStaff.beforeUserName = item.userName), (this.choicedStaff.beforeUserUuid = item.userUuid)
}
if (this.type == 2) {
;(this.choicedStaff.afterUserId = item.userId), (this.choicedStaff.afterUserName = item.userName), (this.choicedStaff.afterUserUuid = item.userUuid)
}
console.log(this.choicedStaff)
}
}
}
</script>
<style lang="scss" scoped>
.scrm-sub-client-container {
.pageContent {
padding: 6px 20px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// min-width: 1300px;
background-color: #fff;
.drainage-form-item {
display: flex;
margin-top: 20px;
/deep/ {
.el-input__inner {
width: 448px;
}
}
label {
color: #333;
text-align: right;
margin-right: 10px;
height: 36px;
line-height: 36px;
font-size: 14px;
img {
width: 16px;
height: 16px;
vertical-align: middle;
// margin-left: 5px;
}
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #666;
display: inline-block;
outline: none;
padding-left: 5px;
max-height: 68px;
overflow: auto;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 567px;
display: flex;
align-items: center;
margin-top: 6px;
font-size: 14px;
height: 46px;
/deep/ .el-tag {
height: 26px;
line-height: 26px;
padding: 0 8px;
margin-left: 5px;
}
i {
// margin-left: 3px;
color: #75acff;
font-size: 14px;
}
}
.drainage-coutom-count {
color: #999;
font-size: 14px;
.count {
color: #5850ff;
}
}
/deep/ .el-button--small {
height: 36px;
}
}
}
}
</style>
<template>
<div>
<div class="scrm-sub-client-container">
<div class="pageContent" :style="{ 'min-height': clientHeight + 'px' }">
<!-- 基本信息 -->
<div class="baseTitle">
<p class="title">基本信息</p>
<hr />
<!-- 救援服务 -->
<yl-descriptions v-if="leadType == 3" ref="ylDeacriptions" :tableModel="rescueDescriModel" :showData="leadBaseList" />
<!-- 新车询价 -->
<yl-descriptions v-if="leadType == 4" ref="ylDeacriptions" :tableModel="newcarDescriModel" :showData="leadBaseList" />
<!-- 试驾预约和维保预约 -->
<yl-descriptions v-if="leadType == 5 || leadType == 6" ref="ylDeacriptions" :tableModel="orderDescriModel" :showData="leadBaseList" />
</div>
<!-- 跟进记录 -->
<div class="baseTitle" >
<p class="title">跟进记录</p>
<hr />
<div class="timestamp" v-if="this.leadFollowRecord.length > 0">
<el-timeline>
<el-timeline-item v-for="(item, index) in leadFollowRecord" :key="index" :timestamp="item.followDate" placement="top" :color="index === 0 ? '#5850FF' : ''">
<p class="conductor">
处理人:
<span>{{ item.userName }}</span>
</p>
<p class="remark">{{ item.remark }}</p>
</el-timeline-item>
</el-timeline>
</div>
<div :style="{ 'height': clientHeight- 450 + 'px' }" class="noRecord" v-else>
<img src="@/assets/leadManage/noRecord.png" alt="" />
</div>
</div>
</div>
</div>
<GLFooter class="gl-footer">
<el-button @click="goback()" type="primary" size="small">返回</el-button>
</GLFooter>
</div>
</template>
<script>
import { getBaseInfo } from '@/api/modules/leadManage'
import ylDescriptions from '@/components/ylDescriptions'
export default {
name: 'leadBasicInfo',
components: { ylDescriptions },
data() {
return {
followRecord: [],
clientHeight: '',
leadId: '', //线索id
leadType: '', //线索类型
leadBaseList: {}, //线索详情基本信息
leadFollowRecord: [], //线索详情跟进记录
theSameDescri: [
{
colList: [
{ thColspan: 1, tdColspan: 2, label: '客户名称', name: 'name' },
{ thColspan: 1, tdColspan: 2, label: '客户手机号', name: 'phone' }
]
},
{
colList: [
{ thColspan: 1, tdColspan: 2, label: '单号', name: 'orderNo' },
{ thColspan: 1, tdColspan: 2, label: '线索类型', name: 'type' }
]
},
{
colList: [
{ thColspan: 1, tdColspan: 2, label: '线索状态', name: 'status', color: '#5850FF' },
{ thColspan: 1, tdColspan: 2, label: '创建时间', name: 'createdDate' }
]
},
{
colList: [{ thColspan: 1, tdColspan: 5, label: '跟进时长', name: 'followTime' }]
}
],
// 救援服务
rescueDescri: [
{
colList: [{ thColspan: 1, tdColspan: 5, label: '救援内容', name: 'rescueType' }]
},
{
colList: [{ thColspan: 1, tdColspan: 5, label: '救援地点', name: 'rescueAddress' }]
},
{
colList: [{ thColspan: 1, tdColspan: 5, label: '门店', name: 'merchantName' }]
}
],
// 新车询价
newcarDescri: [
{
colList: [{ thColspan: 1, tdColspan: 5, label: '车型', name: 'vehicleShapeName' }]
},
{
colList: [{ thColspan: 1, tdColspan: 5, label: '询价描述', name: 'comment' }]
},
{
colList: [{ thColspan: 1, tdColspan: 5, label: '门店', name: 'merchantName' }]
}
],
// 维保预约
orderDescri: [
{
colList: [
{ thColspan: 1, tdColspan: 2, label: '车牌号', name: 'plateNum' },
{ thColspan: 1, tdColspan: 2, label: '里程数(km)', name: 'mileage' }
]
},
{
colList: [{ thColspan: 1, tdColspan: 5, label: '门店', name: 'merchantName' }]
}
]
}
},
created() {
this.leadId = this.$route.params.id ? this.$route.params.id : ''
this.leadType = this.$route.params.type ? this.$route.params.type : ''
this.getBaseDetail()
},
mounted() {
this.clientHeight = document.documentElement.clientHeight - 140
},
computed: {
// 救援服务
rescueDescriModel() {
return this.theSameDescri.concat(this.rescueDescri)
},
// 新车询价
newcarDescriModel() {
return this.theSameDescri.concat(this.newcarDescri)
},
// 维保预约
orderDescriModel() {
return this.theSameDescri.concat(this.orderDescri)
}
},
methods: {
goback() {
this.$router.push('/leadManage/index')
},
getBaseDetail() {
let params = { id: this.leadId }
getBaseInfo(params).then(res => {
let dataObj = res
// 转换线索类型
if (dataObj['type']) {
switch (dataObj['type']) {
case '3':
dataObj['type'] = '救援服务'
break
case '4':
dataObj['type'] = '新车询价'
break
case '5':
dataObj['type'] = '试驾预约'
break
case '6':
dataObj['type'] = '维保预约'
}
}
// 转换线索状态
if (dataObj['status']) {
switch (dataObj['status']) {
case '0':
dataObj['status'] = '待跟进'
break
case '1':
dataObj['status'] = '跟进中'
break
case '2':
dataObj['status'] = '已完成'
}
}
// 转换救援内容
if (dataObj['rescueType']) {
switch (dataObj['rescueType']) {
case '0':
dataObj['rescueType'] = '紧急脱困'
break
case '1':
dataObj['rescueType'] = '拖车'
break
case '2':
dataObj['rescueType'] = '换胎'
break
case '3':
dataObj['rescueType'] = '送油'
break
case '4':
dataObj['rescueType'] = '搭电'
break
case '5':
dataObj['rescueType'] = '事故救援'
}
}
this.leadBaseList = dataObj
this.leadFollowRecord = res.followList
})
}
}
}
</script>
<style lang="scss" scoped>
.scrm-sub-client-container {
.pageContent {
// padding: 6px 0px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// min-width: 1300px;
background-color: #fff;
.leadAllocation {
width: 700px;
display: flex;
justify-content: space-between;
}
.baseTitle {
.title {
padding: 15px 30px 0px 20px;
font-size: 16px;
color: #333333;
font-weight: 600;
}
.timestamp {
margin: 25px 20px 30px 44px;
/deep/ .el-timeline-item__timestamp.is-top {
margin-bottom: 3px !important;
}
/deep/ .el-timeline-item__timestamp {
color: #1d2129;
font-size: 14px;
}
/deep/ .el-timeline-item {
padding-bottom: 30px;
}
/deep/ .el-timeline-item__tail {
left: 4px;
top: 15px;
height: 87%;
}
/deep/ .el-timeline-item__node {
background-color: #999999;
}
/deep/ .el-timeline-item__node--normal {
left: 1px;
width: 8px;
height: 8px;
top: 3px;
}
/deep/ .el-timeline-item__content {
p {
padding: 4px 0;
}
.conductor {
font-size: 14px;
> span {
padding-left: 4px;
}
}
.remark {
font-size: 13px;
color: #999999;
line-height: 18px;
}
}
}
.noRecord {
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;//img如果超出这个div会隐藏超出部分
}
}
}
}
</style>
<template>
<div class="content-wrap" v-loading="loading">
<div class="tree-input">
<el-input placeholder="请输入标签组或标签关键字" v-model="filterText" size="small"><i slot="suffix" class="el-input__icon el-icon-search"></i></el-input>
<span @click="resetTree">重置</span>
</div>
<el-tree @node-expand="nodeExpand" accordion @check="checkChange" class="tag-tree" ref="tagTree" :data="labelTree" :props="defaultProps" @node-click="nodeClick" show-checkbox node-key="id" :default-expanded-keys="expandId" :expand-on-click-node="false" :filter-node-method="filterNode">
<div class="custom-tree-node" slot-scope="{ node, data }">
<el-tooltip placement="top" v-if="hoverId == data.id && hoverStatus">
<span :class="['tree-node', `node_${data.id}`]" slot="content">
{{ node.label }}
</span>
<span :class="['tree-node', `node_${data.id}`]">
{{ node.label }}
</span>
</el-tooltip>
<span :class="['tree-node', `node_${data.id}`]" v-else @mouseenter="hoverFun(data)">
{{ node.label }}
</span>
<span v-if="data.labelType && data.labelType != '系统标签' && isShowEditBtn(data.labelDTO)" @click.stop="editTree(data)">
<i class="el-icon-edit-outline"></i>
</span>
</div>
</el-tree>
</div>
</template>
<script>
import { getTableList } from '@/api/modules/tagsManage'
export default {
name: 'tagGroup',
data() {
return {
hoverId: '',
hoverStatus: false,
expandId: [],
loading: false,
heightBox: 200,
dialogVisible: false,
filterText: '',
selectNum: 0,
searchStatus: false,
labelTree: [],
defaultProps: {
children: 'children',
label: 'name'
}
}
},
watch: {
filterText(val) {
this.$refs.tagTree.filter(val)
}
},
methods: {
hoverFun(data) {
this.hoverId = data.id
this.hoverStatus = document.querySelector(`.node_${data.id}`).scrollWidth > 140
},
isShowEditBtn(row) {
const { userType, accountLevel, merchantModel } = this.$globalState.session
//集团模式下,只有集团能可以编辑企业,自店,其他只能编辑自店
//单店模式下,仅门店和员工可以编辑
if (row.labelType == '自店标签' && !(merchantModel == 1 && (accountLevel == 2 || accountLevel == 3 || accountLevel == 4))) {
return false
}
if (merchantModel == 1) {
if (accountLevel == 1 && userType == 1) {
return true
}
if (accountLevel !== 1) {
//如果是企业标签不显示
if (row.labelType == '企业标签' || row.labelType == '集团标签') {
return false
}
return true
}
}
return true //门店版都显示编辑按钮
},
nodeClick(data) {
!data.sort && document.querySelector(`.node_${data.id}`).parentElement.previousElementSibling.click()
},
handleScroll(height) {
document.querySelector('.tag-tree').scrollTop = height
},
resetTree() {
this.filterText = ''
this.$parent.searchForm = {}
this.$refs.tagTree.setCheckedKeys([])
this.$nextTick(() => {
this.$emit('getCheckItem', this.$refs.tagTree)
})
},
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
},
//勾选
checkChange() {
this.$emit('getCheckItem', this.$refs.tagTree)
},
getTreeNode(item) {
let tree_id = []
item.forEach(group_item => {
group_item.children.forEach(label_item => {
label_item && tree_id.push(label_item.id)
})
})
this.$refs.tagTree.setCheckedKeys(tree_id)
},
editTree(data) {
this.$emit('editTag', 'edit', data.labelDTO)
},
updateTreeNode() {
this.getTreeNode(this.$parent.tagCheckItem)
this.$emit('getCheckItem', this.$refs.tagTree)
},
// 获取标签树
getTableList(status) {
this.labelTree = []
let params = {
labelTreeReq: {
pageNum: 1,
pageSize: 10000,
shopId: this.$globalState.session.merchantId,
labelGroupName: this.filterText,
edition: this.$globalState.session.merchantModel
}
}
this.loading = true
getTableList(params).then(res => {
const labelTreeRets = res.labelTreeRets.map(item => {
return {
id: item.labelGroup.id,
name: item.labelGroup.name,
children: item.labelList,
labelType: item.labelType == '企业标签' && this.$globalState.session.merchantModel == 1 ? '集团标签' : item.labelType,
labelDTO: item
}
})
const labelType = this.$globalState.session.merchantModel == 1 ? '集团标签' : '企业标签'
labelTreeRets.forEach(item => {
const index = this.labelTree.findIndex(ret => ret.name == item.labelType)
if (index == -1) {
this.labelTree.push({
id: item.labelType == '系统标签' ? 1 : item.labelType == labelType ? 2 : 3,
name: item.labelType,
children: [item],
sort: item.labelType == '系统标签' ? 1 : item.labelType == labelType ? 2 : 3
})
} else {
this.labelTree[index].children.push(item)
}
})
this.labelTree = this.labelTree.sort((a, b) => a.sort - b.sort)
this.expandId = []
if (this.labelTree && this.labelTree.length) {
this.labelTree[0].children.forEach(item => {
this.expandId.push(item.id)
})
}
this.$nextTick(() => {
status && this.updateTreeNode()
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.maxHeight = this.$parent.heightBox - 205 + 'px'
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.overflow = 'auto'
})
this.loading = false
})
},
nodeExpand() {
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.maxHeight = this.$parent.heightBox - 205 + 'px'
document.querySelector('.el-tree>.el-tree-node.is-expanded .el-tree-node__children').style.overflow = 'auto'
}
},
mounted() {
this.getTableList()
}
}
</script>
<style lang="scss" scoped>
.content-wrap {
padding: 16px 3px 16px 16px;
box-sizing: border-box;
height: 100%;
.tree-input {
display: flex;
align-items: center;
span {
display: inline-block;
color: #5850ff;
font-size: 14px;
width: 40px;
margin-left: 6px;
cursor: pointer;
}
}
.tag-tree {
margin-top: 20px;
height: calc(100% - 80px);
overflow-y: auto;
/deep/ {
.el-tree-node {
.el-tree-node__content {
height: 30px;
> .el-checkbox {
display: none;
}
}
}
.el-tree-node__children {
.el-tree-node__content {
.el-checkbox {
display: block;
}
}
}
.custom-tree-node {
font-size: 14px;
color: #333;
}
.tree-node {
width: 140px;
display: inline-block;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.el-tree-node__expand-icon {
font-size: 15px;
margin-top: -2px;
color: #000000;
}
.el-tree-node__expand-icon.is-leaf {
color: transparent;
}
.el-checkbox__inner {
margin-right: 10px;
}
.el-icon-edit-outline {
color: #999;
font-size: 15px;
cursor: pointer;
&:hover {
color: #5850ff;
}
}
}
}
}
</style>
......@@ -29,7 +29,7 @@
</div>
</div>
<div class="scrm-sub-client-container">
<div class="pageContent" >
<div class="pageContent">
<div>
<div class="clientNumExp">
<div class="clientNum">
......@@ -41,30 +41,30 @@
<div class="clientNumText">{{ tableTotal }}个</div>
</div>
</div>
<el-button class="export" size="small" type="primary" @click="handleExport">导出</el-button>
<el-button class="export" size="small" @click="handleExport">导出</el-button>
</div>
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="viewCustomers" :layout="layout" :hasNum="true" :tableData="tableData" :tableTotal="tableTotal" :noDataImg="url" :pageConf="pageConf" :searchForm="searchFormTable" @refreshTable="getCustomersListData" :tableParams="tableParams">
<span slot="qiweimingcheng" slot-scope="scope">
<span>{{ myStandNo(scope.scope.carVin) }}</span>
</span>
<!-- 企微名称 -->
<div slot="nickNameList" slot-scope="scope" class="expandImg">
<div v-for="(list, idx) in scope.scope.nickNameList" :key="idx">
<div v-if="idx == 0">
<span>{{ list.nickName }}</span>
<span class="smallFontSize" :class="[list.type == 1 ? 'pure-green-text' : '', list.type == 2 ? 'pure-yello-text' : '']">@{{ list.corpName }}</span>
<!-- 企微名称 -->
<div slot="nickNameList" slot-scope="scope" class="expandImg">
<div v-for="(list, idx) in scope.scope.nickNameList" :key="idx">
<div v-if="idx == 0">
<span>{{ list.nickName }}</span>
<span class="smallFontSize" :class="[list.type == 1 ? 'pure-green-text' : '', list.type == 2 ? 'pure-yello-text' : '']">@{{ list.corpName }}</span>
</div>
<span v-if="idx == 1">
<el-popover placement="right-start" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<div v-for="(i, index) in scope.scope.nickNameList" style="padding-bottom:3px !important" :key="index">
<span>{{ i.nickName }}</span>
<span style="height: 20px; font-size: 12px; letter-spacing: 0; line-height: 20px; font-weight: 400;margin-left:2px" :class="[i.type == 1 ? 'pure-green-text' : '', i.type == 2 ? 'pure-yello-text' : '']">@{{ i.corpName }}</span>
</div>
<img class="imgEll" src="@/assets/tagsManage/ellipsis.png" alt="" slot="reference" />
</el-popover>
</span>
</div>
<span v-if="idx == 1">
<el-popover placement="right-start" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<div v-for="(i, index) in scope.scope.nickNameList" style="padding-bottom:3px !important" :key="index">
<span>{{ i.nickName }}</span>
<span style="height: 20px; font-size: 12px; letter-spacing: 0; line-height: 20px; font-weight: 400;margin-left:2px" :class="[i.type == 1 ? 'pure-green-text' : '', i.type == 2 ? 'pure-yello-text' : '']">@{{ i.corpName }}</span>
</div>
<img class="imgEll" src="@/assets/tagsManage/ellipsis.png" alt="" slot="reference" />
</el-popover>
</span>
</div>
</div>
<span slot="carVin" slot-scope="scope">
<span>{{ myStandNo(scope.scope.carVin) }}</span>
</span>
......@@ -249,39 +249,39 @@ export default {
{
label: '联系电话',
prop: 'customerPhone',
minWidth: 110
minWidth: 140
},
{
label: '车牌号',
prop: 'carNumber'
// width: 160
prop: 'carNumber',
width: 140
},
{
label: '车架号(后6位)',
prop: 'carVin',
addHtml: 'carVin',
minWidth: '110'
minWidth: 140
},
{
label: '车系',
prop: 'audi'
// width: 160
prop: 'audi',
minWidth: 140
},
{
label: '跟进员工',
prop: 'followStaff',
minWidth: 120
minWidth: 180
},
{
label: '是否加企微',
prop: 'isJoin',
addHtml: 'isJoin',
minWidth: 100
minWidth: 120
},
{
label: '添加时间',
prop: 'addTime',
minWidth: 150
minWidth: 170
}
]
},
......@@ -332,7 +332,7 @@ export default {
}
},
computed: {
items: function () {
items: function() {
var _search = this.searchLabel
const labelList = this.labelList.filter(item => item.labelName.indexOf(_search) > -1)
return labelList
......@@ -351,18 +351,17 @@ export default {
pageSize: this.$refs.viewCustomers.page.pageSize,
pageNum: this.$refs.viewCustomers.page.pageNum
}
this.exportParams = {...JSON.parse(JSON.stringify(this.allListParams))}
this.loading2 = true;
this.exportParams = { ...JSON.parse(JSON.stringify(this.allListParams)) }
this.loading2 = true
getCustomersList(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
if (res.data.length == 0) {
this.$refs.viewCustomers.setTableHeightFun()
}
setTimeout(()=>{
this.loading2 = false;
},300)
setTimeout(() => {
this.loading2 = false
}, 300)
})
},
//获取标签组
......@@ -517,7 +516,7 @@ export default {
.expandImg {
display: flex;
justify-content: center;
// justify-content: center;
.smallFontSize {
margin-left: 2px;
height: 20px;
......@@ -528,7 +527,7 @@ export default {
}
.imgEll {
margin-left: 6.5px;
cursor: pointer;
cursor: pointer;
// margin-bottom:3px;
}
}
......@@ -544,7 +543,6 @@ export default {
div {
margin-top: 12px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
......@@ -570,7 +568,6 @@ export default {
.clientListNew {
display: flex;
align-items: center;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: #333333;
font-size: 20px;
......@@ -579,7 +576,6 @@ export default {
margin-left: 6px;
height: 20px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #5850ff;
line-height: 20px;
......@@ -587,6 +583,8 @@ export default {
}
}
.export {
color: #5850ff;
border: 1px solid #5850ff;
}
}
::v-deep .el-dialog {
......@@ -630,7 +628,6 @@ export default {
letter-spacing: 1px;
.labelSetLeft {
font-size: 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: #333333;
line-height: 20px;
......@@ -638,7 +635,6 @@ export default {
}
.labelSetLeftRight {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 20px;
......@@ -728,7 +724,6 @@ export default {
}
.iconLabelstext {
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: #333333;
}
......
......@@ -8,99 +8,92 @@ const baseUrl = '/'
const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const cdn = {
css: [
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`
],
js: [
`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`,
`${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`,
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`,
`${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`,
// `${CDN_DOMAIN}ajax/libs/axios/0.21.0/axios.min.js`,
`${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`
]
css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`],
js: [
`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`,
`${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`,
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`,
`${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`,
// `${CDN_DOMAIN}ajax/libs/axios/0.21.0/axios.min.js`,
`${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`
]
}
module.exports = {
outputDir: `../dist/${packageName}`,
publicPath,//node_env ? baseUrl : '/'
assetsDir: 'static',
configureWebpack: {
resolve: {
alias: {
'@': resolve('src'),
assets: resolve('src/assets'),
views: resolve('src/views'),
components: resolve('src/components'),
// 'jquery': 'jquery'
}
},
plugins: [
new webpack.ProvidePlugin({
$: 'jquery', // 创建 '$'、'jQuery'、'window.jQuery' 三个变量指向依赖jquery
jQuery: 'jquery',
'window.jQuery': 'jquery'
})
],
output: {
library: `${packageName}-[name]`,
libraryTarget: 'umd', // 把微应用打包成 umd 库格式
jsonpFunction: `webpackJsonp_${packageName}`
},
externals: {
'vue': 'Vue',
'element-ui': 'ELEMENT',
'vue-router': 'VueRouter',
'vuex': 'Vuex',
'axios': 'axios',
'echarts': 'echarts'
}
outputDir: `../dist/${packageName}`,
publicPath, //node_env ? baseUrl : '/'
assetsDir: 'static',
configureWebpack: {
resolve: {
alias: {
'@': resolve('src'),
assets: resolve('src/assets'),
views: resolve('src/views'),
components: resolve('src/components')
// 'jquery': 'jquery'
}
},
devServer: {
hot: true,
disableHostCheck: true,
host: process.env.VUE_APP_HOST,
port: process.env.VUE_APP_PORT,
headers: {
'Access-Control-Allow-Origin': '*' // 主应用获取子应用时跨域响应头
},
// proxy: {    
// '/api': {        
// target: 'http://rop-merchant.test.glsx.com.cn',
//         
// changeOrigin: true,
//         
// pathRewrite: {            
// '^/api': '/'        
// }    
// },
// },
plugins: [
new webpack.ProvidePlugin({
$: 'jquery', // 创建 '$'、'jQuery'、'window.jQuery' 三个变量指向依赖jquery
jQuery: 'jquery',
'window.jQuery': 'jquery'
})
],
output: {
library: `${packageName}-[name]`,
libraryTarget: 'umd', // 把微应用打包成 umd 库格式
jsonpFunction: `webpackJsonp_${packageName}`
},
chainWebpack: config => {
config.plugin('html')
.tap(args => {
// args[0].minify.removeComments = false;
args[0].cdn = cdn
return args
})
config.plugins.delete('preload') // TODO: need test
config.plugins.delete('prefetch') // TODO: need test
config.module
.rule('fonts')
.test(/.(ttf|otf|eot|woff|woff2)$/)
.use('url-loader')
.loader('url-loader')
.tap(options => {
options = {
// limit: 10000,
name: '/static/fonts/[name].[ext]'
}
return options
})
.end()
externals: {
vue: 'Vue',
'element-ui': 'ELEMENT',
'vue-router': 'VueRouter',
vuex: 'Vuex',
axios: 'axios',
echarts: 'echarts'
}
},
devServer: {
hot: true,
disableHostCheck: true,
host: process.env.VUE_APP_HOST,
port: process.env.VUE_APP_PORT,
headers: {
'Access-Control-Allow-Origin': '*' // 主应用获取子应用时跨域响应头
}
}
\ No newline at end of file
// proxy: {
// '/api': {
// target: 'http://rop-merchant.test.glsx.com.cn',
//
// changeOrigin: true,
//
// pathRewrite: {
// '^/api': '/'
// }
// },
// },
},
chainWebpack: config => {
config.plugin('html').tap(args => {
// args[0].minify.removeComments = false;
args[0].cdn = cdn
return args
})
config.plugins.delete('preload') // TODO: need test
config.plugins.delete('prefetch') // TODO: need test
config.module
.rule('fonts')
.test(/.(ttf|otf|eot|woff|woff2)$/)
.use('url-loader')
.loader('url-loader')
.tap(options => {
options = {
// limit: 10000,
name: '/static/fonts/[name].[ext]'
}
return options
})
.end()
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!