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