Sfoglia il codice sorgente

缺陷列表页,优先级底色经常出不来fix bug

PrinceLee 5 anni fa
parent
commit
7c347240c1
1 ha cambiato i file con 13 aggiunte e 10 eliminazioni
  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.pageSize = this.pageSize
       this.indexPage.curIndex = this.curIndex
       this.indexPage.curIndex = this.curIndex
       const res = await bugList(this.indexPage)
       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) {
     getBugSelfList(type, pageSize) {