Commit 811cd57c by 李伟康

```

feat(strategy): 新增驻店看板功能模块

- 添加默认头像和错误图片资源文件
- 重构策略中心驻店看板组件结构,将多个课程组件移至AddStrategy子目录
- 修复mixin文件命名错误,统一使用multipleMixin名称
- 调整AddStrategy组件路径并修正常量导入路径
- 为富文本编辑器添加错误状态样式支持
- 重新组织业务概览组件,提取水平滚动视图组件
- 新增预警提示组件和员工概览历史记录组件
- 移除原有静态员工概览内容,为后续功能扩展做准备
```
1 parent f4c06e68
Showing 20 changed files with 758 additions and 373 deletions
...@@ -160,7 +160,7 @@ import { ...@@ -160,7 +160,7 @@ import {
courseStatusOpt, courseStatusOpt,
courseStatusOptMap courseStatusOptMap
} from "@/common/constants.js" } from "@/common/constants.js"
import multipleMinxin from "./multipleMinxin"; import multipleMixin from "./multipleMixin";
import NP from 'number-precision' import NP from 'number-precision'
const tableColumns = [ const tableColumns = [
{ {
...@@ -188,7 +188,7 @@ const tableColumns = [ ...@@ -188,7 +188,7 @@ const tableColumns = [
] ]
export default { export default {
name: "MultipleCourse", name: "MultipleCourse",
mixins: [multipleMinxin], mixins: [multipleMixin],
computed: { computed: {
totalDuration () { totalDuration () {
return this.chooseList.reduce((total, item) => { return this.chooseList.reduce((total, item) => {
......
...@@ -88,10 +88,10 @@ ...@@ -88,10 +88,10 @@
import { import {
getRecordPageListByCondition, getRecordPageListByCondition,
} from '@/api/earlyWarningManager' } from '@/api/earlyWarningManager'
import multipleMinxin from "./multipleMinxin"; import multipleMixin from "./multipleMixin";
export default { export default {
name: "MultipleRecording", name: "MultipleRecording",
mixins: [multipleMinxin], mixins: [multipleMixin],
mounted () { mounted () {
}, },
data () { data () {
......
...@@ -80,11 +80,11 @@ ...@@ -80,11 +80,11 @@
import { import {
getStrategyStaffList, getStrategyStaffList,
} from "@api/earlyWarningManager" } from "@api/earlyWarningManager"
import multipleMinxin from "./multipleMinxin"; import multipleMixin from "./multipleMixin";
export default { export default {
name: "MultipleStaff", name: "MultipleStaff",
mixins: [multipleMinxin], mixins: [multipleMixin],
mounted () { mounted () {
}, },
......
...@@ -195,7 +195,7 @@ import { ...@@ -195,7 +195,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"
...@@ -533,6 +533,16 @@ export default { ...@@ -533,6 +533,16 @@ export default {
#div-demo { #div-demo {
width: 100%; width: 100%;
} }
.is-error{
#div-demo {
.w-e-toolbar,.w-e-text-container{
border-color: #F56C6C !important;
}
.w-e-toolbar{
border-bottom-color: #eee !important;
}
}
}
.date-range { .date-range {
width: 336px; width: 336px;
} }
......
<template>
<div class="business-overview">
<div class="business-overview-title">
展业概况
<div :class="['business-overview-status',{'normal':businessOverviewDetail.status == 0}]">{{ businessOverviewText }}</div>
<div class="business-overview-total flex">
累计展业
<div class="num">123</div>
天
<el-button
plain
type="primary"
class="stop"
size="small"
>停止展业</el-button>
</div>
</div>
<div class="timeline-content">
<div
class="left-mask mask"
v-show="!isAtLeftEnd"
>
<div
class="btn flex"
@click="leftScroll"
>
<i class="el-icon-arrow-left"></i>
</div>
</div>
<div
class="right-mask mask"
v-show="!isAtRightEnd"
>
<div
class="btn flex"
@click="rightScroll"
>
<i class="el-icon-arrow-left"></i>
</div>
</div>
<el-scrollbar
class="timeline-scrollbar"
ref="timelineScrollbar"
>
<div class="timeline">
<div
class="timeline-item"
v-for="(item, index) in timelineItems"
:key="index"
>
<div class="timeline-item-arc"></div>
<div class="timeline-item-line"></div>
<div class="timeline-item-date">{{ item.date }}</div>
<div class="timeline-item-content">{{ item.content }}</div>
</div>
</div>
</el-scrollbar>
</div>
</div>
</template>
<script>
export default {
name: 'BusinessOverview',
data () {
return {
timelineItems: [
{ date: '2025-02-39', content: '安心包产品上架' },
{ date: '2025-04-02', content: '轮胎产品上架' },
{ date: '2025-04-08', content: '电池产品上架' },
{ date: '2025-06-02', content: '展胎风险' },
{ date: '2025-09-02', content: '停止展业' },
{ date: '2025-12-24', content: '恢复展业' },
{ date: '2025-09-02', content: '停止展业' },
{ date: '2025-02-39', content: '安心包产品上架' },
{ date: '2025-04-02', content: '轮胎产品上架' },
{ date: '2025-04-08', content: '电池产品上架' },
{ date: '2025-06-02', content: '展胎风险' },
{ date: '2025-09-02', content: '停止展业' },
{ date: '2025-12-24', content: '恢复展业' },
{ date: '2025-09-02', content: '停止展业' }
],
businessOverviewDetail: {
status: 0
},
isAtLeftEnd: true, // 初始在最左侧
isAtRightEnd: false // 初始不在最右侧
};
},
computed: {
businessOverviewText () {
let { status } = this.businessOverviewDetail
return status == 0 ? '展业中' : '停止展业'
}
},
mounted () {
this.$nextTick(() => {
this.checkScrollPosition();
const scrollbar = this.$refs.timelineScrollbar;
if (scrollbar && scrollbar.wrap) {
scrollbar.wrap.addEventListener('scroll', this.handleScroll);
}
})
},
beforeDestroy () {
const scrollbar = this.$refs.timelineScrollbar;
if (scrollbar && scrollbar.wrap) {
scrollbar.wrap.removeEventListener('scroll', this.handleScroll);
}
},
methods: {
// 检查当前滚动位置
checkScrollPosition () {
const scrollbar = this.$refs.timelineScrollbar;
if (!scrollbar || !scrollbar.wrap) return;
const { scrollLeft, scrollWidth, clientWidth } = scrollbar.wrap;
const maxScroll = scrollWidth - clientWidth;
this.isAtLeftEnd = scrollLeft <= 0;
this.isAtRightEnd = scrollLeft >= maxScroll - 1; // 允许1px误差
},
// 滚动事件处理
handleScroll () {
this.checkScrollPosition();
},
leftScroll () {
const scrollbar = this.$refs.timelineScrollbar;
if (scrollbar && scrollbar.wrap) {
scrollbar.wrap.scrollBy({ left: -400, behavior: 'smooth' });
}
this.$nextTick(this.checkScrollPosition);
},
rightScroll () {
const scrollbar = this.$refs.timelineScrollbar;
if (scrollbar && scrollbar.wrap) {
scrollbar.wrap.scrollBy({ left: 400, behavior: 'smooth' });
}
this.$nextTick(this.checkScrollPosition);
}
}
};
</script>
<style scoped lang='scss'>
.flex {
display: flex;
align-items: center;
}
.business-overview {
padding: 0 20px;
border-bottom: 1px solid #e5e5e5;
&-title {
height: 50px;
color: #333333;
font-size: 16px;
font-weight: 500;
display: flex;
align-items: center;
}
&-status {
color: #999999;
font-size: 14px;
padding: 0 8px;
height: 23px;
border-radius: 2px;
background: #9999991a;
line-height: 23px;
margin-left: 8px;
font-weight: 400;
}
.normal {
color: #43cf7c;
background: #43cf7c1a;
}
&-total {
margin-left: auto;
font-size: 14px;
font-weight: 400;
.num {
color: #2a58ad;
font-weight: 500;
margin: 0 2px;
}
.stop {
margin-left: 8px;
border-color: transparent;
}
}
.timeline-content {
width: 100%;
position: relative;
.mask {
// opacity: 0;
width: 72px;
height: 87px;
background: linear-gradient(
90deg,
#ffffff 0%,
#ffffffe6 51%,
#ffffff00 100%
);
position: absolute;
z-index: 3;
transition: all .15s;
.btn {
position: absolute;
top: 33.5px;
width: 32px;
height: 32px;
background: #ffffff;
box-shadow: 0 0 4px 0 #0000001a;
border-radius: 50%;
cursor: pointer;
justify-content: center;
.el-icon-arrow-left{
color:#222;
font-weight: 700;
font-size: 14px;
}
}
}
.left-mask {
top: 0;
left: 0;
.btn {
left: 20px;
}
}
.right-mask {
top: 0;
right: 0;
transform: scaleX(-1);
.btn {
right: 20px;
}
}
&:hover{
.mask {
opacity: 1;
}
}
}
.timeline-scrollbar {
width: 100%;
.timeline {
width: 100%;
display: flex;
// gap: 0 33px;
&-item {
flex-shrink: 0;
display: flex;
flex-direction: column;
align-items: center;
color: #333333;
font-size: 13px;
padding: 30px 16.5px 20px;
position: relative;
&-date {
color: #999ea8;
font-size: 14px;
font-weight: 500;
margin-bottom: 4px;
}
&-line {
position: absolute;
top: 16px;
left: 0;
width: 100%;
height: 1.5px;
background-color: #d4deef;
}
&-arc {
position: absolute;
top: 4px;
left: 50%;
transform: translateX(-50%);
width: 24px;
height: 24px;
background-color: #fff;
z-index: 2;
&::before {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 16px;
height: 16px;
background: #2a58ad33;
border-radius: 50%;
}
&::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 8px;
height: 8px;
border: 2px solid #2a58ad;
background: #ffffff;
z-index: 2;
border-radius: 50%;
}
}
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="business-overview">
<div class="business-overview-title">
展业概况
<div :class="['business-overview-status',{'normal':businessOverviewDetail.status == 0}]">{{ businessOverviewText }}</div>
<div class="business-overview-total flex">
累计展业
<div class="num">123</div>
天
<el-button
plain
type="primary"
class="stop"
size="small"
@click="stopBusinessVisible"
>停止展业</el-button>
</div>
</div>
<scroll-x-view>
<div class="timeline">
<div
class="timeline-item"
v-for="(item, index) in timelineItems"
:key="index"
>
<div class="timeline-item-arc"></div>
<div class="timeline-item-line"></div>
<div class="timeline-item-date">{{ item.date }}</div>
<div class="timeline-item-content">{{ item.content }}</div>
</div>
</div>
</scroll-x-view>
</div>
</template>
<script>
import ScrollXView from '../ScrollXView.vue';
export default {
components: {
ScrollXView
},
name: 'BusinessOverview',
data () {
return {
stopBusinessVisible: false,
timelineItems: [
{ date: '2025-02-39', content: '安心包产品上架' },
{ date: '2025-04-02', content: '轮胎产品上架' },
{ date: '2025-04-08', content: '电池产品上架' },
{ date: '2025-06-02', content: '展胎风险' },
{ date: '2025-09-02', content: '停止展业' },
{ date: '2025-12-24', content: '恢复展业' },
{ date: '2025-09-02', content: '停止展业' },
{ date: '2025-02-39', content: '安心包产品上架' },
{ date: '2025-04-02', content: '轮胎产品上架' },
{ date: '2025-04-08', content: '电池产品上架' },
{ date: '2025-06-02', content: '展胎风险' },
{ date: '2025-09-02', content: '停止展业' },
{ date: '2025-12-24', content: '恢复展业' },
{ date: '2025-09-02', content: '停止展业' }
],
businessOverviewDetail: {
status: 0
},
};
},
computed: {
businessOverviewText () {
let { status } = this.businessOverviewDetail
return status == 0 ? '展业中' : '停止展业'
}
},
methods: {
}
};
</script>
<style scoped lang='scss'>
.flex {
display: flex;
align-items: center;
}
.business-overview {
padding: 0 20px;
border-bottom: 1px solid #e5e5e5;
&-title {
height: 50px;
color: #333333;
font-size: 16px;
font-weight: 500;
display: flex;
align-items: center;
}
&-status {
color: #999999;
font-size: 14px;
padding: 0 8px;
height: 23px;
border-radius: 2px;
background: #9999991a;
line-height: 23px;
margin-left: 8px;
font-weight: 400;
}
.normal {
color: #43cf7c;
background: #43cf7c1a;
}
&-total {
margin-left: auto;
font-size: 14px;
font-weight: 400;
.num {
color: #2a58ad;
font-weight: 500;
margin: 0 2px;
}
.stop {
margin-left: 8px;
border-color: transparent;
}
}
.timeline {
width: 100%;
display: flex;
// gap: 0 33px;
&-item {
flex-shrink: 0;
display: flex;
flex-direction: column;
align-items: center;
color: #333333;
font-size: 13px;
padding: 30px 16.5px 20px;
position: relative;
&-date {
color: #999ea8;
font-size: 14px;
font-weight: 500;
margin-bottom: 4px;
}
&-line {
position: absolute;
top: 16px;
left: 0;
width: 100%;
height: 1.5px;
background-color: #d4deef;
}
&-arc {
position: absolute;
top: 4px;
left: 50%;
transform: translateX(-50%);
width: 24px;
height: 24px;
background-color: #fff;
z-index: 2;
&::before {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 16px;
height: 16px;
background: #2a58ad33;
border-radius: 50%;
}
&::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 10px;
height: 10px;
border: 2px solid #2a58ad;
background: #ffffff;
z-index: 2;
border-radius: 50%;
box-sizing: border-box;
}
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div :class="['warning-item flex',`bg-${type}`]">
<img
:src="icon"
class="warning-icon"
>
生态系数预警:整车延保生态系数低于1.0
</div>
</template>
<script type='text/ecmascript-6'>
const type_1 = require('@/assets/strategy/icon-strategy-type01.png'),
type_2 = require('@/assets/strategy/icon-strategy-type01.png'),
type_3 = require('@/assets/strategy/icon-strategy-type01.png'),
type_4 = require('@/assets/strategy/icon-strategy-type01.png'),
type_5 = require('@/assets/strategy/icon-strategy-type01.png'),
type_6 = require('@/assets/strategy/icon-strategy-type01.png')
export default {
name: 'EarlyWarningTips',
props: {
type: {
type: Number,
default: 1
}
},
computed: {
icon () {
return {
1: type_1,
2: type_2,
3: type_3,
4: type_4,
5: type_5,
6: type_6
}[this.type]
}
},
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.flex {
display: flex;
align-items: center;
}
.warning-item {
width: 100%;
border-radius: 4px;
color: #333333;
font-size: 13px;
margin-top: 12px;
height: 30px;
background: #2c66f714;
box-sizing: border-box;
padding: 0 8px;
.warning-icon {
width: 18px;
height: 18px;
margin-right: 6px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="timeline-content">
<div
class="left-mask mask"
v-show="!isAtLeftEnd"
>
<div
class="btn flex"
@click="leftScroll"
>
<i class="el-icon-arrow-left"></i>
</div>
</div>
<div
class="right-mask mask"
v-show="!isAtRightEnd"
>
<div
class="btn flex"
@click="rightScroll"
>
<i class="el-icon-arrow-left"></i>
</div>
</div>
<el-scrollbar
class="timeline-scrollbar"
ref="timelineScrollbar"
>
<slot></slot>
</el-scrollbar>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'ScrollXView',
data () {
return {
isAtLeftEnd: true, // 初始在最左侧
isAtRightEnd: false // 初始不在最右侧
}
},
mounted () {
this.$nextTick(() => {
this.checkScrollPosition();
const scrollbar = this.$refs.timelineScrollbar;
if (scrollbar && scrollbar.wrap) {
scrollbar.wrap.addEventListener('scroll', this.handleScroll);
}
})
},
beforeDestroy () {
const scrollbar = this.$refs.timelineScrollbar;
if (scrollbar && scrollbar.wrap) {
scrollbar.wrap.removeEventListener('scroll', this.handleScroll);
}
},
methods: {
// 检查当前滚动位置
checkScrollPosition () {
const scrollbar = this.$refs.timelineScrollbar;
if (!scrollbar || !scrollbar.wrap) return;
const { scrollLeft, scrollWidth, clientWidth } = scrollbar.wrap;
const maxScroll = scrollWidth - clientWidth;
this.isAtLeftEnd = scrollLeft <= 0;
this.isAtRightEnd = scrollLeft >= maxScroll - 1; // 允许1px误差
},
// 滚动事件处理
handleScroll () {
this.checkScrollPosition();
},
leftScroll () {
const scrollbar = this.$refs.timelineScrollbar;
if (scrollbar && scrollbar.wrap) {
scrollbar.wrap.scrollBy({ left: -400, behavior: 'smooth' });
}
this.$nextTick(this.checkScrollPosition);
},
rightScroll () {
const scrollbar = this.$refs.timelineScrollbar;
if (scrollbar && scrollbar.wrap) {
scrollbar.wrap.scrollBy({ left: 400, behavior: 'smooth' });
}
this.$nextTick(this.checkScrollPosition);
}
}
}
</script>
<style scoped lang='scss'>
.flex {
display: flex;
align-items: center;
}
.timeline-content {
width: 100%;
position: relative;
.mask {
// opacity: 0;
width: 72px;
height: 100%;
background: linear-gradient(
90deg,
#ffffff 0%,
#ffffffe6 51%,
#ffffff00 100%
);
position: absolute;
z-index: 3;
transition: all 0.15s;
.btn {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 32px;
height: 32px;
background: #ffffff;
box-shadow: 0 0 4px 0 #0000001a;
border-radius: 50%;
cursor: pointer;
justify-content: center;
.el-icon-arrow-left {
color: #222;
font-weight: 700;
font-size: 14px;
}
}
}
.left-mask {
top: 0;
left: 0;
.btn {
left: 20px;
}
}
.right-mask {
top: 0;
right: 0;
transform: scaleX(-1);
.btn {
right: 20px;
}
}
&:hover {
.mask {
opacity: 1;
}
}
}
.timeline-scrollbar {
width: 100%;
}
</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"
:config="config"
>
<el-scrollbar class="content">
</el-scrollbar>
</basedialog>
</template>
<script>
import {
getStrategyStaffList,
} from "@api/earlyWarningManager"
export default {
name: "HistoryStaffList",
props: {
visible: {
type: Boolean,
default: false
},
},
computed: {
dialogShow: {
get () {
return this.visible
},
set (val) {
this.close()
}
},
count () {
return this.chooseList.length
}
},
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: 558px;
box-sizing: border-box;
padding: 20px;
}
}
</style>
...@@ -6,8 +6,47 @@ ...@@ -6,8 +6,47 @@
size="small" size="small"
type="text" type="text"
class="btn" class="btn"
@click="historyVisible = true"
>历史人员记录</el-button> >历史人员记录</el-button>
</div> </div>
<scroll-x-view>
<div class="timeline">
<div
:class="['timeline-item flex',{'active-item':index == currentIndex}]"
v-for="(item, index) in timelineItems"
:key="index"
@click="currentIndex = index"
>
<img
src="@/assets/strategy/default-avatar.png"
class="timeline-item-icon"
>
<div class="info">
<div class="timeline-item-name flex">
{{ item.date }}
<div
class="disabled-btn flex"
@click.stop="disabledStaff(item)"
>
</div>
</div>
<div :class="['timeline-item-status flex',{err:index % 2 == 0}]">
<template v-if="index % 2 != 0">
<div class="icon flex">常</div>
正常
</template>
<template v-else>
<img
src="@/assets/strategy/error.png"
class="err-icon"
>
共2项预警事项
</template>
</div>
</div>
</div>
</div>
</scroll-x-view>
<div class="staff-info flex"> <div class="staff-info flex">
<template v-for="(item,index) in formList"> <template v-for="(item,index) in formList">
<div <div
...@@ -28,37 +67,63 @@ ...@@ -28,37 +67,63 @@
> >
</div> </div>
<template v-for="(item,index) in leftWarningInfoList"> <template v-for="(item,index) in leftWarningInfoList">
<div <EarlyWarningTips
class="warning-item flex"
:key="index" :key="index"
> :data="item"
{{ index }}流量预警:周环比下降超过20% />
</div>
</template> </template>
</div> </div>
<div class="staff-overview-item right"> <div class="staff-overview-item right">
<div class="content"></div> <div class="content"></div>
<template v-for="(item,index) in rightWarningInfoList"> <template v-for="(item,index) in rightWarningInfoList">
<div <EarlyWarningTips
class="warning-item flex"
:key="index" :key="index"
> :data="item"
{{ index }}生态系数预警:整车延保生态系数低于1.0 />
</div>
</template> </template>
</div> </div>
</div> </div>
<HistoryStaffList
:visible="historyVisible"
@dialogClose="historyVisible = false"
/>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import HistoryStaffList from './HistoryStaffList.vue'
import EarlyWarningTips from '../EarlyWarningTips.vue'
import ScrollXView from '../ScrollXView.vue';
export default { export default {
name: 'StaffOverview', name: 'StaffOverview',
components: {
HistoryStaffList,
EarlyWarningTips,
ScrollXView
},
inject: ['IMG_URL'], inject: ['IMG_URL'],
data () { data () {
return { return {
timelineItems: [
{ date: '2025-02-39', content: '安心包产品上架' },
{ date: '2025-04-02', content: '轮胎产品上架' },
{ date: '2025-04-08', content: '电池产品上架' },
{ date: '2025-06-02', content: '展胎风险' },
{ date: '2025-09-02', content: '停止展业' },
{ date: '2025-12-24', content: '恢复展业' },
{ date: '2025-09-02', content: '停止展业' },
{ date: '2025-02-39', content: '安心包产品上架' },
{ date: '2025-04-02', content: '轮胎产品上架' },
{ date: '2025-04-08', content: '电池产品上架' },
{ date: '2025-06-02', content: '展胎风险' },
{ date: '2025-09-02', content: '停止展业' },
{ date: '2025-12-24', content: '恢复展业' },
{ date: '2025-09-02', content: '停止展业' }
],
currentIndex: 0,
leftWarningInfoList: new Array(5), leftWarningInfoList: new Array(5),
rightWarningInfoList: new Array(3), rightWarningInfoList: new Array(3),
historyVisible: false,
formList: [ formList: [
{ {
label: '驻店时长', label: '驻店时长',
...@@ -78,6 +143,17 @@ export default { ...@@ -78,6 +143,17 @@ export default {
mounted () { mounted () {
}, },
methods: { methods: {
disabledStaff (item) {
this.$confirm("对员工进行禁用操作后,对应的账户无法再使用;历史已产生的业务数据不受影响。", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
closeOnClickModal: false
}).then(async () => {
this.$emit('refresh')
}).catch(() => {
})
}
} }
} }
</script> </script>
...@@ -101,6 +177,71 @@ export default { ...@@ -101,6 +177,71 @@ export default {
padding: 0; padding: 0;
} }
} }
.timeline {
width: 100%;
display: flex;
&-item {
cursor: pointer;
flex-shrink: 0;
display: flex;
align-items: center;
color: #333333;
font-size: 13px;
padding: 8px 12px;
position: relative;
&-icon {
width: 48px;
height: 48px;
margin-right: 8px;
}
&-name {
color: #333333;
font-size: 14px;
margin-bottom: 6px;
.disabled-btn {
width: 14px;
height: 14px;
background: #2a58ad33;
border-radius: 50%;
margin-left: 5px;
justify-content: center;
&::after {
content: "";
width: 7.7px;
height: 2.1px;
background: #2a58ad;
display: block;
}
}
}
&-status {
color: #35c376;
font-size: 12px;
.icon {
width: 14px;
height: 14px;
justify-content: center;
color: #35c376;
font-size: 10px;
background: #35c3761a;
margin-right: 2px;
}
}
.err {
color: #f24724;
&-icon {
width: 16px;
height: 16px;
margin-right: 2px;
}
}
}
.active-item {
border-radius: 8px;
background: #f0f5ff;
overflow: hidden;
}
}
.staff-info { .staff-info {
height: 44px; height: 44px;
&-item { &-item {
...@@ -129,15 +270,6 @@ export default { ...@@ -129,15 +270,6 @@ export default {
border-radius: 8px; border-radius: 8px;
border: 1px solid transparent; border: 1px solid transparent;
} }
.warning-item {
width: 100%;
border-radius: 4px;
color: #333333;
font-size: 13px;
margin-top: 12px;
height: 30px;
background: #2c66f714;
}
} }
.left { .left {
width: 420px; width: 420px;
......
<template> <template>
<div class="storeSignboard-container"> <div class="storeSignboard-container">
<div class="calendar-box">
<!-- 时间切换和日期选择器 -->
<calendar-custom
v-model="timeRangeType"
:time-range-options="timeRangeOptions"
:date-range.sync="dateRange"
@time-range-change="handleTimeRangeChange"
@date-range-change="handleDateRangeChange"
/>
</div>
<div class="merchant-info flex"> <div class="merchant-info flex">
<div class="merchant-icon flex"> <div class="merchant-icon flex">
<img <img
...@@ -65,10 +75,12 @@ ...@@ -65,10 +75,12 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import ChangeMerchantDialog from './ChangeMerchantDialog.vue'; import ChangeMerchantDialog from './ChangeMerchantDialog.vue';
import CalendarCustom from '../../../compoments/clendarCustom.vue';
export default { export default {
name: 'StoreSignboardInfo', name: 'StoreSignboardInfo',
components: { components: {
ChangeMerchantDialog ChangeMerchantDialog,
CalendarCustom
}, },
inject: ['IMG_URL'], inject: ['IMG_URL'],
data () { data () {
...@@ -123,6 +135,18 @@ export default { ...@@ -123,6 +135,18 @@ export default {
.storeSignboard-container { .storeSignboard-container {
padding: 22px 20px 0; padding: 22px 20px 0;
border-bottom: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
position: relative;
::v-deep.calendar-box {
position: absolute;
top: 16px;
right: 20px;
.calendar-custom{
flex-direction: column;
.time-control-group{
margin: 0 0 6px;
}
}
}
.merchant-info { .merchant-info {
height: 48px; height: 48px;
margin-bottom: 6px; margin-bottom: 6px;
......
...@@ -51,14 +51,15 @@ ...@@ -51,14 +51,15 @@
type="primary" type="primary"
plain plain
class="btn-primary" class="btn-primary"
@click="$emit('toDetail',item)"
>查看详情</el-button> >查看详情</el-button>
</div> </div>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import { STRATEGY_0 } from './contant' import { STRATEGY_0 } from '../contant'
export default { export default {
name: 'StrategyItem', name: 'StrategyItem',
props: { props: {
...@@ -88,7 +89,7 @@ export default { ...@@ -88,7 +89,7 @@ export default {
data () { data () {
return { return {
size: 'small', size: 'small',
} }
}, },
mounted () { mounted () {
...@@ -101,6 +102,7 @@ export default { ...@@ -101,6 +102,7 @@ export default {
type: "warning", type: "warning",
closeOnClickModal: false closeOnClickModal: false
}).then(async () => { }).then(async () => {
this.$emit('refresh')
}).catch(() => { }).catch(() => {
}) })
} }
...@@ -150,8 +152,8 @@ export default { ...@@ -150,8 +152,8 @@ export default {
height: 16px; height: 16px;
background: #2a58ad33; background: #2a58ad33;
&::after { &::after {
width: 8px; width: 10px;
height: 8px; height: 10px;
border: 2px solid #2a58ad; border: 2px solid #2a58ad;
background: #ffffff; background: #ffffff;
border-radius: 100%; border-radius: 100%;
...@@ -160,6 +162,7 @@ export default { ...@@ -160,6 +162,7 @@ export default {
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
box-sizing: border-box;
} }
} }
&::after { &::after {
......
...@@ -3,7 +3,10 @@ ...@@ -3,7 +3,10 @@
<div class="strategy-title flex"> <div class="strategy-title flex">
策略中心 策略中心
<div class="add"> <div class="add">
<el-button type="text" @click="addStrategyVisible = true"> <i class="el-icon-plus"></i>添加策略</el-button> <el-button
type="text"
@click="addStrategyVisible = true"
> <i class="el-icon-plus"></i>添加策略</el-button>
</div> </div>
</div> </div>
<el-scrollbar class="strategy-list"> <el-scrollbar class="strategy-list">
...@@ -14,32 +17,45 @@ ...@@ -14,32 +17,45 @@
:item="i" :item="i"
:isLast="index == list.length - 1" :isLast="index == list.length - 1"
:class="[{first:index == 0},{last:index == list.length - 1}]" :class="[{first:index == 0},{last:index == list.length - 1}]"
@toDetail="toDetail"
@refresh="refresh"
></strategy-item> ></strategy-item>
</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>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import StrategyItem from './StrategyItem.vue'; import StrategyItem from './StrategyItem.vue';
import AddStrategy from './AddStrategy.vue'; import AddStrategy from '../AddStrategy/index.vue';
import StrategyDetail from '../StrategyDetail/index.vue';
export default { export default {
components: { components: {
StrategyItem, StrategyItem,
AddStrategy AddStrategy,
StrategyDetail
}, },
name: 'StrategyList', name: 'StrategyList',
data () { data () {
return { return {
list: new Array(10).fill({}), list: new Array(10).fill({}),
addStrategyVisible: false addStrategyVisible: false,
strategyDetailVisible: false,
currentItem:{}
} }
}, },
mounted () { mounted () {
}, },
methods: { methods: {
toDetail (item) {
this.currentItem = item
this.strategyDetailVisible = true
},
refresh(){
//刷新列表数据
}
} }
} }
</script> </script>
......
...@@ -12,23 +12,19 @@ ...@@ -12,23 +12,19 @@
> >
</div> </div>
<template v-for="(item,index) in leftWarningInfoList"> <template v-for="(item,index) in leftWarningInfoList">
<div <EarlyWarningTips
class="warning-item flex"
:key="index" :key="index"
> :data="item"
{{ index }}流量预警:周环比下降超过20% />
</div>
</template> </template>
</div> </div>
<div class="summary-overview-item right"> <div class="summary-overview-item right">
<div class="content"></div> <div class="content"></div>
<template v-for="(item,index) in rightWarningInfoList"> <template v-for="(item,index) in rightWarningInfoList">
<div <EarlyWarningTips
class="warning-item flex"
:key="index" :key="index"
> :data="item"
{{ index }}生态系数预警:整车延保生态系数低于1.0 />
</div>
</template> </template>
</div> </div>
</div> </div>
...@@ -36,9 +32,14 @@ ...@@ -36,9 +32,14 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import EarlyWarningTips from '../EarlyWarningTips.vue'
export default { export default {
name: 'SummaryOverview', name: 'SummaryOverview',
inject: ['IMG_URL'], inject: ['IMG_URL'],
components: {
EarlyWarningTips
},
data () { data () {
return { return {
leftWarningInfoList: new Array(5), leftWarningInfoList: new Array(5),
...@@ -80,15 +81,6 @@ export default { ...@@ -80,15 +81,6 @@ export default {
border-radius: 8px; border-radius: 8px;
border: 1px solid transparent; border: 1px solid transparent;
} }
.warning-item {
width: 100%;
border-radius: 4px;
color: #333333;
font-size: 13px;
margin-top: 12px;
height: 30px;
background: #2c66f714;
}
} }
.left { .left {
width: 420px; width: 420px;
......
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import StrategyList from './components/StrategyList.vue'; import StrategyList from './components/StrategyList/index.vue';
import StoreSignboardInfo from './components/StoreSignboardInfo.vue'; import StoreSignboardInfo from './components/StoreSignboardInfo/index.vue';
import BusinessOverview from './components/BusinessOverview.vue'; import BusinessOverview from './components/BusinessOverview/index.vue';
import SummaryOverview from './components/SummaryOverview.vue'; import SummaryOverview from './components/SummaryOverview/index.vue';
import StaffOverview from './components/StaffOverview.vue'; import StaffOverview from './components/StaffOverview/index.vue';
import { deepClone } from "@/common/util" import { deepClone } from "@/common/util"
export default { export default {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!