Преглед изворни кода

Merge branch 'dev' of maoming/yjdp-web into master

迭代一
zhangyihao пре 1 година
родитељ
комит
b3c991ea3c

+ 9 - 0
src/types/components.d.ts

@@ -20,9 +20,11 @@ declare module 'vue' {
     ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
     ElButton: typeof import('element-plus/es')['ElButton']
     ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
+    ElCol: typeof import('element-plus/es')['ElCol']
     ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
     ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
+    ElDialog: typeof import('element-plus/es')['ElDialog']
     ElDivider: typeof import('element-plus/es')['ElDivider']
     ElDrawer: typeof import('element-plus/es')['ElDrawer']
     ElDropdown: typeof import('element-plus/es')['ElDropdown']
@@ -32,22 +34,28 @@ declare module 'vue' {
     ElFormItem: typeof import('element-plus/es')['ElFormItem']
     ElIcon: typeof import('element-plus/es')['ElIcon']
     ElInput: typeof import('element-plus/es')['ElInput']
+    ElLink: typeof import('element-plus/es')['ElLink']
     ElMenu: typeof import('element-plus/es')['ElMenu']
     ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
     ElOption: typeof import('element-plus/es')['ElOption']
     ElPagination: typeof import('element-plus/es')['ElPagination']
+    ElRow: typeof import('element-plus/es')['ElRow']
     ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
     ElSelect: typeof import('element-plus/es')['ElSelect']
     ElSlider: typeof import('element-plus/es')['ElSlider']
+    ElStep: typeof import('element-plus/es')['ElStep']
+    ElSteps: typeof import('element-plus/es')['ElSteps']
     ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
     ElSwitch: typeof import('element-plus/es')['ElSwitch']
     ElTable: typeof import('element-plus/es')['ElTable']
     ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
     ElTabPane: typeof import('element-plus/es')['ElTabPane']
     ElTabs: typeof import('element-plus/es')['ElTabs']
+    ElTag: typeof import('element-plus/es')['ElTag']
     ElTimeline: typeof import('element-plus/es')['ElTimeline']
     ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
     ElTooltip: typeof import('element-plus/es')['ElTooltip']
+    ElUpload: typeof import('element-plus/es')['ElUpload']
     FileUpload: typeof import('./../components/FileUpload/index.vue')['default']
     FooterSection: typeof import('./../components/FooterSection/index.vue')['default']
     Hamburger: typeof import('./../components/Hamburger/index.vue')['default']
@@ -60,6 +68,7 @@ declare module 'vue' {
     ImagePreview: typeof import('./../components/ImagePreview/index.vue')['default']
     ImageUpload: typeof import('./../components/ImageUpload/index.vue')['default']
     Index2: typeof import('./../components/Dialog/index2.vue')['default']
+    Index3: typeof import('./../components/Dialog/index3.vue')['default']
     LangSelect: typeof import('./../components/LangSelect/index.vue')['default']
     Map: typeof import('./../components/Map/index.vue')['default']
     MapLogical: typeof import('./../components/Map/MapLogical.vue')['default']

+ 24 - 24
src/views/emergencyCommandMap/LeftSection.vue

@@ -95,30 +95,30 @@
       </div>
     </div>
 
-<!--    <div class="card" style="height: 990px">-->
-<!--      <div class="card-header">-->
-<!--        <div>分析研判</div>-->
-<!--      </div>-->
-<!--      <div class="card-content">-->
-<!--        <div v-for="(item, index) in analyzeJudge" :key="index" class="line">-->
-<!--          <div>{{ item.label }}</div>-->
-<!--          <div class="line-content">-->
-<!--            <div v-for="(item2, index2) in item.children" :key="index2" class="content-item">-->
-<!--              <el-icon size="72px" style="margin-right: 10px;"><Shop /></el-icon>-->
-<!--              <div class="text-box">-->
-<!--                <div class="">{{ item2.data + item2.unit }}</div>-->
-<!--                <div class="">{{ item2.label }}</div>-->
-<!--              </div>-->
-<!--            </div>-->
-<!--          </div>-->
-<!--        </div>-->
-<!--      </div>-->
-<!--    </div>-->
+    <!--    <div class="card" style="height: 990px">-->
+    <!--      <div class="card-header">-->
+    <!--        <div>分析研判</div>-->
+    <!--      </div>-->
+    <!--      <div class="card-content">-->
+    <!--        <div v-for="(item, index) in analyzeJudge" :key="index" class="line">-->
+    <!--          <div>{{ item.label }}</div>-->
+    <!--          <div class="line-content">-->
+    <!--            <div v-for="(item2, index2) in item.children" :key="index2" class="content-item">-->
+    <!--              <el-icon size="72px" style="margin-right: 10px;"><Shop /></el-icon>-->
+    <!--              <div class="text-box">-->
+    <!--                <div class="">{{ item2.data + item2.unit }}</div>-->
+    <!--                <div class="">{{ item2.label }}</div>-->
+    <!--              </div>-->
+    <!--            </div>-->
+    <!--          </div>-->
+    <!--        </div>-->
+    <!--      </div>-->
+    <!--    </div>-->
   </div>
 </template>
 
 <script lang="ts" setup>
-import { getEventDetail} from '@/api/duty/eventing';
+import { getEventDetail } from '@/api/duty/eventing';
 // const duration = ref(0);
 const formattedDuration = ref('');
 const route = useRoute();
@@ -144,7 +144,7 @@ const eventData = ref({
   address: '',
   event_status: '',
   event_source: '',
-  report_time: '',
+  report_time: ''
 });
 const fetchEventDetail = () => {
   console.log('fetchEventDetail');
@@ -164,7 +164,7 @@ const comprehensiveDutyState = ref({
 });
 
 // 分析研判
-const analyzeJudge = ref({})
+const analyzeJudge = ref({});
 
 // 结束
 const endProcess = () => {
@@ -461,7 +461,7 @@ onMounted(() => {
         /* 设置字体透明 */
         color: transparent;
         /* 设置线性渐变,从红色渐变到蓝色 */
-        background-image: linear-gradient(to bottom, #fff 20%, #f6d6a7 50%, #E48406 100%);
+        background-image: linear-gradient(to bottom, #fff 20%, #f6d6a7 50%, #e48406 100%);
         /* 使用 -webkit-background-clip 属性将背景剪裁至文本形状 */
         -webkit-background-clip: text;
         /* 非Webkit内核浏览器需要使用标准前缀 */
@@ -505,7 +505,7 @@ onMounted(() => {
       /* 设置字体透明 */
       color: transparent;
       /* 设置线性渐变,从红色渐变到蓝色 */
-      background-image: linear-gradient(to bottom, #fff 20%, #FF2F3C 50%, #FF2F3C 100%);
+      background-image: linear-gradient(to bottom, #fff 20%, #ff2f3c 50%, #ff2f3c 100%);
       /* 使用 -webkit-background-clip 属性将背景剪裁至文本形状 */
       -webkit-background-clip: text;
       /* 非Webkit内核浏览器需要使用标准前缀 */

+ 11 - 11
src/views/routineCommandMap/EventManage.vue

@@ -128,11 +128,11 @@
 
 <script lang="ts" setup>
 import { ref, reactive, toRefs, onMounted } from 'vue';
-import { getEvent, deleteEvent } from '@/api/duty/eventing';
+import { getEvent } from '@/api/duty/eventing';
 
 import EventEditDialog from './eventing/EventEditDialog.vue';
 import CloseEventDialog from './eventing/CloseEventDialog.vue';
-import eventDetails from '@/views/routineCommandMap/eventing/eventDetails.vue';
+import eventDetails from './eventing/eventDetails.vue';
 const proxy = getCurrentInstance()?.proxy;
 const { mm_event_type, mm_event_level, mm_event_state, region } = toRefs<any>(
   proxy?.useDict('mm_event_type', 'mm_event_level', 'mm_event_state', 'region')
@@ -150,6 +150,7 @@ const eventId = ref('');
 const queryFormRef = ref();
 
 const initFormData = {
+  event_id: '', // 事件标题
   event_title: '', // 事件标题
   event_type: '', // 事件类型
   event_level: '', // 事件等级
@@ -224,6 +225,7 @@ const eventDetailsState = reactive({
   show: false,
   title: ''
 });
+
 // const handleAdd = () => {
 //   eventId.value = '';
 //   eventEditDialogState.title = '新增事件';
@@ -238,6 +240,13 @@ const handleUpdate = (row) => {
     eventEditDialogState.show = true;
   }
 };
+//查看事件详情
+const handleView = (row) => {
+  // 查看事件详情逻辑
+  eventId.value = row.event_id;
+  eventDetailsState.title = '查看事件';
+  eventDetailsState.show = true;
+};
 
 // const handleDelete = (row) => {
 //   if (row) {
@@ -284,15 +293,6 @@ const handleCloseEventDialog = (b) => {
   console.log('handleCloseEventDialog', b);
 };
 
-//查看事件详情
-const handleView = (row) => {
-  if (row) {
-    // 查看事件详情逻辑
-    console.log('查看事件详情', row);
-    eventManageState.showListDialog = true;
-  }
-};
-
 onMounted(() => {
   getList();
 });

+ 71 - 154
src/views/routineCommandMap/eventing/eventDetails.vue

@@ -3,7 +3,6 @@
     <div class="overlay" @click="closeDialog"></div>
     <div class="dialog" :style="{ height: height }">
       <div class="dialog-header">
-        <div class="dialog-title">{{ title }}</div>
         <div class="icon-close" @click="closeDialog">
           <el-icon size="100px"><Close /></el-icon>
         </div>
@@ -11,18 +10,8 @@
       <div class="dialog-content">
         <slot />
         <div class="app-container">
-          <div class="back-btn" @click="handleBack">
-            <el-icon><Back /></el-icon>
-            返回上一级
-          </div>
           <div class="line">
             <div class="title">{{ detailData.event_title }}</div>
-            <div class="flex">
-              <el-button type="primary" :disabled="detailData.del_flag == '2'" @click="handleUpdate">编辑</el-button>
-              <el-button type="primary" :disabled="detailData.event_status != '0'" @click="handleStartEvent">开始指挥</el-button>
-              <el-button type="danger" :disabled="detailData.event_status != '2'" @click="handleCloseEvent">关闭事件</el-button>
-              <el-button type="danger" :disabled="detailData.del_flag != '0'" @click="handleDeleteEvent">删除事件</el-button>
-            </div>
           </div>
           <div class="sub-title">基础信息</div>
           <div class="line2">
@@ -101,28 +90,28 @@
             <el-step v-for="(item, index) in eventTrackState.items" :key="index" :title="item.title" :description="item.description"></el-step>
           </el-steps>
 
-          <div class="sub-title">指挥记录</div>
-          <div class="list">
-            <div class="list-item">
-              <i class="img"></i>
-              <div class="item-title">大屏指挥记录</div>
-            </div>
-            <div class="list-item">
-              <i class="img"></i>
-              <div class="item-title">中屏指挥记录</div>
-            </div>
-          </div>
-          <div class="sub-title">匹配预案</div>
-          <div class="list">
-            <div class="list-item2">{{ detailData.plan_name }}</div>
-          </div>
-          <div class="sub-title">事件总结报告</div>
-          <div class="list2">
-            <div v-for="(item, index) in summaryFiles" :key="index" class="list-item" @click="downloadSummaryFile(item.url)">
-              <div class="link">{{ item.file_name }}</div>
-              <el-icon class="icon"><Download /></el-icon>
-            </div>
-          </div>
+          <!--          <div class="sub-title">指挥记录</div>-->
+          <!--          <div class="list">-->
+          <!--            <div class="list-item">-->
+          <!--              <i class="img"></i>-->
+          <!--              <div class="item-title">大屏指挥记录</div>-->
+          <!--            </div>-->
+          <!--            <div class="list-item">-->
+          <!--              <i class="img"></i>-->
+          <!--              <div class="item-title">中屏指挥记录</div>-->
+          <!--            </div>-->
+          <!--          </div>-->
+          <!--          <div class="sub-title">匹配预案</div>-->
+          <!--          <div class="list">-->
+          <!--            <div class="list-item2">{{ detailData.plan_name }}</div>-->
+          <!--          </div>-->
+          <!--          <div class="sub-title">事件总结报告</div>-->
+          <!--          <div class="list2">-->
+          <!--            <div v-for="(item, index) in summaryFiles" :key="index" class="list-item" @click="downloadSummaryFile(item.url)">-->
+          <!--              <div class="link">{{ item.file_name }}</div>-->
+          <!--              <el-icon class="icon"><Download /></el-icon>-->
+          <!--            </div>-->
+          <!--          </div>-->
           <el-dialog v-model="eventLevelState.show" title="事件等级" width="500" :before-close="handleEventLevelClose">
             <el-timeline>
               <el-timeline-item
@@ -137,28 +126,6 @@
               </el-timeline-item>
             </el-timeline>
           </el-dialog>
-
-          <CloseEventDialog
-            v-model="closeDialogState.show"
-            :data="closeDialogState.form"
-            :event-id="eventId"
-            @update:model-value="fetchEventDetail"
-          />
-
-          <StartEventDialog
-            v-model="startDialogState.show"
-            :data="startDialogState.form"
-            :event-id="eventId"
-            @update:model-value="fetchEventDetail"
-          />
-
-          <EventEditDialog
-            v-model="eventEditDialogState.show"
-            :title="eventEditDialogState.title"
-            :event-id="eventId"
-            @update:model-value="fetchEventDetail"
-          />
-
           <EditCasualtiesDialog
             v-model="editCasualtiesDialogState.show"
             :data="editCasualtiesDialogState.form"
@@ -173,10 +140,8 @@
 
 <script lang="ts" setup>
 import { getEventDetail, deleteEvent } from '@/api/duty/eventing';
-import StartEventDialog from './StartEventDialog.vue';
-import CloseEventDialog from './CloseEventDialog.vue';
-import EventEditDialog from './EventEditDialog.vue';
 import EditCasualtiesDialog from './EditCasualtiesDialog.vue';
+import { ref } from 'vue';
 
 const route = useRoute();
 const router = useRouter();
@@ -184,7 +149,6 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const { mm_event_type, mm_event_level, mm_event_state, region } = toRefs<any>(
   proxy?.useDict('mm_event_type', 'mm_event_level', 'mm_event_state', 'region')
 );
-
 // 事件等级数据
 let eventLevelState = reactive({
   show: false,
@@ -247,13 +211,38 @@ let eventTrackState = reactive({
     }
   ]
 });
-// 返回上一级
-const handleBack = () => {
-  router.go(-1);
-};
-
-let eventId = ref('');
-const detailData = ref({
+interface Form {
+  eventId: '';
+  event_id: '';
+  event_title: '';
+  event_type: '';
+  event_level: '';
+  event_status: '';
+  event_time: '';
+  address: '';
+  report_time: '';
+  event_source: '';
+  reported_by: '';
+  event_description: '';
+  contact: '';
+  plan_name: '';
+  casualties: '';
+  deaths: '';
+  injuries: '';
+  missing: '';
+  del_flag: '';
+}
+interface Props {
+  modelValue: boolean;
+  eventId: string;
+  data: Form;
+}
+const props = withDefaults(defineProps<Props>(), {
+  modelValue: false
+});
+const emits = defineEmits(['update:modelValue']);
+const detailData = ref<Form>({
+  eventId: '',
   event_id: '',
   event_title: '',
   event_type: '',
@@ -273,29 +262,6 @@ const detailData = ref({
   missing: '',
   del_flag: ''
 });
-
-let startDialogState = reactive({
-  show: false,
-  form: {
-    eventId: '',
-    event_level: '',
-    deaths: '',
-    injuries: '',
-    missing: ''
-  }
-});
-
-const closeDialogState = reactive({
-  show: false,
-  form: {
-    eventId: '',
-    deaths: '',
-    injuries: '',
-    missing: '',
-    fileNames: []
-  }
-});
-
 const editCasualtiesDialogState = reactive({
   show: false,
   form: {
@@ -305,63 +271,18 @@ const editCasualtiesDialogState = reactive({
     missing: ''
   }
 });
-
-// 开始指挥(事件)
-const handleStartEvent = () => {
-  startDialogState.form.eventId = eventId.value;
-  startDialogState.form.deaths = detailData.value.deaths;
-  startDialogState.form.injuries = detailData.value.injuries;
-  startDialogState.form.missing = detailData.value.missing;
-  startDialogState.form.event_level = detailData.value.event_level;
-  startDialogState.show = true;
-};
-
-// 关闭事件
-const handleCloseEvent = () => {
-  closeDialogState.form.eventId = eventId.value;
-  closeDialogState.form.deaths = detailData.value.deaths;
-  closeDialogState.form.injuries = detailData.value.injuries;
-  closeDialogState.form.missing = detailData.value.missing;
-  closeDialogState.form.fileNames = [];
-  closeDialogState.show = true;
-};
-
-// 删除事件
-const handleDeleteEvent = () => {
-  ElMessageBox.confirm('确认删除事件吗?', '提示', {
-    confirmButtonText: '确定',
-    cancelButtonText: '取消',
-    type: 'info'
-  }).then(() => {
-    deleteEvent({ eventId: eventId.value }).then((res) => {
-      proxy?.$modal.msgSuccess(res.msg);
-      fetchEventDetail();
-    });
-  });
-};
-
 // 上报伤亡情况
 const uploadeCasualties = () => {
-  editCasualtiesDialogState.form.eventId = eventId.value;
+  editCasualtiesDialogState.form.eventId = props.eventId;
   editCasualtiesDialogState.form.deaths = '';
   editCasualtiesDialogState.form.injuries = '';
   editCasualtiesDialogState.form.missing = '';
   editCasualtiesDialogState.show = true;
 };
-
-const eventEditDialogState = reactive({
-  show: false,
-  title: ''
-});
-
 const fetchEventDetail = () => {
   console.log('fetchEventDetail');
-  closeDialogState.show = false;
-  startDialogState.show = false;
-  eventEditDialogState.show = false;
   editCasualtiesDialogState.show = false;
-
-  getEventDetail({ event_id: eventId.value }).then((res) => {
+  getEventDetail({ event_id: props.eventId }).then((res) => {
     detailData.value = res.data;
     eventTrackState = res.data.event_status_tracks;
     eventLevelState.data = res.data.event_level_tracks;
@@ -369,29 +290,17 @@ const fetchEventDetail = () => {
   });
 };
 
-const handleUpdate = () => {
-  console.log('handleUpdate');
-  eventEditDialogState.title = '修改事件';
-  eventEditDialogState.show = true;
-};
-
 onMounted(() => {
-  eventId.value = route.query.event_id as string;
+  // eventId.value = route.query.event_id as string;
   fetchEventDetail();
+  getEventDetail(props.eventId);
+  // });
 });
-interface Props {
-  modelValue: boolean;
-  title?: string;
-  height?: string;
-}
-const props = withDefaults(defineProps<Props>(), {
-  modelValue: false
-});
-const emit = defineEmits(['update:modelValue']);
-
 // 关闭弹窗
 const closeDialog = () => {
-  emit('update:modelValue', false);
+  emits('update:modelValue', false);
+  // detailData.value = { eventId: '' };
+  fetchEventDetail();
 };
 </script>
 
@@ -439,4 +348,12 @@ const closeDialog = () => {
     }
   }
 }
+.dialog-content {
+  background-color: #fff;
+  border-radius: 5px;
+  padding: 20px;
+  max-width: 100%;
+  max-height: 88%;
+  overflow: auto; /* 启用滚动 */
+}
 </style>