tijiao
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user