提交 d6fae6dc authored 作者: quanlili's avatar quanlili

丰富化的类型判断

上级 3579b3a1
......@@ -13,11 +13,19 @@
<div class="sub_tit">
<p>
<span style="margin-right:20px;margin-bottom:20px">资源题名:{{pdf.name}}{{pdf.createrName}}{{pdf.createTime}} 提交</span>
<span class="" v-if="resourceType!=2">
<img src="~@/assets/img/pdf.png" alt="pdf" class="pdf_icon">
<span class="" v-if="resourceType==2||resourceType==6">
<el-button type="primary" icon="el-icon-download" size="mini" @click="down">下载源文件</el-button>
<!-- <el-button type="primary" icon="el-icon-refresh" size="mini">重新识别</el-button>
<el-button type="primary" icon="el-icon-document" size="mini">文本标注</el-button> -->
<el-button v-if="pdf.albumId" type="primary" icon="" size="mini" @click="linkPic">进入图册</el-button>
</span>
<span v-else-if="resourceType==3">
<el-button type="primary" icon="el-icon-download" size="mini" @click="down">下载源音频</el-button>
</span>
<span v-else-if="resourceType==4">
<el-button type="primary" icon="el-icon-download" size="mini" @click="down">下载源视频</el-button>
</span>
<span v-else>
<img src="~@/assets/img/pdf.png" alt="pdf" class="pdf_icon">
<el-button v-if="pdf.pdfName" type="primary" icon="el-icon-download" size="mini" @click="down">下载源文件</el-button>
</span>
</p>
......@@ -28,8 +36,17 @@
<img :src="`${domain}${requestPath.file}?fileName=${pdf.fileName}&isOnLine=true`" alt="" class="pic_show" v-if="pdf.fileName">
</div>
<!-- 图册 -->
<div style="width:80%;margin:0 auto;height:800px;text-align:center" v-else-if="resourceType==5">
<div style="width:80%;margin:0 auto;height:800px;text-align:center" v-else-if="resourceType==5||resourceType==6">
</div>
<!-- 视频 -->
<div style="width:80%;margin:100px auto;height:800px;text-align:center" v-else-if="pdf.resourceType==4&&pdf.fileName">
<video :src="`${domain}${requestPath.file}?fileName=${pdf.fileName}&isOnLine=true`" controls="controls" style="width:500px;height:400px"></video>
</div>
<!-- 音频 -->
<div style="width:80%;margin:100px auto;height:800px;text-align:center" v-else-if="pdf.resourceType==3&&audioUrl">
<VueAudio
:audioUrl="audioUrl"
/>
</div>
<div style="width:80%;margin:0 auto;height:800px" v-else>
<iframe :src="`${domain}${pdf.pdfName}`" frameborder="0" width="100%" height="100%" v-if="changeFleg"></iframe>
......@@ -488,6 +505,7 @@
<script>
import BaiduMap from 'vue-baidu-map/components/map/Map.vue'
import Tinymce from '@/components/Tinymce'
import VueAudio from '@/components/VueAudio'
import pagination from '@/components/pagination/pagination'
import { operationMsg, confirm, requestMsg } from '@/utils/publicFunctions'
import { uploadUrl, uploadPath, requestPath } from "@/utils/global";
......@@ -502,7 +520,7 @@ import {
backDetialAPI,changeAPI} from '@/api/metadata/index'
export default {
name: 'metadataDetail',
components:{ Tinymce ,pagination},
components:{ Tinymce ,pagination,VueAudio},
data () {
return {
loading:false,
......@@ -631,6 +649,7 @@ export default {
activeName:"",
id:'',
resourceType:null,
audioUrl:'',
pdf:{
createTime:'',
createrName:'',
......@@ -679,6 +698,9 @@ export default {
let {createTime,createrName,fileName,name,text}=res.data.data;
this.pdf=res.data.data;
this.resourceForm.summary=text;
if(this.pdf.resourceType==3){
this.audioUrl=`${this.domain}${requestPath.file}?fileName=${fileName}&isOnLine=true`
}
changeAPI(this.pdf.pdfName).then(res=>{
if(res.data.code==0){
this.changeFleg=res.data.data||false;
......@@ -1090,6 +1112,9 @@ export default {
},1000)
//window.location.reload()
},
linkPic(){
this.$router.push({path:'/submission/infoview/photolook',query:{oid:this.pdf.albumId}})
},
linkTo(item){
//id=0648831bf60911e996cc0050569033dc&entityType=2
this.$router.push({path:'/storagemodule/namedentity/character',query:{id:item.entityId,entityType:this.backForm.state}})
......
......@@ -299,6 +299,13 @@
color: #404E67;
font-weight: bold;
}
.tag_label{
background-color:#7e899b;
border-radius: 4px;
padding: 4px 8px;
color: #fff;
margin-right: 4px;
}
.cont{
flex: 1;
}
......
......@@ -103,7 +103,7 @@
<div class="list">
<p class="label">资源标签:</p>
<p class="cont">
<span v-for="tag in pdf.label" :key="tag.index">{{tag.name}}</span>
<span class="tag_label" v-for="tag in pdf.label" :key="tag.index">{{tag.name}}</span>
</p>
</div>
<div class="list">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论