|
@@ -22,7 +22,7 @@ import {
|
|
|
AbstractControl,
|
|
|
} from '@angular/forms';
|
|
|
import { textbookServer } from '../../../../services/textbook';
|
|
|
-// import * as eduTextBook from '../../../../../../../server/db/schemas/'
|
|
|
+import * as eduTextBook from '../../../../services/EduTextbook'
|
|
|
@Component({
|
|
|
selector: 'app-attachment',
|
|
|
imports: [
|
|
@@ -157,7 +157,7 @@ export class AttachmentComponent implements OnInit {
|
|
|
/**判断是否存在未填字段 */
|
|
|
isIgnoreFiledNull() {
|
|
|
|
|
|
- // eduColumn =
|
|
|
+ let eduColumn = eduTextBook.EduTextbook.fields
|
|
|
let ignoreFiled = [
|
|
|
'typeNumber', 'editionNumber', 'importantProjectOther',
|
|
|
'textbookFiles', 'createdAt', 'updatedAt', 'copyright', 'authorSign',
|
|
@@ -165,12 +165,12 @@ export class AttachmentComponent implements OnInit {
|
|
|
'importantProject', 'importantProjectOther', 'complete', 'links', 'recommend',
|
|
|
'printSun', 'discard', 'edition', 'eduProcess', 'authors', 'editor',
|
|
|
'copyrightImgUrl', 'CIPImgUrl', 'selfResults', 'expertOpinion', 'evidence',
|
|
|
- 'moreMaterial', 'unitMaterial','approvedImgUrl'
|
|
|
+ 'moreMaterial', 'unitMaterial','approvedImgUrl','department'
|
|
|
] //非必填字段
|
|
|
let textBookJson = this.eduTextbook.toJSON()
|
|
|
- let isVrifly = Object.keys(textBookJson).some((item: string) => {
|
|
|
+ let isVrifly = Object.keys(eduColumn).some((item: string) => {
|
|
|
if (!ignoreFiled.includes(item) && (textBookJson[item] === '' || textBookJson[item] === undefined || textBookJson[item] === null)) {
|
|
|
- console.warn('字段未填写:' + item);
|
|
|
+ console.warn('字段未填写:' + item)
|
|
|
return true
|
|
|
}
|
|
|
return
|