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. 23
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/index.vue
  6. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/GuardrailCollision/index.vue
  7. 40
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/index.vue
  8. 31
      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) { export function deviceStatusList(id) {
return request({ return request({
url: "/system/status/deviceStatusList?deviceld=" + id, url: "/system/status/deviceStatusList/" + id,
method: "get", method: "get",
}); });
} }

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

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

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

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

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

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

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

@ -4,11 +4,20 @@
<Video class="video-stream" :pileNum="dialogData.stakeMark" /> <Video class="video-stream" :pileNum="dialogData.stakeMark" />
<ElTabs v-model="activeName" @tab-click="handleClickTabs" class="tabs"> <ElTabs v-model="activeName" @tab-click="handleClickTabs" class="tabs">
<ElTabPane label="基本信息" name="first"> <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>
<ElTabPane label="设备参数" name="second">设备参数</ElTabPane> <ElTabPane label="设备参数" name="second">设备参数</ElTabPane>
<ElTabPane label="在线率统计" name="third"> <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> </ElTabPane>
</ElTabs> </ElTabs>
</div> </div>
@ -17,7 +26,10 @@
<Button @click.native="deviceControlVisible = true">设备操作</Button> <Button @click.native="deviceControlVisible = true">设备操作</Button>
</template> </template>
<DeviceControlDialog v-model="deviceControlVisible" :deviceId="dialogData.iotDeviceId" /> <DeviceControlDialog
v-model="deviceControlVisible"
:deviceId="dialogData.iotDeviceId"
/>
</Dialog> </Dialog>
</template> </template>
@ -25,7 +37,10 @@
import Dialog from "@screen/components/Dialog/index.vue"; import Dialog from "@screen/components/Dialog/index.vue";
import Descriptions from "@screen/components/Descriptions.vue"; import Descriptions from "@screen/components/Descriptions.vue";
import Button from "@screen/components/Buttons/Button.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 Video from "@screen/components/Video";
import DeviceControlDialog from "./components/DeviceControlDialog.vue"; import DeviceControlDialog from "./components/DeviceControlDialog.vue";

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

@ -9,7 +9,7 @@
</ElTabPane> </ElTabPane>
<ElTabPane label="在线率统计" name="third"> <ElTabPane label="在线率统计" name="third">
<LineChart v-if="activeName === 'third'" :productId="dialogData.productId" /> <LineChart v-if="activeName === 'third'" :productId="dialogData.id" />
</ElTabPane> </ElTabPane>
</ElTabs> </ElTabs>
</div> </div>

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

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

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

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

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

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

Loading…
Cancel
Save