修改流程中心细节的问题

This commit is contained in:
qq787203167
2022-04-28 15:57:06 +08:00
parent 9593bb9ac4
commit a4e20ba82b
5 changed files with 103 additions and 7 deletions
@@ -232,6 +232,7 @@
title: '维护虚拟清单',
queryParam: {},
visibleFile: false,
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
dataSourceFile: [],
columnsFile: [
{
@@ -14,14 +14,50 @@
:data-source="dataSource"
:columns="columns"
>
<span slot="approvalResult" slot-scope="text,result">
{{approvalResult[text]}}
</span>
<span slot="approvalFile" slot-scope="text,result">
<a v-if="text" @click="clickButtonToUpload(text)">
{{$t('viewFile')}}
</a>
<span v-else>--</span>
</span>
</a-table>
</div>
<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>
<script>
import { getAction, postAction } from '@/api/manage'
import { getAction, postAction, downloadFile } from '@/api/manage'
import moment from 'moment'
import { Base64 } from 'js-base64'
export default {
name: 'circulationHistory',
@@ -29,11 +65,18 @@
return {
dataSource: [],
loading: false,
approvalResult: {
0: this.$t('agree'),
1: this.$t('disagree'),
2: this.$t('terminationProcess'),
3: this.$t('issue')
},
columns: [
{
title: this.$t('result'),
dataIndex: 'result',
align: 'approvalResult'
dataIndex: 'approvalResult',
align: 'center',
scopedSlots: { customRender: 'approvalResult' }
},
{
title: this.$t('opinion'),
@@ -43,7 +86,8 @@
{
title: this.$t('enclosure'),
dataIndex: 'approvalFile',
align: 'center'
align: 'center',
scopedSlots: { customRender: 'approvalFile' }
},
{
title: this.$t('operationNode'),
@@ -63,6 +107,24 @@
return moment(t).format('YYYY-MM-DD HH:mm:ss')
}
}
],
visibleFile: false,
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
dataSourceFile: [],
columnsFile: [
{
title: this.$t('enclosure'),
dataIndex: 'fileName',
align: 'center',
width: 260,
ellipsis: true
},
{
title: this.$t('operation'),
align: 'center',
width: 130,
scopedSlots: { customRender: 'fileOperation' }
}
]
}
},
@@ -77,6 +139,39 @@
getAction('/workFlow/get_list_by_instance', query).then((res) => {
this.dataSource = res
})
},
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
}
})
},
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 })
}
},
download(item) {
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id })
}
}
}
@@ -83,6 +83,7 @@
data() {
return {
dataSource: [],
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
columns: [
{
title: this.$t('confirmationOfDesignConformity'),
@@ -13,9 +13,7 @@
</div>
<div class="action-bar">
</div>
<div class="flow-list">
<circulationHistory/>
</div>
<circulationHistory/>
</div>
</template>
@@ -532,6 +532,7 @@
copyUrl: '/project/projectLawsInventoryEO/copyInfoByIds',//复制
transferUrl: '/project/projectLawsInventoryEO/getPageInfoDummy'//调取
},
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
loading: false,
dataSource: [],
// fieldList | array |✔| 需要查询的列集合示例如下,type类型有:date/datetime/string/int/number