修改筛查预约

This commit is contained in:
闫晓茹 2023-11-08 14:50:07 +08:00
parent ac3328cdae
commit ec20eddfec
2 changed files with 72 additions and 19 deletions

View File

@ -188,9 +188,9 @@ export function changeUserInfo(data) {
}) })
} }
// 获取机构列表 // 获取机构列表
export function getDeptList() { export function getDeptList(hospitalName) {
return request({ return request({
url: `/nurseApplet/hospital/getList`, url: `/nurseApplet/hospital/getList?hospitalName=${hospitalName}`,
method: 'get' method: 'get'
}) })
} }

View File

@ -28,13 +28,16 @@
<u-form :model="formData" :rules="rules" ref="form1"> <u-form :model="formData" :rules="rules" ref="form1">
<u-form-item label="预约机构" labelWidth="80"> <u-form-item label="预约机构" labelWidth="80">
<uni-data-select v-model="formData.hospitalId" :localdata="DeptList" @change="changeDept" <lx-input class="input" v-model="formData.hospitalName" :list="DeptList" @clickItem="confirm"
@clickMask="clickMask" @input="input" :hidden.sync="hidden"></lx-input>
<!-- <uni-data-select v-model="formData.hospitalId" :localdata="DeptList" @change="changeDept"
:clear="false"> :clear="false">
</uni-data-select> </uni-data-select> -->
</u-form-item> </u-form-item>
<view class=""> <view class="">
<u-form-item label="预约项目" labelWidth="80"> <u-form-item label="预约项目" labelWidth="80">
<view class="" @click="appointitem" v-if="formData.hospitalId==''"> <view class="" @click="appointitem" v-if="formData.hospitalId==''">
<!-- 111 -->
<uni-data-select v-model="formData.projectId" :localdata="ProList" @change="changePro" <uni-data-select v-model="formData.projectId" :localdata="ProList" @change="changePro"
:clear="false" disabled> :clear="false" disabled>
</uni-data-select> </uni-data-select>
@ -43,6 +46,7 @@
<uni-data-select v-model="formData.projectId" :localdata="ProList" @change="changePro" <uni-data-select v-model="formData.projectId" :localdata="ProList" @change="changePro"
:clear="false"> :clear="false">
</uni-data-select> </uni-data-select>
<!-- 111 -->
</view> </view>
</u-form-item> </u-form-item>
</view> </view>
@ -58,6 +62,7 @@
</view> </view>
<u-action-sheet :show="showSex" :actions="actions" title="请选择性别" @close="showSex = false" @select="sexSelect"> <u-action-sheet :show="showSex" :actions="actions" title="请选择性别" @close="showSex = false" @select="sexSelect">
</u-action-sheet> </u-action-sheet>
11
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
@ -76,6 +81,7 @@
export default { export default {
data() { data() {
return { return {
hidden: false,
showSex: false, showSex: false,
userInfo: {}, userInfo: {},
datetimerange: [Date.now(), this.todayEndTime()], datetimerange: [Date.now(), this.todayEndTime()],
@ -197,20 +203,46 @@
this.userInfo = JSON.parse(e.userinfo) this.userInfo = JSON.parse(e.userinfo)
if (this.userInfo.sex == 'MALE') { if (this.userInfo.sex == 'MALE') {
this.userInfo.sex = '男' this.userInfo.sex = '男'
} else if(this.userInfo.sex == 'FEMALE'){ } else if (this.userInfo.sex == 'FEMALE') {
this.userInfo.sex = '女' this.userInfo.sex = '女'
} }
this.userInfo.age = getAgeFun(this.userInfo.birthDate) this.userInfo.age = getAgeFun(this.userInfo.birthDate)
if(this.userInfo.diseaseList.length>0){ if (this.userInfo.diseaseList.length > 0) {
this.formData.disease = this.userInfo.diseaseList.join(',') this.formData.disease = this.userInfo.diseaseList.join(',')
console.log(this.formData.disease,'9999') console.log(this.formData.disease, '9999')
} }
} }
this.getDeptAndPro() this.getDeptAndPro()
}, },
watch: { //
'formData.hospitalName'(e) {
console.log(e, '858')
this.getDeptAndPro()
},
},
methods: { methods: {
clickMask(e) {
console.log(e, '478')
},
input(e) {
if (e) {
this.formData.hospitalName = e
this.formData.hospitalNameId = ''
}
},
confirm(e) {
console.log(e, '89')
this.formData.projectId = ''
this.infolist()
// this.formData.hospitalName = this.DeptList.find(item => item.value == e).text
this.formData.hospitalName = e.label
this.formData.hospitalId = e.value
},
appointitem(e) { appointitem(e) {
var that = this var that = this
if (that.formData.hospitalId == '') { if (that.formData.hospitalId == '') {
@ -221,12 +253,14 @@
} }
}, },
getDeptAndPro() { getDeptAndPro() {
getDeptList().then(res => { getDeptList(this.formData.hospitalName).then(res => {
this.DeptList = res.data.map(item => { this.DeptList = []
return { res.data.map((item) => {
text: item.hospitalName, var obj = {
label: item.hospitalName,
value: item.id value: item.id
} };
this.DeptList.push(obj);
}) })
}) })
@ -235,7 +269,7 @@
getProlist({ getProlist({
projectType: 1, projectType: 1,
status: 0, status: 0,
hospitalId: this.hospitalId hospitalId: this.formData.hospitalId
}).then(res => { }).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.ProList = res.data.map(item => { this.ProList = res.data.map(item => {
@ -250,10 +284,7 @@
changeDept(e) { changeDept(e) {
console.log(e, '99') console.log(e, '99')
console.log(this.formData, '9') console.log(this.formData, '9')
this.formData.projectId = ''
this.hospitalId = e
this.infolist()
this.formData.hospitalName = this.DeptList.find(item => item.value == e).text
}, },
changePro(e) { changePro(e) {
this.formData.projectName = this.ProList.find(item => item.value == e).text this.formData.projectName = this.ProList.find(item => item.value == e).text
@ -390,6 +421,28 @@
// z-index: 99; // z-index: 99;
// } // }
// } // }
::v-deep .inputBox .focusBox .inputStyle.data-v-36ae0e32 {
height: 70rpx !important;
// color: #006DF7;
width: 91%;
padding-right: 60rpx;
border: 1px solid #C4C5C6;
}
::v-deep .inputBox .focusBox .inputStyle.data-v-36ae0e32 {
color: #000 !important;
}
::v-deep .srollViewBox .scrollView-item.data-v-36ae0e32 {
padding-left: 0 !important;
color: #000 !important;
line-height: 45rpx !important;
}
::v-deep .srollViewBox .scrollView.data-v-36ae0e32 {
height: 350rpx !important;
overflow: auto;
}
::v-deep.u-form-item--left__content__label.data-v-5e7216f1 { ::v-deep.u-form-item--left__content__label.data-v-5e7216f1 {
display: flex; display: flex;
@ -489,4 +542,4 @@
/deep/.u-button__text { /deep/.u-button__text {
font-size: 34rpx !important; font-size: 34rpx !important;
} }
</style> </style>