Commit 8ea18ff1 by 胡悦

链条

1 parent 433a15a9
import { http } from '@/main' import { http } from '@/main'
const path = 'org.ore.api.mass.' const path = 'entmicro.api.mass.'
const URL = 'rop-scrm-entmicro/router' const URL = 'rop-scrm-entmicro/router'
const customerList = params => { const customerList = params => {
params.type = 1 params.type = 1
...@@ -43,9 +43,10 @@ const detail = params => { ...@@ -43,9 +43,10 @@ const detail = params => {
sign: true sign: true
}) })
} }
const remindUserGroup = params => {
params.type = 2
params.method = `${path}remindUserGroup` const listDepartmentTree = params => {
params.method = 'entmicro.api.department.listDepartmentTree'
return http({ return http({
url: URL, url: URL,
method: 'GET', method: 'GET',
...@@ -53,9 +54,19 @@ const remindUserGroup = params => { ...@@ -53,9 +54,19 @@ const remindUserGroup = params => {
sign: true sign: true
}) })
} }
const listRemindOperate = params => {
params.type = 2 const querylabeltree = params => {
params.method = `${path}listRemindOperate` params.method = 'scrm.api.datahub.label.querylabeltree'
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
sign: true
})
}
const groupList = params => {
params.method = 'entmicro.api.customer.group.list.by.merchant'
return http({ return http({
url: URL, url: URL,
method: 'GET', method: 'GET',
...@@ -63,9 +74,8 @@ const listRemindOperate = params => { ...@@ -63,9 +74,8 @@ const listRemindOperate = params => {
sign: true sign: true
}) })
} }
const customerCount = params => {
const listDepartmentTree = params => { params.method = 'entmicro.api.mass.detail.customer.filter.count'
params.method = 'cn.com.glsx.entmicro.department.listDepartmentTree'
return http({ return http({
url: URL, url: URL,
method: 'GET', method: 'GET',
...@@ -73,19 +83,79 @@ const listDepartmentTree = params => { ...@@ -73,19 +83,79 @@ const listDepartmentTree = params => {
sign: true sign: true
}) })
} }
// 客户群发、客户群群发基本信息详情
const querylabeltree = params => { const customerDetail = params => {
params.method = 'datahub.api.label.querylabeltree' params.method = `${path}detail`
return http({ return http({
url: '/rop-scrm-datahub/router', url: URL,
method: 'POST', method: 'GET',
data: params, data: params,
sign: true sign: true
}) })
} }
// 客户群发统计
const groupList = params => { const detailStatistic = params => {
params.method = 'org.ore.api.customer.group.list.by.merchant' params.method = `${path}detail.statistic`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 客户群群发统计
const groupDetailStatistic = params => {
params.method = `${path}group.detail.statistic`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 客户群发员工列表
const staffList = params => {
params.method = `${path}staff.list`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 客户群发客户列表
const customerDetailList = params => {
params.method = `${path}customer.list`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 客户群群发列表
const groupDetailList = params => {
params.method = `${path}group.detail.sender.list`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 根据id提醒用户
const listRemindOperate = params => {
params.method = `${path}listRemindOperate`
return http({
url: URL,
method: 'GET',
data: params,
sign: true
})
}
// 详情页客户群提醒
const remindUserGroup = params => {
params.method = `${path}remindUserGroup`
return http({ return http({
url: URL, url: URL,
method: 'GET', method: 'GET',
...@@ -102,5 +172,12 @@ export default { ...@@ -102,5 +172,12 @@ export default {
listRemindOperate, listRemindOperate,
listDepartmentTree, listDepartmentTree,
querylabeltree, querylabeltree,
groupList groupList,
customerCount,
customerDetail,
detailStatistic,
groupDetailStatistic,
staffList,
customerDetailList,
groupDetailList
} }
...@@ -2,8 +2,8 @@ import { http } from '@/main' ...@@ -2,8 +2,8 @@ import { http } from '@/main'
// const defaultPath = 'scrm.api.live.' // const defaultPath = 'scrm.api.live.'
//计算提示面板出现的次数,第一次显示,之后不显示 //计算提示面板出现的次数,第一次显示,之后不显示
const getLoginCount =params=>{ const getLoginCount = params => {
params.method='org.ore.api.common.findLoginCount' params.method = 'entmicro.api.common.findLoginCount'
return http({ return http({
url: '/rop-scrm-entmicro/router', url: '/rop-scrm-entmicro/router',
method: 'POST', method: 'POST',
...@@ -30,7 +30,7 @@ const effectiveService = params => { ...@@ -30,7 +30,7 @@ const effectiveService = params => {
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
//删除 //删除
...@@ -41,7 +41,7 @@ const deleteService = params => { ...@@ -41,7 +41,7 @@ const deleteService = params => {
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
//删除 //删除
...@@ -52,7 +52,7 @@ const createService = params => { ...@@ -52,7 +52,7 @@ const createService = params => {
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
...@@ -76,9 +76,9 @@ const updateService = params => { ...@@ -76,9 +76,9 @@ const updateService = params => {
method: 'POST', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll:true returnAll: true
}) })
} }
export { getServiceListApi,effectiveService, deleteService,createService,detailService,updateService,getLoginCount}
\ No newline at end of file \ No newline at end of file
export { getServiceListApi, effectiveService, deleteService, createService, detailService, updateService, getLoginCount }
\ No newline at end of file \ No newline at end of file
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js') // let request = require('@/http/request.js')
let cfg = require('./conf.js') let cfg = require('./conf.js')
import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function(isEnv = true) { export const fetchConfig = function (isEnv = true) {
if (isEnv) { if (isEnv) {
let { request } = cfg let { request } = cfg
Object.assign(request, { timeout }) Object.assign(request, { timeout })
...@@ -18,6 +19,7 @@ export const fetchConfig = function(isEnv = true) { ...@@ -18,6 +19,7 @@ export const fetchConfig = function(isEnv = true) {
} }
//return window.fetch('https://', {}).then(res => res.json()) //return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' }) // request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -126,13 +126,13 @@ const staticRoutes = Object.freeze([ ...@@ -126,13 +126,13 @@ const staticRoutes = Object.freeze([
}, },
{ {
name: 'detailCustomer', name: 'detailCustomer',
path: '/customerTransform/detailCustomer', path: '/customerTransform/detailCustomer/:id',
component: resolve => require([`@/views/customerTransform/detailCustomer.vue`], resolve), component: resolve => require([`@/views/customerTransform/detailCustomer.vue`], resolve),
meta: {} meta: {}
}, },
{ {
name: 'detaiCustomeGroup', name: 'detaiCustomeGroup',
path: '/customerTransform/detaiCustomeGroup', path: '/customerTransform/detaiCustomeGroup/:id',
component: resolve => require([`@/views/customerTransform/detaiCustomeGroup.vue`], resolve), component: resolve => require([`@/views/customerTransform/detaiCustomeGroup.vue`], resolve),
meta: {} meta: {}
}, },
......
...@@ -24,7 +24,7 @@ export async function start() { ...@@ -24,7 +24,7 @@ export async function start() {
// .forEach(item => { // .forEach(item => {
// urlParams[item.split('=')[0]] = item.split('=')[1] // urlParams[item.split('=')[0]] = item.split('=')[1]
// }) // })
var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : 'mini-18d823b7-4aa9-4b69-8037-0c08cc369202-rop' var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : 'mini-619efaf8-543c-4ad6-a7dc-e73c8dd74e5e-rop'
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: token } }) Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: token } })
Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
render('/', routes) render('/', routes)
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</el-form-item> </el-form-item>
<el-form-item label="所在群聊"> <el-form-item label="所在群聊">
<el-select <el-select
v-model="basicForm.condition.value" v-model="basicForm.condition.chatId"
@change="valueChange" @change="valueChange"
multiple multiple
collapse-tags collapse-tags
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
<div> <div>
<el-form :model="basicForm" :rules="basicRules" ref="groupForm" label-width="120px"> <el-form :model="basicForm" :rules="basicRules" ref="groupForm" label-width="120px">
<el-form-item prop="attachmentList"> <el-form-item prop="attachmentList">
<label slot="label" class="required">入群欢迎语</label> <label slot="label" class="required">群发内容</label>
<WelcomeWords ref="welcome" :eventBus="eventBus"></WelcomeWords> <WelcomeWords ref="welcome" :eventBus="eventBus"></WelcomeWords>
</el-form-item> </el-form-item>
<el-form-item label="发送时间" prop="sendType"> <el-form-item label="发送时间" prop="sendType">
...@@ -197,6 +197,7 @@ import WelcomeWords from './components/welcomeWords.vue' ...@@ -197,6 +197,7 @@ import WelcomeWords from './components/welcomeWords.vue'
import SelectMembers from './components/selectMembers.vue' import SelectMembers from './components/selectMembers.vue'
import Preview from './components/preview.vue' import Preview from './components/preview.vue'
import SelectLabel from './components/selectLabel.vue' import SelectLabel from './components/selectLabel.vue'
import * as dayjs from 'dayjs'
export default { export default {
components: { components: {
WelcomeWords, WelcomeWords,
...@@ -227,7 +228,7 @@ export default { ...@@ -227,7 +228,7 @@ export default {
callback() callback()
} }
} else { } else {
callback(new Error('请输入入群欢迎语')) callback(new Error('请输入群发内容'))
} }
} }
const validatorSendType = (rule, value, callback) => { const validatorSendType = (rule, value, callback) => {
...@@ -383,7 +384,7 @@ export default { ...@@ -383,7 +384,7 @@ export default {
removeTag(item, idx) { removeTag(item, idx) {
this.tagging.splice(idx, 1) this.tagging.splice(idx, 1)
this.isUpdate = true this.isUpdate = true
// this.$refs.selectLabel.remove(item, idx) // this.$refs.selectLabel.init(this.tagging)
}, },
valueChange(val) { valueChange(val) {
console.log(val) console.log(val)
...@@ -397,7 +398,35 @@ export default { ...@@ -397,7 +398,35 @@ export default {
}, },
// 查看群发人数 // 查看群发人数
viewMembers() { viewMembers() {
console.log(this.basicForm)
if (!this.basicForm.userList || this.basicForm.userList.length == 0) {
this.$message({
type: 'error',
message: '请选择群发账号'
})
return
}
const params = {
selectType: this.basicForm.selectType,
condition: {
sex: this.basicForm.condition.sex,
chatId: this.basicForm.condition.chatId
}
}
params.condition.startTime = dayjs(this.basicForm.condition.date[0]).format('YYYY-MM-DD')
params.condition.endTime = dayjs(this.basicForm.condition.date[1]).format('YYYY-MM-DD')
params.userList = this.basicForm.userList.map(item => {
return {
staffId: item.staffId,
staffName: item.staffName
}
})
console.log(params)
this.$apis.customerTransform.customerCount(params).then(res => {
console.log(res)
this.isUpdate = false this.isUpdate = false
})
} }
} }
} }
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
<div class="info-box"> <div class="info-box">
<div class="info-content"> <div class="info-content">
<el-form :model="basicForm" :rules="basicRules" ref="basicForm" label-width="120px"> <el-form :model="basicForm" :rules="basicRules" ref="basicForm" label-width="120px">
<el-form-item label="群聊名称" prop="groupName"> <el-form-item label="群聊名称" prop="massName">
<el-input v-model="basicForm.groupName" placeholder="群发名称仅内部可见" maxlength="10"></el-input> <el-input v-model="basicForm.massName" placeholder="群发名称仅内部可见" maxlength="10"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="userList"> <el-form-item prop="userList">
<label slot="label" class="required">选择群主</label> <label slot="label" class="required">选择群主</label>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<div> <div>
<el-form :model="basicForm" :rules="basicRules" ref="groupForm" label-width="120px"> <el-form :model="basicForm" :rules="basicRules" ref="groupForm" label-width="120px">
<el-form-item prop="attachmentList"> <el-form-item prop="attachmentList">
<label slot="label" class="required">入群欢迎语</label> <label slot="label" class="required">群发内容</label>
<WelcomeWords ref="welcome" :eventBus="eventBus"></WelcomeWords> <WelcomeWords ref="welcome" :eventBus="eventBus"></WelcomeWords>
</el-form-item> </el-form-item>
<el-form-item label="发送时间" prop="sendType"> <el-form-item label="发送时间" prop="sendType">
...@@ -125,7 +125,7 @@ export default { ...@@ -125,7 +125,7 @@ export default {
callback() callback()
} }
} else { } else {
callback(new Error('请输入入群欢迎语')) callback(new Error('请输入群发内容'))
} }
} }
const validatorSendType = (rule, value, callback) => { const validatorSendType = (rule, value, callback) => {
...@@ -154,7 +154,7 @@ export default { ...@@ -154,7 +154,7 @@ export default {
// { required: true, message: '请选择群发账号', trigger: 'blur' }, // { required: true, message: '请选择群发账号', trigger: 'blur' },
{ validator: validatorUser, trigger: 'change' } { validator: validatorUser, trigger: 'change' }
], ],
groupName: [{ required: true, message: '请输入群聊名称', trigger: 'blur' }], massName: [{ required: true, message: '请输入群聊名称', trigger: 'blur' }],
attachmentList: [ attachmentList: [
// { required: true, message: '请输入入群欢迎语' }, // { required: true, message: '请输入入群欢迎语' },
{ validator: validatorAttachment, trigger: 'change' } { validator: validatorAttachment, trigger: 'change' }
...@@ -183,7 +183,17 @@ export default { ...@@ -183,7 +183,17 @@ export default {
}, },
// 成员弹窗 // 成员弹窗
handleConfirm() { handleConfirm() {
if (this.$refs.membersForm.innerTags.length != 0) { if (this.$refs.membersForm.innerTags.length == 0) {
this.$message({
type: 'error',
message: '请选择群主'
})
} else if (this.$refs.membersForm.innerTags.length > 1) {
this.$message({
type: 'error',
message: '只可选择一个群主'
})
} else {
this.basicForm.userList = this.$refs.membersForm.innerTags this.basicForm.userList = this.$refs.membersForm.innerTags
this.openMembers() this.openMembers()
} }
...@@ -201,7 +211,6 @@ export default { ...@@ -201,7 +211,6 @@ export default {
const params = { const params = {
type: 2, type: 2,
attachmentList: this.basicForm.attachmentList, attachmentList: this.basicForm.attachmentList,
selectType: this.basicForm.selectType,
sendType: this.basicForm.sendType sendType: this.basicForm.sendType
} }
params.userList = this.basicForm.userList.map(item => { params.userList = this.basicForm.userList.map(item => {
......
...@@ -6,20 +6,35 @@ ...@@ -6,20 +6,35 @@
<div class="content-text"> <div class="content-text">
<div class="detail-item"> <div class="detail-item">
<div class="detail-label">创建者:</div> <div class="detail-label">创建者:</div>
<div class="detail-value">超级管理员</div> <div class="detail-value">{{basicInfo.createdBy ? basicInfo.createdBy : '-'}}</div>
</div> </div>
<div class="detail-item"> <div class="detail-item">
<div class="detail-label">群发内容:</div> <div class="detail-label">群发类型:</div>
<div class="detail-value">超级管理员</div> <div class="detail-value">{{basicInfo.sendType == 1 ? '立即发送': '定时发送'}}</div>
<div class="detail-tips">详见右侧视图</div> </div>
<div class="detail-item" v-show="form == 'customer'">
<div class="detail-label">发送状态:</div>
<div class="detail-value">{{STATUS_TYPE[basicInfo.status]}}</div>
</div>
<div class="detail-item" v-show="form == 'customer' && basicInfo.sendType == 2">
<div class="detail-label">发送时间:</div>
<div class="detail-value">{{basicInfo.sendTime}}</div>
</div> </div>
<div class="detail-item"> <div class="detail-item">
<div class="detail-label">创建者:</div> <div class="detail-label">群发对象:</div>
<div class="detail-value">超级管理员</div> <div class="detail-value">
<span v-for="(item, index) in basicInfo.userList" :key="item.id">
[{{item.staffName}}]
<span v-show="basicInfo.userList.length -1 != index">、</span>
</span>
</div>
</div> </div>
<div class="detail-item"> <div class="detail-item">
<div class="detail-label">创建者:</div> <div class="detail-label">群发内容:</div>
<div class="detail-value">超级管理员</div> <div
class="detail-value"
>[共{{basicInfo.attachmentList ? basicInfo.attachmentList.length : '0'}}条]</div>
<div class="detail-tips">详见右侧视图</div>
</div> </div>
</div> </div>
<div class="title">数据统计</div> <div class="title">数据统计</div>
...@@ -27,59 +42,99 @@ ...@@ -27,59 +42,99 @@
<div class="statistics-ul"> <div class="statistics-ul">
<div class="statistics-li statistics-border"> <div class="statistics-li statistics-border">
<div class="statistics-number"> <div class="statistics-number">
<span>0</span> <span>{{form == 'customer' ? statistic.senderStaffCount: statistic.senderStaffCount}}</span>
人 人
</div> </div>
<div>已发送群主</div> <div>已发送{{form == 'customer' ? '成员': '群主'}}</div>
</div> </div>
<div class="statistics-li"> <div class="statistics-li">
<div class="statistics-number"> <div class="statistics-number">
<span>0</span> <span>{{form == 'customer' ? statistic.senderCustomerCount :statistic.senderGroupCount}}</span>
人 人
</div> </div>
<div>已发送群主</div> <div>送达{{form == 'customer' ? '客户': '群聊'}}</div>
</div> </div>
</div> </div>
<div class="statistics-ul"> <div class="statistics-ul">
<div class="statistics-li statistics-border"> <div class="statistics-li statistics-border">
<div class="statistics-number"> <div class="statistics-number">
<span>0</span> <span>{{form == 'customer' ?statistic.unSenderStaffCount:statistic.unSenderStaffCount}}</span>
人 人
</div> </div>
<div>已发送群主</div> <div>未发送{{form == 'customer' ? '成员': '群主'}}</div>
</div> </div>
<div class="statistics-li"> <div class="statistics-li">
<div class="statistics-number"> <div class="statistics-number">
<span>0</span> <span>{{form == 'customer' ?statistic.unSenderCustomerCount:statistic.unSenderGroupCount}}</span>
人 人
</div> </div>
<div>已发送群主</div> <div>未送达{{form == 'customer' ? '客户': '群聊'}}</div>
</div> </div>
</div> </div>
<div class="statistics-ul"> <div v-if="form == 'customer'" class="statistics-ul">
<div class="statistics-li"> <div class="statistics-li">
<div class="statistics-number"> <div class="statistics-number">
<span>0</span> <span>{{statistic.senderCustomerFailureCount}}</span>
人 人
</div> </div>
<div>已发送群主</div> <div>客户送达失败</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<Preview></Preview> <Preview :eventBus="eventBus" :list.sync="basicInfo.attachmentList"></Preview>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
const STATUS = {
'-1': '创建失败',
'0': '创建成功',
'1': '发送成功',
'2': '发送失败'
}
import Preview from '../components/preview.vue' import Preview from '../components/preview.vue'
export default { export default {
name: 'BasicInof', name: 'BasicInof',
props: ['form', 'id', 'eventBus'],
components: { components: {
Preview Preview
}, },
data() {}, data() {
methods: {} return {
STATUS_TYPE: STATUS,
basicInfo: {},
statistic: {}
}
},
mounted() {
this.getCustomerDetail(this.id)
console.log(this.form)
this.getStatistic()
},
methods: {
getCustomerDetail(id) {
this.$apis.customerTransform.customerDetail({ id }).then(res => {
console.log(res)
this.basicInfo = res
this.eventBus.$emit('update', this.basicInfo.attachmentList)
})
},
getStatistic() {
const { id, form } = this
if (form == 'customer') {
this.$apis.customerTransform.detailStatistic({ id }).then(res => {
console.log(res)
this.statistic = res
})
} else if (form == 'customerGroup') {
this.$apis.customerTransform.groupDetailStatistic({ id }).then(res => {
console.log(res)
this.statistic = res
})
}
}
}
} }
</script> </script>
<style lang="scss" scope> <style lang="scss" scope>
...@@ -120,7 +175,7 @@ export default { ...@@ -120,7 +175,7 @@ export default {
} }
.statistics-info { .statistics-info {
display: flex; display: flex;
justify-content: space-between; justify-content: space-around;
margin-top: 24px; margin-top: 24px;
margin-left: 52px; margin-left: 52px;
.statistics-ul { .statistics-ul {
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
<div class="preview-content"> <div class="preview-content">
<div class="preview-time">{{ currentTime }}</div> <div class="preview-time">{{ currentTime }}</div>
<div class="preview-info" v-for="item in previewList" :key="item.id"> <div class="preview-info" v-for="item in previewList" :key="item.id">
<img class="avatar" src="@/assets/logo.png" alt="" /> <img class="avatar" src="@/assets/logo.png" alt />
<template v-if="item.attType == 1"> <template v-if="item.attType == 1">
<div class="preview-text text">{{ item.attContent }}</div> <div class="preview-text text">{{ item.attContent }}</div>
</template> </template>
<template v-else-if="item.attType == 4"> <template v-else-if="item.attType == 4">
<div class="preview-text preview-link"> <div class="preview-text preview-link">
{{ item.attContent.url }} {{ item.attContent.url }}
<img src="@/assets/guestCustom/preview-link.png" alt="" /> <img src="@/assets/guestCustom/preview-link.png" alt />
</div> </div>
</template> </template>
<template v-else-if="item.attType == 2"> <template v-else-if="item.attType == 2">
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<template v-else-if="item.attType == 5"> <template v-else-if="item.attType == 5">
<div class="preview-text text preview-applet"> <div class="preview-text text preview-applet">
<div class="preview-applet-title"> <div class="preview-applet-title">
<img :src="item.attContent.picUrl" alt="" /> <img :src="item.attContent.picUrl" alt />
<span>{{ item.attContent.title }}</span> <span>{{ item.attContent.title }}</span>
</div> </div>
{{ item.attContent.page }} {{ item.attContent.page }}
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<script> <script>
export default { export default {
name: 'Preview', name: 'Preview',
props: { eventBus: Object }, props: { eventBus: Object, list: Array },
data() { data() {
return { return {
previewList: [], previewList: [],
...@@ -45,6 +45,9 @@ export default { ...@@ -45,6 +45,9 @@ export default {
} }
}, },
created() { created() {
this.$nextTick(() => {
console.log(1, this.list)
})
this.eventBus.$on('update', val => { this.eventBus.$on('update', val => {
console.log(val) console.log(val)
this.previewList = val this.previewList = val
......
...@@ -65,8 +65,8 @@ ...@@ -65,8 +65,8 @@
</div> </div>
</template> </template>
<script> <script>
import { utils } from 'glsx-common'
export default { export default {
name: 'SelectLabel', name: 'SelectLabel',
data() { data() {
...@@ -115,14 +115,14 @@ export default { ...@@ -115,14 +115,14 @@ export default {
} }
}, },
methods: { methods: {
init() { init(item) {
this.dialogVisible = true this.dialogVisible = true
this.querylabeltree() this.querylabeltree(item)
}, },
handleSearch() { handleSearch() {
this.querylabeltree() this.querylabeltree()
}, },
querylabeltree() { querylabeltree(selectItem) {
this.$apis.customerTransform this.$apis.customerTransform
.querylabeltree({ .querylabeltree({
labelTreeReq: { labelTreeReq: {
...@@ -133,7 +133,7 @@ export default { ...@@ -133,7 +133,7 @@ export default {
} }
}) })
.then(res => { .then(res => {
console.log(res) if (selectItem && selectItem.length > 0) {
this.labelTreeRets = res.labelTreeRets.map(item => { this.labelTreeRets = res.labelTreeRets.map(item => {
return { return {
labelGroup: item.labelGroup, labelGroup: item.labelGroup,
...@@ -144,12 +144,49 @@ export default { ...@@ -144,12 +144,49 @@ export default {
checkAll: false checkAll: false
} }
}) })
//回显
selectItem.forEach(item => {
this.labelTreeRets.forEach(tag => {
if (item.labelGroup.id == tag.labelGroup.id) {
this.$nextTick(() => {
tag.tagChecked = item.labelList
})
}
})
})
this.labelTreeRets.forEach((item, index) => {
this.$nextTick(() => {
this.handleCheckedChange(item.tagChecked, index)
})
})
} else {
this.labelTreeRets = res.labelTreeRets.map(item => {
return {
labelGroup: item.labelGroup,
labelList: item.labelList,
checked: false,
tagChecked: [],
isIndeterminate: false,
checkAll: false
}
})
}
}) })
}, },
remove(item, idx) { remove(item, idx) {
item.tagChecked.splice(idx, 1) item.tagChecked.splice(idx, 1)
if (item.tagChecked.length == 0) item.checkAll = false if (item.tagChecked.length == 0) {
this.$nextTick(() => {
item.checkAll = false
})
}
this.labelTreeRets.forEach((item, index) => {
this.$nextTick(() => {
this.handleCheckedChange(item.tagChecked, index)
})
})
}, },
//选中
handleSelect() { handleSelect() {
this.dialogVisible = false this.dialogVisible = false
let labelTreeRets = this.labelTreeRets let labelTreeRets = this.labelTreeRets
...@@ -157,11 +194,12 @@ export default { ...@@ -157,11 +194,12 @@ export default {
if (item.tagChecked.length) { if (item.tagChecked.length) {
return { return {
labelGroup: item.labelGroup, labelGroup: item.labelGroup,
labelList: item.labelList labelList: item.tagChecked
} }
} }
}) })
.filter(item => item) .filter(item => item)
console.log(labelTreeRets)
this.$emit('tagSelected', labelTreeRets) this.$emit('tagSelected', labelTreeRets)
}, },
//全选 //全选
...@@ -190,7 +228,6 @@ export default { ...@@ -190,7 +228,6 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tag-panel { .tag-panel {
display: flex; display: flex;
...@@ -199,6 +236,7 @@ export default { ...@@ -199,6 +236,7 @@ export default {
/deep/ { /deep/ {
.el-checkbox__label { .el-checkbox__label {
width: 100%; width: 100%;
vertical-align: middle;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
...@@ -255,6 +293,8 @@ export default { ...@@ -255,6 +293,8 @@ export default {
} }
.tag-group { .tag-group {
margin-left: 40px; margin-left: 40px;
display: flex;
flex-wrap: wrap;
.el-checkbox { .el-checkbox {
width: 40%; width: 40%;
margin-bottom: 6px; margin-bottom: 6px;
......
<template> <template>
<div> <div>
<BasicInof></BasicInof> <BasicInof :form="'customerGroup'" :eventBus="eventBus" :id="$route.params.id"></BasicInof>
<div class="detail-container"> <div class="detail-container">
<glsx-combi-form ref="showSearch" labelWidth="90px" :formObj="searchForm" :formData="searchFormData"> <glsx-combi-form
ref="showSearch"
labelWidth="90px"
:formObj="searchForm"
:formData="searchFormData"
>
<span slot="footer" class="search-btns"> <span slot="footer" class="search-btns">
<el-button :size="size" type="primary" @click="handleReset">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<el-button :size="size" type="primary" @click="handleReset">重置</el-button>
</span> </span>
</glsx-combi-form> </glsx-combi-form>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="table" :tableData="tableData" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf"> <GLTable
ref="table"
:getListApi="getListApi"
:searchForm="searchForm"
:tableParams="tableParams"
:pageConf="pageConf"
>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <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"
:disabled="scope.scope.isRemind == 1"
@click="remind(scope.scope)"
>提醒发送</el-button>
</div> </div>
</GLTable> </GLTable>
</div> </div>
...@@ -22,12 +37,13 @@ ...@@ -22,12 +37,13 @@
width: footerWidth + 'px' width: footerWidth + 'px'
}" }"
> >
<el-button type="primary" @click="handleNext">确定</el-button> <!-- <el-button type="primary" @click="handleNext">确定</el-button> -->
<el-button type="primary" @click="handleCancel">取消</el-button> <el-button type="primary" @click="handleCancel">取消</el-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Vue from 'vue'
import BasicInof from './components/basicInfo.vue' import BasicInof from './components/basicInfo.vue'
export default { export default {
components: { components: {
...@@ -36,53 +52,61 @@ export default { ...@@ -36,53 +52,61 @@ export default {
data() { data() {
return { return {
searchForm: {}, searchForm: {},
eventBus: new Vue(),
searchFormData: [ searchFormData: [
{ {
label: '群聊名称', label: '群聊名称',
name: 'zoneName', name: 'keyWord',
type: 'input', type: 'input',
maxlength: 20 maxlength: 20
}, },
{ {
label: '群主', label: '群主',
name: 'createDate', name: 'staffId',
type: 'select', type: 'select',
isClear: true, isClear: true,
optionLabel: 'label', optionLabel: 'staffName',
optionId: 'value', optionId: 'staffId',
optionList: [ optionList: []
{
label: 12,
value: 12
}
]
}, },
{ {
label: '送达状态', label: '送达状态',
name: 'createDate', name: 'status',
type: 'select', type: 'select',
isClear: true, isClear: true,
optionLabel: 'label', optionLabel: 'label',
optionId: 'value', optionId: 'value',
optionList: [ optionList: [
{ {
label: 12, label: '全部',
value: 12 value: ''
},
{
label: '未发送',
value: '0'
},
{
label: '已发送',
value: '1'
},
{
label: '发送失败',
value: '2'
} }
] ]
} }
], ],
tableParams: { tableParams: {
listName: 'list', listName: '',
tableOption: false, tableOption: false,
tableColumns: [ tableColumns: [
{ {
label: '群聊名称', label: '群聊名称',
prop: 'zoneName' prop: 'groupName'
}, },
{ {
label: '群主', label: '群主',
prop: 'zoneName' prop: 'staffName'
}, },
{ {
label: '群主所在部门', label: '群主所在部门',
...@@ -90,18 +114,25 @@ export default { ...@@ -90,18 +114,25 @@ export default {
}, },
{ {
label: '群客户人数', label: '群客户人数',
prop: 'zoneName' prop: 'departmentName'
}, },
{ {
label: '消息送达状态', label: '消息送达状态',
prop: 'zoneName' prop: 'status',
formatter: cellValue => {
return {
0: '未发送',
1: '已发送',
2: '发送失败'
}[cellValue.status]
}
}, },
{ {
label: '确认发送时间', label: '确认发送时间',
prop: 'createdDate', prop: 'senderTime'
formatter: cellValue => { // formatter: cellValue => {
return new Date(cellValue.createdDate).toLocaleDateString().replace(/\//g, '-') // return new Date(cellValue.createdDate).toLocaleDateString().replace(/\//g, '-')
} // }
}, },
{ {
label: '操作', label: '操作',
...@@ -113,21 +144,41 @@ export default { ...@@ -113,21 +144,41 @@ export default {
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
tableData: [ getListApi: this.$apis.customerTransform.groupDetailList
{
zoneName: 'fasd',
isRemind: 1
},
{
zoneName: 'fasd',
isRemind: 2
}
]
} }
}, },
mounted() {
const id = this.$route.params.id
this.getCustomerDetail(id)
this.searchForm.massId = id
},
methods: { methods: {
handleCancel() { handleCancel() {
this.$router.go(-1) this.$router.go(-1)
},
remind(data) {
this.$apis.customerTransform
.listRemindOperate({
id: data.id,
type: 2
})
.then(res => {
console.log(res)
// this.$set(this.employeelist[index], 'isRemind', true)
})
},
handleSearch() {
this.$refs.table.refreshTable()
},
handleReset() {
this.searchForm = {
massId: this.$route.params.id
}
},
getCustomerDetail(id) {
this.$apis.customerTransform.customerDetail({ id }).then(res => {
this.searchFormData[1].optionList = res.userList
})
} }
} }
} }
......
<template> <template>
<div> <div>
<BasicInof></BasicInof> <BasicInof :eventBus="eventBus" :id="$route.params.id" :form="'customer'"></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>
<div class="detail-info"> <div class="detail-info">
<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect"> <el-menu
<el-menu-item index="1">全部</el-menu-item> :default-active="activeIndex"
<el-menu-item index="2">已发送员工</el-menu-item> class="el-menu-demo"
<el-menu-item index="3">未发送员工</el-menu-item> mode="horizontal"
<el-menu-item index="4">员工发送失败</el-menu-item> @select="handleSelect"
>
<el-menu-item index="0">全部</el-menu-item>
<el-menu-item index="1">已发送员工</el-menu-item>
<el-menu-item index="2">未发送员工</el-menu-item>
<el-menu-item index="3">员工发送失败</el-menu-item>
</el-menu> </el-menu>
<div class="detail-total">共 {{ employeelist.length || 0 }} 人</div> <div class="detail-total">共 {{ employeelist.length || 0 }} 人</div>
<div class="info-list"> <div v-if="employeelist.length != 0" class="info-list">
<div class="info-item" v-for="item in employeelist" :key="item.id"> <div class="info-item" v-for="(item, index) in employeelist" :key="item.id">
<img class="info-avatar" src="../../assets/logo.png" alt="" /> <img class="info-avatar" :src="item.avatar" alt />
<div class="info-content"> <div class="info-content">
<div class="info-text"> <div class="info-text">
<div class="info-name"> <div class="info-name">
{{ item.name }} {{ item.staffName }}
<span :class="[item.status == 1 ? 'unsend' : 'send']">{{ item.status == 1 ? '未' : '已' }}发送</span> <span
:class="[item.status == 1 ? 'unsend' : 'send']"
>{{ item.status == 1 ? '未' : '已' }}发送</span>
</div> </div>
<div class="info-num">共{{ item.num }}个客户</div> <div class="info-num">共{{ item.customerCount }}个客户</div>
</div> </div>
<div class="info-right"> <div class="info-right">
<div v-if="item.status == 1">已提醒</div> <div v-if="item.isRemind">已提醒</div>
<el-button size="mini" type="primary">提醒</el-button> <el-button size="mini" type="primary" @click="remind(item, index)">提醒</el-button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<el-empty v-else image-size="200"></el-empty>
</div> </div>
</div> </div>
<div class="detail-modular"> <div class="detail-modular">
<div class="title">客户详情</div> <div class="title">客户详情</div>
<div class="detail-info"> <div class="detail-info">
<el-menu :default-active="customIndex" class="el-menu-demo" mode="horizontal" @select="handleCustomSelect"> <el-menu
<el-menu-item index="1">全部</el-menu-item> :default-active="customIndex"
<el-menu-item index="2">已发送员工</el-menu-item> class="el-menu-demo"
<el-menu-item index="3">未发送员工</el-menu-item> mode="horizontal"
<el-menu-item index="4">员工发送失败</el-menu-item> @select="handleCustomSelect"
>
<el-menu-item index="0">全部</el-menu-item>
<el-menu-item index="1">已发送客户</el-menu-item>
<el-menu-item index="2">未发送客户</el-menu-item>
<el-menu-item index="3">客户接受失败</el-menu-item>
</el-menu> </el-menu>
<div class="detail-total">共 {{ employeelist.length || 0 }} 人</div> <div class="detail-total">共 {{ customerlist.length || 0 }} 人</div>
<div class="info-list"> <div v-if="customerlist.length != 0" class="info-list">
<div class="info-item" v-for="item in employeelist" :key="item.id"> <div class="info-item" v-for="item in customerlist" :key="item.id">
<img class="info-avatar" src="../../assets/logo.png" alt="" /> <img class="info-avatar" :src="item.avatar" alt />
<div class="info-content info-custom"> <div class="info-content info-custom">
<div class="info-text"> <div class="info-text">
<div class="info-name"> <div class="info-name">
{{ item.name }} {{ item.customerName }}
<div :class="[item.status == 1 ? 'unsend' : 'send']">{{ item.status == 1 ? '未' : '已' }}发送</div> <div
:class="[item.status == 0 ? 'unsend' : 'send']"
>{{ item.status == 0 ? '未' : '已' }}发送</div>
</div> </div>
</div> </div>
<div class="info-right"> <div class="info-right">
<div>通过 胡悦发送</div> <div>通过 {{item.staffName}}发送</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<el-empty v-else image-size="200"></el-empty>
</div> </div>
</div> </div>
</div> </div>
...@@ -68,12 +84,14 @@ ...@@ -68,12 +84,14 @@
width: footerWidth + 'px' width: footerWidth + 'px'
}" }"
> >
<el-button type="primary" @click="handleNext">确定</el-button> <!-- <el-button type="primary" @click="handle
Next">确定</el-button>-->
<el-button type="primary" @click="handleCancel">取消</el-button> <el-button type="primary" @click="handleCancel">取消</el-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Vue from 'vue'
import BasicInof from './components/basicInfo.vue' import BasicInof from './components/basicInfo.vue'
export default { export default {
components: { components: {
...@@ -81,8 +99,8 @@ export default { ...@@ -81,8 +99,8 @@ export default {
}, },
data() { data() {
return { return {
activeIndex: '1', activeIndex: '0',
customIndex: '1', customIndex: '0',
employeelist: [ employeelist: [
{ {
id: 1, id: 1,
...@@ -126,19 +144,65 @@ export default { ...@@ -126,19 +144,65 @@ export default {
num: 1, num: 1,
url: 'dfsa' url: 'dfsa'
} }
] ],
customerlist: [],
basicInfo: {},
eventBus: new Vue()
} }
}, },
mounted() {
this.getStaffList()
this.getCustomerList()
},
methods: { methods: {
handleSelect(val) { handleSelect(val) {
console.log(val)
this.activeIndex = val this.activeIndex = val
this.getStaffList(val)
}, },
handleCustomSelect(val) { handleCustomSelect(val) {
this.customIndex = val this.customIndex = val
this.getCustomerList(val)
}, },
handleCancel() { handleCancel() {
this.$router.go(-1) this.$router.go(-1)
},
remind(data, index) {
if (!data.isRemind) {
this.$apis.customerTransform
.listRemindOperate({
id: data.id,
type: 1
})
.then(res => {
this.$set(this.employeelist[index], 'isRemind', true)
})
}
},
getCustomerDetail(id) {
this.$apis.customerTransform.customerDetail({ id }).then(res => {
console.log(res)
this.basicInfo = res
})
},
getStaffList(status = 0) {
const id = this.$route.params.id
this.$apis.customerTransform.staffList({ id, status }).then(res => {
console.log(res)
this.employeelist = res
})
},
getCustomerList(status = 0) {
const id = this.$route.params.id
this.$apis.customerTransform.customerDetailList({ id, status }).then(res => {
console.log(res)
this.customerlist = res
})
},
remindUserGroup() {
const id = this.$route.params.id
this.$apis.customerTransform.remindUserGroup({ id, type: 1 }).then(res => {
console.log(res)
})
} }
} }
} }
......
<template> <template>
<div class="send-assistant"> <div class="send-assistant">
<div class="menu-sub"> <div class="menu-sub">
<div class="menu-sub-item" :class="[activeIndex == '1' ? 'active' : '']" @click="switchMenu(1)">客户群发</div> <div
<div class="menu-sub-item" :class="[activeIndex == '2' ? 'active' : '']" @click="switchMenu(2)">客户群群发</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>
<div v-show="activeIndex == 1" class="container"> <div v-show="activeIndex == 1" class="container">
<div class="container-header"> <div class="container-header">
...@@ -10,13 +18,27 @@ ...@@ -10,13 +18,27 @@
<el-button type="primary" icon="el-icon-plus" @click="btnClick('create', 1)">新建群发</el-button> <el-button type="primary" icon="el-icon-plus" @click="btnClick('create', 1)">新建群发</el-button>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="gueast" :getListApi="customerList" :tableParams="gueastTableParams" :pageConf="gueastPageConf"> <GLTable
<!-- <div slot="entmicro-name" class="entmicro" slot-scope="scope"> ref="customer"
<span v-for="(i, index) in scope.scope.userList" :key="index">{{ i.name }}({{ i.tips }});</span> :getListApi="customerList"
</div> --> :tableParams="gueastTableParams"
:pageConf="gueastPageConf"
>
<div slot="entmicro-name" class="entmicro" slot-scope="scope">
<span v-for="(i, index) in scope.scope.attachmentList" :key="index">
[共{{scope.scope.attachmentList.length}}条]
<span v-show="i.attType == 1">{{i.attContent}}</span>
<span v-show="i.attType == 2 || i.attType == 3">[{{ATT_TYPE[i.attType]}}]</span>
<span v-show="i.attType == 4 || i.attType == 5">[{{ATT_TYPE[i.attType]}}]</span>
</span>
</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" :disabled="scope.scope.isRemind == 1" @click="btnClick('edit', 1, scope.scope)">提醒发送</el-button> <el-button
<el-button type="text" @click="btnClick('detail', 2, scope.scope)">详情</el-button> type="text"
:disabled="scope.scope.isRemind == 0"
@click="btnClick('remind', 1, scope.scope)"
>提醒发送</el-button>
<el-button type="text" @click="btnClick('detail', 1, scope.scope)">详情</el-button>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -27,12 +49,26 @@ ...@@ -27,12 +49,26 @@
<el-button type="primary" icon="el-icon-plus" @click="btnClick('create', 2)">新建群发</el-button> <el-button type="primary" icon="el-icon-plus" @click="btnClick('create', 2)">新建群发</el-button>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="gueast" :getListApi="customerGroupList" :tableParams="gueastGroupTableParams" :pageConf="gueastPageConf"> <GLTable
<!-- <div slot="entmicro-name" class="entmicro" slot-scope="scope"> ref="customerGroup"
<span v-for="(i, index) in scope.scope.userList" :key="index">{{ i.name }}({{ i.tips }});</span> :getListApi="customerGroupList"
</div> --> :tableParams="gueastGroupTableParams"
:pageConf="gueastPageConf"
>
<div slot="entmicro-name" class="entmicro" slot-scope="scope">
<span v-for="(i, index) in scope.scope.attachmentList" :key="index">
[共{{scope.scope.attachmentList.length}}条]
<span v-show="i.attType == 1">{{i.attContent}}</span>
<span v-show="i.attType == 2 || i.attType == 3">[{{ATT_TYPE[i.attType]}}]</span>
<span v-show="i.attType == 4 || i.attType == 5">[{{ATT_TYPE[i.attType]}}]</span>
</span>
</div>
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" :disabled="scope.scope.isRemind == 1" @click="btnClick('edit', 2, scope.scope)">提醒发送</el-button> <el-button
type="text"
:disabled="scope.scope.isRemind == 0"
@click="btnClick('remind', 2, scope.scope)"
>提醒发送</el-button>
<el-button type="text" @click="btnClick('detail', 2, scope.scope)">详情</el-button> <el-button type="text" @click="btnClick('detail', 2, scope.scope)">详情</el-button>
</div> </div>
</GLTable> </GLTable>
...@@ -44,7 +80,14 @@ ...@@ -44,7 +80,14 @@
export default { export default {
name: 'SendAssistant', name: 'SendAssistant',
data() { data() {
const ATT_TYPE = {
2: '图文消息',
3: '图文消息',
4: '链接',
5: '链接'
}
return { return {
ATT_TYPE,
activeIndex: '1', activeIndex: '1',
gueastTableParams: { gueastTableParams: {
listName: 'data', listName: 'data',
...@@ -64,8 +107,8 @@ export default { ...@@ -64,8 +107,8 @@ export default {
label: '群发内容', label: '群发内容',
prop: 'massName', prop: 'massName',
line: 2, line: 2,
minWidth: '100px' minWidth: '100px',
// addHtml: 'entmicro-name' addHtml: 'entmicro-name'
}, },
{ {
label: '发送时间', label: '发送时间',
...@@ -96,8 +139,7 @@ export default { ...@@ -96,8 +139,7 @@ export default {
label: '操作', label: '操作',
prop: 'optionBtns', prop: 'optionBtns',
width: '140px', width: '140px',
addHtml: 'optionBtns', addHtml: 'optionBtns'
fixed: 'right'
} }
] ]
}, },
...@@ -110,14 +152,14 @@ export default { ...@@ -110,14 +152,14 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '群发名称', label: '群发名称',
prop: 'name' prop: 'massName'
}, },
{ {
label: '群发内容', label: '群发内容',
prop: 'massName', prop: 'massName',
line: 2, line: 2,
minWidth: '100px' minWidth: '100px',
// addHtml: 'entmicro-name' addHtml: 'entmicro-name'
}, },
{ {
label: '发送时间', label: '发送时间',
...@@ -148,13 +190,21 @@ export default { ...@@ -148,13 +190,21 @@ export default {
label: '操作', label: '操作',
prop: 'optionBtns', prop: 'optionBtns',
width: '140px', width: '140px',
addHtml: 'optionBtns', addHtml: 'optionBtns'
fixed: 'right'
} }
] ]
} }
} }
}, },
watch: {
$route(val) {
console.log(val)
if (val.path == '/customerTransform/index') {
this.$refs.customer.refreshTable()
this.$refs.customerGroup.refreshTable()
}
}
},
methods: { methods: {
switchMenu(val) { switchMenu(val) {
this.activeIndex = val this.activeIndex = val
...@@ -175,10 +225,27 @@ export default { ...@@ -175,10 +225,27 @@ export default {
break break
case 'detail': case 'detail':
if (type == 1) { if (type == 1) {
this.$router.push('/customerTransform/detailCustomer') this.$router.push('/customerTransform/detailCustomer/' + rowData.id)
} else {
this.$router.push('/customerTransform/detaiCustomeGroup/' + rowData.id)
}
break
case 'remind':
var params = {
id: rowData.id,
type
}
// if (type == 1) {
this.$apis.customerTransform.listRemindOperate(params).then(res => {
console.log(res)
if (type == 1) {
this.$refs.customer.refreshTable()
} else { } else {
this.$router.push('/customerTransform/detaiCustomeGroup') this.$refs.customerGroup.refreshTable()
} }
})
// } else {
// }
break break
default: default:
console.log(11) console.log(11)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!