|
|
@@ -390,10 +390,10 @@
|
|
|
<el-divider class="mt10" />
|
|
|
<span v-html="item.feedBack"></span>
|
|
|
<div>
|
|
|
- <el-button type="text" class="el-icon-edit" @click="handEditFeedback(item)"> 编辑</el-button>
|
|
|
+ <!-- <el-button type="text" class="el-icon-edit" @click="handEditFeedback(item)"> 编辑</el-button>
|
|
|
<el-divider direction="vertical" />
|
|
|
<el-button type="text" class="el-icon-delete" @click="handDelFeedback(item.id)"> 删除</el-button>
|
|
|
- <el-divider direction="vertical" />
|
|
|
+ <el-divider direction="vertical" /> -->
|
|
|
<el-button type="text" class="el-icon-place" @click="handleLocation(item, 13)"> 定位</el-button>
|
|
|
</div>
|
|
|
</li>
|
|
|
@@ -1405,6 +1405,29 @@ export default {
|
|
|
if (this.dialogType === 1) return this.delNote(id);
|
|
|
if (this.dialogType === 2) return this.delFeedback(id);
|
|
|
},
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 为HTML内容中的图片添加最大宽度限制
|
|
|
+ * @param {string} html - HTML字符串
|
|
|
+ * @returns {string} - 处理后的HTML字符串
|
|
|
+ */
|
|
|
+ addImageMaxWidth(html) {
|
|
|
+ if (!html) return html;
|
|
|
+
|
|
|
+ const regex = /<img([^>]*)>/gi;
|
|
|
+ return html.replace(regex, (match, attributes) => {
|
|
|
+ if (attributes.includes('style=')) {
|
|
|
+ return match.replace(/style=["']([^"']*)["']/i, (styleMatch, styleValue) => {
|
|
|
+ if (styleValue.includes('max-width')) {
|
|
|
+ return styleMatch;
|
|
|
+ }
|
|
|
+ return `style="${styleValue}; max-width: 200px;"`;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return `<img${attributes} style="max-width: 200px;">`;
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
/**
|
|
|
* 获取笔记列表
|
|
|
* @param {Object} params - 参数对象
|
|
|
@@ -1424,7 +1447,7 @@ export default {
|
|
|
startIndex: n.startIndex,
|
|
|
endIndex: n.endIndex,
|
|
|
text: n.text,
|
|
|
- note: n.note,
|
|
|
+ note: this.addImageMaxWidth(n.note),
|
|
|
};
|
|
|
this.allNoteList.push(obj);
|
|
|
}
|
|
|
@@ -1604,7 +1627,7 @@ export default {
|
|
|
startIndex: n.startIndex,
|
|
|
endIndex: n.endIndex,
|
|
|
text: n.text,
|
|
|
- feedBack: n.feedBack,
|
|
|
+ feedBack: this.addImageMaxWidth(n.feedBack),
|
|
|
};
|
|
|
this.allFeedbackList.push(obj);
|
|
|
}
|