Commit cc9fb299 authored by 纪泽龙's avatar 纪泽龙

更改阀门井,调压箱,场站的infowindow业务逻辑与顺序

parent 6a23c7d8
/*
* @Author: your name
* @Date: 2022-02-23 15:28:07
* @LastEditTime: 2022-03-01 15:54:19
* @LastEditTime: 2022-03-04 17:16:53
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /newDev/gassafety-progress/gassafetyprogress-web/src/api/bigWindow/getdevice.js
......@@ -25,6 +25,15 @@ export function getTyx(query) {
params: query
})
}
// 调压箱下面的设备接口
export function getTyxDevice(query) {
return request({
url: '/pipe/pipe/selectPressureFlow',
method: 'get',
params: query
})
}
// 是阀门
export function getFm(query) {
......@@ -35,6 +44,15 @@ export function getFm(query) {
})
}
// 阀门下面的设备接口
export function getFmDevice(query) {
return request({
url: '/pipe/pipe/selectPressureFlow',
method: 'get',
params: query
})
}
// 厂站
export function getCz(query) {
......@@ -44,6 +62,14 @@ export function getCz(query) {
params: query
})
}
// 场站下的设备
export function getCzDevice(query) {
return request({
url: '/pipe/pipe/selecttSiteStationInfoData',
method: 'get',
params: query
})
}
// 监控
export function getVideo(query) {
return request({
......
<!--
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-02-28 18:05:19
* @LastEditTime: 2022-03-04 17:25:27
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
......@@ -61,8 +61,15 @@
<div>已处理报警</div>
<div class="last">报警中</div>
</div>
<div class="tbody flex" v-if="Array.isArray(deviceData.pressureFlows)">
<div class="first zzz">{{ "压力表" }}</div>
<template v-if="list.length > 0">
<div
class="tbody flex"
v-for="deviceData in list"
:key="deviceData.inAlarm+Math.random()"
>
<div v-unValue class="first zzz">
{{ typeList[deviceData.dataType] }}
</div>
<div v-unValue class="">{{ deviceData.numberPressureGauges }}</div>
<div v-unValue class="">
{{ deviceData.onlineEquipment }}
......@@ -80,25 +87,7 @@
{{ deviceData.inAlarm }}
</div>
</div>
<div class="tbody flex" v-if="Array.isArray(deviceData.pressureFlows)">
<div class="first zzz">{{ "流量计" }}</div>
<div v-unValue class="">{{ deviceData.numberEquipment }}</div>
<div v-unValue class="">
{{ deviceData.numberOnlineEquipment }}
</div>
<div v-unValue class="">
{{ deviceData.numberOfflineEquipment }}
</div>
<div v-unValue class="">
{{ deviceData.numberHistoricalAlarm }}
</div>
<div v-unValue class="">
{{ deviceData.numberAlarmProcessed }}
</div>
<div v-unValue class="last">
{{ deviceData.numberInAlarm }}
</div>
</div>
</template>
</div>
<div class="btn">
......@@ -109,12 +98,49 @@
<script>
import { companyType, deviceType } from "@/utils/mapClass/config.js";
import { getCzDevice } from "@/api/bigWindow/getDevice.js";
export default {
data() {
return {
companyType,
deviceType,
profile: "暂无",
typeList: {
// 1压力表 2流量计 3探测器
1: "压力表",
2: "流量计",
3: "探测器",
},
list: [
{
numberPressureGauges: "-",
onlineEquipment: "-",
offlineEquipment: "-",
historicalAlarm: "-",
alarmProcessed: "-",
inAlarm: "-",
dataType: 1,
},
{
numberPressureGauges: "-",
onlineEquipment: "-",
offlineEquipment: "-",
historicalAlarm: "-",
alarmProcessed: "-",
inAlarm: "-",
dataType: 2,
},
{
numberPressureGauges: "-",
onlineEquipment: "-",
offlineEquipment: "-",
historicalAlarm: "-",
alarmProcessed: "-",
inAlarm: "-",
dataType: 3,
},
],
};
},
computed: {
......@@ -133,7 +159,8 @@ export default {
this.companyType[item.conpanyId] = item.companyName;
});
}
console.log(this.deviceData);
this.myHttp()
},
methods: {
close() {
......@@ -142,6 +169,12 @@ export default {
btnClick() {
this.vueRoot.centerDataFunc(this.deviceData.pressureFlows);
},
myHttp() {
getCzDevice({ deviceId: this.deviceData.siteStationId }).then((res) => {
this.list = res.data[0].subordinateEquipmentList;
console.log("resresres",res)
});
},
},
};
</script>
......
<!--
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-03-03 11:51:13
* @LastEditTime: 2022-03-04 17:27:21
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
......@@ -61,8 +61,15 @@
<div>已处理报警</div>
<div class="last">报警中</div>
</div>
<div class="tbody flex" v-if="Array.isArray(deviceData.pressureFlows)">
<div class="first zzz">{{ "压力表" }}</div>
<template v-if="list.length > 0">
<div
class="tbody flex"
v-for="deviceData in list"
:key="deviceData.inAlarm+Math.random()"
>
<div v-unValue class="first zzz">
{{ typeList[deviceData.dataType] }}
</div>
<div v-unValue class="">{{ deviceData.numberPressureGauges }}</div>
<div v-unValue class="">
{{ deviceData.onlineEquipment }}
......@@ -80,42 +87,60 @@
{{ deviceData.inAlarm }}
</div>
</div>
<div class="tbody flex" v-if="Array.isArray(deviceData.pressureFlows)">
<div class="first zzz">{{ "流量计" }}</div>
<div v-unValue class="">{{ deviceData.numberEquipment }}</div>
<div v-unValue class="">
{{ deviceData.numberOnlineEquipment }}
</div>
<div v-unValue class="">
{{ deviceData.numberOfflineEquipment }}
</div>
<div v-unValue class="">
{{ deviceData.numberHistoricalAlarm }}
</div>
<div v-unValue class="">
{{ deviceData.numberAlarmProcessed }}
</div>
<div v-unValue class="last">
{{ deviceData.numberInAlarm }}
</div>
</div>
</template>
</div>
<div class="btn">
<div @click="btnClick">感知设备</div>
<!-- <div @click="btnClick">感知设备</div> -->
</div>
</div>
</template>
<script>
import { companyType, deviceType } from "@/utils/mapClass/config.js";
import { getTyx, getFm } from "@/api/bigWindow/getDevice.js";
import { getTyxDevice, getFmDevice } from "@/api/bigWindow/getDevice.js";
export default {
data() {
return {
companyType,
deviceType,
profile: "暂无",
typeList: {
// 1压力表 2流量计 3探测器
1: "压力表",
2: "流量计",
3: "探测器",
},
list: [
{
numberPressureGauges: "-",
onlineEquipment: "-",
offlineEquipment: "-",
historicalAlarm: "-",
alarmProcessed: "-",
inAlarm: "-",
dataType: 1,
},
{
numberPressureGauges: "-",
onlineEquipment: "-",
offlineEquipment: "-",
historicalAlarm: "-",
alarmProcessed: "-",
inAlarm: "-",
dataType: 2,
},
{
numberPressureGauges: "-",
onlineEquipment: "-",
offlineEquipment: "-",
historicalAlarm: "-",
alarmProcessed: "-",
inAlarm: "-",
dataType: 3,
},
],
};
},
computed: {
......@@ -146,25 +171,16 @@ export default {
this.vueRoot.centerDataFunc(this.deviceData.pressureFlows);
},
myHttp() {
console.log(this.deviceData.iconType)
console.log(this.deviceData.iconType);
if (this.deviceData.iconType == 2) {
getTyx({ DeviceId: this.deviceData.DeviceId }).then((res) => {
if (res.code == 200) {
const data = res.data.filter(
(item) => item.deviceId == this.deviceData.deviceId
)[0].detectorCountList;
this.deviceData.detectorCountList = data;
}
getTyxDevice({ deviceId: this.deviceData.deviceId }).then((res) => {
this.list = res.data[0].subordinateEquipmentList;
console.log(this.list);
});
} else {
getFm({ DeviceId: this.deviceData.DeviceId }).then((res) => {
if (res.code == 200) {
const data = res.data.filter(
(item) => item.deviceId == this.deviceData.deviceId
)[0].detectorCountList;
this.deviceData.detectorCountList = data;
}
getFmDevice({ deviceId: this.deviceData.deviceId }).then((res) => {
this.list = res.data[0].subordinateEquipmentList;
});
}
},
......
<!--
* @Author: your name
* @Date: 2022-01-11 13:44:17
* @LastEditTime: 2022-03-03 16:23:01
* @LastEditTime: 2022-03-04 14:34:32
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/views/Home.vue
-->
<template>
<div class="home bigwindow">
<div class="goSystem" @click="$router.push('/index')">进入管理系统</div>
<div id="map"></div>
<Center :show="show" :centerData="centerData" />
......@@ -180,6 +182,7 @@ export default {
},
data() {
return {
map: null,
show: false,
centerData: null,
......@@ -352,7 +355,6 @@ export default {
goMap(httpFunc, addFunc, component) {
return httpFunc().then((res) => {
// 给用户加icontype
if (res.data && !res.data[0].iconType) {
res.data.forEach((item) => {
item.iconType = 6;
......@@ -371,6 +373,8 @@ export default {
} else {
config = { data: res.data };
}
console.log("reresresresresresresresresress",config)
addFunc(config, component);
return config.iconType;
});
......
......@@ -34,8 +34,8 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `http://192.168.2.14:8903/gassafety`,
target: `http://222.223.203.154:8092/gassafety`,
target: `http://192.168.2.14:8903/gassafety`,
// target: `http://222.223.203.154:8092/gassafety`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment