From 0f24749c84e25cbb031f96dcf39d3df30f93d49a 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, 16 Jan 2025 13:18:31 +0800 Subject: [PATCH 01/34] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/page/articleListEditor_E.vue | 110 ++++++++---------- src/components/page/components/html/index.vue | 39 +------ 2 files changed, 49 insertions(+), 100 deletions(-) diff --git a/src/components/page/articleListEditor_E.vue b/src/components/page/articleListEditor_E.vue index 015142a..67c7839 100644 --- a/src/components/page/articleListEditor_E.vue +++ b/src/components/page/articleListEditor_E.vue @@ -50,14 +50,14 @@

- + @@ -80,15 +80,28 @@

- + @@ -281,12 +294,12 @@ Typesetting completed @@ -1004,24 +1017,14 @@ export default { var htmlContent = ``; htmlContent += this.mains .map((item) => { + //批注 let contentHtml = ''; var isRemark = ``; // 判断是否是图片 if (item.type == 1) { - var extension = item.image.url.split('.').pop().toLowerCase(); - if (extension == 'tif') { - contentHtml = ` -

- - ${item.image.note ? item.image.note : ''} -

- `; - } else if (['jpg', 'jpeg', 'png'].includes(extension)) { - contentHtml = ` + contentHtml = `

@@ -1034,30 +1037,6 @@ export default { }

`; - } else { - contentHtml = ` -

- ${isRemark} - - Figures ( .${item.image.url.split('.').pop().toUpperCase()}) - - - ${ - item.image.note ? item.image.note : '' - } -

- `; - } } else if (item.type == 2) { var tableList = JSON.parse(item.table.table_data); @@ -1090,6 +1069,7 @@ export default { `; } else { + console.log('item at line 1019:', 333333) contentHtml = `

${isRemark}${item.content}

`; } @@ -1099,6 +1079,7 @@ export default { }) .join(''); this.htmlContent = htmlContent; + console.log('this.htmlContent at line 820:', this.htmlContent) }, getMainsInfo2(e) { this.loadHtml = true; @@ -1217,6 +1198,7 @@ export default { background: 'rgba(0, 0, 0, 0.7)' }); await this.creatMains(); + this.html_type=2; await this.getMainsInfo2(); loading.close(); } else { diff --git a/src/components/page/components/html/index.vue b/src/components/page/components/html/index.vue index 77ea5a7..722b0dc 100644 --- a/src/components/page/components/html/index.vue +++ b/src/components/page/components/html/index.vue @@ -764,18 +764,7 @@ export default { // 判断是否是图片 if (item.type == 1) { - var extension = item.image.url.split('.').pop().toLowerCase(); - if (extension == 'tif') { - contentHtml = ` -

- - ${item.image.note ? item.image.note : ''} -

- `; - } else if (['jpg', 'jpeg', 'png'].includes(extension)) { - contentHtml = ` + contentHtml = `

@@ -788,30 +777,6 @@ export default { }

`; - } else { - contentHtml = ` -

- ${isRemark} - - Figures ( .${item.image.url.split('.').pop().toUpperCase()}) - - - ${ - item.image.note ? item.image.note : '' - } -

- `; - } } else if (item.type == 2) { var tableList = JSON.parse(item.table.table_data); @@ -853,6 +818,7 @@ export default { }) .join(''); this.htmlContent = htmlContent; + console.log('this.htmlContent at line 820:', this.htmlContent) }, getMainsInfo2(e) { this.loadHtml = true; @@ -972,6 +938,7 @@ export default { background: 'rgba(0, 0, 0, 0.7)' }); await this.creatMains(); + this.html_type=2; await this.getMainsInfo2(); loading.close(); } else { From ba117ad6181c508abbe76d085b15fc8d61b8574b 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, 16 Jan 2025 14:11:51 +0800 Subject: [PATCH 02/34] =?UTF-8?q?=E6=8F=90=E4=BA=A4=20html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/page/articleListEditor_E.vue | 101 ++++++++++-------- src/components/page/components/html/index.vue | 44 ++++---- 2 files changed, 81 insertions(+), 64 deletions(-) diff --git a/src/components/page/articleListEditor_E.vue b/src/components/page/articleListEditor_E.vue index 67c7839..2fc608a 100644 --- a/src/components/page/articleListEditor_E.vue +++ b/src/components/page/articleListEditor_E.vue @@ -82,26 +82,36 @@ @@ -1017,7 +1027,6 @@ export default { var htmlContent = ``; htmlContent += this.mains .map((item) => { - //批注 let contentHtml = ''; var isRemark = ``; @@ -1026,15 +1035,15 @@ export default { if (item.type == 1) { contentHtml = `

+ item.ami_id + }" main-id="${item.am_id}"> ${isRemark} + item.width ? `${item.width}px` : '100%' + }" /> ${ - item.image.note ? item.image.note : '' - } + item.image.note ? item.image.note : '' + }

`; } else if (item.type == 2) { @@ -1069,7 +1078,7 @@ export default { `; } else { - console.log('item at line 1019:', 333333) + contentHtml = `

${isRemark}${item.content}

`; } @@ -1079,7 +1088,7 @@ export default { }) .join(''); this.htmlContent = htmlContent; - console.log('this.htmlContent at line 820:', this.htmlContent) + }, getMainsInfo2(e) { this.loadHtml = true; @@ -1139,35 +1148,38 @@ export default { async htmlContet(e) { this.articleId = e.article_id; this.tg_article_id = e.tg_article_id; - // this.articleId = '3444'; this.UpHtpFIle.article_id = e.article_id; - this.refersList = await this.getRefersList(); - // this.UpHtpFIle.refers = e.refers this.UpHtpFIle.p_article_id = e.p_article_id; this.UpHtpFIle.doi = e.doi; this.UpHtpFIle.htmlfile = e.file_html; this.UpHtpFIle.title = e.title; this.UpHtpFIle.mains = e.mains; this.UpLoadFile.article_id = e.article_id; - this.html_type = e.html_type; - // this.html_type = 2; - - if (this.html_type == 2) { - if (e.has_html == 1) { - await this.getMainsInfo2(); - - this.HtmlVisible = true; - } else { - this.mains = ''; - this.HtmlVisible = true; - } - } else { - await this.getMainsInfo(e); - this.HtmlVisible = true; - } + await this.$api + .post('api/Publish/getPublishArticleDetail', { + article_id: e.article_id + }) + .then(async (res) => { + if (res.code == 0) { + console.log('res.code at line 1148:', res.code); + this.html_type = res.data.detail.html_type; + if (this.html_type == 2) { + if ( res.data.detail.has_html == 1) { + await this.getMainsInfo2(); + this.HtmlVisible = true; + } else { + this.mains = ''; + this.HtmlVisible = true; + } + } else { + await this.getMainsInfo(e); + this.HtmlVisible = true; + } + } + }); + }, - // 生成html // CreateHtml(){ // const loading = this.$loading({ @@ -1187,6 +1199,7 @@ export default { // this.htmlLayout() // } // }) + // }, // 修改文章html async htmlLayout2(type) { @@ -1198,7 +1211,7 @@ export default { background: 'rgba(0, 0, 0, 0.7)' }); await this.creatMains(); - this.html_type=2; + this.html_type = 2; await this.getMainsInfo2(); loading.close(); } else { diff --git a/src/components/page/components/html/index.vue b/src/components/page/components/html/index.vue index 722b0dc..32e0793 100644 --- a/src/components/page/components/html/index.vue +++ b/src/components/page/components/html/index.vue @@ -876,38 +876,42 @@ export default { }, // 文章html弹出层 async htmlContet(e) { - console.log('e at line 923:', e); this.articleId = e.article_id; this.tg_article_id = e.tg_article_id; - // this.articleId = '3444'; this.UpHtpFIle.article_id = e.article_id; - this.refersList = await this.getRefersList(); - // this.UpHtpFIle.refers = e.refers this.UpHtpFIle.p_article_id = e.p_article_id; this.UpHtpFIle.doi = e.doi; this.UpHtpFIle.htmlfile = e.file_html; this.UpHtpFIle.title = e.title; this.UpHtpFIle.mains = e.mains; this.UpLoadFile.article_id = e.article_id; - this.html_type = e.html_type; - // this.html_type = 2; - - if (this.html_type == 2) { - if (e.has_html == 1) { - await this.getMainsInfo2(); - - this.HtmlVisible = true; - } else { - this.mains = ''; - this.HtmlVisible = true; - } - } else { - await this.getMainsInfo(e); - this.HtmlVisible = true; - } + await this.$api + .post('api/Publish/getPublishArticleDetail', { + article_id: e.article_id + }) + .then(async (res) => { + if (res.code == 0) { + console.log('res.code at line 1148:', res.code); + this.html_type = res.data.detail.html_type; + if (this.html_type == 2) { + if ( res.data.detail.has_html == 1) { + await this.getMainsInfo2(); + this.HtmlVisible = true; + } else { + this.mains = ''; + this.HtmlVisible = true; + } + } else { + await this.getMainsInfo(e); + this.HtmlVisible = true; + } + } + }); + }, + // 生成html // CreateHtml(){ // const loading = this.$loading({ From 1f95c8720cb3e2ee34b6725993fb479339839070 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, 16 Jan 2025 15:30:59 +0800 Subject: [PATCH 03/34] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/page/articleListEditor_E.vue | 2 +- src/components/page/components/html/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/page/articleListEditor_E.vue b/src/components/page/articleListEditor_E.vue index 2fc608a..47feba0 100644 --- a/src/components/page/articleListEditor_E.vue +++ b/src/components/page/articleListEditor_E.vue @@ -1038,7 +1038,7 @@ export default { item.ami_id }" main-id="${item.am_id}"> ${isRemark} - ${ diff --git a/src/components/page/components/html/index.vue b/src/components/page/components/html/index.vue index 32e0793..69080f8 100644 --- a/src/components/page/components/html/index.vue +++ b/src/components/page/components/html/index.vue @@ -769,7 +769,7 @@ export default { item.ami_id }" main-id="${item.am_id}"> ${isRemark} - ${ From ea5e5d2fc4f339a27a336272fb359beead183c65 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, 16 Jan 2025 18:27:54 +0800 Subject: [PATCH 04/34] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/page/articleListEditor_C.vue | 2 +- src/components/page/articleListEditor_E.vue | 1 + src/components/page/components/html/index.vue | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/page/articleListEditor_C.vue b/src/components/page/articleListEditor_C.vue index 6807820..15ca602 100644 --- a/src/components/page/articleListEditor_C.vue +++ b/src/components/page/articleListEditor_C.vue @@ -197,7 +197,7 @@ export default { getDate() {console.log('at line 189:',localStorage.getItem('U_pointJour') ) this.$api .post('api/Article/getJournal', { - // username: this.query.username + username: this.query.username }) .then((res) => { this.jourList = res; diff --git a/src/components/page/articleListEditor_E.vue b/src/components/page/articleListEditor_E.vue index 47feba0..3584907 100644 --- a/src/components/page/articleListEditor_E.vue +++ b/src/components/page/articleListEditor_E.vue @@ -1146,6 +1146,7 @@ export default { }, // 文章html弹出层 async htmlContet(e) { + this.htmlContent='' this.articleId = e.article_id; this.tg_article_id = e.tg_article_id; this.UpHtpFIle.article_id = e.article_id; diff --git a/src/components/page/components/html/index.vue b/src/components/page/components/html/index.vue index 69080f8..39b4f33 100644 --- a/src/components/page/components/html/index.vue +++ b/src/components/page/components/html/index.vue @@ -876,6 +876,7 @@ export default { }, // 文章html弹出层 async htmlContet(e) { + this.htmlContent='' this.articleId = e.article_id; this.tg_article_id = e.tg_article_id; this.UpHtpFIle.article_id = e.article_id; From be0805c45a14b48d6d433f123133dbd4ded825a8 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: Fri, 17 Jan 2025 19:29:43 +0800 Subject: [PATCH 05/34] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/js/commonJS.js | 2 +- src/components/common/Header.vue | 5 + src/components/common/Home.vue | 4 + src/components/common/Sidebar.vue | 4 + src/components/page/GenerateCharts.vue | 37 +- .../page/components/Tinymce/index.vue | 2 +- .../page/components/table/word copy.vue | 875 ++++++++++++ src/components/page/components/table/word.vue | 1177 +++++++++++------ src/router/index.js | 3 +- 9 files changed, 1720 insertions(+), 389 deletions(-) create mode 100644 src/components/page/components/table/word copy.vue diff --git a/src/common/js/commonJS.js b/src/common/js/commonJS.js index 627cd09..727b027 100644 --- a/src/common/js/commonJS.js +++ b/src/common/js/commonJS.js @@ -42,7 +42,7 @@ export default { str = capitalizeFirstLetter(str); // 添加蓝色标签 - const regex = /\[\d+(?:,\d+)*\]/g; + const regex = /\[(\d+(?:–\d+)?(?:,\d+(?:–\d+)?)*)\]/g;; if (regex.test(str)) { str = `${str}`; } diff --git a/src/components/common/Header.vue b/src/components/common/Header.vue index f08432a..b088e1d 100644 --- a/src/components/common/Header.vue +++ b/src/components/common/Header.vue @@ -123,6 +123,10 @@ }; }, created() { + if(this.$route.meta.hideSidebar){ + this.collapse=false + + } this.initORCID(); if (this.user_id == 24) { this.daojishi = '2021.9.3 - 2021.9.30' @@ -272,6 +276,7 @@ }, }, mounted() { + if (document.body.clientWidth < 1000) { this.collapseChage(); } diff --git a/src/components/common/Home.vue b/src/components/common/Home.vue index d48f9ed..368f624 100644 --- a/src/components/common/Home.vue +++ b/src/components/common/Home.vue @@ -34,6 +34,10 @@ export default { vTags }, created() { + if(this.$route.meta.hideSidebar){ + this.collapse=false + + } bus.$on('collapse-content', (msg) => { this.collapse = msg; localStorage.setItem('collapse', this.collapse); diff --git a/src/components/common/Sidebar.vue b/src/components/common/Sidebar.vue index 0eceee8..1685db3 100644 --- a/src/components/common/Sidebar.vue +++ b/src/components/common/Sidebar.vue @@ -636,6 +636,10 @@ export default { } }, created() { + if(this.$route.meta.hideSidebar){ + this.collapse=false + + } localStorage.setItem('collapse', this.collapse); if (this.userrole == 2) { //其余的身份(显示作者) diff --git a/src/components/page/GenerateCharts.vue b/src/components/page/GenerateCharts.vue index 469b66e..e55d230 100644 --- a/src/components/page/GenerateCharts.vue +++ b/src/components/page/GenerateCharts.vue @@ -1,10 +1,10 @@