Commit efeeba8f by 胡悦

提交群发

1 parent 409c4806
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #F4F5FA;
}
.marketing .container {
padding: 0px 20px 20px 40px;
background: #ffffff;
......
......@@ -64,5 +64,24 @@ const staticRoutes = Object.freeze([
component: resolve => require([`@/views/productStore/index.vue`], resolve),
meta: {}
},
{
name: 'customerTransform',
path: '/customerTransform/index',
component: resolve => require([`@/views/customerTransform/index.vue`], resolve),
meta: {}
},
{
name: 'customerAddCustomer',
path: '/customerTransform/addCustomer',
component: resolve => require([`@/views/customerTransform/addCustomer.vue`], resolve),
meta: {}
},
{
name: 'addCustomerGroup',
path: '/customerTransform/addCustomerGroup',
component: resolve => require([`@/views/customerTransform/addCustomerGroup.vue`], resolve),
meta: {}
}
])
export default staticRoutes
<template>
<div class="scrm-sub-client-container">
<div class="container">
<div>
<!-- 基础信息 -->
<div class="title">基础信息</div>
<div class="info-box">
<div class="info-content">
<el-form :model="basicForm" :rules="basicRules" ref="basicForm" label-width="120px">
<el-form-item label="组名" prop="name">
<el-input v-model="basicForm.name" placeholder="为群聊设置一个组名" maxlength="10"></el-input>
</el-form-item>
<el-form-item label="群聊名称" prop="groupName">
<el-input v-model="basicForm.groupName" placeholder="设置群聊名称前缀,如新车售后一组" maxlength="10"></el-input>
<div class="form-tips">群聊名称后缀将以日期及序号进行累加,如“新车售后一组211011-1群”</div>
</el-form-item>
<el-form-item label="默认成员" prop="groupName">
<el-button size="small" @click="openMembers">
<i class="el-icon-plus"></i>
全部成员
</el-button>
<!-- <el-input v-model="basicForm.groupName" placeholder="设置群聊名称前缀,如新车售后一组"></el-input> -->
<div class="form-tips">必须配置2个及以上成员</div>
</el-form-item>
</el-form>
<!-- 编辑入群欢迎语 -->
<div class="title">编辑入群欢迎语</div>
<div>
<WelcomeWords :eventBus="eventBus"></WelcomeWords>
</div>
</div>
<div class="preview">
<Preview :eventBus="eventBus"></Preview>
</div>
</div>
</div>
</div>
<div
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<el-button type="primary" @click="handleNext">确定</el-button>
<el-button type="primary" @click="handleNext">取消</el-button>
</div>
<basic-dialog :title="'选择成员'" :width="'712px'" :isVisible="membersVisible" @confirmDialog="handleConfirm" @closeDialog="membersVisible = !membersVisible">
<SelectMembers ref="drawerForm" @closeDrawer="closeDrawer" @handSelectdEmp="handSelectdEmp"></SelectMembers>
</basic-dialog>
</div>
</template>
<script>
import Vue from 'vue'
import WelcomeWords from './components/welcomeWords.vue'
import SelectMembers from './components/selectMembers.vue'
import Preview from './components/preview.vue'
export default {
components: {
WelcomeWords,
SelectMembers,
Preview
},
data() {
return {
eventBus: new Vue(),
basicForm: {},
basicRules: {
name: [{ required: true, message: '请输入组名', trigger: 'blur' }],
groupName: [{ required: true, message: '请输入群聊名称', trigger: 'blur' }]
},
membersVisible: false
}
},
// mounted() {
// // let clientHeight = document.documentElement.clientHeight
// this.footerLeft = document.querySelector('.base-container-right').offsetLeft
// this.footerWidth = document.documentElement.clientWidth - this.footerLeft
// // this.boxHeight = clientHeight - 200
// },
methods: {
openMembers() {
this.membersVisible = !this.membersVisible
}
}
}
</script>
<style lang="scss" scoped>
.container {
margin-bottom: 84px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// padding: 20px;
.title {
padding: 20px 0 17px 20px;
font-size: 16px;
color: #333;
border-bottom: 1px solid #d8d8d8;
&::after {
content: '';
}
}
.info-box {
display: inline-flex;
width: 100%;
padding-bottom: 30px;
align-items: flex-end;
justify-content: space-between;
.info-content {
width: calc(100% - 360px);
// flex: 1;
}
}
.el-form {
padding: 32px 0 20px 66px;
/deep/.el-input {
width: 320px;
}
}
.form-tips {
font-size: 12px;
color: #999;
}
.preview {
margin-right: 24px;
}
}
.footer-panel {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0px;
height: 64px;
width: 100%;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
</style>
<template>
<div class="scrm-sub-client-container">
<div class="container">
<div>
<!-- 基础信息 -->
<div class="title">基础信息</div>
<div class="info-box">
<div class="info-content">
<el-form :model="basicForm" :rules="basicRules" ref="basicForm" label-width="120px">
<el-form-item label="组名" prop="name">
<el-input v-model="basicForm.name" placeholder="为群聊设置一个组名" maxlength="10"></el-input>
</el-form-item>
<el-form-item label="群聊名称" prop="groupName">
<el-input v-model="basicForm.groupName" placeholder="设置群聊名称前缀,如新车售后一组" maxlength="10"></el-input>
<div class="form-tips">群聊名称后缀将以日期及序号进行累加,如“新车售后一组211011-1群”</div>
</el-form-item>
<el-form-item label="默认成员" prop="groupName">
<el-button size="small" @click="openMembers">
<i class="el-icon-plus"></i>
全部成员
</el-button>
<!-- <el-input v-model="basicForm.groupName" placeholder="设置群聊名称前缀,如新车售后一组"></el-input> -->
<div class="form-tips">必须配置2个及以上成员</div>
</el-form-item>
</el-form>
<!-- 编辑入群欢迎语 -->
<div class="title">编辑入群欢迎语</div>
<div>
<WelcomeWords :eventBus="eventBus"></WelcomeWords>
</div>
</div>
<div class="preview">
<Preview :eventBus="eventBus"></Preview>
</div>
</div>
</div>
</div>
<div
class="footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<el-button type="primary" @click="handleNext">确定</el-button>
<el-button type="primary" @click="handleNext">取消</el-button>
</div>
<basic-dialog :title="'选择成员'" :width="'712px'" :isVisible="membersVisible" @confirmDialog="handleConfirm" @closeDialog="membersVisible = !membersVisible">
<SelectMembers ref="drawerForm" @closeDrawer="closeDrawer" @handSelectdEmp="handSelectdEmp"></SelectMembers>
</basic-dialog>
</div>
</template>
<script>
import Vue from 'vue'
import WelcomeWords from './components/welcomeWords.vue'
import SelectMembers from './components/selectMembers.vue'
import Preview from './components/preview.vue'
export default {
components: {
WelcomeWords,
SelectMembers,
Preview
},
data() {
return {
eventBus: new Vue(),
basicForm: {},
basicRules: {
name: [{ required: true, message: '请输入组名', trigger: 'blur' }],
groupName: [{ required: true, message: '请输入群聊名称', trigger: 'blur' }]
},
membersVisible: false
}
},
// mounted() {
// // let clientHeight = document.documentElement.clientHeight
// this.footerLeft = document.querySelector('.base-container-right').offsetLeft
// this.footerWidth = document.documentElement.clientWidth - this.footerLeft
// // this.boxHeight = clientHeight - 200
// },
methods: {
openMembers() {
this.membersVisible = !this.membersVisible
}
}
}
</script>
<style lang="scss" scoped>
.container {
margin-bottom: 84px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// padding: 20px;
.title {
padding: 20px 0 17px 20px;
font-size: 16px;
color: #333;
border-bottom: 1px solid #d8d8d8;
&::after {
content: '';
}
}
.info-box {
display: inline-flex;
width: 100%;
padding-bottom: 30px;
align-items: flex-end;
justify-content: space-between;
.info-content {
width: calc(100% - 360px);
// flex: 1;
}
}
.el-form {
padding: 32px 0 20px 66px;
/deep/.el-input {
width: 320px;
}
}
.form-tips {
font-size: 12px;
color: #999;
}
.preview {
margin-right: 24px;
}
}
.footer-panel {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0px;
height: 64px;
width: 100%;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
</style>
<template>
<div class="img-bg">
<div class="preview-content">
<div class="preview-time">{{ currentTime }}</div>
<div class="preview-info" v-for="item in previewList" :key="item.id">
<img class="avatar" src="../../../assets/logo.png" alt="" />
<template v-if="item.type == 'text'">
<div class="preview-text text">{{ item.content }}</div>
</template>
<template v-else-if="item.type == 'link'">
<div class="preview-text preview-link">
{{ item.url }}
<img src="../../../assets/guestCustom/preview-link.png" alt="" />
</div>
</template>
<template v-else-if="item.type == 'img'">
<el-image style="width: 100px" :src="item.url" fit="contain"></el-image>
</template>
<template v-else-if="item.type == 'applet'">
<div class="preview-text text preview-applet">
<div class="preview-applet-title">
<img :src="item.appleIcon" alt="" />
<span>{{ item.title }}</span>
</div>
{{ item.content }}
</div>
</template>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'Preview',
props: { eventBus: Object },
data() {
return {
previewList: [],
// previewList: [
// {
// id: 1,
// type: 'text',
// content: 'fasf'
// },
// {
// id: 2,
// type: 'link',
// url: 'https://baidu.comdfasdfasdfa'
// },
// {
// id: 3,
// type: 'img',
// url: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fhbimg.b0.upaiyun.com%2F945cad7c7105d352aa3c513c94846bb0c2f1a61342067-OWFZcE_fw658&refer=http%3A%2F%2Fhbimg.b0.upaiyun.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1639018450&t=a60f5defc48c980674edcf9a8d5981df'
// },
// {
// id: 4,
// type: 'applet',
// appleIcon: '../../../assets/logo.png',
// title: '我的智慧门店',
// content: '我的智慧门店'
// },
// {
// id: 5,
// type: 'text',
// content: 'fasf'
// },
// {
// id: 6,
// type: 'text',
// content: 'fasf'
// },
// {
// id: 7,
// type: 'text',
// content: 'fasf'
// },
// {
// id: 8,
// type: 'text',
// content: 'fasf'
// },
// {
// id: 9,
// type: 'text',
// content: 'fasf'
// }
// ],
currentTime: ''
}
},
mounted() {
const date = new Date()
let hours = date.getHours()
hours = hours < 10 ? `0${hours}` : hours
let minutes = date.getMinutes()
minutes = minutes < 10 ? `0${minutes}` : minutes
this.currentTime = `${date.getFullYear()}年${date.getMonth() + 1}月${date.getDate()}日 ${hours}:${minutes}`
this.eventBus.$on('update', val => {
console.log(val)
this.previewList = val
})
}
}
</script>
<style lang="scss" scope>
.img-bg {
position: relative;
width: 290px;
height: 566px;
background-image: url(../../../assets/guestCustom/iphone-bg.png);
background-size: 100%;
.preview-content {
position: absolute;
width: 250px;
height: 350px;
overflow-y: auto;
top: 115px;
left: 20px;
// background-color: cornflowerblue;
.preview-time {
font-size: 10px;
color: #999;
text-align: center;
margin-bottom: 15px;
}
.preview-info {
display: flex;
padding: 0 44px 20px 9px;
.avatar {
width: 26px;
height: 26px;
margin-right: 8px;
}
.preview-text {
position: relative;
max-width: 190px;
color: #333;
background-color: #fff;
border-radius: 4px;
}
.text {
font-size: 16px;
padding: 8px 11px;
}
.preview-link {
display: inline-flex;
word-break: break-all;
font-size: 14px;
padding: 8px 8px 8px 11px;
img {
width: 34px;
height: 34px;
margin-left: 10px;
}
}
.preview-text::before {
content: '';
position: absolute;
left: -10px;
top: 20%;
border-width: 5px;
border-style: dashed solid dashed dashed;
border-color: transparent #fff transparent transparent;
// background-color: cornflowerblue;
}
.preview-applet {
img {
width: 20px;
height: 20px;
margin-right: 4px;
}
&-title {
display: flex;
align-self: center;
color: #999;
margin-bottom: 5px;
}
}
}
}
}
</style>
<template>
<div class="select-emp-panel">
<div class="scrm-p10 emp-tree-panel">
<div class="popper-arrow"></div>
<div
class="emp-scroll-panel"
:style="{
height: treeHeight + 'px'
}"
>
<div class="tree-title">所在门店/部门</div>
<el-tree :data="listTree" :expand-on-click-node="false" highlight-current :props="defaultProps" @node-click="handleNodeClick"></el-tree>
</div>
</div>
<el-col
class="scrm-p10 emp-table-panel"
:style="{
height: treeHeight + 20 + 'px'
}"
>
<GLTable ref="saleTable" :tableData="tableEmpData" :tableParams="tableParams" :hasNum="false" :hasPage="false" @selectionTable="selectionTable"></GLTable>
</el-col>
</div>
</template>
<script>
export default {
name: 'selectEmp',
data() {
return {
treeHeight: 0,
staffName: '',
listTree: [],
defaultProps: {
children: 'children',
label: 'departmentName'
},
// 表格参数
tableParams: {
checkSelectKey: 'id',
checkSelectVal: [],
listName: 'list',
// 行数据的key
mutiSelectUniqueKey: 'id',
// 多选ref的名称
mutiSelectName: 'salelist',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
tableColumns: [
{
label: '姓名',
prop: 'staffName'
},
{
label: '职务',
prop: 'staffTitle'
}
]
},
tableEmpData: []
}
},
methods: {
selectionTable(val) {
this.$emit('selectTable', val)
},
listDepartmentTree() {
this.$apis.emp.listDepartmentTree({ id: 1 }).then(res => {
this.listTree = res
this.$nextTick(() => {
document.getElementsByClassName('el-tree-node__expand-icon')[0].click()
document.getElementsByClassName('el-tree-node__content')[0].click()
})
})
},
clearSelect(row) {
this.$refs.saleTable.$refs.salelistMutiTable.toggleRowSelection(row)
},
clearSelection() {
this.$refs.saleTable.$refs.salelistMutiTable.clearSelection()
},
handleNodeClick(data) {
this.departmentId = data.id
this.listEntmicroStaff()
},
listEntmicroStaff(staffName) {
let params = {
departmentId: this.departmentId,
staffName: staffName ? staffName : this.staffName,
merchantid: this.$globalState.session.merchantId
}
this.$apis.emp.listEntmicroStaff(params).then(res => {
this.tableEmpData = res
})
}
},
mounted() {
let clientHeight = document.documentElement.clientHeight
this.treeHeight = clientHeight - 450
this.listDepartmentTree()
}
}
</script>
<style scoped lang="scss">
.select-emp-panel {
display: flex;
.emp-tree-panel {
margin-top: 10px;
width: 200px;
position: relative;
background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
border: 1px solid #e4e7ed;
.emp-scroll-panel {
min-height: 200px;
overflow: auto;
box-sizing: border-box;
}
.popper-arrow {
border-top-width: 0;
border-width: 6px;
position: absolute;
top: -12px;
left: 30px;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-bottom-color: #e4e7ed;
&:after {
content: ' ';
border-width: 6px;
top: 1px;
margin-left: -6px;
border-top-width: 0;
position: absolute;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-bottom-color: #fff;
}
}
}
.emp-table-panel {
flex: 1;
min-height: 200px;
overflow: auto;
margin-top: 10px;
background: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.06);
border: 1px solid #e4e7ed;
/deep/ .el-checkbox__input.is-disabled .el-checkbox__inner {
background-color: #999999;
}
}
.emp-tree-panel {
margin-right: 10px;
font-size: 15px;
/deep/ .el-tree-node:focus > .el-tree-node__content {
color: #5850ff;
background: #f2f5fa;
}
}
.tree-title {
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 14px;
padding: 10px;
}
}
</style>
<template>
<div class="drawer-sale-panel">
<el-form label-width="100px" :model="addForm">
<el-form-item label="请选择成员">
<div class="sale-select">
<div class="el-input-tag input-tag-wrapper" @click="foucusTagInput">
<el-tag v-for="(tag, idx) in innerTags" :key="idx" closable :disable-transitions="false" @close="remove(tag)">
{{ tag.staffName }}
</el-tag>
<el-input size="small" v-model.trim="newTag" placeholder="选择员工" @input="inputTag" style="outline: none; border: none"></el-input>
</div>
<div><el-button size="small" class="sale-select-btn" type="primary" @click="searchEmp">查询</el-button></div>
</div>
<div>
<div class="select-sale-panel">
<select-emp @selectTable="selectTable" ref="selectEmpTabel"></select-emp>
<div class="popper__arrow"></div>
</div>
</div>
</el-form-item>
<el-form-item label="请选择跟进员工类型">
<div class="emp-type">
<div @click="handleType(index)" :class="{ checked: typeIndex == index }" class="emp-type-btn" v-for="(item, index) in empType" :key="index">
{{ item.followName }}
<i class="el-icon-error" @click="delEmpType(item, index)" v-if="!item.commonFlag"></i>
</div>
</div>
<div class="sale-select">
<el-input size="small" v-model="empTypeValue" placeholder="添加类型名称" maxlength="8" show-word-limit></el-input>
<div><el-button size="small" class="sale-select-btn" type="primary" @click="addEmpType">新增</el-button></div>
</div>
<div class="sale-type-desc">跟进员工类型最多新增30个,已新增{{ empType.length - 3 }}个</div>
</el-form-item>
<!-- <el-form-item style="text-align: center">
<el-button @click="onCancel" size="small">取消</el-button>
<el-button type="primary" @click="onSubmit" size="small">确定</el-button>
</el-form-item> -->
</el-form>
</div>
</template>
<script>
import selectEmp from './selectEmp.vue'
export default {
name: 'SelectMembers',
components: {
selectEmp
},
data() {
return {
addForm: {},
typeIndex: 0,
empType: [],
empTypeValue: '',
newTag: '',
innerTags: [],
dialog_temp: {}
}
},
methods: {
init() {
this.newTag = ''
this.innerTags = []
this.empTypeValue = ''
if (this.$refs.selectEmpTabel.listTree.length != 0) {
this.$refs.selectEmpTabel.listEntmicroStaff()
this.$refs.selectEmpTabel.clearSelection()
}
},
selectTable(val) {
this.innerTags = val
},
listEntFollowerType() {
this.$apis.emp.listEntFollowerType({ merchantId: this.$globalState.session.merchantId }).then(res => {
this.empType = res
})
},
handleType(index) {
this.typeIndex = index
},
foucusTagInput() {
if (this.readOnly || !this.$el.querySelector('.tag-input')) {
return
} else {
this.$el.querySelector('.tag-input').focus()
}
},
remove(row) {
this.$refs.selectEmpTabel.clearSelect(row)
},
//查询
searchEmp() {
this.$refs.selectEmpTabel.listEntmicroStaff(this.newTag)
},
addEmpType() {
if (!this.empTypeValue) {
this.$message.error('请输入类型名称')
return
}
if (this.empType.length == 33) {
this.$message.error('跟进员工类型最多新增30个')
return
}
let params = {
followName: this.empTypeValue,
merchantid: this.$globalState.session.merchantId
}
this.$apis.emp.saveFollowerType(params).then(res => {
this.listEntFollowerType()
})
this.empTypeValue = ''
},
delEmpType(item, index) {
this.$apis.emp.deleteFollowerType({ id: item.id }).then(res => {
if (res) {
this.listEntFollowerType()
this.typeIndex = 0
}
})
}
// onSubmit() {
// if (this.innerTags.length == 0) {
// this.$message({
// message: '请选择员工',
// type: 'error'
// })
// return
// }
// let userIds = []
// this.innerTags.forEach(item => {
// userIds.push(item.userId)
// })
// this.$emit('handSelectdEmp', this.empType[this.typeIndex].id, userIds)
// },
// onCancel() {
// this.$emit('closeDrawer')
// }
},
mounted() {
this.listEntFollowerType()
}
}
</script>
<style scoped lang="scss">
.drawer-sale-panel {
padding: 0px 20px;
.sale-reload {
margin-bottom: 10px;
}
.sale-select {
display: flex;
align-items: center;
}
.sale-select-btn {
margin-left: 8px;
}
.sale-type-desc {
font-size: 14px;
font-weight: 400;
color: #adadad;
line-height: 17px;
margin-top: 10px;
}
}
.emp-type {
margin-bottom: 10px;
&-btn {
cursor: pointer;
display: inline-block;
padding: 8px 10px;
margin-bottom: 10px;
margin-right: 10px;
position: relative;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e8e8ea;
line-height: 1;
font-size: 14px;
color: #7d7d7d;
&.checked {
border: 1px solid #5850ff;
color: #5850ff;
}
i {
position: absolute;
right: -6px;
top: -6px;
font-size: 12px;
color: #999999;
}
}
}
.input-tag-wrapper {
position: relative;
font-size: 14px;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
box-sizing: border-box;
color: #606266;
display: inline-block;
outline: none;
padding: 0 10px 0 5px;
flex-wrap: wrap;
line-height: 32px;
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
width: 100%;
display: flex;
align-items: center;
/deep/ input {
/* input { */
/* background-color: red!important; 调试用的样式 */
outline: none !important;
border: none !important;
}
/deep/ .el-input {
min-width: 150px;
width: auto;
flex: 1;
}
}
.el-tag {
margin-right: 4px;
height: 26px;
line-height: 24px;
}
.tag-input {
background: transparent;
border: none !important;
font-size: 14px;
height: 32px;
outline: none;
padding-left: 0;
width: 100px;
}
.el-input-tag--mini .tag-input {
height: 24px;
line-height: 24px;
}
.el-input-tag--small .tag-input {
height: 32px;
line-height: 32px;
}
.el-input-tag--medium .tag-input {
height: 32px;
line-height: 32px;
}
</style>
<template>
<div class="send-assistant">
<div class="menu-sub">
<div class="menu-sub-item" :class="[activeIndex == '1' ? 'active' : '']" @click="switchMenu(1)">客户群发</div>
<div class="menu-sub-item" :class="[activeIndex == '2' ? 'active' : '']" @click="switchMenu(2)">客户群群发</div>
</div>
<div v-show="activeIndex == 1" class="container">
<div class="container-header">
<div class="text">企业统一选择要发送的客户,由添加客户的成员确认后发送给客户,消息内容仅管理员和负责人可创建。</div>
<el-button type="primary" icon="el-icon-plus" @click="btnClick('create', 1)">新建群发</el-button>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="gueast" :tableData="gueastTableData" :tableParams="gueastTableParams" :pageConf="gueastPageConf">
<!-- <div slot="entmicro-name" class="entmicro" slot-scope="scope">
<span v-for="(i, index) in scope.scope.userList" :key="index">{{ i.name }}({{ i.tips }});</span>
</div> -->
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" :disabled="scope.scope.isRemind == 1" @click="btnClick('edit', scope.scope)">提醒发送</el-button>
<el-button type="text" @click="btnClick('detail', scope.scope)">详情</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
<div v-show="activeIndex == 2" class="container">
<div class="container-header">
<div class="text">管理员或负责人统一创建内容,群主收到通知后,可选择他管理的客户群并群发。</div>
<el-button type="primary" icon="el-icon-plus" @click="btnClick('create', 2)">新建群发</el-button>
</div>
<!-- 表格区域 开始 -->
<GLTable ref="gueast" :tableData="gueastTableData" :tableParams="gueastGroupTableParams" :pageConf="gueastPageConf">
<!-- <div slot="entmicro-name" class="entmicro" slot-scope="scope">
<span v-for="(i, index) in scope.scope.userList" :key="index">{{ i.name }}({{ i.tips }});</span>
</div> -->
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" :disabled="scope.scope.isRemind == 1" @click="btnClick('edit', scope.scope)">提醒发送</el-button>
<el-button type="text" @click="btnClick('detail', scope.scope)">详情</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
export default {
name: 'SendAssistant',
data() {
return {
activeIndex: '1',
gueastTableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '群发类型',
prop: 'sendType',
formatter: cellValue => {
return {
1: '立即发送',
2: '定时发送'
}[cellValue.sendType]
}
},
{
label: '群发内容',
prop: 'massName',
line: 2,
minWidth: '100px'
// addHtml: 'entmicro-name'
},
{
label: '发送时间',
prop: 'sendTime',
line: 2
},
{
label: '已发送员工',
prop: 'sendUserNum',
line: 2
},
{
label: '已送达客户',
prop: 'sendCustomerNum',
line: 2
},
{
label: '未发送员工',
prop: 'unsendUserNum',
line: 2
},
{
label: '未送达客户',
prop: 'unsendCustomerNum',
line: 2
},
{
label: '操作',
prop: 'optionBtns',
width: '140px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
},
gueastPageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'count' },
gueastTableData: [
{
id: 1,
massName: '守候专用服务一组dfajkfhakjdfhak[土盘]',
sendTime: '2021-11-05',
name: '群发任务命名',
sendType: 1,
sendUserNum: 1,
sendCustomerNum: 1,
unsendUserNum: 2,
unsendCustomerNum: 3,
isRemind: 1 // 1已提醒2 未提醒
},
{
id: 2,
massName: '守候专用服务一组dfajkfhakjdfhak[土盘]',
sendTime: '2021-11-05',
name: '群发任务命名',
sendType: 1,
sendUserNum: 1,
sendCustomerNum: 1,
unsendUserNum: 2,
unsendCustomerNum: 3,
isRemind: 2 // 1已提醒2 未提醒
}
],
gueastGroupTableParams: {
listName: 'data',
tableOption: false,
tableColumns: [
{
label: '群发名称',
prop: 'name'
},
{
label: '群发内容',
prop: 'massName',
line: 2,
minWidth: '100px'
// addHtml: 'entmicro-name'
},
{
label: '发送时间',
prop: 'sendTime',
line: 2
},
{
label: '已发送群主',
prop: 'sendUserNum',
line: 2
},
{
label: '已送达群聊',
prop: 'sendCustomerNum',
line: 2
},
{
label: '未发送群主',
prop: 'unsendUserNum',
line: 2
},
{
label: '未送达群聊',
prop: 'unsendCustomerNum',
line: 2
},
{
label: '操作',
prop: 'optionBtns',
width: '140px',
addHtml: 'optionBtns',
fixed: 'right'
}
]
}
}
},
methods: {
switchMenu(val) {
this.activeIndex = val
},
/**
* name: 按钮名称
* type: 1 客户 2 客户群
* rowData: 行数据
*/
btnClick(name, type, rowData) {
switch (name) {
case 'create':
if (type == 1) {
this.$router.push('/customerTransform/addCustomer')
} else {
this.$router.push('/customerTransform/addCustomerGroup')
}
break
default:
console.log(11)
}
}
}
}
</script>
<style lang="scss" scope>
.send-assistant {
.menu-sub {
.menu-sub-item {
display: inline-block;
text-align: center;
color: #666;
width: 180px;
height: 32px;
line-height: 32px;
cursor: pointer;
&.active {
background-color: #fff;
color: #5850ff;
}
}
}
.container {
margin-bottom: 20px;
background: #ffffff;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
padding: 20px;
margin-top: 2px;
&-header {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 25px;
.text {
font-size: 14px;
color: #999;
}
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!