zhangwencui
2026-05-18 62ab1e616510d3444c12f2130448043ccfb12e2a
巡检功能问题修改
已修改1个文件
457 ■■■■■ 文件已修改
src/pages/inspectionUpload/upload.vue 457 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/inspectionUpload/upload.vue
@@ -1,12 +1,13 @@
<template>
  <view class="inspection-upload-page">
    <!-- 页面头部 -->
    <PageHeader title="上传巡检记录" @back="goBack" />
    <PageHeader title="上传巡检记录"
                @back="goBack" />
    <!-- 页面内容 -->
    <view class="upload-content">
      <!-- 任务信息卡片 -->
      <view class="task-info-card" v-if="taskInfo">
      <view class="task-info-card"
            v-if="taskInfo">
        <view class="task-info-header">
          <text class="task-name">{{ taskInfo.taskName }}</text>
        </view>
@@ -25,114 +26,115 @@
          </view>
        </view>
      </view>
      <!-- 异常状态选择 -->
      <view class="section-card">
        <view class="section-title">巡检状态</view>
        <view class="exception-options">
          <view
            class="exception-option"
          <view class="exception-option"
            :class="{ active: hasException === false }"
            @click="setExceptionStatus(false)"
          >
            <u-icon name="checkmark-circle" size="20" color="#52c41a"></u-icon>
                @click="setExceptionStatus(false)">
            <u-icon name="checkmark-circle"
                    size="20"
                    color="#52c41a"></u-icon>
            <text class="option-text">正常</text>
          </view>
          <view
            class="exception-option"
          <view class="exception-option"
            :class="{ active: hasException === true }"
            @click="setExceptionStatus(true)"
          >
            <u-icon name="close-circle" size="20" color="#ff4d4f"></u-icon>
                @click="setExceptionStatus(true)">
            <u-icon name="close-circle"
                    size="20"
                    color="#ff4d4f"></u-icon>
            <text class="option-text">存在异常</text>
          </view>
        </view>
      </view>
      <!-- 异常描述(仅在异常时显示) -->
      <view class="section-card" v-if="hasException === true">
      <view class="section-card"
            v-if="hasException === true">
        <view class="section-title">异常描述</view>
        <textarea
          v-model="abnormalDescription"
        <textarea v-model="abnormalDescription"
          class="exception-textarea"
          maxlength="500"
          placeholder="请描述异常情况..."
        />
                  placeholder="请描述异常情况..." />
      </view>
      <!-- 分类标签页(仅在异常时显示) -->
      <view class="section-card" v-if="hasException === true">
      <view class="section-card"
            v-if="hasException === true">
        <view class="upload-tabs">
          <view
            class="tab-item"
          <view class="tab-item"
            :class="{ active: currentUploadType === 'before' }"
            @click="switchUploadType('before')"
          >
                @click="switchUploadType('before')">
            生产前
          </view>
          <view
            class="tab-item"
          <view class="tab-item"
            :class="{ active: currentUploadType === 'after' }"
            @click="switchUploadType('after')"
          >
                @click="switchUploadType('after')">
            生产中
          </view>
          <view
            class="tab-item"
          <view class="tab-item"
            :class="{ active: currentUploadType === 'issue' }"
            @click="switchUploadType('issue')"
          >
                @click="switchUploadType('issue')">
            生产后
          </view>
        </view>
        <!-- 当前分类的上传区域 -->
        <view class="upload-area">
          <view class="upload-buttons">
            <u-button
              type="primary"
            <u-button type="primary"
              @click="chooseMedia('image')"
              :loading="uploading"
              :disabled="getCurrentFiles().length >= uploadConfig.limit"
              :customStyle="{ marginRight: '10px', flex: 1 }"
            >
              <u-icon name="camera" size="18" color="#fff" style="margin-right: 5px"></u-icon>
                      :customStyle="{ marginRight: '10px', flex: 1 }">
              <u-icon name="camera"
                      size="18"
                      color="#fff"
                      style="margin-right: 5px"></u-icon>
              {{ uploading ? '上传中...' : '拍照' }}
            </u-button>
            <u-button
              type="success"
            <u-button type="success"
              @click="chooseMedia('video')"
              :loading="uploading"
              :disabled="getCurrentFiles().length >= uploadConfig.limit"
              :customStyle="{ flex: 1 }"
            >
              <uni-icons type="videocam" size="18" color="#fff" style="margin-right: 5px"></uni-icons>
                      :customStyle="{ flex: 1 }">
              <uni-icons type="videocam"
                         size="18"
                         color="#fff"
                         style="margin-right: 5px"></uni-icons>
              {{ uploading ? '上传中...' : '拍视频' }}
            </u-button>
          </view>
          <!-- 上传进度 -->
          <view v-if="uploading" class="upload-progress">
            <u-line-progress :percentage="uploadProgress" :showText="true" activeColor="#409eff"></u-line-progress>
          <view v-if="uploading"
                class="upload-progress">
            <u-line-progress :percentage="uploadProgress"
                             :showText="true"
                             activeColor="#409eff"></u-line-progress>
          </view>
          <!-- 当前分类的文件列表 -->
          <view v-if="getCurrentFiles().length > 0" class="file-list">
            <view v-for="(file, index) in getCurrentFiles()" :key="index" class="file-item">
          <view v-if="getCurrentFiles().length > 0"
                class="file-list">
            <view v-for="(file, index) in getCurrentFiles()"
                  :key="index"
                  class="file-item">
              <view class="file-preview-container">
                <image
                  v-if="file.type === 'image' || (file.type !== 'video' && !file.type)"
                <image v-if="file.type === 'image' || (file.type !== 'video' && !file.type)"
                  :src="file.url || file.tempFilePath || file.path || file.downloadUrl"
                  class="file-preview"
                  mode="aspectFill"
                />
                <view v-else-if="file.type === 'video'" class="video-preview">
                  <uni-icons type="videocam" size="18" color="#fff" style="margin-right: 5px"></uni-icons>
                       mode="aspectFill" />
                <view v-else-if="file.type === 'video'"
                      class="video-preview">
                  <uni-icons type="videocam"
                             size="18"
                             color="#fff"
                             style="margin-right: 5px"></uni-icons>
                  <text class="video-text">视频</text>
                </view>
                <!-- 删除按钮 -->
                <view class="delete-btn" @click="removeFile(index)">
                  <u-icon name="close" size="12" color="#fff"></u-icon>
                <view class="delete-btn"
                      @click="removeFile(index)">
                  <u-icon name="close"
                          size="12"
                          color="#fff"></u-icon>
                </view>
              </view>
              <view class="file-info">
@@ -141,12 +143,11 @@
              </view>
            </view>
          </view>
          <view v-if="getCurrentFiles().length === 0" class="empty-state">
          <view v-if="getCurrentFiles().length === 0"
                class="empty-state">
            <text>请选择要上传的{{ getUploadTypeText() }}图片或视频</text>
          </view>
        </view>
        <!-- 统计信息 -->
        <view class="upload-summary">
          <text class="summary-text">
@@ -156,32 +157,38 @@
          </text>
        </view>
      </view>
      <!-- 正常状态提示 -->
      <view class="normal-tip-card" v-if="hasException === false">
        <u-icon name="info-circle" size="60" color="#52c41a"></u-icon>
      <view class="normal-tip-card"
            v-if="hasException === false">
        <u-icon name="info-circle"
                size="60"
                color="#52c41a"></u-icon>
        <text class="tip-text">设备运行正常,无需上传照片</text>
      </view>
    </view>
    <!-- 底部按钮 -->
    <view class="footer-buttons">
      <u-button @click="goBack" :customStyle="{ marginRight: '10px' }">取消</u-button>
      <u-button v-if="hasException === true" type="warning" @click="goToRepair" :customStyle="{ marginRight: '10px' }">
      <u-button @click="goBack"
                :customStyle="{ marginRight: '10px' }">取消</u-button>
      <u-button v-if="hasException === true"
                type="warning"
                @click="goToRepair"
                :customStyle="{ marginRight: '10px' }">
        新增报修
      </u-button>
      <u-button type="primary" @click="submitUpload">提交</u-button>
      <u-button type="primary"
                @click="submitUpload">提交</u-button>
    </view>
  </view>
</template>
<script setup>
import { ref, computed, onMounted } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import PageHeader from '@/components/PageHeader.vue';
import { uploadInspectionTask } from '@/api/inspectionManagement';
import { getToken } from '@/utils/auth';
import config from '@/config';
  import { ref, computed, onMounted } from "vue";
  import { onLoad } from "@dcloudio/uni-app";
  import PageHeader from "@/components/PageHeader.vue";
  import { uploadInspectionTask } from "@/api/inspectionManagement";
  import { getToken } from "@/utils/auth";
  import config from "@/config";
// 任务信息
const taskInfo = ref(null);
@@ -196,19 +203,19 @@
const issueModelValue = ref([]); // 生产后
// 当前激活的上传类型
const currentUploadType = ref('before'); // 'before', 'after', 'issue'
  const currentUploadType = ref("before"); // 'before', 'after', 'issue'
// 异常状态
const hasException = ref(null); // null: 未选择, true: 存在异常, false: 正常
// 异常描述
const abnormalDescription = ref('');
  const abnormalDescription = ref("");
// 上传配置
const uploadConfig = {
  action: '/file/upload',
    action: "/common/upload",
  limit: 10,
  fileSize: 50, // MB
  fileType: ['jpg', 'jpeg', 'png', 'mp4', 'mov'],
    fileType: ["jpg", "jpeg", "png", "mp4", "mov"],
  maxVideoDuration: 60, // 秒
};
@@ -219,12 +226,83 @@
});
// 页面加载
onLoad((options) => {
  onLoad(options => {
  if (options.taskInfo) {
    try {
      taskInfo.value = JSON.parse(decodeURIComponent(options.taskInfo));
        const info = JSON.parse(decodeURIComponent(options.taskInfo));
        taskInfo.value = info;
        // 回显逻辑:从 taskInfo 中恢复已上传的文件
        const mapFiles = list => {
          if (!list || !Array.isArray(list)) return [];
          return list.map(item => {
            // 处理 URL,去除可能的空格
            const finalUrl = (item.url || item.previewURL || "").trim();
            // 自动推断文件类型
            let fileType = item.type;
            if (!fileType && item.contentType) {
              fileType = item.contentType.startsWith("video") ? "video" : "image";
            } else if (!fileType) {
              fileType = "image"; // 默认图片
            }
            return {
              ...item,
              url: finalUrl,
              name: item.name || item.originalFilename,
              tempId: item.tempId || item.id || item.tempFileId,
              size: item.size || item.byteSize || 0, // 映射大小字段
              type: fileType,
              status: "success",
            };
          });
        };
        // 根据用户要求映射:AfterDTO(生产前), DTO(生产中), BeforeDTO(生产后)
        if (
          info.commonFileListAfterVO &&
          Array.isArray(info.commonFileListAfterVO)
        ) {
          beforeModelValue.value = mapFiles(info.commonFileListAfterVO);
        }
        console.log(beforeModelValue.value, "beforeModelValue");
        if (info.commonFileListVO && Array.isArray(info.commonFileListVO)) {
          afterModelValue.value = mapFiles(info.commonFileListVO);
        }
        if (
          info.commonFileListBeforeVO &&
          Array.isArray(info.commonFileListBeforeVO)
        ) {
          issueModelValue.value = mapFiles(info.commonFileListBeforeVO);
        }
        // 如果有异常描述,也恢复
        if (info.abnormalDescription) {
          abnormalDescription.value = info.abnormalDescription;
        }
        // 如果有异常状态,也恢复
        if (info.hasException !== undefined && info.hasException !== null) {
          hasException.value = info.hasException;
        } else if (
          info.inspectionResult !== undefined &&
          info.inspectionResult !== null
        ) {
          // 0-异常,1-正常
          hasException.value = String(info.inspectionResult) === "0";
        }
        // 自动兜底:如果存在已上传文件,则必然是异常状态,确保 UI 正常显示
        if (
          !hasException.value &&
          (beforeModelValue.value.length > 0 ||
            afterModelValue.value.length > 0 ||
            issueModelValue.value.length > 0)
        ) {
          hasException.value = true;
        }
    } catch (e) {
      console.error('解析任务信息失败:', e);
        console.error("解析任务信息失败:", e);
    }
  }
});
@@ -235,18 +313,18 @@
};
// 切换上传类型
const switchUploadType = (type) => {
  const switchUploadType = type => {
  currentUploadType.value = type;
};
// 获取当前分类的文件列表
const getCurrentFiles = () => {
  switch (currentUploadType.value) {
    case 'before':
      case "before":
      return beforeModelValue.value || [];
    case 'after':
      case "after":
      return afterModelValue.value || [];
    case 'issue':
      case "issue":
      return issueModelValue.value || [];
    default:
      return [];
@@ -256,19 +334,19 @@
// 获取上传类型文本
const getUploadTypeText = () => {
  switch (currentUploadType.value) {
    case 'before':
      return '生产前';
    case 'after':
      return '生产中';
    case 'issue':
      return '生产后';
      case "before":
        return "生产前";
      case "after":
        return "生产中";
      case "issue":
        return "生产后";
    default:
      return '';
        return "";
  }
};
// 设置异常状态
const setExceptionStatus = (status) => {
  const setExceptionStatus = status => {
  hasException.value = status;
};
@@ -280,6 +358,11 @@
      taskName: taskInfo.value?.taskName,
      inspectionLocation: taskInfo.value?.inspectionLocation,
      inspector: taskInfo.value?.inspector,
        hasException: hasException.value,
        inspectionResult: hasException.value ? 0 : 1, // 0-异常,1-正常
        commonFileListAfterDTO: beforeModelValue.value,
        commonFileListDTO: afterModelValue.value,
        commonFileListBeforeDTO: issueModelValue.value,
      uploadedFiles: {
        before: beforeModelValue.value,
        after: afterModelValue.value,
@@ -287,16 +370,16 @@
      },
    };
    uni.setStorageSync('repairTaskInfo', JSON.stringify(taskData));
      uni.setStorageSync("repairTaskInfo", JSON.stringify(taskData));
    uni.navigateTo({
      url: '/pages/equipmentManagement/repair/add',
        url: "/pages/equipmentManagement/repair/add",
    });
  } catch (error) {
    console.error('跳转报修页面失败:', error);
      console.error("跳转报修页面失败:", error);
    uni.showToast({
      title: '跳转失败,请重试',
      icon: 'error',
        title: "跳转失败,请重试",
        icon: "error",
    });
  }
};
@@ -307,27 +390,30 @@
    // 检查是否选择了异常状态
    if (hasException.value === null) {
      uni.showToast({
        title: '请选择巡检状态',
        icon: 'none',
          title: "请选择巡检状态",
          icon: "none",
      });
      return;
    }
    // 如果是异常状态,检查是否有上传文件和描述
    if (hasException.value === true) {
      const totalFiles = beforeModelValue.value.length + afterModelValue.value.length + issueModelValue.value.length;
        const totalFiles =
          beforeModelValue.value.length +
          afterModelValue.value.length +
          issueModelValue.value.length;
      if (totalFiles === 0) {
        uni.showToast({
          title: '请上传异常照片',
          icon: 'none',
            title: "请上传异常照片",
            icon: "none",
        });
        return;
      }
      // 检查是否填写了异常描述
      if (!abnormalDescription.value.trim()) {
        uni.showToast({
          title: '请填写异常描述',
          icon: 'none',
            title: "请填写异常描述",
            icon: "none",
        });
        return;
      }
@@ -335,35 +421,33 @@
    // 显示提交中的加载提示
    uni.showLoading({
      title: '提交中...',
        title: "提交中...",
      mask: true,
    });
    // 按照逻辑合并所有分类的文件
    let arr = [];
    if (beforeModelValue.value.length > 0) {
      arr.push(...beforeModelValue.value);
    }
    if (afterModelValue.value.length > 0) {
      arr.push(...afterModelValue.value);
    }
    if (issueModelValue.value.length > 0) {
      arr.push(...issueModelValue.value);
    }
      // 按照逻辑合并所有分类的文件用于提取ID
      const allFiles = [
        ...beforeModelValue.value,
        ...afterModelValue.value,
        ...issueModelValue.value,
      ];
    // 传给后端的临时文件ID列表
    let tempFileIds = [];
    if (arr !== null && arr.length > 0) {
      tempFileIds = arr
        .map((item) => item?.tempId ?? item?.tempFileId ?? item?.id)
        .filter((v) => v !== undefined && v !== null && v !== '');
      if (allFiles.length > 0) {
        tempFileIds = allFiles
          .map(item => item?.tempId ?? item?.tempFileId ?? item?.id)
          .filter(v => v !== undefined && v !== null && v !== "");
    }
    // 提交数据
    const submitData = {
      ...taskInfo.value,
      storageBlobDTO: arr,
        commonFileListAfterDTO: beforeModelValue.value, // 生产前
        commonFileListDTO: afterModelValue.value, // 生产中
        commonFileListBeforeDTO: issueModelValue.value, // 生产后
      hasException: hasException.value,
        inspectionResult: hasException.value ? 0 : 1, // 0-异常,1-正常
      abnormalDescription: abnormalDescription.value,
      tempFileIds: tempFileIds,
    };
@@ -374,8 +458,8 @@
    if (result && (result.code === 200 || result.success)) {
      uni.hideLoading();
      uni.showToast({
        title: '提交成功',
        icon: 'success',
          title: "提交成功",
          icon: "success",
      });
      // 返回列表页并刷新
@@ -385,24 +469,24 @@
    } else {
      uni.hideLoading();
      uni.showToast({
        title: result?.msg || result?.message || '提交失败',
        icon: 'error',
          title: result?.msg || result?.message || "提交失败",
          icon: "error",
      });
    }
  } catch (error) {
    console.error('提交上传失败:', error);
      console.error("提交上传失败:", error);
    uni.hideLoading();
    uni.showToast({
      title: error?.message || '提交失败',
      icon: 'error',
        title: error?.message || "提交失败",
        icon: "error",
    });
  }
};
// 格式化文件大小
const formatFileSize = (size) => {
  if (!size) return '0 B';
  const units = ['B', 'KB', 'MB', 'GB'];
  const formatFileSize = size => {
    if (!size) return "0 B";
    const units = ["B", "KB", "MB", "GB"];
  let index = 0;
  let fileSize = size;
  while (fileSize >= 1024 && index < units.length - 1) {
@@ -413,11 +497,11 @@
};
// 拍照/拍视频
const chooseMedia = (type) => {
  const chooseMedia = type => {
  if (getCurrentFiles().length >= uploadConfig.limit) {
    uni.showToast({
      title: `最多只能选择${uploadConfig.limit}个文件`,
      icon: 'none',
        icon: "none",
    });
    return;
  }
@@ -425,21 +509,21 @@
  const remaining = uploadConfig.limit - getCurrentFiles().length;
  // 优先使用 chooseMedia
  if (typeof uni.chooseMedia === 'function') {
    if (typeof uni.chooseMedia === "function") {
    uni.chooseMedia({
      count: Math.min(remaining, 1),
      mediaType: [type || 'image'],
      sizeType: ['compressed', 'original'],
      sourceType: ['camera'],
      success: (res) => {
        mediaType: [type || "image"],
        sizeType: ["compressed", "original"],
        sourceType: ["camera"],
        success: res => {
        try {
          const files = res?.tempFiles || [];
          if (!files.length) throw new Error('未获取到文件');
            if (!files.length) throw new Error("未获取到文件");
          files.forEach((tf, idx) => {
            const filePath = tf.tempFilePath || tf.path || '';
            const fileType = tf.fileType || type || 'image';
            const ext = fileType === 'video' ? 'mp4' : 'jpg';
              const filePath = tf.tempFilePath || tf.path || "";
              const fileType = tf.fileType || type || "image";
              const ext = fileType === "video" ? "mp4" : "jpg";
            const file = {
              tempFilePath: filePath,
              path: filePath,
@@ -452,24 +536,24 @@
            uploadFile(file);
          });
        } catch (err) {
          uni.showToast({ title: err.message || '处理文件失败', icon: 'none' });
            uni.showToast({ title: err.message || "处理文件失败", icon: "none" });
        }
      },
      fail: (err) => {
        console.error('选择媒体失败:', err);
        uni.showToast({ title: '选择失败', icon: 'none' });
        fail: err => {
          console.error("选择媒体失败:", err);
          uni.showToast({ title: "选择失败", icon: "none" });
      },
    });
  } else {
    // 降级方案
    if (type === 'video') {
      if (type === "video") {
      uni.chooseVideo({
        sourceType: ['camera'],
        success: (res) => {
          sourceType: ["camera"],
          success: res => {
          const file = {
            tempFilePath: res.tempFilePath,
            path: res.tempFilePath,
            type: 'video',
              type: "video",
            name: `video_${Date.now()}.mp4`,
            size: res.size || 0,
            duration: res.duration || 0,
@@ -478,22 +562,22 @@
          uploadFile(file);
        },
        fail: () => {
          uni.showToast({ title: '选择视频失败', icon: 'none' });
            uni.showToast({ title: "选择视频失败", icon: "none" });
        },
      });
    } else {
      uni.chooseImage({
        count: Math.min(remaining, 9),
        sizeType: ['compressed'],
        sourceType: ['camera'],
        success: (res) => {
          sizeType: ["compressed"],
          sourceType: ["camera"],
          success: res => {
          const list = res.tempFilePaths || res.tempFiles || [];
          list.forEach((src, idx) => {
            const path = typeof src === 'string' ? src : src.path;
              const path = typeof src === "string" ? src : src.path;
            const file = {
              tempFilePath: path,
              path: path,
              type: 'image',
                type: "image",
              name: `image_${Date.now()}_${idx}.jpg`,
              size: 0,
              createTime: Date.now(),
@@ -502,7 +586,7 @@
          });
        },
        fail: () => {
          uni.showToast({ title: '选择图片失败', icon: 'none' });
            uni.showToast({ title: "选择图片失败", icon: "none" });
        },
      });
    }
@@ -510,10 +594,10 @@
};
// 上传单个文件
const uploadFile = (file) => {
  const uploadFile = file => {
  const token = getToken();
  if (!token) {
    uni.showToast({ title: '用户未登录', icon: 'none' });
      uni.showToast({ title: "用户未登录", icon: "none" });
    return;
  }
@@ -523,44 +607,57 @@
  const uploadTask = uni.uploadFile({
    url: uploadFileUrl.value,
    filePath: file.tempFilePath,
    name: 'file',
      name: "files",
    header: {
      Authorization: `Bearer ${token}`,
    },
    formData: {
      type: getTabType(),
    },
    success: (res) => {
      success: res => {
      try {
        const data = JSON.parse(res.data);
        if (data.code === 200) {
            // 兼容 CommonUpload.vue 的处理逻辑
            const resultData = Array.isArray(data.data)
              ? data.data[0]
              : data.data;
            // 处理 url 和 name 赋值
            const finalUrl = resultData.url || resultData.previewURL;
            const finalName = resultData.name || resultData.originalFilename;
            const finalId =
              resultData.tempId || resultData.id || resultData.tempFileId;
          const uploadedFile = {
            ...file,
            url: data.data.url,
            tempId: data.data.tempId || data.data.id,
            status: 'success',
              ...resultData, // 包含后端返回的所有字段
              url: finalUrl,
              name: finalName,
              tempId: finalId,
              status: "success",
          };
          // 根据当前类型添加到对应数组
          if (currentUploadType.value === 'before') {
            if (currentUploadType.value === "before") {
            beforeModelValue.value.push(uploadedFile);
          } else if (currentUploadType.value === 'after') {
            } else if (currentUploadType.value === "after") {
            afterModelValue.value.push(uploadedFile);
          } else if (currentUploadType.value === 'issue') {
            } else if (currentUploadType.value === "issue") {
            issueModelValue.value.push(uploadedFile);
          }
          uni.showToast({ title: '上传成功', icon: 'success' });
            uni.showToast({ title: "上传成功", icon: "success" });
        } else {
          uni.showToast({ title: data.msg || '上传失败', icon: 'none' });
            uni.showToast({ title: data.msg || "上传失败", icon: "none" });
        }
      } catch (e) {
        uni.showToast({ title: '解析响应失败', icon: 'none' });
          uni.showToast({ title: "解析响应失败", icon: "none" });
      }
    },
    fail: (err) => {
      console.error('上传失败:', err);
      uni.showToast({ title: '上传失败', icon: 'none' });
      fail: err => {
        console.error("上传失败:", err);
        uni.showToast({ title: "上传失败", icon: "none" });
    },
    complete: () => {
      uploading.value = false;
@@ -568,7 +665,7 @@
  });
  // 监听上传进度
  uploadTask.onProgressUpdate((res) => {
    uploadTask.onProgressUpdate(res => {
    uploadProgress.value = res.progress;
  });
};
@@ -576,11 +673,11 @@
// 获取type值
const getTabType = () => {
  switch (currentUploadType.value) {
    case 'before':
      case "before":
      return 10;
    case 'after':
      case "after":
      return 11;
    case 'issue':
      case "issue":
      return 12;
    default:
      return 10;
@@ -588,7 +685,7 @@
};
// 删除文件
const removeFile = (index) => {
  const removeFile = index => {
  const files = getCurrentFiles();
  files.splice(index, 1);
};