|
@@ -6,7 +6,7 @@
|
|
<el-button @click="addAsr" type="primary" style="min-width: 100px;"
|
|
<el-button @click="addAsr" type="primary" style="min-width: 100px;"
|
|
v-permission="permissionBtn.semanticPermission.ASR_addArticles">新建</el-button>
|
|
v-permission="permissionBtn.semanticPermission.ASR_addArticles">新建</el-button>
|
|
</div>
|
|
</div>
|
|
- <div class="catalogue-zone">
|
|
|
|
|
|
+ <div class="catalogue-zone" v-loading="detailLoadig" element-loading-text="加载中······">
|
|
<div class="search-box">
|
|
<div class="search-box">
|
|
<el-select v-model="search_txt" v-loadMore="searchLoad" :filterable="!search_txt" remote clearable
|
|
<el-select v-model="search_txt" v-loadMore="searchLoad" :filterable="!search_txt" remote clearable
|
|
placeholder="请输入文件名称" class="select-com" :remote-method="searchHandle" @click.native="inputFocusHandle">
|
|
placeholder="请输入文件名称" class="select-com" :remote-method="searchHandle" @click.native="inputFocusHandle">
|
|
@@ -62,7 +62,7 @@
|
|
@click="tabChange(tab)">{{ tab }}</li>
|
|
@click="tabChange(tab)">{{ tab }}</li>
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
- <div v-show="leftShowLabel=='目录'" class="tree-container" v-loading="detailLoadig" element-loading-text="加载中······">
|
|
|
|
|
|
+ <div v-show="leftShowLabel=='目录'" class="tree-container">
|
|
<div class="tree-cont">
|
|
<div class="tree-cont">
|
|
<el-tree ref="treeRef" class="target_tree" :data="treeData" node-key="UniqueCode" :props="defaultProp"
|
|
<el-tree ref="treeRef" class="target_tree" :data="treeData" node-key="UniqueCode" :props="defaultProp"
|
|
:allow-drag="canDragHandle" :allow-drop="canDropHandle" :current-node-key="select_node_key"
|
|
:allow-drag="canDragHandle" :allow-drop="canDropHandle" :current-node-key="select_node_key"
|
|
@@ -192,14 +192,12 @@
|
|
<!-- 视频 -->
|
|
<!-- 视频 -->
|
|
<div class="detail-video-area" v-if="articleDetail && articleDetail.type==2 && articleDetail.ResourceUrl"
|
|
<div class="detail-video-area" v-if="articleDetail && articleDetail.type==2 && articleDetail.ResourceUrl"
|
|
v-show="!videoHidden">
|
|
v-show="!videoHidden">
|
|
- <video :src="articleDetail.ResourceUrl" controls class="detail-video" ref="mediaRef">
|
|
|
|
- Your browser does not support the video element.
|
|
|
|
- </video>
|
|
|
|
|
|
+ <media-com :ResourceUrl="articleDetail.ResourceUrl" :type="articleDetail.type" ref="mediaRef" />
|
|
</div>
|
|
</div>
|
|
<div class="detail-content">
|
|
<div class="detail-content">
|
|
<div class="content-mutil-operation">
|
|
<div class="content-mutil-operation">
|
|
<el-checkbox label="全选" style="margin-right: 30px;" @change="checkAll"
|
|
<el-checkbox label="全选" style="margin-right: 30px;" @change="checkAll"
|
|
- :checked="isCheckAll" :indeterminate="isIndeterminate"></el-checkbox>
|
|
|
|
|
|
+ v-model="isCheckAll" :indeterminate="isIndeterminate"></el-checkbox>
|
|
<div class="content-row-operation active" @click="copyText(null)" v-show="checkList && checkList.length>0"
|
|
<div class="content-row-operation active" @click="copyText(null)" v-show="checkList && checkList.length>0"
|
|
v-permission="permissionBtn.semanticPermission.ASR_copyText">
|
|
v-permission="permissionBtn.semanticPermission.ASR_copyText">
|
|
<img src="~@/assets/img/icons/copy-active.png" />
|
|
<img src="~@/assets/img/icons/copy-active.png" />
|
|
@@ -213,7 +211,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="content-title">原文</div>
|
|
<div class="content-title">原文</div>
|
|
- <div class="content-main" :style="{minHeight:articleDetail.ResourceUrl?'490px':'560px'}">
|
|
|
|
|
|
+ <div class="content-main" :style="{minHeight:articleDetail.ResourceUrl?'490px':'560px'}" ref="contentMain">
|
|
<div class="content-row" v-for="(item,index) in articleDetail.Contents" :key="item.SpeechRecognitionContentId"
|
|
<div class="content-row" v-for="(item,index) in articleDetail.Contents" :key="item.SpeechRecognitionContentId"
|
|
@mouseover="item.IsHover=true" @mouseout="item.IsHover=false" :id="'paragraph_'+(index+1)">
|
|
@mouseover="item.IsHover=true" @mouseout="item.IsHover=false" :id="'paragraph_'+(index+1)">
|
|
<div class="content-row-info">
|
|
<div class="content-row-info">
|
|
@@ -246,7 +244,7 @@
|
|
</div>
|
|
</div>
|
|
<!-- 音频 -->
|
|
<!-- 音频 -->
|
|
<div class="detail-audio-area" v-if="articleDetail && articleDetail.type==1 && articleDetail.ResourceUrl">
|
|
<div class="detail-audio-area" v-if="articleDetail && articleDetail.type==1 && articleDetail.ResourceUrl">
|
|
- <audio-custom :audioUrl="articleDetail.ResourceUrl" ref="mediaRef" />
|
|
|
|
|
|
+ <media-com :ResourceUrl="articleDetail.ResourceUrl" :type="articleDetail.type" ref="mediaRef" />
|
|
<img src="~@/assets/img/icons/delete-red.png" @click="deleteMedia" v-permission="permissionBtn.semanticPermission.ASR_deleteVoice" />
|
|
<img src="~@/assets/img/icons/delete-red.png" @click="deleteMedia" v-permission="permissionBtn.semanticPermission.ASR_deleteVoice" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -319,7 +317,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import audioCustom from "./components/audioCustom.vue"
|
|
|
|
|
|
+import mediaCom from "./components/mediaCom.vue"
|
|
import catalogueDia from './components/catalogueDia.vue'
|
|
import catalogueDia from './components/catalogueDia.vue'
|
|
import editTag from './components/editTag.vue'
|
|
import editTag from './components/editTag.vue'
|
|
import tooltipHidable from "@/directives/tooltip-hidable.js"
|
|
import tooltipHidable from "@/directives/tooltip-hidable.js"
|
|
@@ -334,7 +332,7 @@ import { dataAuthInterface } from "@/api/api.js";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "ASR",
|
|
name: "ASR",
|
|
- components:{audioCustom,catalogueDia,editTag,fileRename,exportDia,makeTags,mediaUpload,transferStatus},
|
|
|
|
|
|
+ components:{mediaCom,catalogueDia,editTag,fileRename,exportDia,makeTags,mediaUpload,transferStatus},
|
|
directives:{
|
|
directives:{
|
|
tooltipHidable
|
|
tooltipHidable
|
|
},
|
|
},
|
|
@@ -439,7 +437,7 @@ export default {
|
|
num(value){
|
|
num(value){
|
|
if(value){
|
|
if(value){
|
|
this.paragraphIndex=this.wordList[value-1].index+1
|
|
this.paragraphIndex=this.wordList[value-1].index+1
|
|
- this.$refs.mediaRef && (this.$refs.mediaRef.currentTime=this.wordList[value-1].startMs/1000)
|
|
|
|
|
|
+ this.$refs.mediaRef && this.$refs.mediaRef.updateCurrentTime(this.wordList[value-1].startMs/1000)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
select_node_data(value){
|
|
select_node_data(value){
|
|
@@ -1162,10 +1160,9 @@ export default {
|
|
switchDetail(item){
|
|
switchDetail(item){
|
|
if(this.detailLoadig || (!this.permissionBtn.isShowBtn('semanticPermission', 'ASR_view')) ) return
|
|
if(this.detailLoadig || (!this.permissionBtn.isShowBtn('semanticPermission', 'ASR_view')) ) return
|
|
this.detailLoadig=true
|
|
this.detailLoadig=true
|
|
-
|
|
|
|
- this.keyWord=""
|
|
|
|
asrInterface.getSpeechDetail({SpeechRecognitionId:item.SpeechRecognitionId}).then(res=>{
|
|
asrInterface.getSpeechDetail({SpeechRecognitionId:item.SpeechRecognitionId}).then(res=>{
|
|
if(res.Ret == 200){
|
|
if(res.Ret == 200){
|
|
|
|
+ this.resetDetailVariate()
|
|
this.articleDetail=res.Data || {}
|
|
this.articleDetail=res.Data || {}
|
|
this.articleDetail.type = ['mp4','flv','3gp'].includes(this.articleDetail.FileExt.toLocaleLowerCase())?2:1
|
|
this.articleDetail.type = ['mp4','flv','3gp'].includes(this.articleDetail.FileExt.toLocaleLowerCase())?2:1
|
|
|
|
|
|
@@ -1177,17 +1174,21 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
if(this.articleDetail.ResourceUrl){
|
|
if(this.articleDetail.ResourceUrl){
|
|
|
|
+ this.$refs.mediaRef && this.$refs.mediaRef.resetPlayerParams()
|
|
clearInterval(this.mediaTimer)
|
|
clearInterval(this.mediaTimer)
|
|
let paragraphInfoLength = this.articleDetail.Contents.length
|
|
let paragraphInfoLength = this.articleDetail.Contents.length
|
|
this.mediaTimer= setInterval(() => {
|
|
this.mediaTimer= setInterval(() => {
|
|
if(this.$refs.mediaRef && this.$refs.mediaRef.currentTime!=0){
|
|
if(this.$refs.mediaRef && this.$refs.mediaRef.currentTime!=0){
|
|
// 最后一个
|
|
// 最后一个
|
|
- if(!(this.articleDetail.Contents[paragraphInfoLength-1].StartMs > this.$refs.mediaRef.currentTime*1000)){
|
|
|
|
|
|
+ if(!( (this.articleDetail.Contents[paragraphInfoLength-1].StartMs / 1000) > this.$refs.mediaRef.currentTime)){
|
|
return this.paragraphIndex=paragraphInfoLength
|
|
return this.paragraphIndex=paragraphInfoLength
|
|
}
|
|
}
|
|
|
|
|
|
- let i = this.articleDetail.Contents.findIndex(pa => pa.EndMs > (this.$refs.mediaRef.currentTime*1000))
|
|
|
|
|
|
+ let i = this.articleDetail.Contents.findIndex(pa => (pa.EndMs/1000) > this.$refs.mediaRef.currentTime)
|
|
|
|
+ let it = this.articleDetail.Contents.find(pa => (pa.EndMs/1000) > this.$refs.mediaRef.currentTime)
|
|
this.paragraphIndex=i+1
|
|
this.paragraphIndex=i+1
|
|
|
|
+ }else{
|
|
|
|
+ this.paragraphIndex=0
|
|
}
|
|
}
|
|
}, 300);
|
|
}, 300);
|
|
}
|
|
}
|
|
@@ -1196,6 +1197,16 @@ export default {
|
|
this.detailLoadig=false
|
|
this.detailLoadig=false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ resetDetailVariate(){
|
|
|
|
+ this.keyWord=""
|
|
|
|
+ this.isCheckAll=false
|
|
|
|
+ this.isIndeterminate=false
|
|
|
|
+ this.checkList=[]
|
|
|
|
+ this.paragraphIndex=0
|
|
|
|
+ this.$refs.contentMain && $(this.$refs.contentMain).animate({
|
|
|
|
+ scrollTop:0
|
|
|
|
+ },0)
|
|
|
|
+ },
|
|
locationDetail(menuPath=[]){
|
|
locationDetail(menuPath=[]){
|
|
this.clearFilterOption()
|
|
this.clearFilterOption()
|
|
if(this.leftShowLabel=="目录"){
|
|
if(this.leftShowLabel=="目录"){
|
|
@@ -1214,7 +1225,6 @@ export default {
|
|
this.$refs.tagTreeRef.setCurrentKey(null);
|
|
this.$refs.tagTreeRef.setCurrentKey(null);
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
},
|
|
},
|
|
checkAll(value){
|
|
checkAll(value){
|
|
this.isIndeterminate=false
|
|
this.isIndeterminate=false
|
|
@@ -1223,7 +1233,6 @@ export default {
|
|
}else{
|
|
}else{
|
|
this.checkList=[]
|
|
this.checkList=[]
|
|
}
|
|
}
|
|
- console.log(this.checkList,this.articleDetail.Contents);
|
|
|
|
},
|
|
},
|
|
checkSingle(value){
|
|
checkSingle(value){
|
|
if(!(this.checkList && this.checkList.length)){
|
|
if(!(this.checkList && this.checkList.length)){
|
|
@@ -1401,12 +1410,12 @@ export default {
|
|
|
|
|
|
this.paragraphs[index].Content=e.target.textContent
|
|
this.paragraphs[index].Content=e.target.textContent
|
|
},
|
|
},
|
|
- save(){
|
|
|
|
|
|
+ save(){this.articleDetail.Tags
|
|
if(this.saveLoading) return
|
|
if(this.saveLoading) return
|
|
let params={
|
|
let params={
|
|
SpeechRecognitionId:this.articleDetail.SpeechRecognitionId,
|
|
SpeechRecognitionId:this.articleDetail.SpeechRecognitionId,
|
|
FileName:this.articleDetail.FileName,
|
|
FileName:this.articleDetail.FileName,
|
|
- TagIds:this.articleDetail.Tags.map(tag => tag.TagId),
|
|
|
|
|
|
+ TagIds:this.articleDetail.Tags?this.articleDetail.Tags.map(tag => tag.TagId):[],
|
|
Contents:this.paragraphs
|
|
Contents:this.paragraphs
|
|
}
|
|
}
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
@@ -1620,7 +1629,7 @@ export default {
|
|
border: 1px solid #DCDFE6;
|
|
border: 1px solid #DCDFE6;
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
min-width: 845px;
|
|
min-width: 845px;
|
|
- overflow: hidden;
|
|
|
|
|
|
+ overflow-x: hidden;
|
|
.file-count{
|
|
.file-count{
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
font-weight: 400;
|
|
font-weight: 400;
|
|
@@ -1809,15 +1818,9 @@ export default {
|
|
}
|
|
}
|
|
.detail-video-area{
|
|
.detail-video-area{
|
|
height: 390px;
|
|
height: 390px;
|
|
- // width: 100%;
|
|
|
|
|
|
+ margin: 0 25px 20px;
|
|
|
|
+ background-color: black;
|
|
text-align: center;
|
|
text-align: center;
|
|
- margin: 0 25px;
|
|
|
|
- border-radius: 4px;
|
|
|
|
- margin-bottom: 20px;
|
|
|
|
- background-color: black;
|
|
|
|
- .detail-video{
|
|
|
|
- height: 100%;
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
.detail-content{
|
|
.detail-content{
|
|
padding: 0 25px;
|
|
padding: 0 25px;
|
|
@@ -1891,6 +1894,7 @@ export default {
|
|
.detail-audio-area{
|
|
.detail-audio-area{
|
|
padding: 15px 80px 0;
|
|
padding: 15px 80px 0;
|
|
// margin-top: 15px;
|
|
// margin-top: 15px;
|
|
|
|
+ height: 74px;
|
|
position: relative;
|
|
position: relative;
|
|
img{
|
|
img{
|
|
display: none;
|
|
display: none;
|