tijiao
This commit is contained in:
@@ -1102,22 +1102,22 @@ export default {
|
|||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
major: [
|
// major: [
|
||||||
{
|
// {
|
||||||
required: true,
|
// required: true,
|
||||||
validator: (rule, value, callback) => {
|
// validator: (rule, value, callback) => {
|
||||||
console.log('value at line 1202:', this.form);
|
// console.log('value at line 1202:', this.form);
|
||||||
var major = this.majorValueList.map((item) => item.selectedValue[item.selectedValue.length - 1]).toString(',');
|
// var major = this.majorValueList.map((item) => item.selectedValue[item.selectedValue.length - 1]).toString(',');
|
||||||
if (major == '') {
|
// if (major == '') {
|
||||||
callback(new Error('Please select the Research areas'));
|
// callback(new Error('Please select the Research areas'));
|
||||||
} else {
|
// } else {
|
||||||
callback();
|
// callback();
|
||||||
}
|
// }
|
||||||
// 如果你需要在此处使用 this 访问 Vue 实例的数据,使用箭头函数保持上下文
|
// // 如果你需要在此处使用 this 访问 Vue 实例的数据,使用箭头函数保持上下文
|
||||||
// 其他逻辑
|
// // 其他逻辑
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
],
|
// ],
|
||||||
abstrart: [
|
abstrart: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
@@ -2590,13 +2590,17 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.form.keyWords = fstr == '' ? '' : fstr.substring(0, fstr.length - 1);
|
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(',');
|
.toString(',');
|
||||||
if (this.form.major == '') {
|
// if (this.form.major == '') {
|
||||||
this.$message.error('Please select the Research areas');
|
// this.$message.error('Please select the Research areas');
|
||||||
return false;
|
// return false;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.$api.post('api/Article/addArticlePart1', this.form).then((res) => {
|
this.$api.post('api/Article/addArticlePart1', this.form).then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user