qinzhipeng_v 5 years ago
parent
commit
c99bdd6081

+ 1 - 0
src/views/Platform/bugManage/bugCreate.vue

@@ -251,6 +251,7 @@ export default {
     },
     submitUpload() {
       this.$refs.upload.submit()
+      this.dis = true
       this.$message({ showClose: true, message: '文件正在上传······', type: 'success' })
     },
     handleChange(response, file, fileList) {

+ 31 - 16
src/views/Platform/bugManage/bugUpdate.vue

@@ -149,16 +149,16 @@
               <template slot-scope="scope">{{ scope.row.name }}</template>
             </el-table-column>
             <el-table-column label="" min-width="300">
-              <template slot-scope="scope"> <a :href="scope.row.url" style="color:blue;">{{ scope.row.url }}</a></template>
+              <template slot-scope="scope"><a :href="scope.row.url" style="color:blue;">{{ scope.row.url }}</a></template>
             </el-table-column>
             <el-table-column fixed="right" label="" width="50" align="center">
               <!-- <template slot-scope="scope"> -->
-              <div> x </div>
+              <el-button class="deleteSty" @click="createFormData(form, 2)"> x </el-button>
               <!-- </template> -->
             </el-table-column>
           </el-table>
           <el-form-item class="submit">
-            <el-button :disabled="dis" size="mini" type="primary" @click="createFormData(form)">提 交</el-button>
+            <el-button :disabled="dis" size="mini" type="primary" @click="createFormData(form, 1)">提 交</el-button>
             <el-button class="move-button" size="mini" @click="$router.go(-1)">取 消</el-button>
           </el-form-item>
         </div>
@@ -262,6 +262,7 @@ export default {
     },
     submitUpload() {
       this.$refs.upload.submit()
+      this.dis = true
       this.$message({ showClose: true, message: '文件正在上传······', type: 'success' })
     },
     handleChange(response, file, fileList) {
@@ -348,19 +349,29 @@ export default {
       this.$set(this.form, 'moduleId', '')
     },
     // 提交表单并且返回刷新
-    createFormData(form) {
-      this.$refs.form.validate((valid) => {
-        if (valid) {
-          form.reopenTimes = parseInt(form.reopenTimes)
-          form.accessory = this.accessory
-          this.userData = { id: '', ename: this.userInformation, name: this.userNames }
-          this.objData = { bugBaseInfo: form, user: this.userData }
-          bugUpdate(this.objData).then(res => {
-            res.code === 200 ? this.successFun() : this.errorFun()
-            this.$router.go(-1)
-          })
-        }
-      })
+    createFormData(form, e) {
+      if (e === 1) {
+        this.$refs.form.validate((valid) => {
+          if (valid) {
+            form.reopenTimes = parseInt(form.reopenTimes)
+            form.accessory = this.accessory
+            this.userData = { id: '', ename: this.userInformation, name: this.userNames }
+            this.objData = { bugBaseInfo: form, user: this.userData }
+            bugUpdate(this.objData).then(res => {
+              res.code === 200 ? this.successFun() : this.errorFun()
+              this.$router.go(-1)
+            })
+          }
+        })
+      } else {
+        form.accessory = this.accessory
+        this.userData = { id: '', ename: this.userInformation, name: this.userNames }
+        this.objData = { bugBaseInfo: form, user: this.userData }
+        bugUpdate(this.objData).then(res => {
+          res.code === 200 ? this.successFun() : this.errorFun()
+          this.$router.go(-1)
+        })
+      }
     },
     successFun() {
       this.$notify({ title: 'Success', message: 'Updated Successfully', type: 'success', duration: 2000 })
@@ -375,6 +386,10 @@ export default {
  .cla .el-table td {
     padding:0px;
   }
+  .deleteSty {
+    cursor: pointer;
+    border: none;
+  }
 </style>
 
 <style lang="stylus" scoped>