From 29f6962ca41a5a7b87b7e1e46c46390022e666c4 Mon Sep 17 00:00:00 2001 From: xuechunyuan <17853500702@163.com> Date: Fri, 16 Dec 2022 18:00:54 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E7=A6=81=E5=87=BA=E5=85=A5=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/source/total.js | 8 + src/views/garden/generalizePatternNew.vue | 262 ++++++++++++---------- 2 files changed, 153 insertions(+), 117 deletions(-) diff --git a/src/api/source/total.js b/src/api/source/total.js index 7993c18..f6b8f9c 100644 --- a/src/api/source/total.js +++ b/src/api/source/total.js @@ -2484,4 +2484,12 @@ export const getYMInfo = (date) => { method: "get", params: { date }, }); +}; +//获取疫苗接种情况 +export const getDoorAccCount = (startTime,endTime) => { + return request({ + url: "/api/blade-desk/door/get-build-door-acc-count", + method: "get", + params: { startTime, endTime }, + }); }; \ No newline at end of file diff --git a/src/views/garden/generalizePatternNew.vue b/src/views/garden/generalizePatternNew.vue index 74d1424..0a88c1d 100644 --- a/src/views/garden/generalizePatternNew.vue +++ b/src/views/garden/generalizePatternNew.vue @@ -2,8 +2,7 @@
-
+
{{ weatherData.weather ? @@ -15,8 +14,7 @@ 温度:{{ weatherData.temperature }}
-
+
{{ isHolidays ? '节假日' : '工作日' }}
运行状态:{{ (reportFangyi.status == 2 ? '分区域运行' : reportFangyi.status == 1 ? '封闭运行' : @@ -31,28 +29,31 @@
在青/外地:
-
{{ isLeaveInfo.inQing }}/{{ isLeaveInfo.notInQing }}
+
{{ isLeaveInfo.inQing }}/{{ + isLeaveInfo.notInQing + }}
胶州园区(封闭运行/机关行政):
-
{{ allJzAdminInfo }}/{{ allJzInfo }}
+
{{ allJzAdminInfo }}/{{ allJzInfo + }}
流亭/台站:
-
{{ allLtInfo }}/{{ allLtTzInfo }}人 +
{{ allLtInfo }}/{{ allLtTzInfo + }}
集中备勤/居家纯净:
-
{{ allBqInfo.JZBQ }}/{{ allBqInfo.JJCJ }}
+
{{ allBqInfo.JZBQ }}/{{ + allBqInfo.JJCJ + }}
休假/外出:
-
{{ leaveInfo.XJWC }}/{{ leaveInfo.CC }}
+
{{ leaveInfo.XJWC }}/{{ leaveInfo.CC + }}
居家:
@@ -60,13 +61,14 @@
集中隔离/居家隔离/小区封控:
-
{{ codeInfo.jzgl }}/{{ codeInfo.jjgl }}/{{ codeInfo.fxts }}
+
{{ codeInfo.jzgl }}/{{ codeInfo.jjgl + }}/{{ codeInfo.fxts }}
健康码/行程码:
-
{{ codeInfo.healthRedCode }}/{{ codeInfo.strokeRedCode }}
+
{{ codeInfo.healthRedCode }}/{{ + codeInfo.strokeRedCode + }}
@@ -264,7 +266,8 @@

-
{{ value }}
+
{{ value }}辆 +
{{ key }}
@@ -272,7 +275,8 @@

-
{{ value }}
+
{{ value }}辆 +
{{ key }}
@@ -330,9 +334,9 @@ import { isHolidays, getJZAdminByDate, getAllJJByDate, + getDoorAccCount, } from "@/api/source/total"; import { dateFormat } from "@/util/date"; -import { Message } from 'element-ui'; export default { components: { }, @@ -563,100 +567,108 @@ export default { }, //门禁 getDoor() { - var myChart = this.$echarts.init(document.getElementById("rightBar2")); - myChart.setOption({ - color: ['#2BF7AC', '#07A6FF'], - title: { - text: "单位:人", - left: '6%', - top: '3%', - textStyle: { - color: '#07E6ED', - fontFamily: 'Microsoft YaHei', - fontSize: 14 - } - }, - tooltip: { - trigger: 'axis', - axisPointer: { - type: 'shadow' - } - }, - legend: { - top: '3%', - right: '3%', - itemWidth: 12, - itemHeight: 3, - itemGap: 15, - textStyle: { - color: "rgba(255,255,255,0.5)", - fontSize: 12, + getDoorAccCount('', '').then((res) => { + var myChart = this.$echarts.init(document.getElementById("rightBar2")); + res.data.data.map(item => { + item.buildName = item.buildId + '号楼'; + }) + myChart.setOption({ + color: ['#2BF7AC', '#07A6FF'], + title: { + text: "单位:人", + left: '6%', + top: '3%', + textStyle: { + color: '#07E6ED', + fontFamily: 'Microsoft YaHei', + fontSize: 14 + } }, - }, - grid: { - top: '22%', - left: '12%', - right: '3%', - bottom: '3%', - containLabel: true - }, - xAxis: [ - { - type: 'category', - axisLine: { - show: true, - lineStyle: { color: "rgba(255,255,255,0.2)" }, - }, - axisTick: { - inside: true, - lineStyle: { color: "rgba(255,255,255,0.2)" }, - }, - axisLabel: { - interval: 0, - color: "rgba(255,255,255,0.7)", - }, - data: ['1号楼1楼', '1号楼2楼', '1号楼3楼', '1号楼走廊'], - } - ], - yAxis: [ - { - type: 'value', - splitLine: { show: false }, - axisTick: { - show: true, - inside: true, - length: 3, - lineStyle: { color: "rgba(255,255,255,0.2)" }, - }, - axisLine: { - show: true, - lineStyle: { color: "rgba(255,255,255,0.2)" }, - }, - axisLabel: { - color: "rgba(255,255,255,0.7)", - }, - } - ], - series: [ - { - name: '进', - type: 'bar', - barWidth: 10, - emphasis: { - focus: 'series' + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' }, - data: [50, 68, 45, 97, 45, 55, 1] }, - { - name: '出', - type: 'bar', - barWidth: 10, - emphasis: { - focus: 'series' + legend: { + top: '3%', + right: '3%', + itemWidth: 12, + itemHeight: 3, + itemGap: 15, + textStyle: { + color: "rgba(255,255,255,0.5)", + fontSize: 12, }, - data: [5, 78, 22, 37, 54, 3, 8] }, - ] + grid: { + top: '22%', + left: '12%', + right: '3%', + bottom: '3%', + containLabel: true + }, + xAxis: [ + { + type: 'category', + axisLine: { + show: true, + lineStyle: { color: "rgba(255,255,255,0.2)" }, + }, + axisTick: { + inside: true, + lineStyle: { color: "rgba(255,255,255,0.2)" }, + }, + axisLabel: { + interval: 0, + color: "rgba(255,255,255,0.7)", + width: 40, + overflow:'truncate' + }, + } + ], + yAxis: [ + { + type: 'value', + splitLine: { show: false }, + axisTick: { + show: true, + inside: true, + length: 3, + lineStyle: { color: "rgba(255,255,255,0.2)" }, + }, + axisLine: { + show: true, + lineStyle: { color: "rgba(255,255,255,0.2)" }, + }, + axisLabel: { + color: "rgba(255,255,255,0.7)", + }, + } + ], + dataset: { + dimensions: ['buildName', 'accInCount', 'accOutCount'], + source: res.data.data + }, + series: [ + { + name: '进', + type: 'bar', + barWidth: 10, + emphasis: { + focus: 'series' + }, + }, + { + name: '出', + type: 'bar', + barWidth: 10, + emphasis: { + focus: 'series' + }, + }, + ] + }) }) }, //园区就餐 @@ -1276,11 +1288,19 @@ export default { }) }, //一周人员趋势 - getWeekPeople() { - let xCategory = ['周一', '周二', '周三', '周四', '周五', '周六', '周日']; + async getWeekPeople() { + let xCategory = []; + var oneDayTime = 24 * 60 * 60 * 1000; + var dayArr = []; + for (var i = 6; i > -1; i--) { + var showTime = (Date.now()) - i * oneDayTime; + dayArr.push(dateFormat(new Date(showTime), 'yyyy-MM-dd')); + xCategory.push('周' + '日一二三四五六'.charAt(new Date(showTime).getDay())); + } + // 1、封闭运行;2、非封闭执勤;3、备勤、4、居家休假和出差、5、社会面管控 var myChart = this.$echarts.init(document.getElementById("line1")); myChart.setOption({ - color: ['#07A6FF', '#2BF7AC', '#EC6941', '#FFC976'], + color: ['#07A6FF', '#2BF7AC', '#EC6941', '#FFC976', '#7D55FF'], title: { text: "一周人员趋势", left: '3%', @@ -1299,7 +1319,7 @@ export default { }, legend: { top: '6%', - right: '3%', + left: '40%', itemWidth: 12, itemHeight: 3, itemGap: 15, @@ -1354,7 +1374,7 @@ export default { ], series: [ { - name: '人员一', + name: '封闭运行', type: 'line', emphasis: { focus: 'series' @@ -1362,7 +1382,7 @@ export default { data: [10, 29, 51, 24, 4, 23, 7, 75] }, { - name: '人员二', + name: '非封闭执勤', type: 'line', emphasis: { focus: 'series' @@ -1370,7 +1390,7 @@ export default { data: [2, 9, 45, 43, 7, 23, 8, 35] }, { - name: '人员三', + name: '备勤', type: 'line', emphasis: { focus: 'series' @@ -1378,13 +1398,21 @@ export default { data: [20, 19, 54, 4, 78, 23, 7, 65] }, { - name: '人员四', + name: '居家休假和出差', type: 'line', emphasis: { focus: 'series' }, data: [120, 190, 54, 4, 78, 23, 71, 65] }, + { + name: '社会面管控', + type: 'line', + emphasis: { + focus: 'series' + }, + data: [110, 170, 54, 14, 8, 23, 75, 85] + }, ] }) },