|
6 月之前 | |
---|---|---|
.. | ||
Devops.md | 9 月之前 | |
README.md | 6 月之前 | |
Schema.md | 10 月之前 |
技术框架:Node.js、Parse Server
编写语言:TypeScript、HTML、SCSS
技术框架:Angular18、Vite、NG-ZORRO
graph TB
Start(开始) --> User[用户登录页]
User --> Register[注册]
User --> Login[用户登录]
Register --> Regcomplete[注册成功]
Regcomplete --> User
Login --> Manage[登录成功进入后台]
Manage --> LogOut[退出登录]
LogOut --> End(结束)
全局采用路由守卫 auth.guard.ts
入口路由文件:projects\textbook\src\app\app.routes.ts
各个身份子路由
nav-author //作者 / 教师 / 主编
app-comp-manage【全局组件】:登录成功后跳转后页面显示;包括左侧menu,通过optionsMap身份对应显示身份功能栏
app-comp-nav 【个人信息组件】:页面左下角个人信息,包括退出登录功能
app-comp-upload 【文件上传组件】
app-textbook 【教材列表组件】
getTextbook
:获取教材列表重要函数,利用Parse.Query.fromJSON多条件查询,通过设定参数传入接口查询获取教材,满足全平台90%以上页面教材列表管理getDepartment
:获取所有单位部门reject
: 退回教材del
:删除教材updateStatus
:加入/移除推荐submit
:提交教材beforSubmit
:高校联系人提交教材至工作联系人restore
:恢复教材exportProcess
:导出教材;功能业务:导出推荐汇总表submitted
:提交报送跳转,非直接请求报送教材接口
parse-authing.ts 【登录服务类】 应用authing登录回调,返回获取登录结果
app-login 登录页
new ParseAuthing实例化authing登录服务,通过login成功后回调调用AuthServr服务类,profileVerify处理登录成功后函数
let parseAuthing = new ParseAuthing({
// 监听事件:登陆成功后,返回用户信息
login:(user,authClient)=>{
console.log(user)
console.log(Parse.User.current());
Parse.User.current()?.id && this.authServr.profileVerify(this.modal)
},
beforeChangeModule:(data:any)=>{
if(data=='register'){
this.router.navigate(['/user/account_info'])
}
}
});
parseAuthing.initLoginModal();
路由模块:NavAuthorRoutingModule
组件(教材创建)
主要函数方法
getEduTextbookVolumeList
:获取分册表upload
:上传附件回调saveEduTextbook
:保存教材信息部分主要代码
let eduTextbookVolumes = await this.saveEduTextbookVolume(this.eduTextbookId);
console.log(eduTextbookVolumes?.isVrifly);
console.log(eduTextbookVolumes.list);
this.eduTextbook?.set('childrens', eduTextbookVolumes.list);
this.eduTextbook?.set('typeNumber', eduTextbookVolumes.list.length);
isComplete = isComplete && eduTextbookVolumes?.isVrifly;
//如果填写未完整,仅保存,状态修改待完善101
if (this.eduTextbook.get('status') == '102' && !isComplete) {
this.eduTextbook?.set('status', '101');
this.eduTextbook.set('complete', false);
} else if (!this.eduTextbook.get('status')) {
this.eduTextbook?.set('status', '101');
}
if(isComplete){
this.eduTextbook.set('complete', true)
}
- `saveEduTextbookVolume`:上传分册数据
- 子组件调用
- 上传获批截图
<app-comp-upload [type]="'pdf'" (change)="upload($event, 'approvedImgUrl')" title="上传教材获批截图"
分册信息
<app-one #children
[eduTextbookId]="eduTextbookId"
[eduTextbookVolumeId]="panel?.id"
></app-one>
- app-textbook-pertain【填写教材适用情况】
- 必填参数
- @eduTextbook 教材
- 主要函数方法
- `saveEduTextbook`:保存教材信息
- `saveEduTextbookVolume`:上传分册数据
- 子组件调用
- 分册信息
<app-author #children [eduTextbook]="eduTextbook?.id" [eduTextbookVolume]="panel"
app-textbook-content【填写教材内容】
必填参数
主要函数方法
saveEduTextbook
:保存教材信息saveEduTextbookVolume
:上传分册数据子组件调用
分册信息
<app-three
#children
[eduTextbook]="eduTextbook?.id"
[eduTextbookVolume]="panel"
></app-three>
app-faith【填写教材内容】
必填参数
主要函数方法
saveEduTextbook
:保存教材信息saveEduTextbookVolume
:上传分册数据verify
:校验填写字段是否匹配app-attachment【上传附件材料】
必填参数
主要函数方法
saveEduTextbook
:保存教材信息saveEduTextbookVolume
:上传分册数据examineNull
:检查本页必填是否存在空项isIgnoreFiledNull
:判断教材所有字段是否必填upload
:上传附件回调子组件调用
分册信息
<app-author-file
#children
[eduTextbook]="eduTextbook?.id"
[eduTextbookVolume]="panel"
></app-author-file>
个人空间:app-space
调用组件:app-textbook
主要函数:getEduProcess
获取教师所属单位的流程
创建教材:app-apply
组件调用
app-basic
app-textbook-pertain
app-textbook-content
app-faith
app-attachment
应用代码
@switch (state) { @case (0) {
<app-basic
[eduTextbook]="textBook"
(state)="changeState($event)"
(save)="save()"
></app-basic>
} @case (1) {
<app-textbook-pertain
[eduTextbook]="textBook"
(state)="changeState($event)"
(save)="save()"
(maxWidth)="(submitComp.style.width)"
></app-textbook-pertain>
} @case (2) {
<app-textbook-content
[eduTextbook]="textBook"
(state)="changeState($event)"
(save)="save()"
(maxWidth)="(submitComp.style.width)"
></app-textbook-content>
}@case (3) {
<app-faith
[eduTextbook]="textBook"
(state)="changeState($event)"
(save)="save()"
(maxWidth)="(submitComp.style.width)"
></app-faith>
}
@case (4) {
<app-attachment
[eduTextbook]="textBook"
(state)="changeState($event)"
(save)="save()"
(maxWidth)="(submitComp.style.width)"
></app-attachment>
} }
回收站:app-recycle
调用组件:app-textbook
<app-textbook
[filterObj]="filterObj"
[uid]="user?.id"
path="/nav-author/manage/details"
[discard]="true"
></app-textbook>
路由模块:NavAdminRoutingModule
组件
app-collect-textbook 【教材文件收集列表】
必填参数
主要函数方法
getTextbook
:获取教材onEmitMsg
:短信提醒,提交状态置为100onReject
:退回教材给出版社app-profile 【工作联系人】
必填参数
主要函数方法
getProfile
:获取用户角色列表全部教材:app-page-textbook
调用组件
app-textbook
app-collect-textbook:
app-collect-textbook
申报流程:app-process-list
功能说明
进入页面通过getDepart
方法获取所有一级节点部门
点击左侧流程调用getDepart
获取对应一级节点下全部流程,右侧显示流程table
table操作栏可对流程进行操作,可操作按钮通过statusMap状态判断
可通过toUrl('/nav-admin/manage/process/create')
跳转创建流程页
主要参数说明
activeDepart
:当前编辑部门
eduProcessList
:流程列表
formatStatus
:格式化流程状态
formatFileStatus
:教材上传状态
主要函数方法
getDepart
:获取部门单位节点
getEduProcess
:获取部门列表
formatNode
:格式化链
statusSelected
:操作流程,开始、暂停、结束、删除
onStatusChange
:暂停流程
openEditCollect
:保存收集文件设置
sendNoticeMSG
:短信通知
流程详情:app-page-process