Commit 5984c2e8 by xuyl

更新企微接入页面

1 parent f787ed47
import { http, http2 } from '@/main'
const URL = 'rop-scrm-entmicro/router'
export default {
}
......@@ -23,9 +23,28 @@ const queryCrowdtree = params => {
})
}
const customerCount = params => {
params.method = 'entmicro.api.mass.detail.customer.filter.count'
// return http({
const batchmessagingRecord = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.record'
return http({
url: URL,
method: 'POST',
data: params,
sign: true
})
}
// 企微群发查看预计群发人数
const atchmessagingCustomercount = params => {
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',
......@@ -37,5 +56,7 @@ const customerCount = params => {
export default {
querylabeltree,
queryCrowdtree,
customerCount
batchmessagingRecord,
atchmessagingCustomercount,
atchmessagingCreate
}
......@@ -4,10 +4,18 @@
<div class="table-header">
<div class="header-text">已激活列表</div>
<div>
<el-button class="table-btn" @click="handleSync" :size="size" type="primary" plain mode="el-button">企微接入授权</el-button>
<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"></GLTable>
<GLDialog :title="'授权登入二维码'" mode="small" :visible.sync="qrCodeVisible">
<div class="qrIMGbox">
<img class="qrIMG" :src="url" />
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="refreshQrcode">刷新</el-button>
</span>
</GLDialog>
</div>
</template>
......@@ -18,6 +26,7 @@ export default {
data() {
return {
url,
qrCodeVisible: false,
searchForm: {
belongWechat: '',
staffName: '',
......@@ -70,11 +79,7 @@ export default {
listName: 'list',
tableColumns: [
{
label: '员工姓名',
prop: 'staffName'
},
{
label: '员工企微号',
label: '员工企微',
prop: 'staffNum'
},
{
......@@ -119,6 +124,12 @@ export default {
setTableFinishFun() {
//接收到的数据为空
this.$refs.activeTable.data.length ? (this.$refs.activeTable.tableHeightValues = '') : this.$refs.activeTable.setTableHeightFun()
},
handleqrCode() {
this.qrCodeVisible = true
},
refreshQrcode() {
console.log('1111')
}
}
}
......@@ -143,5 +154,15 @@ export default {
color: #5850ff;
border: 1px solid #5850ff;
}
.qrIMGbox{
display: flex;
align-items: center;
justify-content: center;
.qrIMG {
width: 150px;
height: 150px;
}
}
}
</style>
<template>
<div class="container">
<div>
<el-button @click="addSendGroup" :size="size" type="primary" mode="el-button">新建群发</el-button>
<div>
<div class="createANewGroupBtn">
<el-button @click="addSendGroup" :size="size" type="primary" mode="el-button">
<i class="el-icon-plus"></i>
新建群发
</el-button>
</div>
<GLCombiForm :formObj="searchForm" :rowNumber="1" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<GLTable ref="groupTable" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun"></GLTable>
<div class="container">
<GLCombiForm :formObj="searchForm" :rowNumber="1" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset">
<div slot="optionBtns">
<div class="sendRecord" @click="traceRecord">发送记录</div>
</div>
</GLCombiForm>
<GLTable ref="groupTable" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun"></GLTable>
</div>
<el-drawer size="40%" title="发送记录" :visible.sync="sendRecordDrawer.isVisible" :direction="sendRecordDrawer.direction">
<div class="horizon"></div>
<div class="sendRecordDrawerbox">
<div v-for="(item, index) in sendRecordDrawer.traceFailandSuccess" :key="index" class="itemContent">
<div>
<p class="title">{{ item.title }}</p>
<p class="num" :style="{ color: item.color }">{{ item.num }}</p>
</div>
</div>
</div>
<GLTable ref="sendRecordDrawer.ref" :noDataImg="url" :getListApi="sendRecordDrawer.getListApi" :searchForm="sendRecordDrawer.searchForm" :tableParams="sendRecordDrawer.tableParams" :pageConf="sendRecordDrawer.pageConf"></GLTable>
</el-drawer>
</div>
</template>
......@@ -15,6 +36,45 @@ export default {
data() {
return {
url,
sendRecordDrawer: {
isVisible: false,
direction: 'rtl',
traceFailandSuccess: [
{
title: '发送成功',
id: '1',
num: 22,
color: '#2CCA74'
},
{
title: '发送失败',
id: '2',
num: 4,
color: '#EB4E4E '
}
],
ref: 'sendRecordDrawerRef',
getListApi: '',
searchForm: '',
tableParams: {
listName: 'list',
tableColumns: [
{
label: '客户',
prop: 'sendName'
},
{
label: '发送时间',
prop: 'senaStore'
},
{
label: '发送结果',
prop: 'customerNum'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
},
searchForm: {
sendName: '',
sendTime: '',
......@@ -23,7 +83,7 @@ export default {
searchFormData: [
{
label: '群发名称',
name: 'sendName',
name: 'messagingName',
type: 'input',
isClear: true
},
......@@ -35,7 +95,7 @@ export default {
},
{
label: '群发门店',
name: 'store',
name: 'merchantName',
type: 'input',
isClear: true
}
......@@ -45,37 +105,49 @@ export default {
tableColumns: [
{
label: '群发名称',
prop: 'sendName'
prop: 'messagingName'
},
{
label: '群发门店',
prop: 'senaStore'
prop: 'messagingMerchant'
},
{
label: '客户数',
prop: 'customerNum'
prop: 'customerCount'
},
{
label: '标签/人群',
prop: 'tag'
prop: 'labelCrowdName'
},
{
label: '创建时间',
prop: 'creatTime'
prop: 'createTime'
},
{
label: '发送状态',
prop: 'sendStatus'
prop: 'sendState'
},
{
label: '完成情况(失败/成功)',
prop: 'finish',
label: '发送成功',
prop: 'successCompletion',
width: '200'
},
{
label: '发送失败',
prop: 'failCompletion',
width: '200'
},
{
label: '操作',
prop: 'optionBtns',
width: '66px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
// getListApi: this.$apis.accountConfig.listCustomizedAgentWithPage,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
getListApi: this.$apis.wechatGroup.batchmessagingRecord
}
},
methods: {
......@@ -98,12 +170,18 @@ export default {
// 跳转新建群发
addSendGroup() {
this.$router.push('/wechatGroup/addWechatGroup')
},
traceRecord() {
this.sendRecordDrawer.isVisible = true
}
}
}
</script>
<style lang="scss" scoped>
.createANewGroupBtn {
margin-bottom: 16px;
}
.container {
padding: 20px;
background-color: #fff;
......@@ -122,5 +200,32 @@ export default {
color: #5850ff;
border: 1px solid #5850ff;
}
.sendRecord {
color: #5850ff;
}
}
.horizon {
width: 100%;
height: 1px;
background: #e8e8ea;
}
.sendRecordDrawerbox {
padding: 20px;
display: flex;
justify-content: space-around;
.itemContent {
width: 334px;
padding: 8px 0 8px 20px;
border: 1px solid #e8e8ea;
}
.title {
color: #666666;
font-size: 14px;
margin-bottom: 8px;
}
.num {
font-size: 20px;
font-width: 600;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!