Commit 3a3b37bd by 李伟康

```

feat(strategy): 完善策略中心功能模块

- 移除多余的beforeSearchFn属性传递
- 添加岗位类型列表注入和计算属性
- 实现停止展业对话框组件
- 优化员工概览界面布局和数据展示
- 完善策略详情页面内容展示
- 调整策略列表项显示逻辑
- 修复样式问题和代码结构优化
```
1 parent 38e00d88
Showing 25 changed files with 1092 additions and 82 deletions
No preview for this file type
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:get-list-api="getListApi" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
:has-num="false" :has-num="false"
:layout="'total, prev, pager, next'" :layout="'total, prev, pager, next'"
:pagerCount="5" :pagerCount="5"
......
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
:search-form="searchFormSearch" :search-form="searchFormSearch"
:table-params="tableParams" :table-params="tableParams"
:get-list-api="getListApi" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
:has-num="false" :has-num="false"
:layout="'total, prev, pager, next'" :layout="'total, prev, pager, next'"
:pagerCount="5" :pagerCount="5"
@setTableFinishFun="setTableFinishFun" @setTableFinishFun="setTableFinishFun"
@selectionTable="selectionTable" @selectionTable="selectionTable"
:before-search-fn="beforeSearchFn"
> >
</d2-table> </d2-table>
</div> </div>
...@@ -85,9 +85,14 @@ import multipleMixin from "./multipleMixin"; ...@@ -85,9 +85,14 @@ import multipleMixin from "./multipleMixin";
export default { export default {
name: "MultipleStaff", name: "MultipleStaff",
mixins: [multipleMixin], mixins: [multipleMixin],
inject: ['GET_POSITION_TYPE_LIST'],
mounted () { mounted () {
}, },
computed: {
positionTypeList () {
return this.GET_POSITION_TYPE_LIST()
}
},
data () { data () {
return { return {
dialogConfig: { dialogConfig: {
...@@ -124,7 +129,15 @@ export default { ...@@ -124,7 +129,15 @@ export default {
} }
}, },
methods: { methods: {
beforeSearchFn () {
return new Promise((resolve) => {
let { positionTypeList } = this
this.searchFormSearch = {
positionTypeList
}
resolve()
})
},
} }
} }
</script> </script>
......
const STRATEGYTYPEOPTIONS = [ const STRATEGYTYPEOPTIONS = [
{ label: '学习', value: 0 }, { label: '学习', value: 0 },
{ label: '优秀案例分享', value: 1 }, { label: '优秀案例分享', value: 1 },
...@@ -9,13 +7,15 @@ const STRATEGYTYPEOPTIONS = [ ...@@ -9,13 +7,15 @@ const STRATEGYTYPEOPTIONS = [
{ label: '强力促销', value: 5 }, { label: '强力促销', value: 5 },
{ label: '最终盘点与低客单产品购入', value: 6 }, { label: '最终盘点与低客单产品购入', value: 6 },
] ]
/**
*positionTypeList: 0:驻店,6:飞行督导,9:2.1区域运营
*/
const STRATEGY_FORM_0 = [ const STRATEGY_FORM_0 = [
{ {
label: '标题', label: '标题',
type: 'input', type: 'input',
key: 'title', key: 'title',
maxLength: 20, maxLength: 20,
key: 'title',
}, },
{ {
label: '学习人员', label: '学习人员',
...@@ -23,6 +23,7 @@ const STRATEGY_FORM_0 = [ ...@@ -23,6 +23,7 @@ const STRATEGY_FORM_0 = [
btnText: '选择人员', btnText: '选择人员',
componentName: 'staffTag', componentName: 'staffTag',
key: 'staffList', key: 'staffList',
positionTypeList: [0]
}, },
{ {
label: '学习内容', label: '学习内容',
...@@ -52,7 +53,6 @@ const STRATEGY_FORM_1 = [ ...@@ -52,7 +53,6 @@ const STRATEGY_FORM_1 = [
type: 'input', type: 'input',
key: 'title', key: 'title',
maxLength: 20, maxLength: 20,
key: 'title'
}, },
{ {
label: '学习人员', label: '学习人员',
...@@ -60,7 +60,7 @@ const STRATEGY_FORM_1 = [ ...@@ -60,7 +60,7 @@ const STRATEGY_FORM_1 = [
btnText: '选择人员', btnText: '选择人员',
componentName: 'staffTag', componentName: 'staffTag',
key: 'staffList', key: 'staffList',
positionTypeList: [0]
}, },
{ {
label: '学习内容', label: '学习内容',
...@@ -95,7 +95,8 @@ const STRATEGY_FORM_2456 = [ ...@@ -95,7 +95,8 @@ const STRATEGY_FORM_2456 = [
hide: (val) => { hide: (val) => {
let { strategyType } = val let { strategyType } = val
return [5, 6].includes(strategyType) return [5, 6].includes(strategyType)
} },
positionTypeList: [0,6,9]
}, },
{ {
label: '执行周期', label: '执行周期',
...@@ -116,12 +117,10 @@ const STRATEGY_FORM_3 = [ ...@@ -116,12 +117,10 @@ const STRATEGY_FORM_3 = [
type: 'input', type: 'input',
key: 'title', key: 'title',
maxLength: 20, maxLength: 20,
key: 'title'
}, },
{ {
label: '副标题', label: '副标题',
type: 'input', type: 'input',
key: 'title',
maxLength: 200, maxLength: 200,
key: 'subTitle' key: 'subTitle'
}, },
...@@ -148,7 +147,8 @@ const STRATEGY_FORM_3 = [ ...@@ -148,7 +147,8 @@ const STRATEGY_FORM_3 = [
hide: (val) => { hide: (val) => {
let { handlerType } = val let { handlerType } = val
return !handlerType.includes(0) return !handlerType.includes(0)
} },
positionTypeList: [9]
}, },
{ {
label: '驻店人员', label: '驻店人员',
...@@ -159,7 +159,8 @@ const STRATEGY_FORM_3 = [ ...@@ -159,7 +159,8 @@ const STRATEGY_FORM_3 = [
hide: (val) => { hide: (val) => {
let { handlerType } = val let { handlerType } = val
return !handlerType.includes(1) return !handlerType.includes(1)
} },
positionTypeList: [0]
}, },
{ {
label: '执行时间', label: '执行时间',
...@@ -184,31 +185,6 @@ const STRATEGY_FORM_3 = [ ...@@ -184,31 +185,6 @@ const STRATEGY_FORM_3 = [
maxLength: 200 maxLength: 200
} }
] ]
const STRATEGY_0 = {
title: '学习',
dateKey: '',
contentObject: [
{
label: '学习人员',
value: '叶雪、谢万新、马小敏、王洪、李等等、的角度讲',
className: 'text-hide'
},
{
label: '学习内容',
value: '《安心包销售话术》《如何提升转化率》',
className: 'two-line-ellipsis'
},
{
label: '执行周期',
value: '2025-10-01至2025-12-30'
},
{
label: '策略说明',
tooltip: true,
value: '安排课程学习,进一步跟进驻店人员学习情况及业务情况。'
}
]
}
const TITLE_RULES = [{ required: true, message: '请输入标题', trigger: 'blur' }] const TITLE_RULES = [{ required: true, message: '请输入标题', trigger: 'blur' }]
const STAFF_LIST_RULES = { required: true, message: '请选择学习人员' } const STAFF_LIST_RULES = { required: true, message: '请选择学习人员' }
const STUDY_LIST_RULES = { required: true, message: '请选择学习内容' } const STUDY_LIST_RULES = { required: true, message: '请选择学习内容' }
...@@ -251,7 +227,6 @@ export { ...@@ -251,7 +227,6 @@ export {
STRATEGY_FORM_1, STRATEGY_FORM_1,
STRATEGY_FORM_2456, STRATEGY_FORM_2456,
STRATEGY_FORM_3, STRATEGY_FORM_3,
STRATEGY_0,
STRATEGY_FORM_RULES_0, STRATEGY_FORM_RULES_0,
STRATEGY_FORM_RULES_1, STRATEGY_FORM_RULES_1,
STRATEGY_FORM_RULES_2456, STRATEGY_FORM_RULES_2456,
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
> >
<el-form-item <el-form-item
label="执行策略:" label="执行策略:"
required
prop="strategyType" prop="strategyType"
> >
<el-select <el-select
...@@ -195,7 +194,7 @@ import { ...@@ -195,7 +194,7 @@ import {
STRATEGY_FORM_RULES_1, STRATEGY_FORM_RULES_1,
STRATEGY_FORM_RULES_2456, STRATEGY_FORM_RULES_2456,
STRATEGY_FORM_RULES_3 STRATEGY_FORM_RULES_3
} from '../contant' } from './contant'
import { import {
afterPickerOptions afterPickerOptions
} from "@/common/format" } from "@/common/format"
...@@ -266,7 +265,7 @@ export default { ...@@ -266,7 +265,7 @@ export default {
courseTagVisible: false, courseTagVisible: false,
recordingTagVisible: false, recordingTagVisible: false,
viewKey: Date.now(), viewKey: Date.now(),
positionTypeList: []
} }
}, },
computed: { computed: {
...@@ -386,6 +385,11 @@ export default { ...@@ -386,6 +385,11 @@ export default {
deep: true deep: true
} }
}, },
provide () {
return {
GET_POSITION_TYPE_LIST: () => this.positionTypeList,
}
},
mounted () { mounted () {
}, },
methods: { methods: {
...@@ -416,6 +420,7 @@ export default { ...@@ -416,6 +420,7 @@ export default {
}, },
openMultipleTag (item) { openMultipleTag (item) {
let { componentName } = item let { componentName } = item
if (item.positionTypeList) this.positionTypeList = item.positionTypeList
this[`${componentName}Visible`] = true this[`${componentName}Visible`] = true
}, },
handleTextBoxChange (val, item) { handleTextBoxChange (val, item) {
...@@ -533,15 +538,16 @@ export default { ...@@ -533,15 +538,16 @@ export default {
#div-demo { #div-demo {
width: 100%; width: 100%;
} }
.is-error{ .is-error {
#div-demo { #div-demo {
.w-e-toolbar,.w-e-text-container{ .w-e-toolbar,
border-color: #F56C6C !important; .w-e-text-container {
border-color: #f56c6c !important;
} }
.w-e-toolbar{ .w-e-toolbar {
border-bottom-color: #eee !important; border-bottom-color: #eee !important;
} }
} }
} }
.date-range { .date-range {
width: 336px; width: 336px;
......
<template>
<baseDialog
:is-show.sync="dialogShow"
:dialog-config="dialogConfig.config"
class="detail-content"
@handleClick="submit"
>
<el-form
ref="form"
class="form"
label-width="120px"
size="small"
:rules="formRules"
:model="formData"
>
<el-form-item
label="停止展业日期:"
prop="date"
>
<el-date-picker
v-model="formData.date"
type="date"
placeholder="请选择停止展业日期"
>
</el-date-picker>
</el-form-item>
</el-form>
</basedialog>
</template>
<script>
import {
getStrategyStaffList,
} from "@api/earlyWarningManager"
import { Validator } from "@/common/validator"
export default {
name: "AddStaff",
props: {
visible: {
type: Boolean,
default: false
},
},
computed: {
dialogShow: {
get () {
return this.visible
},
set (val) {
this.close()
}
},
},
mounted () {
},
data () {
return {
formData: {
date: '',
},
formRules: {
date: [{ required: true, message: '请选择停止展业日期', trigger: 'blur' }],
},
dialogConfig: {
config: {
title: "停止展业",
width: "640px"
}
},
}
},
methods: {
close () {
this.formData = this.$options.data.call(this).formData
this.$refs?.form?.resetFields()
this.$emit('dialogClose')
},
submit () {
this.$refs.form.validate(async (valid) => {
if (valid) {
this.close()
}
})
}
}
}
</script>
<style lang="scss" scoped>
.flex {
display: flex;
align-items: center;
}
::v-deep.el-dialog__wrapper {
overflow: hidden !important;
.el-dialog {
margin: 50vh auto 0 !important;
transform: translateY(-50%);
.el-dialog__body {
padding: 0;
// padding-bottom: 24px;
// border-bottom: 1px solid #e6e6e6;
}
.el-dialog__footer {
margin-top: auto;
border-top: 1px solid #e5e5e5;
padding: 15px 20px 15px;
}
.dialog-footer {
border-top: none;
padding: 0;
}
}
}
.detail-content {
.form {
padding: 52px 42px 34px;
.el-date-editor{
width: 100%;
}
}
}
</style>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
type="primary" type="primary"
class="stop" class="stop"
size="small" size="small"
@click="stopBusinessVisible" @click="openStopBusinessDialog"
>停止展业</el-button> >停止展业</el-button>
</div> </div>
</div> </div>
...@@ -30,14 +30,20 @@ ...@@ -30,14 +30,20 @@
</div> </div>
</div> </div>
</scroll-x-view> </scroll-x-view>
<stop-business
:visible.sync="stopBusinessVisible"
@dialogClose="stopBusinessVisible = false"
></stop-business>
</div> </div>
</template> </template>
<script> <script>
import ScrollXView from '../ScrollXView.vue'; import ScrollXView from '../ScrollXView.vue';
import StopBusiness from './StopBusiness.vue';
export default { export default {
components: { components: {
ScrollXView ScrollXView,
StopBusiness
}, },
name: 'BusinessOverview', name: 'BusinessOverview',
data () { data () {
...@@ -73,7 +79,9 @@ export default { ...@@ -73,7 +79,9 @@ export default {
}, },
methods: { methods: {
openStopBusinessDialog () {
this.stopBusinessVisible = true
}
} }
}; };
</script> </script>
......
<template>
<baseDialog
:is-show.sync="dialogShow"
:dialog-config="dialogConfig.config"
class="detail-content"
@handleClick="submit"
:config="config"
>
<div class="content">
</div>
</basedialog>
</template>
<script>
import {
getStrategyStaffList,
} from "@api/earlyWarningManager"
export default {
name: "HistoryTarget",
props: {
visible: {
type: Boolean,
default: false
},
},
computed: {
dialogShow: {
get () {
return this.visible
},
set (val) {
this.close()
}
},
},
mounted () {
},
data () {
return {
config: {
isShowFooter: true,
cancel_name: "返回",
hideConfirmBtn: true
},
dialogConfig: {
config: {
title: "历史人员记录",
width: "600px"
}
},
}
},
methods: {
close () {
this.$emit('dialogClose')
},
}
}
</script>
<style lang="scss" scoped>
.flex {
display: flex;
align-items: center;
}
::v-deep.el-dialog__wrapper {
overflow: hidden !important;
.el-dialog {
margin: 50vh auto 0 !important;
transform: translateY(-50%);
.el-dialog__body {
padding: 0;
// padding-bottom: 24px;
// border-bottom: 1px solid #e6e6e6;
}
.el-dialog__footer {
margin-top: auto;
border-top: 1px solid #e5e5e5;
padding: 15px 20px 15px;
}
.dialog-footer {
border-top: none;
padding: 0;
}
}
}
.detail-content {
.content {
display: flex;
height: 592px;
box-sizing: border-box;
padding: 20px;
}
}
</style>
<template>
<div class="overview-box">
<template v-for="(item,index) in overviewList">
<div
:class="['overview-item',{'clear-border':index == overviewList.length - 1}]"
:key="index"
>
<div class="title flex">
{{ item.title }}
<el-button
type="text"
class="target"
@click="handleTargetConfig(item)"
>历史兜底目标</el-button>
</div>
<div class="content flex">
<template v-for="(i,idx) in item.list">
<div
class="item"
:key="idx"
:style="{width: `calc(100% / ${item.list.length})`}"
>
<div class="label">{{ i.label }}</div>
<div class="value">{{ i.value || 123 }}</div>
<div class="sub-value">兜底目标80%</div>
</div>
</template>
</div>
</div>
</template>
<HistoryTarget
:visible.sync="historyTargetVisible"
@dialogClose="historyTargetVisible = false"
/>
</div>
</template>
<script type='text/ecmascript-6'>
import HistoryTarget from './HistoryTarget.vue';
const overviewList = [
{
title: '整车延保',
list: [
{
label: '成交数'
},
{
label: '渗透率'
},
{
label: '转化率'
}
]
},
{
title: '安心包',
list: [
{ label: '成交数' },
{ label: '渗透率' },
{ label: '转化率' }
],
},
{
title: '电池',
list: [
{ label: '成交数' },
{ label: '渗透率' },
{ label: '转化率' }
],
},
{
title: '轮胎',
list: [
{ label: '成交数' },
{ label: '渗透率' },
{ label: '转化率' }
],
}
]
export default {
name: 'OverViewList',
components: { HistoryTarget },
inject:['deepClone'],
props: {
hasEHi: {
type: Boolean,
default: false
}
},
data () {
return {
historyTargetVisible: false
}
},
computed: {
overviewList () {
let { hasEHi } = this,
list = this.deepClone(overviewList)
if (hasEHi) list.map(e => {
e.list.push({ label: '生态系数' })
})
return list
}
},
mounted () {
},
methods: {
handleTargetConfig (i) {
this.historyTargetVisible = true
}
}
}
</script>
<style scoped lang='scss'>
.flex {
display: flex;
align-items: center;
}
.overview-box {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
padding: 20px 16px;
box-sizing: border-box;
gap: 15px;
.overview-item {
padding-bottom: 15px;
border-bottom: 1px solid #e5e5e5;
.content {
.item {
.label {
color: #666666;
font-size: 12px;
line-height: 15px;
}
.value {
color: #2a58ad;
font-size: 16px;
font-weight: 500;
margin-top: 4px;
line-height: 16px;
}
.sub-value {
color: #999999;
font-size: 11px;
margin-top: 4px;
line-height: 13px;
}
}
}
}
.clear-border{
border: none;
padding-bottom: 0;
}
.title {
color: #222222;
font-size: 13px;
font-weight: 500;
margin-bottom: 14px;
line-height: 16px;
.target {
margin-left: auto;
padding: 0;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<baseDialog
:is-show.sync="dialogShow"
:dialog-config="dialogConfig.config"
class="detail-content"
@handleClick="submit"
>
<el-form
ref="form"
class="form"
label-width="120px"
size="small"
:rules="formRules"
:model="formData"
>
<el-form-item
label="人员姓名:"
prop="name"
>
<el-input
v-model="formData.name"
class="input-width"
placeholder="请输入人员姓名"
maxlength="20"
></el-input>
</el-form-item>
<el-form-item
label="手机号:"
prop="phone"
>
<el-input
v-model="formData.phone"
class="input-width"
placeholder="请输入手机号"
maxlength="11"
></el-input>
</el-form-item>
</el-form>
</basedialog>
</template>
<script>
import {
getStrategyStaffList,
} from "@api/earlyWarningManager"
import { Validator } from "@/common/validator"
export default {
name: "AddStaff",
props: {
visible: {
type: Boolean,
default: false
},
},
computed: {
dialogShow: {
get () {
return this.visible
},
set (val) {
this.close()
}
},
},
mounted () {
},
data () {
return {
formData: {
name: '',
phone: ''
},
formRules: {
name: [{ required: true, message: '请输入人员姓名', trigger: 'blur' }],
phone: [
{ required: true, message: "请输入手机号码", trigger: "blur" },
{
required: true,
validator: (rule, value, callback) => {
Validator.checkPhoneNumber(value)
? callback()
: callback(new Error("你输入的手机号码不正确,请重新输入"))
},
trigger: "blur"
}
]
},
dialogConfig: {
config: {
title: "新增驻店员工",
width: "640px"
}
},
}
},
methods: {
close () {
this.formData = this.$options.data.call(this).formData
this.$refs?.form?.resetFields()
this.$emit('dialogClose')
},
submit () {
this.$refs.form.validate(async (valid) => {
if (valid) {
this.close()
}
})
}
}
}
</script>
<style lang="scss" scoped>
.flex {
display: flex;
align-items: center;
}
::v-deep.el-dialog__wrapper {
overflow: hidden !important;
.el-dialog {
margin: 50vh auto 0 !important;
transform: translateY(-50%);
.el-dialog__body {
padding: 0;
// padding-bottom: 24px;
// border-bottom: 1px solid #e6e6e6;
}
.el-dialog__footer {
margin-top: auto;
border-top: 1px solid #e5e5e5;
padding: 15px 20px 15px;
}
.dialog-footer {
border-top: none;
padding: 0;
}
}
}
.detail-content {
.form {
padding: 52px 42px 34px;
}
}
</style>
...@@ -34,9 +34,6 @@ export default { ...@@ -34,9 +34,6 @@ export default {
this.close() this.close()
} }
}, },
count () {
return this.chooseList.length
}
}, },
mounted () { mounted () {
......
const STRATEGYTYPEOPTIONS = {
0: '学习',
1: '优秀案例分享',
2: '带教',
3: '任务下发',
4: '销售精英到店提拉',
5: '强力促销',
6: '最终盘点与低客单产品购入',
}
const STRATEGY_FORM_01 = [
{
label: '标题',
key: 'title',
},
{
label: '执行周期',
key: 'dateRange',
},
{
label: '操作人',
key: 'dateRange',
},
{
label: '操作时间',
key: 'dateRange',
},
]
const STRATEGY_FORM_2456 = [
{
label: '操作人',
key: 'dateRange',
},
{
label: '执行周期',
key: 'dateRange',
},
{
label: '执行人',
key: 'dateRange',
hide: (val) => {
let { strategyType } = val
return [5, 6].includes(strategyType)
}
},
{
label: '操作时间',
key: 'dateRange',
},
]
const STRATEGY_FORM_3 = [
{
label: '操作人',
key: 'dateRange',
},
{
label: '标题',
key: 'title',
},
{
label: '操作时间',
key: 'dateRange',
},
{
label: '副标题',
key: 'title',
class: 'bespread',
},
{
label: '执行时间',
key: 'dateRange',
},
]
export {
STRATEGYTYPEOPTIONS,
STRATEGY_FORM_01,
STRATEGY_FORM_2456,
STRATEGY_FORM_3,
}
\ No newline at end of file \ No newline at end of file
...@@ -5,16 +5,17 @@ ...@@ -5,16 +5,17 @@
</div> </div>
<div class="strategy-item-title flex"> <div class="strategy-item-title flex">
<div class="text text-hide"> <div class="text text-hide">
{{ strategyTypeObject.title }} {{ STRATEGYTYPEOPTIONS[item.strategyType]}}
</div> </div>
<div class="strategy-item-date"> <div class="strategy-item-date">
{{ item[strategyTypeObject.dateKey] }} {{ item.date }}
</div> </div>
</div> </div>
<template v-for="(i, ind) in strategyTypeObject.contentObject"> <template v-for="(i, ind) in strategyTypeObject">
<div <div
class="content" class="content"
:key="ind" :key="ind"
v-if="!i.hide || !i.hide(item)"
> >
<div class="label">{{ i.label }}:</div> <div class="label">{{ i.label }}:</div>
<div class="value-box"> <div class="value-box">
...@@ -59,7 +60,12 @@ ...@@ -59,7 +60,12 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import { STRATEGY_0 } from '../contant' import {
STRATEGYTYPEOPTIONS,
STRATEGY_01,
STRATEGY_2456,
STRATEGY_3
} from './contant'
export default { export default {
name: 'StrategyItem', name: 'StrategyItem',
props: { props: {
...@@ -79,17 +85,26 @@ export default { ...@@ -79,17 +85,26 @@ export default {
}, },
computed: { computed: {
strategyTypeObject () { strategyTypeObject () {
// return { let { strategyType } = this.item,
// 0: STRATEGY_0, list = [0, 1].includes(strategyType)
// }[this.item.taskType] ? STRATEGY_01 : [2, 4, 5, 6].includes(strategyType) ?
return STRATEGY_0 STRATEGY_2456 : {
3: STRATEGY_3
}[strategyType] || []
return [
...list,
{
label: '策略说明',
tooltip: true,
value: '安排课程学习,进一步跟进驻店人员学习情况及业务情况。'
}]
} }
}, },
data () { data () {
return { return {
size: 'small', size: 'small',
STRATEGYTYPEOPTIONS
} }
}, },
mounted () { mounted () {
......
const STRATEGYTYPEOPTIONS = {
0: '学习',
1: '优秀案例分享',
2: '带教',
3: '任务下发',
4: '销售精英到店提拉',
5: '强力促销',
6: '最终盘点与低客单产品购入',
}
const STRATEGY_01 = [
{
label: '学习人员',
value: '叶雪、谢万新、马小敏、王洪、李等等、的角度讲',
className: 'text-hide'
},
{
label: '学习内容',
value: '《安心包销售话术》《如何提升转化率》',
className: 'two-line-ellipsis'
},
{
label: '执行周期',
value: '2025-10-01至2025-12-30'
},
]
const STRATEGY_2456 = [
{
label: '执行人',
value: '飞飞飞',
hide: (val) => {
let { strategyType } = val
return [5, 6].includes(strategyType)
}
},
{
label: '执行周期',
value: '2025-10-01至2025-12-30'
},
]
const STRATEGY_3 = [
{
label: '标题',
value: '叶雪、谢万新、马小敏、王洪、李等等、的角度讲',
className: 'text-hide'
},
{
label: '处理人',
value: '《安心包销售话术》《如何提升转化率》',
className: 'two-line-ellipsis'
},
{
label: '执行时间',
value: '2025-10-01 10:10:10'
},
]
export {
STRATEGYTYPEOPTIONS,
STRATEGY_01,
STRATEGY_2456,
STRATEGY_3
}
\ No newline at end of file \ No newline at end of file
...@@ -23,7 +23,11 @@ ...@@ -23,7 +23,11 @@
</template> </template>
</el-scrollbar> </el-scrollbar>
<add-strategy :dialogVisible.sync="addStrategyVisible"></add-strategy> <add-strategy :dialogVisible.sync="addStrategyVisible"></add-strategy>
<strategy-detail :dialogVisible.sync="strategyDetailVisible" :item="currentItem"></strategy-detail> <strategy-detail
:dialogVisible.sync="strategyDetailVisible"
:item="currentItem"
@openReceptionDialog="$emit('openReceptionDialog',$event)"
></strategy-detail>
</div> </div>
</template> </template>
...@@ -40,10 +44,18 @@ export default { ...@@ -40,10 +44,18 @@ export default {
name: 'StrategyList', name: 'StrategyList',
data () { data () {
return { return {
list: new Array(10).fill({}), list: [
{ strategyType: 0 },
{ strategyType: 1 },
{ strategyType: 2 },
{ strategyType: 3 },
{ strategyType: 4 },
{ strategyType: 5 },
{ strategyType: 6 },
],
addStrategyVisible: false, addStrategyVisible: false,
strategyDetailVisible: false, strategyDetailVisible: false,
currentItem:{} currentItem: {}
} }
}, },
mounted () { mounted () {
...@@ -53,7 +65,7 @@ export default { ...@@ -53,7 +65,7 @@ export default {
this.currentItem = item this.currentItem = item
this.strategyDetailVisible = true this.strategyDetailVisible = true
}, },
refresh(){ refresh () {
//刷新列表数据 //刷新列表数据
} }
} }
......
...@@ -10,6 +10,49 @@ ...@@ -10,6 +10,49 @@
:src="`${IMG_URL}summary.webp`" :src="`${IMG_URL}summary.webp`"
class="bg" class="bg"
> >
<div class="top-view flex">
<template v-for="(i,index) in topView">
<div
class="top-view-item"
:key="index"
:style="{width: i.width}"
>
<div class="label">{{ i.label }}</div>
<div class="value">{{ i.value || 123 }}</div>
<div class="sub-value">兜底目标80%</div>
</div>
</template>
</div>
<div class="summary-box">
<div class="help flex">
帮助
<img
src="@/assets/strategy/data-info.png"
class="help-icon"
>
</div>
<template v-for="(i,index) in summaryList">
<div
:class="['summary-list flex',i.class]"
:key="index"
>
<template v-for="(j,jindex) in i.list">
<div
:key="jindex"
class="summary-item flex"
>
<div class="label flex">
{{ j.label }}
<div class="num">456%</div>
</div>
<div class="value">123</div>
<div class="sub-value">环比</div>
</div>
</template>
</div>
</template>
</div>
</div> </div>
<template v-for="(item,index) in leftWarningInfoList"> <template v-for="(item,index) in leftWarningInfoList">
<EarlyWarningTips <EarlyWarningTips
...@@ -19,7 +62,9 @@ ...@@ -19,7 +62,9 @@
</template> </template>
</div> </div>
<div class="summary-overview-item right"> <div class="summary-overview-item right">
<div class="content"></div> <div class="content">
<over-view-list hasEHi></over-view-list>
</div>
<template v-for="(item,index) in rightWarningInfoList"> <template v-for="(item,index) in rightWarningInfoList">
<EarlyWarningTips <EarlyWarningTips
:key="index" :key="index"
...@@ -33,17 +78,104 @@ ...@@ -33,17 +78,104 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import EarlyWarningTips from '../EarlyWarningTips.vue' import EarlyWarningTips from '../EarlyWarningTips.vue'
import OverViewList from '../OverViewList.vue';
import Index from '../StaffOverview/index.vue';
export default { export default {
name: 'SummaryOverview', name: 'SummaryOverview',
inject: ['IMG_URL'], inject: ['IMG_URL'],
components: { components: {
EarlyWarningTips EarlyWarningTips,
OverViewList
}, },
data () { data () {
return { return {
leftWarningInfoList: new Array(5), leftWarningInfoList: new Array(5),
rightWarningInfoList: new Array(3) rightWarningInfoList: new Array(3),
topView: [
{
label: '总产值',
value: '80%',
width: '176px'
},
{
label: '目标产值',
value: '80%',
width: '112px'
},
{
label: '达成率',
value: '80%',
width: '80px'
},
],
summaryList: [
{
list: [
{
label: '新车交付数',
value: '80%'
},
]
},
{
class: 'small',
list: [
{
label: '触客率',
value: '80%'
},
]
},
{
list: [
{
label: '触客数(售前)',
value: '80%'
},
{
label: '触客数(售后)',
value: '80%'
},
{
label: '总触客数',
value: '80%'
},
]
},
{
class: 'small',
list: [
{
label: '售前转化率',
value: '80%'
},
{
label: '售后转化率',
value: '80%'
},
{
label: '转化率',
value: '80%'
},
]
},
{
list: [
{
label: '成交数(售前)',
value: '80%'
},
{
label: '成交数(售后)',
value: '80%'
},
{
label: '总成交数',
value: '80%'
},
]
},
]
} }
}, },
mounted () { mounted () {
...@@ -80,11 +212,14 @@ export default { ...@@ -80,11 +212,14 @@ export default {
height: 459px; height: 459px;
border-radius: 8px; border-radius: 8px;
border: 1px solid transparent; border: 1px solid transparent;
box-sizing: border-box;
} }
} }
.left { .left {
width: 420px; width: 420px;
.content { .content {
width: 100%;
padding: 10px;
.bg { .bg {
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -92,6 +227,114 @@ export default { ...@@ -92,6 +227,114 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.top-view {
height: 83px;
border-radius: 8px;
background: #ffffffcc;
position: relative;
z-index: 2;
gap: 2px;
box-sizing: border-box;
padding: 14px;
&-item {
.label {
color: #666666;
font-size: 13px;
line-height: 16px;
}
.value {
color: #2a58ad;
font-size: 18px;
font-weight: 600;
margin-top: 4px;
line-height: 18px;
}
.sub-value {
color: #999999;
font-size: 11px;
margin-top: 4px;
line-height: 13px;
}
}
}
.summary-box {
position: relative;
height: calc(100% - 91px);
margin-top: 8px;
box-sizing: border-box;
padding: 12px 35px 12px 13px;
z-index: 9;
.help {
position: absolute;
top: 12px;
right: 16px;
height: 20px;
border-radius: 4px;
background: #eef2f9;
padding: 0 4px;
color: #999999;
font-size: 12px;
cursor: pointer;
&-icon {
width: 17px;
height: 17px;
margin-left: 2px;
}
}
.summary-list {
width: 100%;
justify-content: space-between;
height: 68px;
.summary-item {
width: 112px;
height: 100%;
flex-direction: column;
justify-content: center;
.label {
color: #666666;
font-size: 12px;
.num {
display: none;
}
}
.value {
color: #2a58ad;
font-size: 15px;
font-weight: 500;
margin-top: 4px;
}
.sub-value {
color: #999999;
font-size: 11px;
margin-top: 4px;
}
}
}
.small {
height: 54px;
margin-bottom: 6px;
.summary-item {
width: 95px;
.label {
font-size: 10px;
.num {
display: block;
color: #2a58ad;
font-size: 11px;
font-weight: 500;
margin-left: 4px;
}
}
.value {
display: none;
}
.sub-value {
font-size: 10px;
}
}
}
}
} }
} }
.right { .right {
......
...@@ -7,8 +7,25 @@ ...@@ -7,8 +7,25 @@
<staff-overview ref="staffOverview"></staff-overview> <staff-overview ref="staffOverview"></staff-overview>
</el-scrollbar> </el-scrollbar>
<div class="right"> <div class="right">
<strategy-list></strategy-list> <strategy-list @openReceptionDialog="openReceptionDialog"></strategy-list>
</div> </div>
<quality-detail
:is-quality-visible="isQualityVisible"
v-if="isQualityVisible"
:currentNum="currentNum"
:qualityDetailList="qualityDetailList"
@closeDialog="closeReceptionDialog"
ref="qualityDetail"
></quality-detail>
<new-quality-detail
:is-quality-visible="isNewQualityVisible"
v-if="isNewQualityVisible"
:currentNum="currentNum"
:qualityDetailList="qualityDetailList"
@closeDialog="closeReceptionDialog"
ref="newQualityDetail"
></new-quality-detail>
</div> </div>
</template> </template>
...@@ -19,14 +36,17 @@ import BusinessOverview from './components/BusinessOverview/index.vue'; ...@@ -19,14 +36,17 @@ import BusinessOverview from './components/BusinessOverview/index.vue';
import SummaryOverview from './components/SummaryOverview/index.vue'; import SummaryOverview from './components/SummaryOverview/index.vue';
import StaffOverview from './components/StaffOverview/index.vue'; import StaffOverview from './components/StaffOverview/index.vue';
import { deepClone } from "@/common/util" import { deepClone } from "@/common/util"
import qualityDetail from '@/views/residentManage/components/qualityDetail'
import newQualityDetail from '@/views/residentManage/components/newQualityDetail'
export default { export default {
components: { components: {
StrategyList, StrategyList,
StoreSignboardInfo, StoreSignboardInfo,
BusinessOverview, BusinessOverview,
SummaryOverview, SummaryOverview,
StaffOverview StaffOverview,
qualityDetail,
newQualityDetail
}, },
name: 'storeSignboard', name: 'storeSignboard',
...@@ -39,6 +59,10 @@ export default { ...@@ -39,6 +59,10 @@ export default {
}, },
data () { data () {
return { return {
isNewQualityVisible: false,
isQualityVisible: false,
qualityDetailList: [],
currentNum: 0,
merchantInfo: { merchantInfo: {
merchantName: 'AA', merchantName: 'AA',
merchantId: 123 merchantId: 123
...@@ -46,18 +70,50 @@ export default { ...@@ -46,18 +70,50 @@ export default {
IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/storeSignboard/' IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/storeSignboard/'
} }
}, },
// 在beforeDestroy钩子中移除事件监听
beforeDestroy () {
window.removeEventListener('popstate', this.preventBack)
Object.keys(this.$refs).map(key => {
let ref = this.$refs[key]
if (Array.isArray(ref)) ref = ref[0]
ref.onPageHide && ref.onPageHide()
})
},
// 在你的Vue组件的mounted钩子中添加事件监听
mounted () { mounted () {
setTimeout(()=>{ history.pushState(null, null, document.URL)
this.merchantInfo = { window.addEventListener('popstate', this.preventBack)
merchantName: 'BB',
merchantId: 456
}
},5e3)
}, },
methods: { methods: {
preventBack () {
if (this.isQualityVisible || this.isNewQualityVisible) {
this.closeReceptionDialog()
history.pushState(null, null, document.URL)
return
}
this.$router.go(-1)
},
requireInterface (e) { requireInterface (e) {
console.log('请求接口', '参数:', e) console.log('请求接口', '参数:', e)
} },
openReceptionDialog ({ list, row, currentNum }) {
this.currentNum = currentNum
this.qualityDetailList = list
if (row.checkHistoryFlag == 0) {
this.isNewQualityVisible = true
} else {
this.isQualityVisible = true
}
},
closeReceptionDialog () {
if (this.$refs.qualityDetail) this.$refs.qualityDetail.onPageHide()
if (this.$refs.newQualityDetail) {
this.$refs.newQualityDetail.onPause()
this.$refs.newQualityDetail.onPageHide()
}
this.isQualityVisible = false
this.isNewQualityVisible = false
},
} }
} }
</script> </script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!