From 23beab5084d97f25fb40ee57055436a1c84757f1 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期一, 04 十一月 2024 08:28:17 +0800
Subject: [PATCH] 计划数据

---
 src/views/data/dev/camera/CameraForm.vue |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/src/views/data/dev/camera/CameraForm.vue b/src/views/data/dev/camera/CameraForm.vue
index d41a825..8794006 100644
--- a/src/views/data/dev/camera/CameraForm.vue
+++ b/src/views/data/dev/camera/CameraForm.vue
@@ -13,6 +13,18 @@
             <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">
@@ -43,6 +55,7 @@
 </template>
 <script lang="ts" setup>
 import * as CameraApi from '@/api/data/dev/camera'
+import {DICT_TYPE, getIntDictOptions, getStrDictOptions} from "@/utils/dict";
 
 defineOptions({ name: 'CameraForm' })
 
@@ -57,12 +70,14 @@
   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' }]
 })
@@ -120,13 +135,11 @@
 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()

--
Gitblit v1.9.3