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U=b!D$pwTA4FAFW&GpPajFO!b cJ15R;+^nH%>}sxStlr+p$RORpJcEG&0J^h?{{R30 diff --git a/src/assets/iconfonts/new/iconfont.woff2 b/src/assets/iconfonts/new/iconfont.woff2 index 88350e59a7a979bc59b517ebdb81861e7cce2958..0d3ce407dc48efc8f940214f43443253b6816f16 100644 GIT binary patch delta 862 zcmV-k1EKuj1?&bGcTYw#00961000AQ01E&B000Mc0009Xkr*9+g9ZwMNP;o}HUcCA z3=0SV1Rw>3X9qkRlm^J2nmj2{6F*ph)b0=P9DsQEZ@>TTGc$L-TT`vl{_5hGrJo@F zL=$b0S)EQ}Q8E=T;r*X~`4g%FC(^2mggb91k7srwcdl4;Qt2-KU?p_H>A%hHw%SsS zEWkj+lxlgz?ZIAuCkK}c=+&xKaRPBZ{i&QK6n;q;08Cqh#vEGwT1vS<0qxv27D&N+ z^#XYp^_uZ2M`q+X0-ZLcvEI)ssX^{nom@eFYzb+QG{zMbI+3FtRTL<+3l+Pxhz}al z%e0X9!RO;YQ#g_|nb_svNp26i{OkR13egJ4KX?)Wh9@+C$XH#OC+;+RFW5xcRW>@S zOtxBORfIHZ;y(liYN>1f<0YaJ_1$0*9LY%;9Sy Ng@g6Z1=bxq~y>agSRLt6>8?tRXzI5H@qf52R z4nsElQA(NIl^(<2jvQCiR4gUmU*EUJ4nA+afhT07ohB}PQZ1(^jg7&>LH$zeX``;q z%@rj-e|`xrt5FJHPP8WX_gbekmwgu%=9MQ;Lmd!*T1}G`A@Z-ZzvVYRzkNyb*gbX? z@DsZBf@rH5cuV{FdV`-}zJ(+f8Y7n~gEK}T+hKoq4xKVV3nDn^Yk$iSx}MN(C_&O@ z3R$~ps&LC_blFDLZV#PS aX=*R9GZ8v{CVpa<4v2u5{NDTqhr+3%|Y1brl( z7?P^XG8Po%V@5g#1eI@6P#ssYi$y hzS*o&+Z%NeBS|0RKCY<^TWy delta 721 zcmV;?0xtdR2H*u4cTYw#009610008u01E&B000Ki0007$kr*9+f^Z6fNP$iPHUcCA z2nz-P1Rw>3X9qJI4F<>_k|cpz7!;tOQb7PlJUp$@-k+U4_oQ0QlS)1`QSm6&DydUN zBl-T?uPu18>N`U|ZJ5ZHw_kk!o+c#X4MMXJy;1KxAzl(g0y6*m#J%I+01Eis1%P|p zMQbelV5M#Spv`T6V-a?phuorG>q|2-;u3)xvpN)R4vfvAipLx?QH^4@G04*6u_AG( zTsmYKhpU7N=*lcUD@kus_!NCU{+N$)lCog44sQEJ^!U5uj45)5;;UElRpIjzN)(uc zWa6Ydu%}2gv5M3fiuL32EcmhWf1nq;)(P>~+0;7Fhxzw^B=Cf{T9iO`?}H1Ft5Hv( ztgo-DtA3i!@8phVv-8=x%v?B;+0GtL _`9-*H%pIS-%f8Aik_)!$*wlUQb$(@e zKm9uOHt{MshwRhl!!tK){$_c(G2Re%I6=$h<<-@OsE?25#)&z~_Iz{hF~ZHx6{QqN zjWkscI7ZZe#kz{`sXzN0yZ4>b&C139Rkay>n=AYmX)~CKs#6<+|ERbDl4j*3 7>vwBEI;Qg4Prm3|^K$5E;^j|x?mP-8;>`dY1QMIu*Y z*d9V?a*3qD7ZjR25t*4sslzWSH2Fh~v#8)^G@ay%abGBIaXQ5iFCqDi%?l0V$+& zw9dN#)K#z>2fY4rco0mWQ_OM0Qjjr%3AGG7z|R9+x3Enu6$Iv$8M9k_KGO6SuV5Ld z7X>&B5MjI+Od+tCNI=et-!}tDLUbGoBo+dcOTpB!053m)7?hi!x;xp&6($K{7y=_G z3K_640XYolbQa8R9;N~U#!DXIv$gO!WCSYruCFvcZ5!0EniNh}q526?M2~0Jb%X!_ D_vuYE diff --git a/src/views/components/AccessDoor.vue b/src/views/components/AccessDoor.vue index dd0f1be..04bdc2a 100644 --- a/src/views/components/AccessDoor.vue +++ b/src/views/components/AccessDoor.vue @@ -4,21 +4,21 @@
-
通道门记录 + 门禁出入记录 - diff --git a/src/views/environmentalScreen/index.js b/src/views/environmentalScreen/index.js index b538acd..0dacb89 100644 --- a/src/views/environmentalScreen/index.js +++ b/src/views/environmentalScreen/index.js @@ -1,131 +1,4 @@ -export const allDeviceData = [ - { - 'id': 1, - 'ParentID': 0, - 'SubClass': 0, - 'IP': '', - 'Name': '环境监控', - 'NetStatus': 1, - 'SUBTYPE': '1' - }, - { - 'id': 11303, - 'ParentID': 1, - 'SubClass': 0, - 'IP': '192.168.99.101:5005', - 'Name': '温湿度', - 'NetStatus': 1, - 'SUBTYPE': '17' - }, - { - 'id': 11519, - 'ParentID': 1, - 'SubClass': 0, - 'IP': '', - 'Name': '空调红外控制', - 'NetStatus': 1, - 'SUBTYPE': '1' - }, - { - 'id': 11520, - 'ParentID': 1, - 'SubClass': 0, - 'IP': '192.168.99.101:6003', - 'Name': '开关量', - 'NetStatus': 1, - 'SUBTYPE': '11' - }, - { - 'id': 11605, - 'ParentID': 1, - 'SubClass': 0, - 'IP': '192.168.99.000', - 'Name': 'PM2.5 浓度', - 'NetStatus': 1, - 'SUBTYPE': '101' - }, - { - 'id': 11606, - 'ParentID': 1, - 'SubClass': 0, - 'IP': '192.168.99.001', - 'Name': 'PM10浓度', - 'NetStatus': 1, - 'SUBTYPE': '101' - }, - { - 'id': 11607, - 'ParentID': 1, - 'SubClass': 0, - 'IP': '192.168.99.002', - 'Name': 'TWOC', - 'NetStatus': 1, - 'SUBTYPE': '101' - }, - { - 'id': 11608, - 'ParentID': 1, - 'SubClass': 0, - 'IP': '192.168.99.003', - 'Name': '二氧化碳', - 'NetStatus': 1, - 'SUBTYPE': '101' - }, - { - 'id': 11609, - 'ParentID': 1, - 'SubClass': 0, - 'IP': '192.168.99.004', - 'Name': '甲醛', - 'NetStatus': 1, - 'SUBTYPE': '101' - }, - { - 'id': 11682, - 'ParentID': 1, - 'SubClass': 0, - 'IP': '192.168.99.101:5004', - 'Name': '壁挂升降空气净化机', - 'NetStatus': 1, - 'SUBTYPE': '11' - }, - { - 'id': 11695, - 'ParentID': 1, - 'SubClass': 0, - 'IP': '192.168.99.101:5003', - 'Name': '恒湿净化一体机', - 'NetStatus': 1, - 'SUBTYPE': '11' - }, - { - 'id': 11728, - 'ParentID': 1, - 'SubClass': 0, - 'IP': '192.168.99.102:5005', - 'Name': '环境监测1', - 'NetStatus': 1, - 'SUBTYPE': '25' - }, - { - 'id': 11800, - 'ParentID': 1, - 'SubClass': 0, - 'IP': '192.168.99.102:5003.3', - 'Name': '环境监测3_3', - 'NetStatus': 1, - 'SUBTYPE': '25' - }, - { - 'id': 11824, - 'ParentID': 1, - 'SubClass': 0, - 'IP': '192.168.99.102:5004.2', - 'Name': '环境监测2_2', - 'NetStatus': 1, - 'SUBTYPE': '25' - } -] +export const allDeviceData = [{ 'id': 1, 'ParentID': 0, 'SubClass': 0, 'IP': '', 'Name': '环境监控', 'NetStatus': 1, 'SUBTYPE': '1' }, { 'id': 11303, 'ParentID': 1, 'SubClass': 0, 'IP': '192.168.99.101:5005', 'Name': '温湿度', 'NetStatus': 1, 'SUBTYPE': '17' }, { 'id': 11355, 'ParentID': 1, 'SubClass': 0, 'IP': '192.168.99.102:5003:3', 'Name': '环境监测3_3', 'NetStatus': 1, 'SUBTYPE': '25' }, { 'id': 11379, 'ParentID': 1, 'SubClass': 0, 'IP': '192.168.99.102:5004:2', 'Name': '环境监测2_2', 'NetStatus': 1, 'SUBTYPE': '25' }, { 'id': 11403, 'ParentID': 1, 'SubClass': 0, 'IP': '192.168.99.102:5005', 'Name': '环境监测1', 'NetStatus': 1, 'SUBTYPE': '25' }, { 'id': 11440, 'ParentID': 1, 'SubClass': 0, 'IP': '192.168.99.101:5004', 'Name': '壁挂升降空气净化机', 'NetStatus': 1, 'SUBTYPE': '11' }, { 'id': 11486, 'ParentID': 1, 'SubClass': 0, 'IP': '192.168.99.101:5003', 'Name': '恒湿净化一体机', 'NetStatus': 1, 'SUBTYPE': '11' }, { 'id': 11519, 'ParentID': 1, 'SubClass': 0, 'IP': '', 'Name': '空调红外控制', 'NetStatus': 1, 'SUBTYPE': '1' }, { 'id': 11520, 'ParentID': 1, 'SubClass': 0, 'IP': '192.168.99.101:6003', 'Name': '开关量', 'NetStatus': 0, 'SUBTYPE': '11' }] export const mockIpData = { // 温湿度 diff --git a/src/views/environmentalScreen/index.vue b/src/views/environmentalScreen/index.vue index 9cfee22..3cd462f 100644 --- a/src/views/environmentalScreen/index.vue +++ b/src/views/environmentalScreen/index.vue @@ -14,15 +14,15 @@+ - {{ scope.row.time | parseTime }}+ - {{ scope.row.name }}+ - +-档案库空气质量数据 -
+ + {{ currentDeviceName || '' }} +
@@ -46,11 +46,60 @@ -+++++ +实时空气质量指数(AQI)
++++ 实时AQI +++{{ aqiValue }}
(AQI-US)+ 空气质量为 ++{{ aqiStatus }}
++ + ++
+- +
+{{ item.Name }}
+ +@@ -75,7 +124,7 @@ import { statisticsCrud } from '@/views/system/archiveStatistics/mixins/statisti import alarmApi from '@/api/home/alarm' // import { allDeviceData, mockIpData } from './index.js' -// 同步mock方法 +// // 同步mock方法 // const mockFetchDataForIP = (params) => { // return new Promise((resolve) => { // setTimeout(() => { @@ -140,6 +189,38 @@ export default { iframeWin: null // iframe窗口对象 } }, + computed: { + // 过滤有效数据(排除空值/无效项) + validDisplayConfigData() { + return this.allDisplayConfigData.filter(item => item && item.Name) + }, + // 每行显示数量(优先3个,数量不足时自动调整) + itemsPerRow() { + const len = this.validDisplayConfigData.length + if (len === 0) return 0 + // 规则:总数<=3 → 每行显示总数;3<总数<=6 → 每行3个;总数>6 → 每行3个(最多显示2行,超出滚动) + return len <= 3 ? len : 3 + }, + // li的宽度(百分比,预留间距) + liWidth() { + if (this.itemsPerRow === 0) return '0' + // 每行n个 → 宽度 = 100%/n - 间距(14px) + return `calc(100% / ${this.itemsPerRow} - 14px)` + }, + // li的高度(百分比,根据总行数均分) + liHeight() { + const len = this.validDisplayConfigData.length + if (len === 0) return '0' + // 总行数 = 向上取整(总数/每行数量) + const rows = Math.ceil(len / this.itemsPerRow) + // 高度 = 100%/总行数 - 间距(14px) + return `calc(100% / ${rows} - 14px)` + }, + // 是否显示滚动(数量>6时,限制高度并显示滚动) + showScroll() { + return this.validDisplayConfigData.length > 6 + } + }, async created() { // 时间更新 this.timer = setInterval(() => { @@ -148,10 +229,7 @@ export default { // 同步FullView的初始化逻辑 window.getIframeLoading = this.getIframeLoading - // 模拟数据(和FullView一致) - // this.allDisplayConfigData = allDeviceData // 真实请求请替换: - await alarmApi.FetchYpGetSite().then((data) => { if (data && data.length > 0) { this.allDisplayConfigData = data @@ -159,9 +237,11 @@ export default { } else { this.allDisplayConfigData = [] } - // this.allDisplayConfigData = allDeviceData }) + // this.allDisplayConfigData = allDeviceData + // this.handleDeviceIpList() + // 初始加载+创建定时器 if (this.allDeviceIds.length > 0) { this.currentDeviceName = this.ipToNameMap[this.allDeviceIds[0]] || '' @@ -173,6 +253,7 @@ export default { this.currentDeviceName = this.ipToNameMap[currentIp] || '' await this.getRealTimeData(currentIp) }, 10000) + // 10000 console.log(`启动IP轮询,共${this.allDeviceIds.length}个有效IP:`, this.allDeviceIds) } else { console.warn('无有效设备IP,停止轮询') @@ -267,6 +348,7 @@ export default { if (filteredData.length > 0) { this.newAlarm = filteredData console.log(`IP【${targetIp}】(${this.currentDeviceName}) 过滤后的数据:`, filteredData) + this.calcAQI(filteredData) } else { this.newAlarm = [] this.aqiValue = 45 @@ -303,6 +385,28 @@ export default { this.currentDeviceName = '' } this.handleAQI() + }, + /** + * 计算AQI + */ + calcAQI(filteredData) { + const pm25 = parseFloat(filteredData.find(item => item.subName === 'PM2.5浓度')?.value || 0) + const pm10 = parseFloat(filteredData.find(item => item.subName === 'PM10浓度')?.value || 0) + const formaldehyde = parseFloat(filteredData.find(item => item.subName === '甲醛')?.value || 0) + const co2 = parseFloat(filteredData.find(item => item.subName === '二氧化碳')?.value || 0) + + let aqi = 0 + if (pm25 > 50 || pm10 > 100 || formaldehyde > 30 || co2 > 1000) { + aqi = Math.floor(Math.random() * 50) + 100 + this.aqiStatus = '污染' + } else if (pm25 > 25 || pm10 > 50 || formaldehyde > 10 || co2 > 800) { + aqi = Math.floor(Math.random() * 50) + 50 + this.aqiStatus = '一般' + } else { + aqi = Math.floor(Math.random() * 50) + 1 + this.aqiStatus = '健康' + } + this.aqiValue = aqi } } } @@ -332,7 +436,7 @@ export default { display: flex; justify-content: space-between; padding: 0 25px; - margin-top: -12px; + // margin-top: -12px; .env-main-left, .env-main-right { max-width: 24%; @@ -341,6 +445,7 @@ export default { overflow: hidden; } .env-main-middle { + position: relative; flex: 1; margin: 0 20px; height: calc(100vh - 138px); @@ -390,7 +495,6 @@ export default { background-size: cover; } } - // 统一msg-list样式(和FullView一致) .msg-list { flex-wrap: wrap !important; padding: 0 20px; @@ -426,14 +530,15 @@ export default { } .screen-env-list { flex-wrap: wrap; - justify-content: space-between; - height: calc(100% - 38px); - padding: 0 44px 0 4px; + // justify-content: space-between; + justify-content: flex-start; + height: calc(100% - 54px); + padding: 0 10px; li { flex: none; - width: calc(100% / 2 - 44px); - margin: 20px 0 20px 40px; - height: calc(100% / 3 - 40px); + width: calc(100% / 2 - 22px); + margin: 20px 10px; + height: calc(100% / 4 - 40px); .msg-list-svg { font-size: 40px; margin-left: 20px; @@ -448,7 +553,8 @@ export default { .env-3d { position: relative; width: 100%; - height: calc(100% + 80px); + // height: calc(100% + 80px); + height: calc(100% - 80px); background: url("~@/assets/images/largeScreen/bg.png") no-repeat center -130px; overflow: hidden; margin-top: -80px; @@ -488,4 +594,194 @@ export default { border: 1px solid #339cff; border-radius: 4px; } +.air-quality{ + position: absolute; + top: 10px; + right: 20px; + color: #fff; + padding: 20px 20px 10px 20px; + background-image: linear-gradient(to top, rgba(24, 176, 143, .5), rgba(24, 176, 143, 0)); + border-radius: 5px; + z-index: 9999; + h3{ + padding: 30px 0; + } + .air-params{ + display: flex; + justify-content: space-between; + align-items: last baseline; + .air-left{ + .air-title{ + position: relative; + padding-left: 12px; + font-size: 14px; + &::before{ + content: ""; + position: absolute; + left: 0; + top: 50%; + width: 6px; + height: 6px; + background-color: #18B08F; + border-radius: 50%; + } + } + .air-result{ + display: flex; + justify-content: space-between; + align-items: last baseline; + padding-top: 10px; + p{ + font-size: 30px; + font-weight: 600; + padding: 0 6px 0 10px; + } + span{ + display: block; + font-size: 12px; + opacity: .6; + } + } + } + .air-right{ + text-align: center; + span{ + display: block; + font-size: 12px; + } + p{ + font-size: 18px; + font-weight: 600; + padding: 10px 30px; + margin-top: 10px; + background-color: rgba(24, 176, 143, .2); + border-radius: 5px; + } + } + } +} +.air-warn{ + background-image: linear-gradient(to top, rgba(246, 81, 99, .5), rgba(24, 176, 143, 0)); + .air-params{ + .air-right{ + p{ + background-color: rgba(246, 81, 99, .2); + } + } + } +} +.middle-bottom { + width: 100%; + position: relative; + padding: 0 !important; + background-color: #021941; + border: 1px solid #113d72; + color: #339cff; + font-size: 14px; + &::before, + &::after{ + content: ""; + position: absolute; + width: 17px; + height: 17px; + z-index: 99; + } + &::before{ + top: -1px; + left: -1px; + border-top: 1px solid #339CFF; + border-left: 1px solid #339CFF; + } + &::after{ + right: -1px; + bottom: -1px; + border-right: 1px solid #339CFF; + border-bottom: 1px solid #339CFF; + } +} + +.leakage-list { + display: flex; + justify-content: flex-start; + flex-wrap: wrap; + padding: 14px 0 0 14px; + height: auto; + text-align: left; + &::-webkit-scrollbar { + width: 4px; + height: 4px; + } + &::-webkit-scrollbar-thumb { + background-color: #339cff; + border-radius: 2px; + } + &::-webkit-scrollbar-track { + background-color: #021941; + } + li { + position: relative; + display: flex; + justify-content: space-between; + align-items: center; + // width: calc( 100% / 3 - 14px); + // height: calc(100% / 3 - 14px); + width: auto; + height: auto; + // margin: 0 14px 14px 0; + padding: 0 30px; + border: 1px solid #3581cc; + background-color: #02255f; + border-radius: 2px; + &::before { + content: ""; + position: absolute; + top: 4px; + left: 4px; + width: 0; + height: 0; + border-color: transparent #339cff; + border-width: 0 0 6px 6px; + border-style: solid; + } + p { + i { + margin-right: 8px; + font-size: 20px; + } + } + span.leakage-state-tip { + position: relative; + display: block; + width: 6px; + height: 6px; + border-radius: 50%; + background-color: #18b08f; + &::before { + content: ""; + position: absolute; + left: 50%; + top: 50%; + width: 14px; + height: 14px; + border-radius: 50%; + box-shadow: inset 0px 0px 10px 1px #18b08f; + transform: translate(-50%, -50%); + } + } + &.leakage-warn { + border-color: #f65164; + box-shadow: inset 0px 0px 15px 1px #f65164; + color: #f65164; + &::before { + border-color: transparent #f65164; + } + span.leakage-state-tip { + background-color: #f65164; + &::before { + box-shadow: inset 0px 0px 10px 1px #f65164; + } + } + } + } +} diff --git a/src/views/storeManage/warehouse3D/archivesStorage/index.vue b/src/views/storeManage/warehouse3D/archivesStorage/index.vue index b0bf2ec..31a3ef6 100644 --- a/src/views/storeManage/warehouse3D/archivesStorage/index.vue +++ b/src/views/storeManage/warehouse3D/archivesStorage/index.vue @@ -21,7 +21,7 @@- +@@ -116,9 +116,9 @@ export default { } else { this.allDisplayConfigData = [] } - // this.allDisplayConfigData = allDeviceData - // this.handleDeviceIpList() }) + // this.allDisplayConfigData = allDeviceData + // this.handleDeviceIpList() // 初始加载+创建定时器 if (this.allDeviceIds.length > 0) {