[update] 法规符合性评估流程

This commit is contained in:
lideqin
2024-07-18 18:26:43 +08:00
parent 5e6deb230b
commit 8704f001ae
4 changed files with 20 additions and 66 deletions
+1
View File
@@ -428,6 +428,7 @@ export default {
}
const query = {}
query.taskName = record.taskName
query.taskId = record.taskId // 为了不影响部分节点的导出
query.snapshotId = record.snapshotId // 快照id
query.nodeId = record.nodeId // 节点的id
query.isLook = 1
@@ -3,8 +3,8 @@
<div class="process-part-title">{{ $t('dispatchInformation') }}</div>
<div v-if="!disabled" class="table-operator">
<!-- 导出, 文件名称标准编号+标准名称+符合性排查 -->
<a-button icon="upload" type="primary" ghost @click="handleExportXls()">
<!-- 导出, 文件名称标准编号+标准名称+符合性排查 -->
<a-button icon="upload" type="primary" ghost @click="handleExportXls(exportFileName, '.zip')">
{{ $t('export') }}
</a-button>
</div>
@@ -115,6 +115,11 @@ export default {
default: false
}
},
computed: {
exportFileName () {
return this.formInline.standardNumber + this.formInline.standardName + '符合性排查'
}
},
data () {
return {
loading: false,
@@ -283,7 +288,7 @@ export default {
]
},
url: {
exportXlsUrl: ''
exportXlsUrl: '/process/standardComplianceCheck/exportXls'
}
}
},
@@ -326,10 +331,8 @@ export default {
if (!fileName || typeof fileName !== 'string') {
fileName = this.$t('exportFile')
}
const param = this.getQueryParams()
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
param.selections = this.selectedRowKeys.join(',')
}
const param = {}
param.taskId = this.$route.query.taskId
console.log('导出参数', param)
// 加一个大的提示
const modalLoading = this.$info({
@@ -61,8 +61,8 @@
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button icon="download" type="primary" ghost>{{ $t('import') }}</a-button>
</a-upload>
<!-- 导出, 文件名称标准编号+标准名称+符合性排查 -->
<a-button icon="upload" type="primary" ghost @click="handleExportXls()">
<!-- 导出, 文件名称标准编号+标准名称+符合性排查 -->
<a-button icon="upload" type="primary" ghost @click="handleExportXls(exportFileName, '.zip')">
{{ $t('export') }}
</a-button>
</div>
@@ -195,6 +195,9 @@ export default {
},
importExcelUrl: function () {
return `${window._CONFIG.domianURL}/${this.url.importExcelUrl}`
},
exportFileName () {
return this.formInline.standardNumber + this.formInline.standardName + '符合性排查'
}
},
data () {
@@ -511,7 +514,8 @@ export default {
},
personFormInline: {},
url: {
importExcelUrl: ''
importExcelUrl: '',
exportXlsUrl: '/process/standardComplianceCheck/exportXlsNotDistribute'
},
dataSourceCopy: [] // 列表数组备份,防止切换排查任务是否下发后,填的数据带到新数组里
}
@@ -760,10 +764,8 @@ export default {
if (!fileName || typeof fileName !== 'string') {
fileName = this.$t('exportFile')
}
const param = this.getQueryParams()
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
param.selections = this.selectedRowKeys.join(',')
}
const param = {}
param.taskId = this.$route.query.taskId
console.log('导出参数', param)
// 加一个大的提示
const modalLoading = this.$info({
@@ -2,13 +2,6 @@
<div>
<div class="process-part-title">{{ $t('dispatchInformation') }}</div>
<div v-if="!disabled" class="table-operator">
<!-- 导出, 文件名称标准编号+标准名称+符合性排查 -->
<a-button icon="upload" type="primary" ghost @click="handleExportXls()">
{{ $t('export') }}
</a-button>
</div>
<j-table
:can-drag="true"
:scroll="{x: '100%'}"
@@ -183,9 +176,6 @@ export default {
}
],
dataSource: [],
url: {
exportXlsUrl: ''
},
formInline: {}
}
},
@@ -217,48 +207,6 @@ export default {
},
handleMaterialClick (record) {
this.$refs.uploadFile.open(record.material)
},
handleExportXls (fileName, fileSuffix = '.xls') {
if (!fileName || typeof fileName !== 'string') {
fileName = this.$t('exportFile')
}
const param = this.getQueryParams()
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
param.selections = this.selectedRowKeys.join(',')
}
console.log('导出参数', param)
// 加一个大的提示
const modalLoading = this.$info({
title: this.$t('tips'),
content: <span>{this.$t('exportTip')} <a-spin size="small" /></span>,
keyboard: false
})
// 把知道了这个按钮去掉
this.$nextTick(() => {
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none'
})
downFile(this.url.exportXlsUrl, param).then((data) => {
if (!data) {
this.$message.warning(this.$t('fileDownloadFail'))
return
}
if (typeof window.navigator.msSaveBlob !== 'undefined') {
window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + fileSuffix)
} else {
const url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
const link = document.createElement('a')
link.style.display = 'none'
link.href = url
link.setAttribute('download', fileName + fileSuffix)
document.body.appendChild(link)
link.click()
document.body.removeChild(link) // 下载完成移除元素
window.URL.revokeObjectURL(url) // 释放掉blob对象
}
}).finally(() => {
// 销毁这个提示
modalLoading.destroy()
})
}
}
}