Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
E
exhibition_page
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
龙菲
exhibition_page
Commits
c952fb11
提交
c952fb11
authored
7月 14, 2022
作者:
龙菲
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:文物列表增加3D表示、增加音频播放、增加查看3D模型
上级
8408180d
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
689 行增加
和
145 行删除
+689
-145
3d-black.png
src/assets/imgs/cr/3d-black.png
+0
-0
3d.png
src/assets/imgs/cr/3d.png
+0
-0
index.vue
src/components/AudioPlayer/index.vue
+110
-0
index.vue
src/components/NavBar/index.vue
+8
-2
request.js
src/utils/request.js
+11
-8
Detail.vue
src/views/culturalRelic/Detail.vue
+123
-47
index-old.vue
src/views/culturalRelic/index-old.vue
+305
-0
index.vue
src/views/culturalRelic/index.vue
+89
-72
index.vue
src/views/display/index.vue
+41
-15
index.vue
src/views/login/index.vue
+2
-1
没有找到文件。
src/assets/imgs/cr/3d-black.png
0 → 100644
浏览文件 @
c952fb11
5.5 KB
src/assets/imgs/cr/3d.png
0 → 100644
浏览文件 @
c952fb11
5.2 KB
src/components/AudioPlayer/index.vue
0 → 100644
浏览文件 @
c952fb11
<
template
>
<audio
ref=
"audio"
@
pause=
"onPause"
@
play=
"onPlay"
@
timeupdate=
"onTimeupdate"
@
loadedmetadata=
"onLoadedmetadata"
:src=
"url"
controls=
"controls"
></audio>
<!-- 音频播放控件 -->
<!--
<div>
-->
<!--
<el-button
type=
"text"
@
click=
"startPlayOrPause"
>
{{
audio
.
playing
|
transPlayPause
}}
</el-button>
-->
<!--
<el-tag
type=
"info"
>
{{
audio
.
currentTime
|
formatSecond
}}
</el-tag>
-->
<!--
<el-tag
type=
"info"
>
{{
audio
.
maxTime
|
formatSecond
}}
</el-tag>
-->
<!--
</div>
-->
</
template
>
<
script
>
// 将整数转换成 时:分:秒的格式
function
realFormatSecond
(
second
)
{
var
secondType
=
typeof
second
;
if
(
secondType
===
"number"
||
secondType
===
"string"
)
{
second
=
parseInt
(
second
);
var
hours
=
Math
.
floor
(
second
/
3600
);
second
=
second
-
hours
*
3600
;
var
mimute
=
Math
.
floor
(
second
/
60
);
second
=
second
-
mimute
*
60
;
return
(
hours
+
":"
+
(
"0"
+
mimute
).
slice
(
-
2
)
+
":"
+
(
"0"
+
second
).
slice
(
-
2
)
);
}
else
{
return
"0:00:00"
;
}
}
export
default
{
name
:
"AudioPlayer"
,
props
:
{
url
:
String
,
},
data
()
{
return
{
audio
:
{
// 该字段是音频是否处于播放状态的属性
playing
:
false
,
// 音频当前播放时长
currentTime
:
0
,
// 音频最大播放时长
maxTime
:
0
,
},
};
},
methods
:
{
// 控制音频的播放与暂停
startPlayOrPause
()
{
return
this
.
audio
.
playing
?
this
.
pause
()
:
this
.
play
();
},
// 播放音频
play
()
{
this
.
$refs
.
audio
.
play
();
},
// 暂停音频
pause
()
{
this
.
$refs
.
audio
.
pause
();
},
// 当音频播放
onPlay
()
{
this
.
audio
.
playing
=
true
;
},
// 当音频暂停
onPause
()
{
this
.
audio
.
playing
=
false
;
},
// 当timeupdate事件大概每秒一次,用来更新音频流的当前播放时间
onTimeupdate
(
res
)
{
console
.
log
(
"timeupdate"
);
console
.
log
(
res
);
this
.
audio
.
currentTime
=
res
.
target
.
currentTime
;
},
// 当加载语音流元数据完成后,会触发该事件的回调函数
// 语音元数据主要是语音的长度之类的数据
onLoadedmetadata
(
res
)
{
console
.
log
(
"loadedmetadata"
);
console
.
log
(
res
);
this
.
audio
.
maxTime
=
parseInt
(
res
.
target
.
duration
);
},
},
filters
:
{
// 使用组件过滤器来动态改变按钮的显示
transPlayPause
(
value
)
{
return
value
?
"暂停"
:
"播放"
;
},
// 将整数转化成时分秒
formatSecond
(
second
=
0
)
{
return
realFormatSecond
(
second
);
},
},
};
</
script
>
<
style
>
</
style
>
src/components/NavBar/index.vue
浏览文件 @
c952fb11
...
...
@@ -15,8 +15,11 @@
</div>
<div
class=
"operation"
>
<span
v-if=
"hasToken"
class=
"operation-item"
>
欢迎你,
{{
userInfo
.
username
}}
</span>
<router-link
v-if=
"!hasToken"
to=
"/login"
class=
"operation-item"
<
!--
<
router-link
v-if=
"!hasToken"
to=
"/login"
class=
"operation-item"
>
登陆
</router-link
>
-->
<span
v-if=
"!hasToken"
@
click=
"handleToLogin"
class=
"operation-item"
>
登陆
</span
>
<router-link
v-if=
"hasToken"
to=
"/personal"
class=
"operation-item"
>
个人中心
</router-link
...
...
@@ -89,10 +92,13 @@ export default {
};
},
methods
:
{
handleToLogin
(){
this
.
$router
.
push
(
'/login?redirect='
+
this
.
$route
.
fullPath
)
},
async
handleLogOut
()
{
await
this
.
$store
.
dispatch
(
"user/logout"
);
this
.
logoutDialogVisible
=
false
;
this
.
$router
.
push
(
`/login?redirect=
${
this
.
$route
.
fullPath
}
`
);
//
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
},
handleClickTab
(
tab
)
{
this
.
currentTab
=
tab
;
...
...
src/utils/request.js
浏览文件 @
c952fb11
...
...
@@ -64,14 +64,17 @@ service.interceptors.response.use(
})
// 401001l令牌过期;
if
(
res
.
code
===
401001
)
{
MessageBox
.
confirm
(
'登录令牌已过期,请重新登录'
,
'确认退出'
,
{
confirmButtonText
:
'重新登录'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
store
.
dispatch
(
'user/resetToken'
).
then
(()
=>
{
location
.
reload
()
})
// MessageBox.confirm('登录令牌已过期,请重新登录', '确认退出', {
// confirmButtonText: '重新登录',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// store.dispatch('user/resetToken').then(() => {
// location.reload()
// })
// })
store
.
dispatch
(
'user/resetToken'
).
then
(()
=>
{
// location.reload()
})
}
// 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
...
...
src/views/culturalRelic/Detail.vue
浏览文件 @
c952fb11
...
...
@@ -10,7 +10,12 @@
</div>
-->
<div
class=
"wrapper"
>
<div
class=
"back"
>
<el-button
type=
"text"
icon=
"el-icon-arrow-left"
@
click
.
native=
"handleBack"
>
返回上页
</el-button>
<el-button
type=
"text"
icon=
"el-icon-arrow-left"
@
click
.
native=
"handleBack"
>
返回上页
</el-button
>
</div>
<div
class=
"detail-container"
>
<div
class=
"cr-images"
>
...
...
@@ -43,37 +48,49 @@
</div>
</div>
<div
class=
"relic-info"
>
<div
class=
"info-title"
>
<div
class=
"info-title"
>
<h3>
{{
CRDetail
.
name
}}
</h3>
<AudioPlayer
:url=
"CRDetail.audiosVo[0].url"
ref=
"AudioPlayer"
v-if=
"CRDetail.audiosVo && CRDetail.audiosVo.length > 0"
/>
<!--
<audio
ref=
"audio"
@
pause=
"onPause"
@
play=
"onPlay"
@
timeupdate=
"onTimeupdate"
@
loadedmetadata=
"onLoadedmetadata"
:src=
"CRDetail.audios[0]"
controls=
"controls"
></audio>
-->
<!--
<vue-audio
:file=
"CRDetail.audios[0]"
/>
-->
<!--
<i
class=
"el-icon-video-play play"
></i>
-->
<!--
<div
class=
"operation"
>
<el-button
type=
"text"
icon=
"el-icon-star-off"
>
收藏
</el-button>
<el-button
type=
"text"
>
点赞
</el-button>
<el-button
type=
"text"
>
转发
</el-button>
</div>
-->
</div>
<div
class=
"info-body"
v-if=
"Object.keys(dict).length > 0"
>
<div
class=
"info-body"
>
<div
class=
"basic-info"
>
<div
class=
"body-item"
>
<span
class=
"label"
>
年份
</span>
<span
class=
"value"
>
{{
CRDetail
.
years
}}
</span>
<span
class=
"value"
>
{{
CRDetail
.
years
Label
}}
</span>
</div>
<div
class=
"body-item"
>
<span
class=
"label"
>
类别
</span>
<span
class=
"value"
>
{{
dict
.
culturalRelicType
[
CRDetail
.
type
]
}}
</span>
<span
class=
"value"
>
{{
CRDetail
.
typeLabel
}}
</span>
</div>
<div
class=
"body-item"
>
<span
class=
"label"
>
级别
</span>
<span
class=
"value"
>
{{
dict
.
culturalRelicLevel
[
CRDetail
.
level
]
}}
</span>
<span
class=
"value"
>
{{
CRDetail
.
levelLabel
}}
</span>
</div>
<div
class=
"body-item"
>
<span
class=
"label"
>
质地
</span>
<span
class=
"value"
>
{{
dict
.
cultural_relic_texture
[
CRDetail
.
textureType
]
}}
</span>
<span
class=
"value"
>
{{
CRDetail
.
textureTypeLabel
}}
</span>
</div>
<div
class=
"body-item"
>
<span
class=
"label"
>
尺寸
</span>
...
...
@@ -86,10 +103,27 @@
</div>
<div
class=
"qrcode"
ref=
"qrCodeUrl"
></div>
</div>
<div
class=
"view-3d"
@
click=
"handleTo3D"
v-if=
"CRDetail.url3d"
>
<img
src=
"@/assets/imgs/cr/3d-black.png"
alt=
""
srcset=
""
width=
"24px"
height=
"24px"
/>
<span>
查看3D模型
</span>
</div>
</div>
</div>
<div
class=
"relate-book marginBottom32"
>
<div
class=
"margin-bottom-32"
>
<CustomTitle
text=
"文物简介"
/>
<div
class=
"intro text-indent"
>
{{
CRDetail
.
intro
}}
</div>
</div>
<div
class=
"relate-book margin-bottom-32"
>
<CustomTitle
text=
"相关文献"
/>
<div
class=
"book-item"
...
...
@@ -101,7 +135,7 @@
<span>
{{
item
.
source
}}
</span>
</div>
</div>
<!--
<div
class=
"relate-cultual-relic margin
Bottom
32"
>
<!--
<div
class=
"relate-cultual-relic margin
-bottom-
32"
>
<CustomTitle
text=
"关联文物"
/>
<div
class=
"display-group"
>
<div
...
...
@@ -127,30 +161,46 @@
</div>
</div>
</div>
</div>
<div
class=
"relate-video marginBottom32"
>
<CustomTitle
text=
"关联视频"
/>
<div
class=
"video-container"
>
<div
class=
"video-box"
>
<video
src=
""
></video>
</div>
<div
class=
"info-box"
>
<h4
class=
"name"
>
海龙屯藏品一块砖
</h4>
<div
class=
"source"
>
明(1368-1644)
</div>
</div>
</div>
</div>
-->
<div
class=
"relate-video margin-bottom-32"
v-if=
"CRDetail.videosVo && CRDetail.videosVo.length > 0"
>
<CustomTitle
text=
"关联视频"
/>
<el-carousel
:interval=
"4000"
type=
"card"
height=
"400px"
>
<el-carousel-item
v-for=
"item in CRDetail.videosVo"
:key=
"item.fileId"
>
<div
class=
"video-container"
>
<div
class=
"video-box"
>
<!--
<video
:src=
"item.url"
style=
"height: auto; width: 100%"
controls
loop
></video>
-->
<Video
:url=
"item.url"
/>
</div>
<div
class=
"info-box"
>
<h4
class=
"name"
>
{{
item
.
name
.
split
(
"."
)[
0
]
}}
</h4>
</div>
</div>
</el-carousel-item>
</el-carousel>
</div>
</div>
</div>
</
template
>
<
script
>
import
SearchBar
from
"@/components/SearchBar"
;
import
AudioPlayer
from
"@/components/AudioPlayer"
;
import
CustomTitle
from
"@/components/CustomTitle"
;
import
QRCode
from
"qrcodejs2"
;
import
{
getRCDetailById
}
from
"@/api/culturalRelic"
;
export
default
{
components
:
{
SearchBar
,
CustomTitle
},
components
:
{
SearchBar
,
CustomTitle
,
AudioPlayer
},
data
()
{
return
{
options
:
[
...
...
@@ -165,28 +215,22 @@ export default {
slideImageWidth
:
""
,
};
},
dicts
:
[
"culturalRelicYears"
,
"cultural_relic_texture"
,
"culturalRelicType"
,
"culturalRelicLevel"
,
],
mounted
()
{
this
.
creatQrCode
();
this
.
loadDetail
();
},
methods
:
{
creatQrCode
()
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
var
qrcode
=
new
QRCode
(
this
.
$refs
.
qrCodeUrl
,
{
text
:
"http://www.gzmuseum.com/"
,
// 需要转换为二维码的内容
width
:
100
,
height
:
100
,
colorDark
:
"#000000"
,
colorLight
:
"#ffffff"
,
correctLevel
:
QRCode
.
CorrectLevel
.
H
,
text
:
"http://www.gzmuseum.com/"
,
// 需要转换为二维码的内容
width
:
100
,
height
:
100
,
colorDark
:
"#000000"
,
colorLight
:
"#ffffff"
,
correctLevel
:
QRCode
.
CorrectLevel
.
H
,
});
});
})
},
async
loadDetail
()
{
let
crId
=
this
.
$route
.
params
.
crId
;
...
...
@@ -194,12 +238,19 @@ export default {
let
res
=
await
getRCDetailById
({
crId
});
if
(
res
.
code
==
0
)
{
this
.
CRDetail
=
res
.
data
;
// debugger
// console.log('1222',this.$refs['AudioPlayer']);
// this.$refs.auido.play();
}
}
},
handleBack
(){
this
.
$router
.
go
(
-
1
)
}
handleBack
()
{
this
.
$router
.
go
(
-
1
);
},
handleTo3D
()
{
window
.
open
(
this
.
CRDetail
.
url3d
,
"_blank"
);
},
},
};
</
script
>
...
...
@@ -278,8 +329,13 @@ $label: #9f9c9a;
.info-title
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
//
justify-content: space-between;
margin-bottom
:
40px
;
.play
{
margin-left
:
10px
;
font-size
:
32px
;
cursor
:
pointer
;
}
}
.info-body
{
display
:
flex
;
...
...
@@ -300,6 +356,22 @@ $label: #9f9c9a;
}
}
}
.view-3d
{
margin-top
:
32px
;
padding
:
6px
10px
;
width
:
100%
;
background-color
:
#c1925b
;
border-radius
:
48px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
color
:
white
;
cursor
:
pointer
;
img
{
margin-right
:
10px
;
}
}
}
.title-container
{
...
...
@@ -384,7 +456,11 @@ $label: #9f9c9a;
}
}
.marginBottom32
{
.text-indent
{
text-indent
:
28px
;
}
.margin-bottom-32
{
margin-bottom
:
32px
;
}
</
style
>
src/views/culturalRelic/index-old.vue
0 → 100644
浏览文件 @
c952fb11
<
template
>
<div
class=
"display"
>
<!--
<NavBar
/>
-->
<div
class=
"main"
>
<div
class=
"content"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
class=
"selectors"
>
<!--
<el-row
class=
"select-card"
>
<div
class=
"title"
>
<span>
年代
</span>
</div>
<div
class=
"body"
>
<div
class=
"select-group"
>
<div
class=
"select-items"
v-for=
"(item, index) in years"
:key=
"index"
>
<div
class=
"check-box"
></div>
<div
class=
"check-value"
>
{{
item
}}
</div>
</div>
</div>
</div>
</el-row>
-->
<!--
<el-row
class=
"select-card"
>
<div
class=
"title"
>
<span>
分类
</span>
</div>
<div
class=
"body"
>
<div
class=
"select-group"
>
<div
class=
"select-items"
v-for=
"(item, index) in dict.culturalRelicType"
:key=
"index"
>
<div
class=
"check-box"
>
</div>
<div
class=
"check-value"
>
{{
item
}}
</div>
</div>
</div>
</div>
</el-row>
-->
</el-col>
<el-col
:span=
"24"
class=
"rclist"
>
<div
class=
"search"
>
<el-input
v-model=
"keyword"
class=
"search-bar"
@
keyup
.
enter
.
native=
"search"
clearable
><i
slot=
"suffix"
class=
"el-input__icon el-icon-search"
></i
></el-input>
</div>
<div
class=
"display-group"
>
<div
class=
"total"
>
<span>
{{
list
.
total
}}
</span
>
件
</div>
<!--
<div
class=
"divider"
></div>
-->
<el-row
:gutter=
"10"
>
<el-col
:span=
"6"
class=
"cr-box"
display-item
@
click
.
native=
"handleClick(item)"
v-for=
"(item, index) in list.records"
:key=
"index"
>
<div
class=
"img"
>
<img
:src=
"item.faceImageUrl"
alt=
""
srcset=
""
/>
<!--
<div
class=
"collect"
>
<div
class=
"collect-box"
>
<img
src=
"@/assets/imgs/like.png"
alt=
""
srcset=
""
/>
</div>
</div>
-->
</div>
</el-col>
</el-row>
<div
class=
"pagination"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"Number(list.current)"
:page-sizes=
"[10, 20, 40, 50]"
:page-size=
"Number(list.size)"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"Number(list.total)"
class=
"pagination"
>
</el-pagination>
</div>
</div>
</el-col>
</el-row>
</div>
</div>
<!--
<Footer
/>
-->
</div>
</
template
>
<
script
>
// import SearchBar from "@/components/SearchBar";
// import NavBar from "@/components/NavBar";
// import Footer from "@/components/Footer";
import
{
getCulturalRelicList
}
from
"@/api/culturalRelic"
;
export
default
{
name
:
"CulturalRelic"
,
// components: { SearchBar, NavBar, Footer },
// components: { SearchBar },
data
()
{
return
{
options
:
[
{
value
:
"name"
,
label
:
"文物名称"
,
},
],
selectValue
:
""
,
keyword
:
""
,
currentType
:
"all"
,
list
:
{
records
:
[],
size
:
40
,
current
:
1
,
total
:
0
,
},
// years: ["新石器时代", "夏", "商", "春秋", "战国", "秦", "汉", "三国"],
// types: ["青铜", "石器"],
};
},
// dicts: ["culturalRelicYears", "cultural_relic_texture", "culturalRelicType"],
created
()
{
setTimeout
(()
=>
{
// console.log(this.dicts);
});
},
mounted
()
{
this
.
loadData
();
},
methods
:
{
async
loadData
()
{
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
};
let
res
=
await
getCulturalRelicList
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
},
async
search
()
{
var
params
=
{
page
:
this
.
list
.
current
,
limit
:
this
.
list
.
size
,
name
:
this
.
keyword
,
};
console
.
log
(
"params"
,
params
);
let
res
=
await
getCulturalRelicList
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
},
// 改变页容量
handleSizeChange
(
value
)
{
this
.
list
.
size
=
value
;
this
.
loadData
();
},
// 改变当前显示页
handleCurrentChange
(
value
)
{
this
.
list
.
current
=
value
;
this
.
loadData
();
},
handleClick
(
item
)
{
console
.
log
(
item
);
const
{
crId
}
=
item
;
this
.
$router
.
push
({
path
:
"culturalRelic/"
+
crId
,
});
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
$blue
:
#1e5fbb
;
$text-indent
:
16px
;
.display
{
width
:
100%
;
// background-color: #2069c4;
// color: #fff;
.main
{
display
:
flex
;
align-items
:
center
;
flex-direction
:
column
;
padding
:
0
60px
;
.search
{
display
:
flex
;
justify-content
:
flex-end
;
margin-top
:
20px
;
.search-bar
{
margin-bottom
:
20px
;
width
:
400px
;
border-radius
:
48px
!
important
;
}
}
.total
{
margin-bottom
:
40px
;
}
.divider
{
width
:
100%
;
height
:
1px
;
background-color
:
$blue
;
margin-bottom
:
20px
;
}
.content
{
width
:
100%
;
.selectors
{
margin-top
:
80px
;
.select-card
{
width
:
100%
;
box-shadow
:
0
2px
10px
6px
rgba
(
0
,
0
,
0
,
0
.12
);
border-radius
:
8px
;
margin-bottom
:
16px
;
.title
{
padding
:
10px
20px
;
background-color
:
#1e5fbb
;
border-radius
:
8px
8px
0
0
;
color
:
#fff
;
font-weight
:
bold
;
}
.body
{
padding
:
10px
20px
;
background-color
:
#fff
;
border-radius
:
0
0
8px
8px
;
.select-items
{
display
:
flex
;
margin-bottom
:
20px
;
cursor
:
pointer
;
margin-top
:
24px
;
.check-box
{
border
:
2px
solid
#563f17
;
width
:
20px
;
height
:
20px
;
margin-right
:
15px
;
i
{
color
:
$blue
;
width
:
2px
;
font-weight
:
bold
;
}
}
.check-value
{
color
:
#563f17
;
font-size
:
14px
;
font-weight
:
bold
;
}
}
}
}
}
.rclist
{
.img
{
width
:
100%
;
margin-bottom
:
10px
;
position
:
relative
;
img
{
width
:
100%
;
}
.collect
{
position
:
absolute
;
right
:
20px
;
bottom
:
20px
;
.collect-box
{
width
:
40px
;
height
:
40px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.15
);
border-radius
:
8px
;
cursor
:
pointer
;
img
{
width
:
20px
;
height
:
20px
;
opacity
:
0
.5
;
}
}
}
}
}
}
}
.pagination
{
margin-top
:
24px
;
display
:
flex
;
justify-content
:
center
;
}
}
</
style
>
\ No newline at end of file
src/views/culturalRelic/index.vue
浏览文件 @
c952fb11
<
template
>
<div
class=
"
display
"
>
<div
class=
"
cultural-relic
"
>
<!--
<NavBar
/>
-->
<div
class=
"main"
>
<div
class=
"content"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
class=
"selectors"
>
<!--
<el-row
class=
"select-card"
>
<div
class=
"title"
>
<span>
年代
</span>
</div>
<div
class=
"body"
>
<div
class=
"select-group"
>
<div
class=
"select-items"
v-for=
"(item, index) in years"
:key=
"index"
>
<div
class=
"check-box"
></div>
<div
class=
"check-value"
>
{{
item
}}
</div>
</div>
</div>
</div>
</el-row>
-->
<!--
<el-row
class=
"select-card"
>
<div
class=
"title"
>
<span>
分类
</span>
</div>
<div
class=
"body"
>
<div
class=
"select-group"
>
<div
class=
"select-items"
v-for=
"(item, index) in dict.culturalRelicType"
:key=
"index"
>
<div
class=
"check-box"
>
</div>
<div
class=
"check-value"
>
{{
item
}}
</div>
</div>
</div>
</div>
</el-row>
-->
</el-col>
<el-col
:span=
"24"
class=
"rclist"
>
<div
class=
"search"
>
<el-input
<
!--
<
el-input
v-model=
"keyword"
class=
"search-bar"
@
keyup
.
enter
.
native=
"search"
clearable
@
keyup
.
enter
.
native=
"search"
clearable
><i
slot=
"suffix"
class=
"el-input__icon el-icon-search"
></i
></el-input>
></el-input>
-->
<SearchBar
@
search=
"search"
/>
<el-checkbox
v-model=
"show3d"
>
只看3D
</el-checkbox>
</div>
<div
class=
"display-group"
>
<div
class=
"total"
>
<
!--
<
div
class=
"total"
>
<span>
{{
list
.
total
}}
</span
>
件
</div>
<
!--
<
div
class=
"divider"
></div>
-->
<el-row
:gutter=
"
1
0"
>
<div
class=
"divider"
></div>
-->
<el-row
:gutter=
"
6
0"
>
<el-col
:span=
"6"
class=
"cr-box"
display-item
class=
"display-item"
@
click
.
native=
"handleClick(item)"
v-for=
"(item, index) in list.records"
:key=
"index"
>
<div
class=
"img"
>
<img
:src=
"item.faceImageUrl"
alt=
""
srcset=
""
/>
<div
class=
"collect"
>
<div
class=
"collect-box"
>
<img
src=
"@/assets/imgs/like.png"
alt=
""
srcset=
""
/>
</div>
<div
class=
"img"
v-if=
"item.faceImageUrl"
>
<img
:src=
"item.faceImageUrl"
alt=
""
srcset=
""
v-if=
"item.faceImageUrl"
width=
"100%"
@
error=
"defImg"
class=
"cr-img"
/>
<img
v-else
src=
"@/assets/404_images/no-pic.png"
alt=
""
width=
"100%"
height=
"100%"
/>
<div
class=
"showIcon"
v-show=
"item.url3d"
>
<img
src=
"@/assets/imgs/cr/3d.png"
class=
"icon"
/>
</div>
<div
class=
"desc"
>
<span
class=
"name"
>
{{
item
.
name
}}
</span>
<!--
<span
class=
"deptName"
>
{{
item
.
deptName
}}
</span>
-->
</div>
</div>
</el-col>
...
...
@@ -98,22 +80,17 @@
</
template
>
<
script
>
//
import SearchBar from "@/components/SearchBar";
import
SearchBar
from
"@/components/SearchBar"
;
// import NavBar from "@/components/NavBar";
// import Footer from "@/components/Footer";
import
{
getCulturalRelicList
}
from
"@/api/culturalRelic"
;
// import defaultImg from "@/assets/404_images/no-pic.png";
export
default
{
name
:
"CulturalRelic"
,
// components: { SearchBar, NavBar, Footer },
//
components: { SearchBar },
components
:
{
SearchBar
},
data
()
{
return
{
options
:
[
{
value
:
"name"
,
label
:
"文物名称"
,
},
],
selectValue
:
""
,
keyword
:
""
,
currentType
:
"all"
,
...
...
@@ -123,11 +100,9 @@ export default {
current
:
1
,
total
:
0
,
},
// years: ["新石器时代", "夏", "商", "春秋", "战国", "秦", "汉", "三国"],
// types: ["青铜", "石器"],
show3d
:
false
,
};
},
// dicts: ["culturalRelicYears", "cultural_relic_texture", "culturalRelicType"],
created
()
{
setTimeout
(()
=>
{
// console.log(this.dicts);
...
...
@@ -179,6 +154,10 @@ export default {
path
:
"culturalRelic/"
+
crId
,
});
},
defImg
(
e
)
{
e
.
target
.
src
=
require
(
"@/assets/404_images/no-pic.png"
);
},
},
};
</
script
>
...
...
@@ -186,7 +165,7 @@ export default {
<
style
lang=
"scss"
scoped
>
$blue
:
#1e5fbb
;
$text-indent
:
16px
;
.
display
{
.
cultural-relic
{
width
:
100%
;
// background-color: #2069c4;
// color: #fff;
...
...
@@ -197,13 +176,15 @@ $text-indent: 16px;
padding
:
0
60px
;
.search
{
display
:
flex
;
justify-content
:
flex-end
;
margin-top
:
20px
;
.search-bar
{
margin-bottom
:
20px
;
width
:
400px
;
border-radius
:
48px
!
important
;
}
justify-content
:
center
;
align-items
:
center
;
margin-bottom
:
40px
;
// margin-top: 20px;
}
.search-bar
{
width
:
1200px
;
margin-right
:
10px
;
// border-radius: 48px !important;
}
.total
{
...
...
@@ -267,9 +248,35 @@ $text-indent: 16px;
width
:
100%
;
margin-bottom
:
10px
;
position
:
relative
;
img
{
.cr-
img
{
width
:
100%
;
}
.showIcon
{
position
:
absolute
;
opacity
:
0
.7
;
top
:
10px
;
right
:
10px
;
width
:
24px
;
height
:
24px
;
background-color
:
#fff
;
opacity
:
0
.2
;
border-radius
:
4px
;
padding
:
2px
;
.icon
{
width
:
100%
;
height
:
100%
;
}
}
.desc
{
position
:
absolute
;
width
:
100%
;
padding
:
10px
;
background-color
:
#fff
;
opacity
:
0
.7
;
bottom
:
0
;
left
:
0
;
}
.collect
{
position
:
absolute
;
right
:
20px
;
...
...
@@ -291,6 +298,16 @@ $text-indent: 16px;
}
}
}
.display-item
{
cursor
:
pointer
;
.img
{
img
{
width
:
100%
;
height
:
250px
;
}
}
}
}
}
}
...
...
src/views/display/index.vue
浏览文件 @
c952fb11
...
...
@@ -6,13 +6,14 @@
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
class=
"rclist"
>
<div
class=
"search"
>
<el-input
<
!--
<
el-input
v-model=
"keyword"
class=
"search-bar"
@
keyup
.
enter
.
native=
"search"
clearable
><i
slot=
"suffix"
class=
"el-input__icon el-icon-search"
></i
></el-input>
></el-input>
-->
<SearchBar
@
search=
"search"
/>
</div>
<div
class=
"display-group"
>
<!--
<div
class=
"total"
>
...
...
@@ -21,7 +22,7 @@
</div>
<div
class=
"divider"
></div>
-->
<el-row
:gutter=
"60"
>
<el-col
<el-col
:span=
"6"
class=
"display-item"
@
click
.
native=
"handleClick(item)"
...
...
@@ -29,11 +30,23 @@
:key=
"index"
>
<div
class=
"img"
v-if=
"item.faceImageUrl"
>
<img
:src=
"item.faceImageUrl"
alt=
""
srcset=
""
v-if=
"item.faceImageUrl"
width=
"100%"
/>
<img
v-else
src=
"@/assets/404_images/no-pic.png"
alt=
""
width=
"100%"
height=
"100%"
>
<img
:src=
"item.faceImageUrl"
alt=
""
srcset=
""
v-if=
"item.faceImageUrl"
width=
"100%"
@
error=
"defImg"
/>
<img
v-else
src=
"@/assets/404_images/no-pic.png"
alt=
""
width=
"100%"
height=
"100%"
/>
<div
class=
"desc"
>
<span
class=
"name"
>
{{
item
.
title
}}
</span
>
<span
class=
"name"
>
{{
item
.
title
}}
</span>
<!--
<span
class=
"deptName"
>
{{
item
.
deptName
}}
</span>
-->
</div>
</div>
...
...
@@ -62,14 +75,15 @@
</
template
>
<
script
>
//
import SearchBar from "@/components/SearchBar";
import
SearchBar
from
"@/components/SearchBar"
;
// import NavBar from "@/components/NavBar";
// import Footer from "@/components/Footer";
import
{
getList
}
from
"@/api/display"
;
// import defaultImg from "@/assets/404_images/no-pic.png";
export
default
{
name
:
"CulturalRelic"
,
// components: { SearchBar, NavBar, Footer },
//
components: { SearchBar },
components
:
{
SearchBar
},
data
()
{
return
{
selectValue
:
""
,
...
...
@@ -112,7 +126,7 @@ export default {
name
:
this
.
keyword
,
};
console
.
log
(
"params"
,
params
);
let
res
=
await
get
CulturalRelic
List
(
params
);
let
res
=
await
getList
(
params
);
if
(
res
.
code
==
0
)
{
this
.
list
=
res
.
data
;
}
...
...
@@ -136,6 +150,10 @@ export default {
path
:
"display/"
+
exhibitionId
,
});
},
defImg
(
e
)
{
e
.
target
.
src
=
require
(
"@/assets/404_images/no-pic.png"
);
},
},
};
</
script
>
...
...
@@ -154,12 +172,14 @@ $text-indent: 16px;
padding
:
0
60px
;
.search
{
display
:
flex
;
justify-content
:
flex-end
;
margin-top
:
20px
;
justify-content
:
center
;
// justify-content: flex-end;
// margin-top: 20px;
.search-bar
{
margin-bottom
:
20px
;
width
:
400px
;
border-radius
:
48px
!
important
;
// width: 400px;
width
:
1200px
;
// border-radius: 48px !important;
}
}
...
...
@@ -259,8 +279,14 @@ $text-indent: 16px;
}
}
.display-item
{
.display-item
{
cursor
:
pointer
;
.img
{
img
{
width
:
100%
;
height
:
250px
;
}
}
}
}
}
...
...
src/views/login/index.vue
浏览文件 @
c952fb11
...
...
@@ -106,7 +106,8 @@ export default {
this
.
$store
.
dispatch
(
"user/login"
,
this
.
loginForm
)
.
then
(()
=>
{
this
.
$router
.
push
({
path
:
this
.
redirect
||
"/"
});
debugger
this
.
$router
.
push
({
path
:
this
.
$route
.
query
.
redirect
||
"/"
});
this
.
loading
=
false
;
})
.
catch
(()
=>
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论