(function(){
Vue.component('team-info-dyy',{
template: '
\
团队信息
\
\
团队名称:{{team.name}}
\
所在社区:{{team.hospitalName}}
\
\
团队长:{{team.leaderName}}
\
团队成员:{{index==0? "": " 、"}}{{member.name}}\
\
代预约记录
\
\
\
\
\
居民姓名 | \
挂号时间 | \
预约医生 | \
预约医院 | \
就诊时间 | \
\
\
\
\
{{data.name}} | \
{{data.czrq}} | \
{{data.doctorName}} | \
{{data.orgName}} | \
{{data.startTime}} | \
\
\
无记录 | \
\
\
\
\
\
',
props:['teamId','year'],
data: function(){
return {
team: {},
members: [],
memberLength: 0,
pagesize: 5,
total: 0,
pagetotal: 1, //总页数
currentPage: 1, //当前页数
tablelist: [],
wujilu: false,
isloading:false,
date:'',
}
},
mounted: function(){
var vm = this;
vm.date = getEndDate29(vm.year);
getTeamInfo(vm);
vm.getDatas()
},
methods:{
getDatas:function(){
var vm = this
var params = {
teamId: vm.teamId,
year:vm.year,
date:vm.date,
pageIndex: vm.currentPage,
pageSize: vm.pagesize
}
vm.isloading=true
statisticAPI.GetReservationByTeamId(params).then(function(res) {
vm.isloading=false
if(res.status == 200) {
vm.wujilu = false
vm.total = res.data.total
vm.pagetotal = Math.ceil(res.data.total / vm.pagesize)
vm.tablelist = res.data.list;
if(vm.tablelist.length == 0) {
vm.wujilu = true
}
} else {
showErrorMessage(res.msg);
}
})
},
//页面跳转
search: function(page) {
var vm = this
vm.currentPage = page
vm.getDatas()
},
}
});
function getTeamInfo(vm){
var params = {
teamId: vm.teamId
};
statisticAPI.getTeamInfo(params).then(function(res){
if(res.status == 200){
vm.team = res.data.team;
vm.members = res.data.members;
vm.memberLength = res.data.members.length;
}else{
console.log(res.msg);
}
})
}
function showErrorMessage(msg) {
layer.msg(msg, {
icon: 5
})
}
})()