123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305 |
- var Request = new Object()
- Request = GetRequest()
- var hospital = JSON.parse(decodeURIComponent(Request.hospital)),
- patientCode = Request.patient,
- callCode = Request.callCode,
- surveyCode = Request.surveyCode,
- backToSynergy = Request.backToSynergy
- var dept = null,
- bookDoctor = null,
- patientObj = null,
- arrangeDate = {
- sectionType: null,
- startTime: null
- }
- function closeLayer() {
- var index = top.layer.getFrameIndex(window.name)
- top.layer.close(index)
- }
- $(function () {
- var loadingid = top.layer.load(1, {
- shade: [0.1, '#fff'] //0.1透明度的白色背景
- })
- // 获取居民信息
- jbscAPI
- .findByPatient({ patient: patientCode })
- .then(function (res) {
- top.layer.close(loadingid)
- if (res.status == 200) {
- patientObj = res.data
- } else {
- top.showErrorMessage(res.msg || '居民信息获取失败!')
- }
- })
- .catch(function (e) {
- top.layer.close(loadingid)
- console && console.error(e)
- })
- $('.tit').html(hospital.address || hospital.hospital_name)
- $('.reback').click(function () {
- // 如果是康复复诊过去预约挂号,在就诊信息页面少一个字段显示,1隐藏字段,0正常显示
- sessionStorage.setItem("isFuzhen",0)
-
- top.layer.open({
- type: 2,
- closeBtn: true, // 显示关闭按钮
- area: ['800px', '90%'],
- title: false,
- content: '../../jbsc/html/appointment/appoint-select.html?patient=' + patientCode + '&callCode=' + callCode
- })
- closeLayer()
- })
- $('.closeBtn').click(function () {
- closeLayer()
- })
- })
- new Vue({
- el: '#app',
- data: function () {
- return {
- isSelDoctor: true,
- doptroon: [],
- doctors: [],
- doctortime: null,
- visittime: {
- time: []
- },
- visitindex: null,
- detailtime: [],
- iswuhaoyuan: false,
- data: [
- {
- 'id': 2912568,
- 'code': '30400',
- 'hospitalCode': '350211A1004',
- 'name': '神经内科门诊'
- },
- {
- 'id': 2912569,
- 'code': '31500',
- 'hospitalCode': '350211A1004',
- 'name': '皮肤科门诊'
- },
- {
- 'id': 2912570,
- 'code': '32600',
- 'hospitalCode': '350211A1004',
- 'name': '肿瘤科门诊'
- },
- {
- 'id': 2912571,
- 'code': '33200',
- 'hospitalCode': '350211A1004',
- 'name': '疼痛门诊'
- },
- {
- 'id': 2912572,
- 'code': '335',
- 'hospitalCode': '350211A1004',
- 'name': 'PICC门诊'
- },
- {
- 'id': 2912573,
- 'code': '34600',
- 'hospitalCode': '350211A1004',
- 'name': '妇科中医门诊'
- },
- {
- 'id': 2912574,
- 'code': '369',
- 'hospitalCode': '350211A1004',
- 'name': '帕金森病专病门诊'
- },
- {
- 'id': 2912575,
- 'code': '30100',
- 'hospitalCode': '350211A1004',
- 'name': '消化内科门诊'
- },
- {
- 'id': 2912576,
- 'code': '32800',
- 'hospitalCode': '350211A1004',
- 'name': '耳鼻喉科门诊'
- },
- {
- 'id': 2912577,
- 'code': '32900',
- 'hospitalCode': '350211A1004',
- 'name': '中医肛肠科门诊'
- },
- {
- 'id': 2912578,
- 'code': '33800',
- 'hospitalCode': '350211A1004',
- 'name': '临床心理专业门诊'
- },
- {
- 'id': 2912579,
- 'code': '36300',
- 'hospitalCode': '350211A1004',
- 'name': '妇科门诊'
- },
- {
- 'id': 2912580,
- 'code': '365',
- 'hospitalCode': '350211A1004',
- 'name': '疤痕门诊'
- },
- {
- 'id': 2912581,
- 'code': '373',
- 'hospitalCode': '350211A1004',
- 'name': '肝胆胰脾门诊'
- },
- {
- 'id': 2912582,
- 'code': '31000',
- 'hospitalCode': '350211A1004',
- 'name': '骨科门诊'
- },
- {
- 'id': 2912583,
- 'code': '31800',
- 'hospitalCode': '350211A1004',
- 'name': '中医骨伤科门诊'
- }
- ]
- }
- },
- mounted: function () {
- this.initData()
- },
- methods: {
- initData: function (keyWord) {
- var loadingid = top.layer.load(1, {
- shade: [0.1, '#fff'] //0.1透明度的白色背景
- }),
- vm = this
- jbscAPI
- .getOrgDeptList({
- city: 350200,
- hospitalId: hospital.code=='gxb'?hospital.hospital:hospital.code,
- filter: keyWord || '',
- pageIndex: 1,
- pageSize: 100
- })
- .then(function (res) {
- top.layer.close(loadingid)
- if (res.status == 200) {
- vm.doptroon = res.data
- // vm.doptroon = vm.data
- } else {
- top.showErrorMessage(res.msg || '预约挂号详情获取失败!')
- }
- })
- .catch(function (e) {
- top.layer.close(loadingid)
- console && console.error(e)
- })
- },
- seldoptroon: function (list) {
- dept = list
- var loadingid = top.layer.load(1, {
- shade: [0.1, '#fff'] //0.1透明度的白色背景
- }),
- vm = this
- jbscAPI
- .regDeptSpeDoctorList({
- hospitalId: hospital.code=='gxb'?hospital.hospital:hospital.code,
- hosDeptId: list.code
- })
- .then(function (res) {
- if (res.status == 200) {
- vm.doctors = res.data
- ;(vm.doctortime = []), (vm.iswuhaoyuan = vm.doctors.length > 0 ? false : true)
- Promise.all(
- _.map(vm.doctors, function (d) {
- return jbscAPI.getDoctorArrange({
- OrgCode: d.hospitalId,
- DeptCode: d.hosDeptId,
- DocCode: d.id
- })
- })
- )
- .then(function (list) {
- top.layer.close(loadingid)
- _.each(list, function (o) {
- vm.doctortime.push(o.data)
- })
- })
- .catch(function (e) {
- top.layer.close(loadingid)
- console && console.error(e)
- })
- } else {
- top.layer.close(loadingid)
- top.showErrorMessage(res.msg || '医生列表获取失败!')
- }
- })
- .catch(function (e) {
- top.layer.close(loadingid)
- console && console.error(e)
- })
- },
- seldetail: function (doc) {
- bookDoctor = this.doctors[doc.index]
- this.isSelDoctor = false
- tit = bookDoctor.name + ' ' + bookDoctor.title
- $('.tit').html(tit)
- this.visittime = this.doctortime[doc.index]
- this.visitindex = doc.ind
- arrangeDate.sectionType = this.doctortime[doc.index][doc.ind].time
- this.detailtime = this.doctortime[doc.index][doc.ind].sections
- window.scrollTo(0, 0)
- },
- changeReturn: function () {
- this.isSelDoctor = true
- $('.tit').html(hospital.address)
- window.scrollTo(0, 0)
- },
- changetime: function (data) {
- arrangeDate.sectionType = data.time
- this.detailtime = data.sections
- },
- booking: function (data) {
- arrangeDate.startTime = data.startTime
- var param = {
- city: 350200,
- hospitalId: hospital.code=='gxb'?hospital.hospital:hospital.code,
- hospitalName: hospital.address || hospital.hospital_name,
- hosDeptId: dept.code,
- hosDeptName: dept.name,
- doctorId: bookDoctor.id,
- doctorName: bookDoctor.name,
- arrangeDate: JSON.stringify(data),
- patient: patientObj.code,
- patientName: patientObj.name,
- cardNo: patientObj.idcard,
- clinicCard: patientObj.ssc,
- dcode: '',
- dname: '',
- patientPhone: patientObj.mobile,
- callCode: callCode || '',
- surveyCode:surveyCode || ''
- }
- var content =
- '../../jbsc/html/appointment/appoint-commit.html?paramStr=' + encodeURIComponent(JSON.stringify(param))
- if (backToSynergy) {
- content += '&backToSynergy=1'
- }
- top.layer.open({
- type: 2,
- title: false,
- closeBtn: true,
- area: ['600px', '800px'],
- content: content,
- // zIndex:'99'
- })
- closeLayer()
- }
- }
- })
|