9 Commits

Author SHA1 Message Date
e1d0ed6561 tijiao 2025-12-26 11:30:31 +08:00
a0d1402e19 Merge branch 'master' of https://git.nuttyreading.com/wangjinlei/tougao_web into Editorial-Board 2025-12-25 09:20:34 +08:00
2c6c3ec183 tijiao 2025-12-25 09:20:17 +08:00
8bf2389e14 Merge branch 'master' of https://git.nuttyreading.com/wangjinlei/tougao_web into Editorial-Board 2025-12-24 16:22:22 +08:00
1129050654 提交 2025-12-23 15:39:17 +08:00
b1b1996648 提交 2025-12-23 14:55:16 +08:00
530470d138 提交 2025-12-19 14:09:27 +08:00
68423be22a 提交 2025-12-19 10:22:03 +08:00
6a5fecc177 终审分数 2025-12-17 09:22:33 +08:00
16 changed files with 3417 additions and 2577 deletions

View File

@@ -1,3 +1,9 @@
:root {
--primary-comment-deep: #00BFFF; /* 深天蓝:用于边框、标题、重要按钮 */
--primary-comment-main: #87CEEB; /* 天蓝色:主色调,用于普通高亮 */
--primary-comment-light: #B0E2FF; /* 浅天蓝:用于鼠标悬停 (hover) 效果 */
--primary-comment-bg: #F0F8FF; /* 爱丽丝蓝:最浅底色,用于批注框背景 */
}
* {
margin: 0;
padding: 0;
@@ -24,9 +30,179 @@ a {
text-decoration: none
}
.w-auto {
width: auto !important;
}
.w-full {
width: 100% !important;
}
/* 动态宽度类 */
.dynamic-width {
width: calc(100% - var(--minus-w, 300px)) !important;
}
.base-flex {
display: flex !important;
/* 垂直对齐:如果不传 --ai则不设置或保持默认 */
align-items: var(--fl-ai, initial) !important;
/* 水平对齐:如果不传 --jc则不设置 */
justify-content: var(--fl-jc, initial) !important;
/* 换行:如果不传 --wrap则不设置 */
flex-wrap: var(--fl-wrap, initial) !important;
/* 方向:如果不传 --direction则不设置 */
flex-direction: var(--fl-direction, initial) !important;
/* 间隙:这是 Flex 布局中非常好用的属性,建议加上 */
gap: var(--gap, initial) !important;
}
/* 2. 快捷全居中类(最常用,默认就是全居中) */
.base-flex-center {
display: flex ;
align-items: var(--fl-ai, center);
justify-content: var(--fl-jc, center);
}
.base-pos {
/* 定位类型:默认 absolute可选 relative, fixed, sticky */
position: var(--pos, absolute);
/* 默认 initial只有在 style 里传了参,对应的方位才会生效 */
top: var(--p-t, initial);
right: var(--p-r, initial);
bottom: var(--p-b, initial);
left: var(--p-l, initial);
}
.abs-left {
left: var(--left-dist, 10px);
}
.base-font-size {
font-size: var(--f-s, 14px) !important;
color: var(--f-c, #333) !important;
}
/* common.css */
.b-box {
box-sizing: border-box !important;
}
.base-border {
--b-w: 1px;
--b-s: solid;
--b-c: #d8d8d8;
border-top: var(--bt, 0) var(--b-s) var(--b-c);
border-right: var(--br, 0) var(--b-s) var(--b-c);
border-bottom: var(--bb, 0) var(--b-s) var(--b-c);
border-left: var(--bl, 0) var(--b-s) var(--b-c);
}
.base-border-all {
--b-w: 1px;
/* 宽度 */
--b-s: solid;
/* 样式 */
--b-c: #d8d8d8;
/* 颜色 */
border: var(--b-w) var(--b-s) var(--b-c);
}
/* common.css */
.base-padding {
/* 定义默认值(如果没传参,默认是 0 */
--p-t: 0px;
--p-r: 0px;
--p-b: 0px;
--p-l: 0px;
padding-top: var(--p-t);
padding-right: var(--p-r);
padding-bottom: var(--p-b);
padding-left: var(--p-l);
}
.base-padding-all {
padding: var(--p);
/* 默认四周 10px也可以通过 --p 传参 */
}
.base-bg {
background-color: var(--bg, #fff);
}
/* 专门用于“必须生效”场景的类 */
.base-bg-imp {
background-color: var(--bg, #fff) !important;
}
.base-margin {
--m-t: 0px;
--m-r: 0px;
--m-b: 0px;
--m-l: 0px;
margin-top: var(--m-t);
margin-right: var(--m-r);
margin-bottom: var(--m-b);
margin-left: var(--m-l);
}
.base-margin-all {
margin: var(--m);
}
.float-var {
float: var(--f, none) var(--f-imp, );
}
.clearfix::after {
content: "";
display: block;
clear: both;
}
.page-container {
min-width: 1200px;
}
.content-box {
position: absolute;
left: 260px;
@@ -1149,9 +1325,9 @@ a {
mso-border-top-alt: none !important;
border-bottom: none !important;
mso-border-bottom-alt: none !important;
border: 1px dashed #dcdfe6 !important;
/* border: 1px dashed #dcdfe6 !important;
border-left: 1px dashed #dcdfe6 !important;
border-right: 1px dashed #dcdfe6 !important;
border-right: 1px dashed #dcdfe6 !important; */
word-break: keep-all !important;
/* text-align: justify !important; */
}
@@ -1283,7 +1459,7 @@ a {
}
.word-container table tbody tr td {
text-align: left !important;
text-align: center !important;
border-left: none !important;
mso-border-left-alt: none !important;
border-right: none !important;
@@ -1292,9 +1468,9 @@ a {
mso-border-top-alt: none !important;
border-bottom: none !important;
mso-border-bottom-alt: none !important;
border: 1px dashed #dcdfe6 !important;
/* border: 1px dashed #dcdfe6 !important;
border-left: 1px dashed #dcdfe6 !important;
border-right: 1px dashed #dcdfe6 !important;
border-right: 1px dashed #dcdfe6 !important; */
word-break: keep-all !important;
white-space: pre-wrap !important;
/* text-align: justify !important; */
@@ -1330,12 +1506,7 @@ a {
mos-line-height: 20px !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:first-child td {}
.word-container table tr:last-of-type {
border-bottom: 1pt solid #000 !important;
@@ -1408,18 +1579,13 @@ a {
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 {
@@ -1452,11 +1618,13 @@ wmath {
z-index: 99999 !important;
position: fixed !important;
}
.sticky-header {
position: sticky;
top: 0;
z-index: 1000; /* 保证在上层 */
background-color: transparent;
z-index: 1000;
/* 保证在上层 */
background-color: transparent;
/* padding: 10px; */
box-shadow: 0 2px 2px rgba(221, 221, 221, 0.2);
}
}

102
src/common/js/TableUtils.js Normal file
View File

@@ -0,0 +1,102 @@
/**
* 表格数据处理工具
*/
export const TableUtils = {
/**
* 判断是否为表头行
* @param {number} rowIndex
* @param {Array} table
*/
isHeaderRow(rowIndex, table) {
if (!table || table.length === 0) return false;
const head = table[0];
// 健壮性检查确保第一行第一个单元格存在且有rowspan
const headerSpan = (head && head[0] && head[0].rowspan) ? head[0].rowspan : 1;
return rowIndex < headerSpan;
},
/**
* 拆分表头和表体
*/
splitTable(tableList) {
if (!Array.isArray(tableList) || tableList.length === 0) {
return { header: [], content: [] };
}
const header = [];
const content = [];
let cellIdCounter = 0;
tableList.forEach((row, rowIndex) => {
if (Array.isArray(row)) {
row.forEach((cell) => {
if (cell && typeof cell === 'object') {
cell.cellId = `cell-${cellIdCounter++}`;
}
});
}
if (this.isHeaderRow(rowIndex, tableList)) {
header.push(row);
} else {
content.push(row);
}
});
return { header, content };
},
/**
* 处理合并单元格后的逻辑行 ID用于斑马纹等
*/
addRowIdToData(content) {
if (!content || content.length === 0) return { rowData: [], rowIds: [] };
const data = JSON.parse(JSON.stringify(content));
const rowIdMap = {};
const usedRows = new Set();
let idCounter = 0;
// 1. 建立逻辑行映射
for (let i = 0; i < data.length; i++) {
if (usedRows.has(i)) continue;
const rowId = `row-${idCounter++}`;
rowIdMap[i] = rowId;
usedRows.add(i);
const row = data[i];
for (let j = 0; j < row.length; j++) {
const cell = row[j];
if (cell && cell.rowspan > 1) {
for (let k = 1; k < cell.rowspan; k++) {
const nextRowIndex = i + k;
if (nextRowIndex < data.length && !rowIdMap[nextRowIndex]) {
rowIdMap[nextRowIndex] = rowId;
usedRows.add(nextRowIndex);
}
}
}
}
}
// 2. 注入 rowId 并提取唯一 ID 列表
const seenIds = [];
data.forEach((row, i) => {
const rowId = rowIdMap[i];
row.rowId = rowId; // 直接赋值给行对象
row.forEach(cell => {
if (cell) cell.rowId = rowId;
});
if (rowId && !seenIds.includes(rowId)) {
seenIds.push(rowId);
}
});
// 取奇数或偶数 ID 用于斑马纹(根据你的需求 index % 2 === 0
const rowIds = seenIds.filter((_, index) => index % 2 === 0);
return { rowData: data, rowIds };
}
};

View File

@@ -2153,7 +2153,32 @@ ed.ui.registry.addButton('myuppercasea', {
ed.insertContent('');
}
});
ed.ui.registry.addMenuButton('MoreSymbols', {
text: '···', // 按钮显示的三个点
tooltip: 'More Special Characters',
onAction: () => {}, // 菜单主按钮点击通常不执行操作,由子菜单执行
fetch: (callback) => {
const items = [
{
type: 'menuitem',
text: 'en-dash (短划线)',//短划线
onAction: () => ed.insertContent('')
},
{
type: 'menuitem',
text: 'minus sign (减号)',//减号
onAction: () => ed.insertContent('')
},
{
type: 'menuitem',
text: 'hyphen (连接符)',
onAction: () => ed.insertContent('-')
},
];
callback(items);
}
});
ed.ui.registry.addButton('removeBlue', {
text: 'Blue', // 按钮文本

View File

@@ -2,12 +2,12 @@
//记得切换
//正式
// const mediaUrl = '/public/';
// const baseUrl = '/';
const mediaUrl = '/public/';
const baseUrl = '/';
const mediaUrl = 'https://submission.tmrjournals.com/public/';
// const mediaUrl = 'http://zmzm.tougao.dev.com/public/';
const baseUrl = '/api'
// const mediaUrl = 'https://submission.tmrjournals.com/public/';
// // const mediaUrl = 'http://zmzm.tougao.dev.com/public/';
// const baseUrl = '/api'
// const mediaUrl = 'http://tougaotest.tmrjournals.com/public/';
// // const mediaUrl = 'http://zmzm.tougao.dev.com/public/';

View File

@@ -1307,16 +1307,19 @@ export default {
},
handleImageAdd(type) {
this.picStyle = { note: '', picUrl: '', title: '' };
this.picStyle1 = { note: '', picUrl: '', title: '' };
this.picStyle.visiTitle = 'Add Figure';
this.pictVisible = true;
},
handleTableAdd(type) {
this.lineStyle = { note: '', table_data: '', html_data: '' };
this.lineStyle1 = { note: '', table_data: '', html_data: '' };
this.lineStyle.visiTitle = 'Add Table';
this.threeVisible = true;
},
addUploadWordTable(data) {
this.lineStyle = { note: '', table: data.table_data, html_data: data.html_data };
this.lineStyle1 = { note: '', table: data.table_data, html_data: data.html_data };
this.lineStyle.visiTitle = 'Add Table';
this.threeVisible = true;
@@ -1330,13 +1333,18 @@ export default {
this.pictVisible = true;
} else if (type == 'table') {
this.lineStyle = {};
this.lineStyle = {
...data,
table: JSON.parse(data.table_data),
html_data: data.html_data,
note: data.note,
title: data.title
};
this.lineStyle1 = {};
// 1. 提取处理逻辑
const formattedData = {
...data,
table: JSON.parse(data.table_data),
// 如果 data 中已经包含了 html_data, note, title且不需要特殊处理
// 解构赋值 (...data) 其实已经把它们带进来了。
};
// 2. 统一赋值
this.lineStyle = formattedData;
this.lineStyle1 = { ...formattedData }; // 使用浅拷贝确保两个变量指向不同引用(如果需要独立修改)
this.lineStyle.visiTitle = 'Edit Table';
this.threeVisible = true;
}

View File

@@ -2,14 +2,66 @@
<div style="height: 100%">
<div
class="container"
style="
height: 100%;
min-width: calc(1000px);
width: calc(100%);
background-color: #fafafa;
padding: 0px 0 0 0;
box-sizing: border-box;
position: relative;
box-sizing: border-box;
"
>
<div
class="right-side"
style="
width: 285px;
float: left;
height: 100%;
background-color: #fff;
box-shadow: 0 1px 3px rgb(16 17 19 / 6%);
border-radius: 4px;
overflow-y: auto;
"
>
<!-- <p style="padding: 10px 10px; box-sizing: border-box; font-weight: bold"> -->
<!-- <b class="MaxBtn" style="right: 80px; top: 5px; padding: 0"><common-drag-word @tables="getTables"></common-drag-word></b> -->
<!-- <b class="MaxBtn" @click="MTxtPic()" style="background-color: #13bc20; right: 40px; top: 5px">
<svg
t="1684978324047"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="1967"
width="15"
height="15"
>
<path
d="M512 46.208a42.666667 42.666667 0 0 1 4.992 85.077333L512 131.541333H174.208a42.666667 42.666667 0 0 0-42.368 37.717334l-0.298667 4.949333v487.850667L307.2 501.12a88.874667 88.874667 0 0 1 112.042667-6.570667l5.845333 4.608 150.442667 128.896 101.973333-101.888a88.874667 88.874667 0 0 1 110.122667-12.373333l6.058666 4.138667 104.832 78.592V512a42.666667 42.666667 0 0 1 85.077334-4.992l0.298666 4.992v342.698667a128 128 0 0 1-120.490666 127.786666l-7.509334 0.213334H174.208a128 128 0 0 1-127.786667-120.490667l-0.213333-7.509333V174.208a128 128 0 0 1 120.490667-127.786667l7.509333-0.213333H512zM366.378667 563.2l-1.536 0.853333-233.301334 213.76v76.885334a42.666667 42.666667 0 0 0 37.717334 42.368l4.949333 0.298666H855.893333a42.666667 42.666667 0 0 0 42.368-37.717333l0.298667-4.949333v-151.808l-3.285333-2.090667-152.789334-114.602667a3.541333 3.541333 0 0 0-3.2-0.554666l-1.450666 0.853333-97.28 97.28 76.970666 66.048a42.666667 42.666667 0 0 1-51.2 68.010667l-4.309333-3.2-292.437333-250.666667a3.541333 3.541333 0 0 0-3.2-0.768z m415.829333-516.992a42.666667 42.666667 0 0 1 42.410667 37.717333l0.256 4.949334v96h96a42.666667 42.666667 0 0 1 4.992 85.077333l-4.992 0.256h-96v96a42.666667 42.666667 0 0 1-85.034667 4.992l-0.298667-4.992v-96h-96a42.666667 42.666667 0 0 1-4.949333-85.034667l4.949333-0.298666h96v-96a42.666667 42.666667 0 0 1 42.666667-42.666667z"
fill="#ffffff"
p-id="1968"
></path>
</svg> </b
><b class="MaxBtn" @click="MTxtTable()" style="background-color: #e07404; right: 0px; top: 5px">
<i class="el-icon-document-add"></i>
</b> -->
<!-- </p> -->
<div class="unfetteredBox" style="height: 100%">
<commonCatalogue
<catalogue
:content="Main_List"
:articleId="articleId"
ref="catalogue"
@getTables="getTables"
@goToListComment="goToListComment"
style="width: 100%; height: 100%; padding: 0 0px; box-sizing: border-box; background-color: #fff"
>
</catalogue>
<common-word-html-type-setting
:urlList="{
img: 'api/Preaccept/getMainImages',
table: 'api/Preaccept/getMainTables'
@@ -19,7 +71,6 @@
ref="commonWordHtmlTypeSetting"
@onDragStart="onDragStart"
@huifu="huifu"
:catalogueList="tableData"
@onAddComment="onAddComment"
@addImage="handleImageAdd"
@addTable="handleTableAdd"
@@ -30,19 +81,24 @@
@goToListComment="goToListComment"
style="width: 100%; height: 100%; padding: 0 0px; box-sizing: border-box; background-color: #fff"
>
</commonCatalogue>
</common-word-html-type-setting>
<input type="file" ref="fileInput" style="display: none" @change="handleFileChange" />
</div>
</div>
<div style="" class="right-content-box">
<common-reference
ref="commonReference1"
:tableData="tableData"
></common-reference>
<!-- <common-word
<div style="width: 100%; width: calc(100% - 285px); float: right; height: calc(100% - 0px); background-color: #e4e9ed">
<!-- <div class="toolbar">
<div class="toolbar_item" @click="handleImageAdd('img')">
<img src="@/assets/img/upload.png" style="object-fit: contain" />
<span>Add Figure </span>
</div>
<div class="toolbar_item" @click="handleTableAdd('table')">
<img src="@/assets/img/uploadTable.png" style="object-fit: contain" />
<span>Add Table </span>
</div>
</div> -->
<common-word
v-if="htmlContent"
ref="commonWord"
:value="htmlContent"
@@ -55,6 +111,7 @@
@loaded="loadedWord"
@onEdit="onEdit"
@addContent="onAddContent"
@changeSort="changeSort"
@onDelete="onDelete"
@onDeletes="onDeletes"
@@ -78,7 +135,10 @@
<template slot="comment">
<div style="" class="commentList annotations"></div>
</template>
</common-word> -->
<template slot="refrences">
<reference ref="commonRef" :articleId="articleId" :p_article_id="p_article_id"></reference>
</template>
</common-word>
</div>
</div>
@@ -157,7 +217,8 @@
size="80vw"
>
<el-form ref="editMes" :model="lineStyle" label-width="80px">
<!-- <common-late-x></common-late-x> -->
<!-- :id="`editor-${new Date().getTime()}-${lineStyle.am_id}-${lineStyle.amt_id}-title`" -->
<el-form-item label="Title:">
<common-content
:id="`editor-${new Date().getTime()}-${lineStyle.am_id}-${lineStyle.amt_id}-title`"
@@ -186,7 +247,7 @@
></common-table>
</el-form-item>
<el-form-item label="Note:">
<!-- :id="`editor-${new Date().getTime()}-${lineStyle.am_id}-${lineStyle.amt_id}-note`" -->
<common-content
:id="`editor-${new Date().getTime()}-${lineStyle.am_id}-${lineStyle.amt_id}-note`"
:isAutomaticUpdate="true"
@@ -356,34 +417,25 @@
</el-button>
</span>
</el-dialog>
<common-late-x v-if="showLateX" @close="showLateX = false" @save="saveLateX" :LateXInfo="LateXInfo"></common-late-x>
</div>
</template>
<script>
import commonCatalogue from '@/components/page/components/OnlineProofreading/catalogue.vue';
import commonReference from '@/components/page/components/OnlineProofreading/reference.vue';
import bus from '@/components/common/bus';
import { del, isShallow } from 'vue';
import Tiff from 'tiff.js';
import { mediaUrl } from '@/common/js/commonJS.js'; // 引入通用逻辑
import Tinymce from '@/components/page/components/Tinymce';
import bottomTinymce from '@/components/page/components/Tinymce';
import catalogue from '@/components/page/components/OnlineProofreading/catalogue.vue';
import reference from '@/components/page/components/OnlineProofreading/reference.vue';
export default {
data() {
return {
tableData: [
// { title: 'Title ', key: '1' },
// { title: 'Author name', key: '2' },
// { title: 'Affialition', key: '3' },
// { title: 'Abstract & Keywords', key: '4' },
// { title: 'Main text', key: '5' },
// { title: 'Back Matter', key: '6' },
// { title: 'Editorial inforation', key: '7' },
// { title: 'Reference ', key: '8' },
],
p_article_id:3452,
zoomNum: (window.innerWidth * 0.38) / 850,
uploadWordTables: [],
tablesHtmlVisible: false,
@@ -507,12 +559,13 @@ export default {
components: {
Tinymce,
bottomTinymce,
commonCatalogue,
commonReference
catalogue,
reference,
},
computed: {
combinedValue() {
// 将两个值组合成一个新的值,可以是字符串、数组、对象等
// return `${this.isFirstComponentLoaded}-${this.isWordComponentLoaded}`;
}
},
watch: {
@@ -537,45 +590,49 @@ export default {
}
},
async created() {
localStorage.removeItem('scrollPosition');
this.isShowEditComment();
this.getDate();
this.getRefData();
this.getCommentList();
// this.loadDictionary().catch(console.error);
this.getReferenceList();
},
mounted() {},
async activated() {
this.isShowEditComment();
this.getDate();
this.getRefData();
this.getCommentList();
this.getReferenceList();
},
methods: {
// 获取引用文献信息
getRefData() {
getReferenceList() {
this.$api
.post('api/Preaccept/getArticleReferences', { article_id: this.$route.query.id })
.post('api/Production/getReferList', {
p_article_id: this.p_article_id
})
.then((res) => {
console.log(res);
if (res.code == 0 && res.data.refers.length > 0) {
this.tableData = res.data.refers;
}
this.referenceList = res.data.refers;
this.$nextTick(() => {
// 更新引用列表
// this.$refs.commonRef.init(this.referenceList);
});
})
.catch((err) => {
console.log(err);
});
},
async copyArray(data) {
try {
// 将数组内容转换为字符串,使用换行符分隔
const textToCopy = JSON.stringify(data);
// 使用 Clipboard API 复制文本
await navigator.clipboard.writeText(textToCopy);
alert('数组内容已复制到剪贴板!');
} catch (err) {
@@ -676,7 +733,7 @@ export default {
async saveContent(content, am_id) {
var that = this;
var str = content.replace(/^<p>\s*(.*?)\s*<\/p>$/, '$1').trim();
str = await that.$commonJS.decodeHtml(str);
await that.$api
@@ -814,14 +871,22 @@ export default {
// 编辑评论,显示文本框
goToListComment(id, type) {
this.goToComment(id);
var am_id;
if (type == 'img') {
am_id = this.Main_List.find((item) => item.ami_id == id).am_id;
}else if (type == 'content') {
am_id=id
}
else {
am_id = this.Main_List.find((item) => item.amt_id == id).am_id;
}
if (am_id) {
this.goToComment(am_id);
}
},
goToComment(mainId) {
this.$nextTick(() => {
this.$refs.commonReference1.goToComment(mainId);
this.$refs.commonWord.goToComment(mainId);
});
},
getTables(tables, html) {
@@ -1166,19 +1231,21 @@ export default {
},
async onAddRow(mainId) {
await this.$api
.post(this.urlList.addRow, {
am_id: mainId,
article_id: this.articleId
})
.then(async (res) => {
if (res.code == 0) {
this.getDate();
this.getCommentList();
} else {
if(res.code == 0){
this.getDate();
this.getCommentList();
}else{
this.$message.error(res.msg);
}
})
.catch((err) => {
this.$message.error(err.msg);
@@ -1251,6 +1318,7 @@ export default {
},
deleteProofreading(data, index) {
console.log('comment at line 480:', data);
},
async cancelSolveComment(data) {
@@ -1372,7 +1440,7 @@ export default {
this.currentId = dataId;
},
async onDrop(event, dataId) {
if (event.dataTransfer.getData('image')) {
const draggedImage = JSON.parse(event.dataTransfer.getData('image'));
@@ -1446,10 +1514,13 @@ export default {
});
},
getWord() {
this.htmlContent = 'true';
},
// 获取数据
async getDate() {
this.imagesList = [];
let urlLInk = '';
let urlTask = {};
@@ -1469,7 +1540,7 @@ export default {
.post(urlLInk, urlTask)
.then(async (res) => {
if (res.code == 0) {
this.Main_List = res.data.list.map((e) => {
this.Main_List = res.data.list.map(e=>{
e.checked = false;
return e;
});
@@ -1477,13 +1548,14 @@ export default {
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;
// this.Main_List[i].checked = false;
}
// setTimeout(async () => {
this.$nextTick(async () => {
await this.getWord();
loading.close();
});
// }, 1000);
@@ -1842,11 +1914,12 @@ export default {
},
handleAvatarError(res, file) {},
beforeAvatarUpload(file) {
// const isLt2M = file.size / 1024 / 1024 < 10;
// if (!isLt2M) {
// this.$message.error('Picture size cannot exceed 10M!');
// }
// return isLt2M;
const isLt2M = file.size / 1024 / 1024 < 20;
if (!isLt2M) {
this.$message.error('Picture size cannot exceed 20M!');
return false;
}
const isValidFormat = ['image/jpeg', 'image/png', 'image/tiff'].includes(file.type);
if (!isValidFormat) {
this.$message.error(this.$t('commonTable.uploadImageInfo'));
@@ -1871,28 +1944,6 @@ export default {
</script>
<style scoped>
.container{
height: 100%;
min-width: calc(1000px);
width: calc(100%);
background-color: #fafafa;
padding: 0px 0 0 0;
box-sizing: border-box;
position: relative;
box-sizing: border-box;
}
.right-side{
width: 280px;
float: left;
height: 100%;
background-color: #fff;
box-shadow: 0 1px 3px rgb(16 17 19 / 6%);
border-radius: 4px;
overflow-y: auto;
}
.right-content-box{
width: 100%; width: calc(100% - 285px); float: right; height: calc(100% - 0px); background-color: #e4e9ed
}
.lineStyle {
border-top: 1px solid #0066994d;
padding: 20px 20px 40px 20px;

View File

@@ -1847,31 +1847,35 @@ export default {
},
// 算平均分
avegeCount(arry) {
// 1. 计算有有效评分的数量
var ratedLength = arry.map(item => item.rated).filter(rated => rated && rated > 0).length;
let all = 0;
// 2. 累加总分
for (let i = 0; i < arry.length; i++) {
all += Number(arry[i].rated || 0); // 加上 || 0 防止出现 undefined 导致计算失败
}
// 3. 核心判断逻辑
// 如果没有评分的人(ratedLength 为 0),或者总分就是 0直接返回 "-"
// 否则计算平均分并保留一位小数
let str = (ratedLength > 0 && all > 0)
? (all / ratedLength).toFixed(1)
: "-";
return str;
},
// 算终审分
finalCount(arry) {
var ratedLength = arry.map(item => item.rated).filter(rated => rated&&rated>0).length;
let str = 0;
let all = 0;
let sgr = 0;
for (let i = 0; i < arry.length; i++) {
all += Number(arry[i].rated);
}
str = (all / ratedLength).toFixed(1);
return str;
},
// 算终审分
finalCount(arry) {
let str = 0;
let sgr = 0;
let all = 0;
let j = 0; // null 评分人数
for (let i = 0; i < arry.length; i++) {
if (arry[i].rated == null) {
j += 1;
continue;
} else {
all += Number(arry[i].rated);
}
}
str = (all / (arry.length - j)).toFixed(1);
sgr = ((Number(str) + Number(this.form.scoring)) / 2).toFixed(1);
return sgr;
},

View File

@@ -1458,15 +1458,25 @@ export default {
},
// 算平均分
avegeCount(arry) {
var ratedLength = arry.map(item => item.rated).filter(rated => rated&&rated>0).length;
let str = 0;
let all = 0;
for (let i = 0; i < arry.length; i++) {
all += Number(arry[i].rated);
}
str = (all / ratedLength).toFixed(1);
return str;
},
// 1. 计算有有效评分的数量
var ratedLength = arry.map(item => item.rated).filter(rated => rated && rated > 0).length;
let all = 0;
// 2. 累加总分
for (let i = 0; i < arry.length; i++) {
all += Number(arry[i].rated || 0); // 加上 || 0 防止出现 undefined 导致计算失败
}
// 3. 核心判断逻辑
// 如果没有评分的人(ratedLength 为 0),或者总分就是 0直接返回 "-"
// 否则计算平均分并保留一位小数
let str = (ratedLength > 0 && all > 0)
? (all / ratedLength).toFixed(1)
: "-";
return str;
},
toggleShowAll(item, i) {
this.$set(this.tableData[i], 'showAll', !item.showAll);
this.$forceUpdate();

View File

@@ -95,11 +95,16 @@
<el-table-column label="State" align="center" width="130">
<template slot-scope="scope">
<span style="font-size: 16px;"v-html="revstate(scope.row)"></span>
<font
<!-- 0初始1小改后接收2拒稿3通过4过期5邀请 -->
<font
style="color: #aaa; display: block; line-height: 18px; font-size: 13px; "
v-html="formatDate(scope.row.ctime)"
>
<span v-html="formatDate(scope.row.ctime)" v-if="[5].includes(scope.row.state)"></span>
<span v-html="formatDate(scope.row.agree_review_time>0?scope.row.agree_review_time:scope.row.ctime)" v-if="[0].includes(scope.row.state)"></span>
<span v-html="formatDate(scope.row.refuse_review_time>0?scope.row.refuse_review_time:scope.row.ctime)" v-if="[4].includes(scope.row.state)"></span>
<span v-html="formatDate(scope.row.review_time>0?scope.row.review_time:scope.row.ctime)" v-if="[1,2,3].includes(scope.row.state)"></span>
</font>
</template>
</el-table-column>

View File

@@ -1,44 +1,20 @@
<template>
<!-- v-show="tables.length > 0 || images.length > 0" -->
<div
style=""
class="ManuscirptList"
>
<!-- 图片缩略图区域 -->
<div class="title">
Reference List
</div>
<div
style=""
class="arrlist"
>
<ul style="width: 100%; height: auto">
<li >
<div style="display: flex; flex-wrap: wrap; gap: 10px; justify-content: start">
<div @click="goToListComment(item.p_refer_id)"
v-for="(item, index) in catalogueList"
style="width: calc(100%); display: flex; align-items: center; justify-content: space-between; color: #606266"
>
<div class="doi_box"><span style="color: #888;margin-right: 5px;">{{ index+1 }}.</span> <span class="doi">{{ item.refer_doi }}</span></div>
<div class="ManuscirptList">
<div class="arrlist">
<ul class="catalogue-ul">
<li class="catalogue-li">
<div
@click="goToListComment(item.am_id,'content')"
v-for="(item, index) in catalogueList"
:key="index"
:class="['catalogue-item', 'level-' + item.level]"
>
<div class="title-content-wrapper">
<div class="title-content" v-html="item.content"></div>
</div>
<!-- <div
style="
width: calc(100% - 50px);
white-space: nowrap; /* 防止文本换行 */
overflow: hidden; /* 隐藏超出部分 */
text-overflow: ellipsis;
"
>
<p
v-html="index + 1 + '. ' + item.content"
style="font-size: 14px; width: 100%; overflow: hidden; line-height: 30px"
></p>
</div> -->
</div>
</div>
</li>
</ul>
@@ -49,9 +25,18 @@
<script>
import { mediaUrl } from '@/common/js/commonJS.js'; // 引入通用逻辑
export default {
props: ['articleId', 'imgWidth', 'imgHeight', 'scale', 'isEdit', 'isShowEdit', 'urlList', 'content','catalogueList'],
props: ['articleId', 'imgWidth', 'imgHeight', 'scale', 'isEdit', 'isShowEdit', 'urlList', 'content'],
watch: {
content: {
handler(newVal, oldVal) {
if(this.content.length > 0)this.getCatalogueList();
},
deep: true
}
},
data() {
return {
catalogueList: [],
isShowComment: false,
isCollapse: false,
isEditComment: false,
@@ -91,6 +76,33 @@ export default {
}
},
methods: {
getCatalogueList() {
this.catalogueList = this.content.filter(item => {
return item.is_h1 == 1 || item.is_h2 == 1 ;
}).map(item => {
// 增加一个 level 字段进行标记
let level = 1;
if (item.is_h2 == 1) level = 2;
return {
...item,
level: level // 1, 2, 或 3
};
})
this.catalogueList=[...this.catalogueList,{
am_id:'References',
content:'References',
level:1,
}]
// this.catalogueList = res.data;
},
changeIsCollapse(e) {
localStorage.setItem('isCollapse', e);
},
@@ -254,6 +266,7 @@ export default {
}
},
goToListComment(id, type) {
console.log('id at line 399:', id);
this.$emit('goToListComment', id, type);
},
async refresh(type) {
@@ -459,217 +472,151 @@ export default {
<style scoped>
.ManuscirptList {
background-color: none !important;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
color: #333639;
background-color: transparent !important; margin-top: 0px !important; height: 100%; padding: 0 !important; overflow: hidden
}
.ManuscirptList div {
cursor: pointer;
background-color: none !important;
}
::v-deep .wordTableHtml table {
cursor: pointer;
background-color: #fff !important;
border-bottom: 1px solid #000 !important;
}
.el-menu-vertical-demo {
width: 85px;
}
.el-menu-vertical-demo li {
height: 100%;
padding: 0;
box-sizing: border-box;
background-color: #f5f5f5 !important; /* Word 导航栏通常是白色的 */
border-right: 1px solid #e1e1e1;
display: flex;
flex-direction: column;
padding: 10px 6px !important;
font-size: 14px !important;
text-align: center;
}
::v-deep .el-menu-vertical-demo.el-menu-item:focus,
.el-menu-item:hover {
background-color: #f8f8f9 !important;
/* 模拟 Word 导航标题 */
.word-navigation-header {
padding: 12px 16px 0 16px;
font-size: 14px;
color: #333;
font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}
::v-deep .el-menu-item.is-active {
background-color: #2196f32e !important;
.word-tabs {
display: flex;
margin-top: 10px;
border-bottom: 1px solid #e1e1e1;
}
.isSelectType {
background-color: #2196f32e !important;
color: #006699;
.word-tabs span {
padding: 4px 12px;
font-size: 12px;
color: #666;
cursor: pointer;
position: relative;
}
li {
.word-tabs span.active {
color: #2b579a; /* Word 经典蓝色 */
font-weight: bold;
}
.word-tabs span.active::after {
content: "";
position: absolute;
bottom: -1px;
left: 0;
right: 0;
height: 2px;
background-color: #2b579a;
}
/* 列表容器 */
.arrlist {
flex: 1;
overflow-y: auto;
padding-top: 8px;
}
.catalogue-ul {
width: 100%;
list-style: none;
padding: 0;
margin: 0;
}
.item_box {
background-color: #f2f3f5;
border: 1px solid rgba(0, 0, 0, 0);
border-radius: 6px;
/* 基础条目样式 - 模拟 Word 悬浮效果 */
.catalogue-item {
position: relative;
width: 100%;
/* padding: 6px 16px; */
cursor: pointer;
display: flex;
align-items: flex-start;
box-sizing: border-box;
transition: background-color 0.1s;
}
.catalogue-item:hover {
background-color: #eff3f9; /* Word 淡淡的选中蓝 */
}
/* Word 样式的左侧小箭头 */
.word-icon-arrow {
width: 0;
height: 0;
border-left: 5px solid #666;
border-top: 4px solid transparent;
border-bottom: 4px solid transparent;
margin-right: 8px;
margin-top: 6px;
}
.title-content-wrapper {
flex: 1;
overflow: hidden;
}
.go-transition .title {
background-color: #e5e6eb;
color: #767c82;
font-size: 13px;
padding: 2px 10px;
display: flex;
align-items: center;
justify-content: space-between;
}
.go-transition .list-img {
padding: 6px 0;
background-color: #f2f3f5;
box-sizing: border-box;
}
.go-transition .list-img :hover {
transition: all 0.4s;
}
.go-content-charts-item-box {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 9px;
transition: all 0.7s linear;
}
.arraylist {
background-color: #f8f8f9;
}
.arrlist {
width: 280px; padding: 14px; height: calc(100% - 30px); box-sizing: border-box; overflow-y: auto;
border-top: 1px solid #ddd;
}
.arrlist li{
line-height: 30px
}
.arrlist::-webkit-scrollbar-thumb {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
min-height: 12px;
border: 4px solid transparent;
background-clip: content-box;
border-radius: 7px;
background-color: #c8d5e1;
}
.badge {
background-color: #f56c6c;
border-radius: 10px;
color: #fff;
display: inline-block;
font-size: 12px;
height: 18px;
line-height: 18px;
padding: 0 6px;
text-align: center;
/* 重点Word 常用排版字体 */
.title-content {
font-weight: bold !important;
font-style: normal !important;
font-size: 13px !important;
line-height: 1.3;
white-space: nowrap;
border: 1px solid #fff;
position: absolute;
}
.comments-section {
padding: 10px;
box-sizing: border-box;
border: 1px solid #cecfd3;
border-left: 2px solid #cecfd3;
/* border-radius: 5px; */
background-color: #f9f9f9;
box-shadow: rgba(16, 17, 19, 0.06) 0px 1px 3px;
width: 300px;
background-color: #fafafa;
float: right;
position: absolute;
right: -302px;
top: 0px;
z-index: 999;
padding: 4px 0px;
overflow: hidden;
text-overflow: ellipsis;
/* Times New Roman 增加学术感 */
font-family: "Charis SIL" !important;
color: #333;
}
.comment-item {
padding: 5px 0;
border-bottom: 1px solid #ddd;
cursor: pointer;
box-sizing: border-box;
/* 保持 v-html 内部样式 */
::v-deep .title-content b { font-weight: bold; }
::v-deep .title-content i { font-style: italic; }
/* --- Word 风格的层级缩进 --- */
/* 1级标题 */
.level-1 {
padding-left: 16px;
}
.level-1 .title-content{
font-style: italic !important;
}
/* 2级标题 */
.level-2 {
padding-left: 36px;
}
.level-2 .title-content {
font-size: 14px;
}
.comment-item:last-child {
border-bottom: none;
/* 3级标题 */
.level-3 {
padding-left: 56px;
}
.level-3 .title-content {
font-size: 14px;
color: #666;
}
.comment-details {
margin-top: 20px;
padding: 10px;
border: 1px solid #ddd;
border-radius: 5px;
background-color: #f9f9f9;
/* 隐藏滚动条 */
.arrlist::-webkit-scrollbar {
width: 5px;
}
.comment-details h3 {
margin-bottom: 10px;
}
.comment-details p {
margin-bottom: 10px;
}
.comment-details button {
padding: 5px 10px;
background-color: #007bff;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
.comment-details button:hover {
background-color: #0056b3;
}
.comments-section ul,
.comments-section li {
list-style: none;
margin: 0;
padding: 0;
}
::v-deep.pizhu.el-link--default:hover {
border-color: #fc625d !important;
}
.go-mt {
/* background-color: #f2f3f5;
height: 28px; */
width: 200px;
float: right;
}
.double .item_box {
width: 46% !important;
}
.double .item_box .previewbox {
display: none;
}
.double .item_box .imgbox {
height: 50px !important;
width: auto !important;
}
.double .item_box .imgbox img {
height: 60px !important;
width: auto !important;
}
.double .go-transition .title {
font-size: 12px !important;
padding: 0 2px !important;
line-height: 20px !important;
}
.single {
}
.title{
line-height: 28px;
padding: 10px 10px;
font-size: 18px;
font-weight: bold;
}
.doi_box{
width: 100%;
display: flex;align-items: center;
font-size: 14px;
line-height: 16px;
}
.doi{
width: calc(100% );
white-space: nowrap;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
.arrlist::-webkit-scrollbar-thumb {
background: #cdcdcd;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -9,7 +9,10 @@ import htmlDocx from 'html-docx-js/dist/html-docx.js';
import { Document, Packer, PageOrientation, Paragraph, TextRun } from 'docx'; // 引入 docx.js
import html2canvas from 'html2canvas';
const tableStyle = ` b span{
const tableStyle = `*{
font-family: 'Charis SIL';
}
b span{
font-weight: bold !important;
}
i span{

View File

@@ -0,0 +1 @@

View File

@@ -16,7 +16,7 @@
:value="value"
:typesettingType="typesettingType"
class="paste-area text-container"
:toolbar="!isAutomaticUpdate?['bold italic |customBlue removeBlue|LateX| myuppercase myuppercasea Line|subscript superscript|clearButton|searchreplace']:['bold italic |customBlue removeBlue| myuppercase myuppercasea Line|subscript superscript|clearButton|searchreplace']"
:toolbar="!isAutomaticUpdate?['bold italic |customBlue removeBlue|LateX| myuppercase myuppercasea Line MoreSymbols|subscript superscript|clearButton|searchreplace']:['bold italic |customBlue removeBlue| myuppercase myuppercasea Line|subscript superscript|clearButton|searchreplace']"
style="
/* white-space: pre-line; */
line-height: 12px;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff