diff --git a/src/axios/api1.js b/src/axios/api1.js
index 6b946d699b0fec87ff36f41fb011cbb0cd57c0ca..f42f22f4c756b6351f8c2dd9a6ae8aeab003f67b 100644
--- a/src/axios/api1.js
+++ b/src/axios/api1.js
@@ -177,4 +177,8 @@ export function doctor_del(params = {}) {
// 新增服务包
export function team_addPackage(params = {}) {
return service.post('/team/addPackage', params)
+}
+// 编辑服务项目
+export function edit_project(params = {}) {
+ return service.post('/service/editproject', params)
}
\ No newline at end of file
diff --git a/src/mock/DataMangement.js b/src/mock/DataMangement.js
index f04053927bea271cef697f38aaaf5ac0255ec201..f31b74ce2d7b1c71aafd3b859724a5841e02b027 100644
--- a/src/mock/DataMangement.js
+++ b/src/mock/DataMangement.js
@@ -103,7 +103,7 @@ Mock.mock('/api/orgin/add', 'post', (req) => {
// 查询机构信息
Mock.mock('/api/orgin/search', 'post', (req) => {
var { key } = JSON.parse(req.body)
-
+
var index = OrginData.orginlist.findIndex((item) => {
return item.key == key
})
@@ -938,4 +938,20 @@ Mock.mock('/api/available/search_a', 'post', (req) => {
return { code: 200, msg: "查询成功", available: newAvailablelist_b }
}
}
+})
+// 编辑服务项目
+Mock.mock('/api/service/editproject', 'post', (req) => {
+ var json = JSON.parse(req.body)
+ var index = servicesAvailable.available.findIndex((item) => {
+ return item.Availableid == json.Availableid
+ })
+ if (index != -1) {
+ servicesAvailable.available[index].Availablename = json.Availablename
+ servicesAvailable.available[index].Availableprice = json.Availableprice
+ servicesAvailable.available[index].Availablenum = json.Availablenum
+ servicesAvailable.available[index].Availabletype = json.Availabletype
+ servicesAvailable.available[index].Availableintroduce = json.Availableintroduce
+ localStorage.setItem('service_available', JSON.stringify(servicesAvailable))
+ }
+ return { code: 200 }
})
\ No newline at end of file
diff --git a/src/routers/DataManagement/index.tsx b/src/routers/DataManagement/index.tsx
index 45881a4842b6b1e8913eb0b8cb469eb994a6319d..b3e7ca8cd2d65fb8aaf835c9eb8c8cb474d56798 100644
--- a/src/routers/DataManagement/index.tsx
+++ b/src/routers/DataManagement/index.tsx
@@ -21,6 +21,7 @@ const DoctorDetail = lazy(() => import("../../views/DataManagement/doctor/Doctor
const AddPack = lazy(() => import("../../views/DataManagement/package/Addpack"))
const EditPack = lazy(() => import("../../views/DataManagement/package/Editpack"))
const Project = lazy(() => import("../../views/DataManagement/Project/AddProject"))
+const EditProject = lazy(() => import("../../views/DataManagement/Project/EditProject"))
export default [
// 资料管理
@@ -118,5 +119,9 @@ export default [
{
path: '/MyLayout/Project',
element:
服务项目信息
+ {/* 表单信息 */} + <> +