This commit is contained in:
hzz 2025-03-05 17:15:13 +08:00
parent 917ad2433f
commit 8e85182ced
5 changed files with 37 additions and 25 deletions

View File

@ -9,8 +9,8 @@
*/
// export const development={xhr:process.env.VUE_APP_BASE_API,ws:"ws://192.168.110.116:9018/",imgxhr:process.env.VUE_APP_BASE_API+"/image/"}
export const development={xhr:process.env.VUE_APP_BASE_API,ws:"ws://8.130.165.100:9018/",imgxhr:process.env.VUE_APP_BASE_API}
export const production={xhr:process.env.VUE_APP_BASE_API,ws:"ws://8.130.165.100:9018/",imgxhr:process.env.VUE_APP_BASE_API}
export const development={xhr:process.env.VUE_APP_BASE_API,ws:"ws://8.141.87.86:9018/",imgxhr:process.env.VUE_APP_BASE_API}
export const production={xhr:process.env.VUE_APP_BASE_API,ws:"ws://8.141.87.86:9018/",imgxhr:process.env.VUE_APP_BASE_API}
//拼接图片url路径
export function imgurlAddXhr(img){
let src=null

View File

@ -15,7 +15,7 @@
ref="headerref"
:width="'100%'"
:height="'150px'"
:title="'再登高-环境物联管理系统'"
:title="title"
:titleTip="titleTip"
:typeFun="['time']"
:alarmType="[]"
@ -70,6 +70,7 @@ import right from "./right.vue";
import top from "./top.vue";
import { useI18n } from "vue-i18n";
let { t } = useI18n();
let title = ref('再登高-环境物联管理系统');
let titleTip = [
{
color: "#20AEC5",
@ -105,10 +106,12 @@ async function getSensorByDeptfun() {
if (result.code == 200) {
topref.value.setcontentData(result.data);
bottomref.value.setcontentData({
power: { "5月": 445, "4月": 1102, "3月": 1861, "2月": 1754, "1月": 1344 },
power: { "3月": 101, "2月": 1754, "1月": 1344 },
});
// bottomref.value.setcontentData(result.data);
rightref.value.setcontentData(result.data);
rightref.value.setcontentData({
dust: result.data.dust[0],
});
}
}
@ -120,6 +123,7 @@ function getConfigKeyFun() {
getConfigKey("humidity_top"),
getConfigKey("dust10"),
getConfigKey("dust25"),
getConfigKey("goats.environment"),
]
Promise.all(axios_arr).then((res:any) => {
@ -131,6 +135,7 @@ function getConfigKeyFun() {
dust10: res[4].msg,
dust25: res[5].msg,
}
title.value = res[6].msg;
store.limit = limit;
});
@ -145,10 +150,10 @@ function getWebsocket(val) {
// store.changenoise(data.msg);
topref.value.setcontentData(data.msg);
bottomref.value.setcontentData(data.msg);
rightref.value.setcontentData(data.msg);
// rightref.value.setcontentData(data.msg);
}
if (data.type == "dust") {
if (data.msg.devId == "ae578cd0-efd1-11ed-b2ee-2d727e0cafab") {
if (data.msg.devId == "8d9b8af0-f8a8-11ef-91f3-abd609c7e488") {
rightref.value.setcontentData({
dust: { pm25: data.msg.pm25, pm10: data.msg.pm10 },
});
@ -163,7 +168,6 @@ function errWebsocket(val) {
onMounted(() => {
let contentBox = Acontent.value;
// let Timedombox=Timedom.value
window.document.title = "再登高-环境物联管理系统";
WH(contentBox);
window.addEventListener("resize", () => {
if (time.value) {
@ -176,6 +180,9 @@ onMounted(() => {
});
getConfigKeyFun();
getSensorByDeptfun();
window.document.title = title.value;
connectWebsocket(null, null, getWebsocket, errWebsocket);
});
onUnmounted(() => {

View File

@ -155,6 +155,8 @@ let {t} = useI18n();
// }
// }
function setcontentData(val){
console.log(val,'11111111');
let monthData2=[]
let powerMonth2=[]
for(let key in val.rate){
@ -197,8 +199,8 @@ let {t} = useI18n();
// Productionref.value.changeData(ProductionOption.option)
// pmref.value.setData({two:10,ten:10})
pm25ref.value.setData(val.dust[0].pm25)
pm10ref.value.setData(val.dust[0].pm10)
pm25ref.value.setData(val.dust.pm25)
pm10ref.value.setData(val.dust.pm10)
// pmref.value.setData({two:val.dust.pm25,ten:val.dust.pm10})
}
onMounted(() => {

View File

@ -262,12 +262,12 @@ const powerBox = (width: any, height: any) => {
// verticalNum3.value.setData(val.FIRE,'icon-ranqi',5,"")
// verticalNum4.value.setData(val.noise,'icon-shengyin',120,"dB")
// verticalNum5.value.setData(val.Smoke,'icon-yanwubaojingqi',200,"ppm")
verticalNum4.value.setData(52,'icon-shengyin',120,"dB")
verticalNum4.value.setData(val.noise?val.noise[0].data:52,'icon-shengyin',120,"dB")
verticalNum5.value.setData(100,'icon-yanwubaojingqi',200,"ppm")
// verticalNum6.value.setData(val.TVOC_CH2O.CH2O,'icon-app_icons--',5,"mg/m3")
// verticalNum7.value.setData(val.TVOC_CH2O.TVOC,'icon-TVOC-Outlined',5,"PPM")
// console.log(pmref.value);
humidityref.value.setData({h:42.9,c:25.5})
humidityref.value.setData({h:val.temp_humi?val.temp_humi[0].huim:42.9,c:val.temp_humi?val.temp_humi[0].temp:25.9})
// humidityref.value.setData({h:val.temp_humi.huim,c:val.temp_humi.temp})
let type=[]
let valueduct=[]

View File

@ -99,16 +99,18 @@ async function reqScreenByHash() {
let isTrue = regex.test(item.img);
return {
id: item.id,
isLink: false,
isLink: regex.test(item.path),
path: item.path,
title: item.title,
url: isTrue ? item.img : imgurlAddXhr(item.img),
hash: hash,
screenType: item.screenType
screenType: item.screenType,
releases: item.releases
}
})
routerList.value.forEach(element => {
if (element.releases === true) {
if (element.screenType !== null) {
if (categoryList.value.hasOwnProperty(element.screenType)) {
categoryList.value[element.screenType].push(element)
@ -122,8 +124,8 @@ async function reqScreenByHash() {
categoryList.value['其他'] = [element]
}
}
}
});
console.log(categoryList.value);
}
@ -171,6 +173,7 @@ onUnmounted(() => { });
color: whitesmoke;
}
.category-item {
width: 1920px;
display: flex;