1、审稿人14天超时 重新审稿邀请
2、nbsp 转换 3、H3标记为myh3 4、文章详情审稿和编委邮箱机构显示 5、稿号开头为Draft 状态为Reject->Awaiting Submission 6、作者端稿件重复(标题) 7、produce 增加 通讯作者详细地址 8、produce 增加 是否显示图文摘要1
This commit is contained in:
@@ -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: '/', //正式
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -13,9 +13,7 @@ const baseUrl = '/';
|
|||||||
|
|
||||||
//测试环境
|
//测试环境
|
||||||
|
|
||||||
// const mediaUrl = 'http://tougaotest.tmrjournals.com/public/';
|
|
||||||
// // const mediaUrl = 'http://zmzm.tougao.dev.com/public/';
|
|
||||||
// const baseUrl = '/api';
|
|
||||||
|
|
||||||
////新正式环境
|
////新正式环境
|
||||||
// const mediaUrl = 'http://mytest.tmrjournals.com/public/';
|
// const mediaUrl = 'http://mytest.tmrjournals.com/public/';
|
||||||
|
|||||||
@@ -290,12 +290,13 @@ const en = {
|
|||||||
state1: 'With editor',
|
state1: 'With editor',
|
||||||
state2: 'Under review',
|
state2: 'Under review',
|
||||||
state3: 'Reject',
|
state3: 'Reject',
|
||||||
|
stateDraft: 'Awaiting Submission',
|
||||||
state4: 'Revision',
|
state4: 'Revision',
|
||||||
state5: 'Accept',
|
state5: 'Accept',
|
||||||
state6: 'Pre-accept',
|
state6: 'Pre-accept',
|
||||||
state8: 'Final Decision',
|
state8: 'Final Decision',
|
||||||
act1: 'Dealing',
|
act1: 'Dealing',
|
||||||
act2: 'Finished'
|
act2: 'Finished',
|
||||||
},
|
},
|
||||||
evaluationsis: {
|
evaluationsis: {
|
||||||
EmploymentRate: 'Employment Rate',
|
EmploymentRate: 'Employment Rate',
|
||||||
|
|||||||
@@ -276,6 +276,7 @@ const zh = {
|
|||||||
state1: '已受理',
|
state1: '已受理',
|
||||||
state2: '送审中',
|
state2: '送审中',
|
||||||
state3: '拒稿',
|
state3: '拒稿',
|
||||||
|
stateDraft: '待提交',
|
||||||
state4: '退修',
|
state4: '退修',
|
||||||
state5: '接收',
|
state5: '接收',
|
||||||
state6: '预接收',
|
state6: '预接收',
|
||||||
|
|||||||
@@ -780,9 +780,8 @@ export default {
|
|||||||
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();
|
||||||
|
|
||||||
if (str.replace(/<br\s*\/?>/gi, '').trim() === '') {
|
str = str.replace(/<br\s*\/?>/gi, '');
|
||||||
str = '';
|
|
||||||
}
|
|
||||||
str = await that.$commonJS.decodeHtml(str);
|
str = await that.$commonJS.decodeHtml(str);
|
||||||
|
|
||||||
await that.$api
|
await that.$api
|
||||||
@@ -1162,7 +1161,9 @@ export default {
|
|||||||
},
|
},
|
||||||
async addComment(content) {
|
async addComment(content) {
|
||||||
|
|
||||||
var str = content.replace(/^<p>(.*?)<\/p>$/, '$1') ? content.replace(/^<p>(.*?)<\/p>$/, '$1') : '';
|
var str= this.$commonJS.transformHtmlString(content)
|
||||||
|
str=str.replace(/<br\s*\/?>/gi, '');
|
||||||
|
console.log("🚀 ~ addComment ~ content:", str);
|
||||||
if (str == '') {
|
if (str == '') {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
@@ -1884,6 +1885,9 @@ export default {
|
|||||||
// 确定保存图片
|
// 确定保存图片
|
||||||
async savePic() {
|
async savePic() {
|
||||||
var str = this.picStyle1.note ? await this.$commonJS.decodeHtml(this.picStyle1.note) : '';
|
var str = this.picStyle1.note ? await this.$commonJS.decodeHtml(this.picStyle1.note) : '';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var titleStr = this.picStyle1.title ? await this.$commonJS.decodeHtml(this.picStyle1.title) : '';
|
var titleStr = this.picStyle1.title ? await this.$commonJS.decodeHtml(this.picStyle1.title) : '';
|
||||||
|
|
||||||
if (!this.picStyle.picUrl) {
|
if (!this.picStyle.picUrl) {
|
||||||
@@ -1894,6 +1898,8 @@ export default {
|
|||||||
this.$message.error('Please enter a title');
|
this.$message.error('Please enter a title');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
str = str.replace(/<br\s*\/?>/gi, '');
|
||||||
|
titleStr = titleStr.replace(/<br\s*\/?>/gi, '');
|
||||||
const loading = this.$loading({
|
const loading = this.$loading({
|
||||||
lock: true,
|
lock: true,
|
||||||
text: 'Loading...',
|
text: 'Loading...',
|
||||||
@@ -1972,20 +1978,34 @@ export default {
|
|||||||
if (tableList.length == 0) {
|
if (tableList.length == 0) {
|
||||||
return [];
|
return [];
|
||||||
} else {
|
} else {
|
||||||
// 假设第一行是表头,保存表头
|
// 定义清理函数:去掉所有 br 标签和 TinyMCE 占位符
|
||||||
const header = tableList[0];
|
const cleanText = (text) => {
|
||||||
|
if (!text) return "";
|
||||||
|
return text.replace(/<br\s*\/?>/gi, '').trim();
|
||||||
|
};
|
||||||
|
|
||||||
// 从第二行开始,移除与表头相同的行
|
// 1. 获取处理后的干净表头
|
||||||
const cleanedTable = tableList.filter((row, index) => {
|
const header = tableList[0].map(cell => ({
|
||||||
// 如果是第一行,则保留
|
...cell,
|
||||||
|
text: cleanText(cell.text)
|
||||||
|
}));
|
||||||
|
|
||||||
|
// 2. 过滤逻辑
|
||||||
|
const cleanedTable = tableList.map((row) => {
|
||||||
|
// 首先:把每一行里的每个 cell.text 里的 <br> 都去掉
|
||||||
|
return row.map(cell => ({
|
||||||
|
...cell,
|
||||||
|
text: cleanText(cell.text)
|
||||||
|
}));
|
||||||
|
}).filter((row, index) => {
|
||||||
if (index === 0) return true;
|
if (index === 0) return true;
|
||||||
|
|
||||||
// 比较当前行的每个单元格与表头是否相同
|
// 3. 此时比较的就是没有 <br> 的文本了
|
||||||
const isHeaderRow = row.every((cell, cellIndex) => {
|
const isHeaderRow = row.every((cell, cellIndex) => {
|
||||||
return cell.text === header[cellIndex].text;
|
return cell.text === header[cellIndex].text;
|
||||||
});
|
});
|
||||||
|
|
||||||
return !isHeaderRow; // 只保留与表头不同的行
|
return !isHeaderRow;
|
||||||
});
|
});
|
||||||
|
|
||||||
return cleanedTable;
|
return cleanedTable;
|
||||||
@@ -2014,11 +2034,15 @@ export default {
|
|||||||
spinner: 'el-icon-loading',
|
spinner: 'el-icon-loading',
|
||||||
background: 'rgba(0, 0, 0, 0.7)'
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
});
|
});
|
||||||
|
strNote = strNote.replace(/<br\s*\/?>/gi, '');
|
||||||
|
strTitle = strTitle.replace(/<br\s*\/?>/gi, '');
|
||||||
|
var tableStr=JSON.stringify(cleanedTableList)
|
||||||
|
|
||||||
if (this.lineStyle.visiTitle == 'Edit Table') {
|
if (this.lineStyle.visiTitle == 'Edit Table') {
|
||||||
this.$api
|
this.$api
|
||||||
.post(this.urlList.editTable, {
|
.post(this.urlList.editTable, {
|
||||||
amt_id: this.lineStyle.amt_id,
|
amt_id: this.lineStyle.amt_id,
|
||||||
table_data: JSON.stringify(cleanedTableList),
|
table_data: tableStr,
|
||||||
html_data: content.html_data,
|
html_data: content.html_data,
|
||||||
note: strNote,
|
note: strNote,
|
||||||
title: strTitle
|
title: strTitle
|
||||||
|
|||||||
@@ -928,7 +928,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<span>Status : </span>
|
<span>Status : </span>
|
||||||
<b>{{ articleState }}</b>
|
<b>{{ articleState }}</b>
|
||||||
<el-button type="text" @click="testvis" icon="el-icon-edit">Change</el-button>
|
<el-button type="text" @click="testvis" icon="el-icon-edit" v-if="!(form.is_draft==1&&form.state==3)">Change</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex; width: 100%">
|
<div style="display: flex; width: 100%">
|
||||||
<span>Remarks :</span>
|
<span>Remarks :</span>
|
||||||
@@ -1553,6 +1553,7 @@ export default {
|
|||||||
remarks: '',
|
remarks: '',
|
||||||
state: '',
|
state: '',
|
||||||
ctime: '',
|
ctime: '',
|
||||||
|
is_draft: '',
|
||||||
authorList: [],
|
authorList: [],
|
||||||
transList: []
|
transList: []
|
||||||
},
|
},
|
||||||
@@ -1788,10 +1789,17 @@ export default {
|
|||||||
},
|
},
|
||||||
articleState: function () {
|
articleState: function () {
|
||||||
let str = '';
|
let str = '';
|
||||||
|
|
||||||
|
|
||||||
|
if(this.form.is_draft==1&&this.form.state==3){
|
||||||
|
str = this.$t('artstate.stateDraft');
|
||||||
|
return str;
|
||||||
|
}else{
|
||||||
switch (this.form.state) {
|
switch (this.form.state) {
|
||||||
case 0:
|
case 0:
|
||||||
str = this.$t('artstate.state0');
|
str = this.$t('artstate.state0');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
str = this.$t('artstate.state1');
|
str = this.$t('artstate.state1');
|
||||||
break;
|
break;
|
||||||
@@ -1816,6 +1824,8 @@ export default {
|
|||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
reOpenDialog() {
|
reOpenDialog() {
|
||||||
@@ -2540,6 +2550,7 @@ export default {
|
|||||||
this.form.is_use_ai = res.article.is_use_ai;
|
this.form.is_use_ai = res.article.is_use_ai;
|
||||||
this.form.use_ai_explain = res.article.use_ai_explain;
|
this.form.use_ai_explain = res.article.use_ai_explain;
|
||||||
this.form.transList = res.transfer;
|
this.form.transList = res.transfer;
|
||||||
|
this.form.is_draft = res.article.is_draft;
|
||||||
this.msgs = res.msg;
|
this.msgs = res.msg;
|
||||||
var alist = res.authors;
|
var alist = res.authors;
|
||||||
let alist_name = [];
|
let alist_name = [];
|
||||||
|
|||||||
@@ -87,9 +87,13 @@
|
|||||||
</p> -->
|
</p> -->
|
||||||
|
|
||||||
<div class="man_state" :style="item.state,'3' | stateChange" >
|
<div class="man_state" :style="item.state,'3' | stateChange" >
|
||||||
<b :style="item.state,'4' | stateChange">
|
<b :style="item.state,'4' | stateChange" v-if="item.is_draft==1&&item.state==3">
|
||||||
|
{{$t('artstate.stateDraft')}}
|
||||||
|
</b>
|
||||||
|
<b :style="item.state,'4' | stateChange" v-else>
|
||||||
{{item.state,'tst' | stateChange}}
|
{{item.state,'tst' | stateChange}}
|
||||||
</b>
|
</b>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="man_btn" style="overflow: hidden;">
|
<div class="man_btn" style="overflow: hidden;">
|
||||||
@@ -1058,7 +1062,7 @@ this.$router.push({
|
|||||||
border: 1px solid #fff;
|
border: 1px solid #fff;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 6px 18px;
|
padding: 6px 12px;
|
||||||
letter-spacing: -0.5px;
|
letter-spacing: -0.5px;
|
||||||
border-top-right-radius: 3px;
|
border-top-right-radius: 3px;
|
||||||
/* border-top-left-radius: 3px; */
|
/* border-top-left-radius: 3px; */
|
||||||
|
|||||||
@@ -125,7 +125,7 @@
|
|||||||
<span style="float: right">
|
<span style="float: right">
|
||||||
<span class="labelTitle" style="font-weight: 500; font-size: 13px">Status :</span>
|
<span class="labelTitle" style="font-weight: 500; font-size: 13px">Status :</span>
|
||||||
<font style="margin-right: 15px; font-size: 13px; letter-spacing: -0.5px; font-weight: 700">
|
<font style="margin-right: 15px; font-size: 13px; letter-spacing: -0.5px; font-weight: 700">
|
||||||
{{ stateFormat(item.state) }}
|
{{ stateFormat(item.is_draft==1&&item.state==3?'draft':item.state) }}
|
||||||
</font>
|
</font>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
@@ -2629,6 +2629,9 @@ export default {
|
|||||||
case 0:
|
case 0:
|
||||||
str = this.$t('artstate.state0');
|
str = this.$t('artstate.state0');
|
||||||
break;
|
break;
|
||||||
|
case 'draft':
|
||||||
|
str = this.$t('artstate.stateDraft');
|
||||||
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
str = this.$t('artstate.state1');
|
str = this.$t('artstate.state1');
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -96,6 +96,11 @@
|
|||||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="Use the Picture as Graphic Abstract :" prop="is_graphical_abstract" label-width="260px">
|
||||||
|
<el-radio v-model="detailMes.is_graphical_abstract" :label="1">Yes</el-radio>
|
||||||
|
<el-radio v-model="detailMes.is_graphical_abstract" :label="2">No</el-radio>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="Type :" prop="type">
|
<el-form-item label="Type :" prop="type">
|
||||||
<el-select v-model="detailMes.type" filterable placeholder="Please select an article type">
|
<el-select v-model="detailMes.type" filterable placeholder="Please select an article type">
|
||||||
<el-option v-for="item in opMedical" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
<el-option v-for="item in opMedical" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
||||||
@@ -108,13 +113,18 @@
|
|||||||
<el-input v-model="detailMes.tradition_tag" placeholder="eg :Highlights"></el-input>
|
<el-input v-model="detailMes.tradition_tag" placeholder="eg :Highlights"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="Tradition Content :">
|
<el-form-item label="Tradition Content :">
|
||||||
<tinymce
|
<div class="tinymce-container">
|
||||||
|
<div v-if="tradition==null" class="loading-status loadTinymceBox">
|
||||||
|
<i class="el-icon-loading"></i> Fetching highlights, please wait...
|
||||||
|
</div>
|
||||||
|
<tinymce v-else
|
||||||
type="tradition"
|
type="tradition"
|
||||||
:height="160"
|
:height="160"
|
||||||
|
id="tiny-tradition"
|
||||||
ref="tinymceChild2"
|
ref="tinymceChild2"
|
||||||
:tinymceOtherInit="{
|
:tinymceOtherInit="{
|
||||||
forced_root_block: '',
|
forced_root_block: '',
|
||||||
newline_behavior: 'linebreak',
|
newline_behavior: 'linebreak'
|
||||||
}"
|
}"
|
||||||
valid_elements=",br"
|
valid_elements=",br"
|
||||||
:wordStyle="`p{font-size: 13px;}`"
|
:wordStyle="`p{font-size: 13px;}`"
|
||||||
@@ -126,47 +136,38 @@
|
|||||||
:toolbar="[
|
:toolbar="[
|
||||||
'bold italic |customBlue removeBlue|myuppercase myuppercasea Line MoreSymbols|subscript superscript|clearButton'
|
'bold italic |customBlue removeBlue|myuppercase myuppercasea Line MoreSymbols|subscript superscript|clearButton'
|
||||||
]"
|
]"
|
||||||
style="
|
style="line-height: 12px; overflow: auto; font-size: 13px; margin-top: 0pt; margin-bottom: 0pt"
|
||||||
line-height: 12px;
|
|
||||||
overflow: auto;
|
|
||||||
font-size: 13px; /* 字体大小 */
|
|
||||||
margin-top: 0pt; /* 段前间距 */
|
|
||||||
margin-bottom: 0pt; /* 段后间距 */
|
|
||||||
"
|
|
||||||
></tinymce>
|
></tinymce>
|
||||||
|
</div>
|
||||||
<!-- <quill-editor ref="myTextEditor" v-model="detailMes.tradition" :options="editorOption"> </quill-editor> -->
|
<!-- <quill-editor ref="myTextEditor" v-model="detailMes.tradition" :options="editorOption"> </quill-editor> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="Medical history of objective :">
|
<el-form-item label="Medical history of objective :">
|
||||||
|
<div class="tinymce-container">
|
||||||
<tinymce
|
<div v-if="mhooStr==null" class="loading-status loadTinymceBox">
|
||||||
|
<i class="el-icon-loading"></i> Fetching medical history of objective, please wait...
|
||||||
|
</div>
|
||||||
|
<tinymce v-else
|
||||||
type="mhooStr"
|
type="mhooStr"
|
||||||
:height="160"
|
:height="160"
|
||||||
ref="tinymceChild3"
|
ref="tinymceChild3"
|
||||||
:tinymceOtherInit="{
|
:tinymceOtherInit="{
|
||||||
forced_root_block: '',
|
forced_root_block: '',
|
||||||
newline_behavior: 'linebreak',
|
newline_behavior: 'linebreak'
|
||||||
}"
|
}"
|
||||||
valid_elements=",br"
|
valid_elements=",br"
|
||||||
:wordStyle="`p{font-size: 13px;}`"
|
:wordStyle="`p{font-size: 13px;}`"
|
||||||
:isAutomaticUpdate="true"
|
:isAutomaticUpdate="true"
|
||||||
@getContent="getContent"
|
@getContent="getContent"
|
||||||
|
id="tiny-mhoo"
|
||||||
@updateChange="(content) => updateChange('mhooStr', content)"
|
@updateChange="(content) => updateChange('mhooStr', content)"
|
||||||
:value="mhooStr"
|
:value="mhooStr"
|
||||||
class="paste-area text-container"
|
class="paste-area text-container"
|
||||||
:toolbar="[
|
:toolbar="[
|
||||||
'bold italic |customBlue removeBlue|myuppercase myuppercasea Line MoreSymbols|subscript superscript|clearButton'
|
'bold italic |customBlue removeBlue|myuppercase myuppercasea Line MoreSymbols|subscript superscript|clearButton'
|
||||||
]"
|
]"
|
||||||
style="
|
style="line-height: 12px; overflow: auto; font-size: 13px; margin-top: 0pt; margin-bottom: 0pt"
|
||||||
line-height: 12px;
|
|
||||||
overflow: auto;
|
|
||||||
font-size: 13px; /* 字体大小 */
|
|
||||||
margin-top: 0pt; /* 段前间距 */
|
|
||||||
margin-bottom: 0pt; /* 段后间距 */
|
|
||||||
"
|
|
||||||
></tinymce>
|
></tinymce>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- <quill-editor ref="myTextEditor" v-model="detailMes.mhoo" :options="editorOption"> </quill-editor> -->
|
<!-- <quill-editor ref="myTextEditor" v-model="detailMes.mhoo" :options="editorOption"> </quill-editor> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="keywords :" prop="keywords">
|
<el-form-item label="keywords :" prop="keywords">
|
||||||
@@ -188,27 +189,27 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="Abstract :" prop="abstract">
|
<el-form-item label="Abstract :" prop="abstract">
|
||||||
<template slot="label"> <span style="color: #f56c6c; margin-right: 4px">*</span>Abstract : </template>
|
<template slot="label"> <span style="color: #f56c6c; margin-right: 4px">*</span>Abstract : </template>
|
||||||
|
<div class="tinymce-container">
|
||||||
|
<div v-if="abstract==null" class="loading-status loadTinymceBox">
|
||||||
|
<i class="el-icon-loading"></i> Fetching abstract, please wait...
|
||||||
|
</div>
|
||||||
|
|
||||||
<tinymce
|
<tinymce
|
||||||
|
v-else
|
||||||
type="Abstract"
|
type="Abstract"
|
||||||
:height="160"
|
:height="160"
|
||||||
ref="tinymceChild1"
|
ref="tinymceChild1"
|
||||||
|
id="tiny-abstract"
|
||||||
:wordStyle="`p{font-size: 13px;}`"
|
:wordStyle="`p{font-size: 13px;}`"
|
||||||
:isAutomaticUpdate="true"
|
:isAutomaticUpdate="true"
|
||||||
@getContent="getContent"
|
@getContent="getContent"
|
||||||
@updateChange="(content) => updateChange('abstract', content)"
|
@updateChange="(content) => updateChange('abstract', content)"
|
||||||
:value="abstract"
|
:value="abstract"
|
||||||
class="paste-area text-container"
|
class="paste-area text-container"
|
||||||
:toolbar="[
|
:toolbar="['bold italic |customBlue removeBlue|myuppercase myuppercasea Line MoreSymbols|subscript superscript|clearButton']"
|
||||||
'bold italic |customBlue removeBlue|myuppercase myuppercasea Line MoreSymbols|subscript superscript|clearButton'
|
style="line-height: 12px; overflow: auto; font-size: 13px; margin-top: 0pt; margin-bottom: 0pt"
|
||||||
]"
|
|
||||||
style="
|
|
||||||
line-height: 12px;
|
|
||||||
overflow: auto;
|
|
||||||
font-size: 13px; /* 字体大小 */
|
|
||||||
margin-top: 0pt; /* 段前间距 */
|
|
||||||
margin-bottom: 0pt; /* 段后间距 */
|
|
||||||
"
|
|
||||||
></tinymce>
|
></tinymce>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- <quill-editor ref="myTextEditor" v-model="detailMes.abstract" :options="editorOption"> </quill-editor> -->
|
<!-- <quill-editor ref="myTextEditor" v-model="detailMes.abstract" :options="editorOption"> </quill-editor> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -266,6 +267,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="author_country" label="Country" width="140px"></el-table-column>
|
<el-table-column prop="author_country" label="Country" width="140px"></el-table-column>
|
||||||
<el-table-column prop="orcid" label="ORCID"></el-table-column>
|
<el-table-column prop="orcid" label="ORCID"></el-table-column>
|
||||||
|
<el-table-column prop="mailing_address" label="Corresponding author details" min-width="160px"></el-table-column>
|
||||||
<el-table-column label="" width="190" align="center">
|
<el-table-column label="" width="190" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div class="operation">
|
<div class="operation">
|
||||||
@@ -292,7 +294,7 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<!-- 添加作者弹出框 -->
|
<!-- 添加作者弹出框 -->
|
||||||
<el-dialog title="Add author" :visible.sync="addAuthor" width="650px" destroy-on-close :close-on-click-modal="false">
|
<el-dialog title="Add author" :visible.sync="addAuthor" width="650px" destroy-on-close :close-on-click-modal="false">
|
||||||
<el-form ref="add_Author" :model="addFomauthor" :rules="rules" label-width="165px">
|
<el-form ref="add_Author" :model="addFomauthor" :rules="rules" label-width="215px">
|
||||||
<el-form-item label="Author first name :" prop="first_name">
|
<el-form-item label="Author first name :" prop="first_name">
|
||||||
<el-input v-model="addFomauthor.first_name"></el-input>
|
<el-input v-model="addFomauthor.first_name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -312,7 +314,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="Email :" v-if="addFomauthor.is_report != '1'">
|
<el-form-item label="Email :" v-if="addFomauthor.is_report != '1'">
|
||||||
<el-input v-model="editFomauthor.email" type="email"></el-input>
|
<el-input v-model="addFomauthor.email" type="email"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="Email :" prop="email" v-if="addFomauthor.is_report == '1'">
|
<el-form-item label="Email :" prop="email" v-if="addFomauthor.is_report == '1'">
|
||||||
<el-input v-model="addFomauthor.email" type="email"></el-input>
|
<el-input v-model="addFomauthor.email" type="email"></el-input>
|
||||||
@@ -350,6 +352,17 @@
|
|||||||
<template slot="prepend">https://orcid.org/</template>
|
<template slot="prepend">https://orcid.org/</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
:required="addFomauthor.is_report == '1'"
|
||||||
|
label="Corresponding author details :"
|
||||||
|
prop="mailing_address"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="addFomauthor.mailing_address"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="eg: Author full name. Affiliation address. Email."
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="addAuthor = false">Canel</el-button>
|
<el-button @click="addAuthor = false">Canel</el-button>
|
||||||
@@ -358,7 +371,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 编辑作者弹出框 -->
|
<!-- 编辑作者弹出框 -->
|
||||||
<el-dialog title="Edit Author" :visible.sync="editAuthor" width="650px" :close-on-click-modal="false">
|
<el-dialog title="Edit Author" :visible.sync="editAuthor" width="650px" :close-on-click-modal="false">
|
||||||
<el-form ref="edit_Author" :model="editFomauthor" :rules="rules" label-width="165px">
|
<el-form ref="edit_Author" :model="editFomauthor" :rules="rules" label-width="215px">
|
||||||
<el-form-item label="Author first name :" prop="first_name">
|
<el-form-item label="Author first name :" prop="first_name">
|
||||||
<el-input v-model="editFomauthor.first_name"></el-input>
|
<el-input v-model="editFomauthor.first_name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -415,6 +428,18 @@
|
|||||||
<template slot="prepend">https://orcid.org/</template>
|
<template slot="prepend">https://orcid.org/</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item
|
||||||
|
:required="editFomauthor.is_report == '1'"
|
||||||
|
label="Corresponding author details :"
|
||||||
|
prop="mailing_address"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="editFomauthor.mailing_address"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="eg: Author full name. Affiliation address. Email."
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="editAuthor = false">Cancel</el-button>
|
<el-button @click="editAuthor = false">Cancel</el-button>
|
||||||
@@ -709,21 +734,25 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: center; margin: 0px 0 0 0">
|
<div style="text-align: center; margin: 0px 0 0 0">
|
||||||
<el-button type="primary" @click="ZsSaveAbs" class="save-btn" style="margin-top: 10px;">
|
<el-button type="primary" @click="ZsSaveAbs" class="save-btn" style="margin-top: 10px">
|
||||||
<i class="el-icon-check"></i>
|
<i class="el-icon-check"></i>
|
||||||
Save Essential Information
|
Save Essential Information
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 1px; background-color: #c5e1f1; width: 100%; margin: 80px 0 40px"></div>
|
<div style="height: 1px; background-color: #c5e1f1; width: 100%; margin: 80px 0 40px"></div>
|
||||||
<div style="display: flex; /* 开启 flex 布局 */
|
<div style="display: flex; /* 开启 flex 布局 */ justify-content: space-between; padding: 20px">
|
||||||
justify-content: space-between;
|
|
||||||
padding: 20px;">
|
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<div style="margin: 0 0 40px 0">
|
<div style="margin: 0 0 40px 0">
|
||||||
Choose Template :
|
Choose Template :
|
||||||
<el-select v-model="shuTter.board" placeholder="Please select a template..." @change="select_tem($event)" style="width: 225px">
|
<el-select
|
||||||
<el-option v-for="item in fol_low" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
v-model="shuTter.board"
|
||||||
|
placeholder="Please select a template..."
|
||||||
|
@change="select_tem($event)"
|
||||||
|
style="width: 225px"
|
||||||
|
>
|
||||||
|
<el-option v-for="item in fol_low" :key="item.value" :label="item.label" :value="item.value">
|
||||||
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button type="primary" plain style="width: 150px; margin: 0 5px 0 15px" @click="EstaBlish">
|
<el-button type="primary" plain style="width: 150px; margin: 0 5px 0 15px" @click="EstaBlish">
|
||||||
<i class="el-icon-document"></i> Create Manuscript
|
<i class="el-icon-document"></i> Create Manuscript
|
||||||
@@ -736,7 +765,9 @@
|
|||||||
<div v-for="(item, index) in DLfileList" :key="index" class="load_pdf">
|
<div v-for="(item, index) in DLfileList" :key="index" class="load_pdf">
|
||||||
<img src="../../assets/img/icon_0.png" />
|
<img src="../../assets/img/icon_0.png" />
|
||||||
<span style="color: #333">Typesetting {{ index + 1 }}</span>
|
<span style="color: #333">Typesetting {{ index + 1 }}</span>
|
||||||
<span style="margin-left: 40px; color: #888; font-size: 13px">Time : {{ modifDate(item.ctime * 1000) }}</span>
|
<span style="margin-left: 40px; color: #888; font-size: 13px"
|
||||||
|
>Time : {{ modifDate(item.ctime * 1000) }}</span
|
||||||
|
>
|
||||||
<a :href="'/tsfile/' + item.url" target="_blank" style="margin-left: 40px">
|
<a :href="'/tsfile/' + item.url" target="_blank" style="margin-left: 40px">
|
||||||
<i class="el-icon-download" style="color: #66b1ff; font-weight: bold"></i>
|
<i class="el-icon-download" style="color: #66b1ff; font-weight: bold"></i>
|
||||||
</a>
|
</a>
|
||||||
@@ -745,41 +776,52 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<h5 style="font-size: 14px; margin: 0 0 40px 0;">
|
<h5 style="font-size: 14px; margin: 0 0 40px 0">
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
icon="el-icon-printer"
|
icon="el-icon-printer"
|
||||||
style="width: 150px; height: 32px; font-size: 12px;margin-right: 14px;"
|
style="width: 150px; height: 32px; font-size: 12px; margin-right: 14px"
|
||||||
:loading="isGenerating"
|
:loading="isGenerating"
|
||||||
@click="generatePDF"
|
@click="generatePDF"
|
||||||
>
|
>
|
||||||
|
|
||||||
{{ isGenerating ? 'Generating PDF...' : 'Generate PDF' }}
|
{{ isGenerating ? 'Generating PDF...' : 'Generate PDF' }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<span>Click the button below to start high-quality PDF typesetting.</span>
|
<span>Click the button below to start high-quality PDF typesetting.</span>
|
||||||
</h5>
|
</h5>
|
||||||
<div style="margin: 30px 0 40px 0">
|
<div style="margin: 30px 0 40px 0">
|
||||||
<h5 style="font-size: 16px; margin: 0 0 30px 0; letter-spacing: -0.5px;font-weight: bold;">Download list
|
<h5 style="font-size: 16px; margin: 0 0 30px 0; letter-spacing: -0.5px; font-weight: bold">
|
||||||
<span><i class="el-icon-refresh" style="color: #006699; font-weight: bold;margin-left: 6px;cursor: pointer;" @click="refreshPdfList"></i></span>
|
Download list
|
||||||
|
<span
|
||||||
|
><i
|
||||||
|
class="el-icon-refresh"
|
||||||
|
style="color: #006699; font-weight: bold; margin-left: 6px; cursor: pointer"
|
||||||
|
@click="refreshPdfList"
|
||||||
|
></i
|
||||||
|
></span>
|
||||||
|
|
||||||
<span v-if="detailMes.file_sub_table" style="color: #006699; font-size: 13px;font-weight: normal;float: right;">Supplementary Material :<a :href="'/public/articleSUBTAB/' +detailMes.file_sub_table" target="_blank" style="margin-left: 20px">
|
<span
|
||||||
<i class="el-icon-download" style="color: #006699; font-weight: bold"></i>
|
v-if="detailMes.file_sub_table"
|
||||||
</a></span>
|
style="color: #006699; font-size: 13px; font-weight: normal; float: right"
|
||||||
|
>Supplementary Material :<a
|
||||||
|
:href="'/public/articleSUBTAB/' + detailMes.file_sub_table"
|
||||||
|
target="_blank"
|
||||||
|
style="margin-left: 20px"
|
||||||
|
>
|
||||||
|
<i class="el-icon-download" style="color: #006699; font-weight: bold"></i> </a
|
||||||
|
></span>
|
||||||
</h5>
|
</h5>
|
||||||
<p v-if="PDFfileList.length == 0" style="color: #666; font-size: 14px">No Manuscript</p>
|
<p v-if="PDFfileList.length == 0" style="color: #666; font-size: 14px">No Manuscript</p>
|
||||||
<div v-for="(item, index) in PDFfileList" :key="index" class="load_pdf">
|
<div v-for="(item, index) in PDFfileList" :key="index" class="load_pdf">
|
||||||
<img src="../../assets/img/icon_pdf.png" style="width: 26px; height: 26px;" />
|
<img src="../../assets/img/icon_pdf.png" style="width: 26px; height: 26px" />
|
||||||
<span style="color: #333">Typesetting {{ index + 1 }}</span>
|
<span style="color: #333">Typesetting {{ index + 1 }}</span>
|
||||||
<span style="margin-left: 40px; color: #888; font-size: 13px">Time : {{ modifDate(item.create_time * 1000) }}</span>
|
<span style="margin-left: 40px; color: #888; font-size: 13px"
|
||||||
|
>Time : {{ modifDate(item.create_time * 1000) }}</span
|
||||||
|
>
|
||||||
<a :href="'/public/' + item.url" target="_blank" style="margin-left: 40px">
|
<a :href="'/public/' + item.url" target="_blank" style="margin-left: 40px">
|
||||||
<i class="el-icon-download" style="color: #66b1ff; font-weight: bold"></i>
|
<i class="el-icon-download" style="color: #66b1ff; font-weight: bold"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -829,7 +871,6 @@
|
|||||||
</el-upload>
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1096,11 +1137,13 @@ export default {
|
|||||||
],
|
],
|
||||||
detailMes: {
|
detailMes: {
|
||||||
type: '',
|
type: '',
|
||||||
|
is_graphical_abstract: '3',
|
||||||
journal_special_id: 'None'
|
journal_special_id: 'None'
|
||||||
},
|
},
|
||||||
abstract: '',
|
abstract: null,
|
||||||
tradition: '',
|
|
||||||
mhooStr: '',
|
tradition:null,
|
||||||
|
mhooStr: null,
|
||||||
opInstal: [],
|
opInstal: [],
|
||||||
// opMedical: [
|
// opMedical: [
|
||||||
// {
|
// {
|
||||||
@@ -1475,6 +1518,40 @@ export default {
|
|||||||
message: 'Please use English characters only',
|
message: 'Please use English characters only',
|
||||||
trigger: 'blur'
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
is_graphical_abstract: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
validator: function (rule, value, callback) {
|
||||||
|
if (value == 1 || value == 2) {
|
||||||
|
callback();
|
||||||
|
} else {
|
||||||
|
// 这里的英文提示更加符合地道的校验语境
|
||||||
|
callback(
|
||||||
|
new Error(
|
||||||
|
'Please select whether the uploaded picture should be shown as graphic abstract on the PDF title page.'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
trigger: 'change' // 建议下拉框用 change,失去焦点用 blur
|
||||||
|
}
|
||||||
|
],
|
||||||
|
mailing_address: [
|
||||||
|
{
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
var formData = this.addAuthor ? this.addFomauthor : this.editFomauthor;
|
||||||
|
if (formData.is_report == '1') {
|
||||||
|
if (!value || value.trim() === '') {
|
||||||
|
// 更加正式的表达:请提供通讯作者的详细信息
|
||||||
|
return callback(new Error('Please provide the corresponding author details.'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 必须确保所有逻辑路径都能执行到 callback()
|
||||||
|
callback();
|
||||||
|
},
|
||||||
|
trigger: ['blur', 'change'] // 建议加上 change,体验更好
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -1484,7 +1561,6 @@ export default {
|
|||||||
this.getHight();
|
this.getHight();
|
||||||
window.addEventListener('resize', this.getHight);
|
window.addEventListener('resize', this.getHight);
|
||||||
this.getData();
|
this.getData();
|
||||||
|
|
||||||
this.getAuthorJG();
|
this.getAuthorJG();
|
||||||
this.getCount();
|
this.getCount();
|
||||||
this.getWorldPdf();
|
this.getWorldPdf();
|
||||||
@@ -1503,14 +1579,13 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (res.status == 1) {
|
if (res.status == 1) {
|
||||||
this.$message.success("The PDF document is being processed. Please wait and refresh the page in one minute.");
|
this.$message.success('The PDF document is being processed. Please wait and refresh the page in one minute.');
|
||||||
} else {
|
} else {
|
||||||
this.$message.error("Generation failed, please try again.");
|
this.$message.error('Generation failed, please try again.');
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
this.$message.error("Network error, please try again.");
|
this.$message.error('Network error, please try again.');
|
||||||
} finally {
|
} finally {
|
||||||
// 只有请求真正完成后,才会执行这里
|
// 只有请求真正完成后,才会执行这里
|
||||||
this.isGenerating = false;
|
this.isGenerating = false;
|
||||||
@@ -1524,7 +1599,6 @@ export default {
|
|||||||
// article_id: 6075
|
// article_id: 6075
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
||||||
if (res.status == 1) {
|
if (res.status == 1) {
|
||||||
this.finalReview = res.data;
|
this.finalReview = res.data;
|
||||||
} else {
|
} else {
|
||||||
@@ -1533,17 +1607,13 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
updateChange(type, content) {
|
updateChange(type, content) {
|
||||||
|
|
||||||
this[type] = content;
|
this[type] = content;
|
||||||
},
|
},
|
||||||
|
|
||||||
getTinymceContent(type) {
|
getTinymceContent(type) {
|
||||||
|
|
||||||
this.$refs.tinymceChild1.getContent(type);
|
this.$refs.tinymceChild1.getContent(type);
|
||||||
},
|
},
|
||||||
getContent(type, content) {
|
getContent(type, content) {},
|
||||||
|
|
||||||
},
|
|
||||||
// 跳转文章详情
|
// 跳转文章详情
|
||||||
showdetaileditor(data) {
|
showdetaileditor(data) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
@@ -1585,43 +1655,37 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getData() {
|
getData() {
|
||||||
this.idform.p_article_id = this.p_article_id;
|
|
||||||
this.detailMes.p_article_id = this.p_article_id;
|
|
||||||
this.addFomauthor.p_article_id = this.p_article_id;
|
|
||||||
this.addFomschool.p_article_id = this.p_article_id;
|
|
||||||
this.UpTypeFile.p_article_id = this.p_article_id;
|
|
||||||
this.abstract = '';
|
|
||||||
const loading = this.$loading({
|
const loading = this.$loading({
|
||||||
lock: true,
|
lock: true,
|
||||||
text: 'Loading...',
|
text: 'Loading...',
|
||||||
spinner: 'el-icon-loading',
|
spinner: 'el-icon-loading',
|
||||||
background: 'rgba(0, 0, 0, 0.7)'
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
});
|
});
|
||||||
|
this.idform.p_article_id = this.p_article_id;
|
||||||
|
this.detailMes.p_article_id = this.p_article_id;
|
||||||
|
this.detailMes.is_graphical_abstract = 3;
|
||||||
|
this.addFomauthor.p_article_id = this.p_article_id;
|
||||||
|
this.addFomschool.p_article_id = this.p_article_id;
|
||||||
|
this.UpTypeFile.p_article_id = this.p_article_id;
|
||||||
|
this.abstract = null;
|
||||||
|
this.tradition = null;
|
||||||
|
this.mhooStr = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取文章信息
|
// 获取文章信息
|
||||||
this.$api
|
this.$api
|
||||||
.post('api/Production/getProductionDetail', this.idform)
|
.post('api/Production/getProductionDetail', this.idform)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.detailMes = res.data.production;
|
|
||||||
this.abstract = res.data.production.abstract ? res.data.production.abstract : '';
|
this.abstract = res.data.production.abstract ? res.data.production.abstract : '';
|
||||||
this.tradition = res.data.production.tradition ? res.data.production.tradition : '';
|
this.tradition = res.data.production.tradition ? res.data.production.tradition : '';
|
||||||
this.mhooStr = res.data.production.mhoo ? res.data.production.mhoo : '';
|
this.mhooStr = res.data.production.mhoo ? res.data.production.mhoo : '';
|
||||||
if (this.abstract != '') {
|
|
||||||
this.$nextTick(() => {
|
this.detailMes = res.data.production;
|
||||||
this.$refs.tinymceChild1.setContent(this.abstract);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (this.tradition != '') {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.tinymceChild2.setContent(this.tradition);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (this.mhooStr != '') {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.tinymceChild3.setContent(this.mhooStr);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
this.UpTyFIle = res.data.production.file_pdf;
|
this.UpTyFIle = res.data.production.file_pdf;
|
||||||
this.getArticleFinal(res.data.production.article_id);
|
this.getArticleFinal(res.data.production.article_id);
|
||||||
if (res.data.production.icon != '') {
|
if (res.data.production.icon != '') {
|
||||||
@@ -1785,7 +1849,8 @@ export default {
|
|||||||
this.$message.error(err);
|
this.$message.error(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
refreshPdfList(){ const loading = this.$loading({
|
refreshPdfList() {
|
||||||
|
const loading = this.$loading({
|
||||||
lock: true,
|
lock: true,
|
||||||
text: 'Loading...',
|
text: 'Loading...',
|
||||||
spinner: 'el-icon-loading',
|
spinner: 'el-icon-loading',
|
||||||
@@ -1807,15 +1872,12 @@ export default {
|
|||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status == 1) {
|
if (res.status == 1) {
|
||||||
|
|
||||||
this.PDFfileList = res.data;
|
this.PDFfileList = res.data;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
this.$message.error(res.msg);
|
this.$message.error(res.msg);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
||||||
this.$message.error(err);
|
this.$message.error(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -1979,14 +2041,14 @@ export default {
|
|||||||
},
|
},
|
||||||
// 1----保存稿件信息
|
// 1----保存稿件信息
|
||||||
async ZsSaveMes() {
|
async ZsSaveMes() {
|
||||||
|
|
||||||
var abstractStr = '';
|
var abstractStr = '';
|
||||||
var mhooStr = '';
|
var mhooStr = '';
|
||||||
var traditionStr = '';
|
var traditionStr = '';
|
||||||
if (this.detailMes.journal_stage_id == 0) {
|
if (this.detailMes.journal_stage_id == 0) {
|
||||||
this.$message.error('Please select an installment!');
|
this.$message.error('Please select an installment!');
|
||||||
return;
|
return;
|
||||||
} if (this.tradition!='') {
|
}
|
||||||
|
if (this.tradition != '') {
|
||||||
traditionStr = await this.abstractFormat(this.tradition);
|
traditionStr = await this.abstractFormat(this.tradition);
|
||||||
}
|
}
|
||||||
if (this.mhooStr != '') {
|
if (this.mhooStr != '') {
|
||||||
@@ -2003,7 +2065,12 @@ export default {
|
|||||||
this.$refs.Mes_Form.validate((valid) => {
|
this.$refs.Mes_Form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$api
|
this.$api
|
||||||
.post('api/Production/editProduction', { ...this.detailMes, abstract: abstractStr, mhoo: mhooStr, tradition: traditionStr })
|
.post('api/Production/editProduction', {
|
||||||
|
...this.detailMes,
|
||||||
|
abstract: abstractStr,
|
||||||
|
mhoo: mhooStr,
|
||||||
|
tradition: traditionStr
|
||||||
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.$message.success(`Successfully save the article!`);
|
this.$message.success(`Successfully save the article!`);
|
||||||
@@ -2025,6 +2092,10 @@ export default {
|
|||||||
|
|
||||||
// 2----添加作者操作
|
// 2----添加作者操作
|
||||||
add_Authorclick(index, row) {
|
add_Authorclick(index, row) {
|
||||||
|
if (this.schoolData.length == 0) {
|
||||||
|
this.$message.error('Please provide at least one institutional affiliation.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.aid = index;
|
this.aid = index;
|
||||||
this.addFomauthor = {
|
this.addFomauthor = {
|
||||||
is_first: '0',
|
is_first: '0',
|
||||||
@@ -2035,7 +2106,6 @@ export default {
|
|||||||
this.addAuthor = true;
|
this.addAuthor = true;
|
||||||
},
|
},
|
||||||
authorAdd(addFomauthor) {
|
authorAdd(addFomauthor) {
|
||||||
console.log(this.addFomauthor);
|
|
||||||
this.$refs.add_Author.validate((valid) => {
|
this.$refs.add_Author.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$api
|
this.$api
|
||||||
@@ -2982,7 +3052,6 @@ export default {
|
|||||||
// 获取文章信息
|
// 获取文章信息
|
||||||
this.$api
|
this.$api
|
||||||
.post('api/Preaccept/getArticleMains', {
|
.post('api/Preaccept/getArticleMains', {
|
||||||
|
|
||||||
article_id: this.detailMes.article_id
|
article_id: this.detailMes.article_id
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@@ -3201,6 +3270,14 @@ export default {
|
|||||||
.load_pdf:hover {
|
.load_pdf:hover {
|
||||||
background: #f5f7fa;
|
background: #f5f7fa;
|
||||||
}
|
}
|
||||||
|
.loadTinymceBox {
|
||||||
|
height: 160px; line-height: 160px; text-align: center; border: 2px solid #eee;
|
||||||
|
border-radius: 10px;
|
||||||
|
color: #c0c4cc !important;
|
||||||
|
}
|
||||||
|
.loadTinymceBox *{
|
||||||
|
color: #c0c4cc !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
.handle-box {
|
.handle-box {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<!-- <p style="color: #7f8790;margin: 10px 0 0 0;">Follow the progress of your submission.</p> -->
|
<!-- <p style="color: #7f8790;margin: 10px 0 0 0;">Follow the progress of your submission.</p> -->
|
||||||
<div class="tit_head">
|
<div class="tit_head">
|
||||||
Status : <b style="margin: 0 50px 0 0">{{ statetostr(artMes.laststate) }}</b> Journal : <b>{{ artMes.journalname }}</b>
|
Status : <b style="margin: 0 50px 0 0">{{ artMes.is_draft==1&&(artMes.laststate==3||artMes.laststate==-1) ? $t('artstate.stateDraft') : statetostr(artMes.laststate)}}</b><span v-if="artMes.journalname">Journal : <b>{{ artMes.journalname }}</b></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="tit_head" v-if="artMes.majors && artMes.majors.length > 0">
|
<div class="tit_head" v-if="artMes.majors && artMes.majors.length > 0">
|
||||||
<b style="margin: 0 50px 0 0; font-size: 20px">Research areas</b>
|
<b style="margin: 0 50px 0 0; font-size: 20px">Research areas</b>
|
||||||
|
|||||||
@@ -441,7 +441,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.isCollapse = localStorage.getItem('isCollapse') == 'true' ? true : false;
|
this.isCollapse = localStorage.getItem('isCollapse') == 'true' ? true : false;
|
||||||
console.log('localStorage.getItem', typeof localStorage.getItem('isCollapse'));
|
|
||||||
this.isShowEditComment();
|
this.isShowEditComment();
|
||||||
this.isFresh = false;
|
this.isFresh = false;
|
||||||
this.$nextTick(async () => {
|
this.$nextTick(async () => {
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="tinymce-container editor-container">
|
<div class="tinymce-container editor-container">
|
||||||
|
|
||||||
|
|
||||||
<textarea class="tinymce-textarea" :id="tinymceId"></textarea>
|
<textarea class="tinymce-textarea" :id="tinymceId"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -125,21 +123,23 @@ export default {
|
|||||||
formLabelWidth: '120px',
|
formLabelWidth: '120px',
|
||||||
hasChange: false,
|
hasChange: false,
|
||||||
hasInit: false,
|
hasInit: false,
|
||||||
|
editorInstance: null,
|
||||||
tinymceId: this.id || 'vue-tinymce-' + +new Date()
|
tinymceId: this.id || 'vue-tinymce-' + +new Date()
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value(val) {
|
value: {
|
||||||
// console.log('val at line 208:', val);
|
|
||||||
|
handler(val) {
|
||||||
|
|
||||||
|
|
||||||
if (!this.hasChange && this.hasInit) {
|
if (!this.hasChange && this.hasInit) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
||||||
|
|
||||||
window.tinymce.get(this.tinymceId).setContent(val);
|
window.tinymce.get(this.tinymceId).setContent(val);
|
||||||
// window.renderMathJax(); // 主动触发 MathJax 渲染
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
immediate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -163,13 +163,31 @@ export default {
|
|||||||
this.destroyTinymce();
|
this.destroyTinymce();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleSetContent(val) {
|
||||||
|
if (!this.editorInstance) return;
|
||||||
|
|
||||||
|
let finalContent = val || '';
|
||||||
|
// 你的业务逻辑:自动包裹 <p> 标签
|
||||||
|
if (!finalContent.includes('wordTableHtml') && !finalContent.startsWith('<p>')) {
|
||||||
|
finalContent = '<p>' + finalContent + '</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
this.editorInstance.setContent(finalContent);
|
||||||
|
|
||||||
|
// 渲染数学公式
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (window.renderMathJax) {
|
||||||
|
window.renderMathJax(this.tinymceId);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
onClear() {
|
onClear() {
|
||||||
if (this.uploadNotificationInstance) {
|
if (this.uploadNotificationInstance) {
|
||||||
this.uploadNotificationInstance.close(); this.uploadNotificationInstance = null;
|
this.uploadNotificationInstance.close();
|
||||||
|
this.uploadNotificationInstance = null;
|
||||||
this.uploadedImageCount = 0;
|
this.uploadedImageCount = 0;
|
||||||
this.totalUploadImages = 0;}
|
this.totalUploadImages = 0;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
updateUploadProgressNotification(imgIndex, status = 'processing', message = '') {
|
updateUploadProgressNotification(imgIndex, status = 'processing', message = '') {
|
||||||
// 快捷调用 $t
|
// 快捷调用 $t
|
||||||
@@ -412,35 +430,71 @@ uploadSingleImage(blob, index) {
|
|||||||
}
|
}
|
||||||
return new Blob([u8arr], { type: mime });
|
return new Blob([u8arr], { type: mime });
|
||||||
},
|
},
|
||||||
initTinymce() {
|
formatHtml(val) {
|
||||||
if (this.value.includes('wordTableHtml')) {
|
const rawValue = val || ''; // 处理 null
|
||||||
|
const cleanEmptyTags = /<([a-zA-Z1-6]+)\b[^>]*><\/\1>/g;
|
||||||
|
const replaceSpaces = /\s+(?=<)|(?<=>)\s+/g;
|
||||||
|
const removeBr = /<br\s*\/?>/gi; // 移除所有 br 标签
|
||||||
|
|
||||||
|
if (rawValue.includes('wordTableHtml')) {
|
||||||
const parser = new DOMParser();
|
const parser = new DOMParser();
|
||||||
const doc = parser.parseFromString(this.value, 'text/html');
|
const doc = parser.parseFromString(rawValue, 'text/html');
|
||||||
|
|
||||||
// 1. 只针对单元格 (td, th) 进行处理
|
|
||||||
const cells = doc.querySelectorAll('td, th');
|
const cells = doc.querySelectorAll('td, th');
|
||||||
cells.forEach(cell => {
|
|
||||||
let html = cell.innerHTML;
|
|
||||||
// 执行你原来的清理逻辑,但仅限单元格内部
|
|
||||||
html = html.replace(/<([a-zA-Z1-6]+)\b[^>]*><\/\1>/g, '') // 清理空标签
|
|
||||||
.replace(/\s+(?=<)|(?<=>)\s+/g, ' '); // 补全空格
|
|
||||||
cell.innerHTML = html;
|
|
||||||
});
|
|
||||||
|
|
||||||
// 2. 将处理后的完整 HTML 重新赋回,此时 table 外部的换行符保持原样(纯文本)
|
cells.forEach((cell) => {
|
||||||
this.content = doc.body.innerHTML;
|
cell.innerHTML = cell.innerHTML
|
||||||
|
.replace(cleanEmptyTags, '')
|
||||||
|
.replace(removeBr, '') // 针对你“不想要br”的需求
|
||||||
|
.replace(replaceSpaces, ' ');
|
||||||
|
});
|
||||||
|
return doc.body.innerHTML;
|
||||||
} else {
|
} else {
|
||||||
// 非表格模式,维持你原有的全局逻辑
|
return rawValue
|
||||||
this.content = this.value
|
.replace(cleanEmptyTags, '')
|
||||||
.replace(/<([a-zA-Z1-6]+)\b[^>]*><\/\1>/g, '')
|
.replace(removeBr, '')
|
||||||
.replace(/\s+(?=<)|(?<=>)\s+/g, ' ');
|
.replace(replaceSpaces, ' ');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getSafeContent(val) {
|
||||||
|
const rawValue = val || '';
|
||||||
|
const cleanEmptyTags = /<([a-zA-Z1-6]+)\b[^>]*><\/\1>/g;
|
||||||
|
const replaceSpaces = /\s+(?=<)|(?<=>)\s+/g;
|
||||||
|
|
||||||
|
|
||||||
|
const escapeIllegalLT = (str) => {
|
||||||
|
return str.replace(/<(?!(\/?(p|div|span|table|tr|td|th|b|i|strong|em|ul|ol|li|br|img)))/gi, '<');
|
||||||
|
};
|
||||||
|
|
||||||
|
let processedHtml = '';
|
||||||
|
|
||||||
|
if (rawValue.includes('wordTableHtml')) {
|
||||||
|
const parser = new DOMParser();
|
||||||
|
const doc = parser.parseFromString(rawValue, 'text/html');
|
||||||
|
const cells = doc.querySelectorAll('td, th');
|
||||||
|
|
||||||
|
cells.forEach((cell) => {
|
||||||
|
// 1. 先把单元格内的非法 < 转义
|
||||||
|
let cellText = cell.innerHTML;
|
||||||
|
// let cellText = escapeIllegalLT(cell.innerHTML);
|
||||||
|
// 2. 再清理空标签和多余空格
|
||||||
|
cell.innerHTML = cellText
|
||||||
|
.replace(cleanEmptyTags, '')
|
||||||
|
.replace(replaceSpaces, ' ');
|
||||||
|
});
|
||||||
|
processedHtml = doc.body.innerHTML;
|
||||||
|
} else {
|
||||||
|
// 非表格逻辑也同样处理转义
|
||||||
|
// processedHtml = escapeIllegalLT(rawValue)
|
||||||
|
processedHtml = rawValue
|
||||||
|
.replace(cleanEmptyTags, '')
|
||||||
|
.replace(replaceSpaces, ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return processedHtml;
|
||||||
|
},
|
||||||
|
|
||||||
|
initTinymce() {
|
||||||
|
|
||||||
|
|
||||||
let globalImgCounter = 0; // 放在 init 闭包内,确保计数器持续增长
|
|
||||||
let currentPasteBase64Images = [];
|
|
||||||
var _this = this;
|
var _this = this;
|
||||||
window.tinymce.init({
|
window.tinymce.init({
|
||||||
..._this.tinymceOtherInit,
|
..._this.tinymceOtherInit,
|
||||||
@@ -606,11 +660,8 @@ font-weight: bold !important;
|
|||||||
});
|
});
|
||||||
|
|
||||||
ed.on('paste', async (event) => {
|
ed.on('paste', async (event) => {
|
||||||
|
|
||||||
|
|
||||||
const rtf = event.clipboardData.getData('text/rtf');
|
const rtf = event.clipboardData.getData('text/rtf');
|
||||||
if (rtf && rtf.includes('\\pict')) {
|
if (rtf && rtf.includes('\\pict')) {
|
||||||
|
|
||||||
const extracted = extractHexImagesFromRTF(rtf);
|
const extracted = extractHexImagesFromRTF(rtf);
|
||||||
_this.totalUploadImages = extracted.length; // 设置总数
|
_this.totalUploadImages = extracted.length; // 设置总数
|
||||||
_this.uploadedImageCount = 0; // 重置已上传数
|
_this.uploadedImageCount = 0; // 重置已上传数
|
||||||
@@ -630,7 +681,6 @@ font-weight: bold !important;
|
|||||||
return; // 跳过此图片
|
return; // 跳过此图片
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
||||||
const imageBlob = _this.hexToBlob(img.hex, img.mimeType);
|
const imageBlob = _this.hexToBlob(img.hex, img.mimeType);
|
||||||
|
|
||||||
_this.updateUploadProgressNotification(i, 'uploading');
|
_this.updateUploadProgressNotification(i, 'uploading');
|
||||||
@@ -676,36 +726,40 @@ font-weight: bold !important;
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
ed.on('init', function () {
|
ed.on('init', function () {
|
||||||
|
_this.editorInstance = ed;
|
||||||
|
_this.hasInit = true;
|
||||||
_this.$commonJS.inTinymceButtonClass();
|
_this.$commonJS.inTinymceButtonClass();
|
||||||
const editorBody = ed.getBody();
|
if (_this.isAutomaticUpdate) {
|
||||||
|
_this.$emit('updateChange', _this.value);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
_this.content = _this.getSafeContent(_this.value);
|
||||||
|
|
||||||
|
_this.handleSetContent(_this.content || '');
|
||||||
|
|
||||||
|
// 3. 监听内容变化
|
||||||
|
ed.on('NodeChange Change KeyUp SetContent', () => {
|
||||||
|
_this.hasChange = true;
|
||||||
|
_this.$emit('input', ed.getContent({ format: 'raw' }));
|
||||||
|
});
|
||||||
|
|
||||||
|
// 4. 监听 DOM 变化
|
||||||
const observer = new MutationObserver(() => {
|
const observer = new MutationObserver(() => {
|
||||||
const currentContent = ed.getContent({ format: 'raw' });
|
const currentContent = ed.getContent({ format: 'raw' });
|
||||||
|
|
||||||
|
|
||||||
if (_this.isAutomaticUpdate) {
|
if (_this.isAutomaticUpdate) {
|
||||||
_this.$emit('updateChange', currentContent);
|
_this.$emit('updateChange', currentContent);
|
||||||
// _this.$emit('updateChange', _this.$commonJS.decodeHtml(currentContent));
|
|
||||||
//暂时注释掉数字公式
|
|
||||||
// _this.$commonJS.replaceWMathContent(currentContent, (res) => {
|
|
||||||
// console.log('res at line 451:', res);
|
|
||||||
// _this.$emit('updateChange', res);
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 监听子节点和内容的变化
|
observer.observe(ed.getBody(), {
|
||||||
observer.observe(editorBody, { childList: true, subtree: true, characterData: true });
|
childList: true,
|
||||||
|
subtree: true,
|
||||||
|
characterData: true
|
||||||
|
});
|
||||||
});
|
});
|
||||||
// // 定义自定义按钮
|
|
||||||
// ed.ui.registry.addButton('clearButton', {
|
|
||||||
// text: 'Empty',
|
|
||||||
|
|
||||||
// onAction: () => {
|
|
||||||
// // 插入自定义表格到编辑器中
|
|
||||||
// ed.setContent('');
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// 定义自定义按钮
|
// 定义自定义按钮
|
||||||
ed.ui.registry.addButton('customButtonExportWord', {
|
ed.ui.registry.addButton('customButtonExportWord', {
|
||||||
@@ -743,7 +797,6 @@ font-weight: bold !important;
|
|||||||
});
|
});
|
||||||
e.content = e.content.replace(/<strong>/g, '<b>').replace(/<\/strong>/g, '</b>');
|
e.content = e.content.replace(/<strong>/g, '<b>').replace(/<\/strong>/g, '</b>');
|
||||||
e.content = e.content.replace(/<em>/g, '<i>').replace(/<\/em>/g, '</i>');
|
e.content = e.content.replace(/<em>/g, '<i>').replace(/<\/em>/g, '</i>');
|
||||||
|
|
||||||
});
|
});
|
||||||
ed.on('GetContent', function (e) {
|
ed.on('GetContent', function (e) {
|
||||||
e.content = e.content.replace(/<b>/g, '<strong>').replace(/<\/b>/g, '</strong>');
|
e.content = e.content.replace(/<b>/g, '<strong>').replace(/<\/b>/g, '</strong>');
|
||||||
@@ -763,7 +816,6 @@ font-weight: bold !important;
|
|||||||
tempDiv.innerHTML = content;
|
tempDiv.innerHTML = content;
|
||||||
|
|
||||||
if (tempDiv.querySelector('table')) {
|
if (tempDiv.querySelector('table')) {
|
||||||
|
|
||||||
if (_this.type == 'table') {
|
if (_this.type == 'table') {
|
||||||
// 3. 在这里直接消费外部变量 currentPasteBase64Images
|
// 3. 在这里直接消费外部变量 currentPasteBase64Images
|
||||||
// content = content.replace(new RegExp(`src="${silentPlaceholder}"`, 'gi'), () => {
|
// content = content.replace(new RegExp(`src="${silentPlaceholder}"`, 'gi'), () => {
|
||||||
@@ -812,32 +864,21 @@ font-weight: bold !important;
|
|||||||
// _this.$emit('openAddTable', content);
|
// _this.$emit('openAddTable', content);
|
||||||
// return false
|
// return false
|
||||||
// }).catch(() => {
|
// }).catch(() => {
|
||||||
|
|
||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log('Original content:', content); // 输出原始粘贴内容
|
|
||||||
|
|
||||||
// 1. 修改正则:同时匹配 $$...$$ (块级) 和 $...$ (行内)
|
|
||||||
// 注意:先匹配双美元符,再匹配单美元符,防止冲突
|
|
||||||
const mathRegex = /\$\$([\s\S]+?)\$\$|\$([\s\S]+?)\$/g;
|
const mathRegex = /\$\$([\s\S]+?)\$\$|\$([\s\S]+?)\$/g;
|
||||||
|
|
||||||
content = content.replace(mathRegex, function (match, blockFormula, inlineFormula) {
|
content = content.replace(mathRegex, function (match, blockFormula, inlineFormula) {
|
||||||
// 判断是块级还是行内
|
|
||||||
const formula = blockFormula || inlineFormula;
|
const formula = blockFormula || inlineFormula;
|
||||||
const mode = blockFormula ? 'block' : 'inline';
|
const mode = blockFormula ? 'block' : 'inline';
|
||||||
|
|
||||||
console.log(`Matched ${mode} formula:`, formula);
|
console.log(`Matched ${mode} formula:`, formula);
|
||||||
|
|
||||||
// 2. 统一改造:标签内只放纯 formula,不带 $ 符号
|
|
||||||
// 属性中保存 data-latex 和 data-wrap
|
|
||||||
return `<wmath data-wrap="${mode}" data-latex="${formula.trim()}">${formula.trim()}</wmath>`;
|
return `<wmath data-wrap="${mode}" data-latex="${formula.trim()}">${formula.trim()}</wmath>`;
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log('Processed content:', content); // 输出处理后的内容
|
|
||||||
}
|
}
|
||||||
// 更新 args.content 为处理后的内容
|
|
||||||
// 阻止默认的粘贴行为,确保自定义处理优先执行
|
|
||||||
if (args.event) {
|
if (args.event) {
|
||||||
args.event.preventDefault();
|
args.event.preventDefault();
|
||||||
args.event.stopPropagation();
|
args.event.stopPropagation();
|
||||||
@@ -853,43 +894,16 @@ console.log('Processed content:', content); // 输出处理后的内容
|
|||||||
}, 10);
|
}, 10);
|
||||||
},
|
},
|
||||||
clear_custom_action: (editor, vm) => {
|
clear_custom_action: (editor, vm) => {
|
||||||
|
|
||||||
vm.onClear();
|
vm.onClear();
|
||||||
},
|
|
||||||
init_instance_callback: (editor) => {
|
|
||||||
|
|
||||||
|
|
||||||
if (_this.content) {
|
|
||||||
let finalContent = _this.content;
|
|
||||||
|
|
||||||
if (finalContent.includes('wordTableHtml')) {
|
|
||||||
|
|
||||||
editor.setContent(finalContent);
|
|
||||||
} else {
|
|
||||||
|
|
||||||
editor.setContent('<p>' + finalContent + '</p>');
|
|
||||||
}
|
}
|
||||||
|
// init_instance_callback: (editor) => {
|
||||||
|
|
||||||
setTimeout(() => {
|
// }
|
||||||
if (window.renderMathJax) {
|
|
||||||
window.renderMathJax(_this.tinymceId);
|
|
||||||
}
|
|
||||||
}, 10);
|
|
||||||
}
|
|
||||||
_this.hasInit = true;
|
|
||||||
editor.on('NodeChange Change KeyUp SetContent', () => {
|
|
||||||
this.hasChange = true;
|
|
||||||
this.$emit('input', editor.getContent({ format: 'raw' }));
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
if (!window._wmath_listener_registered) {
|
if (!window._wmath_listener_registered) {
|
||||||
// 💾 新增公式插入点记录
|
|
||||||
let latexEditorBookmark = null;
|
let latexEditorBookmark = null;
|
||||||
let activeEditorId = null;
|
let activeEditorId = null;
|
||||||
|
|
||||||
// 👂 message 监听器:处理编辑 + 新增两种情况
|
|
||||||
window.addEventListener('message', function (event) {
|
window.addEventListener('message', function (event) {
|
||||||
const data = event.data;
|
const data = event.data;
|
||||||
|
|
||||||
@@ -901,11 +915,11 @@ console.log('Processed content:', content); // 输出处理后的内容
|
|||||||
const targetEditor = tinymce.get(editorId);
|
const targetEditor = tinymce.get(editorId);
|
||||||
if (!targetEditor) return;
|
if (!targetEditor) return;
|
||||||
|
|
||||||
// 尝试寻找现有标签
|
const targetWmath = wmathId
|
||||||
const targetWmath = wmathId ? targetEditor.dom.select(`wmath[data-id="${wmathId}"]`, targetEditor.getBody())[0] : null;
|
? targetEditor.dom.select(`wmath[data-id="${wmathId}"]`, targetEditor.getBody())[0]
|
||||||
|
: null;
|
||||||
|
|
||||||
if (targetWmath) {
|
if (targetWmath) {
|
||||||
// --- 原有的更新/删除逻辑 ---
|
|
||||||
if (!newLatex) {
|
if (!newLatex) {
|
||||||
targetEditor.dom.remove(targetWmath);
|
targetEditor.dom.remove(targetWmath);
|
||||||
} else {
|
} else {
|
||||||
@@ -918,15 +932,12 @@ console.log('Processed content:', content); // 输出处理后的内容
|
|||||||
targetWmath.innerHTML = newLatex;
|
targetWmath.innerHTML = newLatex;
|
||||||
}
|
}
|
||||||
} else if (newLatex) {
|
} else if (newLatex) {
|
||||||
// --- ✨ 新增逻辑:如果找不到现有标签且有 latex 内容 ---
|
|
||||||
// 生成一个新的唯一 ID (如果你后端或插件没给的话)
|
|
||||||
const newId = wmathId || 'wmath_' + Date.now();
|
const newId = wmathId || 'wmath_' + Date.now();
|
||||||
|
|
||||||
// 构建新的 wmath 标签字符串
|
const htmlToInsert = `<wmath data-id="${newId}" data-latex="${newLatex}" data-wrap="${
|
||||||
// 这里你可以根据之前选的 wrapMode (块级/行内) 来决定样式
|
data.wrapMode === 'inline' ? 'inline' : 'block'
|
||||||
const htmlToInsert = `<wmath data-id="${newId}" data-latex="${newLatex}" data-wrap="${data.wrapMode === 'inline' ? 'inline' : 'block'}">${newLatex}</wmath>`;
|
}">${newLatex}</wmath>`;
|
||||||
|
|
||||||
// 在当前光标位置插入内容
|
|
||||||
targetEditor.insertContent(htmlToInsert);
|
targetEditor.insertContent(htmlToInsert);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -939,10 +950,8 @@ console.log('Processed content:', content); // 输出处理后的内容
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 🚩 标记为已注册,防止重复
|
|
||||||
window._wmath_listener_registered = true;
|
window._wmath_listener_registered = true;
|
||||||
|
|
||||||
// 导出保存位置函数(你可以在按钮点击时调用它)
|
|
||||||
window._recordLatexInsertContext = function (editorInstance) {
|
window._recordLatexInsertContext = function (editorInstance) {
|
||||||
latexEditorBookmark = editorInstance.selection.getBookmark(2);
|
latexEditorBookmark = editorInstance.selection.getBookmark(2);
|
||||||
activeEditorId = editorInstance.id;
|
activeEditorId = editorInstance.id;
|
||||||
@@ -967,11 +976,11 @@ console.log('Processed content:', content); // 输出处理后的内容
|
|||||||
editor.focus(); // 聚焦到编辑器// 触发编辑器内容变化后,如果需要,可能还要设置编辑器的样式
|
editor.focus(); // 聚焦到编辑器// 触发编辑器内容变化后,如果需要,可能还要设置编辑器的样式
|
||||||
},
|
},
|
||||||
//销毁富文本
|
//销毁富文本
|
||||||
destroyTinymce() {this.onClear();
|
destroyTinymce() {
|
||||||
|
this.onClear();
|
||||||
if (window.tinymce.get(this.tinymceId)) {
|
if (window.tinymce.get(this.tinymceId)) {
|
||||||
window.tinymce.get(this.tinymceId).destroy();
|
window.tinymce.get(this.tinymceId).destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
//设置内容
|
//设置内容
|
||||||
setContent(value) {
|
setContent(value) {
|
||||||
@@ -981,7 +990,6 @@ console.log('Processed content:', content); // 输出处理后的内容
|
|||||||
async getContent(type) {
|
async getContent(type) {
|
||||||
var content = window.tinymce.get(this.tinymceId).getContent({ format: 'raw' });
|
var content = window.tinymce.get(this.tinymceId).getContent({ format: 'raw' });
|
||||||
|
|
||||||
|
|
||||||
content = content.replace(/<span[^>]*>/g, '').replace(/<\/span>/g, ''); // 去除span标签
|
content = content.replace(/<span[^>]*>/g, '').replace(/<\/span>/g, ''); // 去除span标签
|
||||||
content = content.replace(/<strong>/g, '<b>').replace(/<\/strong>/g, '</b>');
|
content = content.replace(/<strong>/g, '<b>').replace(/<\/strong>/g, '</b>');
|
||||||
content = content.replace(/<em>/g, '<i>').replace(/<\/em>/g, '</i>');
|
content = content.replace(/<em>/g, '<i>').replace(/<\/em>/g, '</i>');
|
||||||
|
|||||||
@@ -365,6 +365,7 @@
|
|||||||
:id="'editor' + item.am_id"
|
:id="'editor' + item.am_id"
|
||||||
v-html="highlightText({ am_id: item.am_id, text: item.content }, item.checks ? item.checks : [], item.type)"
|
v-html="highlightText({ am_id: item.am_id, text: item.content }, item.checks ? item.checks : [], item.type)"
|
||||||
></div>
|
></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -3021,7 +3022,10 @@ export default {
|
|||||||
text = this.highlightText3(item.text, [], type, item.am_id);
|
text = this.highlightText3(item.text, [], type, item.am_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// const finalHtml = text.replace(/<(?!(\/?(span|p|div|table|tr|td|th|b|i|strong|em|ul|ol|li|br|img|myh3|myfigure|mytable|blue|wmath)))/gi, '<');
|
||||||
|
|
||||||
return text;
|
return text;
|
||||||
|
|
||||||
},
|
},
|
||||||
// 改造版:DOM 安全高亮
|
// 改造版:DOM 安全高亮
|
||||||
// 仅保留 <wmath>…</wmath> 内部,其他用正则匹配高亮
|
// 仅保留 <wmath>…</wmath> 内部,其他用正则匹配高亮
|
||||||
@@ -3303,6 +3307,8 @@ export default {
|
|||||||
html += `<img contenteditable="false" src="${this.imagePath || ''}" alt="" style="width:20px;height:20px;opacity:.6;">`;
|
html += `<img contenteditable="false" src="${this.imagePath || ''}" alt="" style="width:20px;height:20px;opacity:.6;">`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
},
|
},
|
||||||
getProofreadingList(arr) {
|
getProofreadingList(arr) {
|
||||||
|
|||||||
@@ -930,7 +930,7 @@ if(newData.ami_id) {
|
|||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
this.isCollapse = localStorage.getItem('isCollapse') == 'true' ? true : false;
|
this.isCollapse = localStorage.getItem('isCollapse') == 'true' ? true : false;
|
||||||
console.log('localStorage.getItem', typeof localStorage.getItem('isCollapse'));
|
|
||||||
this.isShowEditComment();
|
this.isShowEditComment();
|
||||||
this.isFresh = false;
|
this.isFresh = false;
|
||||||
this.$nextTick(async () => {
|
this.$nextTick(async () => {
|
||||||
|
|||||||
@@ -361,7 +361,7 @@ export default {
|
|||||||
this.add_apply = 0;
|
this.add_apply = 0;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 7||16:
|
case 7:
|
||||||
// 7文章状态不在审稿中
|
// 7文章状态不在审稿中
|
||||||
this.add_apply = 1;
|
this.add_apply = 1;
|
||||||
break;
|
break;
|
||||||
@@ -370,6 +370,7 @@ export default {
|
|||||||
this.add_apply = -1;
|
this.add_apply = -1;
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
|
case 16:
|
||||||
//13 邀请审稿超过5天未同意邀请16同意审稿后14天未进行审稿
|
//13 邀请审稿超过5天未同意邀请16同意审稿后14天未进行审稿
|
||||||
this.add_apply = 2;
|
this.add_apply = 2;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ module.exports = {
|
|||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
// target: 'http://zmzm.tougao.dev.com/',//晓玲本地
|
// target: 'http://zmzm.tougao.dev.com/',//晓玲本地
|
||||||
// target: 'https://submission.tmrjournals.com/',//正式
|
target: 'https://submission.tmrjournals.com/',//正式
|
||||||
target: 'http://tougaotest.tmrjournals.com/public/index.php/',//测试环境
|
// target: 'http://tougaotest.tmrjournals.com/public/index.php/',//测试环境
|
||||||
// target: 'http://mytest.tmrjournals.com/public/index.php/',//新测试环境
|
// target: 'http://mytest.tmrjournals.com/public/index.php/',//新测试环境
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
|
|||||||
Reference in New Issue
Block a user