门禁出入接口联调

dev
xuechunyuan 3 years ago
parent 6f35a449c8
commit 29f6962ca4
  1. 8
      src/api/source/total.js
  2. 262
      src/views/garden/generalizePatternNew.vue

@ -2484,4 +2484,12 @@ export const getYMInfo = (date) => {
method: "get", method: "get",
params: { date }, params: { date },
}); });
};
//获取疫苗接种情况
export const getDoorAccCount = (startTime,endTime) => {
return request({
url: "/api/blade-desk/door/get-build-door-acc-count",
method: "get",
params: { startTime, endTime },
});
}; };

@ -2,8 +2,7 @@
<!-- 概况模式 --> <!-- 概况模式 -->
<div class="bimModel"> <div class="bimModel">
<!-- 顶部右侧 --> <!-- 顶部右侧 -->
<div class="right_top_data flex-center" <div class="right_top_data flex-center" :style="{ top: '0.15rem' }">
:style="{ top: '0.15rem'}">
<div class="weather flex-center"> <div class="weather flex-center">
<img src="../../../public/img/home/right_top_tianqi.png" style="width: 0.26rem;margin-right: 0.1rem;" /> <img src="../../../public/img/home/right_top_tianqi.png" style="width: 0.26rem;margin-right: 0.1rem;" />
<span>{{ weatherData.weather ? <span>{{ weatherData.weather ?
@ -15,8 +14,7 @@
<span>温度{{ weatherData.temperature }}</span> <span>温度{{ weatherData.temperature }}</span>
</div> </div>
</div> </div>
<div class="right_top_data flex-center" <div class="right_top_data flex-center" :style="{ top: '0.47rem' }">
:style="{ top: '0.47rem' }">
<div class="dateType">{{ isHolidays ? '节假日' : '工作日' }}</div> <div class="dateType">{{ isHolidays ? '节假日' : '工作日' }}</div>
<div class="weather flex-center" style="margin-left: 0.29rem"> <div class="weather flex-center" style="margin-left: 0.29rem">
运行状态<span style="color: #07E6ED;">{{ (reportFangyi.status == 2 ? '分区域运行' : reportFangyi.status == 1 ? '封闭运行' : 运行状态<span style="color: #07E6ED;">{{ (reportFangyi.status == 2 ? '分区域运行' : reportFangyi.status == 1 ? '封闭运行' :
@ -31,28 +29,31 @@
<div class="box1"> <div class="box1">
<div class="box_item flex-center"> <div class="box_item flex-center">
<div class="item_label">在青/外地</div> <div class="item_label">在青/外地</div>
<div class="item_txt"><span class="big_txt">{{ isLeaveInfo.inQing }}</span>/<span <div class="item_txt"><span class="big_txt">{{ isLeaveInfo.inQing }}</span>/<span class="big_txt">{{
class="big_txt">{{ isLeaveInfo.notInQing }}</span></div> isLeaveInfo.notInQing
}}</span></div>
</div> </div>
<div class="box_item flex-center"> <div class="box_item flex-center">
<div class="item_label">胶州园区(封闭运行/机关行政)</div> <div class="item_label">胶州园区(封闭运行/机关行政)</div>
<div class="item_txt"><span class="big_txt">{{ allJzAdminInfo }}</span>/<span <div class="item_txt"><span class="big_txt">{{ allJzAdminInfo }}</span>/<span class="big_txt">{{ allJzInfo
class="big_txt">{{ allJzInfo }}</span></div> }}</span></div>
</div> </div>
<div class="box_item flex-center"> <div class="box_item flex-center">
<div class="item_label">流亭/台站</div> <div class="item_label">流亭/台站</div>
<div class="item_txt"><span class="big_txt">{{ allLtInfo }}</span>/<span class="big_txt">{{ allLtTzInfo }}</span> <div class="item_txt"><span class="big_txt">{{ allLtInfo }}</span>/<span class="big_txt">{{ allLtTzInfo
}}</span>
</div> </div>
</div> </div>
<div class="box_item flex-center"> <div class="box_item flex-center">
<div class="item_label">集中备勤/居家纯净</div> <div class="item_label">集中备勤/居家纯净</div>
<div class="item_txt"><span class="big_txt">{{ allBqInfo.JZBQ }}</span>/<span <div class="item_txt"><span class="big_txt">{{ allBqInfo.JZBQ }}</span>/<span class="big_txt">{{
class="big_txt">{{ allBqInfo.JJCJ }}</span></div> allBqInfo.JJCJ
}}</span></div>
</div> </div>
<div class="box_item flex-center"> <div class="box_item flex-center">
<div class="item_label">休假/外出</div> <div class="item_label">休假/外出</div>
<div class="item_txt"><span class="big_txt">{{ leaveInfo.XJWC }}</span>/<span <div class="item_txt"><span class="big_txt">{{ leaveInfo.XJWC }}</span>/<span class="big_txt">{{ leaveInfo.CC
class="big_txt">{{ leaveInfo.CC }}</span></div> }}</span></div>
</div> </div>
<div class="box_item flex-center"> <div class="box_item flex-center">
<div class="item_label">居家</div> <div class="item_label">居家</div>
@ -60,13 +61,14 @@
</div> </div>
<div class="box_item flex-center"> <div class="box_item flex-center">
<div class="item_label">集中隔离/居家隔离/小区封控</div> <div class="item_label">集中隔离/居家隔离/小区封控</div>
<div class="item_txt"><span class="big_txt">{{ codeInfo.jzgl }}</span>/<span <div class="item_txt"><span class="big_txt">{{ codeInfo.jzgl }}</span>/<span class="big_txt">{{ codeInfo.jjgl
class="big_txt">{{ codeInfo.jjgl }}</span>/<span class="big_txt">{{ codeInfo.fxts }}</span></div> }}</span>/<span class="big_txt">{{ codeInfo.fxts }}</span></div>
</div> </div>
<div class="box_item flex-center"> <div class="box_item flex-center">
<div class="item_label">健康码/行程码</div> <div class="item_label">健康码/行程码</div>
<div class="item_txt"><span class="big_txt">{{ codeInfo.healthRedCode }}</span>/<span <div class="item_txt"><span class="big_txt">{{ codeInfo.healthRedCode }}</span>/<span class="big_txt">{{
class="big_txt">{{ codeInfo.strokeRedCode }}</span></div> codeInfo.strokeRedCode
}}</span></div>
</div> </div>
</div> </div>
<!-- 公寓使用情况 --> <!-- 公寓使用情况 -->
@ -264,7 +266,8 @@
<div class="flex-center-around"> <div class="flex-center-around">
<div><br /></div> <div><br /></div>
<div :key="('carinfo' + i)" v-for="(value, key, i) in cardInfo['胶州']"> <div :key="('carinfo' + i)" v-for="(value, key, i) in cardInfo['胶州']">
<div :class="(i == 0 ? 'blue' : i == 1 ? 'green' : 'yellow')"><span class="big_txt">{{ value }}</span></div> <div :class="(i == 0 ? 'blue' : i == 1 ? 'green' : 'yellow')"><span class="big_txt">{{ value }}</span>
</div>
<div>{{ key }}</div> <div>{{ key }}</div>
</div> </div>
</div> </div>
@ -272,7 +275,8 @@
<div class="flex-center-around"> <div class="flex-center-around">
<div><br /></div> <div><br /></div>
<div :key="('carinfo_lt' + i)" v-for="(value, key, i) in cardInfo['流亭']"> <div :key="('carinfo_lt' + i)" v-for="(value, key, i) in cardInfo['流亭']">
<div :class="(i == 0 ? 'blue' : i == 1 ? 'green' : 'yellow')"><span class="big_txt">{{ value }}</span></div> <div :class="(i == 0 ? 'blue' : i == 1 ? 'green' : 'yellow')"><span class="big_txt">{{ value }}</span>
</div>
<div>{{ key }}</div> <div>{{ key }}</div>
</div> </div>
</div> </div>
@ -330,9 +334,9 @@ import {
isHolidays, isHolidays,
getJZAdminByDate, getJZAdminByDate,
getAllJJByDate, getAllJJByDate,
getDoorAccCount,
} from "@/api/source/total"; } from "@/api/source/total";
import { dateFormat } from "@/util/date"; import { dateFormat } from "@/util/date";
import { Message } from 'element-ui';
export default { export default {
components: { components: {
}, },
@ -563,100 +567,108 @@ export default {
}, },
// //
getDoor() { getDoor() {
var myChart = this.$echarts.init(document.getElementById("rightBar2")); getDoorAccCount('', '').then((res) => {
myChart.setOption({ var myChart = this.$echarts.init(document.getElementById("rightBar2"));
color: ['#2BF7AC', '#07A6FF'], res.data.data.map(item => {
title: { item.buildName = item.buildId + '号楼';
text: "单位:人", })
left: '6%', myChart.setOption({
top: '3%', color: ['#2BF7AC', '#07A6FF'],
textStyle: { title: {
color: '#07E6ED', text: "单位:人",
fontFamily: 'Microsoft YaHei', left: '6%',
fontSize: 14 top: '3%',
} textStyle: {
}, color: '#07E6ED',
tooltip: { fontFamily: 'Microsoft YaHei',
trigger: 'axis', fontSize: 14
axisPointer: { }
type: 'shadow'
}
},
legend: {
top: '3%',
right: '3%',
itemWidth: 12,
itemHeight: 3,
itemGap: 15,
textStyle: {
color: "rgba(255,255,255,0.5)",
fontSize: 12,
}, },
}, tooltip: {
grid: { trigger: 'axis',
top: '22%', axisPointer: {
left: '12%', type: 'shadow'
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'
}, },
data: [50, 68, 45, 97, 45, 55, 1]
}, },
{ legend: {
name: '出', top: '3%',
type: 'bar', right: '3%',
barWidth: 10, itemWidth: 12,
emphasis: { itemHeight: 3,
focus: 'series' 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() { async getWeekPeople() {
let xCategory = ['周一', '周二', '周三', '周四', '周五', '周六', '周日']; 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()));
}
// 12345
var myChart = this.$echarts.init(document.getElementById("line1")); var myChart = this.$echarts.init(document.getElementById("line1"));
myChart.setOption({ myChart.setOption({
color: ['#07A6FF', '#2BF7AC', '#EC6941', '#FFC976'], color: ['#07A6FF', '#2BF7AC', '#EC6941', '#FFC976', '#7D55FF'],
title: { title: {
text: "一周人员趋势", text: "一周人员趋势",
left: '3%', left: '3%',
@ -1299,7 +1319,7 @@ export default {
}, },
legend: { legend: {
top: '6%', top: '6%',
right: '3%', left: '40%',
itemWidth: 12, itemWidth: 12,
itemHeight: 3, itemHeight: 3,
itemGap: 15, itemGap: 15,
@ -1354,7 +1374,7 @@ export default {
], ],
series: [ series: [
{ {
name: '人员一', name: '封闭运行',
type: 'line', type: 'line',
emphasis: { emphasis: {
focus: 'series' focus: 'series'
@ -1362,7 +1382,7 @@ export default {
data: [10, 29, 51, 24, 4, 23, 7, 75] data: [10, 29, 51, 24, 4, 23, 7, 75]
}, },
{ {
name: '人员二', name: '非封闭执勤',
type: 'line', type: 'line',
emphasis: { emphasis: {
focus: 'series' focus: 'series'
@ -1370,7 +1390,7 @@ export default {
data: [2, 9, 45, 43, 7, 23, 8, 35] data: [2, 9, 45, 43, 7, 23, 8, 35]
}, },
{ {
name: '人员三', name: '备勤',
type: 'line', type: 'line',
emphasis: { emphasis: {
focus: 'series' focus: 'series'
@ -1378,13 +1398,21 @@ export default {
data: [20, 19, 54, 4, 78, 23, 7, 65] data: [20, 19, 54, 4, 78, 23, 7, 65]
}, },
{ {
name: '人员四', name: '居家休假和出差',
type: 'line', type: 'line',
emphasis: { emphasis: {
focus: 'series' focus: 'series'
}, },
data: [120, 190, 54, 4, 78, 23, 71, 65] data: [120, 190, 54, 4, 78, 23, 71, 65]
}, },
{
name: '社会面管控',
type: 'line',
emphasis: {
focus: 'series'
},
data: [110, 170, 54, 14, 8, 23, 75, 85]
},
] ]
}) })
}, },

Loading…
Cancel
Save