Commit 912eda4d by 胡悦

Merge branch 'v1.0.1'

2 parents e5780fd4 a3442598
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
"echarts": "^5.2.0", "echarts": "^5.2.0",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.2.5", "glsx-components": "^1.3.3",
"glsx-table": "^1.1.0", "glsx-table": "^1.1.0",
"jquery": "^3.6.0", "jquery": "^3.6.0",
"sha1": "^1.1.1", "sha1": "^1.1.1",
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</div> </div>
<img src="./assets/logo.png" alt="" srcset="" /> <img src="./assets/logo.png" alt="" srcset="" />
</div> --> </div> -->
<keep-alive exclude="clientDetail,clientGroupDetail,tagsManage,clientDataOverview"> <keep-alive exclude="clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd">
<router-view></router-view> <router-view></router-view>
</keep-alive> </keep-alive>
</div> </div>
......
...@@ -36,7 +36,16 @@ ...@@ -36,7 +36,16 @@
sign: true sign: true
}) })
} }
export function getClientTableDetail(params){
params.method='entmicro.api.customer.detail'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true,
returnAll:true
})
}
// 客户群的客户列表获取分页数据接口 // 客户群的客户列表获取分页数据接口
export function getDetailTableList(params){ export function getDetailTableList(params){
params.method='entmicro.api.customer.base.cust.page' params.method='entmicro.api.customer.base.cust.page'
......
...@@ -70,11 +70,34 @@ const listDepartmentTree = params => { ...@@ -70,11 +70,34 @@ const listDepartmentTree = params => {
}) })
} }
const nameVaild = params => {
params.method = 'entmicro.api.one.template.name.valid'
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const updateNameVaild = params => {
params.method = 'entmicro.api.one.template.name.update.valid'
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
export default { export default {
templateList, templateList,
insert, insert,
detail, detail,
status, status,
update, update,
listDepartmentTree listDepartmentTree,
nameVaild,
updateNameVaild
} }
...@@ -108,5 +108,23 @@ export const common = { ...@@ -108,5 +108,23 @@ export const common = {
}else { }else {
callback() callback()
} }
},
/**
* 中文英文数字下划线括号,30个字符,是字符
*/
checkCharName(rule, value, callback) {
var rxp = /^[\u4e00-\u9fa5_a-zA-Z0-9.\\()\\()]+$/
if (!rule.required) {
if (!value) {
callback()
}else if (!rxp.test(value)) {
return callback(new Error('请输入中文英文数字下划线或括号'))
}
}
if (!value) {
return callback(new Error('请输入'))
}else {
callback()
}
} }
} }
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<div slot="footer"> <div slot="footer">
<slot name="btn-front"></slot> <slot name="btn-front"></slot>
<el-button size="small" @click="handleClose">取消</el-button> <el-button size="small" @click="handleClose" v-if="isHasCancelBtn">取消</el-button>
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
...@@ -63,6 +63,10 @@ export default { ...@@ -63,6 +63,10 @@ export default {
btnLoading: { btnLoading: {
type: Boolean, type: Boolean,
default: false default: false
},
isHasCancelBtn:{
type: Boolean,
default: true
} }
}, },
methods: { methods: {
...@@ -91,8 +95,8 @@ export default { ...@@ -91,8 +95,8 @@ export default {
} }
.el-dialog__body { .el-dialog__body {
padding: 0; padding: 0;
border-top: 1px solid #E6E6E6; // border-top: 1px solid #E6E6E6;
border-bottom: 1px solid #E6E6E6; // border-bottom: 1px solid #E6E6E6;
min-height: 250px; min-height: 250px;
// max-height: 636px; // max-height: 636px;
overflow-y: auto; overflow-y: auto;
......
...@@ -15,6 +15,10 @@ export default { ...@@ -15,6 +15,10 @@ export default {
type: String, type: String,
default: '' default: ''
}, },
isCloseShowNumTag:{
type:Boolean,
default:false
},
totalData: { totalData: {
type: Array, type: Array,
// default: () => [] // default: () => []
...@@ -210,7 +214,7 @@ export default { ...@@ -210,7 +214,7 @@ export default {
type: 'bar', type: 'bar',
data: this.customerCount, //[33600, 18000, 17500, 20000, 17000, 480, 1000, 800, 520, 650, 920, 600], data: this.customerCount, //[33600, 18000, 17500, 20000, 17000, 480, 1000, 800, 520, 650, 920, 600],
label: { label: {
show: true, show: this.isCloseShowNumTag ? false : true,
// formatter: '{b}: {c}', // formatter: '{b}: {c}',
color: '#666666', color: '#666666',
position: 'top' position: 'top'
...@@ -236,7 +240,7 @@ export default { ...@@ -236,7 +240,7 @@ export default {
color: '#FE9C1C' color: '#FE9C1C'
}, },
label: { label: {
show: true, show: this.isCloseShowNumTag ? false : true,
color: '#666666', color: '#666666',
position: 'top' position: 'top'
} }
......
...@@ -27,6 +27,7 @@ export default { ...@@ -27,6 +27,7 @@ export default {
.scrm-sub-client-container { .scrm-sub-client-container {
.nodata { .nodata {
position: absolute; position: absolute;
text-align: center;
left: 50%; left: 50%;
top: 50%; top: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
......
...@@ -23,7 +23,7 @@ module.exports = { ...@@ -23,7 +23,7 @@ module.exports = {
*/ */
request: { request: {
// baseURL: 'http://scrm.test.glsx.com.cn', // 测试 // baseURL: 'http://scrm.test.glsx.com.cn', // 测试
baseURL: 'http://192.168.2.42:8064', baseURL: 'http://192.168.1.97:8064',
// 设置超时时间 // 设置超时时间
timeout: 180000, timeout: 180000,
// 携带凭证 // 携带凭证
......
...@@ -12,7 +12,7 @@ import 'glsx-components/dist/glsx-components.css' ...@@ -12,7 +12,7 @@ import 'glsx-components/dist/glsx-components.css'
let routes = [] let routes = []
let router = null let router = null
let instance = null let instance = null
export async function bootstrap({ name, id, history, common, messenger, globalState }) { export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) {
const { response, request, sign, secret, sign_common, request_common } = await fetchConfig(globalState.configSwitch)//globalState.configSwitch const { response, request, sign, secret, sign_common, request_common } = await fetchConfig(globalState.configSwitch)//globalState.configSwitch
Vue.prototype.$history = history Vue.prototype.$history = history
Vue.prototype.$messenger = messenger Vue.prototype.$messenger = messenger
...@@ -26,6 +26,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt ...@@ -26,6 +26,7 @@ export async function bootstrap({ name, id, history, common, messenger, globalSt
routes = getRoutes(routesData) routes = getRoutes(routesData)
// { name, id, } // { name, id, }
subscribe({ messenger }) subscribe({ messenger })
Vue.use(GLButton, { routes, routerBase })
} }
export async function mount(props) { export async function mount(props) {
const insts = render(props.routerBase, routes) const insts = render(props.routerBase, routes)
......
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
</div> </div>
</div> </div>
<!-- v-if="isShowBarMap" width="100%" --> <!-- v-if="isShowBarMap" width="100%" -->
<multiple-echart v-if="isReload" width="100%" height="420px" :totalData="allMapList"></multiple-echart> <multiple-echart v-if="isReload" width="100%" height="420px" :totalData="allMapList" :isCloseShowNumTag="isCloseShowNumTag"></multiple-echart>
</template> </template>
</div> </div>
<el-dialog title="提示" :visible.sync="dialogVisible" top="15vh" width="30%" :before-close="handleClose"> <el-dialog title="提示" :visible.sync="dialogVisible" top="15vh" width="30%" :before-close="handleClose">
...@@ -211,6 +211,7 @@ export default { ...@@ -211,6 +211,7 @@ export default {
}, },
data() { data() {
return { return {
isCloseShowNumTag:false,
isReload:true, isReload:true,
isShowModal: false, isShowModal: false,
isHasCustomerCountBanner: false, isHasCustomerCountBanner: false,
...@@ -485,6 +486,7 @@ export default { ...@@ -485,6 +486,7 @@ export default {
}, },
clickThirty() { clickThirty() {
this.timeGap = 30 this.timeGap = 30
this.isCloseShowNumTag=true
if (Object.keys(this.thirtyDayStorage).length == 0) { if (Object.keys(this.thirtyDayStorage).length == 0) {
this.getDataOverviewBarMapFun(30) //第一次点击30天,获取数据 this.getDataOverviewBarMapFun(30) //第一次点击30天,获取数据
} else { } else {
...@@ -494,6 +496,7 @@ export default { ...@@ -494,6 +496,7 @@ export default {
}, },
clickSeven() { clickSeven() {
this.timeGap = 7 this.timeGap = 7
this.isCloseShowNumTag=false
if (Object.keys(this.sevenDayStorage).length == 0) { if (Object.keys(this.sevenDayStorage).length == 0) {
this.getDataOverviewBarMapFun() //重新掉一遍接口 this.getDataOverviewBarMapFun() //重新掉一遍接口
} else { } else {
......
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
<span class="ellipsis-1">{{ leftPanelList.groupHostEmail }}</span> <span class="ellipsis-1">{{ leftPanelList.groupHostEmail }}</span>
</el-tooltip> </el-tooltip>
</p> </p>
<p> <!-- <p>
<span>群主部门</span> <span>群主部门</span>
<span class="ellipsis-1">{{ leftPanelList.groupHostDepart }}</span> <span class="ellipsis-1">{{ leftPanelList.groupHostDepart }}</span>
</p> </p> -->
<p> <p>
<span>群管理员</span> <span>群管理员</span>
<el-tooltip class="item" :content="leftPanelList.groupAdmin" placement="top"> <el-tooltip class="item" :content="leftPanelList.groupAdmin" placement="top">
...@@ -44,10 +44,10 @@ ...@@ -44,10 +44,10 @@
</div> </div>
<div class="rightWrap"> <div class="rightWrap">
<p> <p>
<span>客户列表</span> <span>全部客户</span>
<span>{{ clientTableDataNum || 0 }}个</span> <span>{{ clientTableDataNum || 0 }}个</span>
</p> </p>
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="true" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent"> <search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
...@@ -72,23 +72,30 @@ ...@@ -72,23 +72,30 @@
<span @click="goDetail(scope.scope.id)" class="blue-text">详情</span> <span @click="goDetail(scope.scope.id)" class="blue-text">详情</span>
</template> </template>
</GLTable> </GLTable>
<basic-dialog title="" width="547px" :isVisible="dialogVisible" btnOkLabel="我知道了" :isHasCancelBtn="false" @confirmDialog="handleConfirm" @closeDialog="handleClose">
<div class="content-body">
<p>该客户暂无员工跟进,无法查看该客户详情,</p>
<p class="bottomText">赶紧去加好友吧!</p>
</div>
</basic-dialog>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { getTableDetail, getDetailTableList } from '@/api/modules/clientGroupManage' import { getTableDetail, getDetailTableList, getClientTableDetail } from '@/api/modules/clientGroupManage'
import url from '@/assets/clientDataOverview/nodata.png' import url from '@/assets/clientDataOverview/nodata.png'
export default { export default {
name: 'clientGroupDetail', name: 'clientGroupDetail',
data() { data() {
return { return {
dialogVisible: false,
groupName: this.$route.query.groupName, groupName: this.$route.query.groupName,
url: url, url: url,
leftPanelList: {}, leftPanelList: {},
searchForm: {}, searchForm: {},
searchFormTable:{}, searchFormTable: {},
clientGroupFormList: [ clientGroupFormList: [
{ {
type: 'daterange', type: 'daterange',
...@@ -151,7 +158,8 @@ export default { ...@@ -151,7 +158,8 @@ export default {
{ {
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
addHtml: 'customerName' addHtml: 'customerName',
minWidth: 100
}, },
{ {
label: '手机号码', label: '手机号码',
...@@ -168,8 +176,13 @@ export default { ...@@ -168,8 +176,13 @@ export default {
addHtml: 'joinScene' addHtml: 'joinScene'
}, },
{ {
label: '邀请人',
prop: 'invitorName'
},
{
label: '入群时间', label: '入群时间',
prop: 'joinTime' prop: 'joinTime',
width: 95
} }
], ],
tableOption: { tableOption: {
...@@ -198,19 +211,19 @@ export default { ...@@ -198,19 +211,19 @@ export default {
// this.searchTable() // this.searchTable()
// }) // })
}, },
watch: { // watch: {
'searchForm.daterange':{ // 'searchForm.daterange':{
deep: true, // deep: true,
// immediate:true, // // immediate:true,
handler(val) { // handler(val) {
console.log('val值:',val) // console.log('val值:',val)
if(val){ // if(val){
console.log('7777777777777') // console.log('7777777777777')
this.searchTable() // this.searchTable()
} // }
} // }
} // }
}, // },
methods: { methods: {
async getTableDetail(id = this.$route.query.id) { async getTableDetail(id = this.$route.query.id) {
...@@ -221,16 +234,16 @@ export default { ...@@ -221,16 +234,16 @@ export default {
} }
this.leftPanelList = res this.leftPanelList = res
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm)) this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
// console.log(this.searchForm,'数据') // console.log(this.searchForm,'数据')
// console.log(this.searchForm.daterange,this.searchForm.id,this.searchFormTable,'时间选择器') // console.log(this.searchForm.daterange,this.searchForm.id,this.searchFormTable,'时间选择器')
// console.log(this.searchForm) // console.log(this.searchForm)
if (this.searchFormTable.daterange) { if (this.searchFormTable.daterange) {
this.searchFormTable.beginTime = this.searchForm.daterange[0] this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1] this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange delete this.searchFormTable.daterange
} else { } else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
} }
...@@ -261,11 +274,31 @@ export default { ...@@ -261,11 +274,31 @@ export default {
this.searchForm = { id: this.$route.query.id } this.searchForm = { id: this.$route.query.id }
this.$refs.clientGroupDetail.refreshTable() this.$refs.clientGroupDetail.refreshTable()
}, },
handleClose() {
this.dialogVisible = !this.dialogVisible
},
handleConfirm() {
this.handleClose()
},
goDetail(id) { goDetail(id) {
this.$router.push({ // 接口通过了跳转
path: '/clientManage/clientDetail', getClientTableDetail({ oneId: id }).then(res => {
query: { if (res.code == '0') {
id: id if (!res.data) {
this.dialogVisible = true
return false
}
this.$router.push({
path: '/clientManage/clientDetail',
query: {
id: id
}
})
} else {
this.$message({
type: 'error',
message: res.message
})
} }
}) })
} }
...@@ -405,5 +438,27 @@ export default { ...@@ -405,5 +438,27 @@ export default {
} }
} }
} }
/deep/ .el-dialog__header {
border: 0;
}
/deep/ .el-dialog__body {
border-bottom: 1px solid #e6e6e6;
padding: 0px 65px 35px;
min-height: 0;
.container {
font-size: 18px;
text-align: center;
font-weight: 400;
color: #333333;
.bottomText {
margin-top: 10px;
}
}
}
/deep/ .el-dialog__footer {
text-align: center;
padding-top: 15px;
padding-bottom: 15px;
}
} }
</style> </style>
<template>
<div class="scrm-sub-client-container">
<div class="header">
<div class="vehicleGroupName">
<span>{{ groupName }}</span>
</div>
<button class="backBtn" @click="goBack">返回客户群管理</button>
</div>
<div class="content">
<div class="leftWrap">
<div class="avator">
<img src="@/assets/clientDetail/defaultAvator.png" alt="" />
</div>
<p>
<span>群主</span>
<span class="ellipsis-1">{{ leftPanelList.groupHostName }}</span>
</p>
<p>
<span>群主手机</span>
<span class="ellipsis-1">{{ leftPanelList.groupHostPhone }}</span>
</p>
<p>
<span>群主邮箱</span>
<el-tooltip class="item" :content="leftPanelList.groupHostEmail" placement="top">
<span class="ellipsis-1">{{ leftPanelList.groupHostEmail }}</span>
</el-tooltip>
</p>
<!-- <p>
<span>群主部门</span>
<span class="ellipsis-1">{{ leftPanelList.groupHostDepart }}</span>
</p> -->
<p>
<span>群管理员</span>
<el-tooltip class="item" :content="leftPanelList.groupAdmin" placement="top">
<span class="ellipsis-1">{{ leftPanelList.groupAdmin }}</span>
</el-tooltip>
</p>
<p>
<span>创建时间</span>
<el-tooltip class="item" :content="leftPanelList.createDate" placement="top">
<span class="ellipsis-1">{{ leftPanelList.createDate }}</span>
</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 v-if="currentIndex == index">({{ item.personNum || 0 }})个</template>
</span>
</div>
</div>
<template v-if="currentIndex == 0">
<client ref="childComp" :url="url" @goDetail="goDetail" @getTotal="getTotal"></client>
</template>
<template v-if="currentIndex == 1">
<follow-employee ref="childComp" :url="url" @getTotal="getTotal"></follow-employee>
</template>
<template v-if="currentIndex == 2">
<leave-group-client ref="childComp" :url="url" @goDetail="goDetail"></leave-group-client>
</template>
<template v-if="currentIndex == 3"></template>
<basic-dialog title="" width="547px" :isVisible="dialogVisible" btnOkLabel="我知道了" :isHasCancelBtn="false" @confirmDialog="handleConfirm" @closeDialog="handleClose">
<div class="content-body">
<p>该客户暂无员工跟进,无法查看该客户详情,</p>
<p class="bottomText">赶紧去加好友吧!</p>
</div>
</basic-dialog>
</div>
</div>
</div>
</template>
<script>
import { getTableDetail, getClientTableDetail } from '@/api/modules/clientGroupManage'
import client from '@/views/clientGroupManage/components/client.vue'
import followEmployee from '@/views/clientGroupManage/components/followEmployee.vue'
import leaveGroupClient from '@/views/clientGroupManage/components/leaveGroupClient.vue'
import url from '@/assets/clientDataOverview/nodata.png'
export default {
name: 'clientGroupDetail',
components: {
client,
followEmployee,
leaveGroupClient
},
data() {
return {
dialogVisible: false,
// ['全部客户', '跟进员工', '退群客户', '潜在客户']
titles: [
{
name: '全部客户',
personNum: 0
},
{
name: '跟进员工',
personNum: 0
},
{
name: '退群客户',
personNum: 0
},
{
name: '潜在客户',
personNum: 0
}
],
currentIndex: 0,
groupName: this.$route.query.groupName,
url: url,
leftPanelList: {},
flushTime: false
}
},
created() {
this.getTableDetail()
},
// watch: {
// 'searchForm.daterange':{
// deep: true,
// // immediate:true,
// handler(val) {
// console.log('val值:',val)
// if(val){
// console.log('7777777777777')
// this.searchTable()
// }
// }
// }
// },
methods: {
getTotal(num) {
if (this.currentIndex == 0) {
this.$set(this.titles[0], 'personNum', num)
}
},
tabClick(index) {
this.currentIndex = index
},
async getTableDetail(id = this.$route.query.id) {
const res = await getTableDetail({ id: id })
console.log('获取客户群数据', res)
if (!res) {
return false
}
this.leftPanelList = res
},
goBack() {
this.$router.push({ path: '/clientGroupManage/index' })
},
goDetail(id) {
// 接口通过了跳转
getClientTableDetail({ oneId: id }).then(res => {
if (res.code == '0') {
if (!res.data) {
this.dialogVisible = true
return false
}
this.$router.push({
path: '/clientManage/clientDetail',
query: {
id: id
}
})
} else {
this.$message({
type: 'error',
message: res.message
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.scrm-sub-client-container {
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
.header {
display: flex;
justify-content: space-between;
align-items: center;
height: 72px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
.vehicleGroupName {
margin-left: 26px;
height: 20px;
font-size: 20px;
font-weight: 600;
color: #333333;
line-height: 20px;
letter-spacing: 1px;
}
.backBtn {
margin-right: 20px;
height: 32px;
font-size: 14px;
background: $btnBlue;
color: #fff;
border-radius: 4px;
padding: 0 20px;
border: none;
&:hover {
background-color: $lightBtnBlue;
}
}
}
.content {
display: flex;
width: 100%;
margin-top: 20px;
.leftWrap {
width: 240px;
// height: 877px;
min-height: 270px; //calc(100vh - 92px);
background-color: #fff;
box-sizing: border-box;
.avator {
margin: 0 auto;
margin-top: 40px;
width: 60px;
height: 60px;
text-align: center;
line-height: 60px;
img {
border-radius: 50%;
width: 100%;
height: 100%;
}
}
p {
padding-left: 20px;
position: relative;
margin-top: 20px;
span:first-child {
display: inline-block;
height: 20px;
font-size: 14px;
font-weight: 600;
color: #333333;
line-height: 20px;
}
span:nth-child(2) {
position: absolute;
left: 100px;
display: inline-block;
height: 20px;
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
max-width: 131px;
}
}
}
.rightWrap {
position: relative;
margin-left: 20px;
width: calc(100% - 260px);
box-sizing: border-box;
background-color: #fff;
padding: 20px;
padding-top: 50px;
.choseRow {
position: absolute;
width: 100%;
left: 0;
top: 0;
display: flex;
background-color: $bgColor;
z-index: 10;
padding: 2px 0 0 0;
.choseItem {
height: 40px;
line-height: 40px;
width: 180px;
// background: #FFFFFF;
text-align: center;
border: 1px solid #eeedff;
border-bottom: 0;
&:first-child {
border-left: 0;
}
span {
font-weight: 400;
font-size: 14px;
color: #37383a;
}
}
.activeItem {
border-radius: 4px 4px 0 0;
background-color: #fff;
span {
color: $btnBlue;
font-weight: 600;
}
}
}
.el-button + .el-button {
margin-left: 20px;
}
// .el-button {
// font-size: 14px;
// font-weight: 400;
// padding: 9px 21px;
// background: $btnBlue;
// border-radius: 4px;
// border: none;
// }
// .el-button:first-child {
// background: #ffffff;
// border-radius: 4px;
// border: 1px solid #999999;
// font-weight: 400;
// color: #666666;
// }
.glsx-table {
margin-top: 20px;
}
}
}
}
</style>
<template>
<div class="sub-container">
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :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>
</span>
</search-form>
<!-- :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 ? '@企微' : '' }}</span>
</span>
<span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
</span>
<span slot="joinScene" slot-scope="scope">
<span>{{ scope.scope.joinScene == 1 ? '直接邀请入群' : scope.scope.joinScene == 2 ? '通过邀请链接入群' : scope.scope.joinScene == 3 ? '通过扫描群二维码入群' : '' }}</span>
</span>
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<span @click="goDetail(scope.scope.id)" class="blue-text">详情</span>
</template>
</GLTable>
</div>
</template>
<script>
import { getDetailTableList } from '@/api/modules/clientGroupManage'
export default {
props: {
url: {
type: String,
default: ''
}
},
data() {
return {
searchForm: {},
searchFormTable: {},
clientGroupFormList: [
{
type: 'daterange',
prop: 'daterange',
label: '入群时间',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
},
{
type: 'select',
prop: 'customerSex',
label: '性别',
placeholder: '请选择性别',
options: [
{
label: '全部',
value: null
},
{
label: '男',
value: 1
},
{
label: '女',
value: 2
},
{
label: '未知',
value: 0
}
]
},
{
type: 'input',
inputType: 'text',
prop: 'groupNickName',
label: '本群昵称',
placeholder: '请输入本群昵称'
},
{
type: 'input',
inputType: 'text',
prop: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
}
],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableParams: {
// btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data',
tableColumns: [
{
label: '本群昵称',
prop: 'groupNickName'
},
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName'
},
{
label: '手机号码',
prop: 'customerPhone'
},
{
label: '性别',
prop: 'customerSex',
addHtml: 'customerSex'
},
{
label: '入群方式',
prop: 'joinScene',
addHtml: 'joinScene'
},
{
label: '邀请人',
prop: 'invitorName'
},
{
label: '入群时间',
prop: 'joinTime',
width: 95
}
],
tableOption: {
width: 80,
btnList: [
{
name: '详情',
pType: 'detail'
}
]
}
},
getListApi: getDetailTableList,
clientTableDataNum: 0
}
},
created() {
this.searchForm = {
id: this.$route.query.id
}
},
methods: {
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchFormTable.daterange) {
this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange
} else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
}
resolve()
})
},
setTableHeightEvent() {
this.$refs.clientGroupDetail.setTableHeightFun()
},
setTableFinishFun(content) {
//content是第一页的数据
console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total
this.$emit('getTotal',this.clientTableDataNum)
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun()
// }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
},
//搜索表格
searchTable() {
this.$refs.clientGroupDetail.refreshTable()
},
//重置表格
resetTable() {
this.searchForm = { id: this.$route.query.id }
this.$refs.clientGroupDetail.refreshTable()
},
goDetail(msg) {
this.$emit('goDetail', msg)
}
}
}
</script>
<style lang="scss" scope>
.sub-container {
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="sub-container">
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :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>
</span>
</search-form>
<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>
<span slot="joinScene" slot-scope="scope">
<span>{{ scope.scope.joinScene == 1 ? '直接邀请入群' : scope.scope.joinScene == 2 ? '通过邀请链接入群' : scope.scope.joinScene == 3 ? '通过扫描群二维码入群' : '' }}</span>
</span>
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<span @click="goDetail(scope.scope.id)" class="blue-text">详情</span>
</template>
</GLTable>
</div>
</template>
<script>
// import { getDetailTableList } from '@/api/modules/clientGroupManage'
export default {
props: {
url: {
type: String,
default: ''
}
},
data() {
return {
searchForm: {},
searchFormTable: {},
clientGroupFormList: [
{
type: 'daterange',
prop: 'daterange',
label: '入群时间',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
},
{
type: 'select',
prop: 'customerSex',
label: '性别',
placeholder: '请选择性别',
options: [
{
label: '全部',
value: null
},
{
label: '男',
value: 1
},
{
label: '女',
value: 2
},
{
label: '未知',
value: 0
}
]
},
{
type: 'input',
inputType: 'text',
prop: 'groupNickName',
label: '本群昵称',
placeholder: '请输入本群昵称'
},
{
type: 'input',
inputType: 'text',
prop: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
}
],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableParams: {
// btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '本群昵称',
prop: 'groupNickName'
},
{
label: '员工名称',
prop: 'customerName',
},
{
label: '手机号码',
prop: 'customerPhone'
},
{
label: '性别',
prop: 'customerSex',
addHtml: 'customerSex'
},
{
label: '入群方式',
prop: 'joinScene',
addHtml: 'joinScene'
},
{
label: '邀请人',
prop: 'invitorName'
},
{
label: '入群时间',
prop: 'joinTime',
width: 95
}
]
},
getListApi: '',
clientTableDataNum: 0
}
},
created() {
this.searchForm = {
id: this.$route.query.id
}
},
methods: {
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchFormTable.daterange) {
this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange
} else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
}
resolve()
})
},
setTableHeightEvent() {
this.$refs.clientGroupDetail.setTableHeightFun()
},
setTableFinishFun(content) {
//content是第一页的数据
console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total
this.$emit('getTotal',this.clientTableDataNum)
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun()
// }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
},
//搜索表格
searchTable() {
this.$refs.clientGroupDetail.refreshTable()
},
//重置表格
resetTable() {
this.searchForm = { id: this.$route.query.id }
this.$refs.clientGroupDetail.refreshTable()
},
goDetail(msg) {
this.$emit('goDetail', msg)
}
}
}
</script>
<style lang="scss" scope>
.sub-container {
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="sub-container">
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :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>
</span>
</search-form>
<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 ? '@企微' : '' }}</span>
</span>
<span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
</span>
<span slot="joinScene" slot-scope="scope">
<span>{{ scope.scope.joinScene == 1 ? '直接邀请入群' : scope.scope.joinScene == 2 ? '通过邀请链接入群' : scope.scope.joinScene == 3 ? '通过扫描群二维码入群' : '' }}</span>
</span>
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<span @click="goDetail(scope.scope.id)" class="blue-text">详情</span>
</template>
</GLTable>
</div>
</template>
<script>
// import { getDetailTableList } from '@/api/modules/clientGroupManage'
export default {
props: {
url: {
type: String,
default: ''
}
},
data() {
return {
searchForm: {},
searchFormTable: {},
clientGroupFormList: [
{
type: 'daterange',
prop: 'daterange',
label: '入群时间',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
},
{
type: 'select',
prop: 'customerSex',
label: '性别',
placeholder: '请选择性别',
options: [
{
label: '全部',
value: null
},
{
label: '男',
value: 1
},
{
label: '女',
value: 2
},
{
label: '未知',
value: 0
}
]
},
{
type: 'input',
inputType: 'text',
prop: 'groupNickName',
label: '本群昵称',
placeholder: '请输入本群昵称'
},
{
type: 'input',
inputType: 'text',
prop: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
}
],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableParams: {
listName: 'data',
tableColumns: [
{
label: '本群昵称',
prop: 'groupNickName'
},
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName'
},
{
label: '手机号码',
prop: 'customerPhone'
},
{
label: '性别',
prop: 'customerSex',
addHtml: 'customerSex'
},
{
label: '入群方式',
prop: 'joinScene',
addHtml: 'joinScene'
},
{
label: '邀请人',
prop: 'invitorName'
},
{
label: '入群时间',
prop: 'joinTime',
width: 95
}
],
tableOption: {
width: 80,
btnList: [
{
name: '详情',
pType: 'detail'
}
]
}
},
getListApi: '',
clientTableDataNum: 0
}
},
created() {
this.searchForm = {
id: this.$route.query.id
}
},
methods: {
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchFormTable.daterange) {
this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange
} else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
}
resolve()
})
},
setTableHeightEvent() {
this.$refs.clientGroupDetail.setTableHeightFun()
},
setTableFinishFun(content) {
//content是第一页的数据
console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun()
// }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
},
//搜索表格
searchTable() {
this.$refs.clientGroupDetail.refreshTable()
},
//重置表格
resetTable() {
this.searchForm = { id: this.$route.query.id }
this.$refs.clientGroupDetail.refreshTable()
},
goDetail(msg) {
this.$emit('goDetail', msg)
}
}
}
</script>
<style lang="scss" scope>
.sub-container {
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="sub-container">
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :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>
</span>
</search-form>
<!-- :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 ? '@企微' : '' }}</span>
</span>
<span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
</span>
<span slot="joinScene" slot-scope="scope">
<span>{{ scope.scope.joinScene == 1 ? '直接邀请入群' : scope.scope.joinScene == 2 ? '通过邀请链接入群' : scope.scope.joinScene == 3 ? '通过扫描群二维码入群' : '' }}</span>
</span>
<template slot="auth-button" slot-scope="scope" :data="scope.scope">
<span @click="goDetail(scope.scope.id)" class="blue-text">详情</span>
</template>
</GLTable>
</div>
</template>
<script>
import { getDetailTableList } from '@/api/modules/clientGroupManage'
export default {
props: {
url: {
type: String,
default: ''
}
},
data() {
return {
searchForm: {},
searchFormTable: {},
clientGroupFormList: [
{
type: 'daterange',
prop: 'daterange',
label: '入群时间',
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
}
}
},
{
type: 'select',
prop: 'customerSex',
label: '性别',
placeholder: '请选择性别',
options: [
{
label: '全部',
value: null
},
{
label: '男',
value: 1
},
{
label: '女',
value: 2
},
{
label: '未知',
value: 0
}
]
},
{
type: 'input',
inputType: 'text',
prop: 'groupNickName',
label: '本群昵称',
placeholder: '请输入本群昵称'
},
{
type: 'input',
inputType: 'text',
prop: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
}
],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableParams: {
// btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data',
tableColumns: [
{
label: '本群昵称',
prop: 'groupNickName'
},
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName'
},
{
label: '手机号码',
prop: 'customerPhone'
},
{
label: '性别',
prop: 'customerSex',
addHtml: 'customerSex'
},
{
label: '入群方式',
prop: 'joinScene',
addHtml: 'joinScene'
},
{
label: '邀请人',
prop: 'invitorName'
},
{
label: '入群时间',
prop: 'joinTime',
width: 95
}
],
tableOption: {
width: 80,
btnList: [
{
name: '详情',
pType: 'detail'
}
]
}
},
getListApi: getDetailTableList,
clientTableDataNum: 0
}
},
created() {
this.searchForm = {
id: this.$route.query.id
}
},
methods: {
beforeSearchFn() {
return new Promise((resolve, reject) => {
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchFormTable.daterange) {
this.searchFormTable.beginTime = this.searchForm.daterange[0]
this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange
} else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime
}
resolve()
})
},
setTableHeightEvent() {
this.$refs.clientGroupDetail.setTableHeightFun()
},
setTableFinishFun(content) {
//content是第一页的数据
console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total
//接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun()
// }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
},
//搜索表格
searchTable() {
this.$refs.clientGroupDetail.refreshTable()
},
//重置表格
resetTable() {
this.searchForm = { id: this.$route.query.id }
this.$refs.clientGroupDetail.refreshTable()
},
goDetail(msg) {
this.$emit('goDetail', msg)
}
}
}
</script>
<style lang="scss" scope>
.sub-container {
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<!-- <p class="pageTitle">客户群管理</p> --> <!-- <p class="pageTitle">客户群管理</p> -->
<div class="pageContent"> <div class="pageContent">
<search-form class="searchTop border-shadow" :isHasSyncBtn="true" :showDefaultTime="true" :merchantModel="merchantModel" :accountLevel="accountLevel" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent" @resetTable="resetTable" @searchTable="searchTable" @syncClick="syncClick"> <search-form class="searchTop border-shadow" :isHasSyncBtn="true" :showDefaultTime="false" :merchantModel="merchantModel" :accountLevel="accountLevel" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent" @resetTable="resetTable" @searchTable="searchTable" @syncClick="syncClick">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <auth-button :data="scope.scope"></auth-button> --> <!-- <auth-button :data="scope.scope"></auth-button> -->
<span @click="goDetail(scope.scope.id, scope.scope.custGroupName)" class="blue-text">详情</span> <span @click="goDetail(scope.scope.id, scope.scope.custGroupName)" class="blue-text">详情</span>
<!-- <GLButton @click="goDetail(scope.scope.id, scope.scope.custGroupName)" fn="客户群详情" type="text">详情</GLButton> -->
</template> </template>
</GLTable> </GLTable>
</div> </div>
...@@ -38,10 +39,6 @@ export default { ...@@ -38,10 +39,6 @@ export default {
isReload: true, isReload: true,
url: url, url: url,
sloading: false, sloading: false,
titles: [
{ name: '客户群总数', num: 100, rate: '+10%', isUp: true, tips: '群提示消息1' },
{ name: '新增客户群数', num: 100, rate: '+10%', isUp: true, tips: '群提示消息2' }
],
searchForm: {}, searchForm: {},
searchFormTable: {}, searchFormTable: {},
clientGroupFormList: [ clientGroupFormList: [
...@@ -87,19 +84,34 @@ export default { ...@@ -87,19 +84,34 @@ export default {
prop: 'custGroupName', prop: 'custGroupName',
minWidth: 160 minWidth: 160
}, },
{
label: '当前成员总数',
prop: 'allMembers',
minWidth: 140
},
{ {
label: '当前客户数', label: '当前客户数',
prop: 'totalCount', prop: 'totalCount',
minWidth: 100 minWidth: 100
}, },
{ {
label: '新增入群客户数', label: '当日新增入群客户数',
prop: 'newCustomerCount', prop: 'newCustomerCount',
minWidth: 140 minWidth: 160
}, },
{ {
label: '新增退群客户数', label: '当日新增退群客户数',
prop: 'delCustomerCount', prop: 'delCustomerCount',
minWidth: 160
},
{
label: '当前跟进员工数',
prop: 'staffs',
minWidth: 140
},
{
label: '创建方式',
prop: 'creationMethod',
minWidth: 140 minWidth: 140
}, },
{ {
...@@ -113,7 +125,7 @@ export default { ...@@ -113,7 +125,7 @@ export default {
{ {
label: '创建时间', label: '创建时间',
prop: 'addTime', prop: 'addTime',
width: 188 width: 95
} }
], ],
tableOption: { tableOption: {
...@@ -179,15 +191,16 @@ export default { ...@@ -179,15 +191,16 @@ export default {
}, },
setTableFinishFun(content) { setTableFinishFun(content) {
console.log(content, this.$refs.clientGroupManage.data.length, '获取数据') console.log(content, this.$refs.clientGroupManage.data.length, '获取数据')
if (!this.flushTime) { // if (!this.flushTime) {
this.flushTime = true // this.flushTime = true
this.searchTable() // this.searchTable()
} // }
//接收到的数据为空 //接收到的数据为空
if (!this.$refs.clientGroupManage.data.length) { // if (!this.$refs.clientGroupManage.data.length) {
this.$refs.clientGroupManage.setTableHeightFun() // this.$refs.clientGroupManage.setTableHeightFun()
} // }
this.$refs.clientGroupManage.data.length ? (this.$refs.clientGroupManage.tableHeightValues = '') : this.$refs.clientGroupManage.setTableHeightFun()
}, },
searchTable() { searchTable() {
this.$refs.clientGroupManage.refreshTable() this.$refs.clientGroupManage.refreshTable()
...@@ -212,9 +225,7 @@ export default { ...@@ -212,9 +225,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.isReload = true this.isReload = true
}) })
// this.$refs.clientGroupManage.refreshTable()
}, },
btnClick(ptype, scope) {},
goDetail(id, name) { goDetail(id, name) {
this.$router.push({ this.$router.push({
path: '/clientGroupManage/clientGroupDetail', path: '/clientGroupManage/clientGroupDetail',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<!-- <p class="pageTitle">客户管理</p> --> <!-- <p class="pageTitle">客户管理</p> -->
<div class="pageContent"> <div class="pageContent">
<search-form :ploading="sloading" :isHasSyncBtn="true" :showDefaultTime="true" :merchantModel="merchantModel" :accountLevel="accountLevel" class="searchTop border-shadow" :formModel="searchForm" :formList="clientManageFormList" @resetTable="resetTable" @searchTable="searchTable" @syncClick="syncClick"> <search-form :ploading="sloading" :isHasSyncBtn="true" :showDefaultTime="false" :merchantModel="merchantModel" :accountLevel="accountLevel" class="searchTop border-shadow" :formModel="searchForm" :formList="clientManageFormList" @resetTable="resetTable" @searchTable="searchTable" @syncClick="syncClick">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
...@@ -25,16 +25,19 @@ ...@@ -25,16 +25,19 @@
</span> </span>
<div slot="followStaff" class="entmicro" slot-scope="scope"> <div slot="followStaff" class="entmicro" slot-scope="scope">
<div class="entmicro-tag" v-for="(tag, idx) in followList(scope.scope.followStaff)" :key="idx"> <div class="entmicro-tag" v-for="(tag, idx) in followList(scope.scope.followStaff)" :key="idx">
<el-tag type="info" v-if="idx < 3" :disable-transitions="false"> <el-tooltip effect="dark" :content="tag" placement="top">
<i class="el-icon-user-solid"></i> <el-tag type="info" class="ellipsis-1" v-if="idx < 3" :disable-transitions="false">
{{ tag }} <i class="el-icon-user-solid"></i>
</el-tag> {{ tag }}
</el-tag>
</el-tooltip>
<el-tag type="info" v-if="followList(scope.scope.followStaff).length > 3 && idx == 3"> <el-tag type="info" v-if="followList(scope.scope.followStaff).length > 3 && idx == 3">
<el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"> <el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<span slot="reference">...({{ followList(scope.scope.followStaff).length }})</span> <div slot="reference">...({{ followList(scope.scope.followStaff).length }})</div>
<div class="entmicro-hover"> <div class="entmicro-hover">
<el-tag type="info" v-for="(i, index) in followList(scope.scope.followStaff)" :key="index" :disable-transitions="false"> <el-tag type="info" style="margin-right: 10px; margin-bottom: 10px" v-for="(i, index) in followList(scope.scope.followStaff)" :key="index" :disable-transitions="false">
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid" style="color: #75acff"></i>
<!-- {{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }} --> <!-- {{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }} -->
{{ i }} {{ i }}
</el-tag> </el-tag>
...@@ -67,8 +70,8 @@ ...@@ -67,8 +70,8 @@
</template> --> </template> -->
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="goDetail(scope.scope.oneId)">详情</el-button> <el-button type="text" @click="goDetail(scope.scope.oneId)">详情</el-button>
<!-- <GLButton @click="goDetail(scope.scope.oneId)" fn="客户详情" type="text">详情</GLButton> -->
</div> </div>
</GLTable> </GLTable>
</div> </div>
</div> </div>
...@@ -182,36 +185,36 @@ export default { ...@@ -182,36 +185,36 @@ export default {
// btnId: new Date().getTime() + parseInt(Math.random() * 1000), // btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data', listName: 'data',
// tableOption: true, // tableOption: true,
tableOption:false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: '客户ID', label: '客户ID',
prop: 'oneId', prop: 'oneId',
width: 180 minWidth: 160
}, },
{ {
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
addHtml: 'customerName', addHtml: 'customerName',
width: 160 minWidth: 150
}, },
{ {
label: '手机号', label: '手机号',
prop: 'customerPhone', prop: 'customerPhone',
addHtml: 'customerPhone', addHtml: 'customerPhone',
width: 110 minWidth: 110
}, },
{ {
label: '性别', label: '性别',
prop: 'customerSex', prop: 'customerSex',
addHtml: 'customerSex', addHtml: 'customerSex',
width: 80 minWidth: 80
}, },
{ {
label: '跟进员工', label: '跟进员工',
prop: 'followStaff', prop: 'followStaff',
addHtml: 'followStaff', addHtml: 'followStaff',
minWidth: 110 minWidth: 120
}, },
{ {
label: '来源', label: '来源',
...@@ -220,6 +223,11 @@ export default { ...@@ -220,6 +223,11 @@ export default {
minWidth: 100 minWidth: 100
}, },
{ {
label: '渠道来源',
prop: 'sourceChannel',
width: 100
},
{
label: '是否加企微', //1. 加入,0.未加入 label: '是否加企微', //1. 加入,0.未加入
prop: 'isJoin', prop: 'isJoin',
addHtml: 'isJoin', addHtml: 'isJoin',
...@@ -229,21 +237,21 @@ export default { ...@@ -229,21 +237,21 @@ export default {
label: '当前状态', label: '当前状态',
prop: 'status', prop: 'status',
addHtml: 'status', addHtml: 'status',
width: 100 minWidth: 100
}, },
{ {
label: '添加时间', label: '添加时间',
prop: 'addTime', prop: 'addTime',
width: 188 width: 98
}, },
{ {
label:'操作', label: '操作',
prop:'optionBtns', prop: 'optionBtns',
width:'80px', width: '80px',
addHtml:'optionBtns', addHtml: 'optionBtns',
fixed:'right' fixed: 'right'
} }
], ]
// tableOption: { // tableOption: {
// width: 80 // width: 80
// } // }
...@@ -255,9 +263,9 @@ export default { ...@@ -255,9 +263,9 @@ export default {
flushTime: false flushTime: false
} }
}, },
activated() { // activated() {
this.searchTable() // this.searchTable()
}, // },
created() { created() {
if (window.__POWERED_BY_QIANKUN__) { if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中 //运行在qiankun容器中
...@@ -280,10 +288,12 @@ export default { ...@@ -280,10 +288,12 @@ export default {
this.$refs.clientManage.setTableHeightFun() this.$refs.clientManage.setTableHeightFun()
}, },
setTableFinishFun(content) { setTableFinishFun(content) {
if (!this.flushTime) { //关闭默认时间30天再刷新,showDefaultTime也要设置false
this.flushTime = true // if (!this.flushTime) {
this.searchTable() // this.flushTime = true
} // this.searchTable()
// }
//接收到的数据为空 //接收到的数据为空
// if (!this.$refs.clientManage.data.length) { // if (!this.$refs.clientManage.data.length) {
// this.$refs.clientManage.setTableHeightFun() // this.$refs.clientManage.setTableHeightFun()
...@@ -439,13 +449,10 @@ export default { ...@@ -439,13 +449,10 @@ export default {
font-size: 14px; font-size: 14px;
} }
} }
// span {
// line-height: 20px;
// }
} }
.el-tag { .el-tag {
margin-right: 10px; // margin-right: 10px;
margin-bottom: 10px; max-width: 110px;
cursor: pointer; cursor: pointer;
background-color: #fff !important; background-color: #fff !important;
} }
......
...@@ -108,6 +108,7 @@ import Vue from 'vue' ...@@ -108,6 +108,7 @@ import Vue from 'vue'
import SelectMembers from './components/selectMembers.vue' import SelectMembers from './components/selectMembers.vue'
// import Preview from './components/preview.vue' // import Preview from './components/preview.vue'
export default { export default {
name: 'guestGroupAdd',
components: { components: {
// WelcomeWords, // WelcomeWords,
SelectMembers SelectMembers
...@@ -138,34 +139,51 @@ export default { ...@@ -138,34 +139,51 @@ export default {
} }
} }
} }
const nameVaild = (rule, value, callback) => {
console.log(this.$route.params.id)
if (value) {
const params = {
templateName: value
}
let api = 'nameVaild'
if (this.$route.params.id) {
params.id = this.$route.params.id
api = 'updateNameVaild'
}
this.$apis.groupGuest[api](params).then(res => {
if (res) {
callback(new Error('群聊名称不可重复'))
} else {
callback()
}
})
}
}
return { return {
eventBus: new Vue(), eventBus: new Vue(),
basicForm: {}, basicForm: {},
basicRules: { basicRules: {
orgName: [{ required: true, message: '请输入组名', trigger: 'blur' }], orgName: [{ required: true, message: '请输入组名', trigger: 'change' }],
groupName: [{ required: true, message: '请输入群聊名称', trigger: 'blur' }], groupName: [{ required: true, message: '请输入群聊名称', trigger: 'change' },
{ validator: nameVaild, trigger: 'blur' }],
userList: [ userList: [
// { required: true, message: '请选择默认成员', trigger: 'change' }, // { required: true, message: '请选择默认成员', trigger: 'change' },
{ validator: validatorUser, trigger: 'change' } { validator: validatorUser, trigger: 'blur' }
] ]
}, },
membersVisible: false, membersVisible: false,
key: new Date(), key: new Date(),
previewFlag: false, previewFlag: false,
selectData: [] selectData: [],
editStatus: false
} }
}, },
watch: { watch: {
$route(val) { basicForm: {
if (val.params) { handler(val) {
const id = val.params.id this.editStatus = true
if (id && id != -1) { },
this.getDetail(id) deep: true
} else {
if (this.$refs.groupForm) this.$refs.groupForm.clearValidate()
this.selectData = []
}
}
} }
}, },
mounted() { mounted() {
...@@ -223,7 +241,7 @@ export default { ...@@ -223,7 +241,7 @@ export default {
type: 'success', type: 'success',
message: '操作成功!' message: '操作成功!'
}) })
this.handleCancel() this.$router.push('/guestGroup/index')
} }
}) })
.catch(err => { .catch(err => {
...@@ -248,15 +266,28 @@ export default { ...@@ -248,15 +266,28 @@ export default {
} }
// this.$refs.welcome.updateList(res.attachmentList) // this.$refs.welcome.updateList(res.attachmentList)
this.selectData = res.userList this.selectData = res.userList
this.$nextTick(()=>{
this.editStatus = false
})
} }
}) })
}, },
handleCancel() { handleCancel() {
// this.$router.go(-1) // this.$router.go(-1)
this.$router.push({ path: '/guestGroup/index' }) // this.$router.push({ path: '/guestGroup/index' })
this.basicForm = {} if (this.editStatus) {
// this.$refs.welcome.updateList([]) this.$confirm('当前有内容信息未保存,是否继续返回?', '提示', {
this.selectData = [] confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
this.$router.push('/guestGroup/index')
})
.catch(() => {})
} else {
this.$router.push('/guestGroup/index')
}
}, },
remove(val, idx) { remove(val, idx) {
console.log(val, idx) console.log(val, idx)
......
...@@ -87,8 +87,10 @@ export default { ...@@ -87,8 +87,10 @@ export default {
this.$apis.groupGuest.listDepartmentTree(params).then(res => { this.$apis.groupGuest.listDepartmentTree(params).then(res => {
this.listTree = res this.listTree = res
this.loading = false this.loading = false
// this.listTree[0].entmicroStaffResponses = this.getEmployee(this.listTree) if (this.listTree.length) {
this.currentArr = this.$common.utils.deepClone(this.listTree[0].entmicroStaffResponses) this.listTree[0].entmicroStaffResponses = this.getEmployee(this.listTree)
this.currentArr = this.$common.utils.deepClone(this.listTree[0].entmicroStaffResponses)
}
this.selectData.forEach(i => { this.selectData.forEach(i => {
const row = this.getEmployee(this.listTree).find(j => j.id == i.staffId) const row = this.getEmployee(this.listTree).find(j => j.id == i.staffId)
this.clearSelect(row) this.clearSelect(row)
...@@ -108,14 +110,18 @@ export default { ...@@ -108,14 +110,18 @@ export default {
handleNodeClick(data) { handleNodeClick(data) {
this.departmentId = data.id this.departmentId = data.id
this.tableEmpData = data.entmicroStaffResponses this.tableEmpData = data.entmicroStaffResponses
this.currentArr = this.$common.utils.deepClone(data.entmicroStaffResponses) // this.currentArr = this.$common.utils.deepClone(data.entmicroStaffResponses)
// this.listEntmicroStaff() // this.listEntmicroStaff()
}, },
getEmployee(d, arr = []) { getEmployee(d, arr = []) {
d.forEach(i => { d.forEach(i => {
if (i.entmicroStaffResponses) { if (i.entmicroStaffResponses) {
i.entmicroStaffResponses.forEach(j => { i.entmicroStaffResponses.forEach(j => {
arr.push(j) // arr.push(j)
const flag = arr.find(m => m.id == j.id)
if (!flag) {
arr.push(j)
}
}) })
} }
if (i.children) { if (i.children) {
......
<template> <template>
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<div class="btn-header"> <div class="btn-header">
<button class="addBtn" @click="btnClick('create')">新建群组</button> <!-- <el-button class="addBtn" @click="btnClick('create')">新建群组</el-button> -->
<GLButton class="addBtn" @click="btnClick('create')" fn="新建群组">新建群组</GLButton>
<span class="toptips"> <span class="toptips">
<span>配置群聊不会自动拉群,邀请客户入群后群聊才会正式生效,一个客户默认拉一个群聊。</span> <span>配置群聊不会自动拉群,邀请客户入群后群聊才会正式生效,一个客户默认拉一个群聊。</span>
</span> </span>
...@@ -69,11 +70,13 @@ ...@@ -69,11 +70,13 @@
>{{ scope.scope.status == '1' ? '启用' : '停用' }}</span> >{{ scope.scope.status == '1' ? '启用' : '停用' }}</span>
</span> </span>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <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('edit', scope.scope)">修改</el-button> -->
<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>
<!-- <el-button
type="text" type="text"
@click="btnClick('status', scope.scope)" @click="btnClick('status', scope.scope)"
>{{ scope.scope.status == 1 ? '停用' : '启用' }}</el-button> >{{ scope.scope.status == 1 ? '停用' : '启用' }}</el-button> -->
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -84,6 +87,7 @@ ...@@ -84,6 +87,7 @@
<script> <script>
import url from '@/assets/clientDataOverview/nodata.png' import url from '@/assets/clientDataOverview/nodata.png'
export default { export default {
name: 'guestGroup',
data() { data() {
return { return {
url: url, url: url,
...@@ -229,11 +233,11 @@ export default { ...@@ -229,11 +233,11 @@ export default {
] ]
} }
}, },
watch: { // watch: {
$route(val) { // $route(val) {
if (val.path == '/guestGroup/index') this.searchTable() // if (val.path == '/guestGroup/index') this.searchTable()
} // }
}, // },
mounted() {}, mounted() {},
methods: { methods: {
//搜索表格 //搜索表格
...@@ -267,7 +271,7 @@ export default { ...@@ -267,7 +271,7 @@ export default {
this.searchTable() this.searchTable()
this.$message({ this.$message({
type: 'success', type: 'success',
message: '操作成功!' message: '操作成功'
}) })
} }
}) })
......
...@@ -2,11 +2,11 @@ const path = require('path') ...@@ -2,11 +2,11 @@ const path = require('path')
const webpack = require('webpack') const webpack = require('webpack')
const packageName = require('./package.json').name const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production' const node_env = process.env.NODE_ENV === 'production'
// const baseUrl = process.env.VUE_APP_BASE_URL; // const baseUrl = process.env.VUE_APP_BASE_URL;
const publicPath = node_env ? `/child/${packageName}/` : '/' const publicPath = node_env ? `/child/${packageName}/` : '/'
const baseUrl = '/' const baseUrl = '/'
const resolve = dir => path.join(__dirname, dir) const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://cdn.bootcdn.net/' const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const cdn = { const cdn = {
css: [ css: [
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css` `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`
...@@ -17,13 +17,13 @@ const cdn = { ...@@ -17,13 +17,13 @@ const cdn = {
`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.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/vuex/3.6.2/vuex.min.js`,
// `${CDN_DOMAIN}ajax/libs/axios/0.21.0/axios.min.js`, // `${CDN_DOMAIN}ajax/libs/axios/0.21.0/axios.min.js`,
`${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js` `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`
] ]
} }
module.exports = { module.exports = {
outputDir: `../dist/${packageName}`, outputDir: `../dist/${packageName}`,
publicPath ,//node_env ? baseUrl : '/' publicPath,//node_env ? baseUrl : '/'
assetsDir: 'static', assetsDir: 'static',
configureWebpack: { configureWebpack: {
resolve: { resolve: {
...@@ -34,15 +34,15 @@ module.exports = { ...@@ -34,15 +34,15 @@ module.exports = {
components: resolve('src/components'), components: resolve('src/components'),
// 'jquery': 'jquery' // 'jquery': 'jquery'
} }
}, },
plugins: [ plugins: [
new webpack.ProvidePlugin({ new webpack.ProvidePlugin({
$: 'jquery', // 创建 '$'、'jQuery'、'window.jQuery' 三个变量指向依赖jquery $: 'jquery', // 创建 '$'、'jQuery'、'window.jQuery' 三个变量指向依赖jquery
jQuery: 'jquery', jQuery: 'jquery',
'window.jQuery': 'jquery' 'window.jQuery': 'jquery'
}) })
], ],
output: { output: {
library: `${packageName}-[name]`, library: `${packageName}-[name]`,
libraryTarget: 'umd', // 把微应用打包成 umd 库格式 libraryTarget: 'umd', // 把微应用打包成 umd 库格式
...@@ -59,7 +59,7 @@ module.exports = { ...@@ -59,7 +59,7 @@ module.exports = {
}, },
devServer: { devServer: {
hot: true, hot: true,
disableHostCheck: true, disableHostCheck: true,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!