|
@@ -5,12 +5,12 @@
|
|
|
<image style="width: 40px; height: 40px; margin: auto 15px auto 0" :src="'/static/images/404.png'" mode="aspectFill"></image>
|
|
|
|
|
|
<view style="margin: auto auto auto 0">
|
|
|
- <view style="font-size: 15px"> {{ publicStore.$state.deviceDetailsArray.deviceName }} </view>
|
|
|
+ <view style="font-size: 15px"> {{ commonStore.$state.deviceDetailsArray.deviceName }} </view>
|
|
|
</view>
|
|
|
|
|
|
<view style="margin: auto 0 auto 0">
|
|
|
- <view :style="{ fontSize: '15px', color: publicStore.$state.deviceDetailsArray.deviceStatus == 1 ? '#16bf00' : 'red' }">
|
|
|
- {{ publicStore.$state.deviceDetailsArray.deviceStatus == 1 ? "在线" : "离线" }}
|
|
|
+ <view :style="{ fontSize: '15px', color: commonStore.$state.deviceDetailsArray.deviceStatus == 1 ? '#16bf00' : 'red' }">
|
|
|
+ {{ commonStore.$state.deviceDetailsArray.deviceStatus == 1 ? "在线" : "离线" }}
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -95,35 +95,35 @@
|
|
|
<script setup>
|
|
|
import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
|
|
|
import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
|
|
|
-import { publicStores, useStores } from "@/store/modules/index";
|
|
|
+import { useStores, commonStores } from "@/store/modules/index";
|
|
|
|
|
|
import chart from "./chart.vue";
|
|
|
|
|
|
import { dmpProductAttribute, historyMetrics, last } from "@/api/business/fireIot/deviceManage.js";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
-const publicStore = publicStores();
|
|
|
+const commonStore = commonStores();
|
|
|
|
|
|
const dataList = ref([
|
|
|
{
|
|
|
title: "设备类型",
|
|
|
- value: publicStore.$state.deviceDetailsArray.productName,
|
|
|
+ value: commonStore.$state.deviceDetailsArray.productName,
|
|
|
},
|
|
|
{
|
|
|
title: "设备编号",
|
|
|
- value: publicStore.$state.deviceDetailsArray.deviceId,
|
|
|
+ value: commonStore.$state.deviceDetailsArray.deviceId,
|
|
|
},
|
|
|
{
|
|
|
title: "物联网卡号",
|
|
|
- value: publicStore.$state.deviceDetailsArray.simCode,
|
|
|
+ value: commonStore.$state.deviceDetailsArray.simCode,
|
|
|
},
|
|
|
{
|
|
|
title: "安装位置",
|
|
|
- value: publicStore.$state.deviceDetailsArray.installAddress,
|
|
|
+ value: commonStore.$state.deviceDetailsArray.installAddress,
|
|
|
},
|
|
|
{
|
|
|
title: "添加时间",
|
|
|
- value: publicStore.$state.deviceDetailsArray.createdTime ? publicStore.$state.deviceDetailsArray.createdTime.replace("T", " ") : "",
|
|
|
+ value: commonStore.$state.deviceDetailsArray.createdTime ? commonStore.$state.deviceDetailsArray.createdTime.replace("T", " ") : "",
|
|
|
},
|
|
|
]);
|
|
|
|
|
@@ -151,7 +151,7 @@ function init() {
|
|
|
current: 1,
|
|
|
size: 100,
|
|
|
attributeName: "",
|
|
|
- productId: publicStore.$state.deviceDetailsArray.productId,
|
|
|
+ productId: commonStore.$state.deviceDetailsArray.productId,
|
|
|
}).then((requset) => {
|
|
|
if (requset.status === "SUCCESS") {
|
|
|
checkboxDataList.value = requset.data.records;
|
|
@@ -164,7 +164,7 @@ function init() {
|
|
|
});
|
|
|
|
|
|
last({
|
|
|
- deviceId: publicStore.$state.deviceDetailsArray.deviceId,
|
|
|
+ deviceId: commonStore.$state.deviceDetailsArray.deviceId,
|
|
|
metrics: array,
|
|
|
}).then((requsets) => {
|
|
|
if (requsets.status === "SUCCESS") {
|
|
@@ -217,8 +217,8 @@ function historyMetricsApi() {
|
|
|
historyMetrics({
|
|
|
startTime: calendarStartTime.value,
|
|
|
endTime: calendarEndTime.value,
|
|
|
- deviceId: publicStore.$state.deviceDetailsArray.deviceId,
|
|
|
- deviceType: publicStore.$state.deviceDetailsArray.deviceType,
|
|
|
+ deviceId: commonStore.$state.deviceDetailsArray.deviceId,
|
|
|
+ deviceType: commonStore.$state.deviceDetailsArray.deviceType,
|
|
|
metrics: checkboxValueList.value,
|
|
|
}).then((requset) => {
|
|
|
if (requset.status === "SUCCESS") {
|