diff --git a/src/api/index.js b/src/api/index.js index 0aa32b3..2804b4d 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -56,6 +56,8 @@ export default { savePage: `iasf/sysColumnLongPage/save`, saveRedisPage: `iasf/sysColumnLongPage/saveTheCache`, updatePage: `iasf/sysColumnLongPage/update`, + listOfColumnTemplates: `iasf/template/listOfColumnTemplates`, + theTemplateIdGetsTheStyle: `iasf/template/theTemplateIdGetsTheStyle`, queryClassif: `iasf/content/classification/allTheQuery`, delClassif: `iasf/content/classification/delete`, checkClassif: `iasf/content/classification/checkForHeavy`, diff --git a/src/assets/images/application/1.png b/src/assets/images/application/1.png new file mode 100644 index 0000000..cd92484 Binary files /dev/null and b/src/assets/images/application/1.png differ diff --git a/src/assets/images/application/app1-1.png b/src/assets/images/application/app1-1.png new file mode 100644 index 0000000..a69fbea Binary files /dev/null and b/src/assets/images/application/app1-1.png differ diff --git a/src/assets/images/application/app1.png b/src/assets/images/application/app1.png new file mode 100644 index 0000000..467464a Binary files /dev/null and b/src/assets/images/application/app1.png differ diff --git a/src/assets/images/application/app10-1.png b/src/assets/images/application/app10-1.png new file mode 100644 index 0000000..a69fbea Binary files /dev/null and b/src/assets/images/application/app10-1.png differ diff --git a/src/assets/images/application/app10.png b/src/assets/images/application/app10.png new file mode 100644 index 0000000..2151e0e Binary files /dev/null and b/src/assets/images/application/app10.png differ diff --git a/src/assets/images/application/app2-1.png b/src/assets/images/application/app2-1.png new file mode 100644 index 0000000..f670dc1 Binary files /dev/null and b/src/assets/images/application/app2-1.png differ diff --git a/src/assets/images/application/app2.png b/src/assets/images/application/app2.png new file mode 100644 index 0000000..7cdd9b4 Binary files /dev/null and b/src/assets/images/application/app2.png differ diff --git a/src/assets/images/application/app3-1.png b/src/assets/images/application/app3-1.png new file mode 100644 index 0000000..097b092 Binary files /dev/null and b/src/assets/images/application/app3-1.png differ diff --git a/src/assets/images/application/app3.png b/src/assets/images/application/app3.png new file mode 100644 index 0000000..1a5639b Binary files /dev/null and b/src/assets/images/application/app3.png differ diff --git a/src/assets/images/application/app4-1.png b/src/assets/images/application/app4-1.png new file mode 100644 index 0000000..a9b4ffb Binary files /dev/null and b/src/assets/images/application/app4-1.png differ diff --git a/src/assets/images/application/app4.png b/src/assets/images/application/app4.png new file mode 100644 index 0000000..1a5639b Binary files /dev/null and b/src/assets/images/application/app4.png differ diff --git a/src/assets/images/application/app5-1.png b/src/assets/images/application/app5-1.png new file mode 100644 index 0000000..a661502 Binary files /dev/null and b/src/assets/images/application/app5-1.png differ diff --git a/src/assets/images/application/app5.png b/src/assets/images/application/app5.png new file mode 100644 index 0000000..f6403a3 Binary files /dev/null and b/src/assets/images/application/app5.png differ diff --git a/src/assets/images/application/app6-1.png b/src/assets/images/application/app6-1.png new file mode 100644 index 0000000..5b92f45 Binary files /dev/null and b/src/assets/images/application/app6-1.png differ diff --git a/src/assets/images/application/app6.png b/src/assets/images/application/app6.png new file mode 100644 index 0000000..8177c7f Binary files /dev/null and b/src/assets/images/application/app6.png differ diff --git a/src/assets/images/application/app7-1.png b/src/assets/images/application/app7-1.png new file mode 100644 index 0000000..18b6fd3 Binary files /dev/null and b/src/assets/images/application/app7-1.png differ diff --git a/src/assets/images/application/app7.png b/src/assets/images/application/app7.png new file mode 100644 index 0000000..93607e6 Binary files /dev/null and b/src/assets/images/application/app7.png differ diff --git a/src/assets/images/application/app8-1.png b/src/assets/images/application/app8-1.png new file mode 100644 index 0000000..7213107 Binary files /dev/null and b/src/assets/images/application/app8-1.png differ diff --git a/src/assets/images/application/app8.png b/src/assets/images/application/app8.png new file mode 100644 index 0000000..e861faf Binary files /dev/null and b/src/assets/images/application/app8.png differ diff --git a/src/assets/images/application/app9-1.png b/src/assets/images/application/app9-1.png new file mode 100644 index 0000000..618635e Binary files /dev/null and b/src/assets/images/application/app9-1.png differ diff --git a/src/assets/images/application/app9.png b/src/assets/images/application/app9.png new file mode 100644 index 0000000..3dff9ba Binary files /dev/null and b/src/assets/images/application/app9.png differ diff --git a/src/assets/images/page/application.png b/src/assets/images/page/application.png new file mode 100644 index 0000000..c69169b Binary files /dev/null and b/src/assets/images/page/application.png differ diff --git a/src/assets/images/page/research.png b/src/assets/images/page/research.png new file mode 100644 index 0000000..78d0119 Binary files /dev/null and b/src/assets/images/page/research.png differ diff --git a/src/assets/images/research/1.png b/src/assets/images/research/1.png new file mode 100644 index 0000000..771a638 Binary files /dev/null and b/src/assets/images/research/1.png differ diff --git a/src/assets/images/research/12.png b/src/assets/images/research/12.png new file mode 100644 index 0000000..8f9d90e Binary files /dev/null and b/src/assets/images/research/12.png differ diff --git a/src/assets/images/research/13.png b/src/assets/images/research/13.png new file mode 100644 index 0000000..8f63e62 Binary files /dev/null and b/src/assets/images/research/13.png differ diff --git a/src/assets/images/research/14.png b/src/assets/images/research/14.png new file mode 100644 index 0000000..cef749c Binary files /dev/null and b/src/assets/images/research/14.png differ diff --git a/src/assets/images/research/2.png b/src/assets/images/research/2.png new file mode 100644 index 0000000..6ca51d5 Binary files /dev/null and b/src/assets/images/research/2.png differ diff --git a/src/assets/images/research/3.png b/src/assets/images/research/3.png new file mode 100644 index 0000000..ae47412 Binary files /dev/null and b/src/assets/images/research/3.png differ diff --git a/src/assets/images/research/4.png b/src/assets/images/research/4.png new file mode 100644 index 0000000..c252c7b Binary files /dev/null and b/src/assets/images/research/4.png differ diff --git a/src/assets/images/research/5.png b/src/assets/images/research/5.png new file mode 100644 index 0000000..6a29f4f Binary files /dev/null and b/src/assets/images/research/5.png differ diff --git a/src/assets/images/research/6.png b/src/assets/images/research/6.png new file mode 100644 index 0000000..6278478 Binary files /dev/null and b/src/assets/images/research/6.png differ diff --git a/src/assets/images/research/7.png b/src/assets/images/research/7.png new file mode 100644 index 0000000..9cdd87f Binary files /dev/null and b/src/assets/images/research/7.png differ diff --git a/src/assets/images/research/8.png b/src/assets/images/research/8.png new file mode 100644 index 0000000..8a1943f Binary files /dev/null and b/src/assets/images/research/8.png differ diff --git a/src/assets/images/research/res1-1.png b/src/assets/images/research/res1-1.png new file mode 100644 index 0000000..4db1f75 Binary files /dev/null and b/src/assets/images/research/res1-1.png differ diff --git a/src/assets/images/research/res1.png b/src/assets/images/research/res1.png new file mode 100644 index 0000000..666c9e2 Binary files /dev/null and b/src/assets/images/research/res1.png differ diff --git a/src/assets/images/research/res2-1.png b/src/assets/images/research/res2-1.png new file mode 100644 index 0000000..7d81303 Binary files /dev/null and b/src/assets/images/research/res2-1.png differ diff --git a/src/assets/images/research/res2.png b/src/assets/images/research/res2.png new file mode 100644 index 0000000..44c1683 Binary files /dev/null and b/src/assets/images/research/res2.png differ diff --git a/src/assets/images/research/res3-1.png b/src/assets/images/research/res3-1.png new file mode 100644 index 0000000..411ab93 Binary files /dev/null and b/src/assets/images/research/res3-1.png differ diff --git a/src/assets/images/research/res3.png b/src/assets/images/research/res3.png new file mode 100644 index 0000000..fe7e7c1 Binary files /dev/null and b/src/assets/images/research/res3.png differ diff --git a/src/assets/images/research/res4-1.png b/src/assets/images/research/res4-1.png new file mode 100644 index 0000000..bf37456 Binary files /dev/null and b/src/assets/images/research/res4-1.png differ diff --git a/src/assets/images/research/res4.png b/src/assets/images/research/res4.png new file mode 100644 index 0000000..5558d69 Binary files /dev/null and b/src/assets/images/research/res4.png differ diff --git a/src/assets/images/research/res5-1.png b/src/assets/images/research/res5-1.png new file mode 100644 index 0000000..92cb4d3 Binary files /dev/null and b/src/assets/images/research/res5-1.png differ diff --git a/src/assets/images/research/res5.png b/src/assets/images/research/res5.png new file mode 100644 index 0000000..2c3b9a5 Binary files /dev/null and b/src/assets/images/research/res5.png differ diff --git a/src/components/modules/link.vue b/src/components/modules/link.vue index 11193a7..d9381e4 100644 --- a/src/components/modules/link.vue +++ b/src/components/modules/link.vue @@ -114,13 +114,13 @@ export default { // 每次打开的时候处理参数 if (open) { this.data.connectionType !== 2 && this.getArticle() + this.getOtherColumn() } } }, mounted() { this.getList() this.getSite() - this.getOtherColumn() }, methods: { // 栏目列表 @@ -130,7 +130,7 @@ export default { columnName: '', templateId: '', typeId : '', - isSort: 0 + isSort: 1 }).then(({ data }) => { this.columns = data this.data.connectionType !== 2 && this.getArticle() @@ -152,7 +152,7 @@ export default { getArticle() { // 站内链接/其他站点链接 const id = this.data.connectionType === 1 ? this.data.columnId[this.data.columnId.length - 1] : this.data.otherColumnId[this.data.otherColumnId.length - 1] - this.$post(this.api.queryArticle, { + id && this.$post(this.api.queryArticle, { siteId: this.site.id, columnIds: [id], pageNum: 1, @@ -174,12 +174,13 @@ export default { }, // 获取指定站点的栏目列表 getOtherColumn() { + console.log(55, this.data) this.$post(this.api.listWithTree, { siteId: this.data.site, columnName: '', templateId: '', typeId : '', - isSort: 0 + isSort: 1 }).then(({ data }) => { this.otherColumns = data }).catch(err => {}) diff --git a/src/components/modules/module.vue b/src/components/modules/module.vue index 1ae2135..9521e1a 100644 --- a/src/components/modules/module.vue +++ b/src/components/modules/module.vue @@ -58,7 +58,7 @@ - + diff --git a/src/const/column.js b/src/const/column.js index e433f15..5251fed 100644 --- a/src/const/column.js +++ b/src/const/column.js @@ -99,6 +99,16 @@ export default { id: 7, path: 'newsProcurement', name: 'NEWS&EVENTS-PROCUREMENT' + }, + { + id: 8, + path: 'research', + name: 'RESEARCH' + }, + { + id: 9, + path: 'application', + name: 'APPLICATION' } ], } \ No newline at end of file diff --git a/src/const/modules.js b/src/const/modules.js index c99dba7..ea065ec 100644 --- a/src/const/modules.js +++ b/src/const/modules.js @@ -2526,4 +2526,956 @@ export default { ] }, ], + research: [ + { + type: 'introduce', + forms: [ + { + type: 'upload', + prop: 'pic', + label: '图片', + required: true + }, + { + type: 'input', + prop: 'title', + label: '标题', + required: true + }, + { + type: 'link', + prop: 'link', + label: '链接' + } + ], + form: { + pic: '', + title: '', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + isEnable: 1 + }, + list: [ + { + pic: require('@/assets/images/research/1.png'), + title: 'RESEARCH', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + isEnable: 1 + } + ] + }, + { + type: 'form', + forms: [ + { + type: 'input', + prop: 'title', + label: '标题', + required: true + }, + { + type: 'textarea', + prop: 'des', + label: '概述' + } + ], + form: { + title: 'Research Areas', + des: 'What we can do and beyound' + } + }, + { + type: 'forms', + forms: [ + { + type: 'upload', + prop: 'pic', + label: '图片', + required: true + }, + { + type: 'input', + prop: 'title', + label: '标题', + required: true + }, + { + type: 'link', + prop: 'link', + label: '链接' + }, + { + type: 'textarea', + prop: 'des', + label: '描述' + } + ], + form: { + pic: '', + title: '', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + des: '' + }, + list: [ + { + pic: require('@/assets/images/research/res1.png'), + title: 'Physics', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + des: 'Research Field Description', + }, + { + pic: require('@/assets/images/research/res2.png'), + title: 'Chemistry', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + des: 'Research Field Description', + }, + { + pic: require('@/assets/images/research/res3.png'), + title: 'Biology', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + des: 'Research Field Description', + }, + { + pic: require('@/assets/images/research/res4.png'), + title: 'Advanced Materials ', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + des: 'Research Field Description', + }, + { + pic: require('@/assets/images/research/res5.png'), + title: 'Advanced Manufacturing', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + des: 'Research Field Description', + }, + ] + }, + { + type: 'form', + forms: [ + { + type: 'input', + prop: 'title', + label: '标题', + required: true + }, + { + type: 'textarea', + prop: 'des', + label: '概述' + } + ], + form: { + title: 'R&D Group', + des: 'What makes a ligh chinese bay chaser' + } + }, + { + type: 'forms', + forms: [ + { + type: 'upload', + prop: 'pic', + label: '图片', + required: true + }, + { + type: 'input', + prop: 'title', + label: '标题', + required: true + }, + { + type: 'link', + prop: 'link', + label: '链接' + } + ], + form: { + pic: '', + title: '', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + } + }, + list: [ + { + pic: require('@/assets/images/research/3.png'), + title: 'Accelerator', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + } + }, + { + pic: require('@/assets/images/research/4.png'), + title: 'Physics', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + } + }, + { + pic: require('@/assets/images/research/5.png'), + title: 'Mechanical Engineering', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + } + }, + { + pic: require('@/assets/images/research/6.png'), + title: 'Digital Light-source', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + } + }, + { + pic: require('@/assets/images/research/7.png'), + title: 'Beam Lines', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + } + }, + { + pic: require('@/assets/images/research/8.png'), + title: 'End Stations', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + } + }, + ] + }, + + { + type: 'form', + forms: [ + { + type: 'input', + prop: 'title', + label: '标题', + required: true + }, + { + type: 'textarea', + prop: 'des', + label: '概述' + } + ], + form: { + title: 'Publications', + des: 'What makes a ligh chinese bay chaser' + } + }, + { + type: 'forms', + forms: [ + { + type: 'upload', + prop: 'pic', + label: '图片', + required: true + }, + { + type: 'input', + prop: 'title', + label: '标题', + required: true + }, + { + type: 'link', + prop: 'link', + label: '链接' + }, + { + type: 'textarea', + prop: 'des', + label: '描述' + } + ], + form: { + pic: '', + title: '', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + des: '' + }, + list: [ + { + pic: require('@/assets/images/research/12.png'), + title: '这里是标题一句话标题', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + des: 'Online single-shot characterization of ultrafast pulses from high-gain free-electron lasers, Li Zeng,Chao Feng,Duan Gu,Xiaofan Wang,Kaiqing Zhang,Bo Liu,Zhentang Zhao,Fundamental Research', + }, + { + pic: require('@/assets/images/research/13.png'), + title: '这里是标题一句话标题', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + des: `产生超快水窗波段X射线的ESASE方案模拟 + 涂凌君 ,冯超 ,王晓凡 , 赵振堂 , + 强激光与粒子束, + 2022, 34(3):031019 + `, + }, + { + pic: require('@/assets/images/research/14.png'), + title: '这里是标题一句话标题', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + des: `多层膜元件热应力分析方法、系统和终端设备,申请(专利)号:CN202111530134.0, + 申请日:2021-12-14,申请公布号:CN114239355A,申请人:深圳综合粒子设施研究院,发明人:徐中民 + ` + }, + ] + }, + ], + application: [ + { + type: 'introduce', + forms: [ + { + type: 'upload', + prop: 'pic', + label: '图片', + required: true + }, + { + type: 'input', + prop: 'title', + label: '标题', + required: true + }, + { + type: 'link', + prop: 'link', + label: '链接' + } + ], + form: { + pic: '', + title: '', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + isEnable: 1 + }, + list: [ + { + pic: require('@/assets/images/application/1.png'), + title: 'APPLICATION', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + isEnable: 1 + } + ] + }, + { + type: 'form', + forms: [ + { + type: 'upload', + prop: 'pic', + label: '图片', + required: true + }, + { + type: 'input', + prop: 'title', + label: '标题', + required: true + }, + { + type: 'textarea', + prop: 'subTitle', + label: '小标题' + }, + { + type: 'link', + prop: 'link', + label: '链接' + }, + { + type: 'textarea', + prop: 'des', + label: '描述' + } + ], + form: { + pic: require('@/assets/images/research/2.png'), + title: 'Why IASF?', + subTitle: `IASF started its journey to chase light, + The one that can drive innovation, + push the boundaries forward, and discover the unknown.`, + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + des: `Throughout the world, most of the top science and technology innovation centers are distributed in the bay areas, such as the San Francisco Bay area, the New York Bay area, and the Tokyo Bay area in Japan. And the Guangdong-Hong Kong-Macao IASF` + } + }, + { + type: 'form', + forms: [ + { + type: 'input', + prop: 'title', + label: '标题', + required: true + }, + { + type: 'textarea', + prop: 'des', + label: '概述' + } + ], + form: { + title: 'Applications', + des: 'What makes a ligh chinese bay chaser' + } + }, + { + type: 'forms', + forms: [ + { + type: 'input', + prop: 'title', + label: '标题', + required: true + }, + { + type: 'link', + prop: 'link', + label: '链接' + } + ], + form: { + title: '', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + } + }, + list: [ + { + title: 'Astronomical Science', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + }, + { + title: 'Physics', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + }, + { + title: 'Quantum Materials', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + }, + { + title: 'Energy Catalytic', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + }, + { + title: 'Biomedicine', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + }, + { + title: 'New Energy', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + }, + { + title: 'Cancer Treatment', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + }, + { + title: 'Atomic Science', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + }, + { + title: 'Radioactive Waste Materials', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + }, + { + title: 'High-sensitivity Detection', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + }, + }, + ] + }, + { + type: 'form', + forms: [ + { + type: 'input', + prop: 'title', + label: '标题', + required: true + }, + { + type: 'textarea', + prop: 'des', + label: '概述' + } + ], + form: { + title: 'R&D Group', + des: 'What makes a ligh chinese bay chaser' + } + }, + { + type: 'forms', + forms: [ + { + type: 'upload', + prop: 'pic', + label: '图片', + required: true + }, + { + type: 'input', + prop: 'title', + label: '标题', + required: true + }, + { + type: 'link', + prop: 'link', + label: '链接' + } + ], + form: { + pic: '', + title: '', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + } + }, + list: [ + { + pic: require('@/assets/images/research/3.png'), + title: 'Accelerator', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + } + }, + { + pic: require('@/assets/images/research/4.png'), + title: 'Physics', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + } + }, + { + pic: require('@/assets/images/research/5.png'), + title: 'Mechanical Engineering', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + } + }, + { + pic: require('@/assets/images/research/6.png'), + title: 'Digital Light-source', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + } + }, + { + pic: require('@/assets/images/research/7.png'), + title: 'Beam Lines', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + } + }, + { + pic: require('@/assets/images/research/8.png'), + title: 'End Stations', + link: { + linkName: '无', + connectionType: 1, + columnId: [], + articleId: '', + linkAddress : '', + site: '', + otherColumnId: [], + otherArticleId: '', + isOpen: 1 + } + }, + ] + }, + { + type: 'form', + forms: [ + { + type: 'input', + prop: 'title', + label: '标题', + required: true + }, + { + type: 'textarea', + prop: 'des', + label: '概述' + } + ], + form: { + title: 'Research & Industry News', + des: 'What makes a ligh chinese bay chaser' + } + }, + { + type: 'column', + form: { + site: '', + column: '', + articleNum: '', + columnTitle: 1, + columnTitleCustom: '' + } + }, + ], } \ No newline at end of file diff --git a/src/mixins/page/index.js b/src/mixins/page/index.js index 176a8ee..3a060d6 100644 --- a/src/mixins/page/index.js +++ b/src/mixins/page/index.js @@ -2,6 +2,7 @@ import Module from '@/components/modules/module' import Setting from '@/setting' import Util from '@/libs/util' import ColumnConst from '@/const/column' +import { Loading } from 'element-ui' export default { data() { return { @@ -57,7 +58,8 @@ export default { toSet(i, listIndex) { this.curModule = i this.curData = JSON.parse(JSON.stringify(this.modules[i])) - if (this.curData.type === 'columns') { + const { type } = this.curData + if (type === 'columns' || type === 'forms') { this.curListIndex = listIndex this.curData.form = JSON.parse(JSON.stringify(this.curData.list[listIndex])) } @@ -66,9 +68,10 @@ export default { // 模块设置提交 moduleSubmited() { this.diaVisible = false - if (this.curData.type === 'columns') { + const { type } = this.curData + if (type === 'columns' || type === 'forms') { const { form } = this.curData - form.columnName = form[form.columnTitle === 2 ? 'columnTitleCustom' : 'columnName'] + if (type === 'columns') form.columnName = form[form.columnTitle === 2 ? 'columnTitleCustom' : 'columnName'] this.modules[this.curModule].list[this.curListIndex] = JSON.parse(JSON.stringify(form)) } else { this.modules[this.curModule] = this.curData @@ -92,13 +95,17 @@ export default { }, // 预览 preview() { + const load = Loading.service() this.$post(this.api.saveRedisPage, { columnId: this.columnId, json: this.handleJson() }).then(res => { + load.close() const item = ColumnConst.pageStyle.find(e => e.id == this.listStyleId) - window.open((Setting.isDev ? `http://${location.hostname}:8095` : 'http://192.168.31.136') + `/#/${item ? item.path : 'home'}?id=${this.columnId}&preview=1`) - }).catch(err => {}) + window.open((Setting.isDev ? `http://${location.hostname}:8095` : 'http://192.168.31.136') + `/#/${item ? item.path : 'home'}?id=${this.columnId}&preview=1&siteId=${this.$route.query.siteId}`) + }).catch(err => { + load.close() + }) }, // 保存 save(state) { diff --git a/src/pages/article/add/editor.js b/src/pages/article/add/editor.js index 9f93f09..f28e1b9 100644 --- a/src/pages/article/add/editor.js +++ b/src/pages/article/add/editor.js @@ -344,6 +344,7 @@ export default { // 设置默认字体 ed.target.editorCommands.execCommand("fontName", false, "PingFang SC") ed.target.editorCommands.execCommand("fontSize", false, "19px") + top.document.querySelector('#articleTitle').focus() // 第一个字段聚焦 }) }, } \ No newline at end of file diff --git a/src/pages/article/add/index.vue b/src/pages/article/add/index.vue index 3978cda..0d4d30b 100644 --- a/src/pages/article/add/index.vue +++ b/src/pages/article/add/index.vue @@ -29,6 +29,7 @@ - - + 设置 - - - + + 设置 @@ -275,7 +280,7 @@ @@ -307,7 +312,7 @@ @@ -513,6 +518,7 @@ export default { // 获取详情 getData() { this.$post(`${this.api.findArticle}?id=${this.form.id}`).then(({ data }) => { + data.lableId = data.lableId.split(',').map(e => +e) this.form = data if (data.articleTemplate === 3 && data.connectionType !== 2 && data.linkAddress) this.links = data.linkAddress.split(',').map(e => +e) this.originalName = data.title @@ -544,18 +550,23 @@ export default { this.$set(row, 'edit', 1) }, // 删除所属分类 - delClass(row) { - this.$confirm('确定要删除吗?', '提示', { - type: 'warning' - }).then(() => { - this.$post(`${this.api.delClassif}?id=${row.id}`).then(res => { - util.successMsg('删除成功') - this.getClassification() - }).catch(res => {}) - }).catch(() => {}) + delClass(row, i) { + if (row.id) { + this.$confirm('确定要删除吗?', '提示', { + type: 'warning' + }).then(() => { + this.$post(`${this.api.delClassif}?id=${row.id}`).then(res => { + util.successMsg('删除成功') + this.getClassification() + }).catch(res => {}) + }).catch(() => {}) + } else { + this.classifications.splice(i, 1) + } }, // 提交所属分类 submitClass(row) { + if (!row.classificationName) return util.errorMsg('请输入分类名称') this.$post(`${this.api.checkClassif}?classificationName=${row.classificationName}&siteId=${this.site.id}&classificationId=${row.id}`).then(res => { this.$post(this.api[row.id ? 'updateClassif' : 'saveClassif'], { classificationName: row.classificationName, @@ -594,18 +605,23 @@ export default { this.$set(row, 'edit', 1) }, // 删除标签 - delLabel(row) { - this.$confirm('确定要删除吗?', '提示', { - type: 'warning' - }).then(() => { - this.$post(`${this.api.delLabel}?id=${row.id}`).then(res => { - util.successMsg('删除成功') - this.getLabel() - }).catch(res => {}) - }).catch(() => {}) + delLabel(row, i) { + if (row.id) { + this.$confirm('确定要删除吗?', '提示', { + type: 'warning' + }).then(() => { + this.$post(`${this.api.delLabel}?id=${row.id}`).then(res => { + util.successMsg('删除成功') + this.getLabel() + }).catch(res => {}) + }).catch(() => {}) + } else { + this.labels.splice(i, 1) + } }, // 提交标签 submitLabel(row) { + if (!row.labelName) return util.errorMsg('请输入主题名称') this.$post(`${this.api.checkLabel}?labelName=${row.labelName}&siteId=${this.site.id}&labelId=${row.id}`).then(res => { this.$post(this.api[row.id ? 'updateLabel' : 'saveLabel'], { labelName: row.labelName, @@ -749,16 +765,25 @@ export default { // 附件上传成功 uploadSuccessFile(res) { console.log("🚀 ~ file: index.vue ~ line 739 ~ handleRemove ~ e", res, this.fileList) - this.form.id && this.$post(this.api.saveContentFile, { - contentId: this.form.id, - editorId: this.userId, - founderId: this.userId, - id: '', - fileName: res.original, - filePath: res.url - }).then(res => { - // this.fileList.push() - }).catch(res => {}) + this.form.id ? + this.$post(this.api.saveContentFile, { + contentId: this.form.id, + editorId: this.userId, + founderId: this.userId, + id: '', + fileName: res.original, + filePath: res.url + }).then(({ data }) => { + this.fileList.push({ + name: res.original, + url: res.url, + id: data + }) + }).catch(res => {}) : + this.fileList.push({ + name: res.original, + url: res.url + }) }, // 预览 preview() { @@ -784,7 +809,7 @@ export default { // 提交 submit(isRelease, next) { if (this.submiting) return false - const { form } = this + const form = JSON.parse(JSON.stringify(this.form)) if (!form.title) return util.errorMsg('请填写标题') if (this.nameRepeat) return util.errorMsg('该标题已重复!') if (!form.releaseTime && isRelease) return util.errorMsg('请选择发布日期') @@ -804,6 +829,7 @@ export default { if (bannerImg) fileId.push(bannerImg.substr(bannerImg.lastIndexOf('/') + 1)) if (file) fileId.push(file.substr(file.lastIndexOf('/') + 1)) if (titleImg) fileId.push(titleImg.substr(titleImg.lastIndexOf('/') + 1)) + form.lableId = form.lableId.join(',') // 更新附件的状态为发布 fileId.map(e => { this.$post(this.api.updateFile, { @@ -825,7 +851,18 @@ export default { this.submiting = false }) } else { - this.$post(this.api.saveArticle, form).then(res => { + this.$post(this.api.saveArticle, form).then(({ data }) => { + // 新增文章完后需要把上传的附件添加到文章附件表 + this.fileList.map(e => { + this.$post(this.api.saveContentFile, { + contentId: data, + editorId: this.userId, + founderId: this.userId, + id: '', + fileName: e.name, + filePath: e.url + }).then(res => {}).catch(err => {}) + }) util.successMsg('创建成功') next ? next() : this.$router.back() }).catch(err => { diff --git a/src/pages/article/list/index.vue b/src/pages/article/list/index.vue index d3ecbcb..3636525 100644 --- a/src/pages/article/list/index.vue +++ b/src/pages/article/list/index.vue @@ -194,7 +194,7 @@ export default { columnName: '', templateId: '', typeId : '', - isSort: 0 + isSort: 1 }).then(({ data }) => { this.columns = data this.$nextTick(() => { @@ -278,7 +278,7 @@ export default { }, // 预览 preview(row) { - window.open((Setting.isDev ? `http://${location.hostname}:8095` : 'http://192.168.31.136') + `/#/article?id=` + row.id) + window.open((Setting.isDev ? `http://${location.hostname}:8095` : 'http://192.168.31.136') + `/#/article?id=${row.id}&siteId=${this.$refs.column.getCurrentNode().siteId}`) }, // 编辑 edit(row) { diff --git a/src/pages/column/add/index.vue b/src/pages/column/add/index.vue index a63ed1c..9627f37 100644 --- a/src/pages/column/add/index.vue +++ b/src/pages/column/add/index.vue @@ -22,7 +22,7 @@
- + - + @@ -85,19 +85,19 @@
  • - +
    - {{ item.name }} + {{ item.style }}
- +
    -
  • +
  • - +
    - {{ item.name }} + {{ item.style }}
@@ -233,10 +233,10 @@ export default { site: this.$store.state.content.site, isEdit: this.$route.query.type === 'edit', nameRepeat: false, - listStyle: ColumnConst.listStyle, - detailStyle: ColumnConst.detailStyle, + listStyle: [], + detailStyleId: [], types: ColumnConst.types, - templates: ColumnConst.templates, + templates: [], pageStyle: ColumnConst.pageStyle, sites: [], columns: [], @@ -266,7 +266,7 @@ export default { subtitle: '', templateId: 1, listStyleId: 1, - detailStyle: 1, + detailStyleId: 1, connectionType: 1, linkAddress : '', showWithDetails: 0, @@ -291,7 +291,7 @@ export default { listStyleId: [ { required: true, message: '请选择栏目模板', trigger: 'change' } ], - detailStyle: [ + detailStyleId: [ { required: true, message: '请选择详情样式', trigger: 'change' } ], connectionType: [ @@ -334,6 +334,7 @@ export default { ]) this.getList() this.getSite() + this.getTemplate() }, watch: { // 监听信息是否有更改,有的话页面离开的时候要询问是否要保存 @@ -373,7 +374,7 @@ export default { columnName: '', templateId: '', typeId : '', - isSort: 0 + isSort: 1 }).then(({ data }) => { this.columns = data if (this.isEdit) { @@ -395,9 +396,11 @@ export default { // 文章列表 getArticle() { // 站内链接/其他站点链接 - const id = this.form.connectionType === 1 ? this.links[this.links.length - 1] : this.otherLink[this.otherLink.length - 1] + const inner = this.form.connectionType === 1 + const id = inner ? this.links[this.links.length - 1] : this.otherLink[this.otherLink.length - 1] + this[inner ? 'article' : 'otherArticle'] = '' this.$post(this.api.queryArticle, { - siteId: this.site.id, + siteId: inner ? this.site.id : this.form.siteSelection, columnIds: [id], pageNum: 1, pageSize: 1000, @@ -410,15 +413,16 @@ export default { getData() { this.$post(`${this.api.findColumn}?id=${this.form.id}`).then(({ data }) => { this.form = data + if (data.typeId === 1 || data.typeId === 4) this.getStyle(0) this.originTypeId = data.typeId if (data.typeId === 2) { if (data.linkAddress) { const columnArticle = data.linkAddress.split('-') const column = columnArticle[0].split(',').map(e => +e) - const article = columnArticle[1] || '' // 获取文章id(文章id是附在linkAddress最后面的id) + const article = columnArticle[1] || '' // 获取文章id(文章id是附在linkAddress最后面的-后面的数字) // 获取文章 this.$post(this.api.queryArticle, { - siteId: this.site.id, + siteId: data.connectionType === 1 ? this.site.id : data.siteSelection, columnIds: [column[column.length - 1]], // 截取走最后面的文章id,最后一个id就是栏目id pageNum: 1, pageSize: 1000, @@ -447,6 +451,32 @@ export default { this.getOtherColumn() }).catch(err => {}) }, + // 栏目类型切换回调 + typeChange(val) { + if (val === 1 || val === 4) { + this.form.templateId = 1 + + this.getStyle() + } + }, + // 获取栏目模板 + getTemplate() { + this.$post(this.api.listOfColumnTemplates).then(({ data }) => { + this.templates = data + this.isEdit || this.getStyle() + }).catch(err => {}) + }, + // 根据模板id获取样式 + getStyle(set = 1) { + this.$post(`${this.api.theTemplateIdGetsTheStyle}?templateId=${this.form.templateId}`).then(({ data }) => { + this.listStyle = data.listingTemplateTypes + this.detailStyleId = data.detailsTypeOfTheTemplate + if (set) { + this.form.listStyleId = this.listStyle[0].id + this.form.detailStyleId = this.detailStyleId[0].id + } + }).catch(err => {}) + }, // 获取站点列表 getSite() { this.$post(this.api.site, { @@ -464,7 +494,7 @@ export default { columnName: '', templateId: '', typeId : '', - isSort: 0 + isSort: 1 }).then(({ data }) => { this.otherColumns = data }).catch(err => {}) @@ -714,6 +744,7 @@ $upload-lg-height: 102px; } .styles { display: inline-flex; + flex-wrap: wrap; li { width: 170px; margin-right: 20px; diff --git a/src/pages/column/list/index.vue b/src/pages/column/list/index.vue index a07a520..2e3b0fb 100644 --- a/src/pages/column/list/index.vue +++ b/src/pages/column/list/index.vue @@ -31,13 +31,9 @@ {{ types.find(e => e.id == scope.row.typeId) && types.find(e => e.id == scope.row.typeId).name }} - - - - - + + + @@ -140,10 +136,10 @@ export default { siteId: this.$store.state.content.site.id, siteName: this.$store.state.content.site.siteName, types: ColumnConst.types, - templates: ColumnConst.templates, - listStyle: ColumnConst.listStyle, + templates: [], + listStyle: [], pageStyle: ColumnConst.pageStyle, - detailStyle: ColumnConst.detailStyle, + detailStyle: [], keyword: '', searchTimer: null, list: [], @@ -235,19 +231,32 @@ export default { typeId : '', isSort: 1 }).then(({ data }) => { - this.handleList(data) this.list = data this.listLoading = false }).catch(err => { this.listLoading = false }) }, + // 根据模板id获取样式 + getStyle() { + this.$post(`${this.api.theTemplateIdGetsTheStyle}?templateId=${this.form.templateId}`).then(({ data }) => { + this.listStyle = data.listingTemplateTypes + this.detailStyle = data.detailsTypeOfTheTemplate + }).catch(err => {}) + }, // 递归处理列表 handleList(data) { data.map(e => { // 获取列表/长页样式名称 - const item = this[(e.typeId === 1 || e.typeId === 4) ? 'listStyle' : 'pageStyle'].find(n => n.id == e.listStyleId) - e.listStyleName = item.name || '--' + // const item = this[(e.typeId === 1 || e.typeId === 4) ? 'listStyle' : 'pageStyle'].find(n => n.id == e.listStyleId) + // e.listStyleName = item.name || '--' + this.$set(e, 'templateName', '--') + if (e.typeId === 1 || e.typeId === 4) { + const item = this.templates.find(n => n.id === e.templateId) + if (item) e.templateName = item.templateType + } else if (e.typeId === 3) { + e.templateName = '长页模板' + } this.handleList(e.children) }) }, @@ -283,13 +292,18 @@ export default { }, // 预览 preview(row) { - const item = ColumnConst.pageStyle.find(e => e.id == row.listStyleId) - window.open((Setting.isDev ? `http://${location.hostname}:8095` : 'http://192.168.31.136') + `/#/${item ? item.path : 'home'}?id=${row.id}`) + let path = 'column' + // 常规/子级优先栏目,则跳转到column;长页则跳转到对应的长页模板 + if (row.typeId === 3) { + const item = this.pageStyle.find(e => e.id == row.listStyleId) + if (item) path = item.path + } + window.open((Setting.isDev ? `http://${location.hostname}:8095` : 'http://192.168.31.136') + `/#/${path}?id=${row.id}&siteId=${row.siteId}`) }, // 页面管理 page(row) { - const item = ColumnConst.pageStyle.find(e => e.id == row.listStyleId) - this.$router.push(`${item ? item.path : 'home'}?id=${row.id}&listStyleId=${row.listStyleId}`) + const item = this.pageStyle.find(e => e.id == row.listStyleId) + this.$router.push(`${item ? item.path : 'home'}?id=${row.id}&listStyleId=${row.listStyleId}&siteId=${row.siteId}`) }, // 批量删除 batchDel() { diff --git a/src/pages/column/page/application.vue b/src/pages/column/page/application.vue new file mode 100644 index 0000000..79e92b7 --- /dev/null +++ b/src/pages/column/page/application.vue @@ -0,0 +1,294 @@ + + + + + \ No newline at end of file diff --git a/src/pages/column/page/research.vue b/src/pages/column/page/research.vue new file mode 100644 index 0000000..a348f3d --- /dev/null +++ b/src/pages/column/page/research.vue @@ -0,0 +1,224 @@ + + + + + \ No newline at end of file diff --git a/src/router/modules/column.js b/src/router/modules/column.js index c4e0693..79a7c6b 100644 --- a/src/router/modules/column.js +++ b/src/router/modules/column.js @@ -66,6 +66,18 @@ export default { path: `newsProcurement`, component: () => import('@/pages/column/page/newsProcurement'), meta: { title: 'NEWS&Events-procurement' } + }, + { + name: `${pre}research`, + path: `research`, + component: () => import('@/pages/column/page/research'), + meta: { title: 'RESEARCH' } + }, + { + name: `${pre}application`, + path: `application`, + component: () => import('@/pages/column/page/application'), + meta: { title: 'APPLICATION' } } ] } diff --git a/vue.config.js b/vue.config.js index d9356b3..2aaf54a 100644 --- a/vue.config.js +++ b/vue.config.js @@ -14,6 +14,6 @@ module.exports = { outputDir: Setting.outputDir, assetsDir: Setting.assetsDir, devServer: { - port: 8096 // 固定端口 + port: 8088 // 固定端口 } } \ No newline at end of file