修改问诊平台和退出登录

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({
url: `/nurseApp/healthConsultation/selectHospitalPerson?pageNum=${pageNum}&pageSize=${pageSize}&departmentId=${departmentId}`,
url: `/nurseApp/healthConsultation/selectHospitalPerson?pageNum=${pageNum}&pageSize=${pageSize}&departmentId=${departmentId}&&status=${1}`,
method: 'GET',
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')

View File

@ -21,4 +21,13 @@ export function getSignProtocol(cardNo) {
region: uni.getStorageSync('region'),
}
})
}
}
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() {
let location = uni.getStorageSync('location')
let region = uni.getStorageSync('region')
if (!location || !region) {
if (uni.getStorageSync('location') && uni.getStorageSync('region')) {
let location = uni.getStorageSync('location')
let region = uni.getStorageSync('region')
} else {
this.getAddress()
}
this.phonecode = undefined
@ -57,8 +59,11 @@
},
method: "GET",
success(res) {
uni.setStorageSync('location', res.data.result.address_component.city)
var address = uni.getStorageSync('location')
if (uni.getStorageSync('location')) {
uni.setStorageSync('location', res.data.result.address_component
.city)
var address = uni.getStorageSync('location')
}
if (address == '德州市') {
uni.setStorageSync("region", 1)
} else if (address == '东营市') {

View File

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

View File

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

View File

@ -75,7 +75,8 @@
methods: {
//
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.HospitalPersontotal = res.total
})

View File

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

View File

@ -146,7 +146,8 @@
//
selectHospitalPersonInfo() {
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.HospitalPersontotal = res.total
})

View File

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