|
@ -1,5 +1,7 @@
|
|
|
|
|
|
var httpData = GetRequest();
|
|
var httpData = GetRequest();
|
|
var docInfo = JSON.parse(window.localStorage.getItem('wlyyAgent'));
|
|
var docInfo = JSON.parse(window.localStorage.getItem('wlyyAgent'));
|
|
|
|
var tempwindow;
|
|
var previewLayerIndex, followupLayerIndex, KFZDlayerIndex;
|
|
var previewLayerIndex, followupLayerIndex, KFZDlayerIndex;
|
|
function closeGuidancePreview(){
|
|
function closeGuidancePreview(){
|
|
layer.close(previewLayerIndex)
|
|
layer.close(previewLayerIndex)
|
|
@ -32,10 +34,17 @@ function showErrorMessage(msg) {
|
|
top.rehabilitationGuideVue = new Vue({
|
|
top.rehabilitationGuideVue = new Vue({
|
|
el: "#app",
|
|
el: "#app",
|
|
data: {
|
|
data: {
|
|
|
|
doctorlevel:docInfo.doctorlevel,
|
|
imgData: {
|
|
imgData: {
|
|
accept: 'image/gif, image/jpeg, image/png, image/jpg',
|
|
accept: 'image/gif, image/jpeg, image/png, image/jpg',
|
|
},
|
|
},
|
|
isCollapse: false,
|
|
isCollapse: false,
|
|
|
|
selectCheckTyperadio:0,
|
|
|
|
showAppointHelpCheckBtn:true, //点击预约协诊按钮结束变为false
|
|
|
|
showRecordFinished:false, //点击完成记录按钮变为true
|
|
|
|
appointTime:'',
|
|
|
|
appointDate:"",
|
|
|
|
appointHour:'',
|
|
upImgs: [],
|
|
upImgs: [],
|
|
upImgArr: [],
|
|
upImgArr: [],
|
|
planid: httpData['planid'], // 服务项id
|
|
planid: httpData['planid'], // 服务项id
|
|
@ -43,15 +52,22 @@ top.rehabilitationGuideVue = new Vue({
|
|
relationRecordImg:{},
|
|
relationRecordImg:{},
|
|
messageList:{},
|
|
messageList:{},
|
|
},
|
|
},
|
|
|
|
startTime:'',
|
|
|
|
pickerOptions:{
|
|
|
|
disabledDate(time) {
|
|
|
|
return time.format('yyyy-MM-dd') < new Date().format('yyyy-MM-dd')
|
|
|
|
}
|
|
|
|
},
|
|
pId: httpData['pId'], // 康复计划id
|
|
pId: httpData['pId'], // 康复计划id
|
|
patient: httpData['patient'],
|
|
patient: httpData['patient'],
|
|
patientName: decodeURI(httpData['patientName']),
|
|
patientName: decodeURI(httpData['patientName']),
|
|
layerIndex: undefined,
|
|
layerIndex: undefined,
|
|
recordId: httpData['recordId']||undefined,
|
|
recordId: httpData['recordId']||undefined,
|
|
islimit: false
|
|
|
|
|
|
islimit: false,
|
|
},
|
|
},
|
|
mounted: function() {
|
|
mounted: function() {
|
|
this.getServiceItem();
|
|
this.getServiceItem();
|
|
|
|
this.startTime=new Date(new Date().getTime()).format('hh:mm')
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 提醒患者 num 1康复指导2康复下转3复诊提醒4上门服务提醒5家签提醒
|
|
// 提醒患者 num 1康复指导2康复下转3复诊提醒4上门服务提醒5家签提醒
|
|
@ -67,6 +83,7 @@ top.rehabilitationGuideVue = new Vue({
|
|
btn: ['确定', '取消'],
|
|
btn: ['确定', '取消'],
|
|
title: "提示"
|
|
title: "提示"
|
|
}, function (index) {
|
|
}, function (index) {
|
|
|
|
var reservationTypeObj={0:2,1:3,2:1}
|
|
var _type = type == 4? 4:type==7?3:''
|
|
var _type = type == 4? 4:type==7?3:''
|
|
var loading = layer.load(0, {shade: false})
|
|
var loading = layer.load(0, {shade: false})
|
|
var params = {
|
|
var params = {
|
|
@ -74,7 +91,8 @@ top.rehabilitationGuideVue = new Vue({
|
|
doctor: docInfo.uid,
|
|
doctor: docInfo.uid,
|
|
type: _type,
|
|
type: _type,
|
|
relationCode: vm.planid,
|
|
relationCode: vm.planid,
|
|
planId: vm.pId
|
|
|
|
|
|
planId: vm.pId,
|
|
|
|
reservationType:reservationTypeObj[vm.selectCheckTyperadio] //复诊类型:1线上,2线下,3远程
|
|
}
|
|
}
|
|
rehaAPI.sendSpecialistWeixinMessage(params).then(function(res){
|
|
rehaAPI.sendSpecialistWeixinMessage(params).then(function(res){
|
|
layer.close(loading)
|
|
layer.close(loading)
|
|
@ -90,6 +108,61 @@ top.rehabilitationGuideVue = new Vue({
|
|
layer.close(current); //再执行关闭
|
|
layer.close(current); //再执行关闭
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
appointHelpCheck:function(data){
|
|
|
|
var vm=this
|
|
|
|
vm.showAppointHelpCheckBtn=false
|
|
|
|
vm.appointTime=vm.appointDate+' '+vm.appointHour
|
|
|
|
var params={
|
|
|
|
patient:vm.patient,
|
|
|
|
doctor:data.familyDoctorCode,
|
|
|
|
doctorName:data.familyDoctorName, //家签医生
|
|
|
|
sendTime:vm.appointTime,
|
|
|
|
planDetailId:vm.planid,
|
|
|
|
appointmentDoctor:data.specialistDoctorCode,
|
|
|
|
appointmentDoctorName:data.specialistDoctorName //专科医生
|
|
|
|
}
|
|
|
|
var loading = layer.load(0, {shade: fa})
|
|
|
|
rehaAPI.appointmentConsultation(params).then(function(res){
|
|
|
|
layer.close(loading)
|
|
|
|
if(res.status == 200){
|
|
|
|
showSuccessMessage('操作成功')
|
|
|
|
setTimeout(function(){
|
|
|
|
vm.getServiceItem()
|
|
|
|
},400)
|
|
|
|
} else {
|
|
|
|
showErrorMessage(res.msg)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
encryptCode: function(docCode) {
|
|
|
|
var publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4lT0JWcv9xx6Q1hsxMal2F1AmKti/xVbBeh8jrD5CiYsFTH0DO1Mpyvv8YtkGdnDSLRjOQOA1PiaYvZoHIhml/jTvEMsvFlAD5i1BsHa5blLlJxQNp/XI7wpMZPfczqO+I/JONrV6ib+6Ci/1FyTjPQfHaiT2ehGyM/CFzOW1PQIDAQAB"
|
|
|
|
var encrypt =new JSEncrypt()
|
|
|
|
encrypt.setPublicKey(publicKey)
|
|
|
|
return encodeURIComponent(encrypt.encrypt(docCode))
|
|
|
|
},
|
|
|
|
openWindow(url, p1, p2){
|
|
|
|
try{
|
|
|
|
if(tempwindow)
|
|
|
|
tempwindow.close()
|
|
|
|
}catch(e){
|
|
|
|
console.log(e)
|
|
|
|
}
|
|
|
|
|
|
|
|
if(p1){
|
|
|
|
tempwindow = window.open('_blank', p1, p2)
|
|
|
|
} else {
|
|
|
|
tempwindow = window.open('_blank')
|
|
|
|
}
|
|
|
|
tempwindow.location = url
|
|
|
|
},
|
|
|
|
openHelpCheck:function(){
|
|
|
|
var encryptCode = this.encryptCode(docInfo.uid)
|
|
|
|
var url = httpRequest.teamworkService + '/#/teamwork/login?_code='+ encryptCode
|
|
|
|
this.openWindow(url)
|
|
|
|
},
|
|
|
|
recordFinished:function(){
|
|
|
|
this.showRecordFinished=true
|
|
|
|
},
|
|
//康复指导
|
|
//康复指导
|
|
kfzd:function(){
|
|
kfzd:function(){
|
|
var vm=this, str = '../../rehabilitation/html/rehabilitation_guidance.html?patient='+vm.patient+'&planDetaiId='+vm.planid+'&planId='+vm.pId
|
|
var vm=this, str = '../../rehabilitation/html/rehabilitation_guidance.html?patient='+vm.patient+'&planDetaiId='+vm.planid+'&planId='+vm.pId
|
|
@ -227,7 +300,7 @@ top.rehabilitationGuideVue = new Vue({
|
|
if(vm.service.status==1){
|
|
if(vm.service.status==1){
|
|
var index = top.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
|
var index = top.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
|
top.layer.title('服务记录详情', index) //再改变当前层的标题
|
|
top.layer.title('服务记录详情', index) //再改变当前层的标题
|
|
}
|
|
|
|
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getRelationRecord: function(type, planDetaiId){
|
|
getRelationRecord: function(type, planDetaiId){
|
|
@ -333,7 +406,7 @@ top.rehabilitationGuideVue = new Vue({
|
|
}
|
|
}
|
|
rehaAPI.saveRehabilitationOperateRecord({dataJson:JSON.stringify(params)}).then(function(res){
|
|
rehaAPI.saveRehabilitationOperateRecord({dataJson:JSON.stringify(params)}).then(function(res){
|
|
if(res.status==200){
|
|
if(res.status==200){
|
|
if(type==1){
|
|
|
|
|
|
if(type==1 || type==7){
|
|
vm.uploadImg(vm.upImgArr);
|
|
vm.uploadImg(vm.upImgArr);
|
|
}else if(type==6){
|
|
}else if(type==6){
|
|
vm.updateRelationCodeByDetailId(planDetailId, relationCode)
|
|
vm.updateRelationCodeByDetailId(planDetailId, relationCode)
|
|
@ -481,6 +554,7 @@ top.rehabilitationGuideVue = new Vue({
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
$("body").on('click','img',function(){
|
|
$("body").on('click','img',function(){
|
|
var _this = $(this);//将当前的img元素作为_this传入函数
|
|
var _this = $(this);//将当前的img元素作为_this传入函数
|
|
imgShow("#outerdiv", "#innerdiv", "#bigimg", _this);
|
|
imgShow("#outerdiv", "#innerdiv", "#bigimg", _this);
|