This commit is contained in:
2025-02-21 10:33:37 +08:00
48 changed files with 18492 additions and 4960 deletions

View File

@@ -512,7 +512,7 @@ a {
}
.kuang_communtion .kuang_communtion_conmt {
/* max-height: 350px;
/* max-height: 350px;
overflow-y: auto; */
word-break: normal;
}
@@ -1072,36 +1072,47 @@ a {
line-height: 24px;
} */
.wordTableHtml b span {
.wordTableHtml b span {
font-weight: bold !important;
}
.wordTableHtml i span {
.wordTableHtml i span {
font-style: italic !important;
}
.wordTableHtml sub span {
.wordTableHtml sub span {
vertical-align: sub;
}
.wordTableHtml sup span {
vertical-align: super;
}
.wordTableHtml sub {
.wordTableHtml sub {
vertical-align: sub !important;
}
.wordTableHtml sup {
.wordTableHtml sup {
vertical-align: super !important;
}
.wordTableHtml span[style*='vertical-align: super'] {
.wordTableHtml span[style*='vertical-align: super'] {
vertical-align: super !important;
}
.wordTableHtml span[style*='vertical-align: sub'] {
.wordTableHtml span[style*='vertical-align: sub'] {
vertical-align: sub !important;
}
.wordTableHtml table {
border: 0px !important;
border-collapse: collapse; /* 去除单元格间隙 */
border-bottom: 1px solid #000 !important;
border-collapse: collapse;
/* 去除单元格间隙 */
width: auto;
margin: 0 auto !important;
table-layout: auto; /* 自动调整列宽 */
table-layout: auto;
/* 自动调整列宽 */
text-align: left;
font-family: 'Charis SIL' !important;
font-size: 7.5pt !important;
@@ -1109,19 +1120,23 @@ a {
line-height: 10pt !important;
mos-line-height: 10pt !important;
}
.wordTableHtml table td,
.wordTableHtml table th{
.wordTableHtml table th {
padding: 5px;
text-align: left !important;
word-wrap: break-word; /* 长单词自动换行 */
word-break: break-word;
word-wrap: normal;
/* 长单词自动换行 */
word-break: normal;
font-family: 'Charis SIL' !important;
font-size: 7.5pt !important;
mso-font-kerning: 1pt !important;
line-height: 10pt !important;
mos-line-height: 10pt !important;
}
.wordTableHtml table tbody tr td {
text-align: left !important;
border-left: none !important;
@@ -1138,6 +1153,7 @@ a {
word-break: keep-all !important;
/* text-align: justify !important; */
}
.wordTableHtml table tr td p {
display: flex;
text-align: left !important;
@@ -1149,6 +1165,7 @@ a {
line-height: 10pt !important;
mos-line-height: 10pt !important;
}
.wordTableHtml table span {
color: #000000;
text-align: left !important;
@@ -1158,6 +1175,7 @@ a {
line-height: 10pt !important;
mos-line-height: 10pt !important;
}
.wordTableHtml table .color-highlight {
color: rgb(0, 130, 170) !important;
font-family: 'Charis SIL' !important;
@@ -1166,6 +1184,7 @@ a {
line-height: 10pt !important;
mos-line-height: 10pt !important;
}
.wordTableHtml table blue {
color: rgb(0, 130, 170) !important;
font-family: 'Charis SIL' !important;
@@ -1174,13 +1193,244 @@ a {
line-height: 10pt !important;
mos-line-height: 10pt !important;
}
.wordTableHtml table tr:first-child td {
.wordTableHtml table tr:first-child td {
border-top: 1px solid #000 !important;
border-bottom: 1px solid #000 !important;
}
.wordTableHtml table tr:last-of-type td {
/* 给表格中最后一行表头添加红色下边框 */
/* 给最后一个 table-header-row 添加红色下边框 */
.wordTableHtml table tr:last-of-type td {
border-bottom: 1px solid #000 !important;
}
/* 给最后一个 table-header-row第二行加样式 */
.wordTableHtml table tr.table-header-row:nth-of-type(2) td {
border-bottom: 1px solid #000 !important;
}
.word-container b span {
font-weight: bold !important;
}
.word-container i span {
font-style: italic !important;
}
.word-container sub span {
vertical-align: sub;
}
.word-container sup span {
vertical-align: sup;
}
.word-container sub {
vertical-align: sub !important;
}
.word-container sup {
vertical-align: sup !important;
}
.word-container span[style*='vertical-align: super'] {
vertical-align: super !important;
}
.word-container span[style*='vertical-align: sub'] {
vertical-align: sub !important;
}
.word-container table {
border: 0px !important;
border-collapse: collapse;
/* 去除单元格间隙 */
width: auto;
margin: 0 auto !important;
table-layout: auto;
/* 自动调整列宽 */
text-align: left;
font-family: 'Charis SIL' !important;
font-size: 7.5pt !important;
mso-font-kerning: 1pt !important;
line-height: 10pt !important;
mos-line-height: 10pt !important;
}
.word-container table td,
.word-container table th {
padding: 5px;
text-align: left !important;
white-space: pre-wrap;
/* 保留换行符并换行 */
word-wrap: normal;
/* 长单词自动换行 */
word-break: normal;
font-family: 'Charis SIL' !important;
font-size: 7.5pt !important;
mso-font-kerning: 1pt !important;
line-height: 10pt !important;
mos-line-height: 10pt !important;
}
.word-container table tbody tr td {
text-align: left !important;
border-left: none !important;
mso-border-left-alt: none !important;
border-right: none !important;
mso-border-right-alt: none !important;
border-top: none;
mso-border-top-alt: none !important;
border-bottom: none !important;
mso-border-bottom-alt: none !important;
border: 1px dashed #dcdfe6 !important;
border-left: 1px dashed #dcdfe6 !important;
border-right: 1px dashed #dcdfe6 !important;
word-break: keep-all !important;
white-space: pre-wrap !important;
/* text-align: justify !important; */
}
.word-container table tr td p {
text-align: left !important;
margin: 0;
font-family: 'Charis SIL' !important;
font-size: 7.5pt !important;
mso-font-kerning: 1pt !important;
line-height: 10pt !important;
mos-line-height: 10pt !important;
}
.word-container table span {
color: #000000;
text-align: left !important;
font-family: 'Charis SIL' !important;
font-size: 7.5pt !important;
mso-font-kerning: 1pt !important;
line-height: 10pt !important;
mos-line-height: 10pt !important;
}
.word-container table .color-highlight {
color: rgb(0, 130, 170) !important;
font-family: 'Charis SIL' !important;
font-size: 7.5pt !important;
mso-font-kerning: 1pt !important;
line-height: 10pt !important;
mos-line-height: 10pt !important;
}
.word-container table tr:first-child td {
/* border-top: 1pt solid #000 !important;
mso-border-top-alt: 0.5pt solid #000 !important;
border-bottom: 1pt solid #000 !important;
mso-border-bottom-alt: 0.5pt solid #000 !important; */
}
.word-container table tr:last-of-type {
border-bottom: 1pt solid #000 !important;
mso-border-bottom-alt: 0.5pt solid #000 !important;
}
.word-container blue {
color: rgb(0, 130, 170) !important;
}
.tinymce-custom-button-blue {
font-weight: bold !important;
color: #007bff !important;
/* 设置字体颜色 */
}
.tinymce-custom-button-commentadd {
font-weight: bold !important;
background-color: #fef0f0 !important;
color: #f56c6c !important;
/* 设置字体颜色 */
fill: #f56c6c !important;
/* font-size:16px!important; */
/* 设置字体颜色 */
}
.tinymce-custom-button-commentadd svg {
fill: #f56c6c !important;
}
.tinymce-custom-button-delete {
font-weight: bold !important;
background-color: red !important;
color: #fff !important;
/* 设置字体颜色 */
fill: #fff !important;
/* font-size:16px!important; */
/* 设置字体颜色 */
}
.tinymce-custom-button-delete svg {
fill: #fff !important;
}
.tinymce-custom-button-edit {
font-weight: bold !important;
background-color: rgb(43, 129, 239) !important;
color: #fff !important;
/* 设置字体颜色 */
fill: #fff !important;
/* font-size:16px!important; */
/* 设置字体颜色 */
}
.tinymce-custom-button-edit svg {
fill: #fff !important;
}
.tinymce-custom-button-save {
font-weight: bold !important;
background-color: rgb(19, 188, 32) !important;
color: #fff !important;
/* 设置字体颜色 */
fill: #fff !important;
/* font-size:16px!important; */
/* 设置字体颜色 */
}
.tinymce-custom-button-addrow {
font-weight: bold !important;
background-color: #cbccd1 !important;
/* color: #fff !important; */
/* 设置字体颜色 */
/* fill: #fff !important; */
/* font-size:16px!important; */
/* 设置字体颜色 */
}
.tinymce-custom-button-save svg {
fill: #fff !important;
}
.tinymce-custom-button-removeblue {
font-weight: bold !important;
color: #007bff !important;
/* 设置字体颜色 */
text-decoration: line-through !important;
/* 设置字体颜色 */
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -1,7 +1,8 @@
import Vue from 'vue';
import JSZip from 'jszip';
import Common from '@/components/common/common'
import Tiff from 'tiff.js';
var mediaUrl = Common.mediaUrl+'articleImage/';
var mediaUrl = Common.mediaUrl + 'articleImage/';
// var mediaUrl1 = 'https://submission.tmrjournals.com/public/articleImage/';
const fs = require('fs');
@@ -17,11 +18,17 @@ const capitalizeFirstLetter = function (text) {
});
};
export default {
decodeHtml(html) {
var txt = document.createElement('textarea');
txt.innerHTML = html;
return txt.value;
},
//去掉最外层自定义的span标签
extractContentWithoutOuterSpan(cell) {
var str = ''
// 获取单元格的 HTML 内容
let htmlContent = cell.innerHTML.trim();
str = this.transformHtmlString(htmlContent)
// 创建一个临时的 DOM 元素来解析 HTML
@@ -42,10 +49,26 @@ export default {
str = capitalizeFirstLetter(str);
// 添加蓝色标签
const regex = /\[\d+(?:,\d+)*\]/g;
const regex = /\[(\d+(?:\d+)?(?:, ?\d+(?:\d+)?)*)\]/g;
str = str.replace(/<blue>/g, '').replace(/<\/blue>/g, ''); // 先去掉所有的 <blue> 标签
if (regex.test(str)) {
str = `<blue>${str}</blue>`;
str = str.replace(regex, function(match) {
// 提取出方括号中的内容,并进行匹配
const content = match.slice(1, match.length - 1); // 去掉方括号
// 判断是否符合条件,纯数字、逗号后有空格、连字符
if (/^\d+$/.test(content) || /, ?/.test(content) || //.test(content)) {
return `<blue>${match}</blue>`; // 如果符合条件则加上蓝色标签
}
return match; // 如果不符合条件,则保持原样
});
}
// 如果没有 <span> 标签,直接返回原始 HTML 内容
return str;
},
@@ -272,10 +295,29 @@ export default {
formattedText = capitalizeFirstLetter(formattedText);
// 添加蓝色标签
const regex = /\[\d+(?:,\d+)*\]/g;
const regex = /\[(\d+(?:\d+)?(?:, ?\d+(?:\d+)?)*)\]/g;
formattedText = formattedText.replace(/<blue>/g, '').replace(/<\/blue>/g, ''); // 先去掉所有的 <blue> 标签
if (regex.test(formattedText)) {
formattedText = `<blue>${formattedText}</blue>`;
formattedText = formattedText.replace(regex, function(match) {
// 提取出方括号中的内容,并进行匹配
const content = match.slice(1, match.length - 1); // 去掉方括号
// 判断是否符合条件,纯数字、逗号后有空格、连字符
if (/^\d+$/.test(content) || /, ?/.test(content) || //.test(content)) {
return `<blue>${match}</blue>`; // 如果符合条件则加上蓝色标签
}
return match; // 如果不符合条件,则保持原样
});
}
console.log("After replacement:", formattedText); // 调试:查看替换后的文本
paragraphText += formattedText;
}
@@ -324,11 +366,12 @@ export default {
}
},
transformHtmlString(inputHtml) {
inputHtml = inputHtml.replace(/(<[^>]+) style="[^"]*"/g, '$1'); // 移除style属性
inputHtml = inputHtml.replace(/(<[^>]+) class="[^"]*"/g, '$1'); // 移除class属性
// 2. 删除所有不需要的标签 (除 `strong`, `em`, `sub`, `sup`, `b`, `i` 外的所有标签)
inputHtml = inputHtml.replace(/<(?!\/?(strong|em|sub|sup|b|i))[^>]+>/g, ''); // 删除不需要的标签
inputHtml = inputHtml.replace(/<(?!\/?(strong|em|sub|sup|b|i|blue))[^>]+>/g, ''); // 删除不需要的标签
// 3. 如果有 `<strong>` 和 `<em>` 标签,去掉内部样式并保留内容
inputHtml = inputHtml.replace(/<span[^>]*>/g, '').replace(/<\/span>/g, ''); // 去除span标签
@@ -459,8 +502,8 @@ export default {
}
previousParagraphs.push(paragraphs[i]);
}
// 将前一段的内容转化为 HTML 或文本
const previousHtml = this.convertParagraphsToHtml(previousParagraphs);
// 将前一段的内容转化为 HTML 或文本
const previousHtml = this.convertParagraphsToHtml(previousParagraphs);
console.log('tables at line 17:', previousHtml)
const tableHtml = this.convertTablesToHtml(tables, numberingMap);
console.log('tableHtml at line 18:', tableHtml)
@@ -477,8 +520,8 @@ const previousHtml = this.convertParagraphsToHtml(previousParagraphs);
callback("<p>文件解析失败,请检查文件格式。</p>");
}
},
// 转换段落为 HTML
convertParagraphsToHtml(paragraphs) {
// 转换段落为 HTML
convertParagraphsToHtml(paragraphs) {
let html = "";
paragraphs.forEach(p => {
let paragraphHtml = "";
@@ -496,8 +539,8 @@ convertParagraphsToHtml(paragraphs) {
});
// 检查是否为上标或下标
const isSuperscript = run.getElementsByTagName("w:vertAlign")[0]?run.getElementsByTagName("w:vertAlign")[0].getAttribute("w:val") === "superscript":"";
const isSubscript = run.getElementsByTagName("w:vertAlign")[0]?run.getElementsByTagName("w:vertAlign")[0].getAttribute("w:val") === "subscript":'';
const isSuperscript = run.getElementsByTagName("w:vertAlign")[0] ? run.getElementsByTagName("w:vertAlign")[0].getAttribute("w:val") === "superscript" : "";
const isSubscript = run.getElementsByTagName("w:vertAlign")[0] ? run.getElementsByTagName("w:vertAlign")[0].getAttribute("w:val") === "subscript" : '';
if (isSuperscript) {
text = `<sup>${text}</sup>`;
@@ -514,8 +557,8 @@ convertParagraphsToHtml(paragraphs) {
});
return html;
}
,
}
,
convertTablesToHtml(tables, numberingMap) {
const namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main";
let html = "";
@@ -773,7 +816,7 @@ convertParagraphsToHtml(paragraphs) {
if (['jpg', 'jpeg', 'png'].includes(extension)) {
thumbnailContent = `<img src="${mediaUrl + img.image}" alt="Image ${index}" style="width: 100%; height: auto;">`;
} else if (extension === 'tif') {
thumbnailContent = `<canvas id="tiff-canvas-${index} ${img.article_image_id?`tiff-canvas-${img.article_image_id}`:''}" style="width: 100%; height: auto;"></canvas>`;
thumbnailContent = `<canvas id="tiff-canvas-${index} ${img.article_image_id ? `tiff-canvas-${img.article_image_id}` : ''}" style="width: 100%; height: auto;"></canvas>`;
} else {
thumbnailContent = `<a href="${mediaUrl + img.image}" style="color: #75abf1;width:100%; height: 100%;">
<div
@@ -1150,6 +1193,487 @@ convertParagraphsToHtml(paragraphs) {
},
initEditorButton(vueInstance, ed) {
ed.ui.registry.addMenuButton('customDropdown', {
text: 'Set Title', // 下拉框标题
fetch: function (callback) {
// 定义下拉框的内容
const items = [
{
label: 'First level title',
value: 1
},
{
label: 'Secondary Title',
value: 2
},
{
label: 'Third level title',
value: 3
}
];
const menuItems = items.map((item) => ({
type: 'menuitem',
text: item.label,
onAction: function () {
var edSelection = ed.selection;
const selectedNode = edSelection.getNode(); // 获取选中的节点
if (selectedNode) {
// 向上查找最外层的 div
let outerDiv = selectedNode;
while (outerDiv && outerDiv.tagName !== 'DIV') {
outerDiv = outerDiv.parentNode;
}
// 如果找到的 div 节点存在
if (outerDiv) {
const dataId = outerDiv.getAttribute('main-id');
vueInstance.$emit('onEditTitle', {
mainId: dataId,
value: item.value
});
}
}
}
}));
callback(menuItems);
}
});
ed.ui.registry.addButton('addRow', {
icon:'duplicate-row',
text: 'Add Row', // 下拉框标题
onAction: function () {
var edSelection = ed.selection;
const selectedNode = edSelection.getNode(); // 获取选中的节点
let outerDiv = selectedNode;
while (outerDiv && outerDiv.tagName !== 'DIV') {
outerDiv = outerDiv.parentNode;
}
// 如果找到的 div 节点存在
if (outerDiv) {
const dataId = outerDiv.getAttribute('main-id');
console.log('dataId at line 1258:', dataId)
vueInstance.$emit('onAddRow', dataId);
}
}
});
// 添加自定义菜单项
ed.ui.registry.addButton('Save', {
icon: 'checkmark',
text: 'Save',
onAction: function () {
var deleteButtons = document.querySelectorAll('.tox-tinymce-inline');
var edSelection = ed.selection;
const selectedNode = edSelection.getNode(); // 获取选中的节点
let outerDiv = selectedNode;
while (outerDiv && outerDiv.tagName !== 'DIV') {
outerDiv = outerDiv.parentNode;
}
// 如果找到的 div 节点存在
if (outerDiv) {
const dataId = outerDiv.getAttribute('main-id');
var content;
console.log('outerDiv at line 663:', outerDiv.innerHTML);
content = outerDiv.innerHTML.replace(/<(?!\/?(img|b|i|sub|sup|span|strong|em |blue)\b)[^>]+>/g, '');
content = content.replace(/<([a-zA-Z]+)>\s*<\/\1>/g, '');
content = content.replace(/&nbsp;/g, ' ');
content = content.replace(/\s*style="[^"]*"/g, '');
var div = document.createElement('div');
div.innerHTML = content; // 将 HTML 字符串加载到 div 中
// 替换所有 <strong> 为 <b>
var strongTags = div.getElementsByTagName('strong');
for (var i = 0; i < strongTags.length; i++) {
var bTag = document.createElement('b');
bTag.innerHTML = strongTags[i].innerHTML; // 保留内容
strongTags[i].parentNode.replaceChild(bTag, strongTags[i]);
}
// 替换所有 <em> 为 <i>
var emTags = div.getElementsByTagName('em');
for (var i = 0; i < emTags.length; i++) {
var iTag = document.createElement('i');
iTag.innerHTML = emTags[i].innerHTML; // 保留内容
emTags[i].parentNode.replaceChild(iTag, emTags[i]);
}
content = div.innerHTML;
vueInstance.$emit('saveContent', content, dataId);
}
}
});
ed.ui.registry.addButton('level1', {
// icon: 'highlight-bg-color',
text: 'First level title',
onAction: function () {
var edSelection = ed.selection;
const selectedNode = edSelection.getNode(); // 获取选中的节点
let outerDiv = selectedNode;
while (outerDiv && outerDiv.tagName !== 'DIV') {
outerDiv = outerDiv.parentNode;
}
// 如果找到的 div 节点存在
if (outerDiv) {
const dataId = outerDiv.getAttribute('main-id');
console.log('dataId at line 1258:', dataId)
vueInstance.$emit('onEditTitle', {
mainId: dataId,
value: 1
});
}
}
});
ed.ui.registry.addButton('level2', {
// icon: 'highlight-bg-color',
text: 'Second level Title',
onAction: function () {
var edSelection = ed.selection;
const selectedNode = edSelection.getNode(); // 获取选中的节点
let outerDiv = selectedNode;
while (outerDiv && outerDiv.tagName !== 'DIV') {
outerDiv = outerDiv.parentNode;
}
// 如果找到的 div 节点存在
if (outerDiv) {
const dataId = outerDiv.getAttribute('main-id');
console.log('dataId at line 1258:', dataId)
vueInstance.$emit('onEditTitle', {
mainId: dataId,
value: 2
});
}
}
});
ed.ui.registry.addButton('level3', {
// icon: 'highlight-bg-color',
text: 'Third level title',
onAction: function () {
var edSelection = ed.selection;
const selectedNode = edSelection.getNode(); // 获取选中的节点
let outerDiv = selectedNode;
while (outerDiv && outerDiv.tagName !== 'DIV') {
outerDiv = outerDiv.parentNode;
}
// 如果找到的 div 节点存在
if (outerDiv) {
const dataId = outerDiv.getAttribute('main-id');
console.log('dataId at line 1258:', dataId)
vueInstance.$emit('onEditTitle', {
mainId: dataId,
value: 3
});
}
}
});
ed.ui.registry.addButton('Edit', {
icon: 'highlight-bg-color',
text: 'Edit',
onAction: function () {
var edSelection = ed.selection;
const selectedNode = edSelection.getNode(); // 获取选中的节点
let outerDiv = selectedNode;
while (outerDiv && outerDiv.tagName !== 'DIV') {
outerDiv = outerDiv.parentNode;
}
// 如果找到的 div 节点存在
if (outerDiv) {
const dataId = outerDiv.getAttribute('main-id');
console.log('dataId at line 1258:', dataId)
vueInstance.$emit('onEdit', dataId);
}
}
});
ed.ui.registry.addButton('commentAdd', {
icon: 'comment-add',
text: 'Comment Add',
onAction: function () {
var edSelection = ed.selection;
const selectedNode = edSelection.getNode(); // 获取选中的节点
if (selectedNode) {
// 向上查找最外层的 div
let outerDiv = selectedNode;
while (outerDiv && outerDiv.tagName !== 'DIV') {
outerDiv = outerDiv.parentNode;
}
// 如果找到的 div 节点存在
if (outerDiv) {
const dataId = outerDiv.getAttribute('main-id');
const type = outerDiv.getAttribute('type');
console.log('type:', type);
// 获取选中的内容HTML格式
let selectedContent = edSelection.getContent({ format: 'html' });
// 创建一个临时容器来处理 HTML
const tempDiv = document.createElement('div');
tempDiv.innerHTML = selectedContent;
// 检查是否包含 <img> 标签
const hasImage = tempDiv.querySelector('img') !== null;
if (hasImage) {
vueInstance.$message.error(vueInstance.$t('commonTable.selectComment'));
return; // 如果包含图片,停止处理
}
// 获取清理后的纯文本内容
let selectedText = tempDiv.innerText.trim(); // 使用 trim() 清理前后的空格
// 处理文本中的多余空格:替换多个连续空格为一个空格
selectedText = selectedText.replace(/\s+/g, ' ');
// 确保保留的标签
const allowedTags = ['sup', 'sub', 'strong', 'em', 'b', 'i', 'blue', 'tr', 'td'];
// 遍历选中的节点并保留需要的标签
function preserveTags(node) {
if (node.nodeType === 3) { // 文本节点
return node.nodeValue;
}
if (node.nodeType === 1 && allowedTags.includes(node.nodeName.toLowerCase())) {
return node.outerHTML; // 保留整个标签
}
return '';
}
let preservedContent = '';
Array.from(tempDiv.childNodes).forEach((childNode) => {
preservedContent += preserveTags(childNode);
});
// 检查选中的内容是否已经包含嵌套批注
const containsPositionRemark = tempDiv.querySelector('.positionRemarkIndex');
if (containsPositionRemark) {
vueInstance.$message.error(vueInstance.$t('commonTable.alreadyCommented'));
return; // 如果已有嵌套批注,停止处理
}
// 如果内容不为空,发送批注请求
if (type == 0) {
if (selectedText !== '') {
vueInstance.$emit('onAddComment', {
mainId: dataId,
label: preservedContent // 发送保留标签的内容
});
} else {
vueInstance.$message.error(vueInstance.$t('commonTable.selectComment'));
}
} else if (type == 1) {
vueInstance.$emit('onAddComment', {
mainId: dataId,
label: preservedContent // 发送保留标签的内容
});
} else if (type == 2) {
vueInstance.$emit('onAddComment', {
mainId: dataId,
label: preservedContent // 发送保留标签的内容
});
}
}
}
}
});
ed.ui.registry.addButton('delete', {
icon: 'remove',
text: 'Delete',
onAction: function () {
var edSelection = ed.selection;
const selectedNode = edSelection.getNode(); // 获取选中的节点
if (selectedNode) {
// 向上查找最外层的 div
let outerDiv = selectedNode;
while (outerDiv && outerDiv.tagName !== 'DIV') {
outerDiv = outerDiv.parentNode;
}
// 如果找到的 div 节点存在
if (outerDiv) {
const dataId = outerDiv.getAttribute('main-id');
vueInstance.$emit('onDelete', dataId);
}
}
}
});
// 定义自定义按钮
ed.ui.registry.addButton('clearButton', {
text: 'Empty',
onAction: () => {
// 插入自定义表格到编辑器中
ed.setContent('');
}
});
ed.ui.registry.addButton('customBlue', {
text: 'Blue', // 按钮文本
className: 'custom-button-blue', // 添加自定义类
// shortcut: "Ctrl+J",
onAction: function () {
// 在选中的文本周围包裹 <blue> 标签
var selectedText = ed.selection.getContent();
console.log('selectedText at line 529:', selectedText);
if (selectedText) {
var wrappedText = `<blue>${selectedText}</blue>`;
ed.selection.setContent(wrappedText);
} else {
this.$message.error('请选择要添加蓝色的文本');
}
}
});
ed.ui.registry.addButton('myuppercase', {
text: 'A', // 按钮文本
onAction: function () {
// 在选中的文本周围包裹 <blue> 标签
var selectedText = ed.selection.getContent({ format: 'html' });
// 确保选中的文本是单个单词,包括空格
if (selectedText.trim() && /^[\s\w]+$/.test(selectedText)) {
// 使用正则将选中的文本中的第一个字母大写
var capitalizedText = selectedText.replace(/(^|\s)([a-zA-Z])/g, function(match, p1, p2) {
return p1 + p2.toUpperCase();
});
// 替换选中的文本,保持空格和其他内容
ed.selection.setContent(capitalizedText);
} else {
vueInstance.$message.error(vueInstance.$t('commonTable.selectWord'));
}
}
});
ed.ui.registry.addButton('myuppercase', {
text: 'A', // 按钮文本
onAction: function () {
// 在选中的文本周围包裹 <blue> 标签
var selectedText = ed.selection.getContent({ format: 'html' });
// 确保选中的文本是单个单词,包括空格
if (selectedText.trim() && /^[\s\w]+$/.test(selectedText)) {
// 使用正则将选中的文本中的第一个字母大写
var capitalizedText = selectedText.replace(/(^|\s)([a-zA-Z])/g, function(match, p1, p2) {
return p1 + p2.toUpperCase();
});
// 替换选中的文本,保持空格和其他内容
ed.selection.setContent(capitalizedText);
} else {
vueInstance.$message.error(vueInstance.$t('commonTable.selectWord'));
}
}
});
ed.ui.registry.addButton('myuppercasea', {
text: 'a', // 按钮文本(小写字母)
onAction: function () {
// 获取选中的文本,保留 HTML 格式
var selectedText = ed.selection.getContent({ format: 'html' });
// 确保选中的文本是单个有效的单词,包括空格
if (selectedText.trim() && /^[\s\w]+$/.test(selectedText)) {
// 使用正则将选中的文本中的第一个字母转换为小写
var lowercasedText = selectedText.replace(/(^|\s)([a-zA-Z])/g, function(match, p1, p2) {
return p1 + p2.toLowerCase();
});
// 替换选中的文本,保持空格和其他内容
ed.selection.setContent(lowercasedText);
} else {
vueInstance.$message.error(vueInstance.$t('commonTable.selectWord'));
}
}
});
ed.ui.registry.addButton('Line', {
text: '', // 按钮文本
onAction: function () {
// 插入 `` 符号到当前光标位置
ed.insertContent('');
}
});
ed.ui.registry.addButton('removeBlue', {
text: 'Blue', // 按钮文本
onAction: function () {
const range = ed.selection.getRng(); // 获取选区范围
let startNode = range.startContainer; // 获取选区起始节点
let closestBlue = null;
// 向上查找最近的 <blue> 标签
while (startNode) {
if (startNode.nodeName && startNode.nodeName.toLowerCase() === 'blue') {
closestBlue = startNode;
break;
}
startNode = startNode.parentNode;
}
if (closestBlue) {
// 如果找到最近的 <blue> 标签,移除它的外层标签,但保留内容
const parent = closestBlue.parentNode;
while (closestBlue.firstChild) {
parent.insertBefore(closestBlue.firstChild, closestBlue);
}
parent.removeChild(closestBlue);
} else {
// 未找到 <blue> 标签,仅移除选中的 <blue> 标签内容
const selectedContent = ed.selection.getContent({ format: 'html' });
// 使用正则表达式移除选区中的 <blue> 标签
const cleanedContent = selectedContent
.replace(/<blue[^>]*>/g, '') // 删除起始标签 <blue>
.replace(/<\/blue>/g, ''); // 删除结束标签 </blue>
// 更新选中的内容
ed.selection.setContent(cleanedContent);
}
}
});
},
inTinymceButtonClass() {
setTimeout(function () {
// 使用 querySelectorAll 获取所有符合条件的按钮
const buttons = [
{ selector: '.tox-tbtn[data-mce-name="commentadd"]', className: 'tinymce-custom-button-commentadd' },
{ selector: '.tox-tbtn[data-mce-name="addrow"]', className: 'tinymce-custom-button-addrow' },
{ selector: '.tox-tbtn[data-mce-name="delete"]', className: 'tinymce-custom-button-delete' },
{ selector: '.tox-tbtn[data-mce-name="edit"]', className: 'tinymce-custom-button-edit' },
{ selector: '.tox-tbtn[data-mce-name="save"]', className: 'tinymce-custom-button-save' },
{ selector: '.tox-tbtn[data-mce-name="customblue"]', className: 'tinymce-custom-button-blue' },
{ selector: '.tox-tbtn[data-mce-name="removeblue"]', className: 'tinymce-custom-button-removeblue' }
];
// 遍历每个按钮并为每个按钮添加类
buttons.forEach(item => {
const buttonElements = document.querySelectorAll(item.selector);
buttonElements.forEach(button => {
if (!button.classList.contains(item.className)) { // 防止重复添加
button.classList.add(item.className);
}
});
});
}, 100); // 延迟执行,确保按钮渲染完成
}
// 通用递归方法
};

View File

@@ -1,10 +1,13 @@
<template>
<div class="header">
<!-- 折叠按钮 -->
<div class="collapse-btn" @click="collapseChage">
<div class="collapse-btn" @click="collapseChage" v-if="!home">
<i v-if="!collapse" class="el-icon-s-fold"></i>
<i v-else class="el-icon-s-unfold"></i>
</div>
<div class="collapse-btn" @click="goHome" v-if="home">
<i class="el-icon-s-home"></i>
</div>
<div class="logo">
<div>
<img src="../../assets/img/logo.png" />
@@ -37,7 +40,6 @@
</div>
<!-- 消息中心 -->
<!-- 身份切换 -->
<!-- <span style="font-size: 14px;margin-right: 8px;" v-if="this.user_cap.includes('author')">View as :</span>
<el-dropdown class="link_role" trigger="click" v-if="this.user_cap.includes('author')">
@@ -63,7 +65,6 @@
</el-dropdown-menu>
</el-dropdown> -->
<!-- 用户头像 -->
<div class="user-avator" @click="skip_link()" v-if="hasorcie">
<el-tooltip class="item" effect="light" content="Link to Orcid" placement="bottom-end">
@@ -91,8 +92,9 @@
</div>
</template>
<script>
import bus from '../common/bus';
export default {
import bus from '../common/bus';
export default {
props: ['home'],
data() {
return {
collapse: false,
@@ -104,8 +106,10 @@
user_id: localStorage.getItem('U_id'),
user_cap: localStorage.getItem('U_role'),
orcid: '',
orcidLink: 'https://orcid.org/oauth/authorize?client_id=APP-PKF0BGRP6DWM6FUB&response_type=code&scope=/authenticate&redirect_uri=https://submission.tmrjournals.com/orcidBind',
langArr: [{
orcidLink:
'https://orcid.org/oauth/authorize?client_id=APP-PKF0BGRP6DWM6FUB&response_type=code&scope=/authenticate&redirect_uri=https://submission.tmrjournals.com/orcidBind',
langArr: [
{
value: 'zh',
label: '中文'
},
@@ -119,19 +123,19 @@
day: '0',
hour: '00',
min: '00',
second: '00',
second: '00'
};
},
created() {
this.initORCID();
if (this.user_id == 24) {
this.daojishi = '2021.9.3 - 2021.9.30'
this.curStartTime = '2021-10-01 00:00:00'
this.daojishi = '2021.9.3 - 2021.9.30';
this.curStartTime = '2021-10-01 00:00:00';
this.countTime();
}
if (this.user_id == 25) {
this.daojishi = '2021.9.6 - 2021.12.31'
this.curStartTime = '2022-01-01 00:00:00'
this.daojishi = '2021.9.6 - 2021.12.31';
this.curStartTime = '2022-01-01 00:00:00';
this.countTime();
}
},
@@ -141,7 +145,7 @@
return username ? username : this.name;
},
onRoutes() {
0
0;
return this.$route.path.replace('/', '');
},
userrole() {
@@ -158,6 +162,9 @@
}
},
methods: {
goHome() {
this.$router.push('/');
},
// 用户名下拉菜单选择事件
handleCommand(command) {
// 个人中心
@@ -232,44 +239,43 @@
location.href = this.orcidLink;
},
// 倒计时
countTime() {
// 获取当前时间
let date = new Date()
let now = date.getTime()
let date = new Date();
let now = date.getTime();
// 设置截止时间
let endDate = new Date(this.curStartTime) // this.curStartTime需要倒计时的日期
let end = endDate.getTime()
let endDate = new Date(this.curStartTime); // this.curStartTime需要倒计时的日期
let end = endDate.getTime();
// 时间差
let leftTime = end - now
let leftTime = end - now;
// 定义变量 d,h,m,s保存倒计时的时间
if (leftTime >= 0) {
// 天
this.day = Math.floor(leftTime / 1000 / 60 / 60 / 24)
this.day = Math.floor(leftTime / 1000 / 60 / 60 / 24);
// 时
let h = Math.floor(leftTime / 1000 / 60 / 60 % 24)
this.hour = h < 10 ? '0' + h : h
let h = Math.floor((leftTime / 1000 / 60 / 60) % 24);
this.hour = h < 10 ? '0' + h : h;
// 分
let m = Math.floor(leftTime / 1000 / 60 % 60)
this.min = m < 10 ? '0' + m : m
let m = Math.floor((leftTime / 1000 / 60) % 60);
this.min = m < 10 ? '0' + m : m;
// 秒
let s = Math.floor(leftTime / 1000 % 60)
this.second = s < 10 ? '0' + s : s
let s = Math.floor((leftTime / 1000) % 60);
this.second = s < 10 ? '0' + s : s;
} else {
this.day = 0
this.hour = '00'
this.min = '00'
this.second = '00'
this.day = 0;
this.hour = '00';
this.min = '00';
this.second = '00';
}
// 等于0的时候不调用
if (Number(this.hour) === 0 && Number(this.day) === 0 && Number(this.min) === 0 && Number(this.second) === 0) {
return
return;
} else {
// 递归每秒调用countTime方法显示动态时间效果,
setTimeout(this.countTime, 1000)
setTimeout(this.countTime, 1000);
}
}
},
},
mounted() {
if (document.body.clientWidth < 1000) {
@@ -278,89 +284,89 @@
},
watch: {
$route: {
handler: function(route) {
this.link_path = route.path
handler: function (route) {
this.link_path = route.path;
},
immediate: true
}
}
};
};
</script>
<style scoped>
.header {
.header {
position: relative;
box-sizing: border-box;
width: 100%;
height: 70px;
font-size: 22px;
color: #fff;
}
}
.collapse-btn {
.collapse-btn {
float: left;
padding: 0 15px 0 21px;
cursor: pointer;
line-height: 70px;
}
}
.header .logo {
.header .logo {
float: left;
padding-top: 19px;
vertical-align: middle;
font-size: 20px;
}
}
.header .logo img {
.header .logo img {
width: 84px;
height: 20px;
margin-top: -4px;
margin-right: 15px;
padding-left: 12px;
}
}
.header .logo>div {
.header .logo > div {
float: left;
height: 40px;
}
}
.header .logo p {
.header .logo p {
font-size: 12px;
text-align: center;
}
}
.header-right {
.header-right {
float: right;
padding-right: 50px;
}
}
.header-user-con {
.header-user-con {
display: flex;
height: 70px;
align-items: center;
}
}
.btn-fullscreen {
.btn-fullscreen {
transform: rotate(45deg);
margin-right: 5px;
font-size: 24px;
}
}
.changelang {
.changelang {
position: relative;
width: 90px;
height: 30px;
}
}
.btn-fullscreen {
.btn-fullscreen {
position: relative;
width: 30px;
height: 30px;
text-align: center;
border-radius: 15px;
cursor: pointer;
}
}
.btn-bell-badge {
.btn-bell-badge {
position: absolute;
right: 0;
top: -2px;
@@ -369,37 +375,36 @@
border-radius: 4px;
background: #f56c6c;
color: #fff;
}
}
.btn-bell .el-icon-bell {
.btn-bell .el-icon-bell {
color: #fff;
}
}
.user-name {
.user-name {
margin-left: 10px;
}
}
.user-avator {
.user-avator {
margin-left: 20px;
}
}
.user-avator img {
.user-avator img {
display: block;
width: 20px;
height: 20px;
}
}
.el-dropdown-link {
.el-dropdown-link {
color: #fff;
cursor: pointer;
}
}
.el-dropdown-menu__item {
.el-dropdown-menu__item {
text-align: center;
}
}
#colgreen {
#colgreen {
color: rgb(142, 150, 74);
}
}
</style>

View File

@@ -0,0 +1,403 @@
<template>
<div class="header">
<!-- 折叠按钮 -->
<div class="" @click="goHome" >
<i class="el-icon-s-home" style="font-size: 24px;line-height: 60px;color: #006699d1;"></i>
</div>
<div class="header-right">
<div class="header-user-con">
<div class="changelang">
<el-dropdown trigger="click" @command="chengelang">
<span class="el-dropdown-link">
language
<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="en">english</el-dropdown-item>
<el-dropdown-item command="zh">中文简体</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<!-- 全屏显示 -->
<div class="btn-fullscreen" @click="handleFullScreen">
<el-tooltip effect="dark" :content="fullscreen ? $t('system.noscreen') : $t('system.screen')" placement="bottom">
<i class="el-icon-rank"></i>
</el-tooltip>
</div>
<!-- 消息中心 -->
<!-- 身份切换 -->
<!-- <span style="font-size: 14px;margin-right: 8px;" v-if="this.user_cap.includes('author')">View as :</span>
<el-dropdown class="link_role" trigger="click" v-if="this.user_cap.includes('author')">
<span style="color: #fff;cursor: pointer;">
Author<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu :default-active="onRoutes" router slot="dropdown" style="cursor: pointer;">
<router-link :to="{path:'/dashboard'}">
<el-dropdown-item>Author</el-dropdown-item>
</router-link>
<router-link :to="{path:'/managing'}" v-if="this.user_cap.includes('chief')">
<el-dropdown-item>Editor-in-Chief</el-dropdown-item>
</router-link>
<router-link :to="{path:'/editorial'}" v-if="this.user_cap.includes(',board')">
<el-dropdown-item>Editorial board member</el-dropdown-item>
</router-link>
<router-link :to="{path:'/peerewer'}" v-if="this.user_cap.includes('reviewer')">
<el-dropdown-item>Reviewer</el-dropdown-item>
</router-link>
<router-link :to="{path:'/youthed'}" v-if="this.user_cap.includes('yboard')">
<el-dropdown-item>Young scientist member</el-dropdown-item>
</router-link>
</el-dropdown-menu>
</el-dropdown> -->
<!-- 用户头像 -->
<div class="user-avator" @click="skip_link()" v-if="hasorcie">
<el-tooltip class="item" effect="light" content="Link to Orcid" placement="bottom-end">
<img src="../../assets/img/orcid.png" />
</el-tooltip>
</div>
<div class="user-avator" @click="skip_check()" v-else>
<el-tooltip class="item" effect="light" content="Connect to ORCID" placement="bottom-end">
<img src="../../assets/img/orcno.png" />
</el-tooltip>
</div>
<!-- 用户名下拉菜单 -->
<el-dropdown class="user-name" trigger="click" @command="handleCommand">
<span class="el-dropdown-link">
{{ username }}
<i class="el-icon-caret-bottom"></i>
</span>
<el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item divided command="personcenter">Personal Center</el-dropdown-item> -->
<el-dropdown-item divided command="loginout">{{ $t('system.loyout') }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</div>
</template>
<script>
import bus from '../common/bus';
export default {
props: ['home'],
data() {
return {
collapse: false,
fullscreen: false,
name: 'unknown user',
message: 2,
hasorcie: false,
link_path: '',
user_id: localStorage.getItem('U_id'),
user_cap: localStorage.getItem('U_role'),
orcid: '',
orcidLink:
'https://orcid.org/oauth/authorize?client_id=APP-PKF0BGRP6DWM6FUB&response_type=code&scope=/authenticate&redirect_uri=https://submission.tmrjournals.com/orcidBind',
langArr: [
{
value: 'zh',
label: '中文'
},
{
value: 'en',
label: 'English'
}
],
curStartTime: '2019-07-31 08:00:00',
daojishi: '',
day: '0',
hour: '00',
min: '00',
second: '00'
};
},
created() {
this.initORCID();
if (this.user_id == 24) {
this.daojishi = '2021.9.3 - 2021.9.30';
this.curStartTime = '2021-10-01 00:00:00';
this.countTime();
}
if (this.user_id == 25) {
this.daojishi = '2021.9.6 - 2021.12.31';
this.curStartTime = '2022-01-01 00:00:00';
this.countTime();
}
},
computed: {
username() {
let username = localStorage.getItem('U_name');
return username ? username : this.name;
},
onRoutes() {
0;
return this.$route.path.replace('/', '');
},
userrole() {
let userrole = localStorage.getItem('U_status');
if (userrole == 1) {
return this.$t('total.author');
} else if (userrole == 2) {
return this.$t('total.editor');
} else if (userrole == 'admin') {
return this.$t('total.admin');
} else {
return this.$t('total.reviewers');
}
}
},
methods: {
goHome() {
this.$router.push('/');
},
// 用户名下拉菜单选择事件
handleCommand(command) {
// 个人中心
if (command == 'personcenter') {
this.$router.push('/percenter');
}
// 退出系统
if (command == 'loginout') {
localStorage.removeItem('U_role');
localStorage.removeItem('U_id');
localStorage.removeItem('U_name');
localStorage.removeItem('U_status');
localStorage.removeItem('ms_journal_alias');
this.$router.push('/login');
}
},
// 侧边栏折叠
collapseChage() {
this.collapse = !this.collapse;
bus.$emit('collapse', this.collapse);
},
//判断orcid
initORCID() {
this.$api
.post('api/user/checkOrcid', {
account: localStorage.getItem('U_name')
})
.then((res) => {
this.hasorcie = res.userinfo.orcid == '' ? false : true;
this.orcid = res.userinfo.orcid;
})
.catch((err) => {
console.log(err);
});
},
// 全屏事件
handleFullScreen() {
let element = document.documentElement;
if (this.fullscreen) {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
} else {
if (element.requestFullscreen) {
element.requestFullscreen();
} else if (element.webkitRequestFullScreen) {
element.webkitRequestFullScreen();
} else if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.msRequestFullscreen) {
// IE11
element.msRequestFullscreen();
}
}
this.fullscreen = !this.fullscreen;
},
//切换语言
chengelang(commond) {
localStorage.setItem('langs', commond);
this.$router.go(0);
},
skip_link() {
location.href = 'https://orcid.org/' + this.orcid;
},
skip_check() {
location.href = this.orcidLink;
},
// 倒计时
countTime() {
// 获取当前时间
let date = new Date();
let now = date.getTime();
// 设置截止时间
let endDate = new Date(this.curStartTime); // this.curStartTime需要倒计时的日期
let end = endDate.getTime();
// 时间差
let leftTime = end - now;
// 定义变量 d,h,m,s保存倒计时的时间
if (leftTime >= 0) {
// 天
this.day = Math.floor(leftTime / 1000 / 60 / 60 / 24);
// 时
let h = Math.floor((leftTime / 1000 / 60 / 60) % 24);
this.hour = h < 10 ? '0' + h : h;
// 分
let m = Math.floor((leftTime / 1000 / 60) % 60);
this.min = m < 10 ? '0' + m : m;
// 秒
let s = Math.floor((leftTime / 1000) % 60);
this.second = s < 10 ? '0' + s : s;
} else {
this.day = 0;
this.hour = '00';
this.min = '00';
this.second = '00';
}
// 等于0的时候不调用
if (Number(this.hour) === 0 && Number(this.day) === 0 && Number(this.min) === 0 && Number(this.second) === 0) {
return;
} else {
// 递归每秒调用countTime方法显示动态时间效果,
setTimeout(this.countTime, 1000);
}
}
},
mounted() {
if (document.body.clientWidth < 1000) {
this.collapseChage();
}
},
watch: {
$route: {
handler: function (route) {
this.link_path = route.path;
},
immediate: true
}
}
};
</script>
<style scoped>
.header {
background-color: #fff;
position: relative;
box-sizing: border-box;
width: 100%;
display: flex;
justify-content: space-between;
height: 60px;
padding: 0 20px;
color: #333639;
box-shadow: 0 2px 2px -2px rgba(34, 47, 62, 0.1), 0 8px 8px -4px rgba(34, 47, 62, 0.07);
border-bottom:1px solid #f0f0f0;
}
.collapse-btn {
float: left;
padding: 0 15px 0 21px;
cursor: pointer;
line-height: 60px;
}
.header .logo {
float: left;
padding-top: 19px;
vertical-align: middle;
font-size: 20px;
}
.header .logo img {
width: 84px;
height: 20px;
margin-top: -4px;
margin-right: 15px;
padding-left: 12px;
}
.header .logo > div {
float: left;
height: 40px;
}
.header .logo p {
font-size: 12px;
text-align: center;
}
.header-right {
float: right;
padding-right: 50px;
}
.header-user-con {
display: flex;
height: 60px;
align-items: center;
}
.btn-fullscreen {
transform: rotate(45deg);
margin-right: 5px;
font-size: 24px;
}
.changelang {
position: relative;
width: 90px;
height: 30px;
}
.btn-fullscreen {
position: relative;
width: 30px;
height: 30px;
text-align: center;
border-radius: 15px;
cursor: pointer;
}
.btn-bell-badge {
position: absolute;
right: 0;
top: -2px;
width: 8px;
height: 8px;
border-radius: 4px;
background: #f56c6c;
color: #333639;
}
.btn-bell .el-icon-bell {
color: #333639;
}
.user-name {
margin-left: 10px;
}
.user-avator {
margin-left: 20px;
}
.user-avator img {
display: block;
width: 20px;
height: 20px;
}
.el-dropdown-link {
color: #333639;
cursor: pointer;
}
.el-dropdown-menu__item {
text-align: center;
}
#colgreen {
color: rgb(142, 150, 74);
}
</style>

View File

@@ -1,23 +1,41 @@
<template>
<div class="wrapper">
<template v-if="!this.$route.meta.hideSidebar">
<v-head></v-head>
<v-sidebar></v-sidebar>
<div class="content-box" :class="{ 'content-collapse': collapse }">
<v-tags></v-tags>
<div class="content">
<transition name="move" mode="out-in">
<keep-alive :include="tagsList">
<router-view ></router-view>
<router-view></router-view>
</keep-alive>
</transition>
<el-backtop target=".content"></el-backtop>
</div>
</div>
</template>
<template v-else>
<v-head2 :home="true"></v-head2>
<div style="width: 100%;height: calc(100% - 62px);overflow: hidden;">
<div class="content" style="padding: 0;overflow: hidden;">
<!-- <transition name="move" mode="out-in"> -->
<!-- <keep-alive :include="tagsList"> -->
<router-view></router-view>
<!-- </keep-alive> -->
<!-- </transition> -->
<el-backtop target=".content"></el-backtop>
</div>
</div>
</template>
</div>
</template>
<script>
import vHead from './Header.vue';
import vHead2 from './Header2.vue';
import vSidebar from './Sidebar.vue';
import vTags from './Tags.vue';
import bus from './bus';
@@ -30,6 +48,7 @@ export default {
},
components: {
vHead,
vHead2,
vSidebar,
vTags
},

View File

@@ -636,6 +636,7 @@ export default {
}
},
created() {
localStorage.setItem('collapse', this.collapse);
if (this.userrole == 2) {
//其余的身份(显示作者)

View File

@@ -355,6 +355,11 @@ const en = {
},
commonTable: {
add: 'Add',
delete: 'Delete',
reply: 'Reply',
solve: 'Solve',
cancelsolve: 'Cancel resolved',
Resolved: 'Resolved',
preview: 'Preview',
link: 'Positioning',
Typed: 'Typed',
@@ -373,7 +378,10 @@ const en = {
removeAnnotations:'Are you sure you want to delete this Annotation?',
removeContent:'Are you sure you want to delete this content?',
reContent:'Are you sure you want to restore this content?',
uploadImageInfo:'Figures can only upload files in JPG, JPEG, and PNG formats!'
uploadImageInfo:'Figures can only upload files in JPG, JPEG, and PNG formats!',
selectComment:'Please select the text to add annotations to!',
selectWord:'Please select only a single word',
alreadyCommented:'There are already annotations in the text, please select again!'
},
pendingPayment:{
title:'Title',

View File

@@ -348,6 +348,11 @@ const zh = {
},
commonTable: {
add: '新增',
delete: '删除',
reply: '答复',
solve: '解决',
cancelsolve: '取消解决',
Resolved: '已解决',
preview: '预览',
positioning: '定位',
edit: '编辑',
@@ -366,7 +371,10 @@ const zh = {
removeAnnotations: '确定要删除这条批注吗?',
removeContent: '确定要删除这条内容吗?',
reContent: '确定要恢复这条内容吗?',
uploadImageInfo: 'Figures 只能上传 JPG、JPEG 和 PNG 格式的文件'
uploadImageInfo: 'Figures 只能上传 JPG、JPEG 和 PNG 格式的文件',
selectComment: '请选择要添加批注的文本',
selectWord:'请只选中单个单词!',
alreadyCommented:'文本中已有批注内容请重新选择',
},
pendingPayment: {
title: 'Title',

View File

@@ -270,12 +270,16 @@ export default {
},
// 跳转到图表编辑页面
goGenerateCharts(id) {
this.$router.push({
path: 'GenerateCharts',
window.open(this.$router.resolve({ path: '/GenerateCharts',
query: {
id: id
}
});
} }).href, '_blank');
// this.$router.push({
// path: 'GenerateCharts',
// query: {
// id: id
// }
// });
},
// 隐藏alert

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -215,6 +215,7 @@
localStorage.setItem('U_role', 'superadmin');
localStorage.setItem('U_name', res.userinfo.account);
localStorage.setItem('U_id', res.userinfo.user_id);
return false
// localStorage.setItem('U_id', res.userinfo.admin_id);
this.$router.push('/');
} else if (res.data.roles.includes('editor')) {

View File

@@ -1,6 +1,9 @@
<template>
<div>
<div class="tab_post">
<div class="tab_post" >
<div style="margin-bottom: 10px">
<p
v-if="feeStatus == 0"
@@ -50,7 +53,7 @@
<p v-else>
<el-button type="primary" plain @click="htmlContet()" style="width: auto; font-weight: bold; margin-top: 10px">
<i class="el-icon-document-copy" style="font-weight: bold; font-size: 14px"></i>
HTML Proofread
Text Proofread
</el-button>
</p>
@@ -94,7 +97,7 @@
<!-- 文章正文 -->
<!-- 参考文献 -->
<div :ref="tabsList[0].refName" class="scroll-item">
<div :ref="tabsList[0].refName" class="scroll-item" >
<div class="bor_style_onli">
<h4>{{ tabsList[0].name }}</h4>
<div class="liter_ture" v-if="0 == 2">
@@ -401,6 +404,7 @@ import { quillEditor } from 'vue-quill-editor';
import { Loading } from 'element-ui';
import timetalk from './time_talk';
export default {
props:['type'],
data() {
return {
feeStatus: null,
@@ -452,7 +456,7 @@ export default {
// rongCont: 'Modify the article body.'
// },
{
name: 'Html',
name: 'Text Proofread',
refName: 'setTwoRef',
rongCont: 'HTML layout.'
}
@@ -1668,12 +1672,11 @@ export default {
// 6----校对文章
htmlContet() {
this.$router.push({
path: '/GenerateCharts',
window.open(this.$router.resolve({ path: '/GenerateCharts',
query: {
id: this.$route.query.id
}
});
} }).href, '_blank');
},
// 6----修改时间为年月日

File diff suppressed because it is too large Load Diff

View File

@@ -103,7 +103,7 @@
<el-table-column type="index" label="No." width="55" align="center"></el-table-column>
<el-table-column label="state" width="55" align="center">
<template slot-scope="scope">
<span class="status ok" v-if="scope.row.refer_type == 'journal' && scope.row.doilink != '' || scope.row.refer_type == 'book' && scope.row.isbn != '' || scope.row.refer_type == 'other' && scope.row.refer_frag != '' && scope.row.refer_frag.length > 15" >
<span class="status ok" v-if="scope.row.refer_type == 'journal' && scope.row.doilink != '' || scope.row.refer_type == 'book' && scope.row.isbn != '' " >
<i class="el-icon-circle-check"></i>
</span>
<span class="status warn" v-else >

File diff suppressed because it is too large Load Diff

View File

@@ -56,8 +56,9 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="Major :" :required="true" prop="major_a">
<el-select
<el-form-item label="Research areas :" prop="major">
<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)"
@@ -99,7 +100,7 @@
:label="item.major_title"
:value="item.major_id"
></el-option>
</el-select>
</el-select> -->
</el-form-item>
<el-form-item label="Manuscript Title :" prop="title">
<el-input v-model="form.title" placeholder="Please enter title"></el-input>
@@ -966,6 +967,7 @@
export default {
data() {
return {
majorValueList:[],
baseUrl: this.Common.baseUrl,
usercap: localStorage.getItem('U_role'),
ms_alias: localStorage.getItem('ms_journal_alias'),
@@ -1196,9 +1198,19 @@ export default {
major: [
{
required: true,
message: 'Please select major',
trigger: 'blur'
validator: (rule, value, callback) => {
console.log('value at line 1202:', this.form);
var major=this.majorValueList.map(item => item.selectedValue[item.selectedValue.length - 1]).toString(',')
if (major=='') {
callback(new Error('Please select the Research areas'));
} else {
callback();
}
// 如果你需要在此处使用 this 访问 Vue 实例的数据,使用箭头函数保持上下文
// 其他逻辑
}
}
],
abstrart: [
{
@@ -2599,6 +2611,10 @@ export default {
// 点击进行下一步
onStep(e) {
console.log('this.majorValueList at line 2604:', this.majorValueList)
console.log('this.form at line 2622:', this.form)
this.$refs.articleform.validate((valid) => {
if (valid) {
if (e == 1) {
@@ -2617,7 +2633,13 @@ export default {
}
}
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
}
this.$api.post('api/Article/addArticlePart1', this.form).then((res) => {
if (res.code == 0) {
this.stagingID = res.data.article_id;
this.form.article_id = res.data.article_id;
@@ -2702,8 +2724,15 @@ export default {
fstr += flist[fu].ke.trim() + ',';
}
}
console.log('this.form at line 2707:', this.form)
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
}
this.$api.post('api/Article/addArticlePart1', this.form).then((res) => {
if (res.code == 0) {
this.stagingID = res.data.article_id;
this.form.article_id = res.data.article_id;
@@ -2840,44 +2869,48 @@ export default {
console.log(res.data.base);
// this.form.topics = res.data.base.topics
// 领域
this.$api
.post('api/Major/getMajorForAddArticle', {
journal_id: this.form.journal,
major_id: 1
})
.then((res) => {
this.majors_a = res.data.majors;
});
this.form.major_a = res.data.major.major_id;
this.$api
.post('api/Major/getMajorForAddArticle', {
journal_id: this.form.journal,
major_id: this.form.major_a
})
.then((ref) => {
this.majors_b = ref.data.majors;
this.majors_c = [];
this.form.major_b = '';
this.form.major_c = '';
this.majorChange_panduan();
if (res.data.major.child != undefined) {
this.form.major_b = res.data.major.child.major_id;
this.$api
.post('api/Major/getMajorForAddArticle', {
journal_id: this.form.journal,
major_id: this.form.major_b
})
.then((ref) => {
this.majors_c = ref.data.majors;
this.form.major_c = '';
this.majorChange_panduan();
if (res.data.major.child.child != undefined) {
this.form.major_c = res.data.major.child.child.major_id;
this.majorChange_panduan();
}
});
}
});
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', {
// journal_id: this.form.journal,
// major_id: 1
// })
// .then((res) => {
// this.majors_a = res.data.majors;
// });
// this.form.major_a = res.data.major.major_id;
// this.$api
// .post('api/Major/getMajorForAddArticle', {
// journal_id: this.form.journal,
// major_id: this.form.major_a
// })
// .then((ref) => {
// this.majors_b = ref.data.majors;
// this.majors_c = [];
// this.form.major_b = '';
// this.form.major_c = '';
// this.majorChange_panduan();
// if (res.data.major.child != undefined) {
// this.form.major_b = res.data.major.child.major_id;
// this.$api
// .post('api/Major/getMajorForAddArticle', {
// journal_id: this.form.journal,
// major_id: this.form.major_b
// })
// .then((ref) => {
// this.majors_c = ref.data.majors;
// this.form.major_c = '';
// this.majorChange_panduan();
// if (res.data.major.child.child != undefined) {
// this.form.major_c = res.data.major.child.child.major_id;
// this.majorChange_panduan();
// }
// });
// }
// });
// 关键词
let keyList = res.data.base.keywords.split(',');
this.keywordsList = [];

View File

@@ -108,6 +108,7 @@
</div>
</el-collapse-item>
</el-collapse>
<el-collapse class="auth_colla auth_collna_ew" style="margin-top: -15px">
<el-collapse-item name="2">
<template slot="title">
@@ -126,6 +127,42 @@
</p>
</el-collapse-item>
</el-collapse>
<el-collapse class="auth_colla auth_collna_ew" style="margin-top: -15px;">
<el-collapse-item title="Research areas" name="1" >
<div style="position: relative;height: 30px;">
<common-major
:articleId="editform.articleId"
@load="initMajor()"
style="position: absolute; top: 10px; right: 10px"
></common-major>
</div>
<div style="margin: 12px 20px 30px 0px; line-height: 24px; font-size: 14px; position: relative">
<div>
<!-- 统计数据 -->
<div class="join_link">
<!-- 如果你想投稿 请点击 -->
<p style="" v-for="(v, i) in majorsList">
<span style="color: #006699; font-weight: bold; margin-right: 10px"
>Field {{ i + 1 }}:</span
>{{ v.str
}}<i
class="el-icon-delete-solid"
style="color: #f56c6c !important; margin-left: 10px"
@click="handleDeleteMajor(v)"
></i>
</p>
<!-- 查看已投稿件列表 -->
</div>
</div>
</div>
</el-collapse-item>
</el-collapse>
</div>
<div class="art_file_">
@@ -193,7 +230,7 @@
<i class="el-icon-download download"></i>
</a>
</a> -->
<a v-for="item in manuscirptFileList" :href="mediaUrl + item.file_url" >
<a v-for="item in manuscirptFileList" :href="mediaUrl + item.file_url">
<img src="../../assets/img/icon_0.png" />
<span>
<font>Uploader : </font>{{ form.username }}
@@ -241,12 +278,8 @@
</el-col>
</el-row>
</div>
<common-word-html
:articleId="$route.query.id"
style=" box-sizing: border-box"
></common-word-html>
<common-word-html :articleId="$route.query.id" style="box-sizing: border-box"></common-word-html>
</div>
<!-- 被拒稿件操作 --->
<div class="art_caozuo_" v-if="opname == 'rejectArticles'">
@@ -626,6 +659,7 @@ export default {
ad_content: ''
},
talkMsgs: [],
majorsList: [],
opname: '', // 稿件详细类型
editorJournalList: [], // 编辑期刊列表
resubmitJournal: {
@@ -805,7 +839,7 @@ export default {
});
},
openDrawer(data, url) {
console.log('url at line 799:',data, url)
console.log('url at line 799:', data, url);
this.previewData = {
...data,
previewUrl: url,
@@ -899,7 +933,29 @@ export default {
return { status: status, msg: msg };
},
handleDeleteMajor(v) {
console.log('v at line 925:', v);
this.$confirm('Are you sure you want to delete this Field ?', 'Tip', {
type: 'warning'
})
.then(() => {
this.$api
.post('api/Major/delMajorByArticleIdForEditor', {
mta_id: v.mta_id
})
.then((res) => {
if (res.code == 0) {
this.initMajor();
} else {
this.$message.error(res.msg);
}
})
.catch((err) => {
this.$message.error(err);
});
})
.catch(() => {});
},
//修改文章状态
async saveEdit() {
if (this.form.state == 0) {
@@ -948,7 +1004,16 @@ export default {
this.$router.go(0);
});
},
initMajor() {
this.$api
.post('api/Major/getMajorByArticleId', {
article_id: this.editform.articleId
})
.then((res) => {
console.log('res at line 978:', res);
this.majorsList = res.data.majors;
});
},
//初始化期刊信息
initarticle() {
this.now_year = new Date().getFullYear();
@@ -957,7 +1022,9 @@ export default {
articleId: this.editform.articleId,
human: 'editor'
})
.then((res) => {
this.initMajor();
this.form.username = res.article.account;
this.form.title = res.article.title;
this.form.journal = res.article.journal_id;

View File

@@ -961,7 +961,7 @@
"
>
<el-button type="primary" @click="saveUserIndex(userIndexForm)" style="float: right">{{ $t('citeList.save') }}</el-button>
<el-button style="float: right; margin-right: 20px">{{ $t('citeList.cancel') }}</el-button>
<el-button style="float: right; margin-right: 20px" @click="aiSorbox=false">{{ $t('citeList.cancel') }}</el-button>
</div>
</el-drawer>

View File

@@ -420,11 +420,13 @@
<!-- 参考文献 -->
<div :ref="tabsList[3].refName" class="scroll-item">
<div class="bor_style_onli">
<h4>{{tabsList[3].name}}</h4>
<div class="liter_ture">
<PreIngestedEditorProduce type="produce" v-if="detailMes.article_id&&p_article_id" :article_id="detailMes.article_id" :p_article_id="p_article_id"></PreIngestedEditorProduce>
<!--<div class="liter_ture">
<div class="chanSelLef">
<!-- 1 -->
<div :class="showB_step ==1?'C_style':''">
<h3><span>1</span>Check References and Doi</h3>
<div v-if="showB_step ==1">
@@ -454,7 +456,7 @@
</div>
</div>
<!-- 2 -->
<div :class="showB_step ==2?'C_style':''">
<h3><span>2</span>Check Standard</h3>
<div v-if="showB_step ==2">
@@ -532,8 +534,7 @@
</div>
</div>
<br clear="both">
<!-- <p v-if="this.chanFerForm==''" style="text-align: center;color: #999;margin-top: 50px;">No references</p> -->
<!-- 进度条 -->
<div v-if="refProcess==1" class="RefProBar">
<div>
<el-progress :text-inside="true" :stroke-width="24" :percentage="refReal"
@@ -544,7 +545,7 @@
</p>
</div>
</div>
</div>
</div> -->
</div>
</div>
@@ -828,12 +829,15 @@
import 'quill/dist/quill.core.css';
import 'quill/dist/quill.snow.css';
import 'quill/dist/quill.bubble.css';
import {
quillEditor
} from 'vue-quill-editor';
import {
Loading
} from 'element-ui';
import PreIngestedEditorProduce from './PreIngestedEditorProduce.vue'
export default {
data() {
return {
@@ -2738,7 +2742,7 @@
},
},
components: {
quillEditor
quillEditor,PreIngestedEditorProduce
},
}
</script>

View File

@@ -197,7 +197,7 @@ export default {
getDate() {console.log('at line 189:',localStorage.getItem('U_pointJour') )
this.$api
.post('api/Article/getJournal', {
// username: this.query.username
username: this.query.username
})
.then((res) => {
this.jourList = res;

View File

@@ -50,14 +50,14 @@
<p v-html="scope.row.title"></p>
</template>
</el-table-column>
<el-table-column label="Cite" width="100px" align="center">
<el-table-column label="Cite" width="80px" align="center">
<template slot-scope="scope">
<p style="cursor: pointer; color: #006699 !important" @click="goCite(scope.row)">
{{ scope.row.cite_num ? scope.row.cite_num.length : 0 }}
<span style="margin-left: 4px; cursor: pointer; color: #006699 !important; font-weight: bold">
<!-- <span style="margin-left: 4px; cursor: pointer; color: #006699 !important; font-weight: bold">
<i class="el-icon-edit"></i>
</span>
</span> -->
</p>
</template>
</el-table-column>
@@ -80,14 +80,37 @@
<p v-html="scope.row.sort"></p>
</template>
</el-table-column>
<el-table-column label="" width="190px" align="center">
<el-table-column label="" width="220px" align="center">
<template slot-scope="scope">
<el-button size="mini" type="primary" plain icon="el-icon-edit" @click="EditDetail(scope.row)"> Edit</el-button>
<el-button size="mini" type="primary" plain icon="el-icon-notebook-2" @click="htmlContet(scope.row)"> Html</el-button>
<p style="margin-top: 10px">
<el-button size="mini" type="primary" plain icon="el-icon-tickets" @click="ChoseRelated(scope.row)">
Relevant</el-button
<p style="display: flex; align-items: center; justify-content: space-around">
<el-button
size="small"
type="primary"
plain
@click="EditDetail(scope.row)"
style="padding: 4px 10px !important; float: left"
>
<i class="el-icon-edit"></i> Edit</el-button
>
 <el-dropdown :hide-on-click="false" style="">
 
<span class="el-dropdown-link">     More operations<i class="el-icon-arrow-down el-icon--right"></i>   </span>  
<el-dropdown-menu slot="dropdown">
   
<el-dropdown-item
><p @click="htmlContet(scope.row)"><i class="el-icon-notebook-2"></i>Html</p></el-dropdown-item
>
       
<el-dropdown-item divided
><p @click="goCite(scope.row)"><i class="el-icon-edit"></i>Cite</p>
</el-dropdown-item>
   
<el-dropdown-item divided>
<p @click="ChoseRelated(scope.row)"><i class="el-icon-tickets"></i>Relevant</p>
</el-dropdown-item>
 
</el-dropdown-menu>
</el-dropdown>
</p>
</template>
</el-table-column>
@@ -281,12 +304,12 @@
<span style="margin-left: 15px; color: #0b4b6a" v-if="mains != ''">Typesetting completed</span>
<template v-if="mains != ''">
<el-button
v-if="html_type == 2&&tg_article_id!=0"
v-if="html_type == 2 && tg_article_id != 0"
type="primary"
plain
icon="el-icon-document-copy"
@click.stop
@click=" htmlLayout2()"
@click="htmlLayout2()"
style="margin-left: 20px"
>
<font>Edit Html Proofread</font>
@@ -367,10 +390,12 @@
</div>
<div class="titHtml titHtml1" v-if="htmlContent && html_type == 2">
<common-word
:readonly="true"
:isPreview="true"
v-if="htmlContent"
ref="commonWord"
:value="htmlContent"
:contentList="mains"
:wordStyle="wordStyle"
style="width: calc(100%); height: 50vh"
:style="`100%`"
@@ -1001,104 +1026,71 @@ export default {
});
},
getWord() {
var htmlContent = ``;
htmlContent += this.mains
.map((item) => {
//批注
let contentHtml = '';
var isRemark = ``;
// var htmlContent = ``;
// htmlContent += this.mains
// .map((item) => {
// //批注
// let contentHtml = '';
// var isRemark = ``;
// 判断是否是图片
if (item.type == 1) {
var extension = item.image.url.split('.').pop().toLowerCase();
if (extension == 'tif') {
contentHtml = `
<p contenteditable="false" main-state="${item.state}" class="MaxPicture pMain" data-id="${item.ami_id}" main-id="${
item.am_id
}">
<img src="" data-img-id="${item.ami_id}" style="width: ${item.width ? `${item.width}px` : '100%'}" />
<font class="font" style="width: ${item.width ? `${item.width}px` : '100%'}">${item.image.note ? item.image.note : ''}</font>
</p>
`;
} else if (['jpg', 'jpeg', 'png'].includes(extension)) {
contentHtml = `
<p contenteditable="false" main-state="${item.state}" class="MaxPicture pMain" data-id="${
item.ami_id
}" main-id="${item.am_id}">
${isRemark}
<img src="${this.mediaUrl + item.image.url}" style="width: ${
item.width ? `${item.width}px` : '100%'
}" />
<font class="font" style="width: ${item.width ? `${item.width}px` : '100%'}" >${
item.image.note ? item.image.note : ''
}</font>
</p>
`;
} else {
contentHtml = `
<p contenteditable="false" main-state="${item.state}" class="MaxPicture pMain" data-id="${
item.ami_id
}" main-id="${item.am_id}">
${isRemark}
<span
style="
text-align: center;
font-size: 30px;
display: flex;
align-items: center;
justify-content: center;
"
>
Figures ( .${item.image.url.split('.').pop().toUpperCase()})
</span>
// // 判断是否是图片
// if (item.type == 1) {
// contentHtml = `
// <p contenteditable="false" main-state="${item.state}" class="MaxPicture pMain" data-id="${
// item.ami_id
// }" main-id="${item.am_id}">
// ${isRemark}
// <img src="${this.mediaUrl +'articleImage/'+ item.image.url}" style="width: ${
// item.width ? `${item.width}px` : '100%'
// }" />
// <font class="font" style="width: ${item.width ? `${item.width}px` : '100%'}" >${
// item.image.note ? item.image.note : ''
// }</font>
// </p>
// `;
// } else if (item.type == 2) {
// var tableList = JSON.parse(item.table.table_data);
<font class="font" style="width: ${item.width ? `${item.width}px` : '100%'}" >${
item.image.note ? item.image.note : ''
}</font>
</p>
`;
}
} else if (item.type == 2) {
var tableList = JSON.parse(item.table.table_data);
// contentHtml = `
// <div contenteditable="false" data-id="${item.amt_id}" main-state="${item.state}" main-id="${
// item.am_id
// }" class="thumbnailTableBox wordTableHtml table_Box pMain" style="width: 100%; padding: 8px 15px; box-sizing: border-box; border-radius: 4px; position: relative;">
// ${isRemark}
// <font class="font tableTitle" style="width:100%" >${item.table.title ? item.table.title : ''}</font>
// <table border="1" style="width: auto; border-collapse: collapse; text-align: center; ">
// ${tableList
// .map((row) => {
// return `
// <tr>
// ${row
// .map((cell) => {
// return `
// <td colspan="${cell.colspan || 1}" rowspan="${cell.rowspan || 1}">
// <span>${cell.text || ''}</span>
// </td>
// `;
// })
// .join('')} <!-- join the cells in the row -->
// </tr>
// `;
// })
// .join('')} <!-- join the rows -->
// </table>
// <font class="font" style="width:100%" >${item.table.note ? item.table.note : ''}</font>
// </div>
// `;
// } else {
contentHtml = `
<div contenteditable="false" data-id="${item.amt_id}" main-state="${item.state}" main-id="${
item.am_id
}" class="thumbnailTableBox wordTableHtml table_Box pMain" style="width: 100%; padding: 8px 15px; box-sizing: border-box; border-radius: 4px; position: relative;">
${isRemark}
<font class="font tableTitle" style="width:100%" >${item.table.title ? item.table.title : ''}</font>
<table border="1" style="width: auto; border-collapse: collapse; text-align: center; ">
${tableList
.map((row) => {
return `
<tr>
${row
.map((cell) => {
return `
<td colspan="${cell.colspan || 1}" rowspan="${cell.rowspan || 1}">
<span>${cell.text || ''}</span>
</td>
`;
})
.join('')} <!-- join the cells in the row -->
</tr>
`;
})
.join('')} <!-- join the rows -->
</table>
<font class="font" style="width:100%" >${item.table.note ? item.table.note : ''}</font>
</div>
`;
} else {
contentHtml = `<p class="pMain" main-state="${item.state}" contenteditable="false" data-id="${item.am_id}" main-id="${item.am_id}">${isRemark}${item.content}</p>`;
}
// contentHtml = `<p class="pMain" main-state="${item.state}" contenteditable="false" data-id="${item.am_id}" main-id="${item.am_id}">${isRemark}${item.content}</p>`;
// }
// 判断是否是表格类型
// // 判断是否是表格类型
// return contentHtml;
// })
// .join('');
this.htmlContent = 'true';
return contentHtml;
})
.join('');
this.htmlContent = htmlContent;
},
getMainsInfo2(e) {
this.loadHtml = true;
@@ -1109,11 +1101,12 @@ export default {
.then((res) => {
this.loadHtml = false;
if (res.code == 0) {
// console.log(res,'res')
console.log(res,'res')
this.mains = '';
if (res.data.list.length > 0) {
this.mains = res.data.list;
console.log('this.mains at line 1108:', this.mains)
this.getWord();
} else {
this.mains = '';
@@ -1156,26 +1149,29 @@ export default {
},
// 文章html弹出层
async htmlContet(e) {
console.log('e at line 1151:', e)
this.htmlContent=''
this.articleId = e.article_id;
this.tg_article_id = e.tg_article_id;
// this.articleId = '3444';
this.UpHtpFIle.article_id = e.article_id;
this.refersList = await this.getRefersList();
// this.UpHtpFIle.refers = e.refers
this.UpHtpFIle.p_article_id = e.p_article_id;
this.UpHtpFIle.doi = e.doi;
this.UpHtpFIle.htmlfile = e.file_html;
this.UpHtpFIle.title = e.title;
this.UpHtpFIle.mains = e.mains;
this.UpLoadFile.article_id = e.article_id;
this.html_type = e.html_type;
// this.html_type = 2;
await this.$api
.post('api/Publish/getPublishArticleDetail', {
article_id: e.article_id
})
.then(async (res) => {
if (res.code == 0) {
console.log('res.code at line 1148:', res.code);
this.html_type = res.data.detail.html_type;
if (this.html_type == 2) {
if (e.has_html == 1) {
if ( res.data.detail.has_html == 1) {
await this.getMainsInfo2();
this.HtmlVisible = true;
} else {
this.mains = '';
@@ -1185,8 +1181,10 @@ export default {
await this.getMainsInfo(e);
this.HtmlVisible = true;
}
},
}
});
},
// 生成html
// CreateHtml(){
// const loading = this.$loading({
@@ -1206,6 +1204,7 @@ export default {
// this.htmlLayout()
// }
// })
// },
// 修改文章html
async htmlLayout2(type) {
@@ -1217,16 +1216,21 @@ export default {
background: 'rgba(0, 0, 0, 0.7)'
});
await this.creatMains();
this.html_type = 2;
await this.getMainsInfo2();
loading.close();
} else {
this.HtmlVisible = false;
this.$router.push({
path: '/GenerateCharts',
window.open(this.$router.resolve({ path: '/GenerateCharts',
query: {
id: this.tg_article_id
}
});
} }).href, '_blank');
// this.$router.push({
// path: '/GenerateCharts',
// query: {
// id: this.tg_article_id
// }
// });
}
},
htmlLayout() {

View File

@@ -4,7 +4,7 @@
<el-breadcrumb separator="/">
<el-breadcrumb-item>
<i class="el-icon-lx-calendar"></i>
<router-link :to="{path:'/articleList'}">
<router-link :to="{ path: '/articleList' }">
<span class="top_dao"> Manuscript list</span>
</router-link>
>> Manuscript process
@@ -12,68 +12,86 @@
</el-breadcrumb>
</div>
<div class="container_state">
<p style="color: #888;margin: 10px 0 5px 0;">ID : {{artMes.accept_sn}}</p>
<p style="font-size: 16px;font-weight: bolder;letter-spacing: -0.5px;">
<p style="color: #888; margin: 10px 0 5px 0">ID : {{ artMes.accept_sn }}</p>
<p style="font-size: 16px; font-weight: bolder; letter-spacing: -0.5px">
<!-- <span class="art_type">{{ellType(artMes.type)}}</span> -->
{{artMes.title}}
{{ artMes.title }}
</p>
<!-- <p style="color: #7f8790;margin: 10px 0 0 0;">Follow the progress of your submission.</p> -->
<div class="tit_head">
Status : <b style="margin: 0 50px 0 0;">{{statetostr(artMes.laststate)}}</b>
Journal : <b>{{artMes.journalname}}</b>
Status : <b style="margin: 0 50px 0 0">{{ statetostr(artMes.laststate) }}</b> Journal : <b>{{ artMes.journalname }}</b>
</div>
<div class="tit_head" v-if="artMes.majors&&artMes.majors.length>0">
<b style="margin: 0 50px 0 0;font-size: 20px;">Research areas</b>
<div style="margin-top: 10px;">
<p style="" v-for="(v, i) in artMes.majors">
<span style="color: #333; margin-right: 10px">Field {{ i + 1 }}:</span>{{ v.str
}}
</p>
</div>
</div>
<el-row :gutter="30">
<el-col :span="15">
<div class="process_new">
<!-- <p style="width: 100%;height: 1px;background-color: #eee;margin: 35px 0 30px 0;"></p> -->
<h2 style="font-size: 18px;margin: 0 0 10px 0;float: left;letter-spacing: -0.8px;">Manuscript
Tracking</h2>
<h2 style="font-size: 18px; margin: 0 0 10px 0; float: left; letter-spacing: -0.8px">Manuscript Tracking</h2>
<!-- <div class="radio" style="float: right;">
<el-radio-group v-model="reverse">
<el-radio-button :label="false">Ascending</el-radio-button>
<el-radio-button :label="true">Descending</el-radio-button>
</el-radio-group>
</div> -->
<br clear="both">
<br clear="both" />
<el-timeline :reverse="reverse" class="author_tree">
<el-timeline-item v-for="(item, index) in prossMsgs" :icon="item.icon" :color="item.color"
size="large" :key="index" :timestamp="formatDate(item.ctime)" placement="top" v-if="item.ftype == 0">
<el-timeline-item
v-for="(item, index) in prossMsgs"
:icon="item.icon"
:color="item.color"
size="large"
:key="index"
:timestamp="formatDate(item.ctime)"
placement="top"
v-if="item.ftype == 0"
>
<el-card>
<p>
<font>{{ statetostr(item.state_to) }}</font>
<!-- 提交 -->
<font v-if="item.state_to==-1">
<font v-if="item.state_to == -1">
<!-- : <font style="margin-left: 5px;">First submitted to <b>{{artMes.journalname}}</b></font> -->
</font>
<!-- 给编辑 -->
<font v-if="item.state_to==1">
<font v-if="item.state_to == 1">
<!-- : <b style="margin-left: 5px;"> Submission checks complete</b> -->
</font>
<!-- 审查中 -->
<font v-if="item.state_to==2">
<font v-if="item.state_to == 2">
<!-- : <b style="margin-left: 5px;"> Editor assigned</b> -->
</font>
<!-- 拒绝 -->
<font v-if="item.state_to==3">
<font v-if="item.state_to == 3">
<!-- : <b> Reject manuscript</b> -->
</font>
<!-- 修改 -->
<font v-if="item.state_to==4">
<font v-if="item.state_to == 4">
:
<router-link
:to="{path:'/articleProcessRevision',query:{id:artMes.article_id}}"
v-if="item.back==1">
<b style="margin-left: 5px;color: #006699;text-decoration: underline;">Upload
Major Revision</b>
:to="{ path: '/articleProcessRevision', query: { id: artMes.article_id } }"
v-if="item.back == 1"
>
<b style="margin-left: 5px; color: #006699; text-decoration: underline"
>Upload Major Revision</b
>
</router-link>
<b style="margin-left: 5px;color: #888;text-decoration: underline;"
v-if="item.back==0">
<b style="margin-left: 5px; color: #888; text-decoration: underline" v-if="item.back == 0">
Upload Major Revision (Completed)
</b>
</font>
<!-- 接收 -->
<font v-if="item.state_to==5">
<font v-if="item.state_to == 5">
<!-- : <b style="margin-left: 5px;"> Successfully received manuscript</b> -->
</font>
</p>
@@ -102,88 +120,76 @@
<!-- 对话列表 -->
<div class="kuang_communtion">
<h2>
Communication
</h2>
<h2>Communication</h2>
<div v-for="item in talkMsgs" class="kuang_communtion_conmt">
<div v-if="item.user_id != artMes.user_id" class="talk_aued">
<p>
Editor :
</p>
<p>Editor :</p>
<el-card>
<p style="white-space: pre-wrap;">{{ item.ad_content }}</p>
<p style="white-space: pre-wrap">{{ item.ad_content }}</p>
</el-card>
<b>{{formatDate(item.ad_ctime)}}</b>
<b>{{ formatDate(item.ad_ctime) }}</b>
</div>
<div v-if="item.user_id == artMes.user_id" class="talk_aued talk_edit">
<p>
Author :
</p>
<p>Author :</p>
<el-card>
<p style="white-space: pre-wrap;">{{ item.ad_content }}</p>
<p style="white-space: pre-wrap">{{ item.ad_content }}</p>
</el-card>
<b>{{formatDate(item.ad_ctime)}}</b>
<b>{{ formatDate(item.ad_ctime) }}</b>
</div>
</div>
<div class="kuang_communtion_input">
<p v-if="talkMsgs"></p>
<span class="text_bor_ghu">
<el-input type="textarea" rows="3" v-model="msgform.ad_content"
placeholder="You can initiate short conversations with the editor." resize="none">
<el-input
type="textarea"
rows="3"
v-model="msgform.ad_content"
placeholder="You can initiate short conversations with the editor."
resize="none"
>
</el-input>
<el-button type="primary" @click="saveMsg">Send</el-button>
</span>
<font style="font-size: 12px;color: #999;padding:12px 5px 0 5px;display: block;">
This column is served as an instant correspondence between the editor and authors,
aiming to acquire a faster
way of communication than E-Mail. If you have any questions, please start the instant
corresponding, and the
editors will reply to you in 24 hours.
<br>
<font style="color: #006699;">Please Attention</font>
<br>
<font style="color: #006699;">1.</font> If you need to send files as attachments, please
send them to
<font style="font-size: 12px; color: #999; padding: 12px 5px 0 5px; display: block">
This column is served as an instant correspondence between the editor and authors, aiming to acquire a
faster way of communication than E-Mail. If you have any questions, please start the instant corresponding,
and the editors will reply to you in 24 hours.
<br />
<font style="color: #006699">Please Attention</font>
<br />
<font style="color: #006699">1.</font> If you need to send files as attachments, please send them to
tmr@tmrjournals.com
<br>
<font style="color: #006699;">2.</font> Please do not upload the primary documents like
the cover letter, the
reply to the reviewer comments,
etc.
<br />
<font style="color: #006699">2.</font> Please do not upload the primary documents like the cover letter, the
reply to the reviewer comments, etc.
</font>
</div>
</div>
<p style="line-height: 20px;color: #999;padding: 0 15px 0 15px;">
We encourage authors to upload a Cover Letter file and make sure the Highlights part in the main
manuscript is
after the abstract and keywords. That will help authors let editors quickly obtain information
and evaluate the
scientific value of their research correctly.
<br>Please remind our editor in the cover letter if you want your manuscript processed quickly.
<br>Please note that manuscripts with at least one of the following characteristics will be
included in the
journal's manuscript fast track:
<br>
<font style="color: #006699;">1.Interest:</font> This manuscript has a novel perspective.
<br>
<font style="color: #006699;">2.Importance:</font> This manuscript belongs to the focus area.
<br>
<font style="color: #006699;">3.Value:</font> This manuscript belongs to the advanced topic and
can attract wide
<p style="line-height: 20px; color: #999; padding: 0 15px 0 15px">
We encourage authors to upload a Cover Letter file and make sure the Highlights part in the main manuscript is after
the abstract and keywords. That will help authors let editors quickly obtain information and evaluate the scientific
value of their research correctly.
<br />Please remind our editor in the cover letter if you want your manuscript processed quickly. <br />Please note
that manuscripts with at least one of the following characteristics will be included in the journal's manuscript
fast track:
<br />
<font style="color: #006699">1.Interest:</font> This manuscript has a novel perspective.
<br />
<font style="color: #006699">2.Importance:</font> This manuscript belongs to the focus area.
<br />
<font style="color: #006699">3.Value:</font> This manuscript belongs to the advanced topic and can attract wide
attention.
</p>
</el-col>
</el-row>
</div>
<el-dialog title="Message" :visible.sync="editVisible" width="40%">
<el-form ref="msgform" :model="msgform" label-width="80px">
<el-form-item label="Message">
<el-input type="textarea" rows="5" v-model="msgform.content" placeholder="Author messages">
</el-input>
<el-input type="textarea" rows="5" v-model="msgform.content" placeholder="Author messages"> </el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@@ -194,7 +200,7 @@
</template>
<script>
export default {
export default {
data() {
return {
baseUrl: this.Common.baseUrl,
@@ -224,12 +230,10 @@
saveloading: false
};
},
created: function() {
created: function () {
this.initarticle();
},
computed: {
},
computed: {},
methods: {
//初始化文章信息
initarticle() {
@@ -239,45 +243,45 @@
human: 'author'
})
.then((res) => {
let back_num = 0
let back_num = 0;
// 添加投递稿件条目
res.msg.unshift({
state_to: -1,
ctime: res.article.ctime,
color: '#B5C334',
icon: 'el-icon-collection-tag',
ftype: 0,
ftype: 0
});
for (let i = res.msg.length - 1; i >= 0; i--) {
if (res.msg[i].state_to == 4 && res.msg[i + 1] == undefined && back_num == 0) {
res.msg[i].back = 1;
back_num = 1
back_num = 1;
} else {
res.msg[i].back = 0;
}
if (res.msg[i].state_to == 1) {
res.msg[i].color = '#f75822'
res.msg[i].icon = 'el-icon-document-checked'
res.msg[i].color = '#f75822';
res.msg[i].icon = 'el-icon-document-checked';
}
if (res.msg[i].state_to == 2) {
res.msg[i].color = '#0ebee1'
res.msg[i].icon = 'el-icon-document'
res.msg[i].color = '#0ebee1';
res.msg[i].icon = 'el-icon-document';
}
if (res.msg[i].state_to == 3) {
res.msg[i].color = '#888'
res.msg[i].icon = 'el-icon-close'
res.msg[i].color = '#888';
res.msg[i].icon = 'el-icon-close';
}
if (res.msg[i].state_to == 4) {
res.msg[i].color = '#5a90e1'
res.msg[i].icon = 'el-icon-edit-outline'
res.msg[i].color = '#5a90e1';
res.msg[i].icon = 'el-icon-edit-outline';
}
if (res.msg[i].state_to == 5) {
res.msg[i].color = '#91cc75'
res.msg[i].icon = 'el-icon-check'
res.msg[i].color = '#91cc75';
res.msg[i].icon = 'el-icon-check';
}
if (res.msg[i].state_to == 6) {
res.msg[i].color = '#27727B'
res.msg[i].icon = 'el-icon-star-off'
res.msg[i].color = '#27727B';
res.msg[i].icon = 'el-icon-star-off';
}
}
this.artMes = res.article;
@@ -335,11 +339,10 @@
return false;
}
this.loading = true;
this.$api.post('api/Article/pushArticleDialog', this.msgform)
.then((res) => {
this.$api.post('api/Article/pushArticleDialog', this.msgform).then((res) => {
this.loading = false;
this.$message.success('Sent successfully');
this.initarticle()
this.initarticle();
});
},
@@ -379,7 +382,7 @@
ellType(e) {
let frag = '';
switch (e) {
case "A":
case 'A':
frag = 'Article';
break;
case 'B':
@@ -446,121 +449,117 @@
frag = 'Others';
}
return frag;
},
},
filters: {
}
};
},
filters: {}
};
</script>
<style>
.top_dao:hover {
.top_dao:hover {
text-decoration: underline;
cursor: pointer;
}
}
.process_new {
.process_new {
border: 1px solid #dcdfe6;
padding: 20px;
background-color: #fff;
border-radius: 5px;
}
}
.art_type {
.art_type {
/* background-color: #ddeef7; */
color: #006699;
padding: 2px 5px;
border-radius: 5px;
font-size: 12px;
margin: 0 10px 0 0;
}
}
.tit_head {
.tit_head {
border-radius: 5px;
border: 1px solid #EBEEF5;
border: 1px solid #ebeef5;
padding: 20px;
font-size: 15px;
margin: 20px 0 30px 0;
background-color: #fff;
/* background-color: #fcfcfc; */
}
}
.tit_head b {
.tit_head b {
color: #006699;
/* text-decoration: underline; */
}
}
.el-radio-button__orig-radio:checked+.el-radio-button__inner {
.el-radio-button__orig-radio:checked + .el-radio-button__inner {
background-color: #006699;
border-color: #006699;
}
}
.author_tree {
.author_tree {
margin: 40px 0 0 10px;
}
}
.author_tree .el-timeline-item {
.author_tree .el-timeline-item {
padding-bottom: 1px;
}
}
.author_tree .el-timeline-item__node--large {
.author_tree .el-timeline-item__node--large {
left: 155px;
width: 30px;
height: 30px;
}
}
.author_tree .el-timeline-item__wrapper {
.author_tree .el-timeline-item__wrapper {
padding-left: 0;
margin: 0 0 50px 0;
}
}
.author_tree .el-timeline-item__timestamp.is-top {
.author_tree .el-timeline-item__timestamp.is-top {
padding-top: 10px;
margin-bottom: 13px;
font-size: 14px;
}
}
.author_tree .el-timeline-item__content {
.author_tree .el-timeline-item__content {
margin: -50px 0 0 210px;
}
}
.author_tree .el-timeline-item__tail {
.author_tree .el-timeline-item__tail {
height: auto;
bottom: 15px;
top: 45px;
border-left: 3px solid #E4E7ED;
border-left: 3px solid #e4e7ed;
/* border-left: 2px solid #66a3c2; */
left: 168px;
}
}
.art_process_ {
.art_process_ {
margin-bottom: 30px;
border: 1px solid #dcdfe6;
padding: 20px;
background-color: #fff;
border-radius: 5px;
}
}
.art_process_>h2 {
.art_process_ > h2 {
font-size: 18px;
margin: 0 0 2px 0;
letter-spacing: -0.8px;
}
}
.art_process_list {
.art_process_list {
border-bottom: 1px solid #dcdfe6;
padding: 15px 0 25px 10px;
}
}
.art_process_ .art_process_list:last-child {
.art_process_ .art_process_list:last-child {
border-bottom: 0;
padding-bottom: 5px;
}
}
.art_process_list b {
.art_process_list b {
background-color: #006699;
color: #fff;
display: inline-block;
@@ -569,15 +568,14 @@
line-height: 18px;
text-align: center;
margin: 0 10px 0 0;
}
}
.art_process_list span {
.art_process_list span {
color: #888;
margin: 0 0 0 15px;
}
}
.art_process_list p {
.art_process_list p {
margin: 10px 0 0 28px;
}
}
</style>

View File

@@ -1022,13 +1022,14 @@ export default {
str = 'With reviewer';
break;
case 1:
str = 'Revision';
str = 'Major';
break;
case 2:
str = 'Reject';
break;
case 3:
str = 'Accept';
// str = 'Accept';
str = 'Minor';
break;
}
return str;

View File

@@ -0,0 +1,299 @@
<template>
<div style="height: 98%;">
<div class="crumbs">
<el-breadcrumb separator="/">
<el-breadcrumb-item> <i class="el-icon-document-copy"></i> Artcile Html
<el-button size="mini" style="position: absolute;right: 40px;" @click="goEdit">Edit</el-button>
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="container" style="height: 97%; min-width: 1000px; background-color: #fafafa; padding: 10px 0 0 0">
<common-word
:readonly="true"
v-if="htmlContent"
ref="commonWord"
:value="htmlContent"
:wordStyle="wordStyle"
style="width: calc(100%); height: calc(100%); "
:style="`100%`"
></common-word>
</div>
</div>
</template>
<script>
import { mediaUrl } from '@/common/js/commonJS.js'; // 引入通用逻辑
export default {
data() {
return {
wordStyle: `
p {
position: relative;
padding: 8px 15px;
min-height: 22px;
border: 2px dashed #fff;
border-radius: 5px;
color: #606266;
}
p {
font-size: 14px;
line-height: 22px;
}
.imgBox .chNumer {
position: absolute;
top: -2px;
right: -1px;
border-radius: 3px;
font-size: 10px;
background-color: rgb(0 102 153 / 85%);
color: #fff;
padding: 0 6px;
}
.MaxPicture {
text-align: center;
}
.MaxPicture > img {
margin-bottom: 10px;
}
.font {
display: block;
margin: 0 auto;
font-size: 13px;
}
.tableTitle{
text-align:center!important;
font-weight: bold;
}
`,
detailMes: {},
baseUrl: this.Common.baseUrl,
mediaUrl: mediaUrl, //
Art_Id: this.$route.query.id,
Art_Doi: this.$route.query.doi,
Art_web_Id: this.$route.query.artID,
Art_P_Id: '',
btnDisble: true,
detailTitle: '',
htmlContent: '',
Main_List: [],
exegesis: "The following contents'<b></b>,<i></i>'are necessary for the generation phase, please do not delete them!!!"
};
},
created() {
this.getInfo();
},
activated() {
this.getInfo();
},
methods: {
goEdit(){
this.$router.push({
path: '/GenerateCharts',
query: {
id: this.Art_Id
}
});
},
async getInfo() {
const loading = this.$loading({
lock: true,
text: 'Loading...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
// 获取文章信息
await this.$api
.post('api/Production/getProductionDetail', { p_article_id: this.Art_Id })
.then(async (res) => {
if (res.code == 0) {
this.detailTitle = res.data.production.title
this.detailMes = res.data.production;
await this.getDate(loading);
loading.close();
} else {
this.$message.error(res.msg);
loading.close();
}
})
.catch((err) => {
this.$message.error(err);
loading.close();
});
},
getWord() {
var htmlContent = `<h3 class="man_Title" contenteditable="false">${this.detailTitle} </h3>`;
htmlContent += this.Main_List.map((item) => {
//批注
let contentHtml = '';
var isRemark = ``;
// if (item.state == 2 && item.remark && item.remark != '') {
// // isRemark = `<img class="isRemark" main-id="${item.am_id}" src="${this.remarkImageUrl}" alt="" style="width:20px;height:20px;"/>`;
// isRemark = `<span class="isRemark" main-id="${item.am_id}"><img class="isRemarkIcon" main-id="${item.am_id}" src="${this.remarkImageUrl}" alt="" style="width: 20px; height: 20px" />
// <span class="isRemarkIcon" main-id="${item.am_id}" > (${item.am_id})</span>
// </span>
// `;
// }
// 判断是否是图片
if (item.type == 1) {
var extension = item.image.url.split('.').pop().toLowerCase();
if (extension == 'tif') {
contentHtml = `
<p contenteditable="false" main-state="${item.state}" class="MaxPicture pMain" data-id="${item.ami_id}" main-id="${
item.am_id
}">
<img src="" data-img-id="${item.ami_id}" style="width: ${item.width ? `${item.width}px` : '100%'}" />
<font class="font" style="width: ${item.width ? `${item.width}px` : '100%'}">${item.image.note ? item.image.note : ''}</font>
</p>
`;
} else if (['jpg', 'jpeg', 'png'].includes(extension)) {
contentHtml = `
<p contenteditable="false" main-state="${item.state}" class="MaxPicture pMain" data-id="${
item.ami_id
}" main-id="${item.am_id}">
${isRemark}
<img src="${this.mediaUrl + item.image.url}" style="width: ${
item.width ? `${item.width}px` : '100%'
}" />
<font class="font" style="width: ${item.width ? `${item.width}px` : '100%'}" >${
item.image.note ? item.image.note : ''
}</font>
</p>
`;
} else {
contentHtml = `
<p contenteditable="false" main-state="${item.state}" class="MaxPicture pMain" data-id="${
item.ami_id
}" main-id="${item.am_id}">
${isRemark}
<span
style="
text-align: center;
font-size: 30px;
display: flex;
align-items: center;
justify-content: center;
"
>
Figures ( .${item.image.url.split('.').pop().toUpperCase()})
</span>
<font class="font" style="width: ${item.width ? `${item.width}px` : '100%'}" >${
item.image.note ? item.image.note : ''
}</font>
</p>
`;
}
} else if (item.type == 2) {
var tableList = JSON.parse(item.table.table_data);
contentHtml = `
<div contenteditable="false" data-id="${item.amt_id}" main-state="${item.state}" main-id="${
item.am_id
}" class="thumbnailTableBox wordTableHtml table_Box pMain" style="width: 100%; padding: 8px 15px; box-sizing: border-box; border-radius: 4px; position: relative;">
${isRemark}
<font class="font tableTitle" style="width:100%" >${item.table.title ? item.table.title : ''}</font>
<table border="1" style="width: auto; border-collapse: collapse; text-align: center; ">
${tableList
.map((row) => {
return `
<tr>
${row
.map((cell) => {
return `
<td colspan="${cell.colspan || 1}" rowspan="${cell.rowspan || 1}">
<span>${cell.text || ''}</span>
</td>
`;
})
.join('')} <!-- join the cells in the row -->
</tr>
`;
})
.join('')} <!-- join the rows -->
</table>
<font class="font" style="width:100%" >${item.table.note ? item.table.note : ''}</font>
</div>
`;
} else {
contentHtml = `<p class="pMain" main-state="${item.state}" contenteditable="false" data-id="${item.am_id}" main-id="${item.am_id}">${isRemark}${item.content}</p>`;
}
// 判断是否是表格类型
return contentHtml;
}).join('');
this.htmlContent = htmlContent;
},
async getDate(loading) {
let urlLInk = '';
let urlTask = {};
if (this.Art_Id != undefined) {
urlLInk = 'api/Preaccept/getArticleMains';
urlTask.article_id = this.detailMes.article_id;
}
// 获取文章信息
await this.$api
.post(urlLInk, urlTask)
.then(async (res) => {
if (res.code == 0) {
this.Main_List = res.data.list;
// this.detailTitle = res.data.production.title
for (let i = 0; i < this.Main_List.length; i++) {
this.Main_List[i].text = this.Main_List[i].content;
this.Main_List[i].getnum = 0;
}
// setTimeout(async () => {
this.$nextTick(async () => {
await this.getWord();
loading.close();
});
loading.close();
} else {
this.$message.error(res.msg);
loading.close();
}
})
.catch((err) => {
this.$message.error(err);
loading.close();
});
}
}
};
</script>
<style scoped>
.man_Title {
background-color: #fff;
margin: 0 0 10px 0;
border-bottom: 1px solid #dde1eb;
box-shadow: 0 5px 5px -2px rgb(134 134 134);
padding: 12px 25px 8px 25px;
font-size: 16px;
line-height: 24px;
color: #333;
position: relative;
}
.man_Title button {
position: absolute;
top: 10px;
right: 10px;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -68,9 +68,7 @@ const tableStyle = ` b span{
border-top:none;mso-border-top-alt:none !important;
border-bottom:none !important;
mso-border-bottom-alt:none !important;
border:1px dashed #dcdfe6 !important;
border-left:1px dashed #dcdfe6 !important;
border-right:1px dashed #dcdfe6 !important;
word-break: keep-all !important;
text-align: justify !important; // 设置两端对齐

View File

@@ -72,7 +72,7 @@ const tableStyle = ` b span{
border-left:1px dashed #dcdfe6 !important;
border-right:1px dashed #dcdfe6 !important;
word-break: keep-all !important;
text-align: justify !important; // 设置两端对齐
// text-align: justify !important; // 设置两端对齐
}
@@ -107,10 +107,17 @@ const tableStyle = ` b span{
table tr:first-child td {
border-top:1.0000pt solid #000 !important;mso-border-top-alt:0.5000pt solid #000 !important;border-bottom:1.0000pt solid #000 !important;mso-border-bottom-alt:0.5000pt solid #000 !important;
}
table tr:last-of-type td {
table tr:last-of-type {
border-bottom:1.0000pt solid #000 !important;mso-border-bottom-alt:0.5000pt solid #000 !important;;
}
table span blue {
color: rgb(0, 130, 170) !important;
}blue {
color: rgb(0, 130, 170) !important;
}
.wordTableHtml table tr.table-header-row:nth-of-type(2) td {
border-bottom: 1px solid #000 !important;
}
`;
export default {
@@ -133,11 +140,7 @@ export default {
},
isEdit: {},
toolbar: {
type: Array,
required: false,
default() {
return [];
}
required: false
},
menubar: {
default: 'file edit insert view format table '
@@ -154,6 +157,10 @@ export default {
},
isShowArtWorkButton: {
default: false
},
wordStyle: {
type: String,
default: ''
}
},
data() {
@@ -262,9 +269,11 @@ export default {
this.$forceUpdate();
},
initTinymce() {
const _this = this;
var _this = this;
window.tinymce.init({
inline: false, // 使用 iframe 模式
selector: `#${this.tinymceId}`,
content_css: false, // 禁用默认样式
table_resize_bars: true, // 启用拖动调整功能
@@ -329,17 +338,19 @@ export default {
}
},
content_style: `${tableStyle} table span blue {
color: rgb(0, 130, 170) !important;
}blue {
color: rgb(0, 130, 170) !important;
}`,
content_style: `
${tableStyle}
${_this.wordStyle}
`,
formats: {
bold: { inline: 'b' },
italic: { inline: 'i' }
},
body_class: 'panel-body ',
object_resizing: false,
toolbar: this.toolbar.length > 0 ? this.toolbar : toolbar,
@@ -347,112 +358,20 @@ export default {
statusbar: false, // 关闭底部状态栏
custom_colors: false,
color_map: ['0082AA', 'TMR Blue'],
plugins: 'forecolor code paste table image', // 启用 forecolor 和 code 插件
plugins: 'texttransform', // 启用 forecolor 和 code 插件
// plugins: 'forecolor code paste table image mathType searchreplace raw', // 启用 forecolor 和 code 插件
end_container_on_empty_block: true,
content_css: 'default', // 加载 TinyMCE 默认样式表
mathjax: {
// 配置 MathJax 用于渲染数学公式
path: 'https://cdn.mathjax.org/mathjax/latest/MathJax.js',
config: 'TeX-AMS-MML_HTMLorMML'
},
//设置自定义按钮 myCustomToolbarButton
setup(ed) {
// ed.on('change', function () {
_this.$commonJS.initEditorButton(_this, ed);
// var selectedColor = ed.formatter.get('forecolor');
// console.log('ed.formatter.get at line 355:', ed.formatter)
// console.log('ed.formatter.get at line 355:', selectedColor)
// // 检查是否选择了蓝色
// if (selectedColor === '#0082AA') {
// // 蓝色的 hex 值
// var selectedText = ed.selection.getContent(); // 获取选中的文本
// if (selectedText) {
// var wrappedText = `<blue>${selectedText}</blue>`; // 包裹 <blue> 标签
// ed.selection.setContent(wrappedText); // 更新内容
// }
// }
// });
ed.ui.registry.addButton('customBlue', {
text: 'Blue', // 按钮文本
onAction: function () {
// 在选中的文本周围包裹 <blue> 标签
var selectedText = ed.selection.getContent();
var wrappedText = `<blue>${selectedText}</blue>`;
ed.selection.setContent(wrappedText);
},
classes: 'custom-colored-tinymce-button'
});
ed.ui.registry.addButton('removeBlue', {
text: 'Remove Blue', // 按钮文本
onAction: function () {
const range = ed.selection.getRng(); // 获取选区范围
let startNode = range.startContainer; // 获取选区起始节点
let closestBlue = null;
// 向上查找最近的 <blue> 标签
while (startNode) {
if (startNode.nodeName && startNode.nodeName.toLowerCase() === 'blue') {
closestBlue = startNode;
break;
}
startNode = startNode.parentNode;
}
if (closestBlue) {
// 如果找到最近的 <blue> 标签,移除它的外层标签,但保留内容
const parent = closestBlue.parentNode;
while (closestBlue.firstChild) {
parent.insertBefore(closestBlue.firstChild, closestBlue);
}
parent.removeChild(closestBlue);
} else {
// 未找到 <blue> 标签,仅移除选中的 <blue> 标签内容
const selectedContent = ed.selection.getContent({ format: 'html' });
// 使用正则表达式移除选区中的 <blue> 标签
const cleanedContent = selectedContent
.replace(/<blue[^>]*>/g, '') // 删除起始标签 <blue>
.replace(/<\/blue>/g, ''); // 删除结束标签 </blue>
// 更新选中的内容
ed.selection.setContent(cleanedContent);
}
}
});
ed.ui.registry.addToggleButton('toggleBlue', {
text: 'Toggle Blue', // 按钮文本
onAction: function () {
var selectedContent = ed.selection.getContent({ format: 'html' }); // 获取选中内容HTML 格式)
// 创建临时 DOM 容器
var tempDiv = document.createElement('div');
tempDiv.innerHTML = selectedContent;
// 检查是否完全被 <blue> 包裹
if (tempDiv.childNodes.length === 1 && tempDiv.firstChild.nodeName.toLowerCase() === 'blue') {
// 移除 <blue> 标签
var unwrappedContent = tempDiv.firstChild.innerHTML;
ed.selection.setContent(unwrappedContent); // 更新内容
} else {
// 添加 <blue> 标签
var wrappedContent = `<blue>${selectedContent}</blue>`;
ed.selection.setContent(wrappedContent); // 更新内容
}
},
onSetup: function (buttonApi) {
// 更新按钮状态(激活或非激活)
function updateButtonState() {
var selectedContent = ed.selection.getContent({ format: 'html' });
var tempDiv = document.createElement('div');
tempDiv.innerHTML = selectedContent;
buttonApi.setActive(
tempDiv.childNodes.length === 1 && tempDiv.firstChild.nodeName.toLowerCase() === 'blue'
);
}
// 监听编辑器中的选区变化
ed.on('NodeChange', updateButtonState);
ed.on('KeyUp', updateButtonState); // 处理键盘操作导致的内容变化
}
});
ed.ui.registry.addButton('uploadWord', {
text: 'Word',
icon: 'import-word', // 使用自定义图标
@@ -478,47 +397,51 @@ export default {
}
});
ed.ui.registry.addMenuButton('customDropdown', {
text: _this.$t('commonTable.PaperRotation'), // 下拉框标题
fetch: function (callback) {
// 定义下拉框的内容
const items = [..._this.typesettingTypeOptions];
const menuItems = items.map((item) => ({
type: 'menuitem',
text: item.label,
onAction: function () {
_this.typesettingType = item.value;
_this.changeTable();
// ed.execCommand(item.value); // 执行命令
}
}));
callback(menuItems);
}
});
// ed.ui.registry.addMenuButton('customDropdown', {
// text: _this.$t('commonTable.PaperRotation'), // 下拉框标题
// fetch: function (callback) {
// // 定义下拉框的内容
// const items = [..._this.typesettingTypeOptions];
// const menuItems = items.map((item) => ({
// type: 'menuitem',
// text: item.label,
// onAction: function () {
// _this.typesettingType = item.value;
// _this.changeTable();
// // ed.execCommand(item.value); // 执行命令
// }
// }));
// callback(menuItems);
// }
// });
ed.on('init', function () {
_this.$commonJS.inTinymceButtonClass();
const editorBody = ed.getBody();
// 创建 MutationObserver 监听内容变化
const observer = new MutationObserver(() => {
const currentContent = ed.getContent();
if (_this.isAutomaticUpdate) {
_this.$emit('updateChange', ed.getContent());
// _this.$emit('updateChange', _this.$commonJS.decodeHtml(currentContent));
_this.$emit('updateChange',currentContent);
}
});
// 监听子节点和内容的变化
observer.observe(editorBody, { childList: true, subtree: true, characterData: true });
});
// 定义自定义按钮
ed.ui.registry.addButton('clearButton', {
text: 'Empty',
// // 定义自定义按钮
// ed.ui.registry.addButton('clearButton', {
// text: 'Empty',
onAction: () => {
// 插入自定义表格到编辑器中
ed.setContent('');
}
});
// onAction: () => {
// // 插入自定义表格到编辑器中
// ed.setContent('');
// }
// });
// 定义自定义按钮
ed.ui.registry.addButton('customButtonExportWord', {
@@ -590,13 +513,16 @@ export default {
window.tinymce.get(this.tinymceId).setContent(value);
},
//获取内容
getContent(type) {
async getContent(type) {
var content = window.tinymce.get(this.tinymceId).getContent();
content = content.replace(/<span[^>]*>/g, '').replace(/<\/span>/g, ''); // 去除span标签
content = content.replace(/<strong>/g, '<b>').replace(/<\/strong>/g, '</b>');
content = content.replace(/<em>/g, '<i>').replace(/<\/em>/g, '</i>');
content = content.replace(/&nbsp;/g, ' '); // 将所有 &nbsp; 替换为空格
this.$emit('getContent', type, content);
console.log('window.tinymce.get(this.tinymceId).getContent() at line 431:', content);
},
async export(type, data) {

View File

@@ -131,10 +131,12 @@
</div>
<div class="titHtml titHtml1" v-if="htmlContent && html_type == 2">
<common-word
:readonly="true"
:isPreview="true"
v-if="htmlContent"
ref="commonWord"
:value="htmlContent"
:contentList="mains"
:wordStyle="wordStyle"
style="width: calc(100%); height: 50vh"
:style="`100%`"
@@ -755,104 +757,70 @@ export default {
});
},
getWord() {
var htmlContent = ``;
htmlContent += this.mains
.map((item) => {
//批注
let contentHtml = '';
var isRemark = ``;
// var htmlContent = ``;
// htmlContent += this.mains
// .map((item) => {
// //批注
// let contentHtml = '';
// var isRemark = ``;
// 判断是否是图片
if (item.type == 1) {
var extension = item.image.url.split('.').pop().toLowerCase();
if (extension == 'tif') {
contentHtml = `
<p contenteditable="false" main-state="${item.state}" class="MaxPicture pMain" data-id="${item.ami_id}" main-id="${
item.am_id
}">
<img src="" data-img-id="${item.ami_id}" style="width: ${item.width ? `${item.width}px` : '100%'}" />
<font class="font" style="width: ${item.width ? `${item.width}px` : '100%'}">${item.image.note ? item.image.note : ''}</font>
</p>
`;
} else if (['jpg', 'jpeg', 'png'].includes(extension)) {
contentHtml = `
<p contenteditable="false" main-state="${item.state}" class="MaxPicture pMain" data-id="${
item.ami_id
}" main-id="${item.am_id}">
${isRemark}
<img src="${this.mediaUrl + item.image.url}" style="width: ${
item.width ? `${item.width}px` : '100%'
}" />
<font class="font" style="width: ${item.width ? `${item.width}px` : '100%'}" >${
item.image.note ? item.image.note : ''
}</font>
</p>
`;
} else {
contentHtml = `
<p contenteditable="false" main-state="${item.state}" class="MaxPicture pMain" data-id="${
item.ami_id
}" main-id="${item.am_id}">
${isRemark}
<span
style="
text-align: center;
font-size: 30px;
display: flex;
align-items: center;
justify-content: center;
"
>
Figures ( .${item.image.url.split('.').pop().toUpperCase()})
</span>
// // 判断是否是图片
// if (item.type == 1) {
// contentHtml = `
// <p contenteditable="false" main-state="${item.state}" class="MaxPicture pMain" data-id="${
// item.ami_id
// }" main-id="${item.am_id}">
// ${isRemark}
// <img src="${this.mediaUrl +'articleImage/'+ item.image.url}" style="width: ${
// item.width ? `${item.width}px` : '100%'
// }" />
// <font class="font" style="width: ${item.width ? `${item.width}px` : '100%'}" >${
// item.image.note ? item.image.note : ''
// }</font>
// </p>
// `;
// } else if (item.type == 2) {
// var tableList = JSON.parse(item.table.table_data);
<font class="font" style="width: ${item.width ? `${item.width}px` : '100%'}" >${
item.image.note ? item.image.note : ''
}</font>
</p>
`;
}
} else if (item.type == 2) {
var tableList = JSON.parse(item.table.table_data);
// contentHtml = `
// <div contenteditable="false" data-id="${item.amt_id}" main-state="${item.state}" main-id="${
// item.am_id
// }" class="thumbnailTableBox wordTableHtml table_Box pMain" style="width: 100%; padding: 8px 15px; box-sizing: border-box; border-radius: 4px; position: relative;">
// ${isRemark}
// <font class="font tableTitle" style="width:100%" >${item.table.title ? item.table.title : ''}</font>
// <table border="1" style="width: auto; border-collapse: collapse; text-align: center; ">
// ${tableList
// .map((row) => {
// return `
// <tr>
// ${row
// .map((cell) => {
// return `
// <td colspan="${cell.colspan || 1}" rowspan="${cell.rowspan || 1}">
// <span>${cell.text || ''}</span>
// </td>
// `;
// })
// .join('')} <!-- join the cells in the row -->
// </tr>
// `;
// })
// .join('')} <!-- join the rows -->
// </table>
// <font class="font" style="width:100%" >${item.table.note ? item.table.note : ''}</font>
// </div>
// `;
// } else {
// contentHtml = `<p class="pMain" main-state="${item.state}" contenteditable="false" data-id="${item.am_id}" main-id="${item.am_id}">${isRemark}${item.content}</p>`;
// }
contentHtml = `
<div contenteditable="false" data-id="${item.amt_id}" main-state="${item.state}" main-id="${
item.am_id
}" class="thumbnailTableBox wordTableHtml table_Box pMain" style="width: 100%; padding: 8px 15px; box-sizing: border-box; border-radius: 4px; position: relative;">
${isRemark}
<font class="font tableTitle" style="width:100%" >${item.table.title ? item.table.title : ''}</font>
<table border="1" style="width: auto; border-collapse: collapse; text-align: center; ">
${tableList
.map((row) => {
return `
<tr>
${row
.map((cell) => {
return `
<td colspan="${cell.colspan || 1}" rowspan="${cell.rowspan || 1}">
<span>${cell.text || ''}</span>
</td>
`;
})
.join('')} <!-- join the cells in the row -->
</tr>
`;
})
.join('')} <!-- join the rows -->
</table>
<font class="font" style="width:100%" >${item.table.note ? item.table.note : ''}</font>
</div>
`;
} else {
contentHtml = `<p class="pMain" main-state="${item.state}" contenteditable="false" data-id="${item.am_id}" main-id="${item.am_id}">${isRemark}${item.content}</p>`;
}
// // 判断是否是表格类型
// 判断是否是表格类型
return contentHtml;
})
.join('');
this.htmlContent = htmlContent;
// return contentHtml;
// })
// .join('');
this.htmlContent = 'true';
console.log('this.htmlContent at line 820:', this.htmlContent)
},
getMainsInfo2(e) {
this.loadHtml = true;
@@ -910,27 +878,28 @@ export default {
},
// 文章html弹出层
async htmlContet(e) {
console.log('e at line 923:', e);
this.htmlContent=''
this.articleId = e.article_id;
this.tg_article_id = e.tg_article_id;
// this.articleId = '3444';
this.UpHtpFIle.article_id = e.article_id;
this.refersList = await this.getRefersList();
// this.UpHtpFIle.refers = e.refers
this.UpHtpFIle.p_article_id = e.p_article_id;
this.UpHtpFIle.doi = e.doi;
this.UpHtpFIle.htmlfile = e.file_html;
this.UpHtpFIle.title = e.title;
this.UpHtpFIle.mains = e.mains;
this.UpLoadFile.article_id = e.article_id;
this.html_type = e.html_type;
// this.html_type = 2;
await this.$api
.post('api/Publish/getPublishArticleDetail', {
article_id: e.article_id
})
.then(async (res) => {
if (res.code == 0) {
console.log('res.code at line 1148:', res.code);
this.html_type = res.data.detail.html_type;
if (this.html_type == 2) {
if (e.has_html == 1) {
if ( res.data.detail.has_html == 1) {
await this.getMainsInfo2();
this.HtmlVisible = true;
} else {
this.mains = '';
@@ -940,8 +909,12 @@ export default {
await this.getMainsInfo(e);
this.HtmlVisible = true;
}
}
});
},
// 生成html
// CreateHtml(){
// const loading = this.$loading({
@@ -972,16 +945,21 @@ export default {
background: 'rgba(0, 0, 0, 0.7)'
});
await this.creatMains();
this.html_type=2;
await this.getMainsInfo2();
loading.close();
} else {
this.HtmlVisible = false;
this.$router.push({
path: '/GenerateCharts',
window.open(this.$router.resolve({ path: '/GenerateCharts',
query: {
id: this.tg_article_id
}
});
} }).href, '_blank');
// this.$router.push({
// path: '/GenerateCharts',
// query: {
// id: this.tg_article_id
// }
// });
}
},
htmlLayout() {

View File

@@ -0,0 +1,201 @@
<template>
<div class="block commonMajor" style="width: 100%">
<el-button type="primary" plain size="mini" @click="handleAdd" style="float:right"><i class="el-icon-plus" ></i>Add Field </el-button>
<el-dialog title="Add Field " :visible.sync="coreVisible1" width="780px" :close-on-click-modal="false">
<el-form :model="coreForm1" :rules="rules1" ref="core_Form1" label-width="140px" >
<el-form-item prop="major">
<span slot="label">
<i style="color: #f56c6c; margin-right: 4px">*</i>
Field
</span>
<div
v-for="(field, index) in fields"
:key="index"
class="cascader-container"
style="margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between"
>
<!-- <span style="margin-right: 10px; font-size: 12px; color: #006699; font-weight: bold">Field {{ Number(index+1) }} :</span> -->
<el-cascader
:ref="`cascader${index}`"
@change="handleChange(index)"
v-model="field.selectedValue"
:placeholder="'Please select Field '"
:options="options"
:props="getProps()"
style="width: calc(100%)"
></el-cascader>
<!-- Delete button -->
<!-- <el-button size="mini" type="danger" style="margin-left: 10px;" @click="handleDelete(index)"><i class="el-icon-delete"></i></el-button> -->
</div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="coreVisible1 = false">Cancel</el-button>
<el-button type="primary" @click="onSubmit_core1(coreForm1)">Save</el-button>
</span>
</el-dialog>
<!-- 渲染多个 el-cascader 组件 -->
</div>
</template>
<script>
export default {
props: {
userId: {
type: String,
default: ''
},
articleId: {
type: String,
default: ''
}
},
data() {
return {
rules1:{},
coreVisible1: false,
coreForm1: {
majorList: []
},
fields: [{}], // 用于存储多个领域的选项数据
options: [] // 用于存储级联选择的选项数据
};
},
created() {
this.loadFields(); // 初始化时加载数据
},
methods: {
handleChange(i) {
console.log('.blur at line 45:');
console.log('i at line 40:', i);
this.$nextTick(() => {
this.$refs[`cascader${i}`][0].dropDownVisible = false;
this.coreForm1.majorList = this.fields[i].selectedValue;
this.$forceUpdate();
});
},
onSubmit_core1(coreForm) {
console.log('coreForm at line 1963:', coreForm);
if(!this.fields[0].selectedValue||this.fields[0].selectedValue.length == 0){
this.$message.error('Please select Field !');
return false;
}
this.$refs.core_Form1.validate((valid) => {
if (valid) {
var data={
major_id: this.coreForm1.majorList[this.coreForm1.majorList.length - 1]
}
if(this.userId){
data.user_id = this.userId;
}else{
data.article_id = this.articleId;
}
this.$api
.post(this.userId?'api/User/addUserMajor':'api/Major/addMajorByArticleIdForEditor', {
...data
})
.then((res) => {
if (res.code == 0) {
this.$message.success('Personal information modified successfully!');
this.coreVisible1 = false;
// this.tipVisible = false;
this.$emit('load')
} else {
this.$message.error(res.msg);
}
})
.catch((err) => {
this.$message.error(err);
});
} else {
this.$message.error('error submit!!');
return false;
}
});
},
// 动态添加一个新的 Cascader
handleAdd() {
this.$nextTick(() => {
this.fields=[]
this.fields.push({ selectedValue: [] }); // 添加一个新的字段
this.coreVisible1 = true;
});
},
// 删除指定的 Cascader
handleDelete(index) {
this.fields.splice(index, 1); // 删除指定索引的字段
},
// 获取 Cascader 配置
getProps() {
return {
value: 'value',
label: 'label',
children: 'children',
checkStrictly: true, // 允许任意选择一级
expandTrigger: 'hover' // 使用 hover 触发展开
};
},
// API 调用,获取子节点数据
getMajor(majorId) {
return this.$api
.post('api/Ucenter/getMajor', { major_id: majorId })
.then((response) => response.data)
.catch((error) => {
console.error('API Error:', error);
return [];
});
},
// 加载多个领域数据
loadFields() {
this.$api.post('api/Major/getMajorList', {}).then((res) => {
const transformData = (data) => {
return data.map((item) => {
const transformedItem = {
...item,
value: item.major_id,
label: `${item.major_title}`
};
// 如果存在 children递归处理
if (item.children && item.children.length > 0) {
transformedItem.children = transformData(item.children);
}
return transformedItem;
});
};
// 执行递归,获取选项数据
const data = transformData(res.data.majors.find((item) => item.major_id == 1).children);
this.options = [...data]; // 将选项数据赋给 options
});
}
}
};
</script>
<style scoped>
/* 你可以根据需要自定义样式 */
.cascader-container {
display: flex;
align-items: center;
justify-content: space-between;
}
::v-deep input[aria-hidden='true'] {
display: none !important;
}
</style>

View File

@@ -0,0 +1,207 @@
<template>
<div class="block commonMajor" style="width: 100%;overflow: hidden;">
<el-button type="primary" plain size="mini" @click="handleAdd" style="float:right;margin-bottom: 20px;"><i class="el-icon-plus" ></i>Add Field </el-button>
<div
v-for="(field, index) in fields"
:key="index"
class="cascader-container"
style="margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between"
>
<span style="margin-right: 10px; font-size: 12px; color: #006699; font-weight: bold">Field {{ Number(index+1) }} :</span>
<el-cascader
:ref="`cascader${index}`"
@change="handleChange(index)"
v-model="field.selectedValue"
:placeholder="'Please select Field '"
:options="options"
:props="getProps()"
style="width: calc(100% - 120px)"
></el-cascader>
<!-- Delete button -->
<el-button size="mini" type="danger" style="margin-left: 10px;" @click="handleDelete(index)"><i class="el-icon-delete"></i></el-button>
</div>
<!-- <el-dialog title="Add Field " :visible.sync="coreVisible1" width="780px" :close-on-click-modal="false">
<el-form :model="coreForm1" :rules="rules1" ref="core_Form1" label-width="140px" >
<el-form-item prop="major">
<span slot="label">
<i style="color: #f56c6c; margin-right: 4px">*</i>
Field
</span>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="coreVisible1 = false">Cancel</el-button>
<el-button type="primary" @click="onSubmit_core1(coreForm1)">Save</el-button>
</span>
</el-dialog> -->
<!-- 渲染多个 el-cascader 组件 -->
</div>
</template>
<script>
export default {
props: {
userId: {
type: String,
default: ''
},
list: {
type: Array,
default: []
}
},
watch: {
list: {
handler(e) {
this.fields=[...this.list]
},
immediate: true
},
},
data() {
return {
rules1:{},
coreVisible1: false,
coreForm1: {
majorList: []
},
fields: [], // 用于存储多个领域的选项数据
options: [] // 用于存储级联选择的选项数据
};
},
created() {
this.loadFields(); // 初始化时加载数据
},
methods: {
handleChange(i) {
console.log('.blur at line 45:');
console.log('i at line 40:', i);
this.$nextTick(() => {
this.$refs[`cascader${i}`][0].dropDownVisible = false;
this.coreForm1.majorList = this.fields[i].selectedValue;
this.$emit('load',this.fields)
this.$forceUpdate();
});
},
onSubmit_core1(coreForm) {
console.log('coreForm at line 1963:', coreForm);
if(!this.fields[0].selectedValue||this.fields[0].selectedValue.length == 0){
this.$message.error('Please select Field !');
return false;
}
this.$refs.core_Form1.validate((valid) => {
if (valid) {
this.$api
.post('api/User/addUserMajor', {
user_id: this.userId,
major_id: this.coreForm1.majorList[this.coreForm1.majorList.length - 1]
})
.then((res) => {
if (res.code == 0) {
this.$message.success('Personal information modified successfully!');
this.coreVisible1 = false;
// this.tipVisible = false;
this.$emit('load')
} else {
this.$message.error(res.msg);
}
})
.catch((err) => {
this.$message.error(err);
});
} else {
this.$message.error('error submit!!');
return false;
}
});
},
// 动态添加一个新的 Cascader
handleAdd() {
this.$nextTick(() => {
// this.fields=[]
this.fields.push({ selectedValue: [] }); // 添加一个新的字段
this.$emit('load',this.fields)
// this.coreVisible1 = true;
});
},
// 删除指定的 Cascader
handleDelete(index) {
this.fields.splice(index, 1); // 删除指定索引的字段
this.$emit('load',this.fields)
},
// 获取 Cascader 配置
getProps() {
return {
value: 'value',
label: 'label',
children: 'children',
checkStrictly: true, // 允许任意选择一级
expandTrigger: 'hover' // 使用 hover 触发展开
};
},
// API 调用,获取子节点数据
getMajor(majorId) {
return this.$api
.post('api/Ucenter/getMajor', { major_id: majorId })
.then((response) => response.data)
.catch((error) => {
console.error('API Error:', error);
return [];
});
},
// 加载多个领域数据
loadFields() {
this.$api.post('api/Major/getMajorList', {}).then((res) => {
const transformData = (data) => {
return data.map((item) => {
const transformedItem = {
...item,
value: item.major_id,
label: `${item.major_title}`
};
// 如果存在 children递归处理
if (item.children && item.children.length > 0) {
transformedItem.children = transformData(item.children);
}
return transformedItem;
});
};
// 执行递归,获取选项数据
const data = transformData(res.data.majors.find((item) => item.major_id == 1).children);
this.options = [...data]; // 将选项数据赋给 options
});
}
}
};
</script>
<style scoped>
/* 你可以根据需要自定义样式 */
.cascader-container {
width: 100%;
/* margin-top: 40px; */
display: flex;
align-items: center;
justify-content: space-between;
}
::v-deep input[aria-hidden='true'] {
display: none !important;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -1,19 +1,25 @@
<template>
<div>
<div>
<!--uploadWord |customButtonExportWord |customButtonExportImg -->
<tinymce
ref="tinymceChild"
:value="updatedHtml"
type="table"
:height="height"
:id="id"
ref="tinymceChild1"
:wordStyle="wordStyle"
:isAutomaticUpdate="isAutomaticUpdate"
@getContent="getContent"
@updateChange="updateChange"
:value="value"
:typesettingType="typesettingType"
class="paste-area text-container"
toolbar=" bold italic | forecolor |subscript superscript|table tabledelete |customButtonExportWord |customButtonExportImg |customDropdown | clearButton"
:toolbar="['bold italic|customBlue removeBlue|myuppercase myuppercasea Line|subscript superscript|searchreplace|clearButton']"
style="
white-space: pre-line;
/* white-space: pre-line; */
line-height: 12px;
max-height: 50vh;
max-height: 60vh;
overflow: auto;
font-size: 12px;
font-size: 7.5pt; /* 字体大小 */
@@ -23,20 +29,23 @@
"
></tinymce>
</div>
</div>
</template>
<script>
import Tinymce from '@/components/page/components/Tinymce';
export default {
props: ['lineStyle'],
props: ['value','isAutomaticUpdate','height','id'],
components: {
Tinymce
},
watch: {
lineStyle() {}
},
data() {
return {
tableData: [],
identity: localStorage.getItem('U_role'),
showToolbar: false, // 是否显示工具栏
toolbarStyle: {
top: '0px',
@@ -50,20 +59,30 @@ export default {
{ label: this.$t('commonTable.typesettingType2'), value: 2, pageWidth: 297 }
],
transform: null,
typesettingType: 1
typesettingType: 1,
wordStyle: ``
};
},
mounted() {
this.typesettingType = 1;
if (this.lineStyle) {
console.log('newVal at line 37:', this.lineStyle);
} else {
this.updatedHtml = '';
}
},
methods: {
updateChange(content){
this.$emit('updateChange',content)
},
getTinymceContent(type) {
this.$refs.tinymceChild1.getContent(type);
},
getContent(type, content) {
this.$emit('getContent', type, content);
}
}
};
</script>
@@ -141,8 +160,5 @@ td input ::placeholder {
overflow-wrap: break-word !important;
}
.text-container {
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -6,13 +6,12 @@
<tinymce
type="table"
ref="tinymceChild1"
:wordStyle="wordStyle"
@getContent="getContent"
:value="updatedHtml"
:typesettingType="typesettingType"
class="paste-area text-container"
:toolbar="`undo redo | formatselect | bold italic ${
identity ? '| customBlue removeBlue' : ''
} |subscript superscript|table tabledelete ${identity ? '| customDropdown' : ''} | clearButton`"
:toolbar="['bold italic|customBlue removeBlue|myuppercase myuppercasea Line|subscript superscript|table tabledelete| searchreplace |clearButton']"
style="
/* white-space: pre-line; */
line-height: 12px;
@@ -25,7 +24,6 @@
margin-bottom: 0pt; /* 段后间距 */
"
></tinymce>
</div>
</div>
</template>
@@ -57,7 +55,9 @@ export default {
{ label: this.$t('commonTable.typesettingType2'), value: 2, pageWidth: 297 }
],
transform: null,
typesettingType: 1
typesettingType: 1,
wordStyle: `
`
};
},
mounted() {
@@ -76,8 +76,8 @@ export default {
text-align: center;
table-layout: auto;"
>`;
this.tableData.forEach((row) => {
modalContent += `<tr>`;
this.tableData.forEach((row,i) => {
modalContent += `<tr class="${this.isHeaderRow(i,this.tableData)?'table-header-row':''}">`;
row.forEach((cell) => {
modalContent += `
<td
@@ -100,12 +100,20 @@ export default {
}
},
methods: {
isHeaderRow(rowIndex,table) {
var head=table[0]
return rowIndex < head[0].rowspan; // 假设前两行是表头
},
getTableContent(type) {
this.$refs.tinymceChild1.getContent(type);
},
getContent(type, content) {
if (content) {
const container = document.createElement("div");
const container = document.createElement('div');
container.innerHTML = content;
this.$commonJS.parseTableToArray(content, (table) => {
console.log('res at line 104:', table);

File diff suppressed because it is too large Load Diff

View File

@@ -202,7 +202,8 @@
text-align: center;
"
>
<tr v-for="(row, rowIndex) in table.table" :key="rowIndex">
<tr v-for="(row, rowIndex) in table.table" :key="rowIndex" >
<td
v-for="(cell, cellIndex) in row"
:key="cellIndex"
@@ -324,7 +325,7 @@ export default {
this.filterData();
},
filterData(type) {
console.log('type at line 374:', type);
if (type) {
if (type == 'img') {
this.imagesList = [...this.images];
@@ -541,7 +542,7 @@ export default {
this.$commonJS.createImageModal(index, modalContent, 'table', '');
});
}
console.log('this.tables at line 533:', this.tables);
});
}
},
@@ -581,6 +582,7 @@ export default {
::v-deep .wordTableHtml table {
cursor: pointer;
background-color: #fff !important;
border-bottom: 1px solid #000 !important;
}
.el-menu-vertical-demo {
width: 85px;

View File

@@ -3,7 +3,6 @@
<div
style="background-color: transparent !important; margin-top: 0px !important; height: 100%; padding: 0 !important; overflow: hidden"
class="ManuscirptList"
>
<!-- 图片缩略图区域 -->
@@ -16,20 +15,20 @@
class="el-menu-vertical-demo"
@select="handleSelectMenu"
>
<el-menu-item index="1">
<!-- <el-menu-item index="1">
<i class="el-icon-message-solid" style="margin: 0 auto; color: #fc625d"></i>
<span slot="title" style="line-height: 30px">Annotations</span>
</el-menu-item>
<el-menu-item index="2">
</el-menu-item> -->
<el-menu-item index="1">
<i class="el-icon-picture" color="#333639" style="margin: 0 auto"></i>
<span slot="title" style="line-height: 20px">Figures</span>
</el-menu-item>
<el-menu-item index="3">
<el-menu-item index="2">
<i class="el-icon-s-grid" color="#333639" style="margin: 0 auto"></i>
<span slot="title" style="line-height: 30px">Tables</span>
</el-menu-item>
<el-menu-item index="4">
<el-menu-item index="3">
<i class="el-icon-delete-solid" color="#333639" style="margin: 0 auto"></i>
<span slot="title" style="line-height: 30px">Recycle Bin</span>
</el-menu-item>
@@ -54,7 +53,7 @@
</ul> -->
<div style="width: 200px; float: right; padding: 10px; height: 100%; box-sizing: border-box; overflow-y: auto" class="arrlist">
<ul style="width: 100%; height: auto">
<li v-show="currentMenu == 1">
<!-- <li v-show="currentMenu == 1">
<div style="display: flex; flex-wrap: wrap; gap: 10px; justify-content: start">
<li v-for="(comment, index) in comments" :key="index" class="comment-item" style="width: 100%; padding: 6px 0">
<div @click.prevent="goToComment(comment.am_id)">
@@ -74,18 +73,9 @@
<span style="color: #b8b7b7;font-size: 12px">{{ getTime(comment.ctime) }}</span>
</p>
<!-- isEditing true 显示可编辑的输入框 -->
<!-- <div v-if="isEditing === index">
<el-input
v-focus
type="textarea"
v-model="comment.remark"
@blur.stop="saveComment(index,comment)"
style="width: 100%; box-sizing: border-box; padding: 5px"
></el-input>
</div> -->
<!-- isEditing false 显示评论文本 -->
<div style="display: flex; align-items: center; justify-content: space-between">
<p :style="isEditComment?'width: calc(100% - 40px)':'width: calc(100%)'" style="line-height:18px;min-height: 20px; width: calc(100%);white-space: normal;" v-html="comment.remark">
@@ -106,12 +96,12 @@
></i>
</div>
<!-- 删除按钮 -->
</div>
</li>
</div>
</li>
<li v-show="currentMenu == 2">
</li> -->
<li v-show="currentMenu == 1">
<div style="" class="go-content-charts-item-box">
<div class="item_box" style="width: 100%; height: auto; position: relative">
<el-collapse v-if="isShowEdit">
@@ -139,6 +129,56 @@
<el-link> Figures {{ index + 1 }} </el-link>
</p> -->
</div>
<div class="item_box" style="width: 100%; height: auto; position: relative">
<div class="list-center go-flex-center go-transition" style="width: 100%" @click="addImage">
<div class="title">
<span>Add Figure </span>
</div>
<div
class="thumbnailBox image list-img"
:style="`
border: 1px solid #ccccccb5;
width: 100%;
height: auto;
border-radius: 4px;
overflow: hidden;
position: relative;`"
>
<div style="width: 100%; height: 80px; display: flex; justify-content: center; align-items: center">
<!-- 图片内容 -->
<img src="@/assets/img/upload.png" style="width: 100px; height: 100%; object-fit: cover" />
</div>
<!-- 输入框 -->
</div>
</div>
<el-collapse v-if="isShowEdit">
<el-collapse-item name="1" style="margin-top: 4px">
<template slot="title">
<div style="width: 100%; display: flex; align-items: center; justify-content: space-between">
<span style="color: #777">Tables {{ index + 1 }}</span>
<span v-if="isShowEdit"><i class="el-icon-edit" v-if="isEdit"></i>Comments/ Suggestions</span>
</div>
</template>
<el-input
v-if="isShowEdit"
type="textarea"
placeholder="please input content"
:readonly="!isEdit"
:rows="4"
></el-input>
</el-collapse-item>
</el-collapse>
<!-- <p
style="color: #777; margin-top: 6px"
v-else
@click="img.has_selected == 1 ? goToListComment(img.article_image_id, 'img') : ''"
>
<el-link> Figures {{ index + 1 }} </el-link>
</p> -->
</div>
<div
class="item_box"
v-for="(img, index) in imagesList"
@@ -220,7 +260,6 @@
/>
</template>
<template v-else>
<div
style="
width: 140px;
@@ -269,8 +308,57 @@
</div>
</div>
</li>
<li v-show="currentMenu == 3">
<li v-show="currentMenu == 2">
<div style="" class="go-content-charts-item-box">
<div class="item_box" @click="addTable" style="width: 100%; height: auto; position: relative">
<div class="list-center go-flex-center go-transition" style="width: 100%">
<div class="title">
<span>Add Table </span>
</div>
<div
class="thumbnailBox image list-img"
:style="`
border: 1px solid #ccccccb5;
width: 100%;
height: auto;
border-radius: 4px;
overflow: hidden;
position: relative;`"
>
<div style="width: 100%; height: 80px; display: flex; justify-content: center; align-items: center">
<!-- 图片内容 -->
<img src="@/assets/img/uploadTable.png" style="width: 100px; height: 100%; object-fit: cover" />
</div>
</div>
</div>
<el-collapse v-if="isShowEdit">
<el-collapse-item name="1" style="margin-top: 4px">
<template slot="title">
<div style="width: 100%; display: flex; align-items: center; justify-content: space-between">
<span style="color: #777">Tables {{ index + 1 }}</span>
<span v-if="isShowEdit"><i class="el-icon-edit" v-if="isEdit"></i>Comments/ Suggestions</span>
</div>
</template>
<el-input
v-if="isShowEdit"
type="textarea"
placeholder="please input content"
:readonly="!isEdit"
:rows="4"
></el-input>
</el-collapse-item>
</el-collapse>
<!-- <p
style="color: #777; margin-top: 6px"
v-else
@click="img.has_selected == 1 ? goToListComment(img.article_image_id, 'img') : ''"
>
<el-link> Figures {{ index + 1 }} </el-link>
</p> -->
</div>
<div
class="item_box"
v-for="(table, index) in tablesList"
@@ -383,7 +471,7 @@
</div>
</div>
</li>
<li v-show="currentMenu == 4">
<li v-show="currentMenu == 3">
<div style="display: flex; flex-wrap: wrap; gap: 10px; justify-content: start">
<div
v-for="(item, index) in content"
@@ -428,7 +516,6 @@ export default {
mediaUrl,
statusList: [
{ title: 'ALL', type: '0' },
{ title: 'Typed', type: '1' },
@@ -476,22 +563,22 @@ export default {
},
// 保存评论修改
saveComment(index,comment) {
saveComment(index, comment) {
if (this.isEditComment) {
this.$emit('addComment',comment)
this.$emit('addComment', comment);
this.isEditing = null; // 退出编辑模式
}
},
onAddComment(comment) {
if (this.isEditComment) {
this.$emit('onAddComment',comment.am_id)
this.$emit('onAddComment', comment.am_id);
// this.isEditing = null; // 退出编辑模式
}
},
// 删除评论
deleteComment(comment, index) {
console.log('comment at line 480:', comment)
console.log('comment at line 480:', comment);
if (this.isEditComment) {
this.$confirm(this.$t('commonTable.removeAnnotations'), 'Prompt', {
confirmButtonText: 'Submit',
@@ -499,13 +586,12 @@ export default {
type: 'warning'
})
.then(() => {
this.$api
.post('api/Preaccept/clearMainsRemark', {
am_id: comment.am_id
})
.then((res) => {
this.getCommentList()
this.getCommentList();
});
// this.comments.splice(index, 1); // 删除评论
})
@@ -545,9 +631,14 @@ export default {
})
.then((res) => {
this.comments = res.data.list;
console.log('this.comments at line 537:', this.comments);
});
});
},
addImage() {
this.$emit('addImage');
},
addTable() {
this.$emit('addTable');
},
add(type) {
this.$emit('add', type);
@@ -561,18 +652,18 @@ export default {
handleSelectMenu(v) {
this.currentMenu = v;
this.currentSelectType = '0';
if (v == 1) {
this.getCommentList();
} else {
// if (v == 1) {
// this.getCommentList();
// } else {
this.filterData();
}
// }
},
selectType(v) {
this.currentSelectType = v.type;
this.filterData();
},
filterData(type) {
console.log('type at line 374:', type);
if (type) {
if (type == 'img') {
this.imagesList = [...this.images];
@@ -580,7 +671,7 @@ export default {
this.tablesList = [...this.tables];
}
} else {
if (this.currentMenu == 2) {
if (this.currentMenu == 1) {
switch (this.currentSelectType) {
case '0':
this.imagesList = [...this.images];
@@ -592,7 +683,7 @@ export default {
this.imagesList = [...this.images].filter((e) => e.has_selected == 0);
break;
}
} else if (this.currentMenu == 3) {
} else if (this.currentMenu == 2) {
switch (this.currentSelectType) {
case '0':
this.tablesList = [...this.tables];
@@ -656,7 +747,6 @@ export default {
});
},
onDragStart($event, item, index, type) {
console.log('type at line 192:', index);
this.$emit('onDragStart', $event, item, index, type);
},
changeActiveNames(e) {
@@ -706,8 +796,6 @@ export default {
this.$commonJS.createImageModal(index, modalContent, 'img');
// }
});
}
this.images = list;
@@ -756,6 +844,8 @@ export default {
text-align: center;
table-layout: auto;"
>`;
if (table.table&&table.table.length > 0) {
table.table.forEach((row) => {
modalContent += `<tr>`;
row.forEach((cell) => {
@@ -770,11 +860,13 @@ export default {
});
modalContent += `</tr>`;
});
}
modalContent += `</table></div>`;
this.$commonJS.createImageModal(index, modalContent, 'table', '');
});
}
console.log('this.tables at line 533:', this.tables);
});
}
},
@@ -816,6 +908,7 @@ export default {
::v-deep .wordTableHtml table {
cursor: pointer;
background-color: #fff !important;
border-bottom: 1px solid #000 !important;
}
.el-menu-vertical-demo {
width: 85px;

View File

@@ -313,5 +313,6 @@ export default {
::v-deep .wordTableHtml table {
cursor: pointer;
background-color: #fff !important;
border-bottom: 1px solid #000 !important;
}
</style>

View File

@@ -83,7 +83,7 @@
</el-table-column>
<el-table-column label="state" width="55" align="center">
<template slot-scope="scope">
<span class="status ok" v-if="scope.row.refer_type == 'journal' && scope.row.doilink != '' || scope.row.refer_type == 'book' && scope.row.isbn != '' || scope.row.refer_type == 'other' && scope.row.refer_frag != '' && scope.row.refer_frag.length > 15" >
<span class="status ok" v-if="scope.row.refer_type == 'journal' && scope.row.doilink != '' || scope.row.refer_type == 'book' && scope.row.isbn != '' " >
<i class="el-icon-circle-check"></i>
</span>
<span class="status warn" v-else >
@@ -549,6 +549,7 @@ export default {
if (res.code == 0) {
if (res.data.bf < 100) {
this.refReal = res.data.bf
this.$forceUpdate()
} else {
clearInterval(timeRef)
this.refProcess = 0

View File

@@ -13,8 +13,9 @@ import 'babel-polyfill';
import api from './api/index.js';
import Common from './components/common/common'
Vue.prototype.$validateString = function (str) {
return /^[a-zA-Z\s-]+$/.test(str);
return /^[a-zA-Z\s\u00C0-\u00FF\u0100-\u017F-]+$/.test(str);
}
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'
@@ -73,6 +74,10 @@ Vue.component("Editor", Editor);
import commonTable from '@/components/page/components/table/table.vue'
Vue.component('common-table', commonTable);
import commonMajor from '@/components/page/components/major/index.vue'
Vue.component('common-major', commonMajor);
import commonMajorList from '@/components/page/components/major/list.vue'
Vue.component('common-major-list', commonMajorList);
import commonPayPalButton from '@/components/page/components/pendingPayment/PayPalButton.vue'
Vue.component('common-paypal-button', commonPayPalButton);
import commonTiff from '@/components/page/components/table/tiff.vue'
@@ -80,6 +85,10 @@ Vue.component('common-tiff', commonTiff);
import commonContent from '@/components/page/components/table/content.vue'
Vue.component('common-content', commonContent);
import commonWord from '@/components/page/components/table/word.vue'
Vue.component('common-comment', commonComment);
import commonEditTable from '@/components/page/components/table/editTable.vue'
Vue.component('common-edit-table', commonEditTable);
import commonComment from '@/components/page/components/table/comment.vue'
Vue.component('common-word', commonWord);
import commonAnnotations from '@/components/page/components/table/annotations.vue'
Vue.component('common-annotations', commonAnnotations);

View File

@@ -988,7 +988,8 @@ export default new Router({
path: '/GenerateCharts', //用户端预收录-引用编辑
component: () => import('../components/page/GenerateCharts'),
meta: {
title: 'HTML Proofread'
title: 'Text Proofread',
hideSidebar: true
}
},
{