From 3a62f5ba564528f5a223d39552232d939c8ecb17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=8B=E4=BA=8E=E5=88=9D=E8=A7=81?= <752204717@qq.com> Date: Thu, 26 Dec 2024 13:06:15 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/page/articleListEditor_B1.vue | 6 +- src/components/page/comArtHtmlCreatNew.vue | 287 ++++++++++++++++++ src/components/page/components/table/word.vue | 21 +- src/router/index.js | 7 + 4 files changed, 309 insertions(+), 12 deletions(-) create mode 100644 src/components/page/comArtHtmlCreatNew.vue diff --git a/src/components/page/articleListEditor_B1.vue b/src/components/page/articleListEditor_B1.vue index 7f0ddcb..4331ee0 100644 --- a/src/components/page/articleListEditor_B1.vue +++ b/src/components/page/articleListEditor_B1.vue @@ -2058,13 +2058,13 @@ // 6----校对文章 htmlContet() { this.$api - .post('api/Production/getProductionMains', { - p_article_id: this.p_article_id + .post('api/Preaccept/getArticleMains', { + article_id: this.detailMes.article_id }) .then(res => { if (res.code == 0) { this.$router.push({ - path: 'comArtHtmlCreat', + path: 'comArtHtmlCreatNew', query: { id: this.p_article_id } diff --git a/src/components/page/comArtHtmlCreatNew.vue b/src/components/page/comArtHtmlCreatNew.vue new file mode 100644 index 0000000..b24b779 --- /dev/null +++ b/src/components/page/comArtHtmlCreatNew.vue @@ -0,0 +1,287 @@ + + + + + diff --git a/src/components/page/components/table/word.vue b/src/components/page/components/table/word.vue index e368e10..b7796d7 100644 --- a/src/components/page/components/table/word.vue +++ b/src/components/page/components/table/word.vue @@ -123,6 +123,12 @@ export default { id: { type: String }, + readonly: { + type: Boolean, + default() { + return false; + } + }, value: { type: String, default: '' @@ -380,7 +386,8 @@ export default { content_css: 'default', setup(ed) { - ed.on('click', function (e) { + if(!_this.readonly){ +ed.on('click', function (e) { // 判断点击的是否是目标元素 const target = e.target; console.log('target at line 351:', target); @@ -422,7 +429,6 @@ export default { } }); // 监听焦点变化并高亮当前选中的元素 - ed.on('selectionChange', function () { _this.updateCurrentTag(ed); }); @@ -430,8 +436,7 @@ export default { ed.on('mouseup', function () { _this.updateCurrentTag(ed); }); - - ed.on('blur', function () { + ed.on('blur', function () { console.log('_this.lastPTag at line 367:', _this.lastTag); if (_this.lastTag) { _this.lastTag.style.backgroundColor = ''; // 清除之前的高亮 @@ -619,11 +624,6 @@ export default { // 将容器添加到页面中 document.body.appendChild(wordButtonContainer); } - - // 获取 TinyMCE iframe 内部的 document 对象 - - // 监听 TinyMCE iframe 内容区域的滚动事件 - ed.on('mousedown', function (e) { // 检查点击的位置是否是删除按钮或选中的

标签 if (!currentParagraph || (e.target !== wordButtonContainer && !currentParagraph.contains(e.target))) { @@ -633,6 +633,9 @@ export default { } } }); + } + + }, init_instance_callback: (editor) => { diff --git a/src/router/index.js b/src/router/index.js index 999e293..7f4f176 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -173,6 +173,13 @@ export default new Router({ title: 'Artcile Html' } }, + { + path: 'comArtHtmlCreatNew', + component: () => import('../components/page/comArtHtmlCreatNew.vue'), + meta: { + title: 'Artcile Html' + } + }, { path: 'comArtHtmlEdit', component: () => import('../components/page/comArtHtmlEdit.vue'),