From 9843ca4020d180282b8ccdf143da6e2d0962bac5 Mon Sep 17 00:00:00 2001 From: jzq <1391797124@qq.com> Date: Mon, 29 Jul 2024 21:20:12 +0800 Subject: [PATCH] fix the error of project plan --- ruoyi-ui/src/api/scientific/handbook.js | 10 +- .../scientific/project_application_plan.js | 44 ++ ruoyi-ui/src/router/index.js | 79 ++- .../src/views/scientific/handbook/index.vue | 379 ++++--------- .../src/views/scientific/project/index.vue | 46 +- .../scientific/{ => project}/projectApply.vue | 0 .../detail.vue | 2 +- .../project_application_plan/index.vue | 535 ++++++++++++++++++ .../planApply.vue} | 4 +- .../controller/HandbookController.java | 108 ++++ .../ProjectApplicationController.java | 2 +- .../controller/ProjectHandbookController.java | 14 +- .../com/ruoyi/scientific/domain/Handbook.java | 65 +++ .../scientific/domain/bo/HandbookBo.java | 81 +++ .../scientific/domain/vo/HandbookVo.java | 81 +++ .../scientific/mapper/HandbookMapper.java | 15 + .../scientific/service/IHandbookService.java | 49 ++ .../service/impl/HandbookServiceImpl.java | 117 ++++ .../mapper/scientific/HandbookMapper.xml | 24 + 19 files changed, 1335 insertions(+), 320 deletions(-) create mode 100644 ruoyi-ui/src/api/scientific/project_application_plan.js rename ruoyi-ui/src/views/scientific/{ => project}/projectApply.vue (100%) rename ruoyi-ui/src/views/scientific/{handbook => project_application_plan}/detail.vue (99%) create mode 100644 ruoyi-ui/src/views/scientific/project_application_plan/index.vue rename ruoyi-ui/src/views/scientific/{handbook_apply.vue => project_application_plan/planApply.vue} (97%) create mode 100644 scientific/src/main/java/com/ruoyi/scientific/controller/HandbookController.java create mode 100644 scientific/src/main/java/com/ruoyi/scientific/domain/Handbook.java create mode 100644 scientific/src/main/java/com/ruoyi/scientific/domain/bo/HandbookBo.java create mode 100644 scientific/src/main/java/com/ruoyi/scientific/domain/vo/HandbookVo.java create mode 100644 scientific/src/main/java/com/ruoyi/scientific/mapper/HandbookMapper.java create mode 100644 scientific/src/main/java/com/ruoyi/scientific/service/IHandbookService.java create mode 100644 scientific/src/main/java/com/ruoyi/scientific/service/impl/HandbookServiceImpl.java create mode 100644 scientific/src/main/resources/mapper/scientific/HandbookMapper.xml diff --git a/ruoyi-ui/src/api/scientific/handbook.js b/ruoyi-ui/src/api/scientific/handbook.js index 13d2a6d..1ed34fb 100644 --- a/ruoyi-ui/src/api/scientific/handbook.js +++ b/ruoyi-ui/src/api/scientific/handbook.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 查询项目申报v2列表 +// 查询项目申报指南列表 export function listHandbook(query) { return request({ url: '/scientific/handbook/list', @@ -9,7 +9,7 @@ export function listHandbook(query) { }) } -// 查询项目申报v2详细 +// 查询项目申报指南详细 export function getHandbook(handbookId) { return request({ url: '/scientific/handbook/' + handbookId, @@ -17,7 +17,7 @@ export function getHandbook(handbookId) { }) } -// 新增项目申报v2 +// 新增项目申报指南 export function addHandbook(data) { return request({ url: '/scientific/handbook', @@ -26,7 +26,7 @@ export function addHandbook(data) { }) } -// 修改项目申报v2 +// 修改项目申报指南 export function updateHandbook(data) { return request({ url: '/scientific/handbook', @@ -35,7 +35,7 @@ export function updateHandbook(data) { }) } -// 删除项目申报v2 +// 删除项目申报指南 export function delHandbook(handbookId) { return request({ url: '/scientific/handbook/' + handbookId, diff --git a/ruoyi-ui/src/api/scientific/project_application_plan.js b/ruoyi-ui/src/api/scientific/project_application_plan.js new file mode 100644 index 0000000..3479dd8 --- /dev/null +++ b/ruoyi-ui/src/api/scientific/project_application_plan.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询项目申报v2列表 +export function listPlan(query) { + return request({ + url: '/scientific/plan/list', + method: 'get', + params: query + }) +} + +// 查询项目申报v2详细 +export function getPlan(handbookId) { + return request({ + url: '/scientific/plan/' + handbookId, + method: 'get' + }) +} + +// 新增项目申报v2 +export function addPlan(data) { + return request({ + url: '/scientific/plan', + method: 'post', + data: data + }) +} + +// 修改项目申报v2 +export function updatePlan(data) { + return request({ + url: '/scientific/plan', + method: 'put', + data: data + }) +} + +// 删除项目申报v2 +export function delPlan(handbookId) { + return request({ + url: '/scientific/plan/' + handbookId, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 0801cb3..2785ad7 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -209,39 +209,70 @@ export const dynamicRoutes = [ } ] }, + // zqjia:用三级路由会出问题,就通过这种形式区分不同模块吧 + // 申报计划路由 { - path: '/scientific', + path: '/scientific/project_application_plan', component: Layout, hidden: true, - permissions: ['scientific:projectApply'], + permissions: ['scientific:project_application_plan'], children: [ + // zqjia:这个路由是菜单管理里的起作用 + // { + // path: 'list', + // component: () => import('@/views/scientific/project_application_plan/index'), + // name: 'planList', + // meta: { title: '项目申报计划', icon: '' } + // }, + { + path: 'detail/:planProcId([\\w|\\-]+)', + component: () => import('@/views/scientific/project_application_plan/detail'), + name: 'planDetail', + meta: { title: '申报计划详情' } + }, + // zqjia:这个路由是菜单管理里的起作用 + // { + // path: 'planApply', + // component: () => import('@/views/scientific/project_application_plan/planApply'), + // name: 'planApply', + // meta: { title: '项目申报', icon: '' } + // }, + ] + }, + // 项目路由 + { + path: '/scientific/project', + component: Layout, + hidden: true, + permissions: ['scientific:project'], + children: [ + // zqjia:这个路由是菜单管理里的起作用 + // { + // path: 'list', + // component: () => import('@/views/scientific/project/index'), + // name: 'projectList', + // meta: { title: '项目', icon: '' } + // }, + // zqjia:项目详情还没写 + { + path: 'detail/:planProcId([\\w|\\-]+)', + component: () => import('@/views/scientific/project_application_plan/detail'), + name: 'planDetail', + meta: { title: '申报计划详情' } + }, + { + path: 'planProjectQuery/:planId([\\w|\\-]+)', + // permissions: ['scientific:application:list'], + component: () => import('@/views/scientific/project/index'), + name: 'planProjectQuery', + meta: { title: '已申报项目' } + }, { path: 'projectApply/:deployId([\\w|\\-]+)', - component: () => import('@/views/scientific/projectApply'), + component: () => import('@/views/scientific/project/projectApply.vue'), name: 'ProjectApply', meta: { title: '项目申报', icon: '' } }, - { - path: 'handbookProjectQuery/:handbookId([\\w|\\-]+)', - component: () => import('@/views/scientific/project/index'), - name: 'handbookProjectQuery', - meta: { title: '指南项目' } - // meta: { title: '已申报项目', activeMenu: '/work/own' } - }, - { - path: 'handbookList', - component: () => import('@/views/scientific/handbook/index'), - name: 'handbookList', - meta: { title: '申报指南' } - // meta: { title: '已申报项目', activeMenu: '/work/own' } - }, - { - path: 'handbook/detail/:handbookProcId([\\w|\\-]+)', - component: () => import('@/views/scientific/handbook/detail'), - name: 'handbookDetail', - meta: { title: '申报计划' } - // meta: { title: '已申报项目', activeMenu: '/work/own' } - } ] }, ] diff --git a/ruoyi-ui/src/views/scientific/handbook/index.vue b/ruoyi-ui/src/views/scientific/handbook/index.vue index d7dcba7..7a60481 100644 --- a/ruoyi-ui/src/views/scientific/handbook/index.vue +++ b/ruoyi-ui/src/views/scientific/handbook/index.vue @@ -1,39 +1,62 @@