Commit 1eefbf48 by 李长胜

Merge branch 'v1.0.2' of http://192.168.3.233:8090/saas/scrm-micro-custom into v1.0.2

2 parents cec4a6b4 94031874
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
import { http2 } from '@/main' import { http2 } 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 templateList = params => { const templateList = params => {
params.method = `${PATH}page` params.method = `${PATH}page`
...@@ -90,6 +91,26 @@ const updateNameVaild = params => { ...@@ -90,6 +91,26 @@ const updateNameVaild = params => {
}) })
} }
const getStatus = params => {
params.method = 'scrm.api.work.wechat.access.status'
return http({
url: WURL,
method: 'POST',
data: params,
sign: true
})
}
//一客一群详情页
const getListApi = params => {
params.method = `${PATH}page`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
export default { export default {
templateList, templateList,
...@@ -99,5 +120,7 @@ export default { ...@@ -99,5 +120,7 @@ export default {
update, update,
listDepartmentTree, listDepartmentTree,
nameVaild, nameVaild,
updateNameVaild getStatus,
updateNameVaild,
getListApi
} }
...@@ -25,4 +25,16 @@ background: transparent !important; ...@@ -25,4 +25,16 @@ 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 #5850ff;
border-radius: 4px;
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
}
.el-message .el-icon-info {
color: #5850ff;
font-size: 16px;
}
\ No newline at end of file \ No newline at end of file
...@@ -12,11 +12,11 @@ let cfg = require('./conf.js') ...@@ -12,11 +12,11 @@ let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function (isEnv = true) { export const fetchConfig = function (isEnv = true) {
if (isEnv) { // if (isEnv) {
let { request } = cfg // let { request } = cfg
Object.assign(request, { timeout }) // Object.assign(request, { timeout })
return Promise.resolve(cfg) // return Promise.resolve(cfg)
} // }
// 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/config2') return new Http({request:{timeout:3000}}).get('https://oss-config.test.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config2')
......
...@@ -88,6 +88,12 @@ const staticRoutes = Object.freeze([ ...@@ -88,6 +88,12 @@ 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
......
...@@ -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);
} }
......
...@@ -11,21 +11,15 @@ ...@@ -11,21 +11,15 @@
<span>企业主体信息需要认证,才可使用该功能。</span> <span>企业主体信息需要认证,才可使用该功能。</span>
</div> </div>
<el-form :model="basicForm" :rules="basicRules" ref="basicForm" label-width="124px"> <el-form :model="basicForm" :rules="basicRules" ref="basicForm" label-width="124px">
<el-form-item label="组名" prop="orgName"> <el-form-item label="自定义群名" prop="orgName">
<el-input <el-input v-model="basicForm.groupName" size="small" placeholder="为群聊设个自定义组名,如“VIP服务群”" maxlength="10"></el-input>
v-model="basicForm.orgName"
size="small"
placeholder="为群聊设置一个组名"
maxlength="10"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="群聊名称" prop="groupName"> <el-form-item label="群聊命名规则" prop="rule">
<el-input <el-radio-group v-model="basicForm.rule">
size="small" <template v-if="(rule, index) in nameRules">
v-model="basicForm.groupName" <el-radio :label="rule.id" :key="index">{{ rule.rule }}</el-radio>
placeholder="设置群聊名称前缀,如新车售后一组" </template>
maxlength="10" </el-radio-group>
></el-input>
<div class="form-tips">群聊名称后缀将以日期及序号进行累加,如“新车售后一组211011-1群”</div> <div class="form-tips">群聊名称后缀将以日期及序号进行累加,如“新车售后一组211011-1群”</div>
</el-form-item> </el-form-item>
<el-form-item prop="userList"> <el-form-item prop="userList">
...@@ -41,15 +35,8 @@ ...@@ -41,15 +35,8 @@
</span> </span>
<div :key="key" class="sale-select" v-show="basicForm.userList"> <div :key="key" class="sale-select" v-show="basicForm.userList">
<div class="el-input-tag input-tag-wrapper"> <div class="el-input-tag input-tag-wrapper">
<div style="max-height: 64px;"> <div style="max-height: 64px">
<el-tag <el-tag v-for="(tag, idx) in basicForm.userList" :key="idx" type="info" closable :disable-transitions="false" @close="remove(tag, idx)">
v-for="(tag, idx) in basicForm.userList"
:key="idx"
type="info"
closable
:disable-transitions="false"
@close="remove(tag, idx)"
>
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ tag.staffName }} {{ tag.staffName }}
</el-tag> </el-tag>
...@@ -85,19 +72,8 @@ ...@@ -85,19 +72,8 @@
<el-button type="primary" @click="handleSubmit">确定</el-button> <el-button type="primary" @click="handleSubmit">确定</el-button>
<el-button @click="handleCancel">取消</el-button> <el-button @click="handleCancel">取消</el-button>
</div> </div>
<basic-dialog <basic-dialog :title="'选择成员'" :width="'712px'" :isVisible="membersVisible" @confirmDialog="handleConfirm" @closeDialog="handleClose">
:title="'选择成员'" <SelectMembers v-if="membersVisible" :key="key" :selectData.sync="selectData" ref="membersForm"></SelectMembers>
:width="'712px'"
:isVisible="membersVisible"
@confirmDialog="handleConfirm"
@closeDialog="handleClose"
>
<SelectMembers
v-if="membersVisible"
:key="key"
:selectData.sync="selectData"
ref="membersForm"
></SelectMembers>
</basic-dialog> </basic-dialog>
</div> </div>
</template> </template>
...@@ -146,9 +122,9 @@ export default { ...@@ -146,9 +122,9 @@ export default {
templateName: value templateName: value
} }
let api = 'nameVaild' let api = 'nameVaild'
if (this.$route.params.id) { if (this.$route.params.id) {
params.id = this.$route.params.id params.id = this.$route.params.id
api = 'updateNameVaild' api = 'updateNameVaild'
} }
this.$apis.groupGuest[api](params).then(res => { this.$apis.groupGuest[api](params).then(res => {
if (res) { if (res) {
...@@ -162,10 +138,26 @@ export default { ...@@ -162,10 +138,26 @@ export default {
return { return {
eventBus: new Vue(), eventBus: new Vue(),
basicForm: {}, basicForm: {},
nameRules: [
{
rule: '自定义群名',
id: 1
},
{
rule: '车系+客户昵称+自定义群名 (车系/客户昵称自动填充,例:“奥迪A6Carr_VIP服务群”)',
id: 2
},
{
rule: '车系+车牌号+自定义群名 (车系/客户昵称自动填充,例:“日产轩逸粤B·1V566_VIP服务群”)',
id: 3
}
],
basicRules: { basicRules: {
orgName: [{ required: true, message: '请输入组名', trigger: 'change' }], orgName: [{ required: true, message: '请输入组名', trigger: 'change' }],
groupName: [{ required: true, message: '请输入群聊名称', trigger: 'change' }, groupName: [
{ validator: nameVaild, trigger: 'blur' }], { required: true, message: '请输入群聊名称', trigger: 'change' },
{ validator: nameVaild, trigger: 'blur' }
],
userList: [ userList: [
// { required: true, message: '请选择默认成员', trigger: 'change' }, // { required: true, message: '请选择默认成员', trigger: 'change' },
{ validator: validatorUser, trigger: 'blur' } { validator: validatorUser, trigger: 'blur' }
...@@ -266,7 +258,7 @@ export default { ...@@ -266,7 +258,7 @@ export default {
} }
// this.$refs.welcome.updateList(res.attachmentList) // this.$refs.welcome.updateList(res.attachmentList)
this.selectData = res.userList this.selectData = res.userList
this.$nextTick(()=>{ this.$nextTick(() => {
this.editStatus = false this.editStatus = false
}) })
} }
......
<template>
<div class="scrm-sub-client-container">
<div class="header flex">
<div class="left-wrap shadow">
<div class="title-info">
<span class="info">群聊信息</span>
</div>
<div class="content">
<div class="group-name flex">
<div class="avator">
<img src="@/assets/guestCustom/chat-logo.png" alt="" />
</div>
<div class="group-name-info">
<div>初始群聊名称</div>
<div class="group-name-info-count">13人</div>
</div>
</div>
<div class="text-info">
已建群数量:
<span class="group-number">13</span>
个群组
</div>
</div>
</div>
<div class="right-wrap shadow">
<div class="title-info">
<span class="info">群成员构成</span>
</div>
<div class="content">
<div class="commissioner">
<div class="text-info">跟进专员:</div>
<div class="entmicro">
<div class="entmicro-tag" v-for="(tag, idx) in userList" :key="idx">
<el-tag type="info" v-if="idx < 9" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ tag.staffName }}{{ tag.departmentName ? `(${tag.departmentName})` : '' }}
</el-tag>
</div>
</div>
</div>
<div class="commissioner">
<div class="text-info">入群成员:</div>
<div class="entmicro">
<div class="entmicro-tag" v-for="(tag, idx) in userList" :key="idx">
<el-tag type="info" v-if="idx < 9" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ tag.staffName }}{{ tag.departmentName ? `(${tag.departmentName})` : '' }}
</el-tag>
<el-tag type="info" v-if="userList.length > 9 && idx == 9">
<el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<span slot="reference">...({{ userList.length }})</span>
<div class="entmicro-hover">
<el-tag type="info" v-for="(i, index) in userList" :key="index" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }}
</el-tag>
</div>
</el-popover>
</el-tag>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="main shadow">
<div class="title-info flex">
<span class="info">客户群详情</span>
<div class="updata text-info" @click="refreshData">
<i class="el-icon-refresh"></i>
更新数据
</div>
<div class="text-info">更新于:2021-12-27 14:47</div>
</div>
<GLTable class="table" @setTableFinishFun="setTableFinishFun" ref="groupDetail" :hasNum="false" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :pageConf="pageConf" :tableParams="tableParams" :tableData="tableData">
<span slot="customerName" slot-scope="scope">
<div class="customer">
<div class="customer-img">
<img src="@/assets/guestCustom/chat-logo.png" alt="" />
</div>
<div class="customer-name">
{{ scope.scope.customerName }}
<label class="origin">{{ scope.scope.type == 1 ? '@微信' : '@企微' }}</label>
</div>
</div>
</span>
<div slot="groupOwner" slot-scope="scope">
<el-tag type="info" :disable-transitions="false">
<i class="el-icon-user-solid"></i>
{{ scope.scope.createdBy }}{{ scope.scope.departmentName ? `(${scope.scope.departmentName})` : '' }}
</el-tag>
</div>
<span slot="status" slot-scope="scope">
<span class="statusText" :class="{ 'red-text': scope.scope.status === '2' }">{{ scope.scope.status == '1' ? '使用' : '解散于' }}</span>
<span v-if="scope.scope.status === '2'" class="gray-text">{{ scope.scope.cancelTime }}</span>
</span>
</GLTable>
</div>
</div>
</template>
<script>
export default {
data() {
return {
// getListApi: this.$apis.groupGuest.getListApi,
tableData: [
{
id: 1,
customerName: '嵇翔',
type: 1, //1微信2企微
orgName: '守候专用服务一组',
createdTime: '2021-06-26 09:00:00 ',
status: '1', //1使用 2停用
groupName: '三人干饭小组',
createdBy: '刘益玲',
departmentName: '财务管理中心'
},
{
id: 2,
customerName: '嵇翔',
type: 2, //1微信2企微
orgName: '守候专用服务一组',
createdTime: '2021-06-26 09:00:00',
cancelTime: '2021年7月22日',
status: '2', //1使用 2停用
groupName: '三人干饭小组',
createdBy: '刘益玲(财务管理中心)'
}
],
tableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '客户',
prop: 'customerName',
addHtml: 'customerName',
width: 200
},
{
label: '创建时间',
prop: 'createdTime',
width: 200
},
{
label: '现群名称',
prop: 'groupName',
width: 240
},
{
label: '现群主',
prop: 'createdBy',
minWidth: '180px',
addHtml: 'groupOwner'
},
{
label: '状态',
prop: 'status',
width: '180px',
addHtml: 'status'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
userList: [
{
id: 1110,
templateId: 87,
staffId: 25794,
staffName: '刘伟',
userId: 'GL1029',
departmentName: null,
masterStatus: null,
delFlag: 0
},
{
id: 1111,
templateId: 87,
staffId: 25795,
staffName: '乔宁',
userId: 'GL0667',
departmentName: null,
masterStatus: null,
delFlag: 0
},
{
id: 1112,
templateId: 87,
staffId: 25797,
staffName: '胡庚美',
userId: 'GL0376',
departmentName: null,
masterStatus: null,
delFlag: 0
},
{
id: 1113,
templateId: 87,
staffId: 25808,
staffName: '关则剑',
userId: 'GL1388',
departmentName: null,
masterStatus: null,
delFlag: 0
},
{
id: 1114,
templateId: 87,
staffId: 25813,
staffName: '邹琰',
userId: 'GL0778',
departmentName: null,
masterStatus: null,
delFlag: 0
},
{
id: 1115,
templateId: 87,
staffId: 25818,
staffName: '董成',
userId: 'GL0640',
departmentName: null,
masterStatus: null,
delFlag: 0
},
{
id: 1116,
templateId: 87,
staffId: 25823,
staffName: '麦舒琪',
userId: 'GL1485',
departmentName: null,
masterStatus: null,
delFlag: 0
},
{
id: 1117,
templateId: 87,
staffId: 25825,
staffName: '王科莉',
userId: '524',
departmentName: null,
masterStatus: null,
delFlag: 0
},
{
id: 1118,
templateId: 87,
staffId: 25870,
staffName: '康旭',
userId: 'GL1678',
departmentName: null,
masterStatus: null,
delFlag: 0
},
{
id: 1119,
templateId: 87,
staffId: 25899,
staffName: '陆汉林',
userId: 'GL1744',
departmentName: null,
masterStatus: null,
delFlag: 0
},
{
id: 1120,
templateId: 87,
staffId: 26035,
staffName: '蒋金家',
userId: 'GL1759',
departmentName: null,
masterStatus: null,
delFlag: 0
},
{
id: 1121,
templateId: 87,
staffId: 26113,
staffName: '测试机01',
userId: 'test001',
departmentName: null,
masterStatus: null,
delFlag: 0
},
{
id: 1122,
templateId: 87,
staffId: 26124,
staffName: '黄嘉泰',
userId: 'GL1775',
departmentName: null,
masterStatus: null,
delFlag: 0
},
{
id: 1123,
templateId: 87,
staffId: 26196,
staffName: '黄嘉泰',
userId: 'GL1775',
departmentName: null,
masterStatus: null,
delFlag: 0
},
{
id: 1124,
templateId: 87,
staffId: 26220,
staffName: '陆汉林',
userId: 'GL1744',
departmentName: null,
masterStatus: null,
delFlag: 0
},
{
id: 1125,
templateId: 87,
staffId: 26223,
staffName: '乔宁',
userId: 'GL0667',
departmentName: null,
masterStatus: null,
delFlag: 0
},
{
id: 1126,
templateId: 87,
staffId: 26224,
staffName: '麦舒琪',
userId: 'GL1485',
departmentName: null,
masterStatus: null,
delFlag: 0
},
{
id: 1127,
templateId: 87,
staffId: 26255,
staffName: '胡庚美',
userId: 'GL0376',
departmentName: null,
masterStatus: null,
delFlag: 0
}
]
}
},
methods: {
//更新数据
refreshData() {
this.$refs.groupDetail.refreshTable()
},
setTableFinishFun() {
if (this.$refs.groupDetail.data && !this.$refs.groupDetail.data.length) {
this.$refs.groupDetail.setTableHeightFun()
}
}
}
}
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
.scrm-sub-client-container {
box-sizing: border-box;
.title-info {
width: 100%;
height: 56px;
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 56px;
border-bottom: 1px solid #d8d8d8;
.info {
margin-left: 20px;
}
}
.text-info {
height: 20px;
font-size: 14px;
font-weight: 400;
color: #7d7d7d;
line-height: 20px;
margin-right: 10px;
white-space: nowrap;
}
.shadow {
box-shadow: 0px 1px 5px 0px rgba(38, 38, 38, 0.1);
background: #ffffff;
}
.flex {
display: flex;
align-items: center;
}
.header {
width: 100%;
height: 227px;
margin-bottom: 20px;
.left-wrap {
width: 335px;
height: 100%;
margin-right: 20px;
& .content {
margin: 20px 20px 0 20px;
.group-name {
width: 295px;
height: 64px;
background: #f7f7f7;
border-radius: 4px;
border: 1px solid #dcdfe6;
padding: 10px;
margin-bottom: 30px;
box-sizing: border-box;
.avator {
width: 44px;
height: 44px;
margin-right: 10px;
img {
width: 100%;
height: 100%;
}
}
&-info {
font-size: 14px;
font-weight: 400;
color: #333333;
div {
line-height: 20px;
height: 20px;
}
&-count {
color: #999999;
margin-top: 4px;
}
}
}
& .group-number {
height: 26px;
font-size: 26px;
font-weight: 500;
color: #333333;
line-height: 26px;
margin-right: 10px;
}
}
}
.right-wrap {
width: calc(100% - 355px);
height: 100%;
& .content {
margin: 20px 0 0 44px;
.commissioner {
display: flex;
align-items: flex-start;
margin-bottom: 16px;
}
}
}
}
.main {
width: 100%;
& .updata {
color: #5850ff;
margin: 0 10px 0 20px;
i.el-icon-refresh {
font-size: 14px;
color: #5850ff;
}
}
.table {
padding: 20px;
box-sizing: border-box;
}
}
.customer {
margin-left: -100px;
.customer-img {
width: 34px;
height: 34px;
display: inline-block;
margin-right: 6px;
position: relative;
img {
height: 100%;
}
}
.customer-name {
position: absolute;
top: 50%;
transform: translateY(-50%);
display: inline-block;
.origin {
color: #5850ff;
font-size: 14px;
}
}
}
}
.entmicro {
text-align: left;
&-tag {
display: inline-block;
}
&-hover {
max-height: 214px;
overflow: auto;
i {
color: #75acff;
font-size: 13px;
}
}
}
i {
color: #75acff;
// margin-right: 3px;
font-size: 14px;
}
.el-tag {
margin: 0 10px 4px 0;
cursor: pointer;
background-color: #fff !important;
height: 26px;
line-height: 26px;
color: #666666;
padding: 0 6px !important;
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -2,32 +2,20 @@ ...@@ -2,32 +2,20 @@
<div class="scrm-sub-client-container"> <div class="scrm-sub-client-container">
<div class="btn-header"> <div class="btn-header">
<!-- <el-button class="addBtn" @click="btnClick('create')">新建群组</el-button> --> <!-- <el-button class="addBtn" @click="btnClick('create')">新建群组</el-button> -->
<GLButton class="addBtn" @click="btnClick('create')" fn="新建群组">新建群组</GLButton> <GLButton class="addBtn" @click="btnClick('create')" fn="新建群组">新建群组</GLButton>
<span class="toptips"> <span class="toptips">
<span>配置群聊不会自动拉群,邀请客户入群后群聊才会正式生效,一个客户默认拉一个群聊。</span> <span>配置群聊不会自动拉群,邀请客户入群后群聊才会正式生效,一个客户默认拉一个群聊。</span>
</span> </span>
</div> </div>
<div class="container"> <div class="container">
<search-form <search-form class="searchTop border-shadow" :formModel="searchForm" :formList="searchFormData">
class="searchTop border-shadow" <span class="inline-b" style="float: right" slot="form-slot">
:formModel="searchForm"
:formList="searchFormData"
>
<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>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable <GLTable ref="gueastGroup" @setTableFinishFun="setTableFinishFun" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf">
ref="gueastGroup"
@setTableFinishFun="setTableFinishFun"
:noDataImg="url"
:getListApi="getListApi"
:searchForm="searchForm"
:tableParams="tableParams"
:pageConf="pageConf"
>
<div slot="entmicro-name" class="entmicro" slot-scope="scope"> <div slot="entmicro-name" class="entmicro" slot-scope="scope">
<!-- <span v-for="(i, index) in scope.scope.userList" :key="index"> <!-- <span v-for="(i, index) in scope.scope.userList" :key="index">
{{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }} {{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }}
...@@ -41,20 +29,10 @@ ...@@ -41,20 +29,10 @@
{{ tag.staffName }}{{ tag.departmentName ? `(${tag.departmentName})` : '' }} {{ tag.staffName }}{{ tag.departmentName ? `(${tag.departmentName})` : '' }}
</el-tag> </el-tag>
<el-tag type="info" v-if="scope.scope.userList.length > 9 && idx == 9"> <el-tag type="info" v-if="scope.scope.userList.length > 9 && idx == 9">
<el-popover <el-popover placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
placement="top" <span slot="reference">...({{ scope.scope.userList.length }})</span>
width="600"
trigger="hover"
content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
>
<span slot="reference">...({{scope.scope.userList.length}})</span>
<div class="entmicro-hover"> <div class="entmicro-hover">
<el-tag <el-tag type="info" v-for="(i, index) in scope.scope.userList" :key="index" :disable-transitions="false">
type="info"
v-for="(i, index) in scope.scope.userList"
:key="index"
:disable-transitions="false"
>
<i class="el-icon-user-solid"></i> <i class="el-icon-user-solid"></i>
{{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }} {{ i.staffName }}{{ i.departmentName ? `(${i.departmentName})` : '' }}
</el-tag> </el-tag>
...@@ -64,15 +42,13 @@ ...@@ -64,15 +42,13 @@
</div> </div>
</div> </div>
<span slot="status" slot-scope="scope"> <span slot="status" slot-scope="scope">
<span <span class="statusText" :class="{ 'red-text': scope.scope.status === '2', 'green-text': scope.scope.status === '1' }">{{ scope.scope.status == '1' ? '启用' : '停用' }}</span>
class="statusText"
:class="{ 'red-text': scope.scope.status === '2', 'green-text': scope.scope.status === '1' }"
>{{ 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> -->
<GLButton type="text" @click="btnClick('edit', scope.scope)" fn="修改群组">修改</GLButton> <GLButton type="text" @click="btnClick('detail', scope.scope)" fn="客户群详情">查看详情</GLButton>
<GLButton type="text" @click="btnClick('status', scope.scope)" fn="启用禁用">{{ scope.scope.status == 1 ? '停用' : '启用' }}</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>
<!-- <el-button <!-- <el-button
type="text" type="text"
@click="btnClick('status', scope.scope)" @click="btnClick('status', scope.scope)"
...@@ -97,8 +73,8 @@ export default { ...@@ -97,8 +73,8 @@ export default {
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
prop: 'groupName', prop: 'groupName',
label: '组名', label: '群聊名称',
placeholder: '请输入组名搜索', placeholder: '请输入群聊名称搜索',
clearable: true clearable: true
} }
], ],
...@@ -112,7 +88,7 @@ export default { ...@@ -112,7 +88,7 @@ export default {
}, },
tableColumns: [ tableColumns: [
{ {
label: '组名', label: '群聊名称',
prop: 'orgName', prop: 'orgName',
width: 200 width: 200
}, },
...@@ -238,8 +214,32 @@ export default { ...@@ -238,8 +214,32 @@ 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' }, '')])])
})
}
})
}
})
})
},
//搜索表格 //搜索表格
searchTable() { searchTable() {
this.$refs.gueastGroup.refreshTable() this.$refs.gueastGroup.refreshTable()
...@@ -252,6 +252,9 @@ export default { ...@@ -252,6 +252,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: '确定',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!