Commit ef3cf413 by 前端

Merge branch 'littlexu_dev_v3.5.0' into 'v3.5.0'

更新企微接入3.5.0代码

See merge request !57
2 parents 03c5a789 1dd47b7d
......@@ -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 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="false" v-if="dialogVisible" @refreshTable="handleSearch" ref="table" :layout="layout"
:tableData="tableData" :tableTotal="tableTotal" :pageConf="pageConf" :tableParams="tableParams">
<div 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: '',
addHtml: 'options'
},
{
label: '员工姓名',
prop: 'staffName'
},
{
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
})
console.log(list[0])
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,6 +3,7 @@ import * as dayjs from "dayjs";
export default {
data() {
return {
selectSenderList:null,
groupNumber: 0,
viewLoading: false,
isUpdate: true,
......@@ -39,6 +40,26 @@ export default {
}
},
methods: {
getCustomerData(val) {
this.basicForm.customerList = val
},
selectSender(list) {
this.selectSenderList = list
this.basicForm.staffCloudIdList.push(list.staffCloudIdList)
},
// 客户筛选弹窗
selectCustomer() {
const {staffCloudIdList, customerList} = this.basicForm
console.log()
if (staffCloudIdList.length == 0) {
return this.$message({
type: 'error',
message: '请选择发送人'
})
}
let staffCloudIdListStr = staffCloudIdList[0].toString()
this.$refs.selectCustomer.init(customerList, staffCloudIdListStr)
},
// 返回
handleCancel(path) {
if (this.editStatus || this.$refs.welcome.previewList.length > 0) {
......@@ -152,24 +173,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 +213,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 +261,21 @@ export default {
}
this.$refs.selectCrowd.init(this.basicForm.crowdList)
},
// 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 +303,10 @@ export default {
}
this.key = new Date()
},
removeCustomer(item, index) {
this.basicForm.customerList.splice(index, 1)
this.getCustomerData(this.basicForm.customerList)
this.key = new Date()
},
}
}
<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;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!