Commit 10225044 by 杨北旺

去掉推送时间和列表优化

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