1.修改三期优化点
This commit is contained in:
+28
-1
@@ -71,6 +71,7 @@
|
||||
{{$t('selectedStandard')}}
|
||||
</span>
|
||||
<span class="box-button-standard-right"
|
||||
@click="selecLeftClick(selectedRowKeysLeftRecord[0])"
|
||||
:title="selectedRowKeysLeftRecord[0]?selectedRowKeysLeftRecord[0].serialNumber+' '+selectedRowKeysLeftRecord[0].fileName:$t('noComparisonDocumentSelected')"
|
||||
:class="{'box-button-standard-right-color':selectedRowKeysLeftRecord[0]}">
|
||||
{{selectedRowKeysLeftRecord[0]?selectedRowKeysLeftRecord[0].serialNumber+' '+selectedRowKeysLeftRecord[0].fileName:$t('noComparisonDocumentSelected')}}
|
||||
@@ -136,6 +137,7 @@
|
||||
{{$t('selectedStandard')}}
|
||||
</span>
|
||||
<span class="box-button-standard-right"
|
||||
@click="selecLeftClick(selectedRowKeysRightRecord[0])"
|
||||
:title="selectedRowKeysRightRecord[0]?selectedRowKeysRightRecord[0].serialNumber+' '+selectedRowKeysRightRecord[0].fileName:$t('noComparisonDocumentSelected')"
|
||||
:class="{'box-button-standard-right-color':selectedRowKeysRightRecord[0]}">
|
||||
{{selectedRowKeysRightRecord[0]?selectedRowKeysRightRecord[0].serialNumber+' '+selectedRowKeysRightRecord[0].fileName:$t('noComparisonDocumentSelected')}}
|
||||
@@ -169,7 +171,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, deleteAction } from '@/api/manage'
|
||||
import { getAction, postAction, deleteAction ,downloadFile} from '@/api/manage'
|
||||
import { Base64 } from 'js-base64'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'initiateDocumentComparison',
|
||||
@@ -191,6 +195,7 @@
|
||||
totalRight: 0,
|
||||
pageNoRight: 1,
|
||||
formInline: {},
|
||||
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
|
||||
rules: {
|
||||
remark: [
|
||||
{
|
||||
@@ -248,6 +253,7 @@
|
||||
document.title = this.$t('DocumentComparison') + ' - ' + this.$t('initiateComparison')
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
Fallback() {
|
||||
this.$router.push({
|
||||
path: '/documentComparison'
|
||||
@@ -371,6 +377,26 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
selecLeftClick(fileQuery){
|
||||
if (fileQuery){
|
||||
let fileName = fileQuery.fileName
|
||||
let index1 = fileName.lastIndexOf('.')
|
||||
let index2 = fileName.length
|
||||
let fileSuffix = fileName.substring(index1, index2)
|
||||
if (fileSuffix == '.pdf') {
|
||||
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.fileId+'&userName='+this.userInfo().username))
|
||||
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.fileId + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls'
|
||||
|| fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.fileId + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else {
|
||||
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.fileId })
|
||||
}
|
||||
}
|
||||
},
|
||||
getListRight() {
|
||||
let queryParam = JSON.parse(JSON.stringify(this.queryParamRight))
|
||||
Object.keys(queryParam).forEach(val => {
|
||||
@@ -580,5 +606,6 @@
|
||||
|
||||
.box-button-standard-right-color {
|
||||
color: #040B29;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user