Browse Source

更改

wangqin
zhangzhang 8 months ago
parent
commit
c1f6c85161
  1. 2
      ruoyi-ui/src/api/equipment/type/api.js
  2. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/index.vue
  3. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/index.vue
  4. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue
  5. 27
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/index.vue
  6. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/GuardrailCollision/index.vue
  7. 42
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/index.vue
  8. 33
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue
  9. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue

2
ruoyi-ui/src/api/equipment/type/api.js

@ -145,7 +145,7 @@ export function listDevicesType() {
// 设备在线率统计
export function deviceStatusList(id) {
return request({
url: "/system/status/deviceStatusList?deviceld=" + id,
url: "/system/status/deviceStatusList/" + id,
method: "get",
});
}

2
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/index.vue

@ -12,7 +12,7 @@
<ElTabPane label="在线率统计" name="third">
<LineChart
v-if="activeName === 'third'"
:productId="dialogData.productId"
:productId="dialogData.id"
style="height: 150px"
/>
</ElTabPane>

2
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/index.vue

@ -27,7 +27,7 @@
<ElTabPane label="在线率统计" name="third">
<LineChart
v-if="activeName === 'third'"
:productId="dialogData.productId"
:productId="dialogData.id"
style="height: 180px"
/>
</ElTabPane>

2
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue

@ -11,7 +11,7 @@
<ElTabPane label="在线率统计" name="third">
<LineChart
v-if="activeName === 'third'"
:productId="dialogData.productId"
:productId="dialogData.id"
style="height: 180px"
/>
</ElTabPane>

27
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/index.vue

@ -4,11 +4,20 @@
<Video class="video-stream" :pileNum="dialogData.stakeMark" />
<ElTabs v-model="activeName" @tab-click="handleClickTabs" class="tabs">
<ElTabPane label="基本信息" name="first">
<Descriptions labelWidth="72px" :list="list" :data="data" style="gap: 18px" />
<Descriptions
labelWidth="72px"
:list="list"
:data="data"
style="gap: 18px"
/>
</ElTabPane>
<ElTabPane label="设备参数" name="second">设备参数</ElTabPane>
<ElTabPane label="在线率统计" name="third">
<LineChart v-if="activeName === 'third'" :productId="dialogData.productId" style="height: 180px" />
<LineChart
v-if="activeName === 'third'"
:productId="dialogData.id"
style="height: 180px"
/>
</ElTabPane>
</ElTabs>
</div>
@ -17,7 +26,10 @@
<Button @click.native="deviceControlVisible = true">设备操作</Button>
</template>
<DeviceControlDialog v-model="deviceControlVisible" :deviceId="dialogData.iotDeviceId" />
<DeviceControlDialog
v-model="deviceControlVisible"
:deviceId="dialogData.iotDeviceId"
/>
</Dialog>
</template>
@ -25,7 +37,10 @@
import Dialog from "@screen/components/Dialog/index.vue";
import Descriptions from "@screen/components/Descriptions.vue";
import Button from "@screen/components/Buttons/Button.vue";
import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import {
getRoadInfoByStakeMark,
getProduct,
} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import Video from "@screen/components/Video";
import DeviceControlDialog from "./components/DeviceControlDialog.vue";
@ -99,7 +114,7 @@ export default {
if (roadInfo) this.$set(this.data, "roadName", roadInfo.roadName);
},
methods: {
handleClickTabs() { },
handleClickTabs() {},
},
};
</script>
@ -140,7 +155,7 @@ export default {
align-items: center;
justify-content: end;
>div {
> div {
font-size: 16px;
padding: 6px 12px;
}

4
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/GuardrailCollision/index.vue

@ -9,7 +9,7 @@
</ElTabPane>
<ElTabPane label="在线率统计" name="third">
<LineChart v-if="activeName === 'third'" :productId="dialogData.productId" />
<LineChart v-if="activeName === 'third'" :productId="dialogData.id" />
</ElTabPane>
</ElTabs>
</div>
@ -179,7 +179,7 @@ div.switcher {
align-items: center;
justify-content: end;
>div {
> div {
font-size: 16px;
padding: 6px 12px;
}

42
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/index.vue

@ -9,14 +9,22 @@
</ElTabPane>
<ElTabPane label="设备参数" name="second">
<div class="content-second" style="height: 185px">
<RadioGroup v-model="roadType" :options="roadTypeList" @input="changeRadio" />
<RadioGroup
v-model="roadType"
:options="roadTypeList"
@input="changeRadio"
/>
<span>当前车流量: {{ carNum }}</span>
<LineChartForTraffic style="flex: 1" v-if="isShowCar && activeName === 'second'" :xData="xData"
:yData="yData" />
<LineChartForTraffic
style="flex: 1"
v-if="isShowCar && activeName === 'second'"
:xData="xData"
:yData="yData"
/>
</div>
</ElTabPane>
<ElTabPane label="在线率统计" name="third">
<LineChart v-if="activeName === 'third'" :productId="dialogData.productId" />
<LineChart v-if="activeName === 'third'" :productId="dialogData.id" />
</ElTabPane>
</ElTabs>
</div>
@ -40,7 +48,7 @@ import { dialogDelayVisible } from "./../mixin";
import request from "@/utils/request";
import { Message } from "element-ui";
import RadioGroup from "@screen/components/FormConfig/components/RadioGroup/index.vue";
import moment from 'moment/moment';
import moment from "moment/moment";
// 广
export default {
@ -72,8 +80,8 @@ export default {
},
carNum: 0,
objectValue: {
'1': 0,
'3': 0
1: 0,
3: 0,
},
xData: [],
yData: [],
@ -150,7 +158,7 @@ export default {
},
methods: {
changeRadio(value) {
this.carNum = this.objectValue[value + ''];
this.carNum = this.objectValue[value + ""];
this.isShowCar = false;
if (value == 3) {
this.yData = this.jnYData;
@ -162,7 +170,7 @@ export default {
// console.log('rdata', this.jnYData);
setTimeout(() => {
this.isShowCar = true;
}, 1000)
}, 1000);
},
getPropertiesHistory(deviceId) {
this.xData = [];
@ -177,17 +185,17 @@ export default {
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
this.objectValue = result.data[result.data.length - 1];
this.carNum = result.data[result.data.length - 1]['1'];
result.data.forEach(it => {
this.carNum = result.data[result.data.length - 1]["1"];
result.data.forEach((it) => {
this.xData.push(moment(it.timestamp).format("HH:mm"));
this.hzYData.push(it['1']);
this.jnYData.push(it['3']);
this.hzYData.push(it["1"]);
this.jnYData.push(it["3"]);
this.yData = this.hzYData;
})
});
this.isShowCar = true;
});
}
}
},
},
};
</script>
@ -240,7 +248,7 @@ div.switcher {
align-items: center;
justify-content: end;
>div {
> div {
font-size: 16px;
padding: 6px 12px;
}

33
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue

@ -14,15 +14,22 @@
<ElTabPane label="在线率统计" name="third">
<LineChart
v-if="activeName === 'third'"
:productId="dialogData.productId"
:productId="dialogData.id"
style="height: 180px"
/>
</ElTabPane>
</ElTabs>
</div>
<template #footer>
<Button v-if="activeName != 'first' && data.deviceState == '1'" @click.native="deviceControlVisible = true"> 设备操作 </Button>
<Button v-else-if="activeName != 'first'" style="background-color: #bbb;"> 设备离线 </Button>
<Button
v-if="activeName != 'first' && data.deviceState == '1'"
@click.native="deviceControlVisible = true"
>
设备操作
</Button>
<Button v-else-if="activeName != 'first'" style="background-color: #bbb">
设备离线
</Button>
</template>
<DeviceControlDialog
@ -99,7 +106,7 @@ export default {
label: "设备状态",
key: "deviceState",
// enum: "DeviceTypeEnum",
visible: false
visible: false,
},
{
label: "设备状态",
@ -117,7 +124,11 @@ export default {
// if (!this.dialogData.iotDeviceId) this.dialogData.iotDeviceId = '10.0.36.146-1883';
let deviceInfo = await this.getDeviceInfo();
this.data = { ...this.dialogData, roadName: null, deviceStateLiteral : deviceInfo.data.formatValue.deviceState };
this.data = {
...this.dialogData,
roadName: null,
deviceStateLiteral: deviceInfo.data.formatValue.deviceState,
};
// console.log(
// "%c [ dialogData ]-103-index.vue",
@ -134,15 +145,17 @@ export default {
if (roadInfo) this.data.roadName = roadInfo.roadName;
},
methods:{
methods: {
async getDeviceInfo() {
return request({
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}/3`,
url: `/business/device/properties/latest/${
this.dialogData.iotDeviceId || "10.0.36.143-1883"
}/3`,
method: "get",
params: {}
params: {},
});
}
}
},
},
};
</script>

2
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue

@ -94,7 +94,7 @@
<el-tab-pane label="在线率统计" name="third">
<LineChart
v-if="activeTab === 'third'"
:productId="selectedDevice.productId"
:productId="selectedDevice.id"
style="height: 160px"
/>
</el-tab-pane>

Loading…
Cancel
Save