tijiao
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
</div> -->
|
||||
|
||||
<common-word
|
||||
:key="new Date().getTime()"
|
||||
|
||||
v-if="htmlContent"
|
||||
ref="commonWord"
|
||||
:value="htmlContent"
|
||||
@@ -101,6 +101,7 @@
|
||||
@loaded="loadedWord"
|
||||
@onEdit="onEdit"
|
||||
@addContent="onAddContent"
|
||||
|
||||
@changeSort="changeSort"
|
||||
@onDelete="onDelete"
|
||||
@onDeletes="onDeletes"
|
||||
@@ -111,6 +112,10 @@
|
||||
@cancelSolveComment="cancelSolveComment"
|
||||
@replyComment="replyComment"
|
||||
@deleteComment="deleteComment"
|
||||
@editProofreading="editProofreading"
|
||||
@revokeProofreading="revokeProofreading"
|
||||
@executeProofreading="executeProofreading"
|
||||
@deleteProofreading="deleteProofreading"
|
||||
@onEditTitle="onEditTitle"
|
||||
@onAddRow="onAddRow"
|
||||
@changeComment="changeComment"
|
||||
@@ -269,16 +274,22 @@
|
||||
>
|
||||
<div style="display: flex; flex-wrap: wrap; gap: 10px; justify-content: start">
|
||||
<div v-for="(item, i) in uploadWordTables" class="uploadWordTableBox">
|
||||
<el-button @click="addUploadWordTable(item)" size="mini" class="insertTable"> 插入 </el-button>
|
||||
<el-button @click="addUploadWordTable(item)" size="mini" class="insertTable"> 插入 </el-button>
|
||||
<div class="thumbnailTableBox wordTableHtml table_Box pMain myeditabledivTable drop-target">
|
||||
<p style="font-size: 12px;padding: 10px;box-sizing: border-box;">Table {{ i + 1 }}</p>
|
||||
<p style="font-size: 12px; padding: 10px; box-sizing: border-box">Table {{ i + 1 }}</p>
|
||||
<table border="1" :style="`width: 800px;zoom:${zoomNum};border-collapse: collapse; text-align: center`">
|
||||
<tr
|
||||
v-for="(row, i) in item.table_data"
|
||||
:key="i"
|
||||
:class="{ 'table-header-row': isHeaderRow(i, item.table_data) }"
|
||||
>
|
||||
<td style="font-size: 20px;"v-for="(cell, i1) in row" :key="i1" :colspan="`${cell.colspan || 1}`" :rowspan="`${cell.rowspan || 1}`">
|
||||
<td
|
||||
style="font-size: 20px"
|
||||
v-for="(cell, i1) in row"
|
||||
:key="i1"
|
||||
:colspan="`${cell.colspan || 1}`"
|
||||
:rowspan="`${cell.rowspan || 1}`"
|
||||
>
|
||||
<span v-html="cell.text"></span>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -393,6 +404,7 @@
|
||||
</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<common-late-x v-if="showLateX" @close="showLateX = false" @save="saveLateX" :LateXInfo="LateXInfo"></common-late-x>
|
||||
</div>
|
||||
</template>
|
||||
@@ -407,7 +419,7 @@ import bottomTinymce from '@/components/page/components/Tinymce';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
zoomNum:(window.innerWidth * 0.38) / 850,
|
||||
zoomNum: (window.innerWidth * 0.38) / 850,
|
||||
uploadWordTables: [],
|
||||
tablesHtmlVisible: false,
|
||||
tablesHtml: '',
|
||||
@@ -425,6 +437,7 @@ export default {
|
||||
articleId: this.$route.query.id,
|
||||
isShowComment: false,
|
||||
urlList: {
|
||||
executeProofreading: 'api/Proofread/change',
|
||||
delete: 'api/Preaccept/delArticleMains',
|
||||
addRow: 'api/Preaccept/addBlankRow',
|
||||
addComment: 'api/Preaccept/createArticleMainCheckForEditor',
|
||||
@@ -508,6 +521,8 @@ export default {
|
||||
},
|
||||
txtVisible: false,
|
||||
addContentVisible: false,
|
||||
editProofreadingContentVisible: false,
|
||||
proofreadingContent: {},
|
||||
addContent: {},
|
||||
lineStyle: {},
|
||||
lineStyle1: {},
|
||||
@@ -555,7 +570,10 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
async created() {
|
||||
// await this.$api.post('api/Proofread/proofRead', {
|
||||
// article_id: this.$route.query.id
|
||||
// });
|
||||
localStorage.removeItem('scrollPosition');
|
||||
this.isShowEditComment();
|
||||
this.getDate();
|
||||
@@ -563,14 +581,16 @@ export default {
|
||||
// this.loadDictionary().catch(console.error);
|
||||
},
|
||||
mounted() {},
|
||||
activated() {
|
||||
async activated() {
|
||||
// await this.$api.post('api/Proofread/proofRead', {
|
||||
// article_id: this.$route.query.id
|
||||
// });
|
||||
this.isShowEditComment();
|
||||
this.getDate();
|
||||
this.getCommentList();
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
async copyArray(data) {
|
||||
try {
|
||||
// 将数组内容转换为字符串,使用换行符分隔
|
||||
@@ -585,7 +605,7 @@ export default {
|
||||
}
|
||||
},
|
||||
openLatexEditor(data) {
|
||||
this.showLateX = true;
|
||||
this.showLateX = true;
|
||||
this.LateXInfo = data;
|
||||
},
|
||||
isShowEditComment() {
|
||||
@@ -626,6 +646,9 @@ export default {
|
||||
handleSaveAddContent() {
|
||||
this.$refs.addContent.getTinymceContent('addcontent');
|
||||
},
|
||||
handleSaveEditProofreadingContent() {
|
||||
this.$refs.addContent.getTinymceContent('addcontent');
|
||||
},
|
||||
|
||||
async getContent(type, content) {
|
||||
if (type == 'content') {
|
||||
@@ -1136,24 +1159,22 @@ export default {
|
||||
});
|
||||
// 处理文件上传并传递回调函数
|
||||
this.$commonJS.handleFileUpload(event, function (tables) {
|
||||
console.log('tables at line 1138:', tables)
|
||||
if(tables.length == 0){
|
||||
loading.close()
|
||||
console.log('tables at line 1138:', tables);
|
||||
if (tables.length == 0) {
|
||||
loading.close();
|
||||
that.$message({
|
||||
type: 'warning',
|
||||
message: 'No table found!'
|
||||
});
|
||||
return false
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// 使用 Promise.all 等待所有表格解析完成
|
||||
Promise.all(
|
||||
tables.map((table) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
// 解析每个表格
|
||||
that.$commonJS.parseTableToArray(table, (tableList) => {
|
||||
|
||||
|
||||
resolve({ table_data: tableList, html_data: '' });
|
||||
});
|
||||
});
|
||||
@@ -1162,25 +1183,24 @@ export default {
|
||||
.then((result) => {
|
||||
// 所有表格的解析完成后,处理结果
|
||||
that.uploadWordTables = result;
|
||||
loading.close()
|
||||
loading.close();
|
||||
that.tablesHtmlVisible = true;
|
||||
})
|
||||
})
|
||||
.catch((error) => {
|
||||
loading.close()
|
||||
loading.close();
|
||||
console.error('Error processing tables:', error);
|
||||
});
|
||||
});
|
||||
const file = event.target.files[0];
|
||||
if (file) {
|
||||
// 处理文件逻辑
|
||||
}
|
||||
}
|
||||
|
||||
// 关键:重置 input 的值
|
||||
event.target.value = '';
|
||||
},
|
||||
|
||||
async onAddRow(mainId) {
|
||||
|
||||
await this.$api
|
||||
.post(this.urlList.addRow, {
|
||||
am_id: mainId,
|
||||
@@ -1211,6 +1231,59 @@ export default {
|
||||
this.$message.error(err.msg);
|
||||
});
|
||||
},
|
||||
|
||||
async executeProofreading(data) {
|
||||
console.log('data at line 1225:', data);
|
||||
|
||||
await this.$api
|
||||
.post(this.urlList.executeProofreading, {
|
||||
am_id: data.am_id,
|
||||
record_id: data.id,
|
||||
state: 1,
|
||||
article_id: this.$route.query.id
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.status == 1) {
|
||||
this.getDate();
|
||||
this.getCommentList();
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$message.error(err.msg);
|
||||
});
|
||||
},
|
||||
async revokeProofreading(data) {
|
||||
console.log('data at line 1225:', data);
|
||||
|
||||
await this.$api
|
||||
.post(this.urlList.executeProofreading, {
|
||||
am_id: data.am_id,
|
||||
record_id: data.id,
|
||||
state: 2,
|
||||
article_id: this.$route.query.id
|
||||
})
|
||||
.then(async (res) => {
|
||||
if (res.status == 1) {
|
||||
this.getDate();
|
||||
this.getCommentList();
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$message.error(err.msg);
|
||||
});
|
||||
},
|
||||
async editProofreading(data) {
|
||||
console.log('data at line 1225:', data);
|
||||
},
|
||||
deleteProofreading(data, index) {
|
||||
console.log('comment at line 480:', data);
|
||||
|
||||
},
|
||||
|
||||
async cancelSolveComment(data) {
|
||||
await this.$api
|
||||
.post(this.urlList.cancelSolveComment, {
|
||||
@@ -1330,6 +1403,7 @@ export default {
|
||||
|
||||
this.currentId = dataId;
|
||||
},
|
||||
|
||||
async onDrop(event, dataId) {
|
||||
if (event.dataTransfer.getData('image')) {
|
||||
const draggedImage = JSON.parse(event.dataTransfer.getData('image'));
|
||||
@@ -1514,11 +1588,14 @@ export default {
|
||||
},
|
||||
// 获取数据
|
||||
async getDate() {
|
||||
// await this.$api.post('api/Proofread/proofRead', {
|
||||
// article_id: this.$route.query.id
|
||||
// });
|
||||
this.imagesList = [];
|
||||
let urlLInk = '';
|
||||
let urlTask = {};
|
||||
if (this.Art_Id != undefined) {
|
||||
urlLInk = 'api/Preaccept/getArticleMains';
|
||||
urlLInk = 'api/Preaccept/getArticleMainsNew';
|
||||
urlTask.article_id = this.Art_Id;
|
||||
}
|
||||
|
||||
@@ -1737,7 +1814,7 @@ export default {
|
||||
}
|
||||
};
|
||||
var cleanedTableList = content.table ? content.table : [];
|
||||
|
||||
|
||||
cleanedTableList = cleanTableData(content.table);
|
||||
var strTitle = this.lineStyle1.title ? this.lineStyle1.title : '';
|
||||
|
||||
@@ -2204,10 +2281,10 @@ export default {
|
||||
::v-deep .wordTableHtml table span blue {
|
||||
color: rgb(0, 130, 170) !important;
|
||||
}
|
||||
::v-deep .wordTableHtml table span blue sup{
|
||||
::v-deep .wordTableHtml table span blue sup {
|
||||
color: rgb(0, 130, 170) !important;
|
||||
}
|
||||
::v-deep .wordTableHtml table span blue sub{
|
||||
::v-deep .wordTableHtml table span blue sub {
|
||||
color: rgb(0, 130, 170) !important;
|
||||
}
|
||||
.toolbar {
|
||||
@@ -2295,7 +2372,7 @@ export default {
|
||||
width: 38vw;
|
||||
position: relative;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
overflow: hidden;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 12px 0px;
|
||||
@@ -2304,13 +2381,13 @@ overflow: hidden;
|
||||
margin-bottom: 0;
|
||||
padding: 15px;
|
||||
}
|
||||
.uploadWordTableBox .insertTable{
|
||||
/* display: none; */
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
.uploadWordTableBox .insertTable {
|
||||
/* display: none; */
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
}
|
||||
.uploadWordTableBox:hover {
|
||||
background-color: #0066990d;
|
||||
/* display: block !important; */
|
||||
/* display: block !important; */
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
<el-dropdown-item divided
|
||||
><p @click="EditDetail(data)"><i class="el-icon-edit"></i>Topics</p>
|
||||
</el-dropdown-item>
|
||||
<!-- <el-dropdown-item divided
|
||||
><p @click="handleClickAb(data)"><i class="el-icon-edit"></i>Abstract</p>
|
||||
</el-dropdown-item> -->
|
||||
|
||||
<el-dropdown-item divided>
|
||||
<p @click="ChoseRelated(data)"><i class="el-icon-tickets"></i>Relevant</p>
|
||||
@@ -26,7 +29,12 @@
|
||||
<slot></slot>
|
||||
<span @click="EditDetail(data)" class="onlineOperationsButton"><i class="el-icon-edit"></i>Topics</span>
|
||||
<span @click="ChoseRelated(data)" class="onlineOperationsButton"><i class="el-icon-tickets"></i>Relevant</span>
|
||||
<span @click="htmlWeChatPreview(data)" class="onlineOperationsButton" v-if="['Article', 'Review', 'Mini Review'].includes(data.type)"><i class="el-icon-tickets"></i>Public Micro</span>
|
||||
<span
|
||||
@click="htmlWeChatPreview(data)"
|
||||
class="onlineOperationsButton"
|
||||
v-if="['Article', 'Review', 'Mini Review'].includes(data.type)"
|
||||
><i class="el-icon-tickets"></i>Public Micro</span
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- 修改信息 -->
|
||||
@@ -46,6 +54,29 @@
|
||||
<!-- <el-button type="primary" @click="saveEdit">OK</el-button> -->
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!-- 修改信息 -->
|
||||
<el-dialog title="" :visible.sync="EditAbVisible" width="1200px" :close-on-click-modal="false">
|
||||
<el-form ref="editMes" :model="detailMes" label-width="120px">
|
||||
<el-form-item label="Title :">
|
||||
<p v-html="detailMes.title"></p>
|
||||
</el-form-item>
|
||||
|
||||
<div style="margin: 30px 0px 0 0">
|
||||
<el-form ref="Abs_Form" :model="detailMes" label-width="150px" style="margin-top: 30px">
|
||||
<el-form-item label="Abstract :" prop="abstract">
|
||||
<quill-editor ref="myTextEditor" v-model="detailMes.abstract" :options="editorOption"> </quill-editor>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: center; margin: 25px 0 0 0">
|
||||
<el-button type="primary" @click="ZsSaveAbs" style="width: 300px; margin-right: 20px"> Save Abstract </el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="EditAbVisible = false" plain>Cancel</el-button>
|
||||
<!-- <el-button type="primary" @click="saveEdit">OK</el-button> -->
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 话题信息 -->
|
||||
<el-dialog title="" :visible.sync="topicVisible" width="550px">
|
||||
@@ -140,6 +171,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import 'quill/dist/quill.core.css';
|
||||
import 'quill/dist/quill.snow.css';
|
||||
import 'quill/dist/quill.bubble.css';
|
||||
|
||||
import { quillEditor } from 'vue-quill-editor';
|
||||
|
||||
import commonHtmlWeChatPreview from '@/components/page/components/htmlWeChatPreview/index.vue';
|
||||
import { Loading } from 'element-ui';
|
||||
import { watch } from 'vue';
|
||||
@@ -147,10 +184,15 @@ import { watch } from 'vue';
|
||||
export default {
|
||||
props: ['data', 'type'],
|
||||
components: {
|
||||
commonHtmlWeChatPreview
|
||||
commonHtmlWeChatPreview,
|
||||
quillEditor
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
editorOption: {
|
||||
placeholder: 'Please enter...'
|
||||
},
|
||||
detailMes: {},
|
||||
tg_article_id: 0,
|
||||
html_type: null,
|
||||
htmlContent: '',
|
||||
@@ -242,6 +284,7 @@ export default {
|
||||
},
|
||||
HtmlMes: {},
|
||||
EditVisible: false,
|
||||
EditAbVisible: false,
|
||||
RelatVisible: false,
|
||||
topicVisible: false,
|
||||
HtmlVisible: false,
|
||||
@@ -271,9 +314,13 @@ export default {
|
||||
return this.baseUrl + 'api/Production/up_last_artFile';
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
fresh(){
|
||||
this.$emit('fresh')
|
||||
ZsSaveAbs() {
|
||||
this.EditAbVisible = false;
|
||||
},
|
||||
fresh() {
|
||||
this.$emit('fresh');
|
||||
},
|
||||
htmlWeChatPreview(data) {
|
||||
console.log('data at line 189:', data);
|
||||
@@ -441,6 +488,21 @@ this.$emit('fresh')
|
||||
this.EditVisible = true;
|
||||
}, 500);
|
||||
},
|
||||
// 稿件信息完善编辑
|
||||
handleClickAb(row) {
|
||||
this.detailMes.article_id = row.article_id;
|
||||
this.detailMes.title = row.title;
|
||||
this.detailMes.sort = row.sort;
|
||||
this.detailMes.abstract = '';
|
||||
this.detailMes.journal_special_id = row.journal_special_id;
|
||||
|
||||
// this.topListData(row.article_id);
|
||||
|
||||
setTimeout(() => {
|
||||
this.EditAbVisible = true;
|
||||
|
||||
}, 500);
|
||||
},
|
||||
|
||||
// 话题列表
|
||||
topListData(e) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user