|
|
@@ -195,45 +195,76 @@
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
<!--设备详情弹窗-->
|
|
|
- <el-dialog v-model="viewDialog.visible" :title="viewDialog.title" width="1000px" append-to-body>
|
|
|
- <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClickTab">
|
|
|
- <el-tab-pane label="状态检测" name="info">
|
|
|
+ <el-dialog v-model="viewDialog.visible" :title="viewDialog.title" width="1000px" style="height: 800px"
|
|
|
+ append-to-body>
|
|
|
+ <el-tabs v-model="activeName" style="height: 600px" @tab-click="handleClickTab">
|
|
|
+ <el-tab-pane label="设备详情" name="info">
|
|
|
<div>
|
|
|
- <div style="display: flex; justify-content: space-around; align-items: center">
|
|
|
- <div style="text-align: center">
|
|
|
- <div style="position: relative">
|
|
|
- CPU :
|
|
|
- <el-progress type="circle" :percentage="deviceRunInfo.cpuInfo"></el-progress>
|
|
|
- <div style="position: absolute; top: -30px; left: 50%; transform: translateX(-50%)">{{ deviceRunInfo.cpuInfo }}%</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div style="text-align: center">
|
|
|
- <div style="position: relative">
|
|
|
- 内存 :
|
|
|
- <el-progress type="circle" :percentage="deviceRunInfo.memoryInfo"></el-progress>
|
|
|
- <div style="position: absolute; top: -30px; left: 50%; transform: translateX(-50%)">{{ deviceRunInfo.memoryInfo }}%</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div style="text-align: center">
|
|
|
- <div style="position: relative">
|
|
|
- 硬盘 :
|
|
|
- <el-progress type="circle" :percentage="deviceRunInfo.diskInfo"></el-progress>
|
|
|
- <div style="position: absolute; top: -30px; left: 50%; transform: translateX(-50%)">{{ deviceRunInfo.diskInfo }}%</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div>ROM : {{ deviceRunInfo.rom }}</div>
|
|
|
- <div>系统信息 : {{ deviceRunInfo.osInfo }}</div>
|
|
|
- <div>APK版本 : {{ deviceRunInfo.apkVersion }}</div>
|
|
|
+ <span>设备名称:{{ deviceRunInfo.deviceBase.name }}</span>
|
|
|
+ <span style="margin-left: 50px">SN:{{ deviceRunInfo.deviceBase.serialNumber }}</span>
|
|
|
+ <span style="margin-left: 50px">MAC:{{ deviceRunInfo.deviceBase.mac }}</span>
|
|
|
+ <br/>
|
|
|
</div>
|
|
|
+ <div style="margin-top: 20px">
|
|
|
+ <span>分辨率:{{ deviceRunInfo.deviceBase.width }}*{{ deviceRunInfo.deviceBase.height }}</span>
|
|
|
+ <span style="margin-left: 50px">加密标识:{{ deviceRunInfo.deviceBase.identifier }}</span>
|
|
|
+ </div>
|
|
|
+ <div style="margin-top: 20px">
|
|
|
+ <span>最后一次上线:{{ deviceRunInfo.deviceBase.lastOnline }}</span>
|
|
|
+ <span style="margin-left: 50px">上次离线:{{ deviceRunInfo.deviceBase.offlineTime }}</span>
|
|
|
+ <span style="margin-left: 50px">创建时间:{{ deviceRunInfo.deviceBase.createTime }}</span>
|
|
|
+ </div>
|
|
|
+ <!-- 音量 -->
|
|
|
+ <div style="margin-top: 20px">
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <!-- 亮度 -->
|
|
|
+ <div style="margin-top: 20px; display: flex; align-items: center;">
|
|
|
+ 亮度:
|
|
|
+ <el-progress :show-text="false" :stroke-width="26" :percentage="deviceRunInfo.bright"
|
|
|
+ style="margin-left: 10px;"/>
|
|
|
+ </div>
|
|
|
+ <!-- <div>
|
|
|
+ <div style="display: flex; justify-content: space-around; align-items: center">
|
|
|
+ <div style="text-align: center">
|
|
|
+ <div style="position: relative">
|
|
|
+ CPU :
|
|
|
+ <el-progress type="circle" :percentage="deviceRunInfo.cpuUsage"></el-progress>
|
|
|
+ <div style="position: absolute; top: -30px; left: 50%; transform: translateX(-50%)">
|
|
|
+ {{ deviceRunInfo.cpuUsage }}%
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="text-align: center">
|
|
|
+ <div style="position: relative">
|
|
|
+ 内存 :
|
|
|
+ <el-progress type="circle" :percentage="deviceRunInfo.ramUsageOfByte"></el-progress>
|
|
|
+ <div style="position: absolute; top: -30px; left: 50%; transform: translateX(-50%)">
|
|
|
+ {{ deviceRunInfo.ramUsageOfByte }}%
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="text-align: center">
|
|
|
+ <div style="position: relative">
|
|
|
+ 硬盘 :
|
|
|
+ <el-progress type="circle" :percentage="deviceRunInfo.externalUsage"></el-progress>
|
|
|
+ <div style="position: absolute; top: -30px; left: 50%; transform: translateX(-50%)">
|
|
|
+ {{ deviceRunInfo.externalUsage }}%
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div>系统信息 : {{ deviceRunInfo.systemBuildVersion }}</div>
|
|
|
+ <div>APK版本 : {{ deviceRunInfo.versionName }}</div>
|
|
|
+ </div>-->
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="远程操作" name="control">
|
|
|
<el-button :loading="buttonLoading" type="primary" @click="handleControl('reboot')">设备重启</el-button>
|
|
|
<el-button :loading="buttonLoading" type="primary" @click="handleControl('start')">远程开机</el-button>
|
|
|
<el-button :loading="buttonLoading" type="primary" @click="handleControl('shutdown')">远程关机</el-button>
|
|
|
<el-button :loading="buttonLoading" type="primary" @click="handleControl('standby')">设备待机</el-button>
|
|
|
- <el-button :loading="buttonLoading" type="primary" @click="handleVoice">音量调节</el-button>
|
|
|
- <el-button :loading="buttonLoading" type="primary" @click="handleBrightness">亮度调节</el-button>
|
|
|
+ <!-- <el-button :loading="buttonLoading" type="primary" @click="handleVoice">音量调节</el-button>
|
|
|
+ <el-button :loading="buttonLoading" type="primary" @click="handleBrightness">亮度调节</el-button>-->
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="报警信息" name="alarm">
|
|
|
<el-table v-loading="loading" :data="alarmList" row-key="id">
|
|
|
@@ -287,40 +318,40 @@
|
|
|
|
|
|
<script setup name="Device" lang="ts">
|
|
|
import {
|
|
|
- listDevice,
|
|
|
- getDevice,
|
|
|
- delDevice,
|
|
|
addDevice,
|
|
|
- updateDevice,
|
|
|
+ delDevice,
|
|
|
+ deviceStatistics,
|
|
|
+ getDevice,
|
|
|
+ getDeviceRunInfo,
|
|
|
+ getDeviceScreenshot,
|
|
|
+ listDevice,
|
|
|
reboot,
|
|
|
- start,
|
|
|
- standby,
|
|
|
shutdown,
|
|
|
+ standby,
|
|
|
+ start,
|
|
|
startStream,
|
|
|
- deviceStatistics,
|
|
|
- getDeviceRunInfo,
|
|
|
stopStream,
|
|
|
- getDeviceScreenshot
|
|
|
+ updateDevice
|
|
|
} from '@/api/smsb/device/device';
|
|
|
-import { DeviceVO, DeviceQuery, DeviceForm, DeviceStatisticsVo } from '@/api/smsb/device/device_type';
|
|
|
-import { ProductVO } from '@/api/smsb/device/product_types';
|
|
|
-import { listProduct } from '@/api/smsb/device/product';
|
|
|
-import { DeviceManufacturerVO } from '@/api/smsb/device/deviceManufacturer_type';
|
|
|
-import { listDeviceManufacturer } from '@/api/smsb/device/deviceManufacturer';
|
|
|
-import type { TabsPaneContext } from 'element-plus';
|
|
|
-import { ref, onBeforeUnmount } from 'vue';
|
|
|
+import {DeviceForm, DeviceQuery, DeviceStatisticsVo, DeviceVO} from '@/api/smsb/device/device_type';
|
|
|
+import {ProductVO} from '@/api/smsb/device/product_types';
|
|
|
+import {listProduct} from '@/api/smsb/device/product';
|
|
|
+import {DeviceManufacturerVO} from '@/api/smsb/device/deviceManufacturer_type';
|
|
|
+import {listDeviceManufacturer} from '@/api/smsb/device/deviceManufacturer';
|
|
|
+import type {TabsPaneContext} from 'element-plus';
|
|
|
+import {onBeforeUnmount, ref} from 'vue';
|
|
|
import flvjs from 'flv.js';
|
|
|
-import { DeviceRunInfoVO } from '@/api/smsb/device/device_run_type';
|
|
|
-import { DeviceErrorRecordQuery, DeviceErrorRecordVO } from '@/api/smsb/device/errorRecord_type';
|
|
|
-import { listDeviceErrorRecord } from '@/api/smsb/device/errorRecord';
|
|
|
-import { storeToRefs } from 'pinia';
|
|
|
+import {DeviceRunInfoVO} from '@/api/smsb/device/device_run_type';
|
|
|
+import {DeviceErrorRecordQuery, DeviceErrorRecordVO} from '@/api/smsb/device/errorRecord_type';
|
|
|
+import {listDeviceErrorRecord} from '@/api/smsb/device/errorRecord';
|
|
|
+import {storeToRefs} from 'pinia';
|
|
|
import useScreenshotStore from '@/store/modules/screenshot';
|
|
|
|
|
|
const screenshotStore = storeToRefs(useScreenshotStore());
|
|
|
const screenshotImageUrl = ref<string>();
|
|
|
const alarmList = ref<DeviceErrorRecordVO[]>([]);
|
|
|
-const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
-const { sys_device_online, smsb_yes_no, smsb_device_error_level, smsb_device_error_type } = toRefs<any>(
|
|
|
+const {proxy} = getCurrentInstance() as ComponentInternalInstance;
|
|
|
+const {sys_device_online, smsb_yes_no, smsb_device_error_level, smsb_device_error_type} = toRefs<any>(
|
|
|
proxy?.useDict('sys_device_online', 'smsb_yes_no', 'smsb_device_error_level', 'smsb_device_error_type')
|
|
|
);
|
|
|
const deviceList = ref<DeviceVO[]>([]);
|
|
|
@@ -348,14 +379,18 @@ const deviceRunInfo = reactive<DeviceRunInfoVO>({
|
|
|
deviceBase: undefined,
|
|
|
id: undefined,
|
|
|
deviceId: undefined,
|
|
|
- cpuInfo: undefined,
|
|
|
- memoryInfo: undefined,
|
|
|
- diskInfo: undefined,
|
|
|
- rom: undefined,
|
|
|
- osInfo: undefined,
|
|
|
- apkVersion: undefined,
|
|
|
- download: undefined,
|
|
|
- appList: undefined,
|
|
|
+ bright: undefined,
|
|
|
+ volume: undefined,
|
|
|
+ cpuUsage: undefined,
|
|
|
+ externalMemoryTotal: undefined,
|
|
|
+ externalMemoryUsage: undefined,
|
|
|
+ externalUsage: undefined,
|
|
|
+ ramTotalOfByte: undefined,
|
|
|
+ ramUsageOfByte: undefined,
|
|
|
+ systemBuildDate: undefined,
|
|
|
+ systemBuildVersion: undefined,
|
|
|
+ versionCode: undefined,
|
|
|
+ versionName: undefined,
|
|
|
createTime: undefined
|
|
|
});
|
|
|
const dialog = reactive<DialogOption>({
|