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

丰富化的类型判断

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