|
@@ -117,10 +117,10 @@ var config = {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-// window.onload = function() {
|
|
|
-// var ctx = document.getElementById("canvas").getContext("2d");
|
|
|
-// window.myLine = new Chart(ctx, config);
|
|
|
-// };
|
|
|
+window.onload = function() {
|
|
|
+ var ctx = document.getElementById("canvas").getContext("2d");
|
|
|
+ window.myLine = new Chart(ctx, config);
|
|
|
+};
|
|
|
|
|
|
// 计算月份 00:00:00
|
|
|
function getRecentMonth_Date(n) {
|
|
@@ -141,7 +141,6 @@ function getRecentMonth_Date(n) {
|
|
|
dyear.toString() + '-' + dmonth.toString() + '-' + dday.toString() + ' 00:00:00';
|
|
|
result += datestart + ',';
|
|
|
result += dateend;
|
|
|
- console.log(datestart);
|
|
|
return datestart;
|
|
|
}
|
|
|
function getMonth_Date(n) {
|
|
@@ -162,12 +161,10 @@ function getMonth_Date(n) {
|
|
|
dyear.toString() + '-' + dmonth.toString() + '-' + dday.toString() + ' 00:00:00';
|
|
|
result += datestart + ',';
|
|
|
result += dateend;
|
|
|
- console.log(datestart);
|
|
|
return datestart;
|
|
|
}
|
|
|
// 获取当前时间 23:59:59
|
|
|
function today_Date(e) {
|
|
|
- console.log('1111111111111', e);
|
|
|
const today = new Date();
|
|
|
const year = today.getFullYear()
|
|
|
const month = today.getMonth()+1
|
|
@@ -180,90 +177,8 @@ var option1;
|
|
|
var option;
|
|
|
var myChart1;
|
|
|
var myChart;
|
|
|
-console.log('echarts-----------', echarts)
|
|
|
$(function () {
|
|
|
- // 获取当天的数据
|
|
|
- let query = {
|
|
|
- startTime: today_Date(' 00:00:00'),
|
|
|
- endTime: today_Date(' 23:59:59'),
|
|
|
- reportId: '',
|
|
|
- reportType: 'cy',
|
|
|
- reportIds: ['cy_ryrs'],
|
|
|
- type: 1,
|
|
|
- groupColumn: '',
|
|
|
- }
|
|
|
- let query2 = {
|
|
|
- startTime: today_Date(' 00:00:00'),
|
|
|
- endTime: today_Date(' 23:59:59'),
|
|
|
- reportId: '',
|
|
|
- reportType: '',
|
|
|
- reportIds: ['mz_mzjcfzb','mz_mzypfzb','mz_ybjjsr'],
|
|
|
- type: 2,
|
|
|
- groupColumn: 'yf',
|
|
|
- }
|
|
|
- // 首页头部的数据
|
|
|
- $.ajax({
|
|
|
- type: "post",
|
|
|
- url: '/thmz/selectDoctorIndexData',
|
|
|
- dataType: "json",
|
|
|
- headers: {'content-type': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
- data: JSON.stringify(query),
|
|
|
- success: function (res) {
|
|
|
- if (res == '401' || res == 401) {
|
|
|
- window.location.href = '/thmz/login/view'
|
|
|
- return;
|
|
|
- }
|
|
|
- if (res.code == 0) {
|
|
|
- console.log('接口返回的参数--------', res.data)
|
|
|
- let data = res.data
|
|
|
- $("#registrationNum").html(data.cy_ryrs[0].value);
|
|
|
- // $("#haveClinicalNum").html(res.haveClinicalNum);
|
|
|
- // if (res.ghAmount != null) {
|
|
|
- // $("#ghAmount").html(res.ghAmount.toFixed(2));
|
|
|
- // }
|
|
|
- // if (res.sfAmount != null) {
|
|
|
- // $("#sfAmount").html(res.sfAmount.toFixed(2));
|
|
|
- // }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
- // 图二请求数据
|
|
|
- $.ajax({
|
|
|
- type: "post",
|
|
|
- url: '/thmz/selectDoctorIndexData',
|
|
|
- dataType: "json",
|
|
|
- headers: {'content-type': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
- data: JSON.stringify(query2),
|
|
|
- success: function (res) {
|
|
|
- if (res == '401' || res == 401) {
|
|
|
- window.location.href = '/thmz/login/view'
|
|
|
- return;
|
|
|
- }
|
|
|
- if (res.code == 0) {
|
|
|
- console.log('接口返回的参数--------', res.data)
|
|
|
- let jczb = []
|
|
|
- let yzb = []
|
|
|
- let jjzb= []
|
|
|
- res.data.mz_mzjcfzb.forEach(ele => {
|
|
|
- jczb.push(ele.value)
|
|
|
- });
|
|
|
- res.data.mz_mzypfzb.forEach(ele => {
|
|
|
- yzb.push(ele.value)
|
|
|
- });
|
|
|
- res.data.mz_ybjjsr.forEach(ele => {
|
|
|
- jjzb.push(ele.value)
|
|
|
- });
|
|
|
- option.series[0].data = jczb
|
|
|
- option.series[1].data = yzb
|
|
|
- option.series[2].data = jjzb
|
|
|
- myChart.setOption(option, true)
|
|
|
- console.log('折线图数据----------', option);
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
- // 柱状图
|
|
|
+ // // 柱状图
|
|
|
myChart1 = echarts.init(document.getElementById('canvas'))
|
|
|
option1 = {
|
|
|
legend: {},
|
|
@@ -292,7 +207,7 @@ $(function () {
|
|
|
},
|
|
|
series: [
|
|
|
{
|
|
|
- data: [20, 0, 50, 80, 70, 40, 80],
|
|
|
+ data: [0, 0, 0, 0, 0, 0, 0],
|
|
|
type: 'bar',
|
|
|
name: '门诊预约诊疗率',
|
|
|
itemStyle: {
|
|
@@ -305,7 +220,7 @@ $(function () {
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- data: [100, 99, 55, 33, 70, 44, 66],
|
|
|
+ data: [0, 0, 0, 0, 0, 0, 0],
|
|
|
type: 'bar',
|
|
|
name: '次均费用增长率',
|
|
|
itemStyle: {
|
|
@@ -318,7 +233,7 @@ $(function () {
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- data: [12, 44, 55, 80, 70, 66, 66],
|
|
|
+ data: [0, 0, 0, 0, 0, 0, 0],
|
|
|
type: 'bar',
|
|
|
name: '患者满意度',
|
|
|
itemStyle: {
|
|
@@ -336,7 +251,7 @@ $(function () {
|
|
|
window.addEventListener("resize", function() {
|
|
|
myChart1.resize()
|
|
|
})
|
|
|
- // 折线图
|
|
|
+ // // 折线图
|
|
|
myChart= echarts.init(document.getElementById('canvas1'))
|
|
|
option = {
|
|
|
title: {
|
|
@@ -377,7 +292,7 @@ $(function () {
|
|
|
return params.value+'%'
|
|
|
}
|
|
|
},
|
|
|
- data: [1, 2, 12, 15, 45, 55, 99]
|
|
|
+ data: [0, 0, 0, 0, 0, 0, 0]
|
|
|
},
|
|
|
{
|
|
|
name: '药占比',
|
|
@@ -388,7 +303,7 @@ $(function () {
|
|
|
return params.value+'%'
|
|
|
}
|
|
|
},
|
|
|
- data: [1, 22, 33, 44, 44, 55, 55]
|
|
|
+ data: [0, 0, 0, 0, 0, 0, 0]
|
|
|
},
|
|
|
{
|
|
|
name: '门诊收入中医保基金占比',
|
|
@@ -399,7 +314,7 @@ $(function () {
|
|
|
return params.value+'%'
|
|
|
}
|
|
|
},
|
|
|
- data: [80, 89, 86, 84, 90, 90, 90]
|
|
|
+ data: [0, 0, 0, 0, 0, 0, 0]
|
|
|
}
|
|
|
]
|
|
|
};
|
|
@@ -407,110 +322,87 @@ $(function () {
|
|
|
window.addEventListener("resize", function() {
|
|
|
myChart.resize()
|
|
|
})
|
|
|
+ // 获取当天的数据
|
|
|
+ let query = {
|
|
|
+ startTime: today_Date(' 00:00:00'),
|
|
|
+ endTime: today_Date(' 23:59:59'),
|
|
|
+ reportId: '',
|
|
|
+ reportType: '',
|
|
|
+ reportIds: ['cy_ryrs','mz_jiezrs','mz_czts','mz_pjddsj'],
|
|
|
+ type: 1,
|
|
|
+ groupColumn: '',
|
|
|
+ }
|
|
|
+ // 左一图的请求参数
|
|
|
+ let query1 = {
|
|
|
+ startTime: getRecentMonth_Date(3),
|
|
|
+ endTime: today_Date(' 23:59:59'),
|
|
|
+ reportId: '',
|
|
|
+ reportType: '',
|
|
|
+ reportIds: ['mz_yyl','mz_myd','mz_cjfyzzl'],
|
|
|
+ type: 2,
|
|
|
+ groupColumn: 'yf',
|
|
|
+ }
|
|
|
+ // 右一图的请求参数
|
|
|
+ let query2 = {
|
|
|
+ startTime: getRecentMonth_Date(3),
|
|
|
+ endTime: today_Date(' 23:59:59'),
|
|
|
+ reportId: '',
|
|
|
+ reportType: '',
|
|
|
+ reportIds: ['mz_mzjcfzb','mz_mzypfzb','mz_ybbxbl',],
|
|
|
+ type: 2,
|
|
|
+ groupColumn: 'yf',
|
|
|
+ }
|
|
|
+ // 首页头部的数据
|
|
|
+ $.ajax({
|
|
|
+ type: "post",
|
|
|
+ url: '/thmz/selectDoctorIndexData',
|
|
|
+ dataType: "json",
|
|
|
+ headers: {'content-type': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ data: JSON.stringify(query),
|
|
|
+ success: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.code == 0) {
|
|
|
+ let data = res.data
|
|
|
+ $("#registrationNum").html(data.cy_ryrs[0].value);
|
|
|
+ $("#haveClinicalNum").html(data.mz_jiezrs[0].value);
|
|
|
+ $("#numberVisits").html(data.mz_czts[0].value+'天');
|
|
|
+ if(data.mz_pjddsj[0].value !== null) {
|
|
|
+ $("#awaitTime").html(data.mz_pjddsj[0].value+'分钟');
|
|
|
+ }else {
|
|
|
|
|
|
- // init_daterangepicker();
|
|
|
-
|
|
|
- // $.ajax({
|
|
|
- // type: "GET",
|
|
|
- // url: '/thmz/getIndexCount',
|
|
|
- // dataType: "json",
|
|
|
- // headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
- // data: JSON.stringify({beginTime: new Date(rePortRangeArr[0]), endTime: new Date(rePortRangeArr[1])}),
|
|
|
- // success: function (res) {
|
|
|
- // if (res == '401' || res == 401) {
|
|
|
- // window.location.href = '/thmz/login/view'
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // if (res.code == 0) {
|
|
|
- // $("#registrationNum").html(res.registrationNum);
|
|
|
- // $("#haveClinicalNum").html(res.haveClinicalNum);
|
|
|
- // if (res.ghAmount != null) {
|
|
|
- // $("#ghAmount").html(res.ghAmount.toFixed(2));
|
|
|
- // }
|
|
|
- // if (res.sfAmount != null) {
|
|
|
- // $("#sfAmount").html(res.sfAmount.toFixed(2));
|
|
|
- // }
|
|
|
- // }
|
|
|
- //
|
|
|
- // }
|
|
|
- // });
|
|
|
-
|
|
|
- // var rePortRangeArr = getRePortRangeArr();
|
|
|
- // $.ajax({
|
|
|
- // type: "POST",
|
|
|
- // url: '/thmz/getMzyytsqs',
|
|
|
- // contentType: "application/json;charset=UTF-8",
|
|
|
- // dataType: "json",
|
|
|
- // headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
- // data: JSON.stringify({beginTime: new Date(rePortRangeArr[0]), endTime: new Date(rePortRangeArr[1])}),
|
|
|
- // success: function (res) {
|
|
|
- // if (res == '401' || res == 401) {
|
|
|
- // window.location.href = '/thmz/login/view'
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // if (res.code == 0) {
|
|
|
- // if(res.keyList!=null && res.keyList.length>0){
|
|
|
- // for (var i=0;i<res.keyList.length;i++){
|
|
|
- // config.data.labels[i]=res.keyList[i];
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if(res.data!=null && res.data.length>0){
|
|
|
- // var ghje=config.data.datasets[0].data;
|
|
|
- // var jzje=config.data.datasets[1].data;
|
|
|
- // var thje=config.data.datasets[2].data;
|
|
|
- // // var tfje=config.data.datasets[3].data;
|
|
|
- // for (var i=0;i<res.data.length;i++){
|
|
|
- // ghje[i]=res.data[i].ghAmount;
|
|
|
- // jzje[i]=res.data[i].sfAmount;
|
|
|
- // thje[i]=res.data[i].thAmount;
|
|
|
- // // tfje[i]=Math.abs(res.data[i].tfAmount);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // var ctx = $("#canvas").get(0).getContext("2d");
|
|
|
- // console.log('参数-------', config)
|
|
|
- // window.myLine = new Chart(ctx, config);
|
|
|
- // }else {
|
|
|
- // errorMesage(res);
|
|
|
- // }
|
|
|
- //
|
|
|
- // }
|
|
|
- // });
|
|
|
-
|
|
|
+ $("#awaitTime").html(0+'分钟');
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- //获取医生工作统计数据
|
|
|
- // $.ajax({
|
|
|
- // type: "GET",
|
|
|
- // url: '/thmz/getDoctorDateForDay',
|
|
|
- // dataType: "json",
|
|
|
- // headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
- // success: function (res) {
|
|
|
- // if (res == '401' || res == 401) {
|
|
|
- // window.location.href = '/thmz/login/view'
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // if (res.code == 0) {
|
|
|
- // $("#numberOfPatient").html(res.numberOfPatient);
|
|
|
- // $("#numberOfPrescription").html(res.numberOfPrescription);
|
|
|
- // var html='';
|
|
|
- // if(res.numberOfIcdText!=null && res.numberOfIcdText.length>0){
|
|
|
- // for(var i=0;i<res.numberOfIcdText.length;i++){
|
|
|
- // var obj=res.numberOfIcdText[i];
|
|
|
- // html+=' <div class="work_detail_full">';
|
|
|
- // html+='<div title="'+obj.icd_text+'" style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: calc(100% - 300px);float: left;">';
|
|
|
- // html+='<i class="fa fa-file-text" style="color: #6D31CF;margin-right: 10px;"></i>';
|
|
|
- // html+=obj.icd_text+'</div>';
|
|
|
- // html+='<div class="el-col el-col-4" style="float: right;text-align: right;margin-right: 5px;">';
|
|
|
- // html+=obj.num;
|
|
|
- // html+=' 次</div><div style="clear: both;"></div></div>';
|
|
|
- // }
|
|
|
- // }
|
|
|
- // $("#numberOfIcdText").html(html);
|
|
|
- // }
|
|
|
- //
|
|
|
- // }
|
|
|
- // });
|
|
|
+ // 图一请求
|
|
|
+ $.ajax({
|
|
|
+ type: "post",
|
|
|
+ url: '/thmz/selectDoctorIndexData',
|
|
|
+ dataType: "json",
|
|
|
+ headers: {'content-type': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ data: JSON.stringify(query1),
|
|
|
+ success: function (res) {
|
|
|
+ ajax1Data(res)
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
+ // 图二请求
|
|
|
+ $.ajax({
|
|
|
+ type: "post",
|
|
|
+ url: '/thmz/selectDoctorIndexData',
|
|
|
+ dataType: "json",
|
|
|
+ headers: {'content-type': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ data: JSON.stringify(query2),
|
|
|
+ success: function (res) {
|
|
|
+ ajax2Data(res)
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
// 按钮选择日期处理
|
|
@@ -524,6 +416,156 @@ function btnTime(e) {
|
|
|
return monthData
|
|
|
}
|
|
|
|
|
|
+function ajax1Data(res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.code == 0) {
|
|
|
+ let jczb = []
|
|
|
+ let yzb = []
|
|
|
+ let jjzb= []
|
|
|
+
|
|
|
+ // 数据返回数据的月份
|
|
|
+ res.data.mz_yyl.forEach(ele => {
|
|
|
+ if (ele.yf.substr(-2, 1) == 0) {
|
|
|
+ ele.yf = ele.yf.slice(-1)
|
|
|
+ } else {
|
|
|
+ ele.yf = ele.yf.slice(-2)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ res.data.mz_cjfyzzl.forEach(ele => {
|
|
|
+ if (ele.yf.substr(-2, 1) == 0) {
|
|
|
+ ele.yf = ele.yf.slice(-1)
|
|
|
+ } else {
|
|
|
+ ele.yf = ele.yf.slice(-2)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ res.data.mz_myd.forEach(ele => {
|
|
|
+ if (ele.yf.substr(-2, 1) == 0) {
|
|
|
+ ele.yf = ele.yf.slice(-1)
|
|
|
+ } else {
|
|
|
+ ele.yf = ele.yf.slice(-2)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ let newYf = transformChar(res.data.yf)
|
|
|
+ res.data.mz_myd = fillData(newYf, res.data.mz_myd)
|
|
|
+ res.data.mz_yyl = fillData(newYf, res.data.mz_yyl)
|
|
|
+ res.data.mz_cjfyzzl = fillData(newYf, res.data.mz_cjfyzzl)
|
|
|
+ res.data.mz_myd.forEach((ele => {
|
|
|
+ jjzb.push(ele.value)
|
|
|
+ }))
|
|
|
+ res.data.mz_cjfyzzl.forEach((ele => {
|
|
|
+ yzb.push(ele.value)
|
|
|
+ }))
|
|
|
+ res.data.mz_yyl.forEach((ele => {
|
|
|
+ jczb.push(ele.value)
|
|
|
+ }))
|
|
|
+ option1.series[0].data = jczb
|
|
|
+ option1.series[1].data = yzb
|
|
|
+ option1.series[2].data = jjzb
|
|
|
+ option1.xAxis.data = res.data.yf
|
|
|
+ option1.yAxis.data = res.data.yf
|
|
|
+ myChart1.setOption(option1, true)
|
|
|
+ }
|
|
|
+}
|
|
|
+function ajax2Data(res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.code == 0) {
|
|
|
+ let jczb = []
|
|
|
+ let yzb = []
|
|
|
+ let jjzb= []
|
|
|
+
|
|
|
+ res.data.mz_mzjcfzb.forEach((ele => {
|
|
|
+ if(ele.yf.substr(-2, 1) == 0) {
|
|
|
+ ele.yf = ele.yf.slice(-1)
|
|
|
+ }else {
|
|
|
+ ele.yf = ele.yf.slice(-2)
|
|
|
+ }
|
|
|
+ }))
|
|
|
+ res.data.mz_mzypfzb.forEach((ele => {
|
|
|
+ if(ele.yf.substr(-2, 1) == 0) {
|
|
|
+ ele.yf = ele.yf.slice(-1)
|
|
|
+ }else {
|
|
|
+ ele.yf = ele.yf.slice(-2)
|
|
|
+ }
|
|
|
+ }))
|
|
|
+ res.data.mz_ybbxbl.forEach((ele => {
|
|
|
+ if(ele.yf.substr(-2, 1) == 0) {
|
|
|
+ ele.yf = ele.yf.slice(-1)
|
|
|
+ }else {
|
|
|
+ ele.yf = ele.yf.slice(-2)
|
|
|
+ }
|
|
|
+ }))
|
|
|
+ let newYf = transformChar(res.data.yf)
|
|
|
+ res.data.mz_mzjcfzb = fillData(newYf, res.data.mz_mzjcfzb)
|
|
|
+ res.data.mz_mzypfzb = fillData(newYf, res.data.mz_mzypfzb)
|
|
|
+ res.data.mz_ybbxbl = fillData(newYf, res.data.mz_ybbxbl)
|
|
|
+ // -----------------------------
|
|
|
+ res.data.mz_mzjcfzb.forEach(ele => {
|
|
|
+ jczb.push(ele.value)
|
|
|
+ });
|
|
|
+ res.data.mz_mzypfzb.forEach(ele => {
|
|
|
+ yzb.push(ele.value)
|
|
|
+ });
|
|
|
+ res.data.mz_ybbxbl.forEach(ele => {
|
|
|
+ jjzb.push(ele.value)
|
|
|
+ });
|
|
|
+ option.series[0].data = jczb
|
|
|
+ option.series[1].data = yzb
|
|
|
+ option.series[2].data = jjzb
|
|
|
+ option.xAxis.data = res.data.yf
|
|
|
+ myChart.setOption(option, true)
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+// 补充为空的数据
|
|
|
+function fillData(yf, data) {
|
|
|
+ const obj = {}
|
|
|
+ data.forEach(it => obj[it.yf] = it)
|
|
|
+ const newArr = []
|
|
|
+ yf.forEach(it => {
|
|
|
+ let objData = {}
|
|
|
+ if (obj[it]) {
|
|
|
+ objData = obj[it]
|
|
|
+ } else {
|
|
|
+ objData = {
|
|
|
+ value: 0, yf: it+''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ newArr.push(objData)
|
|
|
+ })
|
|
|
+ return newArr
|
|
|
+}
|
|
|
+// 一月二月转 1 2 月份处理
|
|
|
+function transformChar(str) {
|
|
|
+ const numChar = {
|
|
|
+ '零': 0,
|
|
|
+ '一': 1,
|
|
|
+ '二': 2,
|
|
|
+ '三': 3,
|
|
|
+ '四': 4,
|
|
|
+ '五': 5,
|
|
|
+ '六': 6,
|
|
|
+ '七': 7,
|
|
|
+ '八': 8,
|
|
|
+ '九': 9,
|
|
|
+ '十': 10,
|
|
|
+ '十一': 11,
|
|
|
+ '十二': 12,
|
|
|
+ };
|
|
|
+ let newData = []
|
|
|
+ if (str.length !== 0) {
|
|
|
+ str.forEach((ele,index) => {
|
|
|
+ newData.push(numChar[ele.slice(0, ele.length - 1)])
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return newData
|
|
|
+}
|
|
|
// 图一
|
|
|
$('.dropdown-menu1').click(function(event) {
|
|
|
let time = event.target.innerHTML
|
|
@@ -532,10 +574,10 @@ $('.dropdown-menu1').click(function(event) {
|
|
|
startTime: btnTime(time),
|
|
|
endTime: today_Date(' 23:59:59'),
|
|
|
reportId: '',
|
|
|
- reportType: 'cy',
|
|
|
- reportIds: ['cy_ryrs'],
|
|
|
- type: 1,
|
|
|
- groupColumn: '',
|
|
|
+ reportType: '',
|
|
|
+ reportIds: ['mz_yyl','mz_myd','mz_cjfyzzl'],
|
|
|
+ type: 2,
|
|
|
+ groupColumn: 'yf',
|
|
|
}
|
|
|
$.ajax({
|
|
|
type: "post",
|
|
@@ -544,22 +586,7 @@ $('.dropdown-menu1').click(function(event) {
|
|
|
headers: {'content-type': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
data: JSON.stringify(query),
|
|
|
success: function (res) {
|
|
|
- if (res == '401' || res == 401) {
|
|
|
- window.location.href = '/thmz/login/view'
|
|
|
- return;
|
|
|
- }
|
|
|
- if (res.code == 0) {
|
|
|
- console.log('接口返回的参数--------', res.data)
|
|
|
- // $("#registrationNum").html(res.registrationNum);
|
|
|
- // $("#haveClinicalNum").html(res.haveClinicalNum);
|
|
|
- // if (res.ghAmount != null) {
|
|
|
- // $("#ghAmount").html(res.ghAmount.toFixed(2));
|
|
|
- // }
|
|
|
- // if (res.sfAmount != null) {
|
|
|
- // $("#sfAmount").html(res.sfAmount.toFixed(2));
|
|
|
- // }
|
|
|
- }
|
|
|
-
|
|
|
+ ajax1Data(res)
|
|
|
}
|
|
|
});
|
|
|
})
|
|
@@ -572,7 +599,7 @@ $('.dropdown-menu2').click(function(event) {
|
|
|
endTime: today_Date(' 23:59:59'),
|
|
|
reportId: '',
|
|
|
reportType: '',
|
|
|
- reportIds: ['mz_mzjcfzb','mz_mzypfzb','mz_ybjjsr'],
|
|
|
+ reportIds: ['mz_mzjcfzb','mz_mzypfzb','mz_ybbxbl'],
|
|
|
type: 2,
|
|
|
groupColumn: 'yf',
|
|
|
}
|
|
@@ -583,40 +610,7 @@ $('.dropdown-menu2').click(function(event) {
|
|
|
headers: {'content-type': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
data: JSON.stringify(query),
|
|
|
success: function (res) {
|
|
|
- if (res == '401' || res == 401) {
|
|
|
- window.location.href = '/thmz/login/view'
|
|
|
- return;
|
|
|
- }
|
|
|
- if (res.code == 0) {
|
|
|
- console.log('接口返回的参数--------', res.data)
|
|
|
- let jczb = []
|
|
|
- let yzb = []
|
|
|
- let jjzb= []
|
|
|
- res.data.mz_mzjcfzb.forEach(ele => {
|
|
|
- jczb.push(ele.value)
|
|
|
- });
|
|
|
- res.data.mz_mzypfzb.forEach(ele => {
|
|
|
- yzb.push(ele.value)
|
|
|
- });
|
|
|
- res.data.mz_ybjjsr.forEach(ele => {
|
|
|
- jjzb.push(ele.value)
|
|
|
- });
|
|
|
- option.series[0].data = jczb
|
|
|
- option.series[1].data = yzb
|
|
|
- option.series[2].data = jjzb
|
|
|
- option.xAxis.data = res.data.yf
|
|
|
- myChart.setOption(option, true)
|
|
|
- console.log('折线图数据----------', option);
|
|
|
- // $("#registrationNum").html(res.registrationNum);
|
|
|
- // $("#haveClinicalNum").html(res.haveClinicalNum);
|
|
|
- // if (res.ghAmount != null) {
|
|
|
- // $("#ghAmount").html(res.ghAmount.toFixed(2));
|
|
|
- // }
|
|
|
- // if (res.sfAmount != null) {
|
|
|
- // $("#sfAmount").html(res.sfAmount.toFixed(2));
|
|
|
- // }
|
|
|
- }
|
|
|
-
|
|
|
+ ajax2Data(res)
|
|
|
}
|
|
|
});
|
|
|
})
|