|
@@ -239,25 +239,18 @@ export class BasicInComponent implements OnInit {
|
|
|
this.msg.error('保存出错');
|
|
|
}
|
|
|
}
|
|
|
+ singleId: string = '';
|
|
|
+ loading = false;
|
|
|
/**扩展表记录 */
|
|
|
eduTextbookVolumeList: Array<any> = [];
|
|
|
/**获取扩展表记录 */
|
|
|
async getEduTextbookVolumeList() {
|
|
|
+ this.loading = true;
|
|
|
+ this.saveLoading = true
|
|
|
if (this.typeNumber && this.typeNumber > 12) {
|
|
|
this.typeNumber = 12;
|
|
|
}
|
|
|
- console.log(this.validateForm?.value?.type, this.typeNumber);
|
|
|
- // let query = new Parse.Query('EduTextbookVolume')
|
|
|
- // query.equalTo('eduTextbook', this.eduTextbook?.id)
|
|
|
- // // query.equalTo()
|
|
|
- // query.select('objectId')
|
|
|
- // query.ascending('createdAt')//小到大
|
|
|
- // query.notEqualTo('isDeleted', true)
|
|
|
- // if (this.validateForm?.value?.type == '全册') {
|
|
|
- // query.limit(this.typeNumber)
|
|
|
- // } else {
|
|
|
- // query.limit(1)
|
|
|
- // }
|
|
|
+ // console.log(this.validateForm?.value?.type, this.typeNumber);
|
|
|
let query = new Parse.Query('EduTextbook');
|
|
|
query.equalTo('objectId', this.eduTextbook?.id);
|
|
|
query.select('childrens');
|
|
@@ -274,20 +267,19 @@ export class BasicInComponent implements OnInit {
|
|
|
}
|
|
|
}
|
|
|
list.forEach((item: any, index: number) => {
|
|
|
- console.log(item);
|
|
|
+ // console.log(item);
|
|
|
this.eduTextbookVolumeList[index] = item;
|
|
|
});
|
|
|
} else {
|
|
|
this.singleId = list[0]?.id;
|
|
|
}
|
|
|
+ this.loading = false;
|
|
|
+ this.saveLoading = false
|
|
|
}
|
|
|
- singleId: string = '';
|
|
|
- loading = false;
|
|
|
+
|
|
|
async checkSingle() {
|
|
|
- this.loading = true;
|
|
|
this.validateForm.get('type')?.setValue('单本');
|
|
|
await this.getEduTextbookVolumeList();
|
|
|
- this.loading = false;
|
|
|
}
|
|
|
/**申报类型选择全册 */
|
|
|
async checkAll() {
|
|
@@ -570,13 +562,15 @@ export class BasicInComponent implements OnInit {
|
|
|
// importantProjectOther: [this.eduTextbook?.get('importantProjectOther') || ''],
|
|
|
// unitType: [this.eduTextbook?.get('unitType') || '', [Validators.required]],
|
|
|
});
|
|
|
+ this.eduTextbookId = this.eduTextbook?.id;
|
|
|
+ this.getEduTextbookVolumeList();
|
|
|
}
|
|
|
|
|
|
ngAfterViewInit() {
|
|
|
- this.eduTextbookId = this.eduTextbook?.id;
|
|
|
- this.accordion?.openAll();
|
|
|
- this.cdr.detectChanges();
|
|
|
- this.getEduTextbookVolumeList();
|
|
|
+ // this.eduTextbookId = this.eduTextbook?.id;
|
|
|
+ // this.accordion?.openAll();
|
|
|
+ // this.cdr.detectChanges();
|
|
|
+ // this.getEduTextbookVolumeList();
|
|
|
}
|
|
|
addVolume() {
|
|
|
if (this.eduTextbookVolumeList.length >= 12) {
|