소스 검색

质量报告 添加列颜色

shaun-sheep 5 년 전
부모
커밋
822ec35944
1개의 변경된 파일43개의 추가작업 그리고 23개의 파일을 삭제
  1. 43 23
      src/views/model/report/index.vue

+ 43 - 23
src/views/model/report/index.vue

@@ -30,9 +30,17 @@
           <el-button @click="supplement" :plain="toBeSuppCount?false:true" :disabled="toBeSuppCount?false:true">模型待补充的设备</el-button>
           <el-button type="info" :loading="load" @click='getExportReport'>导出模型问题报告</el-button>
         </div>
-        <div class="table" :style="tableList&&tableList.length?'width: 100%;height: calc(100% - 47px)':'width: 100%;height: calc(100% - 10px)'">
-          <el-table ref="multipleTable" :data="tableData" stripe height="100%" :header-cell-style="headerStyle" v-loading='loading'
-            :row-class-name="tableRowClassName">
+        <div class="table"
+             :style="tableList&&tableList.length?'width: 100%;height: calc(100% - 47px)':'width: 100%;height: calc(100% - 10px)'">
+          <el-table
+            ref="multipleTable"
+            :data="tableData"
+            stripe height="100%"
+            :header-cell-style="headerStyle"
+            v-loading='loading'
+            :row-class-name="tableRowClassName"
+            :cell-style="cellStyle"
+          >
             <el-table-column prop="FloorName" label="模型楼层" fixed width="150"></el-table-column>
             <el-table-column prop="functionNo" label="待删除设备数量" fixed width="150">
               <template slot-scope="scope">
@@ -42,7 +50,8 @@
             </el-table-column>
             <el-table-column prop="toBeSupplement" label="待补充设备数量" fixed width="150">
               <template slot-scope="scope">
-                <el-badge :value="scope.row.toBeSupplement" class="item" :type='scope.row.toBeSupplement?"danger":"success"'>
+                <el-badge :value="scope.row.toBeSupplement" class="item"
+                          :type='scope.row.toBeSupplement?"danger":"success"'>
                 </el-badge>
               </template>
             </el-table-column>
@@ -147,24 +156,23 @@
 </template>
 
 <script>
-import { mapGetters } from "vuex";
-import dasBoard from "@/views/dasboard/index";
-import request from "@/api/model/file.js";
-import { exportReport, queryFloorList, queryModel, queryReportList, queryLostReportList } from "@/api/model/report.js";
-import { getToBeDelEquip, getSupplement } from "@/api/scan/request.js";
-import axios from 'axios'
-import { resolve } from 'q';
-export default {
-  components: {
-    dasBoard
-  },
-  data() {
-    return {
-      params: null,
-      ModelFileCount: null,// 模型文件夹数量
-      modelFloorCount: null,// 包含楼层模型文件数量
-      problemCount: 0,// 检查出问题的楼层模型文件数量
-      tableList: [], // tab数据
+  import {mapGetters} from "vuex";
+  import dasBoard from "@/views/dasboard/index";
+  import {queryFloorList, queryLostReportList, queryModel, queryReportList} from "@/api/model/report.js";
+  import {getSupplement, getToBeDelEquip} from "@/api/scan/request.js";
+  import axios from 'axios'
+
+  export default {
+    components: {
+      dasBoard
+    },
+    data() {
+      return {
+        params: null,
+        ModelFileCount: null,// 模型文件夹数量
+        modelFloorCount: null,// 包含楼层模型文件数量
+        problemCount: 0,// 检查出问题的楼层模型文件数量
+        tableList: [], // tab数据
       tableData: [],// 列表数据
       activeTab: '', // tab当前选中项
       headerStyle: { // 列表样式
@@ -197,6 +205,18 @@ export default {
     ...mapGetters('layout', ['projectId'])
   },
   methods: {
+    cellStyle({row, column, rowIndex, columnIndex}) {
+      console.log(column.label,'==')
+      if (column.label === '模型楼层'|| column.label === '待删除设备数量' || column.label === '待补充设备数量' || column.label === '有问题的检查项') {
+        return {
+          // background: '#f9f9f9',
+          // color: '#606266',
+          background: '#f3f3f3',
+          // color: '#f3f3f3',
+          lineHeight: '30px'
+        }
+      }
+    },
     getModelFloorCount() {// 获取楼层模型文件数量,计算出检查出问题的模型文件
       let promise1 = new Promise(resolve => {
         queryFloorList({}, res => {
@@ -486,7 +506,7 @@ export default {
 }
 /deep/ .el-table__row.warning-row {
   td {
-    background: #f3f3f3 !important;
+    background: #f9f9f9 !important;
   }
 }
 </style>