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

View File

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