|
@@ -21,6 +21,22 @@ import { NzInputModule } from 'ng-zorro-antd/input';
|
|
import * as major from '../../../../services/majors4.map'
|
|
import * as major from '../../../../services/majors4.map'
|
|
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
|
|
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
|
|
|
|
|
|
|
|
+import { BasicComponent } from '../create/basic/basic.component';
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+import { ChangeDetectorRef } from '@angular/core';
|
|
|
|
+import { ViewChild } from '@angular/core';
|
|
|
|
+import { MatAccordion, MatExpansionModule } from '@angular/material/expansion';
|
|
|
|
+import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
|
|
+import { MatInputModule } from '@angular/material/input';
|
|
|
|
+import { MatFormFieldModule } from '@angular/material/form-field';
|
|
|
|
+import { MatIconModule } from '@angular/material/icon';
|
|
|
|
+import { MatButtonModule } from '@angular/material/button';
|
|
|
|
+import { provideNativeDateAdapter } from '@angular/material/core';
|
|
|
|
+
|
|
|
|
+
|
|
@Component({
|
|
@Component({
|
|
selector: 'app-basic',
|
|
selector: 'app-basic',
|
|
imports: [
|
|
imports: [
|
|
@@ -32,38 +48,57 @@ import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
|
|
NzInputModule,
|
|
NzInputModule,
|
|
NzTagModule,
|
|
NzTagModule,
|
|
CompUploadComponent,
|
|
CompUploadComponent,
|
|
- NzCheckboxModule
|
|
|
|
|
|
+ NzCheckboxModule,
|
|
|
|
+ BasicComponent,
|
|
|
|
+ MatButtonModule,
|
|
|
|
+ MatExpansionModule,
|
|
|
|
+ MatIconModule,
|
|
|
|
+ MatFormFieldModule,
|
|
|
|
+ MatInputModule,
|
|
|
|
+ MatDatepickerModule,
|
|
],
|
|
],
|
|
standalone: true,
|
|
standalone: true,
|
|
templateUrl: './basic-in.component.html',
|
|
templateUrl: './basic-in.component.html',
|
|
styleUrls: ['./basic-in.component.scss'],
|
|
styleUrls: ['./basic-in.component.scss'],
|
|
|
|
+ providers: [provideNativeDateAdapter()],
|
|
|
|
+
|
|
})
|
|
})
|
|
export class BasicInComponent implements OnInit {
|
|
export class BasicInComponent implements OnInit {
|
|
- @Input('eduTextbook') eduTextbook: Parse.Object|any;
|
|
|
|
|
|
+ @Input('eduTextbook') eduTextbook: Parse.Object | any;
|
|
@Input('editFrom') editFrom: any;
|
|
@Input('editFrom') editFrom: any;
|
|
@Output() state: EventEmitter<any> = new EventEmitter<any>();
|
|
@Output() state: EventEmitter<any> = new EventEmitter<any>();
|
|
@Output() save: EventEmitter<any> = new EventEmitter<any>();
|
|
@Output() save: EventEmitter<any> = new EventEmitter<any>();
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
+ @ViewChild(MatAccordion) accordion: MatAccordion | any;
|
|
|
|
+
|
|
|
|
+ ngAfterViewInit() {
|
|
|
|
+ this.accordion?.openAll()
|
|
|
|
+ this.cdr.detectChanges()
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
changeCode() { }
|
|
changeCode() { }
|
|
getCode(e: any) { }
|
|
getCode(e: any) { }
|
|
|
|
|
|
-/***教材获批截图 */
|
|
|
|
- approvedImgList:Array<any>=[{
|
|
|
|
- name:'获批截图',
|
|
|
|
- status:'done',
|
|
|
|
- url:''
|
|
|
|
|
|
+ /***教材获批截图 */
|
|
|
|
+ approvedImgList: Array<any> = [{
|
|
|
|
+ name: '获批截图',
|
|
|
|
+ status: 'done',
|
|
|
|
+ url: ''
|
|
}]
|
|
}]
|
|
/**
|
|
/**
|
|
* 书号自动补全函数
|
|
* 书号自动补全函数
|
|
* @param isbn 书号
|
|
* @param isbn 书号
|
|
*/
|
|
*/
|
|
- async autoCompleteByISBN(){
|
|
|
|
|
|
+ async autoCompleteByISBN() {
|
|
let isbn = this.validateForm.value?.ISBN;
|
|
let isbn = this.validateForm.value?.ISBN;
|
|
- let result = await Parse.Cloud.run("tbookISBN",{
|
|
|
|
- isbn:isbn
|
|
|
|
|
|
+ let result = await Parse.Cloud.run("tbookISBN", {
|
|
|
|
+ isbn: isbn
|
|
})
|
|
})
|
|
- if(!result?.isbn){
|
|
|
|
|
|
+ if (!result?.isbn) {
|
|
this.msg.warning('未找到该书号的图书信息,请手动填写')
|
|
this.msg.warning('未找到该书号的图书信息,请手动填写')
|
|
}
|
|
}
|
|
|
|
|
|
@@ -76,27 +111,40 @@ export class BasicInComponent implements OnInit {
|
|
this.validateForm.get("editionUnit")?.setValue(result?.publisher)
|
|
this.validateForm.get("editionUnit")?.setValue(result?.publisher)
|
|
this.validateForm.get("editionDate")?.setValue(new Date(result?.publish_time))
|
|
this.validateForm.get("editionDate")?.setValue(new Date(result?.publish_time))
|
|
this.validateForm.get("carrierShape")?.setValue(result?.publication_class)
|
|
this.validateForm.get("carrierShape")?.setValue(result?.publication_class)
|
|
-
|
|
|
|
|
|
+
|
|
console.log(result)
|
|
console.log(result)
|
|
}
|
|
}
|
|
/**出版时间及版次不可选择时间 */
|
|
/**出版时间及版次不可选择时间 */
|
|
- disabledEditionDate=(current:Date):boolean=>{
|
|
|
|
- return current< new Date(2022,11,1)
|
|
|
|
|
|
+ disabledEditionDate = (current: Date): boolean => {
|
|
|
|
+ return current < new Date(2022, 11, 1)
|
|
}
|
|
}
|
|
- /** 全册次数*/
|
|
|
|
- typeNumber:number=2
|
|
|
|
- typeNumberChange(){
|
|
|
|
- if(this.typeNumber<2){
|
|
|
|
- this.msg.create('warning','不得小于两册')
|
|
|
|
- this.typeNumber=2
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**扩展表记录 */
|
|
|
|
+ eduTextbookVolumeValidList: Array<any> = []
|
|
|
|
+ /** 全册次数*/
|
|
|
|
+ typeNumber: number = 2
|
|
|
|
+ typeNumberChange() {
|
|
|
|
+ if (this.typeNumber < 2) {
|
|
|
|
+ this.msg.create('warning', '不得小于两册')
|
|
|
|
+ this.typeNumber = 2
|
|
|
|
+ } else {
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
+ this.eduTextbookVolumeValidList = []
|
|
|
|
+ // for (let i = 1; i++; i <= this.typeNumber) {
|
|
|
|
+ // this.eduTextbookVolumeValidList.push(false)
|
|
|
|
+ // }
|
|
|
|
+ this.eduTextbookVolumeValidList=new Array(this.typeNumber-1).fill(false)
|
|
|
|
+ console.log(this.eduTextbookVolumeValidList)
|
|
|
|
+
|
|
|
|
+ }
|
|
validateForm: FormGroup<{
|
|
validateForm: FormGroup<{
|
|
title: FormControl<string>; //申报教材名称
|
|
title: FormControl<string>; //申报教材名称
|
|
ISBN: FormControl<any>; //国际标准书号
|
|
ISBN: FormControl<any>; //国际标准书号
|
|
author: FormControl<string>; //第一主编(作者)
|
|
author: FormControl<string>; //第一主编(作者)
|
|
unit: FormControl<string>; //第一主编(作者)单位
|
|
unit: FormControl<string>; //第一主编(作者)单位
|
|
- unitType:FormControl<string>//第一主编(作者)单位类型
|
|
|
|
|
|
+ unitType: FormControl<string>//第一主编(作者)单位类型
|
|
|
|
|
|
type: FormControl<string>; //申报类型
|
|
type: FormControl<string>; //申报类型
|
|
// typeNumber: FormControl<number|any>; //全册次数
|
|
// typeNumber: FormControl<number|any>; //全册次数
|
|
@@ -120,8 +168,8 @@ export class BasicInComponent implements OnInit {
|
|
|
|
|
|
// importantProject: FormControl<string>; //初版以来是否列为重点项目
|
|
// importantProject: FormControl<string>; //初版以来是否列为重点项目
|
|
importantProjectOther: FormControl<string>; //其他省部级及以上项目
|
|
importantProjectOther: FormControl<string>; //其他省部级及以上项目
|
|
- approvedImgUrl:FormControl<string>//重点立项教材获批截图
|
|
|
|
-
|
|
|
|
|
|
+ approvedImgUrl: FormControl<string>//重点立项教材获批截图
|
|
|
|
+
|
|
|
|
|
|
// remember: FormControl<boolean>;
|
|
// remember: FormControl<boolean>;
|
|
}> = this.fb.group({
|
|
}> = this.fb.group({
|
|
@@ -146,16 +194,16 @@ export class BasicInComponent implements OnInit {
|
|
printSum: [0, [Validators.required]],
|
|
printSum: [0, [Validators.required]],
|
|
// importantProject: ['', [Validators.required]],
|
|
// importantProject: ['', [Validators.required]],
|
|
importantProjectOther: [''],
|
|
importantProjectOther: [''],
|
|
- approvedImgUrl:[''],
|
|
|
|
|
|
+ approvedImgUrl: [''],
|
|
// copyrightImgUrl: [''],
|
|
// copyrightImgUrl: [''],
|
|
// CIPImgUrl: [''],
|
|
// CIPImgUrl: [''],
|
|
// remember: [true],
|
|
// remember: [true],
|
|
- unitType:['',[Validators.required]],
|
|
|
|
|
|
+ unitType: ['', [Validators.required]],
|
|
});
|
|
});
|
|
/** 所属学科专业类显示数量*/
|
|
/** 所属学科专业类显示数量*/
|
|
- nzOptionOverflowSize=5
|
|
|
|
|
|
+ nzOptionOverflowSize = 5
|
|
//教材应用对象及所诉学科专业类
|
|
//教材应用对象及所诉学科专业类
|
|
- selectList=major.majors.options
|
|
|
|
|
|
+ selectList = major.majors.options
|
|
//语言选择
|
|
//语言选择
|
|
selectLang: Array<any> = languages.options;
|
|
selectLang: Array<any> = languages.options;
|
|
//可选单位类型
|
|
//可选单位类型
|
|
@@ -197,35 +245,35 @@ export class BasicInComponent implements OnInit {
|
|
{
|
|
{
|
|
label: '首届全国教材建设奖全国优秀教材(高等教育类)',
|
|
label: '首届全国教材建设奖全国优秀教材(高等教育类)',
|
|
value: '首届全国教材建设奖全国优秀教材(高等教育类)',
|
|
value: '首届全国教材建设奖全国优秀教材(高等教育类)',
|
|
- checked:false
|
|
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: '“十二五”普通高等教育本科国家级规划教材',
|
|
label: '“十二五”普通高等教育本科国家级规划教材',
|
|
value: '“十二五”普通高等教育本科国家级规划教材',
|
|
value: '“十二五”普通高等教育本科国家级规划教材',
|
|
- checked:false
|
|
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: '“十二五”以来省级优秀教材',
|
|
label: '“十二五”以来省级优秀教材',
|
|
value: '“十二五”以来省级优秀教材',
|
|
value: '“十二五”以来省级优秀教材',
|
|
- checked:false
|
|
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: '“十二五”以来省级规划教材',
|
|
label: '“十二五”以来省级规划教材',
|
|
value: '“十二五”以来省级规划教材',
|
|
value: '“十二五”以来省级规划教材',
|
|
- checked:false
|
|
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: '其他省部级及以上项目',
|
|
label: '其他省部级及以上项目',
|
|
value: '其他省部级及以上项目',
|
|
value: '其他省部级及以上项目',
|
|
- checked:false
|
|
|
|
|
|
+ checked: false
|
|
},
|
|
},
|
|
];
|
|
];
|
|
/**选中的重点项目 */
|
|
/**选中的重点项目 */
|
|
- importantProject:Array<any>=[]
|
|
|
|
|
|
+ importantProject: Array<any> = []
|
|
/**多选框改变 */
|
|
/**多选框改变 */
|
|
- changeImportantProject(){
|
|
|
|
- let checkedList = this.importantProjectList.filter(item=>item.checked)||[]
|
|
|
|
- this.importantProject = checkedList.map(item=>item.value)
|
|
|
|
|
|
+ changeImportantProject() {
|
|
|
|
+ let checkedList = this.importantProjectList.filter(item => item.checked) || []
|
|
|
|
+ this.importantProject = checkedList.map(item => item.value)
|
|
console.log(this.importantProject)
|
|
console.log(this.importantProject)
|
|
}
|
|
}
|
|
/* 是否重点立项教材可选列表 */
|
|
/* 是否重点立项教材可选列表 */
|
|
@@ -256,36 +304,41 @@ export class BasicInComponent implements OnInit {
|
|
public tbookSer: textbookServer,
|
|
public tbookSer: textbookServer,
|
|
private fb: NonNullableFormBuilder,
|
|
private fb: NonNullableFormBuilder,
|
|
private modal: NzModalService,
|
|
private modal: NzModalService,
|
|
- private msg: NzMessageService
|
|
|
|
|
|
+ private msg: NzMessageService,
|
|
|
|
+ private cdr: ChangeDetectorRef
|
|
) {
|
|
) {
|
|
}
|
|
}
|
|
|
|
|
|
- isShowChooseEU:boolean=true
|
|
|
|
|
|
+ isShowChooseEU: boolean = true
|
|
ngOnInit() {
|
|
ngOnInit() {
|
|
- if(this.eduTextbook?.get('editionUnit')){
|
|
|
|
- this.isShowChooseEU=false
|
|
|
|
|
|
+ if (this.eduTextbook?.get('editionUnit')) {
|
|
|
|
+ this.isShowChooseEU = false
|
|
}
|
|
}
|
|
- this.importantProject = this.eduTextbook?.get('importantProject')||[]
|
|
|
|
- if(this.importantProject?.length>0){
|
|
|
|
- for(let i in this.importantProjectList){
|
|
|
|
- if(this.importantProject.indexOf(this.importantProjectList[i].value)!=-1){
|
|
|
|
- this.importantProjectList[i].checked=true
|
|
|
|
|
|
+ this.importantProject = this.eduTextbook?.get('importantProject') || []
|
|
|
|
+ if (this.importantProject?.length > 0) {
|
|
|
|
+ for (let i in this.importantProjectList) {
|
|
|
|
+ if (this.importantProject.indexOf(this.importantProjectList[i].value) != -1) {
|
|
|
|
+ this.importantProjectList[i].checked = true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
this.approvedImgList[0].url = this.eduTextbook?.get('approvedImgUrl')
|
|
this.approvedImgList[0].url = this.eduTextbook?.get('approvedImgUrl')
|
|
this.typeNumber = this.eduTextbook?.get('typeNumber') || 2
|
|
this.typeNumber = this.eduTextbook?.get('typeNumber') || 2
|
|
|
|
+ this.eduTextbookVolumeValidList=new Array(this.typeNumber-1).fill(false)
|
|
|
|
+ console.log(this.eduTextbookVolumeValidList)
|
|
|
|
+
|
|
|
|
+
|
|
// console.log(this.approvedImgList)
|
|
// console.log(this.approvedImgList)
|
|
console.log(this.eduTextbook);
|
|
console.log(this.eduTextbook);
|
|
this.validateForm = this.fb.group({
|
|
this.validateForm = this.fb.group({
|
|
title: [this.eduTextbook?.get('title') || '', [Validators.required]],
|
|
title: [this.eduTextbook?.get('title') || '', [Validators.required]],
|
|
- ISBN: [parseInt(this.eduTextbook?.get('ISBN')||'')||null, [Validators.required]],
|
|
|
|
|
|
+ ISBN: [parseInt(this.eduTextbook?.get('ISBN') || '') || null, [Validators.required]],
|
|
author: [this.eduTextbook?.get('author') || '', [Validators.required]],
|
|
author: [this.eduTextbook?.get('author') || '', [Validators.required]],
|
|
unit: [this.eduTextbook?.get('unit') || '', [Validators.required]],
|
|
unit: [this.eduTextbook?.get('unit') || '', [Validators.required]],
|
|
- type: [this.eduTextbook?.get('type') || '', [Validators.required]],
|
|
|
|
|
|
+ type: [this.eduTextbook?.get('type') || '全册', [Validators.required]],
|
|
// typeNumber: [this.eduTextbook?.get('typeNumber') || 2],
|
|
// typeNumber: [this.eduTextbook?.get('typeNumber') || 2],
|
|
-
|
|
|
|
|
|
+
|
|
majorPoniter: [this.eduTextbook?.get('majorPoniter')?.code || '', [Validators.required]],
|
|
majorPoniter: [this.eduTextbook?.get('majorPoniter')?.code || '', [Validators.required]],
|
|
lang: [this.eduTextbook?.get('lang') || '', [Validators.required]],
|
|
lang: [this.eduTextbook?.get('lang') || '', [Validators.required]],
|
|
authors: [this.eduTextbook?.get('authors') || ''],
|
|
authors: [this.eduTextbook?.get('authors') || ''],
|
|
@@ -302,18 +355,18 @@ export class BasicInComponent implements OnInit {
|
|
// importantProject: [this.eduTextbook?.get('importantProject') || '', [Validators.required]],
|
|
// importantProject: [this.eduTextbook?.get('importantProject') || '', [Validators.required]],
|
|
importantProjectOther: [this.eduTextbook?.get('importantProjectOther') || ''],
|
|
importantProjectOther: [this.eduTextbook?.get('importantProjectOther') || ''],
|
|
approvedImgUrl: [this.eduTextbook?.get('approvedImgUrl') || ''],
|
|
approvedImgUrl: [this.eduTextbook?.get('approvedImgUrl') || ''],
|
|
- unitType: [this.eduTextbook?.get('unitType') || '',[Validators.required]],
|
|
|
|
|
|
+ unitType: [this.eduTextbook?.get('unitType') || '', [Validators.required]],
|
|
|
|
|
|
// copyrightImgUrl: [this.eduTextbook?.get('copyrightImgUrl') || '', [Validators.required]],
|
|
// copyrightImgUrl: [this.eduTextbook?.get('copyrightImgUrl') || '', [Validators.required]],
|
|
// CIPImgUrl: [this.eduTextbook?.get('CIPImgUrl') || '', [Validators.required]],
|
|
// CIPImgUrl: [this.eduTextbook?.get('CIPImgUrl') || '', [Validators.required]],
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
- upload(e: any, type:string) {
|
|
|
|
|
|
+
|
|
|
|
+ upload(e: any, type: string) {
|
|
console.log(e);
|
|
console.log(e);
|
|
let file = e[0];
|
|
let file = e[0];
|
|
// if(type == 'copyrightImgUrl' || type == 'CIPImgUrl' ||type=='approvedImgUrl'){
|
|
// if(type == 'copyrightImgUrl' || type == 'CIPImgUrl' ||type=='approvedImgUrl'){
|
|
- if(type=='approvedImgUrl'){
|
|
|
|
|
|
+ if (type == 'approvedImgUrl') {
|
|
this.validateForm.value[type] = file?.url
|
|
this.validateForm.value[type] = file?.url
|
|
}
|
|
}
|
|
console.log(this.validateForm.value)
|
|
console.log(this.validateForm.value)
|
|
@@ -323,12 +376,12 @@ export class BasicInComponent implements OnInit {
|
|
console.log(this.validateForm.valid);
|
|
console.log(this.validateForm.valid);
|
|
if (this.validateForm.valid) {
|
|
if (this.validateForm.valid) {
|
|
let params = this.validateForm.value
|
|
let params = this.validateForm.value
|
|
- if(event == 'next'){
|
|
|
|
|
|
+ if (event == 'next') {
|
|
await this.saveEduTextbook(params, this.validateForm.valid)
|
|
await this.saveEduTextbook(params, this.validateForm.valid)
|
|
- this.state.emit({type:'next',textBook:this.eduTextbook});
|
|
|
|
|
|
+ this.state.emit({ type: 'next', textBook: this.eduTextbook });
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- if(event == 'save'){
|
|
|
|
|
|
+ if (event == 'save') {
|
|
let params = this.validateForm.value
|
|
let params = this.validateForm.value
|
|
await this.saveEduTextbook(params, this.validateForm.valid)
|
|
await this.saveEduTextbook(params, this.validateForm.valid)
|
|
this.modal.success({
|
|
this.modal.success({
|
|
@@ -338,13 +391,13 @@ export class BasicInComponent implements OnInit {
|
|
});
|
|
});
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if(event == 'next'){
|
|
|
|
|
|
+ if (event == 'next') {
|
|
let params = this.validateForm.value
|
|
let params = this.validateForm.value
|
|
await this.saveEduTextbook(params, this.validateForm.valid)
|
|
await this.saveEduTextbook(params, this.validateForm.valid)
|
|
- this.state.emit({type:'next',textBook:this.eduTextbook});
|
|
|
|
|
|
+ this.state.emit({ type: 'next', textBook: this.eduTextbook });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(event == 'save'){
|
|
|
|
|
|
+ if (event == 'save') {
|
|
let params = this.validateForm.value
|
|
let params = this.validateForm.value
|
|
await this.saveEduTextbook(params, this.validateForm.valid)
|
|
await this.saveEduTextbook(params, this.validateForm.valid)
|
|
this.modal.success({
|
|
this.modal.success({
|
|
@@ -355,18 +408,18 @@ export class BasicInComponent implements OnInit {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- async saveEduTextbook(params: any, isComplete:boolean){
|
|
|
|
|
|
+ async saveEduTextbook(params: any, isComplete: boolean) {
|
|
this.changeImportantProject()
|
|
this.changeImportantProject()
|
|
console.log(params);
|
|
console.log(params);
|
|
- if(!this.eduTextbook){
|
|
|
|
|
|
+ if (!this.eduTextbook) {
|
|
let obj = Parse.Object.extend('EduTextbook');
|
|
let obj = Parse.Object.extend('EduTextbook');
|
|
this.eduTextbook = new obj();
|
|
this.eduTextbook = new obj();
|
|
}
|
|
}
|
|
//如果填写未完整,仅保存,状态修改待完善101
|
|
//如果填写未完整,仅保存,状态修改待完善101
|
|
- if(this.eduTextbook.get('status') == '102' && !isComplete){
|
|
|
|
|
|
+ if (this.eduTextbook.get('status') == '102' && !isComplete) {
|
|
this.eduTextbook?.set('status', '101');
|
|
this.eduTextbook?.set('status', '101');
|
|
this.eduTextbook.set('complete', false)
|
|
this.eduTextbook.set('complete', false)
|
|
- }else if(!this.eduTextbook.get('status')){
|
|
|
|
|
|
+ } else if (!this.eduTextbook.get('status')) {
|
|
this.eduTextbook?.set('status', '101');
|
|
this.eduTextbook?.set('status', '101');
|
|
}
|
|
}
|
|
this.eduTextbook?.set('user', Parse.User.current()?.toPointer());
|
|
this.eduTextbook?.set('user', Parse.User.current()?.toPointer());
|
|
@@ -376,7 +429,7 @@ export class BasicInComponent implements OnInit {
|
|
objectId: this.tbookSer.company,
|
|
objectId: this.tbookSer.company,
|
|
});
|
|
});
|
|
this.eduTextbook?.set('title', params.title);
|
|
this.eduTextbook?.set('title', params.title);
|
|
- this.eduTextbook?.set('ISBN', (params.ISBN||0).toString());
|
|
|
|
|
|
+ this.eduTextbook?.set('ISBN', (params.ISBN || 0).toString());
|
|
this.eduTextbook?.set('author', params.author);
|
|
this.eduTextbook?.set('author', params.author);
|
|
this.eduTextbook?.set('unit', params.unit);
|
|
this.eduTextbook?.set('unit', params.unit);
|
|
this.eduTextbook?.set('type', params.type);
|
|
this.eduTextbook?.set('type', params.type);
|
|
@@ -402,8 +455,8 @@ export class BasicInComponent implements OnInit {
|
|
this.eduTextbook?.set('importantProjectOther', params.importantProjectOther);
|
|
this.eduTextbook?.set('importantProjectOther', params.importantProjectOther);
|
|
// this.eduTextbook?.set('copyrightImgUrl', params.copyrightImgUrl);
|
|
// this.eduTextbook?.set('copyrightImgUrl', params.copyrightImgUrl);
|
|
// this.eduTextbook?.set('CIPImgUrl', params.CIPImgUrl);
|
|
// this.eduTextbook?.set('CIPImgUrl', params.CIPImgUrl);
|
|
- this.eduTextbook?.set('approvedImgUrl',params.approvedImgUrl)
|
|
|
|
- this.eduTextbook?.set('unitType',params.unitType)
|
|
|
|
|
|
+ this.eduTextbook?.set('approvedImgUrl', params.approvedImgUrl)
|
|
|
|
+ this.eduTextbook?.set('unitType', params.unitType)
|
|
|
|
|
|
await this.eduTextbook?.save();
|
|
await this.eduTextbook?.save();
|
|
return
|
|
return
|
|
@@ -414,21 +467,21 @@ export class BasicInComponent implements OnInit {
|
|
selectedValue = null;
|
|
selectedValue = null;
|
|
listOfOption: Array<{ value: string; text: string }> = [];
|
|
listOfOption: Array<{ value: string; text: string }> = [];
|
|
nzFilterOption = (): boolean => true;
|
|
nzFilterOption = (): boolean => true;
|
|
- eduTimeout:any
|
|
|
|
|
|
+ eduTimeout: any
|
|
/**出版单位列表 */
|
|
/**出版单位列表 */
|
|
- eduList:Array<Parse.Object>=[]
|
|
|
|
-/**搜索出版单位 */
|
|
|
|
|
|
+ eduList: Array<Parse.Object> = []
|
|
|
|
+ /**搜索出版单位 */
|
|
async search(value: string) {
|
|
async search(value: string) {
|
|
clearTimeout(this.eduTimeout)
|
|
clearTimeout(this.eduTimeout)
|
|
- this.eduTimeout = setTimeout(async() => {
|
|
|
|
|
|
+ this.eduTimeout = setTimeout(async () => {
|
|
let query = new Parse.Query('Department')
|
|
let query = new Parse.Query('Department')
|
|
- query.notEqualTo('isDeleted',true)
|
|
|
|
- query.equalTo('parent','66865d66ad23a23355b12aa7')
|
|
|
|
- query.contains('name',value)
|
|
|
|
|
|
+ query.notEqualTo('isDeleted', true)
|
|
|
|
+ query.equalTo('parent', '66865d66ad23a23355b12aa7')
|
|
|
|
+ query.contains('name', value)
|
|
query.limit(10)
|
|
query.limit(10)
|
|
this.eduList = await query.find()
|
|
this.eduList = await query.find()
|
|
}, 500);
|
|
}, 500);
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
openFile(url: any) {
|
|
openFile(url: any) {
|
|
window.open(url)
|
|
window.open(url)
|