摄像头预览之前先判断是否在线
This commit is contained in:
parent
2a185ec6c4
commit
474773c966
|
|
@ -102,7 +102,7 @@ import {ref, reactive, createVNode, h, onMounted, watch, unref} from 'vue';
|
|||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, searchFormSchema } from '../camera.data';
|
||||
import { list } from '../camera.api';
|
||||
import {getImageCommon, list} from '../camera.api';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { useDrawer } from "@/components/Drawer";
|
||||
import { useRouter } from 'vue-router';
|
||||
|
|
@ -156,8 +156,19 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
|
|||
* 预览
|
||||
*/
|
||||
function handlePreview(record: Recordable) {
|
||||
previewModal.value.disableSubmit = true;
|
||||
previewModal.value.edit(record);
|
||||
if (record.deviceIndex == null) {
|
||||
return
|
||||
}
|
||||
getImageCommon({
|
||||
"deviceIndex": record.deviceIndex,
|
||||
"type": "switch"
|
||||
}).then(res => {
|
||||
previewModal.value.disableSubmit = true;
|
||||
previewModal.value.edit(record);
|
||||
}).catch(res=>{
|
||||
reload();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue