|
@ -25,85 +25,12 @@ new Vue({
|
|
hasData4:true,
|
|
hasData4:true,
|
|
hasData5:true,
|
|
hasData5:true,
|
|
hasData6:true,
|
|
hasData6:true,
|
|
firstDay: "", //上月第一天
|
|
|
|
lastDay: "", //上月最后一天
|
|
|
|
firstDayYear: "", //本年第一天
|
|
|
|
lastDayYear: "", //本年最后一天
|
|
|
|
halfYearStartDate: "", //近半年开始时间
|
|
|
|
halfYearEndDate: "", //近半年结束时间
|
|
|
|
yesterdayDate:""//昨天
|
|
|
|
},
|
|
},
|
|
mounted: function() {
|
|
mounted: function() {
|
|
// this.formatDate2017(); //格式化时间
|
|
|
|
this.initDataNew();
|
|
|
|
|
|
this.initData();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
initData: function() {
|
|
initData: function() {
|
|
$(".div-mask-layer").show();
|
|
|
|
var vm = this,data1, data2, data3, data4, data5, data6, data7, data8;
|
|
|
|
this.town.map(function(v, i) {
|
|
|
|
if(v.name == vm.city) {
|
|
|
|
vm.cityVal = v.id;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
var linkageFilter1 = "quotaDate >= '" + vm.firstDay + "' and quotaDate <= '" + vm.lastDay + "';";
|
|
|
|
if(vm.cityVal!="0") {
|
|
|
|
linkageFilter1 += "town=" + vm.cityVal + ";";
|
|
|
|
}
|
|
|
|
var linkageFilter2 = "quotaDate >= '" + vm.firstDayYear + "' and quotaDate <= '" + vm.lastDayYear + "';";
|
|
|
|
if(vm.cityVal!="0") {
|
|
|
|
linkageFilter2 += "town=" + vm.cityVal + ";";
|
|
|
|
}
|
|
|
|
var linkageFilter3 = "quotaDate >= '" + vm.halfYearStartDate + "' and quotaDate <= '" + vm.halfYearEndDate + "';";
|
|
|
|
if(vm.cityVal!="0") {
|
|
|
|
linkageFilter3 += "town=" + vm.cityVal + ";";
|
|
|
|
}
|
|
|
|
var linkageFilter4 = "quotaDate >= '" + vm.yesterdayDate + "' and quotaDate <= '" + vm.yesterdayDate + "';";
|
|
|
|
if(vm.cityVal!="0") {
|
|
|
|
linkageFilter4 += "town=" + vm.cityVal + ";";
|
|
|
|
}
|
|
|
|
var reqUrl = [{url: bigDataAPI.getCityArea,reqType: 'get',data: {}},
|
|
|
|
{url: bigDataAPI.getNoChartTemplateData,reqType: 'get',data: {viewCodeStr: "VIEW_14_0011",linkageFilter:linkageFilter1}},//左上角-上月
|
|
|
|
{url: bigDataAPI.getNoChartTemplateData,reqType: 'get',data: {viewCodeStr: "VIEW_14_0011",linkageFilter:linkageFilter2}},//左上角-本年
|
|
|
|
{url: bigDataAPI.getNoChartTemplateData,reqType: 'get',data: {viewCodeStr: "VIEW_14_0012",linkageFilter:linkageFilter4}},
|
|
|
|
{url: bigDataAPI.getNoChartTemplateData,reqType: 'get',data: {viewCodeStr: "VIEW_14_0013",linkageFilter:linkageFilter3}},//
|
|
|
|
{url: bigDataAPI.getNoChartTemplateData,reqType: 'get',data: {viewCodeStr: "VIEW_14_0014",linkageFilter:linkageFilter3}},//
|
|
|
|
{url: bigDataAPI.getTemplateDataByViewCode,reqType: 'get',data: {viewCode: "VIEW_14_0015",linkageFilter:linkageFilter3}},//门诊人次月趋势
|
|
|
|
{url: bigDataAPI.getTemplateDataByViewCode,reqType: 'get',data: {viewCode: "VIEW_14_0016",linkageFilter:linkageFilter3}},//住院人次月趋势
|
|
|
|
{url: bigDataAPI.getTemplateDataByViewCode,reqType: 'get',data: {viewCode: "VIEW_14_0017",linkageFilter:linkageFilter3}},//门诊分类别月趋势
|
|
|
|
{url: bigDataAPI.getTemplateDataByViewCode,reqType: 'get',data: {viewCode: "VIEW_14_0018",linkageFilter:linkageFilter3}},//住院平均日数月趋势
|
|
|
|
{url:bigDataAPI.getMapJingWeiDuInfo,reqType: 'get',data:{}}//上饶地图经纬度数据
|
|
|
|
];
|
|
|
|
httpRequest.getReqPromises(reqUrl).then(function(datas) {
|
|
|
|
vm.town = [{
|
|
|
|
"name": "上饶市",
|
|
|
|
"id": "0"
|
|
|
|
}].concat(datas[0]);
|
|
|
|
vm.leftData1 = datas[1];
|
|
|
|
vm.leftData2 = datas[2];
|
|
|
|
data3 = datas[3];
|
|
|
|
data4 = datas[4];
|
|
|
|
data5 = datas[5];
|
|
|
|
data6 = datas[6];
|
|
|
|
data7 = datas[7];
|
|
|
|
data8 = datas[8];
|
|
|
|
data9 = datas[9];
|
|
|
|
data10 = datas[10];
|
|
|
|
|
|
|
|
vm.setLeftChart1(data6);
|
|
|
|
vm.setLeftChart2(data7);
|
|
|
|
vm.setRightChart1(data8);
|
|
|
|
vm.setRightChart2(data9);
|
|
|
|
vm.setTable1(data4);
|
|
|
|
vm.setTable2(data5);
|
|
|
|
vm.setleftData1();
|
|
|
|
echarts.registerMap('上饶',data10);
|
|
|
|
vm.setMapData(data3);
|
|
|
|
vm.setYesterDay(data3);
|
|
|
|
$(".div-mask-layer").hide();
|
|
|
|
})
|
|
|
|
},
|
|
|
|
initDataNew: function() {
|
|
|
|
$(".div-mask-layer").show();
|
|
$(".div-mask-layer").show();
|
|
var vm = this,data1, data2, data3, data4, data5, data6, data7, data8;
|
|
var vm = this,data1, data2, data3, data4, data5, data6, data7, data8;
|
|
this.town.map(function(v, i) {
|
|
this.town.map(function(v, i) {
|
|
@ -127,7 +54,7 @@ new Vue({
|
|
if(vm.cityVal!="0") {
|
|
if(vm.cityVal!="0") {
|
|
linkageFilter4 += "town=" + vm.cityVal + ";";
|
|
linkageFilter4 += "town=" + vm.cityVal + ";";
|
|
}
|
|
}
|
|
var ob = {VIEW_04_0009:"town=361102;quotaDate >= '2017-01-01' and quotaDate <= '2017-06-30';",VIEW_04_00010:"town=361102;quotaDate >= '2017-01-01' and quotaDate <= '2017-06-30';"};
|
|
|
|
|
|
|
|
|
|
|
|
var reqUrl = [{url: bigDataAPI.getCityArea,reqType: 'get',data: {}},
|
|
var reqUrl = [{url: bigDataAPI.getCityArea,reqType: 'get',data: {}},
|
|
{url: bigDataAPI.getNoChartTemplateData,reqType: 'get',data: {viewCodeStr: "VIEW_14_0011",linkageFilter:linkageFilter1}},//左上角-上月
|
|
{url: bigDataAPI.getNoChartTemplateData,reqType: 'get',data: {viewCodeStr: "VIEW_14_0011",linkageFilter:linkageFilter1}},//左上角-上月
|
|
@ -140,7 +67,6 @@ new Vue({
|
|
{url: bigDataAPI.getTemplateDataByViewCode,reqType: 'get',data: {viewCode: "VIEW_14_0017",linkageFilter:linkageFilter3}},//门诊分类别月趋势
|
|
{url: bigDataAPI.getTemplateDataByViewCode,reqType: 'get',data: {viewCode: "VIEW_14_0017",linkageFilter:linkageFilter3}},//门诊分类别月趋势
|
|
{url: bigDataAPI.getTemplateDataByViewCode,reqType: 'get',data: {viewCode: "VIEW_14_0018",linkageFilter:linkageFilter3}},//住院平均日数月趋势
|
|
{url: bigDataAPI.getTemplateDataByViewCode,reqType: 'get',data: {viewCode: "VIEW_14_0018",linkageFilter:linkageFilter3}},//住院平均日数月趋势
|
|
{url:bigDataAPI.getMapJingWeiDuInfo,reqType: 'get',data:{}},//上饶地图经纬度数据
|
|
{url:bigDataAPI.getMapJingWeiDuInfo,reqType: 'get',data:{}},//上饶地图经纬度数据
|
|
// {url:"/gov/report/getMoreNoChartTemplateData",reqType: 'get',data:{viewMapJson:JSON.stringify(ob)}}
|
|
|
|
];
|
|
];
|
|
httpRequest.getReqPromises(reqUrl).then(function(datas) {
|
|
httpRequest.getReqPromises(reqUrl).then(function(datas) {
|
|
vm.town = [{
|
|
vm.town = [{
|
|
@ -214,19 +140,19 @@ new Vue({
|
|
},
|
|
},
|
|
setLeftChart1: function(data6) {
|
|
setLeftChart1: function(data6) {
|
|
var options = null;
|
|
var options = null;
|
|
var options = data6.successFlg?JSON.parse(data6.obj.viewInfos[0].options[0].option):{};
|
|
|
|
if(options.series && options.series[0].data && options.series[1].data){
|
|
|
|
|
|
var options = data6.successFlg?data6.obj.viewInfos&&JSON.parse(data6.obj.viewInfos[0].options[0].option):{};
|
|
|
|
if(options&&options.series && options.series[0].data && options.series[1].data){
|
|
options = leftChart1DataFormat(options);
|
|
options = leftChart1DataFormat(options);
|
|
this.leftChart1 = options;
|
|
this.leftChart1 = options;
|
|
this.hasData1 = true;
|
|
this.hasData1 = true;
|
|
}else{
|
|
}else{
|
|
this.hasData2 = false;
|
|
|
|
|
|
this.hasData1 = false;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
setLeftChart2: function(data7) {
|
|
setLeftChart2: function(data7) {
|
|
var options = null;
|
|
var options = null;
|
|
var options = data7.successFlg?JSON.parse(data7.obj.viewInfos[0].options[0].option):{};
|
|
|
|
if(options.series && options.series[0].data && options.series[1].data){
|
|
|
|
|
|
var options = data7.successFlg?data7.obj.viewInfos&&JSON.parse(data7.obj.viewInfos[0].options[0].option):{};
|
|
|
|
if(options&&options.series && options.series[0].data && options.series[1].data){
|
|
options = leftChart2DataFormat(options);
|
|
options = leftChart2DataFormat(options);
|
|
this.leftChart2 = options;
|
|
this.leftChart2 = options;
|
|
this.hasData2 = true;
|
|
this.hasData2 = true;
|
|
@ -251,9 +177,10 @@ new Vue({
|
|
};
|
|
};
|
|
},
|
|
},
|
|
setRightChart1: function(data8) {
|
|
setRightChart1: function(data8) {
|
|
|
|
debugger
|
|
var options = null;
|
|
var options = null;
|
|
var options = data8.successFlg?JSON.parse(data8.obj.viewInfos[0].options[0].option):{};
|
|
|
|
if(options.series && options.series[0].data && options.series[1].data && options.series[2].data && options.series[3].data){
|
|
|
|
|
|
var options = data8.successFlg?data8.obj.viewInfos&&JSON.parse(data8.obj.viewInfos[0].options[0].option):{};
|
|
|
|
if(options&&options.series && options.series[0].data && options.series[1].data && options.series[2].data && options.series[3].data){
|
|
options = rightChart1DataFormat(options);
|
|
options = rightChart1DataFormat(options);
|
|
this.rightChart1 = options
|
|
this.rightChart1 = options
|
|
this.hasData4 = true;
|
|
this.hasData4 = true;
|
|
@ -265,8 +192,8 @@ new Vue({
|
|
},
|
|
},
|
|
setRightChart2: function(data9) {
|
|
setRightChart2: function(data9) {
|
|
var options = null;
|
|
var options = null;
|
|
var options = data9.successFlg?JSON.parse(data9.obj.viewInfos[0].options[0].option):{};
|
|
|
|
if(options.series && options.series[0].data && options.series[1].data){
|
|
|
|
|
|
var options = data9.successFlg?data9.obj.viewInfos&&JSON.parse(data9.obj.viewInfos[0].options[0].option):{};
|
|
|
|
if(options&&options.series && options.series[0].data && options.series[1].data){
|
|
options = rightChart2DataFormat(options);
|
|
options = rightChart2DataFormat(options);
|
|
this.rightChart2 = options
|
|
this.rightChart2 = options
|
|
this.hasData6 = true;
|
|
this.hasData6 = true;
|