(function(){ Vue.component('renew-progress-filter',{ template:'
', 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>=2017; 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 }); }, } }); })()