|
|
|
|
@ -1,10 +1,19 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="SelectOrganization">
|
|
|
|
|
<LoadingD :status="loading"></LoadingD>
|
|
|
|
|
<div v-if="orgList.length>0">
|
|
|
|
|
<div style="display: flex;justify-content: space-between;width: 100%;padding: 8px;">
|
|
|
|
|
<div></div>
|
|
|
|
|
<div v-if="username" style="font-size: 16px;font-weight: 700; color: #277d7b;"><van-icon name="manager"
|
|
|
|
|
size="18" style="margin-right: 4px;" />{{username}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<div class="title">请选择预约体检机构</div>
|
|
|
|
|
<div style="display: flex;justify-content: space-between;">
|
|
|
|
|
<div class="title2">请就近选择体检机构</div>
|
|
|
|
|
<van-radio-group v-model="organization" >
|
|
|
|
|
<div style="text-align: right;"><input type="text" v-model="searchInfo" class="orginput"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="orgList.length>0">
|
|
|
|
|
<van-radio-group v-model="organization">
|
|
|
|
|
<div v-for=" item in orgList" class="item" :key="item.id" :class="organization==item.id?'active':''"
|
|
|
|
|
@click="organization=item.id">
|
|
|
|
|
<div class="logo"><img src="../assets/image/map.png" /></div>
|
|
|
|
|
@ -15,8 +24,11 @@
|
|
|
|
|
</div>
|
|
|
|
|
</van-radio-group>
|
|
|
|
|
<van-button v-if="organization" type="primary" class="button" round @click="to(url)">立即进入</van-button>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<van-empty v-else description="暂无信息" />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -24,7 +36,8 @@
|
|
|
|
|
<script setup>
|
|
|
|
|
import {
|
|
|
|
|
ref,
|
|
|
|
|
onMounted
|
|
|
|
|
onMounted,
|
|
|
|
|
watch
|
|
|
|
|
} from 'vue';
|
|
|
|
|
import {
|
|
|
|
|
useRouter
|
|
|
|
|
@ -43,9 +56,11 @@
|
|
|
|
|
const pinia = usePiniaStore()
|
|
|
|
|
//import Loading from '@/components/Loading.vue'
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
let username = ref('');
|
|
|
|
|
let loading = ref(false)
|
|
|
|
|
let organization = ref('')
|
|
|
|
|
let orgList = ref([])
|
|
|
|
|
let searchInfo = ref('');
|
|
|
|
|
const CheckRecord = () => { //检测是否在本年度体检过
|
|
|
|
|
loading.value = true
|
|
|
|
|
GetPersonRecode().then(res => {
|
|
|
|
|
@ -71,12 +86,16 @@
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
let allList = ref([]);
|
|
|
|
|
const getList = () => {
|
|
|
|
|
loading.value = true
|
|
|
|
|
GetOrgEnableList({yuyue_type:'jiankangzheng_mf'}).then(res => {
|
|
|
|
|
GetOrgEnableList({
|
|
|
|
|
yuyue_type: sessionStorage.getItem('yuyueType')
|
|
|
|
|
}).then(res => {
|
|
|
|
|
loading.value = false
|
|
|
|
|
if (res.status) {
|
|
|
|
|
orgList.value = res.list
|
|
|
|
|
allList.value = res.list
|
|
|
|
|
} else {
|
|
|
|
|
showToast(res.msg);
|
|
|
|
|
}
|
|
|
|
|
@ -86,11 +105,35 @@
|
|
|
|
|
const to = (url) => {
|
|
|
|
|
let info = pinia.yuyue_info
|
|
|
|
|
info.org_id = organization.value
|
|
|
|
|
info.yuyue_type=sessionStorage.getItem("yuyueType")
|
|
|
|
|
orgList.value.forEach((v, i) => {
|
|
|
|
|
if (v.id == organization.value) {
|
|
|
|
|
info.org_name = v.org_name
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
pinia.ChangeYuYueInfo(info)
|
|
|
|
|
if(sessionStorage.getItem('yuyueType')=='jiankangzheng_mf'){
|
|
|
|
|
router.push('/documentSubmit')
|
|
|
|
|
}else{
|
|
|
|
|
router.push('/selectDate')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
watch(searchInfo, (newValue, oldValue) => {
|
|
|
|
|
orgList.value = [];
|
|
|
|
|
if (newValue == '' || newValue == null) {
|
|
|
|
|
orgList.value = allList.value
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
allList.value.forEach((v, i) => {
|
|
|
|
|
if ((v.jianpin != null && v.jianpin.includes(newValue)) || v.org_name.includes(newValue)) {
|
|
|
|
|
orgList.value.push(v)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
CheckRecord()
|
|
|
|
|
username.value = sessionStorage.getItem('name')
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
@ -159,4 +202,10 @@
|
|
|
|
|
margin-top: 50px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.orginput {
|
|
|
|
|
border: 1px solid #90d4ec;
|
|
|
|
|
height: 30px;
|
|
|
|
|
border-radius: 15px;
|
|
|
|
|
padding-left: 18px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|