(function(){
// Vue.component('vuedals', Vuedals.Component);
Vue.component('area-data-panel',{
template: '
\
\
\
\
{{th}} | \
| \
\
\
\
\
{{row.rank}} \
{{col}} \
{{col}}\
| \
| \
\
\
\
',
props:['headers','rows'],
data: function(){
return {
// headers: ["排名", "咨询量", "未回复"],
// rows: [{rank: 1, cols: ["思明区", "100", "2"]},
// {rank: 2, cols: ["海沧区", "98", "1"]}],
level: 4,
lowLevel: '',
area: '350200'
}
},
methods: {
getLowLeverData: function(row){
if(this.level > 2 && this.lowLevel != 1){
//跳转去下一级数据
this.level --;
this.area = row.code;
//触发组件监听事件,去父页面请求新的数据
this.$emit("getnewdata", {
level: this.level,
area: this.area,
lowLevel: this.lowLevel
});
}else{
//弹框显示团队信息
Vuedals.Bus.$emit('new', {
title: '团队信息',
component: 'team-info',
props: {
teamId: 644
}
});
}
},
getLowCodeData: function(code){
if(code == 3){
this.lowLevel = '';
}else{
this.lowLevel = code;
}
//触发组件监听事件,去父页面请求新的数据
this.$emit("getnewdata", {
level: this.level,
area: this.area,
lowLevel: this.lowLevel
});
}
}
});
})()