123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- (function(){
- Vue.component('team-info-dyy',{
- template: '<div class="team-info-dyy" style="height:500px;overflow:auto;">\
- <div class="dyy-title" style="font-size: 14px;">团队信息</div>\
- <div class="ui-grid mt20 c-f16 c-333 plr20" style="font-size: 14px;">\
- <div class="ui-col-0 pr10" style="width:50%"><span class="c-999">团队名称:</span>{{team.name}}</div>\
- <div class="ui-col-0 pl10" style="width:50%"><span class="c-999">所在社区:</span>{{team.hospitalName}}</div>\
- </div>\
- <div class="mt20 c-f16 c-333 plr20" style="word-break: break-all;font-size: 14px;"><span class="c-999">团队长:</span>{{team.leaderName}}</div>\
- <div class="mt20 c-f16 c-333 plr20 pb40 c-border-b mb20" style="word-break: break-all;font-size: 14px;"><span class="c-999">团队成员:</span><span v-for="(member, index) in members">{{index==0? "": " 、"}}{{member.name}}</span>\</div>\
- <div class="dyy-title" style="font-size: 14px;">代预约记录</div>\
- <div id="sc_table" class="p20">\
- <table class="table-bordered table-striped width-100 c-t-center">\
- <thead>\
- <tr>\
- <th>居民姓名</th>\
- <th>挂号时间</th>\
- <th>预约医生</th>\
- <th>预约医院</th>\
- <th>就诊时间</th>\
- </tr>\
- </thead>\
- <tbody v-loading="isloading">\
- <tr v-if="!wujilu" v-for="(data, index) in tablelist">\
- <td style="width:80px">{{data.name}}</td>\
- <td >{{data.czrq}}</td>\
- <td >{{data.doctorName}}</td>\
- <td>{{data.orgName}}</td>\
- <td >{{data.startTime}}</td>\
- </tr>\
- <tr v-if="wujilu">\
- <td colspan="6">无记录</td>\
- </tr>\
- </tbody>\
- </table>\
- <navigation :pages="pagetotal" :current="currentPage" @navpage="search" :total="total" :size="pagesize"></navigation>\
- </div>\
- </div>',
- 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
- })
- }
- })()
|