Преглед на файлове

修改整改材料的上传

chauncey преди 10 месеца
родител
ревизия
22b8670671

+ 20 - 0
src/router/full-routes.ts

@@ -564,6 +564,26 @@ export const emergencyManagementRoute = {
         title: '应急架构体系',
       },
     },
+    {
+      id: 2003,
+      parentId: 2000,
+      name: 'command-center',
+      path: 'command-center',
+      component: '/emergency/command-center/PageCommandCenter',
+      redirect: '',
+      meta: {
+        activeMenu: null,
+        alwaysShow: false,
+        frameSrc: '',
+        hidden: false,
+        icon: '',
+        isFrame: 0,
+        isRoot: false,
+        noCache: false,
+        query: '',
+        title: '应急指挥中心',
+      },
+    },
   ],
 };
 

+ 3 - 6
src/views/disaster/components/UploadFiles.vue

@@ -6,13 +6,13 @@
         <el-icon><UploadFilled /></el-icon>
         <span>{{ label }}</span>
       </label>
-      <span class="upload-button-support">支持pdf、word、excel文件</span>
+      <span class="upload-button-support">支持pdf、docx、xlsx、pptx文件</span>
     </div>
     <input
       type="file"
       id="fileInput"
       multiple
-      accept=".pdf,.docx,.xls,.xlsx,.ppt,.pptx"
+      accept=".pdf,.docx,.xlsx,.pptx"
       @change="handleFileSelect"
       :disabled="isUploadDisabled"
     />
@@ -49,7 +49,6 @@
   import { ref, computed, nextTick, watch } from 'vue';
   import { UploadFilled, Delete } from '@element-plus/icons-vue';
   import { ElMessage } from 'element-plus';
-  import { msgConfirm } from '@/utils/element-plus/messageBox';
 
   import { FILE_TYPE_ICON } from '../constant';
   import type { FileItem } from '../types';
@@ -126,7 +125,7 @@
 
     filesToProcess.forEach((file) => {
       if (!isValidFileType(file)) {
-        ElMessage.error(`文件${file.name}格式不正确,请上传pdf、word、excel、ppt文件`);
+        ElMessage.error(`文件${file.name}格式不正确,请上传新版本pdf、word、excel、ppt文件`);
         return;
       }
 
@@ -168,9 +167,7 @@
       'application/pdf',
       'application/msword',
       'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
-      'application/vnd.ms-excel',
       'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
-      'application/vnd.ms-powerpoint',
       'application/vnd.openxmlformats-officedocument.presentationml.presentation',
     ];
     return allowedTypes.includes(file.type);

+ 3 - 14
src/views/disaster/disaster-control/PageViewDisposalRectification.vue

@@ -100,23 +100,12 @@
 
   const exportLossDetail = async () => {
     if (!disasterLossDetailList.value) return;
-    let name;
+    const name = disasterLossDetailList.value?.handleTaskName;
     const params = {
       handleTaskId,
+      userIdByLossFix: fixerId,
     };
-    if (viewType === 'task') {
-      name = disasterLossDetailList.value?.handleTaskName;
-      await exportLossRecord(params, name);
-    } else {
-      name = lossRecordListInfo.value?.affectedItems;
-      await exportLossRecord(
-        {
-          ...params,
-          userIdByLossFix: activeReportRecordId.value,
-        },
-        name,
-      );
-    }
+    await exportLossRecord(params, name);
     ElMessage.success(`导出${name}损失明细成功`);
   };
   const activeId = ref<number | null>(null);

+ 84 - 0
src/views/emergency/command-center/PageCommandCenter.vue

@@ -0,0 +1,84 @@
+<template>
+  <div class="command-center-container" ref="commandCenterContainer" :style="rootStyle">
+    <!-- <div class="large-screen-layout" :style="scaleStyle">
+      <header class="command-center__header"> </header>
+    </div> -->
+  </div>
+</template>
+
+<script lang="ts" setup>
+  import { ref, computed, onMounted, onUnmounted, CSSProperties } from 'vue';
+
+  const commandCenterContainer = ref<HTMLDivElement | null>(null);
+
+  const containerWidth = ref(0);
+  const containerHeight = ref(0);
+
+  // 基准尺寸
+  const BASE_WIDTH = 1920;
+  const BASE_HEIGHT = 1080;
+
+  // 更新容器尺寸
+  const updateSize = () => {
+    if (!commandCenterContainer.value) return;
+    containerWidth.value = commandCenterContainer.value.clientWidth;
+    containerHeight.value = commandCenterContainer.value.clientHeight;
+  };
+
+  // 计算缩放比例
+  const scale = computed(() => {
+    return Math.min(containerWidth.value / BASE_WIDTH, containerHeight.value / BASE_HEIGHT);
+  });
+
+  // 根元素样式,包含CSS变量
+  const rootStyle = computed((): CSSProperties => {
+    return {
+      '--base-width': `${BASE_WIDTH}px`,
+      '--base-height': `${BASE_HEIGHT}px`,
+    };
+  });
+
+  const scaleStyle = computed((): CSSProperties => {
+    return {
+      position: 'absolute',
+      left: '50%',
+      top: '50%',
+      transform: `translate(-50%, -50%) scale(${scale.value})`,
+    };
+  });
+
+  onMounted(() => {
+    updateSize();
+    window.addEventListener('resize', updateSize);
+  });
+
+  onUnmounted(() => {
+    window.removeEventListener('resize', updateSize);
+  });
+</script>
+
+<style lang="scss" scoped>
+  $base-width: var(--base-width);
+  $base-height: var(--base-height);
+
+  .command-center-container {
+    position: absolute;
+    left: 0;
+    top: 0;
+    width: 100vw;
+    height: 100vh;
+    background-color: #d8e3f4;
+    z-index: 9999;
+    overflow: hidden;
+  }
+  .large-screen-layout {
+    width: $base-width;
+    height: $base-height;
+    background: url('@/assets/images/exception/stay-tune.png') no-repeat center center;
+  }
+  .command-center__header {
+    width: 100%;
+    height: 49px;
+    background: url('assets/images/home/nav-bg@1X.png') no-repeat center center / cover;
+  }
+</style>