Commit 10225044 by 杨北旺

去掉推送时间和列表优化

1 parent f9e8ec40
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<span v-if="bulletin.label != '推送时间'">推送至群聊:</span> <span v-if="bulletin.label != '推送时间'">推送至群聊:</span>
<span v-else>:</span> <span v-else>:</span>
</div> </div>
<div v-if="bulletin.label == '推送时间'" class="group-box group-box-white"> <!-- <div v-if="bulletin.label == '推送时间'" class="group-box group-box-white">
<div class="input-box radio-box"> <div class="input-box radio-box">
<el-radio-group @change="changeRadio" v-model="pushRadio"> <el-radio-group @change="changeRadio" v-model="pushRadio">
<el-radio :label="2">次日</el-radio> <el-radio :label="2">次日</el-radio>
...@@ -64,8 +64,8 @@ ...@@ -64,8 +64,8 @@
placeholder="选择时间" placeholder="选择时间"
></el-time-select> ></el-time-select>
</div> </div>
</div> </div> -->
<div v-else class="group-box"> <div class="group-box">
<div class="input-box" v-for="(i, k) in groupCofListInput[bulletin.storageList]" :key="k"> <div class="input-box" v-for="(i, k) in groupCofListInput[bulletin.storageList]" :key="k">
<el-select v-model="i.name" :placeholder="'将' + bulletin.label + '推送至群聊'" filterable clearable> <el-select v-model="i.name" :placeholder="'将' + bulletin.label + '推送至群聊'" filterable clearable>
<el-option v-for="item in selectGroupName" :key="item.groupName" :label="item.groupName" :value="item.groupName"></el-option> <el-option v-for="item in selectGroupName" :key="item.groupName" :label="item.groupName" :value="item.groupName"></el-option>
...@@ -225,12 +225,12 @@ export default { ...@@ -225,12 +225,12 @@ export default {
componentName: '', componentName: '',
eyeIcon: 'zhanReport_qy' eyeIcon: 'zhanReport_qy'
}, },
{ // {
label: '推送时间', // label: '推送时间',
storageList: '', // storageList: '',
componentName: '', // componentName: '',
eyeIcon: '' // eyeIcon: ''
}, // },
{ {
label: '服务商战报', label: '服务商战报',
storageList: 'zhanServerReportValue', storageList: 'zhanServerReportValue',
...@@ -260,8 +260,8 @@ export default { ...@@ -260,8 +260,8 @@ export default {
], ],
isImgVisible: false, isImgVisible: false,
dialogImageUrl: '', dialogImageUrl: '',
pushTimeValue: '9:00', // pushTimeValue: '9:00',
pushRadio:2, // pushRadio:2,
} }
}, },
watch: { watch: {
...@@ -285,11 +285,11 @@ export default { ...@@ -285,11 +285,11 @@ export default {
this.handlebattleOn(data, sign) this.handlebattleOn(data, sign)
}, },
methods: { methods: {
changeRadio(e){ // changeRadio(e){
if(e==2){ // if(e==2){
this.pushTimeValue = '9:00' // this.pushTimeValue = '9:00'
} // }
}, // },
// 图片查看 // 图片查看
handlePoster(name) { handlePoster(name) {
this.isImgVisible = true this.isImgVisible = true
...@@ -419,10 +419,10 @@ export default { ...@@ -419,10 +419,10 @@ export default {
this.idBefEncryption = item.groupId.split('_R:')[0] this.idBefEncryption = item.groupId.split('_R:')[0]
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: '' }) groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: '' })
} }
if(item.sendTime){ // if(item.sendTime){
this.pushRadio = 1 // this.pushRadio = 1
this.pushTimeValue = item.sendTime // this.pushTimeValue = item.sendTime
} // }
} }
}) })
for (let k in this.groupCofListInput) { for (let k in this.groupCofListInput) {
...@@ -591,15 +591,15 @@ export default { ...@@ -591,15 +591,15 @@ export default {
this.setectList.forEach(item => { this.setectList.forEach(item => {
params.yqMerchantIdList.push(item.yqMerchantId) params.yqMerchantIdList.push(item.yqMerchantId)
}) })
const sendTime = this.pushTimeValue?this.pushTimeValue+':00':'' // const sendTime = this.pushTimeValue?this.pushTimeValue+':00':''
let _emptyObj = {} // let _emptyObj = {}
Object.keys(this.groupCofList).map(item => { Object.keys(this.groupCofList).map(item => {
let type = this.groupToType.find(k => k.attr == item).type let type = this.groupToType.find(k => k.attr == item).type
if(type==21&&this.pushRadio==1){//仅早报需要 // if(type==21&&this.pushRadio==1){//仅早报需要
_emptyObj.sendTime = sendTime // _emptyObj.sendTime = sendTime
}else{ // }else{
_emptyObj = {} // _emptyObj = {}
} // }
if (this.groupCofList[item].length) { if (this.groupCofList[item].length) {
this.groupCofList[item].forEach(k => { this.groupCofList[item].forEach(k => {
params.groupConfigList.push({ params.groupConfigList.push({
...@@ -607,7 +607,7 @@ export default { ...@@ -607,7 +607,7 @@ export default {
groupName: k.roomName, groupName: k.roomName,
groupMerchantId: this.config.merchantId, groupMerchantId: this.config.merchantId,
actionReportType: type, actionReportType: type,
..._emptyObj // ..._emptyObj
}) })
}) })
} else if (this.groupCofListInput[item + 'Value'].length) { } else if (this.groupCofListInput[item + 'Value'].length) {
...@@ -617,7 +617,7 @@ export default { ...@@ -617,7 +617,7 @@ export default {
groupName: k.name, groupName: k.name,
groupMerchantId: this.config.merchantId, groupMerchantId: this.config.merchantId,
actionReportType: type, actionReportType: type,
..._emptyObj // ..._emptyObj
}) })
}) })
} }
......
...@@ -3,14 +3,7 @@ ...@@ -3,14 +3,7 @@
<div class="activity"> <div class="activity">
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<div class="container"> <div class="container">
<GLCombiForm <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
></GLCombiForm>
<div class="flex-between title"> <div class="flex-between title">
<div class="title-text">专员列表</div> <div class="title-text">专员列表</div>
<!-- <el-button :size="size" <!-- <el-button :size="size"
...@@ -18,35 +11,14 @@ ...@@ -18,35 +11,14 @@
class="battle-set-btn" class="battle-set-btn"
@click="battleSetHandle">批量配置专员</el-button> --> @click="battleSetHandle">批量配置专员</el-button> -->
</div> </div>
<GLTable <GLTable ref="battleRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" @setTableFinishFun="setTableFinishFun" @selectionTable="selectionTable">
ref="battleRef" <div slot="content" slot-scope="scope">
:getListApi="getListApi" <div v-for="(item, index) in formatterContent(scope.scope)" :key="index">{{ item }}</div>
:noDataImg="url" </div>
:searchForm="searchForm" <div slot="activityTime" slot-scope="scope">{{ dateFormatFun(scope.scope.startTime) }}-{{ dateFormatFun(scope.scope.endTime) }}</div>
:tableParams="tableParams" <div class="table-btns" slot="auth-button" slot-scope="scope">
:pageConf="pageConf" <el-button type="text" v-if="!scope.scope.staffId" @click="handlebattleOn(scope.scope)">配置</el-button>
@setTableFinishFun="setTableFinishFun" <el-button type="text" v-else @click="handlebattleOn(scope.scope, 'edit')">编辑</el-button>
@selectionTable="selectionTable"
>
<div
slot="activityTime"
slot-scope="scope"
>{{ dateFormatFun(scope.scope.startTime) }}-{{ dateFormatFun(scope.scope.endTime) }}</div>
<div
class="table-btns"
slot="auth-button"
slot-scope="scope"
>
<el-button
type="text"
v-if="!scope.scope.staffId"
@click="handlebattleOn(scope.scope)"
>配置</el-button>
<el-button
type="text"
v-else
@click="handlebattleOn(scope.scope, 'edit')"
>编辑</el-button>
</div> </div>
</GLTable> </GLTable>
</div> </div>
...@@ -814,19 +786,8 @@ ...@@ -814,19 +786,8 @@
</div> </div>
</GLDialog> --> </GLDialog> -->
<!-- 查看 --> <!-- 查看 -->
<GLDialog <GLDialog v-if="isImgVisible" title="查看" mode="mid" :visible.sync="isImgVisible" class="dialog-look" :hasFooter="false">
v-if="isImgVisible" <img width="50%" :src="require(`@/assets/${dialogImageUrl}.png`)" alt="" />
title="查看"
mode="mid"
:visible.sync="isImgVisible"
class="dialog-look"
:hasFooter="false"
>
<img
width="50%"
:src="require(`@/assets/${dialogImageUrl}.png`)"
alt=""
/>
</GLDialog> </GLDialog>
</div> </div>
</template> </template>
...@@ -838,7 +799,7 @@ export default { ...@@ -838,7 +799,7 @@ export default {
components: { components: {
// GlSelectMenu // GlSelectMenu
}, },
data () { data() {
return { return {
selectGroupName: [], selectGroupName: [],
// 推送至群聊,下拉框是否隐藏 // 推送至群聊,下拉框是否隐藏
...@@ -1011,36 +972,38 @@ export default { ...@@ -1011,36 +972,38 @@ export default {
{ {
label: '企微', label: '企微',
prop: 'enterpriseMerchantName', prop: 'enterpriseMerchantName',
width: 200 width: 160
}, },
{ {
label: '推送人', label: '推送人',
prop: 'staffName', prop: 'staffName',
line: 1, line: 1,
width: 200 width: 160
}, },
{ {
label: '内容', label: '内容',
prop: '', prop: '',
formatter: cellValue => { addHtml: 'content'
let typeToTxt = { // formatter: cellValue => {
20: '(推收款喜报)', // let typeToTxt = {
21: '(推战报)', // 20: '(推收款喜报)',
// 3: '(推补录订单)', // 21: '(推战报)',
// 4: '(推SA喜报)', // // 3: '(推补录订单)',
// 5: '(推SA个人喜报)', // // 4: '(推SA喜报)',
// 6: '(推客户进度消息)', // // 5: '(推SA个人喜报)',
22: '(推服务商战报)', // // 6: '(推客户进度消息)',
23: '(推智能工牌开机检测)' // 22: '(推服务商战报)',
} // 23: '(推智能工牌开机检测)',
let txt = '' // 24: '(推文字喜报)'
cellValue.groupConfigList?.forEach(item => { // }
if (item.groupId) { // let txt = ''
txt = (txt ? txt + ';' : txt) + (item.groupName || '') + (typeToTxt[item.actionReportType] || '') // cellValue.groupConfigList?.forEach(item => {
} // if (item.groupId) {
}) // txt = (txt ? txt + ';' : txt) + (item.groupName || '') + (typeToTxt[item.actionReportType] || '')
return txt // }
} // })
// return txt
// }
} }
] ]
}, },
...@@ -1071,7 +1034,7 @@ export default { ...@@ -1071,7 +1034,7 @@ export default {
} }
} }
}, },
mounted () { mounted() {
this.getMerchantList() this.getMerchantList()
// this.merchantList = this.$saasOrder?.merchantList || [] // this.merchantList = this.$saasOrder?.merchantList || []
// this.config.merchantId = this.merchantList[0]?.merchantId // this.config.merchantId = this.merchantList[0]?.merchantId
...@@ -1121,12 +1084,31 @@ export default { ...@@ -1121,12 +1084,31 @@ export default {
// } // }
}, },
methods: { methods: {
formatterContent(cellValue) {
let typeToTxt = new Map([
[20, '#1.收款喜报>>'],
[24, '#2.文字喜报>>'],
[21, '#3.店面早报>>'],
[22, '#4.服务商战报>>'],
[9, '#5.驻店日报>>'],
[23, '#6.智能工牌开机检测>>'],
[10, '#7.开单预警>>']
])
let txt = ''
cellValue.groupConfigList?.forEach(item => {
if (item.groupId && typeToTxt.get(item.actionReportType)) {
typeToTxt.set(item.actionReportType, item.groupName ? typeToTxt.get(item.actionReportType) + `【${item.groupName}】` : '')
}
})
txt = [...typeToTxt.values()].filter(item => item.includes('【'))
return txt
},
// 图片查看 // 图片查看
// handlePoster (name) { // handlePoster (name) {
// this.isImgVisible = true // this.isImgVisible = true
// this.dialogImageUrl = name // this.dialogImageUrl = name
// }, // },
getOptionsList (formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle) var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle) var index = this[formName].findIndex(k => k.name == refreshSigle)
...@@ -1151,7 +1133,7 @@ export default { ...@@ -1151,7 +1133,7 @@ export default {
}) })
} }
}, },
getMerchantList () { getMerchantList() {
this.$apis.battle.getMerchantList({}).then(res => { this.$apis.battle.getMerchantList({}).then(res => {
this.baseData.merchantList = res this.baseData.merchantList = res
this.merchantList = res this.merchantList = res
...@@ -1163,7 +1145,7 @@ export default { ...@@ -1163,7 +1145,7 @@ export default {
// this.merchantName = this.merchantList && this.merchantList[0].merchantName // this.merchantName = this.merchantList && this.merchantList[0].merchantName
}) })
}, },
handleReset () { handleReset() {
this.searchForm = { this.searchForm = {
yqMerchantId: '', yqMerchantId: '',
yqMerchantName: '', yqMerchantName: '',
...@@ -1328,16 +1310,16 @@ export default { ...@@ -1328,16 +1310,16 @@ export default {
// this.getDepartmentTree() // this.getDepartmentTree()
// this.battleVisible = true // this.battleVisible = true
// }, // },
dateFormatFun (date) { dateFormatFun(date) {
return dateFormat(date) return dateFormat(date)
}, },
selectionTable (val) { selectionTable(val) {
this.setectList = val this.setectList = val
}, },
handlestaffbattleConfirm () { handlestaffbattleConfirm() {
this.battlestaffVisible = false this.battlestaffVisible = false
}, },
handlestaffbattleClose () { handlestaffbattleClose() {
this.battlestaffVisible = false this.battlestaffVisible = false
}, },
// async handlebattleConfirm () { // async handlebattleConfirm () {
...@@ -1425,15 +1407,15 @@ export default { ...@@ -1425,15 +1407,15 @@ export default {
// this.battleVisible = false // this.battleVisible = false
// this.clearData() // this.clearData()
// }, // },
handleDetails () { }, handleDetails() {},
// addGroup (group) { // addGroup (group) {
// group.push({ name: '' }) // group.push({ name: '' })
// }, // },
// delGroup (group, i) { // delGroup (group, i) {
// group.splice(i, 1) // group.splice(i, 1)
// }, // },
handlebattleOn (data, sign) { handlebattleOn(data, sign) {
let params = { let params = {
data: JSON.stringify(data), data: JSON.stringify(data),
sign: sign ? sign : '' sign: sign ? sign : ''
} }
...@@ -1553,16 +1535,16 @@ export default { ...@@ -1553,16 +1535,16 @@ export default {
// handleSetting () { // handleSetting () {
// this.drawer = true // this.drawer = true
// }, // },
handleClick () { handleClick() {
this.handleSearch() this.handleSearch()
}, },
setTableFinishFun () { setTableFinishFun() {
//接收到的数据为空 //接收到的数据为空
this.$refs.battleRef.data.length ? (this.$refs.battleRef.tableHeightValues = '') : this.$refs.battleRef.setTableHeightFun() this.$refs.battleRef.data.length ? (this.$refs.battleRef.tableHeightValues = '') : this.$refs.battleRef.setTableHeightFun()
}, },
handleSearch () { handleSearch() {
this.$refs.battleRef.refreshTable() this.$refs.battleRef.refreshTable()
}, }
// async getDepartmentTree () { // async getDepartmentTree () {
// let params = { addChildrensFlag: true, queryMerchantId: this.config.merchantId, loginStatus: 1 } // let params = { addChildrensFlag: true, queryMerchantId: this.config.merchantId, loginStatus: 1 }
// // let params = { addChildrensFlag: true, queryMerchantId: 44209846, loginStatus: 1 } // // let params = { addChildrensFlag: true, queryMerchantId: 44209846, loginStatus: 1 }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!