From e77e096fbfcc1bf525b9ea3382a26abe111c957d Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 05 三月 2026 18:03:42 +0800
Subject: [PATCH] 更改头部
---
admin/src/views/business/dangerStatic.vue | 66 ++++++++++++++++-----------------
1 files changed, 32 insertions(+), 34 deletions(-)
diff --git a/admin/src/views/business/dangerStatic.vue b/admin/src/views/business/dangerStatic.vue
index 26cb9dc..735dfb2 100644
--- a/admin/src/views/business/dangerStatic.vue
+++ b/admin/src/views/business/dangerStatic.vue
@@ -77,15 +77,15 @@
</template>
<script>
-import QueryForm from '@/components/common/QueryForm'
+// import QueryForm from '@/components/common/QueryForm'
import * as echarts from 'echarts'
import { hiddenDangerDataPost } from '@/api/business/hiddenDanger'
import dayjs from 'dayjs'
export default {
components: {
- QueryForm,
+ // QueryForm,
},
- data() {
+ data () {
return {
filters: {
fastdate: '29',
@@ -101,7 +101,7 @@
options: [
{ label: '寰呭鐞�', value: '0' },
{ label: '宸插鐞�', value: '1' },
- { label: '宸查��鍥�', value: '2' },
+ { label: '宸查��鍥�', value: '2' }
]
},
{
@@ -131,19 +131,19 @@
departmentList: []
}
},
- mounted() {
+ mounted () {
this.changeRadio('29')
this.initDept3()
// this.getData()
},
methods: {
- changeRadio(day) {
+ changeRadio (day) {
const arr = [dayjs().subtract(day, 'day').format('YYYY-MM-DD') + ' 00:00:00', dayjs().format('YYYY-MM-DD') + ' 23:59:59']
this.filters.queryStartTime = arr[0]
this.filters.queryEndTime = arr[1]
this.getData()
},
- getData(page) {
+ getData (page) {
hiddenDangerDataPost({ ...this.filters }).then(res => {
if (res) {
this.totalList.total = res.total || 0
@@ -163,22 +163,20 @@
this.initDept()
this.initDept3()
})
-
}
})
-
},
- changeForm(e) {
+ changeForm (e) {
this.getData()
},
- initType() {
+ initType () {
const myChart = echarts.init(document.querySelector('.echart1'))
let total = 0
this.typeList.forEach(i => {
total += i.total
})
- let colors = ['#d75a44', '#e39f4d', '#f0d05f', '#7ac7f6', '#4469ee', '#698af0','#86a2f1','#a1b4f6','#a0b5f5', '#9fb5f4', '#b6c7f7', '#c8d5f8']
- let option = {
+ const colors = ['#d75a44', '#e39f4d', '#f0d05f', '#7ac7f6', '#4469ee', '#698af0', '#86a2f1', '#a1b4f6', '#a0b5f5', '#9fb5f4', '#b6c7f7', '#c8d5f8']
+ const option = {
grid: {
left: '0%',
right: '0%',
@@ -193,8 +191,8 @@
left: '45%',
textStyle: {
color: '#666666',
- fontSize: 13,
- },
+ fontSize: 13
+ }
}, {
text: total,
top: '50%',
@@ -202,8 +200,8 @@
textStyle: {
color: '#080404',
fontSize: 16,
- fontWeight: 'bold',
- },
+ fontWeight: 'bold'
+ }
}],
legend: {
left: 'center',
@@ -226,7 +224,7 @@
type: 'pie',
radius: ['34%', '50%'],
label: {
- formatter: "{a|{b}}\n\n{c} | {d}%",
+ formatter: '{a|{b}}\n\n{c} | {d}%',
rich: {
a: {
color: '#333333',
@@ -241,7 +239,7 @@
length: 24,
length2: 64,
lineStyle: {
- width: 2 // 绾挎潯瀹藉害
+ width: 2 // 绾挎潯瀹藉害
}
},
data: this.typeList.map((i, index) => {
@@ -261,10 +259,10 @@
myChart.resize()
})
},
- initDept() {
+ initDept () {
const myChart = echarts.init(document.querySelector('.echart2'))
- let option = {
+ const option = {
grid: {
left: '10%',
right: '10%',
@@ -286,7 +284,7 @@
name: '闅愭偅鏁�',
minInterval: 1,
axisLine: {
- show: true,
+ show: true
}
},
series: [
@@ -297,15 +295,15 @@
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#d75e45' }, // 娓愬彉璧峰鑹�
- { offset: 1, color: '#db924c' } // 娓愬彉缁堟鑹�
+ { offset: 1, color: '#db924c' } // 娓愬彉缁堟鑹�
])
},
label: {
- show: true, // 鏄剧ず鏍囩
+ show: true, // 鏄剧ず鏍囩
position: 'top', // 璁╂爣绛炬樉绀哄湪鏌卞瓙椤堕儴
- color: '#666666', // 鏂囧瓧棰滆壊
- fontSize: 14, // 鏂囧瓧澶у皬
+ color: '#666666', // 鏂囧瓧棰滆壊
+ fontSize: 14 // 鏂囧瓧澶у皬
}
}
]
@@ -315,15 +313,15 @@
myChart.resize()
})
},
- initDept3() {
+ initDept3 () {
if (this.yearList.length === 0) return
const myChart = echarts.init(document.querySelector('#echart3'))
- let names = this.yearList.map(item => item.name)
- let datas = this.yearList.map(item => item.total)
+ const names = this.yearList.map(item => item.name)
+ const datas = this.yearList.map(item => item.total)
- let option = {
+ const option = {
tooltip: {
trigger: 'axis',
axisPointer: {
@@ -349,7 +347,7 @@
axisLabel: {
formatter: function (value) {
// 鍥涜垗浜斿叆鍒版渶杩戠殑鏁存暟
- return Math.round(value);
+ return Math.round(value)
}
}
},
@@ -406,7 +404,7 @@
myChart.resize()
})
},
- clear() {
+ clear () {
this.filters = {}
this.getData()
}
@@ -478,7 +476,7 @@
.main_table {
display: flex;
- align-items: start;
+ align-items: flex-start;
justify-content: space-between;
.main_table_echart {
width: 64%;
@@ -554,7 +552,7 @@
.main_content {
display: flex;
- align-items: start;
+ align-items: flex-start;
justify-content: space-between;
height: 500px;
margin-bottom: 10px;
--
Gitblit v1.9.3