|
|
@@ -85,7 +85,14 @@
|
|
|
<div class="table-content">
|
|
|
<el-table v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
+ <el-table-column label="设备名称" align="left" prop="name" width="300" :show-overflow-tooltip="true" >
|
|
|
+ <template #default="scope">
|
|
|
+ <div @click="handleInfo(scope.row)" class="two-line" style="text-decoration: underline;color: #1890FF;">{{ scope.row.name }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+<!--
|
|
|
<el-table-column label="设备名称" align="left" prop="name" width="300" :show-overflow-tooltip="true" />
|
|
|
+-->
|
|
|
<el-table-column label="设备型号" align="left" prop="deviceModel" width="120" :show-overflow-tooltip="true" />
|
|
|
<el-table-column label="设备SN" align="left" prop="serialNumber" width="150" :show-overflow-tooltip="true" />
|
|
|
<el-table-column label="设备MAC" align="left" prop="mac" width="150" />
|
|
|
@@ -349,6 +356,9 @@
|
|
|
<el-tooltip content="修改" placement="top">
|
|
|
<el-button link type="primary" icon="Edit" @click="handleUpdateSchedule(scope.row)"></el-button>
|
|
|
</el-tooltip>
|
|
|
+ <el-tooltip content="禁用" placement="top">
|
|
|
+ <el-button link type="primary" icon="CircleClose" @click="handleStopSchedule(scope.row)"></el-button>
|
|
|
+ </el-tooltip>
|
|
|
<el-tooltip content="删除" placement="top">
|
|
|
<el-button link type="primary" icon="Delete" @click="handleDeleteSchedule(scope.row)"></el-button>
|
|
|
</el-tooltip>
|
|
|
@@ -455,13 +465,13 @@ import {
|
|
|
powerSet,
|
|
|
reboot,
|
|
|
restartApp,
|
|
|
+ scheduleSet,
|
|
|
shutdown,
|
|
|
standby,
|
|
|
startStream,
|
|
|
stopStream,
|
|
|
updateDevice,
|
|
|
- volumeSet,
|
|
|
- scheduleSet
|
|
|
+ volumeSet
|
|
|
} from '@/api/smsb/device/device';
|
|
|
import {DeviceForm, DeviceMultiCardVo, DeviceQuery, DeviceStatisticsVo, DeviceVO} from '@/api/smsb/device/device_type';
|
|
|
import {DeviceManufacturerVO} from '@/api/smsb/device/deviceManufacturer_type';
|
|
|
@@ -476,9 +486,12 @@ import {storeToRefs} from 'pinia';
|
|
|
import useScreenshotStore from '@/store/modules/screenshot';
|
|
|
import {DevicePowerScheduleForm, DevicePowerScheduleVO} from "@/api/smsb/device/device_power_schedule_type";
|
|
|
import {
|
|
|
- addDevicePowerSchedule, delDevicePowerSchedule,
|
|
|
+ addDevicePowerSchedule,
|
|
|
+ delDevicePowerSchedule,
|
|
|
getDevicePowerSchedule,
|
|
|
- listPowerScheduleByDevice, updateDevicePowerSchedule
|
|
|
+ listPowerScheduleByDevice,
|
|
|
+ stopDevicePowerSchedule,
|
|
|
+ updateDevicePowerSchedule
|
|
|
} from "@/api/smsb/device/device_power_schedule";
|
|
|
|
|
|
const screenshotStore = storeToRefs(useScreenshotStore());
|
|
|
@@ -725,6 +738,13 @@ const handleUpdateSchedule = async (row?: DevicePowerScheduleVO) => {
|
|
|
powerDialog.visible = true;
|
|
|
powerDialog.title = "定时设置";
|
|
|
}
|
|
|
+const handleStopSchedule = async (row?: DevicePowerScheduleVO) => {
|
|
|
+ const id = row?.id
|
|
|
+ await proxy?.$modal.confirm('是否确认禁用当前定时配置?').finally(() => loading.value = false);
|
|
|
+ await stopDevicePowerSchedule(id);
|
|
|
+ proxy?.$modal.msgSuccess("删除成功");
|
|
|
+ await getPowerScheduleList();
|
|
|
+}
|
|
|
const handleDeleteSchedule = async (row?: DevicePowerScheduleVO) => {
|
|
|
const _ids = row?.id
|
|
|
await proxy?.$modal.confirm('是否确认删除定时配置ID为"' + _ids + '"的数据项?').finally(() => loading.value = false);
|
|
|
@@ -983,13 +1003,17 @@ const getAlarmList = async () => {
|
|
|
alarmTotal.value = res.total;
|
|
|
};
|
|
|
|
|
|
-const handleClickTab = (tab: TabsPaneContext, event: Event) => {
|
|
|
+const handleClickTab = async (tab: TabsPaneContext, event: Event) => {
|
|
|
console.log(tab, event);
|
|
|
if (tab.props.name === 'alarm') {
|
|
|
- getAlarmList();
|
|
|
+ await getAlarmList();
|
|
|
}
|
|
|
if (tab.props.name === 'power') {
|
|
|
- getPowerScheduleList();
|
|
|
+ await getPowerScheduleList();
|
|
|
+ }
|
|
|
+ if (tab.props.name === 'control') {
|
|
|
+ const multiCardRsp = await getDeviceMultiCardList(deviceId.value);
|
|
|
+ deviceMultiCardList.value = multiCardRsp.data;
|
|
|
}
|
|
|
};
|
|
|
|