qinzhipeng_v 5 years ago
parent
commit
0b29ecbceb
1 changed files with 13 additions and 2 deletions
  1. 13 2
      src/views/Platform/bugManage/bugCreate.vue

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

@@ -128,12 +128,11 @@
           <el-upload
           <el-upload
             class="upload-demo"
             class="upload-demo"
             multiple
             multiple
-            capture
             accept="image/jpeg, image/png, image/gif, audio/mp4, video/mp4, audio/mpeg, application/vnd.ms-excel"
             accept="image/jpeg, image/png, image/gif, audio/mp4, video/mp4, audio/mpeg, application/vnd.ms-excel"
             :file-list="fileList"
             :file-list="fileList"
             action="http://star.xiaojukeji.com/upload/img.node"
             action="http://star.xiaojukeji.com/upload/img.node"
             :on-success="handleChange"
             :on-success="handleChange"
-            :on-change="handleChange"
+            :on-change="handleChange1"
           >
           >
             <!-- action="http://page-daily.kuaidadi.com/upload/img.node" 线下 -->
             <!-- action="http://page-daily.kuaidadi.com/upload/img.node" 线下 -->
             <!-- action="http://star.xiaojukeji.com/upload/img.node" 线上 -->
             <!-- action="http://star.xiaojukeji.com/upload/img.node" 线上 -->
@@ -255,6 +254,18 @@ export default {
       console.log(this.fileDbList)
       console.log(this.fileDbList)
       // }, 500)
       // }, 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() {
     async bugListSelect() {
       await bugGetEnum().then(res => {
       await bugGetEnum().then(res => {
         this.bugStatusStr = res.data.bugEnumList
         this.bugStatusStr = res.data.bugEnumList