qinzhipeng_v 5 жил өмнө
parent
commit
12fe9c58be

+ 9 - 4
src/views/Platform/bugManage/bugCreate.vue

@@ -138,7 +138,7 @@
             <!-- action="http://star.xiaojukeji.com/upload/img.node" 线上 -->
             <!-- action="https://jsonplaceholder.typicode.com/posts/" 原始地址-->
             <!-- <el-button size="small">点击上传</el-button> -->
-            <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
+            <el-button slot="trigger" size="small" type="primary" @click="createdDis">选取文件</el-button>
             <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
           </el-upload>
         </div>
@@ -236,7 +236,8 @@ export default {
       accessory: '',
       userInformation: localStorage.getItem('username'),
       userNames: localStorage.getItem('realname'),
-      fileDbList: []
+      fileDbList: [],
+      dis: false
       // fileDbList: [{ name: '智慧平台.png', url: 'http://pt-starimg.didistatic.com/static/starimg/node/qo4sKioLko1571277086594.png' }, { name: '智慧平台.png', url: 'http://pt-starimg.didistatic.com/static/starimg/node/qo4sKioLko1571277086594.png' }]
     }
   },
@@ -245,8 +246,12 @@ export default {
     this.forkDown()
   },
   methods: {
+    createdDis() {
+      this.dis = true
+    },
     submitUpload() {
       this.$refs.upload.submit()
+      this.$message({ showClose: true, message: '文件正在上传······', type: 'success' })
     },
     handleChange(response, file, fileList) {
       // setTimeout(function() {
@@ -256,8 +261,8 @@ export default {
         this.fileDbList.push({ 'name': a.name, 'url': 'http:' + a.response.url })
       }
       this.accessory = JSON.stringify(this.fileDbList)
-      console.log(this.accessory)
-      // this.$set(this.form, 'accessory', JSON.stringify(this.fileDbList))
+      this.dis = false
+      this.$message({ showClose: true, message: '文件上传成功', type: 'success' })
       // }, 500)
     },
     async bugListSelect() {

+ 10 - 3
src/views/Platform/bugManage/bugUpdate.vue

@@ -139,7 +139,7 @@
             <!-- action="http://star.xiaojukeji.com/upload/img.node" 线上 -->
             <!-- action="https://jsonplaceholder.typicode.com/posts/" 原始地址-->
             <!-- <el-button size="small">点击上传</el-button> -->
-            <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
+            <el-button slot="trigger" size="small" type="primary" @click="createdDis">选取文件</el-button>
             <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
           </el-upload>
         </div>
@@ -158,7 +158,7 @@
             </el-table-column>
           </el-table>
           <el-form-item class="submit">
-            <el-button size="mini" type="primary" @click="createFormData(form)">提 交</el-button>
+            <el-button :disabled="dis" size="mini" type="primary" @click="createFormData(form)">提 交</el-button>
             <el-button class="move-button" size="mini" @click="$router.go(-1)">取 消</el-button>
           </el-form-item>
         </div>
@@ -248,7 +248,8 @@ export default {
       moduleTypeShow: false,
       userInformation: localStorage.getItem('username'),
       userNames: localStorage.getItem('realname'),
-      accessory: ''
+      accessory: '',
+      dis: false
     }
   },
   created() {
@@ -256,8 +257,12 @@ export default {
     this.taskIdGet()
   },
   methods: {
+    createdDis() {
+      this.dis = true
+    },
     submitUpload() {
       this.$refs.upload.submit()
+      this.$message({ showClose: true, message: '文件正在上传······', type: 'success' })
     },
     handleChange(response, file, fileList) {
       this.fileDbList = []
@@ -266,6 +271,8 @@ export default {
         this.fileDbList.push({ 'name': a.name, 'url': 'http:' + a.response.url })
       }
       this.accessory = JSON.stringify(this.fileDbList)
+      this.dis = false
+      this.$message({ showClose: true, message: '文件上传成功', type: 'success' })
     },
     async _initBegin() {
       await bugGetEnum().then(res => {