提交
This commit is contained in:
@@ -232,8 +232,8 @@
|
|||||||
>
|
>
|
||||||
<el-form ref="editMes" :model="commentForm" label-width="115px">
|
<el-form ref="editMes" :model="commentForm" label-width="115px">
|
||||||
<el-form-item label="Select Content:" v-if="commentForm.content">
|
<el-form-item label="Select Content:" v-if="commentForm.content">
|
||||||
<p style="background: #eef0f4; line-height: 20px; padding: 10px; box-sizing: border-box">
|
<p style="background: #eef0f4; line-height: 20px; padding: 10px; box-sizing: border-box" v-html="commentForm.content">
|
||||||
{{ commentForm.content }}
|
|
||||||
</p>
|
</p>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="Word">
|
<el-form-item label="Word">
|
||||||
|
|||||||
@@ -357,7 +357,7 @@ export default {
|
|||||||
statusbar: false, // 关闭底部状态栏
|
statusbar: false, // 关闭底部状态栏
|
||||||
custom_colors: false,
|
custom_colors: false,
|
||||||
color_map: ['0082AA', 'TMR Blue'],
|
color_map: ['0082AA', 'TMR Blue'],
|
||||||
plugins: 'forecolor code paste table image mathType', // 启用 forecolor 和 code 插件
|
plugins: 'forecolor code paste table image mathType searchreplace', // 启用 forecolor 和 code 插件
|
||||||
end_container_on_empty_block: true,
|
end_container_on_empty_block: true,
|
||||||
content_css: 'default', // 加载 TinyMCE 默认样式表
|
content_css: 'default', // 加载 TinyMCE 默认样式表
|
||||||
mathjax: {
|
mathjax: {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
:value="value"
|
:value="value"
|
||||||
:typesettingType="typesettingType"
|
:typesettingType="typesettingType"
|
||||||
class="paste-area text-container"
|
class="paste-area text-container"
|
||||||
:toolbar="['bold italic|customBlue removeBlue|subscript superscript|clearButton']"
|
:toolbar="['bold italic|customBlue removeBlue|subscript superscript|searchreplace|clearButton']"
|
||||||
style="
|
style="
|
||||||
/* white-space: pre-line; */
|
/* white-space: pre-line; */
|
||||||
line-height: 12px;
|
line-height: 12px;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
:value="updatedHtml"
|
:value="updatedHtml"
|
||||||
:typesettingType="typesettingType"
|
:typesettingType="typesettingType"
|
||||||
class="paste-area text-container"
|
class="paste-area text-container"
|
||||||
:toolbar="['bold italic|customBlue removeBlue|subscript superscript|table tabledelete| mathType |clearButton']"
|
:toolbar="['bold italic|customBlue removeBlue|subscript superscript|table tabledelete| searchreplace |clearButton']"
|
||||||
style="
|
style="
|
||||||
/* white-space: pre-line; */
|
/* white-space: pre-line; */
|
||||||
line-height: 12px;
|
line-height: 12px;
|
||||||
|
|||||||
@@ -60,38 +60,46 @@
|
|||||||
</font>
|
</font>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
id="drop-target"
|
id="drop-target"
|
||||||
@dragover="handleDragOver"
|
@dragover="handleDragOver"
|
||||||
@dragenter="handleDragEnter"
|
@dragenter="handleDragEnter"
|
||||||
@dragleave="handleDragLeave"
|
@dragleave="handleDragLeave"
|
||||||
@drop="handleDrop"
|
@drop="handleDrop"
|
||||||
@click="initializeEditor(item.am_id, 'table', item)"
|
@click="initializeEditor(item.am_id, 'table', item)"
|
||||||
class="thumbnailTableBox wordTableHtml table_Box pMain myeditabledivTable drop-target"
|
class="thumbnailTableBox wordTableHtml table_Box pMain myeditabledivTable drop-target"
|
||||||
v-else-if="item.type == 2"
|
v-else-if="item.type == 2"
|
||||||
:main-state="item.state"
|
:main-state="item.state"
|
||||||
:remark="item.checks.length > 0 ? 1 : 0"
|
:remark="item.checks.length > 0 ? 1 : 0"
|
||||||
:contenteditable="!readonly && !isPreview"
|
:contenteditable="!readonly && !isPreview"
|
||||||
:data-id="item.amt_id"
|
:data-id="item.amt_id"
|
||||||
:type="item.type"
|
:type="item.type"
|
||||||
:id="'editor' + item.am_id"
|
:id="'editor' + item.am_id"
|
||||||
:main-id="item.am_id"
|
:main-id="item.am_id"
|
||||||
>
|
>
|
||||||
<font class="font" :style="`width: ${item.width ? `${item.width}px` : '100%'}`">
|
<!-- 标题部分 -->
|
||||||
<span v-html="item.table.title ? item.table.title : ''"></span>
|
<font class="font" :style="`width: ${item.width ? `${item.width}px` : '100%'}`">
|
||||||
</font>
|
<span v-html="highlightText(item.table.title || '', item.checks)"></span>
|
||||||
|
</font>
|
||||||
|
|
||||||
<table border="1" style="width: auto; border-collapse: collapse; text-align: center">
|
<!-- 表格部分 -->
|
||||||
<tr v-for="(row, i) in JSON.parse(item.table.table_data)">
|
<table border="1" style="width: auto; border-collapse: collapse; text-align: center">
|
||||||
<td :colspan="`${cell.colspan || 1}`" :rowspan="`${cell.rowspan || 1}`" v-for="(cell, i1) in row">
|
<tr v-for="(row, i) in JSON.parse(item.table.table_data)" :key="i">
|
||||||
<span v-html="cell.text"></span>
|
<td
|
||||||
</td>
|
v-for="(cell, i1) in row"
|
||||||
</tr>
|
:key="i1"
|
||||||
</table>
|
:colspan="`${cell.colspan || 1}`"
|
||||||
|
:rowspan="`${cell.rowspan || 1}`">
|
||||||
|
<span v-html="highlightText(cell.text || '', item.checks)"></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!-- 备注部分 -->
|
||||||
|
<font class="font" :style="`width: ${item.width ? `${item.width}px` : '100%'}`">
|
||||||
|
<span v-html="highlightText(item.table.note || '', item.checks)"></span>
|
||||||
|
</font>
|
||||||
|
</div>
|
||||||
|
|
||||||
<font class="font" :style="`width: ${item.width ? `${item.width}px` : '100%'}`">
|
|
||||||
<span v-html="item.table.note ? item.table.note : ''"></span
|
|
||||||
></font>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
id="drop-target"
|
id="drop-target"
|
||||||
@@ -716,7 +724,7 @@ export default {
|
|||||||
image_advtab: false, // 禁用图片高级选项卡(防止自动调整大小)
|
image_advtab: false, // 禁用图片高级选项卡(防止自动调整大小)
|
||||||
valid_elements: '*[*]',
|
valid_elements: '*[*]',
|
||||||
|
|
||||||
plugins: 'forecolor code paste table image resize searchreplace dragdrop',
|
plugins: 'forecolor code paste table image resize dragdrop',
|
||||||
|
|
||||||
menubar: false,
|
menubar: false,
|
||||||
toolbar: _this.isEditComment ? ['commentAdd |delete| level1 level2 level3|addRow|Edit'] : ['delete|addRow| Edit'],
|
toolbar: _this.isEditComment ? ['commentAdd |delete| level1 level2 level3|addRow|Edit'] : ['delete|addRow| Edit'],
|
||||||
@@ -775,7 +783,7 @@ export default {
|
|||||||
image_advtab: false, // 禁用图片高级选项卡(防止自动调整大小)
|
image_advtab: false, // 禁用图片高级选项卡(防止自动调整大小)
|
||||||
valid_elements: '*[*]',
|
valid_elements: '*[*]',
|
||||||
|
|
||||||
plugins: 'forecolor code paste table image resize searchreplace',
|
plugins: 'forecolor code paste table image resize ',
|
||||||
content_style: `${tableStyle + this.wordStyle}
|
content_style: `${tableStyle + this.wordStyle}
|
||||||
|
|
||||||
|
|
||||||
@@ -860,7 +868,7 @@ export default {
|
|||||||
table_resize_bars: true,
|
table_resize_bars: true,
|
||||||
valid_elements: '*[*]',
|
valid_elements: '*[*]',
|
||||||
image_advtab: false, // 禁用图片高级选项卡(防止自动调整大小)
|
image_advtab: false, // 禁用图片高级选项卡(防止自动调整大小)
|
||||||
plugins: 'forecolor code paste table image resize searchreplace',
|
plugins: 'forecolor code paste table image resize ',
|
||||||
content_style: `${tableStyle + this.wordStyle}
|
content_style: `${tableStyle + this.wordStyle}
|
||||||
|
|
||||||
`,
|
`,
|
||||||
@@ -1076,29 +1084,28 @@ export default {
|
|||||||
const regExp = new RegExp(placeholder, 'gi');
|
const regExp = new RegExp(placeholder, 'gi');
|
||||||
|
|
||||||
tempText = tempText.replace(regExp, (match) => {
|
tempText = tempText.replace(regExp, (match) => {
|
||||||
// 随机生成浅色透明背景颜色
|
const randomColor = this.getRandomLightColor();
|
||||||
const randomColor = this.getRandomLightColor();
|
return `
|
||||||
|
<span
|
||||||
|
class="remarkbg"
|
||||||
|
style="background-color: ${randomColor};
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
border-left: 2px solid #cd5454;
|
||||||
|
border-right: 2px solid #cd5454;"
|
||||||
|
comment-Id="${annotation.amc_id}"
|
||||||
|
>
|
||||||
|
${annotation.content}
|
||||||
|
<span class="positionRemarkIndex"
|
||||||
|
style="position: absolute; top: -14px; right: -10px; font-size: 0.8em; color: red;">
|
||||||
|
${index + 1}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
`;
|
||||||
|
});
|
||||||
|
|
||||||
let highlightedText = `
|
|
||||||
<span class="remarkbg"
|
|
||||||
ref="remark_${annotation.amc_id}"
|
|
||||||
style="background-color: ${randomColor} !important;
|
|
||||||
position: relative !important;
|
|
||||||
border-left: 2px solid #cd5454 !important;
|
|
||||||
border-right: 2px solid #cd5454 !important;"
|
|
||||||
comment-Id="${annotation.amc_id}"
|
|
||||||
|
|
||||||
>
|
|
||||||
${annotation.content}
|
|
||||||
<span class="positionRemarkIndex"
|
|
||||||
style="position: absolute; top: -14px; right: -10px; font-size: 0.8em; color: red;">
|
|
||||||
${index + 1}
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
`;
|
|
||||||
|
|
||||||
return highlightedText;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 3. 返回处理后的文本
|
// 3. 返回处理后的文本
|
||||||
|
|||||||
Reference in New Issue
Block a user