Browse Source

Merge branch 'master' of http://192.168.1.220:10080/raolu/PC-application

chenyue 5 years ago
parent
commit
1f04611bc9

+ 15 - 5
app/statistics/js/renew-progress.js

@ -58,6 +58,8 @@ new Vue({
			EventBus.$emit('update-area-name', {
				areaName: this.areaTitle
			});
			
			//存储请求所带的参数
			reqList.push({
				level: this.level,
@ -123,9 +125,11 @@ new Vue({
			Vuedals.Bus.$emit('new', {
				title: '条件筛选',
				onClose: function(data) {
					vm.chooseYear = data.chooseYear;
					vm.lowCode = data.lowCode;
					vm.analysisName = data.name;
					vm.startDate = getStartDate(vm.chooseYear);
					vm.endDate = getEndDate(vm.chooseYear);
					//请求参数重置,页面类型重新开始
					vm.level = vm.userRole.code == '350200' ? 4 : vm.userRole.code.length == 6 ? 3 : 2;
					vm.area = vm.userRole.code;
@ -152,6 +156,9 @@ new Vue({
						lowCode: vm.lowCode,
						analysisType: vm.analysisType
					});
					EventBus.$emit('update-statistics-year', {
						selectDate: vm.chooseYear + "年"
					}); //更新年份
					EventBus.$emit('update-dimension-name', {
						dimensionVal: data.name
@ -161,8 +168,10 @@ new Vue({
				},
				component: 'renew-progress-filter',
				props: {
					lowCode: vm.lowCode,
					analysisName: vm.analysisName
				    chooseYear: vm.chooseYear,
				    analysisType: vm.analysisType,
				    lowCode: vm.lowCode,
				    analysisName: vm.analysisName					
				}
			});
		});
@ -191,7 +200,7 @@ function initData(vm) {
	//更新头部信息
	EventBus.$emit('update-all-prompt-info', {
		areaName: vm.areaTitle,
		selectDate: "",
		selectDate: vm.chooseYear + "年",
		dimensionVal: vm.analysisName
	});
}
@ -254,7 +263,8 @@ function initReqParams(vm) {
			level: vm.level,
			index: bIndex,
			area: vm.area,
			lowCode: vm.lowCode
			lowCode: vm.lowCode,
			year: vm.chooseYear
		}
	}];
	if(vm.lowLevel) {

+ 48 - 33
component/statistics/renew-progress-filter.js

@ -1,6 +1,10 @@
(function(){
    Vue.component('renew-progress-filter',{
        template:'<div style="height: 400px;overflow: auto;margin-bottom: 50px;">\
		template:'<div style="height: 400px;overflow: auto;margin-bottom: 50px;">\
				<div class="mt10 ml10 filter-title">统计年份</div>\
				<div class="c-row mt20 ml40 mr10" id="signYear">\
					<div v-for="year in years" class="c-33" :class="{\'active\': year==chooseYear}" @click="yearClick(year)"><a>{{year}}</a></div>\
				</div>\
				<div class="ml10 filter-title">统计维度</div>\
				<div class="div-content">\
					<div class="mt20 div-group-btn c-row ml40 mr10">\
@ -31,35 +35,46 @@
					</div>\
				</div>\
			</div>',
        props:['lowCode', 'analysisName'],
        data: function(){
            return {
                
            }
        },
        methods: {
	         contentClick:function(val, name){
	         	this.lowCode = val;
	         	this.analysisName = name;
	         },
	         resetClick:function(){
				this.lowCode = "";
	         },
	         confirmClick:function(){
	         	var vm = this;
				//触发刷新
				this.$emit('vuedals:close', {
					lowCode: vm.lowCode,
					name: vm.analysisName,
					contentHtml:$(".div-content").html()
				});
	         }
        },
        mounted: function(){
        	if(this.contentHtml){
        		$(".div-content").html(this.contentHtml);
        	}
        }
    });
    
})()
			props:['chooseYear','analysisType', 'lowCode', 'analysisName'],
			data: function(){
				return {
					years: [],
				}
			},
			mounted: function(){
				var now = new Date(),
					year = now.getFullYear();
				if(now.getMonth() < 6){
					year --;
				}
				for(i=year; i>=2016; i--){
					this.years.push(i);
				}
			},
			methods: {
				 yearClick:function(val){
				  this.chooseYear = val;
				 },
				 contentClick:function(lowCode, name){
					 this.lowCode = lowCode;
					 this.analysisName = name;
				 },
				 resetClick:function(){
					this.lowCode = '';
					this.chooseYear=this.years[0]
				 },
				 confirmClick:function(){
					 var vm = this;
					 
					//触发刷新
					this.$emit('vuedals:close', {
						chooseYear: vm.chooseYear,
						lowCode: vm.lowCode,
						name: vm.analysisName
					});
				 },
			}
		});
		
	})()
	

+ 2 - 1
component/statistics/sign-progress-filter.js

@ -66,7 +66,8 @@
	         resetClick:function(){
				this.analysisType = 1;
                this.lowCode = '';
                this.analysisName = '按任务';
				this.analysisName = '按任务';
				this.chooseYear=this.years[0]
	         },
	         confirmClick:function(){
	         	var vm = this;