Merge branch 'master' of https://gitee.com/wjl2008_admin/tougao_web into zy-email

This commit is contained in:
2025-01-18 13:38:23 +08:00
8 changed files with 181 additions and 47 deletions

View File

@@ -19,8 +19,8 @@ const service = axios.create({
// baseURL: 'https://submission.tmrjournals.com/', //正式 记得切换 // baseURL: 'https://submission.tmrjournals.com/', //正式 记得切换
// baseURL: 'http://www.tougao.com/', //测试本地 记得切换 // baseURL: 'http://www.tougao.com/', //测试本地 记得切换
// baseURL: 'http://192.168.110.110/tougao/public/index.php/', // baseURL: 'http://192.168.110.110/tougao/public/index.php/',
// baseURL: '/api', //本地 baseURL: '/api', //本地
baseURL: '/', //正式 // baseURL: '/', //正式
}); });

View File

@@ -123,10 +123,12 @@
}; };
}, },
created() { created() {
if(this.$route.meta.hideSidebar){ if(!this.$route.meta.hideSidebar){
this.collapse=false this.collapse=true
} }else{
this.collapse=false
}
this.initORCID(); this.initORCID();
if (this.user_id == 24) { if (this.user_id == 24) {
this.daojishi = '2021.9.3 - 2021.9.30' this.daojishi = '2021.9.3 - 2021.9.30'

View File

@@ -1,7 +1,8 @@
<template> <template>
<div class="wrapper"> <div class="wrapper">
<v-head></v-head> <v-head></v-head>
<v-sidebar></v-sidebar>
<v-sidebar ></v-sidebar>
<div class="content-box" :class="{ 'content-collapse': collapse }"> <div class="content-box" :class="{ 'content-collapse': collapse }">
<v-tags></v-tags> <v-tags></v-tags>
<div class="content"> <div class="content">
@@ -34,10 +35,12 @@ export default {
vTags vTags
}, },
created() { created() {
if(this.$route.meta.hideSidebar){ if(!this.$route.meta.hideSidebar){
this.collapse=false this.collapse=true
} }else{
this.collapse=false
}
bus.$on('collapse-content', (msg) => { bus.$on('collapse-content', (msg) => {
this.collapse = msg; this.collapse = msg;
localStorage.setItem('collapse', this.collapse); localStorage.setItem('collapse', this.collapse);

View File

@@ -636,10 +636,12 @@ export default {
} }
}, },
created() { created() {
if(this.$route.meta.hideSidebar){ if(!this.$route.meta.hideSidebar){
this.collapse=false this.collapse=true
} }else{
this.collapse=false
}
localStorage.setItem('collapse', this.collapse); localStorage.setItem('collapse', this.collapse);
if (this.userrole == 2) { if (this.userrole == 2) {
//其余的身份(显示作者) //其余的身份(显示作者)

View File

@@ -1,15 +1,15 @@
<template> <template>
<div style="height: 98%"> <div style="height:100%">
<!-- <div class="crumbs"> <!-- <div class="crumbs">
<el-breadcrumb separator="/"> <el-breadcrumb separator="/">
<el-breadcrumb-item> <i class="el-icon-document-copy"></i> HTML Proofread </el-breadcrumb-item> <el-breadcrumb-item> <i class="el-icon-document-copy"></i> Text Proofread </el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> --> </div> -->
<div <div
class="container" class="container"
style=" style="
height: 98%; height: 100%;
min-width: calc(1000px); min-width: calc(1000px);
width: calc(100%); width: calc(100%);
background-color: #fafafa; background-color: #fafafa;
@@ -107,6 +107,7 @@
@onDelete="onDelete" @onDelete="onDelete"
@onComment="onComment" @onComment="onComment"
@onAddComment="onAddComment" @onAddComment="onAddComment"
@onEditTitle="onEditTitle"
@changeComment="changeComment" @changeComment="changeComment"
style="width: calc(100%); height: calc(100% - 50px); margin-top: -1px" style="width: calc(100%); height: calc(100% - 50px); margin-top: -1px"
:style="`100%`" :style="`100%`"
@@ -217,10 +218,15 @@
v-if="commentVisible" v-if="commentVisible"
title="Comment" title="Comment"
:visible.sync="commentVisible" :visible.sync="commentVisible"
width="1200px" width="600px"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-form ref="editMes" :model="commentForm" label-width="115px"> <el-form ref="editMes" :model="commentForm" label-width="115px">
<el-form-item label="Select Content:" v-if="commentForm.commentLabel">
<p style="background: #eef0f4;line-height: 20px;padding: 10px;box-sizing: border-box;">{{ commentForm.commentLabel }}</p>
</el-form-item>
<el-form-item label="Word"> <el-form-item label="Word">
<span slot="label"> <span slot="label">
<font style="color: #f56c6c; margin-right: 5px">*</font> <font style="color: #f56c6c; margin-right: 5px">*</font>
@@ -720,14 +726,49 @@ export default {
} }
console.log('data at line 575:', data); console.log('data at line 575:', data);
}, },
async onAddComment(dataId) { async onAddComment(data) {
console.log('dataId at line 721:', dataId);
var data = this.Main_List.find((item) => item.am_id == dataId); var form = this.Main_List.find((item) => item.am_id == data.mainId);
this.commentForm = { this.commentForm = {
...data commentLabel:data.label,
...form
}; };
this.commentVisible = true; this.commentVisible = true;
console.log('data at line 575:', data);
},
async onEditTitle(data) {
var url;
switch (data.value){
case 1:
url = 'api/Preaccept/changeH1';
break;
case 2:
url = 'api/Preaccept/changeH2';
break;
case 3:
url = 'api/Preaccept/changeH3';
break;
}
console.log('data at line 739:', data)
await this.$api
.post(url, {
am_id: data.mainId,
})
.then(async (res) => {
this.getDate();
})
.catch((err) => {
this.$message.error(err.msg);
});
// var form = this.Main_List.find((item) => item.am_id == data.mainId);
// this.commentForm = {
// commentLabel:data.label,
// ...form
// };
// this.commentVisible = true;
}, },
clearButton() { clearButton() {
var deleteButtons = document.querySelectorAll('.wordButtonContainer'); var deleteButtons = document.querySelectorAll('.wordButtonContainer');

View File

@@ -1,6 +1,9 @@
<template> <template>
<div> <div>
<div class="tab_post"> <div class="tab_post">
<div style="margin-bottom: 10px"> <div style="margin-bottom: 10px">
<p <p
v-if="feeStatus == 0" v-if="feeStatus == 0"
@@ -50,7 +53,7 @@
<p v-else> <p v-else>
<el-button type="primary" plain @click="htmlContet()" style="width: auto; font-weight: bold; margin-top: 10px"> <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> <i class="el-icon-document-copy" style="font-weight: bold; font-size: 14px"></i>
HTML Proofread Text Proofread
</el-button> </el-button>
</p> </p>
@@ -452,7 +455,7 @@ export default {
// rongCont: 'Modify the article body.' // rongCont: 'Modify the article body.'
// }, // },
{ {
name: 'Html', name: 'Text Proofread',
refName: 'setTwoRef', refName: 'setTwoRef',
rongCont: 'HTML layout.' rongCont: 'HTML layout.'
} }

View File

@@ -1,11 +1,11 @@
<template> <template>
<div <div
class="tinymce-container editor-container word-container" class="tinymce-container editor-container word-container"
style="width: 100%; height: 100%;padding: 20px;box-sizing: border-box; position: relative; overflow: auto" style="width: 100%; height: 100%; padding: 20px; box-sizing: border-box; position: relative; overflow: auto"
@scroll="divOnScroll" ref="scrollDiv"
> >
<!-- <form method="post"> --> <!-- <form method="post"> -->
<template class="" v-for="(item, index) in contentList" > <template class="" v-for="(item, index) in contentList">
<div <div
class="MaxPicture pMain myeditabledivImage" class="MaxPicture pMain myeditabledivImage"
v-if="item.type == 1" v-if="item.type == 1"
@@ -340,6 +340,8 @@ export default {
} }
}, },
mounted() { mounted() {
// this.$refs.scrollDiv.addEventListener('scroll', this.divOnScroll, { passive: true });
this.isShowEditComment(); this.isShowEditComment();
this.typesettingType = 1; this.typesettingType = 1;
this.initTinymce(); this.initTinymce();
@@ -422,31 +424,36 @@ export default {
} }
}, },
initTinymce() { initTinymce() {
var _this = this;
// non-breaking // non-breaking
window.tinymce.init({ window.tinymce.init({
selector: '.myeditablediv', selector: '.myeditablediv',
inline: true, inline: true,
license_key: 'gpl', // 使用开源 GPL 许可证
content_css: false, content_css: false,
table_resize_bars: true, table_resize_bars: true,
valid_elements: '*[*]', valid_elements: '*[*]',
plugins: 'forecolor code paste table image resize searchreplace',
content_style: `${tableStyle + this.wordStyle} content_style: `${tableStyle + this.wordStyle}
/* 添加批注 */
.tox-toolbar-overlord .tox-toolbar:nth-child(1) .tox-toolbar__group:nth-child(1) button.tox-tbtn:nth-child(1){ .tox-toolbar-overlord .tox-toolbar:nth-child(1) .tox-toolbar__group:nth-child(1) button.tox-tbtn:nth-child(1){
font-weight:bold !important; font-weight:bold !important;
background-color:#fef0f0; background-color:#fef0f0;
color: #f56c6c; /* 设置字体颜色 */ color: #f56c6c;
fill:rgb(19, 188, 32); fill:rgb(19, 188, 32);
} }
/* 成功 */
.tox-toolbar-overlord .tox-toolbar:nth-child(1) .tox-toolbar__group:nth-child(3) button.tox-tbtn:nth-child(1){ .tox-toolbar-overlord .tox-toolbar:nth-child(1) .tox-toolbar__group:nth-child(3) button.tox-tbtn:nth-child(1){
font-weight:bold !important; font-weight:bold !important;
background-color: rgb(19, 188, 32); background-color: rgb(19, 188, 32);
color: #fff; /* 设置字体颜色 */ color: #fff;
fill:rgb(19, 188, 32); fill:rgb(19, 188, 32);
} }
/* 删除 */
.tox-toolbar-overlord .tox-toolbar:nth-child(1) .tox-toolbar__group:nth-child(2) button.tox-tbtn:nth-child(1){ .tox-toolbar-overlord .tox-toolbar:nth-child(1) .tox-toolbar__group:nth-child(2) button.tox-tbtn:nth-child(1){
font-weight:bold !important; font-weight:bold !important;
background-color: #f0f0f0; background-color: red;
color: #333; /* 设置字体颜色 */ color: #fff;
} }
.tox-toolbar-overlord .tox-toolbar:nth-child(1) .tox-toolbar__group:nth-child(1) button.tox-tbtn:nth-child(1) svg{ .tox-toolbar-overlord .tox-toolbar:nth-child(1) .tox-toolbar__group:nth-child(1) button.tox-tbtn:nth-child(1) svg{
@@ -466,44 +473,117 @@ export default {
} }
.tox-toolbar-overlord .tox-toolbar:nth-child(1) .tox-toolbar__group:nth-child(2) button.tox-tbtn:nth-child(1) svg{ .tox-toolbar-overlord .tox-toolbar:nth-child(1) .tox-toolbar__group:nth-child(2) button.tox-tbtn:nth-child(1) svg{
font-weight:bold !important; font-weight:bold !important;
background-color: #f0f0f0; background-color: red;
color: #333; /* 设置字体颜色 */ color: #fff; /* 设置字体颜色 */
fill:#333 !important; fill:#fff !important;
font-size:16px!important; font-size:16px!important;
} }
.tox-toolbar-overlord .tox-toolbar:nth-child(2) .tox-toolbar__group:nth-child(3) button.tox-tbtn:nth-child(1){ .tox-toolbar-overlord .tox-toolbar:nth-child(2) .tox-toolbar__group:nth-child(4) button.tox-tbtn:nth-child(1){
font-weight:bold !important; font-weight:bold !important;
color: #007bff; /* 设置字体颜色 */ color: #007bff; /* 设置字体颜色 */
} }
.tox-toolbar-overlord .tox-toolbar:nth-child(2) .tox-toolbar__group:nth-child(3) button.tox-tbtn:nth-child(2){ .tox-toolbar-overlord .tox-toolbar:nth-child(2) .tox-toolbar__group:nth-child(4) button.tox-tbtn:nth-child(2){
font-weight:bold !important; font-weight:bold !important;
color: #007bff; /* 设置字体颜色 */ color: #007bff; /* 设置字体颜色 */
text-decoration: line-through; text-decoration: line-through;
} }
`, `,
menubar: false, menubar: false,
toolbar: ['commentAdd |Cancel| Save', 'bold italic | subscript superscript | customBlue removeBlue | clearButton '], toolbar: [
'commentAdd |delete| Save',
'customDropdown |bold italic | subscript superscript | customBlue removeBlue | searchreplace '
],
end_container_on_empty_block: true, end_container_on_empty_block: true,
content_css: 'default ', content_css: 'default ',
setup(ed) { setup(ed) {
ed.ui.registry.addMenuButton('customDropdown', {
text: 'Set Title', // 下拉框标题
fetch: function (callback) {
// 定义下拉框的内容
const items = [
{
label: 'First level title',
value: 1
},
// 1 cm = 144 Twip 上边距2.54 cm = 2.54 × 144 = 365.76 Twip
{
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');
_this.$emit('onEditTitle', {
mainId: dataId,
value: item.value
});
}
}
}
}));
callback(menuItems);
}
});
// 添加自定义菜单项 // 添加自定义菜单项
ed.ui.registry.addButton('Save', { ed.ui.registry.addButton('Save', {
icon: 'checkmark', icon: 'checkmark',
text: 'Save', text: 'Save',
onAction: function () {} onAction: function () {
_this.getContent('content');
}
}); });
ed.ui.registry.addButton('commentAdd', { ed.ui.registry.addButton('commentAdd', {
icon: 'comment-add', icon: 'comment-add',
text: 'Comment Add', text: 'Comment Add',
onAction: function () {} 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');
let selectedText = edSelection.getContent({ format: 'text' });
_this.$emit('onAddComment', {
mainId: dataId,
label: selectedText ? selectedText : ''
});
}
}
}
}); });
ed.ui.registry.addButton('Cancel', { ed.ui.registry.addButton('delete', {
icon: 'close', icon: 'remove',
text: 'Cancel', text: 'Delete',
onAction: function () {} onAction: function () {
_this.$emit('delete');
}
}); });
// 定义自定义按钮 // 定义自定义按钮
@@ -876,6 +956,7 @@ export default {
// deleteButton.addEventListener('mousedown', function (e) { // deleteButton.addEventListener('mousedown', function (e) {
// e.stopImmediatePropagation(); // e.stopImmediatePropagation();
// e.preventDefault(); // e.preventDefault();
// _this.$emit('onDelete', paragraph.getAttribute('main-id')); // _this.$emit('onDelete', paragraph.getAttribute('main-id'));
// }); // });
@@ -1303,8 +1384,11 @@ export default {
.word-container table span blue { .word-container table span blue {
color: rgb(0, 130, 170) !important; color: rgb(0, 130, 170) !important;
} }
.pMain{ .pMain {
margin-top: 20px; margin-top: 20px;
margin-bottom: 20px; margin-bottom: 20px;
} }
::v-deep .tox.tox-tinymce-inline{
z-index: 9999 !important;
}
</style> </style>

View File

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