Browse Source

优先级底色问题

PrinceLee 5 years ago
parent
commit
577b595420

+ 0 - 2
src/views/Platform/presentation/testPresentation.vue

@@ -386,8 +386,6 @@ export default {
     },
     },
     handleSizeChange(size) {
     handleSizeChange(size) {
       this.pageSize = size
       this.pageSize = size
-      console.log(size)
-      console.log(this.nowType)
       switch (this.nowType) {
       switch (this.nowType) {
         case 0:
         case 0:
           this.getList(this.z_name)
           this.getList(this.z_name)

+ 16 - 15
src/views/projectManage/bugList/bugindex.vue

@@ -392,7 +392,9 @@
             >
             >
               <el-table-column label="优先级" prop="priorityCode" sortable align="center">
               <el-table-column label="优先级" prop="priorityCode" sortable align="center">
                 <template slot-scope="scope" style="text-align: center;">
                 <template slot-scope="scope" style="text-align: center;">
-                  <span class="div_priority" :style="{ background: priorityColors[scope.row.priorityCode] }"> {{ scope.row.priorityLevel | oneA }}</span>
+                  <span class="div_priority" :class="[{'high': scope.row.priorityLevel === 'High'},{'medium': scope.row.priorityLevel === 'Medium'},{'low': scope.row.priorityLevel === 'Low'}]">
+                    {{ scope.row.priorityLevel | oneA }}
+                  </span>
                 </template>
                 </template>
               </el-table-column>
               </el-table-column>
               <el-table-column
               <el-table-column
@@ -432,7 +434,7 @@
             <el-button v-if="type !== 'list'" type="primary" size="mini" class="download" @click="download">导出</el-button>
             <el-button v-if="type !== 'list'" type="primary" size="mini" class="download" @click="download">导出</el-button>
             <div align="right">
             <div align="right">
               <el-pagination
               <el-pagination
-                :page-sizes="[15, 30, 45]"
+                :page-sizes="[15, 30, 45, total]"
                 :current-page="currentPage4"
                 :current-page="currentPage4"
                 :page-size="pageSize"
                 :page-size="pageSize"
                 background
                 background
@@ -630,22 +632,10 @@ export default {
       this.indexPage.curIndex = this.curIndex
       this.indexPage.curIndex = this.curIndex
       const res = await bugList(this.indexPage)
       const res = await bugList(this.indexPage)
       if (res.code === 200) {
       if (res.code === 200) {
-        const data = res.data
-        const newData = await this.setCode(data)
-        this.tableData = newData
+        this.tableData = res.data
         this.total = res.total
         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 : ''
-          })
-        })
-        resolve(data)
-      })
-    },
     getBugSelfList(type, pageSize) {
     getBugSelfList(type, pageSize) {
       if (type) {
       if (type) {
         this.bugListType = type
         this.bugListType = type
@@ -841,4 +831,15 @@ export default {
   }
   }
 }
 }
 </script>
 </script>
+<style scoped lang="scss">
+.high {
+  background-color: #F56C6C;
+}
+.medium {
+  background-color: #FF8952;
+}
+.low {
+  background-color: #7ED321;
+}
+</style>