修改文档详情的右上角按钮

This commit is contained in:
范强强
2022-09-09 11:15:00 +08:00
parent a8d2ea549f
commit e542b9bd1d
6 changed files with 83 additions and 19 deletions
+5 -1
View File
@@ -134,11 +134,15 @@
this.getData()
this.getTableList()
})
if (this.$route.query.serial_number) {
this.searchParmes.serialNumber = this.$route.query.serial_number
this.searchParmes = { ...this.searchParmes }
}
this.getData()
this.getTableList()
this.userData = this.userInfo()
},
beforeDestroy(){
beforeDestroy() {
eventBUs.$off('searchQuery')
eventBUs.$off('searchReset')
eventBUs.$off('searchGetData')
@@ -21,20 +21,23 @@
<a-icon type="reload"/>
{{$t('UpdateLog')}}
</div>
<div @click="DocumentSplitting" v-has="'bussLog:page'" class="operator-text-text"
<div @click="DocumentSplitting" v-has="'bussLog:splitting'" class="operator-text-text"
:title="$t('DocumentSplitting')">
<a-icon type="codepen"/>
{{$t('DocumentSplitting')}}
</div>
<div @click="UpdateLog" v-has="'bussLog:page'" class="operator-text-text" :title="$t('DocumentTranslation')">
<div @click="DocumentTranslationClick" v-has="'bussLog:translation'" class="operator-text-text"
:title="$t('DocumentTranslation')">
<a-icon type="file-pdf"/>
{{$t('DocumentTranslation')}}
</div>
<div @click="UpdateLog" v-has="'bussLog:page'" class="operator-text-text" :title="$t('DocumentComparison')">
<div @click="DocumentComparisonClick" v-has="'bussLog:comparison'" class="operator-text-text"
:title="$t('DocumentComparison')">
<a-icon type="wallet"/>
{{$t('DocumentComparison')}}
</div>
<div @click="UpdateLog" v-has="'bussLog:page'" class="operator-text-text" :title="$t('KnowledgeDatabase')">
<div @click="KnowledgeDatabaseClick" v-has="'bussLog:database'" class="operator-text-text"
:title="$t('KnowledgeDatabase')">
<a-icon type="folder"/>
{{$t('KnowledgeDatabase')}}
</div>
@@ -357,6 +360,46 @@
},
methods: {
...mapGetters(['userInfo']),
DocumentTranslationClick() {
let serial_number = ''
if (this.detailList.length > 0) {
this.detailList[0][this.$t('essentialInformation')].forEach(res => {
if (res.db_field_name == 'serial_number') {
serial_number = res.value
}
})
}
let newUrl = this.$router.resolve({
path: '/documentTranslation',
query: {
serial_number: serial_number
}
})
window.open(newUrl.href, '_blank')
},
DocumentComparisonClick() {
let serial_number = ''
if (this.detailList.length > 0) {
this.detailList[0][this.$t('essentialInformation')].forEach(res => {
if (res.db_field_name == 'serial_number') {
serial_number = res.value
}
})
}
let newUrl = this.$router.resolve({
path: '/documentComparison',
query: {
serial_number: serial_number
}
})
window.open(newUrl.href, '_blank')
},
KnowledgeDatabaseClick() {
let newUrl = this.$router.resolve({
path: '/problemknowledgeBase',
})
window.open(newUrl.href, '_blank')
},
getTitle(callback) {
let _id = this.$route.query.documentId === undefined ? this.$route.query.id : this.$route.query.documentId
getAction(this.url.getTitle, { id: _id }).then((res) => {
@@ -459,10 +502,18 @@
this.bussLogList()
},
DocumentSplitting() {
let serial_number = ''
if (this.detailList.length > 0) {
this.detailList[0][this.$t('essentialInformation')].forEach(res => {
if (res.db_field_name == 'serial_number') {
serial_number = res.value
}
})
}
let newUrl = this.$router.resolve({
path: '/docManage/splite',
query: {
serial_number: this.$route.query.serial_number
serial_number: serial_number
}
})
window.open(newUrl.href, '_blank')
@@ -539,7 +590,7 @@
}
.doc-detail-right {
width: 800px;
/*width: 800px;*/
line-height: 68px;
display: flex;
@@ -642,7 +693,7 @@
font-weight: 400;
color: #040B29;
display: inline-block;
width: 20%;
width: 100px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
@@ -137,7 +137,7 @@
},
mounted() {
if (this.$route.query.serial_number !== undefined) {
if (this.$route.query.serial_number) {
this.serialnumber = this.$route.query.serial_number
}
},
@@ -220,6 +220,10 @@
}
},
mounted() {
if (this.$route.query.serial_number) {
this.queryParam.serialNumber = this.$route.query.serial_number
this.queryParam = { ...this.queryParam }
}
this.userInfoQuery = this.userInfo()
this.getList()
},
@@ -85,16 +85,16 @@
this.loadingRight = true
// this.readExcelFromRemoteFileLeft(this.downLoadFileUrl + '/' + this.fileQuery.sourceFileId + fileSuffix)
// this.readExcelFromRemoteFileRight(this.downLoadFileUrl + '/' + this.fileQuery.targetFileId + fileSuffix)
let href = location.href.slice(0, 5)
if (href.indexOf('s') == '-1') {
// let href = location.href.slice(0, 5)
// if (href.indexOf('s') == '-1') {
this.detailUrlLeft = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + this.fileQuery.sourceFileId + fileSuffix)
this.detailUrlRight = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + this.fileQuery.targetFileId + fileSuffix)
console.log(this.detailUrlLeft)
} else {
this.detailUrlLeft = window._CONFIG['httpsOnlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + this.fileQuery.sourceFileId + fileSuffix)
this.detailUrlRight = window._CONFIG['httpsOnlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + this.fileQuery.targetFileId + fileSuffix)
console.log(this.detailUrlLeft)
}
// console.log(this.detailUrlLeft)
// } else {
// this.detailUrlLeft = window._CONFIG['httpsOnlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + this.fileQuery.sourceFileId + fileSuffix)
// this.detailUrlRight = window._CONFIG['httpsOnlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + this.fileQuery.targetFileId + fileSuffix)
// console.log(this.detailUrlLeft)
// }
},
readExcelFromRemoteFileLeft: function(url) {
var vm = this
@@ -227,6 +227,10 @@
}
},
mounted() {
if (this.$route.query.serial_number) {
this.queryParam.serialNumber = this.$route.query.serial_number
this.queryParam = { ...this.queryParam }
}
this.getList()
this.userInfoQuery = this.userInfo()
},
@@ -455,12 +459,13 @@
margin-right: 4px;
display: inline-block;
}
::v-deep .ant-table-row:first-child {
background: #fff!important;
background: #fff !important;
opacity: 0.9;
}
::v-deep .ant-table-body {
background: transparent!important;
background: transparent !important;
}
</style>