|
@ -2,7 +2,7 @@
|
|
|
Vue.component('doctor-list', {
|
|
|
template: '<div class="ui-col-1 ml15 bgc-fff c-border p20">\
|
|
|
<div class="c-f16 c-323232 mb20">医生列表</div>\
|
|
|
<div class="ui-grid c-border p10 pb0 mt10" v-for="(doc, index) in doctorList">\
|
|
|
<div class="ui-grid c-border p10 pb0 mt10" v-for="(doc, index) in doctorList" v-show="isDoctorList">\
|
|
|
<div class="ui-col-0 mr10">\
|
|
|
<img v-bind:src="doc.photoUri" width="70" height="70" class="c-images-cycle">\
|
|
|
</div>\
|
|
@ -19,12 +19,12 @@
|
|
|
</p>\
|
|
|
</div>\
|
|
|
<div class="ui-col-1 div-doctor-section" v-for="(arrange, aindex) in arrangeList" v-if="index==aindex">\
|
|
|
<div class="div-left-btn c-hide" @click="preClick" v-show="leftBtn"></div>\
|
|
|
<div class="div-left-btn" @click="preClick"></div>\
|
|
|
<ul class="doctor-ul">\
|
|
|
<li v-for="(arrg, arrIndex) in arrange" @click="goToDoctorPage(doc.doctorSn, arrg.arrangeID)">\
|
|
|
<div class="div-doctor-item" :class="getColorClass(arrg.numberStatus,arrg.arrangeStatus)">\
|
|
|
<div class="mt5">{{arrg.registerDate}}</div>\
|
|
|
<div class="mt5">{{arrg.timeName}}</div>\
|
|
|
<div class="mt5">{{arrg.date}}</div>\
|
|
|
<div class="mtb2">{{arrg.timeName}}</div>\
|
|
|
<div class="div-doctor-type bgc-0ad8c8" v-if="arrg.numberStatus==1">预约</div>\
|
|
|
<div class="div-doctor-type bgc-d1d1d1" v-if="arrg.numberStatus==2">已满</div>\
|
|
|
<div class="div-doctor-type bgc-f0a65f" v-if="arrg.arrangeStatus==2">放号提醒</div>\
|
|
@ -32,10 +32,14 @@
|
|
|
</div>\
|
|
|
</li>\
|
|
|
</ul>\
|
|
|
<div class="div-right-active-btn" v-show="rightBtn" @click="nextClick" v-if="arrangeList[aindex].length>4"></div>\
|
|
|
<div class="div-right-active-btn" @click="nextClick"></div>\
|
|
|
</div>\
|
|
|
</div>\
|
|
|
<div id="page" class="page_div fr"></div>\
|
|
|
<div id="page" class="page_div fr" v-show="isDoctorList"></div>\
|
|
|
<div class="div-wushuju" v-show="!isDoctorList">\
|
|
|
<div style="background: url(../../../images/wushuju_icon.png) no-repeat;width: 230px;height: 130px;margin: 30px auto;"></div>\
|
|
|
<div style="text-align:center">查无数据</div>\
|
|
|
</div>\
|
|
|
</div>',
|
|
|
props: ["info"],
|
|
|
data: function() {
|
|
@ -44,13 +48,14 @@
|
|
|
currentHospitalId: "",
|
|
|
currentHosName: "",
|
|
|
pageIndex: 1,
|
|
|
pageSize: 10,
|
|
|
pageSize: 5,
|
|
|
totalPage: 0,
|
|
|
hosDeptId: "",
|
|
|
doctorList: [],
|
|
|
arrangeList:[],
|
|
|
leftBtn:false,
|
|
|
rightBtn:false,
|
|
|
isDoctorList:true
|
|
|
}
|
|
|
},
|
|
|
mounted: function() {
|
|
@ -60,6 +65,14 @@
|
|
|
vm.currentHosName = JSON.parse(vm.info).hosName;
|
|
|
vm.getDoctorList();
|
|
|
}, 50);
|
|
|
|
|
|
//更新医生列表信息
|
|
|
EventBus.$on('update-doctor-list', function(arg) {
|
|
|
vm.isInit = true;
|
|
|
vm.currentHospitalId = arg.hospitalId;
|
|
|
vm.hosDeptId = arg.hosDeptId;
|
|
|
vm.getDoctorList();
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
getColorClass:function(numberStatus,arrangeStatus){
|
|
@ -86,16 +99,17 @@
|
|
|
}
|
|
|
appointmentAPI.querySimpleDoctorList(params).then(function(res) {
|
|
|
if(res.successFlg && res.obj.Code == "10000") {
|
|
|
vm.doctorList = res.obj.Result;
|
|
|
//获取医生排班数据
|
|
|
vm.getArrangeWater(vm.doctorList);
|
|
|
vm.doctorList = res.obj.Result || [];
|
|
|
vm.isDoctorList = vm.doctorList.length>0?true:false;
|
|
|
vm.getArrangeWater(vm.doctorList);//获取医生排班数据
|
|
|
if(vm.isInit) {
|
|
|
vm.totalPage = Math.ceil(res.obj.Total / vm.pageSize);
|
|
|
vm.totalPage = Math.ceil(res.obj.Total / vm.pageSize) || 0;
|
|
|
var totalSize = res.obj.Total || 0;
|
|
|
//分页初始化
|
|
|
$("#page").paging({
|
|
|
pageNo: 1,
|
|
|
totalPage: vm.totalPage,
|
|
|
totalSize: res.obj.Total,
|
|
|
totalSize: totalSize,
|
|
|
callback: function(num) {
|
|
|
vm.pageIndex = num; //回调的页数
|
|
|
getDoctorList(vm);
|
|
@ -130,13 +144,13 @@
|
|
|
})
|
|
|
|
|
|
vm.arrangeList = _.map(vm.arrangeList, function(data) {
|
|
|
_.map(data, function(item) {
|
|
|
item.registerDate = item.registerDate.substring(5,10).replace("-","/");
|
|
|
_.map(data, function(item,index) {
|
|
|
item.date = item.registerDate.substring(5,10).replace("-","/");
|
|
|
item.timeName = item.timeId==1?"上午":item.timeId==2?"下午":"晚上";
|
|
|
})
|
|
|
return data;
|
|
|
})
|
|
|
$(".doctor-ul li:lt(4)").hide()
|
|
|
// $(".doctor-ul li:lt(4)").hide()
|
|
|
});
|
|
|
},
|
|
|
preClick:function(){
|