| | |
| | | <template> |
| | | <el-dialog v-model="visible" :title="titleEnum[dialogMode]" :close-on-click-modal="false" width="80%"> |
| | | <div class="bodyBox"> |
| | | <div class="leftMap ztzf-cesium" id="mapContainer"></div> |
| | | <div class="rightInfo"> |
| | | <div v-if="readonly"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <div>区域名称: {{ formData.areaName }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <div>区域位置: {{ formatLocation(formData) }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <div>区域面积: {{ formData.areaSize || '-' }}k㎡</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <div>区域类型: {{ getDictLabel(formData.areaType, dictObj.areaType) }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <div>触发条件: {{ formData.triggerCondition }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <div>响应机制: {{ formData.responseMechanism }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <div>管控级别: {{ getDictLabel(formData.controlLevel, dictObj.controlLevel) }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <div>关联派出所: {{ formData.policeStationName }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <div>可飞行时间段: {{ formatFlyDate(formData) }}</div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-dialog class="command-page-map-view-dialog" v-model="visible" :show-close="false" |
| | | :close-on-click-modal="false"> |
| | | <div class="dialog-container"> |
| | | <div class="left-container"> |
| | | <CommonCesiumMap |
| | | ref="mapRef" |
| | | class="leftMap command-cesium" |
| | | :active="visible" |
| | | :flat-mode="false" |
| | | :terrain="true" |
| | | :layer-mode="4" |
| | | :boundary="false" |
| | | /> |
| | | </div> |
| | | |
| | | <div class="right-container"> |
| | | <div class="header"> |
| | | <span>{{ titleEnum[dialogMode] }}</span> |
| | | |
| | | <el-icon class="close-btn" @click.stop="visible = false"><Close /></el-icon> |
| | | </div> |
| | | <el-form v-else ref="formRef" :model="formData" :rules="rules" :disabled="readonly" label-width="100px"> |
| | | |
| | | <div class="content" v-if="readonly"> |
| | | <div class="detail-title">区域详情</div> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="区域名称" prop="areaName"> |
| | | <el-input v-model="formData.areaName" maxlength="50" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | <div class="label">区域名称</div> |
| | | <div class="val">{{ formData.areaName }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="区域位置" prop="longitude"> |
| | | <div>{{ formatLocation(formData) }}</div> |
| | | </el-form-item> |
| | | <div class="label">区域位置</div> |
| | | <div class="val">{{ formatLocation(formData) }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="区域面积" prop="areaSize">{{ formData.areaSize || '-' }}k㎡</el-form-item> |
| | | <div class="label">区域面积</div> |
| | | <div class="val">{{ formData.areaSize || '-' }}k㎡</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="区域类型" prop="areaType"> |
| | | <el-select v-model="formData.areaType" placeholder="请选择" clearable> |
| | | <el-option |
| | | v-for="item in dictObj.areaType" |
| | | :key="item.dictKey" |
| | | :label="item.dictValue" |
| | | :value="item.dictKey" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <div class="label">区域类型</div> |
| | | <div class="val">{{ getDictLabel(formData.areaType, dictObj.areaType) }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="响应机制" prop="responseMechanism"> |
| | | <el-input v-model="formData.responseMechanism" maxlength="200" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | <div class="label">触发条件</div> |
| | | <div class="val"> |
| | | {{ getDictLabel(formData.triggerCondition, dictObj.triggeringCondition) }} |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="触发条件" prop="triggerCondition"> |
| | | <el-input v-model="formData.triggerCondition" maxlength="200" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | <div class="label">响应机制</div> |
| | | <div class="val">{{ formData.responseMechanism }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="管控级别" prop="controlLevel"> |
| | | <el-select v-model="formData.controlLevel" placeholder="请选择" clearable> |
| | | <el-option |
| | | v-for="item in dictObj.controlLevel" |
| | | :key="item.dictKey" |
| | | :label="item.dictValue" |
| | | :value="item.dictKey" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <div class="label">管控级别</div> |
| | | <div class="val">{{ getDictLabel(formData.controlLevel, dictObj.controlLevel) }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="可飞行时段" prop="flyDateStart"> |
| | | <el-date-picker |
| | | v-model="flyDateRange" |
| | | type="datetimerange" |
| | | range-separator="至" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | <div class="label">关联派出所</div> |
| | | <div class="val">{{ formData.policeStationName }}</div> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="关联派出所" prop="policeStationId"> |
| | | <el-select v-model="formData.policeStationId" placeholder="请选择" clearable> |
| | | <el-option |
| | | v-for="item in policeStationOptions" |
| | | :key="item.id" |
| | | :label="item.stationName" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="关联设备" prop="deviceIds"> |
| | | <el-table |
| | | ref="deviceTableRef" |
| | | :data="deviceOptions" |
| | | row-key="id" |
| | | @selection-change="handleDeviceSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column prop="deviceName" label="设备名称" /> |
| | | </el-table> |
| | | </el-form-item> |
| | | <div class="label">可飞行时间段</div> |
| | | <div class="val">{{ formatFlyDate(formData) }}</div> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <div class="detail-title">关联设备</div> |
| | | <div class="command-table-container"> |
| | | <div class="command-table-content"> |
| | | <el-table class="command-table" ref="deviceTableRef" :data="deviceOptions" |
| | | row-key="id"> |
| | | <el-table-column prop="deviceName" label="设备名称" /> |
| | | <el-table-column prop="deviceType" label="类型"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.deviceType, dictObj.deviceType) }} |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-form class="dialog-form" v-else ref="formRef" :model="formData" :rules="rules" :disabled="readonly" |
| | | label-width="96px"> |
| | | <el-form-item label="区域名称" prop="areaName"> |
| | | <el-input class="command-input" v-model="formData.areaName" maxlength="50" |
| | | placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | <el-form-item label="区域位置" prop="longitude"> |
| | | <div class="val">{{ formatLocation(formData) }}</div> |
| | | </el-form-item> |
| | | <el-form-item label="区域面积" prop="areaSize"> |
| | | <div class="val">{{ formData.areaSize || '-' }}k㎡</div> |
| | | </el-form-item> |
| | | <el-form-item label="区域类型" prop="areaType"> |
| | | <el-select class="command-select" popper-class="command-select-popper" |
| | | v-model="formData.areaType" placeholder="请选择" clearable> |
| | | <el-option v-for="item in dictObj.areaType" :key="item.dictKey" :label="item.dictValue" |
| | | :value="item.dictKey" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="响应机制" prop="responseMechanism"> |
| | | <el-input class="command-input" v-model="formData.responseMechanism" |
| | | maxlength="200" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | <el-form-item label="触发条件" prop="triggerCondition"> |
| | | <el-select class="command-select" popper-class="command-select-popper" |
| | | v-model="formData.triggerCondition" placeholder="请选择" clearable> |
| | | <el-option v-for="item in dictObj.triggeringCondition" :key="item.dictKey" |
| | | :label="item.dictValue" :value="item.dictKey" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="管控级别" prop="controlLevel"> |
| | | <el-select class="command-select" popper-class="command-select-popper" |
| | | v-model="formData.controlLevel" placeholder="请选择" clearable> |
| | | <el-option v-for="item in dictObj.controlLevel" :key="item.dictKey" :label="item.dictValue" |
| | | :value="item.dictKey" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="可飞行时段" prop="flyDateStart"> |
| | | <el-date-picker class="command-date-picker" |
| | | popper-class="command-date-picker-popper" v-model="flyDateRange" |
| | | type="datetimerange" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" |
| | | :disabled-date="disabledFlyDate" :disabled-time="disabledFlyTime" |
| | | value-format="YYYY-MM-DD HH:mm:ss" clearable /> |
| | | </el-form-item> |
| | | <el-form-item label="关联派出所" prop="policeStationId"> |
| | | <el-select class="command-select" popper-class="command-select-popper" |
| | | v-model="formData.policeStationId" placeholder="请选择" clearable> |
| | | <el-option v-for="item in policeStationOptions" :key="item.id" :label="item.stationName" |
| | | :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <div class="search-table-container"> |
| | | <div class="search-box"> |
| | | <div class="label"> |
| | | 关联设备 |
| | | </div> |
| | | |
| | | <el-input class="command-input" v-model="searchName" placeholder="请输入" |
| | | clearable></el-input> |
| | | </div> |
| | | |
| | | <el-form-item prop="deviceIds" label-width="0"> |
| | | <el-table class="command-table" ref="deviceTableRef" |
| | | :data="deviceOptions.filter(item => item.deviceName.includes(searchName))" row-key="id" |
| | | @selection-change="handleDeviceSelectionChange"> |
| | | <el-table-column type="selection" width="55" :reserve-selection="true" /> |
| | | <el-table-column prop="deviceName" label="设备名称" /> |
| | | <el-table-column prop="deviceType" label="类型"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.deviceType, dictObj.deviceType) }} |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | | |
| | | <div class="footer"> |
| | | <el-button v-if="dialogMode != 'view'" color="#2B2B4C" @click="handleCancel">{{ readonly ? '关闭' : '取消' }}</el-button> |
| | | <el-button color="#284FE3" v-if="!readonly" type="primary" :loading="submitting" |
| | | :disabled="submitting" @click="handleSubmit"> |
| | | 确定 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <template #footer> |
| | | <el-button @click="handleCancel">{{ readonly ? '关闭' : '取消' }}</el-button> |
| | | <el-button v-if="!readonly" type="primary" :loading="submitting" :disabled="submitting" @click="handleSubmit"> |
| | | 确定 |
| | | </el-button> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { Close } from '@element-plus/icons-vue' |
| | | |
| | | import { computed, inject, nextTick, onMounted, ref, watch } from 'vue' |
| | | import { ElMessage } from 'element-plus' |
| | | import { fwAreaDivideDetailApi, fwAreaDivideSubmitApi } from './partitionApi' |
| | | import { fieldRules, getDictLabel } from '@ztzf/utils' |
| | | import { PublicCesium } from '@/utils/cesium/publicCesium' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | import { fieldRules, geomAnalysis, getDictLabel } from '@ztzf/utils' |
| | | import CommonCesiumMap from '@/components/map-container/common-cesium-map.vue' |
| | | import { DrawPolygon } from '@/utils/cesium/DrawPolygon' |
| | | import { cartesian3Convert } from '@/utils/cesium/mapUtil' |
| | | import * as turf from '@turf/turf' |
| | |
| | | const dialogMode = ref('add') // 弹框模式 |
| | | const submitting = ref(false) // 提交中 |
| | | const readonly = computed(() => dialogMode.value === 'view') |
| | | const titleEnum = ref({ edit: '编辑', view: '查看', add: '新增' }) |
| | | const route = useRoute() |
| | | const titleEnum = ref({ edit: '编辑区域', view: '查看区域', add: '新增区域' }) |
| | | const flyDateRange = ref([]) // 飞行时间 |
| | | const deviceTableRef = ref(null) |
| | | const searchName = ref('') |
| | | const selectedDeviceRows = ref([]) |
| | | const policeStationOptions = ref([]) // 关联派出所 |
| | | const deviceOptions = ref([]) // 关联设备 |
| | | const dictObj = inject('dictObj') |
| | | const mapRef = ref(null) |
| | | let viewer |
| | | let drawPolygonExample |
| | | let pointList = [] |
| | |
| | | controlLevel: fieldRules(true), |
| | | flyDateStart: fieldRules(true), |
| | | policeStationId: fieldRules(true), |
| | | deviceIds: fieldRules(true), |
| | | deviceIds: fieldRules(false), |
| | | } |
| | | |
| | | function isSameDay (left, right) { |
| | | return ( |
| | | left.getFullYear() === right.getFullYear() && |
| | | left.getMonth() === right.getMonth() && |
| | | left.getDate() === right.getDate() |
| | | ) |
| | | } |
| | | |
| | | const disabledFlyDate = time => { |
| | | const startOfToday = new Date() |
| | | startOfToday.setHours(0, 0, 0, 0) |
| | | return time.getTime() < startOfToday.getTime() |
| | | } |
| | | |
| | | const disabledFlyTime = date => { |
| | | if (!date) return {} |
| | | const now = new Date() |
| | | if (!isSameDay(date, now)) return {} |
| | | const currentHour = now.getHours() |
| | | const currentMinute = now.getMinutes() |
| | | const currentSecond = now.getSeconds() |
| | | return { |
| | | disabledHours: () => Array.from({ length: currentHour }, (_, index) => index), |
| | | disabledMinutes: hour => |
| | | hour === currentHour ? Array.from({ length: currentMinute }, (_, index) => index) : [], |
| | | disabledSeconds: (hour, minute) => |
| | | hour === currentHour && minute === currentMinute |
| | | ? Array.from({ length: currentSecond }, (_, index) => index) |
| | | : [], |
| | | } |
| | | } |
| | | |
| | | // 关闭弹框 |
| | | function handleCancel() { |
| | | function handleCancel () { |
| | | visible.value = false |
| | | } |
| | | |
| | | // 提交新增/编辑 |
| | | async function handleSubmit() { |
| | | async function handleSubmit () { |
| | | const isValid = await formRef.value?.validate().catch(() => false) |
| | | if (!isValid) return |
| | | if (dialogMode.value === 'add' && Number(formData.value.areaSize) < 0.5) { |
| | | ElMessage.warning('区域面积不能小于0.5km²,请重新绘制') |
| | | return |
| | | } |
| | | submitting.value = true |
| | | try { |
| | | let str = [...pointList, pointList[0]].map(item => `${item.longitude} ${item.latitude}`).join(',') |
| | | formData.value.geom = `POLYGON((${str}))` |
| | | await fwAreaDivideSubmitApi(formData.value) |
| | | const actionText = dialogMode.value === 'add' ? '新增' : '编辑' |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '区域划分'}-${actionText}`, |
| | | type: 1, |
| | | }) |
| | | ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功') |
| | | visible.value = false |
| | | emit('success') |
| | |
| | | ) |
| | | |
| | | // 加载详情 |
| | | async function loadDetail() { |
| | | async function loadDetail () { |
| | | if (!formData.value.id) return |
| | | const res = await fwAreaDivideDetailApi({ id: formData.value.id }) |
| | | formData.value = res?.data?.data ?? initForm() |
| | |
| | | } |
| | | |
| | | // 格式化区域位置 |
| | | function formatLocation(row) { |
| | | function formatLocation (row) { |
| | | if (row?.longitude == null || row?.latitude == null) return '' |
| | | return `${_.round(row.longitude, 6)}, ${_.round(row.latitude, 6)}` |
| | | } |
| | | |
| | | // 格式化可飞行时间段 |
| | | function formatFlyDate(row) { |
| | | function formatFlyDate (row) { |
| | | if (!row?.flyDateStart && !row?.flyDateEnd) return '' |
| | | return `${row.flyDateStart || '-'} ~ ${row.flyDateEnd || '-'}` |
| | | } |
| | | |
| | | // 初始化地图实例 |
| | | function initMap() { |
| | | const publicCesiumInstance = new PublicCesium({ |
| | | dom: 'mapContainer', |
| | | flatMode: false, |
| | | terrain: true, |
| | | layerMode: 4, |
| | | boundary: false, |
| | | }) |
| | | viewer = publicCesiumInstance.getViewer() |
| | | function initMap () { |
| | | if (viewer) return |
| | | const map = mapRef.value?.getMap() |
| | | viewer = map?.viewer || null |
| | | } |
| | | |
| | | // 绘制完成回调 |
| | |
| | | } |
| | | |
| | | // 新增模式绘制 |
| | | function addPolygon() { |
| | | function addPolygon () { |
| | | drawPolygonExample = new DrawPolygon(viewer) |
| | | drawPolygonExample.initHandler(viewer) |
| | | drawPolygonExample.subscribe('getPolygonPositions', drawFinished) |
| | | } |
| | | |
| | | // 解析经纬度 |
| | | function getLonLat(str) { |
| | | if (!str) return [] |
| | | return str |
| | | .replace('POLYGON((', '') |
| | | .replace('))', '') |
| | | .split(',') |
| | | .map(pair => { |
| | | const [lon, lat] = pair.trim().split(' ').map(Number) |
| | | return [lon, lat] |
| | | }) |
| | | } |
| | | |
| | | // 编辑面 |
| | | function editPolygon() { |
| | | function editPolygon () { |
| | | if (!formData.value?.geom) return |
| | | const grouped = getLonLat(formData.value.geom) |
| | | grouped.pop() |
| | | pointList = grouped.map(item => ({ longitude: item[0], latitude: item[1] })) |
| | | pointList = geomAnalysis(formData.value.geom) |
| | | drawPolygonExample?.destroy() |
| | | drawPolygonExample = new DrawPolygon(viewer) |
| | | let pointList1 = _.cloneDeep(pointList) |
| | | pointList1.pop() |
| | | drawPolygonExample.initPolygon( |
| | | viewer, |
| | | grouped.map(item => ({ lng: item[0], lat: item[1] })) |
| | | pointList.map(item => ({ lng: item.longitude, lat: item.latitude })) |
| | | ) |
| | | drawPolygonExample.subscribe('getPolygonPositions', drawFinished) |
| | | if (pointList1.length) { |
| | | const result = pointList1.map(item => [item.longitude, item.latitude]).flat() |
| | | const tempEntity = viewer.entities?.add({ |
| | | position: Cesium.Cartesian3.fromDegrees(result[0], result[1]), |
| | | polyline: { |
| | | positions: Cesium.Cartesian3.fromDegreesArray(result), |
| | | clampToGround: true, |
| | | width: 1, |
| | | material: Cesium.Color.TRANSPARENT, |
| | | }, |
| | | }) |
| | | if (tempEntity) { |
| | | viewer.flyTo(tempEntity, { duration: 0 }) |
| | | viewer.entities.remove(tempEntity) |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 查看面 |
| | | function viewPolygon() { |
| | | function viewPolygon () { |
| | | if (!formData.value?.geom) return |
| | | const grouped = getLonLat(formData.value.geom) |
| | | grouped.pop() |
| | | pointList = grouped.map(item => ({ longitude: item[0], latitude: item[1] })) |
| | | const result = grouped.flat().flat() |
| | | pointList = geomAnalysis(formData.value.geom) |
| | | const result = pointList.map(item => [item.longitude, item.latitude]).flat() |
| | | const mian = viewer.entities?.add({ |
| | | customType: 'control_group', |
| | | position: Cesium.Cartesian3.fromDegrees(result[0], result[1]), |
| | |
| | | material: Cesium.Color.RED, |
| | | }, |
| | | }) |
| | | viewer.flyTo(mian) |
| | | viewer.flyTo(mian, { duration: 0 }) |
| | | } |
| | | |
| | | // 获取派出所列表 |
| | | async function getPoliceStationList() { |
| | | async function getPoliceStationList () { |
| | | const res = await fwPoliceStationListApi() |
| | | policeStationOptions.value = res?.data?.data ?? [] |
| | | } |
| | | |
| | | // 获取设备列表 |
| | | async function getDeviceList() { |
| | | async function getDeviceList () { |
| | | if (deviceOptions.value.length) return |
| | | const res = await fwDeviceListApi({ isAreaSelect: 1 }) |
| | | const res = await fwDeviceListApi({ isAreaSelect: 1, areaId: formData.value.id, isTrack: 1 }) |
| | | deviceOptions.value = res?.data?.data ?? [] |
| | | if (dialogMode.value === 'view') { |
| | | deviceOptions.value = deviceOptions.value.filter(item => formData.value.deviceIds.includes(item.id)) |
| | | } |
| | | } |
| | | |
| | | // 关联设备变更 |
| | | function handleDeviceSelectionChange(rows) { |
| | | function handleDeviceSelectionChange (rows) { |
| | | selectedDeviceRows.value = rows |
| | | const ids = rows.map(item => item.id) |
| | | formData.value.deviceIds = ids.join(',') |
| | | } |
| | | |
| | | function getDeviceIdList() { |
| | | if (!formData.value.deviceIds) return [] |
| | | return formData.value.deviceIds.split(',').filter(Boolean) |
| | | } |
| | | |
| | | function syncDeviceSelection() { |
| | | // 同步选择状态 |
| | | function syncDeviceSelection () { |
| | | if (!deviceTableRef.value) return |
| | | deviceTableRef.value.clearSelection() |
| | | console.log(getDeviceIdList()) |
| | | const ids = new Set(getDeviceIdList().map(String)) |
| | | const rows = [] |
| | | const arr = formData.value.deviceIds.split(',') |
| | | deviceOptions.value.forEach(row => { |
| | | if (ids.has(String(row.id))) { |
| | | if (arr.includes(row.id)) { |
| | | deviceTableRef.value.toggleRowSelection(row, true) |
| | | rows.push(row) |
| | | } |
| | |
| | | } |
| | | |
| | | // 打开弹框 |
| | | async function open({ mode, row } = {}) { |
| | | async function open ({ mode, row } = {}) { |
| | | dialogMode.value = mode || 'add' |
| | | formData.value = dialogMode.value === 'add' ? initForm() : row |
| | | selectedDeviceRows.value = [] |
| | |
| | | }) |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .bodyBox { |
| | | display: flex; |
| | | height: 600px; |
| | | .leftMap { |
| | | width: 70%; |
| | | height: 100%; |
| | | } |
| | | .rightInfo { |
| | | width: 30%; |
| | | height: 100%; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | </style> |
| | | <style scoped lang="scss"></style> |