Pārlūkot izejas kodu

Merge branch 'http_mock' of git.xiaojukeji.com:jacklijiajia/thoth-frontend into http_mock

qinzhipeng_v 5 gadi atpakaļ
vecāks
revīzija
ab3c366862
1 mainītis faili ar 13 papildinājumiem un 10 dzēšanām
  1. 13 10
      src/views/projectManage/bugList/bugindex.vue

+ 13 - 10
src/views/projectManage/bugList/bugindex.vue

@@ -628,17 +628,20 @@ export default {
       this.indexPage.pageSize = this.pageSize
       this.indexPage.curIndex = this.curIndex
       const res = await bugList(this.indexPage)
-      this.$nextTick(() => {
-        if (res.code === 200) {
-          const data = res.data
-          data.map(item1 => {
-            this.priorityLevelEnumList.map(item => {
-              item1.priorityLevel === item.name ? item1.priorityCode = item.code : ''
-            })
+      if (res.code === 200) {
+        const data = res.data
+        this.tableData = await this.setCode(data)
+        this.total = res.total
+      }
+    },
+    setCode(data) {
+      return new Promise((resolve, reject) => {
+        data.map(item1 => {
+          this.priorityLevelEnumList.map(item => {
+            item1.priorityLevel === item.name ? item1.priorityCode = item.code : ''
           })
-          this.tableData = data
-          this.total = res.total
-        }
+        })
+        resolve(data)
       })
     },
     getBugSelfList(type, pageSize) {