warrior před 8 měsíci
rodič
revize
1c549dea6c
21 změnil soubory, kde provedl 610 přidání a 51 odebrání
  1. 3 36
      projects/textbook/src/modules/login/account-info/account-info.component.ts
  2. 8 0
      projects/textbook/src/modules/nav-admin/components/profile/profile.component.html
  3. 0 0
      projects/textbook/src/modules/nav-admin/components/profile/profile.component.scss
  4. 24 0
      projects/textbook/src/modules/nav-admin/components/profile/profile.component.spec.ts
  5. 36 0
      projects/textbook/src/modules/nav-admin/components/profile/profile.component.ts
  6. 8 0
      projects/textbook/src/modules/nav-admin/components/submitted/submitted.component.html
  7. 0 0
      projects/textbook/src/modules/nav-admin/components/submitted/submitted.component.scss
  8. 24 0
      projects/textbook/src/modules/nav-admin/components/submitted/submitted.component.spec.ts
  9. 36 0
      projects/textbook/src/modules/nav-admin/components/submitted/submitted.component.ts
  10. 162 0
      projects/textbook/src/modules/nav-admin/create-collection/create-collection.component.html
  11. 50 0
      projects/textbook/src/modules/nav-admin/create-collection/create-collection.component.scss
  12. 24 0
      projects/textbook/src/modules/nav-admin/create-collection/create-collection.component.spec.ts
  13. 63 0
      projects/textbook/src/modules/nav-admin/create-collection/create-collection.component.ts
  14. 10 5
      projects/textbook/src/modules/nav-admin/modules.routes.ts
  15. 16 7
      projects/textbook/src/modules/nav-admin/page-collection/page-collection.component.html
  16. 5 3
      projects/textbook/src/modules/nav-admin/page-collection/page-collection.component.ts
  17. 31 0
      projects/textbook/src/schemas/Profile.ts
  18. 29 0
      projects/textbook/src/schemas/Submitted.ts
  19. 38 0
      projects/textbook/src/services/provinces.ts
  20. 1 0
      server/db/index.js
  21. 42 0
      server/db/schemas/Submitted.js

+ 3 - 36
projects/textbook/src/modules/login/account-info/account-info.component.ts

@@ -16,6 +16,8 @@ import { textbookServer } from '../../../services/textbook';
 import { AuthServr } from '../../../services/auth.service';
 import { CaptchaComponent } from '../../../app/captcha/captcha.component';
 import { NzMessageService } from 'ng-zorro-antd/message';
+import { provinces } from '../../../services/provinces';
+
 import Parse from 'parse';
 @Component({
   selector: 'app-account-info',
@@ -60,42 +62,7 @@ export class AccountInfoComponent implements OnInit {
   mobile: string = '';
 
   //省份
-  provinces: Array<string> = [
-    '北京市',
-    '天津市',
-    '河北省',
-    '山西省',
-    '内蒙古自治区',
-    '辽宁省',
-    '吉林省',
-    '黑龙江省',
-    '上海市',
-    '江苏省',
-    '浙江省',
-    '安徽省',
-    '福建省',
-    '江西省',
-    '山东省',
-    '河南省',
-    '湖北省',
-    '湖南省',
-    '广东省',
-    '广西壮族自治区',
-    '海南省',
-    '重庆市',
-    '四川省',
-    '贵州省',
-    '云南省',
-    '西藏自治区',
-    '陕西省',
-    '甘肃省',
-    '青海省',
-    '宁夏回族自治区',
-    '新疆维吾尔自治区',
-    '台湾省',
-    '香港特别行政区',
-    '澳门特别行政区',
-  ];
+  provinces: Array<string> = provinces.options
   unitTypes: Array<string> = [
     '个体工商户',
     '企业公司',

+ 8 - 0
projects/textbook/src/modules/nav-admin/components/profile/profile.component.html

@@ -0,0 +1,8 @@
+<comp-table-list
+  #list
+  [schema]="Profile"
+  *ngIf="className && fieldsArray"
+  [className]="className"
+  [fieldsArray]="fieldsArray"
+  [queryParams]="queryParams"
+></comp-table-list>

+ 0 - 0
projects/textbook/src/modules/nav-admin/components/profile/profile.component.scss


+ 24 - 0
projects/textbook/src/modules/nav-admin/components/profile/profile.component.spec.ts

@@ -0,0 +1,24 @@
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
+import { IonicModule } from '@ionic/angular';
+
+import { ProfileComponent } from './profile.component';
+
+describe('ProfileComponent', () => {
+  let component: ProfileComponent;
+  let fixture: ComponentFixture<ProfileComponent>;
+
+  beforeEach(waitForAsync(() => {
+    TestBed.configureTestingModule({
+      declarations: [ ProfileComponent ],
+      imports: [IonicModule.forRoot()]
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(ProfileComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  }));
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 36 - 0
projects/textbook/src/modules/nav-admin/components/profile/profile.component.ts

@@ -0,0 +1,36 @@
+import { Component, OnInit, ViewChild, Input } from '@angular/core';
+import { ActivatedRoute, RouterOutlet, Router } from '@angular/router';
+import { CompTableListComponent } from '../../../../app/comp-table/comp-table-list/comp-table-list.component';
+import { Profile } from '../../../../schemas/Profile';
+import * as Parse from 'parse';
+import { CommonModule } from '@angular/common';
+@Component({
+  selector: 'app-profile',
+  templateUrl: './profile.component.html',
+  styleUrls: ['./profile.component.scss'],
+  imports: [CommonModule, RouterOutlet, CompTableListComponent],
+  standalone: true,
+})
+export class ProfileComponent  implements OnInit {
+  @ViewChild(CompTableListComponent) list: CompTableListComponent | undefined;
+
+  Profile = Profile;
+  user: Parse.User | undefined;
+  className: string | undefined;
+  queryParams: any | undefined;
+  fieldsArray: Array<any> | undefined;
+
+  constructor() { 
+    this.user = Parse.User.current();
+    this.className = this.Profile.className;
+    this.fieldsArray = this.Profile.fieldsArray;
+    this.queryParams = {
+      where: {
+        isDeleted: { $ne: true },
+      },
+    };
+  }
+
+  ngOnInit() {}
+
+}

+ 8 - 0
projects/textbook/src/modules/nav-admin/components/submitted/submitted.component.html

@@ -0,0 +1,8 @@
+<comp-table-list
+  #list
+  [schema]="Submitted"
+  *ngIf="className && fieldsArray"
+  [className]="className"
+  [fieldsArray]="fieldsArray"
+  [queryParams]="queryParams"
+></comp-table-list>

+ 0 - 0
projects/textbook/src/modules/nav-admin/components/submitted/submitted.component.scss


+ 24 - 0
projects/textbook/src/modules/nav-admin/components/submitted/submitted.component.spec.ts

@@ -0,0 +1,24 @@
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
+import { IonicModule } from '@ionic/angular';
+
+import { SubmittedComponent } from './submitted.component';
+
+describe('SubmittedComponent', () => {
+  let component: SubmittedComponent;
+  let fixture: ComponentFixture<SubmittedComponent>;
+
+  beforeEach(waitForAsync(() => {
+    TestBed.configureTestingModule({
+      declarations: [ SubmittedComponent ],
+      imports: [IonicModule.forRoot()]
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(SubmittedComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  }));
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 36 - 0
projects/textbook/src/modules/nav-admin/components/submitted/submitted.component.ts

@@ -0,0 +1,36 @@
+import { Component, OnInit, ViewChild, Input } from '@angular/core';
+import { ActivatedRoute, RouterOutlet, Router } from '@angular/router';
+import { CompTableListComponent } from '../../../../app/comp-table/comp-table-list/comp-table-list.component';
+import { Submitted } from '../../../../schemas/Submitted';
+import * as Parse from 'parse';
+import { CommonModule } from '@angular/common';
+@Component({
+  selector: 'app-submitted',
+  templateUrl: './submitted.component.html',
+  styleUrls: ['./submitted.component.scss'],
+  imports: [CommonModule, RouterOutlet, CompTableListComponent],
+  standalone: true,
+})
+export class SubmittedComponent  implements OnInit {
+  @ViewChild(CompTableListComponent) list: CompTableListComponent | undefined;
+
+  Submitted = Submitted;
+  user: Parse.User | undefined;
+  className: string | undefined;
+  queryParams: any | undefined;
+  fieldsArray: Array<any> | undefined;
+
+  constructor() { 
+    this.user = Parse.User.current();
+    this.className = this.Submitted.className;
+    this.fieldsArray = this.Submitted.fieldsArray;
+    this.queryParams = {
+      where: {
+        isDeleted: { $ne: true },
+      },
+    };
+  }
+
+  ngOnInit() {}
+
+}

+ 162 - 0
projects/textbook/src/modules/nav-admin/create-collection/create-collection.component.html

@@ -0,0 +1,162 @@
+<!-- 表格头部 -->
+<nz-page-header nzTitle="创建新合集">
+  <nz-breadcrumb nz-page-header-breadcrumb>
+    <nz-breadcrumb-item>创建合集</nz-breadcrumb-item>
+    <nz-breadcrumb-item><a>报送合集</a></nz-breadcrumb-item>
+  </nz-breadcrumb>
+</nz-page-header>
+<div class="content">
+  <form
+    nz-form
+    [formGroup]="validateForm"
+    class="login-form"
+    (ngSubmit)="submitForm()"
+  >
+    <div class="title">基本信息</div>
+    <div class="fill-template">
+      <div nz-row>
+        <div nz-col nzSpan="12">
+          <nz-form-item class="row" style="margin-bottom: 16px">
+            <nz-form-label
+              class="label"
+              [nzNoColon]="true"
+              [nzSm]="18"
+              [nzXs]="18"
+              nzRequired
+              >合集名称</nz-form-label
+            >
+            <nz-form-control
+              class="val"
+              nzErrorTip="请填写合集名称"
+              style="width: 100%"
+            >
+              <nz-input-group
+                [nzAddOnAfter]="validateForm.value.name.length + '/' + 50"
+              >
+                <input
+                  nz-input
+                  type="text"
+                  placeholder="请填写作者姓名"
+                  formControlName="name"
+                  nzStatus=""
+                  maxlength="50"
+                />
+              </nz-input-group>
+            </nz-form-control>
+          </nz-form-item>
+        </div>
+        <div nz-col nzSpan="12">
+          <nz-form-item class="row" style="margin-bottom: 16px">
+            <nz-form-label
+              class="label"
+              [nzNoColon]="true"
+              [nzSm]="18"
+              [nzXs]="18"
+              nzRequired
+              >合集描述</nz-form-label
+            >
+            <nz-form-control
+              class="val"
+              nzErrorTip="请填写合集描述"
+              style="width: 100%"
+            >
+              <nz-input-group
+                [nzAddOnAfter]="validateForm.value.desc.length + '/' + 50"
+              >
+                <input
+                  nz-input
+                  type="text"
+                  placeholder="请填合集描述"
+                  formControlName="desc"
+                  nzStatus=""
+                  maxlength="50"
+                />
+              </nz-input-group>
+            </nz-form-control>
+          </nz-form-item>
+        </div>
+        <div nz-col nzSpan="12">
+          <nz-form-item class="row" style="margin-bottom: 16px">
+            <nz-form-label
+              class="label"
+              [nzNoColon]="true"
+              [nzSm]="18"
+              [nzXs]="18"
+              nzRequired
+              >合集code</nz-form-label
+            >
+            <nz-form-control
+              class="val"
+              nzErrorTip="请填写合集code"
+              style="width: 100%"
+            >
+              <nz-input-group
+                [nzAddOnAfter]="validateForm.value.code.length + '/' + 50"
+              >
+                <input
+                  nz-input
+                  type="text"
+                  placeholder="请填写合集code"
+                  formControlName="code"
+                  nzStatus=""
+                  maxlength="50"
+                />
+              </nz-input-group>
+            </nz-form-control>
+          </nz-form-item>
+        </div>
+        <div nz-col nzSpan="12">
+          <nz-form-item class="row" style="margin-bottom: 16px">
+            <nz-form-label
+              class="label"
+              [nzNoColon]="true"
+              [nzSm]="18"
+              [nzXs]="18"
+              nzRequired
+              >关联省级行政区</nz-form-label
+            >
+            <nz-form-control
+              class="val"
+              nzErrorTip="请填写选择关联省级行政区"
+              style="width: 100%"
+            >
+              <nz-select
+                style="width: 100%"
+                nzShowSearch
+                nzAllowClear
+                nzPlaceHolder="请填写选择关联省级行政区"
+                formControlName="area"
+              >
+                @for(item of provinces; track item;let index = $index){
+                <nz-option nzCustomContent [nzValue]="item" [nzLabel]="item">{{
+                  item
+                }}</nz-option>
+                }
+              </nz-select>
+            </nz-form-control>
+          </nz-form-item>
+        </div>
+      </div>
+      <div nz-row>
+        <div nz-col nzSpan="24">
+          <div class="title-row">
+            <div>
+              <div class="title">报送人</div>
+              <div class="tips">
+                报送人可查看合集中所有流程报送的教材、报送配额、用户,可创建所属省份与自己相同的账号、用户组;可公示和报送合集中所有教材。
+              </div>
+            </div>
+            <a class="btn">选择报送人</a>
+          </div>
+          <div class="tabs">
+            @if (!showEdit) {
+            <app-profile></app-profile>
+            } @else{
+            <app-submitted></app-submitted>
+            }
+          </div>
+        </div>
+      </div>
+    </div>
+  </form>
+</div>

+ 50 - 0
projects/textbook/src/modules/nav-admin/create-collection/create-collection.component.scss

@@ -0,0 +1,50 @@
+.content {
+  padding: 0 24px 16px;
+  min-width: 800px;
+  font-family: PingFang SC;
+  .title {
+    //styleName: 字体/标题-中-Medium;
+    font-family: PingFang SC;
+    font-size: 20px;
+    font-weight: 500;
+    line-height: 32px;
+    text-align: left;
+  }
+  .row {
+    display: flex;
+    flex-direction: column;
+    align-items: start;
+    width: 84%;
+    .label {
+      margin: 10px 0 6px;
+    }
+    .val {
+      min-height: auto;
+    }
+  }
+  .title-row {
+    margin-top: 20px;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    .tips {
+      font-family: PingFang SC;
+      font-size: 14px;
+      font-weight: 400;
+      line-height: 16px;
+      text-align: left;
+      margin-top: 10px;
+    }
+    .btn {
+      margin-left: 20px;
+      flex-shrink: 0;
+      color: #006DED;
+    }
+  }
+}
+::ng-deep .ant-page-header {
+  padding: 16px 24px 0;
+}
+::ng-deep .ant-page-header-heading-title {
+  color: black;
+}

+ 24 - 0
projects/textbook/src/modules/nav-admin/create-collection/create-collection.component.spec.ts

@@ -0,0 +1,24 @@
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
+import { IonicModule } from '@ionic/angular';
+
+import { CreateCollectionComponent } from './create-collection.component';
+
+describe('CreateCollectionComponent', () => {
+  let component: CreateCollectionComponent;
+  let fixture: ComponentFixture<CreateCollectionComponent>;
+
+  beforeEach(waitForAsync(() => {
+    TestBed.configureTestingModule({
+      declarations: [ CreateCollectionComponent ],
+      imports: [IonicModule.forRoot()]
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(CreateCollectionComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  }));
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 63 - 0
projects/textbook/src/modules/nav-admin/create-collection/create-collection.component.ts

@@ -0,0 +1,63 @@
+import { Component, OnInit } from '@angular/core';
+import { FormsModule, ReactiveFormsModule } from '@angular/forms';
+import { CommonCompModule } from '../../../services/common.modules';
+import { Router, ActivatedRoute } from '@angular/router';
+import { NzSelectModule } from 'ng-zorro-antd/select';
+import {
+  FormControl,
+  FormGroup,
+  NonNullableFormBuilder,
+  Validators,
+} from '@angular/forms';
+import { textbookServer } from '../../../services/textbook';
+import { NzMessageService } from 'ng-zorro-antd/message';
+import { NzModalService } from 'ng-zorro-antd/modal';
+import { provinces } from '../../../services/provinces';
+import { SubmittedComponent } from '../components/submitted/submitted.component'
+import { ProfileComponent } from '../components/profile/profile.component'
+@Component({
+  selector: 'app-create-collection',
+  imports: [
+    CommonCompModule,FormsModule, ReactiveFormsModule,NzSelectModule,SubmittedComponent,ProfileComponent
+  ],
+  standalone: true,
+  templateUrl: './create-collection.component.html',
+  styleUrls: ['./create-collection.component.scss'],
+})
+export class CreateCollectionComponent  implements OnInit {
+  provinces: Array<string> = provinces.options
+  showEdit:boolean = false
+
+  validateForm: FormGroup<{
+    name: FormControl<Array<string> | any>; //合集名称
+    desc: FormControl<Array<string> | any>; //合集描述
+    code: FormControl<string | any>; //合集code
+    area:FormControl<string>; //关联省级行政区
+  }> = this.fb.group({
+    name: ['', [Validators.required]],
+    desc: ['', [Validators.required]],
+    code: ['', [Validators.required]],
+    area: ['', [Validators.required]],
+  })
+  constructor(
+    private router: Router,
+    public tbookSer: textbookServer,
+    private fb: NonNullableFormBuilder,
+    private msg: NzMessageService,
+    private modal: NzModalService
+  ) { }
+
+  ngOnInit() {}
+  submitForm(): void {
+    if (this.validateForm.valid) {
+      console.log('submit', this.validateForm.value);
+    } else {
+      Object.values(this.validateForm.controls).forEach(control => {
+        if (control.invalid) {
+          control.markAsDirty();
+          control.updateValueAndValidity({ onlySelf: true });
+        }
+      });
+    }
+  }
+}

+ 10 - 5
projects/textbook/src/modules/nav-admin/modules.routes.ts

@@ -1,5 +1,6 @@
 import { NgModule } from '@angular/core';
 import { RouterModule, Routes } from '@angular/router';
+import { CreateCollectionComponent } from './create-collection/create-collection.component';
 import { PageCollectionComponent } from './page-collection/page-collection.component';
 import { PageRoleComponent } from './page-role/page-role.component';
 import { PageUserComponent } from './page-user/page-user.component';
@@ -13,17 +14,21 @@ const routes: Routes = [
     path: 'manage',
     children:[
       {
-        path: 'user', //列表
+        path: 'collection', //合集列表
+        component: PageCollectionComponent,
+      },
+      {
+        path: 'create/collection', //合集列表
+        component: CreateCollectionComponent,
+      },
+      {
+        path: 'user', //用户列表
         component: PageUserComponent,
       },
       {
         path: 'role', //列表
         component: PageRoleComponent,
       },
-      {
-        path: 'collection', //列表
-        component: PageCollectionComponent,
-      },
     ]
   }
   

+ 16 - 7
projects/textbook/src/modules/nav-admin/page-collection/page-collection.component.html

@@ -1,6 +1,6 @@
-
 <!-- 表格头部 -->
-<nz-page-header *ngIf="list?.schema?.title">
+@if (list?.schema?.title) {
+<nz-page-header>
   <!--breadcrumb-->
   <nz-breadcrumb nz-page-header-breadcrumb>
     <nz-breadcrumb-item>国家级管理</nz-breadcrumb-item>
@@ -8,19 +8,28 @@
   </nz-breadcrumb>
 
   <!--title-->
-  <nz-page-header-title>{{list?.schema?.title}}
-    <br>
-    <div class="subtitle">{{list?.schema?.subTitle}}</div>
+  <nz-page-header-title
+    >{{ list?.schema?.title }}
+    <br />
+    <div class="subtitle">{{ list?.schema?.subTitle }}</div>
   </nz-page-header-title>
 
   <!--extra-->
   <nz-page-header-extra>
     <nz-space>
-      <button *nzSpaceItem nz-button nzType="primary" (click)="list?.createObject()">创建合集</button>
+      <button
+        style="background: #3e49b3; border: 1px #3e49b3"
+        *nzSpaceItem
+        nz-button
+        nzType="primary"
+        (click)="create()"
+      >
+        创建合集
+      </button>
     </nz-space>
   </nz-page-header-extra>
 </nz-page-header>
-
+}
 
 <comp-table-list
   #list

+ 5 - 3
projects/textbook/src/modules/nav-admin/page-collection/page-collection.component.ts

@@ -1,5 +1,5 @@
 import { Component, OnInit, ViewChild } from '@angular/core';
-import { ActivatedRoute, RouterOutlet } from '@angular/router';
+import { ActivatedRoute,Router, RouterOutlet } from '@angular/router';
 import { CompTableListComponent } from '../../../app/comp-table/comp-table-list/comp-table-list.component';
 import EduCollection from '../../../schemas/EduCollection';
 // import { TranslateService } from '@ngx-translate/core';
@@ -34,7 +34,7 @@ export class PageCollectionComponent  implements OnInit {
   fieldsArray:Array<any>|undefined
 
   constructor(
-    private route: ActivatedRoute,
+    private router: Router,
     private activeRoute: ActivatedRoute,
     // private translate:TranslateService,
   ) {
@@ -57,5 +57,7 @@ export class PageCollectionComponent  implements OnInit {
       this.list?.ngOnInit()
     });
   }
-
+  create(){
+    this.router.navigate(['/nav-admin/manage/create/collection'])
+  }
 }

+ 31 - 0
projects/textbook/src/schemas/Profile.ts

@@ -0,0 +1,31 @@
+import { MatDialog } from "@angular/material/dialog";
+import { Router } from "@angular/router";
+import Parse from "parse";
+import { ParseSchema } from "./func-parse";
+
+export const Profile:ParseSchema = {
+    title:"报送人",
+    className:"Profile",
+    emptyImg:"/img/webhook-empty.png",
+    include:["user"],
+    buttons:[
+        {
+            name:"编辑",
+            place:"item",
+            show:(options:{object:Parse.Object})=>{
+                if(location?.pathname=='/nav-author/manage/space'){
+                    return true
+                }
+                return false
+            },
+            handle:(options:{dialog:MatDialog,object:Parse.Object,router?:Router})=>{
+                options.router?.navigate(['/nav-author/manage/apply',{id:options.object.id}])
+            }
+        }
+    ],
+    fieldsArray:[
+        {key:"name",name:"姓名",type:"String",isHeader:true},
+        {key:"mobile",name:"手机号",type:"String",isHeader:true},
+        {key:"emal",name:"邮箱",type:"String",isHeader:true},
+    ]
+}

+ 29 - 0
projects/textbook/src/schemas/Submitted.ts

@@ -0,0 +1,29 @@
+import { MatDialog } from "@angular/material/dialog";
+import { Router } from "@angular/router";
+import Parse from "parse";
+import { ParseSchema } from "./func-parse";
+
+export const Submitted:ParseSchema = {
+    title:"报送人",
+    className:"Submitted",
+    emptyImg:"/img/webhook-empty.png",
+    include:["profile"],
+    buttons:[
+        {
+            name:"编辑",
+            place:"item",
+            show:(options:{object:Parse.Object})=>{
+                if(location?.pathname=='/nav-author/manage/space'){
+                    return true
+                }
+                return false
+            },
+            handle:(options:{dialog:MatDialog,object:Parse.Object,router?:Router})=>{
+                options.router?.navigate(['/nav-author/manage/apply',{id:options.object.id}])
+            }
+        }
+    ],
+    fieldsArray:[
+        {key:"profile",name:"姓名",type:"Pointer",targetClass:"Profile",isHeader:true,showName:"${name}"},
+    ]
+}

+ 38 - 0
projects/textbook/src/services/provinces.ts

@@ -0,0 +1,38 @@
+export const provinces = {
+  options:[
+    '北京市',
+    '天津市',
+    '河北省',
+    '山西省',
+    '内蒙古自治区',
+    '辽宁省',
+    '吉林省',
+    '黑龙江省',
+    '上海市',
+    '江苏省',
+    '浙江省',
+    '安徽省',
+    '福建省',
+    '江西省',
+    '山东省',
+    '河南省',
+    '湖北省',
+    '湖南省',
+    '广东省',
+    '广西壮族自治区',
+    '海南省',
+    '重庆市',
+    '四川省',
+    '贵州省',
+    '云南省',
+    '西藏自治区',
+    '陕西省',
+    '甘肃省',
+    '青海省',
+    '宁夏回族自治区',
+    '新疆维吾尔自治区',
+    '台湾省',
+    '香港特别行政区',
+    '澳门特别行政区',
+  ]
+}

+ 1 - 0
server/db/index.js

@@ -4,6 +4,7 @@ const EduSchemas = [
     require("./schemas/EduTextbook").EduTextbook,
     require("./schemas/Profile").Profile,
     require("./schemas/EduCollection").EduCollection,
+    require("./schemas/Submitted").Submitted,
     require("./schemas/_User")._User,
     require("./schemas/_Role")._Role,
 ]

+ 42 - 0
server/db/schemas/Submitted.js

@@ -0,0 +1,42 @@
+const Submitted = {
+  "className": "Submitted",
+  "fields": {
+    "eduCollection": { //指向报送合集
+      "type": "Pointer",
+      "targetClass": "EduCollection",
+      "required": false
+    },
+    "profile": {//报送人
+      "type": "Pointer",
+      "targetClass": "Profile",
+      "required": false
+    },
+  },
+  "classLevelPermissions": {
+    "find": {
+      "*": true
+    },
+    "get": {
+      "*": true
+    },
+    "count": {
+      "*": true
+    },
+    "create": {
+      "*": true
+    },
+    "update": {
+      "*": true
+    },
+    "delete": {
+      "*": true
+    },
+    "addField": {
+      "*": true
+    },
+    "protectedFields": {
+      "*": []
+    }
+  }
+}
+module.exports.Submitted = Submitted