Browse Source

Merge branch 'master' of http://git.fmode.cn:3000/bin/edu-textbook

xll 9 tháng trước cách đây
mục cha
commit
759da72fe4
19 tập tin đã thay đổi với 551 bổ sung101 xóa
  1. BIN
      projects/textbook/public/img/book-3.png
  2. 13 13
      projects/textbook/src/app/comp-manage/comp-manage.component.ts
  3. 1 1
      projects/textbook/src/app/textbook/textbook.component.html
  4. 47 17
      projects/textbook/src/app/textbook/textbook.component.ts
  5. 146 11
      projects/textbook/src/modules/nav-admin/user-edit/user-edit.component.html
  6. 27 1
      projects/textbook/src/modules/nav-admin/user-edit/user-edit.component.scss
  7. 70 29
      projects/textbook/src/modules/nav-admin/user-edit/user-edit.component.ts
  8. 2 2
      projects/textbook/src/modules/nav-province-contact/page-process/process-create/process-create.component.html
  9. 1 1
      projects/textbook/src/modules/nav-province-contact/page-textbook/page-textbook.component.html
  10. 31 5
      projects/textbook/src/modules/nav-province-contact/submitted/complete/complete.component.html
  11. 6 6
      projects/textbook/src/modules/nav-province-contact/submitted/complete/complete.component.ts
  12. 6 6
      projects/textbook/src/modules/nav-province-contact/submitted/export-file/export-file.component.html
  13. 1 1
      projects/textbook/src/modules/nav-province-contact/submitted/export-list/export-list.component.html
  14. 6 6
      projects/textbook/src/modules/nav-province-contact/submitted/submitted.component.html
  15. 2 2
      projects/textbook/src/modules/nav-province-school-contact/modules.routes.ts
  16. 47 0
      projects/textbook/src/modules/nav-province-school-contact/page-textbook/page-textbook.component.html
  17. 29 0
      projects/textbook/src/modules/nav-province-school-contact/page-textbook/page-textbook.component.scss
  18. 22 0
      projects/textbook/src/modules/nav-province-school-contact/page-textbook/page-textbook.component.spec.ts
  19. 94 0
      projects/textbook/src/modules/nav-province-school-contact/page-textbook/page-textbook.component.ts

BIN
projects/textbook/public/img/book-3.png


+ 13 - 13
projects/textbook/src/app/comp-manage/comp-manage.component.ts

@@ -111,30 +111,30 @@ export class CompManageComponent implements OnInit {
       },
     ],
     "高校联系人":[
-      // {
-      //   id:'1',
-      //   name:'教材申报',
-      //   child:[
-      //     {
-      //       id:'1-1',
-      //       name:'全部教材',
-      //       path:'/nav-province-school-contact/manage/textbook',
-      //     }
-      //   ]
-      // },
       {
         id:'1',
-        name:'用户管理',
+        name:'教材申报',
         child:[
           {
             id:'1-1',
+            name:'全部教材',
+            path:'/nav-province-school-contact/manage/textbook',
+          }
+        ]
+      },
+      {
+        id:'2',
+        name:'用户管理',
+        child:[
+          {
+            id:'2-1',
             name:'用户列表',
             path:'/nav-province-school-contact/manage/user',
           },
           {
             name:'申报单位管理',
             path:"/nav-province-school-contact/manage/role",
-            id:'1-2',
+            id:'2-2',
           },
         ]
       },

+ 1 - 1
projects/textbook/src/app/textbook/textbook.component.html

@@ -17,7 +17,7 @@
     @if (filterObj?.btns?.verify && count != 0) {
     <div
       class="sbt"
-      (click)="submitted()"
+      (click)="toUrl('/nav-province-contact/manage/submitted/'+ this.eduProcess?.id)"
     >
       提交推荐教材列表
     </div>

+ 47 - 17
projects/textbook/src/app/textbook/textbook.component.ts

@@ -50,10 +50,11 @@ export class TextbookComponent implements OnInit {
 
   //相关权限配置
   @Input('filterObj') filterObj: any = {
+    status: [],
     showMore: false, //显示更多字段
     isCheck: true,
     noStared: false, //非推荐
-    status: [],
+    team:false, //只获取当前部门或下级部门所属用户提交的教材
     btns: {
       edit: false, //编辑
       isDelete: false, //删除权限
@@ -71,7 +72,7 @@ export class TextbookComponent implements OnInit {
     lang: {
       listOfFilter: [
         { value: '中文', text: '中文' },
-        { value: '英语', text: '英语' },
+        { value: '英文', text: '英文' },
         { value: '其他外国语', text: '其他外国语' },
         { value: '中国少数名族语言', text: '中国少数名族语言' },
       ],
@@ -185,28 +186,57 @@ export class TextbookComponent implements OnInit {
   }
   async getTextbook(val?: string, exported?: boolean): Promise<any[] | void> {
     this.loading = true;
-    let query = new Parse.Query('EduTextbook');
-    if (val) {
-      let query1 = Parse.Query.fromJSON('EduTextbook', {
-        where: {
-          $or: [
-            {
-              title: { $regex: `.*${val}.*` },
-            },
-          ],
-        },
-      });
-      let query2 = Parse.Query.fromJSON('EduTextbook', {
+    // let query = new Parse.Query('EduTextbook');
+    // if (val) {
+    let query1 = Parse.Query.fromJSON('EduTextbook', {
+      where: {
+        $or: [
+          {
+            title: { $regex: `.*${val || ''}.*` },
+          },
+          {
+            ISBN: { $regex: `.*${val || ''}.*` },
+          },
+          {
+            author: { $regex: `.*${val || ''}.*` },
+          },
+        ],
+      },
+    });
+    // let query2 = Parse.Query.fromJSON('EduTextbook', {
+    //   where: {
+    //     $or: [
+    //       {
+    //         ISBN: { $regex: `.*${val || ''}.*` },
+    //       },
+    //     ],
+    //   },
+    // });
+    let query = Parse.Query.or(query1);
+    if(this.filterObj.team){
+      let childrens = await this.tbookSer.getChild(this.tbookSer.profile.user.department?.objectId)
+      let query3 = Parse.Query.fromJSON('EduTextbook', {
         where: {
           $or: [
             {
-              ISBN: { $regex: `.*${val}.*` },
+              user: {
+                $inQuery: {
+                  where: {
+                    'department':{$in: [childrens],}
+                  },
+                  className: '_User',
+                },
+              },
             },
           ],
         },
-      });
-      query = Parse.Query.or(query1, query2);
+      })
+      query = Parse.Query.and(
+        query3,
+        Parse.Query.or(query1)
+      )
     }
+    // }
     // this.uid && query.equalTo('user',this.tbookSer.profile.user?.objectId);
     for (const key in this.filters) {
       const element = this.filters[key];

+ 146 - 11
projects/textbook/src/modules/nav-admin/user-edit/user-edit.component.html

@@ -137,7 +137,22 @@
           </div>
           <div nz-col nzSpan="8">
             <div class="lable">用户类型</div>
-            <div class="value">{{ profile?.get("identity") || "未填写" }}</div>
+            <nz-select
+              style="width: 80%"
+              nzShowSearch
+              nzAllowClear
+              [disabled]="!edit"
+              nzPlaceHolder="请选择所属的身份类型"
+              [(ngModel)]="profileJson.identity"
+              [ngModelOptions]="{ standalone: true }"
+            >
+              @for(item of userType; track item;let index = $index){
+              <nz-option nzCustomContent [nzValue]="item" [nzLabel]="item">{{
+                item
+              }}</nz-option>
+              }
+            </nz-select>
+            <!-- <div class="value">{{ profile?.get("identity") || "未填写" }}</div> -->
           </div>
           <div nz-col nzSpan="8">
             <div class="lable">认证文件</div>
@@ -169,62 +184,182 @@
           <div nz-col nzSpan="8">
             <div class="lable">手机号</div>
             <div class="value">
-              {{ user?.get("phone") || "未填写" }}
+              <input
+                nz-input
+                type="number"
+                [disabled]="!edit"
+                [(ngModel)]="userJson.phone"
+                placeholder="请输入手机号"
+              />
+              <!-- {{ user?.get("phone") || "未填写" }} -->
             </div>
           </div>
           <div nz-col nzSpan="8">
             <div class="lable">邮箱</div>
             <div class="value">
-              {{ user?.get("email") || profile?.get("email") || "未填写" }}
+              <input
+                nz-input
+                type="email"
+                [disabled]="!edit"
+                [(ngModel)]="userJson.email"
+                placeholder="请输入电子邮箱"
+              />
+              <!-- {{ user?.get("email") || profile?.get("email") || "未填写" }} -->
             </div>
           </div>
           <div nz-col nzSpan="8">
             <div class="lable">姓名</div>
-            <div class="value">{{ user?.get("name") || "未填写" }}</div>
+            <div class="value">
+              <input
+                nz-input
+                type="text"
+                [disabled]="!edit"
+                [(ngModel)]="userJson.name"
+                placeholder="请输入姓名"
+              />
+              <!-- {{ user?.get("name") || "未填写" }} -->
+            </div>
           </div>
         </div>
         <div nz-row>
           <div nz-col nzSpan="8">
             <div class="lable">用户名</div>
             <div class="value">
-              {{ user?.get("username") || "未填写" }}
+              <input
+                nz-input
+                type="text"
+                [disabled]="!edit"
+                [(ngModel)]="userJson.username"
+                placeholder="请输入用户名"
+              />
+              <!-- {{ user?.get("username") || "未填写" }} -->
             </div>
           </div>
         </div>
       </div>
+      <!-- 保存重置 -->
+      <div class="rows" nz-row>
+        <div nz-col nzSpan="24">
+          <div class="fonter">
+            <button
+              class="form-button"
+              type="button"
+              (click)="submitForm('save')"
+              mat-raised-button
+            >
+              保存
+            </button>
+            <button
+              class="form-button close"
+              (click)="submitForm('reset')"
+              type="button"
+              mat-raised-button
+            >
+              重置
+            </button>
+          </div>
+        </div>
+      </div>
       <div class="title">扩展信息</div>
       <div class="fill-template">
         <div nz-row>
           <div nz-col nzSpan="8">
             <div class="lable">办公电话</div>
-            <div class="value">{{ profile?.get("telephone") || "未填写" }}</div>
+            <div class="value">
+              <input
+                nz-input
+                type="text"
+                [disabled]="!edit"
+                [(ngModel)]="profileJson.telephone"
+                placeholder="请输入办公电话"
+              />
+              <!-- {{ profile?.get("telephone") || "未填写" }} -->
+            </div>
           </div>
           <div nz-col nzSpan="8">
             <div class="lable">单位类型</div>
             <div class="value">
-              {{ userDataJson.companyType || "未填写" }}
+              <!-- {{ userDataJson.companyType || "未填写" }} -->
+              <nz-select
+                style="width: 100%"
+                nzShowSearch
+                nzAllowClear
+                [disabled]="this.tbookSer.profile.identity != '国家级管理员'"
+                nzPlaceHolder="请选择所在单位类型"
+                (ngModelChange)="onChangeType()"
+                [(ngModel)]="userDataJson.companyType"
+                [ngModelOptions]="{ standalone: true }"
+              >
+                @for(item of unitTypes; track item.name;let index = $index){
+                <nz-option
+                  nzCustomContent
+                  [nzValue]="item.name"
+                  [nzLabel]="item.name"
+                  >{{ item.name }}</nz-option
+                >
+                }
+              </nz-select>
             </div>
           </div>
           <div nz-col nzSpan="8">
             <div class="lable">省份</div>
-            <div class="value">{{ profile?.get("province") || "未填写" }}</div>
+            <div class="value">
+              <nz-select
+                style="width: 100%"
+                nzShowSearch
+                nzAllowClear
+                nzPlaceHolder="请选择省份"
+                [(ngModel)]="profileJson.province"
+                [ngModelOptions]="{ standalone: true }"
+              >
+                @for(item of provinces; track item;let index = $index){
+                <nz-option nzCustomContent [nzValue]="item" [nzLabel]="item">{{
+                  item
+                }}</nz-option>
+                }
+              </nz-select>
+              <!-- {{ profile?.get("province") || "未填写" }} -->
+            </div>
           </div>
         </div>
         <div nz-row>
           <div nz-col nzSpan="8">
             <div class="lable">所在部门</div>
             <div class="value">
-              {{ user?.get("departmentName") || "未填写" }}
+              <input
+                nz-input
+                type="text"
+                [disabled]="!edit"
+                [(ngModel)]="profileJson.departmentName"
+                placeholder="请填写所在部门"
+              />
+              <!-- {{ user?.get("departmentName") || "未填写" }} -->
             </div>
           </div>
           <div nz-col nzSpan="8">
             <div class="lable">职务</div>
-            <div class="value">{{ profile?.get("postName") || "未填写" }}</div>
+            <div class="value">
+              <input
+                nz-input
+                type="text"
+                [disabled]="!edit"
+                [(ngModel)]="profileJson.postName"
+                placeholder="请填写职务"
+              />
+              <!-- {{ profile?.get("postName") || "未填写" }} -->
+            </div>
           </div>
           <div nz-col nzSpan="8">
             <div class="lable">主要学科</div>
             <div class="value">
-              {{ profile?.get("majorSubject") || "未填写" }}
+              <input
+                nz-input
+                type="text"
+                [disabled]="!edit"
+                [(ngModel)]="profileJson.postName"
+                placeholder="请填写主要学科"
+              />
+              <!-- {{ profile?.get("majorSubject") || "未填写" }} -->
             </div>
           </div>
         </div>

+ 27 - 1
projects/textbook/src/modules/nav-admin/user-edit/user-edit.component.scss

@@ -59,7 +59,7 @@
 .edit-content {
   margin: 0 0 20px;
   padding: 0 24px;
-  height: calc(100vh - 250px);
+  // height: calc(100vh - 250px);
   min-width: 1000px;
   .title {
     //styleName: 字体/标题-中-Medium;
@@ -113,6 +113,32 @@
       width: 100%;
     }
   }
+  .rows{
+    display: flex;
+    justify-content: space-between;
+    .fonter {
+      // text-align: right;
+      .form-button {
+        width: 80px;
+        height: 40px;
+        margin: 20px 0;
+        color: white !important;
+        background-color: #3e49b3 !important;
+        border-radius: 4px;
+        font-family: PingFang SC;
+        font-size: 14px;
+        font-weight: 400;
+        line-height: 20px;
+        text-align: center;
+      }
+      .close {
+        width: 80px;
+        background-color: #eae6e6 !important;
+        color: black !important;
+        margin-left: 20px;
+      }
+    }
+  }
 }
 .depart-modal{
   .row{

+ 70 - 29
projects/textbook/src/modules/nav-admin/user-edit/user-edit.component.ts

@@ -15,6 +15,10 @@ import { NzRadioModule } from 'ng-zorro-antd/radio';
 import Parse from 'parse';
 import { NzImageService } from 'ng-zorro-antd/image';
 import { NzImageModule } from 'ng-zorro-antd/image';
+import { NzSelectModule } from 'ng-zorro-antd/select';
+import { MatButtonModule } from '@angular/material/button';
+import { provinces } from '../../../services/provinces';
+
 
 @Component({
   selector: 'app-user-edit',
@@ -30,7 +34,9 @@ import { NzImageModule } from 'ng-zorro-antd/image';
     NzPopoverModule,
     NzTagModule,
     NzModalModule,
-    NzRadioModule,NzImageModule
+    NzRadioModule,
+    NzImageModule,
+    NzSelectModule,MatButtonModule
   ],
   standalone: true,
 })
@@ -58,6 +64,22 @@ export class UserEditComponent implements OnInit {
   isShowModal: boolean = false;
   searchValue: string = ''; //搜索部门内容
   unitTypes: Array<any> = [];
+  userJson: any = { //user编辑数据
+    email:'',
+    phone:'',
+    name:'',
+    username:'',
+  }
+  profileJson: any = { //身份编辑数据
+    identity:'',
+    telephone:'',
+    province:'',
+    departmentName:'',
+    postName:'',
+    majorSubject:''
+  }
+  userType: Array<string> = ['教师', '评审专家', '高校联系人', '工作联系人'];
+  provinces: Array<string> = provinces.options; //省份
 
   constructor(
     public tbookSer: textbookServer,
@@ -75,22 +97,30 @@ export class UserEditComponent implements OnInit {
         let query = new Parse.Query('_User');
         query.include('department');
         this.user = await query.get(id);
+        this.userJson = this.user.toJSON();
+
         let queryProfile = new Parse.Query('Profile');
         queryProfile.equalTo('user', id);
         this.profile = await queryProfile.first();
+        this.profileJson = this.profile.toJSON();
         this.userDataJson = {
           companyType: this.profile?.get('companyType'),
           department: this.user.get('department'),
         };
       }
+      await this.getUnitTypes();
       let arr = ['教师', '评审专家', '高校联系人'];
-      if (
-        this.tbookSer.profile.identity == '国家级管理员' ||
-        (this.tbookSer.profile.identity == '工作联系人' &&
-          arr.includes(this.profile.identity)) ||
-        (this.tbookSer.profile.identity == '高校联系人' &&
-          this.profile.identity == '教师')
+      if (this.tbookSer.profile.identity == '国家级管理员') {
+        this.edit = true;
+      } else if (this.tbookSer.profile.identity == '工作联系人' && arr.includes(this.profile.get('identity'))
+      ) {
+        this.userType = ['教师', '评审专家', '工作联系人'];
+        this.edit = true;
+      } else if (
+        this.tbookSer.profile.identity == '高校联系人' &&
+        this.profile.get('identity') == '教师'
       ) {
+        this.userType = ['教师'];
         this.edit = true;
       }
     });
@@ -104,9 +134,12 @@ export class UserEditComponent implements OnInit {
     switch (type) {
       case '已认证':
         this.user.set('accountState', '已认证');
-        Parse.Cloud.run('aliSmsSend',{
-          "mobileList": [this.user?.get('phone')],"templateCode":"SMS_468870790","params":{},"signName":"普通高等教育教材网"
-        })
+        Parse.Cloud.run('aliSmsSend', {
+          mobileList: [this.user?.get('phone')],
+          templateCode: 'SMS_468870790',
+          params: {},
+          signName: '普通高等教育教材网',
+        });
         break;
       case '已禁用':
         this.user.set('accountState', '已禁用');
@@ -137,14 +170,18 @@ export class UserEditComponent implements OnInit {
     }
     this.isVisible = false;
   }
+  //切换单位类型
+  onChangeType(){
+    this.userDataJson.department = null
+  }
   //选择部门
   async showModalDepart() {
     if (!this.edit) {
       this.message.warning('同级身份暂无权限操作');
       return;
     }
-    if(this.unitTypes.length == 0){
-     await this.getUnitTypes()
+    if (this.unitTypes.length == 0) {
+      await this.getUnitTypes();
     }
     let parent = this.unitTypes.find(
       (item) => item.name == this.userDataJson.companyType
@@ -204,19 +241,19 @@ export class UserEditComponent implements OnInit {
   }
   onCheck(e: any) {
     console.log(e);
-    this.userDataJson.department = undefined
+    this.userDataJson.department = undefined;
     this.provinceChange();
   }
-  parent:string = '' //搜索时传入的id
+  parent: string = ''; //搜索时传入的id
   //选择部门
   async onCheckedDepart(e: any) {
     console.log(e);
     if (e?.get('parent')?.id) {
       this.userDataJson.department = e;
-      this.parent = e?.get('parent')?.id
+      this.parent = e?.get('parent')?.id;
     } else {
       this.provinceChange(e.id);
-      this.parent = e?.id
+      this.parent = e?.id;
     }
     this.parentMap = await this.formatNode(e.id);
   }
@@ -227,23 +264,23 @@ export class UserEditComponent implements OnInit {
       department: this.user.get('department'),
     };
     this.isShowModal = false;
-    this.parent = ''
+    this.parent = '';
   }
   async completeChange(): Promise<void> {
-    if(!this.userDataJson.department?.id){
-      this.message.warning('请选择部门')
-      return
+    if (!this.userDataJson.department?.id) {
+      this.message.warning('请选择部门');
+      return;
     }
     this.userDataJson.companyType = this.userDataJson.department.get('branch');
-    this.profile?.set('companyType', this.userDataJson.companyType)
-    await this.profile?.save()
-    this.user?.set('department', this.userDataJson.department?.toPointer())
-    await this.user?.save()
-    this.ngOnInit()
+    this.profile?.set('companyType', this.userDataJson.companyType);
+    await this.profile?.save();
+    this.user?.set('department', this.userDataJson.department?.toPointer());
+    await this.user?.save();
+    this.ngOnInit();
     this.isShowModal = false;
-    this.parent = ''
+    this.parent = '';
   }
-  openUrl(url:string){
+  openUrl(url: string) {
     if (!/\.(jpg|jpeg|png|GIF|JPG|PNG)$/.test(url)) {
       window.open(url);
     } else {
@@ -252,10 +289,14 @@ export class UserEditComponent implements OnInit {
           src: url,
           width: '200px',
           height: '200px',
-          alt: 'ng-zorro'
+          alt: 'ng-zorro',
         },
-      ]
+      ];
       this.nzImageService.preview(images, { nzZoom: 1.5, nzRotate: 0 });
     }
   }
+
+  submitForm(type:string){
+    this.message.warning('权限暂未开放')
+  }
 }

+ 2 - 2
projects/textbook/src/modules/nav-province-contact/page-process/process-create/process-create.component.html

@@ -187,7 +187,7 @@
       <div nz-col nzSpan="11"></div>
     </div>
   </div>
-  @if (isEdit) {
+  <!-- @if (isEdit) {
   <div nz-row>
     <div nz-col nzSpan="24">
       <div class="title-row">
@@ -250,5 +250,5 @@
       </div>
     </div>
   </div>
-  }
+  } -->
 </div>

+ 1 - 1
projects/textbook/src/modules/nav-province-contact/page-textbook/page-textbook.component.html

@@ -13,7 +13,7 @@
         *nzSpaceItem
         nz-button
         nzType="primary"
-        (click)="submitted()"
+        (click)="toUrl('/nav-province-contact/manage/submitted/'+ this.eduProcess?.id)"
       >
       提交推荐教材列表
       </button>

+ 31 - 5
projects/textbook/src/modules/nav-province-contact/submitted/complete/complete.component.html

@@ -1,15 +1,41 @@
 <div class="manage">
-  @if (!disabled) {
-    <nz-empty [nzNotFoundContent]="'公示已结束,点击【完成报送】,将推荐教材提交至上级'"></nz-empty>
+  @if (eduProcess?.get('status') == '400') {
+  <nz-empty
+    [nzNotFoundContent]="'已完成报送'"
+    nzNotFoundImage="/img/book-3.png"
+  ></nz-empty>
   }@else {
-  <nz-empty [nzNotFoundContent]="deadline + '后可完成报送'"></nz-empty>
+  <nz-empty
+    nzNotFoundImage="/img/book-3.png"
+    [nzNotFoundContent]="
+      '推荐教材列表已锁定,点击【完成报送】,将推荐教材提交至上级'
+    "
+  ></nz-empty>
+  <div style="display: flex; justify-content: center">
+    <button
+      nz-button
+      nzType="default"
+      style="margin-right: 20px"
+      (click)="revoke()"
+    >
+      撤销公示
+    </button>
+    <button
+      nz-button
+      nzType="primary"
+      [disabled]="disabled"
+      (click)="complete()"
+    >
+      完成报送
+    </button>
+  </div>
   }
 </div>
 
-<div class="footer">
+<!-- <div class="footer">
   <div class="tips">共 {{count}} 册(套)推荐报送教材</div>
   <div class="btns">
   <button nz-button nzType="default" style="margin-right: 20px" (click)="revoke()">撤销公示</button>
     <button nz-button nzType="primary" [disabled]="disabled" (click)="complete()">完成报送</button>
   </div>
-</div>
+</div> -->

+ 6 - 6
projects/textbook/src/modules/nav-province-contact/submitted/complete/complete.component.ts

@@ -17,7 +17,7 @@ export class CompleteComponent implements OnInit {
   date: Date = new Date();
   t: any;
   deadline: string = '';
-  disabled: boolean = true;
+  disabled: boolean = false;
   time() {
     if (new Date().getTime() > this.date.getTime()) {
       clearTimeout(this.t);
@@ -42,15 +42,15 @@ export class CompleteComponent implements OnInit {
   ) {}
 
   ngOnInit() {
-    this.date = new Date(
-      this.eduProcess?.get('releaseDate').getTime() + 1000 * 60 * 60 * 24
-    );
-    this.time();
+    // this.date = new Date(
+    //   this.eduProcess?.get('releaseDate').getTime() + 1000 * 60 * 60 * 24
+    // );
+    // this.time();
     this.getEduTextbook();
     if(this.eduProcess?.get('status') == '400'){
       this.modal.confirm({
         nzTitle: '流程已完成',
-        nzContent: `报送已提交,请退出该页面`,
+        nzContent: `报送已提交,请退出当前页`,
         nzOkText: '确认',
         nzOkType: 'primary',
         nzCancelText:null,

+ 6 - 6
projects/textbook/src/modules/nav-province-contact/submitted/export-file/export-file.component.html

@@ -1,4 +1,4 @@
-<div class="comple">
+<!-- <div class="comple">
   <div class="title">提交成功</div>
   <div class="onload" (click)="textbook?.export()">
     下载推荐汇总表
@@ -12,8 +12,8 @@
   [filterObj]="filterObj"
   [eduProcess]="eduProcess"
 ></app-textbook>
-}
-<!-- <div class="manage">
+} -->
+<div class="manage">
   <div class="left">
     <div class="row">
       <div class="lable">推荐教材</div>
@@ -38,12 +38,12 @@
         生成 PDF 并下载
       </button>
   </div>
-</div> -->
+</div>
 
-<!-- <div class="footer">
+<div class="footer">
   <button nz-button nzType="default" (click)="close()" style="margin-right: 20px">取消</button>
   <button nz-button nzType="primary" (click)="next()" style="background: #3e49b3; border: 1px #3e49b3">下一步</button>
-</div> -->
+</div>
 
 <div class="loading" [hidden]="!showLoading">
   <nz-spin nzSimple [nzSize]="'large'"></nz-spin>

+ 1 - 1
projects/textbook/src/modules/nav-province-contact/submitted/export-list/export-list.component.html

@@ -23,7 +23,7 @@
       nzType="default"
       style="margin-right: 20px"
     >
-      下载公示列
+    下载推荐汇总
     </button>
     <button
       nz-button

+ 6 - 6
projects/textbook/src/modules/nav-province-contact/submitted/submitted.component.html

@@ -15,25 +15,25 @@
       </div>
     </nz-page-header-title>
   </nz-page-header>
-  <!-- <div class="steps">
+  <div class="steps">
     <nz-steps [nzCurrent]="state">
       <nz-step nzTitle="导出推荐汇总表" nzDescription=""></nz-step>
       <nz-step nzTitle="导出公示教材列表" nzDescription=""></nz-step>
       <nz-step nzTitle="完成报送" nzDescription=""></nz-step>
     </nz-steps>
-  </div> -->
+  </div>
 </div>
 
 <div class="content">
-  @if (eduProcess?.id) {
+  <!-- @if (eduProcess?.id) {
     <app-export-file [eduProcess]="eduProcess"></app-export-file>
-  }
-  <!-- @switch (state) { @case (0) {
+  } -->
+  @switch (state) { @case (0) {
   <app-export-file (change)="onChange($event)"></app-export-file>
   }
    @case (1) {
   <app-export-list [eduProcess]="eduProcess" (change)="onChange($event)"></app-export-list>
 
   } @case (2) { <app-complete [eduProcess]="eduProcess"></app-complete>} 
-  } -->
+  }
 </div>

+ 2 - 2
projects/textbook/src/modules/nav-province-school-contact/modules.routes.ts

@@ -5,11 +5,11 @@ import { UserEditComponent } from "../nav-admin/user-edit/user-edit.component";
 import { RecycleComponent } from "../nav-author/recycle/recycle.component";
 import { SpaceComponent } from "../nav-author/space/space.component";
 import { PageRoleComponent } from "../nav-province-contact/page-role/page-role.component";
-import { PageTextbookComponent } from "../nav-province-contact/page-textbook/page-textbook.component";
+import { PageTextbookComponent } from "./page-textbook/page-textbook.component";
 const routes: Routes = [
   {
     path: '',
-    redirectTo:'manage/user',
+    redirectTo:'manage/textbook',
     pathMatch: "full",
   },
   {

+ 47 - 0
projects/textbook/src/modules/nav-province-school-contact/page-textbook/page-textbook.component.html

@@ -0,0 +1,47 @@
+<nz-page-header>
+  <nz-page-header-title
+    >全部教材
+    <br />
+    <div class="subtitle">查看全部申报流程所提交的教材推荐表</div>
+  </nz-page-header-title>
+  <!-- <nz-page-header-extra>
+    <nz-space>
+      <button
+        style="background: #3e49b3; border: 1px #3e49b3"
+        *nzSpaceItem
+        nz-button
+        nzType="primary"
+        (click)="toUrl('/nav-province-contact/manage/submitted/'+ this.eduProcess?.id)"
+      >
+      提交推荐教材列表
+      </button>
+    </nz-space>
+  </nz-page-header-extra> -->
+</nz-page-header>
+<div class="conetent">
+  <!-- <nz-tabset [(nzSelectedIndex)]="active">
+    <nz-tab nzTitle="待评审教材">
+      @if (!active && eduProcess) {
+        <app-textbook
+        [eduProcess]="eduProcess"
+        [filterObj]="beforeFilterObj"
+      ></app-textbook>
+      }
+    </nz-tab>
+    <nz-tab nzTitle="推荐教材">
+      @if (active && eduProcess) {
+        <app-textbook
+        [filterObj]="afterFilterObj"
+        [recommend]="true"
+        [eduProcess]="eduProcess"
+        ></app-textbook>
+      }
+    </nz-tab>
+  </nz-tabset> -->
+  @if (eduProcess) {
+  <app-textbook
+    [eduProcess]="eduProcess"
+    [filterObj]="beforeFilterObj"
+  ></app-textbook>
+  }
+</div>

+ 29 - 0
projects/textbook/src/modules/nav-province-school-contact/page-textbook/page-textbook.component.scss

@@ -0,0 +1,29 @@
+.subtitle{
+  margin-right: 12px;
+  color: #00000073;
+  font-size: 14px;
+  font-weight: normal;
+  line-height: 1.5715;
+  // overflow: hidden;
+  // white-space: nowrap;
+  // text-overflow: ellipsis;
+}
+.conetent{
+  margin: 0 0 20px;
+  padding: 0 24px;
+}
+::ng-deep .ant-page-header-heading-title {
+  white-space: normal;
+}
+::ng-deep .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn {
+  color: #c6233f;
+}
+::ng-deep .ant-tabs-ink-bar {
+  background: #c6233f;
+}
+::ng-deep .ant-tabs-tab:hover {
+  color: #e97488;
+}
+::ng-deep .ant-tabs-tab-btn:active {
+  color: #e97488;
+}

+ 22 - 0
projects/textbook/src/modules/nav-province-school-contact/page-textbook/page-textbook.component.spec.ts

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

+ 94 - 0
projects/textbook/src/modules/nav-province-school-contact/page-textbook/page-textbook.component.ts

@@ -0,0 +1,94 @@
+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 { NzPageHeaderModule } from 'ng-zorro-antd/page-header';
+import { NzBreadCrumbModule } from 'ng-zorro-antd/breadcrumb';
+import * as Parse from 'parse';
+import { CommonModule } from '@angular/common';
+import { textbookServer } from '../../../services/textbook';
+import { TextbookComponent } from '../../../app/textbook/textbook.component';
+import { NzSpaceModule } from 'ng-zorro-antd/space';
+import { CommonCompModule } from '../../../services/common.modules';
+import { NzTabsModule } from 'ng-zorro-antd/tabs';
+import { NzMessageService } from 'ng-zorro-antd/message';
+
+@Component({
+  selector: 'app-page-textbook',
+  templateUrl: './page-textbook.component.html',
+  styleUrls: ['./page-textbook.component.scss'],
+  imports: [
+    CommonModule,
+    RouterOutlet,
+    TextbookComponent,
+    CompTableListComponent,
+    NzPageHeaderModule,
+    CommonCompModule,
+    NzBreadCrumbModule,
+    NzSpaceModule,
+    NzTabsModule,
+  ],
+  standalone: true,
+})
+export class PageTextbookComponent implements OnInit {
+  @ViewChild(CompTableListComponent) list: CompTableListComponent | undefined;
+  @Input('discard') discard: boolean = false;
+  @Input('render') render: boolean = false;
+  active: number = 0;
+
+  user: Parse.User | undefined;
+
+  //待审核
+  beforeFilterObj: any = {
+    showMore: true, //显示更多字段
+    isCheck: true,
+    status: ['200','201','400'],
+    team:true,
+    btns: {
+      export:true
+    },
+  };
+  //已加入推荐
+  afterFilterObj: any = {
+    showMore: true, //显示更多字段
+    isCheck: true,
+    status: ['200','201','400'],
+    btns: {
+      export:true
+    },
+  };
+  eduProcess?:Parse.Object
+
+  constructor(
+    public tbookSer: textbookServer,
+    private message: NzMessageService,
+    private router: Router,
+    private activeRoute: ActivatedRoute // private translate:TranslateService,
+  ) {
+    this.user = Parse.User.current();
+  }
+
+  ngOnInit(): void {
+    this.getProcess()
+  }
+  async getProcess(){
+    let parentMap = await this.tbookSer.formatNode(
+      this.tbookSer?.profile?.user?.department?.objectId
+    );
+    if (!parentMap[1]?.key) return;
+    let query = new Parse.Query('EduProcess');
+    query.equalTo('department', parentMap[1]?.key);
+    // query.lessThanOrEqualTo('startDate', new Date());
+    // query.greaterThan('deadline', new Date());
+    query.notEqualTo('isDeleted', true);
+    // query.notEqualTo('status', '100');
+    let res = await query.first();
+    this.eduProcess = res
+  }
+  toUrl(url: string, params?: object) {
+    if (params) {
+      this.router.navigate([url, params]);
+    } else {
+      this.router.navigate([url]);
+    }
+  }
+}