投稿提示

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

@@ -75,10 +75,10 @@ export default {
getJournalTypeName(value) { getJournalTypeName(value) {
var list = JSON.parse(localStorage.getItem('journalTypeDataAll')); var list = JSON.parse(localStorage.getItem('journalTypeDataAll'));
if(list&&list.length>0){ if (list && list.length > 0) {
const type = list.find(item => item.value === value); const type = list.find(item => item.value === value);
return type ? type.name : 'OTHERS'; return type ? type.name : 'OTHERS';
}else{ } else {
return '' return ''
} }
@@ -556,10 +556,8 @@ export default {
const target = rel.getAttribute('Target'); const target = rel.getAttribute('Target');
rels[id] = target; rels[id] = target;
}); });
const imageInfoMap = {}; const imageInfoMap = {};
const blips = docDom.getElementsByTagName('a:blip'); const blips = docDom.getElementsByTagName('a:blip');
Array.from(blips).forEach((blip) => { Array.from(blips).forEach((blip) => {
const embedId = blip.getAttribute('r:embed'); const embedId = blip.getAttribute('r:embed');
const extent = findExtentElement(blip); const extent = findExtentElement(blip);
@@ -573,7 +571,6 @@ export default {
} }
} }
}); });
mammoth.convertToHtml({ arrayBuffer }, { mammoth.convertToHtml({ arrayBuffer }, {
convertImage: mammoth.images.inline(async function (image) { convertImage: mammoth.images.inline(async function (image) {
console.log('image at line 163:', image) console.log('image at line 163:', image)
@@ -1204,9 +1201,9 @@ export default {
// 遍历行 // 遍历行
table.forEach((row) => { table.forEach((row) => {
tableHtml += `<tr>`; tableHtml += `<tr>`;
if(row&&row.length>0){ if (row && row.length > 0) {
row.forEach((cell) => { row.forEach((cell) => {
tableHtml += ` tableHtml += `
<td <td
colspan="${cell.colspan || 1}" colspan="${cell.colspan || 1}"
rowspan="${cell.rowspan || 1}" rowspan="${cell.rowspan || 1}"
@@ -1215,10 +1212,10 @@ if(row&&row.length>0){
<span > ${cell.text}</span> <span > ${cell.text}</span>
</td> </td>
`; `;
}); });
}else{ } else {
tableHtml+=`` tableHtml += ``
} }
// 遍历单元格 // 遍历单元格
@@ -2113,39 +2110,39 @@ if(row&&row.length>0){
// 全部大写按钮按钮文本A // 全部大写按钮按钮文本A
ed.ui.registry.addButton('myuppercase', { ed.ui.registry.addButton('myuppercase', {
text: 'A', // 按钮文本(大写标识) text: 'A', // 按钮文本(大写标识)
onAction: function () { onAction: function () {
// 获取选中的文本(保留 HTML 格式,确保空格等内容不丢失) // 获取选中的文本(保留 HTML 格式,确保空格等内容不丢失)
var selectedText = ed.selection.getContent({ format: 'html' }); var selectedText = ed.selection.getContent({ format: 'html' });
// 校验:非空且仅含字母、数字、空格(可根据需求调整正则) // 校验:非空且仅含字母、数字、空格(可根据需求调整正则)
// if (selectedText.trim() && /^[\s\w]+$/.test(selectedText)) { // if (selectedText.trim() && /^[\s\w]+$/.test(selectedText)) {
// 直接将选中的所有内容转为大写(无需正则,整体转换) // 直接将选中的所有内容转为大写(无需正则,整体转换)
var allUppercaseText = selectedText.toUpperCase(); var allUppercaseText = selectedText.toUpperCase();
// 替换选中的文本 // 替换选中的文本
ed.selection.setContent(allUppercaseText); ed.selection.setContent(allUppercaseText);
// } else { // } else {
// vueInstance.$message.error(vueInstance.$t('commonTable.selectWord')); // vueInstance.$message.error(vueInstance.$t('commonTable.selectWord'));
// } // }
} }
}); });
// 全部小写按钮按钮文本a // 全部小写按钮按钮文本a
ed.ui.registry.addButton('myuppercasea', { ed.ui.registry.addButton('myuppercasea', {
text: 'a', // 按钮文本(小写标识) text: 'a', // 按钮文本(小写标识)
onAction: function () { onAction: function () {
var selectedText = ed.selection.getContent({ format: 'html' }); var selectedText = ed.selection.getContent({ format: 'html' });
// if (selectedText.trim() && /^[\s\w]+$/.test(selectedText)) { // if (selectedText.trim() && /^[\s\w]+$/.test(selectedText)) {
// 直接将选中的所有内容转为小写(整体转换) // 直接将选中的所有内容转为小写(整体转换)
var allLowercaseText = selectedText.toLowerCase(); var allLowercaseText = selectedText.toLowerCase();
ed.selection.setContent(allLowercaseText); ed.selection.setContent(allLowercaseText);
// } else { // } else {
// vueInstance.$message.error(vueInstance.$t('commonTable.selectWord')); // vueInstance.$message.error(vueInstance.$t('commonTable.selectWord'));
// } // }
} }
}); });
ed.ui.registry.addButton('Line', { ed.ui.registry.addButton('Line', {
text: '', // 按钮文本 text: '', // 按钮文本
onAction: function () { 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){ if(this.tagsList.length >= 8){
this.tagsList.shift(); this.tagsList.shift();
} }
if(route.meta.hideInTags){
return false;
}
this.tagsList.push({ this.tagsList.push({
title: route.meta.title, title: route.meta.title,
path: route.fullPath, path: route.fullPath,
@@ -90,7 +93,9 @@
created(){ created(){
this.setTags(this.$route); this.setTags(this.$route);
// 监听关闭当前页面的标签页 // 监听关闭当前页面的标签页
bus.$on('close_current_tags', () => { bus.$on('close_current_tags', () => {
console.log('出发关闭当前标签页');
for (let i = 0, len = this.tagsList.length; i < len; i++) { for (let i = 0, len = this.tagsList.length; i < len; i++) {
const item = this.tagsList[i]; const item = this.tagsList[i];
if(item.path === this.$route.fullPath){ if(item.path === this.$route.fullPath){
@@ -106,7 +111,11 @@
} }
} }
}) })
} },
// beforeDestroy() {
// // 销毁监听,防止内存泄漏
// this.$bus.$off('close_current_tags');
// }
} }
</script> </script>

View File

@@ -1067,6 +1067,7 @@
</template> </template>
<script> <script>
import bus from '@/components/common/bus.js';
import { debounce, throttle } from '@/common/js/debounce'; import { debounce, throttle } from '@/common/js/debounce';
import JournalSelector from '@/components/page/components/article/journal-selector.vue'; import JournalSelector from '@/components/page/components/article/journal-selector.vue';
import ProgressBar from '@/components/page/components/article/progress.vue'; import ProgressBar from '@/components/page/components/article/progress.vue';
@@ -1579,35 +1580,7 @@ export default {
} }
}, },
async created() { async created() {
this.journal_type = await this.$commonJS.journalTypeList(); this.initArticleInfo()
// 依次执行初始化步骤
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();
}
}, },
computed: { computed: {
@@ -1642,6 +1615,35 @@ export default {
} }
}, },
methods: { 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) { handleCheckAllChange(val) {
this.checkedCities = val this.checkedCities = val
? this.keywordsList.map((_, index) => index + 1) // 遍历数组,取 index+1 作为选中值 ? this.keywordsList.map((_, index) => index + 1) // 遍历数组,取 index+1 作为选中值
@@ -2813,13 +2815,84 @@ export default {
// this.$message.success('Contribution added successfully!'); // this.$message.success('Contribution added successfully!');
} else { } else {
this.$message.error(res.msg);
this.form.manuscirpt = ''; this.form.manuscirpt = '';
this.fileL_manuscirpt = []; this.fileL_manuscirpt = [];
this.isShowCommonWord = false; this.isShowCommonWord = false;
this.initStepStatus(); this.initStepStatus();
loading.close(); // 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(() => { .catch(() => {
loading.close(); loading.close();
@@ -3318,7 +3391,7 @@ export default {
}, },
// 点击进行下一步 // 点击进行下一步
async onStep(e) { onStep:throttle(function async(e) {
this.$refs.articleform.validate((valid) => { this.$refs.articleform.validate((valid) => {
if (valid) { if (valid) {
if (e == 1) { 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) { if (e == 2) {
@@ -3439,7 +3587,7 @@ export default {
return false; return false;
} }
}); });
}, }, 1000),
// save暂存 // save暂存
onStagingSave: throttle(function (e) { onStagingSave: throttle(function (e) {
@@ -4079,6 +4227,21 @@ export default {
line-height: 1.5 !important; line-height: 1.5 !important;
font-family: 'Helvetica Neue For Number', 'Elsevier Gulliver', Georgia, serif !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>
<style> <style>

View File

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

View File

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