tijiao 数字公式不实时渲染

This commit is contained in:
2025-05-20 14:22:56 +08:00
parent c60d06194c
commit b9ddba2488
7 changed files with 47 additions and 14 deletions

BIN
dist.zip

Binary file not shown.

View File

@@ -225,7 +225,7 @@ export default {
callback(str); callback(str);
// 输出结果到控制台 // 输出结果到控制台
console.log('Processed HTML:', str); // console.log('Processed HTML:', str);
} }

View File

@@ -148,6 +148,19 @@
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item label="Figure Title :">
<common-content
:isAutomaticUpdate="true"
:value="picStyle.title"
@getContent="getContent"
@openLatexEditor="openLatexEditor"
v-if="pictVisible"
@updateChange="(res) => updateChange(res, 'imgTitle')"
:height="200"
ref="tinymceChildImgTitle"
style="margin-left: -115px"
></common-content>
</el-form-item>
<el-form-item label="Figure Describe :"> <el-form-item label="Figure Describe :">
<common-content <common-content
:isAutomaticUpdate="true" :isAutomaticUpdate="true"
@@ -761,7 +774,7 @@ export default {
setTimeout(() => { setTimeout(() => {
if (typeof renderMathJax === 'function') { if (typeof renderMathJax === 'function') {
this.window.renderMathJax(editorId); // this.window.renderMathJax(editorId);
} }
}, 10); }, 10);
} }
@@ -1238,7 +1251,7 @@ export default {
}); });
}, },
handleImageAdd(type) { handleImageAdd(type) {
this.picStyle = { note: '', picUrl: '' }; this.picStyle = { note: '', picUrl: '', title: '' };
this.picStyle.visiTitle = 'Add Figure'; this.picStyle.visiTitle = 'Add Figure';
this.pictVisible = true; this.pictVisible = true;
}, },
@@ -1286,6 +1299,8 @@ export default {
var str = this.$commonJS.transformHtmlString(content); var str = this.$commonJS.transformHtmlString(content);
if (type == 'imgNote') { if (type == 'imgNote') {
this.picStyle.note = str; this.picStyle.note = str;
} else if (type == 'imgTitle') {
this.picStyle.title = str;
} else { } else {
this.lineStyle[type] = str; this.lineStyle[type] = str;
} }
@@ -1310,7 +1325,7 @@ export default {
} else { } else {
} }
this.currentContent = { ...data, extension: extension }; this.currentContent = { ...data, extension: extension };
this.picStyle = { ...data, extension: extension, picUrl: data.image.url, note: data.image.note }; this.picStyle = { ...data, extension: extension, picUrl: data.image.url, note: data.image.note, title: data.image.title };
this.picStyle.visiTitle = 'Edit Figure'; this.picStyle.visiTitle = 'Edit Figure';
this.pictVisible = true; this.pictVisible = true;
} else if (data.type == 2) { } else if (data.type == 2) {
@@ -1658,14 +1673,16 @@ export default {
// 确定保存图片 // 确定保存图片
async savePic() { async savePic() {
this.picStyle.picUrl; this.picStyle.picUrl;
var str = this.picStyle.note;
str = await this.$commonJS.decodeHtml(str); var str = this.picStyle.note?await this.$commonJS.decodeHtml(this.picStyle.note):'';
var titleStr = this.picStyle.title?await this.$commonJS.decodeHtml(this.picStyle.title):"";
if (this.picStyle.visiTitle == 'Edit Figure') { if (this.picStyle.visiTitle == 'Edit Figure') {
this.$api this.$api
.post(this.urlList.editImage, { .post(this.urlList.editImage, {
ami_id: this.picStyle.ami_id, ami_id: this.picStyle.ami_id,
url: this.picStyle.picUrl, url: this.picStyle.picUrl,
note: str note: str,
title: titleStr
}) })
.then((res) => { .then((res) => {
if (res.code == 0) { if (res.code == 0) {
@@ -1690,7 +1707,8 @@ export default {
.post(this.urlList.addImage, { .post(this.urlList.addImage, {
article_id: this.articleId, article_id: this.articleId,
url: this.picStyle.picUrl, url: this.picStyle.picUrl,
note: this.picStyle.note note: str,
title: titleStr
}) })
.then((res) => { .then((res) => {
if (res.code == 0) { if (res.code == 0) {

View File

@@ -197,10 +197,19 @@
<span style="font-size: 13px; font-weight: 500; color: #888" <span style="font-size: 13px; font-weight: 500; color: #888"
>{{ $t('paperArticleCount.Periodroll') }} : >{{ $t('paperArticleCount.Periodroll') }} :
</span> </span>
<span style="font-size: 13px; color: #aaa">( {{ scope.row.vol }} )</span> <span style="font-size: 13px; color: #aaa">( {{ scope.row.vol }} )</span>
</span> </span>
</p> </p>
</div> </div>
<p style="margin-top: 10px;">
<span style="font-size: 13px; font-weight: 500; color: #333;margin-right: 10px;">Email sending statistics : </span>
<span style="margin-right: 10px;"
>Success:
<span style="color: rgb(103, 194, 58)"> {{ !scope.row.email_success?0:scope.row.email_success }} </span>
</span>
<span>Fail:<span style="color: #cb160a"> {{ !scope.row.email_fail?0:scope.row.email_fail }} </span></span>
</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('citeList.is_wos')" width="80" align="center"> <el-table-column :label="$t('citeList.is_wos')" width="80" align="center">

View File

@@ -290,7 +290,7 @@
v-if="mains == ''" v-if="mains == ''"
>Create Html Proofread</el-button >Create Html Proofread</el-button
> >
<span style="margin-left: 15px; color: #0b4b6a" v-if="mains != ''">Typesetting completed</span> <span style="margin-left: 15px; color: #0b4b6a" v-if="mains != ''">Typesetting completed1</span>
<template v-if="mains != ''"> <template v-if="mains != ''">
<!-- <el-button <!-- <el-button
v-if="html_type == 2 && tg_article_id != 0" v-if="html_type == 2 && tg_article_id != 0"

View File

@@ -486,10 +486,11 @@ export default {
if (_this.isAutomaticUpdate) { if (_this.isAutomaticUpdate) {
// _this.$emit('updateChange', _this.$commonJS.decodeHtml(currentContent)); // _this.$emit('updateChange', _this.$commonJS.decodeHtml(currentContent));
_this.$commonJS.replaceWMathContent(currentContent, (res) => { //暂时注释掉数字公式
console.log('res at line 451:', res); // _this.$commonJS.replaceWMathContent(currentContent, (res) => {
_this.$emit('updateChange', res); // console.log('res at line 451:', res);
}); // _this.$emit('updateChange', res);
// });
} }
}); });

View File

@@ -195,6 +195,11 @@
> >
<img :src="`${mediaUrl + item.image.url}`" /> <img :src="`${mediaUrl + item.image.url}`" />
<font class="font imageTitle" :style="`width: ${item.width ? `${item.width}px` : '100%'}`">
<span
v-html="item.image.title ? highlightText(item.image.title, item.checks ? item.checks : []) : ''"
></span>
</font>
<font class="font" :style="`width: ${item.width ? `${item.width}px` : '100%'}`"> <font class="font" :style="`width: ${item.width ? `${item.width}px` : '100%'}`">
<span <span
v-html="item.image.note ? highlightText(item.image.note, item.checks ? item.checks : []) : ''" v-html="item.image.note ? highlightText(item.image.note, item.checks ? item.checks : []) : ''"