吉安感知网项目-前端
罗广辉
2026-01-26 beb95fb5fc166804056abafd70fc01ac27de7621
applications/drone-command/src/views/areaManage/precinctInfo/FormDiaLog.vue
@@ -1,7 +1,7 @@
<template>
   <el-dialog class="command-page-view-dialog" v-model="visible" :title="titleEnum[dialogMode]">
   <el-dialog class="command-page-view-dialog" v-model="visible" :title="titleEnum[dialogMode]"
      :close-on-click-modal="false">
      <div class="detail-container" v-if="readonly">
         <div class="detail-title">派出所详情</div>
         <el-row>
            <el-col :span="12">
               <div class="label">派出所名称</div>
@@ -52,14 +52,15 @@
         </el-row>
      </el-form>
      <template #footer>
         <el-button color="#2B2B4C" @click="handleCancel">{{ readonly ? '关闭' : '取消' }}</el-button>
         <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>
      </template>
   </el-dialog>
      <el-dialog class="command-page-map-view-dialog" v-model="visible1" :show-close="false"
   <el-dialog class="command-page-map-view-dialog" v-model="visible1" :show-close="false"
         :close-on-click-modal="false" destroy-on-close @closed="positionClosed">
         <div class="dialog-container">
            <div class="left-container">
@@ -80,7 +81,6 @@
            <el-button color="#284FE3" type="primary" @click="handleMapConfirm">确定</el-button>
         </template>
      </el-dialog>
   </el-dialog>
</template>
<script setup>
@@ -91,6 +91,8 @@
import CommonCesiumMap from '@/components/map-container/common-cesium-map.vue'
import * as Cesium from 'cesium'
import axios from 'axios'
import { saveOperationLog } from '@ztzf/apis'
import { useRoute } from 'vue-router'
const initForm = () => ({
   address: '', // 位置
@@ -112,6 +114,7 @@
const titleEnum = ref({ edit: '编辑', view: '查看', add: '新增' })
const tempLocation = ref({ longitude: null, latitude: null })
const mapRef = ref(null)
const route = useRoute()
const rules = {
   address: fieldRules(true, 50),
@@ -132,6 +135,11 @@
   submitting.value = true
   try {
      await fwPoliceStationSubmitApi(formData.value)
      saveOperationLog({
         requestUri: route.path,
         title: `${route.name || '派出所管理'}-${dialogMode.value === 'add' ? '新增' : '编辑'}`,
         type: 1,
      })
      ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功')
      visible.value = false
      emit('success')
@@ -171,7 +179,7 @@
            text: `${longitude.toFixed(6)}, ${latitude.toFixed(6)}`,
            font: '14px',
            fillColor: Cesium.Color.WHITE, // 文字颜色:白色
            backgroundColor: Cesium.Color.BLACK.withAlpha(0.45), //背景颜色
            backgroundColor: Cesium.Color.BLACK.withAlpha(0.6), //背景颜色
            backgroundPadding: new Cesium.Cartesian2(5, 5), // 水平/垂直内边距(像素)
            pixelOffset: new Cesium.Cartesian2(0, -20), // 可选:微调位置
            showBackground: true, // 确保背景显示(某些版本需要)
@@ -209,7 +217,7 @@
            text: `${longitude.toFixed(6)}, ${latitude.toFixed(6)}`,
            font: '14px',
            fillColor: Cesium.Color.WHITE,
            backgroundColor: Cesium.Color.BLACK.withAlpha(0.45),
            backgroundColor: Cesium.Color.BLACK.withAlpha(0.6),
            backgroundPadding: new Cesium.Cartesian2(5, 5),
            pixelOffset: new Cesium.Cartesian2(0, -20),
            showBackground: true,