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.

75 lines
1.3 KiB
Vue

This file contains ambiguous Unicode characters!

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
* usersa0ChunLuyu
* date2023年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>