dedsudiyu 1 týždeň pred
rodič
commit
f260f71ad1

+ 22 - 9
src/components/personnelAdmittanceECharts/personnelAdmittanceECharts.vue

@@ -31,7 +31,8 @@
 <script>
   import {
     laboratoryBigViewListCollegeApplyColumn,
-    laboratoryBigViewsSubTypeLevelCount
+    laboratoryBigViewsSubTypeLevelCount,
+    laboratoryLevelConfigGetLevelTitleList
   } from '@/api/index'
 
   export default {
@@ -41,6 +42,7 @@
         resultCount: '',
         listcount: '',
         classifyList:[],
+        lvList:[],
         chartReload1: null,//定时器
         chartReload2: null,//定时器
       }
@@ -49,15 +51,23 @@
 
     },
     mounted() {
-      this.laboratoryBigViewsSubTypeLevelCount()
+      this.laboratoryLevelConfigGetLevelTitleList()
       this.laboratoryBigViewListCollegeApplyColumn()
     },
     methods: {
+      //获取分级数据
+      laboratoryLevelConfigGetLevelTitleList() {
+        laboratoryLevelConfigGetLevelTitleList({}).then((response) => {
+          if (response.code == 200) {
+            this.$set(this, 'lvList', response.data)
+            this.laboratoryBigViewsSubTypeLevelCount()
+          }
+        })
+      },
       //实验室分类分级
       laboratoryBigViewsSubTypeLevelCount() {
         laboratoryBigViewsSubTypeLevelCount({}).then(response => {
           if (response.code == 200) {
-            console.log(response.data)
             this.$set(this, 'classifyList', response.data.classType)
             let dataVal = response.data.levelType
             this.classifyFun(dataVal)
@@ -66,7 +76,7 @@
       },
       /*实验室分级统计*/
       classifyFun(dataX) {
-        var colorList = ['#d02c2c', '#ff9b17', '#0183fa', '#0a9419']
+        let lvList = this.lvList;
         let classifyOption = {
           series: [{
             type: 'pie',
@@ -79,7 +89,13 @@
             itemStyle: {
               normal: {
                 color: function(params) {
-                  return colorList[params.dataIndex]
+                  let titleColor = '';
+                  for(let i=0;i<lvList.length;i++){
+                    if(lvList[i].titleName == params.name){
+                      titleColor = lvList[i].titleColor
+                    }
+                  }
+                  return titleColor
                 }
               }
             },
@@ -181,9 +197,6 @@
           'xAxis': [{
             'type': 'category',
             'data': dataX,
-            /*"axisTick": {
-  "alignWithLabel": true
-},*/
             axisTick: {
               show: false
 
@@ -230,7 +243,7 @@
           }],
           'yAxis': [
             {
-
+              interval: 1,
               axisTick: {
                 show: false
 

+ 0 - 149
src/views/courtyardManage/classifyGradeDetail.vue

@@ -154,7 +154,6 @@
 
     },
     mounted() {
-      // this.systemBuildingGetTreeList()
       this.laboratoryLabDeptTreeLargeTree();
       this.laboratoryLevelConfigGetLevelTitleList()
     },
@@ -173,154 +172,6 @@
           this.laboratoryBigViewGetFloorListByBigView(this.buildingOptions[index].id, this.buildingOptions[index].buildFloorVoList[minIndex].id)
         }
       },
-      //获取楼栋数据
-      systemBuildingGetTreeList() {
-        systemBuildingGetTreeList({}).then((response) => {
-          if (response.code == 200) {
-            let list = [{
-              floorNum: null,
-              groupName: null,
-              id: '101093843117592688',
-              imgUrl: null,
-              name: '南校区',
-              parentId: '0',
-              roomNum: null,
-              sortNo: 1,
-              type: 1,
-              buildFloorVoList: [{
-                'id': '101093843117592803',
-                'name': '农科楼(资源环境学院)',
-                'type': 2,
-                'imgUrl': null,
-                'parentId': '101093843117592688',
-                'sortNo': 1,
-                'floorNum': null,
-                'roomNum': null,
-                'groupName': null,
-                'buildFloorVoList': [{
-                  'id': '101093843117593020',
-                  'name': '1层',
-                  'type': 3,
-                  'imgUrl': null,
-                  'parentId': '101093843117592803',
-                  'sortNo': 1,
-                  'floorNum': null,
-                  'roomNum': null,
-                  'groupName': null,
-                  'buildFloorVoList': []
-                }, {
-                  'id': '101093843117593021',
-                  'name': '2层',
-                  'type': 3,
-                  'imgUrl': null,
-                  'parentId': '101093843117592803',
-                  'sortNo': 1,
-                  'floorNum': null,
-                  'roomNum': null,
-                  'groupName': null,
-                  'buildFloorVoList': []
-                }, {
-                  'id': '101093843117593022',
-                  'name': '9层',
-                  'type': 3,
-                  'imgUrl': null,
-                  'parentId': '101093843117592803',
-                  'sortNo': 1,
-                  'floorNum': null,
-                  'roomNum': null,
-                  'groupName': null,
-                  'buildFloorVoList': []
-                }, {
-                  'id': '101093843117593023',
-                  'name': '3层',
-                  'type': 3,
-                  'imgUrl': null,
-                  'parentId': '101093843117592803',
-                  'sortNo': 1,
-                  'floorNum': null,
-                  'roomNum': null,
-                  'groupName': null,
-                  'buildFloorVoList': []
-                }, {
-                  'id': '101093843117593024',
-                  'name': '4层',
-                  'type': 3,
-                  'imgUrl': null,
-                  'parentId': '101093843117592803',
-                  'sortNo': 1,
-                  'floorNum': null,
-                  'roomNum': null,
-                  'groupName': null,
-                  'buildFloorVoList': []
-                }, {
-                  'id': '101093843117593025',
-                  'name': '5层',
-                  'type': 3,
-                  'imgUrl': null,
-                  'parentId': '101093843117592803',
-                  'sortNo': 1,
-                  'floorNum': null,
-                  'roomNum': null,
-                  'groupName': null,
-                  'buildFloorVoList': []
-                }, {
-                  'id': '101093843117593026',
-                  'name': '6层',
-                  'type': 3,
-                  'imgUrl': null,
-                  'parentId': '101093843117592803',
-                  'sortNo': 1,
-                  'floorNum': null,
-                  'roomNum': null,
-                  'groupName': null,
-                  'buildFloorVoList': []
-                }, {
-                  'id': '101093843117593027',
-                  'name': '7层',
-                  'type': 3,
-                  'imgUrl': null,
-                  'parentId': '101093843117592803',
-                  'sortNo': 1,
-                  'floorNum': null,
-                  'roomNum': null,
-                  'groupName': null,
-                  'buildFloorVoList': []
-                }, {
-                  'id': '101093843117593028',
-                  'name': '8层',
-                  'type': 3,
-                  'imgUrl': null,
-                  'parentId': '101093843117592803',
-                  'sortNo': 1,
-                  'floorNum': null,
-                  'roomNum': null,
-                  'groupName': null,
-                  'buildFloorVoList': []
-                }]
-              }]
-            }]
-            // for(let i=0;i<response.data.length;i++){
-            //     let num = 0;
-            //     if(response.data[i].buildFloorVoList[0]){
-            //         for(let o=0;o<response.data[i].buildFloorVoList.length;o++){
-            //             if(response.data[i].buildFloorVoList[o].buildFloorVoList[0]){
-            //                 for(let x=0;x<response.data[i].buildFloorVoList[o].buildFloorVoList.length;x++){
-            //                     num++
-            //                 }
-            //             }
-            //         }
-            //     }
-            //     if(num != 0){
-            //         list.push(response.data[i]);
-            //     }
-            // }
-            this.$set(this, 'buildingOptions', list)
-            if (list[0]) {
-              this.laboratoryBigViewGetFloorListByBigView(list[0].id, list[0].buildFloorVoList[0].id)
-            }
-          }
-        })
-      },
       //获取楼层数据
       laboratoryBigViewGetFloorListByBigView(campusId, buildingId) {
         let self = this