Commit 18d21840 by 李伟康

refactor(HomeFrame): 重构首页组件并优化数据加载逻辑

- 重构了 LineBar、OutputValue 和 RecordList 组件
- 优化了数据加载和显示逻辑,增加了空数据和加载状态的处理
- 调整了部分样式,提高了用户体验
1 parent 06c0e607
......@@ -4,6 +4,7 @@
<page-tabs
:list="tabList"
@changeTab="changeTab"
size="small"
/>
</view>
<view class="canvas">
......@@ -18,6 +19,16 @@
<script type='text/ecmascript-6'>
import PageTabs from '@/components/PageTabs.vue'
const rateList = {
excellentStoreAvgDealRate: '优秀门店均值',
thisStoreDealRate: '本门店',
personalDealRate: '个人'
},
priceList = {
excellentStoreAvgDeal: '优秀门店均值',
thisStoreKdj: '本门店',
personalKdj: '个人'
}
export default {
components: {
PageTabs
......@@ -44,10 +55,10 @@ export default {
data () {
return {
tabIndex: 0,
tabList: ['本月成交率', '本月客单价'],
tabList: Object.freeze(['本月交付成交率', '本月交付客单价']),
chartData: {},
//您可以通过修改 config-ucharts.js 文件中下标为 ['bar'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
opts: {
opts: Object.freeze({
fontColor: '#333',
fontSize: 10,
color: ["#2C66F7"],
......@@ -76,42 +87,49 @@ export default {
barBorderCircle: true,
}
}
}
})
}
},
mounted () {
},
methods: {
getServerData () {
let { dataShow, tabIndex, pageData } = this,
{
excellentStoreAvgDealRate,
thisStoreDealRate,
personalDealRate,
excellentStoreAvgDeal,
thisStoreKdj,
personalKdj
} = pageData,
data = tabIndex == 0 ? [
excellentStoreAvgDealRate || 0,
thisStoreDealRate || 0,
personalDealRate || 0
] : [
excellentStoreAvgDeal || 0,
thisStoreKdj || 0,
personalKdj || 0
],
series = {
hideData: !dataShow,
textSize: 14,
textColor: '#333',
data
}
if (tabIndex == 0) series.afterUnit = '%'
else series.beforeUnit = '¥'
let { dataShow, tabIndex, pageData } = this
let list = [],
categories = [],
data = [],
defaultList = []
if (tabIndex == 0) Object.keys(rateList).map(key => {
list.push({
text: rateList[key],
value: pageData[key]
})
})
else Object.keys(priceList).map(key => {
list.push({
text: priceList[key],
value: pageData[key]
})
})
list.sort((a, b) => b.value - a.value)
list.map(e => {
categories.push(e.text)
data.push(e.value || 0)
defaultList.push(e.value == null)
})
let series = [{
defaultList,
hideData: !dataShow,
textSize: 14,
textColor: '#333',
data
}]
if (tabIndex == 0) series[0].afterUnit = '%'
else series[0].beforeUnit = '¥'
this.chartData = {
categories: ['优秀门店均值', '本门店', '个人'],
series: [series],
categories,
series,
}
},
changeTab (index) {
......
......@@ -86,13 +86,14 @@ export default {
},
methods: {
getServerData () {
let { dataShow } = this
this.opts.subtitle.name = `${NP.times(this.pageData.productionContribution || 0, 100)}%`
let { dataShow } = this,
data = this.pageData.productionContribution
this.opts.subtitle.name = data == null ? '--' : `${this.pageData.productionContribution}%`
this.chartData = {
series: [
{
hideData: !dataShow,
data: this.pageData.productionContribution || 0
data: NP.divide(data || 0, 100)
}
]
}
......@@ -101,7 +102,7 @@ export default {
let { dataShow, pageData } = this,
num = pageData[key]
if (unit && num) num += unit
if (!dataShow || !num) num = '--'
if (!dataShow || num == null) num = '--'
return num
}
}
......
......@@ -65,7 +65,7 @@
{{item.orderFinishFlag? '成交': '战败'}}
</view>
</template>
<template v-else>
<!-- <template v-else>
<view :class="[
'status flex',
{'disabled':item.receptionStatus !== 1 && item.receptionStatus !== 0 },
......@@ -81,7 +81,7 @@
未知
</template>
</view>
</template>
</template> -->
</view>
<view class="name">
{{ item.customerName ? item.customerName : '未填写姓名' }}
......
......@@ -21,24 +21,36 @@
</view>
</view>
</view>
<view class="customer-box box">
<customer-flow
:pageData="pageData"
:dataShow="dataShow"
/>
</view>
<view class="linebar-box box">
<line-bar
:dataShow="dataShow"
:pageData="pageData"
/>
</view>
<view class="box">
<output-value
:dataShow="dataShow"
:pageData="pageData"
/>
</view>
<template v-if="showPageFlag">
<view class="customer-box box">
<customer-flow
:pageData="pageData"
:dataShow="dataShow"
/>
</view>
<view class="linebar-box box">
<line-bar
:dataShow="dataShow"
:pageData="pageData"
/>
</view>
<view class="box">
<output-value
:dataShow="dataShow"
:pageData="pageData"
/>
</view>
</template>
<template v-else>
<view class="loading flex">
<uni-icons
class="icon"
type="refreshempty"
:size="120"
color="#3773f8"
></uni-icons>
</view>
</template>
</view>
<view class="right box-class">
<type-tab-component
......@@ -130,27 +142,33 @@ export default {
customerId: '',
pageData: {
//门店客流
cumulativeDeliveryCount: 0, //累计交付数
actualContactCount: 0, // 实际触客数
contactRate: 0, // 触客率(实际触客数 / 累计交付数)
// cumulativeDeliveryCount: 0, //累计交付数
// actualContactCount: 0, // 实际触客数
// contactRate: 0, // 触客率(实际触客数 / 累计交付数)
excellentStoreAvgDealRate: 0, // 优秀门店均值成交率
thisStoreDealRate: 0, // 本门店成交率
personalDealRate: 0, // 个人成交率
excellentStoreAvgDeal: 0, // 优秀门店均值客单价
thisStoreKdj: 0, // 本门店客单价
personalKdj: 0, // 个人客单价
// excellentStoreAvgDealRate: 0, // 优秀门店均值成交率
// thisStoreDealRate: 0, // 本门店成交率
// personalDealRate: 0, // 个人成交率
// excellentStoreAvgDeal: 0, // 优秀门店均值客单价
// thisStoreKdj: 0, // 本门店客单价
// personalKdj: 0, // 个人客单价
//本月产值
actualProduction: 0, // 实际完成产值(万元)
personalProduction: 0, // 个人产值(累计成交金额)
targetProduction: 0, // 目标产值(万元)
achievementRatio: 0, // 达成比例 = 实际产值 ÷ 目标产值
productionContribution: 0 // 产值贡献 = 个人产值 ÷ 实际完成产值
// //本月产值
// actualProduction: 0, // 实际完成产值(万元)
// personalProduction: 0, // 个人产值(累计成交金额)
// targetProduction: 0, // 目标产值(万元)
// achievementRatio: 0, // 达成比例 = 实际产值 ÷ 目标产值
// productionContribution: 0 // 产值贡献 = 个人产值 ÷ 实际完成产值
}
}
},
computed: {
showPageFlag () {
return Object.keys(this.pageData).length
}
},
mounted () {
this.setTimeProgress()
this.getMerchantPerformance()
......@@ -279,6 +297,22 @@ export default {
.customer-box {
margin: toRpx(24) toRpx(32) toRpx(20);
}
.loading {
width: 100%;
height: 100%;
justify-content: center;
.icon{
animation: rotate 1s infinite;
}
@keyframes rotate {
0%{
transform: rotate(0);
}
100%{
transform: rotate(360deg);
}
}
}
}
.right {
width: toRpx(1354);
......
......@@ -65,7 +65,7 @@ export default {
},
async jump () {
let { item, sceneMarketLevelTwoItem } = this,
params = `id=${item.id}&specialFlag=${sceneMarketLevelTwoItem.specialFlag}`
params = `id=${item.id}&specialFlag=${sceneMarketLevelTwoItem.specialFlag}&directoryName=${sceneMarketLevelTwoItem.directoryName}`
// 类型:0-图片;1-视频;2-pdf;3-富文本; 4-Excel; 5-Word
let url = `/pages/common/caseDetail?${params}`
uni.$track.add({ eventCode: 'scene_market', businessId: item.id })
......
......@@ -36,6 +36,7 @@
@click="swiperClick"
:stopAutoPlay="previewOff"
:imgKey="bannerKey"
:loadComplete="loadComplete"
></swiper-component>
</view>
</view>
......@@ -56,7 +57,10 @@
<view class="content-right box-class">
<view class="common-title">服务中心</view>
<view class="content-box">
<MessageIndex class="message-box" ref="messageRef" />
<MessageIndex
class="message-box"
ref="messageRef"
/>
</view>
</view>
</view>
......@@ -196,7 +200,8 @@ export default {
type: Array,
default: () => []
},
bannerKey: String
bannerKey: String,
loadComplete: Boolean,
},
data () {
return {
......@@ -399,7 +404,7 @@ export default {
font-size: toRpx(28);
width: toRpx(310);
height: toRpx(90);
line-height: toRpx(64);
line-height: toRpx(68);
background-image: url('@/assets/images/home/daliog.png');
background-size: 100% 100%;
z-index: 9;
......
......@@ -3,7 +3,7 @@
<template>
<view
v-for="(i, index) in list"
:class="['tab flex', { active: activeIndex == index }]"
:class="['tab flex',size, { active: activeIndex == index }]"
:key="index"
@click="changeTab(index)"
:style="{
......@@ -37,6 +37,10 @@ export default {
tabKey: {
type: String,
default: 'text'
},
size: {
type: String,
default: 'normal'
}
},
name: '',
......@@ -102,7 +106,7 @@ export default {
height: calc(100% - #{toRpx(8)});
justify-content: center;
color: #666666;
font-size: toRpx(28);
z-index: 10;
position: relative;
.dot {
......@@ -115,8 +119,15 @@ export default {
background: #f24724;
}
}
.normal {
font-size: toRpx(28);
}
.small{
font-size: toRpx(24);
}
.active {
color: #333333;
color: #1a1a1a;
font-weight: 500;
}
.active-btn {
position: absolute;
......
<template>
<view class="swiper-box">
<movable-area
class="swiper-carousel"
@touchstart="starts"
@touchend="ends"
>
<template v-for="(item,index) in imagelist">
<movable-view
:key="index"
:class="['carousel-block',item.class]"
@click.stop="changeBlock(item)"
direction="horizontal"
@change="change"
:disabled="item.class != 'block-center'"
:x="item.class != 'block-center' ? 0 : viewX"
:data-index="item.isIndex"
<template v-if="loadComplete">
<template v-if="moduleList.length">
<movable-area
class="swiper-carousel"
@touchstart="starts"
@touchend="ends"
>
<image
class="image-block"
:src="item.imgUrl"
@load="item.hide = true"
/>
<view :class="['error-block',{hide:item.hide}]">
<uni-icons
:type="icon"
:size="size"
color="#909399"
></uni-icons>
</view>
</movable-view>
<template v-for="(item,index) in imagelist">
<movable-view
:key="index"
:class="['carousel-block',item.class]"
@click.stop="changeBlock(item)"
direction="horizontal"
@change="change"
:disabled="item.class != 'block-center'"
:x="item.class != 'block-center' ? 0 : viewX"
:data-index="item.isIndex"
>
<image
class="image-block"
:src="item.imgUrl"
@load="item.hide = true"
/>
<view :class="['error-block',{hide:item.hide}]">
<uni-icons
:type="icon"
:size="size"
color="#909399"
></uni-icons>
</view>
</movable-view>
</template>
</movable-area>
<view class="module-title flex">
{{moduleTitle}}
</view>
<view class="module-dots flex">
<template v-for="(i,index) in moduleList">
<div
:class="['dot', {'active': index == currentIndex}]"
:key="index"
>
</div>
</template>
</view>
</template>
</movable-area>
<view class="module-title flex">
{{moduleTitle}}
</view>
<view class="module-dots flex">
<template v-for="(i,index) in moduleList">
<div
:class="['dot', {'active': index == currentIndex}]"
:key="index"
>
</div>
<template v-else>
<view class="nothing flex">
该场景尚未配置素材,请联系总部人员
</view>
</template>
</view>
</template>
<template v-else>
<view class="loading flex">
<uni-icons
class="icon"
type="refreshempty"
:size="120"
color="#3773f8"
></uni-icons>
</view>
</template>
</view>
</template>
<script>
......@@ -69,7 +89,7 @@ export default {
},
interval: {
type: [Number, String],
default: 3000
default: 5e3
},
autoplay: {
type: Boolean,
......@@ -79,6 +99,7 @@ export default {
type: Boolean,
default: false
},
loadComplete: Boolean
},
watch: {
moduleList: {
......@@ -254,6 +275,25 @@ export default {
}
</script>
<style lang="scss" scoped>
.swiper-box {
height: 100%;
.loading {
width: 100%;
height: 100%;
justify-content: center;
.icon {
animation: rotate 1s infinite;
}
@keyframes rotate {
0% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}
}
}
.swiper-carousel {
width: 100%;
height: toRpx(440);
......@@ -342,4 +382,11 @@ export default {
background: #fff;
}
}
.nothing {
width: 100%;
height: 100%;
justify-content: center;
color: #999;
font-size: toRpx(20);
}
</style>
......@@ -21,8 +21,9 @@ export default {
1: '问界',
2: '比亚迪',
3: '其他'
}[channelType],
title = options.title || ''
}[channelType]
let title = options.directoryName
if(options.title) title += `-${options.title}`
let { agentUrl, domainName } = data,
url = `${agentUrl}?no_header=1&business_type=${bussinessType}&phone=${phone}&brand=${brand}&one_id=${uuid}&platformType=1&domain=${domainName}&presuppositionProblem=${title}`
if (options.id) url += `&enter_id=${options.id}`
......@@ -56,7 +57,7 @@ export default {
height: '82.82%',
width: '28.3%'
});
wv2Flag = true;
wv2Flag = true;
}
} else {
if (wv1) {
......@@ -67,7 +68,7 @@ export default {
width: '28.3%'
});
wv1Flag = true;
wv2Flag = true;
wv2Flag = true;
}
}
......
......@@ -13,6 +13,7 @@
:moduleList="moduleList"
@swiperClick="toDetail"
bannerKey="bannerImg"
:loadComplete="loadComplete"
>
<template slot="detail">
<detail
......@@ -99,7 +100,8 @@ export default {
describe: '客户未领取精品券\n首次到店',
icon: 'icon-customer-2'
}
])
]),
loadComplete:false
}
},
onBackPress (options) {
......@@ -220,6 +222,7 @@ export default {
this.moduleList = moduleList
this.toolList = toolList
this.defaultCarId = defaultCarId
this.loadComplete = true
},
toDetail (index) {
let item = this.moduleList[index]
......
......@@ -24,6 +24,7 @@
<view class="phone">{{desensitizePhoneNumber(pageData.phoneNumber)}}</view>
</view>
<view class="brand-box flex">
<view class="brand flex">{{pageData.carBrand}}</view>
<view class="brand flex">{{pageData.carModel}}</view>
</view>
<view class="tips flex">
......@@ -155,7 +156,8 @@ export default {
isOperate: true,
showPlayControl: false,
AIUrl: '',
wv: null
wv: null,
loading: false
}
},
onLoad () {
......@@ -415,13 +417,17 @@ export default {
},
tabClick (item) {
if (item.sumScore > item.score && this.wv) {
uni.showLoading({
mask: true
if (this.loading) return uni.showToast({
title: '请勿频繁操作',
icon: 'none',
mask: true,
duration: 500
})
this.loading = true
this.wv.evalJS(`sendMessage({type:'reset_chat',payload:{message:'${item.tagGroupName}'}})`)
setTimeout(()=>{
uni.hideLoading()
},1e3)
setTimeout(() => {
this.loading = false
}, 500)
}
}
......
<!--
* @Description:
* @Author: huyue
* @Date: 2024-06-20 11:32:52
* @LastEditors: huyue
* @LastEditTime: 2024-07-08 11:33:21
-->
<template>
<view
:class="['layout',{'byd-layout':isByd}]"
@click.prevent="touch"
>
<wnCanvas
:drawStatus="penSwitch"
:canvasId="`c-${madiaId}`"
custom
@scale="$emit('scale',$event)"
>
<template slot="customContent">
<view class="layout-content">
<view class="title">{{ title }}</view>
<view class="container">
<view class="container-left">
<view
v-for="(item, index) in views"
:key="item.name"
class="item"
@click.stop="showSection(index)"
:class="item.class"
:style="item.style"
>
<view class="image-container">
<image
:src="item.detailUrl"
class="item-image"
/>
<view class="item-text">{{ item.name }}</view>
</view>
<view class="details-container">
<view :class="['details-section', itemClass(index)]">
<view class="section-title">{{ item.name }}</view>
<view class="section-description">{{item.description}}</view>
</view>
</view>
</view>
</view>
<view class="container-right">
<image
src="https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-15.webp"
mode="widthFix"
class="serice-image"
/>
<view class="ul">
<view class="ul-title">{{isByd?'部分零部件更换成本':'高价值零部件'}}</view>
<view
class="li-item"
v-for="i in ulList"
:key="i.index"
@click="open(i.flagName)"
>
<view class="li-content">
<view class="li-item-content">
<view class="li-number">{{ i.index }}</view>{{ i.name }}
</view>
<view
v-if="i.hasArrow"
class="sprite-icon icon-icon-arrow icon-arrow"
></view>
<!-- <image
v-if="i.hasArrow"
src="https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/icon-arrow.webp"
mode="scaleToFill"
class="icon-arrow"
/> -->
</view>
<view class="li-value">{{ i.value }}</view>
</view>
</view>
</view>
</view>
</view>
</template>
</wnCanvas>
<partsPop
ref="partsRef"
@close="close"
:screenList="screenList"
></partsPop>
</view>
</template>
<script>
import partsPop from './PartsPop.vue'
export default {
name: "Guarantee",
props: {
views: Array,
penSwitch: Boolean,
title: String,
madiaId: Number,
ulList: Array,
screenList: Array,
isByd: Boolean
},
components: { partsPop },
data () {
return {
showIndex: -1,
};
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
},
watch: {
watchStatus () {
this.showIndex = -1
this.$refs.partsRef.close()
this.$emit('onProductModel', false)
}
},
methods: {
close () {
this.$emit('onProductModel', false)
},
open (name) {
if (name) this.$refs.partsRef.show(name)
this.$emit('onProductModel', true)
},
showSection (index) {
if (this.showIndex === index) {
// 如果当前点击的项已经是翻转状态,则关闭它
this.showIndex = -1;
} else {
// 否则,打开新点击的项
this.showIndex = index;
}
},
touch () {
this.showIndex = -1;
},
itemClass (index) {
return this.showIndex == index ? 'show' : 'hide'
}
},
};
</script>
<style scoped lang="scss">
.layout {
width: 100%;
height: 100%;
background-image: url('@/assets/images/media/media-bg.webp');
background-size: 100%;
&-content {
margin: $margin;
height: 100%;
position: relative;
}
// padding: 0 calc((100vw - #{$detailVW}) / 2);
// box-sizing: border-box;
.title {
position: absolute;
left: 0;
top: toRpx(112);
font-weight: 700;
font-size: toRpx(48);
color: #1a1a1a;
letter-spacing: toRpx(4);
line-height: toRpx(64);
text-align: center;
width: 100%;
z-index: 2;
}
.container {
display: flex;
padding: toRpx(248) toRpx(80) 0;
column-gap: toRpx(64);
&-left {
position: relative;
column-gap: toRpx(16);
border-radius: toRpx(24);
.image-container {
font-size: 0;
width: 100%;
height: 100%;
}
&::after {
content: '';
display: block;
clear: both;
}
flex: 1;
.item {
position: relative;
}
.item-image {
width: 100%;
height: 100%;
vertical-align: top;
}
.item-text {
position: absolute;
left: 0;
bottom: 0;
font-size: toRpx(30);
color: #ffffff;
width: 100%;
height: toRpx(122);
padding: toRpx(44) toRpx(22) toRpx(22);
background-image: linear-gradient(180deg, #00000000 0%, #000000 100%);
border-radius: 0 0 toRpx(24) toRpx(24);
line-height: toRpx(66);
}
.details-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
border-radius: toRpx(24);
}
.details-section {
width: 100%;
height: 100%;
color: #ffffff;
padding: toRpx(24);
border-radius: toRpx(24);
background-image: linear-gradient(180deg, #21425cb3 0%, #4a84f9 68%);
display: flex;
flex-direction: column;
justify-content: flex-end;
transform: translateY(100%);
.section-title {
font-size: toRpx(30);
}
.section-description {
font-size: toRpx(24);
margin-top: toRpx(12);
}
}
.show {
animation: show-gradient 0.2s linear forwards;
}
.hide {
animation: hidden-gradient 0.2s linear;
}
}
&-right {
width: toRpx(336);
.serice-image {
width: toRpx(336);
height: toRpx(280);
}
.ul {
width: 100%;
border: toRpx(4) solid #fdfdff;
border-radius: toRpx(24);
margin-top: toRpx(36);
box-sizing: border-box;
&-title {
background-color: #4a84f9;
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
border-radius: toRpx(24) toRpx(24) 0 0;
height: toRpx(88);
font-weight: 500;
font-size: toRpx(28);
color: #ffffff;
line-height: toRpx(88);
text-align: center;
}
.li-item {
width: 100%;
height: toRpx(128);
box-sizing: border-box;
display: flex;
justify-content: center;
flex-direction: column;
padding-left: toRpx(40);
// margin-bottom: toRpx(4);
border: toRpx(2) solid #fdfdff;
.li-number {
font-size: toRpx(32);
margin-right: toRpx(12);
font-family: 'number-400';
}
.li-content {
display: flex;
align-items: center;
.li-item-content {
display: flex;
align-items: baseline;
}
.icon-arrow {
margin-left: toRpx(6);
}
}
.li-value {
margin-top: toRpx(8);
font-size: toRpx(22);
color: #1462ff;
}
&:nth-child(odd) {
background-color: #e5edff;
}
&:nth-child(even) {
background-color: rgba(255, 255, 255, 0.35);
}
&:last-child {
border-radius: 0 0 toRpx(24) toRpx(24);
height: toRpx(140);
}
}
}
}
}
}
.m-r-b {
margin-right: toRpx(16);
margin-bottom: toRpx(16);
}
.m-b {
margin-bottom: toRpx(16);
}
.m-r {
margin-right: toRpx(16);
}
// 动画效果
@keyframes show-gradient {
0% {
transform: translateY(100%);
}
100% {
transform: translateY(0);
}
}
@keyframes hidden-gradient {
0% {
transform: translateY(0);
}
100% {
transform: translateY(100%);
}
}
.byd-layout {
.li-item {
padding-left: toRpx(20) !important;
}
.li-item-content {
font-size: toRpx(26) !important;
}
}
</style>
......@@ -37,7 +37,7 @@ export default {
immediate: true,
handler (newval) {
// setTimeout(() => {
// if (newval && this.hasCarBrand && !this.customerInfo.carModel && this.watchChannelType != 2) this.$refs.carBrandListVisible.autoSelect()
// if (newval && this.hasCarBrand && !this.customerInfo.carModel && this.isAito) this.$refs.carBrandListVisible.autoSelect()
// }, 1e3)
}
},
......@@ -55,9 +55,9 @@ export default {
watchStatus () {
return this.$store.state.user.historyStatus
},
watchChannelType () {
// 默认1 1问界 2 比亚迪 3 其他 4极狐
return uni.$storage.get('userInfo').channelType
isAito () {
// 1问界
return uni.$storage.get('userInfo').channelType == 1
}
},
mounted () {
......
......@@ -129,6 +129,11 @@ export default {
if (newval) this.customerInfo = newval
}
},
// show (n) {
// setTimeout(() => {
// if (n && !this.customerInfo.carModel && this.isAito) this.$refs.carBrandListVisible.autoSelect()
// }, 1e3)
// }
},
computed: {
watchCustomerInfo () {
......@@ -137,6 +142,10 @@ export default {
watchStatus () {
return this.$store.state.user.historyStatus
},
isAito () {
// 1问界
return uni.$storage.get('userInfo').channelType == 1
}
},
methods: {
inputCustomer () {
......
......@@ -95,7 +95,6 @@ import CaseCenter from './components/CaseCenter.vue'
import MediaComponent from './components/MediaComponent.vue'
import History from './components/History.vue'
import ThreeGuarantees from './components/ThreeGuarantees.vue'
import Guarantee from './components/Guarantee.vue'
import payPop from './components/payPop.vue'
import FinishStep from '@/components/FinishStep.vue'
import { mapMutations } from 'vuex'
......@@ -110,7 +109,6 @@ export default {
payPop,
CaseCenter,
FinishStep,
Guarantee,
History,
ThreeGuarantees,
informationEntry,
......
......@@ -10,6 +10,7 @@
@changeTab="changeTab"
:moduleList="moduleList"
@swiperClick="toDetail"
:loadComplete="loadComplete"
>
<template slot="detail">
<detail
......@@ -52,6 +53,7 @@ export default {
recording: false,
aitoCarModelIds: [],
mediaId: '',
loadComplete: false
}
},
computed: {
......@@ -78,8 +80,13 @@ export default {
// 其他情况允许正常返回
return false
},
onLoad () {
uni.$api.systemApi.getMockData(true) //获取APP配置信息
async onLoad () {
const mockdata = await uni.$api.systemApi.getMockData(true) //获取APP配置信息
// if(this.channelType == 1 && mockdata.boutiqueDefaultCarBrandId) {
// this.$store.state.user.boutiqueDefaultCarBrandId = mockdata.boutiqueDefaultCarBrandId //默认车辆品牌
// if(mockdata.defaultCarId) this.$store.state.user.defaultCarId = mockdata.defaultCarId //默认车系
// }
this.get_Vehicle_Sales_Data()
},
onShow () {
......@@ -282,10 +289,10 @@ export default {
/**素材内容 */
setViewInfo (data) {
let { moduleList, toolList, id } = data
// if (this.channelType == 1) this.aitoCarModelIds = aitoCarModelIds || []
this.moduleList = moduleList
this.toolList = toolList
this.mediaId = id
this.loadComplete = true
this.$store.state.user = {
...this.$store.state.user,
...data
......@@ -295,8 +302,6 @@ export default {
}
</script>
<style scoped lang="scss">
.module-box {
}
.webview-container {
width: toRpx(100);
height: toRpx(100);
......
......@@ -2396,11 +2396,10 @@ function drawBarPointText (points, series, config, context, opts) {
if (typeof data[index] === 'object' && data[index] !== null) {
value = data[index].value;
}
var formatVal = series.formatter ? series.formatter(value, index, series, opts) : value;
if (series.beforeUnit) formatVal = `${series.beforeUnit}${formatVal}`
if (series.afterUnit) formatVal = `${formatVal}${series.afterUnit}`
if(series.hideData) formatVal = '--'
if(series.hideData || series.defaultList[index]) formatVal = '--'
context.setTextAlign('left');
context.fillText(String(formatVal), item.x + 4 * opts.pix, item.y + fontSize / 2 - 3);
context.closePath();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!