qinzhipeng_v 5 tahun lalu
induk
melakukan
937553507a

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

@@ -233,6 +233,7 @@ export default {
       userData: '',
       userData: '',
       businessTypeShow: false,
       businessTypeShow: false,
       moduleTypeShow: false,
       moduleTypeShow: false,
+      accessory: '',
       userInformation: localStorage.getItem('username'),
       userInformation: localStorage.getItem('username'),
       userNames: localStorage.getItem('realname'),
       userNames: localStorage.getItem('realname'),
       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' }]
       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' }]
@@ -253,7 +254,8 @@ export default {
       for (var a of this.fileList) {
       for (var a of this.fileList) {
         this.fileDbList.push({ 'name': a.name, 'url': 'http:' + a.response.url })
         this.fileDbList.push({ 'name': a.name, 'url': 'http:' + a.response.url })
       }
       }
-      this.$set(this.form, 'accessory', JSON.stringify(this.fileDbList))
+      this.accessory = JSON.stringify(this.fileDbList)
+      // this.$set(this.form, 'accessory', JSON.stringify(this.fileDbList))
       // localStorage.setItem('updata', JSON.stringify(this.fileDbList))
       // localStorage.setItem('updata', JSON.stringify(this.fileDbList))
       // }, 500)
       // }, 500)
     },
     },
@@ -340,6 +342,7 @@ export default {
           if (this.$route.query.id && typeof this.form.bizId === 'string') {
           if (this.$route.query.id && typeof this.form.bizId === 'string') {
             form.bizId = this.bizOptions.filter(value => value.name === form.bizId)[0].code
             form.bizId = this.bizOptions.filter(value => value.name === form.bizId)[0].code
           }
           }
+          form.accessory = this.accessory
           form.reopenTimes = parseInt(form.reopenTimes)
           form.reopenTimes = parseInt(form.reopenTimes)
           form.projectId = this.taskIdStr.filter(value => value.id === this.form.taskId)[0].projectId
           form.projectId = this.taskIdStr.filter(value => value.id === this.form.taskId)[0].projectId
           this.userData = { id: '', ename: this.userInformation, name: this.userNames }
           this.userData = { id: '', ename: this.userInformation, name: this.userNames }

+ 9 - 1
src/views/Platform/bugManage/bugUpdate.vue

@@ -247,7 +247,8 @@ export default {
       businessTypeShow: false,
       businessTypeShow: false,
       moduleTypeShow: false,
       moduleTypeShow: false,
       userInformation: localStorage.getItem('username'),
       userInformation: localStorage.getItem('username'),
-      userNames: localStorage.getItem('realname')
+      userNames: localStorage.getItem('realname'),
+      accessory: ''
     }
     }
   },
   },
   created() {
   created() {
@@ -267,7 +268,13 @@ export default {
       this.$refs.upload.submit()
       this.$refs.upload.submit()
     },
     },
     handleChange(file, fileList) {
     handleChange(file, fileList) {
+      this.fileDbList = []
       this.fileList = fileList.slice(-3)
       this.fileList = fileList.slice(-3)
+      for (var a of this.fileList) {
+        this.fileDbList.push({ 'name': a.name, 'url': 'http:' + a.response.url })
+      }
+      this.accessory = JSON.stringify(this.fileDbList)
+      // this.$set(this.form, 'accessory', JSON.stringify(this.fileDbList))
     },
     },
     async _initBegin() {
     async _initBegin() {
       await bugGetEnum().then(res => {
       await bugGetEnum().then(res => {
@@ -346,6 +353,7 @@ export default {
     createFormData(form) {
     createFormData(form) {
       this.$refs.form.validate((valid) => {
       this.$refs.form.validate((valid) => {
         if (valid) {
         if (valid) {
+          form.accessory = this.accessory
           form.reopenTimes = parseInt(form.reopenTimes)
           form.reopenTimes = parseInt(form.reopenTimes)
           this.userData = { id: '', ename: this.userInformation, name: this.userNames }
           this.userData = { id: '', ename: this.userInformation, name: this.userNames }
           this.objData = { bugBaseInfo: form, user: this.userData }
           this.objData = { bugBaseInfo: form, user: this.userData }