|
@ -33,11 +33,15 @@ new Vue({
|
|
|
halfYearStartDate: "", //近半年开始时间
|
|
|
halfYearEndDate: "", //近半年结束时间
|
|
|
yesterdayDate:"",//昨天
|
|
|
type:0
|
|
|
type:0,
|
|
|
time:''//42天前
|
|
|
},
|
|
|
mounted: function() {
|
|
|
var vm = this;
|
|
|
this.formatDate();
|
|
|
var t = new Date(vm.firstMonth+'-'+'01');
|
|
|
t = Date.parse(t)-3600*24*42*1000
|
|
|
vm.time = new Date(t).Format('yyyy-MM-dd');
|
|
|
this.initData(this.type);
|
|
|
var myDate = new Date();
|
|
|
var maxMonth = myDate.getMonth()+1; //获取当前月份(0-11,0代表1月)
|
|
@ -63,6 +67,9 @@ new Vue({
|
|
|
console.log(date); //得到日期时间对象:{year: 2017, month: 8, date: 18, hours: 0, minutes: 0, seconds: 0}
|
|
|
console.log(endDate); //得结束的日期时间对象,开启范围选择(range: true)才会返回。对象成员同上。
|
|
|
console.log(vm.firstDay);
|
|
|
var t = new Date(date.year+'-'+date.month+'-'+'01');
|
|
|
t = Date.parse(t)-3600*24*42*1000
|
|
|
vm.time = new Date(t).Format('yyyy-MM-dd');
|
|
|
if(date.month < 10){
|
|
|
vm.firstDay = date.year+'-0'+date.month+'-01';
|
|
|
}else{
|
|
@ -94,14 +101,15 @@ new Vue({
|
|
|
event_type = 0;//门诊
|
|
|
}
|
|
|
var linkageFilter1 = "quotaDate >= '" + vm.firstDay + "' and quotaDate <= '" + vm.lastDay + "';";
|
|
|
var linkageFilter2 = "quotaDate >= '" + vm.time + "' and quotaDate <= '" + vm.lastDay + "';";
|
|
|
var linkageFilter3 = "quotaDate >= '" + vm.halfYearStartDate + "' and quotaDate <= '" + vm.halfYearEndDate + "';";
|
|
|
console.log(linkageFilter1)
|
|
|
var code = this.code;
|
|
|
var urlNumber = '/gov/report/getNoChartTemplateData';
|
|
|
var urlChart = '/gov/report/getTemplateDataByViewCode';
|
|
|
var reqUrl = [
|
|
|
{url:urlNumber,reqType: 'get',data: {viewCodeStr:code[0]}},//总人数
|
|
|
{url:urlNumber,reqType: 'get',data: {viewCodeStr:code[1],linkageFilter:linkageFilter1}},//新增人数
|
|
|
{url:urlNumber,reqType: 'get',data: {viewCodeStr:code[0],linkageFilter:linkageFilter1}},//新增人数
|
|
|
{url:urlNumber,reqType: 'get',data: {viewCodeStr:code[1],linkageFilter:linkageFilter2}},//已生产人数
|
|
|
{url:urlChart,reqType: 'get',data: {viewCode:code[2],linkageFilter:linkageFilter1+'eventType='+event_type}},//区县分布
|
|
|
{url:urlChart,reqType: 'get',data: {viewCode:code[3],linkageFilter:linkageFilter1+'eventType='+event_type}},//性别分布
|
|
|
{url:urlChart,reqType: 'get',data: {viewCode:code[4],linkageFilter:linkageFilter1+'eventType='+event_type}},//疾病前五
|
|
@ -111,8 +119,8 @@ new Vue({
|
|
|
$(".div-mask-layer").show();
|
|
|
httpRequest.getReqPromises(reqUrl).then(function(datas) {
|
|
|
console.log(datas);
|
|
|
vm.alertData1 = datas[1].obj.VIEW_16_0006[0].HC_13_0034; //新增
|
|
|
vm.alertData2 = datas[0].obj.VIEW_16_0001[0].HC_13_0033; //已生产人数
|
|
|
vm.alertData1 = datas[0].obj.VIEW_16_0001[0].HC_13_0033; //新增
|
|
|
vm.alertData2 = datas[1].obj.VIEW_16_0006[0].HC_13_0034; //已生产人数
|
|
|
var chart1 = datas[2].obj.viewInfos[0].options[0].option;
|
|
|
var chart2 = datas[3].obj.viewInfos[0].options[0].option;
|
|
|
var chart3 = datas[4].obj.viewInfos[0].options[0].option;
|
|
@ -193,7 +201,6 @@ new Vue({
|
|
|
this.alertChart4 = options
|
|
|
},
|
|
|
setAlertChart5:function(data){
|
|
|
console.log(options)
|
|
|
var options = JSON.parse(data);
|
|
|
options = qushiChart(options);
|
|
|
// var options = this.bigData[t]['区县分布'];
|