|
@@ -11,6 +11,8 @@ import { NzUploadChangeParam } from 'ng-zorro-antd/upload';
|
|
|
import { NzUploadModule } from 'ng-zorro-antd/upload';
|
|
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
|
|
import Parse from 'parse';
|
|
|
+import { CompUploadComponent } from '../../../../app/comp-upload/comp-upload.component';
|
|
|
+
|
|
|
import {
|
|
|
FormControl,
|
|
|
FormGroup,
|
|
@@ -38,6 +40,7 @@ import { textbookServer } from '../../../../services/textbook';
|
|
|
NzCheckboxModule,
|
|
|
NzTableModule,
|
|
|
NzUploadModule,
|
|
|
+ CompUploadComponent,
|
|
|
],
|
|
|
standalone: true,
|
|
|
templateUrl: './attachment.component.html',
|
|
@@ -63,26 +66,28 @@ export class AttachmentComponent implements OnInit {
|
|
|
};
|
|
|
|
|
|
validateForm: FormGroup<{
|
|
|
- textbookTypes: FormControl<Array<string> | any>; //教材电子版
|
|
|
- textbookFiles: FormControl<Array<string> | any>; //上传教材文件
|
|
|
- links: FormControl<string>; //教材数字内容链接地址、账号
|
|
|
+ // textbookTypes: FormControl<Array<string> | any>; //教材电子版
|
|
|
+ // textbookFiles: FormControl<Array<string> | any>; //上传教材文件
|
|
|
+ // links: FormControl<string>; //教材数字内容链接地址、账号
|
|
|
selfResults: FormControl<object | any>; //图书编校质量自查结果记录表
|
|
|
expertOpinion: FormControl<object | any>; //专家审核意见表
|
|
|
evidence: FormControl<object | any>; //教材使用情况证明材料
|
|
|
moreMaterial: FormControl<Array<any> | any>; //其他材料
|
|
|
unitMaterial: FormControl<object | any>; //申报单位承诺意见材料
|
|
|
- accept: FormControl<string>; //填写诚信承诺
|
|
|
+ // accept: FormControl<string>; //填写诚信承诺
|
|
|
+ copyrightImgUrl: FormControl<string>; //版权页截图
|
|
|
+ CIPImgUrl: FormControl<string>; //中国版本图书馆CIP查询截图
|
|
|
}> = this.fb.group({
|
|
|
- textbookTypes: [''],
|
|
|
- textbookFiles: [
|
|
|
- [
|
|
|
- {
|
|
|
- url: 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf',
|
|
|
- },
|
|
|
- ],
|
|
|
- [Validators.required]
|
|
|
- ],
|
|
|
- links: ['', [Validators.required]],
|
|
|
+ // textbookTypes: [''],
|
|
|
+ // textbookFiles: [
|
|
|
+ // [
|
|
|
+ // {
|
|
|
+ // url: 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf',
|
|
|
+ // },
|
|
|
+ // ],
|
|
|
+ // [Validators.required]
|
|
|
+ // ],
|
|
|
+ // links: ['', [Validators.required]],
|
|
|
selfResults: [
|
|
|
{
|
|
|
name: '自查表.pdf',
|
|
@@ -123,67 +128,69 @@ export class AttachmentComponent implements OnInit {
|
|
|
},
|
|
|
[Validators.required]
|
|
|
],
|
|
|
- accept: ['', [Validators.required, this.confirmationValidator]],
|
|
|
+ // accept: ['', [Validators.required, this.confirmationValidator]],
|
|
|
+ copyrightImgUrl: [''],
|
|
|
+ CIPImgUrl: [''],
|
|
|
});
|
|
|
checkOptionsOne = [
|
|
|
{ label: '纸质教材', value: '纸质教材', checked: true },
|
|
|
{ label: '电子教材 / 资源', value: '电子教材 / 资源', checked: true },
|
|
|
];
|
|
|
- //所有作者政治审查意见
|
|
|
- opinions: Array<opinionType> = [
|
|
|
- {
|
|
|
- name: '', //作者
|
|
|
- unit: '', //单位
|
|
|
- birth: '', //出生年月
|
|
|
- nationality: '', //国籍
|
|
|
- reviewFile: {
|
|
|
- name: '自查表.pdf',
|
|
|
- url: 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf',
|
|
|
- }, //作者政治审查表/作者签名
|
|
|
- },
|
|
|
- ];
|
|
|
- //所有作者签名
|
|
|
- authorSign: Array<opinionType> = [
|
|
|
- {
|
|
|
- name: '', //作者
|
|
|
- unit: '', //单位
|
|
|
- birth: '', //出生年月
|
|
|
- nationality: '', //国籍
|
|
|
- reviewFile: {
|
|
|
- name: '审查表.pdf',
|
|
|
- url: 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf',
|
|
|
- }, //作者政治审查表/作者签名
|
|
|
- },
|
|
|
- ];
|
|
|
+ // //所有作者政治审查意见
|
|
|
+ // opinions: Array<opinionType> = [
|
|
|
+ // {
|
|
|
+ // name: '', //作者
|
|
|
+ // unit: '', //单位
|
|
|
+ // birth: '', //出生年月
|
|
|
+ // nationality: '', //国籍
|
|
|
+ // reviewFile: {
|
|
|
+ // name: '自查表.pdf',
|
|
|
+ // url: 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf',
|
|
|
+ // }, //作者政治审查表/作者签名
|
|
|
+ // },
|
|
|
+ // ];
|
|
|
+ // //所有作者签名
|
|
|
+ // authorSign: Array<opinionType> = [
|
|
|
+ // {
|
|
|
+ // name: '', //作者
|
|
|
+ // unit: '', //单位
|
|
|
+ // birth: '', //出生年月
|
|
|
+ // nationality: '', //国籍
|
|
|
+ // reviewFile: {
|
|
|
+ // name: '审查表.pdf',
|
|
|
+ // url: 'https://www.jyvtc.edu.cn/yssj/resource/cms/2022/01/2022010610314324023.pdf',
|
|
|
+ // }, //作者政治审查表/作者签名
|
|
|
+ // },
|
|
|
+ // ];
|
|
|
constructor(
|
|
|
public tbookSer: textbookServer,
|
|
|
private fb: NonNullableFormBuilder,
|
|
|
private msg: NzMessageService,
|
|
|
private modal: NzModalService
|
|
|
- ) {}
|
|
|
- ngOnInit() {
|
|
|
+ ) { }
|
|
|
+ ngOnInit() {
|
|
|
if (this.eduTextbook.id) {
|
|
|
this.validateForm = this.fb.group({
|
|
|
- textbookTypes: [
|
|
|
- this.eduTextbook.get('textbookTypes'),
|
|
|
- ],
|
|
|
- textbookFiles: [
|
|
|
- this.eduTextbook.get('textbookFiles') ||
|
|
|
- this.validateForm.value.textbookFiles,
|
|
|
- [Validators.required]
|
|
|
- ],
|
|
|
- links: [
|
|
|
- this.eduTextbook.get('links')?.join('\n') || '',
|
|
|
- [Validators.required]
|
|
|
- ],
|
|
|
+ // textbookTypes: [
|
|
|
+ // this.eduTextbook.get('textbookTypes'),
|
|
|
+ // ],
|
|
|
+ // textbookFiles: [
|
|
|
+ // this.eduTextbook.get('textbookFiles') ||
|
|
|
+ // this.validateForm.value.textbookFiles,
|
|
|
+ // [Validators.required]
|
|
|
+ // ],
|
|
|
+ // links: [
|
|
|
+ // this.eduTextbook.get('links')?.join('\n') || '',
|
|
|
+ // [Validators.required]
|
|
|
+ // ],
|
|
|
selfResults: [
|
|
|
this.eduTextbook.get('selfResults') ||
|
|
|
- this.validateForm.value.selfResults,
|
|
|
+ this.validateForm.value.selfResults,
|
|
|
[Validators.required]
|
|
|
],
|
|
|
expertOpinion: [
|
|
|
this.eduTextbook.get('expertOpinion') ||
|
|
|
- this.validateForm.value.expertOpinion,
|
|
|
+ this.validateForm.value.expertOpinion,
|
|
|
[Validators.required]
|
|
|
],
|
|
|
evidence: [
|
|
@@ -193,16 +200,24 @@ export class AttachmentComponent implements OnInit {
|
|
|
moreMaterial: [''],
|
|
|
unitMaterial: [
|
|
|
this.eduTextbook.get('unitMaterial') ||
|
|
|
- this.validateForm.value.unitMaterial,
|
|
|
+ this.validateForm.value.unitMaterial,
|
|
|
[Validators.required]
|
|
|
],
|
|
|
- accept: [
|
|
|
- this.eduTextbook.get('accept') || '',
|
|
|
- [Validators.required, this.confirmationValidator]
|
|
|
+ // accept: [
|
|
|
+ // this.eduTextbook.get('accept') || '',
|
|
|
+ // [Validators.required, this.confirmationValidator]
|
|
|
+ // ],
|
|
|
+ copyrightImgUrl: [
|
|
|
+ this.eduTextbook.get('copyrightImgUrl') || '',
|
|
|
+ [Validators.required]
|
|
|
+ ],
|
|
|
+ CIPImgUrl: [
|
|
|
+ this.eduTextbook.get('CIPImgUrl') || '',
|
|
|
+ [Validators.required]
|
|
|
],
|
|
|
});
|
|
|
- this.opinions = this.eduTextbook.get('opinions') || this.opinions
|
|
|
- this.authorSign = this.eduTextbook.get('authorSign') || this.authorSign
|
|
|
+ // this.opinions = this.eduTextbook.get('opinions') || this.opinions
|
|
|
+ // this.authorSign = this.eduTextbook.get('authorSign') || this.authorSign
|
|
|
}
|
|
|
}
|
|
|
async submitForm(event?: string): Promise<void> {
|
|
@@ -211,36 +226,56 @@ export class AttachmentComponent implements OnInit {
|
|
|
return;
|
|
|
}
|
|
|
console.log(this.validateForm.value);
|
|
|
- let opinionsVrifly = !this.opinions.some((item) =>
|
|
|
- Object.values(item).some((val) => val == '' || val == undefined)
|
|
|
- );
|
|
|
- let authorSignVrifly = !this.authorSign.some((item) =>
|
|
|
- Object.values(item).some((val) => val == '' || val == undefined)
|
|
|
- );
|
|
|
+ // let opinionsVrifly = !this.opinions.some((item) =>
|
|
|
+ // Object.values(item).some((val) => val == '' || val == undefined)
|
|
|
+ // );
|
|
|
+ // let authorSignVrifly = !this.authorSign.some((item) =>
|
|
|
+ // Object.values(item).some((val) => val == '' || val == undefined)
|
|
|
+ // );
|
|
|
let params: any = this.validateForm.value;
|
|
|
+ console.log(this.validateForm)
|
|
|
if (this.validateForm.valid) {
|
|
|
console.log(this.validateForm.value);
|
|
|
if (event == 'complete') {
|
|
|
- if (!opinionsVrifly) {
|
|
|
- this.msg.warning('所有作者政治审查意见填写不完整');
|
|
|
- return;
|
|
|
- }
|
|
|
- if (!authorSignVrifly) {
|
|
|
- this.msg.warning('上传所有作者签名填写不完整');
|
|
|
- return;
|
|
|
- }
|
|
|
+ // if (!opinionsVrifly) {
|
|
|
+ // this.msg.warning('所有作者政治审查意见填写不完整');
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // if (!authorSignVrifly) {
|
|
|
+ // this.msg.warning('上传所有作者签名填写不完整');
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
await this.saveEduTextbook(params, true);
|
|
|
let textBookJson = this.eduTextbook.toJSON()
|
|
|
- let ignoreFiled = ['typeNumber','importantProjectOther','createdAt','updatedAt'] //非必填字段
|
|
|
+ let ignoreFiled = [
|
|
|
+ 'typeNumber',
|
|
|
+ 'editionNumber',
|
|
|
+ 'importantProjectOther',
|
|
|
+ 'textbookFiles',
|
|
|
+ 'createdAt',
|
|
|
+ 'updatedAt',
|
|
|
+ 'copyright',
|
|
|
+ 'authorSign',
|
|
|
+ 'CIP',
|
|
|
+ 'isDeleted',
|
|
|
+ 'opinions',
|
|
|
+ 'printNumber',
|
|
|
+ 'printSum',
|
|
|
+ 'render',
|
|
|
+ 'importantProject',
|
|
|
+ 'importantProjectOther',
|
|
|
+ 'complete',
|
|
|
+ 'links','recommend','printSun','discard','edition','eduProcess'
|
|
|
+ ] //非必填字段
|
|
|
console.log(textBookJson);
|
|
|
- let isVrifly = Object.keys(textBookJson).some((item:string)=>{
|
|
|
- if(!ignoreFiled.includes(item) && (textBookJson[item] === '' || textBookJson[item] === undefined || textBookJson[item] === null)){
|
|
|
- console.warn('字段未填写:'+item);
|
|
|
+ let isVrifly = Object.keys(textBookJson).some((item: string) => {
|
|
|
+ if (!ignoreFiled.includes(item) && (textBookJson[item] === '' || textBookJson[item] === undefined || textBookJson[item] === null)) {
|
|
|
+ console.warn('字段未填写:' + item);
|
|
|
return true
|
|
|
}
|
|
|
return
|
|
|
})
|
|
|
- if(isVrifly){
|
|
|
+ if (isVrifly) {
|
|
|
this.msg.warning('存在未填项')
|
|
|
return
|
|
|
}
|
|
@@ -252,7 +287,8 @@ export class AttachmentComponent implements OnInit {
|
|
|
}
|
|
|
} else {
|
|
|
if (event == 'save') {
|
|
|
- await this.saveEduTextbook(params, this.validateForm.valid && opinionsVrifly && authorSignVrifly);
|
|
|
+ // await this.saveEduTextbook(params, this.validateForm.valid && opinionsVrifly && authorSignVrifly);
|
|
|
+ await this.saveEduTextbook(params, this.validateForm.valid);
|
|
|
this.modal.success({
|
|
|
nzTitle: '保存成功',
|
|
|
nzContent: '<p>已保存并且至空间</p>',
|
|
@@ -260,16 +296,62 @@ export class AttachmentComponent implements OnInit {
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
- Object.values(this.validateForm.controls).forEach((control) => {
|
|
|
- if (control.invalid) {
|
|
|
- control.markAsDirty();
|
|
|
- control.updateValueAndValidity({ onlySelf: true });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ console.log(this.validateForm.value);
|
|
|
+ if (event == 'complete') {
|
|
|
+ await this.saveEduTextbook(params, true);
|
|
|
+ let textBookJson = this.eduTextbook.toJSON()
|
|
|
+ let ignoreFiled = ['typeNumber', 'importantProjectOther', 'createdAt', 'updatedAt'] //非必填字段
|
|
|
+ console.log(textBookJson);
|
|
|
+ let isVrifly = Object.keys(textBookJson).some((item: string) => {
|
|
|
+ if (!ignoreFiled.includes(item) && (textBookJson[item] === '' || textBookJson[item] === undefined || textBookJson[item] === null)) {
|
|
|
+ console.warn('字段未填写:' + item);
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return
|
|
|
+ })
|
|
|
+ if (isVrifly) {
|
|
|
+ this.msg.warning('存在未填项')
|
|
|
+ return
|
|
|
}
|
|
|
- });
|
|
|
- this.msg.warning('请填写完整信息');
|
|
|
+ this.state.emit({ type: 'complete', textBook: this.eduTextbook });
|
|
|
+ this.eduTextbook.set('complete', true)
|
|
|
+ this.eduTextbook.set('status', '102')
|
|
|
+ await this.eduTextbook.save()
|
|
|
+ this.msg.success('已填写完成')
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // Object.values(this.validateForm.controls).forEach((control) => {
|
|
|
+ // if (control.invalid) {
|
|
|
+ // control.markAsDirty();
|
|
|
+ // control.updateValueAndValidity({ onlySelf: true });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // this.msg.warning('请填写完整信息');
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
if (event == 'save') {
|
|
|
- await this.saveEduTextbook(params, this.validateForm.valid && opinionsVrifly && authorSignVrifly);
|
|
|
+ // await this.saveEduTextbook(params, this.validateForm.valid && opinionsVrifly && authorSignVrifly);
|
|
|
+ await this.saveEduTextbook(params, this.validateForm.valid);
|
|
|
this.modal.success({
|
|
|
nzTitle: '您已填写完成',
|
|
|
nzContent: '<p>已保存并且至空间</p>',
|
|
@@ -277,66 +359,66 @@ export class AttachmentComponent implements OnInit {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
- changeCode() {}
|
|
|
- getCode(e: any) {}
|
|
|
- //添加作者信息
|
|
|
- onPush(type: string, idx: number) {
|
|
|
- switch (type) {
|
|
|
- case 'opinions':
|
|
|
- this.opinions.splice(idx + 1, 0, {
|
|
|
- name: '', //作者
|
|
|
- unit: '', //单位
|
|
|
- birth: '', //出生年月
|
|
|
- nationality: '', //国籍
|
|
|
- reviewFile: '', //作者政治审查表/作者签名
|
|
|
- });
|
|
|
- break;
|
|
|
- case 'authorSign':
|
|
|
- this.authorSign.splice(idx + 1, 0, {
|
|
|
- name: '', //作者
|
|
|
- unit: '', //单位
|
|
|
- birth: '', //出生年月
|
|
|
- nationality: '', //国籍
|
|
|
- reviewFile: '', //作者政治审查表/作者签名
|
|
|
- });
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- //删除作者信息
|
|
|
- onDel(type: string, idx: number) {
|
|
|
- switch (type) {
|
|
|
- case 'opinions':
|
|
|
- if (this.opinions.length <= 1) {
|
|
|
- this.opinions = [
|
|
|
- {
|
|
|
- name: '', //作者
|
|
|
- unit: '', //单位
|
|
|
- birth: '', //出生年月
|
|
|
- nationality: '', //国籍
|
|
|
- reviewFile: '', //作者政治审查表/作者签名
|
|
|
- },
|
|
|
- ];
|
|
|
- return;
|
|
|
- }
|
|
|
- this.opinions.splice(idx, 1);
|
|
|
- break;
|
|
|
- case 'authorSign':
|
|
|
- if (this.authorSign.length <= 1) {
|
|
|
- this.authorSign = [
|
|
|
- {
|
|
|
- name: '', //作者
|
|
|
- unit: '', //单位
|
|
|
- birth: '', //出生年月
|
|
|
- nationality: '', //国籍
|
|
|
- reviewFile: '', //作者政治审查表/作者签名
|
|
|
- },
|
|
|
- ];
|
|
|
- return;
|
|
|
- }
|
|
|
- this.authorSign.splice(idx, 1);
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
+ changeCode() { }
|
|
|
+ getCode(e: any) { }
|
|
|
+ // //添加作者信息
|
|
|
+ // onPush(type: string, idx: number) {
|
|
|
+ // switch (type) {
|
|
|
+ // case 'opinions':
|
|
|
+ // this.opinions.splice(idx + 1, 0, {
|
|
|
+ // name: '', //作者
|
|
|
+ // unit: '', //单位
|
|
|
+ // birth: '', //出生年月
|
|
|
+ // nationality: '', //国籍
|
|
|
+ // reviewFile: '', //作者政治审查表/作者签名
|
|
|
+ // });
|
|
|
+ // break;
|
|
|
+ // case 'authorSign':
|
|
|
+ // this.authorSign.splice(idx + 1, 0, {
|
|
|
+ // name: '', //作者
|
|
|
+ // unit: '', //单位
|
|
|
+ // birth: '', //出生年月
|
|
|
+ // nationality: '', //国籍
|
|
|
+ // reviewFile: '', //作者政治审查表/作者签名
|
|
|
+ // });
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // //删除作者信息
|
|
|
+ // onDel(type: string, idx: number) {
|
|
|
+ // switch (type) {
|
|
|
+ // case 'opinions':
|
|
|
+ // if (this.opinions.length <= 1) {
|
|
|
+ // this.opinions = [
|
|
|
+ // {
|
|
|
+ // name: '', //作者
|
|
|
+ // unit: '', //单位
|
|
|
+ // birth: '', //出生年月
|
|
|
+ // nationality: '', //国籍
|
|
|
+ // reviewFile: '', //作者政治审查表/作者签名
|
|
|
+ // },
|
|
|
+ // ];
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // this.opinions.splice(idx, 1);
|
|
|
+ // break;
|
|
|
+ // case 'authorSign':
|
|
|
+ // if (this.authorSign.length <= 1) {
|
|
|
+ // this.authorSign = [
|
|
|
+ // {
|
|
|
+ // name: '', //作者
|
|
|
+ // unit: '', //单位
|
|
|
+ // birth: '', //出生年月
|
|
|
+ // nationality: '', //国籍
|
|
|
+ // reviewFile: '', //作者政治审查表/作者签名
|
|
|
+ // },
|
|
|
+ // ];
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // this.authorSign.splice(idx, 1);
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
handleChange(info: NzUploadChangeParam): void {
|
|
|
if (info.file.status !== 'uploading') {
|
|
|
console.log(info.file, info.fileList);
|
|
@@ -366,12 +448,12 @@ export class AttachmentComponent implements OnInit {
|
|
|
className: 'Company',
|
|
|
objectId: this.tbookSer.company,
|
|
|
});
|
|
|
- params.textbookTypes &&
|
|
|
- this.eduTextbook?.set('textbookTypes', params.textbookTypes);
|
|
|
- params.textbookFiles &&
|
|
|
- this.eduTextbook?.set('textbookFiles', params.textbookFiles);
|
|
|
- let links = params.links.split(/[(\r\n)\r\n]+/);
|
|
|
- links && this.eduTextbook?.set('links', links);
|
|
|
+ // params.textbookTypes &&
|
|
|
+ // this.eduTextbook?.set('textbookTypes', params.textbookTypes);
|
|
|
+ // params.textbookFiles &&
|
|
|
+ // this.eduTextbook?.set('textbookFiles', params.textbookFiles);
|
|
|
+ // let links = params.links.split(/[(\r\n)\r\n]+/);
|
|
|
+ // links && this.eduTextbook?.set('links', links);
|
|
|
params.selfResults &&
|
|
|
this.eduTextbook?.set('selfResults', params.selfResults);
|
|
|
params.unitMaterial &&
|
|
@@ -381,10 +463,27 @@ export class AttachmentComponent implements OnInit {
|
|
|
params.evidence && this.eduTextbook?.set('evidence', params.evidence);
|
|
|
params.moreMaterial &&
|
|
|
this.eduTextbook?.set('moreMaterial', params.moreMaterial);
|
|
|
- params.accept && this.eduTextbook?.set('accept', params.accept);
|
|
|
- this.opinions && this.eduTextbook?.set('opinions', this.opinions);
|
|
|
- this.authorSign && this.eduTextbook?.set('authorSign', this.authorSign);
|
|
|
+ // params.accept && this.eduTextbook?.set('accept', params.accept);
|
|
|
+ this.eduTextbook?.set('copyrightImgUrl', params.copyrightImgUrl);
|
|
|
+ this.eduTextbook?.set('CIPImgUrl', params.CIPImgUrl);
|
|
|
+ // this.opinions && this.eduTextbook?.set('opinions', this.opinions);
|
|
|
+ // this.authorSign && this.eduTextbook?.set('authorSign', this.authorSign);
|
|
|
await this.eduTextbook?.save();
|
|
|
return;
|
|
|
}
|
|
|
+ upload(e: any, type: string) {
|
|
|
+ console.log(e);
|
|
|
+ let file = e[0];
|
|
|
+ if (type == 'copyrightImgUrl' || type == 'CIPImgUrl') {
|
|
|
+ this.validateForm.value[type] = file
|
|
|
+ }else if(type == 'moreMaterial'){
|
|
|
+ this.validateForm.value[type]=e
|
|
|
+
|
|
|
+ // if(this.validateForm.value[type]){
|
|
|
+ // this.validateForm.value[type].push(file)
|
|
|
+ // }else{
|
|
|
+ // this.validateForm.value[type]=[file]
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|