1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- 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",
- patientCode:"d2e1e4334485476391300f43ab69f8f7",
- 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]))
- //缓存结束后才触发事件
- var query = GetRequest();
- vm.activeidx = query.tabIdex || "0"
- }else{
- toastr.error(res.msg)
- }
- })
- //保存患者code
- window.localStorage.setItem("severPatientCode",vm.patientCode)
- //获取医生信息
- recordAPI.docInfo().then(function(res){
- if(res.status == 200){
- window.localStorage.setItem("severDocInfo",JSON.stringify(res.data))
- }
- })
- },
- methods:{
-
- }
- })
|