This commit is contained in:
lzttt 2024-10-25 18:19:03 +08:00
parent 89c2467bb5
commit 95e1202e73
2 changed files with 42 additions and 12 deletions

View File

@ -1,15 +1,19 @@
<template> <template>
<div class="container_"> <div class="container_">
<div class="top-list"> <div class="top-list">
<div class="list-box" v-for="item in serviceList" :span="4"> <div class="list-box" v-for="(item, index) in serviceList.slice(0, 4)" :key="item.id" :span="4">
<div @click="goRoute(item.id)"> <div @click="goRoute(item.id)">
<img :src=" imgUrl + item.coverImg" style="width: 300px; height: 300px;"> <img :src="index === 0 ? 'https://th.bing.com/th/id/OIP.Y9YEwiwLwTdvQDkLlA3JbQHaE8?w=251&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7' :
<!-- <image-preview :width="300" :height="300" :src="item.coverImg"></image-preview>--> index === 1 ? 'https://th.bing.com/th/id/OIP.a8bAOOXWZ_G0POGjCXPYbgHaFj?w=206&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7' :
<div style="font-weight: bold;text-align: center;font-size: 25px">{{ item.name }}</div> index === 2 ? 'https://th.bing.com/th/id/OIP.9vxxtCP1lmu43fYus2SZ5gHaE7?w=284&h=189&c=7&r=0&o=5&dpr=1.5&pid=1.7' :
'https://th.bing.com/th/id/OIP.MwxN9-_jrMRNiVLJ9Q7WRQHaE8?w=265&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7'"
style="width: 300px; height: 300px;">
<div style="font-weight: bold;text-align: center;font-size: 28px">{{ item.name }}</div>
</div>
</div>
</div> </div>
</div>
</div>
<div class="container-box"> <div class="container-box">
<div class="flex-box"> <div class="flex-box">
@ -188,6 +192,7 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 25px; margin-bottom: 25px;
flex-wrap: wrap;
} }
.list-box{ .list-box{
background: #fff; background: #fff;

View File

@ -472,21 +472,46 @@ export default {
} }
const res = await jcBigScreen.chartLineInspectionAmount(params); const res = await jcBigScreen.chartLineInspectionAmount(params);
res.data.series.forEach(item => { res.data.series.forEach(item => {
// console.log( '475'+ JSON.stringify(res.data.series[0].data))
item.type = 'line' item.type = 'line'
}) })
var chartDom = document.getElementById('khly'); var chartDom = document.getElementById('khly');
var myChart = echarts.init(chartDom); var myChart = echarts.init(chartDom);
var option; var option;
const color = ['#31daf0', '#3367e6', '#d9458d', ];
option = { option = {
xAxis: { legend: {
type: 'category', top: 'bottom'
data: res.data.categories
}, },
yAxis: { toolbox: {
type: 'value' show: true,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: traue },
saveAsImage: { show: true }
}
}, },
series: res.data.series series: [
{
name: 'Nightingale Chart',
type: 'pie',
radius: [20, 50],
center: ['50%', '50%'],
roseType: 'area',
itemStyle: {
borderRadius: 8
},
data: [
{ value: 40, name: 'rose 1' },
{ value: 38, name: 'rose 2' },
{ value: 32, name: 'rose 3' }
]
}
]
}; };
option && myChart.setOption(option); option && myChart.setOption(option);
}, },
/** /**