@ -8,32 +8,38 @@
< / div >
< / div >
< div class = "relative" >
< div class = "relative" >
< img width = "100%" height = "500" src = "@/assets/images/channel/channel-bg.png" alt = "" >
< el -carousel height = "500px" >
< template v-for ="(item, i) in modules[0].list" >
< el -carousel -item v-if ="item.pic" :key ="i" >
< img width = "100%" height = "100%" :src ="item.pic" alt = "" >
< / e l - c a r o u s e l - i t e m >
< / template >
< / e l - c a r o u s e l >
< div class = "cover" @click ="toSet(0)" > 点击更换banner与链接 < / div >
< div class = "cover" @click ="toSet(0)" > 点击更换banner与链接 < / div >
< / div >
< / div >
< div class = "block" >
< div class = "block" >
< div class = "inner" >
< div class = "inner" >
< div class = "c-wrap" >
< div class = "c-wrap" >
< h2 class = "b-title" > OUR FACILITIES < / h2 >
< h2 class = "b-title" > { { modules [ 1 ] . form . title || 'OUR FACILITIES' } } < / h2 >
< p class = "intro" > IASF will carry a world - class light source research park by operating a synchrotron radiation facility and a soft X - ray Superconducting free - electron laser facility . < / p >
< p class = "intro" > { { modules [ 1 ] . form . des || 'IASF will carry a world-class light source research park by operating a synchrotron radiation facility and a soft X-ray Superconducting free-electron laser facility.' } } < / p >
< div class = "cover" @click ="toSet(1)" > 点击更换标题与描述 < / div >
< div class = "cover" @click ="toSet(1)" > 点击更换标题与描述 < / div >
< / div >
< / div >
< ul class = "card" >
< ul class = "card" >
< li >
< li >
< img width = "100%" src = "@/assets/images/channel/channel1.png " alt = "" >
< img width = "100%" :src ="modules[2].form.pic " alt = "" >
< div class = "texts" >
< div class = "texts" >
< h6 > Shenzhen Innovation Lightsource Facility < / h6 >
< h6 > { { modules [ 2 ] . form . title || 'Shenzhen Innovation Lightsource Facility ' } } < / h6 >
< p class = "des" > The Shenzhen synchrotron radiation facility has a fourth - generation diffraction - limited storage ring with an electron energy of 3 GeV at a low emittance of 50 - 150 pm · rad , and it provides photons with broad range energy from 4 meV to 160 keV . < / p >
< p class = "des" > { { modules [ 2 ] . form . des || 'The Shenzhen synchrotron radiation facility has a fourth-generation diffraction-limited storage ring with an electron energy of 3 GeV at a low emittance of 50-150 pm·rad, and it provides photons with broad range energy from 4 meV to 160 keV.' } } < / p >
< img class = "arrow" src = "@/assets/images/channel/arrow.png" alt = "" >
< img class = "arrow" src = "@/assets/images/channel/arrow.png" alt = "" >
< / div >
< / div >
< div class = "cover" @click ="toSet(2)" > 点击更改图片 、 标题概述与链接 < / div >
< div class = "cover" @click ="toSet(2)" > 点击更改图片 、 标题概述与链接 < / div >
< / li >
< / li >
< li >
< li >
< img width = "100%" src = "@/assets/images/channel/channel2.png " alt = "" >
< img width = "100%" :src ="modules[3].form.pic " alt = "" >
< div class = "texts" >
< div class = "texts" >
< h6 > Shenzhen Innovation Lightsource Facility < / h6 >
< h6 > { { modules [ 3 ] . form . title || 'Shenzhen Innovation Lightsource Facility ' } } < / h6 >
< p class = "des" > The Shenzhen synchrotron radiation facility has a fourth - generation diffraction - limited storage ring with an electron energy of 3 GeV at a low emittance of 50 - 150 pm · rad , and it provides photons with broad range energy from 4 meV to 160 keV . < / p >
< p class = "des" > { { modules [ 3 ] . form . des || 'The Shenzhen synchrotron radiation facility has a fourth-generation diffraction-limited storage ring with an electron energy of 3 GeV at a low emittance of 50-150 pm·rad, and it provides photons with broad range energy from 4 meV to 160 keV.' } } < / p >
< img class = "arrow" src = "@/assets/images/channel/arrow.png" alt = "" >
< img class = "arrow" src = "@/assets/images/channel/arrow.png" alt = "" >
< / div >
< / div >
< div class = "cover" @click ="toSet(3)" > 点击更改图片 、 标题概述与链接 < / div >
< div class = "cover" @click ="toSet(3)" > 点击更改图片 、 标题概述与链接 < / div >
@ -45,8 +51,8 @@
< div class = "block news-block" >
< div class = "block news-block" >
< div class = "inner" >
< div class = "inner" >
< div class = "c-wrap" >
< div class = "c-wrap" >
< h2 class = "b-title" > Latest information < / h2 >
< h2 class = "b-title" > { { modules [ 4 ] . form . title || 'Latest information' } } < / h2 >
< p class = "intro" > Keep up with what happen with IASF < / p >
< p class = "intro" > { { modules [ 4 ] . form . des || 'Keep up with what happen with IASF' } } < / p >
< div class = "cover" @click ="toSet(4)" > 点击更换标题与描述 < / div >
< div class = "cover" @click ="toSet(4)" > 点击更换标题与描述 < / div >
< / div >
< / div >
< ul class = "news" >
< ul class = "news" >
@ -106,32 +112,16 @@
< div class = "block" >
< div class = "block" >
< div class = "inner" >
< div class = "inner" >
< div class = "c-wrap" >
< div class = "c-wrap" >
< h2 class = "b-title" > Light Chasers ' Home at IASF < / h2 >
< h2 class = "b-title" > { { modules [ 6 ] . form . title || "Light Chasers' Home at IASF" } } < / h2 >
< p class = "intro" > Keep up with what happen with IASF < / p >
< p class = "intro" > { { modules [ 6 ] . form . des || 'Keep up with what happen with IASF' } } < / p >
< div class = "cover" @click ="toSet(6)" > 点击更换标题与描述 < / div >
< div class = "cover" @click ="toSet(6)" > 点击更换标题与描述 < / div >
< / div >
< / div >
< ul class = "people" >
< ul class = "people" >
< li >
< li v-for ="(item, i) in modules[7].list" :key ="i" >
< img class = "pic" src = "@/assets/images/channel/channel1.png" alt = "" >
< img class = "pic" :src ="item.pic" alt = "" >
< div class = "texts" >
< h6 > Shenzhen Innovation Lightsource Facility < / h6 >
< p class = "des" > The Shenzhen synchrotron radiation facility has a fourth - generation diffraction - limited storage ring with an electron energy of 3 GeV at a low emittance of 50 - 150 pm · rad , and it provides photons with broad range energy from 4 meV to 160 keV . < / p >
< img class = "arrow" src = "@/assets/images/channel/arrow.png" alt = "" >
< / div >
< / li >
< li >
< div class = "texts" >
< div class = "texts" >
< h6 > Shenzhen Innovation Lightsource Facility < / h6 >
< h6 > { { item . title || 'Shenzhen Innovation Lightsource Facility ' } } < / h6 >
< p class = "des" > The Shenzhen synchrotron radiation facility has a fourth - generation diffraction - limited storage ring with an electron energy of 3 GeV at a low emittance of 50 - 150 pm · rad , and it provides photons with broad range energy from 4 meV to 160 keV . < / p >
< p class = "des" > { { item . des || 'The Shenzhen synchrotron radiation facility has a fourth-generation diffraction-limited storage ring with an electron energy of 3 GeV at a low emittance of 50-150 pm·rad, and it provides photons with broad range energy from 4 meV to 160 keV.' } } < / p >
< img class = "arrow" src = "@/assets/images/channel/arrow.png" alt = "" >
< / div >
< img class = "pic" src = "@/assets/images/channel/channel2.png" alt = "" >
< / li >
< li >
< img class = "pic" src = "@/assets/images/channel/channel1.png" alt = "" >
< div class = "texts" >
< h6 > Shenzhen Innovation Lightsource Facility < / h6 >
< p class = "des" > The Shenzhen synchrotron radiation facility has a fourth - generation diffraction - limited storage ring with an electron energy of 3 GeV at a low emittance of 50 - 150 pm · rad , and it provides photons with broad range energy from 4 meV to 160 keV . < / p >
< img class = "arrow" src = "@/assets/images/channel/arrow.png" alt = "" >
< img class = "arrow" src = "@/assets/images/channel/arrow.png" alt = "" >
< / div >
< / div >
< / li >
< / li >
@ -144,10 +134,8 @@
< div class = "inner" >
< div class = "inner" >
< img src = "@/assets/images/channel/about.png" alt = "" >
< img src = "@/assets/images/channel/about.png" alt = "" >
< div class = "line" > < / div >
< div class = "line" > < / div >
< div class = "text" > ABOUT < / div >
< div class = "text" > { { modules [ 8 ] . form . title || 'ABOUT' } } < / div >
< div class = "des" >
< div class = "des" > { { modules [ 8 ] . form . des || 'The Institute of Advanced Science Facilities in Shenzhen, China is home to world-class science, world-class facilities, and world-class people. Located 25 miles east of Shenzhen city center, on a 1.2 acre campus, IASF has over three hundred researchers and support staff.…' } } < / div >
< p > The Institute of Advanced Science Facilities in Shenzhen , China is home to world - class science , world - class facilities , and world - class people . Located 25 miles east of Shenzhen city center , on a 1.2 acre campus , IASF has over three hundred researchers and support staff . … < / p >
< / div >
< / div >
< / div >
< div class = "cover" @click ="toSet(8)" > 点击更换标题与描述 < / div >
< div class = "cover" @click ="toSet(8)" > 点击更换标题与描述 < / div >
< / div >
< / div >
@ -155,45 +143,45 @@
< div class = "block" style = "padding-bottom: 0" >
< div class = "block" style = "padding-bottom: 0" >
< div class = "inner" >
< div class = "inner" >
< div class = "c-wrap" >
< div class = "c-wrap" >
< h2 class = "glance" > IASF at a glance < / h2 >
< h2 class = "glance" > { { modules [ 9 ] . form . title || 'IASF at a glance' } } < / h2 >
< div class = "cover" @click ="toSet(9)" > 点击更换标题与描述 < / div >
< div class = "cover" @click ="toSet(9)" > 点击更换标题与描述 < / div >
< / div >
< / div >
< ul class = "stat" >
< ul class = "stat" >
< li >
< li >
< p class = "num" > 2020 < / p >
< p class = "num" > { { modules [ 10 ] . form . title } } < / p >
< p class = "text" > The year IASF was founded < / p >
< p class = "text" > { { modules [ 10 ] . form . des } } < / p >
< div class = "cover" @click ="toSet(10)" > 点击更换标题与描述 < / div >
< div class = "cover" @click ="toSet(10)" > 点击更换标题与描述 < / div >
< / li >
< / li >
< li >
< li >
< p class = "num" > 2 < / p >
< p class = "num" > { { modules [ 11 ] . form . title } } < / p >
< p class = "text" > Facility projects < / p >
< p class = "text" > { { modules [ 11 ] . form . des } } < / p >
< div class = "cover" @click ="toSet(10 )" > 点击更换标题与描述 < / div >
< div class = "cover" @click ="toSet(11 )" > 点击更换标题与描述 < / div >
< / li >
< / li >
< li >
< li >
< p class = "num" > 240 < / p >
< p class = "num" > { { modules [ 12 ] . form . title } } < / p >
< p class = "text" > Employees < / p >
< p class = "text" > { { modules [ 12 ] . form . des } } < / p >
< div class = "cover" @click ="toSet(10 )" > 点击更换标题与描述 < / div >
< div class = "cover" @click ="toSet(12 )" > 点击更换标题与描述 < / div >
< / li >
< / li >
< li >
< li >
< p class = "num" > 10 < / p >
< p class = "num" > { { modules [ 13 ] . form . title } } < / p >
< p class = "text" > Academicians < / p >
< p class = "text" > { { modules [ 13 ] . form . des } } < / p >
< div class = "cover" @click ="toSet(10 )" > 点击更换标题与描述 < / div >
< div class = "cover" @click ="toSet(13 )" > 点击更换标题与描述 < / div >
< / li >
< / li >
< li >
< li >
< p class = "num" > 45 % < / p >
< p class = "num" > { { modules [ 14 ] . form . title } } < / p >
< p class = "text" > Hold doctorates or the highest degree in their field < / p >
< p class = "text" > { { modules [ 14 ] . form . des } } < / p >
< div class = "cover" @click ="toSet(10 )" > 点击更换标题与描述 < / div >
< div class = "cover" @click ="toSet(14 )" > 点击更换标题与描述 < / div >
< / li >
< / li >
< li >
< li >
< p class = "num" > $32B + < / p >
< p class = "num" > { { modules [ 15 ] . form . title } } < / p >
< p class = "text" > Facility construction need - based grant aid provided < / p >
< p class = "text" > { { modules [ 15 ] . form . des } } < / p >
< div class = "cover" @click ="toSet(10 )" > 点击更换标题与描述 < / div >
< div class = "cover" @click ="toSet(15 )" > 点击更换标题与描述 < / div >
< / li >
< / li >
< / ul >
< / ul >
< / div >
< / div >
< / div >
< / div >
< Module :data.sync ="modules[curModule] " :visible.sync ="diaVisible" / >
< Module :data.sync ="curData " :visible.sync ="diaVisible" @moduleSubmit ="moduleSubmit " / >
< / div >
< / div >
< / template >
< / template >
@ -206,13 +194,14 @@ export default {
return {
return {
userId : + this . $store . state . user . userId ,
userId : + this . $store . state . user . userId ,
site : this . $store . state . content . site ,
site : this . $store . state . content . site ,
id : + this . $route . query . id ,
id : '' ,
columnId : + this . $route . query . id ,
modules : [
modules : [
{
{
type : 'banner' ,
type : 'banner' ,
list : [
list : [
{
{
pic : '',
pic : require ( '@/assets/images/channel/channel-bg.png ') ,
link : {
link : {
linkName : '无' ,
linkName : '无' ,
connectionType : 1 ,
connectionType : 1 ,
@ -270,7 +259,7 @@ export default {
}
}
] ,
] ,
form : {
form : {
pic : '',
pic : require ( '@/assets/images/channel/channel1.png ') ,
title : '' ,
title : '' ,
link : {
link : {
linkName : '无' ,
linkName : '无' ,
@ -307,7 +296,7 @@ export default {
}
}
] ,
] ,
form : {
form : {
pic : '',
pic : require ( '@/assets/images/channel/channel1.png ') ,
title : '' ,
title : '' ,
link : {
link : {
linkName : '无' ,
linkName : '无' ,
@ -411,8 +400,9 @@ export default {
} ,
} ,
list : [
list : [
{
{
pic : '',
pic : require ( '@/assets/images/channel/channel1.png ') ,
title : '' ,
title : '' ,
subTitle : '' ,
link : {
link : {
linkName : '无' ,
linkName : '无' ,
connectionType : 1 ,
connectionType : 1 ,
@ -433,13 +423,24 @@ export default {
required : true
required : true
} ,
} ,
{
{
type : 'textarea' ,
type : 'link' ,
prop : 'link' ,
label : '链接'
} ,
{
type : 'editor' ,
prop : 'des' ,
prop : 'des' ,
label : '概述'
label : '概述' ,
required : true
}
}
] ,
] ,
form : {
form : {
title : '' ,
title : '' ,
link : {
linkName : '无' ,
connectionType : 1 ,
linkAddress : '' ,
} ,
des : ''
des : ''
}
}
} ,
} ,
@ -479,33 +480,155 @@ export default {
}
}
] ,
] ,
form : {
form : {
title : '' ,
title : '2020' ,
des : ''
des : 'The year IASF was founded'
}
} ,
{
type : 'form' ,
forms : [
{
type : 'input' ,
prop : 'title' ,
label : '标题' ,
required : true
} ,
{
type : 'textarea' ,
prop : 'des' ,
label : '概述'
}
] ,
form : {
title : '2' ,
des : 'Facility projects'
}
} ,
{
type : 'form' ,
forms : [
{
type : 'input' ,
prop : 'title' ,
label : '标题' ,
required : true
} ,
{
type : 'textarea' ,
prop : 'des' ,
label : '概述'
}
] ,
form : {
title : '240' ,
des : 'Employees'
}
} ,
{
type : 'form' ,
forms : [
{
type : 'input' ,
prop : 'title' ,
label : '标题' ,
required : true
} ,
{
type : 'textarea' ,
prop : 'des' ,
label : '概述'
}
] ,
form : {
title : '10' ,
des : 'Academicians'
}
} ,
{
type : 'form' ,
forms : [
{
type : 'input' ,
prop : 'title' ,
label : '标题' ,
required : true
} ,
{
type : 'textarea' ,
prop : 'des' ,
label : '概述'
}
] ,
form : {
title : '45%' ,
des : 'Hold doctorates or the highest degree in their field'
}
} ,
{
type : 'form' ,
forms : [
{
type : 'input' ,
prop : 'title' ,
label : '标题' ,
required : true
} ,
{
type : 'textarea' ,
prop : 'des' ,
label : '概述'
}
] ,
form : {
title : '$32B+' ,
des : 'Facility construction need-based grant aid provided '
}
}
} ,
} ,
] ,
] ,
diaVisible : false ,
diaVisible : false ,
curModule : 0
curModule : 0 ,
curData : { } ,
edited : false
}
}
} ,
} ,
components : {
components : {
Module ,
Module ,
} ,
} ,
watch : {
'$route' ( ) {
this . id = this . $route . query . id
/ / t h i s . g e t I n f o ( )
}
} ,
mounted ( ) {
mounted ( ) {
this . getInfo ( )
} ,
} ,
methods : {
methods : {
/ / 获 取 详 情
getInfo ( ) {
this . modules . map ( e => {
const { type } = e
/ / 克 隆 一 个 原 始 r o w , 方 便 添 加
if ( type === 'banner' || type === 'introduce' ) {
const data = JSON . parse ( JSON . stringify ( e . list [ 0 ] ) )
data . pic = ''
e . originForm = data
}
} )
this . $post ( ` ${ this . api . findPage } ?columnId= ${ this . columnId } ` ) . then ( ( { data } ) => {
if ( data . length ) {
this . id = data [ 0 ] . id
this . edited = true
}
} ) . catch ( err => { } )
} ,
/ / 展 开 模 块 设 置
/ / 展 开 模 块 设 置
toSet ( i ) {
toSet ( i ) {
this . curModule = i
this . curModule = i
this . curData = JSON . parse ( JSON . stringify ( this . modules [ i ] ) )
this . diaVisible = true
this . diaVisible = true
} ,
} ,
/ / 模 块 设 置 提 交
moduleSubmit ( ) {
this . diaVisible = false
this . modules [ this . curModule ] = this . curData
console . log ( "🚀 ~ file: index.vue ~ line 520 ~ moduleSubmit ~ this.modules[this.curModule]" , this . modules [ this . curModule ] )
} ,
/ / 处 理 预 览 和 保 存 的 j s o n
/ / 处 理 预 览 和 保 存 的 j s o n
handleJson ( ) {
handleJson ( ) {
const list = JSON . parse ( JSON . stringify ( this . modules ) )
const list = JSON . parse ( JSON . stringify ( this . modules ) )
@ -517,7 +640,7 @@ export default {
/ / 预 览
/ / 预 览
preview ( ) {
preview ( ) {
this . $post ( this . api . saveRedisPage , {
this . $post ( this . api . saveRedisPage , {
columnId : this . i d,
columnId : this . columnI d,
json : this . handleJson ( )
json : this . handleJson ( )
} ) . then ( ( { data } ) => {
} ) . then ( ( { data } ) => {
@ -525,15 +648,19 @@ export default {
} ,
} ,
/ / 保 存
/ / 保 存
save ( state ) {
save ( state ) {
this . $post ( this . api . savePage , {
const json = this . handleJson ( )
columnId : this . id ,
const data = {
id : this . id ,
columnId : this . columnId ,
state ,
state ,
sort : 1 ,
sort : 1 ,
founderId : this . userId ,
founderId : this . userId ,
editorId : this . userId ,
editorId : this . userId ,
jsonBeforeEditing : this . handleJson ( ) ,
jsonBeforeEditing : json
theEditedJson : this . handleJson ( ) ,
}
} ) . then ( ( { data } ) => {
debugger
if ( state ) data . theEditedJson = json
this . $post ( this . api [ this . edited ? 'updatePage' : 'savePage' ] , data ) . then ( ( { data } ) => {
} ) . catch ( err => { } )
} ) . catch ( err => { } )
}
}
@ -649,6 +776,9 @@ export default {
display : flex ;
display : flex ;
justify - content : space - between ;
justify - content : space - between ;
margin - bottom : 126 px ;
margin - bottom : 126 px ;
& : nth - child ( even ) {
flex - direction : row - reverse ;
}
}
}
. pic {
. pic {
width : 660 px ;
width : 660 px ;
@ -732,6 +862,7 @@ export default {
}
}
}
}
. cover {
. cover {
z - index : 2 ;
position : absolute ;
position : absolute ;
top : 0 ;
top : 0 ;
right : 0 ;
right : 0 ;
@ -777,6 +908,21 @@ export default {
}
}
$avatar - width : 140 px ;
$avatar - width : 140 px ;
$avatar - height : 80 px ;
$avatar - height : 80 px ;
/deep/ . upload - pic , /deep/ . upload - none {
width : $avatar - width ;
height : $avatar - height ;
margin - bottom : 10 px ;
}
/deep/ . upload - none {
display : flex ;
justify - content : center ;
align - items : center ;
background - color : rgba ( 0 , 0 , 0 , 0.04 ) ;
i {
font - size : 20 px ;
color : # 8 c939d ;
}
}
/deep/ . uploader {
/deep/ . uploader {
. el - upload {
. el - upload {
position : relative ;
position : relative ;