qinzhipeng_v 5 yıl önce
ebeveyn
işleme
1d5c0d7fad

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

@@ -234,7 +234,8 @@ export default {
       businessTypeShow: false,
       moduleTypeShow: false,
       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' }]
     }
   },
   created() {
@@ -243,15 +244,8 @@ export default {
   },
   methods: {
     submitUpload() {
-      // this.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' }]
-      // localStorage.setItem('updata', JSON.stringify(this.fileDbList))
       this.$refs.upload.submit()
     },
-    clickGetCode(response, file, fileList) {
-      console.log(response)
-      console.log(file)
-      console.log(fileList)
-    },
     handleChange(response, file, fileList) {
       // setTimeout(function() {
       this.fileDbList = []
@@ -259,7 +253,8 @@ export default {
       for (var a of this.fileList) {
         this.fileDbList.push({ 'name': a.name, 'url': 'http:' + a.response.url })
       }
-      localStorage.setItem('updata', JSON.stringify(this.fileDbList))
+      this.$set(this.form, 'accessory', JSON.stringify(this.fileDbList))
+      // localStorage.setItem('updata', JSON.stringify(this.fileDbList))
       // }, 500)
     },
     async bugListSelect() {
@@ -309,7 +304,6 @@ export default {
     },
     // 业务线取子数据
     clickChangePlatform(e) {
-      console.log(this.form.taskId)
       this.platformTypeStr = this.bizOptions.filter(value => value.code === e)[0].child
       this.businessTypeStr = []
       this.moduleStr = []

+ 13 - 8
src/views/Platform/bugManage/bugQuery.vue

@@ -181,16 +181,16 @@ export default {
   },
   created() {
     this._initBegin()
-    this.getLocalStor()
+    // this.getLocalStor()
   },
   methods: {
-    getLocalStor() {
-      var str = localStorage.getItem('updata')
-      var obj = JSON.parse(str.split('{}')[0])
-      for (var a of obj) {
-        this.uptataKey.push(a)
-      }
-    },
+    // getLocalStor() {
+    //   var str = localStorage.getItem('updata')
+    //   var obj = JSON.parse(str.split('{}')[0])
+    //   for (var a of obj) {
+    //     this.uptataKey.push(a)
+    //   }
+    // },
     // 先后获取
     async _initBegin() {
       await bugGetEnum().then(res => {
@@ -203,6 +203,11 @@ export default {
       })
       bugGet(this.$route.query.id).then(res => {
         this.form = res.data
+        var str = res.data.accessory
+        var obj = JSON.parse(str.split('{}')[0])
+        for (var a of obj) {
+          this.uptataKey.push(a)
+        }
         for (const a of this.bizIdEnumList) {
           if (this.form.bizId === a.code) {
             this.bizId = this.form.bizName

+ 13 - 8
src/views/Platform/bugManage/bugUpdate.vue

@@ -253,16 +253,16 @@ export default {
   created() {
     this._initBegin()
     this.taskIdGet()
-    this.getLocalStor()
+    // this.getLocalStor()
   },
   methods: {
-    getLocalStor() {
-      var str = localStorage.getItem('updata')
-      var obj = JSON.parse(str.split('{}')[0])
-      for (var a of obj) {
-        this.uptataKey.push(a)
-      }
-    },
+    // getLocalStor() {
+    //   var str = localStorage.getItem('updata')
+    //   var obj = JSON.parse(str.split('{}')[0])
+    //   for (var a of obj) {
+    //     this.uptataKey.push(a)
+    //   }
+    // },
     submitUpload() {
       this.$refs.upload.submit()
     },
@@ -289,6 +289,11 @@ export default {
       })
       bugGet(this.$route.query.id).then(res => {
         this.form = res.data
+        var str = res.data.accessory
+        var obj = JSON.parse(str.split('{}')[0])
+        for (var a of obj) {
+          this.uptataKey.push(a)
+        }
         this.platformTypeStr = this.bizOptions.filter(value => value.code === this.form.bizId)[0].child
         if (this.form.clientType) {
           this.businessTypeShow = true