Merge branch 'master' of https://gitee.com/wjl2008_admin/tougao_web into zy-email
This commit is contained in:
@@ -19,8 +19,8 @@ const service = axios.create({
|
||||
// baseURL: 'https://submission.tmrjournals.com/', //正式 记得切换
|
||||
// baseURL: 'http://www.tougao.com/', //测试本地 记得切换
|
||||
// baseURL: 'http://192.168.110.110/tougao/public/index.php/',
|
||||
// baseURL: '/api', //本地
|
||||
baseURL: '/', //正式
|
||||
baseURL: '/api', //本地
|
||||
// baseURL: '/', //正式
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -123,10 +123,12 @@
|
||||
};
|
||||
},
|
||||
created() {
|
||||
if(this.$route.meta.hideSidebar){
|
||||
this.collapse=false
|
||||
if(!this.$route.meta.hideSidebar){
|
||||
this.collapse=true
|
||||
|
||||
}
|
||||
}else{
|
||||
this.collapse=false
|
||||
}
|
||||
this.initORCID();
|
||||
if (this.user_id == 24) {
|
||||
this.daojishi = '2021.9.3 - 2021.9.30'
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<v-head></v-head>
|
||||
<v-sidebar></v-sidebar>
|
||||
|
||||
<v-sidebar ></v-sidebar>
|
||||
<div class="content-box" :class="{ 'content-collapse': collapse }">
|
||||
<v-tags></v-tags>
|
||||
<div class="content">
|
||||
@@ -34,10 +35,12 @@ export default {
|
||||
vTags
|
||||
},
|
||||
created() {
|
||||
if(this.$route.meta.hideSidebar){
|
||||
this.collapse=false
|
||||
if(!this.$route.meta.hideSidebar){
|
||||
this.collapse=true
|
||||
|
||||
}
|
||||
}else{
|
||||
this.collapse=false
|
||||
}
|
||||
bus.$on('collapse-content', (msg) => {
|
||||
this.collapse = msg;
|
||||
localStorage.setItem('collapse', this.collapse);
|
||||
|
||||
@@ -636,10 +636,12 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if(this.$route.meta.hideSidebar){
|
||||
this.collapse=false
|
||||
if(!this.$route.meta.hideSidebar){
|
||||
this.collapse=true
|
||||
|
||||
}
|
||||
}else{
|
||||
this.collapse=false
|
||||
}
|
||||
localStorage.setItem('collapse', this.collapse);
|
||||
if (this.userrole == 2) {
|
||||
//其余的身份(显示作者)
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<div style="height: 98%">
|
||||
<div style="height:100%">
|
||||
<!-- <div class="crumbs">
|
||||
<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>
|
||||
</div> -->
|
||||
|
||||
<div
|
||||
class="container"
|
||||
style="
|
||||
height: 98%;
|
||||
height: 100%;
|
||||
min-width: calc(1000px);
|
||||
width: calc(100%);
|
||||
background-color: #fafafa;
|
||||
@@ -107,6 +107,7 @@
|
||||
@onDelete="onDelete"
|
||||
@onComment="onComment"
|
||||
@onAddComment="onAddComment"
|
||||
@onEditTitle="onEditTitle"
|
||||
@changeComment="changeComment"
|
||||
style="width: calc(100%); height: calc(100% - 50px); margin-top: -1px"
|
||||
:style="`100%`"
|
||||
@@ -217,10 +218,15 @@
|
||||
v-if="commentVisible"
|
||||
title="Comment"
|
||||
:visible.sync="commentVisible"
|
||||
width="1200px"
|
||||
width="600px"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<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">
|
||||
<span slot="label">
|
||||
<font style="color: #f56c6c; margin-right: 5px">*</font>
|
||||
@@ -720,14 +726,49 @@ export default {
|
||||
}
|
||||
console.log('data at line 575:', data);
|
||||
},
|
||||
async onAddComment(dataId) {
|
||||
console.log('dataId at line 721:', dataId);
|
||||
var data = this.Main_List.find((item) => item.am_id == dataId);
|
||||
async onAddComment(data) {
|
||||
|
||||
var form = this.Main_List.find((item) => item.am_id == data.mainId);
|
||||
this.commentForm = {
|
||||
...data
|
||||
commentLabel:data.label,
|
||||
...form
|
||||
};
|
||||
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() {
|
||||
var deleteButtons = document.querySelectorAll('.wordButtonContainer');
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<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>
|
||||
|
||||
@@ -452,7 +455,7 @@ export default {
|
||||
// rongCont: 'Modify the article body.'
|
||||
// },
|
||||
{
|
||||
name: 'Html',
|
||||
name: 'Text Proofread',
|
||||
refName: 'setTwoRef',
|
||||
rongCont: 'HTML layout.'
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div
|
||||
class="tinymce-container editor-container word-container"
|
||||
style="width: 100%; height: 100%;padding: 20px;box-sizing: border-box; position: relative; overflow: auto"
|
||||
@scroll="divOnScroll"
|
||||
style="width: 100%; height: 100%; padding: 20px; box-sizing: border-box; position: relative; overflow: auto"
|
||||
ref="scrollDiv"
|
||||
>
|
||||
<!-- <form method="post"> -->
|
||||
<template class="" v-for="(item, index) in contentList" >
|
||||
<template class="" v-for="(item, index) in contentList">
|
||||
<div
|
||||
class="MaxPicture pMain myeditabledivImage"
|
||||
v-if="item.type == 1"
|
||||
@@ -340,6 +340,8 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.$refs.scrollDiv.addEventListener('scroll', this.divOnScroll, { passive: true });
|
||||
|
||||
this.isShowEditComment();
|
||||
this.typesettingType = 1;
|
||||
this.initTinymce();
|
||||
@@ -422,31 +424,36 @@ export default {
|
||||
}
|
||||
},
|
||||
initTinymce() {
|
||||
var _this = this;
|
||||
// non-breaking
|
||||
window.tinymce.init({
|
||||
selector: '.myeditablediv',
|
||||
inline: true,
|
||||
|
||||
license_key: 'gpl', // 使用开源 GPL 许可证
|
||||
content_css: false,
|
||||
table_resize_bars: true,
|
||||
valid_elements: '*[*]',
|
||||
plugins: 'forecolor code paste table image resize searchreplace',
|
||||
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){
|
||||
font-weight:bold !important;
|
||||
background-color:#fef0f0;
|
||||
color: #f56c6c; /* 设置字体颜色 */
|
||||
color: #f56c6c;
|
||||
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){
|
||||
font-weight:bold !important;
|
||||
background-color: rgb(19, 188, 32);
|
||||
color: #fff; /* 设置字体颜色 */
|
||||
color: #fff;
|
||||
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){
|
||||
font-weight:bold !important;
|
||||
background-color: #f0f0f0;
|
||||
color: #333; /* 设置字体颜色 */
|
||||
background-color: red;
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
.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{
|
||||
font-weight:bold !important;
|
||||
background-color: #f0f0f0;
|
||||
color: #333; /* 设置字体颜色 */
|
||||
fill:#333 !important;
|
||||
background-color: red;
|
||||
color: #fff; /* 设置字体颜色 */
|
||||
fill:#fff !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;
|
||||
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;
|
||||
color: #007bff; /* 设置字体颜色 */
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
`,
|
||||
|
||||
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,
|
||||
content_css: 'default ',
|
||||
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', {
|
||||
icon: 'checkmark',
|
||||
text: 'Save',
|
||||
onAction: function () {}
|
||||
onAction: function () {
|
||||
_this.getContent('content');
|
||||
}
|
||||
});
|
||||
ed.ui.registry.addButton('commentAdd', {
|
||||
icon: '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', {
|
||||
icon: 'close',
|
||||
text: 'Cancel',
|
||||
onAction: function () {}
|
||||
ed.ui.registry.addButton('delete', {
|
||||
icon: 'remove',
|
||||
text: 'Delete',
|
||||
onAction: function () {
|
||||
_this.$emit('delete');
|
||||
}
|
||||
});
|
||||
|
||||
// 定义自定义按钮
|
||||
@@ -876,6 +956,7 @@ export default {
|
||||
// deleteButton.addEventListener('mousedown', function (e) {
|
||||
// e.stopImmediatePropagation();
|
||||
// e.preventDefault();
|
||||
|
||||
// _this.$emit('onDelete', paragraph.getAttribute('main-id'));
|
||||
// });
|
||||
|
||||
@@ -1303,8 +1384,11 @@ export default {
|
||||
.word-container table span blue {
|
||||
color: rgb(0, 130, 170) !important;
|
||||
}
|
||||
.pMain{
|
||||
.pMain {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
::v-deep .tox.tox-tinymce-inline{
|
||||
z-index: 9999 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -988,8 +988,7 @@ export default new Router({
|
||||
path: '/GenerateCharts', //用户端预收录-引用编辑
|
||||
component: () => import('../components/page/GenerateCharts'),
|
||||
meta: {
|
||||
title: 'HTML Proofread',
|
||||
hideSidebar: true
|
||||
title: 'Text Proofread'
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user