浏览代码

Merge branch 'xj' of http://192.168.0.115:3000/bill/public-fuse into xj

gemercheung 1 年之前
父节点
当前提交
70a71047e2
共有 2 个文件被更改,包括 6 次插入2 次删除
  1. 2 0
      src/constant/caseFile.ts
  2. 4 2
      src/view/case/addPhotoFile.vue

+ 2 - 0
src/constant/caseFile.ts

@@ -2,6 +2,7 @@ import { BoardType } from "@/store/caseFile";
 
 export const FileDrawType = 1;
 export const DrawFormats = [".jpg", ".jpeg", ".png", ".raw", ".dcm"];
+export const photoFormats = [".jpg", ".jpeg", ".png"];
 export const OtherFormats = [".pdf", ".jpeg", ".doc", ".docx", ".jpg", ".png"];
 export const BoardTypeDesc = {
   [BoardType.scene]: "现场图",
@@ -9,5 +10,6 @@ export const BoardTypeDesc = {
 };
 export const DrawFormatDesc = "jpg、png、raw、dcm等格式的文件";
 export const OtherFormatDesc = "pdf、word、jpg、png等格式的文件";
+export const photoFormatDesc = "jpg、jpeg、png等格式的文件";
 
 export const maxFileSize = 100 * 1024 * 1024;

+ 4 - 2
src/view/case/addPhotoFile.vue

@@ -15,14 +15,14 @@
         :file-list="fileList"
         :http-request="httpsApi"
         :on-preview="previewFile"
-        :accept="accept"
+        :accept="photoFormats"
         :before-remove="removeFile"
       >
         <el-button type="primary" :disabled="!!file">
           <el-icon><Upload /></el-icon>上传
         </el-button>
         <template v-slot:tip>
-          <div class="el-upload__tip">注:可上传{{ size }}以内的{{ formatDesc }}</div>
+          <div class="el-upload__tip">注:可上传{{ size }}以内的{{ photoFormatDesc }}</div>
         </template>
         <template v-slot:file="{ file }">
           <div class="file" @click.stop="previewFile()">
@@ -50,6 +50,8 @@
 import {
   DrawFormatDesc,
   DrawFormats,
+  photoFormats,
+  photoFormatDesc,
   FileDrawType,
   OtherFormatDesc,
   OtherFormats,