(function(){ Vue.component('area-data-panel',{ template: '
\
\
各区
\
社区
\
团队
\
\ \ \ \ \ \ \ \ \ \ \ \
{{th}}
\
{{row.rank}}
\
{{col}}
\ {{col}}\
\
', props:[], data: function(){ return { index: '', level: '', lowLevel: '', area: '', headers: [], rows: [], year:'', cityLevelNoShowTeamTab: false, districtLevelNoShowTeamTab: false } }, mounted: function(){ var vm = this; EventBus.$on("render-area-data", function(arg){ vm.index = arg.index; vm.level = arg.level; vm.lowLevel = arg.lowLevel; vm.area = arg.area; vm.headers = arg.headers; vm.rows = arg.rows; vm.year=arg.year; vm.cityLevelNoShowTeamTab = arg.cityLevelNoShowTeamTab; vm.districtLevelNoShowTeamTab = arg.districtLevelNoShowTeamTab; }) }, computed: { showTeamTab: function(){ if(this.cityLevelNoShowTeamTab){ if(this.level == 4){ return false; }else{ if(this.districtLevelNoShowTeamTab){ if(this.level == 3){ return false; }else{ return true; } }else{ return true; } } }else{ return true; } } }, methods: { getLowLeverData: function(row){ var vm=this if(this.level > 2 && this.lowLevel != 1){ //跳转去下一级数据 if(this.lowLevel && (this.level - this.lowLevel) >= 2){ //从次级tab的内容查看再下一级的数据 this.level = this.level - 2; this.lowLevel --; }else{ this.level --; this.lowLevel = ''; } this.area = row.code; this.areaTitle = row.name; //触发组件监听事件,去父页面请求新的数据 this.$emit("getnewdata", { level: this.level, area: this.area, areaTitle: this.areaTitle, lowLevel: this.lowLevel, }); }else{ var title="团队信息" var size="md" var component='team-info' if(this.index==27){ title="团队信息和代预约记录" size="lg" component='team-info-dyy' } //弹框显示团队信息 Vuedals.Bus.$emit('new', { title: title, component: component, props: { teamId: row.code, year: vm.year }, size:size }); } }, getLowCodeData: function(code){ if(code == 3){ this.lowLevel = ''; }else{ this.lowLevel = code; } //触发组件监听事件,去父页面请求新的数据 this.$emit("getnewdata", { level: this.level, area: this.area, lowLevel: this.lowLevel }); } } }); })()