修改问诊平台和退出登录

This commit is contained in:
闫晓茹 2023-11-07 17:04:46 +08:00
parent be417f70fb
commit 588b2f5646
9 changed files with 142 additions and 44 deletions

View File

@ -21,9 +21,9 @@ export function selectDepartment(pageNum, pageSize) {
}) })
} }
//人员 //人员
export function selectHospitalPerson(pageNum, pageSize, departmentId) { export function selectHospitalPerson(pageNum, pageSize, departmentId,status) {
return request({ return request({
url: `/nurseApp/healthConsultation/selectHospitalPerson?pageNum=${pageNum}&pageSize=${pageSize}&departmentId=${departmentId}`, url: `/nurseApp/healthConsultation/selectHospitalPerson?pageNum=${pageNum}&pageSize=${pageSize}&departmentId=${departmentId}&&status=${1}`,
method: 'GET', method: 'GET',
header: { header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token') Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')

View File

@ -22,3 +22,12 @@ export function getSignProtocol(cardNo) {
} }
}) })
} }
export function getHospitalPersonInfo(personCode,status) {
return request({
url: `/nurseApplet/consultationInfo/getHospitalPersonInfo?personCode=${personCode}&&status=${1}`,
method: 'get',
header: {
region: uni.getStorageSync('region'),
}
})
}

View File

@ -31,9 +31,11 @@
}; };
}, },
onShow() { onShow() {
let location = uni.getStorageSync('location') if (uni.getStorageSync('location') && uni.getStorageSync('region')) {
let region = uni.getStorageSync('region')
if (!location || !region) { let location = uni.getStorageSync('location')
let region = uni.getStorageSync('region')
} else {
this.getAddress() this.getAddress()
} }
this.phonecode = undefined this.phonecode = undefined
@ -57,8 +59,11 @@
}, },
method: "GET", method: "GET",
success(res) { success(res) {
uni.setStorageSync('location', res.data.result.address_component.city) if (uni.getStorageSync('location')) {
var address = uni.getStorageSync('location') uni.setStorageSync('location', res.data.result.address_component
.city)
var address = uni.getStorageSync('location')
}
if (address == '德州市') { if (address == '德州市') {
uni.setStorageSync("region", 1) uni.setStorageSync("region", 1)
} else if (address == '东营市') { } else if (address == '东营市') {

View File

@ -268,7 +268,8 @@
content: '确认要退出此账号吗', content: '确认要退出此账号吗',
succ ess: function(res) { succ ess: function(res) {
if (res.confirm) { if (res.confirm) {
uni.clearStorageSync(); // uni.clearStorageSync();
that.removes()
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '退出账号成功', title: '退出账号成功',
type: 'success', type: 'success',
@ -330,6 +331,7 @@
uni.removeStorageSync('openid'); uni.removeStorageSync('openid');
uni.removeStorageSync('phone'); uni.removeStorageSync('phone');
uni.removeStorageSync('userinfo'); uni.removeStorageSync('userinfo');
uni.removeStorageSync('token');
}, },
// //
myInfo() { myInfo() {

View File

@ -42,7 +42,10 @@
}, },
onShow() { onShow() {
var that = this var that = this
this.getAddress(); if (!uni.getStorageSync('location') && !uni.getStorageSync('region')) {
this.getAddress()
}
// this.getAddress();
createMobileToken().then(res => { createMobileToken().then(res => {
uni.setStorageSync("token", res.data.token) uni.setStorageSync("token", res.data.token)
}) })

View File

@ -75,7 +75,8 @@
methods: { methods: {
// //
selectHospitalPersonInfo() { selectHospitalPersonInfo() {
selectHospitalPerson(this.pageNum, this.pageSize, this.departmentId).then(res => { var status='1'
selectHospitalPerson(this.pageNum, this.pageSize, this.departmentId,status).then(res => {
this.HospitalPersonlist = res.rows this.HospitalPersonlist = res.rows
this.HospitalPersontotal = res.total this.HospitalPersontotal = res.total
}) })

View File

@ -43,8 +43,8 @@
选择医生 选择医生
</view> </view>
<view class="select" @tap='gochoosedoctor'> <view class="select" @tap='gochoosedoctor'>
<text v-if="formdata.doctorName" style="font-size: 26rpx;color: #303133;">{{formdata.doctorName}}</text> <text v-if="!doctorName">请选择医生</text>
<text v-else>请选择医生</text> <text v-else style="font-size: 26rpx;color: #303133;">{{doctorName}}</text>
<image src="../../static/huijiantou.png" mode=""></image> <image src="../../static/huijiantou.png" mode=""></image>
</view> </view>
</view> </view>
@ -135,8 +135,12 @@
import baseurl from '@/api/baseurl.js' import baseurl from '@/api/baseurl.js'
import { import {
consultationInfo, consultationInfo,
detail detail,
} from '@/api/pagesB/createnewconsultation/createnewconsultation.js' } from '@/api/pagesB/createnewconsultation/createnewconsultation.js'
import {
getHospitalPersonInfo
} from '@/api/pagesC/contractsigningprotocol/index.js'
// import consultationplatformVueHtml from '../consultationplatform/consultationplatform.vue.html'; // import consultationplatformVueHtml from '../consultationplatform/consultationplatform.vue.html';
export default { export default {
components: { components: {
@ -157,40 +161,42 @@
cardNo: '', cardNo: '',
phone: '', phone: '',
address: '', address: '',
doctorId: 111, doctorId: '',
doctorName: '李医生', doctorName: '',
consultationType: 'IMAGE_TEXT_CONSULTATION', consultationType: 'IMAGE_TEXT_CONSULTATION',
problemDescription: '', problemDescription: '',
situationDescription: '', situationDescription: '',
problemStatement: '', problemStatement: '',
medicalRecord: '', medicalRecord: '',
fileUrls: [], fileUrls: [],
} },
doctorlist: [],
doctorName: '',
doctorId:'',
}; };
}, },
onLoad(options) { onLoad(options) {
this.uoloadaction = baseurl + '/nurseApplet/consultationInfo/uploadConsultationFile' this.uoloadaction = baseurl + '/nurseApplet/consultationInfo/uploadConsultationFile'
}, },
onShow() { onShow() {
this.areaInfo(); this.areaInfo();
let that = this let that = this
that.formdata = uni.getStorageSync('userinfo') that.formdata = uni.getStorageSync('userinfo')
this.infolist()
uni.$on('doctordata', function(data) { uni.$on('doctordata', function(data) {
let item = JSON.parse(data.data) let item = JSON.parse(data.data)
that.formdata.doctorName = item.realname that.formdata.doctorName = item.personName
that.formdata.doctorId = item.userNo that.formdata.doctorId = item.id
console.log(that.formdata.doctorName, '45632')
uni.$off('doctordata') uni.$off('doctordata')
}) })
this.infolist()
}, },
methods: { methods: {
infolist() {
detail(this.formdata.cardNo).then(res => {
console.log(res, '55')
})
},
updata() { updata() {
this.formdata.doctorName=this.doctorName
this.formdata.doctorId=this.doctorId
if (this.imglistlength > 0) { if (this.imglistlength > 0) {
this.$refs.uUpload.upload() this.$refs.uUpload.upload()
} else { } else {
@ -217,6 +223,12 @@
duration: '1500', duration: '1500',
back: 1 back: 1
}) })
}else if (res.code == 500){
this.$refs.uToast.show({
title: res.msg,
type: 'error',
duration: '1500',
})
} }
}) })
}, },
@ -247,11 +259,37 @@
this.address = '请选择所属地区' this.address = '请选择所属地区'
} }
}, },
gochoosedoctor() { infolist() {
uni.navigateTo({ detail(this.formdata.cardNo).then(res => {
url: '/pagesC/choosedoctor/choosedoctor' var status = '1'
getHospitalPersonInfo(res.data.dutyDoctorNo, status).then(res => {
this.doctorName = res.data.personName
this.doctorId = res.data.id
this.doctorlist=res.data
})
}) })
}, },
gochoosedoctor() {
console.log(this.doctorlist,'44444')
// detail(this.formdata.cardNo).then(res => {
// var status = '1'
// getHospitalPersonInfo(res.data.dutyDoctorNo, status).then(res => {
// console.log(res, '55')
// this.doctorlist = res.data
uni.navigateTo({
url: `/pagesC/choosedoctor/choosedoctor?item=${JSON.stringify(this.doctorlist)}`
})
// })
// })
},
} }
} }
</script> </script>

View File

@ -146,7 +146,8 @@
// //
selectHospitalPersonInfo() { selectHospitalPersonInfo() {
this.personpageNum = 1 this.personpageNum = 1
selectHospitalPerson(this.personpageNum, this.pageSize, this.departmentId).then(res => { var status='1'
selectHospitalPerson(this.personpageNum, this.pageSize, this.departmentId,status).then(res => {
this.HospitalPersonlist = res.rows this.HospitalPersonlist = res.rows
this.HospitalPersontotal = res.total this.HospitalPersontotal = res.total
}) })

View File

@ -1,10 +1,10 @@
<template> <template>
<view class="app"> <view class="app">
<view class="inputs"> <!-- <view class="inputs">
<i class="icon"></i> <i class="icon"></i>
<input type="text" name="" id="" class="input" placeholder="请输入医生姓名" v-model="realname"> <input type="text" name="" id="" class="input" placeholder="请输入医生姓名" v-model="realname">
</view> </view> -->
<view class="list"> <view class="list" v-if="doctorlist">
<view class="item" v-for="item in doctorlist" @tap='emitdata(item)'> <view class="item" v-for="item in doctorlist" @tap='emitdata(item)'>
<image src="../../static/docHead.png" mode=""></image> <image src="../../static/docHead.png" mode=""></image>
<view class="name"> <view class="name">
@ -24,6 +24,26 @@
</view> </view>
</view> </view>
</view> </view>
<view class="list" v-if="list">
<view class="item" @tap='emitdata(item)'>
<image src="../../static/docHead.png" mode=""></image>
<view class="name">
{{list.personName}}
</view>
<view class="address">
{{list.personPhone}}
</view>
<!-- <view class="title">
{{list.personPhone}}
</view> -->
<view class="zixunbtn" v-if="list.userNo==userNo">
已选择
</view>
<view class="zixunbtn nobtn" v-else>
选TA
</view>
</view>
</view>
</view> </view>
</template> </template>
@ -43,6 +63,10 @@
realname: '', realname: '',
doctorlist: [], doctorlist: [],
doctortotal: 0, doctortotal: 0,
list:[{
personPhone:'',
personName:'',
}],
pageNum: 1, pageNum: 1,
}; };
}, },
@ -61,30 +85,45 @@
this.doctortotal = res.total this.doctortotal = res.total
}) })
} else { } else {
getDoctorListtwo(this.pageNum, 10, this.teamNo, this.realname).then(res => { // getDoctorListtwo(this.pageNum, 10, this.teamNo, this.realname).then(res => {
this.doctorlist = res.rows // this.doctorlist = res.rows
this.doctortotal = res.total // this.doctortotal = res.total
}) // })
} }
}, },
emitdata(item) { emitdata(item) {
uni.$emit('doctordata', { console.log(this.list,'474')
data: JSON.stringify(item), if(item){
}) uni.$emit('doctordata', {
uni.navigateBack({ data: JSON.stringify(item),
delta: 1 })
}); uni.navigateBack({
delta: 1
});
}else{
uni.$emit('doctordata', {
data: JSON.stringify(this.list),
})
uni.navigateBack({
delta: 1
});
}
}, },
}, },
onLoad(options) { onLoad(options) {
if (options.item) {
this.list = JSON.parse(options.item)
console.log(this.list, '58')
}
if (options.orgNo) { if (options.orgNo) {
this.orgNo = options.orgNo this.orgNo = options.orgNo
this.userNo = options.userNo this.userNo = options.userNo
this.getDoctorListinfo();
} else { } else {
// this.teamNo = uni.getStorageSync('userinfo').teamNo // this.teamNo = uni.getStorageSync('userinfo').teamNo
this.teamNo = "00bf7f5a02f3460aa975721ff9f5e533" this.teamNo = "00bf7f5a02f3460aa975721ff9f5e533"
} }
this.getDoctorListinfo();
}, },
onReachBottom() { // onReachBottom() { //
if (this.doctorlist.length >= this.doctortotal) {} else { if (this.doctorlist.length >= this.doctortotal) {} else {