qinzhipeng_v 5 жил өмнө
parent
commit
9f893e7a48

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

@@ -245,6 +245,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()
     },
     handleChange(response, file, fileList) {
@@ -255,7 +257,6 @@ export default {
         this.fileDbList.push({ 'name': a.name, 'url': 'http:' + a.response.url })
       }
       localStorage.setItem('updata', JSON.stringify(this.fileDbList))
-      console.log(localStorage.getItem('updata'))
       // }, 500)
     },
     async bugListSelect() {

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

@@ -181,11 +181,18 @@ export default {
   },
   created() {
     this._initBegin()
+    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)
+      }
+    },
     // 先后获取
     async _initBegin() {
-      this.uptataKey = localStorage.getItem('updata')
       await bugGetEnum().then(res => {
         this.bugStatusStr = res.data.bugEnumList
         this.bugLevelStr = res.data.priorityEnumList

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

@@ -253,8 +253,16 @@ export default {
   created() {
     this._initBegin()
     this.taskIdGet()
+    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)
+      }
+    },
     submitUpload() {
       this.$refs.upload.submit()
     },
@@ -294,8 +302,6 @@ export default {
     },
     // 获取任务数据
     taskIdGet() {
-      this.uptataKey = localStorage.getItem('updata')
-
       taskListCreate({ statusList: [5, 6, 7, 8, 9, 10] }).then(res => {
         this.taskIdStr = res.data
       })