diff --git a/src/components/home/index/Card.vue b/src/components/home/index/Card.vue index cc4c0a6..2bb433e 100644 --- a/src/components/home/index/Card.vue +++ b/src/components/home/index/Card.vue @@ -4,14 +4,15 @@ import {post} from "@/utils/request.ts"; import {onMounted, ref, defineModel} from "vue"; import {formatDate} from "@/utils/dateUtils.ts"; import {loadConfig} from "@/utils/config.ts"; +import {API} from "@/assets/config/API.ts"; const decryptedText = ref({}) const ciphertext = ref('') const list = ref([]) const init = async () => { - ciphertext.value = await post("common/auth/get"); - decryptedText.value = await post("common/auth/check"); - list.value = await post("common/config/list") + ciphertext.value = await post(API.Common.Auth.Get); + decryptedText.value = await post(API.Common.Auth.Check); + list.value = await post(API.Common.Config.List) list.value.forEach((item: any) => { if (item.k == "logoUrl") { loadConfig().then((res: any) => { diff --git a/src/components/home/index/Dialog/ExpireWarnDetail.vue b/src/components/home/index/Dialog/ExpireWarnDetail.vue index f30cdea..c647dae 100644 --- a/src/components/home/index/Dialog/ExpireWarnDetail.vue +++ b/src/components/home/index/Dialog/ExpireWarnDetail.vue @@ -47,11 +47,12 @@ import Mask from "@/components/common/Mask.vue"; import {ref} from "vue"; import CloseBtn from "@/components/CloseBtn.vue"; import {post} from "@/utils/request.ts"; +import {API} from "@/assets/config/API.ts"; const tableData = ref([]); const show = ref(false); const init = () => { show.value = true; - post("statistics/expiryDateWarning",{pageNum: pageNum.value, pageSize: pageSize.value}).then((res: any) => { + post(API.Statistics.Base.ExpiryDateWarning,{pageNum: pageNum.value, pageSize: pageSize.value}).then((res: any) => { tableData.value = res.list total.value = res.total_count }) diff --git a/src/components/home/index/Dialog/InventoryWarnDetail.vue b/src/components/home/index/Dialog/InventoryWarnDetail.vue index c957ba1..ad62525 100644 --- a/src/components/home/index/Dialog/InventoryWarnDetail.vue +++ b/src/components/home/index/Dialog/InventoryWarnDetail.vue @@ -51,12 +51,13 @@ import Mask from "@/components/common/Mask.vue"; import {ref} from "vue"; import CloseBtn from "@/components/CloseBtn.vue"; import {post} from "@/utils/request.ts"; +import {API} from "@/assets/config/API.ts"; const tableData = ref([]); const show = ref(false); const init = () => { show.value = true; - post("statistics/numberEarlyWarning", {pageNum: pageNum.value, pageSize: pageSize.value}).then((res: any) => { + post(API.Statistics.Base.NumberEarlyWarning, {pageNum: pageNum.value, pageSize: pageSize.value}).then((res: any) => { tableData.value = res.list total.value = res.total_count }) diff --git a/src/components/manger/Auth.vue b/src/components/manger/Auth.vue index 479d51c..fe100c1 100644 --- a/src/components/manger/Auth.vue +++ b/src/components/manger/Auth.vue @@ -47,20 +47,21 @@ import {post} from "@/utils/request.ts"; import {onMounted, ref} from "vue"; import {ElMessage} from "element-plus"; import {formatDate} from "@/utils/dateUtils.ts"; +import {API} from "@/assets/config/API.ts"; const decryptedText = ref({}) const ciphertext = ref('') const save = () => { if (ciphertext.value) { - post("common/auth/set", {ciphertext: ciphertext.value}).then(() => { + post(API.Common.Auth.Set, {ciphertext: ciphertext.value}).then(() => { ElMessage.success("保存成功") init() }) } } const init = async () => { - ciphertext.value=await post("common/auth/get"); - decryptedText.value=await post("common/auth/check"); + ciphertext.value=await post(API.Common.Auth.Get); + decryptedText.value=await post(API.Common.Auth.Check); } onMounted(async () => { await init() diff --git a/src/components/registration/CardDefault.vue b/src/components/registration/CardDefault.vue index a9669fb..0acbb48 100644 --- a/src/components/registration/CardDefault.vue +++ b/src/components/registration/CardDefault.vue @@ -12,7 +12,7 @@ const socialCard: any = defineModel(); const ReadSocialCard = async (readType: string) => { emit("changeLoading", true) isReading.value = true; - let config_db: any = await post('common/config/getall'); + let config_db: any = await post(API.Common.Config.GetAll); let config: any = {} config.ACCESS_KEY = config_db.social_ACCESS_KEY; config.SECRETKEY = config_db.social_SECRETKEY; diff --git a/src/components/registration/Edit.vue b/src/components/registration/Edit.vue index 2012588..e3d9a01 100644 --- a/src/components/registration/Edit.vue +++ b/src/components/registration/Edit.vue @@ -352,7 +352,7 @@ const getDoctorList = () => { let query = { role: 1 } - post('organization/member/search', {query: query}).then((res: any) => { + post(API.Organization.Member.Search, {query: query}).then((res: any) => { doctorList.value = res }) } @@ -373,7 +373,7 @@ const init = (doctorId: any = "", id: any = null, show: any = false) => { edit_data.value.type = 1 isBtnShow.value = dateName.value == '现在'; if (id) { - post('registration/getById', {id: id}).then((res: any) => { + post(API.Patient.Registration.Get, {id: id}).then((res: any) => { edit_data.value = res time.value = edit_data.value.timeList[edit_data.value.timeList.length - 1] }) @@ -396,7 +396,7 @@ const socialCardUpdate = (e: any) => { tableData.value = e.data.insuinfo edit_data.value.type = 2 if (!edit_data.value.certNo) return; - post('vip/vip/list', { + post(API.Patient.Base.List, { keyword: edit_data.value.certNo, page: 1, pageSize: 50 diff --git a/src/components/registration/List.vue b/src/components/registration/List.vue index e4820b4..75e5c40 100644 --- a/src/components/registration/List.vue +++ b/src/components/registration/List.vue @@ -56,6 +56,7 @@ import {defineProps, onMounted, ref} from 'vue' import {formatDate} from "@/utils/dateUtils.ts"; import {post} from "@/utils/request.ts"; +import {API} from "@/assets/config/API.ts"; const props = defineProps({ patientList: { @@ -78,7 +79,7 @@ const initDoctor = () => { keyword: null, role: 1 } - post('organization/member/search', {query: query}).then((res: any) => { + post(API.Organization.Member.Search, {query: query}).then((res: any) => { roleList.value = res }) } @@ -87,7 +88,7 @@ const rowClick = (row: any) => { emit('rowClick', row) } const initSection = () => { - post('organization/section/allList').then((res: any) => { + post(API.Organization.Section.AllList).then((res: any) => { sectionList.value = res }) } diff --git a/src/components/settings/AddUser.vue b/src/components/settings/AddUser.vue index 8a8dddf..8cfa05e 100644 --- a/src/components/settings/AddUser.vue +++ b/src/components/settings/AddUser.vue @@ -97,7 +97,7 @@ const save = () => { return; } // 如果验证通过,发送请求 - post("setting/user/save", {userInfo: userInfo.value}).then((res: any) => { + post(API."setting/user/save", {userInfo: userInfo.value}).then((res: any) => { formDataRef.value?.resetFields(); close() }); diff --git a/src/components/settings/ListChild.vue b/src/components/settings/ListChild.vue index 58cec08..5aee515 100644 --- a/src/components/settings/ListChild.vue +++ b/src/components/settings/ListChild.vue @@ -1,6 +1,7 @@