Commit 5e573a0a by 匡雅琴

提交

1 parent dbdcbbe5
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* @LastEditTime: 2023-07-07 18:01:41 * @LastEditTime: 2023-07-07 18:01:41
--> -->
<template> <template>
<div class="text-box" :style="{'font-size': fontSize + 'px'}">{{ title }}</div> <div class="text-box" :style="{'font-size': fontSize + 'px', 'text-align': textAlign}">{{ title }}</div>
</template> </template>
<script> <script>
...@@ -21,7 +21,8 @@ export default { ...@@ -21,7 +21,8 @@ export default {
fontSize: { fontSize: {
type: Number, type: Number,
default: 24 default: 24
} },
textAlign: String
}, },
data() { data() {
......
...@@ -48,7 +48,7 @@ export default { ...@@ -48,7 +48,7 @@ export default {
sname = 'ViewOperational' sname = 'ViewOperational'
break break
case 'interior': case 'interior':
sname = 'ViewInterior' sname = 'ViewLifeSceneData'
break break
case 'business': case 'business':
sname = 'ViewSolar' sname = 'ViewSolar'
......
<template> <template>
<div class="center"> <div class="center">
<div class="center-top"> <BoxTitle :title="'智能维保'" :textAlign="'center'" class="top-title"></BoxTitle>
</div> <StatisticBox :list="maintenanceStatisData"></StatisticBox>
</div> <NearThread />
</template> </div>
</template>
<script>
export default { <script>
name: 'LifeSceneCenter', import StatisticBox from './components/StatisticBox.vue'
components: { import NearThread from './components/NearThread.vue'
}, import { maintenanceStatisData } from './const/index'
data() { export default {
return {} name: 'LifeSceneCenter',
}, components: {
StatisticBox,
mounted() {}, NearThread
},
methods: {} data() {
} return {
</script> maintenanceStatisData
<style lang="scss" scoped>
.center {
width: 31.67vw;
&-top {
display: flex;
justify-content: space-between;
margin-bottom: 1.78vh;
} }
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.center {
width: 31.67vw;
.top-title {
margin-bottom: 1.48vh;
} }
</style>
\ No newline at end of file \ No newline at end of file
}
</style>
<template> <template>
<div class="left"> <div class="left">
<div class="left-top"> <BoxTitle :title="'智能知识库'" :textAlign="'center'"></BoxTitle>
</div> <div class="left-top">
<div class="left-center"> <KnownlageBase :title="'权益知识库'" :dataObj="equityDataObj" :data="'knownledge1'" />
<AIMerchant /> <KnownlageBase :title="'轻改知识库'" :dataObj="equityDataObj" :data="'knownledge2'" />
</div> <KnownlageBase :title="'延保知识库'" :dataObj="equityDataObj" :data="'knownledge3'" />
</div> </div>
</template> <div class="left-center">
<AIMerchant />
<script> <HotWords />
import AIMerchant from './components/AIMerchant.vue'; </div>
export default { </div>
name: 'LifeSceneLeft', </template>
components: {
AIMerchant <script>
}, import KnownlageBase from './components/KnownlageBase.vue';
data() { import AIMerchant from './components/AIMerchant.vue'
return {} import HotWords from './components/HotWords.vue';
}, import { equityData, equityDataObj } from './const/index'
mounted() {}, export default {
name: 'LifeSceneLeft',
methods: {} components: {
} AIMerchant,
</script> HotWords,
KnownlageBase
<style lang="scss" scoped> },
.left { data() {
width: 31.67vw; return {
&-top { equityData,
display: flex; equityDataObj
justify-content: space-between;
margin-bottom: 1.78vh;
} }
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.left {
width: 31.67vw;
&-top {
display: flex;
justify-content: space-between;
margin-bottom: 1.78vh;
}
&-center {
display: flex;
justify-content: space-between;
margin-bottom: 1.78vh;
} }
</style>
\ No newline at end of file \ No newline at end of file
}
</style>
<template> <template>
<div class="right"> <div class="right">
<div class="right-top"> <BoxTitle :title="'智能营销'" :textAlign="'center'" class="top-title"></BoxTitle>
</div> <StatisticBox :list="marketingStatisData"></StatisticBox>
<div class="right-center">
<BigModuleTrend />
<ActivityRate />
</div> </div>
</template> </div>
</template>
<script>
export default { <script>
name: 'LifeSceneRight', import StatisticBox from './components/StatisticBox.vue'
components: { import BigModuleTrend from './components/BigModuleTrend.vue'
}, import ActivityRate from './components/ActivityRate.vue'
data() { import { marketingStatisData } from './const/index'
return {} export default {
}, name: 'LifeSceneRight',
components: {
mounted() {}, StatisticBox,
BigModuleTrend,
methods: {} ActivityRate
} },
</script> data() {
return {
<style lang="scss" scoped> marketingStatisData
.right {
width: 31.67vw;
&-top {
display: flex;
justify-content: space-between;
margin-bottom: 1.78vh;
} }
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.right {
width: 31.67vw;
.top-title {
margin-bottom: 1.48vh;
}
&-center {
display: flex;
justify-content: space-between;
margin-top: 0.74vh;
} }
</style>
\ No newline at end of file \ No newline at end of file
}
</style>
<template> <template>
<div class="AI-box"> <div class="AI-box">
<BoxTitle :title="'AI对话调用次数及覆盖门店'" :fontSize="18"></BoxTitle> <BoxTitle :title="'AI对话调用次数及覆盖门店'" :fontSize="18"></BoxTitle>
<img class="bottom-line" src="@/assets/images/bottomLine.png" alt=""> <img class="bottom-line" src="@/assets/images/bottomLine.png" alt="" />
<BarLineChart ref="AITalkRef" height="14.35vh" domId="AITalk" :dataList.sync="AIBarLineData"></BarLineChart> <BarLineChart ref="AITalkRef" height="14.35vh" domId="AITalk" :dataList.sync="AIBarLineData"></BarLineChart>
</div> </div>
</template> </template>
<script> <script>
import { AIBarLineData } from "../const/index" import { AIBarLineData } from '../const/index'
import BoxTitle from '../../../components/BoxTitle.vue'; import BoxTitle from '../../../components/BoxTitle.vue'
import BarLineChart from './BarLineChart.vue'; import BarLineChart from './BarLineChart.vue'
export default { export default {
name: 'AIMerchant', name: 'AIMerchant',
components: { BoxTitle, BarLineChart }, components: { BoxTitle, BarLineChart },
data() { data() {
AIBarLineData return {
return { AIBarLineData
}
}; },
},
mounted() { mounted() {},
},
methods: { methods: {}
}
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.AI-box { .AI-box {
width: 21.04vw; width: 21.04vw;
height: 23.8vh; height: 23.8vh;
padding: 1.85vh; padding: 1.85vh;
.bottom-line { .bottom-line {
width: 16.28vw; width: 16.28vw;
} height: 0.23vh;
}
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
<template>
<div class="rate-box">
<BoxTitle :title="'各活动类型占比'" :fontSize="16"></BoxTitle>
<pie-chart :id="chart.id" :keys="chart.keys" :list="activityListData" :height="chart.height" :colors="chart.colors"></pie-chart>
<Legend class="legend" :list="activityListData" :legentList="legentList" :colors="chart.colors"></Legend>
</div>
</template>
<script>
import { activityListData } from "../const/index"
export default {
name: 'ActivityRate',
data() {
return {
chart: {
id: 'shadowPie',
keys: ['isused', 'num'],
height: '17.7vh',
colors: ['#34AFFF', '#16E193']
},
activityListData,
legentList: [
{
name: 'isused',
width: '4vw'
},
{
name: 'rate',
type: 'decimal',
width: '2.5vw'
},
{
name: 'num',
width: '1.88vw'
}
]
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.rate-box {
box-sizing: border-box;
width: 15.94vw;
height: 33.06vh;
background-image: url(../../../assets/images/rate-bg.png);
background-size: 100% 100%;
padding: 3.61vh 1.59vw 2.69vh 1.04vw;
}
</style>
<!--
* @Description: 柱状图
* @Author: huyue
* @Date: 2023-07-07 14:01:42
* @LastEditors: huyue
* @LastEditTime: 2023-07-18 17:30:27
-->
<template>
<div>
<div :id="domId" style="width: 100%;" :style="{ height }"></div>
</div>
</template>
<script type="text/ecmascript-6">
import * as echarts from 'echarts'
import getBarOptions from './BarChartOptions'
import utils from '../../../utils/util'
export default {
name: 'BarChart',
props: {
height: {
type: String
},
domId: {
type: String,
default: 'bar-line'
},
dataList: {
type: Array,
default: () => []
},
tooltipFormatterObj: {
type: Array,
default: () => {
return [
{
label: '数量',
attrName: 'num'
},
{
label: '环比',
attrName: 'hrate',
addSymbol: '%'
},
{
label: '同比',
attrName: 'trate',
addSymbol: '%'
}
]
}
}
},
data() {
return {
barLineOptions: [],
moveAttr: {
// speed: 900,
seriesIndex: 0,
dataIndex: 0
},
timer: null
}
},
created() {
this.barLineOptions = getBarOptions({ tooltipFormatter: this.tooltipFormatter })
},
mounted() {
this.barLineDom = document.getElementById(this.domId)
this[this.domId] = echarts.init(this.barLineDom)
this.chartBindEvent()
},
methods: {
tooltipFormatter(obj) {
var _currentItem = this.dataList[obj[0].dataIndex]
var _html = ''
var _txt = ''
this.tooltipFormatterObj.forEach(item => {
_txt += `<div style="display:flex;"><div style="color: #c9c9c9">${item.label}:</div><div style="color: #fff;">${utils.numAddSymbol(_currentItem[item.attrName])}${item.addSymbol || ''}</div></div>`
})
_html += `<div style="backdrop-filter: blur(4px);background-color: #051526;border: 2px solid;border-image: linear-gradient(90deg, #074989, #30DCFF, #074989) 1;padding: 10px;">
${_txt}
</div>`
return _html
},
drawBar() {
console.log(this.dataList, 222);
this.barLineOptions.xAxis.data = this.dataList.map(item => item.statMonth)
this.barLineOptions.series[0].data = this.dataList.map(item => item.val)
this[this.domId].setOption(this.barLineOptions)
},
chartBindEvent() {
// resize
window.addEventListener('resize', () => {
this[this.domId].resize()
})
}
}
}
</script>
<style scoped lang="scss">
</style>
/*
* @Description:
* @Author: huyue
* @Date: 2023-07-07 14:04:52
* @LastEditors: huyue
* @LastEditTime: 2023-07-11 16:04:06
*/
import * as echarts from 'echarts'
function getBarOptions(obj) {
const { tooltipFormatter } = obj
var barLineOption = {
tooltip: {
trigger: 'axis',
borderWidth: 0,
padding: 0,
formatter: tooltipFormatter || '',
confine: true
},
xAxis: {
data: []
},
yAxis: {
name: '',
type: 'value',
// min: 0,
// max: 100,
splitLine: {
lineStyle: {
color: '#1d2a38'
}
}
},
grid: {
left: '3%',
right: '4%',
top: '20%',
bottom: '6%',
containLabel: true
},
series: [
{
name: 'bar',
type: 'bar',
data: [],
label: {
show: true,
position: 'top',
color: '#fff'
},
itemStyle: {
barBorderRadius: [2, 2, 0, 0], // 柱体圆角
color: function(params) {
return new echarts.graphic.LinearGradient(
0, 0, 0, 1, [{ // 代表渐变色从正上方开始
offset: 0, // offset范围是0~1,用于表示位置,0是指0%处的颜色
color: '#22D8FF'
}, // 柱图渐变色
{
offset: 0.5, // 指100%处的颜色
color: '#223FA9'
},
{
offset: 1, // 指100%处的颜色
color: '#061422'
}]
)
}
}
},
]
}
return barLineOption
}
export default getBarOptions
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import utils from '../../../utils/util'
import * as echarts from 'echarts' import * as echarts from 'echarts'
import getBarLineOptions from './BarLineOptions' import getBarLineOptions from './BarLineOptions'
export default { export default {
...@@ -34,20 +33,6 @@ ...@@ -34,20 +33,6 @@
type: Array, type: Array,
default: () => { default: () => {
return [ return [
{
label: '数量',
attrName: 'num'
},
{
label: '环比',
attrName: 'hrate',
addSymbol: '%'
},
{
label: '同比',
attrName: 'trate',
addSymbol: '%'
}
] ]
} }
} }
...@@ -63,33 +48,18 @@ ...@@ -63,33 +48,18 @@
timer: null timer: null
} }
}, },
// created() {
// this.barLineOptions = getBarLineOptions({ tooltipFormatter: this.tooltipFormatter })
// },
mounted() { mounted() {
this.barLineDom = document.getElementById(this.domId) this.barLineDom = document.getElementById(this.domId)
this[this.domId] = echarts.init(this.barLineDom) this[this.domId] = echarts.init(this.barLineDom)
this.chartBindEvent() this.chartBindEvent()
this.drawBarLine()
}, },
methods: { methods: {
tooltipFormatter(obj) {
var _currentItem = this.dataList[obj[0].dataIndex]
var _html = ''
var _txt = ''
this.tooltipFormatterObj.forEach(item => {
_txt += `<div style="display:flex;"><div style="color: #c9c9c9">${item.label}:</div><div style="color: #fff;">${utils.numAddSymbol(_currentItem[item.attrName])}${item.addSymbol || ''}</div></div>`
})
_html += `<div style="backdrop-filter: blur(4px);background-color: #051526;border: 2px solid;border-image: linear-gradient(90deg, #074989, #30DCFF, #074989) 1;padding: 10px;">
${_txt}
</div>`
return _html
},
drawBarLine() { drawBarLine() {
this.barLineOptions = getBarLineOptions({ tooltipFormatter: this.tooltipFormatter, seriesData: this.dataList }) this.barLineOptions = getBarLineOptions({ tooltipFormatter: this.tooltipFormatter, seriesData: this.dataList })
this.barLineOptions.xAxis.data = this.dataList.map(item => item.month) this.barLineOptions.xAxis.data = this.dataList.map(item => item.statMonth)
this.barLineOptions.series[0].data = this.dataList.map(item => item.data1) this.barLineOptions.series[0].data = this.dataList.map(item => item.outputvalue)
this.barLineOptions.series[1].data = this.dataList.map(item => item.data2) this.barLineOptions.series[1].data = this.dataList.map(item => item.perCusTrans)
this.barLineOptions.series[2].data = this.dataList.map(item => item.data3)
this[this.domId].setOption(this.barLineOptions) this[this.domId].setOption(this.barLineOptions)
}, },
chartBindEvent() { chartBindEvent() {
......
...@@ -13,22 +13,23 @@ function getBarLineOptions(obj) { ...@@ -13,22 +13,23 @@ function getBarLineOptions(obj) {
xAxis: { xAxis: {
data: [] data: []
}, },
barWidth: 14,
yAxis: [ yAxis: [
{ {
name: '¥', name: '单位:万次',
splitLine: { splitLine: {
show: false show: false
} }
}, },
{ {
name: '', name: '单位:家',
type: 'value', type: 'value',
min: 0, min: 0,
max: 100, max: 100,
interval: 20, interval: 20,
axisLabel: { // axisLabel: {
formatter: '{value}%' // formatter: '{value}%'
}, // },
splitLine: { splitLine: {
lineStyle: { lineStyle: {
color: '#1d2a38' color: '#1d2a38'
...@@ -62,58 +63,35 @@ function getBarLineOptions(obj) { ...@@ -62,58 +63,35 @@ function getBarLineOptions(obj) {
return new echarts.graphic.LinearGradient( return new echarts.graphic.LinearGradient(
0, 0, 0, 1, [{ // 代表渐变色从正上方开始 0, 0, 0, 1, [{ // 代表渐变色从正上方开始
offset: 0, // offset范围是0~1,用于表示位置,0是指0%处的颜色 offset: 0, // offset范围是0~1,用于表示位置,0是指0%处的颜色
color: '#22D8FF' color: '#00C8FF'
}, // 柱图渐变色 }, // 柱图渐变色
{ // {
offset: 0.5, // 指100%处的颜色 // offset: 0.5, // 指100%处的颜色
color: '#223FA9' // color: '#223FA9'
}, // },
{ {
offset: 1, // 指100%处的颜色 offset: 1, // 指100%处的颜色
color: '#061422' color: '#0069F2'
}] }]
) )
} }
} }
}, },
{ {
name: 'bar2', name: 'line',
type: 'bar', type: 'line',
min: 100,
label: {
show: true,
position: 'top',
color: '#fff',
formatter: (params) => {
return utils.numAddSymbol(params.value)
}
},
data: [], data: [],
showSymbol: true, // 是否默认展示圆点
symbol: 'circle', // 设定为实心点
symbolSize: 6, // 设定实心点的大小
itemStyle: { itemStyle: {
barBorderRadius: [2, 2, 0, 0], // 柱体圆角 normal: {
color: function(params) { color: '#FFC200', // 改变折线点的颜色
return new echarts.graphic.LinearGradient( lineStyle: {
0, 0, 0, 1, [{ // 代表渐变色从正上方开始 color: '#FFC200' // 改变折线颜色
offset: 0, // offset范围是0~1,用于表示位置,0是指0%处的颜色 }
color: '#2AD191'
}, // 柱图渐变色
{
offset: 0.5, // 指100%处的颜色
color: '#0E958D'
},
{
offset: 1, // 指100%处的颜色
color: '#061422'
}]
)
} }
} }
},
{
name: 'Dynamic Line',
type: 'line',
yAxisIndex: 1,
data: []
} }
] ]
} }
......
<template>
<div class="big-module-box">
<BoxTitle :title="'使用大模型创建活动的趋势'" :fontSize="16"></BoxTitle>
<BarChart ref="bigModuleChartRef" :height="'15.83'" domId="bigModuleChart" :dataList.sync="bigModuleChartDataList"></BarChart>
</div>
</template>
<script>
import { bigModuleChartDataList } from '../const/index'
import BarChart from './BarChart.vue'
export default {
name: 'BigModuleTrend',
components: { BarChart },
data() {
return {
bigModuleChartDataList
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.big-module-box {
box-sizing: border-box;
width: 15.18vw;
height: 33.06vh;
background-image: url(../../../assets/images/big-module-bg.png);
background-size: 100% 100%;
padding: 3.61vh 1.59vw 5.93vh 0.78vw;
}
</style>
<template> <template>
<div> <div class="hot-box">
<di class="tagcloud"></di> <BoxTitle :title="'提问热词'" :fontSize="16"></BoxTitle>
<div class="tagcloud"></div>
</div> </div>
</template> </template>
<script> <script>
import BoxTitle from '../../../components/BoxTitle.vue'
const texts = ['3D', 'TagCloud', 'JavaScript', 'CSS3', 'Animation', 'Interactive', 'Mouse', 'Rolling', 'Sphere', '6KB', 'v2.x'] const texts = ['3D', 'TagCloud', 'JavaScript', 'CSS3', 'Animation', 'Interactive', 'Mouse', 'Rolling', 'Sphere', '6KB', 'v2.x']
import TagCloud from 'TagCloud' import TagCloud from 'TagCloud'
export default { export default {
name: 'HotWords', name: 'HotWords',
components: {BoxTitle},
data() { data() {
return {} return {}
}, },
...@@ -18,12 +21,16 @@ export default { ...@@ -18,12 +21,16 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.hot-box {
width: 10.31vw;
height: 23.8vh;
}
.tagcloud { .tagcloud {
width: 16vw; width: 8.85vw !important;
height: 16vw; height: 8.85vw !important;
background-image: url(../../assets/images/hot-words-bg.png); background-image: url(../../../assets/images/hot-words-bg.png);
background-size: 100%; background-size: 100% 100%;
span { span {
color: #5894FF; color: #5894FF;
background-image: -webkit-linear-gradient(left, #0185F9, #53FAFF); background-image: -webkit-linear-gradient(left, #0185F9, #53FAFF);
......
<template>
<div class="knownledge-box">
<BoxTitle :title="title" :fontSize="16"></BoxTitle>
<!-- <LineChartsVue :ref="lineId" height="8.61vh" :domId="lineId" :dataList.sync="data"></LineChartsVue> -->
<img class="trend-img" :src="require(`../../../assets/images/${data}.png`)" alt="" />
<div class="bottom-data">
<div>
<div class="title">知识条数</div>
<div class="text">{{ dataObj.KnownledgeNum }}</div>
</div>
<div>
<div class="title">提问数</div>
<div class="text">{{ dataObj.askNum }}</div>
</div>
</div>
</div>
</template>
<script>
// import LineChartsVue from './LineCharts.vue';
export default {
name: 'KnownlageBase',
props: {
title: String,
data: String,
dataObj: Object,
lineId: String
},
components: {
// LineChartsVue
},
data() {
return {}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.knownledge-box {
width: 10.31vw;
// height: 19.72vh;
padding: 1.85vh;
.trend-img {
height: 8.61vh;
}
.bottom-data {
display: flex;
justify-content: space-between;
.title {
font-weight: 500;
font-size: 14px;
color: #e8e8e8;
}
.text {
font-weight: 700;
font-size: 18px;
background: linear-gradient(to right, #01a4f9, #6df5f9); /* 从左到右渐变 */
-webkit-background-clip: text; /* Safari/Chrome支持该属性 */
color: transparent; /* 将文本颜色设置为透明 */
}
}
}
</style>
<template>
<div :id="domId" style="width: 100%" :style="{ height }"></div>
</template>
<script type="text/ecmascript-6">
import * as echarts from 'echarts'
import getLineOptions from './LineOptions'
export default {
name: 'LineCharts',
props: {
height: {
type: String
},
dataList: {
type: Array,
default: () => []
},
domId: {
type: String,
default: 'line'
},
tooltipFormatterObj: {
type: Array,
default: () => {}
},
valName: {
type: String,
default: 'val'
}
},
data() {
return {}
},
mounted() {
this.barLineDom = document.getElementById(this.domId)
this[this.domId] = echarts.init(this.barLineDom)
this.chartBindEvent()
this.drawBarLine()
},
methods: {
drawBarLine() {
console.log(this.dataList);
this.barLineOptions = getLineOptions()
this.barLineOptions.series[0].data = this.dataList.map(item => item.val)
},
chartBindEvent() {
// resize
window.addEventListener('resize', () => {
this[this.domId].resize()
})
}
}
}
</script>
<style lang="scss" scoped></style>
\ No newline at end of file \ No newline at end of file
function getLineOptions() {
var LineOption = {
series: [
{
name: 'line',
type: 'line',
data: [],
smooth: true,
showSymbol: false,
itemStyle: { color: 'red' },
lineStyle: { width: 3, color: 'red' },
areaStyle: { color: 'rgba(27, 179, 137, 0.1)' }
}
]
}
return LineOption
}
export default getLineOptions
<template>
<div class="near-thread-box">
<BoxTitle :title="'近12个月的线索推送情况'" :fontSize="18"></BoxTitle>
<img class="bottom-line" src="@/assets/images/bottomLine.png" alt="" />
<BarChart ref="nearThreadChartRef" :height="'22.83'" domId="nearThreadChart" :dataList.sync="nearThreadDataList"></BarChart>
</div>
</template>
<script>
import { nearThreadDataList } from '../const/index'
import BarChart from './BarChart.vue'
export default {
name: 'NearThread',
components: { BarChart },
data() {
return {
nearThreadDataList
}
},
mounted() {
this.$refs.nearThreadChartRef.drawBar()
},
methods: {}
}
</script>
<style lang="scss" scoped>
.near-thread-box {
width: 31.67vw;
height: 35.37vh;
padding: 1.85vh;
.bottom-line {
width: 16.28vw;
height: 0.23vh;
}
}
</style>
...@@ -3,27 +3,7 @@ ...@@ -3,27 +3,7 @@
<div class="statistics-item" v-for="(item, index) in list" :key="index" :style="{'width': 100 / list.length + '%'}"> <div class="statistics-item" v-for="(item, index) in list" :key="index" :style="{'width': 100 / list.length + '%'}">
<div class="statistics-top"> <div class="statistics-top">
<div class="statistics-name">{{item.name}}</div> <div class="statistics-name">{{item.name}}</div>
<div class="statistics-price"><span class="statistics-unit" v-if="item.unitType == 'left'">{{item.unit}}</span><span class="statistics-price-number">{{numAddSymbol(item.value)}}</span><span v-if="item.unitType == 'right'">{{item.unit}}</span></div> <div class="statistic-text">{{numAddSymbol(item.value)}}{{ item.unit }}</div>
<div v-if="item.rate" class="statistics-top-rate">占比<span>{{item.rate}}%</span></div>
</div>
<div class="statistics-bottom" v-if="item.bottomLabel || item.bottomType">
<template v-if="item.bottomType == 'money'">
<span> {{item.bottomLabel}}</span>
<span>¥{{numAddSymbol(item.bottomValue)}}</span>
</template>
<template v-else-if="item.bottomType == 'slot'">
<slot :name="item.valueName" :[item.valueName]="item"></slot>
</template>
<template v-else-if="item.bottomType == 'ratio'">
<div class="ratio">
<div class="ratio-left">{{item.ratioLeftLabel}}<span :class="item.ratioLeftValue > 0 ? 'positive' : 'negative'">{{item.ratioLeftValue}}%</span></div>
<div class="ratio-right">{{item.ratioRightLabel}}<span :class="item.ratioRightValue > 0 ? 'positive' : 'negative'">{{item.ratioRightValue}}%</span></div>
</div>
</template>
<template v-else>
<span>{{item.bottomLabel}}</span>
<span>{{numAddSymbol(item.bottomValue)}}</span>
</template>
</div> </div>
</div> </div>
</div> </div>
...@@ -55,81 +35,18 @@ ...@@ -55,81 +35,18 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.statistics { .statistics {
display: flex; display: flex;
color: #fff; height: 8.15vh;
height: 11.78vh; color: #E8E8E8;
&-item { &-item {
padding: 0.89vh 0.53vw; width: 10.26vw;
margin-right: 1.11vw; padding: 1.48vh 1.04vw;
background: #061422; margin-right: 0.42vw;
box-shadow: inset 0 0 20px 0 #3d57ff69; background-image: url(../../../assets/images/statistic-bg.png);
background-size: 100% 100%;
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
} }
} }
&-top {
position: relative;
padding-left: 0.3vw;
&-rate {
position: absolute;
right: 0;
top: 0;
font-size: 12px;
color: #95ACD9;
span {
color: #EB6001;
}
}
}
&-name {
font-weight: 500;
font-size: 14px;
margin-bottom: 0.89vh;
height: 2.22vh;
}
&-unit {
padding-right: 0.56vw;
}
&-price {
display: flex;
align-items: center;
color: #25D6FF;
font-weight: 600;
font-size: 14px;
height: 3.11vh;
&-number {
padding-right: 0.56vw;
font-size: 20px;
color: #5894FF;
background-image:-webkit-linear-gradient(left,#24D8FF,#7787FF);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
}
}
&-bottom {
display: flex;
justify-content: space-between;
font-size: 12px;
color: #95ACD9;
border-top: 1px solid #2A3D72;
padding: 0.89vh 0.3vw 0;
margin-top: 0.89vh;
.ratio {
display: flex;
width: 100%;
justify-content: space-between;
.positive,
.negative{
display: inline-block;
margin-left: 0.28vw;
}
.positive {
color: #EB6001;
}
.negative {
color: #16E193;
}
}
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
const AIBarLineData = [ const AIBarLineData = [
{ {
statMonth: '2023-10', statMonth: '2023-10',
outputvalue: 2032486.1, outputvalue: 352,
perCusTrans: 1347.8, perCusTrans: 158
conversionRate: 55.0
}, },
{ {
statMonth: '2023-11', statMonth: '2023-11',
outputvalue: 2032486.1, outputvalue: 189,
perCusTrans: 1347.8, perCusTrans: 255
conversionRate: 55.0
}, },
{ {
statMonth: '2023-12', statMonth: '2023-12',
outputvalue: 2032486.1, outputvalue: 580,
perCusTrans: 1347.8, perCusTrans: 286
conversionRate: 55.0
}, },
{ {
statMonth: '2024-01', statMonth: '2024-01',
outputvalue: 2032486.1, outputvalue: 685,
perCusTrans: 1347.8, perCusTrans: 311
conversionRate: 55.0
}, },
{ {
statMonth: '2024-02', statMonth: '2024-02',
outputvalue: 2032486.1, outputvalue: 185,
perCusTrans: 1347.8, perCusTrans: 258
conversionRate: 55.0
}, },
{ {
statMonth: '2024-03', statMonth: '2024-03',
outputvalue: 2032486.1, outputvalue: 177,
perCusTrans: 1347.8, perCusTrans: 457
conversionRate: 55.0
} }
] ]
const equityDataObj = {
KnownledgeNum: 8712,
askNum: 15820
}
const equityData = [
{
statMonth: '2023-10',
val: 10
},
{
statMonth: '2023-11',
val: 9
},
{
statMonth: '2023-12',
val: 50
},
{
statMonth: '2024-01',
val: 30
},
{
statMonth: '2024-02',
val: 10
}
]
const maintenanceStatisData = [
{
name: '网联设备数',
value: 1700,
unit: '个'
},
{
name: '覆盖门店数',
value: 80,
unit: '场'
},
{
name: '线索推送数',
value: 1620,
unit: '场'
}
]
const marketingStatisData = [
{
name: '覆盖门店数',
value: 1700,
unit: '个'
},
{
name: '生成的活动数',
value: 80,
unit: '场'
},
{
name: '触达的客户数',
value: 1620,
unit: '人'
}
]
const nearThreadDataList = [
{
statMonth: '23.11',
val: 10
},
{
statMonth: '23.12',
val: 9
},
{
statMonth: '23.13',
val: 50
},
{
statMonth: '23.14',
val: 30
},
{
statMonth: '23.15',
val: 10
},
{
statMonth: '23.15',
val: 10
},
{
statMonth: '23.15',
val: 10
},
{
statMonth: '23.15',
val: 10
},
{
statMonth: '23.15',
val: 10
}
]
const activityListData = [
{
isused: "精品升级",
num: 36,
rate: 360
},
{
isused: "权益升级",
num: 28,
rate: 280
},
{
isused: "售后团购",
num: 24,
rate: 240
},
{
isused: "节假日关怀",
num: 12,
rate: 120
}
]
const bigModuleChartDataList = [
{
statMonth: '23.11',
val: 10
},
{
statMonth: '23.12',
val: 9
},
{
statMonth: '23.13',
val: 50
},
{
statMonth: '23.14',
val: 30
},
{
statMonth: '23.15',
val: 10
},
]
export { export {
AIBarLineData AIBarLineData,
equityData,
equityDataObj,
maintenanceStatisData,
nearThreadDataList,
marketingStatisData,
activityListData,
bigModuleChartDataList
} }
\ 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!