科技项目与活动 — 前端技术方案
依据:doc/创新应用平台/科技项目与活动/科技项目与活动技术方案.md、科技项目与活动功能需求.md;布局对齐 breedingStandards/breedingManage/index.vue(双 el-card);字段 小驼峰。
1. 页面与路由
| 项 |
说明 |
| Vue 路径 |
ruoyi-ui/src/views/innovationPlatform/techProjectGuide/index.vue |
| 组件名 |
TechProjectGuide |
| 菜单配置 |
若依「菜单管理」组件路径:innovationPlatform/techProjectGuide/index(手工配置,本文档不提供 SQL) |
| 权限前缀 |
innovationPlatform:techProjectGuide: |
2. API 模块
| 项 |
说明 |
| 文件 |
ruoyi-ui/src/api/innovationPlatform/techProjectGuide.js |
| Base Path |
/innovationPlatform/techProjectGuide |
封装方法:listTechProjectGuide、getTechProjectGuide、addTechProjectGuide、updateTechProjectGuide、delTechProjectGuide、publishTechProjectGuide、offlineTechProjectGuide。
新增 Body 支持 saveAndPublish: true 表示保存并发布。
3. 列表与查询
- 分页:
pageNum、pageSize(默认 20)。
- 筛选:
projectName(模糊);projectType(资讯类别编码精确);publishStatus(0/1 精确);类型选项由 listInformationCategoryChildren('002') 动态加载。
- 表格列:项目名称、项目类型、申报对象、申报开始/截止、项目周期、负责人、联系方式、发布日期、发布状态、操作列。
4. 表单与上传
- 字段:项目名称(1~20)、项目类型(资讯类别下拉,
code/name)、项目简介(1~50)、申报对象(1~200)、申报起止日期、项目周期(1~50)、申报条件/流程(必填多行)、负责人(1~10)、手机号、附件(选填)、封面(选填)。
项目类型接口:ruoyi-ui/src/api/category/informationCategory.js — GET /category/informationCategory/children?parentCode=002。
- 校验:截止 ≥ 开始;手机号
^1[3-9]\d{9}$;附件扩展名与 ≤30MB;封面 jpg/jpeg/png 与 ≤10MB。
- 新增弹窗按钮:「发布」(
saveAndPublish)、「确定」(仅保存未发布)。
- 编辑:仅
publishStatus === 0 可打开并保存。
5. 操作按钮与状态机
| 按钮 |
显示条件 |
权限标识 |
| 查看 |
有 query |
innovationPlatform:techProjectGuide:query |
| 编辑 |
未发布 |
innovationPlatform:techProjectGuide:edit |
| 删除 |
未发布 |
innovationPlatform:techProjectGuide:remove |
| 发布 |
未发布 |
innovationPlatform:techProjectGuide:publish |
| 下架 |
已发布 |
innovationPlatform:techProjectGuide:offline |
详情弹窗内对未发布/已发布记录提供发布、下架快捷操作。
6. 国际化
| 项 |
说明 |
| 语言包 |
src/lang/zh/innovationPlatform.js、src/lang/bo/innovationPlatform.js |
| 注册 |
zh-CN.js、bo.js 中 import innovationPlatform |
| Mixin |
src/mixins/innovationPlatformLocaleMixin.js(ipT、ipCommon、publishStatusText) |
| 组件 |
data.ipNs = 'techProjectGuide' |
7. 联调说明
- 部署后端
BizTechProjectGuideController 及 biz_tech_project_guide 表。
- 在菜单管理中配置路由与按钮权限(见后端技术方案 §4)。
- 验证:保存并发布、列表发布/下架、已发布不可编辑、附件上传与替换。
8. 文件清单
| 类型 |
路径 |
| 页面 |
ruoyi-ui/src/views/innovationPlatform/techProjectGuide/index.vue |
| API |
ruoyi-ui/src/api/innovationPlatform/techProjectGuide.js |
| Mixin |
ruoyi-ui/src/mixins/innovationPlatformLocaleMixin.js |
| i18n |
ruoyi-ui/src/lang/zh/innovationPlatform.js、lang/bo/innovationPlatform.js |
9. 修订记录
| 版本 |
说明 |
| 1.0 |
初版:双卡片 CRUD + 发布/下架;新增表单双按钮 |