Commit 1c148811 by xuyl

更新联调内容,优化样式以及门店下拉搜索框

1 parent 9c923e39
......@@ -33,7 +33,7 @@ const batchmessagingRecord = params => {
})
}
// 企微群发查看预计群发人数
const atchmessagingCustomercount = params => {
const batchmessagingCustomercount = params => {
params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.customercount'
return http({
url: URL,
......@@ -49,7 +49,8 @@ const atchmessagingCreate = params => {
url: URL,
method: 'POST',
data: params,
sign: true
sign: true,
returnAll:true
})
}
const getStoreList = params => {
......@@ -71,14 +72,13 @@ const recordSend = params => {
})
}
// 企微高级群发查看预计群发人数
export default {
querylabeltree,
queryCrowdtree,
batchmessagingRecord,
atchmessagingCustomercount,
batchmessagingCustomercount,
atchmessagingCreate,
getStoreList,
recordSend
......
......@@ -23,7 +23,7 @@
</div>
</GLTable>
<GLDialog :title="'授权登入二维码'" mode="small" :visible.sync="qrCodeVisible">
<div class="qrIMGbox">
<div v-loading="addLoading" class="qrIMGbox">
<img class="qrIMG" :src="qrcodeUrl" />
</div>
<span slot="footer" class="dialog-footer">
......@@ -40,6 +40,8 @@ export default {
data() {
return {
url,
verifyQRCodeFailsToOpen: false,
addLoading: false,
qrcodeUrl: '',
qrCodeVisible: false,
qrcodeId: '',
......@@ -130,40 +132,48 @@ export default {
//接收到的数据为空
this.$refs.activeTable.data.length ? (this.$refs.activeTable.tableHeightValues = '') : this.$refs.activeTable.setTableHeightFun()
},
handleqrCode() {
async handleqrCode() {
this.addLoading = true
this.qrCodeVisible = true
// this.$apis.collocation
// .getLoginQcCode({})
// .then(res => {
// if (res.code == '-1') {
// this.qrCodeVisible = false
// } else {
// this.qrcodeUrl = `data:image/png;base64,${res.data}`
// this.this.qrcodeId = res.id
// this.qrCodeVisible = true
// }
// })
// .catch(err => {
// this.qrCodeVisible = false
// })
await this.$apis.collocation
.getLoginQcCode({})
.then(res => {
this.addLoading = false
;(this.verifyQRCodeFailsToOpen = true), (this.qrcodeUrl = `data:image/png;base64,${res.qcCodeUrl}`)
this.qrcodeId = res.id
})
.catch(err => {
this.qrCodeVisible = false
})
},
verifyQRCodeIsInvalid() {
this.qrCodeInterval = setInterval(() => {
// this.$apis.collocation.getQcCodeDetail({ id: this.qrcodeId }).then(res => {
// if (res && res.data == true) {
// return
// } else {
// }
// })
this.$apis.collocation.getQcCodeDetail({ id: this.qrcodeId }).then(res => {
if (res == true) {
this.$message({
type: 'error',
message: '二维码已失效,请刷新'
})
this.verifyQRCodeFailsToOpen = false
clearInterval(this.qrCodeInterval)
return
}
})
}, 3000000)
},
refreshQrcode() {
this.handleqrCode()
}
},
computed: {
listenChange() {
const { verifyQRCodeFailsToOpen, qrCodeVisible } = this
return { verifyQRCodeFailsToOpen, qrCodeVisible }
}
},
watch: {
qrCodeVisible(newVal) {
if (newVal == true) {
listenChange(val) {
if (val.qrCodeVisible == true && val.verifyQRCodeFailsToOpen == true) {
this.verifyQRCodeIsInvalid()
} else {
clearInterval(this.qrCodeInterval)
......
......@@ -15,15 +15,14 @@
</div>
</div>
<div slot="sendState" slot-scope="scope">
<div class="loginStatus" v-if="scope.scope.sendState">
<div class="loginStatus">
<span class="cycle" :style="{ background: scope.scope.sendState == '1' ? '#2CCA74' : scope.scope.sendState == '2' ? '#EB4E4E' : scope.scope.sendState == '0' ? '#FDB757' : '' }"></span>
{{ scope.scope.sendState == '1' ? '已完成' : scope.scope.sendState == '2' ? '发送失败' : scope.scope.sendState == '0' ? '发送中' : '' }}
</div>
<div v-else>--</div>
</div>
</GLTable>
</div>
<el-drawer size="40%" title="发送记录" :visible.sync="sendRecordDrawer.isVisible" :direction="sendRecordDrawer.direction">
<el-drawer size="50%" 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">
......@@ -33,7 +32,14 @@
</div>
</div>
</div>
<GLTable ref="sendRecordDrawerRef" :noDataImg="url" :getListApi="sendRecordDrawer.getListApi" :searchForm="sendRecordDrawer.searchForm" :tableParams="sendRecordDrawer.tableParams" :pageConf="sendRecordDrawer.pageConf"></GLTable>
<GLTable ref="sendRecordDrawerRef" :noDataImg="url" :getListApi="sendRecordDrawer.getListApi" :searchForm="sendRecordDrawer.searchForm" :tableParams="sendRecordDrawer.tableParams" :pageConf="sendRecordDrawer.pageConf">
<div slot="sendResult" slot-scope="scope">
<div class="loginStatus">
<span class="cycle" :style="{ background: scope.scope.sendResult == true ? '#2CCA74' : scope.scope.sendResult == false ? '#EB4E4E' : '' }"></span>
{{ scope.scope.sendResult == true ? '成功' : scope.scope.sendResult == false ? '失败' : '' }}
</div>
</div>
</GLTable>
</el-drawer>
</div>
</template>
......@@ -63,7 +69,7 @@ export default {
}
],
searchForm: {
messagingId: ''
msgId: ''
},
tableParams: {
listName: 'data',
......@@ -78,18 +84,19 @@ export default {
},
{
label: '发送结果',
prop: 'sendResult'
prop: 'sendResult',
addHtml: 'sendResult'
}
]
},
getListApi: this.$apis.wechatGroup.recordSend,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' }
},
searchForm: {},
searchFormData: [
{
label: '群发名称',
name: 'messagingName',
name: 'msgName',
type: 'input',
isClear: true
},
......@@ -107,7 +114,7 @@ export default {
},
{
label: '群发门店',
name: 'merchantName',
name: 'msgMerchantName',
type: 'input',
isClear: true
}
......@@ -130,7 +137,10 @@ export default {
},
{
label: '标签/人群',
prop: 'labelCrowdName'
prop: 'labelCrowdName',
width: 170,
// addHtml: 'labelCrowdName',
line: 1
},
{
label: '创建时间',
......@@ -202,11 +212,10 @@ export default {
const { msgId, successCompletion, failCompletion } = scope
this.sendRecordDrawer.traceFailandSuccess[0].num = successCompletion
this.sendRecordDrawer.traceFailandSuccess[1].num = failCompletion
this.sendRecordDrawer.searchForm.messagingId = msgId
// await this.$refs.sendRecordDrawerRef.refreshTable()
this.sendRecordDrawer.searchForm.msgId = msgId
this.sendRecordDrawer.isVisible = true
this.$nextTick(() => {
this.$refs.sendRecordDrawerRef.refreshTable()
this.$refs.sendRecordDrawerRef.refreshTable()
})
}
}
......@@ -214,6 +223,17 @@ export default {
</script>
<style lang="scss" scoped>
.loginStatus {
display: flex;
align-items: center;
.cycle {
margin-right: 8px;
width: 6px;
height: 6px;
display: inline-block;
border-radius: 50%;
}
}
.createANewGroupBtn {
margin-bottom: 16px;
}
......@@ -259,9 +279,9 @@ export default {
.sendRecordDrawerbox {
padding: 20px;
display: flex;
justify-content: space-around;
justify-content: space-between;
.itemContent {
width: 334px;
width: 46%;
padding: 8px 0 8px 20px;
border: 1px solid #e8e8ea;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!