qinzhipeng_v 5 anos atrás
pai
commit
0b29ecbceb
1 arquivos alterados com 13 adições e 2 exclusões
  1. 13 2
      src/views/Platform/bugManage/bugCreate.vue

+ 13 - 2
src/views/Platform/bugManage/bugCreate.vue

@@ -128,12 +128,11 @@
           <el-upload
             class="upload-demo"
             multiple
-            capture
             accept="image/jpeg, image/png, image/gif, audio/mp4, video/mp4, audio/mpeg, application/vnd.ms-excel"
             :file-list="fileList"
             action="http://star.xiaojukeji.com/upload/img.node"
             :on-success="handleChange"
-            :on-change="handleChange"
+            :on-change="handleChange1"
           >
             <!-- action="http://page-daily.kuaidadi.com/upload/img.node" 线下 -->
             <!-- action="http://star.xiaojukeji.com/upload/img.node" 线上 -->
@@ -255,6 +254,18 @@ export default {
       console.log(this.fileDbList)
       // }, 500)
     },
+    handleChange1(file, fileList) {
+      setTimeout(function() {
+        console.log(fileList)
+        console.log(fileList[0].response.url)
+        this.fileDbList = []
+        this.fileList = fileList.slice(-3)
+        for (var a of this.fileList) {
+          this.fileDbList.push({ 'name': a.name, 'url': 'http:' + a.response.url })
+        }
+        console.log(this.fileDbList)
+      }, 500)
+    },
     async bugListSelect() {
       await bugGetEnum().then(res => {
         this.bugStatusStr = res.data.bugEnumList