| | |
| | | const meta = v.meta ?? {} |
| | | const { oneShowingChild, onlyOneChild } = hasOneShowingChild(v.children, v) |
| | | const fullPath = isUrl(v.path) ? v.path : pathResolve(parentPath, v.path) // getAllParentPath<AppRouteRecordRaw>(allRouters, v.path).join('/') |
| | | |
| | | if ( |
| | | oneShowingChild && |
| | | (!onlyOneChild?.children || onlyOneChild?.noShowingChildren) && |
| | |
| | | VALUETYPE = 'value_type', |
| | | NVR_ONLINE_STATUS = 'nvr_online_status', |
| | | CAMERA_BRAND = 'camera_brand', |
| | | CAPTURE_TYPE = 'capture_type', |
| | | } |
| | |
| | | <el-input v-model="formData.code" placeholder="请输入编码" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="抓图方式"> |
| | | <el-select v-model="formData.captureType" placeholder="请选择"> |
| | | <el-option |
| | | v-for="dict in getStrDictOptions(DICT_TYPE.CAPTURE_TYPE)" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import * as CameraApi from '@/api/data/dev/camera' |
| | | import {DICT_TYPE, getIntDictOptions, getStrDictOptions} from "@/utils/dict"; |
| | | |
| | | defineOptions({ name: 'CameraForm' }) |
| | | |
| | |
| | | id: undefined, |
| | | nvrId: '', |
| | | code: undefined, |
| | | captureType: '', |
| | | channel: undefined, |
| | | location: undefined, |
| | | remark: undefined |
| | | }) |
| | | const formRules = reactive({ |
| | | code: [{ required: true, message: '编码不能为空', trigger: 'blur' }], |
| | | captureType: [{ required: true, message: '抓图方式不能为空', trigger: 'blur' }], |
| | | channel: [{ required: true, message: '通道不能为空', trigger: 'blur' }], |
| | | location: [{ required: true, message: '监控区域不能为空', trigger: 'blur' }] |
| | | }) |
| | |
| | | const resetForm = () => { |
| | | formData.value = { |
| | | id: undefined, |
| | | brand: undefined, |
| | | nvrId: '', |
| | | code: undefined, |
| | | name: undefined, |
| | | ip: undefined, |
| | | port: undefined, |
| | | username: undefined, |
| | | password: undefined, |
| | | captureType: '', |
| | | channel: undefined, |
| | | location: undefined, |
| | | remark: undefined |
| | | } |
| | | formRef.value?.resetFields() |
| | |
| | | |
| | | <!-- 列表 --> |
| | | <el-table v-loading="loading" :data="list"> |
| | | <el-table-column label="编码" align="center" prop="code" /> |
| | | <el-table-column label="通道" align="center" prop="channel" /> |
| | | <el-table-column label="编码" align="center" prop="code" width="80" /> |
| | | <el-table-column label="抓图方式" align="center" prop="captureType" width="80"> |
| | | <template #default="scope"> |
| | | <dict-tag :type="DICT_TYPE.CAPTURE_TYPE" :value="scope.row.captureType" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="通道" align="center" prop="channel" width="80" /> |
| | | <el-table-column label="监控区域" align="center" prop="location" /> |
| | | <el-table-column label="备注" align="center" prop="remark" width="200" /> |
| | | <el-table-column label="操作" align="center" min-width="110" fixed="right"> |
| | |
| | | import download from '@/utils/download' |
| | | import * as CameraApi from '@/api/data/dev/camera' |
| | | import CameraForm from './CameraForm.vue' |
| | | import {DICT_TYPE} from "@/utils/dict"; |
| | | |
| | | defineOptions({name: 'Camera'}) |
| | | |