فهرست منبع

统计分析修改签约时间

chenyubai 1 سال پیش
والد
کامیت
f0e2684271

+ 27 - 12
app/statistics/js/blessing-analysis.js

@ -183,7 +183,7 @@ function initData(vm) {
	vm.area = vm.userRole.code;
	vm.areaTitle = vm.userRole.name;
	var now = new Date();
	if (now.getMonth() >= 6) {
	if (now.getMonth() >= 6 || now.getFullYear()>=2023) {
		vm.chooseYear = now.getFullYear();
	} else {
		vm.chooseYear = now.getFullYear() - 1;
@ -246,9 +246,9 @@ function initReqParams(vm) {
function initYear(vm) {
	var now = new Date(),
		year = now.getFullYear();
	if (now.getMonth() < 6) {
		year--;
	}
	// if (now.getMonth() < 6) {
	// 	year--;
	// }
	for (i = year; i > 2018; i--) {
		vm.years.push(i);
	}
@ -388,13 +388,28 @@ function listHandle(data, vm) {
}
//获取结束时间
function getEndDate(chooseYear) {
	chooseYear = parseInt(chooseYear);
	var endDate = new Date((chooseYear + 1) + '-06-29'),
		now = new Date();
	var yesterday = new Date(now.setDate(now.getDate() - 1))
	if (yesterday <= endDate) {
		return yesterday.format("yyyy-MM-dd");
	} else {
		return (chooseYear + 1) + '-06-29';
	
	var nowdate = new Date();
	var year = nowdate.getFullYear();
	var month = nowdate.getMonth() + 1;
	var day = nowdate.getDate();
	var endDate = ''
	if(chooseYear < '2022') {
		endDate = new Date((parseInt(chooseYear)+1) + '-06-30');
	}else{
		endDate = new Date((parseInt(chooseYear)) + '-12-31');
	}
	var now = new Date();
	
	if(now <= endDate){
	    return now.format("yyyy-MM-dd");
	}else{
		if(chooseYear < '2022') {
			return (parseInt(chooseYear)+1) + '-06-30';
		}else{
			return (parseInt(chooseYear)) + '-12-31';
		}
	}
	
	 
}

+ 33 - 11
app/statistics/js/common.js

@ -5,29 +5,51 @@ function getSignDate(){   //获取初始化签约年
	var nowdate = new Date();
    var year = nowdate.getFullYear();
    var month = nowdate.getMonth() + 1;
    if(month<=6){
    if(year>=2023){
    	year = year
    }else if(month<=6){
    	year = year - 1
    }
    return year
}
function getStartDate(chooseYear){
    // 按年度来计算的时候,开始时间是该年度7月1号还是到下一个年的6月30号结束
	// 2022年及以前开始时间07-01
	// 2023及以后开始时间01-01
	
    if(chooseYear == 2016){
        return chooseYear + "-08-01";
    }else{
        return chooseYear+'-07-01';
    }else if(chooseYear <= 2022) {
		return chooseYear+'-07-01';
	}else if(chooseYear >= 2023){
        return chooseYear+'-01-01';
    }
}
//获取结束时间
function getEndDate(chooseYear){
    chooseYear = parseInt(chooseYear);
    var endDate = new Date((chooseYear+1) + '-06-30'),
        now = new Date();
    if(now <= endDate){
        return now.format("yyyy-MM-dd");
    }else{
        return (chooseYear+1) + '-06-30';
    }
	
	var nowdate = new Date();
	var year = nowdate.getFullYear();
	var month = nowdate.getMonth() + 1;
	var day = nowdate.getDate();
	var endDate = ''
	if(chooseYear < '2022') {
		endDate = new Date((parseInt(chooseYear)+1) + '-06-30');
	}else{
		endDate = new Date((parseInt(chooseYear)) + '-12-31');
	}
	var now = new Date();
	
	if(now <= endDate){
	    return now.format("yyyy-MM-dd");
	}else{
		if(chooseYear < '2022') {
			return (parseInt(chooseYear)+1) + '-06-30';
		}else{
			return (parseInt(chooseYear)) + '-12-31';
		}
	}
	
}
//获取结束时间29
function getEndDate29(chooseYear){

+ 1 - 1
app/statistics/js/comprehensive-analysis.js

@ -230,7 +230,7 @@ function initData(vm){
    EventBus.$emit('update-area-name', {areaName: vm.areaTitle});
    
    var now = new Date();
    if(now.getMonth() >= 6){
    if(now.getMonth() >= 6 || now.getFullYear()>=2023){
        vm.chooseYear = now.getFullYear();
    }else{
        vm.chooseYear = now.getFullYear() - 1;

+ 2 - 2
app/statistics/js/comprehensive-query.js

@ -1044,7 +1044,7 @@ new Vue({
			if(vm.radio=="1"){
				if(vm.chooseYear == 2022) {
					startDate = '2022-07-01'
					endDate = getEndDate(vm.chooseYear)
					endDate = '2022-12-31'
				}else if(vm.chooseYear > 2022) {
					startDate = vm.chooseYear + '-01-01'  
					endDate = getEndDate(vm.chooseYear)
@ -1076,7 +1076,7 @@ new Vue({
			}
			if(vm.handleNodeId == 0 || vm.handleNodeId == 'huizongshuju') {
				var checkTree
				if(vm.handleNodeId == 0) {
				if(vm.tabsId == 1) {
					checkTree = vm.$refs.tree.getCheckedNodes(true);
				}else{
					checkTree = vm.$refs.collectTree.getCheckedNodes(true);

+ 10 - 2
app/statistics/js/consult-not-reply.js

@ -77,8 +77,16 @@ new Vue({
		beforeReq:function(flag){
			var vm=this,startDate="",endDate=""
			if(vm.radio=="1"){
				startDate = getStartDate(vm.chooseYear-1)
				endDate = getEndDate(vm.chooseYear)
				if(vm.chooseYear == 2022) {
					startDate = '2022-07-01'
					endDate = '2022-12-31'
				}else if(vm.chooseYear > 2022) {
					startDate = vm.chooseYear + '-01-01'  
					endDate = getEndDate(vm.chooseYear)
				}else{
					startDate = getStartDate(vm.chooseYear)
					endDate = getEndDate(vm.chooseYear)
				}
			}else{
				if(!vm.start&&!vm.end){
					this.$message({

+ 1 - 1
app/statistics/js/consulting-analysis.js

@ -129,7 +129,7 @@ function initData(vm){
    EventBus.$emit('update-area-name', {areaName: vm.areaTitle});
    
    var now = new Date();
    if(now.getMonth() >= 6){
    if(now.getMonth() >= 6 || now.getFullYear()>=2023){
        vm.chooseYear = now.getFullYear();
    }else{
        vm.chooseYear = now.getFullYear() - 1;

+ 1 - 1
app/statistics/js/health-management-analysis.js

@ -196,7 +196,7 @@ function initData(vm){
    EventBus.$emit('update-area-name', {areaName: vm.areaTitle});
    
    var now = new Date();
    if(now.getMonth() >= 6){
    if(now.getMonth() >= 6 || now.getFullYear()>=2023){
        vm.chooseYear = now.getFullYear();
    }else{
        vm.chooseYear = now.getFullYear() - 1;

+ 5 - 5
app/statistics/js/prescription-analysis.js

@ -293,11 +293,11 @@ function initData(vm){
    vm.areaTitle = vm.userRole.name;
    var now = new Date(),
        year = now.getFullYear();
    if(now.getMonth() < 6){
        vm.chooseYear = year - 1;
    }else {
        vm.chooseYear = year;
    }
    // if(now.getMonth() < 6 ){
    //     vm.chooseYear = year - 1;
    // }else {
    // }
	vm.chooseYear = year;
    vm.startDate = vm.sDate = getStartDate(vm.chooseYear);
    vm.endDate = vm.eDate = getEndDate(vm.chooseYear);
    

+ 1 - 1
app/statistics/js/renew-progress.js

@ -191,7 +191,7 @@ function initData(vm) {
	vm.area = vm.userRole.code;
	vm.areaTitle = vm.userRole.name;
	var now = new Date();
	if(now.getMonth() >= 6) {
	if(now.getMonth() >= 6 || now.getFullYear()>=2023 ) {
		vm.chooseYear = now.getFullYear();
	} else {
		vm.chooseYear = now.getFullYear() - 1;

+ 1 - 1
app/statistics/js/sign-progress.js

@ -196,7 +196,7 @@ function initData(vm) {
	vm.area = vm.userRole.code;
	vm.areaTitle = vm.userRole.name;
	var now = new Date();
	if(now.getMonth() >= 6) {
	if(now.getMonth() >= 6 || now.getFullYear()>=2023) {
		vm.chooseYear = now.getFullYear();
	} else {
		vm.chooseYear = now.getFullYear() - 1;

+ 2 - 0
app/statistics/js/special-analysis.js

@ -267,6 +267,8 @@ new Vue({
			        chartheight:"260",
			        unit:"人",
			        noshowDate:false,
					startDate:vm.start,
					endDate:vm.end,
			   });
			},300)
		},

+ 10 - 2
component/rehabilitation/server-items-detail.js

@ -593,12 +593,20 @@ Vue.component('server-items-detail', {
						var future=_currentTimeStamp>thatTime?0:(_currentTimeStamp==thatTime?1:2);
						item.future=future;
						list.push(item);
//							vm.calendarData.push(item);
							// vm.calendarData.push(item);
					}
					vm.calendarData = _.chunk(list, 7)
					vm.calendarData = vm.chunkFunction(list, 7)
				}
			})
		},
		chunkFunction:function(arr, size) {
			let changeIndex = 0;
			let secondArr = [];
			while (changeIndex < arr.length) {
				secondArr.push(arr.slice(changeIndex, changeIndex += size))
			}
			return secondArr;
		},
		//时间轴请求
		timeAxis:function(){
			var m_days=new Array(31,(28+this.is_leap(this.ynow)),31,30,31,30,31,31,30,31,30,31);  //每个月的天数

+ 14 - 11
component/statistics/line-chart-single.js

@ -122,13 +122,16 @@
            dataZoom_end = 0;
        }
        //初始结束时间
        var lastValue = xData[xData.length - 1];
        if(vm.selectedDateType == 1 || vm.selectedDateType == 2){
            vm.endDate = lastValue;
        }else if(vm.selectedDateType == 3){
            var val = lastValue.substr(5,2)+"月"
            vm.endDate = lastValue.substr(0,4)+"年"+val;
        }
		
		vm.startDate = arg.startDate
		vm.endDate = arg.endDate
        // var lastValue = xData[xData.length - 1];
        // if(vm.selectedDateType == 1 || vm.selectedDateType == 2){
        //     vm.endDate = lastValue;
        // }else if(vm.selectedDateType == 3){
        //     var val = lastValue.substr(5,2)+"月"
        //     vm.endDate = lastValue.substr(0,4)+"年"+val;
        // }
        var options = {
            tooltip: {
                trigger: 'axis'
@ -156,21 +159,21 @@
                    formatter: function (value, index) {
                        if(vm.selectedDateType == 1 || vm.selectedDateType == 2){
                            if(index == 0){
                                vm.startDate = value;
                                // vm.startDate = value;
                                return value.substr(5,2)+"月"+value.substr(8,2);
                            }else{
                                if(index == 19){
                                    vm.endDate = value;
                                    // vm.endDate = value;
                                }
                                return value.substr(8,2);
                            }
                        }else if(vm.selectedDateType == 3){
                            var val = value.substr(5,2)+"月"
                            if(index == 0){
                                vm.startDate = value.substr(0,4)+"年"+val;
                                // vm.startDate = value.substr(0,4)+"年"+val;
                            }else{
                                if(index == 19){
                                    vm.endDate = value.substr(0,4)+"年"+val;
                                    // vm.endDate = value.substr(0,4)+"年"+val;
                                }
                            }
                            return val;

+ 11 - 9
component/statistics/line-chart2.js

@ -125,14 +125,16 @@
            dataZoom_end = 0;
        }
        //初始结束时间
        var lastValue = xData[xData.length - 1];
        if(vm.selectedDateType == 1 || vm.selectedDateType == 2){
            vm.endDate = lastValue;
        }else if(vm.selectedDateType == 3){
            var val = lastValue.substr(5,2)+"月"
            vm.endDate = arg.endDate;
            vm.startDate=arg.startDate
        }
		vm.endDate = arg.endDate;
		vm.startDate=arg.startDate
        // var lastValue = xData[xData.length - 1];
        // if(vm.selectedDateType == 1 || vm.selectedDateType == 2){
        //     vm.endDate = lastValue;
        // }else if(vm.selectedDateType == 3){
        //     var val = lastValue.substr(5,2)+"月"
        //     vm.endDate = arg.endDate;
        //     vm.startDate=arg.startDate
        // }
        var options = {
            tooltip: {
                trigger: 'axis'
@ -169,7 +171,7 @@
                                // vm.startDate = value;
                            }else{
                                if(index == 19){
                                    vm.endDate = value;
                                    // vm.endDate = value;
                                }
                            }
                            return val;

+ 3 - 3
component/statistics/prescription-filter.js

@ -94,9 +94,9 @@
            }
            var now = new Date(),
                year = now.getFullYear();
            if(now.getMonth() < 6){
                year = year - 1;
            }
            // if(now.getMonth() < 6){
            //     year = year - 1;
            // }
            for(i=year; i>=2017; i--){
                this.years.push(i);
            }

+ 3 - 3
component/statistics/renew-progress-filter.js

@ -47,9 +47,9 @@
			mounted: function(){
				var now = new Date(),
					year = now.getFullYear();
				if(now.getMonth() < 6){
					year --;
				}
				// if(now.getMonth() < 6){
				// 	year --;
				// }
				for(i=year; i>=2017; i--){
					this.years.push(i);
				}

+ 5 - 5
component/statistics/resident-analysis-filter.js

@ -32,11 +32,11 @@
				var now = new Date(),
				    year = now.getFullYear();
				var yearHtml = "";
				if(now.getMonth() >= 6){
				    yearHtml += '<div  class="c-33 mt20 active" style="margin-left:0;margin-right:3%;" data-val="'+year+'"><a>'+year+"</a></div>";
				}
				for(i=year-1; i>=2016; i--){
				    if(i == (year-1) && now.getMonth() < 6){
				// if(now.getMonth() >= 6){
				//     yearHtml += '<div  class="c-33 mt20 active" style="margin-left:0;margin-right:3%;" data-val="'+year+'"><a>'+year+"</a></div>";
				// }
				for(i=year; i>=2016; i--){
				    if(i == year){
				        yearHtml += '<div  class="c-33 mt20 active" style="margin-left:0;margin-right:3%;" data-val="'+i+'"><a>'+i+"</a></div>";
				    }else{
				        yearHtml += '<div  class="c-33 mt20" style="margin-left:0;margin-right:3%;" data-val="'+i+'"><a>'+i+"</a></div>";

+ 1 - 1
component/statistics/resident-analysis.js

@ -122,7 +122,7 @@ Vue.component('resident-analysis', {
	mounted: function() {
		var vm = this;
		var now = new Date();
		if(now.getMonth() >= 6) {
		if(now.getMonth() >= 6 || now.getFullYear() >= 2023) {
			vm.chooseYear = now.getFullYear();
		} else {
			vm.chooseYear = now.getFullYear() - 1;

+ 3 - 3
component/statistics/sign-progress-filter.js

@ -50,9 +50,9 @@
        mounted: function(){
            var now = new Date(),
                year = now.getFullYear();
            if(now.getMonth() < 6){
                year --;
            }
            // if(now.getMonth() < 6){
            //     year --;
            // }
            for(i=year; i>=2016; i--){
                this.years.push(i);
            }

+ 1 - 104
component/statistics/smfu-serviceList.js

@ -1,104 +1 @@
(function(){
    Vue.component('smfu-serviceList',{
        template:'<div style="height: 400px;overflow: auto;margin-bottom: 50px;">\
				<div class="mt10 ml10 filter-title">统计年份</div>\
				<div class="c-row ml40 mr10" id="signYear">\
				    <div v-for="year in years"  class="c-33 mt20" style="margin-left:0;margin-right:3%;" :class="{\'active\': year==chooseYear}" @click="yearClick(year)"><a>{{year}}</a></div>\
				</div>\
				<div class="mt20 ml10 filter-title">统计指标</div>\
				<div class="div-content">\
					<div class="mt20 div-group-btn c-row ml40 mr10">\
						<div class="div-btn c-33" v-for="item in smfuList" :class="{\'active\': smfu==item.code}" @click="selItem(item,\'smfu\')">\
							<a href="#" class="f-fs14">{{item.name}}</a>\
						</div>\
					</div>\
				</div>\
				<div class="mt20 ml10 filter-title" v-if="smfu == 2">统计维度</div>\
				<div class="div-content" v-if="smfu == 2">\
					<div class="c-row ml40 mr10">\
						<div class="c-33 mt20"  style="margin-left:0;margin-right:3%;" :class="{\'active\': rhfs.length==0}" @click="selItems(\'\',\'rhfs\')">\
							<a href="#" class="f-fs14">全部</a>\
						</div>\
						<div class="c-33 mt20"  style="margin-left:0;margin-right:3%;" v-for="item in rhfsList" :class="{\'active\': rhfs.indexOf(item.code)>-1}" @click="selItems(item,\'rhfs\')">\
							<a href="#" class="f-fs14">{{item.name}}</a>\
						</div>\
					</div>\
				</div>\
				<div id="footer">\
					<div class="c-row btn-wrap c-border-top fr">\
						<div class="div-foot-btn mr20" @click="resetClick">\
							<a href="#" class="c-666 f-fs16">重置</a>\
						</div>\
						<div class="div-foot-btn active" @click="confirmClick">\
							<a href="#" class="c-666 f-fs16">保存</a>\
						</div>\
					</div>\
				</div>\
			</div>',
        props:['chooseYear','minYear'],
        data: function(){
            return {
                years: [],
                smfuList:[{code:1,name:'上门服务'},{code:2,name:'入户访视'}],	//上门服务
				smfu:1,
				rhfsList:[{code:"5",name:'孕产妇'},{code:"6",name:'新生儿'},
				{code:"9",name:'肺结核'},{code:"8",name:'80岁以上老人'},{code:"7",name:'重性精神疾病'}],  //入户访视
				rhfs:[],
            }
        },
        mounted: function(){
            var now = new Date(),
                year = now.getFullYear();
            var minYear = 2016
            
            if(this.minYear){
            	minYear = this.minYear
            }
             
            if(now.getMonth() < 6){
                year --;
            }
            for(i=year; i>=this.minYear; i--){
                this.years.push(i);
            }
        },
        methods: {
        	 yearClick:function(val){
	          this.chooseYear = val;
	         },
	         resetClick:function(){
				this.chooseYear=this.years[0]
				this.rhfs = []
				this.smfu = 1
	         },
	         confirmClick:function(){
	         	var vm = this;
				//触发刷新
				this.$emit('vuedals:close', {
					chooseYear: vm.chooseYear,
					rhfs: vm.rhfs.join(","),
					smfu: vm.smfu
				});
	         },
	        selItem:function(item,index){
				var vm = this
				vm[index] = item.code
			},
			selItems:function(item,index){
				var vm=this
				if(item){
					var code = item.code
					var hasIndex = vm[index].indexOf(code)
					if(hasIndex>-1){
						vm[index].splice(hasIndex,1)
					}else{
						vm[index].push(code)
					}
				}else{
					vm[index] = []
				}
			},
        }
    });
    
})()
 

+ 3 - 3
component/statistics/smfw-filter.js

@ -61,9 +61,9 @@
            	minYear = this.minYear
            }
             
            if(now.getMonth() < 6){
                year --;
            }
            // if(now.getMonth() < 6){
            //     year --;
            // }
            for(i=year; i>=this.minYear; i--){
                this.years.push(i);
            }

+ 4 - 4
component/statistics/special-filter.js

@ -60,10 +60,10 @@
            	minYear = this.minYear
            }
            
            if(now.getMonth() >= 6){
                this.years.push(year);
            }
            for(i=year-1; i>=minYear; i--){
            // if(now.getMonth() >= 6){
            //     this.years.push(year);
            // }
            for(i=year; i>=minYear; i--){
                this.years.push(i);
            }
            

+ 5 - 4
component/statistics/year-filter.js

@ -47,10 +47,11 @@
            	minYear = this.minYear
            }
            
            if(now.getMonth() >= 6){
                this.years.push(year);
            }
            for(i=year-1; i>=minYear; i--){
            // if(now.getMonth() >= 6){
            //     this.years.push(year);
            // }
			
            for(i=year; i>=minYear; i--){
                this.years.push(i);
            }