Commit 73370fe4 by 前端

Merge branch 'xuyl_dev_v2.11.0' into 'v2.11.0'

Xuyl dev v2.11.0

See merge request !18
2 parents e0f701c7 779309ce
import { http, http2 } from '@/main'
const URL = 'rop-scrm-entmicro/router'
export default {
}
...@@ -23,9 +23,28 @@ const queryCrowdtree = params => { ...@@ -23,9 +23,28 @@ const queryCrowdtree = params => {
}) })
} }
const customerCount = params => { const batchmessagingRecord = params => {
params.method = 'entmicro.api.mass.detail.customer.filter.count' params.method = 'entmicro.api.wechatcloudcontrol.batchmessaging.record'
// return http({ 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({ return http({
url: URL, url: URL,
method: 'POST', method: 'POST',
...@@ -37,5 +56,7 @@ const customerCount = params => { ...@@ -37,5 +56,7 @@ const customerCount = params => {
export default { export default {
querylabeltree, querylabeltree,
queryCrowdtree, queryCrowdtree,
customerCount batchmessagingRecord,
atchmessagingCustomercount,
atchmessagingCreate
} }
...@@ -4,10 +4,18 @@ ...@@ -4,10 +4,18 @@
<div class="table-header"> <div class="table-header">
<div class="header-text">已激活列表</div> <div class="header-text">已激活列表</div>
<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>
</div> </div>
<GLTable ref="activeTable" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun"></GLTable> <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> </div>
</template> </template>
...@@ -18,6 +26,7 @@ export default { ...@@ -18,6 +26,7 @@ export default {
data() { data() {
return { return {
url, url,
qrCodeVisible: false,
searchForm: { searchForm: {
belongWechat: '', belongWechat: '',
staffName: '', staffName: '',
...@@ -70,11 +79,7 @@ export default { ...@@ -70,11 +79,7 @@ export default {
listName: 'list', listName: 'list',
tableColumns: [ tableColumns: [
{ {
label: '员工姓名', label: '员工企微',
prop: 'staffName'
},
{
label: '员工企微号',
prop: 'staffNum' prop: 'staffNum'
}, },
{ {
...@@ -119,6 +124,12 @@ export default { ...@@ -119,6 +124,12 @@ export default {
setTableFinishFun() { setTableFinishFun() {
//接收到的数据为空 //接收到的数据为空
this.$refs.activeTable.data.length ? (this.$refs.activeTable.tableHeightValues = '') : this.$refs.activeTable.setTableHeightFun() 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 { ...@@ -143,5 +154,15 @@ export default {
color: #5850ff; color: #5850ff;
border: 1px solid #5850ff; border: 1px solid #5850ff;
} }
.qrIMGbox{
display: flex;
align-items: center;
justify-content: center;
.qrIMG {
width: 150px;
height: 150px;
}
}
} }
</style> </style>
...@@ -2,66 +2,51 @@ ...@@ -2,66 +2,51 @@
<div class> <div class>
<div class="container"> <div class="container">
<div> <div>
<!-- 基础信息 -->
<div class="title">基础信息</div> <div class="title">基础信息</div>
<div class="info-box"> <div class="info-box">
<div class="info-content gl-form-page"> <div class="info-content gl-form-page">
<el-form class="basic-form" :model="basicForm" :rules="basicRules" ref="basicForm" label-width="154px"> <el-form class="basic-form" :model="basicForm" :rules="basicRules" ref="basicForm" label-width="154px">
<el-form-item label="群发名称:"> <el-form-item label="群发名称:" prop="groupName">
<el-input size="small" v-model="basicForm.sendName"></el-input> <el-input size="small" v-model="basicForm.groupName"></el-input>
</el-form-item>
<el-form-item>
<label slot="label" class="required">选择门店:</label>
<el-button size="small" @click="openStore">
<i class="el-icon-plus"></i>
选择门店
</el-button>
<div v-show="basicForm.selectStore" class="el-input-tag input-tag-wrapper">
<el-tag :size="size" type="info" closable :disable-transitions="false">{{ basicForm.selectStore }}</el-tag>
</div>
</el-form-item> </el-form-item>
<!-- <el-form-item label="选择门店:">-->
<!-- <el-select-->
<!-- clearable-->
<!-- filterable-->
<!-- remote-->
<!-- :remote-method="remoteMethod"-->
<!-- v-el-select-loadmore="loadmore"-->
<!-- v-model="ruleForm.merchant"-->
<!-- placeholder="请选择商户"-->
<!-- @change="selectChange"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="(x, i) in dataItems"-->
<!-- :key="i"-->
<!-- :label="x.merchantName"-->
<!-- :value="x.merchantName"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="选择客户:" prop="selectType"> <el-form-item label="选择客户:" prop="selectType">
<el-radio-group @change="radioChange" v-model="basicForm.selectType"> <el-radio-group @change="radioChange" v-model="basicForm.selectType">
<el-radio :label="1">标签筛选</el-radio> <el-radio :label="1">标签筛选</el-radio>
<el-radio :label="2">人群筛选</el-radio> <el-radio :label="2">人群筛选</el-radio>
</el-radio-group> </el-radio-group>
<div class="filter-box" v-show="basicForm.selectType == 1"> <div v-show="basicForm.selectType == 1">
<div class="filter-memeber"> <div class="selectedLabel">
<el-form :model="basicForm.condition" label-width="154px"> <el-button size="small" @click="openLabel">
<el-form-item label="性别:"> <i class="el-icon-plus"></i>
<el-radio-group v-model="basicForm.condition.sex" @change="valueChange"> 选择标签
<el-radio label>全部</el-radio> </el-button>
<el-radio :label="1">男性</el-radio> <div class="selectLen" v-show="taggingList.length != 0">(已选
<el-radio :label="2">女性</el-radio> <span class="num">{{taggingList.length}}</span>
<el-radio :label="0">未知性别</el-radio> 个标签)</div>
</el-radio-group> </div>
</el-form-item> <div v-show="tagging.length != 0" :key="key" class="el-input-tag input-tag-wrapper">
<el-form-item label="所在群聊:"> <span v-for="(tag, idx) in tagging" :key="idx">
<el-select v-model="basicForm.condition.chat" @change="valueChange" @focus="groupFocus" :size="size" value-key="id" multiple collapse-tags placeholder="请选择"> <el-tag v-for="(tagItem, idx1) in tag.labelList" :key="idx1" :size="size" type="info" closable :disable-transitions="false" @close="removeTag(tag, idx1, idx)">{{ tagItem.name }}</el-tag>
<el-option v-for="item in groupList" :key="item.id" :label="item.groupName" :value="item"></el-option> </span>
</el-select>
</el-form-item>
<el-form-item label="添加客户时间:">
<el-date-picker v-model="basicForm.condition.date" @change="valueChange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :size="size" style="width: 320px"></el-date-picker>
</el-form-item>
<el-form-item label="标签筛选:">
<el-button size="small" @click="openLabel">
<i class="el-icon-plus"></i>
标签筛选
</el-button>
<div v-show="tagging.length != 0" :key="key" class="el-input-tag input-tag-wrapper">
<span v-for="(tag, idx) in tagging" :key="idx">
<el-tag v-for="(tagItem, idx1) in tag.labelList" :key="idx1" :size="size" type="info" closable :disable-transitions="false" @close="removeTag(tag, idx1, idx)">{{ tagItem.name }}</el-tag>
</span>
</div>
<!-- <div class="sale-select" v-show="basicForm.condition.labelList">
<div :key="key" class="el-input-tag input-tag-wrapper">
<el-tag v-for="(tag, idx) in basicForm.condition.labelList" :key="idx" :size="size" type="info" closable :disable-transitions="false" @close="remove(tag)">{{ tag.staffName }}</el-tag>
<el-input size="small" style="outline: none; border: none"></el-input>
</div>
</div> -->
</el-form-item>
</el-form>
</div> </div>
</div> </div>
<div v-show="basicForm.selectType == 2" style="line-height: 32px; padding-bottom: 10px"> <div v-show="basicForm.selectType == 2" style="line-height: 32px; padding-bottom: 10px">
...@@ -77,7 +62,7 @@ ...@@ -77,7 +62,7 @@
<div v-show="basicForm.selectType == 2" class="crowd-tips">人群标签存在重复客户,群发人数会自动去重。若一个客户有多个成员添加,可手动在群发账号中删除多余成员。</div> <div v-show="basicForm.selectType == 2" class="crowd-tips">人群标签存在重复客户,群发人数会自动去重。若一个客户有多个成员添加,可手动在群发账号中删除多余成员。</div>
<div class="filter-footer"> <div class="filter-footer">
<div class="filter-number"> <div class="filter-number">
查看预计群发人数 预计群发人数
<el-button type="text" v-show="isUpdate" :loading="viewLoading" @click="viewMembers">查看</el-button> <el-button type="text" v-show="isUpdate" :loading="viewLoading" @click="viewMembers">查看</el-button>
<span v-show="!isUpdate">{{ groupNumber }}</span> <span v-show="!isUpdate">{{ groupNumber }}</span>
</div> </div>
...@@ -90,31 +75,22 @@ ...@@ -90,31 +75,22 @@
<el-form :model="basicForm" :rules="basicRules" ref="groupForm" label-width="154px"> <el-form :model="basicForm" :rules="basicRules" ref="groupForm" label-width="154px">
<el-form-item prop="attachmentList"> <el-form-item prop="attachmentList">
<label slot="label" class="required">群发内容:</label> <label slot="label" class="required">群发内容:</label>
<GLEditor ref="welcome" :form="'customer'" style="line-height: 12px;" :btnList="btnList" @previewWord="previewForm"></GLEditor> <GLEditor ref="welcome" :form="'customer'" style="line-height: 12px;" :btnList="btnList" ></GLEditor>
<div v-show="attachmentShow" class="el-form-item__error">{{ attachmentText }}</div> <div v-show="attachmentShow" class="el-form-item__error">{{ attachmentText }}</div>
</el-form-item> </el-form-item>
<div class="transform-text"> <div class="transform-text">
<!-- <div class="tips-icon"><img src="@/assets/guestCustom/tips.png" alt /></div> -->
<span>每位客户每天可接收1条群发消息,超过接收上限的客户将无法再收到群发消息。</span> <span>每位客户每天可接收1条群发消息,超过接收上限的客户将无法再收到群发消息。</span>
<!-- <span v-if="form == 'customerGroup'">每个客户群每天可接收1条群发消息,超过接收上限的客户群将无法再收到群发消息。</span> -->
</div> </div>
</el-form> </el-form>
</div> </div>
</div> </div>
<div class="preview">
<Preview :previewVal="previewVal"></Preview>
</div>
</div> </div>
</div> </div>
<!-- <GLDialog :bigTitle="'选择成员'" mode="big" :visible.sync="membersVisible" @onOk="handleConfirm" @onCancel="membersVisible = !membersVisible">
<SelectMember ref="membersForm" v-if="membersVisible" :selectData="selectData"></SelectMember>
</GLDialog> -->
</div> </div>
<GLFooter> <GLFooter>
<el-button type="primary" v-loading="addLoading" @click="handleSubmit">发送</el-button> <el-button type="primary" v-loading="addLoading" @click="handleSubmit">发送</el-button>
<el-button @click="handleCancel">取消</el-button> <el-button @click="handleCancel">取消</el-button>
</GLFooter> </GLFooter>
<SelectStore ref="SelectStore" @crowdData="getCrowdData" :storeDiaVisible="storeDiaVisible"></SelectStore>
<SelectLabel ref="selectLabel" @tagSelected="handleSelect" :dialogVisible="dialogVisible"></SelectLabel> <SelectLabel ref="selectLabel" @tagSelected="handleSelect" :dialogVisible="dialogVisible"></SelectLabel>
<SelectCrowd ref="selectCrowd" @crowdData="getCrowdData" :selectCrowdData="basicForm.crowdList"></SelectCrowd> <SelectCrowd ref="selectCrowd" @crowdData="getCrowdData" :selectCrowdData="basicForm.crowdList"></SelectCrowd>
</div> </div>
...@@ -128,11 +104,9 @@ const combineType = { ...@@ -128,11 +104,9 @@ const combineType = {
import emoji from '@/utils/emo' import emoji from '@/utils/emo'
import SelectCrowd from './components/selectCrowd.vue' import SelectCrowd from './components/selectCrowd.vue'
import SelectLabel from './components/SelectLabel.vue' import SelectLabel from './components/SelectLabel.vue'
import SelectStore from './components/selectStore.vue'
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
export default { export default {
components: { components: {
SelectStore,
SelectLabel, SelectLabel,
SelectCrowd SelectCrowd
}, },
...@@ -160,23 +134,6 @@ export default { ...@@ -160,23 +134,6 @@ export default {
callback(new Error('请输入群发内容')) callback(new Error('请输入群发内容'))
} }
} }
const validatorSendType = (rule, value, callback) => {
if (value) {
if (value == 2) {
if (!this.basicForm.sendTime) {
callback(new Error('请选择日期'))
}
if (!this.basicForm.sendDate) {
callback(new Error('请选择时间'))
}
if (this.basicForm.sendTime && this.basicForm.sendDate) {
callback()
}
} else {
callback()
}
}
}
return { return {
// 新建按钮加载 // 新建按钮加载
addLoading: false, addLoading: false,
...@@ -193,12 +150,6 @@ export default { ...@@ -193,12 +150,6 @@ export default {
name: '图片', name: '图片',
funcName: '', funcName: '',
type: 'img', type: 'img',
// togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
// limitSize: 10, //限制图片大小
// limitNum: 2, //限制图片数量
// limitWidth: 10000, //限制单张图片宽度
// limitHeight: 10000,//限制单张图片高度
// Isdraggable: true, //图片拖拽
uploadApi: this.$apis.common.pictureUpload uploadApi: this.$apis.common.pictureUpload
}, },
{ {
...@@ -291,57 +242,31 @@ export default { ...@@ -291,57 +242,31 @@ export default {
templateDetailApi: this.$apis.welcomeword.templateDetail templateDetailApi: this.$apis.welcomeword.templateDetail
} }
], ],
basicForm: {
sendName: '',
selectStore: '',
selectType: 1,
condition: {
sex: '',
chat: []
}
},
attachmentShow: false, attachmentShow: false,
storeDiaVisible: false,
attachmentText: '', attachmentText: '',
basicRules: { basicRules: {
groupName:[{ required: true, message: '请选择群发名称', trigger: 'blur' }],
selectStore:[{ required: true, message: '请选择门店', trigger: 'change' }],
userList: [{ validator: validatorUser, trigger: 'change' }], userList: [{ validator: validatorUser, trigger: 'change' }],
selectType: [{ required: true, message: '请选择客户类型', trigger: 'change' }], selectType: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
// attachmentList: [
// // { required: true, message: '请输入入群欢迎语' },
// { validator: validatorAttachment, trigger: 'change' }
// ],
sendType: [
{ required: true, message: '请选择发送时间', trigger: 'change' },
{ validator: validatorSendType, trigger: 'change' }
]
}, },
// membersVisible: false, basicForm: {
groupName:'',
selectStore: '',
selectType: 1,
},
groupList: [], groupList: [],
// key: new Date(),
dialogVisible: false,
previewFlag: false,
selectData: [], selectData: [],
// 是否有修改筛选成员 // 是否有修改筛选成员
isUpdate: true, isUpdate: true,
tagging: [], tagging: [],
groupNumber: 0, groupNumber: 0,
dateOptions: {
disabledDate(time) {
let now = new Date()
now.setTime(now.getTime() - 3600 * 1000 * 24)
return time.getTime() < now
}
},
timeOptions: {
selectableRange: '00:00:00 - 23:59:59'
},
editStatus: false, editStatus: false,
firstFlag: true, firstFlag: true,
footerLeft: 40, footerLeft: 40,
footerWidth: 500, footerWidth: 500,
viewLoading: false, viewLoading: false,
isSelectCrowd: false, isSelectCrowd: false,
previewVal: []
} }
}, },
watch: { watch: {
...@@ -370,16 +295,6 @@ export default { ...@@ -370,16 +295,6 @@ export default {
this.boxHeight = clientHeight - 200 this.boxHeight = clientHeight - 200
}, },
methods: { methods: {
// openMembers() {
// this.membersVisible = !this.membersVisible
// },
// 预览回显事件
previewForm(val) {
console.log(val)
const value = this.$common.utils.deepClone(val)
if (value[0] && !value[0].attContent) value.splice(0, 1)
this.previewVal = value
},
// 返回 // 返回
handleCancel() { handleCancel() {
if (this.editStatus || this.$refs.welcome.previewList.length > 0) { if (this.editStatus || this.$refs.welcome.previewList.length > 0) {
...@@ -396,51 +311,15 @@ export default { ...@@ -396,51 +311,15 @@ export default {
this.$router.push('/wechatGroup/index') this.$router.push('/wechatGroup/index')
} }
}, },
// 成员弹窗
// handleConfirm() {
// console.log(this.$refs.membersForm.innerTags)
// if (this.$refs.membersForm.innerTags.length) {
// // this.basicForm.userList = this.$refs.membersForm.innerTags
// this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags)
// this.selectData = this.basicForm.userList
// this.openMembers()
// this.isUpdate = true
// this.editStatus = true
// } else {
// this.$message({
// type: 'error',
// message: '请选择成员'
// })
// }
// },
// 移除成员tag标签
// remove(val, idx) {
// if (this.$refs.membersForm) {
// this.$refs.membersForm.remove(val)
// this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags)
// // this.key = new Date()
// } else {
// this.basicForm.userList.splice(idx, 1)
// this.selectData = this.basicForm.userList
// // this.key = new Date()
// }
// if (this.basicForm.selectType == 2) {
// if (!this.basicForm.userList.length) {
// this.basicForm.crowdList = []
// this.isSelectCrowd = false
// }
// }
// this.isUpdate = true
// },
// 打开标签筛选弹框 // 打开标签筛选弹框
openLabel() { openLabel() {
if (!this.basicForm.selectStore) { // if (!this.basicForm.selectStore) {
this.$message({ // this.$message({
type: 'error', // type: 'error',
message: '请先选择门店' // message: '请先选择门店'
}) // })
return // return
} // }
this.dialogVisible = !this.dialogVisible this.dialogVisible = !this.dialogVisible
this.$refs.selectLabel.init(this.tagging) this.$refs.selectLabel.init(this.tagging)
}, },
...@@ -474,7 +353,6 @@ export default { ...@@ -474,7 +353,6 @@ export default {
if (v) { if (v) {
const params = this.getSiftMembers() const params = this.getSiftMembers()
params.type = 1 params.type = 1
params.sendType = this.basicForm.sendType
const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
const attachmentList = previewList.map(item => { const attachmentList = previewList.map(item => {
if (item.attType == 1) { if (item.attType == 1) {
...@@ -495,15 +373,11 @@ export default { ...@@ -495,15 +373,11 @@ export default {
return item return item
}) })
params.attachmentList = attachmentList params.attachmentList = attachmentList
if (params.sendType == 2) {
params.sendTimeStr = this.basicForm.sendTime + ' ' + this.basicForm.sendDate
}
const countParams = this.getSiftMembers() const countParams = this.getSiftMembers()
const count = await this.$apis.customerTransform.customerCount(countParams) if (countParams) {
console.log(count)
if (count) {
this.addLoading = true this.addLoading = true
this.$apis.customerTransform.insert(params).then(res => { this.$apis.wechatGroup
.atchmessagingCreate(params).then(res => {
if (res.code == '-1') { if (res.code == '-1') {
this.$message({ this.$message({
type: 'error', type: 'error',
...@@ -552,9 +426,6 @@ export default { ...@@ -552,9 +426,6 @@ export default {
}) })
}) })
this.taggingList = arr this.taggingList = arr
console.log(this.taggingList)
console.log(val, '1')
console.log(this.tagging, '2')
}, },
// 删除标签筛选标签 // 删除标签筛选标签
removeTag(tag, idx1, idx) { removeTag(tag, idx1, idx) {
...@@ -590,10 +461,6 @@ export default { ...@@ -590,10 +461,6 @@ export default {
} }
this.key = new Date() this.key = new Date()
}, },
// 标签筛选选择切换
valueChange(val) {
this.isUpdate = true
},
// 获取所在群聊信息 // 获取所在群聊信息
getGroupList() { getGroupList() {
if (this.basicForm.userList && this.basicForm.userList.length != 0) { if (this.basicForm.userList && this.basicForm.userList.length != 0) {
...@@ -614,20 +481,7 @@ export default { ...@@ -614,20 +481,7 @@ export default {
selectType: this.basicForm.selectType selectType: this.basicForm.selectType
} }
if (params.selectType == 1) { if (params.selectType == 1) {
const chatFlag = this.basicForm.condition.chat && this.basicForm.condition.chat.length console.log('111')
params.condition = {
sex: this.basicForm.condition.sex,
chatId: chatFlag ? this.basicForm.condition.chat.map(item => item.id).join(',') : '',
chatName: chatFlag ? this.basicForm.condition.chat.map(item => item.groupName).join(',') : '',
labelList: this.taggingList,
combineType: combineType.label
}
if (this.basicForm.condition.date) {
let endTime = new Date(this.basicForm.condition.date[1])
endTime = endTime.setDate(endTime.getDate() + 1)
params.condition.sTime = dayjs(this.basicForm.condition.date[0]).format('YYYY-MM-DD')
params.condition.eTime = dayjs(endTime).format('YYYY-MM-DD')
}
} else if (params.selectType == 2) { } else if (params.selectType == 2) {
params.crowdCondition = this.basicForm.crowdList params.crowdCondition = this.basicForm.crowdList
params.combineType = combineType.crowd params.combineType = combineType.crowd
...@@ -667,9 +521,8 @@ export default { ...@@ -667,9 +521,8 @@ export default {
const params = this.getSiftMembers() const params = this.getSiftMembers()
this.viewLoading = true this.viewLoading = true
this.$apis.wechatGroup this.$apis.wechatGroup
.customerCount(params) .atchmessagingCustomercount(params)
.then(res => { .then(res => {
console.log(res)
if (res || res == 0) { if (res || res == 0) {
this.isUpdate = false this.isUpdate = false
this.groupNumber = res this.groupNumber = res
...@@ -688,36 +541,9 @@ export default { ...@@ -688,36 +541,9 @@ export default {
radioChange(val) { radioChange(val) {
this.isSelectCrowd = false this.isSelectCrowd = false
this.isUpdate = true this.isUpdate = true
this.basicForm.condition = {
sex: ''
}
this.tagging = [] this.tagging = []
this.taggingList = [] this.taggingList = []
}, },
// 发送时间change事件
changeValue(v) {
const date = new Date(v).getTime()
if (date < Date.now()) {
this.timeOptions = {
selectableRange: `${dayjs()
.add(1, 'm')
.format('HH:mm')}:00 - 23:59:59`
}
} else {
this.timeOptions = {
selectableRange: '00:00:00 - 23:59:59'
}
}
},
// 点击所在群聊
groupFocus() {
if (this.basicForm.condition && this.basicForm.condition.chatId) {
this.basicForm.condition.chat = {}
this.groupList = []
this.isUpdate = true
}
this.getGroupList()
},
// 人群筛选弹窗 // 人群筛选弹窗
selectCrowd() { selectCrowd() {
if (!this.basicForm.selectStore) { if (!this.basicForm.selectStore) {
...@@ -756,11 +582,6 @@ export default { ...@@ -756,11 +582,6 @@ export default {
// this.key = new Date() // this.key = new Date()
// } // }
// }, // },
// 打开选择门店弹框
openStore() {
this.storeDiaVisible = !this.storeDiaVisible
this.$refs.SelectStore.init()
}
} }
} }
</script> </script>
...@@ -792,21 +613,21 @@ export default { ...@@ -792,21 +613,21 @@ export default {
width: 66%; width: 66%;
padding-right: 20px; padding-right: 20px;
.filter-box { //.filter-box {
// margin-left: 120px; // // margin-left: 120px;
margin-bottom: 10px; // margin-bottom: 10px;
min-width: 656px; // min-width: 656px;
background-color: #f7f7f7; // background-color: #f7f7f7;
//
.filter-memeber { // .filter-memeber {
padding: 20px 20px 20px 0; // padding: 20px 20px 20px 0;
//
// border-bottom: 1px solid #dcdfe6; // // border-bottom: 1px solid #dcdfe6;
.el-form { // .el-form {
padding: 0; // padding: 0;
} // }
} // }
} //}
.filter-footer { .filter-footer {
display: flex; display: flex;
...@@ -822,7 +643,7 @@ export default { ...@@ -822,7 +643,7 @@ export default {
padding: 7px 14px; padding: 7px 14px;
background-color: #e6e9ff; background-color: #e6e9ff;
color: #333; color: #333;
margin-top: 8px;
span { span {
color: #5850ff; color: #5850ff;
cursor: pointer; cursor: pointer;
...@@ -832,6 +653,17 @@ export default { ...@@ -832,6 +653,17 @@ export default {
.basic-form { .basic-form {
padding: 32px 0 20px 20px; padding: 32px 0 20px 20px;
.selectedLabel{
display: flex;
.selectLen{
margin-left: 20px;
font-size: 14px;
color: #666666;
.num{
color: #5850FF;
}
}
}
} }
} }
} }
...@@ -970,7 +802,7 @@ export default { ...@@ -970,7 +802,7 @@ export default {
.required::before { .required::before {
content: '*'; content: '*';
color: #f56c6c; color: #f56c6c;
margin-right: 4 px; margin-right: 4px;
} }
.el-loading-spinner { .el-loading-spinner {
......
<template> <template>
<div class="container"> <div>
<div> <div class="createANewGroupBtn">
<el-button @click="addSendGroup" :size="size" type="primary" mode="el-button">新建群发</el-button> <el-button @click="addSendGroup" :size="size" type="primary" mode="el-button">
<i class="el-icon-plus"></i>
新建群发
</el-button>
</div> </div>
<GLCombiForm :formObj="searchForm" :rowNumber="1" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <div class="container">
<GLTable ref="groupTable" :noDataImg="url" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun"></GLTable> <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> </div>
</template> </template>
...@@ -15,6 +36,45 @@ export default { ...@@ -15,6 +36,45 @@ export default {
data() { data() {
return { return {
url, 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: { searchForm: {
sendName: '', sendName: '',
sendTime: '', sendTime: '',
...@@ -23,7 +83,7 @@ export default { ...@@ -23,7 +83,7 @@ export default {
searchFormData: [ searchFormData: [
{ {
label: '群发名称', label: '群发名称',
name: 'sendName', name: 'messagingName',
type: 'input', type: 'input',
isClear: true isClear: true
}, },
...@@ -35,7 +95,7 @@ export default { ...@@ -35,7 +95,7 @@ export default {
}, },
{ {
label: '群发门店', label: '群发门店',
name: 'store', name: 'merchantName',
type: 'input', type: 'input',
isClear: true isClear: true
} }
...@@ -45,37 +105,49 @@ export default { ...@@ -45,37 +105,49 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '群发名称', label: '群发名称',
prop: 'sendName' prop: 'messagingName'
}, },
{ {
label: '群发门店', label: '群发门店',
prop: 'senaStore' prop: 'messagingMerchant'
}, },
{ {
label: '客户数', label: '客户数',
prop: 'customerNum' prop: 'customerCount'
}, },
{ {
label: '标签/人群', label: '标签/人群',
prop: 'tag' prop: 'labelCrowdName'
}, },
{ {
label: '创建时间', label: '创建时间',
prop: 'creatTime' prop: 'createTime'
}, },
{ {
label: '发送状态', label: '发送状态',
prop: 'sendStatus' prop: 'sendState'
}, },
{ {
label: '完成情况(失败/成功)', label: '发送成功',
prop: 'finish', prop: 'successCompletion',
width: '200' width: '200'
},
{
label: '发送失败',
prop: 'failCompletion',
width: '200'
},
{
label: '操作',
prop: 'optionBtns',
width: '66px',
addHtml: 'optionBtns',
fixed: 'right'
} }
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' } pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// getListApi: this.$apis.accountConfig.listCustomizedAgentWithPage, getListApi: this.$apis.wechatGroup.batchmessagingRecord
} }
}, },
methods: { methods: {
...@@ -98,12 +170,18 @@ export default { ...@@ -98,12 +170,18 @@ export default {
// 跳转新建群发 // 跳转新建群发
addSendGroup() { addSendGroup() {
this.$router.push('/wechatGroup/addWechatGroup') this.$router.push('/wechatGroup/addWechatGroup')
},
traceRecord() {
this.sendRecordDrawer.isVisible = true
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.createANewGroupBtn {
margin-bottom: 16px;
}
.container { .container {
padding: 20px; padding: 20px;
background-color: #fff; background-color: #fff;
...@@ -122,5 +200,32 @@ export default { ...@@ -122,5 +200,32 @@ export default {
color: #5850ff; color: #5850ff;
border: 1px solid #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> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!