From df90c0c5cfa4de114798015b92120ad8ba8b4826 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期五, 22 十一月 2024 10:45:40 +0800
Subject: [PATCH] MEASURE_VALUE_TYPE

---
 src/views/data/video/nvr/index.vue |  187 +++++++++++++++++++++++-----------------------
 1 files changed, 94 insertions(+), 93 deletions(-)

diff --git a/src/views/data/video/nvr/index.vue b/src/views/data/video/nvr/index.vue
index 61d0163..b780a0e 100644
--- a/src/views/data/video/nvr/index.vue
+++ b/src/views/data/video/nvr/index.vue
@@ -52,11 +52,11 @@
       </el-form-item>
       <el-form-item>
         <el-button @click="handleQuery">
-          <Icon icon="ep:search" class="mr-5px" />
+          <Icon icon="ep:search" class="mr-5px"/>
           搜索
         </el-button>
         <el-button @click="resetQuery">
-          <Icon icon="ep:refresh" class="mr-5px" />
+          <Icon icon="ep:refresh" class="mr-5px"/>
           重置
         </el-button>
         <el-button
@@ -65,7 +65,7 @@
           @click="openForm('create')"
           v-hasPermi="['video:nvr:save']"
         >
-          <Icon icon="ep:plus" class="mr-5px" />
+          <Icon icon="ep:plus" class="mr-5px"/>
           新增
         </el-button>
         <el-button
@@ -75,7 +75,7 @@
           :loading="exportLoading"
           v-hasPermi="['video:nvr:export']"
         >
-          <Icon icon="ep:download" class="mr-5px" />
+          <Icon icon="ep:download" class="mr-5px"/>
           导出
         </el-button>
       </el-form-item>
@@ -87,20 +87,19 @@
     <el-table v-loading="loading" :data="list">
       <el-table-column label="品牌" align="center" prop="brand" width="80">
         <template #default="scope">
-          <dict-tag :type="DICT_TYPE.CAMERA_BRAND" :value="scope.row.brand" />
+          <dict-tag :type="DICT_TYPE.CAMERA_BRAND" :value="scope.row.brand"/>
         </template>
       </el-table-column>
       <el-table-column label="编码" align="center" prop="code" width="100"/>
       <el-table-column label="名称" align="center" prop="name"/>
-      <el-table-column label="IP" align="center" prop="ip" />
+      <el-table-column label="IP" align="center" prop="ip"/>
       <el-table-column label="端口" align="center" prop="port" width="100"/>
       <el-table-column label="用户名" align="center" prop="username" width="100"/>
       <el-table-column label="状态" prop="status" width="80">
         <template #default="scope">
-          <dict-tag :type="DICT_TYPE.NVR_ONLINE_STATUS" :value="scope.row.status" />
+          <dict-tag :type="DICT_TYPE.NVR_ONLINE_STATUS" :value="scope.row.status"/>
         </template>
       </el-table-column>
-      <el-table-column label="位置" align="center" prop="position" />
       <el-table-column label="备注" align="center" prop="remark" width="150"/>
       <el-table-column label="操作" align="center" min-width="110" fixed="right">
         <template #default="scope">
@@ -120,7 +119,8 @@
           >
             删除
           </el-button>
-          <el-button link type="success" size="small" @click="cameraHandle(scope.row.id)">摄像头</el-button>
+          <el-button link type="success" size="small" @click="cameraHandle(scope.row.id)">摄像头
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -134,7 +134,7 @@
   </ContentWrap>
 
   <!-- 表单弹窗:添加/修改 -->
-  <NvrForm ref="formRef" @success="getList" />
+  <NvrForm ref="formRef" @success="getList"/>
 
   <!-- 弹窗, 摄像头 -->
   <NvrCamera ref="videoCameraRef"/>
@@ -142,99 +142,100 @@
 </template>
 <script lang="ts" setup>
 import {DICT_TYPE, getIntDictOptions} from '@/utils/dict'
-  import download from '@/utils/download'
-  import * as NvrApi from '@/api/data/video/nvr'
-  import NvrForm from './NvrForm.vue'
-  import NvrCamera from './NvrCamera.vue'
+import download from '@/utils/download'
+import * as NvrApi from '@/api/data/video/nvr'
+import NvrForm from './NvrForm.vue'
+import NvrCamera from './NvrCamera.vue'
 
-  defineOptions({name: 'Nvr'})
+defineOptions({name: 'Nvr'})
 
-  const message = useMessage() // 消息弹窗
-  const {t} = useI18n() // 国际化
+const message = useMessage() // 消息弹窗
+const {t} = useI18n() // 国际化
 
-  const loading = ref(true) // 列表的加载中
-  const total = ref(0) // 列表的总页数
-  const list = ref([]) // 列表的数据
-  const queryParams = reactive({
-    pageNo: 1,
-    pageSize: 10,
-    brand: undefined,
-    ip: undefined,
-    code: undefined,
-    name: undefined,
-    status: undefined
-  })
-  const queryFormRef = ref() // 搜索的表单
-  const exportLoading = ref(false) // 导出的加载中
+const loading = ref(true) // 列表的加载中
+const total = ref(0) // 列表的总页数
+const list = ref([]) // 列表的数据
+const queryParams = reactive({
+  pageNo: 1,
+  pageSize: 10,
+  brand: undefined,
+  ip: undefined,
+  code: undefined,
+  name: undefined,
+  status: undefined
+})
+const queryFormRef = ref() // 搜索的表单
+const exportLoading = ref(false) // 导出的加载中
 
-  const videoCameraRef = ref()
+const videoCameraRef = ref()
 
-  /** 查询列表 */
-  const getList = async () => {
-    loading.value = true
-    try {
-      const data = await NvrApi.getNvrPage(queryParams)
-      list.value = data.list
-      total.value = data.total
-    } finally {
-      loading.value = false
-    }
+/** 查询列表 */
+const getList = async () => {
+  loading.value = true
+  try {
+    const data = await NvrApi.getNvrPage(queryParams)
+    list.value = data.list
+    total.value = data.total
+  } finally {
+    loading.value = false
   }
+}
 
-  const cameraHandle = (id: string) => {
-    // devCameraVisible.value = true
-    videoCameraRef.value.open(id)
-  }
+const cameraHandle = (id: string) => {
+  // devCameraVisible.value = true
+  videoCameraRef.value.open(id)
+}
 
-  /** 搜索按钮操作 */
-  const handleQuery = () => {
-    queryParams.pageNo = 1
-    getList()
-  }
+/** 搜索按钮操作 */
+const handleQuery = () => {
+  queryParams.pageNo = 1
+  getList()
+}
 
-  /** 重置按钮操作 */
-  const resetQuery = () => {
-    queryFormRef.value.resetFields()
-    handleQuery()
-  }
+/** 重置按钮操作 */
+const resetQuery = () => {
+  queryFormRef.value.resetFields()
+  queryParams.brand = undefined
+  handleQuery()
+}
 
-  /** 添加/修改操作 */
-  const formRef = ref()
-  const openForm = (type: string, id?: number) => {
-    formRef.value.open(type, id)
-  }
+/** 添加/修改操作 */
+const formRef = ref()
+const openForm = (type: string, id?: number) => {
+  formRef.value.open(type, id)
+}
 
-  /** 删除按钮操作 */
-  const handleDelete = async (id: number) => {
-    try {
-      // 删除的二次确认
-      await message.delConfirm()
-      // 发起删除
-      await NvrApi.deleteNvr(id)
-      message.success(t('common.delSuccess'))
-      // 刷新列表
-      await getList()
-    } catch {
-    }
-  }
-
-  /** 导出按钮操作 */
-  const handleExport = async () => {
-    try {
-      // 导出的二次确认
-      await message.exportConfirm()
-      // 发起导出
-      exportLoading.value = true
-      const data = await NvrApi.exportNvr(queryParams)
-      download.excel(data, '录像机列表.xls')
-    } catch {
-    } finally {
-      exportLoading.value = false
-    }
-  }
-
-  /** 初始化 **/
-  onMounted(async () => {
+/** 删除按钮操作 */
+const handleDelete = async (id: number) => {
+  try {
+    // 删除的二次确认
+    await message.delConfirm()
+    // 发起删除
+    await NvrApi.deleteNvr(id)
+    message.success(t('common.delSuccess'))
+    // 刷新列表
     await getList()
-  })
+  } catch {
+  }
+}
+
+/** 导出按钮操作 */
+const handleExport = async () => {
+  try {
+    // 导出的二次确认
+    await message.exportConfirm()
+    // 发起导出
+    exportLoading.value = true
+    const data = await NvrApi.exportNvr(queryParams)
+    download.excel(data, '录像机列表.xls')
+  } catch {
+  } finally {
+    exportLoading.value = false
+  }
+}
+
+/** 初始化 **/
+onMounted(async () => {
+  await getList()
+})
 </script>

--
Gitblit v1.9.3