|
@@ -95,11 +95,6 @@ export class AttachmentComponent implements OnInit {
|
|
|
url: '',
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- // /**作者政治审核表 {name: '',url: '',} */
|
|
|
- // examine: Array<any> = []
|
|
|
-
|
|
|
-
|
|
|
constructor(
|
|
|
public tbookSer: textbookServer,
|
|
|
private msg: NzMessageService,
|
|
@@ -117,8 +112,6 @@ export class AttachmentComponent implements OnInit {
|
|
|
this.moreMaterial = this.eduTextbook?.get('moreMaterial') || this.moreMaterial
|
|
|
this.cipProveFile = this.eduTextbook?.get('cipProveFile') || this.cipProveFile
|
|
|
this.unitMaterial = this.eduTextbook?.get('unitMaterial') || this.unitMaterial
|
|
|
- // this.examine = this.eduTextbook?.get('examine') || this.examine
|
|
|
- // this.authorList = this.eduTextbook?.get('authorList')
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -172,23 +165,6 @@ export class AttachmentComponent implements OnInit {
|
|
|
isNull = true
|
|
|
}
|
|
|
}
|
|
|
- // if (this.examine?.length <= 0) {
|
|
|
- // isNull = true
|
|
|
- // msgList.push('作者政治审核表')
|
|
|
- // } else if (this.examine?.length > 0) {
|
|
|
- // let isExist = this.examine.every(item => item?.url == '' || !item?.url)
|
|
|
- // if (isExist) {
|
|
|
- // msgList.push('作者政治审核表')
|
|
|
- // isNull = true
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if (this.unitMaterial.url == '' || !this.unitMaterial.url) {
|
|
|
- // msgList.push('申报单位承诺意见')
|
|
|
- // isNull = true
|
|
|
- // }
|
|
|
- // if (isNull) {
|
|
|
- // this.msg.create('error', `请上传完整 ${msgList.join()}`)
|
|
|
- // }
|
|
|
return isNull
|
|
|
}
|
|
|
|
|
@@ -260,9 +236,6 @@ export class AttachmentComponent implements OnInit {
|
|
|
expertOpinion: this.expertOpinion,
|
|
|
evidence: this.evidence,
|
|
|
moreMaterial: this.moreMaterial,
|
|
|
- // examine: this.examine,
|
|
|
- // authorList:this.authorList
|
|
|
- // unitMaterial: this.unitMaterial,
|
|
|
}
|
|
|
|
|
|
let isPageNull = this.examineNull()//检查本页空项
|
|
@@ -343,11 +316,8 @@ export class AttachmentComponent implements OnInit {
|
|
|
this.eduTextbook?.set('cipProveFile', params.cipProveFile || null);
|
|
|
// params.moreMaterial &&
|
|
|
this.eduTextbook?.set('moreMaterial', params.moreMaterial || null);
|
|
|
- // params.examine &&
|
|
|
- // this.eduTextbook?.set('examine', params.examine);
|
|
|
this.eduTextbook?.set('copyrightImgUrl', params.copyrightImgUrl || null);
|
|
|
this.eduTextbook?.set('CIPImgUrl', params.CIPImgUrl || null);
|
|
|
- // this.eduTextbook?.set('authorList', params.authorList);
|
|
|
await this.eduTextbook?.save();
|
|
|
this.saveLoading = false;
|
|
|
if (!isComplete) {
|
|
@@ -374,13 +344,10 @@ export class AttachmentComponent implements OnInit {
|
|
|
this[type].name = file?.name
|
|
|
} else if (type == 'moreMaterial' || type == 'cipProveFile') {
|
|
|
this[type] = e
|
|
|
- }else if (type == 'signature' || type == 'examine') {
|
|
|
- this.authorList[index][type] = file?.url
|
|
|
}
|
|
|
// else if(type == 'cipProveFile'){
|
|
|
// this[type] = [ { name: file.name, url: file.url }]
|
|
|
// }
|
|
|
- // console.log(this.authorList)
|
|
|
}
|
|
|
|
|
|
|
|
@@ -412,83 +379,4 @@ export class AttachmentComponent implements OnInit {
|
|
|
console.log(url);
|
|
|
window.open(url)
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- /**作者信息 */
|
|
|
- authorList:Array<any>=[]
|
|
|
-
|
|
|
- //添加作者信息
|
|
|
- onPush(type: string, idx: number) {
|
|
|
- switch (type) {
|
|
|
- case 'authorList':
|
|
|
- if (this.authorList?.length >= 6) {
|
|
|
- this.msg.warning('最多添加6条');
|
|
|
- break;
|
|
|
- }
|
|
|
- this.authorList.splice(idx + 1, 0, {
|
|
|
- name: '',
|
|
|
- unit: '',
|
|
|
- birth: '',
|
|
|
- nationality: '',
|
|
|
- job: '',
|
|
|
- title: '',
|
|
|
- mobile: '',
|
|
|
- email: '',
|
|
|
- work: '',
|
|
|
- // signature: '',
|
|
|
- examine: '',
|
|
|
- });
|
|
|
- break;
|
|
|
- // case 'achievementOptions':
|
|
|
- // if (this.achievementOptions.length >= 5) {
|
|
|
- // this.msg.warning('最多添加5条');
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // this.achievementOptions.splice(idx + 1, 0, {
|
|
|
- // name: '',
|
|
|
- // unit: '',
|
|
|
- // date: '',
|
|
|
- // });
|
|
|
- // break;
|
|
|
- }
|
|
|
- }
|
|
|
- //删除作者信息
|
|
|
- onDel(type: string, idx: number) {
|
|
|
- switch (type) {
|
|
|
- case 'authorList':
|
|
|
- if (this.authorList.length == 1) {
|
|
|
- this.authorList = [
|
|
|
- {
|
|
|
- name: '',
|
|
|
- unit: '',
|
|
|
- birth: '',
|
|
|
- nationality: '',
|
|
|
- job: '',
|
|
|
- title: '',
|
|
|
- mobile: '',
|
|
|
- email: '',
|
|
|
- work: '',
|
|
|
- // signature: '',
|
|
|
- examine: '',
|
|
|
- },
|
|
|
- ];
|
|
|
- return;
|
|
|
- }
|
|
|
- this.authorList.splice(idx, 1);
|
|
|
- break;
|
|
|
- // case 'achievementOptions':
|
|
|
- // if (this.achievementOptions.length == 1) {
|
|
|
- // this.achievementOptions = [
|
|
|
- // {
|
|
|
- // name: '',
|
|
|
- // unit: '',
|
|
|
- // date: '',
|
|
|
- // },
|
|
|
- // ];
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // this.achievementOptions.splice(idx, 1);
|
|
|
- // break;
|
|
|
- }
|
|
|
- }
|
|
|
}
|