Commit 21459f54 by 前端

驻点

1 parent 8524cf02
......@@ -8,10 +8,8 @@
<div class="config-wrap gl-form-page">
<el-form ref="form" :model="form" label-width="154px">
<el-form-item label="所属企业:">
<el-select v-model="config.merchantId" placeholder="请选择" @change="handleMerchatChange"
@visible-change="hideSelect">
<el-option v-for="item in merchantList" :key="item.merchantId" :label="item.merchantName"
:value="item.merchantId"></el-option>
<el-select v-model="config.merchantId" placeholder="请选择" @change="handleMerchatChange" @visible-change="hideSelect">
<el-option v-for="item in merchantList" :key="item.merchantId" :label="item.merchantName" :value="item.merchantId"></el-option>
</el-select>
</el-form-item>
<!-- 推送人 -->
......@@ -23,8 +21,7 @@
{{ wechat.automaticName }}
</div>
<span class="el-input__suffix" @click="openAutomatic">
<span class="el-input__suffix-inner"><i
:class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', isAutomatic ? 'is-reverse' : '']"></i></span>
<span class="el-input__suffix-inner"><i :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up', isAutomatic ? 'is-reverse' : '']"></i></span>
</span>
</div>
</div>
......@@ -35,9 +32,7 @@
</el-form-item>
<div class="el-select-dropdown__wrap el-scrollbar__wrap">
<template v-if="automaticData.length > 0">
<el-tree class="filter-tree" :data="automaticData" node-key="id" :default-expanded-keys="expandedKeys"
:props="defaultProps" default-expand-all :filter-node-method="filterNode" ref="tree"
@node-click="handleNodeClick"></el-tree>
<el-tree class="filter-tree" :data="automaticData" node-key="id" :default-expanded-keys="expandedKeys" :props="defaultProps" default-expand-all :filter-node-method="filterNode" ref="tree" @node-click="handleNodeClick"></el-tree>
</template>
<div class="empty" v-else>暂无数据</div>
</div>
......@@ -51,15 +46,13 @@
<div class="input-box" v-for="(i, k) in groupCofListInput[bulletin.storageList]" :key="k">
<!-- <el-input v-model="i.name" ></el-input> -->
<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>
</el-select>
<i class="el-icon-circle-plus" v-if="k == 0"
@click="addGroup(groupCofListInput[bulletin.storageList])"></i>
<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>
</div>
<span class="group-config-text" @click="openConfigDialog(bulletin.componentName)">配置</span>
<span class="group-config-text" @click="openConfigDialog(bulletin.componentName)">{{ bulletin.text ? bulletin.text : '配置' }}</span>
</el-form-item>
</template>
</el-form>
......@@ -69,8 +62,7 @@
<el-button @click="handlebattleClose" size="medium">取消</el-button>
<el-button type="primary" @click="handlebattleConfirm" size="medium" :loading="loading">保存</el-button>
</GLFooter>
<component :is="dialogComponent" ref="componentRef" v-if="isDialogVisible" :isDialogVisible="isDialogVisible"
:switchList="switchList" @handlePreview="handlePreview" @handleClose="handleClose"></component>
<component :is="dialogComponent" ref="componentRef" v-if="isDialogVisible" :isDialogVisible="isDialogVisible" :switchList="switchList" @handlePreview="handlePreview" @handleClose="handleClose"></component>
</div>
</template>
<script>
......@@ -83,6 +75,7 @@ import dailyDialog from './components/dialogs/dailyDialog.vue'
import progressDialog from './components/dialogs/progressDialog.vue'
import replenishmentDialog from './components/dialogs/replenishmentDialog.vue'
import saasDialog from './components/dialogs/saasDialog.vue'
import viewDialog from './components/dialogs/viewDialog.vue'
export default {
components: {
GlSelectMenu,
......@@ -93,7 +86,8 @@ export default {
dailyDialog,
progressDialog,
replenishmentDialog,
saasDialog
saasDialog,
viewDialog
},
data() {
return {
......@@ -126,12 +120,14 @@ export default {
saPerReport: [],
scheduleReport: [],
wordReport: [],
saasReport: []
saasReport: [],
viewReport: []
},
switchList: {
// xiReport: [],
zhanReport: [{ switchType: 201, switchStatus: 'Y', actionReportType: 2 }],
orderReport: [],
viewReport: [],
saReport: [
{ switchType: 401, switchStatus: 'Y', actionReportType: 4 },
{ switchType: 402, switchStatus: 'Y', actionReportType: 4 }
......@@ -143,11 +139,12 @@ export default {
{ switchType: 504, switchStatus: 'Y', actionReportType: 5, switchText: '' }
],
scheduleReport: [{ switchType: 601, switchStatus: 'Y', actionReportType: 6 }],
wordReport: [{ switchType: 701, switchStatus: 'Y', actionReportType: 7, switchText: '' }],
wordReport: [{ switchType: 701, switchStatus: 'Y', actionReportType: 7, switchText: '' }]
},
groupCofListInput: {
wordReportValue: [],
orderReportValue: [],
viewReportValue: [],
saReportValue: [],
saPerReportValue: [],
scheduleReportValue: [],
......@@ -186,6 +183,10 @@ export default {
{
attr: 'saasReport',
type: 8
},
{
attr: 'viewReport',
type: 9
}
],
buttetinList: [
......@@ -223,6 +224,12 @@ export default {
label: '.补单通知',
storageList: 'orderReportValue',
componentName: 'replenishmentDialog'
},
{
label: '.驻店日报',
text: '预览配置',
storageList: 'viewReportValue',
componentName: 'viewDialog'
}
]
}
......@@ -295,7 +302,7 @@ export default {
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: '' }], saasReportValue: [{ name: '' }] }
this.groupCofListInput = { wordReportValue: [{ name: '' }], orderReportValue: [{ name: '' }], viewReportValue: [{ name: '' }], saReportValue: [{ name: '' }], saPerReportValue: [{ name: '' }], scheduleReportValue: [{ name: '' }], zhanReportValue: [{ name: '' }], saasReportValue: [{ name: '' }] }
})
},
// 弹窗数据回显
......@@ -328,6 +335,7 @@ export default {
saPerReportValue: [],
scheduleReportValue: [],
zhanReportValue: [],
viewReportValue: [],
saasReportValue: []
}
this.battleVisible = true
......@@ -372,6 +380,7 @@ export default {
// xiReportValue: [{ name: '' }],
wordReportValue: [{ name: '' }],
orderReportValue: [{ name: '' }],
viewReportValue: [{ name: '' }],
saReportValue: [{ name: '' }],
saPerReportValue: [{ name: '' }],
scheduleReportValue: [{ name: '' }],
......@@ -388,6 +397,7 @@ export default {
this.groupCofList = {
zhanReport: [],
orderReport: [],
viewReport: [],
saReport: [],
saPerReport: [],
scheduleReport: [],
......@@ -411,6 +421,7 @@ export default {
this.groupCofList = {
zhanReport: [],
orderReport: [],
viewReport: [],
saReport: [],
saPerReport: [],
scheduleReport: [],
......@@ -487,6 +498,7 @@ export default {
})
return true
}
console.log(this.groupCofListInput, 'this.groupCofListInput')
let isGroupEmpty = Object.keys(this.groupCofList)
.map(item => this.groupCofList[item].length)
.every(item => item == 0)
......@@ -514,7 +526,7 @@ export default {
scene: 1
}
let switchList = []
let reportParams = ['saReport', 'zhanReport', 'orderReport', 'saPerReport', 'scheduleReport', 'wordReport']
let reportParams = ['saReport', 'zhanReport', 'orderReport', 'saPerReport', 'scheduleReport', 'wordReport', 'viewReport']
reportParams.forEach(item => {
switchList.push(...this.switchList[item])
})
......@@ -659,4 +671,5 @@ export default {
.is-reverse {
transform: rotate(180deg);
}</style>
}
</style>
<template>
<GLDialog :mode="mode" title="#8.驻店日报 预览配置显示字段" :before-close="handlebattleClose" :visible.sync="isDialogVisible" @onOk="handlebattleClose" @onCancel="handlebattleClose">
<div class="popup-wrap">
<div class="left-wrap">
<div class="img-wrap">
<img src="@/assets/buttetin/view.png" />
</div>
<p class="color-3 txt-center text-14">图示效果</p>
</div>
<div class="right-wrap">
<div class="empty">
<img src="@/assets/buttetin/empty.png" />
</div>
<p class="empty-text">暂无配置项</p>
<div class="explain">
<div class="color6 weight-6 font-14">
<i class="el-icon-warning"></i>
推送机制说明
</div>
<p class="mrp">驻店人员在驻店日报中填写日报内容时,填写的当日及昨日内容,会推送消息到指定群聊。服务商老板可在生意助手打开并回复批复内容。</p>
</div>
</div>
</div>
</GLDialog>
</template>
<script>
import dialog from './dialog'
export default {
mixins: [dialog],
data() {
return {
mode: 'big'
}
},
methods: {
initData() {},
handlebattleConfirm() {
this.isDialogVisible = false
// let switchList = []
// const params = ['vehicleType', 'goodsType', 'proceedsType', 'verbalType']
// params.forEach(data => {
// this[data].switchStatus = this[data].switchStatus ? 'Y' : 'N'
// switchList.push(this[data])
// })
// this.$emit('handlePreview',{key:'saPerReport',data:switchList})
}
}
}
</script>
<style lang="scss" scoped>
.popup-wrap {
display: flex;
padding: 0 72px;
.img-wrap {
width: 250px;
height: 560px;
margin-bottom: 14px;
img {
width: 100%;
height: 100%;
}
}
.right-wrap {
display: 1;
position: relative;
width: 100%;
margin-top: 12px;
/deep/.el-form-item {
margin-bottom: 0px;
}
.item-line {
margin-bottom: 20px;
}
.empty {
width: 420px;
height: 260px;
position: absolute;
top: 35%;
left: 50%;
transform: translate(-50%, -50%);
img {
width: 100%;
height: 100%;
}
}
.empty-text {
font-size: 16px;
color: #666666;
line-height: 20px;
position: absolute;
top: 45%;
left: 50%;
transform: translate(-50%, -50%);
}
.explain {
width: 486px;
background: #f4f6fc;
padding: 16px;
margin-left: 70px;
box-sizing: border-box;
position: absolute;
bottom: 30px;
.el-icon-warning {
width: 16px;
height: 16px;
margin-right: 4px;
}
.mrp {
margin: 8px 0 0 20px;
line-height: 22px;
}
}
}
.warn {
font-size: 12px;
color: #999999;
margin-left: 154px;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!