Commit f00ace4a by 杨明

fixed

1 parent 7b289ef0
......@@ -75,5 +75,14 @@ const getGroupList = params => {
returnAll: true
})
}
export default { getStaffList, getMerchantList, getlistDepartmentTree, getActivitylist, insertStaff, getGroupList, activityOpen }
const activityreportWorktool = params => {
params.method = `entmicro.api.wechatcloudcontrol.activityreport.worktool.grouplist`
return http({
url: url1,
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { activityreportWorktool, getStaffList, getMerchantList, getlistDepartmentTree, getActivitylist, insertStaff, getGroupList, activityOpen }
......@@ -26,7 +26,7 @@
</div>
</div>
<transition name="el-zoom-in-top" v-if="!isAutomatic">
<gl-select-menu :domEl="automaticEl" @changeStatu="hideSelect">
<gl-select-menu :domEl="automaticEl" @changeStatu="hideSelect" style="width:432px">
<el-form-item class="search-groomname">
<el-input placeholder="请输入搜索关键词" v-model="filterText"></el-input>
</el-form-item>
......@@ -44,7 +44,10 @@
<el-form-item :label="'#' + (index + 1) + bulletin.label + '>>' + ':'" class="group-item-box" :key="index">
<div class="group-box">
<div class="input-box" v-for="(i, k) in groupCofListInput[bulletin.storageList]" :key="k">
<el-input v-model="i.name" :placeholder="'将' + bulletin.label + '推送至群聊'"></el-input>
<!-- <el-input v-model="i.name" ></el-input> -->
<el-select v-model="i.name" :placeholder="'将' + bulletin.label + '推送至群聊'">
<el-option v-for="item in selectGroupName" :key="item.groupName" :label="item.groupName" :value="item.groupName"></el-option>
</el-select>
<i class="el-icon-circle-plus" v-if="k == 0" @click="addGroup(groupCofListInput[bulletin.storageList])"></i>
<i class="el-icon-remove" v-else @click="delGroup(groupCofListInput[bulletin.storageList], k)"></i>
</div>
......@@ -55,7 +58,7 @@
</el-form>
</div>
</div>
<GLFooter>
<GLFooter class="footer-panel">
<el-button @click="handlebattleClose" size="medium">取消</el-button>
<el-button type="primary" @click="handlebattleConfirm" size="medium" :loading="loading">保存</el-button>
</GLFooter>
......@@ -84,6 +87,7 @@ export default {
},
data() {
return {
selectGroupName: [],
isDialogVisible: false,
merchantName: '',
paramsData: this.$route.query,
......@@ -264,6 +268,10 @@ export default {
this.wechat.automaticName = data.name
this.wechat.staffId = data.staffId
this.idBefEncryption = data.idBefEncryption
this.$apis.battle.activityreportWorktool({ cloudId: this.idBefEncryption }).then(res => {
this.selectGroupName = res.data.result || []
this.groupCofListInput = { wordReportValue: [{ name: '' }], orderReportValue: [{ name: '' }], saReportValue: [{ name: '' }], saPerReportValue: [{ name: '' }], scheduleReportValue: [{ name: '' }], zhanReportValue: [{ name: '' }] }
})
},
// 弹窗数据回显
initswitchList(switchList) {
......@@ -306,6 +314,7 @@ export default {
this.initswitchList(data.switchList)
data.groupConfigList.forEach(item => {
let groupHideAttr = this.groupToType.find(k => k.type == item.actionReportType)?.attr
if (!groupHideAttr) return
if (item.groupId) {
if (item.groupId.split('_R:')[1] && item.groupId.split('_R:')[1] == item.groupName) {
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: item.groupName })
......@@ -317,6 +326,7 @@ export default {
roomName: item.groupName
})
} else {
this.idBefEncryption = item.groupId.split('_R:')[0]
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: '' })
}
}
......@@ -326,6 +336,9 @@ export default {
this.groupCofListInput[k] = [{ name: '' }]
}
}
this.$apis.battle.activityreportWorktool({ cloudId: this.idBefEncryption }).then(res => {
this.selectGroupName = res.data.result || []
})
this.getGroupList(this.wechat.staffId)
} else {
this.groupCofListInput = {
......@@ -524,6 +537,16 @@ export default {
}
</script>
<style lang="scss" scoped>
.footer-panel {
margin-top: 20px;
}
.search-groomname {
width: 402px;
margin: 12px 16px 0;
/deep/.el-input {
width: 402px;
}
}
.addConfig-wrap {
background: #fff;
.header {
......@@ -552,6 +575,12 @@ export default {
.input-box {
display: flex;
align-items: center;
/deep/ {
.el-select,
.el-input {
width: 355px !important;
}
}
i {
cursor: pointer;
font-size: 20px;
......
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-06-21 19:07:21
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-06-21 20:12:35
* @FilePath: \scrm-micro-battles\src\views\bulletin\components\battle\components\select-dropdown.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="el-select-dropdown el-popper group-select" :style="groupStyle">
<div class="el-select-dropdown el-popper group-select" :style="groupStyle" v-bind="$attrs">
<slot></slot>
</div>
</template>
......@@ -21,10 +29,10 @@ export default {
data() {
return {
groupStyle: '',
includeData:['el-input__inner','placeholder','el-select__caret el-input__icon el-icon-arrow-up']
includeData: ['el-input__inner', 'placeholder', 'el-select__caret el-input__icon el-icon-arrow-up']
}
},
mounted() {
mounted() {
if (this.appendToBody) document.body.appendChild(this.$el)
this.getBoundingClientRect()
window.addEventListener('resize', this.getBoundingClientRect)
......@@ -40,8 +48,8 @@ export default {
this.groupStyle = { left: left + 'px', top: top + 45 + 'px' }
},
removeEl() {
document.body.contains(this.$el) && document.body.removeChild(this.$el)
this.$emit('changeStatu')
document.body.contains(this.$el) && document.body.removeChild(this.$el)
this.$emit('changeStatu')
}
},
beforeDestroy() {
......@@ -65,4 +73,3 @@ export default {
}
}
</style>
<template>
<div class="activity">
<GLTabs v-model="activeName" :tabPaneList="tabPaneList" @tab-click="handleClick"></GLTabs>
<!-- 表格区域 开始 -->
<div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset">
<template slot="activityStatus">
<el-select v-model="tableSearchForm.activityStatus" placeholder="请选择活动状态">
<el-option v-for="item in baseData.activityStatuList" :key="item.confId" :label="item.confName" :value="item.confId"></el-option>
</el-select>
</template>
</GLCombiForm>
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="tableSearchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="flex-between title">
<div class="title-text">专员列表</div>
<template v-if="tableSearchForm.activityStatus == 2">
<template v-if="activeName == 'first'">
<el-button :size="size" type="primary" class="battle-set-btn" @click="battleSetHandle">批量配置专员</el-button>
</template>
</div>
......@@ -138,7 +133,9 @@
</transition>
</el-form-item>
<el-form-item class="select-wrap" label="群名:">
<el-input v-model="groupName" placeholder="请输入群名" @blur="importGroup"></el-input>
<el-select v-model="groupName" placeholder="请选择">
<el-option v-for="item in selectGroupName" :key="item.groupName" :label="item.groupName" :value="item.groupName"></el-option>
</el-select>
</el-form-item>
</el-form>
</div>
......@@ -152,8 +149,8 @@
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { dateFormat } from '@/utils/index'
import SelectMember from '../battle/components/SelectMember.vue'
import GlSelectMenu from '../battle/components/select-dropdown.vue'
import SelectMember from './components/SelectMember.vue'
import GlSelectMenu from './components/select-dropdown.vue'
export default {
components: {
SelectMember,
......@@ -161,12 +158,14 @@ export default {
},
data() {
return {
selectGroupName: [],
groupName: '',
isgroup: true,
isAutomatic: true,
menuIndex: 0,
merchantId: '',
merchantName: '',
activeName: 'first',
size: 'small',
mode: 'mid',
battleVisible: false,
......@@ -176,6 +175,16 @@ export default {
setectEditList: [],
merchantList: [],
groupList: [],
tabPaneList: [
{
label: '进行中',
name: 'first'
},
{
label: '已结束',
name: 'second'
}
],
searchFormData: [
{
label: '活动门店',
......@@ -197,16 +206,6 @@ export default {
optionLabel: 'confName'
},
{
label: '活动状态',
name: 'activityStatus',
type: 'select',
optionList: [],
addHtml: 'activityStatus',
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'activityStatuList'
},
{
label: '活动类型',
name: 'marketingType',
type: 'select',
......@@ -219,8 +218,7 @@ export default {
tableSearchForm: {
merchantName: '',
activityName: '',
activityType: '',
activityStatus: 2
activityType: ''
},
// 表格
userList: [],
......@@ -292,10 +290,6 @@ export default {
activityTypeList: [
{ confId: '3', confName: '众筹' },
{ confId: '5', confName: '膨胀金' }
],
activityStatuList: [
{ confId: 2, confName: '进行中' },
{ confId: 3, confName: '已结束' }
]
}
}
......@@ -317,12 +311,30 @@ export default {
}
},
watch: {
idBefEncryptionBattle(val) {
this.importGroup()
},
idBefEncryptionGood(val) {
this.importGroup()
},
activeName: {
handler(val) {
if (val == 'first') {
this.tableParams.tableOption = true
this.$nextTick(() => {
this.tableParams.mutiSelectUniqueKey = 'activityId'
this.tableParams.mutiSelectName = 'activityId'
})
} else {
this.tableParams.tableOption = false
this.$nextTick(() => {
this.tableParams.mutiSelectUniqueKey = ''
this.tableParams.mutiSelectName = ''
})
}
},
immediate: true
},
// idBefEncryptionBattle(val) {
// this.importGroup()
// },
// idBefEncryptionGood(val) {
// this.importGroup()
// },
filterText(val) {
this.$refs.tree.filter(val)
},
......@@ -331,6 +343,15 @@ export default {
},
roomName(val) {
this.filterRoomName(val)
},
groupName(val) {
if (this.wechat.roomName) return
if (this.wechat.battleStaffName) {
this.wechat.battleGroupId = this.idBefEncryptionBattle + '_R:' + val
}
if (this.wechat.goodStaffName) {
this.wechat.goodGroupId = this.idBefEncryptionGood + '_R:' + val
}
}
},
methods: {
......@@ -401,14 +422,15 @@ export default {
})
},
handleNodeClick(data) {
this.setSendName(data.name, data.staffId)
// this.wechat.roomName = ''
if (this.menuIndex == 1) {
this.idBefEncryptionBattle = data.idBefEncryption
}
if (this.menuIndex == 2) {
this.idBefEncryptionGood = data.idBefEncryption
this.groupName = ''
}
this.setSendName(data.name, data.staffId)
this.hideSelect()
},
setSendName(name, staffId, isClear, i) {
......@@ -420,8 +442,10 @@ export default {
if (this.menuIndex == 2 || i == 2) {
if (staffId == this.wechat.goodStaffId && staffId) return
Object.assign(this.wechat, { goodStaffName: name, goodStaffId: staffId })
this.$apis.battle.activityreportWorktool({ cloudId: this.idBefEncryptionGood }).then(res => {
this.selectGroupName = res.data.result || []
})
}
console.log(this.wechat)
if (isClear && !this.wechat.battleStaffName && !this.wechat.goodStaffName) {
this.wechat.roomName = ''
this.groupList = []
......@@ -448,15 +472,15 @@ export default {
}
// this.wechat.groupId = data.roomChatId
},
importGroup() {
if (this.wechat.roomName) return
if (this.wechat.battleStaffName) {
this.wechat.battleGroupId = this.idBefEncryptionBattle + '_R:' + this.groupName
}
if (this.wechat.goodStaffName) {
this.wechat.goodGroupId = this.idBefEncryptionGood + '_R:' + this.groupName
}
},
// importGroup() {
// if (this.wechat.roomName) return
// if (this.wechat.battleStaffName) {
// this.wechat.battleGroupId = this.idBefEncryptionBattle + '_R:' + this.groupName
// }
// if (this.wechat.goodStaffName) {
// this.wechat.goodGroupId = this.idBefEncryptionGood + '_R:' + this.groupName
// }
// },
openMenu(e) {
if (e == this.menuIndex) return (this.menuIndex = 0)
this.menuIndex = e
......@@ -551,7 +575,7 @@ export default {
// this.$refs.selectMember.$refs.tree.setCheckedKeys(this.ids)
// }
},
handlebattleConfirm() {
async handlebattleConfirm() {
if (this.userList.length == 0) {
this.$message({
message: '请选择专员',
......@@ -607,6 +631,7 @@ export default {
if (res.data) {
this.battleVisible = false
this.handleSearch()
this.activeName = 'first'
this.clearData()
}
})
......@@ -658,7 +683,7 @@ export default {
roomName: '',
autoGroupMerchantId
}
const groupId = battleGroupId || goodGroupId
const groupId = battleGroupId || goodGroupId || ''
if (groupId.split('_R:')[1] == autoGroupName) {
this.groupName = autoGroupName
this.idBefEncryptionBattle = battleGroupId.split('_R:')[0]
......@@ -666,7 +691,9 @@ export default {
} else {
this.wechat.roomName = autoGroupName
}
this.$apis.battle.activityreportWorktool({ cloudId: this.idBefEncryptionGood }).then(res => {
this.selectGroupName = res.data.result || []
})
this.getGroupList(this.wechat.staffId)
})
},
......@@ -693,6 +720,7 @@ export default {
let params = {
...this.tableSearchForm
}
this.activeName == 'first' ? (params.activityStatus = 2) : (params.activityStatus = 3)
return params
},
beforeSearchFn() {
......@@ -710,7 +738,7 @@ export default {
},
async getDepartmentTree() {
// let params = { addChildrensFlag: true, queryMerchantId: this.config.merchantId,loginStatus:1 }
let params = { addChildrensFlag: true, queryMerchantId: this.$merchantId, loginStatus: 1 }
let params = { addChildrensFlag: true, queryMerchantId: this.$merchantId, loginStatus: 1 } //this.$merchantId
let data = await this.$apis.battle.getlistDepartmentTree(params)
this.ids = []
this.automaticData = data
......
......@@ -15,7 +15,7 @@
<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 slot="content" slot-scope="scope">
<div v-for="(item,index) in formatterContent(scope.scope)" :key="index">{{item}}</div>
<div v-for="(item, index) in formatterContent(scope.scope)" :key="index">{{ item }}</div>
</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>
......@@ -584,15 +584,21 @@ export default {
},
methods: {
formatterContent(cellValue) {
let typeToTxt = new Map([[5,'#1.SA个人喜报>>'],[4, '#2.SA喜报>>'],[7, '#3.文字喜报>>'],[2, '#4.早报>>'],[6, '#5.客户进度消息>>'],[ 3, '#6.补单通知>>']])
let typeToTxt = new Map([
[5, '#1.SA个人喜报>>'],
[4, '#2.SA喜报>>'],
[7, '#3.文字喜报>>'],
[2, '#4.早报>>'],
[6, '#5.客户进度消息>>'],
[3, '#6.补单通知>>']
])
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}】`:'')
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('【'))
txt = [...typeToTxt.values()].filter(item => item.includes('【'))
return txt
},
// 图片查看,
......@@ -1159,7 +1165,7 @@ export default {
}
}
.search-groomname {
width: 252px;
width: 400px;
margin: 12px 16px 0;
/deep/.el-input {
width: 252px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!