You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
< script setup >
/**
* name:
* user: sa0ChunLuyu
* date: 2023年4月11日 09:32:32
*/
import {
$response , HospitalInfoAction
} from '~/api'
import $router from '~/router'
import { onBeforeRouteUpdate } from "vue-router" ;
const hospital _info = ref ( false )
const HospitalInfo = async ( ) => {
const response = await HospitalInfoAction ( )
$response ( response , ( ) => {
hospital _info . value = response . data . info
} )
}
const default _page _options = {
type : 0 ,
}
const page _options = ref ( JSON . parse ( JSON . stringify ( default _page _options ) ) )
onBeforeRouteUpdate ( ( to ) => {
routerChange ( to . query )
} )
const routerChange = ( query ) => {
page _options . value = {
type : Number ( query . type ) || default _page _options . type ,
}
HospitalInfo ( )
}
onMounted ( ( ) => {
routerChange ( $router . currentRoute . value . query )
} )
const pagePush = ( ) => {
const type = page _options . value . type
page _options . value . type = - 1
$router . push ( {
query : {
type
}
} )
}
const tabChange = ( e ) => {
page _options . value . type = e
pagePush ( )
}
const hospital _id = ref ( 0 )
< / script >
< template >
< div >
< n -card >
< div v-if ="!!hospital_info" >
< Additional13 :hospital ="hospital_info.id" v-if ="page_options.type === 0" > < / Additional13 >
< / div >
< / n -card >
< / div >
< / template >
< style scoped >
< / style >
< route >
{ "meta" : { "title" : "额外配置" } }
< / route >