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 => { ...@@ -32,8 +32,30 @@ const wechatDepositList = params => {
sign: true 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 { export default {
getLoginQcCode, getLoginQcCode,
getQcCodeDetail, getQcCodeDetail,
wechatDepositList wechatDepositList,
wechatDepositNotAccessList,
getStaffFriends
} }
import { http, http2 } from '@/main' import {http, http2} from '@/main'
const path = 'entmicro.api.mass.' const path = 'entmicro.api.mass.'
const URL = 'rop-scrm-entmicro/router' const URL = 'rop-scrm-entmicro/router'
...@@ -22,7 +22,6 @@ const queryCrowdtree = params => { ...@@ -22,7 +22,6 @@ const queryCrowdtree = params => {
sign: true sign: true
}) })
} }
const batchmessagingRecord = params => { const batchmessagingRecord = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.record' params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.record'
return http({ return http({
...@@ -50,7 +49,7 @@ const atchmessagingCreate = params => { ...@@ -50,7 +49,7 @@ const atchmessagingCreate = params => {
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
const getStoreList = params => { const getStoreList = params => {
...@@ -78,9 +77,11 @@ const sendStop = params => { ...@@ -78,9 +77,11 @@ const sendStop = params => {
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
// 获取可选跟进员工
export default { export default {
...@@ -91,5 +92,5 @@ export default { ...@@ -91,5 +92,5 @@ export default {
atchmessagingCreate, atchmessagingCreate,
getStoreList, getStoreList,
recordSend, recordSend,
sendStop 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 { ...@@ -167,6 +167,7 @@ export default {
// 恢复选择 // 恢复选择
addSelected() { addSelected() {
this.$nextTick(() => { this.$nextTick(() => {
console.log(this.innerTags)
var list = JSON.parse(JSON.stringify(this.innerTags)) var list = JSON.parse(JSON.stringify(this.innerTags))
if (list && list.length) { if (list && list.length) {
list.forEach(row => { list.forEach(row => {
......
...@@ -3,6 +3,7 @@ import * as dayjs from "dayjs"; ...@@ -3,6 +3,7 @@ import * as dayjs from "dayjs";
export default { export default {
data() { data() {
return { return {
selectSenderList:null,
groupNumber: 0, groupNumber: 0,
viewLoading: false, viewLoading: false,
isUpdate: true, isUpdate: true,
...@@ -39,6 +40,26 @@ export default { ...@@ -39,6 +40,26 @@ export default {
} }
}, },
methods: { 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) { handleCancel(path) {
if (this.editStatus || this.$refs.welcome.previewList.length > 0) { if (this.editStatus || this.$refs.welcome.previewList.length > 0) {
...@@ -152,7 +173,8 @@ export default { ...@@ -152,7 +173,8 @@ export default {
}) })
}, },
// 查看群发人数 // 查看群发人数
async viewMembers() { async viewMembers(managedType) {
if (managedType == 1) {
if (this.basicForm.selectType == '1' && !this.taggingList.length) { if (this.basicForm.selectType == '1' && !this.taggingList.length) {
return this.$message({ return this.$message({
type: 'error', type: 'error',
...@@ -165,11 +187,16 @@ export default { ...@@ -165,11 +187,16 @@ export default {
message: '请选择人群' message: '请选择人群'
}) })
} }
let params = this.getBaseInfo() let params = this.getBaseInfo(managedType)
this.viewLoading = true this.viewLoading = true
await this.getTheNumberOfPeople(params) await this.getTheNumberOfPeople(params)
this.isUpdate = false this.isUpdate = false
this.viewLoading = false this.viewLoading = false
}
if (managedType ==2) {
this.groupNumber = this.basicForm.customerList.length
this.isUpdate = false
}
}, },
// 发送时间change事件 // 发送时间change事件
changeValue(v) { changeValue(v) {
...@@ -186,8 +213,10 @@ export default { ...@@ -186,8 +213,10 @@ export default {
} }
} }
}, },
getBaseInfo() { getBaseInfo(managedType) {
let params = { let params = {}
if (managedType == 1){
params = {
customerType: this.basicForm.selectType, customerType: this.basicForm.selectType,
msgName: this.basicForm.groupName, msgName: this.basicForm.groupName,
msgMerchantId: this.basicForm.selectStore ? this.basicForm.selectStore : this.basicForm.taskMerchantId, msgMerchantId: this.basicForm.selectStore ? this.basicForm.selectStore : this.basicForm.taskMerchantId,
...@@ -204,6 +233,21 @@ export default { ...@@ -204,6 +233,21 @@ export default {
params.crowdList = this.basicForm.crowdList params.crowdList = this.basicForm.crowdList
params.combineType = combineType.crowd 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 return params
}, },
// 人群筛选弹窗 // 人群筛选弹窗
...@@ -217,6 +261,21 @@ export default { ...@@ -217,6 +261,21 @@ export default {
} }
this.$refs.selectCrowd.init(this.basicForm.crowdList) 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) { getCrowdData(val) {
this.isUpdate = true this.isUpdate = true
...@@ -244,5 +303,10 @@ export default { ...@@ -244,5 +303,10 @@ export default {
} }
this.key = new Date() this.key = new Date()
}, },
removeCustomer(item, index) {
this.basicForm.customerList.splice(index, 1)
this.getCustomerData(this.basicForm.customerList)
this.key = new Date()
},
} }
} }
<template> <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> <div>
<el-button class="table-btn" @click="handleqrCode" :size="size" type="primary" plain mode="el-button"> <div>
企微接入授权 <el-tabs v-model="activeNameHostingList" @tab-click="handleClick">
</el-button> <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> </div>
</el-button>
</div> </div>
<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" <GLTable ref="activeTable" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm"
:tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun"> :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun">
<div slot="staffName" slot-scope="scope"> <div slot="staffName" slot-scope="scope">
...@@ -36,11 +49,13 @@ ...@@ -36,11 +49,13 @@
</span> </span>
</GLDialog> </GLDialog>
</div> </div>
</div>
</template> </template>
<script> <script>
import url from '@/assets/empty.png' 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' import {utils} from 'glsx-common'
...@@ -49,6 +64,7 @@ export default { ...@@ -49,6 +64,7 @@ export default {
data() { data() {
return { return {
url, url,
activeNameHostingList: 'first',
show: true, show: true,
count: '', count: '',
timer: null, timer: null,
...@@ -136,10 +152,14 @@ export default { ...@@ -136,10 +152,14 @@ export default {
} }
] ]
}, },
tableColumnsCopy: [],
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count'}, pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count'},
getListApi: this.$apis.collocation.wechatDepositList getListApi: this.$apis.collocation.wechatDepositList
} }
}, },
created() {
this.tableColumnsCopy = this.tableParams.tableColumns.slice()
},
methods: { methods: {
handleSearch() { handleSearch() {
this.$refs.activeTable.refreshTable() this.$refs.activeTable.refreshTable()
...@@ -228,12 +248,25 @@ export default { ...@@ -228,12 +248,25 @@ export default {
} else { } else {
this.clearAllInterval() 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.enterpriseMicroLogin{
display: flex;
align-items: center;
img{
margin-right: 8px;
}
}
/deep/ { /deep/ {
.el-table th > .cell { .el-table th > .cell {
padding: 0 16px; padding: 0 16px;
...@@ -241,6 +274,7 @@ export default { ...@@ -241,6 +274,7 @@ export default {
} }
.container { .container {
margin-top: 16px;
padding: 20px; padding: 20px;
background-color: #fff; background-color: #fff;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!