diff --git a/public/template/therapeuticTemplate.xlsx b/public/template/therapeuticTemplate.xlsx index e4ada79..6f42aee 100644 Binary files a/public/template/therapeuticTemplate.xlsx and b/public/template/therapeuticTemplate.xlsx differ diff --git a/src/api/dictManage/therapeutic.js b/src/api/dictManage/therapeutic.js index f662df0..129a6ad 100644 --- a/src/api/dictManage/therapeutic.js +++ b/src/api/dictManage/therapeutic.js @@ -1,6 +1,6 @@ import request from "@/utils/request"; -const BASE_URL = "/internal"; +const BASE_URL = "/internal/medical-treatment-plan"; /** * 治疗方案 @@ -8,7 +8,7 @@ const BASE_URL = "/internal"; // 治疗方案列表 export function getTherapeuticListApi(params) { return request({ - url: `${BASE_URL}/medical-treatment-plan`, + url: `${BASE_URL}`, method: "get", params, }); @@ -17,7 +17,7 @@ export function getTherapeuticListApi(params) { // 新增治疗方案 export function addTherapeuticApi(data) { return request({ - url: `${BASE_URL}/medical-treatment-plan`, + url: `${BASE_URL}`, method: "post", data, }); @@ -26,7 +26,7 @@ export function addTherapeuticApi(data) { // 编辑治疗方案 export function editTherapeuticApi(data) { return request({ - url: `${BASE_URL}/medical-treatment-plan`, + url: `${BASE_URL}`, method: "put", data, }); @@ -35,22 +35,36 @@ export function editTherapeuticApi(data) { // 批量删除 export function batchDelTherapeuticApi(data) { return request({ - url: `${BASE_URL}/medical-treatment-plan`, + url: `${BASE_URL}`, method: "delete", data, }); } +// 批量导入 +export function bathImportTherapeuticApi(file) { + const formData = new FormData(); + formData.append("file", file); + return request({ + url: `${BASE_URL}/import`, + timeout: 60 * 1000 * 10, // 10分钟 + method: "post", + data: formData, + headers: { + "Content-Type": "multipart/form-data", + }, + }); +} // 治疗方案详情 export function getTherapeuticApi(id) { return request({ - url: `${BASE_URL}/medical-treatment-plan/${id}`, + url: `${BASE_URL}/${id}`, method: "get", }); } // 治疗方案详情 export function delTherapeuticApi(id) { return request({ - url: `${BASE_URL}/medical-treatment-plan/${id}`, + url: `${BASE_URL}/${id}`, method: "get", }); } diff --git a/src/views/dictManage/therapeuticRegimen/list/index.vue b/src/views/dictManage/therapeuticRegimen/list/index.vue index 89702fb..9bd6eca 100644 --- a/src/views/dictManage/therapeuticRegimen/list/index.vue +++ b/src/views/dictManage/therapeuticRegimen/list/index.vue @@ -2,7 +2,7 @@