Commit 0f0f3470 by 前端

Merge branch 'v1.2.1' into 'master'

V1.2.1

See merge request !2
2 parents 912eda4d 134d362a
Showing 51 changed files with 1680 additions and 430 deletions
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
"dependencies": { "dependencies": {
"axios": "^0.21.1", "axios": "^0.21.1",
"core-js": "^3.4.4", "core-js": "^3.4.4",
"dayjs": "^1.10.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",
......
...@@ -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,guestGroup,guestGroupAdd"> <keep-alive exclude="clientDetail,clientGroupDetail,tagsManage,clientDataOverview,guestGroup,guestGroupAdd,guestGroupDetail,group,viewCustomers">
<router-view></router-view> <router-view></router-view>
</keep-alive> </keep-alive>
</div> </div>
......
...@@ -6,29 +6,50 @@ ...@@ -6,29 +6,50 @@
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
import { http } from '@/main' import { http3 } from '@/main'
// const url = 'http://192.168.3.193:8395/rop-scrm-entmicro/router'
//获取数据概览上方的数据 /rop-scrm-datahub //获取数据概览上方的数据 /rop-scrm-datahub
export function getDataOverview(params){ export function getDataOverview(params) {
params.method='entmicro.api.Customer.customer.view.data' params.method = 'entmicro.api.Customer.customer.view.data'
return http({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
//获取数据概览下方柱状图的数据 //获取数据概览下方柱状图的数据
export function getDataOverviewBarMap(params){ export function getDataOverviewBarMap(params) {
params.method='entmicro.api.customer.view.chart' params.method = 'entmicro.api.customer.view.chart'
return http({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
//客户分群列表接口
export function getCustomerList(params) {
params.method = 'entmicro.api.customer.cluster.page'
return http3({
url:'/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//客户分群列表导出
export function customerClusterListExport(params) {
params.method = 'entmicro.api.customer.customerClusterListExport'
return http3({
url:'/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
import { http } from '@/main' import { http2,http3 } from '@/main'
export function getTableList (params){ export function getTableList (params){
params.method='entmicro.api.customer.base.page' params.method='entmicro.api.customer.base.page'
return http({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
} }
export function syncCustomerBase(params){ export function syncCustomerBase(params){
params.method='entmicro.api.synchro.syncCustomerBase' params.method='entmicro.api.synchro.syncCustomerBase'
return http({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
} }
export function getTableDetail(params){ export function getTableDetail(params){
params.method='entmicro.api.customer.base.detail' params.method='entmicro.api.customer.base.detail'
return http({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
} }
export function getClientTableDetail(params){ export function getClientTableDetail(params){
params.method='entmicro.api.customer.detail' params.method='entmicro.api.customer.detail'
return http({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
// 客户群的客户列表获取分页数据接口 // 客户群的客户列表获取分页数据接口
export function getDetailTableList(params){ export function getDetailTableList(params){
params.method='entmicro.api.customer.base.cust.page' params.method='entmicro.api.customer.base.cust.page'
return http({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
...@@ -57,3 +57,106 @@ ...@@ -57,3 +57,106 @@
}) })
} }
/*
未授权时,打开进入页面即弹出提示。 触发条件:跟企业微信相关且该账户暂未绑定企业微信时提示
*/
export function getStatus(params) {
params.method = 'scrm.api.work.wechat.access.status'
return http3({
url: '/rop-scrm-wechat/router',
method: 'POST',
data: params,
sign: true
})
}
/*
跟进员工
*/
// POST /router/entmicro.api.customer.base.staff.page/1.0.0
export function getDetailStaffTableList(params){
params.method='entmicro.api.customer.base.staff.page'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
/*
退群客户
*/
export function getDetailQuitTableList(params){
params.method='entmicro.api.customer.base.quit.cust.page'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
/*
潜在客户
*/
export function getDetailPotentialTableList(params){
params.method='entmicro.api.customer.base.potential.cust.page'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
//客户群管理(群聊管理)导出
export function clientGroupExportApi(params){
params.method=`entmicro.api.customer.base.list.export`
return http3({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
// 全部客户导出
export function clientExportApi(params){
params.method=`entmicro.api.customer.base.cust.export`
return http3({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
//跟进员工导出
export function followEmployeeExportApi(params){
params.method=`entmicro.api.customer.base.staff.export`
return http3({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
//退群客户导出
export function leaveGroupExportApi(params){
params.method=`entmicro.api.customer.base.quit.export`
return http3({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
//潜在客户导出
export function potentialClientExportApi(params){
params.method=`entmicro.api.customer.base.potential.export`
return http3({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
\ No newline at end of file \ No newline at end of file
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
import { http } from '@/main' import { http, http3 } from '@/main'
// const url = 'http://192.168.3.181:9636/rop-scrm-datahub/router'
//const commonUrl='&format=json&appKey=48e5e13229b82c1b4e6e8c96151f0637&v=1.0.*×tamp=1654487354&source=sub-client-custom&sign=sdf9787dfs87987sf9879sdf87sdf' //const commonUrl='&format=json&appKey=48e5e13229b82c1b4e6e8c96151f0637&v=1.0.*×tamp=1654487354&source=sub-client-custom&sign=sdf9787dfs87987sf9879sdf87sdf'
//获取客户列表内容 //获取客户列表内容
// const GETCLIENTTABLELIST = params => { // const GETCLIENTTABLELIST = params => {
// return http({ // return http({
...@@ -23,82 +23,96 @@ ...@@ -23,82 +23,96 @@
// 获取客户详情单用户标签 // 获取客户详情单用户标签
// params.method='datahub.api.label.querylabeltree' // params.method='datahub.api.label.querylabeltree'
export function getSingleClientTag(params){ export function getSingleClientTag(params) {
params.method='scrm.api.datahub.user.getuserlabel' params.method = 'scrm.api.datahub.user.getuserlabel'
return http({ return http({
url: '/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
export function getAllTagTree (params){ export function getAllTagTree(params) {
params.method='scrm.api.datahub.label.querylabeltree' // params.method='scrm.api.datahub.label.querylabeltree'
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
return http({ return http({
url: '/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
// /router/datahub.api.user.addUserLabel/1.0.0 // /router/datahub.api.user.addUserLabel/1.0.0
// 用户添加标签 //编辑用户标签(包含标签新增列表和删除列表)
export function addSingleClientTag (params){
params.method='scrm.api.datahub.user.addUserLabel' export function addSingleClientTag(params) {
params.method = 'scrm.api.datahub.user.editUserLabel'
return http({ return http({
url: '/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
export function getTableList (params){ export function getTableList(params) {
params.method='entmicro.api.customer.page' params.method = 'entmicro.api.customer.page'
// params.sessionId="mini-e72437ba-845e-4da3-9966-0b25684d6373-rop" // params.sessionId="mini-e72437ba-845e-4da3-9966-0b25684d6373-rop"
// params.timestamp=new Date().getTime() // params.timestamp=new Date().getTime()
// +'?method=org.ore.api.customer.page' // +'?method=org.ore.api.customer.page'
return http({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
export function syncCustomer(params){ export function syncCustomer(params) {
params.method='entmicro.api.synchro.syncCustomer' params.method = 'entmicro.api.synchro.syncCustomer'
return http({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
export function getTableDetail(params){ export function getTableDetail(params) {
params.method='entmicro.api.customer.detail' params.method = 'entmicro.api.customer.detail'
// params.sessionId="mini-e72437ba-845e-4da3-9966-0b25684d6373-rop" // params.sessionId="mini-e72437ba-845e-4da3-9966-0b25684d6373-rop"
return http({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true sign: true
}) })
} }
/*获取来源字典的 /*获取来源字典的
*/ */
export function getDictionaryFun(params){ export function getDictionaryFun(params) {
params.method='entmicro.api.common.dictdata.list' params.method = 'entmicro.api.common.dictdata.list'
return http({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'GET', method: 'GET',
data: params, data: params,
sign: true sign: true
}) })
} }
// entmicro.api.customer.list.export
//客户信息管理导出
export function clientManageExportApi(params) {
params.method = `entmicro.api.customer.customerListExport`
return http3({
url: '/rop-scrm-entmicro/router',
method: 'GET',
data: params,
sign: true
})
}
\ No newline at end of file \ No newline at end of file
...@@ -6,13 +6,15 @@ ...@@ -6,13 +6,15 @@
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
import { http } from '@/main' import { http2, http3 } from '@/main'
const URL = '/rop-scrm-entmicro/router' const URL = '/rop-scrm-entmicro/router'
const PATH = 'entmicro.api.one.template.' const PATH = 'entmicro.api.one.template.'
const WURL = '/rop-scrm-wechat/router'
const PATH2 = 'entmicro.api.group.'
const templateList = params => { const templateList = params => {
params.method = `${PATH}page` params.method = `${PATH}page`
return http({ return http3({
url: URL, url: URL,
method: 'GET', method: 'GET',
data: params, data: params,
...@@ -22,7 +24,7 @@ const templateList = params => { ...@@ -22,7 +24,7 @@ const templateList = params => {
const insert = params => { const insert = params => {
params.method = `${PATH}insert` params.method = `${PATH}insert`
return http({ return http3({
url: URL, url: URL,
method: 'POST', method: 'POST',
data: params, data: params,
...@@ -32,7 +34,7 @@ const insert = params => { ...@@ -32,7 +34,7 @@ const insert = params => {
const update = params => { const update = params => {
params.method = `${PATH}update` params.method = `${PATH}update`
return http({ return http3({
url: URL, url: URL,
method: 'POST', method: 'POST',
data: params, data: params,
...@@ -42,7 +44,7 @@ const update = params => { ...@@ -42,7 +44,7 @@ const update = params => {
const detail = params => { const detail = params => {
params.method = `${PATH}detail` params.method = `${PATH}detail`
return http({ return http3({
url: URL, url: URL,
method: 'GET', method: 'GET',
data: params, data: params,
...@@ -52,7 +54,7 @@ const detail = params => { ...@@ -52,7 +54,7 @@ const detail = params => {
const status = params => { const status = params => {
params.method = `${PATH}status` params.method = `${PATH}status`
return http({ return http3({
url: URL, url: URL,
method: 'GET', method: 'GET',
data: params, data: params,
...@@ -62,7 +64,7 @@ const status = params => { ...@@ -62,7 +64,7 @@ const status = params => {
const listDepartmentTree = params => { const listDepartmentTree = params => {
params.method = 'entmicro.api.department.listDepartmentTree' params.method = 'entmicro.api.department.listDepartmentTree'
return http({ return http3({
url: URL, url: URL,
method: 'GET', method: 'GET',
data: params, data: params,
...@@ -72,7 +74,7 @@ const listDepartmentTree = params => { ...@@ -72,7 +74,7 @@ const listDepartmentTree = params => {
const nameVaild = params => { const nameVaild = params => {
params.method = 'entmicro.api.one.template.name.valid' params.method = 'entmicro.api.one.template.name.valid'
return http({ return http3({
url: URL, url: URL,
method: 'GET', method: 'GET',
data: params, data: params,
...@@ -82,7 +84,7 @@ const nameVaild = params => { ...@@ -82,7 +84,7 @@ const nameVaild = params => {
const updateNameVaild = params => { const updateNameVaild = params => {
params.method = 'entmicro.api.one.template.name.update.valid' params.method = 'entmicro.api.one.template.name.update.valid'
return http({ return http3({
url: URL, url: URL,
method: 'GET', method: 'GET',
data: params, data: params,
...@@ -90,6 +92,45 @@ const updateNameVaild = params => { ...@@ -90,6 +92,45 @@ const updateNameVaild = params => {
}) })
} }
const getStatus = params => {
params.method = 'scrm.api.work.wechat.access.status'
return http3({
url: WURL,
method: 'POST',
data: params,
sign: true
})
}
//一客一群详情页
const getListApi = params => {
params.method = `${PATH}page`
return http3({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const customerList = params => {
params.method = `${PATH2}template.customer.page`
return http3({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
const getFollower = params => {
params.method = 'entmicro.api.staff.listFollowerStaffByPage'
return http3({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
templateList, templateList,
...@@ -99,5 +140,9 @@ export default { ...@@ -99,5 +140,9 @@ export default {
update, update,
listDepartmentTree, listDepartmentTree,
nameVaild, nameVaild,
updateNameVaild getStatus,
updateNameVaild,
getListApi,
customerList,
getFollower
} }
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
import { http } from '@/main' import { http3 } from '@/main'
//计算是第几次接触该页面 //计算是第几次接触该页面
export function getLoginCount (params){ export function getLoginCount (params){
params.method='entmicro.api.common.findLoginCount' params.method='entmicro.api.common.findLoginCount'
return http({ return http3({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
data: params, data: params,
......
...@@ -6,10 +6,11 @@ ...@@ -6,10 +6,11 @@
* @param {*} params * @param {*} params
* @returns * @returns
*/ */
import { http } from '@/main' import { http, http3 } from '@/main'
// const url = 'http://192.168.3.181:9636/rop-scrm-datahub/router'
export function getTableList (params){ export function getTableList(params) {
params.method='scrm.api.datahub.label.querylabeltree' // params.method='scrm.api.datahub.label.querylabeltree'
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
return http({ return http({
url: '/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
...@@ -17,10 +18,11 @@ ...@@ -17,10 +18,11 @@
sign: true sign: true
}) })
} }
//计算表格上面的数量 //计算表格上面的数量
export function getTableTagNum(params){ export function getTableTagNum(params) {
params.method='scrm.api.datahub.label.queryLabelCount' // params.method='scrm.api.datahub.label.queryLabelCount'
params.method = 'scrm.api.datahub.labelgroup.queryLabelCount'
return http({ return http({
url: '/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
...@@ -29,42 +31,73 @@ ...@@ -29,42 +31,73 @@
sign: true sign: true
}) })
} }
// /router/datahub.api.label.addlabel/1.0.0
export function newAddTag(params){ export function newAddTag(params) {
params.method='scrm.api.datahub.label.addlabel' // params.method='scrm.api.datahub.label.addlabel'
params.method = 'scrm.api.datahub.labelgroup.addLabel'
return http({ return http({
url: '/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
//修改标签 //修改标签
export function updateTag(params){ export function updateTag(params) {
params.method='scrm.api.datahub.label.updatelabel' // params.method='scrm.api.datahub.label.updatelabel'
params.method = 'scrm.api.datahub.labelgroup.updateLabel'
return http({ return http({
url: '/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
//获取单条数据labelList数组 //获取单条数据labelList数组
export function queryLabelListByGroupId(params){ export function queryLabelListByGroupId(params) {
params.method='scrm.api.datahub.label.queryLabelListByGroupId' // params.method='scrm.api.datahub.label.queryLabelListByGroupId'
params.method = 'scrm.api.datahub.labelgroup.queryLabelListByGroupId'
return http({ return http({
url: '/rop-scrm-datahub/router', url: '/rop-scrm-datahub/router',
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll: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
})
}
//根据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
})
}
// 根据标签获取客户列表导出
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 \ No newline at end of file
@import '@/styles/variables.scss';
.el-tag { .el-tag {
color: #666!important; color: #666!important;
font-size: 14px!important; font-size: 14px!important;
...@@ -5,7 +6,7 @@ height: 26px; ...@@ -5,7 +6,7 @@ height: 26px;
line-height: 26px; line-height: 26px;
} }
.el-tag.el-tag--info { .el-tag.el-tag--info {
background: #fafbfe !important; background: transparent !important;
border: 1px solid #e8e8ea !important; border: 1px solid #e8e8ea !important;
border-radius: 4px; border-radius: 4px;
color: #666; color: #666;
...@@ -25,4 +26,54 @@ background: transparent !important; ...@@ -25,4 +26,54 @@ background: transparent !important;
border-radius: 4px; border-radius: 4px;
background-color: rgba(144, 147, 153, 0.3); 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 {
color: $btnBlue;
font-size: 16px;
}
.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: #717171;
}
.color-58{
color: #5850ff;
}
.flex-start{
align-items: flex-start;
display: flex;
}
.flex{
display:flex;
align-items: center;
flex-wrap: wrap;
}
.flex-between{
display:flex;
align-items: center;
justify-content: space-between;
}
.font-20{
font-size: 20px;
}
.font-14{
font-size: 14px;
}
\ No newline at end of file \ No newline at end of file
import Vue from 'vue' import Vue from 'vue'
import { message } from '../plugins/element.js'
// import { Message, MessageBox, Loading } from 'element-ui'; // import { Message, MessageBox, Loading } from 'element-ui';
// import moment from 'moment' // import moment from 'moment'
let loadingInstance = '' let loadingInstance = ''
export const Util = { export const Util = {
getExplorer: function() {
var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null
if (ua.match(/msie/) != null || ua.match(/trident/) != null) {
browserType = 'IE'
} else if (ua.match(/firefox/) != null) {
browserType = '火狐'
} else if (ua.match(/ubrowser/) != null) {
browserType = 'UC'
} else if (ua.match(/opera/) != null) {
browserType = '欧朋'
} else if (ua.match(/bidubrowser/) != null) {
browserType = '百度'
} else if (ua.match(/metasr/) != null) {
browserType = '搜狗'
} else if (ua.match(/tencenttraveler/) != null || ua.match(/qqbrowse/) != null) {
browserType = 'QQ'
} else if (ua.match(/maxthon/) != null) {
browserType = '遨游'
} else {
browserType = '谷歌'
}
return browserType
},
exportFn:function(url) {
let browserType = getExplorer()
if (browserType == 'QQ') {
window.open(url)
return
}
let iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = url
document.body.appendChild(iframe)
},
/** /**
* 校验手机号码格式 * 校验手机号码格式
*/ */
...@@ -26,7 +62,7 @@ export const Util = { ...@@ -26,7 +62,7 @@ export const Util = {
*/ */
isSpecialLetter: function (str) { isSpecialLetter: function (str) {
let reg = new RegExp("[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]"); let reg = new RegExp("[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]");
return reg.test(str); return reg.test(str);//true/false
}, },
/** /**
...@@ -116,10 +152,57 @@ export const Util = { ...@@ -116,10 +152,57 @@ export const Util = {
} }
return n return n
},
/**
* 处理输入框只能输入30个字符,一个汉字2个字符,字母数字1个字符,超过截取最大数量字符
*/
cutMaxCharStr:function(e){//e为传入字符串
let str = e
var len = 0
var singleNum = 0
var doubleNum = 0
for (var i = 0; i < e.length; i++) {
var c = e.charCodeAt(i)
//单字节加1
if ((c >= 0x0001 && c <= 0x007e) || (0xff60 <= c && c <= 0xff9f)) {
len++
} else {
len += 2
}
}
if (len > 30) {
message.error('字数已达上限')
var subLen = 0
var subLen1 = 0
var subLen2 = 0
for (var v = 0; v < e.length; v++) {
var ch = e.charCodeAt(v)
//单字节
if ((ch >= 0x0001 && ch <= 0x007e) || (0xff60 <= ch && ch <= 0xff9f)) {
singleNum += 1
subLen1++
} else {
doubleNum += 2
subLen2++
}
if (singleNum + doubleNum >= 30) {
subLen = subLen1 + subLen2
console.log(subLen1, subLen2, subLen)
console.log(singleNum, singleNum, '单双数')
break
}
}
return str.substr(0, subLen)
}
return str
} }
} }
export const validationTel = Util.validationTel; export const validationTel = Util.validationTel;
export const checkPhone = Util.checkPhone; export const checkPhone = Util.checkPhone;
export const getExplorer=Util.getExplorer;
export const exportFn=Util.exportFn;
export const cutMaxCharStr=Util.cutMaxCharStr;
<template> <template>
<div> <div>
<el-dialog <el-dialog :title="title" :visible.sync="isVisible" :before-close="handleClose" :close-on-click-modal="false" :width="width" :show-close="isShowCloseBtn" :destroy-on-close="isDestroyClose" class="app-dialog">
:title="title"
:visible.sync="isVisible"
:before-close="handleClose"
:close-on-click-modal="false"
:width="width"
:show-close="isShowCloseBtn"
class="app-dialog"
>
<!-- :modal-append-to-body="false" <!-- :modal-append-to-body="false"
:append-to-body="true"--> :append-to-body="true"-->
<div class="container"> <div class="container">
...@@ -18,12 +10,7 @@ ...@@ -18,12 +10,7 @@
<div slot="footer"> <div slot="footer">
<slot name="btn-front"></slot> <slot name="btn-front"></slot>
<el-button size="small" @click="handleClose" v-if="isHasCancelBtn">取消</el-button> <el-button size="small" @click="handleClose" v-if="isHasCancelBtn">取消</el-button>
<el-button <el-button type="primary" size="small" @click="handleConfirm" :loading="btnLoading">{{ btnOkLabel }}</el-button>
type="primary"
size="small"
@click="handleConfirm"
:loading="btnLoading"
>{{ btnOkLabel }}</el-button>
<!-- isShowThirdBtn 产品说暂时不要这个按钮--> <!-- isShowThirdBtn 产品说暂时不要这个按钮-->
<!-- <el-button v-if="false" @click="btnClick">创建标签</el-button> --> <!-- <el-button v-if="false" @click="btnClick">创建标签</el-button> -->
...@@ -44,6 +31,10 @@ export default { ...@@ -44,6 +31,10 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
isDestroyClose: {
type: Boolean,
default: false
},
isShowThirdBtn: { isShowThirdBtn: {
type: Boolean, type: Boolean,
default: false default: false
...@@ -64,7 +55,7 @@ export default { ...@@ -64,7 +55,7 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
isHasCancelBtn:{ isHasCancelBtn: {
type: Boolean, type: Boolean,
default: true default: true
} }
...@@ -89,7 +80,7 @@ export default { ...@@ -89,7 +80,7 @@ export default {
padding: 20px 20px 10px; padding: 20px 20px 10px;
} }
.el-dialog__footer { .el-dialog__footer {
padding-top:16px ; padding-top: 16px;
padding-bottom: 16px; padding-bottom: 16px;
background: #fff; background: #fff;
} }
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<el-form-item v-for="(item, index) in ruleData" :key="index" :label="item.label" :prop="item.prop || ''" :class="item.class" v-show="!item.hidden"> <el-form-item v-for="(item, index) in ruleData" :key="index" :label="item.label" :prop="item.prop || ''" :class="item.class" v-show="!item.hidden">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="item.type === 'input'"> <template v-if="item.type === 'input'">
<el-input v-if="item.clickFunc" :type="item.inputText || 'text'" :readonly="item.readonly || false" @click.native="item.clickFunc" :class="item.clickFunc ? 'pointer' : ''" :ref="item.ref" v-model="ruleForm[item.prop]" @input="update($event)"></el-input> <el-input v-if="item.clickFunc" :type="item.inputText || 'text'" :readonly="item.readonly || false" :disabled="item.disabled || false" @click.native="item.clickFunc" :class="item.clickFunc ? 'pointer' : ''" :placeholder="item.placeholder || '请输入'" :ref="item.ref" v-model.trim="ruleForm[item.prop]" @keyup.native="ruleForm[item.prop]=update($event)"></el-input>
<el-input v-else :type="item.inputText || 'text'" :readonly="item.readonly || false" :disabled="item.disabled || false" v-model="ruleForm[item.prop]" :maxlength="item.maxlength" :minlength="item.minlength" :placeholder="item.placeholder || '请输入'" :show-password="item.showPassword || false" :clearable="item.clearable" :show-word-limit="item.showWordLimit || false"></el-input> <el-input v-else :type="item.inputText || 'text'" :readonly="item.readonly || false" :disabled="item.disabled || false" v-model.trim="ruleForm[item.prop]" :maxlength="item.maxlength" :minlength="item.minlength" :placeholder="item.placeholder || '请输入'" :show-password="item.showPassword || false" :clearable="item.clearable" :show-word-limit="item.showWordLimit || false"></el-input>
</template> </template>
<template v-else-if="item.type == 'select'"> <template v-else-if="item.type == 'select'">
<el-select v-if="item.visibleFunc" v-model="ruleForm[item.prop]" :placeholder="item.placeholder || '请选择'" :filterable="item.filterable || false" @change="selectChange" @visible-change="item.visibleFunc"> <el-select v-if="item.visibleFunc" v-model="ruleForm[item.prop]" :placeholder="item.placeholder || '请选择'" :filterable="item.filterable || false" @change="selectChange" @visible-change="item.visibleFunc">
...@@ -89,7 +89,8 @@ export default { ...@@ -89,7 +89,8 @@ export default {
this.$emit('radioChange', event, prop) this.$emit('radioChange', event, prop)
}, },
update(e) { update(e) {
this.$forceUpdate() // this.$forceUpdate()
return this.$Utils.cutMaxCharStr(e.target.value)
} }
} }
} }
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
<div class="firstRowBtn" v-if="!expande && isShowBtns && isNeedThreeBtns"> <div class="firstRowBtn" v-if="!expande && isShowBtns && isNeedThreeBtns">
<el-button plain @click="resetTable" size="small">重置</el-button> <el-button plain @click="resetTable" size="small">重置</el-button>
<el-button type="primary" @click="searchTable" size="small">查询</el-button> <el-button type="primary" @click="searchTable" size="small">查询</el-button>
<el-button type="primary" size="small" @click="handleExport">导出</el-button>
<!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)" --> <!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)" -->
<!-- <el-button type="primary" @click="syncClick" :loading="ploading" size="small" >同步数据</el-button> --> <!-- <el-button type="primary" @click="syncClick" :loading="ploading" size="small" >同步数据</el-button> -->
</div> </div>
...@@ -46,17 +47,7 @@ ...@@ -46,17 +47,7 @@
<slot name="form-slot"></slot> <slot name="form-slot"></slot>
</template> </template>
</el-form-item> </el-form-item>
<!-- <el-form-item>
<template>
<slot name="formsearch-slot"></slot>
</template>
</el-form-item> -->
</div> </div>
<!-- <div class="rightBottomBtn">
<el-button plain @click="resetTable" size="small">重置</el-button>
<el-button type="primary" @click="searchTable" size="small">查询</el-button>
<el-button type="primary" @click="syncClick" :loading="ploading" size="small" v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)">同步数据</el-button>
</div> -->
</el-form> </el-form>
</div> </div>
</template> </template>
...@@ -92,6 +83,10 @@ export default { ...@@ -92,6 +83,10 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
isThreeRowShow:{
type: Boolean,
default: false
},
merchantModel: { merchantModel: {
type: Number, type: Number,
default: 1 default: 1
...@@ -123,8 +118,9 @@ export default { ...@@ -123,8 +118,9 @@ export default {
//调用默认时间(30天) //调用默认时间(30天)
this.getPassMonthFormatDate() this.getPassMonthFormatDate()
} }
this.$nextTick(()=>{
var sf = document.getElementById('searchForm') var sf = document.getElementById('searchForm')
// this.$nextTick(() => { console.log(sf.clientWidth,'555')
if (sf.clientWidth < 1280 && this.isHasSyncBtn) { if (sf.clientWidth < 1280 && this.isHasSyncBtn) {
console.log(sf.clientWidth, 'sf') console.log(sf.clientWidth, 'sf')
document.querySelector('.itemWidth').style.maxWidth = 700 + 'px' document.querySelector('.itemWidth').style.maxWidth = 700 + 'px'
...@@ -132,16 +128,26 @@ export default { ...@@ -132,16 +128,26 @@ export default {
if (sf.clientWidth < 952 && this.isHasSyncBtn) { if (sf.clientWidth < 952 && this.isHasSyncBtn) {
this.isShowBtns = false this.isShowBtns = false
} }
let lineHeight = 75 //75
let lineHeight = 75 //75
if (document.getElementById('searchForm').offsetHeight > lineHeight * 2) { if (document.getElementById('searchForm').offsetHeight > lineHeight * 2) {
// console.log('第一次searchForm高度', document.getElementById('searchForm').offsetHeight) console.log('第一次searchForm高度', document.getElementById('searchForm').offsetHeight)
this.expande = false this.expande = false
this.needShowExpande = true this.needShowExpande = true
} else { } else {
this.needShowExpande = false this.needShowExpande = false
this.expande = true this.expande = true
} }
if( sf.clientWidth< 840 && this.isThreeRowShow){
document.querySelector('.itemWidth').style.minHeight= document.querySelector('.itemWidth').offsetHeight + 50 + 'px'
// 客户群里面四个表做特殊处理,当为苹果笔记本电脑尺寸时,不是现实展开收起按钮
this.needShowExpande = false
this.expande = true
}
})
//有数据不算表格高度,没数据算高度 //有数据不算表格高度,没数据算高度
// setTimeout(() => { // setTimeout(() => {
// this.$emit('setTableHeightEvent') // this.$emit('setTableHeightEvent')
...@@ -209,12 +215,15 @@ export default { ...@@ -209,12 +215,15 @@ export default {
syncClick() { syncClick() {
this.$emit('syncClick') this.$emit('syncClick')
}, },
handleExport(){
this.$emit('handleExport')
},
expandeClick() { expandeClick() {
this.expande = !this.expande this.expande = !this.expande
setTimeout(() => { // setTimeout(() => {
this.$emit('setTableHeightEvent') // this.$emit('setTableHeightEvent')
}, 200) // }, 200)
}, },
//时间选择器显示默认一月的时间 //时间选择器显示默认一月的时间
/* 获取过去时间,并传值给现在时间 */ /* 获取过去时间,并传值给现在时间 */
...@@ -256,8 +265,9 @@ export default { ...@@ -256,8 +265,9 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss">
@import '@/styles/variables.scss';
.search-form { .search-form {
padding: 18px 25px 0 0; padding: 18px 0 0 0;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
min-height: 50px; min-height: 50px;
...@@ -271,11 +281,11 @@ export default { ...@@ -271,11 +281,11 @@ export default {
right: 52px; right: 52px;
z-index: 1; z-index: 1;
.el-button + .el-button { .el-button + .el-button {
margin-left: 20px; margin-left: 10px;
} }
} }
.itemWidth { .itemWidth {
max-width: 1050px; max-width: 1027px;
min-width: 660px; min-width: 660px;
} }
.expande-button-wrap { .expande-button-wrap {
...@@ -284,7 +294,7 @@ export default { ...@@ -284,7 +294,7 @@ export default {
right: 0; right: 0;
z-index: 99; z-index: 99;
.expande-button { .expande-button {
color: #5850ff; color: $btnBlue;
cursor: pointer; cursor: pointer;
i { i {
height: 8px; height: 8px;
...@@ -293,7 +303,7 @@ export default { ...@@ -293,7 +303,7 @@ export default {
height: 20px; height: 20px;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #5850ff; color: $btnBlue;
line-height: 20px; line-height: 20px;
} }
} }
...@@ -314,6 +324,9 @@ export default { ...@@ -314,6 +324,9 @@ export default {
.el-select { .el-select {
width: 215px; width: 215px;
} }
.el-select>.el-input{
width: 215px;
}
.el-form-item__content { .el-form-item__content {
width: 100%; width: 100%;
} }
......
<template>
<div>
<div class="initPanel" :style="{ width: panelWidth, minHeight: panelMinHeight }">
{{ panelContent }}
<img src="@/assets/tagsManage/Shape.png" alt="" />
<i class="el-icon-close" v-if="isShowCloseBtn" @click="closeInitPanel"></i>
</div>
</div>
</template>
<script>
export default {
props: {
panelWidth: {
type: String,
default: ''
},
panelMinHeight: {
type: String,
default: '20px'
},
panelContent: {
type: String,
default: '请传入面板内容'
},
isShowCloseBtn:{
type:Boolean,
default:false
}
},
data() {
return {}
},
methods: {
closeInitPanel() {
this.$emit('closePanel')
}
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
.initPanel {
position: relative;
margin-bottom: 20px;
box-sizing: border-box;
background: #e6e9ff;
border: 1px solid $btnBlue;
border-radius: 4px;
padding: 10px 38px;
font-size: 14px;
font-weight: 400;
color: rgba(0, 0, 0, 0.65);
line-height: 20px;
img {
position: absolute;
left: 16px;
top: 13px;
}
i {
position: absolute;
top: 14px;
right: 18px;
width: 9px;
height: 9px;
cursor: pointer;
}
}
</style>
...@@ -19,7 +19,7 @@ export const fetchConfig = function (isEnv = true) { ...@@ -19,7 +19,7 @@ export const fetchConfig = function (isEnv = true) {
} }
// https://oss-config.test.glsx.com.cn/mock/6136bea6ceeb5a5c2bec6950/base // https://oss-config.test.glsx.com.cn/mock/6136bea6ceeb5a5c2bec6950/base
// https://oss-config.test.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config // https://oss-config.test.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config
return new Http({request:{timeout:3000}}).get('https://oss-config.test.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config') return new Http({request:{timeout:3000}}).get('https://oss-config.test.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config2')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -29,6 +29,7 @@ Vue.config.productionTip = false ...@@ -29,6 +29,7 @@ Vue.config.productionTip = false
Vue.prototype.$apis = apis Vue.prototype.$apis = apis
Vue.use(glsxTable); Vue.use(glsxTable);
Vue.prototype.$message = message Vue.prototype.$message = message
Vue.prototype.size = 'small'
// Vue.prototype.btn_size = 'mini' // Vue.prototype.btn_size = 'mini'
Vue.prototype.$Constants = Constants Vue.prototype.$Constants = Constants
Vue.prototype.$Utils = Util Vue.prototype.$Utils = Util
...@@ -41,4 +42,6 @@ Object.keys(filters).forEach(key => { ...@@ -41,4 +42,6 @@ Object.keys(filters).forEach(key => {
start() start()
export { bootstrap, mount, unmount } from '@/setup' export { bootstrap, mount, unmount } from '@/setup'
export const http = params => Vue.prototype.$http(params) export const http = params => Vue.prototype.$http(params)
export const http2 = params => Vue.prototype.$http2(params)
export const http3 = params => Vue.prototype.$http3(params)
export const http_common = params => Vue.prototype.$http_common(params) export const http_common = params => Vue.prototype.$http_common(params)
...@@ -18,11 +18,18 @@ const staticRoutes = Object.freeze([ ...@@ -18,11 +18,18 @@ const staticRoutes = Object.freeze([
meta: {} meta: {}
}, },
{ {
name: 'clientDataOverview',
path: "/clientDataOverview/group/:id",
component: resolve => require([`@/views/clientDataOverview/group.vue`], resolve),
meta: {}
},
{
name: 'clientManage', name: 'clientManage',
path: "/clientManage/index", path: "/clientManage/index",
component: resolve => require([`@/views/clientManage/index.vue`], resolve), component: resolve => require([`@/views/clientManage/index.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'clientDetail', name: 'clientDetail',
path: "/clientManage/clientDetail", path: "/clientManage/clientDetail",
...@@ -54,6 +61,12 @@ const staticRoutes = Object.freeze([ ...@@ -54,6 +61,12 @@ const staticRoutes = Object.freeze([
meta: {} meta: {}
}, },
{ {
name: 'viewCustomers',
path: "/tagsManage/viewCustomers/:info/:type",
component: resolve => require([`@/views/tagsManage/viewCustomers.vue`], resolve),
meta: {},
},
{
name: 'expand', name: 'expand',
path: "/expand/index", path: "/expand/index",
component: resolve => require([`@/views/expand/index.vue`], resolve), component: resolve => require([`@/views/expand/index.vue`], resolve),
...@@ -88,47 +101,53 @@ const staticRoutes = Object.freeze([ ...@@ -88,47 +101,53 @@ const staticRoutes = Object.freeze([
path: "/guestGroup/add/:id", path: "/guestGroup/add/:id",
component: resolve => require([`@/views/guestGroup/add.vue`], resolve), component: resolve => require([`@/views/guestGroup/add.vue`], resolve),
meta: {} meta: {}
},
{
name: 'guestDetail',
path: "/guestGroup/detail/:id",
component: resolve => require([`@/views/guestGroup/detail.vue`], resolve),
meta: {}
} }
]) ])
export default staticRoutes export default staticRoutes
// { // {
// path: "/clientMassTexting", // path: "/clientMassTexting",
// name: "clientMassTexting", // name: "clientMassTexting",
// meta: { title: "客户群发" }, // meta: { title: "客户群发" },
// hidden: true, // hidden: true,
// keepAlive: false, // keepAlive: false,
// component: () => import("../views/clientMassTexting/index.vue"), // component: () => import("../views/clientMassTexting/index.vue"),
// }, // },
// { // {
// path: "/clientMassTexting/addMassTexting", // path: "/clientMassTexting/addMassTexting",
// name: "addMassTexting", // name: "addMassTexting",
// meta: { title: "新增群发" }, // meta: { title: "新增群发" },
// hidden: true, // hidden: true,
// keepAlive: false, // keepAlive: false,
// component: () => import("../views/clientMassTexting/addMassTexting.vue"), // component: () => import("../views/clientMassTexting/addMassTexting.vue"),
// }, // },
// { // {
// path: "/clientMassTexting/detailMassTexting", // path: "/clientMassTexting/detailMassTexting",
// name: "detailMassTexting", // name: "detailMassTexting",
// meta: { title: "群发详情" }, // meta: { title: "群发详情" },
// hidden: true, // hidden: true,
// keepAlive: false, // keepAlive: false,
// component: () => import("../views/clientMassTexting/detailMassTexting.vue"), // component: () => import("../views/clientMassTexting/detailMassTexting.vue"),
// }, // },
// { // {
// path: "/clientPartGroup", // path: "/clientPartGroup",
// name: "clientPartGroup", // name: "clientPartGroup",
// meta: { title: "客户分群" }, // meta: { title: "客户分群" },
// hidden: true, // hidden: true,
// keepAlive: false, // keepAlive: false,
// component: () => import("../views/clientPartGroup/index.vue"), // component: () => import("../views/clientPartGroup/index.vue"),
// }, // },
// { // {
// path: "/crowdCircleImage", // path: "/crowdCircleImage",
// name: "crowdCircleImage", // name: "crowdCircleImage",
// meta: { title: "人群圈像" }, // meta: { title: "人群圈像" },
// hidden: true, // hidden: true,
// keepAlive: false, // keepAlive: false,
// component: () => import("../views/clientPartGroup/crowdCircleImage.vue"), // component: () => import("../views/clientPartGroup/crowdCircleImage.vue"),
// }, // },
\ No newline at end of file \ No newline at end of file
...@@ -12,13 +12,18 @@ import 'glsx-components/dist/glsx-components.css' ...@@ -12,13 +12,18 @@ import 'glsx-components/dist/glsx-components.css'
let routes = [] let routes = []
let router = null let router = null
let instance = null let instance = null
// http:调的是新版标签的接口,http2:调的是客户相关接口;http3:企微授权那边的接口 目前导出接口都测试的:http3
export async function bootstrap({ name, id, history, common, messenger, globalState,routerBase }) { 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,request2,request3, request4,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
Vue.prototype.$globalState = globalState Vue.prototype.$globalState = globalState
Vue.prototype.$common = common Vue.prototype.$common = common
Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } }) Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue.prototype.$http2 = new common.Http({ response, request: request2, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
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.prototype.$setGlobalState = globalState.actions.setGlobalState
//Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) //Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
......
...@@ -10,7 +10,10 @@ ...@@ -10,7 +10,10 @@
.green-text { .green-text {
color: #00A854; color: #00A854;
} }
.gray-text{
color:#666666;
margin-left:6px;
}
.red-text { .red-text {
color: rgb(255, 0, 0); color: rgb(255, 0, 0);
} }
...@@ -22,7 +25,7 @@ ...@@ -22,7 +25,7 @@
} }
} }
.pure-blue-text{ .pure-blue-text{
color:$btnBlue; color:$btnBlue!important;
} }
.green { .green {
background-color: #00A854; background-color: #00A854;
......
@import './variables.scss'; @import './variables.scss';
@import './common.scss'; @import './common.scss';
@import './resetelement.scss'; @import './resetelement.scss';
body,
html {
body,html{ width: 100%;
width:100%; height: 100%;
margin: 0;
height:100%; padding: 0;
margin:0;
padding:0;
overflow: hidden; overflow: hidden;
background-color: $bgColor; background-color: $bgColor;
}
}
// #app {
#app { // height: 100%;
height: 100%; // overflow: auto;
overflow: auto; // }
// html, body, #app {
} // width: 100%;
// height: 100%;
// html, body, #app { // }
// width: 100%;
// height: 100%;
// }
// 默认去掉所有p元素的上下边距 // 默认去掉所有p元素的上下边距
p{ p {
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 0;
} }
button{
button {
border: none; border: none;
&:hover{ &:hover {
cursor: pointer; cursor: pointer;
} }
} }
// 子系统不设外边距
.scrm-sub-client-container{ // 子系统不设外边距
.scrm-sub-client-container {
padding: 0 20px 20px 40px; padding: 0 20px 20px 40px;
} }
.el-table .cell{
.el-table .cell {
// line-height: 20px!important; // line-height: 20px!important;
}
\ No newline at end of file \ No newline at end of file
}
\ No newline at end of file \ No newline at end of file
...@@ -21,59 +21,8 @@ ...@@ -21,59 +21,8 @@
line-height: 28px; line-height: 28px;
} }
// .el-dialog__footer { /deep/ .el-input__inner:focus{border-color:$btnBlue!important;}
// .el-button+.el-button {
// margin-left: 20px;
// }
// .el-button {
// font-size: 14px;
// font-weight: 400;
// padding: 9px 21px;
// background: $btnBlue;
// border-radius: 4px;
// }
// .el-button:first-child {
// background: #ffffff;
// border-radius: 4px;
// border: 1px solid #999999;
// box-sizing: border-box;
// font-weight: 600;
// color: #999999;
// &:hover{
// border-color: $btnBlue;
// color: $btnBlue;
// }
// }
// .el-button:nth-child(2){
// // height: 32px;
// background: $btnBlue;
// border: 1px solid $btnBlue;
// color: #fff;
// border:1px solid $btnBlue;
// &:hover{
// background-color: $lightBtnBlue;
// border:1px solid $lightBtnBlue;
// }
// }
// .el-button:nth-child(3){
// background: #ffffff;
// border: 1px solid #999999;
// box-sizing: border-box;
// font-weight: 600;
// color: #999999;
// &:hover{
// border-color: $btnBlue;
// color: $btnBlue;
// }
// }
// }
/deep/ .el-input__inner:focus{border-color:$borderBlue!important;}
/deep/.el-range-editor.is-active, /deep/.el-range-editor.is-active,
.el-range-editor.is-active:hover { .el-range-editor.is-active:hover {
border-color: $borderBlue; border-color: $btnBlue;
} }
// /deep/.el-table__fixed-right{
// height: 100% !important;
// }
\ No newline at end of file \ No newline at end of file
$bgColor:#F4F5FA; $bgColor:#F4F5FA;
$btnBlue:#5850ff; $btnBlue:#5850ff;
$borderBlue:#5850ff;
$lightBtnBlue:#9994FF; $lightBtnBlue:#9994FF;
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.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--
}
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.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.openUrl = function (url) {
const link = document.createElement('a')
link.href = url
link.target = '_blank'
link.rel = 'opener'
link.click()
}
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;
}
export default util
\ No newline at end of file \ No newline at end of file
<template>
<div class="scrm-sub-client-container">
<div class="head-container">
<div class="head-container-title color-3 font-20"> {{describeData[id-1].name}}</div>
<div class="head-container-content color-6 font-14">{{ describeData[id-1].info }}</div>
<!-- <div class="reminder font-14 color-3">企业标签 | 自动更新</div> -->
<div class="back color-58 font-14" @click="goBack">返回人群管理</div>
</div>
<div class="main-container">
<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>
</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">
<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">
<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 style="padding-bottom:3px !important" v-for="(i, index) in scope.scope.nickNameList" :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>
</GLTable>
</div>
</div>
</template>
<script>
import { getCustomerList, customerClusterListExport } from '@/api/modules/clientDataOverview'
import url from '@/assets/empty.png'
export default {
name: 'group',
data() {
return {
getListApi: getCustomerList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
tableSearchForm: {},
id: this.$route.params.id ? this.$route.params.id : '',
totalCount: '',
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '客户名称',
prop: 'customerName',
addHtml: 'customerName',
minWidth: '120'
},
{
label: '企微名称',
prop: 'nickNameList',
addHtml: 'nickNameList',
minWidth: 200
},
{
label: '联系电话',
prop: 'customerPhone',
minWidth: '110'
},
{
label: '车牌号',
prop: 'carNumber'
},
{
label: '车架号(后6位)',
prop: 'carVin',
minWidth: '110'
},
{
label: '车系',
prop: 'audi',
line: 2
},
{
label: '跟进员工',
prop: 'followStaff',
// addHtml: 'followStaff',
minWidth: 140
},
{
label: '是否加企微', //1. 加入,0.未加入
prop: 'isJoinName',
width: 100
},
{
label: '添加时间',
prop: 'addTime',
width: 150
}
]
},
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天未到店的客户'
}
],
url: url,
//describeData: ['无购车且无其他交易行为的所有客户', '在潜在意向客户中,已加企微的客户', '在潜在意向客户中,未加企微的客户', '有购车或其他交易行为的所有客户', '在基盘客户中,已加企微的客户', '在基盘客户中,未加企微的客户', '购车时间3个月的客户', '近一个月内车险即将到期的客户', '购车时间5~7个月内,且无保养记录的客户', '超过180天未到店的客户']
}
},
created() {
let { id } = this
this.init(id)
},
computed: {
describe() {
let id = this.id - 1
return this.describeData[id]
}
},
methods: {
init(id) {
this.tableSearchForm = {
crowdId: id
}
// this.getTotalCount()
},
//导出
handleExport() {
var params = {
crowdId: this.id,
pageSize: 10,
pageNum: 1
}
customerClusterListExport(params).then(res => {
this.$Utils.exportFn(res)
})
},
setTableFinishFun() {
this.totalCount = this.$refs.groupRef.total
this.$refs.groupRef.data.length ? (this.$refs.groupRef.tableHeightValues = '') : this.$refs.groupRef.setTableHeightFun()
},
goBack() {
this.$router.replace({ path: '/clientDataOverview/index' })
}
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
.expandImg {
display: flex;
justify-content: center;
.smallFontSize {
margin-left: 2px;
height: 20px;
font-size: 12px;
letter-spacing: 0;
line-height: 20px;
font-weight: 400;
}
.imgEll {
margin-left: 6.5px;
cursor: pointer;
// margin-bottom:3px;
}
}
.pure-green-text {
color: #61cc43;
}
.pure-yello-text {
color: #fb8f28;
}
.scrm-sub-client-container {
.head-container {
position: relative;
margin-bottom: 10px;
width: 100%;
height: 112px;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
padding: 20px;
box-sizing: border-box;
&-title {
font-weight: 500;
line-height: 20px;
letter-spacing: 1px;
margin-bottom: 10px;
}
&-content {
font-weight: 400;
line-height: 20px;
width: calc(100% - 156px);
}
.back {
font-weight: 400;
line-height: 22px;
padding: 5px 16px;
border-radius: 4px;
border: 1px solid $btnBlue;
position: absolute;
right: 20px;
top: 20px;
color: $btnBlue;
cursor: pointer;
}
}
.main-container {
width: 100%;
height: 100%;
background: #ffffff;
box-shadow: 0px 10px 20px 0px rgba(88, 80, 255, 0.1);
padding: 20px;
box-sizing: border-box;
.main-container-head {
margin-bottom: 20px;
&-title {
font-weight: 500;
line-height: 20px;
letter-spacing: 1px;
}
&-number {
color: $btnBlue;
margin-left: 6px;
font-weight: 400;
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);
}
}
}
.pure-blue-text {
color: #61cc43;
}
.pure-yello-text {
color: #fb8f28;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div class="sub-container"> <div class="sub-container">
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent"> <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"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button>
</span> </span>
</search-form> </search-form>
<!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 --> <!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 -->
...@@ -13,7 +14,8 @@ ...@@ -13,7 +14,8 @@
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span> <span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span>
</el-tooltip> </el-tooltip>
<span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span> <span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : scope.scope.type == null ? '' :''}}</span>
<!-- <span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' :''}}</span> -->
</span> </span>
<span slot="customerSex" slot-scope="scope"> <span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span> <span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
...@@ -29,7 +31,7 @@ ...@@ -29,7 +31,7 @@
</template> </template>
<script> <script>
import { getDetailTableList } from '@/api/modules/clientGroupManage' import { getDetailTableList,clientExportApi } from '@/api/modules/clientGroupManage'
export default { export default {
props: { props: {
url: { url: {
...@@ -98,16 +100,19 @@ export default { ...@@ -98,16 +100,19 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '本群昵称', label: '本群昵称',
prop: 'groupNickName' prop: 'groupNickName',
minWidth:120
}, },
{ {
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
addHtml: 'customerName' addHtml: 'customerName',
minWidth: 150
}, },
{ {
label: '手机号码', label: '手机号码',
prop: 'customerPhone' prop: 'customerPhone',
minWidth:120
}, },
{ {
label: '性别', label: '性别',
...@@ -117,16 +122,18 @@ export default { ...@@ -117,16 +122,18 @@ export default {
{ {
label: '入群方式', label: '入群方式',
prop: 'joinScene', prop: 'joinScene',
addHtml: 'joinScene' addHtml: 'joinScene',
minWidth:120
}, },
{ {
label: '邀请人', label: '邀请人',
prop: 'invitorName' prop: 'invitorName',
minWidth:120
}, },
{ {
label: '入群时间', label: '入群时间',
prop: 'joinTime', prop: 'joinTime',
width: 95 width: 140
} }
], ],
tableOption: { tableOption: {
...@@ -149,16 +156,31 @@ export default { ...@@ -149,16 +156,31 @@ export default {
} }
}, },
methods: { methods: {
beforeSearchFn() { getParams(){
return new Promise((resolve, reject) => { var params = JSON.parse(JSON.stringify(this.searchForm))
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm)) if (params.daterange) {
if (this.searchFormTable.daterange) { params.beginTime = this.searchForm.daterange[0]
this.searchFormTable.beginTime = this.searchForm.daterange[0] params.endTime = this.searchForm.daterange[1]
this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange
} else { } else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime if (params.beginTime) delete params.beginTime && delete params.endTime
} }
delete params.daterange
return params
},
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()
// })
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve() resolve()
}) })
}, },
...@@ -169,13 +191,20 @@ export default { ...@@ -169,13 +191,20 @@ export default {
//content是第一页的数据 //content是第一页的数据
console.log(content) console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total this.clientTableDataNum = this.$refs.clientGroupDetail.total
this.$emit('getTotal',this.clientTableDataNum) // this.$emit('getTotal',this.clientTableDataNum)
//接收到的数据为空 //接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) { // if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun() // this.$refs.clientGroupDetail.setTableHeightFun()
// } // }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun() this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
}, },
//导出
handleExport(){
var params = this.getParams()
clientExportApi(params).then(res => {
this.$Utils.exportFn(res)
})
},
//搜索表格 //搜索表格
searchTable() { searchTable() {
this.$refs.clientGroupDetail.refreshTable() this.$refs.clientGroupDetail.refreshTable()
......
<template> <template>
<div class="sub-container"> <div class="sub-container">
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent"> <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"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button>
</span> </span>
</search-form> </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"> <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">
...@@ -22,7 +23,7 @@ ...@@ -22,7 +23,7 @@
</template> </template>
<script> <script>
// import { getDetailTableList } from '@/api/modules/clientGroupManage' import { getDetailStaffTableList,followEmployeeExportApi } from '@/api/modules/clientGroupManage'
export default { export default {
props: { props: {
url: { url: {
...@@ -92,16 +93,19 @@ export default { ...@@ -92,16 +93,19 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '本群昵称', label: '本群昵称',
prop: 'groupNickName' prop: 'groupNickName',
minWidth:120
}, },
{ {
label: '员工名称', label: '员工名称',
prop: 'customerName', prop: 'staffName',
minWidth: 150
}, },
{ {
label: '手机号码', label: '手机号码',
prop: 'customerPhone' prop: 'customerPhone',
minWidth:120
}, },
{ {
label: '性别', label: '性别',
...@@ -111,21 +115,23 @@ export default { ...@@ -111,21 +115,23 @@ export default {
{ {
label: '入群方式', label: '入群方式',
prop: 'joinScene', prop: 'joinScene',
addHtml: 'joinScene' addHtml: 'joinScene',
minWidth:120
}, },
{ {
label: '邀请人', label: '邀请人',
prop: 'invitorName' prop: 'invitorName',
minWidth:120
}, },
{ {
label: '入群时间', label: '入群时间',
prop: 'joinTime', prop: 'joinTime',
width: 95 width: 140
} }
] ]
}, },
getListApi: '', getListApi: getDetailStaffTableList,
clientTableDataNum: 0 clientTableDataNum: 0
} }
}, },
...@@ -135,16 +141,31 @@ export default { ...@@ -135,16 +141,31 @@ export default {
} }
}, },
methods: { methods: {
beforeSearchFn() { getParams(){
return new Promise((resolve, reject) => { var params = JSON.parse(JSON.stringify(this.searchForm))
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm)) if (params.daterange) {
if (this.searchFormTable.daterange) { params.beginTime = this.searchForm.daterange[0]
this.searchFormTable.beginTime = this.searchForm.daterange[0] params.endTime = this.searchForm.daterange[1]
this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange
} else { } else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime if (params.beginTime) delete params.beginTime && delete params.endTime
} }
delete params.daterange
return params
},
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()
// })
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve() resolve()
}) })
}, },
...@@ -155,13 +176,20 @@ export default { ...@@ -155,13 +176,20 @@ export default {
//content是第一页的数据 //content是第一页的数据
console.log(content) console.log(content)
this.clientTableDataNum = this.$refs.clientGroupDetail.total this.clientTableDataNum = this.$refs.clientGroupDetail.total
this.$emit('getTotal',this.clientTableDataNum) // this.$emit('getTotal',this.clientTableDataNum)
//接收到的数据为空 //接收到的数据为空
// if (!this.$refs.clientGroupDetail.data.length) { // if (!this.$refs.clientGroupDetail.data.length) {
// this.$refs.clientGroupDetail.setTableHeightFun() // this.$refs.clientGroupDetail.setTableHeightFun()
// } // }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun() this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
}, },
//导出
handleExport(){
var params = this.getParams()
followEmployeeExportApi(params).then(res => {
this.$Utils.exportFn(res)
})
},
//搜索表格 //搜索表格
searchTable() { searchTable() {
this.$refs.clientGroupDetail.refreshTable() this.$refs.clientGroupDetail.refreshTable()
......
<template> <template>
<div class="sub-container"> <div class="sub-container">
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent"> <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"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button>
</span> </span>
</search-form> </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"> <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">
...@@ -12,7 +13,7 @@ ...@@ -12,7 +13,7 @@
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span> <span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span>
</el-tooltip> </el-tooltip>
<span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span> <span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : scope.scope.type == null ? '' :''}} </span>
</span> </span>
<span slot="customerSex" slot-scope="scope"> <span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span> <span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
</template> </template>
<script> <script>
// import { getDetailTableList } from '@/api/modules/clientGroupManage' import { getDetailQuitTableList,leaveGroupExportApi } from '@/api/modules/clientGroupManage'
export default { export default {
props: { props: {
url: { url: {
...@@ -96,16 +97,19 @@ export default { ...@@ -96,16 +97,19 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '本群昵称', label: '本群昵称',
prop: 'groupNickName' prop: 'groupNickName',
minWidth:120
}, },
{ {
label: '客户名称', label: '客户名称',
prop: 'customerName', prop: 'customerName',
addHtml: 'customerName' addHtml: 'customerName',
minWidth: 150
}, },
{ {
label: '手机号码', label: '手机号码',
prop: 'customerPhone' prop: 'customerPhone',
minWidth:120
}, },
{ {
label: '性别', label: '性别',
...@@ -115,16 +119,18 @@ export default { ...@@ -115,16 +119,18 @@ export default {
{ {
label: '入群方式', label: '入群方式',
prop: 'joinScene', prop: 'joinScene',
addHtml: 'joinScene' addHtml: 'joinScene',
minWidth:120
}, },
{ {
label: '邀请人', label: '邀请人',
prop: 'invitorName' prop: 'invitorName',
minWidth:120
}, },
{ {
label: '入群时间', label: '入群时间',
prop: 'joinTime', prop: 'joinTime',
width: 95 width: 140
} }
], ],
tableOption: { tableOption: {
...@@ -137,7 +143,7 @@ export default { ...@@ -137,7 +143,7 @@ export default {
] ]
} }
}, },
getListApi: '', getListApi: getDetailQuitTableList,
clientTableDataNum: 0 clientTableDataNum: 0
} }
}, },
...@@ -147,16 +153,31 @@ export default { ...@@ -147,16 +153,31 @@ export default {
} }
}, },
methods: { methods: {
beforeSearchFn() { getParams(){
return new Promise((resolve, reject) => { var params = JSON.parse(JSON.stringify(this.searchForm))
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm)) if (params.daterange) {
if (this.searchFormTable.daterange) { params.beginTime = this.searchForm.daterange[0]
this.searchFormTable.beginTime = this.searchForm.daterange[0] params.endTime = this.searchForm.daterange[1]
this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange
} else { } else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime if (params.beginTime) delete params.beginTime && delete params.endTime
} }
delete params.daterange
return params
},
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()
// })
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve() resolve()
}) })
}, },
...@@ -173,6 +194,13 @@ export default { ...@@ -173,6 +194,13 @@ export default {
// } // }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun() this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
}, },
//导出
handleExport(){
var params = this.getParams()
leaveGroupExportApi(params).then(res => {
this.$Utils.exportFn(res)
})
},
//搜索表格 //搜索表格
searchTable() { searchTable() {
this.$refs.clientGroupDetail.refreshTable() this.$refs.clientGroupDetail.refreshTable()
......
<template> <template>
<div class="sub-container"> <div class="sub-container">
<search-form class="searchTop border-shadow" :isNeedThreeBtns="false" :showDefaultTime="false" :formModel="searchForm" :formList="clientGroupFormList" @setTableHeightEvent="setTableHeightEvent"> <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"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button>
</span> </span>
</search-form> </search-form>
<!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 --> <!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 -->
...@@ -13,7 +14,7 @@ ...@@ -13,7 +14,7 @@
<span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span> <span class="ellipsis-1" style="display: inline-block; max-width: 70px; text-align: left">{{ scope.scope.customerName }}</span>
</el-tooltip> </el-tooltip>
<span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : '' }}</span> <span class="pure-blue-text">{{ scope.scope.type == 1 ? '@微信' : scope.scope.type == 2 ? '@企微' : scope.scope.type == null ? '' :''}} </span>
</span> </span>
<span slot="customerSex" slot-scope="scope"> <span slot="customerSex" slot-scope="scope">
<span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span> <span>{{ scope.scope.customerSex == 2 ? '女' : scope.scope.customerSex == 1 ? '男' : '未知' }}</span>
...@@ -29,7 +30,7 @@ ...@@ -29,7 +30,7 @@
</template> </template>
<script> <script>
import { getDetailTableList } from '@/api/modules/clientGroupManage' import { getDetailPotentialTableList,potentialClientExportApi } from '@/api/modules/clientGroupManage'
export default { export default {
props: { props: {
url: { url: {
...@@ -52,43 +53,36 @@ export default { ...@@ -52,43 +53,36 @@ export default {
} }
} }
}, },
{ // {
type: 'select', // type: 'select',
prop: 'customerSex', // prop: 'customerSex',
label: '性别', // label: '性别',
placeholder: '请选择性别', // placeholder: '请选择性别',
options: [ // options: [
{ // {
label: '全部', // label: '全部',
value: null // value: null
}, // },
{ // {
label: '男', // label: '男',
value: 1 // value: 1
}, // },
{ // {
label: '女', // label: '女',
value: 2 // value: 2
}, // },
{ // {
label: '未知', // label: '未知',
value: 0 // value: 0
} // }
] // ]
}, // },
{ {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'groupNickName', prop: 'groupNickName',
label: '本群昵称', label: '本群昵称',
placeholder: '请输入本群昵称' placeholder: '请输入本群昵称'
},
{
type: 'input',
inputType: 'text',
prop: 'customerName',
label: '客户名称',
placeholder: '请输入客户名称'
} }
], ],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
...@@ -100,20 +94,15 @@ export default { ...@@ -100,20 +94,15 @@ export default {
label: '本群昵称', label: '本群昵称',
prop: 'groupNickName' prop: 'groupNickName'
}, },
{ // {
label: '客户名称', // label: '手机号码',
prop: 'customerName', // prop: 'customerPhone'
addHtml: 'customerName' // },
}, // {
{ // label: '性别',
label: '手机号码', // prop: 'customerSex',
prop: 'customerPhone' // addHtml: 'customerSex'
}, // },
{
label: '性别',
prop: 'customerSex',
addHtml: 'customerSex'
},
{ {
label: '入群方式', label: '入群方式',
prop: 'joinScene', prop: 'joinScene',
...@@ -126,20 +115,20 @@ export default { ...@@ -126,20 +115,20 @@ export default {
{ {
label: '入群时间', label: '入群时间',
prop: 'joinTime', prop: 'joinTime',
width: 95 width: 140
} }
], ],
tableOption: { // tableOption: {
width: 80, // width: 80,
btnList: [ // btnList: [
{ // {
name: '详情', // name: '详情',
pType: 'detail' // pType: 'detail'
} // }
] // ]
} // }
}, },
getListApi: getDetailTableList, getListApi: getDetailPotentialTableList,
clientTableDataNum: 0 clientTableDataNum: 0
} }
}, },
...@@ -149,16 +138,31 @@ export default { ...@@ -149,16 +138,31 @@ export default {
} }
}, },
methods: { methods: {
beforeSearchFn() { getParams(){
return new Promise((resolve, reject) => { var params = JSON.parse(JSON.stringify(this.searchForm))
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm)) if (params.daterange) {
if (this.searchFormTable.daterange) { params.beginTime = this.searchForm.daterange[0]
this.searchFormTable.beginTime = this.searchForm.daterange[0] params.endTime = this.searchForm.daterange[1]
this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange
} else { } else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime if (params.beginTime) delete params.beginTime && delete params.endTime
} }
delete params.daterange
return params
},
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()
// })
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve() resolve()
}) })
}, },
...@@ -175,6 +179,13 @@ export default { ...@@ -175,6 +179,13 @@ export default {
// } // }
this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun() this.$refs.clientGroupDetail.data.length ? (this.$refs.clientGroupDetail.tableHeightValues = '') : this.$refs.clientGroupDetail.setTableHeightFun()
}, },
//导出
handleExport(){
var params = this.getParams()
potentialClientExportApi(params).then(res => {
this.$Utils.exportFn(res)
})
},
//搜索表格 //搜索表格
searchTable() { searchTable() {
this.$refs.clientGroupDetail.refreshTable() this.$refs.clientGroupDetail.refreshTable()
......
...@@ -3,10 +3,11 @@ ...@@ -3,10 +3,11 @@
<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="false" :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" @handleExport="handleExport" @syncClick="syncClick">
<span class="inline-b" slot="form-slot"> <span class="inline-b" slot="form-slot">
<el-button plain @click="resetTable">重置</el-button> <el-button plain @click="resetTable">重置</el-button>
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
<el-button type="primary" @click="handleExport">导出</el-button>
<!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)"允许所有人同步 --> <!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)"允许所有人同步 -->
<!-- <el-button type="primary" @click="syncClick" :loading="sloading">同步数据</el-button> --> <!-- <el-button type="primary" @click="syncClick" :loading="sloading">同步数据</el-button> -->
</span> </span>
...@@ -19,7 +20,9 @@ ...@@ -19,7 +20,9 @@
</span> </span>
<template slot="auth-button" slot-scope="scope" :data="scope.scope"> <template slot="auth-button" slot-scope="scope" :data="scope.scope">
<!-- <auth-button :data="scope.scope"></auth-button> --> <!-- <auth-button :data="scope.scope"></auth-button> -->
<span @click="goDetail(scope.scope.id, scope.scope.custGroupName)" class="blue-text">详情</span> <span @click="goDetail(scope.scope.id, scope.scope.custGroupName)" class="blue-text">
{{scope.scope.delFlag == '0' ? '详情' : scope.scope.delFlag == '-1' ? '' : ''}}
</span>
<!-- <GLButton @click="goDetail(scope.scope.id, scope.scope.custGroupName)" fn="客户群详情" type="text">详情</GLButton> --> <!-- <GLButton @click="goDetail(scope.scope.id, scope.scope.custGroupName)" fn="客户群详情" type="text">详情</GLButton> -->
</template> </template>
</GLTable> </GLTable>
...@@ -29,7 +32,7 @@ ...@@ -29,7 +32,7 @@
</template> </template>
<script> <script>
import { getTableList, syncCustomerBase } from '@/api/modules/clientGroupManage' import { getTableList, syncCustomerBase, getStatus, clientGroupExportApi } from '@/api/modules/clientGroupManage'
import url from '@/assets/clientDataOverview/nodata.png' import url from '@/assets/clientDataOverview/nodata.png'
export default { export default {
name: 'clientGroupManage', name: 'clientGroupManage',
...@@ -39,7 +42,9 @@ export default { ...@@ -39,7 +42,9 @@ export default {
isReload: true, isReload: true,
url: url, url: url,
sloading: false, sloading: false,
searchForm: {}, searchForm: {
},
searchFormTable: {}, searchFormTable: {},
clientGroupFormList: [ clientGroupFormList: [
{ {
...@@ -56,8 +61,8 @@ export default { ...@@ -56,8 +61,8 @@ export default {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'custGroupName', prop: 'custGroupName',
label: '客户群名称', label: '群聊名称',
placeholder: '请输入客户群名称' placeholder: '请输入群聊名称'
}, },
{ {
type: 'input', type: 'input',
...@@ -72,6 +77,46 @@ export default { ...@@ -72,6 +77,46 @@ export default {
prop: 'groupAdminName', prop: 'groupAdminName',
label: '管理员', label: '管理员',
placeholder: '请输入管理员' placeholder: '请输入管理员'
},
{
type: 'select',
prop: 'creationMethod',
label: '创建方式',
placeholder: '请选择',
options: [
{
label: '全部',
value: null
},
{
label: '手动拉群',
value: 1
},
{
label: '一客一群',
value: 2
}
]
},
{
type: 'select',
prop: 'delFlag',
label: '群聊状态',
placeholder: '请选择',
options: [
{
label: '全部',
value: null
},
{
label: '正常',
value: 0
},
{
label: '已解散',
value: -1
}
]
} }
], ],
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
...@@ -80,7 +125,7 @@ export default { ...@@ -80,7 +125,7 @@ export default {
listName: 'data', listName: 'data',
tableColumns: [ tableColumns: [
{ {
label: '客户群名称', label: '群聊名称',
prop: 'custGroupName', prop: 'custGroupName',
minWidth: 160 minWidth: 160
}, },
...@@ -97,12 +142,12 @@ export default { ...@@ -97,12 +142,12 @@ export default {
{ {
label: '当日新增入群客户数', label: '当日新增入群客户数',
prop: 'newCustomerCount', prop: 'newCustomerCount',
minWidth: 160 minWidth: 150
}, },
{ {
label: '当日新增退群客户数', label: '当日新增退群客户数',
prop: 'delCustomerCount', prop: 'delCustomerCount',
minWidth: 160 minWidth: 150
}, },
{ {
label: '当前跟进员工数', label: '当前跟进员工数',
...@@ -110,11 +155,6 @@ export default { ...@@ -110,11 +155,6 @@ export default {
minWidth: 140 minWidth: 140
}, },
{ {
label: '创建方式',
prop: 'creationMethod',
minWidth: 140
},
{
label: '群主', label: '群主',
prop: 'groupHostName' prop: 'groupHostName'
}, },
...@@ -123,13 +163,29 @@ export default { ...@@ -123,13 +163,29 @@ export default {
prop: 'groupAdminName' prop: 'groupAdminName'
}, },
{ {
label: '创建方式',
prop: 'creationMethod',
formatter: cellValue => {
return cellValue.creationMethod == 1 ? '手动拉群' : cellValue.creationMethod == 2 ? '一客一群' : ''
},
minWidth: 140
},
{
label: '群聊状态',
prop: 'delFlag',
width: 95,
formatter: cellValue => {
return cellValue.delFlag == 0 ? '正常' : cellValue.delFlag == -1 ? '已解散' : ''
},
},
{
label: '创建时间', label: '创建时间',
prop: 'addTime', prop: 'addTime',
width: 95 width: 140
} }
], ],
tableOption: { tableOption: {
width: 170, width: 170
// btnList: [ // btnList: [
// { // {
// name: '详情', // name: '详情',
...@@ -145,9 +201,9 @@ export default { ...@@ -145,9 +201,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容器中
...@@ -166,8 +222,38 @@ export default { ...@@ -166,8 +222,38 @@ export default {
// } // }
// } // }
// }, // },
mounted() {}, beforeDestroy() {
this.$message.closeAll()
},
mounted() {
this.wxTips()
},
methods: { methods: {
jumpWx() {
this.$history.push('/settings/enterpriseWechat/index')
},
wxTips() {
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
menu.forEach(item => {
if (!item.children) {
return
}
item.children.forEach(itm => {
if (itm.path == '/enterpriseWechat/index') {
getStatus({}).then(res => {
if (res.status != 'SUCCESS') {
const h = this.$createElement
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' }, '')])])
})
}
})
}
})
})
},
syncClick() { syncClick() {
let _this = this let _this = this
_this.sloading = true _this.sloading = true
...@@ -182,8 +268,9 @@ export default { ...@@ -182,8 +268,9 @@ export default {
}) })
.catch(err => { .catch(err => {
_this.sloading = false _this.sloading = false
}).finally(()=>{ })
_this.sloading=false; .finally(() => {
_this.sloading = false
}) })
}, },
setTableHeightEvent() { setTableHeightEvent() {
...@@ -202,19 +289,42 @@ export default { ...@@ -202,19 +289,42 @@ export default {
// } // }
this.$refs.clientGroupManage.data.length ? (this.$refs.clientGroupManage.tableHeightValues = '') : this.$refs.clientGroupManage.setTableHeightFun() this.$refs.clientGroupManage.data.length ? (this.$refs.clientGroupManage.tableHeightValues = '') : this.$refs.clientGroupManage.setTableHeightFun()
}, },
//导出
handleExport() {
var params = this.getParams()
clientGroupExportApi(params).then(res => {
this.$Utils.exportFn(res)
})
},
searchTable() { searchTable() {
this.$refs.clientGroupManage.refreshTable() this.$refs.clientGroupManage.refreshTable()
}, },
beforeSearchFn() { getParams() {
return new Promise((resolve, reject) => { var params = JSON.parse(JSON.stringify(this.searchForm))
this.searchFormTable = JSON.parse(JSON.stringify(this.searchForm)) if (params.daterange) {
if (this.searchFormTable.daterange) { params.beginTime = this.searchForm.daterange[0]
this.searchFormTable.beginTime = this.searchForm.daterange[0] params.endTime = this.searchForm.daterange[1]
this.searchFormTable.endTime = this.searchForm.daterange[1]
delete this.searchFormTable.daterange
} else { } else {
if (this.searchFormTable.beginTime) delete this.searchFormTable.beginTime && delete this.searchFormTable.endTime if (params.beginTime) delete params.beginTime && delete params.endTime
} }
console.log('params',params)
delete params.daterange
return params
},
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()
// })
return new Promise((resolve, reject) => {
this.searchFormTable = this.getParams()
resolve() resolve()
}) })
}, },
...@@ -253,13 +363,31 @@ export default { ...@@ -253,13 +363,31 @@ export default {
letter-spacing: 1px; letter-spacing: 1px;
} }
.pageContent { .pageContent {
.glsx-table {
/deep/ .el-table__fixed,
/deep/ .el-table__fixed-right {
height: 100% !important; //设置高优先,以覆盖内联样式
}
}
padding: 6px 20px 30px; padding: 6px 20px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// min-width: 1300px; // min-width: 1300px;
background-color: #fff; background-color: #fff;
.el-button + .el-button { .el-button + .el-button {
margin-left: 20px; margin-left: 10px;
}
}
.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 {
color: $btnBlue;
font-size: 16px;
} }
} }
</style> </style>
...@@ -161,6 +161,7 @@ export default { ...@@ -161,6 +161,7 @@ export default {
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/styles/variables.scss';
.select-emp-panel { .select-emp-panel {
display: flex; display: flex;
.emp-tree-panel { .emp-tree-panel {
...@@ -219,7 +220,7 @@ export default { ...@@ -219,7 +220,7 @@ export default {
margin-right: 10px; margin-right: 10px;
font-size: 15px; font-size: 15px;
/deep/ .el-tree-node:focus > .el-tree-node__content { /deep/ .el-tree-node:focus > .el-tree-node__content {
color: #5850ff; color: $btnBlue;
background: #f2f5fa; background: #f2f5fa;
} }
} }
......
<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.staffName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item size="small">
<el-button type="primary" @click="handleSearch">查询</el-button>
</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>
<div class="form-tips">必须配置至少1个跟进专员</div>
</div>
<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: 'SelectFollow',
data() {
return {
loading: false,
dialogVisible: false,
tableSearchForm: {},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'data',
tableOption: false,
// 行数据的key
mutiSelectUniqueKey: 'id',
checkSelectKey: 'id',
checkSelectVal: [],
// 多选ref的名称
mutiSelectName: 'salelist',
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '部门',
prop: 'departmentName'
},
{
label: '跟进专员类型',
prop: 'followerTypeName'
}
]
},
layout: 'total',
tableData: [],
tableTotal: 0,
selectItem: [],
selectEmp: [],
checkSelect: [],
key: new Date()
}
},
methods: {
jumpUrl() {
util.openUrl(location.origin + '/home/followUp/index')
},
getFollower() {
var params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.followTable.page.pageSize,
pageNum: this.$refs.followTable.page.pageNum
}
this.$apis.groupGuest.getFollower(params).then(res => {
this.tableData = res.data
this.tableTotal = res.count
if (res.count > 10) {
this.layout = 'total, pager'
}
this.tableData.forEach(item => {
this.selectEmp.forEach((itm, index) => {
if (itm.staffId == item.id) {
this.$refs.followTable.$refs.salelistMutiTable.toggleRowSelection(item)
this.selectEmp.splice(index, 1)
}
})
if (this.checkSelect) this.tableParams.checkSelectVal = this.checkSelect
})
})
},
init(item, checkMember) {
this.checkSelect = checkMember
this.tableSearchForm = {}
this.selectEmp = JSON.parse(JSON.stringify(item))
this.dialogVisible = true
this.$nextTick(() => {
this.$refs.followTable.page.pageNum = 1
this.getFollower()
})
},
handleSearch() {
this.getFollower()
},
selectionTable(val) {
this.selectItem = val
},
handleClose() {
this.handleCancel()
},
rowClick(row) {
if (this.checkSelect.find(i => i == row.id)) return
this.$refs.followTable.$refs.salelistMutiTable.toggleRowSelection(row)
},
handleCancel: utils.debounce(function() {
this.dialogVisible = false
this.$refs.followTable.$refs.salelistMutiTable.clearSelection()
}, 300),
handleSelect: utils.debounce(function() {
this.loading = true
let selectEmp = this.selectEmp.map(item => {
return {
id: item.staffId,
staffName: item.staffName
}
})
const selectItem = this.selectItem.concat(selectEmp)
if (selectItem.length == 0) {
this.$message.error('请选择跟进专员')
return
}
this.loading = false
this.dialogVisible = false
this.$emit('selectTable', this.selectItem.concat(selectEmp))
this.$refs.followTable.$refs.salelistMutiTable.clearSelection()
}, 300)
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
.dialog-jump {
color: $btnBlue;
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;
}
}
}
.form-tips {
position: absolute;
bottom: 0;
right: 0;
font-size: 12px;
color: #999;
line-height: 32px;
}
.table-box {
position: relative;
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -102,16 +102,13 @@ export default { ...@@ -102,16 +102,13 @@ export default {
this.innerTags.forEach(item => { this.innerTags.forEach(item => {
userIds.push(item.userId) userIds.push(item.userId)
}) })
// this.$emit('handSelectdEmp', this.empType[this.typeIndex].id, userIds)
} }
// onCancel() {
// this.$emit('closeDrawer')
// }
}, },
mounted() {} mounted() {}
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@import '@/styles/variables.scss';
.drawer-sale-panel { .drawer-sale-panel {
padding: 0px 20px; padding: 0px 20px;
.sale-reload { .sale-reload {
...@@ -148,8 +145,8 @@ export default { ...@@ -148,8 +145,8 @@ export default {
font-size: 14px; font-size: 14px;
color: #7d7d7d; color: #7d7d7d;
&.checked { &.checked {
border: 1px solid #5850ff; border: 1px solid $btnBlue;
color: #5850ff; color: $btnBlue;
} }
i { i {
position: absolute; position: absolute;
......
...@@ -13,8 +13,9 @@ ...@@ -13,8 +13,9 @@
class="searchTop border-shadow" class="searchTop border-shadow"
:formModel="searchForm" :formModel="searchForm"
:formList="searchFormData" :formList="searchFormData"
labelWidth="70px"
> >
<span class="inline-b" style="float: right;" slot="form-slot"> <span class="inline-b" style="float: right" slot="form-slot">
<el-button type="primary" @click="searchTable">查询</el-button> <el-button type="primary" @click="searchTable">查询</el-button>
</span> </span>
</search-form> </search-form>
...@@ -47,7 +48,7 @@ ...@@ -47,7 +48,7 @@
trigger="hover" trigger="hover"
content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
> >
<span slot="reference">...({{scope.scope.userList.length}})</span> <span slot="reference">...({{ scope.scope.userList.length }})</span>
<div class="entmicro-hover"> <div class="entmicro-hover">
<el-tag <el-tag
type="info" type="info"
...@@ -70,13 +71,19 @@ ...@@ -70,13 +71,19 @@
>{{ 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 type="text" @click="btnClick('detail', scope.scope)">查看详情</el-button>-->
<GLButton type="text" @click="btnClick('edit', scope.scope)" fn="修改群组">修改</GLButton> <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 <!-- <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 -->
...@@ -97,8 +104,8 @@ export default { ...@@ -97,8 +104,8 @@ export default {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'groupName', prop: 'groupName',
label: '组名', label: '群聊名称',
placeholder: '请输入组名搜索', placeholder: '请输入群聊名称搜索',
clearable: true clearable: true
} }
], ],
...@@ -112,8 +119,8 @@ export default { ...@@ -112,8 +119,8 @@ export default {
}, },
tableColumns: [ tableColumns: [
{ {
label: '组名', label: '群聊名称',
prop: 'orgName', prop: 'groupName',
width: 200 width: 200
}, },
{ {
...@@ -238,8 +245,35 @@ export default { ...@@ -238,8 +245,35 @@ export default {
// if (val.path == '/guestGroup/index') this.searchTable() // if (val.path == '/guestGroup/index') this.searchTable()
// } // }
// }, // },
mounted() {}, mounted() {
this.wxTips()
},
methods: { methods: {
wxTips() {
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
menu.forEach(item => {
if (!item.children) {
return
}
item.children.forEach(itm => {
if (itm.path == '/enterpriseWechat/index') {
this.$apis.groupGuest.getStatus({}).then(res => {
if (res.status != 'SUCCESS') {
const h = this.$createElement
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' }, '')])])
})
}
})
}
})
})
},
jumpWx() {
this.$history.push('/settings/enterpriseWechat/index')
},
//搜索表格 //搜索表格
searchTable() { searchTable() {
this.$refs.gueastGroup.refreshTable() this.$refs.gueastGroup.refreshTable()
...@@ -252,6 +286,9 @@ export default { ...@@ -252,6 +286,9 @@ export default {
case 'edit': case 'edit':
this.$router.push('/guestGroup/add/' + rowData.id) this.$router.push('/guestGroup/add/' + rowData.id)
break break
case 'detail':
this.$router.push('/guestGroup/detail/' + rowData.id)
break
case 'status': case 'status':
this.$confirm(`是否确认${rowData.status == 1 ? '停用' : '启用'}?`, '提示', { this.$confirm(`是否确认${rowData.status == 1 ? '停用' : '启用'}?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -369,7 +406,6 @@ export default { ...@@ -369,7 +406,6 @@ export default {
margin-right: 10px; margin-right: 10px;
margin-bottom: 10px; margin-bottom: 10px;
cursor: pointer; cursor: pointer;
background-color: #fff !important;
} }
/deep/ { /deep/ {
.search-form { .search-form {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!