摄像头预览之前先判断是否在线
This commit is contained in:
parent
2a185ec6c4
commit
474773c966
|
|
@ -65,7 +65,7 @@
|
||||||
<span class="antTitle">画面配置</span>
|
<span class="antTitle">画面配置</span>
|
||||||
</span> -->
|
</span> -->
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col v-if="tableData.total==0" >
|
<a-col v-if="tableData.total==0" >
|
||||||
|
|
@ -102,7 +102,7 @@ import {ref, reactive, createVNode, h, onMounted, watch, unref} 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 { columns, searchFormSchema } from '../camera.data';
|
import { columns, searchFormSchema } from '../camera.data';
|
||||||
import { list } from '../camera.api';
|
import {getImageCommon, list} from '../camera.api';
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
import { useDrawer } from "@/components/Drawer";
|
import { useDrawer } from "@/components/Drawer";
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
|
@ -112,7 +112,7 @@ import {ref, reactive, createVNode, h, onMounted, watch, unref} from 'vue';
|
||||||
import { JInput } from '/@/components/Form';
|
import { JInput } from '/@/components/Form';
|
||||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||||
import CameraPictureConfigModal from '/@/views/iot/tplink/camera/components/CameraPictureConfigModal.vue';
|
import CameraPictureConfigModal from '/@/views/iot/tplink/camera/components/CameraPictureConfigModal.vue';
|
||||||
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: { type: Object, default: () => ({}) },
|
data: { type: Object, default: () => ({}) },
|
||||||
|
|
@ -156,8 +156,19 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
|
||||||
* 预览
|
* 预览
|
||||||
*/
|
*/
|
||||||
function handlePreview(record: Recordable) {
|
function handlePreview(record: Recordable) {
|
||||||
previewModal.value.disableSubmit = true;
|
if (record.deviceIndex == null) {
|
||||||
previewModal.value.edit(record);
|
return
|
||||||
|
}
|
||||||
|
getImageCommon({
|
||||||
|
"deviceIndex": record.deviceIndex,
|
||||||
|
"type": "switch"
|
||||||
|
}).then(res => {
|
||||||
|
previewModal.value.disableSubmit = true;
|
||||||
|
previewModal.value.edit(record);
|
||||||
|
}).catch(res=>{
|
||||||
|
reload();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -183,7 +194,7 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
|
||||||
cameraPictureConfigModal.value.edit(params);
|
cameraPictureConfigModal.value.edit(params);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 左侧树选择后触发
|
* 左侧树选择后触发
|
||||||
|
|
@ -207,7 +218,7 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
|
||||||
tableData.value = res;
|
tableData.value = res;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置
|
* 重置
|
||||||
*/
|
*/
|
||||||
|
|
@ -216,7 +227,7 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
|
||||||
//刷新数据
|
//刷新数据
|
||||||
reload();
|
reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
watch(
|
watch(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue