master
yujialong 2 years ago
parent d0bbcda86c
commit 15efbd83c6
  1. 61
      public/editor.css
  2. 23
      src/components/img-upload/Cropper.vue
  3. 32
      src/components/modules/content.vue
  4. 11
      src/components/modules/link.vue
  5. 60
      src/components/modules/module.vue
  6. 4
      src/const/column.js
  7. 43
      src/mixins/page/index.js
  8. 92
      src/pages/article/add/editor.js
  9. 154
      src/pages/article/add/index.vue
  10. 41
      src/pages/article/list/index.vue
  11. 118
      src/pages/column/add/index.vue
  12. 14
      src/pages/column/list/index.vue
  13. 76
      src/pages/column/page/about.vue
  14. 62
      src/pages/column/page/careers.vue
  15. 52
      src/pages/column/page/edu.vue
  16. 19
      src/pages/column/page/home.vue
  17. 65
      src/pages/column/page/news.vue
  18. 13
      src/pages/column/page/newsPress.vue
  19. 3
      src/pages/user/list/index.vue
  20. 2
      src/router/permission.js
  21. 15
      src/styles/common.scss
  22. 7
      src/styles/page/page.scss

@ -0,0 +1,61 @@
.mce-content-body:not([dir=rtl]) blockquote {
padding: 8px 15px;
border-left: 0;
background-color: #ededed;
}
.tiny-wrap {
width: 900px;
margin: 0 auto;
}
.tiny-wrap blockquote p {
margin: 0;
font-style: italic;
}
.tiny-wrap .block {
margin-bottom: 20px;
overflow: hidden;
}
.tiny-wrap .block .fl {
float: left;
margin: 0 20px 0 0;
}
.tiny-wrap .block .fr {
float: right;
margin: 0 0 0 20px;
}
.tiny-wrap .block p {
margin: 0 0 10px;
font-size: 19px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #101010;
line-height: 32px;
}
.tiny-wrap .block .tiny-title {
margin: 10px 0;
font-size: 24px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #101010;
line-height: 32px;
}
.tiny-wrap .quote {
padding: 15px;
font-size: 14px;
font-style: italic;
border: 1px solid #e3e3e3;
background-color: #f1f1f1;
}
.tiny-wrap .img-wrap {
text-align: center;
}
.tiny-wrap .img-wrap img {
max-width: 600px;
max-height: 600px;
}
.tiny-wrap .block .img-des {
margin: 10px 0 0;
font-size: 14px;
color: #8d8d8d;
text-align: center;
}

@ -16,8 +16,8 @@
:auto-crop="option.autoCrop"
:auto-crop-width="option.autoCropWidth"
:auto-crop-height="option.autoCropHeight"
:fixed-box="fixedBox"
:fixed="fixed"
:fixed-box="option.fixedBox"
:fixed="option.fixed"
:fixed-number="fixedNumber"
@realTime="realTime" />
<!-- <vueCropper ref="cropper" :img="option.img" :outputSize="option.size" :outputType="option.outputType"></vueCropper> -->
@ -46,7 +46,7 @@
:loading="isUpload"
:disabled="isDisabled"
@click.prevent="uploadImg('base64')">
{{ '上传' | transLoading(isUpload) }}
上传
</el-button>
</div>
</div>
@ -75,6 +75,11 @@ export default {
default: () => {
return { url: '', size: 10 }
}
},
//
fixedNumber: {
type: Array,
default: [1, 0.26]
}
},
data() {
@ -89,11 +94,11 @@ export default {
original: false, // (:false)
canMoveBox: true, // (:true)
autoCrop: true, // (:false)
// autoCropWidth: 480, // (:80%)
// autoCropHeight: 320, // (:80%)
autoCropWidth: 480, // (:80%)
autoCropHeight: 124, // (:80%)
fixedBox: false, // (:false)
fixed: true, // (:true)
fixedNumber: [1.5, 1], // (:[1:1])
fixedNumber: [1, 0.26], // (:[1:1])
enlarge: 1
},
isDisabled: false
@ -113,9 +118,9 @@ export default {
//
this.$refs.cropper.rotateRight()
},
updateImg() {
this.option.img = this.imgFile.url
this.option.size = this.imgFile.size / 1024 > 200 ? 0.9 : 0.95
updateImg(file) {
this.option.img = file.url
this.option.size = file.size / 1024 > 200 ? 0.9 : 0.95
},
realTime(data) {
//

@ -2,10 +2,10 @@
<!-- 内容 -->
<div>
<el-dialog title="编辑内容" :visible.sync="visible" width="600px" custom-class="module" :close-on-click-modal="false" :before-close="close">
<el-form ref="form" :model="data.form" :rules="rules" label-width="80px">
<el-form ref="form" :model="data.form" :rules="rules" label-width="60px">
<el-form-item v-for="(item, i) in data.forms" :key="i" :prop="item.prop" :label="item.label">
<el-input v-if="item.type === 'input'" v-model="data.form[item.prop]" placeholder="请输入" maxlength="30"></el-input>
<el-input v-if="item.type === 'textarea'" v-model="data.form[item.prop]" type="textarea" placeholder="请输入" maxlength="50"></el-input>
<el-input v-if="item.type === 'textarea'" v-model="data.form[item.prop]" type="textarea" placeholder="请输入" maxlength="300"></el-input>
<el-upload
v-if="item.type === 'upload'"
class="uploader"
@ -107,21 +107,31 @@ export default {
linkSubmit() {
const el = this.$refs.link
const data = this.data.form ? this.data.form.link : this.data.list[this.curIndex].link
const linkEle = data.connectionType === 1 ?
el.$refs.column :
data.connectionType === 3 ?
el.$refs.otherColumn :
null
if (data.connectionType !== 2) {
let name
//
if (data.connectionType === 1) {
if (!data.columnId.length) return Util.errorMsg('请选择站内链接')
//
if (data.articleId) {
const item = el.articles.find(e => e.id == data.articleId)
name = item ? item.title : ''
} else {
name = el.$refs.column.getCheckedNodes()[0].pathLabels.join('/')
}
if (data.connectionType === 3) {
} else if (data.connectionType === 3) { //
if (!data.otherColumnId.length) return Util.errorMsg('请选择栏目')
//
if (data.otherArticleId) {
const item = el.articles.find(e => e.id == data.otherArticleId)
name = item ? item.title : ''
} else {
name = el.$refs.otherColumn.getCheckedNodes()[0].pathLabels.join('/')
}
} else { //
if (!data.linkAddress) return Util.errorMsg('请输入站外链接')
name = data.linkAddress
}
data.linkName = linkEle ? linkEle.getCheckedNodes()[0].pathLabels.join('/') : data.linkAddress
console.log("🚀 ~ file: module.vue ~ line 296 ~ linkSubmit ~ data", this.data)
data.linkName = name
this.linkVisible = false
},
//

@ -1,7 +1,7 @@
<template>
<!-- 设置链接 -->
<div>
<el-dialog title="设置链接地址" :visible.sync="visible" width="500px" :close-on-click-modal="false">
<el-dialog title="设置链接地址" :visible.sync="visible" width="500px" :close-on-click-modal="false" :before-close="close">
<el-form :model="data" class="model" label-width="120px">
<el-form-item prop="connectionType" label="连接类型">
<el-radio-group v-model="data.connectionType">
@ -18,7 +18,6 @@
v-model="data.columnId"
:options="columns"
:props="columnProps"
clearable
@change="columnChange"></el-cascader>
</el-form-item>
<el-form-item label="文章">
@ -40,8 +39,8 @@
></el-input>
</el-form-item>
<template v-if="data.connectionType === 3">
<el-form-item prop="siteSelection" label="站点选择">
<el-select v-model="data.siteSelection">
<el-form-item prop="site" label="站点选择">
<el-select v-model="data.site">
<el-option
v-for="item in sites"
:key="item.id"
@ -56,7 +55,6 @@
v-model="data.otherColumnId"
:options="columns"
:props="columnProps"
clearable
@change="columnChange"></el-cascader>
</el-form-item>
<el-form-item label="文章">
@ -178,6 +176,9 @@ export default {
this.sites = data.records
}).catch(e => {})
},
close() {
this.$emit('update:visible', false)
},
//
linkSubmit() {
this.$emit('linkSubmit')

@ -1,7 +1,7 @@
<template>
<!-- banner -->
<div>
<el-dialog title="Banner模块管理" :visible.sync="visible" width="600px" custom-class="module" :close-on-click-modal="false" :before-close="close">
<el-dialog title="模块管理" :visible.sync="visible" width="700px" custom-class="module" :close-on-click-modal="false" :before-close="close">
<template v-if="data.type === 'banner' || data.type === 'introduce'">
<el-table class="module-table" :data="data.list" header-align="center" row-key="id">
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
@ -41,7 +41,7 @@
</div>
</template>
</el-table-column>
<el-table-column label="操作" width="100">
<el-table-column label="操作" width="100" align="center">
<template slot-scope="scope">
<div class="flex a-center">
<el-switch
@ -58,10 +58,10 @@
<i class="el-icon-circle-plus-outline" @click="addRow"></i>
</div>
</template>
<el-form v-else-if="data.type === 'form'" ref="form" :model="data.form" :rules="rules" label-width="80px">
<el-form v-else-if="data.type === 'form'" ref="form" :model="data.form" :rules="rules" label-width="60px">
<el-form-item v-for="(item, i) in data.forms" :key="i" :prop="item.prop" :label="item.label">
<el-input v-if="item.type === 'input'" v-model="data.form[item.prop]" placeholder="请输入" maxlength="30"></el-input>
<el-input v-if="item.type === 'textarea'" v-model="data.form[item.prop]" type="textarea" placeholder="请输入" maxlength="50"></el-input>
<el-input v-if="item.type === 'textarea'" v-model="data.form[item.prop]" type="textarea" placeholder="请输入" maxlength="300"></el-input>
<el-upload
v-if="item.type === 'upload'"
class="uploader"
@ -102,7 +102,8 @@
v-model="data.form.column"
:options="columns"
:props="columnProps"
clearable></el-cascader>
clearable
@change="columnChange"></el-cascader>
</el-form-item>
<el-form-item label="文章展示数量">
<el-select v-model="data.form.articleNum">
@ -118,7 +119,7 @@
<el-radio v-model="data.form.columnTitle" :label="1">默认读取关联栏目</el-radio>
<div class="radio-wrap">
<el-radio v-model="data.form.columnTitle" :label="2"></el-radio>
<el-input v-model="data.form.columnTitleCustom" size="small" maxlength="10"></el-input>
<el-input v-model="data.form.columnTitleCustom" :disabled="data.form.columnTitle == 1" size="small" maxlength="10"></el-input>
</div>
</el-form-item>
</el-form>
@ -204,9 +205,11 @@ export default {
methods: {
// form
handleForm() {
const { type, forms } = this.data
const { type, forms, form } = this.data
console.log("🚀 ~ file: module.vue ~ line 209 ~ handleForm ~ type", this.data, form)
if (type === 'form') {
forms.map(e => {
//
if (e.required) {
this.rules[e.prop] = [
{
@ -218,6 +221,8 @@ export default {
}
})
}
form && form.site && this.siteChange(form.site)
},
//
siteChange(siteId) {
@ -231,9 +236,17 @@ export default {
this.columns = data
}).catch(err => {})
},
//
columnChange(val) {
this.data.form.columnName = this.$refs.links.getCheckedNodes()[0].label
},
//
addRow() {
if (this.data.type === 'banner') {
this.data.list.push(JSON.parse(JSON.stringify(this.data.originForm)))
} else {
this.editIntro(this.data.originForm, -1)
}
},
close() {
this.$emit('update:visible', false)
@ -270,32 +283,45 @@ export default {
contentSubmit() {
this.contentVisible = false
const { form } = this.data
if (this.curModule === -1) {
this.data.list.push(JSON.parse(JSON.stringify(this.data.form)))
} else {
const list = this.data.list[this.curModule]
for (const i in form) {
this.$set(list, i, form[i])
}
}
this.data.form = JSON.parse(JSON.stringify(this.data.originForm))
console.log("🚀 ~ file: module.vue ~ line 267 ~ contentSubmit ~ list", this.data)
},
//
linkSubmit() {
const el = this.$refs.link
const data = this.data.form ? this.data.form.link : this.data.list[this.curIndex].link
const linkEle = data.connectionType === 1 ?
el.$refs.column :
data.connectionType === 3 ?
el.$refs.otherColumn :
null
if (data.connectionType !== 2) {
let name
//
if (data.connectionType === 1) {
if (!data.columnId.length) return Util.errorMsg('请选择站内链接')
//
if (data.articleId) {
const item = el.articles.find(e => e.id == data.articleId)
name = item ? item.title : ''
} else {
name = el.$refs.column.getCheckedNodes()[0].pathLabels.join('/')
}
if (data.connectionType === 3) {
} else if (data.connectionType === 3) { //
if (!data.otherColumnId.length) return Util.errorMsg('请选择栏目')
//
if (data.otherArticleId) {
const item = el.articles.find(e => e.id == data.otherArticleId)
name = item ? item.title : ''
} else {
name = el.$refs.otherColumn.getCheckedNodes()[0].pathLabels.join('/')
}
} else { //
if (!data.linkAddress) return Util.errorMsg('请输入站外链接')
name = data.linkAddress
}
data.linkName = linkEle ? linkEle.getCheckedNodes()[0].pathLabels.join('/') : data.linkAddress
console.log("🚀 ~ file: module.vue ~ line 296 ~ linkSubmit ~ data", this.data)
data.linkName = name
this.linkVisible = false
},
//

@ -88,12 +88,12 @@ export default {
{
id: 5,
path: 'news',
name: 'NEWS&Events'
name: 'NEWS&EVENTS'
},
{
id: 6,
path: 'newsPress',
name: 'NEWS&Events-press room'
name: 'NEWS&EVENTS-PRESS ROOM'
}
],
}

@ -25,8 +25,9 @@ export default {
methods: {
// 获取详情
getInfo() {
const siteId = this.$store.state.content.site.id
this.modules.map(e => {
const { type, list } = e
const { type, list, form } = e
// 克隆一个原始row,方便添加
if (type === 'banner' || type === 'introduce') {
const data = JSON.parse(JSON.stringify(e.form || e.list[0]))
@ -34,22 +35,14 @@ export default {
if (typeof data[i] === 'string') data[i] = ''
}
e.originForm = data
} else if (type === 'columns') {
if (!list.length) {
// 克隆6个栏目
for (let i = 0; i < 6; i++) {
e.list.push(JSON.parse(JSON.stringify(e.form)))
}
}
}
// 克隆一个空值的form
// if (e.form) {
// const form = JSON.parse(JSON.stringify(e.form))
// for (const i in form) {
// if (typeof e.form[i] !== 'object') form[i] = ''
// }
// e.originForm = form
// }
// 站点id默认设置为当前站点
e.list && e.list.map(e => {
if (e.link && !e.link.site) e.link.site = siteId
if (type === 'columns' && !e.site) e.site = siteId
})
if (form && form.link && !form.link.site) form.link.site = siteId
if (form && type === 'column' && !form.site) form.site = siteId
})
// 查询页面详情
this.$post(`${this.api.findPage}?columnId=${this.columnId}`).then(({ data }) => {
@ -71,14 +64,28 @@ export default {
this.diaVisible = true
},
// 模块设置提交
moduleSubmit() {
moduleSubmited() {
this.diaVisible = false
if (this.curData.type === 'columns') {
this.modules[this.curModule].list[this.curListIndex] = JSON.parse(JSON.stringify(this.curData.form))
const form = this.curData.form
if (form.columnTitle === 2) form.columnName = form.columnTitleCustom
this.modules[this.curModule].list[this.curListIndex] = JSON.parse(JSON.stringify(form))
} else {
this.modules[this.curModule] = this.curData
}
},
// 模块设置提交验证
moduleSubmit() {
const formEle = this.$refs.module.$refs.form
// 有表单的要验证必填,没有的直接关闭弹框
if (formEle) {
formEle.validate((valid) => {
valid && this.moduleSubmited()
})
} else {
this.moduleSubmited()
}
},
// 处理预览和保存的json
handleJson() {
return JSON.stringify(this.modules)

@ -5,38 +5,15 @@ export default {
language:'zh_CN',
plugins: 'print powerpaste preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template advcode codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern help emoticons autosave autoresize formatpainter',
toolbar: 'code undo redo restoredraft | cut copy powerpaste pastetext | forecolor backcolor bold italic underline strikethrough link anchor | alignleft aligncenter alignright alignjustify outdent indent | \
styleselect formatselect fontselect fontsizeselect | bullist numlist | blockquote subscript superscript removeformat | \
styleselect fontselect fontsizeselect | bullist numlist | blockquote subscript superscript removeformat | \
table image media charmap emoticons hr pagebreak insertdatetime print preview | fullscreen | indent2em lineheight formatpainter',
// width: 1000,
height: 650, //编辑器高度
min_height: 400,
// content_css: [ //可设置编辑区内容展示的css,谨慎使用
// '/static/reset.css',
// ],
content_style: `.mce-content-body:not([dir=rtl]) blockquote {
padding: 8px 15px;
border-left: 0;
background-color: #ededed;
}
blockquote p {
margin: 0;
font-style: italic;
}
.block {
margin-bottom: 20px;
overflow: hidden;
}
.block .fl {
float: left;
margin-right: 10px;
}
.block .fr {
float: right;
margin-left: 10px;
}
.block p {
margin: 0 0 10px;
}
`,
content_css: [ //可设置编辑区内容展示的css,谨慎使用
'./editor.css',
],
// content_style: Style,
fontsize_formats: '12px 14px 16px 19px 24px 36px 48px 56px 72px',
font_formats: '微软雅黑=Microsoft YaHei,Helvetica Neue,PingFang SC,sans-serif;苹果苹方=PingFang SC,Microsoft YaHei,sans-serif;宋体=simsun,serif;仿宋体=FangSong,serif;黑体=SimHei,sans-serif;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats;知乎配置=BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;小米配置=Helvetica Neue,Helvetica,Arial,Microsoft Yahei,Hiragino Sans GB,Heiti SC,WenQuanYi Micro Hei,sans-serif',
link_list: [
@ -67,18 +44,67 @@ export default {
//为内容模板插件提供预置模板
templates: [
{ title: '文章模板1', description: '图片文字流', content: `
<div class="tiny-wrap">
<div class="block">
<img align="left" hspace="5" vspace="5" src="https://tse1-mm.cn.bing.net/th/id/OIP-C._S-t6T2kt-j6ydemeoB1wAHaEs?w=301&h=190&c=7&r=0&o=5&pid=1.7"/>
<div class="fl">
<img src="https://tse1-mm.cn.bing.net/th/id/OIP-C._S-t6T2kt-j6ydemeoB1wAHaEs?w=301&h=190&c=7&r=0&o=5&pid=1.7"/>
<p class="img-des">图片描述</p>
</div>
<div class="texts">
<p>S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机S³FEL为科学家和企业用户提供了一种具有超高时间分辨空间分辨和能量分辨的新方法新技术 S³FEL在量子材料能源催化生物医药大气与星际科学原子分子科学等领域的应用研究将为促进我国战略性新兴产业创新发展和关键
<p>S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机S³FEL为科学家和企业用户提供了一种具有超高时间分辨空间分辨和能量分辨的新方法新技术 S³FEL在量子材料能源催化生物医药大气与星际科学原子分子科学等领域的应用研究将为促进我国战略性新兴产业创新发展和关键S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机S³FEL为科学家和企业用户提供了一种具有超高时间分辨空间分辨和能量分辨的新方法新技术 S³FEL在量子材料能源催化生物医药大气与星际科学原子分子科学等领域的应用研究将为促进我国战略性新兴产业创新发展和关键S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机S³FEL为科学家和企业用户提供了一种具有超高时间分辨空间分辨和能量分辨的新方法新技术 S³FEL在量子材料能源催化生物医药大气与星际科学原子分子科学等领域的应用研究将为促进我国战略性新兴产业创新发展和关键S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机S³FEL在量子材料能源催化生物医药大气与星际科学原子分子科学等领域的应用研究将为促进我国战略性新兴产业创新发展和关键S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机
</p>
</div>
</div>
<div class="block">
<img align="right" hspace="5" vspace="5" src="https://tse1-mm.cn.bing.net/th/id/OIP-C._S-t6T2kt-j6ydemeoB1wAHaEs?w=301&h=190&c=7&r=0&o=5&pid=1.7"/>
<div class="fr">
<img src="https://tse1-mm.cn.bing.net/th/id/OIP-C._S-t6T2kt-j6ydemeoB1wAHaEs?w=301&h=190&c=7&r=0&o=5&pid=1.7"/>
<p class="img-des">图片描述</p>
</div>
<div>
<p>集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地</p>
<p>S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度</p>
<p>S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度</p>
</div>
</div>
</div>
`
},
{ title: '新闻模板', description: '', content: `
<div class="tiny-wrap">
<div class="block" style="margin-bottom: 70px;">
<div class="fr">
<img src="https://tse1-mm.cn.bing.net/th/id/OIP-C._S-t6T2kt-j6ydemeoB1wAHaEs?w=301&h=190&c=7&r=0&o=5&pid=1.7"/>
<p class="img-des">图片描述</p>
</div>
<div>
<p>S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度</p>
<div class="quote">
Here is a long quotation here is a long quotation here is a long quotation
here is a long quotation here is a long quotation here is a long quotation
here is a long quotation here is a long quotation here is a long quotation.
</div>
</div>
</div>
<div class="block">
<div class="img-wrap">
<img src="https://tse1-mm.cn.bing.net/th/id/OIP-C._S-t6T2kt-j6ydemeoB1wAHaEs?w=301&h=190&c=7&r=0&o=5&pid=1.7"/>
<p class="img-des">图片描述</p>
</div>
<div class="texts">
<h6 class="tiny-title">小标题</h6>
<p>S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机S³FEL为科学家和企业用户提供了一种具有超高时间分辨空间分辨和能量分辨的新方法新技术 S³FEL在量子材料能源催化生物医药大气与星际科学原子分子科学等领域的应用研究将为促进我国战略性新兴产业创新发展和关键S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机S³FEL为科学家和企业用户提供了一种具有超高时间分辨空间分辨和能量分辨的新方法新技术 S³FEL在量子材料能源催化生物医药大气与星际科学原子分子科学等领域的应用研究将为促进我国战略性新兴产业创新发展和关键
</p>
</div>
</div>
</div>
`
},
{ title: '图片描述', description: '', content: `
<div class="tiny-wrap">
<div class="block">
<div class="img-wrap">
<img src="https://tse1-mm.cn.bing.net/th/id/OIP-C._S-t6T2kt-j6ydemeoB1wAHaEs?w=301&h=190&c=7&r=0&o=5&pid=1.7"/>
<p class="img-des">图片描述</p>
</div>
</div>
</div>
`

@ -4,11 +4,11 @@
<el-form :model="form" :rules="rules" class="input-form model" label-width="140px">
<el-form-item prop="title" label="标题">
<el-input
style="width: 100%"
style="width: 940px"
placeholder="请输入标题"
v-model.trim="form.title"
v-model="form.title"
clearable
maxlength="15"
maxlength="100"
@change="nameChange"
></el-input>
</el-form-item>
@ -55,9 +55,10 @@
</div>
<el-form-item prop="summary" label="摘要">
<el-input
style="width: 100%"
style="width: 940px"
type="textarea"
v-model.trim="form.summary"
:rows="3"
clearable
></el-input>
</el-form-item>
@ -65,16 +66,10 @@
<el-upload
class="avatar-uploader"
accept=".jpg,.png,.jpeg,.gif"
:before-upload="beforeUpload"
:on-error="uploadError"
:on-success="uploadSuccess"
:on-change="file => changeFile(file, 0)"
:show-file-list="false"
:action="this.api.upload"
:data="{
quote: form.title,
site: site.siteName,
uploader: userName
}"
:auto-upload="false"
>
<img v-if="form.titleImg" :src="form.titleImg" class="avatar">
<div class="uploader-default" v-else>
@ -83,20 +78,14 @@
</div>
</el-upload>
</el-form-item>
<el-form-item prop="bannerImg" label="Banner图" style="flex: 1;">
<el-form-item prop="bannerImg" label="Banner图(选填)" style="flex: 1;">
<el-upload
class="avatar-uploader avatar-uploader-lg"
accept=".jpg,.png,.jpeg,.gif"
:before-upload="beforeUpload"
:on-error="uploadError"
:on-success="uploadSuccessBanner"
:on-change="file => changeFile(file, 1)"
:show-file-list="false"
:action="this.api.upload"
:data="{
quote: form.title,
site: site.siteName,
uploader: userName
}"
:auto-upload="false"
>
<img v-if="form.bannerImg" :src="form.bannerImg" class="avatar-lg">
<div class="uploader-default" v-else>
@ -135,10 +124,7 @@
<el-form-item prop="file" label="文件上传">
<el-upload
:on-remove="handleRemove"
:on-error="uploadError"
:on-success="uploadSuccessFile"
:limit="1"
:on-exceed="handleExceed"
:action="this.api.upload"
:file-list="fileList"
:data="{
@ -207,6 +193,16 @@
<el-button @click="submit(0)">保存草稿</el-button>
<el-button @click="$router.back()">取消</el-button>
</div>
<!-- 剪裁组件弹窗 -->
<el-dialog title="图片裁剪" append-to-body :visible.sync="cropperModel" width="1100px" :close-on-click-modal="false">
<Cropper
ref="cropper"
:img-file.sync="file"
:is-upload="isUpload"
:fixed="true"
:fixedNumber.sync="fixedNumber"
@upload="customUpload" />
</el-dialog>
</div>
</template>
<script>
@ -215,6 +211,8 @@ import ColumnConst from '@/const/column'
import { mapState } from 'vuex'
import Editor from '@tinymce/tinymce-vue'
import editorConfig from './editor'
import Cropper from '@/components/img-upload/Cropper'
import Axios from 'axios'
export default {
data() {
return {
@ -274,6 +272,11 @@ export default {
editorConfig,
submiting: false, //
updateTime: 0,
cropperModel: false,
isUpload: false,
fixedNumber: [1.76, 1],
file: {}, //
isBanner: 0
};
},
computed: {
@ -285,7 +288,8 @@ export default {
])
},
components: {
Editor
Editor,
Cropper
},
watch: {
// ,
@ -404,40 +408,98 @@ export default {
this.nameRepeat = false
}
},
//
beforeUpload(file) {
//
customUpload(data) {
const blob = this.dataURItoBlob(data)
const formData = new FormData()
formData.append('file', blob, this.file.name)
formData.append('quote', this.form.title)
formData.append('site', this.site.siteName)
formData.append('uploader', this.userName)
this.imgUpload(formData)
},
//
compress(img) {
const canvas = document.createElement('canvas')
const ctx = canvas.getContext('2d')
// let initSize = img.src.length;
const width = img.width
const height = img.height
canvas.width = width
canvas.height = height
//
ctx.fillStyle = '#fff'
ctx.fillRect(0, 0, canvas.width, canvas.height)
ctx.drawImage(img, 0, 0, width, height)
//
const ndata = canvas.toDataURL('image/jpeg', 0.8)
return ndata
},
// base64bolb
dataURItoBlob(base64Data) {
let byteString
if (base64Data.split(',')[0].indexOf('base64') >= 0) {
byteString = atob(base64Data.split(',')[1])
} else {
byteString = unescape(base64Data.split(',')[1])
}
const mimeString = base64Data
.split(',')[0]
.split(':')[1]
.split(';')[0]
const ia = new Uint8Array(byteString.length)
for (let i = 0; i < byteString.length; i++) {
ia[i] = byteString.charCodeAt(i)
}
return new Blob([ia], {
type: mimeString
})
},
//
imgUpload(formData) {
this.isUpload = true
Axios({
method: 'post',
url: this.api.upload,
data: formData,
headers: {
'Content-Type': 'multipart/form-data'
},
}).then(({ data }) => {
let url = this.form[this.isBanner ? 'bannerImg' : 'titleImg']
url && this.$del(this.api.delFile, [url.split('/').pop()]).then(res => {}).catch(e => {}) //
this.form[this.isBanner ? 'bannerImg' : 'titleImg'] = data.url
}).catch(res => {})
this.$refs.cropper.isDisabled = false
this.isUpload = false
this.cropperModel = false
},
//
changeFile(file, isBanner) {
this.fixedNumber = isBanner ? [1, 0.26] : [1.76, 1]
this.isBanner = isBanner
const { size, name } = file
const ext = name.substring(name.lastIndexOf('.') + 1)
if (!util.isImg(ext)) {
this.$message.error('请上传图片!')
return false
}
if (size / 1024 / 1024 > 1) {
this.$message.error('请上传1M以内的图片!')
if (size / 1024 / 1024 > 5) {
this.$message.error('请上传5M以内的图片!')
return false
}
},
uploadError(err, file, fileList) {
this.$message({
message: "上传出错,请重试!",
type: "error",
center: true
this.file = file
this.cropperModel = true
this.$nextTick(() => {
this.$refs.cropper.updateImg({
url: window.URL.createObjectURL(file.raw),
size: file.size
})
})
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`);
},
handleExceed(files, fileList) {
util.errorMsg(`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`);
},
handleRemove(file, fileList) {
this.form.file = ''
},
uploadSuccess(res) {
let url = this.form.titleImg
url && this.$del(this.api.delFile, [url.split('/').pop()]).then(res => {}).catch(e => {})
this.form.titleImg = res.url
},
uploadSuccessBanner(res) {
let url = this.form.bannerImg
url && this.$del(this.api.delFile, [url.split('/').pop()]).then(res => {}).catch(e => {})

@ -3,7 +3,7 @@
<div style="width: 218px;border-right: 1px solid #EBEDF0">
<p class="page-name mb">全部栏目</p>
<div style="height: 504px;overflow: auto">
<el-tree ref="column" :data="columns" highlight-current :expand-on-click-node="false" default-expand-all :props="defaultProps" node-key="id" @node-click="getData"></el-tree>
<el-tree ref="column" :data="columns" highlight-current :expand-on-click-node="false" default-expand-all :props="defaultProps" node-key="id" @node-click="initData"></el-tree>
</div>
</div>
<div class="p-l-20" style="width: calc(100% - 219px);">
@ -238,32 +238,21 @@ export default {
this.page = 1
this.getData()
},
batchDel() { //
if (this.multipleSelection.length) {
this.$confirm("确定要删除选中用户吗?", "提示", {
type: "warning"
//
batchDel() {
const list = this.multipleSelection
if (list.length) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
let ids = this.multipleSelection.map(item => {
return item.accountId;
});
this.$post(`${this.api.delStudent}?accountIds=${ids.toString()}`).then(res => {
this.multipleSelection = [];
this.$refs.table.clearSelection();
util.successMsg("删除成功");
if (this.studentType) {
this.getData();
} else {
this.getOrgStudentData();
}
}).catch(res => {
});
if(this.multipleSelection.length === this.list.length && this.page>1) {
this.handleCurrentChange(this.page - 1)
}
}).catch(() => {
});
// this.$del(`${this.api.user}`, list.map(e => e.id)).then(res => {
// this.$refs.table.clearSelection()
// util.successMsg('')
// this.getStaff()
// }).catch(res => {})
}).catch(() => {})
} else {
util.errorMsg("请先选择数据 !");
util.errorMsg('请先选择数据 !')
}
},
//
@ -285,7 +274,7 @@ export default {
},
//
preview(row) {
window.open(`http://192.168.31.${Setting.isDev ? 126 : 136}:8095/#/article?id=` + row.id)
window.open((Setting.isDev ? `http://${location.hostname}:8095` : 'http://192.168.31.136') + `/#/article?id=` + row.id)
},
//
edit(row) {

@ -6,9 +6,9 @@
<el-form-item prop="columnName" label="栏目名称">
<el-input
placeholder="请输入栏目名称"
v-model.trim="form.columnName"
v-model="form.columnName"
clearable
maxlength="15"
maxlength="40"
@change="nameChange"
></el-input>
</el-form-item>
@ -48,17 +48,10 @@
<el-upload
class="avatar-uploader avatar-uploader-lg"
accept=".jpg,.png,.jpeg,.gif"
:before-upload="beforeUpload"
:on-remove="handleRemove"
:on-error="uploadError"
:on-success="uploadSuccess"
:on-change="changeFile"
:show-file-list="false"
:action="this.api.upload"
:data="{
quote: form.columnName,
site: site.siteName,
uploader: userName
}"
:auto-upload="false"
>
<img v-if="form.columnBanner" :src="form.columnBanner" class="avatar-lg">
<div class="uploader-default" v-else>
@ -66,7 +59,7 @@
<p>点击上传</p>
</div>
<div slot="tip" class="el-upload__tip">
<p>请上传1920x500PX1M以内的jpgbmppng格式</p>
<p>请上传1920x500PX5M以内的jpgbmppng格式</p>
</div>
</el-upload>
</el-form-item>
@ -215,11 +208,11 @@
<el-button @click="$router.push('/column')">取消</el-button>
</div>
<!-- 剪裁组件弹窗 -->
<el-dialog append-to-body :visible.sync="cropperModel" width="1100px">
<el-dialog title="图片裁剪" append-to-body :visible.sync="cropperModel" width="1100px" :close-on-click-modal="false">
<Cropper
ref="vueCropper"
ref="cropper"
:img-file.sync="file"
:is-upload="isUpload"
:img-file="file"
:fixed="true"
@upload="customUpload" />
</el-dialog>
@ -475,15 +468,54 @@ export default {
this.nameRepeat = false
}
},
//
customUpload(data) {
// upload
// console.log(data);
// let _data = this.compress(img);
const blob = this.dataURItoBlob(data)
const formData = new FormData()
formData.append('file', blob, this.file.name) //
formData.append('file', blob, this.file.name)
formData.append('quote', this.form.columnName)
formData.append('site', this.site.siteName)
formData.append('uploader', this.userName)
this.imgUpload(formData)
},
//
compress(img) {
const canvas = document.createElement('canvas')
const ctx = canvas.getContext('2d')
// let initSize = img.src.length;
const width = img.width
const height = img.height
canvas.width = width
canvas.height = height
//
ctx.fillStyle = '#fff'
ctx.fillRect(0, 0, canvas.width, canvas.height)
ctx.drawImage(img, 0, 0, width, height)
//
const ndata = canvas.toDataURL('image/jpeg', 0.8)
return ndata
},
// base64bolb
dataURItoBlob(base64Data) {
let byteString
if (base64Data.split(',')[0].indexOf('base64') >= 0) {
byteString = atob(base64Data.split(',')[1])
} else {
byteString = unescape(base64Data.split(',')[1])
}
const mimeString = base64Data
.split(',')[0]
.split(':')[1]
.split(';')[0]
const ia = new Uint8Array(byteString.length)
for (let i = 0; i < byteString.length; i++) {
ia[i] = byteString.charCodeAt(i)
}
return new Blob([ia], {
type: mimeString
})
},
//
imgUpload(formData) {
this.isUpload = true
Axios({
@ -494,51 +526,35 @@ export default {
'Content-Type': 'multipart/form-data'
},
}).then(({ data }) => {
let url = this.form.columnBanner
url && this.$del(this.api.delFile, [url.split('/').pop()]).then(res => {}).catch(e => {}) //
this.form.columnBanner = data.url
this.fileId = data.id
}).catch(res => {})
// this.$api[this.uploadMethodName]({
// data: formData,
// showLoading: false
// }).then(res => {
// //
// console.log(this.uploadList)
// this.uploadList = this.isSingle ? res : this.uploadList.concat(res)
// this.uploadList.forEach(item => {
// item.name = item.fileId
// item.url = `/common-service/file/downloadFileFromOSS?key=${item.fileId}`
// })
// }).catch(() => {})
this.$refs.cropper.isDisabled = false
this.isUpload = false
this.cropperModel = false
},
//
beforeUpload(file) {
//
changeFile(file) {
const { size, name } = file
const ext = name.substring(name.lastIndexOf('.') + 1)
if (!util.isImg(ext)) {
this.$message.error('请上传图片!')
return false
}
if (size / 1024 / 1024 > 1) {
this.$message.error('请上传1M以内的图片!')
if (size / 1024 / 1024 > 5) {
this.$message.error('请上传5M以内的图片!')
return false
}
},
uploadError(err, file, fileList) {
this.$message({
message: "上传出错,请重试!",
type: "error",
center: true
this.file = file
this.cropperModel = true
this.$nextTick(() => {
this.$refs.cropper.updateImg({
url: window.URL.createObjectURL(file.raw),
size: file.size
})
})
},
handleRemove(file, fileList) {
this.form.columnBanner = ''
},
uploadSuccess(res) {
let url = this.form.columnBanner
url && this.$del(this.api.delFile, [url.split('/').pop()]).then(res => {}).catch(e => {})
this.form.columnBanner = res.url
this.fileId = res.id
},
//
preview() {

@ -17,7 +17,7 @@
</el-dropdown-menu>
</el-dropdown>
<el-button v-auth="'/site/list:' + siteName + ':内容管理:栏目管理:新增'" type="primary" @click="add" >新增</el-button>
<el-button v-auth="'/site/list:' + siteName + ':内容管理:栏目管理:删除'" @click="batchDel">删除</el-button>
<!-- <el-button v-auth="'/site/list:' + siteName + ':内容管理:栏目管理:删除'" @click="batchDel">删除</el-button> -->
<el-button v-auth="'/site/list:' + siteName + ':内容管理:栏目管理:更改排序'" class="lg" @click="sort">更改排序</el-button>
<el-button v-auth="'/site/list:' + siteName + ':内容管理:栏目管理:导航样式设置'" class="lg" @click="styleSet">导航样式设置</el-button>
</div>
@ -290,11 +290,11 @@ export default {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
this.$del(`${this.api.user}`, list.map(e => e.id)).then(res => {
this.$refs.table.clearSelection()
util.successMsg('删除成功')
this.getStaff()
}).catch(res => {})
// this.$del(`${this.api.user}`, list.map(e => e.id)).then(res => {
// this.$refs.table.clearSelection()
// util.successMsg('')
// this.getStaff()
// }).catch(res => {})
}).catch(() => {})
} else {
util.errorMsg('请先选择数据 !')
@ -326,7 +326,7 @@ export default {
columnName: '',
templateId: '',
typeId : '',
isSort: 1
isSort: 0
}).then(({ data }) => {
this.sortColumns = data
}).catch(err => {})

@ -7,6 +7,8 @@
<el-button @click="$router.back()">放弃编辑</el-button>
</div>
<div class="modules">
<p class="page-name mb">页面设置</p>
<div class="relative">
<el-carousel height="480px">
<template v-for="(item, i) in modules[0].list">
@ -188,8 +190,9 @@
</div>
</div>
</div>
</div>
<Module :data.sync="curData" :visible.sync="diaVisible" @moduleSubmit="moduleSubmit" />
<Module ref="module" :data.sync="curData" :visible.sync="diaVisible" @moduleSubmit="moduleSubmit" />
</div>
</template>
@ -211,7 +214,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -236,7 +239,7 @@ export default {
required: true
},
{
type: 'input',
type: 'textarea',
prop: 'subTitle',
label: '小标题'
},
@ -261,7 +264,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -320,7 +323,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -357,7 +360,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -394,7 +397,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -431,7 +434,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -614,7 +617,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -658,7 +661,7 @@ export default {
required: true
},
{
type: 'input',
type: 'textarea',
prop: 'subTitle',
label: '小标题'
},
@ -683,16 +686,17 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
},
des: ''
des: '',
isEnable: 1
},
list: [
{
pic: require('@/assets/images/channel/channel1.png'),
pic: require('@/assets/images/about/6.png'),
title: 'Founder and 1st PRESIDENT OF THE INSTITUTE OF ADVANCED SCIENCE FACILITIES, SHENZHEN',
subTitle: 'Sun Dongbai',
link: {
@ -701,13 +705,49 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
},
des: 'Dr. Sun was the executive vice president of Sun Yat- and vice president of the University of Science and Technology Beijing (2008-2017). One of the most widely well-known material scientists aation',
isEnable: 1
},
{
pic: require('@/assets/images/about/7.png'),
title: 'Vice President of the Institute of Advanced Scienc, Shenzhen',
subTitle: 'Yang Xueming',
link: {
linkName: '无',
connectionType: 1,
columnId: [],
articleId: '',
linkAddress : '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
},
des: 'Dr. Yang is a world-recognized physical chemistry scientist, an Academician of the Chinese Academy of Science, an awardee of the National Science Fund for Distinguished Young Scholars',
isEnable: 1
},
{
pic: require('@/assets/images/about/8.png'),
title: 'The Chairman of Science and Technology Advisory Committee',
subTitle: 'Ulf KALSSON',
link: {
linkName: '无',
connectionType: 1,
columnId: [],
articleId: '',
linkAddress : '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
},
des: 'Dr. Ulf Karlsson is a joint professor of Linköping University and KTH Royal Institute of Technology. He established the laboratory of material science and was the director of the materials science platform',
isEnable: 1
}
]
},
@ -767,7 +807,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -811,7 +851,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -855,7 +895,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -919,7 +959,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1

@ -7,6 +7,8 @@
<el-button @click="$router.back()">放弃编辑</el-button>
</div>
<div class="modules">
<p class="page-name mb">页面设置</p>
<div class="relative">
<el-carousel height="480px">
<template v-for="(item, i) in modules[0].list">
@ -102,8 +104,9 @@
</li>
<div class="cover" @click="toSet(7)">点击更换标题与描述</div>
</ul>
</div>
<Module :data.sync="curData" :visible.sync="diaVisible" @moduleSubmit="moduleSubmit" />
<Module ref="module" :data.sync="curData" :visible.sync="diaVisible" @moduleSubmit="moduleSubmit" />
</div>
</template>
@ -125,7 +128,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -169,7 +172,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -212,7 +215,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -255,7 +258,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -298,7 +301,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -361,7 +364,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -378,7 +381,41 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
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.',
isEnable: 1
},
{
pic: require('@/assets/images/careers/7.png'),
title: 'IASF started its journey to chase light, 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.',
isEnable: 1
},
{
pic: require('@/assets/images/careers/8.png'),
title: 'IASF started its journey to chase light, push the boundaries forward, and discover the unknown.',
link: {
linkName: '无',
connectionType: 1,
columnId: [],
articleId: '',
linkAddress : '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -387,7 +424,8 @@ export default {
isEnable: 1
}
]
},{
},
{
type: 'introduce',
forms: [
{
@ -403,7 +441,7 @@ export default {
required: true
},
{
type: 'input',
type: 'textarea',
prop: 'subTitle',
label: '小标题'
},
@ -428,7 +466,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -446,7 +484,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1

@ -7,6 +7,8 @@
<el-button @click="$router.back()">放弃编辑</el-button>
</div>
<div class="modules">
<p class="page-name mb">页面设置</p>
<div class="relative">
<el-carousel height="480px">
<template v-for="(item, i) in modules[0].list">
@ -37,11 +39,14 @@
</div>
<div class="block gray">
<div class="inner c-wrap">
<h2 class="b-title">Engagement</h2>
<p class="intro">Serving Community</p>
<ul class="list">
<li v-for="(item, i) in modules[3].list" :key="i">
<div class="inner">
<div class="c-wrap">
<h2 class="b-title">{{ modules[3].form.title }}</h2>
<p class="intro">{{ modules[3].form.des }}</p>
<div class="cover" @click="toSet(3)">点击更换标题与描述</div>
</div>
<ul class="list c-wrap">
<li v-for="(item, i) in modules[4].list" :key="i">
<img class="pic" :src="item.pic" alt="">
<div class="texts">
<h6>{{ item.title }}</h6>
@ -49,12 +54,13 @@
<div class="des">{{ item.des }}</div>
</div>
</li>
<div class="cover" @click="toSet(4)">点击更改图片标题概述与链接</div>
</ul>
<div class="cover" @click="toSet(3)">点击更改图片标题概述与链接</div>
</div>
</div>
</div>
<Module :data.sync="curData" :visible.sync="diaVisible" @moduleSubmit="moduleSubmit" />
<Module ref="module" :data.sync="curData" :visible.sync="diaVisible" @moduleSubmit="moduleSubmit" />
</div>
</template>
@ -76,7 +82,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -120,7 +126,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -163,7 +169,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -171,6 +177,26 @@ export default {
des: `Our campus is Shenzhen and Beyound`
}
},
{
type: 'form',
forms: [
{
type: 'input',
prop: 'title',
label: '标题',
required: true
},
{
type: 'textarea',
prop: 'des',
label: '概述'
}
],
form: {
title: 'Engagement',
des: 'Serving Community'
}
},
{
type: 'introduce',
forms: [
@ -187,7 +213,7 @@ export default {
required: true
},
{
type: 'input',
type: 'textarea',
prop: 'subTitle',
label: '小标题'
},
@ -212,7 +238,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -230,7 +256,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1

@ -7,6 +7,8 @@
<el-button @click="$router.back()">放弃编辑</el-button>
</div>
<div class="modules">
<p class="page-name mb">页面设置</p>
<div class="relative">
<el-carousel height="500px">
<template v-for="(item, i) in modules[0].list">
@ -180,8 +182,9 @@
</ul>
</div>
</div>
</div>
<Module :data.sync="curData" :visible.sync="diaVisible" @moduleSubmit="moduleSubmit" />
<Module ref="module" :data.sync="curData" :visible.sync="diaVisible" @moduleSubmit="moduleSubmit" />
</div>
</template>
@ -203,7 +206,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -267,7 +270,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -310,7 +313,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -384,7 +387,7 @@ export default {
required: true
},
{
type: 'input',
type: 'textarea',
prop: 'subTitle',
label: '小标题'
},
@ -409,7 +412,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -427,7 +430,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -466,7 +469,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1

@ -6,7 +6,8 @@
<el-button type="primary" @click="save(1)">发布</el-button>
<el-button @click="$router.back()">放弃编辑</el-button>
</div>
<div class="modules">
<p class="page-name mb">页面设置</p>
<div class="relative">
<el-carousel height="480px">
<template v-for="(item, i) in modules[0].list">
@ -19,16 +20,14 @@
</div>
<ul class="tabs">
<li :class="{active: item.id == active}" v-for="(item, i) in tabs" :key="i">
{{ item.name }}
<li :class="{active: item.id == active}" v-for="(item, i) in modules[1].list" :key="i">
{{ item.columnName }}
<div class="cover" @click="toSet(1, i)">关联栏目</div>
</li>
</ul>
<div class="block">
<div class="inner">
<h2 class="b-title">Seminars & Workshops</h2>
<p class="intro">What makes a ligh chinese bay chaser</p>
<div class="banner">
<img width="100%" height="480" src="@/assets/images/about/5.png" alt="">
<div class="right">
@ -167,8 +166,9 @@
</div>
</div>
</div>
</div>
<Module :data.sync="curData" :visible.sync="diaVisible" @moduleSubmit="moduleSubmit" />
<Module ref="module" :data.sync="curData" :visible.sync="diaVisible" @moduleSubmit="moduleSubmit" />
</div>
</template>
@ -190,7 +190,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -209,7 +209,56 @@ export default {
columnTitle: 1,
columnTitleCustom: ''
},
list: []
list: [
{
columnName: 'General news',
site: '',
column: '',
articleNum: '',
columnTitle: 1,
columnTitleCustom: ''
},
{
columnName: 'Research news',
site: '',
column: '',
articleNum: '',
columnTitle: 1,
columnTitleCustom: ''
},
{
columnName: 'General news',
site: '',
column: '',
articleNum: '',
columnTitle: 1,
columnTitleCustom: ''
},
{
columnName: 'General news',
site: '',
column: '',
articleNum: '',
columnTitle: 1,
columnTitleCustom: ''
},
{
columnName: 'Research news',
site: '',
column: '',
articleNum: '',
columnTitle: 1,
columnTitleCustom: ''
},
{
columnName: 'Journal covers',
site: '',
column: '',
articleNum: '',
columnTitle: 1,
columnTitleCustom: ''
},
]
},
{
type: 'form',

@ -7,6 +7,8 @@
<el-button @click="$router.back()">放弃编辑</el-button>
</div>
<div class="modules">
<p class="page-name mb">页面设置</p>
<div class="relative">
<el-carousel height="480px">
<template v-for="(item, i) in modules[0].list">
@ -34,8 +36,9 @@
<div class="cover" @click="toSet(1)">点击更改图片标题概述与链接</div>
</div>
</div>
</div>
<Module :data.sync="curData" :visible.sync="diaVisible" @moduleSubmit="moduleSubmit" />
<Module ref="module" :data.sync="curData" :visible.sync="diaVisible" @moduleSubmit="moduleSubmit" />
</div>
</template>
@ -57,7 +60,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -82,7 +85,7 @@ export default {
required: true
},
{
type: 'input',
type: 'textarea',
prop: 'subTitle',
label: '小标题'
},
@ -107,7 +110,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
@ -125,7 +128,7 @@ export default {
columnId: [],
articleId: '',
linkAddress : '',
siteSelection: '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1

@ -509,9 +509,8 @@ export default {
},
//
handleNodeClick(data) {
this.$refs.table.clearSelection()
this.staffType = null
this.getStaff()
this.initData()
},
//
closeOrg() {

@ -8,6 +8,8 @@ router.beforeEach((to, from, next) => {
const role = util.local.get(Setting.tokenKey)
if (!role && !whiteList.includes(to.path)) {
next('/login')
} else if (role && to.path === '/login') {
next('/site')
} else {
next()
}

@ -39,17 +39,18 @@
border-radius: 0;
}
}
.page {
position: relative;
padding: 16px 20px;
background-color: #fff;
.page-name {
font-size: 14px;
.page-name {
font-size: 16px;
font-weight: 600;
color: #333;
&.mb {
margin-bottom: 16px;
}
}
}
.page {
position: relative;
padding: 16px 20px;
background-color: #fff;
.tool {
display: flex;
justify-content: space-between;

@ -37,6 +37,10 @@
background-color: #F2F6F8;
}
.modules {
height: calc(100vh - 160px);
overflow: auto;
}
.actions {
margin-bottom: 20px;
text-align: right;
@ -70,9 +74,10 @@
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: column;
}
.set-link {
margin-left: 10px;
margin-top: 5px;
}
.del {
margin-left: 5px;

Loading…
Cancel
Save