This commit is contained in:
2023-11-13 13:41:05 +08:00
parent 68eb8c41e9
commit a39b50ef81

View File

@ -97,7 +97,8 @@
附件材料上传 附件材料上传
</view> </view>
<u-upload ref="uUpload" :max-count='9' :action="uoloadaction" :auto-upload="false" upload-text=' ' <u-upload ref="uUpload" :max-count='9' :action="uoloadaction" :auto-upload="false" upload-text=' '
@on-choose-complete='onchoosecomplete' @on-success='onsuccess' @on-uploaded='onuploaded'></u-upload> @on-choose-complete='onchoosecomplete' @on-uploaded='onuploaded'></u-upload>
<!-- @on-success='onsuccess' -->
<view class="textarea"> <view class="textarea">
<view class=""> <view class="">
最多支持9个文件 最多支持9个文件
@ -155,7 +156,7 @@
imglistlength: null, imglistlength: null,
address: '请选择所属地区', // address: '请选择所属地区', //
formdata: { formdata: {
address:'', // address: '', //
patientId: '', patientId: '',
patientName: '', patientName: '',
cardNo: '', cardNo: '',
@ -176,24 +177,22 @@
}, },
onLoad(options) { onLoad(options) {
this.uoloadaction = baseurl + '/nurseApplet/consultationInfo/uploadConsultationFile' this.uoloadaction = baseurl + '/nurseApplet/consultationInfo/uploadConsultationFile'
this.formdata = uni.getStorageSync('userinfo')
this.formdata.address = ''
this.formdata.fileUrls = []
this.infolist()
this.areaInfo();
}, },
onShow() { onShow() {
this.areaInfo();
let that = this let that = this
that.formdata = uni.getStorageSync('userinfo')
this.formdata.address=''
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.personName that.formdata.doctorName = item.personName
that.formdata.doctorId = item.id that.formdata.doctorId = item.id
console.log(that.formdata.doctorName, '45632')
uni.$off('doctordata') uni.$off('doctordata')
}) })
}, },
methods: { methods: {
updata() { updata() {
this.formdata.doctorName = this.doctorName this.formdata.doctorName = this.doctorName
this.formdata.doctorId = this.doctorId this.formdata.doctorId = this.doctorId
@ -206,74 +205,68 @@
onchoosecomplete(lists, name) { onchoosecomplete(lists, name) {
this.imglistlength = lists.length this.imglistlength = lists.length
}, },
onsuccess(data, index, lists, name) { // onsuccess(data, index, lists, name) {
if (data.code == 200) { // if (data.code == 200) {
this.formdata.fileUrls.push(data.fileUrl) // this.formdata.fileUrls.push(data.fileUrl)
} // }
}, // },
onuploaded() { onuploaded(lists, name) {
this.formdata.fileUrls = []
lists.forEach(e => {
this.formdata.fileUrls.push(e.response.fileUrl)
})
this.info(); this.info();
}, },
info() { info() {
this.$delete(this.formdata,'id') this.$delete(this.formdata, 'id')
console.log(this.formdata.address,'774')
this.formdata.consultationType = 'IMAGE_TEXT_CONSULTATION' this.formdata.consultationType = 'IMAGE_TEXT_CONSULTATION'
if (!this.formdata.address) { if (!this.formdata.address) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '请选择地址', title: '请选择地址',
type: 'error', type: 'error',
duration: '1500', duration: '1500',
// url:'/pages/homepage/homepage'
}) })
} else if (!this.formdata.patientName) { } else if (!this.formdata.patientName) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '请选择姓名', title: '请选择姓名',
type: 'error', type: 'error',
duration: '1500', duration: '1500',
}) })
} else if (!this.formdata.cardNo) { } else if (!this.formdata.cardNo) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '请选择身份证号', title: '请选择身份证号',
type: 'error', type: 'error',
duration: '1500', duration: '1500',
}) })
} else if (!this.formdata.phone) { } else if (!this.formdata.phone) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '请选择手机号', title: '请选择手机号',
type: 'error', type: 'error',
duration: '1500', duration: '1500',
}) })
} else if (!this.formdata.doctorName) { } else if (!this.formdata.doctorName) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '请选择医生', title: '请选择医生',
type: 'error', type: 'error',
duration: '1500', duration: '1500',
}) })
} else if (!this.formdata.problemDescription) { } else if (!this.formdata.problemDescription) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '请输入问题简述', title: '请输入问题简述',
type: 'error', type: 'error',
duration: '1500', duration: '1500',
}) })
} else if (!this.formdata.situationDescription) { } else if (!this.formdata.situationDescription) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '请输入患者个体说明', title: '请输入患者个体说明',
type: 'error', type: 'error',
duration: '1500', duration: '1500',
}) })
} else if (!this.formdata.medicalRecord) { } else if (!this.formdata.medicalRecord) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '请输入既往疾病史', title: '请输入既往疾病史',
type: 'error', type: 'error',
duration: '1500', duration: '1500',
}) })
} else { } else {
consultationInfo(this.formdata).then(res => { consultationInfo(this.formdata).then(res => {
@ -293,7 +286,6 @@
} }
}) })
} }
}, },
// //
showPicker() { showPicker() {
@ -325,26 +317,21 @@
infolist() { infolist() {
detail(this.formdata.cardNo).then(res => { detail(this.formdata.cardNo).then(res => {
var status = '1' var status = '1'
if(res.code==200){ if (res.code == 200) {
getHospitalPersonInfo(res.data.dutyDoctorNo, status).then(res => { getHospitalPersonInfo(res.data.dutyDoctorNo, status).then(res => {
this.doctorName = res.data.personName this.doctorName = res.data.personName
this.doctorId = res.data.id this.doctorId = res.data.id
this.doctorlist = res.data this.doctorlist = res.data
}) })
}else if (res.code==500){ } else if (res.code == 500) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.msg, title: res.msg,
type: 'error', type: 'error',
duration: '1500', duration: '1500',
}) })
} }
}) })
}, },
gochoosedoctor() { gochoosedoctor() {
console.log(this.doctorlist, '44444') console.log(this.doctorlist, '44444')
// detail(this.formdata.cardNo).then(res => { // detail(this.formdata.cardNo).then(res => {