|
@@ -120,30 +120,32 @@
|
|
<el-table-column label="描述" align="center" prop="des" />
|
|
<el-table-column label="描述" align="center" prop="des" />
|
|
<el-table-column label="操作" align="center">
|
|
<el-table-column label="操作" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-button
|
|
|
|
- link
|
|
|
|
- type="success"
|
|
|
|
- @click="openViewForm(scope.row.id)"
|
|
|
|
- v-hasPermi="['safe:camera:query']"
|
|
|
|
- >
|
|
|
|
- 预览
|
|
|
|
- </el-button>
|
|
|
|
- <el-button
|
|
|
|
- link
|
|
|
|
- type="primary"
|
|
|
|
- @click="openForm('update', scope.row.id)"
|
|
|
|
- v-hasPermi="['safe:camera:update']"
|
|
|
|
- >
|
|
|
|
- 编辑
|
|
|
|
- </el-button>
|
|
|
|
- <el-button
|
|
|
|
- link
|
|
|
|
- type="danger"
|
|
|
|
- @click="handleDelete(scope.row.id)"
|
|
|
|
- v-hasPermi="['safe:camera:delete']"
|
|
|
|
- >
|
|
|
|
- 删除
|
|
|
|
- </el-button>
|
|
|
|
|
|
+ <div class="flex items-center justify-center">
|
|
|
|
+ <el-button
|
|
|
|
+ link
|
|
|
|
+ type="success"
|
|
|
|
+ @click="openView(scope.row.id)"
|
|
|
|
+ v-hasPermi="['safe:camera:query']"
|
|
|
|
+ >
|
|
|
|
+ <Icon icon="ep:camera" /> 预览
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ link
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="openForm('update', scope.row.id)"
|
|
|
|
+ v-hasPermi="['safe:camera:update']"
|
|
|
|
+ >
|
|
|
|
+ <Icon icon="ep:edit" /> 编辑
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ link
|
|
|
|
+ type="danger"
|
|
|
|
+ @click="handleDelete(scope.row.id)"
|
|
|
|
+ v-hasPermi="['safe:camera:delete']"
|
|
|
|
+ >
|
|
|
|
+ <Icon icon="ep:delete" /> 删除
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -158,7 +160,7 @@
|
|
|
|
|
|
<!-- 表单弹窗:添加/修改 -->
|
|
<!-- 表单弹窗:添加/修改 -->
|
|
<CameraForm ref="formRef" @success="getList" />
|
|
<CameraForm ref="formRef" @success="getList" />
|
|
- <CameraViewForm ref="viewFormRef"/>
|
|
|
|
|
|
+ <CameraView ref="viewRef"/>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
@@ -167,7 +169,7 @@ import download from '@/utils/download'
|
|
import { CameraApi, CameraVO } from '@/api/safe/camera'
|
|
import { CameraApi, CameraVO } from '@/api/safe/camera'
|
|
import { ServerApi } from '@/api/safe/server'
|
|
import { ServerApi } from '@/api/safe/server'
|
|
import CameraForm from './CameraForm.vue'
|
|
import CameraForm from './CameraForm.vue'
|
|
-import CameraViewForm from './CameraViewForm.vue'
|
|
|
|
|
|
+import CameraView from './CameraView.vue'
|
|
|
|
|
|
/** 安防前端设备 列表 */
|
|
/** 安防前端设备 列表 */
|
|
defineOptions({ name: 'SafeCamera' })
|
|
defineOptions({ name: 'SafeCamera' })
|
|
@@ -223,9 +225,9 @@ const openForm = (type: string, id?: number) => {
|
|
}
|
|
}
|
|
|
|
|
|
/** 预览操作 */
|
|
/** 预览操作 */
|
|
-const viewFormRef = ref()
|
|
|
|
-const openViewForm = (id?: number) => {
|
|
|
|
- viewFormRef.value.open(id)
|
|
|
|
|
|
+const viewRef = ref()
|
|
|
|
+const openView = (id?: number) => {
|
|
|
|
+ viewRef.value.open(id)
|
|
}
|
|
}
|
|
|
|
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|