This commit is contained in:
2025-08-01 15:37:41 +08:00
parent 3b7c76de47
commit a5bb5b45e7
2 changed files with 25 additions and 21 deletions

BIN
dist.zip

Binary file not shown.

View File

@@ -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) {