Forráskód Böngészése

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	src/types/components.d.ts
yangyuxuan 2 hónapja
szülő
commit
fb6e5b34f9

+ 1 - 1
.env.production

@@ -33,4 +33,4 @@ VITE_APP_CLIENT_ID = 'e5cd7e4891bf95d1d19206ce24a7b32e'
 
 # websocket 开关
 VITE_APP_WEBSOCKET = false
-VITE_APP_BASE_WEBSOCKET= 'ws://10.181.7.236:9988'
+VITE_APP_BASE_WEBSOCKET= 'wss://yjzp.mmsyjj.cn:8086'

+ 0 - 168
src/components/ChunkUpload/index.vue

@@ -1,168 +0,0 @@
-<template>
-  <div class="chunk-upload">
-    <el-button type="primary" @click="handleClick" :disabled="uploading">
-      {{ uploading ? '上传中...' : '选择并上传文件' }}
-    </el-button>
-    <div v-for="(progress, index) in uploadProgressList" :key="index" class="progress-item">
-      <p>File {{ index + 1 }}: {{ progress.fileName }}</p>
-      <el-progress :percentage="progress.percentage"></el-progress>
-    </div>
-    <input type="file" ref="fileInput" @change="handleFileChange" style="display: none;" multiple />
-  </div>
-</template>
-
-<script lang="ts">
-import { defineComponent, ref } from "vue";
-import { ElMessage } from "element-plus";
-import axios from "axios";
-import { v1 as uuidv1 } from "uuid";
-
-axios.defaults.baseURL = "http://10.181.7.236:9988";
-
-
-export default defineComponent({
-  name: "ChunkUpload",
-  props: {
-    maxFileSize: {
-      type: Number,
-      default: 10 * 1024 * 1024, // 默认10MB
-    },
-    maxFiles: {
-      type: Number,
-      default: 3, // 默认最大上传3个文件
-    },
-  },
-  setup(props) {
-    const fileInput = ref<HTMLInputElement | null>(null);
-    const uploading = ref(false);
-    const uploadedFileNames = ref<string[]>([]);
-    const uploadProgressList = ref<{ fileName: string; percentage: number }[]>([]);
-    const CHUNK_SIZE = 1 * 1024 * 1024; // 每个分片的大小为 1MB
-
-    const handleClick = () => {
-      fileInput.value?.click();
-    };
-
-    const handleFileChange = async (event: Event) => {
-      const files = (event.target as HTMLInputElement).files;
-      if (!files || files.length === 0) {
-        return;
-      }
-
-      // 检查文件数量
-      if (files.length > props.maxFiles) {
-        ElMessage.error(`最多只能上传 ${props.maxFiles} 个文件`);
-        return;
-      }
-
-      uploading.value = true;
-      uploadProgressList.value = Array.from(files).map(file => ({
-        fileName: file.name,
-        percentage: 0,
-      }));
-
-      try {
-        for (let i = 0; i < files.length; i++) {
-          const file = files[i];
-          if (file.size > props.maxFileSize) {
-            ElMessage.error(`文件 ${file.name} 大小不能超过 ${props.maxFileSize / (1024 * 1024)} MB`);
-            continue; // 跳过这个文件继续上传下一个
-          }
-
-          const totalChunks = Math.ceil(file.size / CHUNK_SIZE);
-          const fileIdentifier = await generateFileIdentifier();
-
-          for (let chunkIndex = 0; chunkIndex < totalChunks; chunkIndex++) {
-            const start = chunkIndex * CHUNK_SIZE;
-            const chunk = file.slice(start, start + CHUNK_SIZE);
-            await uploadChunk(chunk, chunkIndex, totalChunks, fileIdentifier);
-            uploadProgressList.value[i].percentage = Math.round(((chunkIndex + 1) / totalChunks) * 100);
-          }
-
-          // 文件分片上传完成后,调用合并接口
-          const uuidFilename = await mergeChunks(fileIdentifier, file.name);
-          uploadedFileNames.value.push(uuidFilename); // 保存上传成功的文件名
-        }
-
-        ElMessage.success("文件上传完成!");
-      } catch (error) {
-        ElMessage.error("文件上传失败!");
-        console.error("Upload error:", error);
-      } finally {
-        uploading.value = false;
-      }
-    };
-
-    const uploadChunk = async (
-      chunk: Blob,
-      chunkNumber: number,
-      totalChunks: number,
-      fileIdentifier: string
-    ) => {
-      const formData = new FormData();
-      formData.append("file", chunk);
-
-      try {
-        await axios.post(`/file/upload/uploadfile`, formData, {
-          params: {
-            chunknumber: chunkNumber,
-            identifier: fileIdentifier,
-          },
-          headers: {
-            "Content-Type": "multipart/form-data",
-          },
-        });
-      } catch (error) {
-        throw new Error(`上传分片 ${chunkNumber} 失败`);
-      }
-    };
-
-    // 合并文件分片
-    const mergeChunks = async (identifier: string, filename: string) => {
-      try {
-        const response = await axios.post("/file/upload/mergefile", null, {
-          params: {
-            identifier: identifier,
-            filename: filename,
-            chunkstar: 0,  // 假设所有分片的开始序号为0
-          },
-        });
-
-        if (response.status !== 200) {
-          throw new Error("文件合并失败");
-        }
-        return response.data.uuidFilename;
-      } catch (error) {
-        throw new Error("合并请求失败");
-      }
-    };
-
-    const generateFileIdentifier = async (): Promise<string> => {
-      return uuidv1();  // 生成一个固定的 UUID1
-    };
-
-    // 获取已上传的文件名
-    const getUploadedFileNames = () => {
-      return uploadedFileNames.value;
-    };
-
-    return {
-      fileInput,
-      uploading,
-      uploadProgressList,
-      handleClick,
-      handleFileChange,
-      getUploadedFileNames,
-    };
-  },
-});
-</script>
-
-<style scoped>
-.chunk-upload {
-  padding: 20px;
-}
-.progress-item {
-  margin-top: 10px;
-}
-</style>

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

@@ -27,6 +27,9 @@ declare module 'vue' {
     ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
     ElBadge: typeof import('element-plus/es')['ElBadge']
     ElButton: typeof import('element-plus/es')['ElButton']
+    ElCard: typeof import('element-plus/es')['ElCard']
+    ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
+    ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
     ElCol: typeof import('element-plus/es')['ElCol']
     ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
@@ -43,23 +46,30 @@ declare module 'vue' {
     ElIcon: typeof import('element-plus/es')['ElIcon']
     ElImage: typeof import('element-plus/es')['ElImage']
     ElInput: typeof import('element-plus/es')['ElInput']
+    ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
     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']
     ElPopover: typeof import('element-plus/es')['ElPopover']
+    ElRadio: typeof import('element-plus/es')['ElRadio']
+    ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
     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']
     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']
     ElTag: typeof import('element-plus/es')['ElTag']
     ElText: typeof import('element-plus/es')['ElText']
+    ElTimeline: typeof import('element-plus/es')['ElTimeline']
+    ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
     ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
     ElTooltip: typeof import('element-plus/es')['ElTooltip']
     ElTree: typeof import('element-plus/es')['ElTree']
+    ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
     ElUpload: typeof import('element-plus/es')['ElUpload']
     ExcelEditor: typeof import('./../components/ExcelEditor/index.vue')['default']
     FileUpload: typeof import('./../components/FileUpload/index.vue')['default']
@@ -72,6 +82,8 @@ declare module 'vue' {
     HikvisionPlayer: typeof import('./../components/HKVideo/hikvision-player.vue')['default']
     HKVideo: typeof import('./../components/HKVideo/index.vue')['default']
     IconSelect: typeof import('./../components/IconSelect/index.vue')['default']
+    IEpCaretBottom: typeof import('~icons/ep/caret-bottom')['default']
+    IEpCaretTop: typeof import('~icons/ep/caret-top')['default']
     IFrame: typeof import('./../components/iFrame/index.vue')['default']
     ImagePreview: typeof import('./../components/ImagePreview/index.vue')['default']
     ImageUpload: typeof import('./../components/ImageUpload/index.vue')['default']

+ 1 - 58
src/views/dataFilling/dossierDetail.vue

@@ -174,64 +174,7 @@ const hotSettings = reactive({
   licenseKey: 'non-commercial-and-evaluation', // 隐藏版权文字
   colWidths: 129, // 默认单元格宽度
   rowHeights: 28, // 默认单元格高度
-  wordWrap: true, // 单元格文字是否换行展示
-  contextMenu: {
-    // 自定义右键菜单
-    items: {
-      'row_above': {
-        name: '向上插一行'
-      },
-      'row_below': {
-        name: '向下插一行'
-      },
-      'col_left': {
-        name: '向左插一列'
-      },
-      'col_right': {
-        name: '向右插一列'
-      },
-      'hsep1': '---------', // 分隔线
-      'remove_row': {
-        name: '删除当前行'
-      },
-      'remove_col': {
-        name: '删除当前列'
-      },
-      'clear_column': {
-        name: '清空当前列'
-      },
-      'hsep2': '---------', // 必须和上次的变量名不一样
-      'undo': {
-        name: '撤销'
-      },
-      'cut': {
-        name: '剪切'
-      },
-      'copy': {
-        name: '复制'
-      },
-      // 'alignment': {
-      //   name: '对齐'
-      // },
-      // 'hsep3': '---------',
-      // 'commentsAddEdit': {
-      //   // 必须开启 comments: true
-      //   name: '添加备注'
-      // },
-      // 'commentsRemove': {
-      //   // 必须开启 comments: true
-      //   name: '删除备注'
-      // },
-      // 'freeze_column': {
-      //   // 必须开启 manualColumnFreeze: true
-      //   name: '固定列'
-      // },
-      // 'unfreeze_column': {
-      //   // 必须开启 manualColumnFreeze: true
-      //   name: '取消固定列'
-      // }
-    }
-  }
+  wordWrap: true // 单元格文字是否换行展示
 });
 </script>
 

+ 10 - 2
src/views/dataFilling/tableDetails.vue

@@ -136,7 +136,6 @@
 <script setup lang="ts">
 import * as XLSX from 'xlsx';
 import { fillingAdd, fillingChange, fillingList, fillingRelease } from '@/api/dataFilling/fillingManage';
-import { useRouter } from 'vue-router';
 import { HotTable } from '@handsontable/vue3';
 import { getPhoneList } from '@/api/informationissue/informationissue';
 import informantSelect from './informantSelect.vue';
@@ -210,6 +209,9 @@ const fetchReportDetails = (reportId) => {
   return fillingList(reportId).then((res: any) => {
     reportInfo.value = res.report_info;
     hotSettings.readOnly = reportInfo.value.issued_status === 2;
+    if (reportInfo.value.issued_status === 2) {
+      hotSettings.contextMenu = false;
+    }
     reportInfo.value.user_filling_status = res.report_info.user_filling_status;
     personNum.value = reportInfo.value.user_ids.length; //统计需要填报的总人数
     let headers = [];
@@ -221,7 +223,6 @@ const fetchReportDetails = (reportId) => {
     const result = res.table_data.map(row =>
       headers.map(header => row[header])
     );
-    debugger
     hotData.value = result;
     nextTick(() => {
       showTable.value = true;
@@ -503,6 +504,13 @@ const handleDialogClose = () => {
   color: #67c23a;
   font-weight: bold;
 }
+.app-container {
+  :deep(.custom-disabled) {
+    .el-input__wrapper {
+      background-color: #ffffff !important;
+    }
+  }
+}
 .custom-disabled {
   :deep(.el-input.is-disabled) {
     .el-input__wrapper {

+ 7 - 2
src/views/globalMap/RightMenu/SpatialAnalysis.vue

@@ -233,7 +233,12 @@ const exportData = () => {
 }
 .export-btn {
   position: absolute;
-  right: 20px;
-  top: 55px;
+  right: 18px;
+  top: 20px;
+}
+.common-table {
+  height: 680px;
+  overflow-y: auto;
+  margin-top: 10px;
 }
 </style>

+ 1 - 1
src/views/knowledge/knowledgeAnalysis/index.vue

@@ -72,7 +72,7 @@
           <div class="data-list">
             <div v-for="(item, index) in dataList" :key="index" class="data-list-item">
               <i :class="getIconClass(index)" />
-              <div class="td1">{{ item.reportName }}</div>
+              <div class="td1" :title="item.reportName">{{ item.reportName }}</div>
               <div class="td2">来源单位:{{ item.publishingUnit }}</div>
               <div class="td3">
                 <i class="icon-eye" />