diff --git a/dist.zip b/dist.zip index d8081c6..49da80e 100644 Binary files a/dist.zip and b/dist.zip differ diff --git a/src/components/page/articleAdd.vue b/src/components/page/articleAdd.vue index 004d6f4..61b57a6 100644 --- a/src/components/page/articleAdd.vue +++ b/src/components/page/articleAdd.vue @@ -1102,22 +1102,22 @@ export default { trigger: 'blur' } ], - major: [ - { - required: true, - validator: (rule, value, callback) => { - console.log('value at line 1202:', this.form); - var major = this.majorValueList.map((item) => item.selectedValue[item.selectedValue.length - 1]).toString(','); - if (major == '') { - callback(new Error('Please select the Research areas')); - } else { - callback(); - } - // 如果你需要在此处使用 this 访问 Vue 实例的数据,使用箭头函数保持上下文 - // 其他逻辑 - } - } - ], + // major: [ + // { + // required: true, + // validator: (rule, value, callback) => { + // console.log('value at line 1202:', this.form); + // var major = this.majorValueList.map((item) => item.selectedValue[item.selectedValue.length - 1]).toString(','); + // if (major == '') { + // callback(new Error('Please select the Research areas')); + // } else { + // callback(); + // } + // // 如果你需要在此处使用 this 访问 Vue 实例的数据,使用箭头函数保持上下文 + // // 其他逻辑 + // } + // } + // ], abstrart: [ { required: true, @@ -2590,13 +2590,17 @@ export default { } } this.form.keyWords = fstr == '' ? '' : fstr.substring(0, fstr.length - 1); - this.form.major = this.majorValueList - .map((item) => item.selectedValue[item.selectedValue.length - 1]) + + if(this.majorValueList.length>0){ + this.form.major = this.majorValueList + .map((item) => item.selectedValue.length>0?item.selectedValue[item.selectedValue.length - 1]:[]) .toString(','); - if (this.form.major == '') { - this.$message.error('Please select the Research areas'); - return false; + // if (this.form.major == '') { + // this.$message.error('Please select the Research areas'); + // return false; + // } } + this.$api.post('api/Article/addArticlePart1', this.form).then((res) => { if (res.code == 0) {