diff --git a/ruoyi-ui/src/api/scientific/project_application_plan.js b/ruoyi-ui/src/api/scientific/project_application_plan.js index 3479dd8..94de37d 100644 --- a/ruoyi-ui/src/api/scientific/project_application_plan.js +++ b/ruoyi-ui/src/api/scientific/project_application_plan.js @@ -35,10 +35,30 @@ export function updatePlan(data) { }) } -// 删除项目申报v2 -export function delPlan(handbookId) { +// 删除项目申报计划 +export function delPlan(planId) { return request({ - url: '/scientific/plan/' + handbookId, + url: '/scientific/plan/' + planId, method: 'delete' }) } + +// 封装寻找最新 表单 的函数,返回 Promise +export function findLatestDeploymentTimeIndex(response) { + return new Promise((resolve, reject) => { + let latestIndex = 0; + let latestTime = new Date(response.rows[0].deploymentTime); + + response.rows.forEach((row, index) => { + const currentTime = new Date(row.deploymentTime); + + if (currentTime > latestTime) { + latestTime = currentTime; + latestIndex = index; + } + }); + + // 返回最新的索引 + resolve(latestIndex); + }); +} diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 2785ad7..d7e3e8f 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -215,7 +215,7 @@ export const dynamicRoutes = [ path: '/scientific/project_application_plan', component: Layout, hidden: true, - permissions: ['scientific:project_application_plan'], + permissions: ['scientific:plan'], children: [ // zqjia:这个路由是菜单管理里的起作用 // { @@ -230,13 +230,12 @@ export const dynamicRoutes = [ name: 'planDetail', meta: { title: '申报计划详情' } }, - // zqjia:这个路由是菜单管理里的起作用 - // { - // path: 'planApply', - // component: () => import('@/views/scientific/project_application_plan/planApply'), - // name: 'planApply', - // meta: { title: '项目申报', icon: '' } - // }, + { + path: 'planApply', + component: () => import('@/views/scientific/project_application_plan/planApply'), + name: 'planApply', + meta: { title: '项目申报', icon: '' } + }, ] }, // 项目路由 @@ -268,13 +267,49 @@ export const dynamicRoutes = [ meta: { title: '已申报项目' } }, { - path: 'projectApply/:deployId([\\w|\\-]+)', - component: () => import('@/views/scientific/project/projectApply.vue'), + path: 'projectApply', + component: () => import('@/views/scientific/project/projectApply'), name: 'ProjectApply', meta: { title: '项目申报', icon: '' } }, ] }, + // 指南路由 + { + path: '/scientific/handbook', + component: Layout, + hidden: true, + permissions: ['scientific:handbook'], + children: [ + // zqjia:这个路由是菜单管理里的起作用 + // { + // path: 'list', + // component: () => import('@/views/scientific/project/index'), + // name: 'projectList', + // meta: { title: '项目', icon: '' } + // }, + // zqjia:项目详情还没写 + { + path: 'detail/:planProcId([\\w|\\-]+)', + component: () => import('@/views/scientific/handbook/detail'), + name: 'handbookDetail', + 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/project/projectApply.vue'), + // name: 'ProjectApply', + // meta: { title: '项目申报', icon: '' } + // }, + ] + }, ] // 防止连续点击多次路由报错 diff --git a/ruoyi-ui/src/views/scientific/handbook/detail.vue b/ruoyi-ui/src/views/scientific/handbook/detail.vue new file mode 100644 index 0000000..11dbb21 --- /dev/null +++ b/ruoyi-ui/src/views/scientific/handbook/detail.vue @@ -0,0 +1,476 @@ + + + + + + + + + + + 指南详情 + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/scientific/handbook/handbookApply.vue b/ruoyi-ui/src/views/scientific/handbook/handbookApply.vue new file mode 100644 index 0000000..191cbdf --- /dev/null +++ b/ruoyi-ui/src/views/scientific/handbook/handbookApply.vue @@ -0,0 +1,163 @@ + + + + + {{ processName }} + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/scientific/handbook/index.vue b/ruoyi-ui/src/views/scientific/handbook/index.vue index 7a60481..537f519 100644 --- a/ruoyi-ui/src/views/scientific/handbook/index.vue +++ b/ruoyi-ui/src/views/scientific/handbook/index.vue @@ -1,14 +1,6 @@ - - - - + @@ -41,22 +33,7 @@ placeholder="请选择发布时间"> - - - - - - + 搜索 重置 @@ -111,35 +88,48 @@ - + - + {{ parseTime(scope.row.handbookDate, '{y}-{m}-{d}') }} - - - - + + + + + + + + + + + + + + + + + 修改 + >详情 删除 + >发布计划 @@ -192,9 +182,16 @@ diff --git a/ruoyi-ui/src/views/scientific/project/index.vue b/ruoyi-ui/src/views/scientific/project/index.vue index 9e2cd4f..329d8ae 100644 --- a/ruoyi-ui/src/views/scientific/project/index.vue +++ b/ruoyi-ui/src/views/scientific/project/index.vue @@ -324,6 +324,11 @@ export default { /** 查询项目申报列表 */ getList() { this.loading = true; + const queryParams = this.$route.params && this.$route.params.queryParams; + if (queryParams !== undefined) { + this.queryParams = queryParams; + } + listApplication(this.queryParams).then(response => { this.applicationList = response.rows; this.total = response.total; diff --git a/ruoyi-ui/src/views/scientific/project/projectApply.vue b/ruoyi-ui/src/views/scientific/project/projectApply.vue index 056388a..526c889 100644 --- a/ruoyi-ui/src/views/scientific/project/projectApply.vue +++ b/ruoyi-ui/src/views/scientific/project/projectApply.vue @@ -2,7 +2,7 @@ - {{ this.handbook.handbookName }} + {{ this.plan.planName }} @@ -15,9 +15,9 @@