luolei %!s(int64=5) %!d(string=hai) anos
pai
achega
b0537c09bf
Modificáronse 3 ficheiros con 20 adicións e 12 borrados
  1. 3 3
      src/css/roleManager.less
  2. 16 8
      src/js/console.js
  3. 1 1
      src/js/roleManager.js

+ 3 - 3
src/css/roleManager.less

@@ -17,7 +17,7 @@
             cursor: pointer;
             cursor: pointer;
         }
         }
     }
     }
-    // .editRole {
+    .editRole {
     //     float: right;
     //     float: right;
     //     width: 52px;
     //     width: 52px;
     //     height: 30px;
     //     height: 30px;
@@ -28,8 +28,8 @@
     //     text-align: center;
     //     text-align: center;
     //     position: relative;
     //     position: relative;
     //     top: 10px;
     //     top: 10px;
-    //     cursor: pointer;
-    // }
+        cursor: pointer;
+    }
 }
 }
 .rightMenu {
 .rightMenu {
     position: absolute;
     position: absolute;

+ 16 - 8
src/js/console.js

@@ -7,7 +7,7 @@ require("../images/arrow_down.png")
 // import 'zrender/lib/svg/svg';
 // import 'zrender/lib/svg/svg';
 const echarts = require('echarts');
 const echarts = require('echarts');
 const {post,setCookie,delCookie,getCookie} = require('../js/utils.js');
 const {post,setCookie,delCookie,getCookie} = require('../js/utils.js');
-let payMoney = [],dayLis = [],dataType = 1;
+let payMoney = [],dayLis = [],dateType = 1,slideType = 1;
 $(function(){
 $(function(){
     if(!hasData('YH-KZT')){
     if(!hasData('YH-KZT')){
         $("body").html('')
         $("body").html('')
@@ -40,14 +40,16 @@ $(function(){
             if(!hasData('FUNC000045')){
             if(!hasData('FUNC000045')){
                 return
                 return
             }
             }
+            slideType = 1
             $(".pubEchart .title").html("科室平均住院天数柱状图")
             $(".pubEchart .title").html("科室平均住院天数柱状图")
-            barChart(dayLis,dataType)
+            barChart(dayLis,dateType)
         }else{
         }else{
             if(!hasData('FUNC000046')){
             if(!hasData('FUNC000046')){
                 return
                 return
             }
             }
+            slideType = 2
             $(".pubEchart .title").html("科室平均住院花费柱状图")
             $(".pubEchart .title").html("科室平均住院花费柱状图")
-            barChart(payMoney,dataType)
+            barChart(payMoney,dateType)
         }
         }
         $(this).parent().slideToggle().prev().find("span").html(str)
         $(this).parent().slideToggle().prev().find("span").html(str)
     })
     })
@@ -76,7 +78,7 @@ function dateChange(){
             color:'#5A8EEE',
             color:'#5A8EEE',
             backgroundColor:'#fff'
             backgroundColor:'#fff'
         })
         })
-        dataType = 1
+        dateType = 1
         getBarData(1)
         getBarData(1)
     })
     })
     $(".monthYear .year").click(function(){
     $(".monthYear .year").click(function(){
@@ -87,7 +89,7 @@ function dateChange(){
             color:'#5A8EEE',
             color:'#5A8EEE',
             backgroundColor:'#fff'
             backgroundColor:'#fff'
         })
         })
-        dataType = 2
+        dateType = 2
         getBarData(2)
         getBarData(2)
     })
     })
 }
 }
@@ -132,6 +134,7 @@ function initConsole(result){
 }
 }
 //获取图表数据
 //获取图表数据
 function getBarData(type){
 function getBarData(type){
+    console.log(slideType,'797979898')
     if(hasData('FUNC000045')){
     if(hasData('FUNC000045')){
         post('/console/getAverageDayNum',{//平均住院天数
         post('/console/getAverageDayNum',{//平均住院天数
             "type": type||1//1月2年
             "type": type||1//1月2年
@@ -140,7 +143,9 @@ function getBarData(type){
             if(data.code == 0){
             if(data.code == 0){
                 let result2 = data.data['平均住院日']||[]
                 let result2 = data.data['平均住院日']||[]
                 dayLis = result2
                 dayLis = result2
-                barChart(result2,type||1)
+                if(slideType == 1){
+                    barChart(result2,type||1)
+                }
             }
             }
         })
         })
     }else{
     }else{
@@ -154,7 +159,9 @@ function getBarData(type){
             if(data.code == 0){
             if(data.code == 0){
                 let result3 = data.data['平均住院费用']||[]
                 let result3 = data.data['平均住院费用']||[]
                 payMoney = result3;
                 payMoney = result3;
-                barChart(result2,type||1)
+                if(slideType == 2){
+                    barChart(result3,type||1)
+                }
             }
             }
         })
         })
     }else{
     }else{
@@ -585,6 +592,7 @@ function barChartPay(dataX,dataY){
 }
 }
 //柱状图住院日期
 //柱状图住院日期
 function barChart(data,type){
 function barChart(data,type){
+    // console.log(data,type)
     var myChart = echarts.init(document.getElementById('barChart'));
     var myChart = echarts.init(document.getElementById('barChart'));
     $(window).resize(function(){
     $(window).resize(function(){
         myChart.resize()
         myChart.resize()
@@ -695,7 +703,7 @@ function barChart(data,type){
             containLabel: true
             containLabel: true
         },
         },
         title:[{
         title:[{
-            text: type==1?'天数':'元',
+            text: slideType==1?'天数':'元',
             top: 15,
             top: 15,
             left: 10,
             left: 10,
             textStyle: {
             textStyle: {

+ 1 - 1
src/js/roleManager.js

@@ -318,7 +318,7 @@ $(function(){
             let id = $(this).attr("data-id")
             let id = $(this).attr("data-id")
             curId = id
             curId = id
             permissionIdLis=[],menuIdLis=[];
             permissionIdLis=[],menuIdLis=[];
-            $(".rightMenu").scrollTop(0)
+            $(".mainSysWrap").scrollTop(0)
             $(this).css({"background-color":"#F0F5FF"}).siblings().css("background-color","#fff")
             $(this).css({"background-color":"#F0F5FF"}).siblings().css("background-color","#fff")
             getRoleMenu(id)
             getRoleMenu(id)
         })
         })