提交
This commit is contained in:
@@ -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,7 @@
|
||||
<template slot="comment">
|
||||
<div style="" class="commentList annotations"></div>
|
||||
</template>
|
||||
</common-word> -->
|
||||
</common-word>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -157,7 +214,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 +244,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 +414,22 @@
|
||||
</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';
|
||||
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' },
|
||||
],
|
||||
zoomNum: (window.innerWidth * 0.38) / 850,
|
||||
uploadWordTables: [],
|
||||
tablesHtmlVisible: false,
|
||||
@@ -507,12 +553,12 @@ export default {
|
||||
components: {
|
||||
Tinymce,
|
||||
bottomTinymce,
|
||||
commonCatalogue,
|
||||
commonReference
|
||||
catalogue
|
||||
},
|
||||
computed: {
|
||||
combinedValue() {
|
||||
|
||||
// 将两个值组合成一个新的值,可以是字符串、数组、对象等
|
||||
// return `${this.isFirstComponentLoaded}-${this.isWordComponentLoaded}`;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -537,45 +583,32 @@ export default {
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
|
||||
// await this.$api.post('api/Proofread/proofRead', {
|
||||
// article_id: this.$route.query.id
|
||||
// });
|
||||
localStorage.removeItem('scrollPosition');
|
||||
this.isShowEditComment();
|
||||
this.getDate();
|
||||
this.getRefData();
|
||||
this.getCommentList();
|
||||
// this.loadDictionary().catch(console.error);
|
||||
},
|
||||
mounted() {},
|
||||
async activated() {
|
||||
|
||||
// await this.$api.post('api/Proofread/proofRead', {
|
||||
// article_id: this.$route.query.id
|
||||
// });
|
||||
this.isShowEditComment();
|
||||
this.getDate();
|
||||
this.getRefData();
|
||||
this.getCommentList();
|
||||
},
|
||||
|
||||
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) {
|
||||
try {
|
||||
|
||||
// 将数组内容转换为字符串,使用换行符分隔
|
||||
const textToCopy = JSON.stringify(data);
|
||||
|
||||
|
||||
// 使用 Clipboard API 复制文本
|
||||
await navigator.clipboard.writeText(textToCopy);
|
||||
alert('数组内容已复制到剪贴板!');
|
||||
} catch (err) {
|
||||
@@ -676,7 +709,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 +847,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 +1207,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 +1294,7 @@ export default {
|
||||
},
|
||||
deleteProofreading(data, index) {
|
||||
console.log('comment at line 480:', data);
|
||||
|
||||
},
|
||||
|
||||
async cancelSolveComment(data) {
|
||||
@@ -1372,7 +1416,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 +1490,13 @@ export default {
|
||||
});
|
||||
},
|
||||
getWord() {
|
||||
|
||||
this.htmlContent = 'true';
|
||||
|
||||
},
|
||||
// 获取数据
|
||||
async getDate() {
|
||||
|
||||
this.imagesList = [];
|
||||
let urlLInk = '';
|
||||
let urlTask = {};
|
||||
@@ -1469,7 +1516,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;
|
||||
});
|
||||
@@ -1483,7 +1530,8 @@ export default {
|
||||
// setTimeout(async () => {
|
||||
this.$nextTick(async () => {
|
||||
await this.getWord();
|
||||
|
||||
|
||||
|
||||
loading.close();
|
||||
});
|
||||
// }, 1000);
|
||||
@@ -1842,11 +1890,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 +1920,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;
|
||||
|
||||
Reference in New Issue
Block a user