Commit 505e782b by wuwx

群发助手接口联调

1 parent c4d20a30
...@@ -378,6 +378,28 @@ const getMaterialListApi = params => { ...@@ -378,6 +378,28 @@ const getMaterialListApi = params => {
sign: true sign: true
}) })
} }
// 更新客户群发客户列表
const renewDetailList = params => {
params.method = `${path}update.merchant`
return http({
url: URL,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
// 客户群发统计
const renewStatistic = params => {
params.method = `${path}update.group.detail`
return http({
url: URL,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { export default {
customerList, customerList,
...@@ -416,5 +438,7 @@ export default { ...@@ -416,5 +438,7 @@ export default {
queryCrowdtree, queryCrowdtree,
followerEcho, followerEcho,
getGroupListApi, getGroupListApi,
getMaterialListApi getMaterialListApi,
renewDetailList,
renewStatistic
} }
...@@ -123,11 +123,11 @@ ...@@ -123,11 +123,11 @@
</div> </div>
<div class="data"> <div class="data">
<div class="titles">数据统计</div> <div class="titles">数据统计</div>
<div> <div style="cursor:pointer;" @click="refreshData">
<i class="el-icon-refresh-right"></i> <i class="el-icon-refresh-right"></i>
<span style="margin-right: 8px;">更新数据</span> <span style="margin-right: 8px;">更新数据</span>
</div> </div>
<span style="color: #999;">更新于 2022-8-4 10:24:44</span> <span style="color: #999;" v-if="time">更新于 {{time}}</span>
</div> </div>
<div class="statistics-info"> <div class="statistics-info">
<div class="statistics-ul"> <div class="statistics-ul">
...@@ -208,7 +208,9 @@ export default { ...@@ -208,7 +208,9 @@ export default {
condition: {} condition: {}
}, },
statistic: {}, statistic: {},
limitUserList: [] limitUserList: [],
time: '',
timeId: Function
} }
}, },
watch: { watch: {
...@@ -223,6 +225,7 @@ export default { ...@@ -223,6 +225,7 @@ export default {
mounted() { mounted() {
this.getCustomerDetail(this.id) this.getCustomerDetail(this.id)
this.getStatistic() this.getStatistic()
this.refreshData()
// console.log(this.basicInfo.condition, '----') // console.log(this.basicInfo.condition, '----')
}, },
computed: { computed: {
...@@ -249,6 +252,20 @@ export default { ...@@ -249,6 +252,20 @@ export default {
this.eventBus.$emit('update', previewList) this.eventBus.$emit('update', previewList)
}) })
}, },
refreshData() {
clearTimeout(this.timeId)
this.timeId = setTimeout(() => {
const { id } = this
this.$apis.customerTransform.renewStatistic({ id }).then(res => {
if (res.code == 0) {
this.getStatistic()
this.time = res.data.createdTime
this.$emit('getStaffList')
this.$emit('getCustomerList')
}
})
}, 1500)
},
getStatistic() { getStatistic() {
const { id, form } = this const { id, form } = this
if (form == 'customer') { if (form == 'customer') {
......
<template> <template>
<div> <div>
<BasicInof :eventBus="eventBus" :id="$route.params.id" :form="'customer'"></BasicInof> <BasicInof :eventBus="eventBus" :id="$route.params.id" :form="'customer'" @getStaffList="getStaffList" @getCustomerList="getCustomerList"></BasicInof>
<div class="detail-container"> <div class="detail-container">
<div class="detail-modular"> <div class="detail-modular">
<div class="title">员工详情</div> <div class="title">员工详情</div>
......
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
<GLButton type="primary" :size="size" icon="el-icon-plus" fn="新建客户群发" @click="btnClick('create', 1)">新建群发</GLButton> <GLButton type="primary" :size="size" icon="el-icon-plus" fn="新建客户群发" @click="btnClick('create', 1)">新建群发</GLButton>
<div class="text">企业统一选择要发送的客户,由添加客户的成员确认后发送给客户,消息内容仅管理员和负责人可创建。</div> <div class="text">企业统一选择要发送的客户,由添加客户的成员确认后发送给客户,消息内容仅管理员和负责人可创建。</div>
<div class="renew"> <div class="renew">
<div> <div style="cursor:pointer;" @click="refreshData('1')">
<i class="el-icon-refresh-right"></i> <i class="el-icon-refresh-right"></i>
<span style="margin-right: 8px;">更新数据</span> <span style="margin-right: 8px;">更新数据</span>
</div> </div>
<span style="color: #999;">更新于 2022-8-4 10:24:44</span> <span style="color: #999;" v-if="time">更新于 {{time}}</span>
</div> </div>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
...@@ -54,11 +54,11 @@ ...@@ -54,11 +54,11 @@
<GLButton type="primary" :size="size" fn="新建客户群群发" icon="el-icon-plus" @click="btnClick('create', 2)">新建群发</GLButton> <GLButton type="primary" :size="size" fn="新建客户群群发" icon="el-icon-plus" @click="btnClick('create', 2)">新建群发</GLButton>
<div class="text">管理员或负责人统一创建内容,群主收到通知后,可选择他管理的客户群并群发。</div> <div class="text">管理员或负责人统一创建内容,群主收到通知后,可选择他管理的客户群并群发。</div>
<div class="renews"> <div class="renews">
<div> <div style="cursor:pointer;" @click="refreshData('2')">
<i class="el-icon-refresh-right"></i> <i class="el-icon-refresh-right"></i>
<span style="margin-right: 8px;">更新数据</span> <span style="margin-right: 8px;">更新数据</span>
</div> </div>
<span style="color: #999;">更新于 2022-8-4 10:24:44</span> <span style="color: #999;" v-if="times">更新于 {{times}}</span>
</div> </div>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
...@@ -96,6 +96,9 @@ export default { ...@@ -96,6 +96,9 @@ export default {
5: '链接' 5: '链接'
} }
return { return {
timeId: Function,
time:'',
times:'',
ATT_TYPE, ATT_TYPE,
activeIndex: 1, activeIndex: 1,
// 表格按钮 // 表格按钮
...@@ -328,20 +331,39 @@ export default { ...@@ -328,20 +331,39 @@ export default {
}, },
mounted() { mounted() {
// this.wxTips() // this.wxTips()
this.refreshData('1')
}, },
beforeDestroy() { beforeDestroy() {
this.$message.closeAll() this.$message.closeAll()
}, },
methods: { methods: {
refreshData(type) {
clearTimeout(this.timeId)
this.timeId = setTimeout(() => {
this.$apis.customerTransform.renewDetailList({}).then(res => {
if(res.code == '0'){
if(type == 1) {
this.time = res.data.createdTime
this.$refs.customer.refreshTable()
} else if(type == 2) {
this.times = res.data.createdTime
this.$refs.customerGroup.refreshTable()
}
}
})
}, 1500)
},
switchMenu(val) { switchMenu(val) {
this.$nextTick(() => { this.$nextTick(() => {
this.activeIndex = val this.activeIndex = val
if (val == 1) { if (val == 1) {
this.key = new Date() this.key = new Date()
if (this.$refs.customer) this.$refs.customer.refreshTable() if (this.$refs.customer) this.$refs.customer.refreshTable()
this.refreshData('1')
} else { } else {
this.groupKey = new Date() this.groupKey = new Date()
if (this.$refs.customerGroup) this.$refs.customerGroup.refreshTable() if (this.$refs.customerGroup) this.$refs.customerGroup.refreshTable()
this.refreshData('2')
} }
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!