diff --git a/src/assets/iot/a12.png b/src/assets/iot/a12.png new file mode 100644 index 0000000..001070a Binary files /dev/null and b/src/assets/iot/a12.png differ diff --git a/src/assets/iot/a13.png b/src/assets/iot/a13.png new file mode 100644 index 0000000..501b4f1 Binary files /dev/null and b/src/assets/iot/a13.png differ diff --git a/src/assets/iot/a14.png b/src/assets/iot/a14.png new file mode 100644 index 0000000..5d6499c Binary files /dev/null and b/src/assets/iot/a14.png differ diff --git a/src/views/iot/tplink/camera/components/CameraInfoList.vue b/src/views/iot/tplink/camera/components/CameraInfoList.vue index 8fd9a65..b9ec729 100644 --- a/src/views/iot/tplink/camera/components/CameraInfoList.vue +++ b/src/views/iot/tplink/camera/components/CameraInfoList.vue @@ -1,19 +1,91 @@ @@ -29,6 +101,11 @@ import {ref, reactive, createVNode, h, onMounted, watch, unref} from 'vue'; import { useRouter } from 'vue-router'; import CameraPreviewModal from './CameraPreviewModal.vue' import CameraInfoDrawer from './CameraInfoDrawer.vue' + import { defHttp } from '/@/utils/http/axios'; +import { JInput } from '/@/components/Form'; + import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; + import CameraPictureConfigModal from '/@/views/iot/tplink/camera/components/CameraPictureConfigModal.vue'; + const props = defineProps({ data: { type: Object, default: () => ({}) }, @@ -41,28 +118,10 @@ import {ref, reactive, createVNode, h, onMounted, watch, unref} from 'vue'; const registerModal = ref(); const previewModal = ref(); const deviceModal = ref(); + const cameraPictureConfigModal = ref(); const userStore = useUserStore(); - //注册table数据 - const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ - tableProps: { - title: '护理单元-物联管理-摄像头信息', - api: list, - columns, - canResize: false, - formConfig: { - // labelWidth: 200, - schemas: searchFormSchema, - }, - actionColumn: { - width: 180, - fixed: 'right', - }, - beforeFetch: async (params) => { - return Object.assign(params, queryParam); - }, - }, - }); - const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext; + const tableData = ref([]); +const pageParams = ref({ pageNo: 1, pageSize: 8 }) const labelCol = reactive({ xs:24, sm:4, @@ -74,22 +133,6 @@ import {ref, reactive, createVNode, h, onMounted, watch, unref} from 'vue'; sm: 20, }); - onMounted(() => { - watch( - () => props.data, - async () => { - queryParam.projectId = props.data.projectId; - queryParam.regionId = props.data.regionId; - let record = unref(props.data); - if (typeof record !== 'object') { - record = {}; - } - reload(); - }, - { deep: true, immediate: true } - ); - }); - /** * 编辑 */ @@ -121,9 +164,7 @@ import {ref, reactive, createVNode, h, onMounted, watch, unref} from 'vue'; * 画面配置 */ function handlePicConfig(record) { - router.push({ - path:'/tplink/cameraConfig', - query: { + var params = { deviceIndex: record.deviceIndex, parentId: record.parentId, multitrans: record.multitrans, @@ -131,28 +172,11 @@ import {ref, reactive, createVNode, h, onMounted, watch, unref} from 'vue'; regionId: record.regionId, ip: record.ip } - }) - } + cameraPictureConfigModal.value.disableSubmit = true; + cameraPictureConfigModal.value.edit(params); - /** - * 操作栏 - */ - function getTableAction(record) { - return [ - { - label: '画面配置', - onClick: handlePicConfig.bind(null, record), - }, - { - label: '编辑', - onClick: handleEdit.bind(null, record), - }, - { - label: '预览', - onClick: handlePreview.bind(null, record), - }, - ]; } + /** * 左侧树选择后触发 @@ -168,36 +192,71 @@ import {ref, reactive, createVNode, h, onMounted, watch, unref} from 'vue'; // rootTreeData.value = data; } + function reload(){ + queryParam.pageSize = pageParams.value.pageSize; + queryParam.pageNo = pageParams.value.pageNo; + defHttp.get({url: '/iot/tplink/cameraInfo/list',params:queryParam}).then(res => { + console.log("🚀 ~ defHttp.get ~ res:", res) + tableData.value = res; + }); + } + + /** + * 重置 + */ + function searchReset() { + formRef.value.resetFields(); + //刷新数据 + reload(); + } + + + onMounted(() => { + watch( + () => props.data, + async () => { + queryParam.projectId = props.data.projectId; + queryParam.regionId = props.data.regionId; + let record = unref(props.data); + if (typeof record !== 'object') { + record = {}; + } + reload(); + }, + { deep: true, immediate: true } + ); + }); diff --git a/src/views/iot/tplink/camera/components/CameraPictureConfig.vue b/src/views/iot/tplink/camera/components/CameraPictureConfig.vue index 55ae8bc..28cf763 100644 --- a/src/views/iot/tplink/camera/components/CameraPictureConfig.vue +++ b/src/views/iot/tplink/camera/components/CameraPictureConfig.vue @@ -190,13 +190,29 @@ // getBatchProgress({}).then(res=>{}); // } - onMounted(()=>{ - formData.deviceIndex = router.currentRoute.value.query.deviceIndex; - formData.parentId = router.currentRoute.value.query.parentId; - formData.multitrans = router.currentRoute.value.query.multitrans; - formData.projectId = router.currentRoute.value.query.projectId; - formData.regionId = router.currentRoute.value.query.regionId; - formData.ip = router.currentRoute.value.query.ip; + // onMounted(()=>{ + // formData.deviceIndex = router.currentRoute.value.query.deviceIndex; + // formData.parentId = router.currentRoute.value.query.parentId; + // formData.multitrans = router.currentRoute.value.query.multitrans; + // formData.projectId = router.currentRoute.value.query.projectId; + // formData.regionId = router.currentRoute.value.query.regionId; + // formData.ip = router.currentRoute.value.query.ip; + + // cameraData.value.deviceIndex = formData.deviceIndex; + // cameraData.value.projectId = formData.projectId; + // cameraData.value.regionId = formData.regionId; + // cameraData.value.multitrans = formData.multitrans; + // cameraData.value.scale = formData.scale; + // cameraData.value.parentId = formData.parentId; + // }) + + function edit(record) { + formData.deviceIndex = record.deviceIndex; + formData.parentId = record.parentId; + formData.multitrans = record.multitrans; + formData.projectId = record.projectId; + formData.regionId = record.regionId; + formData.ip = record.ip; cameraData.value.deviceIndex = formData.deviceIndex; cameraData.value.projectId = formData.projectId; @@ -204,7 +220,13 @@ cameraData.value.multitrans = formData.multitrans; cameraData.value.scale = formData.scale; cameraData.value.parentId = formData.parentId; - }) + } + + + + defineExpose({ + edit, + }); diff --git a/src/views/iot/tplink/camera/components/CameraPictureConfigModal.vue b/src/views/iot/tplink/camera/components/CameraPictureConfigModal.vue new file mode 100644 index 0000000..4a50c0b --- /dev/null +++ b/src/views/iot/tplink/camera/components/CameraPictureConfigModal.vue @@ -0,0 +1,66 @@ + + + + + +