Commit a96fb9fd by 前端

Merge branch 'v3.5.0' into 'master'

合并3.5.0版本代码到主分支

See merge request !63
2 parents 03c5a789 53632eb3
......@@ -32,8 +32,30 @@ const wechatDepositList = params => {
sign: true
})
}
const wechatDepositNotAccessList = params => {
params.method = 'entmicro.api.wechatcloudcontrol.cloudconlogin.wechatDepositNotAccessList'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
const getStaffFriends = params => {
params.method = 'entmicro.api.wechatcloudcontrol.cloudconlogin.getStaffFriends'
return http({
url: '/rop-scrm-entmicro/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
getLoginQcCode,
getQcCodeDetail,
wechatDepositList
wechatDepositList,
wechatDepositNotAccessList,
getStaffFriends
}
import { http, http2 } from '@/main'
import {http, http2} from '@/main'
const path = 'entmicro.api.mass.'
const URL = 'rop-scrm-entmicro/router'
const querylabeltree = params => {
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
const queryCrowdtree = params => {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http({
url: 'rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http({
url: 'rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
const batchmessagingRecord = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.record'
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.record'
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
// 企微群发查看预计群发人数
const batchmessagingCustomercount = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.customercount'
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.customercount'
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
// 企微群发任务创建
const atchmessagingCreate = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.create'
return http({
url: URL,
method: 'POST',
data: params,
sign: true,
returnAll:true
})
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.create'
return http({
url: URL,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const getStoreList = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.create.merchant'
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.create.merchant'
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
const recordSend = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.record.send'
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.record.send'
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
const sendStop = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.send.stop'
return http({
url: URL,
method: 'POST',
data: params,
sign: true,
returnAll:true
})
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.send.stop'
return http({
url: URL,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 获取可选跟进员工
export default {
querylabeltree,
queryCrowdtree,
batchmessagingRecord,
batchmessagingCustomercount,
atchmessagingCreate,
getStoreList,
recordSend,
sendStop
querylabeltree,
queryCrowdtree,
batchmessagingRecord,
batchmessagingCustomercount,
atchmessagingCreate,
getStoreList,
recordSend,
sendStop,
}
<template>
<div>
<GLDialog :bigTitle="'选择客户'" mode="big" :visible.sync="crowdVisible" v-if="crowdVisible">
<div class="member-wrapper">
<div class="member-left">
<div class="member-content">
<el-form :inline="true" class="member-form" :model="searchForm" @submit.native.prevent>
<el-form-item label="客户昵称" style="margin-bottom: 0" size="small">
<el-input :size="size" v-model.trim="searchForm.userName" @keyup.enter.native="search" clearable
placeholder="输入关键字搜索"></el-input>
</el-form-item>
<el-form-item label style="margin-bottom: 0;margin-left:10px" size="small">
<el-button type="primary" :size="size" @click="search">查询</el-button>
</el-form-item>
</el-form>
<div class="member-title">
员工列表
</div>
<div class="table-content">
<GLTable ref="crowdTable" :tableData="tableData" @refreshTable="getCrowdList" :tableTotal="tableTotal"
:layout="layout" :tableParams="crowdTableParams" :hasNum="true" :pageConf="pageConf"
:noDataImg="url" @selectionTable="handleSelectionTable" @row-click="rowClick"></GLTable>
</div>
</div>
</div>
<div class="member-right">
<div class="member-title">已选列表</div>
<div class="member-name">
<div class="numberOfSelected">
<span class="selected">已选</span>
{{ innerTags.length }}人
</div>
<span class="empty" @click="clearTheSelectedList">清空</span>
</div>
<div class="input-tag-wrapper">
<div class="tag-box">
<el-tag v-for="(tag, idx) in innerTags" :key="idx" type="info" closable :disable-transitions="false"
@close="remove(tag, idx)">
{{ tag.nickname }}
</el-tag>
</div>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button style="width: 68px;" size="small" @click="crowdVisible = false">取 消</el-button>
<el-button style="width: 68px;" size="small" type="primary" @click.native="handleConfirm">确 定</el-button>
</span>
</GLDialog>
</div>
</template>
<script>
// import url from '@/assets/empty.png'
export default {
name: 'SelectCrowd',
props: {
resetMerchantId: {
type: String,
default: ''
}
},
data() {
return {
url: 0,
initId: '',
crowdVisible: false,
searchForm: {userName: ''},
innerTags: [],
inner: [],
tableCrowdData: [
{
name: 'asda'
}
],
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0,
crowdTableParams: {
checkSelectKey: 'id',
checkSelectVal: [],
hasNum: false,
listName: 'crowdUnitList',
// 行数据的key
mutiSelectUniqueKey: 'userId',
// 多选ref的名称
mutiSelectName: 'crowdlist',
tableColumns: [
{
label: '客户昵称',
prop: 'nickname'
},
{
label: '手机号',
prop: 'mobile',
width: '200',
line: 1
}
]
}
}
},
methods: {
clearTheSelectedList() {
this.$refs.crowdTable.clearMutiSelect()
},
init(val, userId) {
this.initId = userId
this.inner = this.$common.utils.deepClone(val)
this.innerTags = this.$common.utils.deepClone(val)
this.crowdVisible = true
this.searchForm.userName = ''
this.$nextTick(() => {
this.$refs.crowdTable.$refs.crowdlistMutiTable && this.$refs.crowdTable.$refs.crowdlistMutiTable.clearSelection()
this.$refs.crowdTable.page.pageNum = 1
this.getCrowdList({pageNum: 1, pageSize: 10})
})
},
async getCrowdList(page = {pageNum: 1, pageSize: 10}) {
this.$refs.crowdTable.page = page
var params = {
pageSize: page.pageSize,
pageNum: page.pageNum,
userId: this.initId,
userName: this.searchForm.userName
}
await this.$apis.collocation.getStaffFriends(params).then(res => {
this.tableData = res && res.data
this.tableTotal = res && res.count
this.recoverySelected()
})
},
// selectionTable(val) {
// this.innerTags = []
// for (let i = 0; i < val.length; i++) {
// const tagArr = this.innerTags.map(item => item.crowdId + '')
// console.log(tagArr)
// if (!tagArr.includes(val[i].crowdId)) {
// this.innerTags.push(val[i])
// }
// console.log(this.innerTags)
// }
// },
// 选择/取消
handleSelectionTable(val) {
var list = JSON.parse(JSON.stringify(this.innerTags))
this.innerTags = []
val.forEach(item => {
if (this.innerTags.findIndex(k => k.userId == item.userId) == '-1') {
this.innerTags.push(item)
}
})
list.forEach(item => {
if (this.tableData.findIndex(k => k.userId == item.userId) == '-1' && this.innerTags.findIndex(k => k.userId == item.userId) == '-1') {
this.innerTags.push(item)
}
})
},
// 恢复选择
addSelected() {
this.$nextTick(() => {
var list = JSON.parse(JSON.stringify(this.innerTags))
if (list && list.length) {
list.forEach(row => {
var idx = this.tableData.findIndex(k => k.userId == row.userId)
if (idx != -1) {
this.$refs.crowdTable.$refs.crowdlistMutiTable.toggleRowSelection(this.tableData[idx], true)
}
})
}
})
},
recoverySelected() {
// 翻页,去掉已选项
var selectedData = this.$refs.crowdTable.mutiSelectArr.crowdlist
var deleteList = []
this.addSelected()
if (selectedData) {
selectedData.forEach(item => {
if (this.innerTags.findIndex(subItem => subItem.userId == item.userId) == -1) {
deleteList.push(item)
}
})
this.deleteSelected(deleteList)
}
},
// 删除选中
deleteSelected(deleteList) {
this.$nextTick(() => {
deleteList.forEach(row => {
var idx = this.tableData.findIndex(k => k.userId == row.userId)
if (idx != -1) {
this.$refs.crowdTable.$refs.crowdlistMutiTable.toggleRowSelection(this.tableData[idx], false)
}
})
})
},
remove(item) {
var idx = this.innerTags.findIndex(k => k.userId == item.userId)
this.innerTags.splice(idx, 1)
if (this.tableData.map(k => k.userId).includes(item.userId)) {
var i = this.tableData.findIndex(k => k.userId == item.userId)
this.$refs.crowdTable.$refs.crowdlistMutiTable.toggleRowSelection(this.tableData[i])
}
},
rowClick(row) {
this.$refs.crowdTable.$refs.crowdlistMutiTable.toggleRowSelection(row)
},
search() {
this.getCrowdList({pageNum: 1, pageSize: 10})
},
handleConfirm() {
// console.log(this.innerTags)
this.$emit('customerData', this.innerTags)
this.crowdVisible = false
this.searchForm = {userName: {}}
}
}
}
</script>
<style lang="scss" scoped>
.member-wrapper {
display: flex;
.member-title {
font-size: 16px;
color: #333;
font-weight: 500;
line-height: 22px;
margin-bottom: 6px;
span {
display: inline-block;
padding-left: 5px;
font-size: 12px;
color: #999;
font-weight: 500;
}
}
.member-left {
width: calc(100% - 286px);
.member-content {
border: 1px solid #eee;
padding-bottom: 20px;
/deep/ {
.el-table {
// height: 40vh;
overflow-y: auto;
}
.el-pagination {
margin-top: 0;
}
}
.member-form {
padding: 10px 20px;
}
.table-content {
max-height: 480px;
overflow: auto;
border-top: 1px solid #eee;
}
}
.member-checked {
text-align: right;
margin-top: 10px;
}
}
.member-right {
width: 286px;
margin-left: 14px;
.member-name {
font-size: 14px;
color: #333;
line-height: 20px;
padding: 18px;
border: 1px solid #eee;
display: flex;
justify-content: space-between;
.numberOfSelected {
.selected {
font-size: 16px;
}
}
.empty {
color: #5850FF;
}
}
}
}
.tag-box {
height: 100%;
width: 100%;
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
border: 1px solid #eee;
//border-top: none;
box-sizing: border-box;
color: #606266;
display: inline-block;
padding: 8px 10px;
line-height: 32px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 100%;
height: 100%;
display: flex;
align-items: center;
max-height: 557px;
overflow: auto;
// margin-bottom: 10px;
i {
color: #75acff;
margin-right: 3px;
font-size: 14px;
}
/deep/ input {
/* input { */
/* background-color: red!important; 调试用的样式 */
outline: none !important;
border: none !important;
}
/deep/ .el-input {
min-width: 150px;
width: auto;
flex: 1;
}
}
.el-tag {
margin-right: 10px;
line-height: 22px;
margin-bottom: 5px;
height: 24px;
background: #fafbfe !important;
}
/deep/ {
.el-dialog__title {
font-weight: 600;
}
.el-dialog__header {
padding: 20px;
}
.el-dialog__headerbtn {
height: 30px;
.el-dialog__close {
width: 24px;
height: 24px;
font-size: 24px;
}
}
.el-pagination {
padding-left: 20px;
border-top: 1px solid #e8e8ea;
padding-top: 16px;
}
.el-table:before {
display: none;
}
}
</style>
<template>
<div class="square-main" v-loading="loading">
<GLDialog title="发送人筛选" :visible.sync="dialogVisible">
<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>
<GLTable :hasNum="true" v-if="dialogVisible" @refreshTable="handleSearch" ref="table" :layout="layout"
:tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams">
<div fixed="left" slot="options" slot-scope="scope">
<el-radio :label="scope.scope.idBefEncryption" v-model="selectId"></el-radio>
</div>
</GLTable>
<span slot="footer" class="dialog-footer">
<el-button plain size="small" @click="handleCancel">取 消</el-button>
<el-button size="small" type="primary" @click.native="handleSelect">确 定</el-button>
</span>
</GLDialog>
</div>
</template>
<script>
import {utils} from 'glsx-common'
import util from '@/utils/util'
export default {
name: 'SelectEmployees ',
data() {
return {
selectId: null,
// loading: false,
dialogVisible: false,
tableSearchForm: {},
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'},
tableParams: {
listName: 'data',
tableOption: false,
// 行数据的key
mutiSelectUniqueKey: 'id',
tableColumns: [
{
label: '',
prop: '',
fixed: 'left',
width:'80',
addHtml: 'options'
},
{
label: '员工姓名',
prop: 'staffName',
width:'220',
},
{
label: '企业微信',
prop: 'entmicroName'
}
]
},
layout: 'sizes, prev, pager, next, jumper, ->, total',
tableData: [],
tableTotal: 0,
selectEmp: [],
typeselect: '',
selectUuid: ''
}
},
methods: {
selectableStaff() {
let params = {
...JSON.parse(JSON.stringify(this.tableSearchForm)),
pageSize: this.$refs.table.page.pageSize,
pageNum: this.$refs.table.page.pageNum,
loginStatus: 1
}
this.$apis.collocation.wechatDepositNotAccessList(params).then(res => {
this.tableData = res.data ? res.data : []
this.tableTotal = res.count
})
},
init() {
this.tableSearchForm = {}
this.dialogVisible = true
this.$nextTick(() => {
this.$refs.table.page.pageNum = 1
this.selectableStaff()
})
},
handleSearch() {
this.selectableStaff()
},
handleClose() {
this.handleCancel()
},
handleCancel: utils.debounce(function () {
this.dialogVisible = false
}, 300),
handleSelect: utils.debounce(function () {
if (!this.selectId) {
this.$message.error('请选择发送人')
return
}
let list = this.tableData.filter(item => {
return item['idBefEncryption'] == this.selectId
})
let selectEmp = {
staffName: list[0].staffName,
staffCloudIdList: list[0].idBefEncryption,
staffId: list[0].id
}
this.dialogVisible = false
this.$emit('selectSender', selectEmp)
}, 300)
}
}
</script>
<style lang="scss" scoped>
/deep/ .glsx-table .emptyBg .noDataImg {
margin-top: 150px !important;
}
/deep/ .el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
box-shadow: none;
}
/deep/ .el-radio__label {
display: none;
}
.dialog-jump {
color: #5850ff;
float: left;
line-height: 24px;
text-decoration: underline;
cursor: pointer;
}
.square-main {
/deep/ {
.el-table {
height: 40vh;
overflow-y: auto;
}
.el-table::before {
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
}
}
</style>
......@@ -167,6 +167,7 @@ export default {
// 恢复选择
addSelected() {
this.$nextTick(() => {
console.log(this.innerTags)
var list = JSON.parse(JSON.stringify(this.innerTags))
if (list && list.length) {
list.forEach(row => {
......
......@@ -3,8 +3,10 @@ import * as dayjs from "dayjs";
export default {
data() {
return {
selectSenderList: null,
groupNumber: 0,
viewLoading: false,
staffCloudIdListStr: '',
isUpdate: true,
dateOptions: {
disabledDate(time) {
......@@ -36,9 +38,33 @@ export default {
this.basicForm.crowdList = []
this.$refs.selectLabel.labelTreeRetSelect = []
}
}
},
'staffCloudIdListStr'(newVal, oldVal) {
this.basicForm.customerList = newVal == oldVal ? this.basicForm.customerList : []
},
},
methods: {
getCustomerData(val) {
this.basicForm.customerList = val
},
selectSender(list) {
this.selectSenderList = list
this.basicForm.staffCloudIdList.push(list.staffCloudIdList)
let staffCloudIdList = this.basicForm.staffCloudIdList
this.staffCloudIdListStr = staffCloudIdList && staffCloudIdList.at(-1).toString()
},
// 客户筛选弹窗
selectCustomer() {
this.isUpdate = true
const {staffCloudIdList, customerList} = this.basicForm
if (staffCloudIdList.length == 0) {
return this.$message({
type: 'error',
message: '请选择发送人'
})
}
this.$refs.selectCustomer.init(customerList, this.staffCloudIdListStr)
},
// 返回
handleCancel(path) {
if (this.editStatus || this.$refs.welcome.previewList.length > 0) {
......@@ -152,24 +178,30 @@ export default {
})
},
// 查看群发人数
async viewMembers() {
if (this.basicForm.selectType == '1' && !this.taggingList.length) {
return this.$message({
type: 'error',
message: '请选择标签'
})
async viewMembers(managedType) {
if (managedType == 1) {
if (this.basicForm.selectType == '1' && !this.taggingList.length) {
return this.$message({
type: 'error',
message: '请选择标签'
})
}
if (this.basicForm.selectType == 2 && !this.basicForm.crowdList.length) {
return this.$message({
type: 'error',
message: '请选择人群'
})
}
let params = this.getBaseInfo(managedType)
this.viewLoading = true
await this.getTheNumberOfPeople(params)
this.isUpdate = false
this.viewLoading = false
}
if (this.basicForm.selectType == 2 && !this.basicForm.crowdList.length) {
return this.$message({
type: 'error',
message: '请选择人群'
})
if (managedType == 2) {
this.groupNumber = this.basicForm.customerList.length
this.isUpdate = false
}
let params = this.getBaseInfo()
this.viewLoading = true
await this.getTheNumberOfPeople(params)
this.isUpdate = false
this.viewLoading = false
},
// 发送时间change事件
changeValue(v) {
......@@ -186,23 +218,40 @@ export default {
}
}
},
getBaseInfo() {
let params = {
customerType: this.basicForm.selectType,
msgName: this.basicForm.groupName,
msgMerchantId: this.basicForm.selectStore ? this.basicForm.selectStore : this.basicForm.taskMerchantId,
msgMerchantName: this.msgMerchantName
}
const combineType = {
label: 2,
crowd: 1
getBaseInfo(managedType) {
let params = {}
if (managedType == 1) {
params = {
customerType: this.basicForm.selectType,
msgName: this.basicForm.groupName,
msgMerchantId: this.basicForm.selectStore ? this.basicForm.selectStore : this.basicForm.taskMerchantId,
msgMerchantName: this.msgMerchantName
}
const combineType = {
label: 2,
crowd: 1
}
if (params.customerType == 1) {
params.combineType = combineType.label
params.labelList = this.taggingList
} else if (params.customerType == 2) {
params.crowdList = this.basicForm.crowdList
params.combineType = combineType.crowd
}
}
if (params.customerType == 1) {
params.combineType = combineType.label
params.labelList = this.taggingList
} else if (params.customerType == 2) {
params.crowdList = this.basicForm.crowdList
params.combineType = combineType.crowd
if (managedType == 2) {
let customerCloudIdList = []
let staffCloudIdList = []
this.basicForm.customerList.forEach(item => {
customerCloudIdList.push(item.userId)
})
staffCloudIdList.push(this.basicForm.staffCloudIdList[0])
params = {
customerType: 3,
msgName: this.basicForm.groupName,
staffCloudIdList,
customerCloudIdList
}
}
return params
},
......@@ -217,6 +266,26 @@ export default {
}
this.$refs.selectCrowd.init(this.basicForm.crowdList)
},
delSelectSenderList(){
this.basicForm.staffCloudIdList = [] //发送人
this.selectSenderList = []
this.$refs.selectEmpForm.selectId = ''
},
// getCustomerData(val) {
// console.log(val)
// this.isUpdate = true
// if (val.length) {
// this.isSelectCustomer = true
// this.basicForm.customerList = val
// } else {
// this.basicForm.userList = []
// this.basicForm.customerList = []
// this.selectData = []
// this.isSelectCustomer = false
// this.editStatus = true
// this.key = new Date()
// }
// },
// 获取人群数据(根据人群筛选获取群发账号人群数据)
getCrowdData(val) {
this.isUpdate = true
......@@ -244,5 +313,11 @@ export default {
}
this.key = new Date()
},
removeCustomer(item, index) {
this.basicForm.customerList.splice(index, 1)
this.getCustomerData(this.basicForm.customerList)
this.key = new Date()
this.isUpdate = true
},
}
}
<template>
<div class="container">
<GLCombiForm :formObj="searchForm" :rowNumber="1" :formData="searchFormData" @handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<div class="table-header">
<div class="header-text">已激活列表</div>
<div>
<el-button class="table-btn" @click="handleqrCode" :size="size" type="primary" plain mode="el-button">
企微接入授权
</el-button>
</div>
<div>
<div>
<el-tabs v-model="activeNameHostingList" @tab-click="handleClick">
<el-tab-pane label="已接入SCRM托管列表" name="first"></el-tab-pane>
<el-tab-pane label="非SCRM托管列表" name="second"></el-tab-pane>
</el-tabs>
<el-button class="table-btn" @click="handleqrCode" :size="size" type="primary" mode="el-button">
<div class="enterpriseMicroLogin">
<img src="@/assets/enterpriseMicroLogin.png">
<p> 企微登录</p>
</div>
</el-button>
</div>
<GLTable ref="activeTable" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm"
:tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<div slot="staffName" slot-scope="scope">
<div class="staffName">
<span>{{ scope.scope.staffName }}</span>
<span class="entmicroName" v-if="scope.scope.entmicroName">@{{ scope.scope.entmicroName }}</span>
<div class="container">
<GLCombiForm :formObj="searchForm" :rowNumber="1" :formData="searchFormData" @handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<!-- <div class="table-header">-->
<!-- <div class="header-text">已激活列表</div>-->
<!-- <div>-->
<!-- <el-button class="table-btn" @click="handleqrCode" :size="size" type="primary" plain mode="el-button">-->
<!-- 企微接入授权-->
<!-- </el-button>-->
<!-- </div>-->
<!-- </div>-->
<GLTable ref="activeTable" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm"
:tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<div slot="staffName" slot-scope="scope">
<div class="staffName">
<span>{{ scope.scope.staffName }}</span>
<span class="entmicroName" v-if="scope.scope.entmicroName">@{{ scope.scope.entmicroName }}</span>
</div>
</div>
</div>
<div slot="loginStatus" slot-scope="scope">
<div class="loginStatus">
<div slot="loginStatus" slot-scope="scope">
<div class="loginStatus">
<span class="cycle"
:style="{ background: scope.scope.loginStatus == '1' ? '#2CCA74' : scope.scope.loginStatus == '0' ? '#999999' : '' }"></span>
{{ scope.scope.loginStatus == '1' ? '在线' : scope.scope.loginStatus == '0' ? '离线' : '--' }}
{{ scope.scope.loginStatus == '1' ? '在线' : scope.scope.loginStatus == '0' ? '离线' : '--' }}
</div>
</div>
</GLTable>
<GLDialog :title="'授权登入二维码'" mode="small" :visible.sync="qrCodeVisible">
<div v-loading="addLoading" class="qrIMGbox">
<img class="qrIMG" :src="qrcodeUrl"/>
</div>
</div>
</GLTable>
<GLDialog :title="'授权登入二维码'" mode="small" :visible.sync="qrCodeVisible">
<div v-loading="addLoading" class="qrIMGbox">
<img class="qrIMG" :src="qrcodeUrl"/>
</div>
<span slot="footer" class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button size="small" disabled v-if="!show" class="count">{{ count }} s</el-button>
<el-button type="primary" size="small" v-if="show" @click="getCode">刷新</el-button>
</span>
</GLDialog>
</GLDialog>
</div>
</div>
</template>
<script>
import url from '@/assets/empty.png'
import setPromiseInterval, { clearPromiseInterval } from 'set-promise-interval'
import setPromiseInterval, {clearPromiseInterval} from 'set-promise-interval'
import {utils} from 'glsx-common'
......@@ -49,6 +64,7 @@ export default {
data() {
return {
url,
activeNameHostingList: 'first',
show: true,
count: '',
timer: null,
......@@ -136,10 +152,14 @@ export default {
}
]
},
tableColumnsCopy: [],
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count'},
getListApi: this.$apis.collocation.wechatDepositList
}
},
created() {
this.tableColumnsCopy = this.tableParams.tableColumns.slice()
},
methods: {
handleSearch() {
this.$refs.activeTable.refreshTable()
......@@ -228,12 +248,25 @@ export default {
} else {
this.clearAllInterval()
}
},
activeNameHostingList(val) {
let secondTableColumns = this.tableColumnsCopy.filter(item => item.label !== '所属门店')
this.tableParams.tableColumns = val == 'first' ? this.tableColumnsCopy : secondTableColumns
this.getListApi = val == 'first' ? this.$apis.collocation.wechatDepositList : this.$apis.collocation.wechatDepositNotAccessList
this.handleSearch()
}
}
}
</script>
<style lang="scss" scoped>
.enterpriseMicroLogin{
display: flex;
align-items: center;
img{
margin-right: 8px;
}
}
/deep/ {
.el-table th > .cell {
padding: 0 16px;
......@@ -241,6 +274,7 @@ export default {
}
.container {
margin-top: 16px;
padding: 20px;
background-color: #fff;
......
......@@ -186,8 +186,8 @@ export default {
this.getListData()
const merchantList = await this.merchantList()
const index = this.searchFormData.findIndex(item => item.name == 'merchantName')
this.searchFormData[index].optionList = merchantList ? merchantList.data : []
this.searchFormData[index].optionList.unshift({msgMerchantId: null, msgMerchantName: '全部'})
this.searchFormData[index].optionList = merchantList ? merchantList : []
this.searchFormData[index].optionList && this.searchFormData[index].optionList.unshift({msgMerchantId: null, msgMerchantName: '全部'})
},
methods: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!