11.5修改
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
// 引入依赖
|
||||
import uniDatetimePicker from '@/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue'
|
||||
import uniEasyinput from '@/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue'
|
||||
import { onLoad } from "@dcloudio/uni-app"
|
||||
import { onLoad,onShow } from "@dcloudio/uni-app"
|
||||
import mySwiper from "@/components/mySwiper.vue"
|
||||
import {ref,onMounted,nextTick,watch} from "vue"
|
||||
import api from '@/api/index.js'
|
||||
import {useStore} from '@/store/index.js'
|
||||
// import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
|
||||
const store = useStore()
|
||||
onLoad((e) => {
|
||||
onShow((e) => {
|
||||
getLbtList()
|
||||
if(store.userInfo && !store.operation_info) { //登录过 且 未填写手术信息
|
||||
// getHospitalList()
|
||||
@@ -67,7 +67,7 @@
|
||||
}
|
||||
const hValue = ref('') // 医院
|
||||
const hValueId = ref('') // 医院id
|
||||
function onClickH(e) {
|
||||
function onClickH() {
|
||||
h_queryParams.value.key = hValue.value
|
||||
getHospitalList()
|
||||
|
||||
@@ -78,9 +78,10 @@
|
||||
})
|
||||
}
|
||||
function toChooseH(item) {
|
||||
// console.log(item)
|
||||
choosed_h.value = item
|
||||
hValue.value = item.name
|
||||
hospitals.value = null
|
||||
// hospitals.value = null
|
||||
}
|
||||
// function blurFunc() {
|
||||
// blur_h.value = 1
|
||||
@@ -104,7 +105,7 @@
|
||||
}
|
||||
let user_info = JSON.parse(uni.getStorageSync('userInfo'))
|
||||
let h_query = {
|
||||
isSurgery:isSurgery.value,
|
||||
isSurgery:parseInt(isSurgery.value),
|
||||
surgery_time:surgery_time.value,
|
||||
userId:user_info.userId,
|
||||
hospitalId:choosed_h.value?.ID
|
||||
@@ -122,17 +123,31 @@
|
||||
}
|
||||
else{
|
||||
uni.showToast({
|
||||
title:"操作失败",
|
||||
title:res.msg,
|
||||
icon:"error",
|
||||
duration:2000
|
||||
duration:2000,
|
||||
success() {
|
||||
if(res.code === 7) // 登录失败
|
||||
{
|
||||
// // 清空缓存
|
||||
// uni.removeStorageSync('userInfo');
|
||||
// uni.removeStorageSync('access_token');
|
||||
// uni.removeStorageSync('avatarUrl');
|
||||
// uni.switchTab({
|
||||
// url:'/pages/user/index'
|
||||
// })
|
||||
store.afterFailLogin()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
function todoFunc(state) {
|
||||
function todoFunc(state_index) {
|
||||
let url = '/pages/index/todo'
|
||||
if(state === 2) {
|
||||
url = '/pages/index/done'
|
||||
}
|
||||
url = '/pages/index/done?state_index='+state_index
|
||||
// if(state_index === 0) {
|
||||
// url = '/pages/index/done?state_index='+state_index
|
||||
// }
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
@@ -170,7 +185,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="main-cards">
|
||||
<view @tap="todoFunc(2)" class="mc-part" style="margin-left: 0;">
|
||||
<view @tap="todoFunc(0)" class="mc-part" style="margin-left: 0;">
|
||||
<view class="mc-part-text">已完成事项</view>
|
||||
<image src="../../static/done.png" mode="widthFix"></image>
|
||||
</view>
|
||||
@@ -221,12 +236,13 @@
|
||||
<view class="pb-item">
|
||||
<view class="pb-item-left">医院名称</view>
|
||||
<view class="pb-item-right">
|
||||
<uniEasyinput @tap.stop="focusFunc" suffixIcon="search" v-model="hValue" focus placeholder="请输入内容" @iconClick="onClickH"></uniEasyinput>
|
||||
<!-- <uniEasyinput @tap.stop="focusFunc" suffixIcon="search" v-model="hValue" focus placeholder="请输入内容" @iconClick="onClickH"></uniEasyinput>
|
||||
<view class="h_res_show_aprt" v-if="hospitals">
|
||||
<view v-for="(item,i) in hospitals" @tap.stop="toChooseH(item)" class="h_res_show_aprt_row text-ellipsis-1">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<uni-combox @input="onClickH" :candidates="hospitals" placeholder="请选择医院" @choosed="toChooseH" v-model="hValue"></uni-combox>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pb-item pb-item-btn" @tap="toSave">提交</view>
|
||||
@@ -294,6 +310,7 @@
|
||||
// justify-content: space-between;
|
||||
.pb-item-left{
|
||||
width: 30%;
|
||||
color: gray;
|
||||
}
|
||||
.pb-item-right{
|
||||
position: relative;
|
||||
|
Reference in New Issue
Block a user