|
|
@@ -1,78 +1,85 @@
|
|
|
<template>
|
|
|
- <div class="flex flex-col items-center add-body">
|
|
|
- <el-form
|
|
|
- class="range-form"
|
|
|
- :inline="true"
|
|
|
- :model="cameraRangeData"
|
|
|
- :rules="rules"
|
|
|
- label-width="84px"
|
|
|
- label-position="left"
|
|
|
- >
|
|
|
- <el-form-item
|
|
|
- v-for="item in cameraRangeAddForm"
|
|
|
- :key="item.prop"
|
|
|
- :label="item.label"
|
|
|
- :prop="item.prop"
|
|
|
- :label-width="item.labelWidth"
|
|
|
+ <div style="width: 100%">
|
|
|
+ <div class="flex flex-col items-center add-body">
|
|
|
+ <el-form
|
|
|
+ class="range-form"
|
|
|
+ :inline="true"
|
|
|
+ :model="cameraRangeData"
|
|
|
+ :rules="rules"
|
|
|
+ label-width="84px"
|
|
|
+ label-position="left"
|
|
|
>
|
|
|
- <el-input
|
|
|
- v-if="item.type === 'input'"
|
|
|
- v-model="cameraRangeData[item.prop]"
|
|
|
- :placeholder="item.placeholder"
|
|
|
- style="width: 200px"
|
|
|
- />
|
|
|
- <el-select
|
|
|
- v-if="item.type === 'select'"
|
|
|
- v-model="cameraRangeData[item.prop]"
|
|
|
- :placeholder="item.placeholder"
|
|
|
- style="width: 200px"
|
|
|
+ <el-form-item
|
|
|
+ v-for="item in cameraRangeAddForm"
|
|
|
+ :key="item.prop"
|
|
|
+ :label="item.label"
|
|
|
+ :prop="item.prop"
|
|
|
+ :label-width="item.labelWidth"
|
|
|
>
|
|
|
- <el-option
|
|
|
- v-for="protocal in item.option"
|
|
|
- :key="protocal.value"
|
|
|
- :label="protocal.label"
|
|
|
- :value="protocal.value"
|
|
|
+ <el-input
|
|
|
+ v-if="item.type === 'input'"
|
|
|
+ v-model="cameraRangeData[item.prop]"
|
|
|
+ :placeholder="item.placeholder"
|
|
|
+ style="width: 200px"
|
|
|
/>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <div class="flex justify-end" style="width: 100%">
|
|
|
- <el-button type="primary" class="btn-r" @click="searchRangeCamera">搜索</el-button>
|
|
|
- </div>
|
|
|
- <div class="search-list">
|
|
|
- <BasicTable
|
|
|
- style="height: 274px"
|
|
|
- :columns="columns"
|
|
|
- :data-source="cameraItems"
|
|
|
- :row-key="(row) => row.name"
|
|
|
- :action-column="actionColumn"
|
|
|
- :pagination="false"
|
|
|
- :tableSetting="{
|
|
|
- size: false,
|
|
|
- redo: false,
|
|
|
- fullscreen: false,
|
|
|
- striped: false,
|
|
|
- setting: false,
|
|
|
- }"
|
|
|
- :row-class-name="getRowClassName"
|
|
|
- ref="tableRef"
|
|
|
- @order-change="orderByItem"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- >
|
|
|
- <template #empty>
|
|
|
- <div class="empty-content flex flex-col items-center">
|
|
|
- <img :src="emptyImg" class="empty-img" />
|
|
|
- <span class="empty-text">目前无内容,请先添加相机</span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </BasicTable>
|
|
|
+ <el-select
|
|
|
+ v-if="item.type === 'select'"
|
|
|
+ v-model="cameraRangeData[item.prop]"
|
|
|
+ :placeholder="item.placeholder"
|
|
|
+ style="width: 200px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="protocal in item.option"
|
|
|
+ :key="protocal.value"
|
|
|
+ :label="protocal.label"
|
|
|
+ :value="protocal.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div class="flex justify-end" style="width: 100%">
|
|
|
+ <el-button type="primary" class="btn-r" @click="searchRangeCamera">搜索</el-button>
|
|
|
+ </div>
|
|
|
+ <div class="search-list">
|
|
|
+ <BasicTable
|
|
|
+ style="height: 274px"
|
|
|
+ :columns="columns"
|
|
|
+ :data-source="cameraItems"
|
|
|
+ :row-key="(row) => row.name"
|
|
|
+ :action-column="actionColumn"
|
|
|
+ :pagination="false"
|
|
|
+ :tableSetting="{
|
|
|
+ size: false,
|
|
|
+ redo: false,
|
|
|
+ fullscreen: false,
|
|
|
+ striped: false,
|
|
|
+ setting: false,
|
|
|
+ }"
|
|
|
+ :row-class-name="getRowClassName"
|
|
|
+ ref="tableRef"
|
|
|
+ @order-change="orderByItem"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <template #empty>
|
|
|
+ <div class="empty-content flex flex-col items-center">
|
|
|
+ <img :src="emptyImg" class="empty-img" />
|
|
|
+ <span class="empty-text">目前无内容,请先添加相机</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </BasicTable>
|
|
|
+ </div>
|
|
|
+ <EditCamera v-model="showEditPop" style="z-index: 9" :edit-data="editRow" />
|
|
|
</div>
|
|
|
+ <span class="pop-footer">
|
|
|
+ <el-button @click="handleCancel">取消</el-button>
|
|
|
+ <el-button type="primary" @click="handleConfirm">确定</el-button>
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import { computed, h, reactive, ref } from 'vue';
|
|
|
- import { CameraRangeItem } from '../type';
|
|
|
+ import { CameraRangeItem, CameraIPItem } from '../type';
|
|
|
import { cameraRangeAddForm } from '../constant';
|
|
|
import SearchCamerasAction from './SearchCamerasAction.vue';
|
|
|
import { BasicTable } from '@/components/Table';
|
|
|
@@ -81,9 +88,15 @@
|
|
|
import emptyImg from '@/assets/images/table/table-empty.png';
|
|
|
import editIcon from '@/assets/images/table/table-edit.png';
|
|
|
import deleteIcon from '@/assets/images/table/table-delete.png';
|
|
|
+ import EditCamera from './CameraEditPopover.vue';
|
|
|
+
|
|
|
+ const emits = defineEmits(['cancel-execute', 'confirm-execute']);
|
|
|
|
|
|
const cameraRangeData = ref<CameraRangeItem>({} as CameraRangeItem);
|
|
|
|
|
|
+ const showEditPop = ref(false);
|
|
|
+ const editRow = ref<CameraIPItem | null>(null);
|
|
|
+
|
|
|
const rules = computed(() => {
|
|
|
const newRule = {};
|
|
|
cameraRangeAddForm.forEach((item) => {
|
|
|
@@ -209,7 +222,16 @@
|
|
|
|
|
|
const handleDelete = () => {};
|
|
|
|
|
|
- const handleEdit = () => {};
|
|
|
+ const handleEdit = (row) => {
|
|
|
+ showEditPop.value = true;
|
|
|
+ editRow.value = row;
|
|
|
+ };
|
|
|
+
|
|
|
+ const handleCancel = () => {
|
|
|
+ emits('cancel-execute');
|
|
|
+ };
|
|
|
+
|
|
|
+ const handleConfirm = () => {};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
@@ -228,14 +250,21 @@
|
|
|
|
|
|
.btn-r {
|
|
|
margin-right: 24px;
|
|
|
- margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.search-list {
|
|
|
width: 100%;
|
|
|
- height: 290px;
|
|
|
+ height: 300px;
|
|
|
padding: 0 28px;
|
|
|
- margin-bottom: 60px;
|
|
|
+ margin-bottom: 40px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .pop-footer {
|
|
|
+ position: absolute;
|
|
|
+ right: 24px;
|
|
|
+ bottom: 27px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
}
|
|
|
|
|
|
:deep(.el-form-item__label) {
|
|
|
@@ -248,13 +277,9 @@
|
|
|
margin-right: 0;
|
|
|
margin-bottom: 28px;
|
|
|
}
|
|
|
- :deep(.el-table__body-wrapper tr td.el-table-fixed-column--left) {
|
|
|
- background: unset;
|
|
|
- }
|
|
|
- :deep(.el-table__body-wrapper tr td.el-table-fixed-column--right) {
|
|
|
- background: unset;
|
|
|
- }
|
|
|
:deep(.el-table .warm-row) {
|
|
|
background: #f9e6e5 !important;
|
|
|
+ --el-table-row-hover-bg-color: none;
|
|
|
+ --el-bg-color: none;
|
|
|
}
|
|
|
</style>
|