This commit is contained in:
2025-07-25 13:35:16 +08:00
parent 0bc622d0fb
commit 10426bb23e
2 changed files with 37 additions and 62 deletions

View File

@@ -56,52 +56,7 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="Research areas :" prop="major" label-width="160px">
<common-major-list :list="majorValueList" @load="(e) => (this.majorValueList = e)"></common-major-list>
<!-- <el-select
v-model="form.major_a"
placeholder="Please select major"
@change="majorChange(1)"
style="width: 240px"
>
<el-option
v-for="item in majors_a"
:key="item.major_id"
:label="item.major_title"
:value="item.major_id"
></el-option>
</el-select>
<el-select
v-model="form.major_b"
placeholder="Please select major"
v-if="majors_b != ''"
@change="majorChange(2)"
style="margin: 0 15px; width: 240px"
>
<el-option :key="0" label="None" :value="0"></el-option>
<el-option
v-for="item in majors_b"
:key="item.major_id"
:label="item.major_title"
:value="item.major_id"
></el-option>
</el-select>
<el-select
v-model="form.major_c"
placeholder="Please select major"
v-if="majors_c != ''"
style="width: 240px"
@change="majorChange(3)"
>
<el-option :key="0" label="None" :value="0"></el-option>
<el-option
v-for="item in majors_c"
:key="item.major_id"
:label="item.major_title"
:value="item.major_id"
></el-option>
</el-select> -->
</el-form-item>
<el-form-item label="Manuscript Title :" prop="title" label-width="160px">
<el-input v-model="form.title" placeholder="Please enter title"></el-input>
</el-form-item>
@@ -505,6 +460,9 @@
<!-- 提交 submit -->
<div class="bag_color" v-if="show_step == 4">
<div>
<el-form-item label="Research areas :" prop="major" label-width="160px">
<common-major-list :list="majorValueList" @load="(e) => (this.majorValueList = e)"></common-major-list>
</el-form-item>
<h3>Co-submitting</h3>
<p style="line-height: 25px; margin: 0 10px 0 55px; font-size: 14px">
TMR Publishing Group publishes multiple journals and offers you the opportunity to co-submit your paper.
@@ -1436,6 +1394,7 @@ export default {
}
console.log('this.form.major at line 1512:', this.form.major);
//验证文章领域
this.form.major = this.majorValueList.map((item) => item.selectedValue[item.selectedValue.length - 1]).toString(',');
if (this.form.major == '') {
this.$message.error('Please select the Research areas');
@@ -2529,6 +2488,9 @@ export default {
this.onStaging(2);
}
}
if(e == 4) {
this.getMajorData();
}
},
showFiles() {
@@ -2697,10 +2659,7 @@ export default {
console.log('this.form at line 2707:', this.form.abstrart);
this.form.keyWords = fstr == '' ? '' : fstr.substring(0, fstr.length - 1);
this.form.major = this.majorValueList.map((item) => item.selectedValue[item.selectedValue.length - 1]).toString(',');
if (this.form.major == '') {
this.$message.error('Please select the Research areas');
return false;
}
if (this.isAbstractTooShort(this.form.abstrart)) {
this.$message.error('The abstract should not be less than 200 Chinese characters or English words!');
return false;
@@ -2771,6 +2730,7 @@ export default {
}
});
} else if (e == 4) {
this.$api
.post('api/Article/addArticlefile', {
article_id: this.form.article_id,
@@ -2821,6 +2781,7 @@ export default {
});
}
},
isAbstractTooShort(text) {
let chineseCount = (text.match(/[\u4e00-\u9fa5]/g) || []).length;
let englishCount = (text.match(/[A-Za-z0-9]/g) || []).length;
@@ -2829,6 +2790,23 @@ export default {
return total < 200; // 不足 200说明太短
},
// 读取getMajorData
getMajorData() {
this.$api
.post('api/Article/getArticleField', {
article_id: this.stagingID
})
.then((res) => {
this.majorValueList = res.data.map((item) => ({
selectedValue: Array.isArray(item.major)
? item.shu
: typeof item.shu === 'string'
? item.shu.split(',').map(Number)
: [item.shu]
}));
console.log(res, '已经保存的值');
})
},
// 读取
Temporary() {
this.$api
@@ -2849,13 +2827,7 @@ export default {
console.log(res.data.base);
// this.form.topics = res.data.base.topics
// 领域
this.majorValueList = res.data.majors.map((item) => ({
selectedValue: Array.isArray(item.major)
? item.major
: typeof item.major === 'string'
? item.major.split(',').map(Number)
: [item.major]
}));
console.log('this.majorValueList at line 2853:', this.majorValueList);
// this.$api
// .post('api/Major/getMajorForAddArticle', {

View File

@@ -164,8 +164,7 @@
/>
</el-form-item>
</div>
<div v-if="[ 'Review', 'Mini Review'].includes(articleBaseInfo.type)">
<div v-if="['Review', 'Mini Review'].includes(articleBaseInfo.type)">
<el-form-item>
<template #label>
<span @click="handleTitleClick('overview')" class="form_title">
@@ -194,8 +193,6 @@
:autosize="{ minRows: 2, maxRows: 10 }"
/>
</el-form-item>
</div>
<!-- <el-form-item>
@@ -875,10 +872,16 @@ export default {
break;
case 2: // 生成中
this.stepValue = null;
loading.text = 'Generating, will be completed in about 2 minutes. It will automatically close in 3 seconds, please check it later.';
setTimeout(() => {
this.stopInterval();
loading.close();
}, 3000);
break;
case 3: // 未生成
this.stepValue = null;
loading.text = 'The public WeChat article is being created, please be patient and wait...';
loading.text = 'The public WeChat article is being created, please wait patiently for 2 minutes...';
this.createdAiArticle();
break;
}