投稿提示
This commit is contained in:
@@ -1067,6 +1067,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import bus from '@/components/common/bus.js';
|
||||
import { debounce, throttle } from '@/common/js/debounce';
|
||||
import JournalSelector from '@/components/page/components/article/journal-selector.vue';
|
||||
import ProgressBar from '@/components/page/components/article/progress.vue';
|
||||
@@ -1579,35 +1580,7 @@ export default {
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.journal_type = await this.$commonJS.journalTypeList();
|
||||
|
||||
// 依次执行初始化步骤
|
||||
this.initSelect();
|
||||
this.getAutData();
|
||||
try {
|
||||
// 获取期刊类型列表
|
||||
|
||||
// 分支处理
|
||||
if (this.stagingID !== undefined) {
|
||||
this.form.article_id = this.stagingID;
|
||||
|
||||
await this.getMajorData();
|
||||
await this.initStepStatus((step1Incomplete) => {
|
||||
this.show_step = step1Incomplete.current.step;
|
||||
this.move_step = step1Incomplete.current.step;
|
||||
});
|
||||
await this.Temporary();
|
||||
} else {
|
||||
this.isNewArticle = true;
|
||||
await this.initMajor();
|
||||
}
|
||||
|
||||
// 最后执行步骤状态初始化
|
||||
} catch (err) {
|
||||
// 控制台打印错误
|
||||
console.error('初始化失败:', err.message || err);
|
||||
load.close();
|
||||
}
|
||||
this.initArticleInfo()
|
||||
},
|
||||
|
||||
computed: {
|
||||
@@ -1642,6 +1615,35 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async initArticleInfo(){
|
||||
this.journal_type = await this.$commonJS.journalTypeList();
|
||||
// 依次执行初始化步骤
|
||||
this.initSelect();
|
||||
this.getAutData();
|
||||
try {
|
||||
// 获取期刊类型列表
|
||||
|
||||
// 分支处理
|
||||
if (this.stagingID !== undefined) {
|
||||
this.form.article_id = this.stagingID;
|
||||
await this.getMajorData();
|
||||
await this.initStepStatus((step1Incomplete) => {
|
||||
this.show_step = step1Incomplete.current.step;
|
||||
this.move_step = step1Incomplete.current.step;
|
||||
});
|
||||
await this.Temporary();
|
||||
} else {
|
||||
this.isNewArticle = true;
|
||||
await this.initMajor();
|
||||
}
|
||||
|
||||
// 最后执行步骤状态初始化
|
||||
} catch (err) {
|
||||
// 控制台打印错误
|
||||
console.error('初始化失败:', err.message || err);
|
||||
load.close();
|
||||
}
|
||||
},
|
||||
handleCheckAllChange(val) {
|
||||
this.checkedCities = val
|
||||
? this.keywordsList.map((_, index) => index + 1) // 遍历数组,取 index+1 作为选中值
|
||||
@@ -2813,13 +2815,84 @@ export default {
|
||||
|
||||
// this.$message.success('Contribution added successfully!');
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
this.form.manuscirpt = '';
|
||||
this.fileL_manuscirpt = [];
|
||||
this.isShowCommonWord = false;
|
||||
this.initStepStatus();
|
||||
loading.close();
|
||||
}
|
||||
this.fileL_manuscirpt = [];
|
||||
this.isShowCommonWord = false;
|
||||
this.initStepStatus();
|
||||
// 1. 统一关闭 loading
|
||||
loading.close();
|
||||
|
||||
// 2. 根据状态码处理逻辑
|
||||
if (res.status == 21) {
|
||||
// 系统内编辑已经拒绝 - 禁用遮罩层关闭
|
||||
this.$alert(
|
||||
'Please note that the manuscript with the same title has already been rejected. For more details, please contact the journal.',
|
||||
'System Notice',
|
||||
{
|
||||
showConfirmButton: false, // 隐藏蓝色的确定按钮
|
||||
showCancelButton: true, // 显示取消按钮
|
||||
cancelButtonText: 'Cancel', // 按钮文字设为 Cancel
|
||||
closeOnClickModal: false, // 依然禁止点击遮罩层关闭
|
||||
type: 'warning',
|
||||
customClass: 'only-cancel-box' // 用于微调样式的类名
|
||||
}
|
||||
);
|
||||
}
|
||||
else if (res.status == 20) {
|
||||
// 其他状况 不可操作 - 禁用遮罩层关闭
|
||||
this.$alert(
|
||||
'Please note that the manuscript with the same title is already under processing. Do not submit it again.',
|
||||
'System Notice',
|
||||
{
|
||||
showConfirmButton: false, // 隐藏蓝色的确定按钮
|
||||
showCancelButton: true, // 显示取消按钮
|
||||
cancelButtonText: 'Cancel', // 按钮文字设为 Cancel
|
||||
closeOnClickModal: false, // 依然禁止点击遮罩层关闭
|
||||
type: 'warning',
|
||||
customClass: 'only-cancel-box' // 用于微调样式的类名
|
||||
}
|
||||
);
|
||||
}
|
||||
else if (res.status == 22) {
|
||||
// 已经在垃圾箱(草稿箱)- 禁用遮罩层关闭,增加跳转按钮
|
||||
this.$confirm(
|
||||
'Please notice that the manuscript with the same title is already in the draft status. Would you like to view it?',
|
||||
'System Notice',
|
||||
{
|
||||
confirmButtonText: 'Click here',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info',
|
||||
closeOnClickModal: false, // 禁止点击背景关闭
|
||||
closeOnPressEscape: false // 建议同时禁止 ESC 键关闭,增强强制性
|
||||
}
|
||||
).then(() => {
|
||||
// 跳转逻辑:使用后端返回的 draft_id 或 article_id
|
||||
const draftId = res.draft_id;
|
||||
if (draftId) {
|
||||
bus.$emit('close_current_tags')
|
||||
this.$router.replace({
|
||||
path: '/redirect',
|
||||
|
||||
query: {
|
||||
path: '/articleAdd', // 你当前页面的路由路径
|
||||
id: draftId ,
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}).catch(() => {
|
||||
// 点击取消的操作
|
||||
});
|
||||
}
|
||||
else {
|
||||
// 其他普通错误
|
||||
this.$message.error(res.msg || 'Unknown error');
|
||||
|
||||
}
|
||||
|
||||
// 3. 重置表单状态
|
||||
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
loading.close();
|
||||
@@ -3318,7 +3391,7 @@ export default {
|
||||
},
|
||||
|
||||
// 点击进行下一步
|
||||
async onStep(e) {
|
||||
onStep:throttle(function async(e) {
|
||||
this.$refs.articleform.validate((valid) => {
|
||||
if (valid) {
|
||||
if (e == 1) {
|
||||
@@ -3374,9 +3447,84 @@ export default {
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
// 2. 根据状态码处理逻辑
|
||||
if (res.code == 21) {
|
||||
// 系统内编辑已经拒绝 - 禁用遮罩层关闭
|
||||
this.$alert(
|
||||
'Please note that the manuscript with the same title has already been rejected. For more details, please contact the journal.',
|
||||
'System Notice',
|
||||
{
|
||||
showConfirmButton: false, // 隐藏蓝色的确定按钮
|
||||
showCancelButton: true, // 显示取消按钮
|
||||
cancelButtonText: 'Cancel', // 按钮文字设为 Cancel
|
||||
closeOnClickModal: false, // 依然禁止点击遮罩层关闭
|
||||
type: 'warning',
|
||||
customClass: 'only-cancel-box' // 用于微调样式的类名
|
||||
}
|
||||
);
|
||||
}
|
||||
else if (res.code == 20) {
|
||||
// 其他状况 不可操作 - 禁用遮罩层关闭
|
||||
this.$alert(
|
||||
'Please note that the manuscript with the same title is already under processing. Do not submit it again.',
|
||||
'System Notice',
|
||||
{
|
||||
showConfirmButton: false, // 隐藏蓝色的确定按钮
|
||||
showCancelButton: true, // 显示取消按钮
|
||||
cancelButtonText: 'Cancel', // 按钮文字设为 Cancel
|
||||
closeOnClickModal: false, // 依然禁止点击遮罩层关闭
|
||||
type: 'warning',
|
||||
customClass: 'only-cancel-box' // 用于微调样式的类名
|
||||
}
|
||||
);
|
||||
}
|
||||
else if (res.code == 22) {
|
||||
// 已经在垃圾箱(草稿箱)- 禁用遮罩层关闭,增加跳转按钮
|
||||
this.$confirm(
|
||||
'Please notice that the manuscript with the same title is already in the draft status. Would you like to view it?',
|
||||
'System Notice',
|
||||
{
|
||||
confirmButtonText: 'Click here',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'info',
|
||||
closeOnClickModal: false, // 禁止点击背景关闭
|
||||
closeOnPressEscape: false // 建议同时禁止 ESC 键关闭,增强强制性
|
||||
}
|
||||
).then(() => {
|
||||
// 跳转逻辑:使用后端返回的 draft_id 或 article_id
|
||||
const draftId = res.draft_id;
|
||||
if (draftId) {
|
||||
bus.$emit('close_current_tags')
|
||||
this.$router.replace({
|
||||
path: '/redirect',
|
||||
|
||||
query: {
|
||||
path: '/articleAdd', // 你当前页面的路由路径
|
||||
id: draftId ,
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}).catch(() => {
|
||||
// 点击取消的操作
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.$message.error(res.msg);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
if (e == 2) {
|
||||
@@ -3439,7 +3587,7 @@ export default {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
}, 1000),
|
||||
|
||||
// save暂存
|
||||
onStagingSave: throttle(function (e) {
|
||||
@@ -4079,6 +4227,21 @@ export default {
|
||||
line-height: 1.5 !important;
|
||||
font-family: 'Helvetica Neue For Number', 'Elsevier Gulliver', Georgia, serif !important;
|
||||
}
|
||||
/* 修改确定按钮的颜色,去掉蓝色 */
|
||||
/deep/.el-message-box__wrapper .el-message-box__btns.my-custom-button {
|
||||
background-color: #606266 !important; /* 灰色 */
|
||||
border-color: #606266 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
/deep/.my-custom-button:hover {
|
||||
background-color: #909399 !important;
|
||||
border-color: #909399 !important;
|
||||
}
|
||||
|
||||
/* /deep/ .my-custom-button:hover {
|
||||
.my-custom-alert .el-message-box__status.el-icon-info {
|
||||
color: #909399 !important;
|
||||
} */
|
||||
</style>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user