|
@ -0,0 +1,51 @@
|
|
|
new Vue({
|
|
|
el: '#app',
|
|
|
data: {
|
|
|
isAgent: false,
|
|
|
innerTabs: [{title:'咨询',href:'../html/consultation.html'},
|
|
|
{title:'随访',href:'../html/follow-up.html'},
|
|
|
{title:'代预约',href:'../html/toBeReserved.html'},
|
|
|
{title:'健康指导',href:'../html/guidance.html'},
|
|
|
{title:'健康教育',href:'../html/education.html'},
|
|
|
{title:'统计',href:'../html/census.html'}
|
|
|
],
|
|
|
teamName:null,
|
|
|
patientCode:"ec7572875d27446cb4f067b13a85d72a",
|
|
|
activeidx: ""
|
|
|
},
|
|
|
mounted: function() {
|
|
|
var vm = this;
|
|
|
recordAPI.teamInfo({patient:vm.patientCode}).then(function(res){
|
|
|
if(res.status == 200){
|
|
|
var data = res.data,teams = [];
|
|
|
// 是否有签约关系 1:有 0:无 此时jtTeam与ssTeam都没有
|
|
|
if(data.hasSign=="1") {
|
|
|
data.ssTeam && (function() {
|
|
|
var team = data.ssTeam.team;
|
|
|
team.hasSign = data.ssTeam.hasSign; // 医生与患者是否有签约关系
|
|
|
team.isLeader = data.ssTeam.isLeader; // 是否是团队长
|
|
|
teams.push(team)
|
|
|
})();
|
|
|
data.jtTeam && (function() {
|
|
|
var team = data.jtTeam.team;
|
|
|
team.hasSign = data.jtTeam.hasSign; // 医生与患者是否有签约关系
|
|
|
team.isLeader = data.jtTeam.isLeader; // 是否是团队长
|
|
|
teams.push(team)
|
|
|
})();
|
|
|
}
|
|
|
//保存患者的团队信息
|
|
|
vm.teamName = teams[0].name;
|
|
|
window.localStorage.setItem("severPatientTeam",JSON.stringify(teams[0]))
|
|
|
//保存患者code
|
|
|
window.localStorage.setItem("severPatientCode",vm.patientCode)
|
|
|
}else{
|
|
|
toastr.Error("获取团队信息失败")
|
|
|
}
|
|
|
})
|
|
|
var query = GetRequest();
|
|
|
this.activeidx = query.tabIdex || "0"
|
|
|
},
|
|
|
methods:{
|
|
|
|
|
|
}
|
|
|
})
|