This commit is contained in:
2025-12-23 14:55:16 +08:00
parent 530470d138
commit b1b1996648
5 changed files with 351 additions and 407 deletions

View File

@@ -2153,7 +2153,32 @@ ed.ui.registry.addButton('myuppercasea', {
ed.insertContent(''); 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', { ed.ui.registry.addButton('removeBlue', {
text: 'Blue', // 按钮文本 text: 'Blue', // 按钮文本

View File

@@ -2,14 +2,66 @@
<div style="height: 100%"> <div style="height: 100%">
<div <div
class="container" 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 <div
class="right-side" 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%"> <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="{ :urlList="{
img: 'api/Preaccept/getMainImages', img: 'api/Preaccept/getMainImages',
table: 'api/Preaccept/getMainTables' table: 'api/Preaccept/getMainTables'
@@ -19,7 +71,6 @@
ref="commonWordHtmlTypeSetting" ref="commonWordHtmlTypeSetting"
@onDragStart="onDragStart" @onDragStart="onDragStart"
@huifu="huifu" @huifu="huifu"
:catalogueList="tableData"
@onAddComment="onAddComment" @onAddComment="onAddComment"
@addImage="handleImageAdd" @addImage="handleImageAdd"
@addTable="handleTableAdd" @addTable="handleTableAdd"
@@ -30,19 +81,24 @@
@goToListComment="goToListComment" @goToListComment="goToListComment"
style="width: 100%; height: 100%; padding: 0 0px; box-sizing: border-box; background-color: #fff" 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" /> <input type="file" ref="fileInput" style="display: none" @change="handleFileChange" />
</div> </div>
</div> </div>
<div style="" class="right-content-box"> <div style="width: 100%; width: calc(100% - 285px); float: right; height: calc(100% - 0px); background-color: #e4e9ed">
<!-- <div class="toolbar">
<common-reference <div class="toolbar_item" @click="handleImageAdd('img')">
<img src="@/assets/img/upload.png" style="object-fit: contain" />
ref="commonReference1" <span>Add Figure </span>
:tableData="tableData" </div>
<div class="toolbar_item" @click="handleTableAdd('table')">
></common-reference> <img src="@/assets/img/uploadTable.png" style="object-fit: contain" />
<!-- <common-word <span>Add Table </span>
</div>
</div> -->
<common-word
v-if="htmlContent" v-if="htmlContent"
ref="commonWord" ref="commonWord"
:value="htmlContent" :value="htmlContent"
@@ -55,6 +111,7 @@
@loaded="loadedWord" @loaded="loadedWord"
@onEdit="onEdit" @onEdit="onEdit"
@addContent="onAddContent" @addContent="onAddContent"
@changeSort="changeSort" @changeSort="changeSort"
@onDelete="onDelete" @onDelete="onDelete"
@onDeletes="onDeletes" @onDeletes="onDeletes"
@@ -78,7 +135,7 @@
<template slot="comment"> <template slot="comment">
<div style="" class="commentList annotations"></div> <div style="" class="commentList annotations"></div>
</template> </template>
</common-word> --> </common-word>
</div> </div>
</div> </div>
@@ -157,7 +214,8 @@
size="80vw" size="80vw"
> >
<el-form ref="editMes" :model="lineStyle" label-width="80px"> <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:"> <el-form-item label="Title:">
<common-content <common-content
:id="`editor-${new Date().getTime()}-${lineStyle.am_id}-${lineStyle.amt_id}-title`" :id="`editor-${new Date().getTime()}-${lineStyle.am_id}-${lineStyle.amt_id}-title`"
@@ -186,7 +244,7 @@
></common-table> ></common-table>
</el-form-item> </el-form-item>
<el-form-item label="Note:"> <el-form-item label="Note:">
<!-- :id="`editor-${new Date().getTime()}-${lineStyle.am_id}-${lineStyle.amt_id}-note`" -->
<common-content <common-content
:id="`editor-${new Date().getTime()}-${lineStyle.am_id}-${lineStyle.amt_id}-note`" :id="`editor-${new Date().getTime()}-${lineStyle.am_id}-${lineStyle.amt_id}-note`"
:isAutomaticUpdate="true" :isAutomaticUpdate="true"
@@ -356,34 +414,22 @@
</el-button> </el-button>
</span> </span>
</el-dialog> </el-dialog>
<common-late-x v-if="showLateX" @close="showLateX = false" @save="saveLateX" :LateXInfo="LateXInfo"></common-late-x> <common-late-x v-if="showLateX" @close="showLateX = false" @save="saveLateX" :LateXInfo="LateXInfo"></common-late-x>
</div> </div>
</template> </template>
<script> <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 bus from '@/components/common/bus';
import { del, isShallow } from 'vue'; import { del, isShallow } from 'vue';
import Tiff from 'tiff.js'; import Tiff from 'tiff.js';
import { mediaUrl } from '@/common/js/commonJS.js'; // 引入通用逻辑 import { mediaUrl } from '@/common/js/commonJS.js'; // 引入通用逻辑
import Tinymce from '@/components/page/components/Tinymce'; import Tinymce from '@/components/page/components/Tinymce';
import bottomTinymce from '@/components/page/components/Tinymce'; import bottomTinymce from '@/components/page/components/Tinymce';
import catalogue from '@/components/page/components/OnlineProofreading/catalogue.vue';
export default { export default {
data() { data() {
return { 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' },
],
zoomNum: (window.innerWidth * 0.38) / 850, zoomNum: (window.innerWidth * 0.38) / 850,
uploadWordTables: [], uploadWordTables: [],
tablesHtmlVisible: false, tablesHtmlVisible: false,
@@ -507,12 +553,12 @@ export default {
components: { components: {
Tinymce, Tinymce,
bottomTinymce, bottomTinymce,
commonCatalogue, catalogue
commonReference
}, },
computed: { computed: {
combinedValue() { combinedValue() {
// 将两个值组合成一个新的值,可以是字符串、数组、对象等
// return `${this.isFirstComponentLoaded}-${this.isWordComponentLoaded}`;
} }
}, },
watch: { watch: {
@@ -537,45 +583,32 @@ export default {
} }
}, },
async created() { async created() {
// await this.$api.post('api/Proofread/proofRead', {
// article_id: this.$route.query.id
// });
localStorage.removeItem('scrollPosition'); localStorage.removeItem('scrollPosition');
this.isShowEditComment(); this.isShowEditComment();
this.getDate(); this.getDate();
this.getRefData();
this.getCommentList(); this.getCommentList();
// this.loadDictionary().catch(console.error); // this.loadDictionary().catch(console.error);
}, },
mounted() {}, mounted() {},
async activated() { async activated() {
// await this.$api.post('api/Proofread/proofRead', {
// article_id: this.$route.query.id
// });
this.isShowEditComment(); this.isShowEditComment();
this.getDate(); this.getDate();
this.getRefData();
this.getCommentList(); this.getCommentList();
}, },
methods: { methods: {
// 获取引用文献信息
getRefData() {
this.$api
.post('api/Preaccept/getArticleReferences', { article_id: this.$route.query.id })
.then((res) => {
console.log(res);
if (res.code == 0 && res.data.refers.length > 0) {
this.tableData = res.data.refers;
}
})
.catch((err) => {
console.log(err);
});
},
async copyArray(data) { async copyArray(data) {
try { try {
// 将数组内容转换为字符串,使用换行符分隔
const textToCopy = JSON.stringify(data); const textToCopy = JSON.stringify(data);
// 使用 Clipboard API 复制文本
await navigator.clipboard.writeText(textToCopy); await navigator.clipboard.writeText(textToCopy);
alert('数组内容已复制到剪贴板!'); alert('数组内容已复制到剪贴板!');
} catch (err) { } catch (err) {
@@ -676,7 +709,7 @@ export default {
async saveContent(content, am_id) { async saveContent(content, am_id) {
var that = this; var that = this;
var str = content.replace(/^<p>\s*(.*?)\s*<\/p>$/, '$1').trim(); var str = content.replace(/^<p>\s*(.*?)\s*<\/p>$/, '$1').trim();
str = await that.$commonJS.decodeHtml(str); str = await that.$commonJS.decodeHtml(str);
await that.$api await that.$api
@@ -814,14 +847,22 @@ export default {
// 编辑评论,显示文本框 // 编辑评论,显示文本框
goToListComment(id, type) { goToListComment(id, type) {
var am_id;
if (type == 'img') {
this.goToComment(id); 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) { goToComment(mainId) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.commonReference1.goToComment(mainId); this.$refs.commonWord.goToComment(mainId);
}); });
}, },
getTables(tables, html) { getTables(tables, html) {
@@ -1166,19 +1207,21 @@ export default {
}, },
async onAddRow(mainId) { async onAddRow(mainId) {
await this.$api await this.$api
.post(this.urlList.addRow, { .post(this.urlList.addRow, {
am_id: mainId, am_id: mainId,
article_id: this.articleId article_id: this.articleId
}) })
.then(async (res) => { .then(async (res) => {
if (res.code == 0) { if(res.code == 0){
this.getDate(); this.getDate();
this.getCommentList(); this.getCommentList();
} else { }else{
this.$message.error(res.msg); this.$message.error(res.msg);
} }
}) })
.catch((err) => { .catch((err) => {
this.$message.error(err.msg); this.$message.error(err.msg);
@@ -1251,6 +1294,7 @@ export default {
}, },
deleteProofreading(data, index) { deleteProofreading(data, index) {
console.log('comment at line 480:', data); console.log('comment at line 480:', data);
}, },
async cancelSolveComment(data) { async cancelSolveComment(data) {
@@ -1372,7 +1416,7 @@ export default {
this.currentId = dataId; this.currentId = dataId;
}, },
async onDrop(event, dataId) { async onDrop(event, dataId) {
if (event.dataTransfer.getData('image')) { if (event.dataTransfer.getData('image')) {
const draggedImage = JSON.parse(event.dataTransfer.getData('image')); const draggedImage = JSON.parse(event.dataTransfer.getData('image'));
@@ -1446,10 +1490,13 @@ export default {
}); });
}, },
getWord() { getWord() {
this.htmlContent = 'true'; this.htmlContent = 'true';
}, },
// 获取数据 // 获取数据
async getDate() { async getDate() {
this.imagesList = []; this.imagesList = [];
let urlLInk = ''; let urlLInk = '';
let urlTask = {}; let urlTask = {};
@@ -1469,7 +1516,7 @@ export default {
.post(urlLInk, urlTask) .post(urlLInk, urlTask)
.then(async (res) => { .then(async (res) => {
if (res.code == 0) { if (res.code == 0) {
this.Main_List = res.data.list.map((e) => { this.Main_List = res.data.list.map(e=>{
e.checked = false; e.checked = false;
return e; return e;
}); });
@@ -1483,7 +1530,8 @@ export default {
// setTimeout(async () => { // setTimeout(async () => {
this.$nextTick(async () => { this.$nextTick(async () => {
await this.getWord(); await this.getWord();
loading.close(); loading.close();
}); });
// }, 1000); // }, 1000);
@@ -1842,11 +1890,12 @@ export default {
}, },
handleAvatarError(res, file) {}, handleAvatarError(res, file) {},
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
// const isLt2M = file.size / 1024 / 1024 < 10; const isLt2M = file.size / 1024 / 1024 < 20;
// if (!isLt2M) { if (!isLt2M) {
// this.$message.error('Picture size cannot exceed 10M!'); this.$message.error('Picture size cannot exceed 20M!');
// } return false;
// return isLt2M; }
const isValidFormat = ['image/jpeg', 'image/png', 'image/tiff'].includes(file.type); const isValidFormat = ['image/jpeg', 'image/png', 'image/tiff'].includes(file.type);
if (!isValidFormat) { if (!isValidFormat) {
this.$message.error(this.$t('commonTable.uploadImageInfo')); this.$message.error(this.$t('commonTable.uploadImageInfo'));
@@ -1871,28 +1920,6 @@ export default {
</script> </script>
<style scoped> <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 { .lineStyle {
border-top: 1px solid #0066994d; border-top: 1px solid #0066994d;
padding: 20px 20px 40px 20px; padding: 20px 20px 40px 20px;

View File

@@ -1,15 +1,10 @@
<template> <template>
<!-- v-show="tables.length > 0 || images.length > 0" -->
<div <div
style="" style=""
class="ManuscirptList" class="ManuscirptList"
> >
<!-- 图片缩略图区域 -->
<div class="title">
Reference List
</div>
<div <div
style="" style=""
class="arrlist" class="arrlist"
@@ -18,26 +13,13 @@
<li > <li >
<div style="display: flex; flex-wrap: wrap; gap: 10px; justify-content: start"> <div style="">
<div @click="goToListComment(item.p_refer_id)" <div @click="goToListComment(item.am_id,'content')"
v-for="(item, index) in catalogueList" v-for="(item, index) in catalogueList"
style="width: calc(100%); display: flex; align-items: center; justify-content: space-between; color: #606266" :class="['catalogue-item', 'level-' + item.level]"
style=""
> >
<div class="doi_box"><span style="color: #888;margin-right: 5px;">{{ index+1 }}.</span> <span class="doi">{{ item.refer_doi }}</span></div> <div class="title-content" v-html="item.content"></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>
</div> </div>
</li> </li>
@@ -49,9 +31,18 @@
<script> <script>
import { mediaUrl } from '@/common/js/commonJS.js'; // 引入通用逻辑 import { mediaUrl } from '@/common/js/commonJS.js'; // 引入通用逻辑
export default { 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() { data() {
return { return {
catalogueList: [],
isShowComment: false, isShowComment: false,
isCollapse: false, isCollapse: false,
isEditComment: false, isEditComment: false,
@@ -91,6 +82,33 @@ export default {
} }
}, },
methods: { methods: {
getCatalogueList() {
this.catalogueList = this.content.filter(item => {
return item.is_h1 == 1 || item.is_h2 == 1 || item.is_h3 == 1;
}).map(item => {
// 增加一个 level 字段进行标记
let level = 1;
if (item.is_h2 == 1) level = 2;
if (item.is_h3 == 1) level = 3;
return {
...item,
level: level // 1, 2, 或 3
};
})
this.catalogueList=[...this.catalogueList,{
am_id:'reference',
content:'<b><i>References</i></b>',
level:1,
}]
console.log(this.catalogueList,'catalogueList')
// this.catalogueList = res.data;
},
changeIsCollapse(e) { changeIsCollapse(e) {
localStorage.setItem('isCollapse', e); localStorage.setItem('isCollapse', e);
}, },
@@ -254,6 +272,7 @@ export default {
} }
}, },
goToListComment(id, type) { goToListComment(id, type) {
console.log('id at line 399:', id);
this.$emit('goToListComment', id, type); this.$emit('goToListComment', id, type);
}, },
async refresh(type) { async refresh(type) {
@@ -458,218 +477,58 @@ export default {
</script> </script>
<style scoped> <style scoped>
.ManuscirptList { .ManuscirptList{
background-color: none !important; padding-top: 20px;
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 {
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;
}
::v-deep .el-menu-item.is-active {
background-color: #2196f32e !important;
}
.isSelectType {
background-color: #2196f32e !important;
color: #006699;
}
li {
list-style: none;
}
.item_box {
background-color: #f2f3f5;
border: 1px solid rgba(0, 0, 0, 0);
border-radius: 6px;
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; box-sizing: border-box;
background: #f5f5f5 !important;
} }
.go-transition .list-img :hover { .catalogue-item{
transition: all 0.4s; width: 90%;
} white-space: nowrap; /* 强制不换行 */
.go-content-charts-item-box { overflow: hidden; /* 隐藏超出部分 */
display: flex; text-overflow: ellipsis; /* 超出部分显示... */
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;
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;
}
.comment-item {
padding: 5px 0;
border-bottom: 1px solid #ddd;
cursor: pointer;
box-sizing: border-box; box-sizing: border-box;
font-size: 14px; font-size: 14px;
} color: rgb(51, 51, 51);
.comment-item:last-child {
border-bottom: none;
}
.comment-details {
margin-top: 20px;
padding: 10px;
border: 1px solid #ddd;
border-radius: 5px;
background-color: #f9f9f9;
}
.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; cursor: pointer;
padding: 4px 0px;
margin-left: 16px;
font-family: "Charis SIL";
word-wrap: break-word;
overflow: hidden;
}
.title-content,
.title-content span,
.title-content b {
display: inline; /* 强制内部标签不换行 */
font-weight: inherit; /* 继承父级的粗细设置,或者根据需要自定 */
font-size: inherit;
}
.catalogue-item:hover {
background-color: #e6f7ff;
color: #1890ff;
} }
.comment-details button:hover { /* 一级标题:加粗,无缩进 */
background-color: #0056b3; .level-1 {
font-weight: bold;
padding-left: 0;
/* margin-top: 8px; */
} }
.comments-section ul,
.comments-section li { /* 二级标题:标准字体,缩进 20px */
list-style: none; .level-2 {
margin: 0;
padding: 0; padding-left: 20px;
color: #555;
} }
::v-deep.pizhu.el-link--default:hover {
border-color: #fc625d !important; /* 三级标题:稍细字体,缩进 40px */
} .level-3 {
.go-mt {
/* background-color: #f2f3f5; padding-left: 40px;
height: 28px; */ color: #888;
width: 200px; font-style: italic; /* 模仿 Word 的一些三级样式 */
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;
} }
</style> </style>

View File

@@ -16,7 +16,7 @@
:value="value" :value="value"
:typesettingType="typesettingType" :typesettingType="typesettingType"
class="paste-area text-container" 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=" style="
/* white-space: pre-line; */ /* white-space: pre-line; */
line-height: 12px; line-height: 12px;

View File

@@ -1065,61 +1065,48 @@
</div> </div>
<div v-if="isMenuVisible" class="context-menu" :style="{ top: `${menuPosition.y}px`, left: `${menuPosition.x}px` }"> <div v-if="isMenuVisible" class="wps-two-layer-bar" :style="{ top: `${menuPosition.y}px`, left: `${menuPosition.x}px` }">
<ul> <div class="bar-row">
<!-- {{ menuType }} --> <div v-if="currentData.type == 0" class="h-group">
<span :class="['h-item', { active: currentData.is_h1 == 1 }]" @click="changeTitle(1)">H1</span>
<span :class="['h-item', { active: currentData.is_h2 == 1 }]" @click="changeTitle(2)">H2</span>
<span :class="['h-item', { active: currentData.is_h3 == 1 }]" @click="changeTitle(3)">H3</span>
</div>
<div class="row-divider" v-if="currentData.type == 0"></div>
<div v-if="currentData.type == 0"> <div class="menu-item primary" @click="menuAction('edit')">
<div style="padding: 0 60px 0 20px"> <i class="el-icon-edit"></i><span>Edit</span>
<ul class="HTitleBox" style="border: none"> </div>
<li
style="font-size: 16px"
:style="currentData.is_h1 == 1 ? 'color:#4d99f1' : 'color:#333'"
@click="currentData.is_h1 == 0 ? changeTitle(1) : changeTitle(0)"
>
H1
</li>
<li
style="font-size: 16px"
:style="currentData.is_h2 == 1 ? 'color:#4d99f1' : 'color:#333'"
@click="currentData.is_h2 == 0 ? changeTitle(2) : changeTitle(0)"
>
H2
</li>
<li
style="font-size: 16px"
:style="currentData.is_h3 == 1 ? 'color:#4d99f1' : 'color:#333'"
@click="currentData.is_h3 == 0 ? changeTitle(3) : changeTitle(0)"
>
H3
</li>
</ul>
</div>
</div>
<li @click="menuAction('edit')" style="color: rgb(43, 129, 239) !important"><i class="el-icon-edit" style=""></i>Edit</li> <div v-if="isEditComment&& currentData.type == 0" class="menu-item ai-feat" @click="menuAction('proofreading')">
<li <i class="el-icon-magic-stick"></i><span>AI Proofreading</span>
v-if="isEditComment && currentData.type == 0" </div>
style="color: #409eff"
@mousedown="cacheSelection"
@click="menuAction('proofreading')"
>
<i class="el-icon-document"></i>AI Proofreading
</li>
<li v-if="isEditComment" style="color: #f56c6c" @mousedown="cacheSelection" @click="menuAction('comment')">
<i class="el-icon-document-add"></i>Comment
</li>
<li @click="menuAction('up')"><i class="el-icon-arrow-up" style=""></i>Move Up</li> <div v-if="isEditComment" class="menu-item comment-feat" @mousedown="cacheSelection" @click="menuAction('comment')">
<li @click="menuAction('down')"><i class="el-icon-arrow-down" style=""></i>Move Down</li> <i class="el-icon-chat-line-square"></i><span>Comment</span>
<li @click="menuAction('row')"><i class="el-icon-plus" style=""></i>Add Row</li> </div>
<li @click="menuAction('addContent')"><i class="el-icon-document"> </i>Batch Add content</li> </div>
<li @click="menuAction('delete')" style="color: red; margin-top: 2px; border-top: 1px solid #e5e6eb"> <div class="bar-row bottom-row">
<i class="el-icon-delete" style=""></i>Delete <div class="menu-item" @click="menuAction('up')">
</li> <i class="el-icon-top"></i><span>Move Up</span>
</ul> </div>
</div> <div class="menu-item" @click="menuAction('down')">
<i class="el-icon-bottom"></i><span>Move Down</span>
</div>
<div class="row-divider"></div>
<div class="menu-item" @click="menuAction('row')">
<i class="el-icon-plus"></i><span>Add Row</span>
</div>
<div class="menu-item danger" @click="menuAction('delete')">
<i class="el-icon-delete"></i><span>Delete</span>
</div>
</div>
</div>
<el-dialog <el-dialog
append-to-body append-to-body
destroy-on-close destroy-on-close
@@ -3954,6 +3941,8 @@ return false
margin-top: 5px; margin-top: 5px;
margin-bottom: 5px; margin-bottom: 5px;
min-height: 30px; min-height: 30px;
font-family:'Charis SIL' !important;
} }
::v-deep .tox.tox-tinymce-inline { ::v-deep .tox.tox-tinymce-inline {
z-index: 9999 !important; z-index: 9999 !important;
@@ -4188,40 +4177,84 @@ return false
font-size: 14px; font-size: 14px;
z-index: 999; z-index: 999;
} }
.context-menu { /* 容器:改为纵向 Flex让两行排开 */
position: fixed; .wps-two-layer-bar {
width: 180px; position: fixed;
background-color: #fff; display: flex;
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05); flex-direction: column; /* 纵向排列两行 */
border-radius: 4px; gap: 8px; /* 两行之间的间距 */
z-index: 1000; padding: 10px;
border: 1px solid #ddd; background: rgba(255, 255, 255, 0.98);
border-radius: 4px; border-radius: 12px;
line-height: 28px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
box-sizing: border-box; border: 1px solid #e5e6eb;
z-index: 10000;
min-width: 320px;
} }
.context-menu ul { /* 每一行的样式 */
list-style: none; .bar-row {
padding: 0; display: flex;
margin: 0; align-items: center;
gap: 4px;
} }
.context-menu li { /* 下层样式可以微调,比如颜色稍淡或缩小 */
padding: 10px; .bottom-row {
cursor: pointer; padding-top: 4px;
font-size: 14px; border-top: 1px dashed #f2f3f5; /* 增加一条虚线分割感 */
color: rgb(51, 54, 57);
border-radius: 4px;
padding: 2px 0;
}
.context-menu li i {
margin: 5px 10px 0 10px;
font-size: 18px;
} }
.context-menu li:hover { /* 通用项样式 */
background-color: #f0f0f0; .menu-item {
display: flex;
align-items: center;
padding: 0 8px;
height: 30px;
border-radius: 6px;
font-size: 13px;
color: #4e5969;
cursor: pointer;
transition: all 0.2s;
white-space: nowrap;
}
.menu-item i {
margin-right: 6px;
font-size: 14px;
}
.menu-item:hover {
background-color: #f2f3f5;
}
/* 颜色高亮 */
.primary { color: #2b81ef; font-weight: 500; }
.ai-feat { color: #6740fb; background: rgba(43, 129, 239, 0.05); }
.comment-feat { color: #f56c6c; }
.danger { color: red; }
/* H1/H2/H3 组样式 */
.h-group {
display: flex;
align-items: center;
gap: 8px;
padding: 0 4px;
}
.h-item {
font-weight: bold;
cursor: pointer;
font-size: 14px;
color: #1d2129;
}
.h-item.active { color: #2b81ef; }
/* 分隔线 */
.row-divider {
width: 1px;
height: 14px;
background-color: #e5e6eb;
margin: 0 8px;
} }
::v-deep .rightTabs .el-tabs__item { ::v-deep .rightTabs .el-tabs__item {
height: 46px !important; height: 46px !important;