对接项目详情及修改虚拟清单详情页的细节问题
This commit is contained in:
@@ -133,6 +133,39 @@
|
||||
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>
|
||||
<a class="text-operation" @click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
||||
</span>
|
||||
<span slot="titleName" slot-scope="text,record" :title="text">
|
||||
{{text && text.length > 20 ? text.slice(0,19)+'...':text}}
|
||||
</span>
|
||||
<span slot="designDeliverableTemplateName" slot-scope="text,record">
|
||||
<span>{{record.designDeliverableType_dictText}}</span><br v-if="record.designDeliverableType_dictText">
|
||||
<a v-if="record.designDeliverableTemplate && record.designDeliverableTemplate.split(',').length == 1"
|
||||
@click="pdfPreviewClick(record.designDeliverableTemplateName,record.designDeliverableTemplate)">
|
||||
{{record.designDeliverableTemplateName}}
|
||||
</a>
|
||||
<a v-else-if="record.designDeliverableTemplate && record.designDeliverableTemplate.split(',').length > 1"
|
||||
@click="clickButtonToUpload(record.designDeliverableTemplate)">{{$t('viewFile')}}</a>
|
||||
<span v-else>--</span>
|
||||
</span>
|
||||
<span slot="prehomoDeliverableTemplateName" slot-scope="text,record">
|
||||
<span>{{record.prehomoDeliverableType_dictText}}</span><br v-if="record.prehomoDeliverableType_dictText">
|
||||
<a v-if="record.prehomoDeliverableTemplate && record.prehomoDeliverableTemplate.split(',').length == 1"
|
||||
@click="pdfPreviewClick(record.prehomoDeliverableTemplateName,record.prehomoDeliverableTemplate)">
|
||||
{{record.prehomoDeliverableTemplateName}}
|
||||
</a>
|
||||
<a v-else-if="record.prehomoDeliverableTemplate && record.prehomoDeliverableTemplate.split(',').length > 1"
|
||||
@click="clickButtonToUpload(record.prehomoDeliverableTemplate)">{{$t('viewFile')}}</a>
|
||||
<span v-else>--</span>
|
||||
</span>
|
||||
<span slot="verifyDeliverableTemplateName" slot-scope="text,record">
|
||||
<span>{{record.verifyDeliverableType_dictText}}</span><br v-if="record.verifyDeliverableType_dictText">
|
||||
<a v-if="record.verifyDeliverableTemplate && record.verifyDeliverableTemplate.split(',').length == 1"
|
||||
@click="pdfPreviewClick(record.verifyDeliverableTemplateName,record.verifyDeliverableTemplate)">
|
||||
{{record.verifyDeliverableTemplateName}}
|
||||
</a>
|
||||
<a v-else-if="record.verifyDeliverableTemplate && record.verifyDeliverableTemplate.split(',').length > 1"
|
||||
@click="clickButtonToUpload(record.verifyDeliverableTemplate)">{{$t('viewFile')}}</a>
|
||||
<span v-else>--</span>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
</a-card>
|
||||
@@ -142,6 +175,32 @@
|
||||
<editModel :url="url" ref="editModelRef" @editModelList="editModelList"/>
|
||||
<UpdateLog :url="url" ref="UpdateLogRef"/>
|
||||
<batSetting :url="url" ref="batSettingRef" @batSettingList="batSettingList"/>
|
||||
<a-modal
|
||||
:title="$t('deliverableTemplate')"
|
||||
:width="600"
|
||||
:visible="visibleFile"
|
||||
:maskClosable="false"
|
||||
@ok="visibleFile = false"
|
||||
@cancel="visibleFile = false"
|
||||
>
|
||||
<a-table
|
||||
class="table"
|
||||
:columns="columnsFile"
|
||||
:pagination="false"
|
||||
:scroll="{x:500,y: 400}"
|
||||
:data-source="dataSourceFile"
|
||||
:loading="loading"
|
||||
>
|
||||
<span slot="fileOperation" slot-scope="record">
|
||||
<a class="text" @click="pdfPreview(record)">
|
||||
{{$t('See')}}
|
||||
</a>
|
||||
<a class="text" @click="download(record)">
|
||||
{{$t('download')}}
|
||||
</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -152,6 +211,7 @@
|
||||
import UpdateLog from '@/components/UpdateLog/index'
|
||||
import batSetting from './batSetting'
|
||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||
import { Base64 } from 'js-base64'
|
||||
|
||||
export default {
|
||||
name: 'virtualListDetails',
|
||||
@@ -166,6 +226,23 @@
|
||||
return {
|
||||
title: '维护虚拟清单',
|
||||
queryParam: {},
|
||||
visibleFile:false,
|
||||
dataSourceFile:[],
|
||||
columnsFile: [
|
||||
{
|
||||
title: this.$t('deliverableTemplate'),
|
||||
dataIndex: 'fileName',
|
||||
align: 'center',
|
||||
width: 260,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'center',
|
||||
width: 130,
|
||||
scopedSlots: { customRender: 'fileOperation' }
|
||||
}
|
||||
],
|
||||
url: {
|
||||
addModelList: '/document/bussDocumentLibraryEO/queryPageInfoDummy',
|
||||
list: '/dummy/dummyInventoryInfoEO/list',
|
||||
@@ -187,24 +264,24 @@
|
||||
align: 'center',
|
||||
dataIndex: 'serialNumber',
|
||||
width: 180,
|
||||
ellipsis: true,
|
||||
fixed: 'left'
|
||||
fixed: 'left',
|
||||
scopedSlots: { customRender: 'titleName' }
|
||||
},
|
||||
{
|
||||
title: this.$t('title'),
|
||||
align: 'center',
|
||||
dataIndex: 'title',
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
fixed: 'left'
|
||||
width: 180,
|
||||
fixed: 'left',
|
||||
scopedSlots: { customRender: 'titleName' }
|
||||
},
|
||||
{
|
||||
title: this.$t('subtitle'),
|
||||
align: 'center',
|
||||
dataIndex: 'subtitle',
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
fixed: 'left'
|
||||
width: 180,
|
||||
fixed: 'left',
|
||||
scopedSlots: { customRender: 'titleName' }
|
||||
},
|
||||
{
|
||||
title: this.$t('scopeOfApplication'),
|
||||
@@ -294,7 +371,8 @@
|
||||
title: this.$t('Deliverables'),
|
||||
dataIndex: 'designDeliverableTemplateName',
|
||||
ellipsis: true,
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'designDeliverableTemplateName' }
|
||||
},
|
||||
{
|
||||
title: this.$t('Sponsor'),
|
||||
@@ -317,7 +395,8 @@
|
||||
title: this.$t('Deliverables'),
|
||||
dataIndex: 'prehomoDeliverableTemplateName',
|
||||
ellipsis: true,
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'prehomoDeliverableTemplateName' }
|
||||
},
|
||||
{
|
||||
title: this.$t('Sponsor'),
|
||||
@@ -340,7 +419,8 @@
|
||||
title: this.$t('Deliverables'),
|
||||
dataIndex: 'verifyDeliverableTemplateName',
|
||||
ellipsis: true,
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'verifyDeliverableTemplateName' }
|
||||
},
|
||||
{
|
||||
title: this.$t('Sponsor'),
|
||||
@@ -518,7 +598,57 @@
|
||||
this.$router.push({
|
||||
path: '/virtualList'
|
||||
})
|
||||
}
|
||||
},
|
||||
pdfPreview(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.id))
|
||||
} else if (fileSuffix == '.docx') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else {
|
||||
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
|
||||
}
|
||||
},
|
||||
pdfPreviewClick(name, id) {
|
||||
let fileName = name
|
||||
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=' + id))
|
||||
} else if (fileSuffix == '.docx') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
|
||||
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + id + fileSuffix)
|
||||
window.open(url, '_blank')
|
||||
} else {
|
||||
downloadFile('/sys/common/downLoadFile', name, { id: id })
|
||||
}
|
||||
},
|
||||
download(item) {
|
||||
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id })
|
||||
},
|
||||
clickButtonToUpload(item) {
|
||||
this.loading = true
|
||||
this.visibleFile = true
|
||||
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSourceFile = res.result
|
||||
this.loading = false
|
||||
} else {
|
||||
this.dataSourceFile = []
|
||||
this.loading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user