|
|
@@ -40,24 +40,24 @@
|
|
|
</el-row>
|
|
|
</el-card>
|
|
|
<el-card shadow="hover" :style="{ marginTop: '10px', height: '60px' }">
|
|
|
- <el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="40px">
|
|
|
- <el-form-item label="名称" prop="name">
|
|
|
- <el-input v-model="queryParams.name" style="width: 150px" placeholder="请输入设备名称" clearable
|
|
|
- @keyup.enter="handleQuery" />
|
|
|
+ <el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="0px">
|
|
|
+ <el-form-item label="" prop="name">
|
|
|
+ <el-input v-model="queryParams.name" style="width: 120px" placeholder="请输入设备名称" clearable
|
|
|
+ @keyup.enter="handleQuery"/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="SN" prop="serialNumber">
|
|
|
- <el-input v-model="queryParams.serialNumber" style="width: 150px" placeholder="请输入设备SN" clearable
|
|
|
- @keyup.enter="handleQuery" />
|
|
|
+ <el-form-item label="" prop="serialNumber">
|
|
|
+ <el-input v-model="queryParams.serialNumber" style="width: 120px" placeholder="请输入设备SN" clearable
|
|
|
+ @keyup.enter="handleQuery"/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="MAC" prop="mac">
|
|
|
- <el-input v-model="queryParams.mac" style="width: 150px" placeholder="请输入设备MAC" clearable
|
|
|
- @keyup.enter="handleQuery" />
|
|
|
+ <el-form-item label="" prop="mac">
|
|
|
+ <el-input v-model="queryParams.mac" style="width: 125px" placeholder="请输入设备MAC" clearable
|
|
|
+ @keyup.enter="handleQuery"/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="状态" prop="onlineStatus">
|
|
|
+ <el-form-item label="" prop="onlineStatus">
|
|
|
<el-select v-model="queryParams.onlineStatus" placeholder="请选择设备状态" clearable @change="handleQuery"
|
|
|
- style="width: 150px">
|
|
|
+ style="width: 150px">
|
|
|
<el-option v-for="item in sys_device_online" :key="item.label" :value="item.value"
|
|
|
- :label="item.label"></el-option>
|
|
|
+ :label="item.label"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
@@ -275,13 +275,30 @@
|
|
|
</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('restartApp')">应用重启</el-button>
|
|
|
-<!-- <el-button :loading="buttonLoading" type="primary" @click="handleControl('shutdown')">远程关机</el-button>-->
|
|
|
- <el-button :loading="buttonLoading" type="primary" @click="handleControl('standby/true')">设备亮屏</el-button>
|
|
|
- <el-button :loading="buttonLoading" type="primary" @click="handleControl('standby/false')">设备息屏</el-button>
|
|
|
- <el-button :loading="buttonLoading" type="primary" @click="handleVoice">音量调节</el-button>
|
|
|
- <el-button :loading="buttonLoading" type="primary" @click="handleBrightness">亮度调节</el-button>
|
|
|
+ <div style="margin-top: 10px">
|
|
|
+ <el-button :loading="buttonLoading" type="primary" @click="handleControl('reboot')">设备重启</el-button>
|
|
|
+ <el-button :loading="buttonLoading" type="primary" @click="handleControl('restartApp')">应用重启</el-button>
|
|
|
+ <!-- <el-button :loading="buttonLoading" type="primary" @click="handleControl('shutdown')">远程关机</el-button>-->
|
|
|
+ <el-button :loading="buttonLoading" type="primary" @click="handleControl('standby/true')">设备亮屏</el-button>
|
|
|
+ <el-button :loading="buttonLoading" type="primary" @click="handleControl('standby/false')">设备息屏</el-button>
|
|
|
+ <el-button :loading="buttonLoading" type="primary" @click="handleVoice">音量调节</el-button>
|
|
|
+ <el-button :loading="buttonLoading" type="primary" @click="handleBrightness">亮度调节</el-button>
|
|
|
+ </div>
|
|
|
+ <el-divider border-style="double"/>
|
|
|
+ <el-table :data="deviceMultiCardList">
|
|
|
+ <el-table-column label="电源端口" align="center" prop="indexNum"/>
|
|
|
+ <el-table-column label="电源类型" align="center" prop="powerType">
|
|
|
+ <template #default="scope">
|
|
|
+ <dict-tag :options="smsb_multi_card_type" :value="scope.row.powerType"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="同步时间" align="center" prop="syncTime"/>
|
|
|
+ <el-table-column label="状态" align="center" prop="powerStatus">
|
|
|
+ <template #default="scope">
|
|
|
+ <dict-tag :options="smsb_multi_card_status" :value="scope.row.powerStatus"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="报警信息" name="alarm">
|
|
|
<div class="table-content">
|
|
|
@@ -311,6 +328,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <!--推流弹窗-->
|
|
|
<el-dialog v-model="watchDialog.visible" :title="watchDialog.title" width="900px" append-to-body
|
|
|
@closed="onDialogClosed">
|
|
|
<div v-if="watchDialog.visible" style="width: 100%; height: 500px">
|
|
|
@@ -322,6 +340,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <!--截图弹窗-->
|
|
|
<el-dialog v-model="shotDialog.visible" :title="shotDialog.title" width="900px" append-to-body
|
|
|
@closed="onDialogClosed">
|
|
|
<div style="text-align: center">
|
|
|
@@ -355,40 +374,51 @@
|
|
|
<script setup name="Device" lang="ts">
|
|
|
import {
|
|
|
addDevice,
|
|
|
+ brightSet,
|
|
|
delDevice,
|
|
|
deviceStatistics,
|
|
|
getDevice,
|
|
|
+ getDeviceMultiCardList,
|
|
|
getDeviceRunInfo,
|
|
|
getDeviceScreenshot,
|
|
|
listDevice,
|
|
|
- reboot, restartApp,
|
|
|
+ reboot,
|
|
|
+ restartApp,
|
|
|
shutdown,
|
|
|
standby,
|
|
|
startStream,
|
|
|
stopStream,
|
|
|
- updateDevice, volumeSet,brightSet
|
|
|
+ updateDevice,
|
|
|
+ volumeSet
|
|
|
} from '@/api/smsb/device/device';
|
|
|
-import { DeviceForm, DeviceQuery, DeviceStatisticsVo, DeviceVO } from '@/api/smsb/device/device_type';
|
|
|
-import { ProductVO } from '@/api/smsb/device/product_types';
|
|
|
-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 {DeviceForm, DeviceMultiCardVo, DeviceQuery, DeviceStatisticsVo, DeviceVO} from '@/api/smsb/device/device_type';
|
|
|
+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>(
|
|
|
- proxy?.useDict('sys_device_online', 'smsb_yes_no', 'smsb_device_error_level', 'smsb_device_error_type')
|
|
|
+const {proxy} = getCurrentInstance() as ComponentInternalInstance;
|
|
|
+const {
|
|
|
+ sys_device_online,
|
|
|
+ smsb_yes_no,
|
|
|
+ smsb_device_error_level,
|
|
|
+ smsb_device_error_type,
|
|
|
+ smsb_multi_card_type,
|
|
|
+ smsb_multi_card_status
|
|
|
+} = toRefs<any>(
|
|
|
+ proxy?.useDict('sys_device_online', 'smsb_yes_no', 'smsb_device_error_level', 'smsb_device_error_type', 'smsb_multi_card_type', 'smsb_multi_card_status')
|
|
|
);
|
|
|
const deviceList = ref<DeviceVO[]>([]);
|
|
|
+const deviceMultiCardList = ref<DeviceMultiCardVo[]>([]);
|
|
|
const deviceStatisticsVo = ref<DeviceStatisticsVo>();
|
|
|
const manufacturerList = ref<DeviceManufacturerVO[]>([]);
|
|
|
const buttonLoading = ref(false);
|
|
|
@@ -699,7 +729,8 @@ const handleInfo = async (row?: DeviceVO) => {
|
|
|
deviceRunInfo.ramUsage = (parseFloat(deviceRunInfo.ramUsageOfByte) * 100 / parseFloat(deviceRunInfo.ramTotalOfByte)).toFixed(1)
|
|
|
viewDialog.title = '设备详情';
|
|
|
viewDialog.visible = true;
|
|
|
- console.log(deviceRunInfo);
|
|
|
+ const multiCardRsp = await getDeviceMultiCardList(deviceId.value);
|
|
|
+ deviceMultiCardList.value = multiCardRsp.data;
|
|
|
};
|
|
|
|
|
|
const handleControl = async (type: string) => {
|
|
|
@@ -774,7 +805,7 @@ const startMonitor = async (row?: DeviceVO) => {
|
|
|
flvPlayer.value.load();
|
|
|
// 处理浏览器自动播放策略
|
|
|
flvPlayer.value.play().catch(() => {
|
|
|
- proxy?.$modal.msgWarning('请点击视频播放按钮以开始播放');
|
|
|
+ // proxy?.$modal.msgWarning('请点击视频播放按钮以开始播放');
|
|
|
});
|
|
|
}
|
|
|
} else {
|