From 7f80bfc47335355269a12f2a87c957664ecd1f6c Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Mon, 26 Jun 2023 11:52:21 +0800 Subject: [PATCH] fix --- public/styles/css/editor.css | 147 ++- src/components/modules/content.vue | 193 ++-- src/const/modules.js | 5 +- src/mixins/page/index.js | 2 +- src/pages/article/add/editor.js | 80 +- src/pages/article/add/index.vue | 24 +- src/pages/column/add/index.vue | 1395 ++++++++++++------------ src/pages/column/page/iasf.vue | 7 +- src/pages/column/page/lightSources.vue | 2 +- 9 files changed, 1033 insertions(+), 822 deletions(-) diff --git a/public/styles/css/editor.css b/public/styles/css/editor.css index e61a883..edb485a 100644 --- a/public/styles/css/editor.css +++ b/public/styles/css/editor.css @@ -1,83 +1,124 @@ - @font-face { - font-family: SFProDisplay; - src: url('./styles/font/SF-Pro-Display-Regular.otf'); + font-family: SFProDisplay; + src: url('./styles/font/SF-Pro-Display-Regular.otf'); } @font-face { - font-family: ProximaNova; - src: url('./styles/font/ProximaNova-Regular.otf'); + font-family: ProximaNova; + src: url('./styles/font/ProximaNova-Regular.otf'); } -.mce-content-body:not([dir=rtl]) blockquote { - padding: 8px 15px; - border-left: 0; - background-color: #ededed; +.mce-content-body:not([dir='rtl']) blockquote { + padding: 8px 15px; + border-left: 0; + background-color: #ededed; } .mce-content-body p { - margin: 0; + margin: 0; } .tiny-wrap { - /* width: 900px; */ - margin: 0 auto; + /* width: 900px; */ + margin: 0 auto; +} +.tiny-wrap .blue { + color: #1583ff; } .tiny-wrap blockquote p { - margin: 0; - font-style: italic; + margin: 0; + font-style: italic; } .tiny-wrap .block { - margin-bottom: 20px; - overflow: hidden; + margin-bottom: 20px; + overflow: hidden; } .tiny-wrap .block .fl { - float: left; - margin: 0 20px 0 0; + float: left; + margin: 0 20px 0 0; } .tiny-wrap .block .fr { - float: right; - margin: 0 0 0 20px; + float: right; + margin: 0 0 0 20px; } .tiny-wrap .block p { - margin: 0 0 10px; - font-size: 19px; - font-family: SFProDisplay; - font-weight: 400; - color: #101010; - line-height: 32px; -} -.tiny-wrap .en-block p, .tiny-wrap .en-block .img-des { - font-family: ProximaNova; - letter-spacing: -.0135em; - line-height: 1.5em; + margin: 0 0 10px; + font-size: 19px; + font-family: SFProDisplay; + font-weight: 400; + color: #101010; + line-height: 32px; + white-space: pre-wrap; +} +.tiny-wrap .en-block p, +.tiny-wrap .en-block .img-des { + font-family: ProximaNova; + letter-spacing: -0.0135em; + line-height: 1.5em; } .tiny-wrap .block .tiny-title { - margin: 10px 0; - font-size: 24px; - font-family: SFProDisplay; - font-weight: 500; - color: #101010; - line-height: 32px; + margin: 10px 0; + font-size: 24px; + font-family: SFProDisplay; + font-weight: 500; + color: #101010; + line-height: 32px; } .tiny-wrap .quote { - padding: 15px; - margin-bottom: 10px; - font-size: 16px; - font-style: italic; - border: 1px solid #e3e3e3; - background-color: #f1f1f1; + padding: 15px; + margin-bottom: 10px; + font-size: 16px; + font-style: italic; + border: 1px solid #e3e3e3; + background-color: #f1f1f1; } .tiny-wrap .img-wrap { - text-align: center; + text-align: center; } .tiny-wrap .img-wrap img { - max-width: 600px; - max-height: 600px; + max-width: 600px; + max-height: 600px; } .tiny-wrap .block .img-des { - margin: 10px 0 0; - font-size: 14px; - color: #8d8d8d; - text-align: center; + margin: 10px 0 0; + font-size: 14px; + color: #8d8d8d; + text-align: center; } .tiny-wrap .block .pic { - width: 300px; - height: 190px; -} \ No newline at end of file + width: 300px; + height: 190px; +} +.tiny-wrap .people { + display: flex; + align-items: center; + margin-bottom: 30px; +} +.tiny-wrap .people .pic { + max-width: 400px; + margin-right: 50px; +} +.tiny-wrap .people h6 { + font-size: 24px; + font-family: PingFangSC-Medium, PingFang SC; + font-weight: 500; + color: #333333; +} +.tiny-wrap .people h6 { + margin-top: 20px; + font-size: 18px; + color: #333; + line-height: 35px; +} +.tiny-wrap .p-title { + display: flex; + align-items: center; + margin: 0 0 10px; + font-size: 22px; + font-weight: 400; + color: #333; +} +.tiny-wrap .p-title:before { + content: ''; + width: 5px; + height: 19px; + margin-right: 8px; + background: #1583ff; + border-radius: 4px; +} diff --git a/src/components/modules/content.vue b/src/components/modules/content.vue index 4be4910..cf528e7 100644 --- a/src/components/modules/content.vue +++ b/src/components/modules/content.vue @@ -1,74 +1,115 @@ @@ -78,18 +119,22 @@ import Link from '@/components/modules/link' import Setting from '@/setting' import Util from '@/libs/util' import Cropper from '@/components/img-upload/Cropper' +import Editor from '@tinymce/tinymce-vue' +import editorConfig from '@/components/editor' import Axios from 'axios' export default { props: ['data', 'visible'], components: { Link, - Cropper + Cropper, + Editor, }, - data() { + data () { return { headers: { token: Util.local.get(Setting.tokenKey) }, + editorConfig, rules: {}, linkVisible: false, linkForm: {}, @@ -104,17 +149,17 @@ export default { }; }, watch: { - visible(open) { + visible (open) { // 每次打开的时候处理参数 open && this.handleForm() } }, - mounted() { + mounted () { this.handleForm() }, methods: { // 处理form表单参数 - handleForm() { + handleForm () { const { forms, type } = this.data // 这两张类型的模块才需要处理参数 if (type === 'form' || type === 'introduce') { @@ -139,17 +184,17 @@ export default { }) } }, - close() { + close () { this.$emit('update:visible', false) }, // 图片裁剪上传事件 - customUpload(data) { + customUpload (data) { const formData = new FormData() formData.append('file', data, this.file.name) this.imgUpload(formData) }, // 压缩图片 - compress(img) { + compress (img) { const canvas = document.createElement('canvas') const ctx = canvas.getContext('2d') // let initSize = img.src.length; @@ -166,7 +211,7 @@ export default { return ndata }, // base64转成bolb对象 - dataURItoBlob(base64Data) { + dataURItoBlob (base64Data) { let byteString if (base64Data.split(',')[0].indexOf('base64') >= 0) { byteString = atob(base64Data.split(',')[1]) @@ -186,7 +231,7 @@ export default { }) }, // 图片上传到服务器 - imgUpload(formData) { + imgUpload (formData) { this.isUpload = true Axios({ method: 'post', @@ -198,13 +243,13 @@ export default { }, }).then(({ data }) => { this.$set(this.curForm, 'pic', data.url) - }).catch(res => {}) + }).catch(res => { }) this.$refs.cropper.isDisabled = false this.isUpload = false this.cropperModel = false }, // 图片改变钩子 - changeFile(file, form) { + changeFile (file, form) { const { size, name } = file const ext = name.substring(name.lastIndexOf('.') + 1) if (!Util.isImg(ext)) { @@ -226,17 +271,17 @@ export default { }) }, // 上传成功 - uploadSuccess(res, row) { + uploadSuccess (res, row) { this.$set(row, 'pic', res.url) }, // 展示链接设置 - toLink(row, i = 0) { + toLink (row, i = 0) { this.linkVisible = true this.curIndex = i this.linkForm = row.link }, // 链接设置提交 - linkSubmit() { + linkSubmit () { const el = this.$refs.link const data = this.data.form ? this.data.form.link : this.data.list[this.curIndex].link let name @@ -267,7 +312,7 @@ export default { this.linkVisible = false }, // 模块设置提交 - contentSubmit() { + contentSubmit () { this.$emit('contentSubmit') }, } @@ -275,11 +320,11 @@ export default { \ No newline at end of file diff --git a/src/const/modules.js b/src/const/modules.js index c4e7fa3..0f97301 100644 --- a/src/const/modules.js +++ b/src/const/modules.js @@ -6706,7 +6706,7 @@ export default { required: true }, { - type: 'textarea', + type: 'editor', prop: 'des', label: '描述' } @@ -9015,6 +9015,7 @@ export default { stations: '', status: '', time: '', + status: '', } ] }, @@ -9647,7 +9648,7 @@ export default { } }, { - type: 'introduce', + type: 'form', forms: [ { type: 'upload', diff --git a/src/mixins/page/index.js b/src/mixins/page/index.js index c9feb7f..a260856 100644 --- a/src/mixins/page/index.js +++ b/src/mixins/page/index.js @@ -78,7 +78,7 @@ export default { e.originForm = modules[i].originForm } }) - // this.modules = list + this.modules = list console.log("🚀 ~ file: index.js:85 ~ this.$post ~ list:", list) } }).catch(err => {}) diff --git a/src/pages/article/add/editor.js b/src/pages/article/add/editor.js index 4c52572..146d881 100644 --- a/src/pages/article/add/editor.js +++ b/src/pages/article/add/editor.js @@ -179,7 +179,8 @@ export default { branding: false, width: 940, height: 650, //编辑器高度 - min_height: 400, + // min_height: 400, + max_height: 650, content_css: [ //可设置编辑区内容展示的css,谨慎使用 './styles/css/editor.css', ], @@ -297,6 +298,83 @@ export default { ` + }, + { title: '人物详情', description: '', content: ` +
+
+ +
+
谢明远 XIE Mingyuan
+
+

同步辐射光源工程经理部 生物医药组 副研究员

+

负责深圳产业光源生物安全防护晶体学与成像实验站建设

+

深圳市海外高层次人才孔雀计划C类

+
+
+
+ +
+
基本简介
+
+

职称:副教授

+

学位:博士

+

毕业学校:美国马里兰大学帕克分校

+

电子邮件:xiemy@mail.iasf.ac.cn

+
+
+ +
+
学术经历
+
+

2014年 毕业于中山大学获理学博士学位。

+

2014-2015年 香港理工大学从事博士后研究工作;

+

2015-2016年 北京理工大学珠海学院信息学院任讲师,主要从事高功率单模光纤激光器、大芯径高功率多模光纤激光器以及基于光纤的系统的研发工作。

+

2016-2019 于中山大学物理学院任副研究员,主要开展藻类捕光蛋白结构和功能研究。

+

2019-2021 获得广东省青年优秀人才海外派出计划资助,赴德国电子同步加速器实验室DESY任访问学者,共同搭建世界上首台基于光学参量放大过程的波形相干合成光源;

+

2021年至今 深圳综合粒子设施研究院同步辐射光源经理部生物医药组任副研究员,负责深圳产业光源生物安全防护晶体学与成像实验站建设。

+
+
+ +
+
学科方向
+
+

所在学科:材料物理

+

研究方向:分子模拟,计算材料学,统计力学

+

研究兴趣:软物质及复杂流体界面的分子模拟,熔盐传蓄热材料热物性的计算模拟

+
+
+ +
+
学术业绩
+
+

长期从事材料界面、软物质和能源材料的分子模拟工作,迄今为止以第一作者或通讯作者发表论文16篇。

+

主持科研项目

+

国家自然科学基金青年项目(2019-2021):超级电容器双电层结构的多尺度模拟研究(11804400)

+

国家自然科学基金面上项目(2022-2025):接枝表面上液体输运性质的多尺度模拟(12174457)

+
+
+ +
+
荣誉获奖
+
+

“百千万”人才工程、国家杰出青年科学基金项目、青年千人计划、中国科学院百人计划、珠江人才青年拔尖人才、深圳市高层次人

+
+
+ +
+
代表论著
+
+

1) F. Liang, J. Ding and S. Liu*, Collective Solvation and Transport at Tetrahydrofuran–Silica Interfaces for Separation of Aromatic Compounds: Insight from Molecular Dynamics Simulations, Langmuir, 2021, 37, 2091-2103.

+

2) K. Ren, Y.-P. Wang and S. Liu*, The role of solute polarity on methanol–silica interfacial solvation: a molecular dynamics study, Phys. Chem. Chem. Phys., 2021, 23, 1092-1102.

+

3) Y.-P. Wang, K. Ren and S. Liu*, The joint effect of surface polarity and concentration on the structure and dynamics of acetonitrile solution: a molecular dynamics simulation study, Phys. Chem. Chem. Phys., 2020, 22, 10322-10334.

+

4) K. Ren and S. Liu*, The effect of surface polarity on the structure and collective dynamics of liquid ethanol, Phys. Chem. Chem. Phys., 2020, 22, 1204-1213.

+

5) R. C. Remsing, S. Liu and J. D. Weeks, Long-ranged Contributions to Solvation Free Energies from Theory and Short-ranged Models, Proc. Natl. Acad. Sci. 113, 2819-2826(2016).

+

6) S. Liu, J. Savage and G. A. Voth, Mesoscale Study of Proton Transport in Proton Exchange Membranes: Role of Morphologies. J. Phys. Chem. C., 119, 1753-1762 (2015).

+

7) S. Liu and J. T. Fourkas, Orientational Time Correlati.

+
+
+
+ ` } ], // content_security_policy: "https://cdn.tiny.cloud/1/rnk6zw9v267xqz7pf98twt1vmrvltmd436je7a642pckltda/tinymce/6/tinymce.min.js", diff --git a/src/pages/article/add/index.vue b/src/pages/article/add/index.vue index 533da24..ba1d672 100644 --- a/src/pages/article/add/index.vue +++ b/src/pages/article/add/index.vue @@ -240,7 +240,7 @@ end-placeholder="结束日期"> - -
@@ -335,7 +335,7 @@ -
@@ -372,7 +372,7 @@ @click="setLabel">设置
- - -