From e9dfe9273d9e5bc120fa2d47699a43c0b8b11584 Mon Sep 17 00:00:00 2001 From: MrShi <1878285526@qq.com> Date: 星期三, 07 五月 2025 18:59:34 +0800 Subject: [PATCH] 提交 --- admin/src/views/business/reportRecord.vue | 15 +-- admin/src/views/business/dangerStatic.vue | 68 +++++++++++++++- admin/src/views/business/admissionStatistics.vue | 56 ++++++++++--- admin/src/views/business/visits.vue | 33 +++---- admin/src/views/platform/platform.vue | 1 admin/src/views/business/carStatistics.vue | 57 ++++++++++--- screen/src/views/FireFighting.vue | 2 7 files changed, 164 insertions(+), 68 deletions(-) diff --git a/admin/src/views/business/admissionStatistics.vue b/admin/src/views/business/admissionStatistics.vue index 0488658..fbe4ea1 100644 --- a/admin/src/views/business/admissionStatistics.vue +++ b/admin/src/views/business/admissionStatistics.vue @@ -34,8 +34,8 @@ <div class="main_content"> <div class="type_wrap"> <div class="title">鍏ㄥ勾鍏ュ洯浜哄憳瓒嬪娍</div> - <div class="echart1" ref="typeRef" v-if="info.cumulativeDataList"></div> - <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-else> + <div class="echart1" ref="typeRef" v-show="info.cumulativeDataList"></div> + <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-show="!info.cumulativeDataList"> <img style="width: 200px;" src="@/assets/images/default_homeimg.png" alt=""> </div> </div> @@ -56,8 +56,8 @@ placeholder="璇烽�夋嫨"> </el-date-picker> </div> - <div class="echart2" ref="deptRef" v-if="listZB.length > 0"></div> - <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-else> + <div id="echart2" v-show="listZB.length > 0"></div> + <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-show="listZB.length === 0"> <img style="width: 200px;" src="@/assets/images/default_homeimg.png" alt=""> </div> </div> @@ -137,9 +137,9 @@ this.value = `${year}-${month}` this.date1 = `${year}-${month}` - this.getData() - this.getRataLists() - this.getReportLists() + this.getData() + this.getRataLists() + this.getReportLists() }, methods: { // 瀵煎嚭 @@ -189,18 +189,24 @@ getRataList({ dateStr: this.value, isGroupBy: this.isGroupBy, type: 1 }) .then(res => { this.listZB = res - this.$nextTick(() => { + // this.$nextTick(() => { + // this.initDept() + // }) + setTimeout(() => { this.initDept() - }) + }, 1000) }) }, // 鍩虹鏁版嵁 getData() { getInParkUserData({ isGroupBy: this.isGroupBy, type: 1 }).then(res => { this.info = res - this.$nextTick(() => { + // this.$nextTick(() => { + // this.initType() + // }) + setTimeout(() => { this.initType() - }) + }, 1000) }) }, // 鍏ㄥ勾鍏ュ洯杞﹁締瓒嬪娍 @@ -228,7 +234,24 @@ data: names }, yAxis: { - type: 'value' + type: 'value', + axisLine: { + show: true + } + }, + graphic: { + elements: [ + { + type: 'text', + left: 'left', + top: 'top', + style: { + text: '浜哄憳鏁�', + textAlign: 'center', + fill: '#333' + } + } + ] }, series: [ { @@ -287,7 +310,9 @@ initDept() { if (!this.listZB) return - const myChart = echarts.init(document.querySelector('.echart2')) + const dom = document.getElementById('echart2') + console.log(dom) + const myChart = echarts.init(dom) let data = this.listZB.map(item => { return { @@ -578,7 +603,7 @@ display: flex; align-items: center; justify-content: space-between; - height: 400px; + height: 350px; .title { font-weight: 500; @@ -598,6 +623,7 @@ .echart1 { width: 100%; height: 100%; + margin-top: 18px; } } @@ -609,7 +635,7 @@ padding: 20px; box-sizing: border-box; margin-left: 10px; - .echart2 { + #echart2 { width: 100%; height: 100%; } diff --git a/admin/src/views/business/carStatistics.vue b/admin/src/views/business/carStatistics.vue index 6ada707..473fc94 100644 --- a/admin/src/views/business/carStatistics.vue +++ b/admin/src/views/business/carStatistics.vue @@ -34,8 +34,8 @@ <div class="main_content"> <div class="type_wrap"> <div class="title">鍏ㄥ勾鍏ュ洯杞﹁締瓒嬪娍</div> - <div id="echart1" ref="typeRef" v-if="info.cumulativeDataList"></div> - <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-else> + <div id="echart1" ref="typeRef" v-show="info.cumulativeDataList"></div> + <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-show="!info.cumulativeDataList"> <img style="width: 200px;" src="@/assets/images/default_homeimg.png" alt=""> </div> </div> @@ -56,8 +56,8 @@ placeholder="璇烽�夋嫨"> </el-date-picker> </div> - <div class="echart_2" ref="deptRef" v-if="listZB.length > 0"></div> - <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-else> + <div id="echart_2" v-show="listZB.length > 0"></div> + <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-show="listZB.length === 0"> <img style="width: 200px;" src="@/assets/images/default_homeimg.png" alt=""> </div> </div> @@ -137,9 +137,9 @@ this.value = `${year}-${month}` this.date1 = `${year}-${month}` - this.getData() - this.getRataLists() - this.getReportLists() + this.getData() + this.getRataLists() + this.getReportLists() }, methods: { // 瀵煎嚭 @@ -192,18 +192,24 @@ getRataList({ dateStr: this.value, isGroupBy: this.isGroupBy, type: 0 }) .then(res => { this.listZB = res - this.$nextTick(() => { + // this.$nextTick(() => { + // this.initDept() + // }) + setTimeout(() => { this.initDept() - }) + },1000) }) }, // 鍩虹鏁版嵁 getData() { getInParkUserData({ isGroupBy: this.isGroupBy, type: 0 }).then(res => { this.info = res - this.$nextTick(() => { + // this.$nextTick(() => { + // this.initType() + // }) + setTimeout(() => { this.initType() - }) + }, 1000) }) }, // 鍏ㄥ勾鍏ュ洯杞﹁締瓒嬪娍 @@ -224,6 +230,20 @@ orient: 'vertical', left: 'left' }, + graphic: { + elements: [ + { + type: 'text', + left: 'left', + top: 'top', + style: { + text: '杞﹁締鏁�', + textAlign: 'center', + fill: '#333' + } + } + ] + }, grid: { left: '0%', right: '5%', @@ -236,11 +256,15 @@ data: names }, yAxis: { - type: 'value' + type: 'value', + axisLine: { + show: true + } }, series: [ { data: datas, + name: '鍏ュ洯杞﹁締', type: 'line', areaStyle: { normal: { @@ -295,7 +319,9 @@ initDept() { if (this.listZB.length === 0) return - const myChart = echarts.init(document.querySelector('.echart_2')) + const dom = document.getElementById('echart_2') + console.log(dom) + const myChart = echarts.init(dom) let data = this.listZB.map(item => { return { @@ -586,7 +612,7 @@ display: flex; align-items: center; justify-content: space-between; - height: 400px; + height: 350px; .title { font-weight: 500; @@ -606,6 +632,7 @@ #echart1 { width: 100%; height: 100%; + margin-top: 18px; } } @@ -617,7 +644,7 @@ padding: 20px; box-sizing: border-box; margin-left: 10px; - .echart_2 { + #echart_2 { width: 100%; height: 100%; } diff --git a/admin/src/views/business/dangerStatic.vue b/admin/src/views/business/dangerStatic.vue index d1ea42c..a89c44e 100644 --- a/admin/src/views/business/dangerStatic.vue +++ b/admin/src/views/business/dangerStatic.vue @@ -52,8 +52,8 @@ <div class="main_table"> <div class="main_table_echart"> <div class="title">鏈勾闅愭偅瓒嬪娍</div> - <div id="echart3" v-if="yearList.length > 0"></div> - <div v-else style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;"> + <div id="echart3" v-show="yearList.length > 0"></div> + <div style="width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;" v-show="yearList.length === 0"> <img style="width: 240px;" src="@/assets/images/default_homeimg.png" alt=""> </div> </div> @@ -324,6 +324,9 @@ let datas = this.yearList.map(item => item.total) let option = { + tooltip: { + trigger: 'item' + }, grid: { left: '5%', right: '10%', @@ -336,12 +339,56 @@ data: names }, yAxis: { - type: 'value' + type: 'value', + axisLine: { + show: true + } }, series: [ { data: datas, - type: 'line' + type: 'line', + areaStyle: { + normal: { + color: { + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, + color: '#207FF7' // 0% 澶勭殑棰滆壊 + }, { + offset: 1, + color: 'rgba(255,255,255,.2)' // 100% 澶勭殑棰滆壊 + }], + globalCoord: false // 缂虹渷涓� false + } + } + }, + lineStyle: { // 绾挎潯鏍峰紡 + color: { + type: 'linear', + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [{ + offset: 0, color: '#207FF7' // 0% 澶勭殑棰滆壊 + }, { + offset: 1, color: '#207FF7' // 100% 澶勭殑棰滆壊 + }] + }, + width: 2 // 绾挎潯绮楃粏 + }, + symbol: 'circle', + symbolSize: 10, + itemStyle: { + borderWidth: 1, + borderColor: '#fff', + color: '#207FF7' + }, + smooth: false } ] } @@ -443,10 +490,12 @@ } .list_head { width: 100%; - height: 35px; + height: 50px; display: flex; align-items: center; - background-color: #ececec; + background-color: #F7F7F7; + border-left: 1px solid #DFE2E8; + border-top: 1px solid #DFE2E8; margin-top: 15px; .list_head_item { flex: 1; @@ -456,15 +505,19 @@ justify-content: center; font-size: 13px; color: #222222; + border-right: 1px solid #DFE2E8; } } .table_box { width: 100%; + border-bottom: 1px solid #DFE2E8; .list_content { width: 100%; - height: 35px; + height: 50px; display: flex; align-items: center; + border-left: 1px solid #DFE2E8; + border-top: 1px solid #DFE2E8; .list_head_item { flex: 1; height: 100%; @@ -473,6 +526,7 @@ justify-content: center; font-size: 13px; color: #222222; + border-right: 1px solid #DFE2E8; } } } diff --git a/admin/src/views/business/reportRecord.vue b/admin/src/views/business/reportRecord.vue index 2fad862..69e5941 100644 --- a/admin/src/views/business/reportRecord.vue +++ b/admin/src/views/business/reportRecord.vue @@ -144,9 +144,10 @@ label: '鍏徃鍚嶇О' }, { - filed: 'date', - type: 'daterange', - label: '璧峰鏃ユ湡' + filed1: 'queryStarttime', + filed2: 'queryEndtime', + type: 'datetime', + label: '鎷滆鏃堕棿' } ], online: true @@ -239,14 +240,6 @@ }, getList (page) { const { pagination, filters } = this - console.log(filters) - if (filters.date && filters.date.length === 2) { - filters.queryStarttime = filters.date[0] - filters.queryEndtime = filters.date[1] - } else { - filters.queryStarttime = '' - filters.queryEndtime = '' - } pagination.page = page || pagination.page fetchList({ model: { ...filters }, diff --git a/admin/src/views/business/visits.vue b/admin/src/views/business/visits.vue index 00d7881..9af7373 100644 --- a/admin/src/views/business/visits.vue +++ b/admin/src/views/business/visits.vue @@ -12,16 +12,21 @@ <el-form-item label="璁垮鍗曚綅" prop="companyName"> <el-input v-model="searchForm.companyName" placeholder="璇疯緭鍏ヨ瀹㈠崟浣�" @keypress.enter.native="search"></el-input> </el-form-item> - <el-form-item label="璧峰鏃堕棿" prop="date"> + <el-form-item label="鎷滆鏃堕棿" prop="date"> <el-date-picker - v-model="searchForm.date" - type="daterange" - @change="changeDate" - value-format="yyyy-MM-dd" - range-separator="鑷�" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡"> - </el-date-picker> + v-model="searchForm.queryStarttime" + type="datetime" + clearable + value-format="yyyy-MM-dd HH:mm:ss" + class="w200" + placeholder="寮�濮嬫椂闂�" /> + <el-date-picker + v-model="searchForm.queryEndtime" + type="datetime" + value-format="yyyy-MM-dd HH:mm:ss" + class="w200" + clearable + placeholder="缁撴潫鏃堕棿" /> </el-form-item> <el-form-item label="瀹℃壒鐘舵��" prop="status"> <el-select v-model="searchForm.status" placeholder="璇烽�夋嫨"> @@ -169,16 +174,6 @@ this.$refs.searchForm.resetFields() this.searchForm.queryStarttime = '' this.searchForm.queryEndtime = '' - this.search() - }, - changeDate(e) { - if (e) { - this.searchForm.queryStarttime = e[0] - this.searchForm.queryEndtime = e[1] - } else { - this.searchForm.queryStarttime = '' - this.searchForm.queryEndtime = '' - } this.search() }, handleDetail(row) { diff --git a/admin/src/views/platform/platform.vue b/admin/src/views/platform/platform.vue index 23f162c..9548d14 100644 --- a/admin/src/views/platform/platform.vue +++ b/admin/src/views/platform/platform.vue @@ -35,6 +35,7 @@ <el-table-column prop="name" label="鏈堝彴鍚嶇О" fixed min-width="100px"></el-table-column> <el-table-column prop="code" label="鏈堝彴缂栫爜" fixed min-width="100px"></el-table-column> <el-table-column prop="groupName" label="鎵�灞炴湀鍙扮粍" fixed min-width="150px"></el-table-column> + <el-table-column prop="sortnum" label="鎺掑簭鐮�" min-width="90px"></el-table-column> <el-table-column prop="workingNum" label="鍚屾椂鍙彿杞﹁締鏁�" min-width="120px"></el-table-column> <el-table-column prop="stayTimeoutAlarmTime" label="鍋滅暀瓒呮椂鎶ヨ鏃堕棿(鍒嗛挓锛�" min-width="180px"> <template scope="{row}">{{ row.stayTimeoutAlarmTime ? (row.stayTimeoutAlarmTime) : '-' }}</template> diff --git a/screen/src/views/FireFighting.vue b/screen/src/views/FireFighting.vue index e0f7382..79cd732 100644 --- a/screen/src/views/FireFighting.vue +++ b/screen/src/views/FireFighting.vue @@ -525,7 +525,7 @@ // let minNum = item.level.slice(0, startI) let maxNum = item.max let minNum = item.min - let conNum = maxNum - minNum + let conNum = maxNum let acNum = item.obj.value.replaceAll('M', '') var data = (((acNum - minNum) / conNum) * 100).toFixed(0) console.log('data', data) -- Gitblit v1.9.3