diff --git a/src/views/big-screen/model-components/center-model.vue b/src/views/big-screen/model-components/center-model.vue index f8bde3a..9a6822f 100644 --- a/src/views/big-screen/model-components/center-model.vue +++ b/src/views/big-screen/model-components/center-model.vue @@ -6,7 +6,7 @@
-
+
入驻装备数
@@ -16,7 +16,7 @@
-
+
上架装备数
@@ -26,7 +26,7 @@
-
+
装备总类型数
@@ -36,7 +36,7 @@
-
+
保养告警
@@ -50,11 +50,11 @@
-
+
-
+
{{ maTypeLeasingNum }} @@ -64,7 +64,7 @@
在租赁种类
-
+
{{ devLeasingNum }} @@ -74,7 +74,7 @@
在租装备数
-
+
{{ devRepairingNum }} @@ -84,7 +84,7 @@
在修装备数
-
+
{{ devUsageRatio }}% @@ -96,11 +96,11 @@
-
+
-
+
{{ leaseNum }} @@ -120,7 +120,7 @@
需求装备种类
-
+
第一
{{ topPopularTypeName }} diff --git a/src/views/big-screen/model-components/right-one-model.vue b/src/views/big-screen/model-components/right-one-model.vue index ec728dc..4153222 100644 --- a/src/views/big-screen/model-components/right-one-model.vue +++ b/src/views/big-screen/model-components/right-one-model.vue @@ -13,23 +13,28 @@ import * as echarts from 'echarts' const getDeviceShareRankingData = async () => { const { data: res }: any = await getDeviceShareRankingApi() + console.log('🚀 ~ getDeviceShareRankingData ~ res:', res) chartData.value = res.map((e: any) => e.comName.length > 6 ? e.comName.slice(0, 6) + '...' : e.comName, ) chartDataNew.value = res.map((e: any) => e.comName) + state.value = res.map((e: any) => e.deviceCount) + console.log('🚀 ~ getDeviceShareRankingData ~ state.value:', state.value) } getDeviceShareRankingData() const chartData = ref([]) const chartDataNew = ref([]) +const state = ref([]) const echartsRef = ref(null) const initEChart = () => { + console.log('🚀 ~ initEChart ~ state.value:', state.value) const chart = echarts.init(echartsRef.value) const opt = { index: 0, } - var data = [50, 60, 70, 20, 30, 30] + var data: any = state.value var className = chartData.value var colorArray = [ { diff --git a/src/views/big-screen/model-components/right-three-model.vue b/src/views/big-screen/model-components/right-three-model.vue index ae4accb..6b77f78 100644 --- a/src/views/big-screen/model-components/right-three-model.vue +++ b/src/views/big-screen/model-components/right-three-model.vue @@ -18,10 +18,10 @@ const getLeaseCountByPublishCompanyData = async () => { pieData.value = res.map((e: any) => { return { value: e.leaseCount, - name: - e.publishCompany.length > 6 - ? e.publishCompany.slice(0, 6) + '..' - : e.publishCompany, + name: e.publishCompany, + // e.publishCompany.length > 6 + // ? e.publishCompany.slice(0, 6) + '..' + // : e.publishCompany, } }) } @@ -58,6 +58,9 @@ const initCharts = () => { formatter: (name: any) => { if (pieData.value.length) { const item: any = pieData.value.filter((item: any) => item.name === name)[0] + if (name.length > 6) { + name = name.slice(0, 6) + '..' + } return `{name|${name}}{value| ${item.value}} {rate| 台}` } }, @@ -185,7 +188,7 @@ const initCharts = () => { position: 'center', }, emphasis: { - show: true, + show: false, textStyle: { fontSize: '14', // fontWeight: 'bold', @@ -197,7 +200,10 @@ const initCharts = () => { show: false, }, }, - data: [25, 25, 25, 25, 25, 25], + data: [0, 0, 0, 0, 0, 0, 0, 0], + tooltip: { + show: false, + } }, ], } @@ -255,7 +261,7 @@ onMounted(() => { flex: 1; background: url('@/assets/img/screen/bg_1.png') no-repeat; background-size: 100% 100%; - + z-index: 100; // background-color: orange; } @@ -265,7 +271,7 @@ onMounted(() => { left: 20%; width: 80px; height: 80px; - // z-index: 10; + z-index: 1; background: url('@/assets/img/screen/right_3.png') no-repeat; background-size: 100% 100%; }