yujialong 1 year ago
parent dbe5b0d2f9
commit 18e94e69bf
  1. 193
      src/components/img-upload/Cropper.vue
  2. 40
      src/components/modules/content.vue
  3. 179
      src/components/modules/module.vue
  4. 337
      src/const/modules.js
  5. 13
      src/mixins/page/index.js
  6. 3
      src/pages/article/add/index.vue
  7. 4
      src/pages/column/page/contactUs.vue
  8. 24
      src/pages/column/page/lightSources.vue
  9. 37
      src/pages/column/page/overview.vue
  10. 16
      src/pages/column/page/talentCenter.vue
  11. 349
      src/styles/page/page.scss

@ -3,31 +3,31 @@
<div class="cropper-content"> <div class="cropper-content">
<!-- 剪裁框 --> <!-- 剪裁框 -->
<div class="cropper"> <div class="cropper">
<vueCropper <vueCropper ref="cropper"
ref="cropper" :img="option.img"
:img="option.img" :output-size="option.size"
:output-size="option.size" :output-type="option.outputType"
:output-type="option.outputType" :info="true"
:info="true" :full="option.full"
:full="option.full" :can-move="option.canMove"
:can-move="option.canMove" :can-move-box="option.canMoveBox"
:can-move-box="option.canMoveBox" :original="option.original"
:original="option.original" :auto-crop="option.autoCrop"
:auto-crop="option.autoCrop" :auto-crop-width="autoCropWidth"
:auto-crop-width="option.autoCropWidth" :auto-crop-height="autoCropHeight"
:auto-crop-height="option.autoCropHeight" :fixed-box="option.fixedBox"
:fixed-box="option.fixedBox" :fixed="fixed"
:fixed="fixed" :fixed-number="fixedNumber"
:fixed-number="fixedNumber" @realTime="realTime" />
@realTime="realTime" />
<!-- <vueCropper ref="cropper" :img="option.img" :outputSize="option.size" :outputType="option.outputType"></vueCropper> --> <!-- <vueCropper ref="cropper" :img="option.img" :outputSize="option.size" :outputType="option.outputType"></vueCropper> -->
</div> </div>
<!-- 预览框 --> <!-- 预览框 -->
<div <div class="show-preview"
class="show-preview" :style="{'width': '500px', 'height': '400px', 'overflow': 'hidden', 'margin': '0 25px', 'display':'flex', 'align-items' : 'center'}">
:style="{'width': '500px', 'height': '400px', 'overflow': 'hidden', 'margin': '0 25px', 'display':'flex', 'align-items' : 'center'}"> <div :style="previews.div"
<div :style="previews.div" class="preview"> class="preview">
<img :src="previews.url" :style="previews.img" /> <img :src="previews.url"
:style="previews.img" />
</div> </div>
</div> </div>
</div> </div>
@ -41,11 +41,10 @@
</div>--> </div>-->
<!-- 确认上传按钮 --> <!-- 确认上传按钮 -->
<div class="upload-btn"> <div class="upload-btn">
<el-button <el-button type="primary"
type="primary" :loading="isUpload"
:loading="isUpload" :disabled="isDisabled"
:disabled="isDisabled" @click.prevent="uploadImg('blob')">
@click.prevent="uploadImg('blob')">
上传 上传
</el-button> </el-button>
</div> </div>
@ -57,7 +56,7 @@
import { import {
VueCropper VueCropper
} from 'vue-cropper' } from 'vue-cropper'
import {compress, compressAccurately} from 'image-conversion' import { compress, compressAccurately } from 'image-conversion'
export default { export default {
components: { components: {
VueCropper VueCropper
@ -86,9 +85,19 @@ export default {
fixed: { fixed: {
type: Boolean, type: Boolean,
default: true default: true
},
// (:80%)
autoCropWidth: {
type: Number,
default: 480
},
// (:80%)
autoCropHeight: {
type: Number,
default: 124
} }
}, },
data() { data () {
return { return {
previews: {}, // previews: {}, //
option: { option: {
@ -100,8 +109,6 @@ export default {
original: false, // (:false) original: false, // (:false)
canMoveBox: true, // (:true) canMoveBox: true, // (:true)
autoCrop: true, // (:false) autoCrop: true, // (:false)
autoCropWidth: 480, // (:80%)
autoCropHeight: 124, // (:80%)
fixedBox: false, // (:false) fixedBox: false, // (:false)
fixed: true, // (:true) fixed: true, // (:true)
fixedNumber: [1, 0.26], // (:[1:1]) fixedNumber: [1, 0.26], // (:[1:1])
@ -111,30 +118,30 @@ export default {
} }
}, },
methods: { methods: {
changeScale(num) { changeScale (num) {
// //
num = num || 1 num = num || 1
this.$refs.cropper.changeScale(num) this.$refs.cropper.changeScale(num)
}, },
rotateLeft() { rotateLeft () {
// //
this.$refs.cropper.rotateLeft() this.$refs.cropper.rotateLeft()
}, },
rotateRight() { rotateRight () {
// //
this.$refs.cropper.rotateRight() this.$refs.cropper.rotateRight()
}, },
updateImg(file) { updateImg (file) {
this.option.img = file.url this.option.img = file.url
this.option.size = file.size / 1024 > 200 ? 0.9 : 0.95 this.option.size = file.size / 1024 > 200 ? 0.9 : 0.95
}, },
realTime(data) { realTime (data) {
// //
this.previews = data this.previews = data
}, },
close() { close () {
}, },
uploadImg(type) { uploadImg (type) {
this.isDisabled = true this.isDisabled = true
// //
const that = this const that = this
@ -155,81 +162,81 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.cropper-content { .cropper-content {
display: flex; display: flex;
display: -webkit-flex; display: -webkit-flex;
justify-content: flex-end; justify-content: flex-end;
-webkit-justify-content: flex-end; -webkit-justify-content: flex-end;
} }
.cropper-content .cropper { .cropper-content .cropper {
width: 500px; width: 500px;
height: 400px; height: 400px;
} }
.cropper-content .show-preview { .cropper-content .show-preview {
flex: 1; flex: 1;
-webkit-flex: 1; -webkit-flex: 1;
display: flex; display: flex;
display: -webkit-flex; display: -webkit-flex;
justify-content: center; justify-content: center;
-webkit-justify-content: center; -webkit-justify-content: center;
overflow: hidden; overflow: hidden;
border: 1px solid #cccccc; border: 1px solid #cccccc;
background: #cccccc; background: #cccccc;
margin-left: 40px; margin-left: 40px;
} }
.preview { .preview {
overflow: hidden; overflow: hidden;
border: 1px solid #cccccc; border: 1px solid #cccccc;
background: #cccccc; background: #cccccc;
} }
.footer-btn { .footer-btn {
margin-top: 30px; margin-top: 30px;
display: flex; display: flex;
display: -webkit-flex; display: -webkit-flex;
justify-content: flex-end; justify-content: flex-end;
-webkit-justify-content: flex-end; -webkit-justify-content: flex-end;
} }
.footer-btn .scope-btn { .footer-btn .scope-btn {
width: 500px; width: 500px;
display: flex; display: flex;
display: -webkit-flex; display: -webkit-flex;
justify-content: space-between; justify-content: space-between;
-webkit-justify-content: space-between; -webkit-justify-content: space-between;
} }
.footer-btn .upload-btn { .footer-btn .upload-btn {
flex: 1; flex: 1;
-webkit-flex: 1; -webkit-flex: 1;
display: flex; display: flex;
display: -webkit-flex; display: -webkit-flex;
justify-content: center; justify-content: center;
-webkit-justify-content: center; -webkit-justify-content: center;
} }
.footer-btn .btn { .footer-btn .btn {
outline: none; outline: none;
display: inline-block; display: inline-block;
line-height: 1; line-height: 1;
white-space: nowrap; white-space: nowrap;
cursor: pointer; cursor: pointer;
-webkit-appearance: none; -webkit-appearance: none;
text-align: center; text-align: center;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
outline: 0; outline: 0;
margin: 0; margin: 0;
-webkit-transition: 0.1s; -webkit-transition: 0.1s;
transition: 0.1s; transition: 0.1s;
font-weight: 500; font-weight: 500;
padding: 8px 15px; padding: 8px 15px;
font-size: 12px; font-size: 12px;
border-radius: 3px; border-radius: 3px;
color: #fff; color: #fff;
background-color: #67c23a; background-color: #67c23a;
border-color: #67c23a; border-color: #67c23a;
} }
</style> </style>

@ -10,7 +10,7 @@
<el-form ref="form" <el-form ref="form"
:model="data.form" :model="data.form"
:rules="rules" :rules="rules"
label-width="60px"> :label-width="data.labelWidth">
<el-form-item v-for="(item, i) in data.forms" <el-form-item v-for="(item, i) in data.forms"
:key="i" :key="i"
:prop="item.prop" :prop="item.prop"
@ -142,7 +142,6 @@ export default {
cropperModel: false, cropperModel: false,
isUpload: false, isUpload: false,
file: {}, // file: {}, //
fileId: '',
curForm: {}, curForm: {},
fixed: false, fixed: false,
fixedNumber: [0.88, 1] fixedNumber: [0.88, 1]
@ -193,43 +192,6 @@ export default {
formData.append('file', data, this.file.name) formData.append('file', data, this.file.name)
this.imgUpload(formData) 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) { imgUpload (formData) {
this.isUpload = true this.isUpload = true

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<!-- <!--
模块type: introduce | form | forms | column | columns | history | customList 模块type: introduce | customList | form | forms | column | columns | history
--> -->
<el-dialog title="模块管理" <el-dialog title="模块管理"
:visible.sync="visible" :visible.sync="visible"
@ -9,38 +9,9 @@
custom-class="module" custom-class="module"
:close-on-click-modal="false" :close-on-click-modal="false"
:before-close="close"> :before-close="close">
<template v-if="data.type === 'introduce' || data.type === 'label' || data.type === 'customList'"> <template v-if="data.type === 'introduce' || data.type === 'customList'">
<el-table v-if="data.type === 'label'" <!-- introduce是可以设置图片和链接的且大弹框内只会显示标题图片链接三个字段其他能输入的字段只会在小弹框里显示 customList是纯输入框会递归forms里面的字段显示在大弹框里面 -->
class="module-table" <el-table v-if="data.type === 'customList'"
:data="data.list"
header-align="center"
row-key="id">
<el-table-column type="index"
width="60"
label="序号"
align="center"></el-table-column>
<el-table-column prop="title"
label="标题"
min-width="140"
align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.title"
placeholder="请输入"
maxlength="100"></el-input>
</template>
</el-table-column>
<el-table-column label="操作"
width="60"
align="center">
<template slot-scope="scope">
<div class="flex j-center a-center">
<i class="el-icon-delete del"
@click="delRow(data.list, scope.$index)"></i>
</div>
</template>
</el-table-column>
</el-table>
<el-table v-else-if="data.type === 'customList'"
class="module-table" class="module-table"
:data="data.list" :data="data.list"
header-align="center" header-align="center"
@ -81,34 +52,33 @@
width="60" width="60"
label="序号" label="序号"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column v-if="data.forms.find(e => e.type === 'upload')"
label="图片" <el-table-column v-for="(item, i) in data.forms"
min-width="140" :key="i"
align="center"> :prop="item.prop"
<template slot-scope="scope"> :label="item.label"
<img v-if="scope.row.pic" min-width="130"
:src="scope.row.pic"
class="upload-pic">
<div class="upload-none"
v-else>
<i class="el-icon-picture-outline"></i>
</div>
</template>
</el-table-column>
<el-table-column prop="title"
label="标题"
min-width="140"
align="center"></el-table-column>
<el-table-column v-if="data.forms.find(e => e.type === 'link')"
label="链接"
min-width="140"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="link-wrap"> <div v-if="item.type === 'link'"
class="link-wrap">
<span>{{ scope.row.link.linkName }}</span> <span>{{ scope.row.link.linkName }}</span>
</div> </div>
<template v-else-if="item.type === 'upload'">
<img v-if="scope.row.pic"
:src="scope.row.pic"
class="upload-pic">
<div class="upload-none"
v-else>
<i class="el-icon-picture-outline"></i>
</div>
</template>
<p v-else>{{ scope.row[item.prop] }}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作"
width="100" width="100"
align="center"> align="center">
@ -135,7 +105,7 @@
ref="form" ref="form"
:model="data.form" :model="data.form"
:rules="rules" :rules="rules"
label-width="60px"> label-width="70px">
<el-form-item v-for="(item, i) in data.forms" <el-form-item v-for="(item, i) in data.forms"
:key="i" :key="i"
:prop="item.prop" :prop="item.prop"
@ -151,9 +121,10 @@
maxlength="300"></el-input> maxlength="300"></el-input>
<div v-if="item.type === 'upload' || item.type === 'video' || item.type === 'media'" <div v-if="item.type === 'upload' || item.type === 'video' || item.type === 'media'"
class="uploader-wrap"> class="uploader-wrap">
<el-upload class="uploader" <el-upload v-if="item.type === 'upload'"
accept=".jpg,.png,.jpeg" class="uploader"
:on-success="res => uploadSuccess(res, data.form)" accept=".jpg,.png,.jpeg,.gif"
:on-change="res => changeFile(res, data.form)"
:show-file-list="false" :show-file-list="false"
:headers="headers" :headers="headers"
:action="api.upload"> :action="api.upload">
@ -315,6 +286,22 @@
:form.sync="data.form" :form.sync="data.form"
:visible.sync="historyVisible" :visible.sync="historyVisible"
@historySubmit="historySubmit" /> @historySubmit="historySubmit" />
<!-- 剪裁组件弹窗 -->
<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="fixed"
:fixedNumber.sync="fixedNumber"
:autoCropWidth="autoCropWidth"
:autoCropHeight="autoCropHeight"
@upload="customUpload" />
</el-dialog>
</div> </div>
</template> </template>
@ -326,6 +313,8 @@ import Editor from '@tinymce/tinymce-vue'
import Setting from '@/setting' import Setting from '@/setting'
import Util from '@/libs/util' import Util from '@/libs/util'
import editorConfig from '@/components/editor' import editorConfig from '@/components/editor'
import Cropper from '@/components/img-upload/Cropper'
import Axios from 'axios'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
export default { export default {
name: 'module', name: 'module',
@ -334,7 +323,8 @@ export default {
Link, Link,
Content, Content,
Editor, Editor,
History History,
Cropper
}, },
data () { data () {
return { return {
@ -388,7 +378,15 @@ export default {
curData: {}, curData: {},
historyVisible: false, historyVisible: false,
historyData: [] historyData: [],
cropperModel: false,
isUpload: false,
file: {}, //
fixed: false,
fixedNumber: [0.88, 1],
autoCropWidth: 480,
autoCropHeight: 124,
}; };
}, },
watch: { watch: {
@ -407,7 +405,7 @@ export default {
// form // form
handleForm () { handleForm () {
const { type, forms, form } = this.data const { type, forms, form } = this.data
if (type === 'form') { if (type === 'form' || type === 'forms') {
forms.map(e => { forms.map(e => {
if (e.type === 'video' || e.type === 'media') { if (e.type === 'video' || e.type === 'media') {
this.fileList = [ this.fileList = [
@ -417,6 +415,12 @@ export default {
} }
] ]
} }
if (e.type === 'upload' && e.width) {
this.autoCropWidth = e.width
this.autoCropHeight = e.height
this.fixed = true
this.fixedNumber = [e.width / e.height, 1]
}
// //
if (e.required) { if (e.required) {
this.rules[e.prop] = [ this.rules[e.prop] = [
@ -445,7 +449,7 @@ export default {
this.articleNums = nums this.articleNums = nums
} }
form && form.site && this.siteChange(form.site) form && form.site && this.siteChange(form.site)
console.log(333, this.data) console.log(333, this.fixedNumber)
}, },
// //
siteChange (siteId) { siteChange (siteId) {
@ -480,7 +484,7 @@ export default {
// //
addRow () { addRow () {
const { type } = this.data const { type } = this.data
if (type === 'label' || type === 'customList') { if (type === 'customList') {
this.data.list.push(JSON.parse(JSON.stringify(this.data.originForm))) this.data.list.push(JSON.parse(JSON.stringify(this.data.originForm)))
} else if (type === 'history') { } else if (type === 'history') {
this.data.list.push(JSON.parse(JSON.stringify(this.data.historyForm))) this.data.list.push(JSON.parse(JSON.stringify(this.data.historyForm)))
@ -491,6 +495,52 @@ export default {
close () { close () {
this.$emit('update:visible', false) this.$emit('update:visible', false)
}, },
//
customUpload (data) {
const formData = new FormData()
formData.append('file', data, this.file.name)
this.imgUpload(formData)
},
//
imgUpload (formData) {
this.isUpload = true
Axios({
method: 'post',
url: this.api.upload,
data: formData,
headers: {
'Content-Type': 'multipart/form-data',
token: Util.local.get(Setting.tokenKey)
},
}).then(({ data }) => {
this.$set(this.curForm, 'pic', data.url)
}).catch(res => { })
this.$refs.cropper.isDisabled = false
this.isUpload = false
this.cropperModel = false
},
//
changeFile (file, form) {
const { size, name } = file
const ext = name.substring(name.lastIndexOf('.') + 1)
if (!Util.isImg(ext)) {
this.$message.error('请上传图片!')
return false
}
if (size / 1024 / 1024 > 5) {
this.$message.error('请上传5M以内的图片!')
return false
}
this.file = file
this.curForm = form
this.cropperModel = true
this.$nextTick(() => {
this.$refs.cropper.updateImg({
url: window.URL.createObjectURL(file.raw),
size: file.size
})
})
},
// //
uploadSuccess (res, row, item = {}) { uploadSuccess (res, row, item = {}) {
if (res.code === 401) { if (res.code === 401) {
@ -541,6 +591,7 @@ export default {
// //
editIntro (row, i = 0) { editIntro (row, i = 0) {
this.data.form = JSON.parse(JSON.stringify(row)) this.data.form = JSON.parse(JSON.stringify(row))
if (!this.data.labelWidth) this.data.labelWidth = '60px'
this.curModule = i this.curModule = i
this.contentVisible = true this.contentVisible = true
}, },

@ -1430,7 +1430,8 @@ export default {
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true, required: true,
fixedNumber: [0.88, 1] width: 540,
height: 506
}, },
{ {
type: 'input', type: 'input',
@ -4986,7 +4987,7 @@ export default {
type: 'form', type: 'form',
forms: [ forms: [
{ {
type: 'input', type: 'editor',
prop: 'title', prop: 'title',
label: '标题', label: '标题',
required: true required: true
@ -5007,7 +5008,7 @@ export default {
type: 'form', type: 'form',
forms: [ forms: [
{ {
type: 'input', type: 'editor',
prop: 'title', prop: 'title',
label: '标题', label: '标题',
required: true required: true
@ -5147,7 +5148,7 @@ export default {
type: 'form', type: 'form',
forms: [ forms: [
{ {
type: 'input', type: 'editor',
prop: 'title', prop: 'title',
label: '标题', label: '标题',
required: true required: true
@ -5156,7 +5157,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 986,
height: 293
}, },
], ],
form: { form: {
@ -5294,7 +5297,7 @@ export default {
type: 'form', type: 'form',
forms: [ forms: [
{ {
type: 'input', type: 'editor',
prop: 'title', prop: 'title',
label: '标题', label: '标题',
required: true required: true
@ -6306,7 +6309,7 @@ export default {
} }
}, },
{ {
type: 'label', type: 'introduce',
forms: [ forms: [
{ {
type: 'input', type: 'input',
@ -6317,10 +6320,12 @@ export default {
], ],
form: { form: {
title: '', title: '',
isEnable: 1,
}, },
list: [ list: [
{ {
title: '实验室综合管理岗', title: '实验室综合管理岗',
isEnable: 1
} }
] ]
}, },
@ -6377,7 +6382,7 @@ export default {
} }
}, },
{ {
type: 'label', type: 'introduce',
forms: [ forms: [
{ {
type: 'input', type: 'input',
@ -6388,10 +6393,12 @@ export default {
], ],
form: { form: {
title: '', title: '',
isEnable: 1,
}, },
list: [ list: [
{ {
title: '实验室综合管理岗', title: '实验室综合管理岗',
isEnable: 1
} }
] ]
}, },
@ -6479,7 +6486,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1912,
height: 384
}, },
{ {
type: 'input', type: 'input',
@ -6516,7 +6525,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 562,
height: 467
}, },
{ {
type: 'editor', type: 'editor',
@ -6728,7 +6739,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1912,
height: 384
}, },
{ {
type: 'input', type: 'input',
@ -6785,7 +6798,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: false required: false,
width: 1242,
height: 1012
}, },
], ],
form: { form: {
@ -6801,7 +6816,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1912,
height: 384
}, },
{ {
type: 'input', type: 'input',
@ -6896,7 +6913,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1912,
height: 384
}, },
{ {
type: 'input', type: 'input',
@ -6933,7 +6952,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 660,
height: 492
}, },
{ {
type: 'editor', type: 'editor',
@ -6976,7 +6997,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1320,
height: 467
}, },
{ {
type: 'editor', type: 'editor',
@ -6990,7 +7013,7 @@ export default {
label: '链接' label: '链接'
}, },
{ {
type: 'textarea', type: 'editor',
prop: 'des', prop: 'des',
label: '描述' label: '描述'
} }
@ -7019,10 +7042,12 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1320,
height: 467
}, },
{ {
type: 'input', type: 'editor',
prop: 'title', prop: 'title',
label: '标题', label: '标题',
required: true required: true
@ -7033,7 +7058,7 @@ export default {
label: '链接' label: '链接'
}, },
{ {
type: 'textarea', type: 'editor',
prop: 'des', prop: 'des',
label: '描述' label: '描述'
} }
@ -7106,7 +7131,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 426,
height: 396
}, },
{ {
type: 'input', type: 'input',
@ -7149,7 +7176,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 426,
height: 396
}, },
{ {
type: 'input', type: 'input',
@ -7192,7 +7221,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 426,
height: 396
}, },
{ {
type: 'input', type: 'input',
@ -7249,8 +7280,15 @@ export default {
} }
}, },
{ {
type: 'label', type: 'introduce',
forms: [ forms: [
{
type: 'upload',
prop: 'pic',
label: '图片',
required: true,
crop: false
},
{ {
type: 'input', type: 'input',
prop: 'title', prop: 'title',
@ -7259,29 +7297,45 @@ export default {
}, },
], ],
form: { form: {
pic: '',
title: '', title: '',
isEnable: 1,
}, },
list: [ list: [
{ {
pic: 'http://10.10.11.7/images/overview/7.png',
title: '公益性科研事业单位、新型研发机构、重大科技基础设施法人单位。', title: '公益性科研事业单位、新型研发机构、重大科技基础设施法人单位。',
isEnable: 1
}, },
{ {
pic: 'http://10.10.11.7/images/overview/8.png',
title: '实行理事会领导下的院长负责制,市场化、国际化、法制化下实行企业化运营。', title: '实行理事会领导下的院长负责制,市场化、国际化、法制化下实行企业化运营。',
isEnable: 1
}, },
{ {
pic: 'http://10.10.11.7/images/overview/9.png',
title: '承担重大科技基础设施全生命周期的规划、设计、建设、运营任务。', title: '承担重大科技基础设施全生命周期的规划、设计、建设、运营任务。',
isEnable: 1
}, },
{ {
pic: 'http://10.10.11.7/images/overview/10.png',
title: '聚焦服务粤港澳大湾区科学研究和高新技术产业发展需要。', title: '聚焦服务粤港澳大湾区科学研究和高新技术产业发展需要。',
isEnable: 1
}, },
{ {
pic: 'http://10.10.11.7/images/overview/11.png',
title: ' 位置:深圳北部光明科学城的大装置集群核心区。', title: ' 位置:深圳北部光明科学城的大装置集群核心区。',
isEnable: 1
}, },
{ {
pic: 'http://10.10.11.7/images/overview/12.png',
title: '距离:光明高铁站(6km), 松山湖科学城(10km) 深圳大学城(21km),深圳机场(23km),皇岗口岸(32km)。', title: '距离:光明高铁站(6km), 松山湖科学城(10km) 深圳大学城(21km),深圳机场(23km),皇岗口岸(32km)。',
isEnable: 1
}, },
{ {
pic: 'http://10.10.11.7/images/overview/13.png',
title: '成立日期,2020年5月13日。', title: '成立日期,2020年5月13日。',
isEnable: 1
}, },
] ]
}, },
@ -7352,7 +7406,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 933,
height: 836
}, },
], ],
form: { form: {
@ -7368,7 +7424,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1912,
height: 384
}, },
{ {
type: 'input', type: 'input',
@ -7411,7 +7469,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1200,
height: 400
}, },
{ {
type: 'link', type: 'link',
@ -7459,7 +7519,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1200,
height: 400
}, },
{ {
type: 'link', type: 'link',
@ -7593,7 +7655,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1912,
height: 384
}, },
{ {
type: 'input', type: 'input',
@ -7636,7 +7700,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1200,
height: 559
}, },
{ {
type: 'editor', type: 'editor',
@ -7679,7 +7745,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1200,
height: 559
}, },
{ {
type: 'editor', type: 'editor',
@ -7798,7 +7866,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 560,
height: 500
}, },
{ {
type: 'editor', type: 'editor',
@ -7841,7 +7911,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 600,
height: 450
}, },
{ {
type: 'editor', type: 'editor',
@ -7891,7 +7963,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 576,
height: 423
}, },
{ {
type: 'editor', type: 'editor',
@ -7934,7 +8008,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 576,
height: 423
}, },
{ {
type: 'editor', type: 'editor',
@ -8287,7 +8363,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1912,
height: 384
}, },
{ {
type: 'input', type: 'input',
@ -8336,7 +8414,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1912,
height: 384
}, },
{ {
type: 'input', type: 'input',
@ -8373,7 +8453,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 474,
height: 474
}, },
{ {
type: 'editor', type: 'editor',
@ -8426,7 +8508,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1912,
height: 384
}, },
{ {
type: 'input', type: 'input',
@ -8485,7 +8569,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 985,
height: 474
}, },
{ {
type: 'input', type: 'input',
@ -8528,7 +8614,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 985,
height: 474
}, },
{ {
type: 'input', type: 'input',
@ -8629,7 +8717,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1912,
height: 384
}, },
{ {
type: 'input', type: 'input',
@ -8669,29 +8759,17 @@ export default {
required: true required: true
}, },
{ {
type: 'input', type: 'editor',
prop: 'address', prop: 'info',
label: '地址', label: '信息',
required: false
},
{
type: 'input',
prop: 'phone',
label: '电话',
required: false
},
{
type: 'input',
prop: 'email',
label: '邮箱',
required: false required: false
}, },
], ],
form: { form: {
title: 'Contact us', title: 'Contact us',
address: '深圳市光明区新湖街道圳园路268号3号楼3—6层', info: `<p class="text">地址 深圳市光明区新湖街道圳园路268号3号楼3—6层</p>
phone: '0755-21096000', <p class="text">电话 0755-21096000</p>
email: 'gad@mail.iasf.ac.cn', <p class="text">邮箱 gad@mail.iasf.ac.cn</p>`
} }
}, },
{ {
@ -8762,7 +8840,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1912,
height: 384
}, },
{ {
type: 'input', type: 'input',
@ -8810,7 +8890,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1200,
height: 536
}, },
], ],
form: { form: {
@ -8831,8 +8913,13 @@ export default {
} }
}, },
{ {
type: 'customList', type: 'introduce',
forms: [ forms: [
{
type: 'link',
prop: 'link',
label: '链接'
},
{ {
type: 'input', type: 'input',
prop: 'name', prop: 'name',
@ -8842,13 +8929,19 @@ export default {
{ {
type: 'input', type: 'input',
prop: 'country', prop: 'country',
label: '国家', label: '国家和地区',
required: false
},
{
type: 'input',
prop: 'address',
label: '地点',
required: false required: false
}, },
{ {
type: 'input', type: 'input',
prop: 'gev', prop: 'gev',
label: '电子束能量(GeV)', label: '能量(GeV)',
required: false required: false
}, },
{ {
@ -8860,7 +8953,7 @@ export default {
{ {
type: 'input', type: 'input',
prop: 'stations', prop: 'stations',
label: '实验站数量', label: '光束线/条',
required: false required: false
}, },
{ {
@ -8869,12 +8962,6 @@ export default {
label: '代际', label: '代际',
required: false required: false
}, },
{
type: 'input',
prop: 'time',
label: '建成/改造时间',
required: false
},
{ {
type: 'input', type: 'input',
prop: 'emittance', prop: 'emittance',
@ -8887,35 +8974,70 @@ export default {
label: '状态', label: '状态',
required: false required: false
}, },
{
type: 'input',
prop: 'time',
label: '建成时间',
required: false
},
], ],
form: { form: {
link: {
linkName: '无',
connectionType: 1,
columnId: [],
articleId: '',
linkAddress : '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
},
name: '', name: '',
country: '', country: '',
gev: '', gev: '',
storage: '', storage: '',
stations: '', stations: '',
intergenerational: '', intergenerational: '',
time: '',
emittance: '', emittance: '',
status: '', status: '',
time: '',
}, },
list: [ list: [
{ {
link: {
linkName: '无',
connectionType: 1,
columnId: [],
articleId: '',
linkAddress : '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
},
name: '', name: '',
country: '', country: '',
gev: '', gev: '',
storage: '', storage: '',
stations: '', stations: '',
intergenerational: '', intergenerational: '',
time: '',
emittance: '', emittance: '',
status: '', status: '',
time: '',
isEnable: 1,
} }
] ],
labelWidth: '120px'
}, },
{ {
type: 'customList', type: 'introduce',
forms: [ forms: [
{
type: 'link',
prop: 'link',
label: '链接'
},
{ {
type: 'input', type: 'input',
prop: 'name', prop: 'name',
@ -8925,7 +9047,7 @@ export default {
{ {
type: 'input', type: 'input',
prop: 'country', prop: 'country',
label: '国家', label: '国家和地区',
required: false required: false
}, },
{ {
@ -8955,19 +9077,19 @@ export default {
{ {
type: 'input', type: 'input',
prop: 'repetitive', prop: 'repetitive',
label: '重复频率/Hz Repetition rate', label: '重复频率/Hz',
required: false required: false
}, },
{ {
type: 'input', type: 'input',
prop: 'facility', prop: 'facility',
label: '设施长度/m Overall length', label: '设施长度/m',
required: false required: false
}, },
{ {
type: 'input', type: 'input',
prop: 'stations', prop: 'stations',
label: '线站数量', label: '实验站/个',
required: false required: false
}, },
{ {
@ -8979,11 +9101,22 @@ export default {
{ {
type: 'input', type: 'input',
prop: 'time', prop: 'time',
label: '出光时间', label: '建成时间',
required: false required: false
}, },
], ],
form: { form: {
link: {
linkName: '无',
connectionType: 1,
columnId: [],
articleId: '',
linkAddress : '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
},
name: '', name: '',
country: '', country: '',
address: '', address: '',
@ -8998,6 +9131,17 @@ export default {
}, },
list: [ list: [
{ {
link: {
linkName: '无',
connectionType: 1,
columnId: [],
articleId: '',
linkAddress : '',
site: '',
otherColumnId: [],
otherArticleId: '',
isOpen: 1
},
name: '', name: '',
country: '', country: '',
address: '', address: '',
@ -9011,7 +9155,8 @@ export default {
time: '', time: '',
status: '', status: '',
} }
] ],
labelWidth: '120px'
}, },
], ],
team: [ team: [
@ -9022,7 +9167,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 1912,
height: 384
}, },
{ {
type: 'input', type: 'input',
@ -9059,7 +9206,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 224,
height: 268
}, },
{ {
type: 'input', type: 'input',
@ -9301,7 +9450,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 690,
height: 488
}, },
{ {
type: 'input', type: 'input',
@ -9344,7 +9495,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 690,
height: 488
}, },
{ {
type: 'input', type: 'input',
@ -9500,7 +9653,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 722,
height: 560
}, },
{ {
type: 'input', type: 'input',
@ -9552,7 +9707,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图片', label: '图片',
required: true required: true,
width: 744,
height: 657
}, },
{ {
type: 'input', type: 'input',
@ -9745,7 +9902,9 @@ export default {
type: 'upload', type: 'upload',
prop: 'pic', prop: 'pic',
label: '图标', label: '图标',
required: true required: true,
width: 98,
height: 98
}, },
{ {
type: 'input', type: 'input',

@ -8,7 +8,7 @@ export default {
userId: +this.$store.state.user.userId, userId: +this.$store.state.user.userId,
site: this.$store.state.content.site, site: this.$store.state.content.site,
columnId: +this.$route.query.id, columnId: +this.$route.query.id,
withOriginForm: ['banner', 'introduce', 'history', 'label', 'customList'], // 要添加origiinForm的模块类型 withOriginForm: ['introduce', 'history', 'label', 'customList'], // 要添加origiinForm的模块类型
id: '', id: '',
modules: [], modules: [],
originModules: '[]', originModules: '[]',
@ -72,16 +72,15 @@ export default {
const str = json[json.state ? 'theEditedJson' : 'jsonBeforeEditing'] const str = json[json.state ? 'theEditedJson' : 'jsonBeforeEditing']
const list = JSON.parse(str) const list = JSON.parse(str)
list.map((e, i) => { this.modules.map((e, i) => {
if (this.modules[i].forms) e.forms = this.modules[i].forms // forms即数据结构,直接用本地配置文件里的,方便随时更改结构 e.form = list[i].form
if (this.modules[i].forms && this.modules[i].forms.length !== e.forms.length) e = this.modules[i] if (list[i].list) e.list = list[i].list
if (this.withOriginForm.includes(e.type) && !e.originForm) { if (this.withOriginForm.includes(e.type) && !e.originForm) {
e.originForm = modules[i].originForm e.originForm = modules[i].originForm
} }
}) })
this.originModules = JSON.stringify(list) // 原始json,用以页面离开的时候判断是否需要提示保存 this.originModules = JSON.stringify(this.modules) // 原始json,用以页面离开的时候判断是否需要提示保存
this.modules = list console.log("🚀 ~ file: index.js:85 ~ this.$post ~ list:", this.modules)
console.log("🚀 ~ file: index.js:85 ~ this.$post ~ list:", list)
} }
}).catch(err => {}) }).catch(err => {})
}, },

@ -1501,7 +1501,8 @@ export default {
}, },
// //
preview () { preview () {
window.open((Setting.isDev ? `http://${location.hostname}:8095` : this.$store.state.content.site.domainName) + `#/article?articleId=${this.form.id}&siteId=${this.form.siteId}&id=${this.form.columnId}`) localStorage.setItem('article', JSON.stringify(this.form))
window.open((Setting.isDev ? `http://${location.hostname}:8095` : this.$store.state.content.site.domainName) + `#/article?articleId=${this.form.id}&siteId=${this.form.siteId}&id=${this.form.columnId}&preview=1`)
}, },
// //
back () { back () {

@ -32,9 +32,7 @@
<div class="contact"> <div class="contact">
<div class="fields"> <div class="fields">
<h6>{{ modules[1].form.title }}</h6> <h6>{{ modules[1].form.title }}</h6>
<p class="text">{{ modules[1].form.address }}</p> <div v-html="modules[1].form.info"></div>
<p class="text">{{ modules[1].form.phone }}</p>
<p class="text">{{ modules[1].form.email }}</p>
<div class="cover" <div class="cover"
style="top: -20px;" style="top: -20px;"
@click="toSet(1)">点击更换文本</div> @click="toSet(1)">点击更换文本</div>

@ -56,16 +56,16 @@
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th>序号</th>
<th>光源名称</th> <th>光源名称</th>
<th>国家</th> <th>国家和地区</th>
<th>电子束能量GeV</th> <th>地点</th>
<th>能量GeV</th>
<th>储存环周长(m)</th> <th>储存环周长(m)</th>
<th>实验站数量</th> <th>光束线/</th>
<th>代际</th> <th>代际</th>
<th>建成/改造时间</th>
<th>发射度(nm.rad)</th> <th>发射度(nm.rad)</th>
<th>状态</th> <th>状态</th>
<th>建成时间</th>
</tr> </tr>
</thead> </thead>
<template v-if="modules[2].list.length"> <template v-if="modules[2].list.length">
@ -73,14 +73,14 @@
:key="i"> :key="i">
<td>{{ item.name }}</td> <td>{{ item.name }}</td>
<td>{{ item.country }}</td> <td>{{ item.country }}</td>
<td>{{ item.address }}</td>
<td>{{ item.gev }}</td> <td>{{ item.gev }}</td>
<td>{{ item.storage }}</td> <td>{{ item.storage }}</td>
<td>{{ item.stations }}</td> <td>{{ item.stations }}</td>
<td>{{ item.intergenerational }}</td> <td>{{ item.intergenerational }}</td>
<td>{{ item.time }}</td>
<td>{{ item.name }}</td>
<td>{{ item.emittance }}</td> <td>{{ item.emittance }}</td>
<td>{{ item.status }}</td> <td>{{ item.status }}</td>
<td>{{ item.time }}</td>
</tr> </tr>
</template> </template>
<tr v-else> <tr v-else>
@ -96,16 +96,16 @@
<thead> <thead>
<tr> <tr>
<th>光源名称</th> <th>光源名称</th>
<th>国家</th> <th>国家和地区</th>
<th>地点</th> <th>地点</th>
<th>加速器技术</th> <th>加速器技术</th>
<th>能量/GeV</th> <th>能量/GeV</th>
<th>波长范围/nm</th> <th>波长范围/nm</th>
<th>重复频率/Hz Repetition rate</th> <th>重复频率/Hz</th>
<th>设施长度/m Overall length</th> <th>设施长度/m</th>
<th>线站数量</th> <th>实验站/</th>
<th>状态</th> <th>状态</th>
<th>出光时间</th> <th>建成时间</th>
</tr> </tr>
</thead> </thead>
<template v-if="modules[3].list.length"> <template v-if="modules[3].list.length">

@ -142,9 +142,17 @@
<div class="scan-inner"> <div class="scan-inner">
<div class="left"> <div class="left">
<div class="c-wrap"> <div class="c-wrap">
<div class="line" <template v-for="(item, i) in modules[9].list">
v-for="(item, i) in modules[9].list" <div v-if="item.isEnable"
:key="i">{{ item.title }}</div> class="line"
:key="i">
<img v-if="item.pic"
:src="item.pic"
alt=""
class="icon">
<p class="text">{{ item.title }}</p>
</div>
</template>
<div class="cover" <div class="cover"
@click="toSet(9)">点击更换标题</div> @click="toSet(9)">点击更换标题</div>
</div> </div>
@ -375,31 +383,10 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 30px; margin-bottom: 30px;
&:before { .icon {
content: '';
min-width: 50px;
width: 50px; width: 50px;
height: 50px; height: 50px;
margin-right: 20px; margin-right: 20px;
background: url(http://10.10.11.7/images/overview/7.png) 0 0/100% 100% no-repeat;
}
&:nth-child(2):before {
background-image: url(http://10.10.11.7/images/overview/8.png);
}
&:nth-child(3):before {
background-image: url(http://10.10.11.7/images/overview/9.png);
}
&:nth-child(4):before {
background-image: url(http://10.10.11.7/images/overview/10.png);
}
&:nth-child(5):before {
background-image: url(http://10.10.11.7/images/overview/11.png);
}
&:nth-child(6):before {
background-image: url(http://10.10.11.7/images/overview/12.png);
}
&:nth-child(7):before {
background-image: url(http://10.10.11.7/images/overview/13.png);
} }
.text { .text {
font-size: 1rem; font-size: 1rem;

@ -58,9 +58,11 @@
</div> </div>
<p class="hot">热门岗位</p> <p class="hot">热门岗位</p>
<div class="labels"> <div class="labels">
<p v-for="(item, i) in modules[4].list" <template v-for="(item, i) in modules[4].list">
:key="i" <p v-if="item.isEnable"
class="label">{{ item.title }}</p> :key="i"
class="label">{{ item.title }}</p>
</template>
<div class="cover" <div class="cover"
@click="toSet(4)">点击更换标签</div> @click="toSet(4)">点击更换标签</div>
</div> </div>
@ -87,9 +89,11 @@
</div> </div>
<p class="hot">热门岗位</p> <p class="hot">热门岗位</p>
<div class="labels"> <div class="labels">
<p v-for="(item, i) in modules[7].list" <template v-for="(item, i) in modules[7].list">
:key="i" <p v-if="item.isEnable"
class="label">{{ item.title }}</p> :key="i"
class="label">{{ item.title }}</p>
</template>
<div class="cover" <div class="cover"
@click="toSet(7)">点击更换标签</div> @click="toSet(7)">点击更换标签</div>
</div> </div>

@ -1,208 +1,209 @@
.block { .block {
padding: 118px 0; padding: 118px 0;
.b-title { .b-title {
position: relative; position: relative;
margin-bottom: 50px; margin-bottom: 50px;
font-size: 50px; font-size: 50px;
font-family: SFProDisplay-Bold, SFProDisplay; font-family: SFProDisplay-Bold, SFProDisplay;
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
line-height: 60px; line-height: 60px;
text-align: center; text-align: center;
color: #1F1F1F; color: #1f1f1f;
&:after { &:after {
content: ''; content: '';
position: absolute; position: absolute;
top: 70px; top: 70px;
left: 50%; left: 50%;
width: 136px; width: 136px;
height: 4px; height: 4px;
transform: translateX(-50%); transform: translateX(-50%);
background: #1583FF; background: #1583ff;
}
}
.intro {
margin-bottom: 80px;
font-size: 30px;
text-align: center;
color: #5b5b5e;
line-height: 40px;
} }
}
.intro {
margin-bottom: 80px;
font-size: 30px;
text-align: center;
color: #5B5B5E;
line-height: 40px;
}
} }
.inner { .inner {
width: 1400px; width: 1400px;
margin: 0 auto; margin: 0 auto;
&.lg { &.lg {
width: 1505px; width: 1505px;
} }
} }
.banner { .banner {
height: 280px; height: 280px;
padding: 123px 0 0 243px; padding: 123px 0 0 243px;
font-size: 48px; font-size: 48px;
color: #fff; color: #fff;
} }
.single-banner { .single-banner {
position: relative; position: relative;
color: #fff; color: #fff;
.banner-img { .banner-img {
width: 100%; width: 100%;
height: 480px; height: 480px;
} }
.texts { .texts {
position: absolute; position: absolute;
top: 160px; top: 160px;
left: 267px; left: 267px;
} }
&.single-banner-overview .texts { &.single-banner-overview .texts {
top: 332px; top: 332px;
left: 278px; left: 278px;
} }
.banner-title { .banner-title {
margin-bottom: 19px; margin-bottom: 19px;
font-size: 48px; font-size: 48px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
} }
.banner-des { .banner-des {
font-size: 24px; font-size: 24px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
} }
} }
.gray { .gray {
background-color: #F2F6F8; background-color: #f2f6f8;
} }
.modules { .modules {
height: calc(100vh - 198px); height: calc(100vh - 198px);
overflow: auto; overflow: auto;
} }
.actions { .actions {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 20px; margin-bottom: 20px;
} }
.c-wrap { .c-wrap {
position: relative; position: relative;
} }
.cover { .cover {
z-index: 2; z-index: 2;
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
font-size: 22px; font-size: 22px;
white-space: nowrap; white-space: nowrap;
color: #fff; color: #fff;
background-color: rgba(0, 0, 0, .5); background-color: rgba(0, 0, 0, 0.5);
cursor: pointer; cursor: pointer;
&:hover { &:hover {
background-color: rgba(0, 0, 0, .7); background-color: rgba(0, 0, 0, 0.7);
} }
} }
/deep/.module { /deep/.module {
.el-table.module-table td { .el-table.module-table td {
.cell { .cell {
padding: 10px; padding: 10px;
} }
.link-wrap { .link-wrap {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
// flex-direction: column; // flex-direction: column;
}
.set-link {
margin-left: 10px;
}
.del {
margin-left: 5px;
font-size: 18px;
color: #333;
cursor: pointer;
}
} }
.set-link { .plus {
margin-left: 10px; margin-top: 10px;
} font-size: 20px;
.del { text-align: center;
margin-left: 5px; color: $main-color;
font-size: 18px; cursor: pointer;
color: #333;
cursor: pointer;
} }
}
.plus {
margin-top: 10px;
font-size: 20px;
text-align: center;
color: $main-color;
cursor: pointer;
}
} }
$avatar-width: 140px; $avatar-width: 140px;
$avatar-height: 80px; $avatar-height: 80px;
/deep/.upload-pic, /deep/.upload-none { /deep/.upload-pic,
width: $avatar-width; /deep/.upload-none {
height: $avatar-height; max-width: $avatar-width;
max-height: $avatar-height;
} }
/deep/.upload-none { /deep/.upload-none {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background-color: rgba(0, 0, 0, 0.04); background-color: rgba(0, 0, 0, 0.04);
i { i {
font-size: 20px; font-size: 20px;
color: #8c939d; color: #8c939d;
} }
} }
/deep/.uploader-wrap { /deep/.uploader-wrap {
display: flex; display: flex;
.del { .del {
margin-left: 5px; margin-left: 5px;
font-size: 18px; font-size: 18px;
cursor: pointer; cursor: pointer;
} }
} }
/deep/.uploader { /deep/.uploader {
.el-upload { .el-upload {
position: relative; position: relative;
width: $avatar-width; width: $avatar-width;
border: 1px dashed #d9d9d9; border: 1px dashed #d9d9d9;
border-radius: 2px; border-radius: 2px;
cursor: pointer; cursor: pointer;
overflow: hidden; overflow: hidden;
&:hover { &:hover {
border-color: #409EFF; border-color: #409eff;
} }
.uploader-default { .uploader-default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
width: $avatar-width !important; width: $avatar-width !important;
height: $avatar-height; height: $avatar-height;
text-align: center; text-align: center;
background: rgba(0, 0, 0, 0.04); background: rgba(0, 0, 0, 0.04);
i { i {
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
color: #8c939d; color: #8c939d;
} }
p { p {
margin-top: 10px; margin-top: 10px;
font-size: 14px; font-size: 14px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
line-height: 1; line-height: 1;
} }
}
.avatar {
display: block;
width: $avatar-width;
height: $avatar-height;
}
} }
.avatar { .el-upload__tip {
display: block; margin-top: 0;
width: $avatar-width; p {
height: $avatar-height; font-size: 14px;
color: rgba(0, 0, 0, 0.45);
line-height: 1;
&:first-child {
margin-bottom: 5px;
}
}
} }
} }
.el-upload__tip {
margin-top: 0;
p {
font-size: 14px;
color: rgba(0, 0, 0, 0.45);
line-height: 1;
&:first-child {
margin-bottom: 5px;
}
}
}
}

Loading…
Cancel
Save