Files
flow-center-front/README.md
T
chenxing 90db00cf16
build / build (push) Successful in 3m21s
feat: 提交流程中心前端代码
Vue3 + Vite + view-ui-plus 前端源码,含流程工作台、实例详情、
任务处理、管理端(定义/实例/映射/回调)等页面。
保留远程 .gitea/workflows/build.yml CI 配置。
2026-09-15 10:42:45 +08:00

57 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 通知公告前端(Vue3 + Vite + view-ui-plus)
## 本地启动
```bash
npm install
```
### 1)纯前端调试(推荐,后端不可用时)
本地连不上 `sso.yunhaixingtong.com` / `base.yunhaixingtong.com` 时,后端 CAS 过滤器会拦截
`/api/*` 请求导致所有接口失败。此时使用内置 mock 调试前端页面:
```bash
npm run dev:mock
```
- 启用 `src/assets/mock/noticeapi.ts` 中的内存 mock(vite-plugin-mock),覆盖全部页面接口:
用户/菜单、发文部门字典、通知增删改查、阅读情况、联系组、选择用户树、附件上传等。
- mock 数据为内存态,刷新页面即还原;修改 mock 文件后需重启 dev server 才生效。
- mock 模式下请求走 vite 同源(`host.config.ts` 中 `serviceHost` 为空串)。
### 2)连接后端调试
```bash
npm run dev
```
- `.env.dev`:`VITE_SERVICE_HOST=http://localhost:8070/notice`(Java 后端,见 `../service`)。
- 后端需要能访问 CAS(`yh.sso.server-url-prefix`)与用户中心(`yh.open.*`),否则接口 302/失败。
## 主要页面
| 路由 | 页面 |
| --- | --- |
| `/notice/newnotice` | 通知发送(新建/编辑 `?serid=`/转发 `?fid=`,wangeditor 富文本) |
| `/notice/notice_list` | 已发通知 |
| `/notice/notice_accept` | 已收通知(左列表 + 右详情,打印/转发/附件) |
| `/notice/manage` | 通知列表(管理端) |
| `/notice/setting` | 应用设置(发文部门卡片 + 自定义组) |
| `/notice/notice_details` | 通知详情(`type=0` 管理视角含阅读进度/编辑/打印,`type=1` 查看) |
## 关键组件
- `components/UserCheckModal.vue`:选择用户弹窗(组织树勾选 + 已选列表,移植自旧前端
`oldfront/src/components/userCheck.vue`)。
- `components/UserCheckInput.vue`:通知对象选择(全部用户/指定用户,移植自旧
`user_check_input.vue`)。
- `components/NoticeUpload.vue`:通知附件上传(选择文件 + 200MB 限制,移植自旧
`uploadFile.vue`)。
- 发文部门卡片:见 `views/notice/NoticeSetting.vue`,样式与交互对齐 UserBase「应用类型」
(`UserBase/front/src/views/app/AppCategory.vue`),额外支持停用/启用。
## 统计说明
统计相关前端已按需求移除(`Notice_statis` 接口封装、菜单、图标等),后期统计不在本应用内做。