|
|
|
@ -11,10 +11,11 @@
|
|
|
|
|
import {useStore} from '@/store/index.js'
|
|
|
|
|
// import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
|
|
|
|
|
const store = useStore()
|
|
|
|
|
const h_index = ref(0)
|
|
|
|
|
onShow((e) => {
|
|
|
|
|
getLbtList()
|
|
|
|
|
if(store.userInfo && !store.operation_info) { //登录过 且 未填写手术信息
|
|
|
|
|
// getHospitalList()
|
|
|
|
|
getHospitalList()
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
inputDialog.value.open()
|
|
|
|
|
},0)
|
|
|
|
@ -26,7 +27,7 @@
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 变量
|
|
|
|
|
const hospitals = ref(null)
|
|
|
|
|
const hospitals = ref([])
|
|
|
|
|
// const hospitals_show = ref(false)
|
|
|
|
|
const inputDialog = ref()
|
|
|
|
|
const inputClose = ref()
|
|
|
|
@ -52,6 +53,7 @@
|
|
|
|
|
const res = await api.getHospitalList(h_queryParams.value)
|
|
|
|
|
if(res.code == 0) {
|
|
|
|
|
hospitals.value = res.data.list
|
|
|
|
|
console.log(hospitals.value )
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
async function getLbtList() { // 获取轮播图
|
|
|
|
@ -97,7 +99,7 @@
|
|
|
|
|
// blur_h.value = 0
|
|
|
|
|
}
|
|
|
|
|
function toBlur(){
|
|
|
|
|
hospitals.value = null
|
|
|
|
|
// hospitals.value = null
|
|
|
|
|
}
|
|
|
|
|
async function toSave() {
|
|
|
|
|
if(isSurgery.value == -1) {
|
|
|
|
@ -114,7 +116,9 @@
|
|
|
|
|
isSurgery:parseInt(isSurgery.value),
|
|
|
|
|
surgery_time:surgery_time.value,
|
|
|
|
|
userId:user_info.userId,
|
|
|
|
|
hospitalId:choosed_h.value?.ID
|
|
|
|
|
// hospitalId:choosed_h.value?.ID
|
|
|
|
|
hospitalId:hospitals.value[h_index.value]?.ID
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// console.log(h_query);return
|
|
|
|
|
const res = await api.hospital(h_query)
|
|
|
|
@ -169,6 +173,11 @@
|
|
|
|
|
url:"/pages/index/note_list?index="+index
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function bindPickerChange(e) {
|
|
|
|
|
console.log(hospitals.value )
|
|
|
|
|
h_index.value = e.detail.value
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<template>
|
|
|
|
|
<view class="content page-box">
|
|
|
|
@ -254,7 +263,10 @@
|
|
|
|
|
{{item.name}}
|
|
|
|
|
</view>
|
|
|
|
|
</view> -->
|
|
|
|
|
<uni-combox @input="onClickH" :candidates="hospitals" placeholder="请选择医院" @choosed="toChooseH" v-model="hValue"></uni-combox>
|
|
|
|
|
<!-- <uni-combox @input="onClickH" :candidates="hospitals" placeholder="请选择医院" @choosed="toChooseH" v-model="hValue"></uni-combox> -->
|
|
|
|
|
<picker @change="bindPickerChange" :value="h_index" :range="hospitals" range-key="name">
|
|
|
|
|
<view class="uni-input">{{hospitals[h_index]?.name}}</view>
|
|
|
|
|
</picker>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="pb-item pb-item-btn" @tap="toSave">提交</view>
|
|
|
|
|