mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2025-08-23 20:44:58 +08:00
打包报错解决
This commit is contained in:
parent
24fcbb6e55
commit
14fde460df
|
@ -2,6 +2,7 @@ import axios from "axios";
|
|||
|
||||
// const HOST = 'http://127.0.0.1:3001';
|
||||
const HOST = 'http://123.57.147.184:3001';
|
||||
const BASE_URL = import.meta.env.BASE_URL
|
||||
|
||||
export const get = (url: any, params: any, success: any) => {
|
||||
axios.get(HOST + url, params)
|
||||
|
@ -22,7 +23,7 @@ export const post = (url: any, params: any, success: any) => {
|
|||
});
|
||||
};
|
||||
export const getMapJson = (name: string) => {
|
||||
return axios.post('/static/json/' + name)
|
||||
return axios.post(BASE_URL+'/static/json/' + name)
|
||||
}
|
||||
export const getData = (url: string, params?: any) => {
|
||||
return axios.get(url, params)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="所在医院" prop="hospital">
|
||||
<el-select v-model="formData.hospital" placeholder="请选择医院">
|
||||
<el-option v-for="item in getHospitalsData()" :key="item.value" :label="item.label"
|
||||
<el-option v-for="item in hospitals" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -17,7 +17,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="可见组织" prop="showDept">
|
||||
<el-select v-model="formData.showDept" multiple placeholder="请选择组织">
|
||||
<el-option v-for="item in getHospitalsData()" :key="item.value" :label="item.label"
|
||||
<el-option v-for="item in hospitals" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -80,6 +80,11 @@ const formData = ref({
|
|||
link: '',
|
||||
isHot: true,
|
||||
} as any)
|
||||
const hospitals = ref([] as any)
|
||||
getHospitalsData().then((res: any) => {
|
||||
hospitals.value = res
|
||||
console.log(res)
|
||||
})
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
|
|
|
@ -28,8 +28,8 @@ function setMap(name: string, totalData: any) {
|
|||
const chinaJson = res.data
|
||||
const data: any = []
|
||||
const markData: any = []
|
||||
console.log(totalData)
|
||||
console.log(chinaJson.features)
|
||||
// console.log(totalData)
|
||||
// console.log(chinaJson.features)
|
||||
chinaJson.features.forEach((item: any, index: number) => {
|
||||
const key = adcodeFormatter(item.properties.adcode + '')
|
||||
console.log(key)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<el-form ref="formRef" :model="formData" :rules="rules" label-width="80">
|
||||
<el-form-item label="医院" prop="hospital">
|
||||
<el-select v-model="formData.hospital" placeholder="请选择医院">
|
||||
<el-option v-for="item in getHospitalsData()" :key="item.value" :label="item.label"
|
||||
<el-option v-for="item in hospitals" :key="item.value" :label="item.label"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
@ -97,7 +97,11 @@ const formData = ref({
|
|||
phone: '',
|
||||
enable: true,
|
||||
} as any)
|
||||
|
||||
const hospitals = ref([] as any)
|
||||
getHospitalsData().then((res: any) => {
|
||||
hospitals.value = res
|
||||
console.log(res)
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
resetData()
|
||||
|
|
Loading…
Reference in New Issue
Block a user