Commit 769cf12e by 李伟康

```

feat(d2-table): 添加分页器数量配置和当前页码传递

添加pagerCount属性用于配置分页器显示数量,默认值为7,
同时在selectionTable事件和setTableFinishFun事件中传递当前页码信息

style(public.scss): 优化el-tooltip__popper样式配置

修改el-tooltip__popper.is-dark样式的宽度设置,使用width: fit-content
替代固定width,并设置max-width为400px以适应内容长度

refactor(storeSignboard): 重构门店看板页面布局结构

将页面拆分为左右两栏布局,左侧包含门店信息、业务概览、摘要概览和员工概览组件,
右侧为策略列表组件,通过provide/inject方式共享数据和方法
```
1 parent ead531eb
...@@ -362,6 +362,7 @@ ...@@ -362,6 +362,7 @@
:page-size="page.pageSize" :page-size="page.pageSize"
:total="getListApi ? total : tableTotal" :total="getListApi ? total : tableTotal"
:layout="layout" :layout="layout"
:pager-count="pagerCount"
/> />
</div> </div>
</template> </template>
...@@ -561,6 +562,15 @@ export default { ...@@ -561,6 +562,15 @@ export default {
noDataText: { noDataText: {
type: String, type: String,
default: "暂无数据" default: "暂无数据"
},
pagerCount: {
type: Number,
default: 7
}
},
computed:{
tableRef(){
return this.$refs[this.tableParams.mutiSelectName + 'MutiTable' || 'mutiTable']
} }
}, },
...@@ -594,9 +604,8 @@ export default { ...@@ -594,9 +604,8 @@ export default {
handleSelect(val) { handleSelect(val) {
this.mutiSelectArr[this.tableParams.mutiSelectName] = val this.mutiSelectArr[this.tableParams.mutiSelectName] = val
// 多选 // 多选
this.$emit("selectionTable", val) this.$emit("selectionTable", val, this.page.currentPage)
}, },
// 清空多选 // 清空多选
clearMutiSelect() { clearMutiSelect() {
this.mutiSelectArr[this.tableParams.mutiSelectName] = [] this.mutiSelectArr[this.tableParams.mutiSelectName] = []
...@@ -742,7 +751,7 @@ export default { ...@@ -742,7 +751,7 @@ export default {
} }
this.total = res.total this.total = res.total
this.loading = false this.loading = false
this.$emit("setTableFinishFun", this.data) this.$emit("setTableFinishFun", this.data , this.page.currentPage)
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false
......
<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>
<baseDialog
:is-show.sync="dialogShow"
:dialog-config="dialogConfig.config"
class="detail-content-warn"
@handleClick="submit"
>
<el-form
class="form"
label-width="120px"
size="small"
>
<el-form-item
label="门店名称:"
required
>
<el-select
v-model="merchantId"
class="select"
>
<el-option
v-for="item in merchantList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-form>
</basedialog>
</template>
<script>
export default {
name: "ChangeMerchantDialog",
props: {
visible: {
type: Boolean,
default: false
},
},
computed: {
dialogShow: {
get () {
return this.visible
},
set (val) {
this.$emit('dialogClose')
}
},
},
watch: {
visible: {
handler (val) {
if (val) {
}
},
immediate: true,
deep: true
}
},
mounted () {
},
data () {
return {
dialogConfig: {
config: {
title: "切换门店",
width: "640px"
}
},
merchantId: '1',
merchantList: [
{ label: '门店1', value: '1' },
{
label: '门店2', value: '2'
}
]
}
},
methods: {
async submit () {
this.$emit('changeMerchant')
}
}
}
</script>
<style lang="scss" scoped>
.flex {
display: flex;
align-items: center;
}
.detail-content-warn {
::v-deep .el-dialog {
height: 256px;
.el-dialog__body {
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;
}
}
.form {
height: 89px;
padding: 37px 22px 0 0;
box-sizing: border-box;
.select {
width: 436px;
}
}
}
</style>
<template>
<baseDialog
:is-show.sync="dialogShow"
:dialog-config="dialogConfig.config"
class="detail-content"
@handleClick="submit"
:config="config"
>
<div class="content">
<div class="left">
<div class="title flex">录音列表</div>
<div class="left-content">
<div class="search-box flex">
<el-input
placeholder="搜索员工名称"
size="small"
class="search-input"
clearable
v-model="searchForm.name"
></el-input>
<el-date-picker
v-model="searchForm.time"
size="small"
type="date"
class="search-input"
placeholder="搜索接待日期"
>
</el-date-picker>
<el-button
type="primary"
size="small"
@click="handleSearch"
>查询</el-button>
<el-button
size="small"
@click="handleReset"
>重置</el-button>
</div>
<div class="table">
<d2-table
ref="multipleStaffTable"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
:has-num="false"
:layout="'total, prev, pager, next'"
:pagerCount="5"
@setTableFinishFun="setTableFinishFun"
@selectionTable="selectionTable"
>
</d2-table>
</div>
</div>
</div>
<div class="right">
<div class="title flex">
已选录音<div class="num">{{ chooseList.length }}</div>条
<el-button
class="clear"
type="text"
@click="clearChooseList"
>清空</el-button>
</div>
<div class="right-content">
<el-scrollbar class="multiple-tag-box">
<div class="multiple-tags">
<template v-for="(i,ind) in chooseList">
<el-tag
closable
:key="ind"
@close="removeStaff(i,index)"
disable-transitions
>{{ i.id }}</el-tag>
</template>
</div>
</el-scrollbar>
</div>
</div>
</div>
</basedialog>
</template>
<script>
import { getUsedCarPaymentList } from "@api/usedCarManagement"
export default {
name: "ChangeMerchantDialog",
props: {
visible: {
type: Boolean,
default: false
},
chooseData: {
type: Object,
default: () => {}
}
},
inject: ['deepClone'],
computed: {
dialogShow: {
get () {
return this.visible
},
set (val) {
this.close()
}
},
},
watch: {
visible: {
handler (val) {
if (val) {
this.pageChooseList = this.chooseData
this.handleReset()
}
},
immediate: true,
deep: true
},
},
mounted () {
},
data () {
return {
dialogConfig: {
config: {
title: "选择录音",
width: "1092px"
}
},
config: {
appendToBody: true,
isShowFooter: true,
cancel_name: "取消",
confirm_name: "确定",
},
getListApi: getUsedCarPaymentList,
searchForm: {},
searchFormSearch: {},
tableParams: {
listName: "list",
mutiSelectUniqueKey: "id",
mutiSelectName: "contentIndex",
tableColumns: [
{
label: "员工姓名",
prop: "licensePlate",
minWidth: 90
},
{
label: "接待时间",
prop: "vin",
minWidth: 90
},
{
label: "客户姓名",
prop: "licensePlate",
minWidth: 90
},
{
label: "车型",
prop: "licensePlate",
minWidth: 90
},
{
label: "接待时长",
prop: "licensePlate",
minWidth: 90
},
{
label: "质检评分/分",
prop: "licensePlate",
minWidth: 90
},
{
label: "攻防得分/分",
prop: "licensePlate",
minWidth: 90
},
]
},
pageChooseList: {},
chooseList: [],
delList: []
}
},
methods: {
getParams () {
const params = this.deepClone(this.searchForm)
return params
},
beforeSearchFn () {
return new Promise((resolve) => {
this.searchFormSearch = this.getParams()
resolve()
})
},
close () {
this.$emit('dialogClose')
},
removeStaff (i, index) {
this.delList.push(i)
this.chooseList.splice(index, 1)
this.multipleStaffTable().tableRef.toggleRowSelection(i, false)
},
async submit () {
this.$emit('choose', this.pageChooseList)
this.close()
},
handleReset () {
this.searchForm = this.$options.data.call(this).searchForm
this.multipleStaffTable().page.currentPage = 1
this.handleSearch()
},
handleSearch () {
this.multipleStaffTable().refreshTable()
},
setTableFinishFun (data, listIndex) {
this.$nextTick(() => {
let { pageChooseList, delList } = this
pageChooseList[listIndex] && pageChooseList[listIndex].map(item => {
let index = data.findIndex(i => i.id === item.id)
if (index > -1) this.multipleStaffTable().tableRef.toggleRowSelection(data[index], true)
})
if (delList.length) {
data.map(item => {
let index = delList.findIndex(i => i.id === item.id)
if (index > -1) {
this.multipleStaffTable().tableRef.toggleRowSelection(item, false)
delList.splice(index, 1)
}
})
}
})
},
selectionTable (list, listIndex) {
this.$nextTick(() => {
this.pageChooseList[listIndex] = list
let { pageChooseList } = this,
chooseList = []
Object.keys(pageChooseList).map(key => {
if (pageChooseList[key]) {
pageChooseList[key].map(item => {
chooseList.push(item)
})
}
})
this.chooseList = chooseList
})
},
multipleStaffTable () {
return this.$refs.multipleStaffTable
},
clearChooseList(){
this.delList = this.chooseList
this.pageChooseList = {}
this.multipleStaffTable().clearMutiSelect()
}
}
}
</script>
<style lang="scss" scoped>
.flex {
display: flex;
align-items: center;
}
.detail-content {
::v-deep .el-dialog {
.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;
}
}
.content {
display: flex;
height: 588px;
box-sizing: border-box;
padding: 20px;
gap: 24px;
.left,
.right {
flex-shrink: 0;
height: 100%;
border: 1px solid #e5e5e5;
box-sizing: border-box;
.title {
font-weight: 700;
color: #333333;
font-size: 16px;
height: 48px;
border-bottom: 1px solid #e5e5e5;
background: #f5f5f5;
padding: 0 16px;
.num {
margin-left: 4px;
}
.clear {
margin-left: auto;
}
}
}
.left {
width: calc(100% - 304px);
&-content {
padding: 16px;
height: calc(100% - 49px);
box-sizing: border-box;
.search-box {
margin-bottom: 20px;
.search-input {
width: 200px;
margin-right: 12px;
}
}
.table {
height: calc(100% - 52px);
::v-deep .d2-table {
height: 100%;
display: flex;
flex-direction: column;
.el-pagination {
margin-top: auto;
}
.el-table {
border-left: none;
overflow-y: auto;
&::before,
&::after {
display: none;
}
.el-table__header-wrapper,
.el-table__body-wrapper {
position: relative;
border-left: 1px solid #ebeef5;
&::after {
content: "";
position: absolute;
top: 0;
right: 1px;
width: 1px;
height: 100%;
background: #ebeef5;
}
}
.el-table__header-wrapper {
.cell {
padding: 0 5px;
}
}
}
.el-table-column--selection {
.cell {
padding: 0;
}
}
}
}
}
}
.right {
width: 284px;
.multiple-tag-box {
width: 100%;
height: 499px;
box-sizing: border-box;
.multiple-tags {
padding: 16px;
display: flex;
flex-wrap: wrap;
gap: 16px;
}
}
}
}
}
</style>
<template>
<baseDialog
:is-show.sync="dialogShow"
:dialog-config="dialogConfig.config"
class="detail-content"
@handleClick="submit"
:config="config"
>
<div class="content">
<div class="left">
<div class="title flex">人员列表</div>
<div class="left-content">
<div class="search-box flex">
<el-input
placeholder="搜索员工名称"
size="small"
class="search-input"
clearable
v-model="searchForm.name"
></el-input>
<el-button
type="primary"
size="small"
@click="handleSearch"
>查询</el-button>
<el-button
size="small"
@click="handleReset"
>重置</el-button>
</div>
<div class="table">
<d2-table
ref="multipleStaffTable"
:search-form="searchFormSearch"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
:has-num="false"
:layout="'total, prev, pager, next'"
:pagerCount="5"
@setTableFinishFun="setTableFinishFun"
@selectionTable="selectionTable"
>
</d2-table>
</div>
</div>
</div>
<div class="right">
<div class="title flex">
已选人员<div class="num">{{ chooseList.length }}</div>人
<el-button
class="clear"
type="text"
@click="chooseList = []"
>清空</el-button>
</div>
<div class="right-content">
<el-scrollbar class="multiple-tag-box">
<div class="multiple-tags">
<template v-for="(i,ind) in chooseList">
<el-tag
closable
:key="ind"
@close="removeStaff(ind)"
>{{ i.userName }}</el-tag>
</template>
</div>
</el-scrollbar>
</div>
</div>
</div>
</basedialog>
</template>
<script>
import { getUsedCarPaymentList } from "@api/usedCarManagement"
export default {
name: "ChangeMerchantDialog",
props: {
visible: {
type: Boolean,
default: false
},
chooseData: {
type: Object,
default: () => { }
}
},
inject: ['deepClone'],
computed: {
dialogShow: {
get () {
return this.visible
},
set (val) {
this.close()
}
},
},
watch: {
visible: {
handler (val) {
if (val) {
this.chooseList = this.chooseData
}
},
immediate: true,
deep: true
}
},
mounted () {
},
data () {
return {
dialogConfig: {
config: {
title: "选择人员",
width: "1092px"
}
},
config: {
appendToBody: true,
isShowFooter: true,
cancel_name: "取消",
confirm_name: "确定",
},
getListApi: getUsedCarPaymentList,
searchForm: {},
searchFormSearch: {},
tableParams: {
listName: "list",
mutiSelectUniqueKey: "id",
mutiSelectName: "contentIndex",
tableColumns: [
{
label: "员工姓名",
prop: "licensePlate",
minWidth: 130
},
{
label: "手机号",
prop: "vin",
minWidth: 160
},
{
label: "岗位",
prop: "licensePlate",
minWidth: 130
},
]
},
pageChooseList: {},
chooseList: [],
delList: []
}
},
methods: {
getParams () {
const params = this.deepClone(this.searchForm)
return params
},
beforeSearchFn () {
return new Promise((resolve) => {
this.searchFormSearch = this.getParams()
resolve()
})
},
close () {
this.$emit('dialogClose')
},
removeStaff (index) {
this.chooseList.splice(index, 1)
},
async submit () {
this.$emit('choose', this.chooseList)
this.close()
},
handleReset () {
this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch()
},
handleSearch () {
this.$refs.multipleStaffTable.refreshTable(true)
},
}
}
</script>
<style lang="scss" scoped>
.flex {
display: flex;
align-items: center;
}
.detail-content {
::v-deep .el-dialog {
.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;
}
}
.content {
display: flex;
height: 588px;
box-sizing: border-box;
padding: 20px;
gap: 24px;
.left,
.right {
width: calc(50% - 12px);
flex-shrink: 0;
height: 100%;
border: 1px solid #e5e5e5;
box-sizing: border-box;
.title {
font-weight: 700;
color: #333333;
font-size: 16px;
height: 48px;
border-bottom: 1px solid #e5e5e5;
background: #f5f5f5;
padding: 0 16px;
.num {
margin-left: 4px;
}
.clear {
margin-left: auto;
}
}
}
.left {
&-content {
padding: 16px;
height: calc(100% - 49px);
box-sizing: border-box;
.search-box {
margin-bottom: 20px;
.search-input {
width: 200px;
margin-right: 12px;
}
}
.table {
height: calc(100% - 52px);
::v-deep .d2-table {
height: 100%;
display: flex;
flex-direction: column;
.el-pagination {
margin-top: auto;
}
.el-table {
border-left: none;
overflow-y: auto;
&::before,
&::after {
display: none;
}
.el-table__header-wrapper,
.el-table__body-wrapper {
position: relative;
border-left: 1px solid #ebeef5;
&::after {
content: "";
position: absolute;
top: 0;
right: 1px;
width: 1px;
height: 100%;
background: #ebeef5;
}
}
}
.el-table-column--selection {
.cell {
padding: 0;
}
}
}
}
}
}
.right {
.multiple-tag-box {
width: 100%;
height: 499px;
box-sizing: border-box;
.multiple-tags {
padding: 16px;
display: flex;
flex-wrap: wrap;
gap: 16px;
}
}
}
}
}
</style>
<template>
<div class='staff-overview'>
<div class="staff-overview-title">
当前驻店员工概况
<el-button
size="small"
type="text"
class="btn"
>历史人员记录</el-button>
</div>
<div class="staff-info flex">
<template v-for="(item,index) in formList">
<div
class="staff-info-item flex"
:key="index"
>
<div class="label">{{ item.label }}:</div>
<div class="value">{{ item.value }}</div>
</div>
</template>
</div>
<div class="staff-overview-content">
<div class="staff-overview-item left">
<div class="content">
<img
:src="`${IMG_URL}staff.webp`"
class="bg"
>
</div>
<template v-for="(item,index) in leftWarningInfoList">
<div
class="warning-item flex"
:key="index"
>
{{ index }}流量预警:周环比下降超过20%
</div>
</template>
</div>
<div class="staff-overview-item right">
<div class="content"></div>
<template v-for="(item,index) in rightWarningInfoList">
<div
class="warning-item flex"
:key="index"
>
{{ index }}生态系数预警:整车延保生态系数低于1.0
</div>
</template>
</div>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'StaffOverview',
inject: ['IMG_URL'],
data () {
return {
leftWarningInfoList: new Array(5),
rightWarningInfoList: new Array(3),
formList: [
{
label: '驻店时长',
value: '直营'
},
{
label: '总学习时长',
value: '直营'
},
{
label: '学习率',
value: '直营'
},
]
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.flex {
display: flex;
align-items: center;
}
.staff-overview {
padding: 0 20px 20px;
&-title {
height: 50px;
color: #333333;
font-size: 16px;
font-weight: 500;
display: flex;
align-items: center;
.btn {
margin-left: auto;
padding: 0;
}
}
.staff-info {
height: 44px;
&-item {
width: calc(100% / 3);
font-size: 13px;
.label {
text-align: right;
color: #666666;
flex-shrink: 0;
}
.value {
max-width: calc(100% - 78px);
color: #333333;
}
}
}
&-content {
display: flex;
gap: 0 16px;
}
&-item {
flex-shrink: 0;
.content {
position: relative;
height: 459px;
border-radius: 8px;
border: 1px solid transparent;
}
.warning-item {
width: 100%;
border-radius: 4px;
color: #333333;
font-size: 13px;
margin-top: 12px;
height: 30px;
background: #2c66f714;
}
}
.left {
width: 420px;
.content {
.bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
}
.right {
width: calc(100% - 436px);
.content {
border-color: #e5e5e5;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="storeSignboard-container">
<div class="merchant-info flex">
<div class="merchant-icon flex">
<img
:src="`${IMG_URL}merchant-icon.webp`"
class="icon"
>
</div>
<div class="info ">
<div class="name text-hide">{{merchantInfo.merchantName}}</div>
<div class="control flex">
<div class="scene flex">
<img
:src="`${IMG_URL}scene-icon.webp`"
class="scene-icon"
>
业务:延保
</div>
<el-button
type="text"
class="change-store"
@click="merchantVisible = true"
>
切换门店
<i class="el-icon-sort"></i>
</el-button>
</div>
</div>
</div>
<div class="merchant-detail flex">
<template v-for="(item,index) in formList">
<div
:class="['item flex',item.className]"
:key="index"
>
<div class="label">{{ item.label }}:</div>
<template v-if="item.tooltip">
<el-tooltip
effect="dark"
placement="top"
>
<div
slot="content"
class="tooltip-content-max"
>
<div>{{ item.value}}</div>
</div>
<span class="text-hide value">{{ item.value}}</span>
</el-tooltip>
</template>
<template v-else>
<div class="value text-hide">{{ item.value }}</div>
</template>
</div>
</template>
</div>
<change-merchant-dialog
:visible="merchantVisible"
@dialogClose="merchantVisible = false"
@changeMerchant="changeMerchant"
></change-merchant-dialog>
</div>
</template>
<script type='text/ecmascript-6'>
import ChangeMerchantDialog from './ChangeMerchantDialog.vue';
export default {
name: 'StoreSignboardInfo',
components: {
ChangeMerchantDialog
},
inject: ['IMG_URL'],
data () {
return {
merchantVisible: false,
merchantInfo: {
merchantName: '山东世纪奔腾汽车销售服务有限公司'
},
formList: [
{
label: '主营品牌',
value: '鸿蒙智行/阿维塔',
tooltip: true
},
{
label: '线上运营',
value: '谢万新/叶雪',
tooltip: true
},
{
label: '区域运营',
value: '叶雪',
tooltip: true
},
{
label: '运营模式',
value: '直营'
},
{
label: '所属服务商',
value: '海南慧保咨询服务有限责任公司郑州市分嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟嘟公司',
className: 'fit-width'
}
]
}
},
mounted () {
},
methods: {
changeMerchant (e) {
}
}
}
</script>
<style scoped lang='scss'>
.flex {
display: flex;
align-items: center;
}
.storeSignboard-container {
padding: 22px 20px 0;
border-bottom: 1px solid #e5e5e5;
.merchant-info {
height: 48px;
margin-bottom: 6px;
.merchant-icon {
width: 48px;
height: 48px;
border-radius: 100%;
background: #2a58ad1a;
margin-right: 12px;
justify-content: center;
.icon {
width: 20px;
height: 20px;
}
}
.info {
width: 527px;
height: 100%;
.name {
padding-top: 2.5px;
color: #333333;
font-size: 16px;
font-weight: 500;
margin-bottom: 8px;
}
}
}
.control {
color: #333333;
font-size: 13px;
.scene {
padding-right: 12px;
margin-right: 12px;
border-right: 1px solid #ddd;
&-icon {
width: 16px;
height: 16px;
margin-right: 4px;
}
}
.change-store {
padding: 0 !important;
}
}
.el-icon-sort {
transform: rotate(90deg) scaleX(-1);
}
.merchant-detail {
padding: 12.5px 0 8.5px;
flex-wrap: wrap;
.item {
width: calc(100% / 3);
font-size: 13px;
margin-bottom: 8px;
.label {
text-align: right;
color: #666666;
flex-shrink: 0;
}
.value {
max-width: calc(100% - 73px);
color: #333333;
}
}
.fit-width {
width: calc(100% / 3 * 2);
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="strategy-item">
<div :class="['strategy-item-line',{'first-line':index == 0},{'last-line':isLast}]">
<div class="icon"></div>
</div>
<div class="strategy-item-title flex">
<div class="text text-hide">
{{ strategyTypeObject.title }}
</div>
<div class="strategy-item-date">
{{ item[strategyTypeObject.dateKey] }}
</div>
</div>
<template v-for="(i, ind) in strategyTypeObject.contentObject">
<div
class="content"
:key="ind"
>
<div class="label">{{ i.label }}:</div>
<div class="value-box">
<template v-if="i.tooltip">
<el-tooltip
effect="dark"
placement="top"
>
<div
slot="content"
class="tooltip-content-max"
>
<div>{{ item[i.key] || i.value}}</div>
</div>
<span class="two-line-ellipsis">{{ item[i.key] ||i.value}}</span>
</el-tooltip>
</template>
<template v-else>
<div :class="['value',i.className]">{{ item[i.key] || i.value }}</div>
</template>
</div>
</div>
</template>
<div class="btn-list flex">
<template v-if="item.status == 0 || index == 0">
<el-button
:size="size"
class="btn-default"
@click="deleteStrategy(item)"
>删除</el-button>
</template>
<el-button
:size="size"
type="primary"
plain
class="btn-primary"
>查看详情</el-button>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
import { STRATEGY_0 } from './contant'
export default {
name: 'StrategyItem',
props: {
item: {
type: Object,
default: () => ({})
},
index: {
type: Number,
default: 0
},
isLast: {
type: Boolean,
default: false
}
},
computed: {
strategyTypeObject () {
// return {
// 0: STRATEGY_0,
// }[this.item.taskType]
return STRATEGY_0
}
},
data () {
return {
size: 'small',
}
},
mounted () {
},
methods: {
deleteStrategy (item) {
this.$confirm("删除后不可恢复,是否确定删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
closeOnClickModal: false
}).then(async () => {
}).catch(() => {
})
}
}
}
</script>
<style scoped lang='scss'>
.flex {
display: flex;
align-items: center;
}
.strategy-item {
position: relative;
padding: 0 20px 16px 50px;
&-line {
position: absolute;
top: 4px;
left: 20px;
width: 16px;
height: calc(100% - 4px);
&::after {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
content: "";
width: 1.5px;
height: 100%;
background: #d4deef;
}
.icon {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 10px;
height: 10px;
background: #2a58ad;
border-radius: 100%;
z-index: 2;
}
}
.first-line {
.icon {
width: 16px;
height: 16px;
background: #2a58ad33;
&::after {
width: 8px;
height: 8px;
border: 2px solid #2a58ad;
background: #ffffff;
border-radius: 100%;
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
&::after {
top: 16px;
height: calc(100% - 16px);
}
}
.last-line {
&::after {
display: none;
}
}
&-title {
color: #333333;
.text {
font-size: 16px;
font-weight: 500;
line-height: 22px;
width: 169px;
}
}
&-date {
margin-left: auto;
font-size: 14px;
line-height: 20px;
}
.tooltip-content-max {
max-height: 320px;
overflow-y: scroll;
}
.two-line-ellipsis {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
line-height: 1.5;
}
.content {
margin-top: 8px;
display: flex;
color: #333333;
font-size: 13px;
line-height: 20px;
.label {
color: #666666;
width: 65px;
}
.value-box {
width: calc(100% - 65px);
}
}
.btn-list {
margin-top: 8px;
.btn-default {
flex-shrink: 0;
width: 60px;
}
.btn-primary {
flex: 1;
border-color: transparent !important;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="strategy">
<div class="strategy-title flex">
策略中心
<div class="add">
<el-button type="text" @click="addStrategyVisible = true"> <i class="el-icon-plus"></i>添加策略</el-button>
</div>
</div>
<el-scrollbar class="strategy-list">
<template v-for="(i,index) in list">
<strategy-item
:key="index"
:index="index"
:item="i"
:isLast="index == list.length - 1"
:class="[{first:index == 0},{last:index == list.length - 1}]"
></strategy-item>
</template>
</el-scrollbar>
<add-strategy :dialogVisible.sync="addStrategyVisible"></add-strategy>
</div>
</template>
<script type='text/ecmascript-6'>
import StrategyItem from './StrategyItem.vue';
import AddStrategy from './AddStrategy.vue';
export default {
components: {
StrategyItem,
AddStrategy
},
name: 'StrategyList',
data () {
return {
list: new Array(10).fill({}),
addStrategyVisible: false
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.flex {
display: flex;
align-items: center;
}
.strategy {
width: 100%;
height: 100%;
&-title {
height: 50px;
border-bottom: 1px solid #e5e5e5;
padding: 0 20px;
justify-content: space-between;
color: #333333;
font-size: 16px;
font-weight: 500;
.add {
font-weight: 400;
color: #2a58ad;
font-size: 14px;
.el-icon-plus {
font-size: 12px;
font-weight: 700;
margin-right: 5px;
}
}
}
&-list {
width: 100%;
height: calc(100% - 51px);
box-sizing: border-box;
.first {
margin-top: 16px;
}
.last {
margin-bottom: 16px;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class='summary-overview'>
<div class="summary-overview-title">
经营概况
</div>
<div class="summary-overview-content">
<div class="summary-overview-item left">
<div class="content">
<img
:src="`${IMG_URL}summary.webp`"
class="bg"
>
</div>
<template v-for="(item,index) in leftWarningInfoList">
<div
class="warning-item flex"
:key="index"
>
{{ index }}流量预警:周环比下降超过20%
</div>
</template>
</div>
<div class="summary-overview-item right">
<div class="content"></div>
<template v-for="(item,index) in rightWarningInfoList">
<div
class="warning-item flex"
:key="index"
>
{{ index }}生态系数预警:整车延保生态系数低于1.0
</div>
</template>
</div>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'SummaryOverview',
inject: ['IMG_URL'],
data () {
return {
leftWarningInfoList: new Array(5),
rightWarningInfoList: new Array(3)
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.flex {
display: flex;
align-items: center;
}
.summary-overview {
padding: 0 20px 20px;
border-bottom: 1px solid #e5e5e5;
&-title {
height: 50px;
color: #333333;
font-size: 16px;
font-weight: 500;
display: flex;
align-items: center;
}
&-content {
display: flex;
gap: 0 16px;
}
&-item {
flex-shrink: 0;
.content {
position: relative;
height: 459px;
border-radius: 8px;
border: 1px solid transparent;
}
.warning-item {
width: 100%;
border-radius: 4px;
color: #333333;
font-size: 13px;
margin-top: 12px;
height: 30px;
background: #2c66f714;
}
}
.left {
width: 420px;
.content {
.bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
}
.right {
width: calc(100% - 436px);
.content {
border-color: #e5e5e5;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
const STRATEGYTYPEOPTIONS = [
{ label: '学习', value: 0 },
{ label: '优秀案例分享', value: 1 },
{ label: '带教', value: 2 },
{ label: '任务下发', value: 3 },
{ label: '销售精英到店提拉', value: 4 },
{ label: '强力促销', value: 5 },
{ label: '最终盘点与低客单产品购入', value: 6 },
]
const STRATEGY_FORM_0 = [
{
label: '标题',
type: 'input',
key: 'title',
parentKey: 'strategyInfo',
required: true,
maxLength: 20,
key: 'title'
},
{
label: '学习人员',
type: 'multipleTag',
btnText: '选择人员',
componentName: 'staffTag',
key: 'staffList',
required: true,
},
{
label: '学习内容',
type: 'multipleTag',
btnText: '选择课程',
componentName: 'courseTag',
key: 'courseList',
required: true,
},
{
label: '执行周期',
type: 'daterange',
parentKey: 'strategyInfo',
key: 'dateRange',
required: true,
pickerOptions: 'afterPickerOptions'
},
{
label: '策略说明',
type: 'textarea',
key: 'description',
parentKey: 'strategyInfo',
required: true,
maxLength: 200
}
]
const STRATEGY_FORM_1 = [
{
label: '标题',
type: 'input',
key: 'title',
parentKey: 'strategyInfo',
required: true,
maxLength: 20,
key: 'title'
},
{
label: '学习人员',
type: 'multipleTag',
btnText: '选择人员',
componentName: 'staffTag',
key: 'staffList',
required: true,
},
{
label: '学习内容',
type: 'multipleTag',
btnText: '选择录音',
componentName: 'recordingTag',
key: 'recordingList',
required: true,
tagKey: 'id',
tagNameKey: 'name'
},
{
label: '执行周期',
type: 'daterange',
parentKey: 'strategyInfo',
key: 'dateRange',
required: true,
pickerOptions: 'afterPickerOptions'
},
{
label: '策略说明',
type: 'textarea',
key: 'description',
parentKey: 'strategyInfo',
required: true,
maxLength: 200
}
]
const STRATEGY_FORM_2456 = [
{
label: '执行人员:',
type: 'multipleTag',
btnText: '选择人员',
componentName: 'staffTag',
key: 'staffList',
required: true,
hideKey: 'strategyInfo',
hide: (val) => {
let { strategyType } = val
return [5, 6].includes(strategyType)
}
},
{
label: '执行周期',
type: 'daterange',
parentKey: 'strategyInfo',
key: 'dateRange',
required: true,
pickerOptions: 'afterPickerOptions'
},
{
label: '策略说明',
type: 'textarea',
key: 'description',
parentKey: 'strategyInfo',
required: true,
maxLength: 200
}
]
const STRATEGY_FORM_3 = [
{
label: '标题',
type: 'input',
key: 'title',
parentKey: 'strategyInfo',
required: true,
maxLength: 20,
key: 'title'
},
{
label: '副标题',
type: 'input',
key: 'title',
parentKey: 'strategyInfo',
required: true,
maxLength: 200,
key: 'subTitle'
},
{
label: '内容',
type: 'richText',
key: 'content',
parentKey: 'strategyInfo',
required: true,
},
{
label: '处理人',
type: 'checkbox',
key: 'handlerType',
parentKey: 'strategyInfo',
required: true,
options: [
{ label: '区域运营', value: 0 },
{ label: '驻店人员', value: 1 },
]
},
{
label: '区域运营',
type: 'multipleTag',
btnText: '选择人员',
componentName: 'staffTag',
key: 'staffList',
required: true,
hideKey: 'strategyInfo',
hide: (val) => {
let { handlerType } = val
return !handlerType.includes(0)
}
},
{
label: '驻店人员',
type: 'multipleTag',
btnText: '选择人员',
componentName: 'staffTag',
key: 'staffList',
required: true,
hideKey: 'strategyInfo',
hide: (val) => {
let { handlerType } = val
return !handlerType.includes(1)
}
},
{
label: '执行时间',
type: 'radioTime',
parentKey: 'strategyInfo',
key: 'pushType',
required: true,
pickerOptions: 'afterPickerOptions',
timeKey: 'pushTime',
options: [
{ label: '立即推送', value: 1 },
{ label: '定时推送', value: 0 },
],
showDateTimePicker: (val) => {
let { pushType } = val
return pushType == 0
},
pickerOptions: 'afterTwoHourPickerOptions'
},
{
label: '策略说明',
type: 'textarea',
key: 'description',
parentKey: 'strategyInfo',
required: true,
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: '安排课程学习,进一步跟进驻店人员学习情况及业务情况。'
}
]
}
export {
STRATEGYTYPEOPTIONS,
STRATEGY_FORM_0,
STRATEGY_FORM_1,
STRATEGY_FORM_2456,
STRATEGY_FORM_3,
STRATEGY_0
}
\ No newline at end of file \ No newline at end of file
<template> <template>
<div> <div class="layout">
门店 <el-scrollbar class="left">
<store-signboard-info @requireInterface="requireInterface"></store-signboard-info>
<business-overview ref="businessOverview"></business-overview>
<summary-overview ref="summaryOverview"></summary-overview>
<staff-overview ref="staffOverview"></staff-overview>
</el-scrollbar>
<div class="right">
<strategy-list></strategy-list>
</div>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
export default { import StrategyList from './components/StrategyList.vue';
name: '', import StoreSignboardInfo from './components/StoreSignboardInfo.vue';
data () { import BusinessOverview from './components/BusinessOverview.vue';
return { import SummaryOverview from './components/SummaryOverview.vue';
import StaffOverview from './components/StaffOverview.vue';
import { deepClone } from "@/common/util"
export default {
components: {
StrategyList,
StoreSignboardInfo,
BusinessOverview,
SummaryOverview,
StaffOverview
},
name: 'storeSignboard',
provide () {
return {
IMG_URL: this.IMG_URL,
GET_MERCHANT_INFO: () => this.merchantInfo,
deepClone
}
},
data () {
return {
merchantInfo: {
merchantName: 'AA',
merchantId: 123
},
IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/storeSignboard/'
}
},
mounted () {
setTimeout(()=>{
this.merchantInfo = {
merchantName: 'BB',
merchantId: 456
} }
}, },5e3)
mounted () { },
}, methods: {
methods: { requireInterface (e) {
console.log('请求接口', '参数:', e)
} }
} }
}
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.layout {
// margin: 0 20px 20px 19px;
background: #ffffff;
display: flex;
position: absolute;
top: 0;
left: 20px;
width: calc(100% - 40px);
height: calc(100% - 20px);
overflow: hidden;
.left {
// width: 875px;
width: 60.76vw;
height: 100%;
flex-shrink: 0;
}
.right {
// width: calc(100% - 875px);
width: calc(100% - 60.76vw);
height: 100%;
flex-shrink: 0;
border-left: 1px solid #e5e5e5;
}
::v-deep .el-scrollbar__wrap {
overflow: auto scroll;
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!