物联设备拉取录像机同时拉取摄像头
This commit is contained in:
parent
de0d6379d3
commit
2400c2a27c
|
|
@ -33,7 +33,7 @@ import { ref, reactive} from 'vue';
|
||||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||||
import { useListPage } from '/@/hooks/system/useListPage';
|
import { useListPage } from '/@/hooks/system/useListPage';
|
||||||
import { deviceColumns } from './integration.data';
|
import { deviceColumns } from './integration.data';
|
||||||
import {cameraList, pullCamera} from './integration.api';
|
import {cameraList, pullRecorder,pullCamera} from './integration.api';
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
import CameraPreviewModal from '/@/views/iot/tplink/camera/components/CameraPreviewModal.vue'
|
import CameraPreviewModal from '/@/views/iot/tplink/camera/components/CameraPreviewModal.vue'
|
||||||
const previewModal = ref();
|
const previewModal = ref();
|
||||||
|
|
@ -119,11 +119,19 @@ function handlePreview(record: Recordable) {
|
||||||
* 拉取设备
|
* 拉取设备
|
||||||
*/
|
*/
|
||||||
async function handlePull(record: Recordable) {
|
async function handlePull(record: Recordable) {
|
||||||
await pullCamera(record).then((res) => {
|
if(record.deviceType == 'NETWORKVIDEORECORDER'){
|
||||||
setTimeout(() => {
|
await pullRecorder(record).then((res) => {
|
||||||
reload();
|
setTimeout(() => {
|
||||||
}, 4000);
|
reload();
|
||||||
})
|
}, 8000);
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
await pullCamera(record).then((res) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
reload();
|
||||||
|
}, 4000);
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ enum Api {
|
||||||
waterList = '/iot/device/manager/waterList',
|
waterList = '/iot/device/manager/waterList',
|
||||||
humidList = '/iot/device/manager/humidList',
|
humidList = '/iot/device/manager/humidList',
|
||||||
|
|
||||||
|
pullRecorder = '/iot/device/manager/pullRecorder',
|
||||||
pullCamera = '/iot/device/manager/pullCamera',
|
pullCamera = '/iot/device/manager/pullCamera',
|
||||||
pullNetwork = '/iot/device/manager/pullNetwork',
|
pullNetwork = '/iot/device/manager/pullNetwork',
|
||||||
pullElectricity = '/iot/device/manager/pullElectricity',
|
pullElectricity = '/iot/device/manager/pullElectricity',
|
||||||
|
|
@ -25,6 +26,7 @@ export const electricityList = (params) => defHttp.get({ url: Api.electricityLis
|
||||||
export const waterList = (params) => defHttp.get({ url: Api.waterList, params });
|
export const waterList = (params) => defHttp.get({ url: Api.waterList, params });
|
||||||
export const humidList = (params) => defHttp.get({ url: Api.humidList, params });
|
export const humidList = (params) => defHttp.get({ url: Api.humidList, params });
|
||||||
|
|
||||||
|
export const pullRecorder = (params) => defHttp.post({ url: Api.pullRecorder, params });
|
||||||
export const pullCamera = (params) => defHttp.post({ url: Api.pullCamera, params });
|
export const pullCamera = (params) => defHttp.post({ url: Api.pullCamera, params });
|
||||||
export const pullNetwork = (params) => defHttp.post({ url: Api.pullNetwork, params });
|
export const pullNetwork = (params) => defHttp.post({ url: Api.pullNetwork, params });
|
||||||
export const pullElectricity = (params) => defHttp.post({ url: Api.pullElectricity, params });
|
export const pullElectricity = (params) => defHttp.post({ url: Api.pullElectricity, params });
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue