|
@ -16,11 +16,11 @@ |
|
|
</ElTabPane> |
|
|
</ElTabPane> |
|
|
</ElTabs> |
|
|
</ElTabs> |
|
|
</div> |
|
|
</div> |
|
|
<template #footer v-hasPermi="['business:home:equipmentBox']"> |
|
|
<template #footer> |
|
|
<Button v-if="activeName != 'first' && data.deviceState == '1'" @click.native="deviceControlVisible = true"> |
|
|
<Button v-if="check('business:home:equipmentBox') && activeName != 'first' && data.deviceState == '1'" @click.native="deviceControlVisible = true"> |
|
|
设备操作 |
|
|
设备操作 |
|
|
</Button> |
|
|
</Button> |
|
|
<Button v-else-if="activeName != 'first'" style="background-color: #bbb"> |
|
|
<Button v-else-if="check('business:home:equipmentBox') && activeName != 'first'" style="background-color: #bbb"> |
|
|
设备离线 |
|
|
设备离线 |
|
|
</Button> |
|
|
</Button> |
|
|
</template> |
|
|
</template> |
|
@ -38,6 +38,7 @@ import LineChart from "../../LineChart/index.vue"; |
|
|
import DeviceParams from "./components/DeviceParams.vue"; |
|
|
import DeviceParams from "./components/DeviceParams.vue"; |
|
|
import DeviceControlDialog from "./components/DeviceControlDialog.vue"; |
|
|
import DeviceControlDialog from "./components/DeviceControlDialog.vue"; |
|
|
|
|
|
|
|
|
|
|
|
import { checkPermi } from "@/utils/permission.js"; |
|
|
import request from "@/utils/request"; |
|
|
import request from "@/utils/request"; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
@ -146,6 +147,9 @@ export default { |
|
|
// if (roadInfo) this.data.roadName = roadInfo.roadName; |
|
|
// if (roadInfo) this.data.roadName = roadInfo.roadName; |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
check(arr){ |
|
|
|
|
|
return checkPermi(arr); |
|
|
|
|
|
}, |
|
|
async getDeviceInfo() { |
|
|
async getDeviceInfo() { |
|
|
return request({ |
|
|
return request({ |
|
|
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || "10.0.36.143-1883" |
|
|
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || "10.0.36.143-1883" |
|
|