cehn 7 月之前
父節點
當前提交
18c086324a

+ 11 - 32
projects/textbook/src/app/textbook/textbook.component.html

@@ -131,35 +131,25 @@
           {{ data?.get("title") || "-" }}
         </td>
         <td nzEllipsis>
-          @for (vul of data?.get('childrens'); track vul) {
-            {{ vul?.get("ISBN") + ' ' || "-" }}
-          }
+          {{fromatFiled(data?.get('childrens'), 'ISBN')}}
         </td>
         <td nzEllipsis>
-          @for (vul of data?.get('childrens'); track vul) {
-            {{ vul?.get("author") + ' ' || "-" }}
-          }
+          {{fromatFiled(data?.get('childrens'), 'author')}}
         </td>
         <td nzEllipsis>
-          @for (vul of data?.get('childrens'); track vul) {
-            {{ vul?.get("lang") + ' ' || "-" }}
-          }
+          {{fromatFiled(data?.get('childrens'), 'lang')}}
         </td>
         <td nzEllipsis>
           {{ data?.get("majorPoniter")?.code + '/'+data?.get("majorPoniter")?.name || "-" }}
         </td>
         <td nzEllipsis>
-          @for (vul of data?.get('childrens'); track vul) {
-            {{ vul?.get("editionUnit") + ' ' || "-" }}
-          }
+          {{fromatFiled(data?.get('childrens'), 'editionUnit')}}
         </td>
         <td nzEllipsis>
           {{ data?.get("approval") || "-" }}
         </td>
         <td nzEllipsis>
-          @for (vul of data?.get('childrens'); track vul) {
-            {{ vul?.get("carrierShape") + ' ' || "-" }}
-          }
+          {{fromatFiled(data?.get('childrens'), 'carrierShape')}}
         </td>
         <td nzEllipsis>
           {{ data?.get("department")?.get("name") || "-" }}
@@ -368,37 +358,26 @@
           {{
             data?.get("type") == "单本"
               ? "单本"
-              : data?.get("typeNumber") || "-"
+              : '全册 - ' + data?.get("typeNumber") || "-"
           }}
         </td>
         <td nzEllipsis>
-          @for (vul of data?.get('childrens'); track vul) {
-            {{ vul?.get("author") + ' ' || "-" }}
-          }
+          {{fromatFiled(data?.get('childrens'), 'author')}}
         </td>
         <td nzEllipsis>
-          @for (vul of data?.get('childrens'); track vul) {
-            {{ vul?.get("unit") + ' ' || "-" }}
-          }
+          {{fromatFiled(data?.get('childrens'), 'unit')}}
         </td>
         <td nzEllipsis>
           {{ data?.get("major")?.name || "-" }}
         </td>
         <td nzEllipsis>
-          @for (vul of data?.get('childrens'); track vul) {
-            {{ vul?.get("lang") + ' ' || "-" }}
-          }
+          {{fromatFiled(data?.get('childrens'), 'lang')}}
         </td>
-
         <td nzEllipsis>
-          @for (vul of data?.get('childrens'); track vul) {
-            {{ vul?.get("ISBN") + ' ' || "-" }}
-          }
+          {{fromatFiled(data?.get('childrens'), 'ISBN')}}
         </td>
         <td nzEllipsis>
-          @for (vul of data?.get('childrens'); track vul) {
-            {{ vul?.get("editionUnit") + ' ' || "-" }}
-          }
+          {{fromatFiled(data?.get('childrens'), 'editionUnit')}}
         </td>
         <td nzEllipsis nzRight>
           @if(manage){

+ 135 - 109
projects/textbook/src/app/textbook/textbook.component.ts

@@ -161,6 +161,25 @@ export class TextbookComponent implements OnInit {
   calc: number = 120;
 
   showLoading: boolean = false; //全局
+  /* 格式化拓展表字段 */
+  fromatFiled(list:Array<Parse.Object>, filed:string):string{
+    let arr:Array<string|null> = []
+    let isDate = false
+    list.forEach((item:Parse.Object)=>{
+      // arr.add(item.get(filed))
+     if(Object.prototype.toString.call(item.get(filed)).indexOf('Date') != -1 || isDate){
+        arr.push(this.datePipe.transform(item.get(filed), 'yyyy-MM'))
+        isDate = true
+      }else{
+        arr.push(item.get(filed))
+      }
+    })
+    let j = Array.from(arr).join(',')
+    if(!isDate){
+      j = Array.from(new Set(arr)).join(' ')
+    }
+    return j || '-'
+  }
 
   constructor(
     public tbookSer: textbookServer,
@@ -525,7 +544,9 @@ export class TextbookComponent implements OnInit {
     }
     this.modal.confirm({
       nzTitle: '确认提交教材?',
-      nzContent: `申报书及附件已经提交,请务必确保函报材料与系统填报材料保持一致,否则不予受理`,
+      nzContent: `申报书提交后不可修改。
+      - 请在获得推荐资质后根据相关要求做好联系出版社上传教材等准备工作;并提醒、确认相应出版社到申报系统申请工作联系人账号。
+      - 请务必确保函报材料与系统填报材料保持一致,否则不予受理。`,
       nzOkText: '确认',
       nzOkType: 'primary',
       nzOkDanger: false,
@@ -808,127 +829,132 @@ export class TextbookComponent implements OnInit {
   }
   //导出表格
   async export() {
-    console.log(this.eduProcess);
-    let query = new Parse.Query('EduProcess');
-    query.equalTo('objectId', this.eduProcess?.id);
-    query.include('profileSubmitted', 'profileSubmitted.user');
-    query.select('name', 'profileSubmitted');
-    let r = await query.first();
-    let data: any = await this.getTextbook('', true);
-    let table = `<table border="1px" cellspacing="0" cellpadding="0">
-        <thead>
-        <tr>
-                <th colspan="10" style="font-size: 20px;font-family: '黑体';">“十四五”普通高等教育本科国家级规划教材推荐汇总表</th>
-            </tr>
-            <tr>
-                <th></th><th></th><th></th><th></th><th></th>
-                <th></th><th></th><th></th><th></th><th></th>
-            </tr>
-            <tr>
-                <th></th><th></th><th></th><th></th><th></th>
-                <th></th><th></th><th></th><th></th><th></th>
-            </tr>
-            <tr>
-                <th></th><th></th>
-                <th style="font-size: 12px;font-family: '黑体';text-align: left;">单位名称(公章):${r?.get(
-                  'name'
-                )}</th>
-                <th colspan="3"></th>
-                <th></th><th></th><th></th>
-            </tr>
-            <tr>
-                <th></th><th></th><th></th><th></th><th></th>
-                <th></th><th></th><th></th><th></th><th></th>
-            </tr>
-            <tr>
-                <th></th><th></th>
-                <th style="font-size: 12px;font-family: '黑体';text-align: left;">申报工作联系人:</th>
-                <th colspan="2" style="font-size: 12px;font-family: '黑体';text-align: left;">姓名 ${r
-                  ?.get('profileSubmitted')
-                  ?.get('user')
-                  ?.get('name')}</th>
-                <th colspan="2" style="font-size: 12px;font-family: '黑体';text-align: left;">电话 ${r
-                  ?.get('profileSubmitted')
-                  ?.get('user')
-                  ?.get('phone')}</th>
-                <th></th><th></th><th></th>
-            </tr>
+    if (this.showLoading) return;
+    this.showLoading = true;
+    try{
+      console.log(this.eduProcess);
+      let query = new Parse.Query('EduProcess');
+      query.equalTo('objectId', this.eduProcess?.id);
+      query.include('profileSubmitted', 'profileSubmitted.user');
+      query.select('name', 'profileSubmitted');
+      let r = await query.first();
+      let data: any = await this.getTextbook('', true);
+      let table = `<table border="1px" cellspacing="0" cellpadding="0">
+          <thead>
+          <tr>
+                  <th colspan="10" style="font-size: 20px;font-family: '黑体';">“十四五”普通高等教育本科国家级规划教材推荐汇总表</th>
+              </tr>
+              <tr>
+                  <th></th><th></th><th></th><th></th><th></th>
+                  <th></th><th></th><th></th><th></th><th></th>
+              </tr>
+              <tr>
+                  <th></th><th></th><th></th><th></th><th></th>
+                  <th></th><th></th><th></th><th></th><th></th>
+              </tr>
+              <tr>
+                  <th></th><th></th>
+                  <th style="font-size: 12px;font-family: '黑体';text-align: left;">单位名称(公章):</th>
+                  <th colspan="3" style="font-size: 12px;font-family: '黑体';text-align: left;">${r?.get('name')}</th>
+                  <th></th><th></th><th></th>
+              </tr>
+              <tr>
+                  <th></th><th></th><th></th><th></th><th></th>
+                  <th></th><th></th><th></th><th></th><th></th>
+              </tr>
+              <tr>
+                  <th></th><th></th>
+                  <th style="font-size: 12px;font-family: '黑体';text-align: left;">申报工作联系人:</th>
+                  <th colspan="2" style="font-size: 12px;font-family: '黑体';text-align: left;">姓名 ${r
+                    ?.get('profileSubmitted')
+                    ?.get('user')
+                    ?.get('name')}</th>
+                  <th colspan="2" style="font-size: 12px;font-family: '黑体';text-align: left;">电话 ${r
+                    ?.get('profileSubmitted')
+                    ?.get('user')
+                    ?.get('phone')}</th>
+                  <th></th><th></th><th></th>
+              </tr>
+              <tr>
+                  <th></th><th></th><th></th><th></th><th></th>
+                  <th></th><th></th><th></th><th></th><th></th>
+              </tr>
             <tr>
-                <th></th><th></th><th></th><th></th><th></th>
-                <th></th><th></th><th></th><th></th><th></th>
+              <th>序号</th>
+              <th>申报编号</th>
+              <th>申报教材名称</th>
+              <th>第一主编/作者</th>
+              <th>第一主编(作者)单位</th>
+              <th>申报类型</th>
+              <th>是否为重点建设教材</th>
+              <th>出版单位</th>
+              <th>初版时间</th>
+              <th>载体形式</th>
             </tr>
-          <tr>
-            <th>序号</th>
-            <th>申报编号</th>
-            <th>申报教材名称</th>
-            <th>第一主编/作者</th>
-            <th>第一主编(作者)单位</th>
-            <th>申报类型</th>
-            <th>是否为重点建设教材</th>
-            <th>出版单位</th>
-            <th>初版时间</th>
-            <th>载体形式</th>
-          </tr>
-        </thead>
-        <tbody>
-        `;
-    let _body = '';
-    for (var row = 0; row < data.length; row++) {
-      _body += '<tr>';
-      _body += '<td>';
-      _body += `${row + 1}`;
-      _body += '</td>';
+          </thead>
+          <tbody>
+          `;
+      let _body = '';
+      for (var row = 0; row < data.length; row++) {
+        _body += '<tr>';
+        _body += '<td>';
+        _body += `${row + 1}`;
+        _body += '</td>';
 
-      _body += '<td>';
-      _body += `${data[row].get('code') || ''}`;
-      _body += '</td>';
+        _body += '<td>';
+        _body += `${data[row].get('code') || ''}`;
+        _body += '</td>';
 
-      _body += '<td>';
-      _body += ` &nbsp;${data[row].get('title') || '-'}`;
-      _body += '</td>';
+        _body += '<td>';
+        _body += ` &nbsp;${data[row].get('title') || '-'}`;
+        _body += '</td>';
 
-      _body += '<td>';
-      _body += `${data[row]?.get('author') || '-'}`;
-      _body += '</td>';
+        _body += '<td>';
+        _body += `${this.fromatFiled(data[row]?.get('childrens'), 'author')}`;
+        _body += '</td>';
 
-      _body += '<td>';
-      _body += `${data[row]?.get('unit') || '-'}`;
-      _body += '</td>';
+        _body += '<td>';
+        _body += `${this.fromatFiled(data[row]?.get('childrens'), 'unit')}`;
+        _body += '</td>';
 
-      _body += '<td>';
-      _body += `${
-        data[row]?.get('type') == '单本'
-          ? '单本'
-          : data[row]?.get('typeNumber') || '-'
-      }`;
-      _body += '</td>';
+        _body += '<td>';
+        _body += `${
+          data[row]?.get('type') == '单本'
+            ? '单本'
+            :'全册 - ' + data[row]?.get('typeNumber') || '-'
+        }`;
+        _body += '</td>';
 
-      _body += '<td>';
-      _body += `${data[row]?.get('approval') || '-'}`;
-      _body += '</td>';
+        _body += '<td>';
+        _body += `${data[row]?.get('approval') || '-'}`;
+        _body += '</td>';
 
-      _body += '<td>';
-      _body += `${data[row]?.get('editionUnit') || '-'}`;
-      _body += '</td>';
+        _body += '<td>';
+        _body += `${this.fromatFiled(data[row]?.get('childrens'), 'editionUnit')}`;
+        _body += '</td>';
 
-      _body += '<td>';
-      _body += `${
-        this.datePipe.transform(data[row]?.get('editionFirst'), 'yyyy-MM') ||
-        '-'
-      }`;
-      _body += '</td>';
+        _body += '<td>';
+        _body += `${
+          this.fromatFiled(data[row]?.get('childrens'), 'editionFirst')
+        }`;
+        _body += '</td>';
 
-      _body += '<td>';
-      _body += `${data[row]?.get('carrierShape') || '-'}`;
-      _body += '</td>';
+        _body += '<td>';
+        _body += `${this.fromatFiled(data[row]?.get('childrens'), 'carrierShape')}`;
+        _body += '</td>';
 
-      _body += '</tr>';
+        _body += '</tr>';
+      }
+      table += _body;
+      table += '</tbody>';
+      table += '</table>';
+      let title = '推荐汇总表';
+      this.excel(table, `${title}.xls`);
+      this.showLoading = false;
+    }catch(err){
+      this.showLoading = false
+      this.message.error('导出超时')
     }
-    table += _body;
-    table += '</tbody>';
-    table += '</table>';
-    let title = '申报流程列表';
-    this.excel(table, `${title}.xls`);
   }
   excel(data: any, filename: string) {
     let html =

+ 1 - 0
projects/textbook/src/modules/nav-author/components/attachment/attachment.component.html

@@ -203,6 +203,7 @@
   </div>
   <div class="author-content">
     <div class="title">5.版权信息及CIP数据(必须提供)</div>
+    <div class="text">全册中有不同版权信息及CIP数据的各分册,其附件请合并到一个PDF文件上传</div>
     <nz-form-item class="row" style="margin-bottom: 16px">
       <nz-form-label class="label" [nzNoColon]="true" [nzSm]="10" [nzXs]="10" nzRequired>版权页截图</nz-form-label>
       <nz-form-control class="val" nzErrorTip="请上传版权页截图" style="width: 100%">

+ 8 - 5
projects/textbook/src/modules/nav-author/components/create/basic/basic.component.html

@@ -123,8 +123,9 @@
       <nz-input-group>
         <div class="basic-row">
           <nz-date-picker nzMode="month" style="flex: 1" formControlName="editionDate"></nz-date-picker>
-          <nz-input-group style="width: 100px; margin-left: 20px" [nzSuffix]="suffixTemplateInfo">
-            <input type="number" formControlName="editionNumber" nz-input placeholder="输入版次" />
+          <nz-input-group style="width: 150px; margin-left: 20px" [nzSuffix]="suffixTemplateInfo">
+            <!-- <input type="number" formControlName="editionNumber" nz-input placeholder="输入版次" /> -->
+            <nz-input-number nzBorderless formControlName="editionNumber" [nzMin]="1" [nzStep]="1"></nz-input-number>
           </nz-input-group>
           <ng-template #suffixTemplateInfo> 版 </ng-template>
         </div>
@@ -138,8 +139,9 @@
         <div class="basic-row">
           <nz-date-picker nzMode="month" style="flex: 1" formControlName="printDate"
             [nzDisabledDate]="disabledEditionDate"></nz-date-picker>
-          <nz-input-group style="width: 100px; margin-left: 20px" [nzSuffix]="suffixTemplateInfo02">
-            <input type="number" formControlName="printNumber" nz-input placeholder="输入印次" />
+          <nz-input-group style="width: 150px; margin-left: 20px" [nzSuffix]="suffixTemplateInfo02">
+            <!-- <input type="number" formControlName="printNumber" nz-input placeholder="输入印次" /> -->
+            <nz-input-number nzBorderless formControlName="printNumber" [nzMin]="1" [nzStep]="1"></nz-input-number>
           </nz-input-group>
           <ng-template #suffixTemplateInfo02> 次 </ng-template>
         </div>
@@ -152,7 +154,8 @@
     <nz-form-control nzErrorTip="请输入初版以来合计印数" [nzSm]="12" [nzXs]="12">
       <nz-input-group>
         <nz-input-group [nzSuffix]="suffixTemplateInfo03">
-          <input type="number" formControlName="printSum" nz-input placeholder="输入合计印数" />
+          <!-- <input type="number" formControlName="printSum" nz-input placeholder="输入合计印数" /> -->
+          <nz-input-number style="width: 100%" nzBorderless formControlName="printNumber" [nzMin]="1" [nzStep]="1"></nz-input-number>
         </nz-input-group>
         <ng-template #suffixTemplateInfo03> 万册 </ng-template>
       </nz-input-group>

+ 20 - 18
projects/textbook/src/modules/nav-author/components/create/basic/basic.component.ts

@@ -20,7 +20,7 @@ import { CompUploadComponent } from '../../../../../app/comp-upload/comp-upload.
 import { NzInputModule } from 'ng-zorro-antd/input';
 import * as major from '../../../../../services/majors4.map'
 import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
-
+import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
 
 @Component({
   selector: 'app-one',
@@ -36,7 +36,7 @@ import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
     NzInputModule,
     NzTagModule,
     CompUploadComponent,
-    NzCheckboxModule,
+    NzCheckboxModule,NzInputNumberModule
   ],
 })
 export class BasicComponent implements OnInit {
@@ -134,22 +134,24 @@ export class BasicComponent implements OnInit {
     //   importantProjectOther: [this.eduTextbookVolume?.get('importantProjectOther') || ''],
     //   unitType: [this.eduTextbookVolume?.get('unitType') || '', [Validators.required]],
     // });
-    this.validateForm.get("ISBN")?.setValue(Number(this.eduTextbookVolume?.get('ISBN')))
-    this.validateForm.get("author")?.setValue(this.eduTextbookVolume?.get('author'))
-    this.validateForm.get("unit")?.setValue(this.eduTextbookVolume?.get('unit'))
-    this.validateForm.get("lang")?.setValue(this.eduTextbookVolume?.get('lang'))
-    this.validateForm.get("authors")?.setValue(this.eduTextbookVolume?.get('authors'))
-    this.validateForm.get("editor")?.setValue(this.eduTextbookVolume?.get('editor'))
-    this.validateForm.get("editionUnit")?.setValue(this.eduTextbookVolume?.get('editionUnit'))
-    this.validateForm.get("editionFirst")?.setValue(this.eduTextbookVolume?.get('editionFirst'))
-    this.validateForm.get("carrierShape")?.setValue(this.eduTextbookVolume?.get('carrierShape'))
-    this.validateForm.get("editionDate")?.setValue(this.eduTextbookVolume?.get('editionDate'))
-    this.validateForm.get("editionNumber")?.setValue(this.eduTextbookVolume?.get('editionNumber'))
-    this.validateForm.get("printDate")?.setValue(this.eduTextbookVolume?.get('printDate'))
-    this.validateForm.get("printNumber")?.setValue(this.eduTextbookVolume?.get('printNumber'))
-    this.validateForm.get("printSum")?.setValue(this.eduTextbookVolume?.get('printSum'))
-    this.validateForm.get("importantProjectOther")?.setValue(this.eduTextbookVolume?.get('importantProjectOther'))
-    this.validateForm.get("unitType")?.setValue(this.eduTextbookVolume?.get('unitType'))
+    if(this.eduTextbookVolume?.id){
+      this.validateForm.get("ISBN")?.setValue(Number(this.eduTextbookVolume?.get('ISBN')))
+      this.validateForm.get("author")?.setValue(this.eduTextbookVolume?.get('author'))
+      this.validateForm.get("unit")?.setValue(this.eduTextbookVolume?.get('unit'))
+      this.validateForm.get("lang")?.setValue(this.eduTextbookVolume?.get('lang'))
+      this.validateForm.get("authors")?.setValue(this.eduTextbookVolume?.get('authors'))
+      this.validateForm.get("editor")?.setValue(this.eduTextbookVolume?.get('editor'))
+      this.validateForm.get("editionUnit")?.setValue(this.eduTextbookVolume?.get('editionUnit'))
+      this.validateForm.get("editionFirst")?.setValue(this.eduTextbookVolume?.get('editionFirst'))
+      this.validateForm.get("carrierShape")?.setValue(this.eduTextbookVolume?.get('carrierShape'))
+      this.validateForm.get("editionDate")?.setValue(this.eduTextbookVolume?.get('editionDate'))
+      this.validateForm.get("editionNumber")?.setValue(this.eduTextbookVolume?.get('editionNumber'))
+      this.validateForm.get("printDate")?.setValue(this.eduTextbookVolume?.get('printDate'))
+      this.validateForm.get("printNumber")?.setValue(this.eduTextbookVolume?.get('printNumber'))
+      this.validateForm.get("printSum")?.setValue(this.eduTextbookVolume?.get('printSum'))
+      this.validateForm.get("importantProjectOther")?.setValue(this.eduTextbookVolume?.get('importantProjectOther'))
+      this.validateForm.get("unitType")?.setValue(this.eduTextbookVolume?.get('unitType'))
+    }
   }
   public isComlpete:boolean = false //填写是否完整
   async submitForm(eduTextbookId?:any):Promise<string|undefined> {

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

@@ -16,15 +16,15 @@
 <div class="manage">
   <div class="left">
     <div class="row">
-      <div class="lable">推荐教材限额</div>
+      <div class="lable">推荐限额内申报数</div>
       <div class="val">{{otherCount}}</div>
     </div>
     <div class="row">
-      <div class="lable">推荐限额额外推荐教材</div>
+      <div class="lable">推荐限额外申报数</div>
       <div class="val">{{allCount - otherCount}}</div>
     </div>
     <div class="row">
-      <div class="lable">推荐表总份数</div>
+      <div class="lable">申报书总份数</div>
       <div class="val">{{allCount}}</div>
     </div>
   </div>

+ 93 - 67
projects/textbook/src/services/textbook.ts

@@ -220,7 +220,47 @@ export class textbookServer {
 
   /* 批量预设(临时) */
   async saveProcess() {
-    // let count = 0
+    let count = 0
+    /* 批量关联流程管理员 */
+    // let queryEdupro = new Parse.Query('EduProcess')
+    // queryEdupro.select('department','name')
+    // queryEdupro.equalTo('profileSubmitted',null)
+    // queryEdupro.limit(1000)
+    // let res = await queryEdupro.find()
+    // console.log(res);
+    // for (let index = 0; index < res.length; index++) {
+    //   const item = res[index];
+    //   let queryParams: any = {
+    //     where: {
+    //       $or: [
+    //         {
+    //           user: {
+    //             $inQuery: {
+    //               where: {
+    //                "department":item?.get('department')?.id,
+    //                "accountState":'已认证',
+    //               },
+    //               className: '_User',
+    //             },
+    //           },
+    //         },
+    //       ],
+    //     },
+    //   };
+    //   let query = Parse.Query.fromJSON('Profile', queryParams);
+    //   query.equalTo('identity','工作联系人')
+    //   query.select('objectId')
+    //   let p = await query.first()
+    //   if(p?.id){
+    //     item.set('profileSubmitted',p.toPointer())
+    //     await item.save()
+    //     console.log('绑定成功'+p.id+':'+item?.get('name'));
+    //     count++
+    //   }
+    // }
+    // console.log(count);
+
+    /* 开始时间 */
     // let query = new Parse.Query('EduTextbook')
     // // query.equalTo('num',null)
     // query.notEqualTo('isDeleted',true)
@@ -238,6 +278,8 @@ export class textbookServer {
     //     await item.save()
     //     console.log(count);
     // }
+
+    /* 修改更新部门名称 */
     // let list = updateDept.list2
     // for (let index = 0; index < list.length; index++) {
     //   const item = list[index]
@@ -264,72 +306,56 @@ export class textbookServer {
     //   }
     // }
 
-    // let query = new Parse.Query('Department')
-    // query.equalTo('branch', '中央有关部门教育司')
-    // query.limit(2000);
-    // let r = await query.find()
-    // console.log(r);
-    // for (let index = 0; index < r.length; index++) {
-    //   const element = r[index];
-    //   element.set('branch', '有关部门(单位)教育司(局)')
-    //   await element.save()
-    //   count++
-    //   console.log(count);
-    // }
-      // let query = new Parse.Query('Department')
-      // query.equalTo('parent',null)
-      // query.equalTo('name','省级教育行政部门')
-      // let r = await query.find()
-      // let addCount = 0
-      // let list = updateDept.list3
-      // for (let index = 0; index < list.length; index++) {
-      //   const item = list[index];
-      //   let queryPareet = new Parse.Query('Department')
-      //   queryPareet.equalTo('name', item.name)
-      //   let dep = await queryPareet.first()
-      //   console.log(dep?.get('name'));
+    /* 批量导入部门 */
+    // let list = updateDept.list3
+    // for (let index = 0; index < list.length; index++) {
+    //   const item = list[index];
+    //   let queryPareet = new Parse.Query('Department')
+    //   queryPareet.equalTo('name', item.name)
+    //   let dep = await queryPareet.first()
+    //   console.log(dep?.get('name'));
+      
+    //   // for (let index = 0; index < prents.length; index++) {
+    //   //   let item = prents[index];
+    //     let query = new Parse.Query('EduProcess')
+    //     query.equalTo('department',dep?.id)
+    //     query.notEqualTo('isDeleted',true)
+    //     let eduProcess = await query.first()
+    //     if(!eduProcess?.id){
+    //       console.log('不存在,新建'+dep?.get('name'),addCount);
+    //       let obj = Parse.Object.extend('EduProcess');
+    //       eduProcess = new obj()
+    //     }
+    //     eduProcess?.set('company', {
+    //       __type: 'Pointer',
+    //       className: 'Company',
+    //       objectId: 'RbIKpmuaMC',
+    //     });
+    //     eduProcess?.set('branch', {
+    //       __type: 'Pointer',
+    //       className: 'Department',
+    //       objectId:dep?.get('parent')?.id,
+    //     });
+    //     eduProcess?.set('department', {
+    //       __type: 'Pointer',
+    //       className: 'Department',
+    //       objectId: dep?.id,
+    //     });
+    //     eduProcess?.set('name', dep?.get('name'));
+    //     eduProcess?.set('desc',item.desc ? item.desc : dep?.get('name') + '流程');
+    //     eduProcess?.set('code', dep?.get('code') || dep?.id);
+    //     if(dep?.get('branch') == '出版单位') {
+    //       eduProcess?.set('startDate', new Date('2024-07-20 18:00'));
+    //       eduProcess?.set('deadline', new Date('2024-09-20 18:00'));
+    //     }
+    //     eduProcess?.set('num',item.num)
+    //     eduProcess?.set('status', '200');
+    //     await eduProcess?.save();
+    //     count ++
+    //     console.log('已完成'+dep?.get('name')+'流程');
+    //     console.log(count);
         
-      //   // for (let index = 0; index < prents.length; index++) {
-      //   //   let item = prents[index];
-      //     let query = new Parse.Query('EduProcess')
-      //     query.equalTo('department',dep?.id)
-      //     query.notEqualTo('isDeleted',true)
-      //     let eduProcess = await query.first()
-      //     if(!eduProcess?.id){
-      //       console.log('不存在,新建'+dep?.get('name'),addCount);
-      //       let obj = Parse.Object.extend('EduProcess');
-      //       eduProcess = new obj()
-      //     }
-      //     eduProcess?.set('company', {
-      //       __type: 'Pointer',
-      //       className: 'Company',
-      //       objectId: 'RbIKpmuaMC',
-      //     });
-      //     eduProcess?.set('branch', {
-      //       __type: 'Pointer',
-      //       className: 'Department',
-      //       objectId:dep?.get('parent')?.id,
-      //     });
-      //     eduProcess?.set('department', {
-      //       __type: 'Pointer',
-      //       className: 'Department',
-      //       objectId: dep?.id,
-      //     });
-      //     eduProcess?.set('name', dep?.get('name'));
-      //     eduProcess?.set('desc',item.desc ? item.desc : dep?.get('name') + '流程');
-      //     eduProcess?.set('code', dep?.get('code') || dep?.id);
-      //     if(dep?.get('branch') == '出版单位') {
-      //       eduProcess?.set('startDate', new Date('2024-07-20 18:00'));
-      //       eduProcess?.set('deadline', new Date('2024-09-20 18:00'));
-      //     }
-      //     eduProcess?.set('num',item.num)
-      //     eduProcess?.set('status', '200');
-      //     await eduProcess?.save();
-      //     count ++
-      //     console.log('已完成'+dep?.get('name')+'流程');
-      //     console.log(count);
-          
-      //   // }
-      // }
+    //   // }
+    // }
   }
 }