投稿提示

This commit is contained in:
2026-01-07 09:17:59 +08:00
parent 539c8b312e
commit 0f3ee631e3
6 changed files with 290 additions and 94 deletions

View File

@@ -73,15 +73,15 @@ export default {
getJournalTypeName(value) {
var list = JSON.parse(localStorage.getItem('journalTypeDataAll'));
if(list&&list.length>0){
const type = list.find(item => item.value === value);
return type ? type.name : 'OTHERS';
}else{
if (list && list.length > 0) {
const type = list.find(item => item.value === value);
return type ? type.name : 'OTHERS';
} else {
return ''
}
},
@@ -119,7 +119,7 @@ export default {
extractLatexFromMathJax() {
@@ -245,7 +245,7 @@ export default {
const content = match.slice(1, match.length - 1); // 去掉方括号
// 这个需要程序去判断所以需要告诉我满足哪些条件的标蓝
// 上标中 只有 * # & 纯数字 纯数字逗号 纯数字逗号和空格 ỻ 标蓝
// 判断是否符合条件,纯数字、逗号后有空格、连字符
if (/^\d+$/.test(content) || /, ?/.test(content) || //.test(content)) {
return `<blue>${match}</blue>`; // 如果符合条件则加上蓝色标签
@@ -412,10 +412,10 @@ export default {
if (!vMergeVal || vMergeVal === "continue") {
if (rowspan < maxRowspan) { // 限制 rowspan 最大值
rowspan++;
nextRowIdx++;
} else {
break;
}
} else if (vMergeVal === "restart") {
@@ -556,10 +556,8 @@ export default {
const target = rel.getAttribute('Target');
rels[id] = target;
});
const imageInfoMap = {};
const blips = docDom.getElementsByTagName('a:blip');
Array.from(blips).forEach((blip) => {
const embedId = blip.getAttribute('r:embed');
const extent = findExtentElement(blip);
@@ -573,7 +571,6 @@ export default {
}
}
});
mammoth.convertToHtml({ arrayBuffer }, {
convertImage: mammoth.images.inline(async function (image) {
console.log('image at line 163:', image)
@@ -1204,9 +1201,9 @@ export default {
// 遍历行
table.forEach((row) => {
tableHtml += `<tr>`;
if(row&&row.length>0){
row.forEach((cell) => {
tableHtml += `
if (row && row.length > 0) {
row.forEach((cell) => {
tableHtml += `
<td
colspan="${cell.colspan || 1}"
rowspan="${cell.rowspan || 1}"
@@ -1215,12 +1212,12 @@ if(row&&row.length>0){
<span > ${cell.text}</span>
</td>
`;
});
}else{
tableHtml+=``
}
});
} else {
tableHtml += ``
}
// 遍历单元格
tableHtml += `</tr>`;
});
@@ -2111,41 +2108,41 @@ if(row&&row.length>0){
// 全部大写按钮按钮文本A
ed.ui.registry.addButton('myuppercase', {
text: 'A', // 按钮文本(大写标识)
onAction: function () {
// 获取选中的文本(保留 HTML 格式,确保空格等内容不丢失)
var selectedText = ed.selection.getContent({ format: 'html' });
ed.ui.registry.addButton('myuppercase', {
text: 'A', // 按钮文本(大写标识)
onAction: function () {
// 获取选中的文本(保留 HTML 格式,确保空格等内容不丢失)
var selectedText = ed.selection.getContent({ format: 'html' });
// 校验:非空且仅含字母、数字、空格(可根据需求调整正则)
// if (selectedText.trim() && /^[\s\w]+$/.test(selectedText)) {
// 直接将选中的所有内容转为大写(无需正则,整体转换)
var allUppercaseText = selectedText.toUpperCase();
// 替换选中的文本
ed.selection.setContent(allUppercaseText);
// } else {
// vueInstance.$message.error(vueInstance.$t('commonTable.selectWord'));
// }
}
});
// 校验:非空且仅含字母、数字、空格(可根据需求调整正则)
// if (selectedText.trim() && /^[\s\w]+$/.test(selectedText)) {
// 直接将选中的所有内容转为大写(无需正则,整体转换)
var allUppercaseText = selectedText.toUpperCase();
// 替换选中的文本
ed.selection.setContent(allUppercaseText);
// } else {
// vueInstance.$message.error(vueInstance.$t('commonTable.selectWord'));
// }
}
});
// 全部小写按钮按钮文本a
ed.ui.registry.addButton('myuppercasea', {
text: 'a', // 按钮文本(小写标识)
onAction: function () {
var selectedText = ed.selection.getContent({ format: 'html' });
// 全部小写按钮按钮文本a
ed.ui.registry.addButton('myuppercasea', {
text: 'a', // 按钮文本(小写标识)
onAction: function () {
var selectedText = ed.selection.getContent({ format: 'html' });
// if (selectedText.trim() && /^[\s\w]+$/.test(selectedText)) {
// 直接将选中的所有内容转为小写(整体转换)
var allLowercaseText = selectedText.toLowerCase();
ed.selection.setContent(allLowercaseText);
// } else {
// vueInstance.$message.error(vueInstance.$t('commonTable.selectWord'));
// }
}
});
// if (selectedText.trim() && /^[\s\w]+$/.test(selectedText)) {
// 直接将选中的所有内容转为小写(整体转换)
var allLowercaseText = selectedText.toLowerCase();
ed.selection.setContent(allLowercaseText);
// } else {
// vueInstance.$message.error(vueInstance.$t('commonTable.selectWord'));
// }
}
});
ed.ui.registry.addButton('Line', {
text: '', // 按钮文本
onAction: function () {

View File

@@ -0,0 +1,21 @@
<template>
<div></div>
</template>
<script>
export default {
beforeCreate() {
// 获取传递过来的路径和参数
const { path, ...query } = this.$route.query;
// 立即跳回原页面
this.$router.replace({
path: path,
query: query
});
},
// 渲染一个空节点
render(h) {
return h();
}
};
</script>

View File

@@ -65,6 +65,9 @@
if(this.tagsList.length >= 8){
this.tagsList.shift();
}
if(route.meta.hideInTags){
return false;
}
this.tagsList.push({
title: route.meta.title,
path: route.fullPath,
@@ -90,7 +93,9 @@
created(){
this.setTags(this.$route);
// 监听关闭当前页面的标签页
bus.$on('close_current_tags', () => {
console.log('出发关闭当前标签页');
for (let i = 0, len = this.tagsList.length; i < len; i++) {
const item = this.tagsList[i];
if(item.path === this.$route.fullPath){
@@ -106,7 +111,11 @@
}
}
})
}
},
// beforeDestroy() {
// // 销毁监听,防止内存泄漏
// this.$bus.$off('close_current_tags');
// }
}
</script>

View File

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

View File

@@ -22,8 +22,8 @@
<el-option :key="2" :label="$t('artstate.state2')" :value="2"></el-option>
<el-option :key="4" :label="$t('artstate.state4')" :value="4"></el-option>
<el-option :key="4" :label="$t('artstate.state8')" :value="8"></el-option>
<el-option :key="4" :label="$t('artstate.state6')" :value="6"></el-option>
<el-option :key="8" :label="$t('artstate.state8')" :value="8"></el-option>
<el-option :key="6" :label="$t('artstate.state6')" :value="6"></el-option>
<el-option :key="5" :label="$t('artstate.state5')" :value="5"></el-option>
<el-option :key="3" :label="$t('artstate.state3')" :value="3"></el-option>
</el-select>

View File

@@ -957,6 +957,12 @@ export default new Router({
title: 'Journal Installment'
}
},
{
path: '/redirect',
name: 'Redirect',
component: () => import('../components/common/Redirect.vue'),
meta: { hideInTags: true } //重新刷新页面 不想出现白屏闪烁
},
{
path: '/JournalManagement', //用户列表
component: () => import('../components/page/JournalManagement/JournalManagement/index.vue'),