From 122ca4c6ced029f7f19d132b4608dc13ab8ded65 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Fri, 9 Aug 2024 15:03:00 +0800 Subject: [PATCH] fix --- src/api/index.js | 1 + src/components/modules/content.vue | 1 + src/components/modules/history.vue | 86 ++++-------- src/components/modules/module.vue | 9 +- src/const/modules.js | 6 +- src/libs/util.js | 205 +++++++++++++++-------------- src/mixins/page/index.js | 7 +- src/pages/column/page/iasf.vue | 178 ++++++++++++++++--------- src/pages/column/page/research.vue | 2 +- src/styles/page/page.scss | 5 +- 10 files changed, 270 insertions(+), 230 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index affc7ae..f84a422 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -52,6 +52,7 @@ export default { deleteArticle: `/iasf/sysContent/batchDeletion`, findArticle: `/iasf/sysContent/findById`, queryArticle: `/iasf/sysContent/pagingQuery`, + queryArticlesByColumnType: `/iasf/sysColumn/queryArticlesByColumnType`, articleEnableOrDisable: `/iasf/sysContent/articleEnableOrDisable`, saveArticle: `/iasf/sysContent/save`, updateArticle: `/iasf/sysContent/update`, diff --git a/src/components/modules/content.vue b/src/components/modules/content.vue index 827c5cf..78471cd 100644 --- a/src/components/modules/content.vue +++ b/src/components/modules/content.vue @@ -54,6 +54,7 @@
上传图片
@@ -94,13 +95,14 @@[^>]+<\/p>)|(( )+)/g, '') + const el = document.createElement('div') + el.innerHTML = text + // e.mainBody = e.summary || e[prop].replace(/(
[^>]+<\/p>)|(<\!--[^-->]+-->)|(<[^>]+>)|(( )+)/g , '') + e.mainBody = el.innerText + e.releaseTime = e.releaseTime.split(' ')[0] + }) + return list + }, }; export default util; \ No newline at end of file diff --git a/src/mixins/page/index.js b/src/mixins/page/index.js index 3f09dd2..2ff085d 100644 --- a/src/mixins/page/index.js +++ b/src/mixins/page/index.js @@ -83,7 +83,8 @@ export default { } }) this.originModules = JSON.stringify(this.modules) // 原始json,用以页面离开的时候判断是否需要提示保存 - console.log("🚀 ~ file: index.js:85 ~ this.$post ~ list:", this.modules) + this.getArticles && this.getArticles() + console.log("🚀 ~ file: index.js:85 ~ this.$post ~ list:", this.modules, this.getArticles) } }).catch(err => { }) } else { @@ -184,6 +185,10 @@ export default { leave || this.$router.back() }).catch(err => { }) }, + // 关联栏目专用,获取栏目标题 + getColumnTitle (form) { + return form.columnTitle == 1 ? form.columnName : form.columnTitleCustom + }, // 返回 back () { this.pass = true diff --git a/src/pages/column/page/iasf.vue b/src/pages/column/page/iasf.vue index c1928a9..16f091d 100644 --- a/src/pages/column/page/iasf.vue +++ b/src/pages/column/page/iasf.vue @@ -62,77 +62,70 @@
2022-07-24
+{{ articles1[0].releaseTime }}
2022-07-24
+{{ articles2[0].releaseTime }}
2022-07-24
+{{ articles3[0].releaseTime }}
{{ modules[3].form.des }}
diff --git a/src/styles/page/page.scss b/src/styles/page/page.scss index b5b018c..3f94ee5 100644 --- a/src/styles/page/page.scss +++ b/src/styles/page/page.scss @@ -30,7 +30,7 @@ } } .inner { - width: 1400px; + width: 1200px; margin: 0 auto; &.lg { width: 1505px; @@ -104,6 +104,9 @@ background-color: rgba(0, 0, 0, .7); } } +.des { + @include mul-ellipsis(3); +} /deep/.module { .el-table.module-table td { .cell {