dedsudiyu 2 gadi atpakaļ
vecāks
revīzija
386a7371a4

+ 1 - 1
src/views/safetyCheck/checkConfiguration/rectificationUserPage.vue

@@ -36,7 +36,7 @@
       <el-table-column label="序号" align="center"  type="index" width="60" />
       <el-table-column label="实验室" align="center" prop="subName" show-overflow-tooltip/>
       <el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip width="300"/>
-      <el-table-column label="检查者" align="center" prop="nickNames" show-overflow-tooltip width="500"/>
+      <el-table-column label="整改人" align="center" prop="nickNames" show-overflow-tooltip width="500"/>
       <el-table-column label="操作人" align="center" prop="createName" show-overflow-tooltip width="200"/>
       <!--<el-table-column label="操作时间" align="center" prop="createTime" show-overflow-tooltip width="300"/>-->
     </el-table>

+ 2 - 2
src/views/safetyCheck/worktable/coverageRateEcharts.vue

@@ -24,7 +24,7 @@
       eCharts(){
         yearRate().then(response => {
           let myChart = this.$echarts.init(document.getElementById('coverageRateEcharts-box'));
-          let getname = ['未检查', '已检查', '检查中']; // 课程名
+          let getname = ['未检查', '已检查', '检查中'];
           let getbl = [0, 0, 0]; // 比例
           let getNum = [0, 0, 0]; // 数量
           for(let i=0;i<response.data.length;i++){
@@ -62,7 +62,7 @@
             legend: {
               type: "scroll",
               orient: 'vertical',
-              height: '80%',
+              height: '100%',
               right: '0%',
               top: 'center',
               //icon: "circle", //设置为圆,删除则为矩形

+ 31 - 6
src/views/safetyCheck/worktable/hiddenDangerStatisticsEcharts.vue

@@ -5,8 +5,8 @@
       <p :class="hdLevel==2?'check-p':''" @click="titleButtonClick(2)">二级指标</p>
       <p :class="hdLevel==3?'check-p':''" @click="titleButtonClick(3)">三级指标</p>
     </div>
+    <p v-if="nullType" style="line-height:100px;text-align: center;color:#999;">暂无数据</p>
     <div class="hiddenDangerStatisticsEcharts-box" id="hiddenDangerStatisticsEcharts-box">
-
     </div>
   </div>
 </template>
@@ -20,6 +20,7 @@
       return{
         hdLevel:1,
         userFlg:true,
+        nullType:false,
       }
     },
     created(){
@@ -49,6 +50,7 @@
           }
         }
       },
+      //校级
       schoolEcharts(){
         hiddenCountByType({hdLevel:this.hdLevel}).then(response => {
           let myChart = this.$echarts.init(document.getElementById('hiddenDangerStatisticsEcharts-box'));
@@ -117,6 +119,7 @@
           myChart.setOption(option);
         });
       },
+      //院系
       departmentEcharts(){
         collegCheckHiddenCountByType({hdLevel:this.hdLevel}).then(response => {
           let myChart = this.$echarts.init(document.getElementById('hiddenDangerStatisticsEcharts-box'));
@@ -126,6 +129,13 @@
             text:[],
             num: [],
           }
+          if(!response.rows[0]){
+            this.$set(this,'nullType',true);
+            return
+          }else{
+            this.$set(this,'nullType',false);
+          }
+          response.rows.sort(this.compare('sumTotal', true))
           for(let i=0;i<response.rows.length;i++){
             data.name.push(response.rows[i].subjectName.length>8?response.rows[i].subjectName.substring(0,8)+'..':response.rows[i].subjectName)
             data.nameText.push(response.rows[i].subjectName)
@@ -211,11 +221,7 @@
                   },
                   normal: {
                     barBorderRadius: [0, 20, 20, 0],
-                    color: new echarts.graphic.LinearGradient(
-                      0,
-                      0,
-                      1,
-                      0,
+                    color: new echarts.graphic.LinearGradient(0, 0, 1, 0,
                       [
                         {
                           offset: 0,
@@ -251,6 +257,25 @@
           myChart.setOption(option);
         })
       },
+      compare (attr,rev) {
+        // console.log(attr, rev)
+        if(rev ==  undefined){
+          rev = 1;
+        }else{
+          rev = (rev) ? 1 : -1;
+        }
+        return (a,b) => {
+          a = a[attr];
+          b = b[attr];
+          if(a < b){
+            return rev * -1;
+          }
+          if(a > b){
+            return rev * 1;
+          }
+          return 0;
+        }
+      },
     }
   }
 </script>