Quellcode durchsuchen

上传附件修改

duy vor 1 Jahr
Ursprung
Commit
b6d17a009b
2 geänderte Dateien mit 9 neuen und 3 gelöschten Zeilen
  1. 2 1
      src/views/data-fill/components/HcUpload.vue
  2. 7 2
      src/views/data-fill/wbs.vue

+ 2 - 1
src/views/data-fill/components/HcUpload.vue

@@ -26,6 +26,7 @@ import { getTokenHeader } from '~src/api/request/header'
 import wbsApi from '~api/data-fill/wbs'
 import { isFileSize } from 'js-fast-way'
 import { toPdfPage } from '~uti/btn-auth'
+import { number } from 'echarts'
 
 const props = defineProps({
     fileList: {
@@ -53,7 +54,7 @@ const props = defineProps({
         default:'允许格式:jpg/png/pdf/excel/word, 文件大小 小于 60MB',
     },
     typevalue:{
-        type:String,
+        type:[String, Number],
         default:'',
     },
 

+ 7 - 2
src/views/data-fill/wbs.vue

@@ -514,6 +514,7 @@
                     placeholder="请选择"
                     style="width: 240px"
                     clearable
+                    @change="changeType"
                 >
                     <el-option
                         v-for="item in typeoptions"
@@ -2043,10 +2044,11 @@ const getBussFileList = async (pkeyId) => {
         fileListData.value = []
     }
 }
-const addFilelist = ()=>{
+const addFilelist = async ()=>{
     getBussFileList(primaryKeyId.value)
      uploadModal.value = true
-     getFileTypeApi()
+    await getFileTypeApi()
+  
        //上传的配置
        uploadData.value = {
                 classify:authBtnTabKey.value,
@@ -2056,6 +2058,9 @@ const addFilelist = ()=>{
             }
 
 }
+const changeType = (val)=>{
+    uploadData.value.type = val
+}
 //上传文件
 const uploadChange = async ({ type }) => {
     if (type === 'success') {