From 09f0861e61e69e2d818eafc7b9edbd17cf0822d4 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期四, 06 十一月 2025 17:20:02 +0800
Subject: [PATCH] 页面优化以及扣分详情导出
---
src/views/home/data-video/index.vue | 76 ++++++++++++++++++++++++++++++-------
1 files changed, 61 insertions(+), 15 deletions(-)
diff --git a/src/views/home/data-video/index.vue b/src/views/home/data-video/index.vue
index b152a69..b82a11d 100644
--- a/src/views/home/data-video/index.vue
+++ b/src/views/home/data-video/index.vue
@@ -10,10 +10,22 @@
</el-option>
</el-select>
</div>
- <div >
+ <div style="margin-right: 20px" >
<el-date-picker v-model="date" format="yyyy-MM" value-format="yyyy-MM" type="month" placeholder="閫夋嫨鏈堜唤"
@change="dateChange">
</el-date-picker>
+ </div>
+ <div style="margin-right: 20px">
+ <el-select v-model="params.area" placeholder="鍖哄幙" @change="getChart" clearable>
+ <el-option v-for="item in areaOption" :key="item.label" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
+ </div>
+ <div>
+ <el-select v-model="params.constructionType" @change="getChart" clearable placeholder="鍒嗗缓绫诲瀷">
+ <el-option v-for="(item,index) in constructionTypeList" :key="index" :label="item.label" :value="item.value">
+ </el-option>
+ </el-select>
</div>
</div>
<div class="chart-container">
@@ -34,6 +46,14 @@
name: 'DataVideo',
data() {
return {
+ constructionTypeList:[
+ { label:'涓�浜屾湡',value:'PHASE_ONE_TWO' },
+ { label:'涓夋湡',value:'PHASE_THREE' },
+ { label:'鍥涘尯浜鸿劯',value:'PHASE_FOURTH' },
+ { label:'涓滈儴鏂板煄',value:'EASTERN_NEW_CITY' },
+ { label:'娌挎哗浜屾湡浜鸿劯',value:'YAN_TAN_PHASE_TWO_FACE' },
+ { label: '鍏ュ窛鍗虫',value: 'CHECK_ENTER_SICHUAN'}
+ ],
date: '',
params: {
month: '',
@@ -41,6 +61,15 @@
options: [
{label: '鐪佸巺', value: 1},
{label: '鍏畨閮�', value: 2}
+ ],
+ areaOption:[
+ {label:'鑷祦浜曞尯',value:'510302'},
+ {label:'璐′簳鍖�',value:'510303'},
+ {label:'澶у畨鍖�',value:'510304'},
+ {label:'娌挎哗鍖�',value:'510311'},
+ {label:'鑽e幙',value:'510321'},
+ {label:'瀵岄『鍘�',value:'510322'},
+ {label:'楂樻柊鍖�',value:'510399'},
],
dataList: [],
}
@@ -91,7 +120,7 @@
initChart(data) {
const dataList = this.groupByData(data.list);
const baseLine = data.baseLine == null ? 0 : data.baseLine;
- const colors = ['#5470C6', '#66CC99', '#EE6666'];
+ const colors = ['#EE6666', '#66CC99', '#f8c87a'];
option = {
color: colors,
tooltip: {
@@ -127,14 +156,14 @@
}
},
grid: {
- left: 10,
+ left: 15,
right: 0,
bottom: 0,
- top: '20%',
+ top:'10%',
containLabel: true
},
legend: {
- data: ['鐐逛綅鍦ㄧ嚎', '褰曞儚瀹屾暣', '褰曞儚缂哄け']
+ data: ['鐐逛綅鍦ㄧ嚎', '褰曞儚瀹屾暣', '褰曞儚缂哄け','鏃犲綍鍍�']
},
xAxis: [
{
@@ -172,7 +201,7 @@
axisLine: {
show: true,
lineStyle: {
- color: colors[0]
+ color: '#5470C6'
}
},
axisLabel: {
@@ -208,7 +237,9 @@
name: '褰曞儚瀹屾暣',
yAxisIndex: 0,
type: 'bar',
- data: data.list.map(item => {
+ data:
+
+ data.list.map(item => {
return item['integrityNum'];
})
},
@@ -217,9 +248,27 @@
type: 'bar',
yAxisIndex: 0,
data: data.list.map(item => {
- return item['loseNum'];
+ return {
+ value: item['loseNum'],
+ itemStyle:{
+ color: '#f8c87a',
+ }
+ }
})
},
+ {
+ name: '鏃犲綍鍍�',
+ type: 'bar',
+ yAxisIndex: 0,
+ data: data.list.map(item => {
+ return {
+ value :item['errNum'],
+ itemStyle:{
+ color: '#EE6666',
+ }}
+ })
+ },
+
{
name: '鐐逛綅鍦ㄧ嚎',
type: 'line',
@@ -276,7 +325,6 @@
.data-chart-container {
height: 400px;
margin-bottom: 20px;
-
.data-card {
height: 100%;
@@ -289,12 +337,11 @@
}
.title-container {
- position: absolute;
display: flex;
- justify-content: space-between;
align-items: center;
- z-index: 2;
-
+ padding: 15px 20px; /* 鍐呰竟璺濇帶鍒堕珮搴﹀拰杈硅窛 */
+ background: #fff;
+ border-bottom: 1px solid #eee; /* 鍒嗛殧绾垮寮鸿瑙夊垎绂� */
.more-button {
cursor: pointer;
font-size: 16px;
@@ -303,9 +350,8 @@
}
.chart-container {
-
width: 100%;
- height: 100%;
+ height: 80%;
#chartContent {
width: 100%;
--
Gitblit v1.8.0