From 967a6b721439c48f25ec20a270f23f4dfb1bdb7b Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期二, 19 三月 2024 16:49:23 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/screen/components/screen-examine/components/examine-chart.vue | 74 ++- src/views/screen/components/screen-video/index.vue | 206 +++++------ src/api/platform/vehicle-data-monitor.js | 44 ++ src/views/system/data-manage/index.vue | 55 +++ src/views/screen/components/screen-wrapper/index.vue | 8 src/views/screen/components/screen-examine/components/examine-hola.vue | 157 ++++++++ src/views/screen/components/screen-car/index.vue | 117 ++++++ src/views/system/vehicle-data-monitor/index.vue | 316 +++++++++++++++++ src/views/screen/components/screen-examine/index.vue | 5 src/views/screen/components/screen-face/index.vue | 87 ---- 10 files changed, 845 insertions(+), 224 deletions(-) diff --git a/src/api/platform/vehicle-data-monitor.js b/src/api/platform/vehicle-data-monitor.js new file mode 100644 index 0000000..3be6f2c --- /dev/null +++ b/src/api/platform/vehicle-data-monitor.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 鏌ヨ鍗″彛杩囪溅鏁版嵁涓�鑷存�у垪琛� +export function listPlatform(query) { + return request({ + url: '/platform/platform/list', + method: 'get', + params: query + }) +} + +// 鏌ヨ鍗″彛杩囪溅鏁版嵁涓�鑷存�ц缁� +export function getPlatform(id) { + return request({ + url: '/platform/platform/' + id, + method: 'get' + }) +} + +// 鏂板鍗″彛杩囪溅鏁版嵁涓�鑷存�� +export function addPlatform(data) { + return request({ + url: '/platform/platform', + method: 'post', + data: data + }) +} + +// 淇敼鍗″彛杩囪溅鏁版嵁涓�鑷存�� +export function updatePlatform(data) { + return request({ + url: '/platform/platform', + method: 'put', + data: data + }) +} + +// 鍒犻櫎鍗″彛杩囪溅鏁版嵁涓�鑷存�� +export function delPlatform(id) { + return request({ + url: '/platform/platform/' + id, + method: 'delete' + }) +} diff --git a/src/views/screen/components/screen-car/index.vue b/src/views/screen/components/screen-car/index.vue index 76da509..a8a6446 100644 --- a/src/views/screen/components/screen-car/index.vue +++ b/src/views/screen/components/screen-car/index.vue @@ -1,19 +1,130 @@ <template> <div class="car-container"> - <wrapper-title :title="'浜鸿劯鏁版嵁瓒嬪娍'"></wrapper-title> + <wrapper-title :title="'杞﹁締璁惧鏁版嵁'"></wrapper-title> + <div class="car-content"> + <div class="data-plane"> + <dv-border-box-13 class="plane"> + <div class="data-item"> + <div class="data-icon"> + <img src="@/assets/images/screen/icon/icon1.png" alt="" class="width-img"> + </div> + <div class="data-info"> + <div class="data-lable">璁惧鎬绘暟</div> + <div class="data-num">{{ formatNumber(1123) }}</div> + </div> + </div> + </dv-border-box-13> + + <dv-border-box-13 class="plane"> + <div class="data-item"> + <div class="data-icon"> + <img src="@/assets/images/screen/icon/icon2.png" alt="" class="width-img"> + </div> + <div class="data-info"> + <div class="data-lable">璁惧姝e父鏁�</div> + <div class="data-num">{{ formatNumber(200000) }}</div> + </div> + </div> + </dv-border-box-13> + + <dv-border-box-13 class="plane"> + <div class="data-item"> + <div class="data-icon"> + <img src="@/assets/images/screen/icon/icon2.png" alt="" class="width-img"> + </div> + <div class="data-info"> + <div class="data-lable">璁惧寮傚父鏁�</div> + <div class="data-num">{{ formatNumber(112313141111) }}</div> + </div> + </div> + </dv-border-box-13> + </div> + + </div> </div> + </template> <script> import WrapperTitle from '../wrapper-title/index'; - export default { name: 'ScreenCar', components: { WrapperTitle }, + data() { + return { + dataList: { + state: { '01:00': 1000, '02:00': 2131, '03:00': 1233, '04:00': 2132, '05:00': 3211, '06:00': 213, '07:00': 123, '08:00': 566 }, + state2: { '01:00': 900, '02:00': 1131, '03:00': 1533, '04:00': 2132, '05:00': 3011, '06:00': 13, '07:00': 113, '08:00': 566 }, + }, + } + }, + + methods: { + formatNumber(value) { + return new Intl.NumberFormat('en-US').format(value); + } + }, + + mounted() { + }, + beforeDestroy() { + }, } </script> -<style lang="scss" scoped></style> \ No newline at end of file +<style lang="scss" scoped> +.car-container { + width: 100%; + height: fit-content; + display: flex; + flex-direction: column; +} + +.car-content { + flex: 1; + background: rgba(67, 102, 155, 0.3); + border: 1px solid rgba(47, 91, 157, 0.8); + + .plane { + margin-bottom: 10px; + } + + .data-plane { + .data-item { + width: 100%; + padding: 10px 20px; + display: flex; + align-items: center; + + .data-icon { + width: 40px; + margin: 0 20px; + } + + .data-info { + flex: 1; + color: #5b83bd; + font-size: 16px; + + .data-num { + margin-top: 5px; + font-size: 24px; + color: #fff; + } + } + } + } + + #faceChart { + width: 100%; + height: 300px; + } +} + +.width-img { + width: 100%; +} +</style> \ No newline at end of file diff --git a/src/views/screen/components/screen-examine/components/examine-chart.vue b/src/views/screen/components/screen-examine/components/examine-chart.vue index 0a6b467..3146d3d 100644 --- a/src/views/screen/components/screen-examine/components/examine-chart.vue +++ b/src/views/screen/components/screen-examine/components/examine-chart.vue @@ -1,61 +1,73 @@ <template> <div class="chart-container"> - <div class="rank-chart" ref="rankChart"></div> + <div class="rank-chart"> + <div class="hola-item" v-for="item in dataList" :key="item.id"> + <examine-hola :startColor="'#02C77E'" :endColor="'#017770'" :centerValue="item.value" + :bottomTitle="item.name"></examine-hola> + </div> + </div> </div> </template> <script> import * as echarts from 'echarts'; +import ExamineHola from './examine-hola.vue'; let barChart = null; export default { name: 'ExamineChart', + components: { + ExamineHola + }, data() { return { - + dataList: [ + {id: 1,name: '骞冲彴鍦ㄧ嚎鐜�', value: 60}, + {id: 2,name: '涓�鏈轰竴妗e悎鏍肩巼', value: 20}, + {id: 3,name: '妗f鑰冩牳姣�', value: 60}, + {id: 4,name: '鐐逛綅鍦ㄧ嚎鐜�', value: 40}, + {id: 5,name: '褰曞儚鍙敤鐜�', value: 80}, + {id: 6,name: '閲嶇偣鐐逛綅褰曞儚鍙敤鐜�', value: 20}, + {id: 7,name: '鏍囨敞姝g‘鐜�', value: 24}, + {id: 8,name: '瑙嗗浘搴撳鎺ョǔ瀹氭��', value: 25}, + {id: 9,name: '淇℃伅閲囬泦鍑嗙‘鐜�', value: 75}, + {id: 10,name: '杞﹁締鍗″彛璁惧鏃堕挓鍑嗙‘鎬�', value: 12}, + {id: 11,name: '璁惧鎶撴媿鍥剧墖鏃堕挓鍑嗙‘鎬�', value: 82}, + {id: 12,name: '浜鸿劯鍗″彛淇℃伅閲囬泦鍑嗙‘鐜�', value: 13}, + {id: 13,name: '璁惧鎶撴媿鍥剧墖鍚堟牸鎬�', value: 91}, + {id: 14,name: '璁惧鎶撴媿鍥剧墖鏃堕挓鍑嗙‘鎬�', value: 12}, + {id: 15,name: '骞冲彴鍦ㄧ嚎鐜�', value: 42}, + ] } }, methods: { - initChart() { - const options = { - xAxis: { - type: 'category', - data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] - }, - yAxis: { - type: 'value' - }, - series: [ - { - data: [120, 200, 150, 80, 70, 110, 130], - type: 'bar' - } - ] - } - barChart.setOption(options,true); - } + + }, mounted() { - barChart = echarts.init(this.$refs.rankChart); - - this.initChart(); - }, - beforeDestroy() { - if (lineChart) { - barChart.dispose(); - } - }, - + } } </script> <style lang="scss" scoped> .chart-container { width: 100%; - height: 400px; + height: 100%; + .rank-chart { width: 100%; height: 100%; + display: flex; + justify-content: space-between; + flex-wrap: wrap; + align-content: space-between; + + .hola-item { + flex-shrink: 0; + width: 180px; + height: 150px; + color: #008000 + } } } </style> \ No newline at end of file diff --git a/src/views/screen/components/screen-examine/components/examine-hola.vue b/src/views/screen/components/screen-examine/components/examine-hola.vue new file mode 100644 index 0000000..e034ab7 --- /dev/null +++ b/src/views/screen/components/screen-examine/components/examine-hola.vue @@ -0,0 +1,157 @@ +<template> + <!-- 杩涘害鏉$被鍨嬬粍浠� --> + <div class="progressChart"> + <div class="chart" id="progressChart" ref="chartRef"></div> + <label class="bottom le-0-font">{{ bottomTitle }}</label> + </div> +</template> +<script> +import * as echarts from 'echarts'; +export default { + data() { + return { + series: [ + { + type: 'gauge', // 浠〃鐩樼被鍨� + name: '绯诲垪鍚嶇О', // 鐢ㄤ簬tooltip鐨勬樉绀� + startAngle: 90, // 浠〃鐩樺紑濮嬭搴︼紙璁剧疆鑳屾櫙鍦嗙殑瑙掑害锛� + endAngle: -270, // 浠〃鐩樼粨鏉熻搴� + center: ['50%', '50%'], // 涓績鐐癸紙鍦嗗績鍧愭爣锛� + radius: '100%', // 鍦嗗ぇ灏忥紙浠〃鐩樺崐寰勶級 + clockwise: true, // 浠〃鐩樺埢搴︽槸鍚︽槸椤烘椂閽堝闀� + // 浠〃鐩樿酱绾跨浉鍏抽厤缃� + axisLine: { + show: true, + roundCap: false, // 涓ょ鏄剧ず鎴愬渾褰紙鑳屾櫙鐜級 + clip: false, // 鏄惁瑁佸壀瓒呭嚭閮ㄥ垎 + // 璁剧疆鑳屾櫙鍦嗙幆鏍峰紡 + lineStyle: { + width: 10, // 鍦嗙幆瀹藉害 + color: [[1, '#002865']] // 鍦嗙幆鑳屾櫙鑹� + } + }, + // 浠〃鐩樻寚閽� + pointer: { + show: false + }, + // 杩涘害璁剧疆 + progress: { + show: true, + overlap: false, // 澶氱粍鏁版嵁鏃惰繘搴︽潯鏄惁閲嶅彔 + roundCap: true, // 鏄惁鍦ㄤ袱绔樉绀烘垚鍦嗗舰 + clip: false, // 鏄惁瑁佹帀瓒呭嚭閮ㄥ垎 + // 杩涘害鏉℃牱寮� + itemStyle: { + borderWidth: 0, + shadowColor: '', + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [ + { + offset: 0, + color: this.startColor // 0% 澶勭殑棰滆壊 '#02C77E' + }, + { + offset: 1, + color: this.endColor // 100% 澶勭殑棰滆壊 '#017770' + } + ], + global: false // 缂虹渷涓� false + } + } + }, + // 浠〃鐩樺垎鍓茬嚎 + splitLine: { + show: false + }, + // 鍒诲害鏍峰紡 + axisTick: { + show: false + }, + // 鍒诲害鏍囩 + axisLabel: { + show: false + }, + title: { + show: false, + fontSize: 24 + }, + detail: { + // width: 50, + // height: 14, + fontSize: 14, + color: 'auto' + }, + data: [ + { + value: this.centerValue, + name: '345', + title: {}, + detail: { + // 涓績title璁剧疆 + offsetCenter: ['0%', '0%'], + color: '#01F8FF', + formatter: '{value}%' + // borderColor: '#01F8FF', + // borderRadius: 20, + // borderWidth: 1, + } + } + ], + } + ] + } + }, + setup() { }, + props: { + startColor: { + type: String, + default: '' + }, + endColor: { + type: String, + default: '' + }, + centerValue: { + type: [Number, String], + default: 0 + }, + bottomTitle: { + type: String, + default: '' + } + }, + methods: {}, + created() { }, + mounted() { + let myChart = echarts.init(this.$refs['chartRef']) // 浣跨敤Id鏃犳硶瀹炵幇 + myChart.setOption({ + series: this.series + }) + } +} +</script> +<style lang="scss" scoped> +.progressChart { + width: 100%; + height: 100%; + + .chart { + width: 100%; + height: 75%; + } + + .bottom { + display: inline-block; + width: 100%; + color: #01f8ff; + text-align: center; + font-size: 16px; + margin-top: 10px; + } +} +</style> \ No newline at end of file diff --git a/src/views/screen/components/screen-examine/index.vue b/src/views/screen/components/screen-examine/index.vue index 9240013..5447573 100644 --- a/src/views/screen/components/screen-examine/index.vue +++ b/src/views/screen/components/screen-examine/index.vue @@ -1,10 +1,10 @@ <template> <div class="examine-container"> - <wrapper-title :title="'鑰冩牳鎴愮哗鏁版嵁'"></wrapper-title> + <wrapper-title :title="'鑰冩牳鏁版嵁'"></wrapper-title> <div class="examine-content"> <div class="examine-wrapper"> - <examine-table class="wrapper-item"></examine-table> <examine-chart class="wrapper-item"></examine-chart> + <!-- <examine-table class="wrapper-item"></examine-table> --> </div> </div> </div> @@ -39,6 +39,7 @@ position: relative; .examine-wrapper { + position: absolute; width: 100%; height: 100%; display: flex; diff --git a/src/views/screen/components/screen-face/index.vue b/src/views/screen/components/screen-face/index.vue index 978f2a5..cf1a29a 100644 --- a/src/views/screen/components/screen-face/index.vue +++ b/src/views/screen/components/screen-face/index.vue @@ -1,6 +1,6 @@ <template> <div class="face-container"> - <wrapper-title :title="'浜鸿劯鏁版嵁瓒嬪娍'"></wrapper-title> + <wrapper-title :title="'浜鸿劯璁惧鏁版嵁'"></wrapper-title> <div class="face-content"> <div class="data-plane"> @@ -10,8 +10,8 @@ <img src="@/assets/images/screen/icon/icon1.png" alt="" class="width-img"> </div> <div class="data-info"> - <div class="data-lable">鏄ㄦ棩浜鸿劯閲囬泦璁惧鎬绘暟</div> - <div class="data-num">{{formatNumber(1123)}}</div> + <div class="data-lable">璁惧鎬绘暟</div> + <div class="data-num">{{ formatNumber(1123) }}</div> </div> </div> </dv-border-box-13> @@ -22,7 +22,7 @@ <img src="@/assets/images/screen/icon/icon2.png" alt="" class="width-img"> </div> <div class="data-info"> - <div class="data-lable">鏄ㄦ棩鎶撴媿鏁版嵁閲�</div> + <div class="data-lable">璁惧姝e父鏁�</div> <div class="data-num">{{ formatNumber(200000) }}</div> </div> </div> @@ -34,13 +34,12 @@ <img src="@/assets/images/screen/icon/icon2.png" alt="" class="width-img"> </div> <div class="data-info"> - <div class="data-lable">鍘嗗彶鎶撴媿鏁版嵁閲�</div> + <div class="data-lable">璁惧寮傚父鏁�</div> <div class="data-num">{{ formatNumber(112313141111) }}</div> </div> </div> </dv-border-box-13> </div> - <div id="faceChart" ref="faceChart"></div> </div> </div> @@ -48,8 +47,6 @@ <script> import WrapperTitle from '../wrapper-title/index'; -import * as echarts from 'echarts'; -let lineChart = null; export default { name: 'ScreenFace', components: { @@ -65,62 +62,6 @@ }, methods: { - initChart() { - const option = { - legend: { - right: 'right', - top: 'top', - orient: "vertical", - icon: 'rect', - data: [ - { - name: '姝e父鏁�', - itemStyle: { - color: 'rgba(62, 144, 247, 1)' - } - }, - { - name: '寮傚父鏁�', - itemStyle: { - color: 'rgba(85, 192, 191, 1)' - } - }, - ], - }, - grid: { - left: '2%', - right: '5%', - bottom: '5%', - top: '8%', - containLabel: true - }, - tooltip: {}, - xAxis: { - type: 'category', - data: Object.keys(this.dataList.state), - }, - yAxis: {}, - series: [ - { - name: '浠婃棩', - data: Object.entries(this.dataList.state).map(([key, value]) => value), - type: 'line', - itemStyle: { - color: 'rgba(62, 144, 247, 1)' - } - }, - { - name: '鏄ㄦ棩', - data: Object.entries(this.dataList.state2).map(([key, value]) => value), - type: 'line', - itemStyle: { - color: 'rgba(85, 192, 191, 1)' - } - } - ] - }; - lineChart.setOption(option, true); - }, formatNumber(value) { return new Intl.NumberFormat('en-US').format(value); @@ -128,19 +69,21 @@ }, mounted() { - lineChart = echarts.init(this.$refs.faceChart); - this.initChart(); - }, - beforeDestroy() { - if (lineChart) { - lineChart.dispose(); - } + }, } </script> <style lang="scss" scoped> +.face-container { + width: 100%; + height: fit-content; + display: flex; + flex-direction: column; +} + .face-content { + flex: 1; background: rgba(67, 102, 155, 0.3); border: 1px solid rgba(47, 91, 157, 0.8); @@ -151,7 +94,7 @@ .data-plane { .data-item { width: 100%; - padding: 20px 20px; + padding: 10px 20px; display: flex; align-items: center; diff --git a/src/views/screen/components/screen-video/index.vue b/src/views/screen/components/screen-video/index.vue index e6fd8dd..3fa66d1 100644 --- a/src/views/screen/components/screen-video/index.vue +++ b/src/views/screen/components/screen-video/index.vue @@ -1,149 +1,129 @@ <template> <div class="video-container"> - <wrapper-title :title="'瑙嗛璁惧'"></wrapper-title> + <wrapper-title :title="'瑙嗛璁惧鏁版嵁'"></wrapper-title> + <div class="video-content"> - <div class="video-plane"> - <dv-border-box-13 class="panel"> - <div class="panel-container"> - <div class="top-container"> - <div class="data-item"> - <dv-decoration-9 style="width:120px;height:120px;"> - <div class="data-num type1">1156</div> - </dv-decoration-9> - <div class="data-label">璁惧鎬绘暟</div> - </div> - <div class="data-item"> - <dv-decoration-9 style="width:120px;height:120px;"> - <div class="data-num type2">1000</div> - </dv-decoration-9> - <div class="data-label">姝e父鏁�</div> - </div> + <div class="data-plane"> + <dv-border-box-13 class="plane"> + <div class="data-item"> + <div class="data-icon"> + <img src="@/assets/images/screen/icon/icon1.png" alt="" class="width-img"> </div> - <div class="bottom-container"> - <div class="data-item"> - <dv-decoration-9 style="width:120px;height:120px;"> - <div class="data-num type3">156</div> - </dv-decoration-9> - <div class="data-label">寮傚父鏁�</div> - </div> - <div class="data-item"> - <dv-decoration-9 style="width:120px;height:120px;"> - <div class="data-num type4">75</div> - </dv-decoration-9> - <div class="data-label">鐢熸垚寮傚父宸ュ崟鏁�</div> - </div> - <div class="data-item"> - <dv-decoration-9 style="width:120px;height:120px;"> - <div class="data-num type5">91.36%</div> - </dv-decoration-9> - <div class="data-label">璁惧杩愯鐜�</div> - </div> + <div class="data-info"> + <div class="data-lable">璁惧鎬绘暟</div> + <div class="data-num">{{ formatNumber(1123) }}</div> </div> - - </div> + </dv-border-box-13> + <dv-border-box-13 class="plane"> + <div class="data-item"> + <div class="data-icon"> + <img src="@/assets/images/screen/icon/icon2.png" alt="" class="width-img"> + </div> + <div class="data-info"> + <div class="data-lable">璁惧姝e父鏁�</div> + <div class="data-num">{{ formatNumber(200000) }}</div> + </div> + </div> + </dv-border-box-13> + + <dv-border-box-13 class="plane"> + <div class="data-item"> + <div class="data-icon"> + <img src="@/assets/images/screen/icon/icon2.png" alt="" class="width-img"> + </div> + <div class="data-info"> + <div class="data-lable">璁惧寮傚父鏁�</div> + <div class="data-num">{{ formatNumber(112313141111) }}</div> + </div> + </div> </dv-border-box-13> </div> </div> </div> + </template> <script> import WrapperTitle from '../wrapper-title/index'; - export default { - name: 'ScreenVideo', + name: 'ScreenFace', components: { WrapperTitle - } + }, + data() { + return { + dataList: { + state: { '01:00': 1000, '02:00': 2131, '03:00': 1233, '04:00': 2132, '05:00': 3211, '06:00': 213, '07:00': 123, '08:00': 566 }, + state2: { '01:00': 900, '02:00': 1131, '03:00': 1533, '04:00': 2132, '05:00': 3011, '06:00': 13, '07:00': 113, '08:00': 566 }, + }, + } + }, + + methods: { + + formatNumber(value) { + return new Intl.NumberFormat('en-US').format(value); + } + }, + + mounted() { + + }, } </script> <style lang="scss" scoped> .video-container { - flex: 1; + width: 100%; + height: fit-content; display: flex; flex-direction: column; - margin-bottom: 20px; } .video-content { flex: 1; background: rgba(67, 102, 155, 0.3); border: 1px solid rgba(47, 91, 157, 0.8); -} -.panel { - width: 100%; - height: 100%; -} - -.video-plane { - width: 100%; - - .panel-container { - width: 100%; - height: 100%; - display: flex; - flex-direction: column; - justify-content: space-between; - align-items: center; - box-sizing: border; - padding: 20px; - - .top-container, - .bottom-container { - width: 100%; - display: flex; - - } - - .top-container { - justify-content: center; - - .data-item { - margin: 0 30px; - } - } - - .bottom-container { - justify-content: space-around; - } - - .data-item { - display: flex; - flex-direction: column; - align-items: center; - font-size: 20px; - color: #fff; - .data-num { - font-weight: bold; - font-size: 22px; - } - } - - .type1 { - color: #0883d4; - } - - .type2 { - color: #08b108; - } - - .type3 { - color: #ff0000; - } - - .type4 { - color: #d82a64; - } - - .type5 { - color: #08b108; - } - + .plane { + margin-bottom: 10px; } + .data-plane { + .data-item { + width: 100%; + padding: 10px 20px; + display: flex; + align-items: center; + + .data-icon { + width: 40px; + margin: 0 20px; + } + + .data-info { + flex: 1; + color: #5b83bd; + font-size: 16px; + + .data-num { + margin-top: 5px; + font-size: 24px; + color: #fff; + } + } + } + } + + #faceChart { + width: 100%; + height: 300px; + } +} + +.width-img { + width: 100%; } </style> \ No newline at end of file diff --git a/src/views/screen/components/screen-wrapper/index.vue b/src/views/screen/components/screen-wrapper/index.vue index 14b259f..532a79a 100644 --- a/src/views/screen/components/screen-wrapper/index.vue +++ b/src/views/screen/components/screen-wrapper/index.vue @@ -4,10 +4,11 @@ <div class="wrapper-content"> <div class="left-container wrapper"> <screen-face></screen-face> + <screen-car></screen-car> + <screen-video></screen-video> </div> <div class="center-container wrapper"> <screen-detection></screen-detection> - <screen-video></screen-video> </div> <div class="right-container wrapper"> @@ -22,13 +23,15 @@ import ScreenDetection from '../screen-detection/index'; import ScreenExamine from '../screen-examine/index'; import ScreenVideo from '../screen-video/index'; +import ScreenCar from '../screen-car/index'; export default { name: 'ScreenWrapper', components: { ScreenFace, ScreenDetection, ScreenExamine, - ScreenVideo + ScreenVideo, + ScreenCar }, } </script> @@ -72,5 +75,4 @@ padding-right: 0; } } - </style> \ No newline at end of file diff --git a/src/views/system/data-manage/index.vue b/src/views/system/data-manage/index.vue new file mode 100644 index 0000000..764f510 --- /dev/null +++ b/src/views/system/data-manage/index.vue @@ -0,0 +1,55 @@ +<template> + <div class="container"> + <el-row type="flex" justify="center"> + <el-col :span="24"> + <h3 style="color: rgb(104,104,103);padding-top: 20px;padding-bottom: 20px;">浜鸿劯鏁版嵁寮傚父妫�娴�</h3> + </el-col> + </el-row> + + <el-row type="flex" justify="center"> + <el-col :span="6" v-for="(item, index) in faceData" :key="index"> + <el-link @click="handleDetail(item)"> + <el-card style="width:150px;height: 150px;text-align: center;"> + <i style="font-size: 40px;padding: 15px;" :class="item.icon"></i> + <div>{{ item.name }}</div> + </el-card> + </el-link> + </el-col> + </el-row> + </div> +</template> + +<script> +export default { + data() { + return { + faceData: [ + { name: '浜鸿劯璇嗗埆鏃堕挓鍑嗙‘鎬�', icon: 'el-icon-alarm-clock', description: '鎻忚堪淇℃伅', routerUrl: 'vehicle-data-monitor' }, + { name: '浜鸿劯鎶撴媿鏁版嵁鐩戞祴', icon: 'el-icon-user', description: '鎻忚堪淇℃伅', routerUrl: '/face/faceClock' }, + { name: '浜鸿劯鏁版嵁瓒嬪娍鍒嗘瀽', icon: 'el-icon-data-line', description: '鎻忚堪淇℃伅', routerUrl: '/face/faceClock' }, + { name: '浜鸿劯鎶撴媿璁惧娲昏穬鎬�', icon: 'el-icon-timer', description: '鎻忚堪淇℃伅', routerUrl: '/face/faceClock' }, + { name: '浜鸿劯鎶撴媿涓婁紶鍙婃椂鎬�', icon: 'el-icon-money', description: '鎻忚堪淇℃伅', routerUrl: '/face/faceClock' }, + { name: '浜鸿劯鎶撴媿澶у浘鍙敤鎬�', icon: 'el-icon-data-analysis', description: '鎻忚堪淇℃伅', routerUrl: '/face/faceClock' }, + ] + } + }, + methods: { + handleDetail(item) { + this.$router.push({ + name: item.routerUrl, + params: { + id: item.id + } + }) + } + } +} +</script> + +<style scoped> +.container { + margin-left: 100px; + margin-right: 100px; + margin-top: 10px; +} +</style> \ No newline at end of file diff --git a/src/views/system/vehicle-data-monitor/index.vue b/src/views/system/vehicle-data-monitor/index.vue new file mode 100644 index 0000000..76ce1d1 --- /dev/null +++ b/src/views/system/vehicle-data-monitor/index.vue @@ -0,0 +1,316 @@ +<template> + <div class="app-container"> + <div class="top"> + <el-row type="flex" justify="space-between" style="width: 60%;"> + <el-col :span="6"> + <el-card class="card"> + <i style="font-size: 40px;padding: 15px;" class="el-icon-wind-power"></i> + </el-card> + </el-col> + + <el-col :span="6" class="mod"> + <div class="number">{{ totalKiosks }}</div> + <div>鍗″彛鎬绘暟</div> + </el-col> + + <el-col :span="6" class="mod"> + <div class="numberTwo">{{ uniqueKiosks }}</div> + <div>涓嶅敮涓�鍗″彛鏁�</div> + </el-col> + + <div style="width: 1px;height: 60px;border: 1px solid #D7EBFA;margin: 40px;"></div> + + + <el-col :span="6"> + <el-card class="card"> + <i style="font-size: 40px;padding: 15px;" class="el-icon-truck"></i> + </el-card> + </el-col> + <el-col :span="6" class="mod"> + <div class="number">{{ totalCarData }}</div> + <div>杩囪溅鏁版嵁鎬婚噺</div> + </el-col> + + <el-col :span="6" class="mod"> + <div class="numberTwo">{{ uniqueCarData }}</div> + <div>涓嶅敮涓�鏁版嵁閲�</div> + </el-col> + </el-row> + + </div> + + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> + <el-form-item label="鍗″彛缂栧彿" prop="bayonetNumber"> + <el-input v-model="queryParams.bayonetNumber" placeholder="璇疯緭鍏ュ崱鍙g紪鍙�" clearable + @keyup.enter.native="handleQuery" /> + </el-form-item> + <el-form-item label="鍗″彛鍚嶇О" prop="bayonetName"> + <el-input v-model="queryParams.bayonetName" placeholder="璇疯緭鍏ュ崱鍙e悕绉�" clearable @keyup.enter.native="handleQuery" /> + </el-form-item> + <el-form-item> + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> + </el-form-item> + </el-form> + + <el-row :gutter="10" class="mb8"> + <el-col :span="1.5"> + <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" + v-hasPermi="['platform:platform:add']">鏂板</el-button> + </el-col> + <el-col :span="1.5"> + <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" + v-hasPermi="['platform:platform:edit']">淇敼</el-button> + </el-col> + <el-col :span="1.5"> + <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" + v-hasPermi="['platform:platform:remove']">鍒犻櫎</el-button> + </el-col> + <el-col :span="1.5"> + <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" + v-hasPermi="['platform:platform:export']">瀵煎嚭</el-button> + </el-col> + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> + </el-row> + + <el-table v-loading="loading" :data="platformList" @selection-change="handleSelectionChange"> + <el-table-column type="selection" width="55" align="center" /> + <el-table-column label="鍗″彛鍚嶇О" align="center" prop="bayonetName" /> + <el-table-column label="鍗″彛缂栧彿" align="center" prop="bayonetNumber" /> + <el-table-column label="杩囪溅鏁版嵁閲�" align="center" prop="vehicleDataNumber" /> + <el-table-column label="涓嶅敮涓�鏁版嵁 " align="center" prop="notUniqueData" /> + <el-table-column label="涓嶅敮涓�鏁版嵁閲�" align="center" prop="notUniqueDataNumber" /> + <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> + <template slot-scope="scope"> + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" + v-hasPermi="['platform:platform:edit']">淇敼</el-button> + <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" + v-hasPermi="['platform:platform:remove']">鍒犻櫎</el-button> + </template> + </el-table-column> + </el-table> + + <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" + @pagination="getList" /> + + <!-- 娣诲姞鎴栦慨鏀瑰崱鍙h繃杞︽暟鎹竴鑷存�у璇濇 --> + <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> + <el-form-item label="鍗″彛鍚嶇О" prop="bayonetName"> + <el-input v-model="form.bayonetName" placeholder="璇疯緭鍏ュ崱鍙e悕绉�" /> + </el-form-item> + <el-form-item label="鍗″彛缂栧彿" prop="bayonetNumber"> + <el-input v-model="form.bayonetNumber" placeholder="璇疯緭鍏ュ崱鍙g紪鍙�" /> + </el-form-item> + <el-form-item label="杩囪溅鏁版嵁閲�" prop="vehicleDataNumber"> + <el-input v-model="form.vehicleDataNumber" placeholder="璇疯緭鍏ヨ繃杞︽暟鎹噺" /> + </el-form-item> + <el-form-item label="涓嶅敮涓�鏁版嵁 " prop="notUniqueData"> + <el-input v-model="form.notUniqueData" placeholder="璇疯緭鍏ヤ笉鍞竴鏁版嵁 " /> + </el-form-item> + <el-form-item label="涓嶅敮涓�鏁版嵁閲�" prop="notUniqueDataNumber"> + <el-input v-model="form.notUniqueDataNumber" placeholder="璇疯緭鍏ヤ笉鍞竴鏁版嵁閲�" /> + </el-form-item> + </el-form> + <div slot="footer" class="dialog-footer"> + <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> + <el-button @click="cancel">鍙� 娑�</el-button> + </div> + </el-dialog> + </div> +</template> + +<script> +import { listPlatform, getPlatform, delPlatform, addPlatform, updatePlatform } from "@/api/platform/vehicle-data-monitor"; + +export default { + name: "Platform", + data() { + return { + totalKiosks: 1157, + uniqueKiosks: 580, + totalCarData: 77422, + uniqueCarData: 431163, + // 閬僵灞� + loading: true, + // 閫変腑鏁扮粍 + ids: [], + // 闈炲崟涓鐢� + single: true, + // 闈炲涓鐢� + multiple: true, + // 鏄剧ず鎼滅储鏉′欢 + showSearch: true, + // 鎬绘潯鏁� + total: 0, + // 鍗″彛杩囪溅鏁版嵁涓�鑷存�ц〃鏍兼暟鎹� + platformList: [], + // 寮瑰嚭灞傛爣棰� + title: "", + // 鏄惁鏄剧ず寮瑰嚭灞� + open: false, + // 鏌ヨ鍙傛暟 + queryParams: { + pageNum: 1, + pageSize: 10, + regionCode: null, + bayonetName: null, + bayonetNumber: null, + }, + // 琛ㄥ崟鍙傛暟 + form: {}, + // 琛ㄥ崟鏍¢獙 + rules: { + bayonetName: [ + { required: true, message: "鍗″彛鍚嶇О涓嶈兘涓虹┖", trigger: "blur" } + ], + bayonetNumber: [ + { required: true, message: "鍗″彛缂栧彿涓嶈兘涓虹┖", trigger: "blur" } + ], + } + }; + }, + created() { + this.getList(); + }, + methods: { + /** 鏌ヨ鍗″彛杩囪溅鏁版嵁涓�鑷存�у垪琛� */ + getList() { + this.loading = true; + listPlatform(this.queryParams).then(response => { + this.platformList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, + // 鍙栨秷鎸夐挳 + cancel() { + this.open = false; + this.reset(); + }, + // 琛ㄥ崟閲嶇疆 + reset() { + this.form = { + id: null, + regionCode: null, + bayonetName: null, + bayonetNumber: null, + vehicleDataNumber: null, + notUniqueData: null, + notUniqueDataNumber: null, + createTime: null, + updateTime: null, + deleted: null + }; + this.resetForm("form"); + }, + /** 鎼滅储鎸夐挳鎿嶄綔 */ + handleQuery() { + this.queryParams.pageNum = 1; + this.getList(); + }, + /** 閲嶇疆鎸夐挳鎿嶄綔 */ + resetQuery() { + this.resetForm("queryForm"); + this.handleQuery(); + }, + // 澶氶�夋閫変腑鏁版嵁 + handleSelectionChange(selection) { + this.ids = selection.map(item => item.id) + this.single = selection.length !== 1 + this.multiple = !selection.length + }, + /** 鏂板鎸夐挳鎿嶄綔 */ + handleAdd() { + this.reset(); + this.open = true; + this.title = "娣诲姞鍗″彛杩囪溅鏁版嵁涓�鑷存��"; + }, + /** 淇敼鎸夐挳鎿嶄綔 */ + handleUpdate(row) { + this.reset(); + const id = row.id || this.ids + getPlatform(id).then(response => { + this.form = response.data; + this.open = true; + this.title = "淇敼鍗″彛杩囪溅鏁版嵁涓�鑷存��"; + }); + }, + /** 鎻愪氦鎸夐挳 */ + submitForm() { + this.$refs["form"].validate(valid => { + if (valid) { + if (this.form.id != null) { + updatePlatform(this.form).then(response => { + this.$modal.msgSuccess("淇敼鎴愬姛"); + this.open = false; + this.getList(); + }); + } else { + addPlatform(this.form).then(response => { + this.$modal.msgSuccess("鏂板鎴愬姛"); + this.open = false; + this.getList(); + }); + } + } + }); + }, + /** 鍒犻櫎鎸夐挳鎿嶄綔 */ + handleDelete(row) { + const ids = row.id || this.ids; + this.$modal.confirm('鏄惁纭鍒犻櫎鍗″彛杩囪溅鏁版嵁涓�鑷存�х紪鍙蜂负"' + ids + '"鐨勬暟鎹」锛�').then(function () { + return delPlatform(ids); + }).then(() => { + this.getList(); + this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); + }).catch(() => { }); + }, + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ + handleExport() { + this.download('platform/platform/export', { + ...this.queryParams + }, `platform_${new Date().getTime()}.xlsx`) + } + } +}; +</script> +<style scoped> +.top { + height: 150px; + margin-bottom: 20px; + background-color: #F2F9FF; + border: 1px solid #77befd; +} + +.container { + max-width: 1000px; + margin: auto; +} + +.number { + font-size: 36px; + font-weight: bold; + color: #00A5FE; +} + +.numberTwo { + font-size: 36px; + font-weight: bold; + color: #505051; +} + +.card { + width: 100px; + height: 100px; + text-align: center; + background-color: #00A5FE; + color: aliceblue; + border-radius: 10%; + margin: 25px; +} + +.mod { + margin-top: 40px; +} +</style> \ No newline at end of file -- Gitblit v1.8.0