系统管理模块,排班任务页面导入失败的数据增加弹窗提醒

This commit is contained in:
任珮宇 2024-03-14 18:52:44 +08:00
parent b290785eb4
commit ecd16d9fbf

View File

@ -195,6 +195,13 @@
</a-spin>
</custom-modal>
<!-- 增加/编辑排班弹窗结束 -->
<custom-modal title="Failure record" v-model="visibleRes" :footer="null">
<custom-table size="middle" :columns="columns" :list="dataSource">
<template slot="index" slot-scope="{ index }">
{{ index + 1 }}
</template>
</custom-table>
</custom-modal>
</div>
</template>
<script>
@ -250,6 +257,41 @@ export default {
dragItem: null,
fromUserId: '',
stationName: '',
visibleRes: false,
columns: [
{
title: 'NO',
align: 'left',
scopedSlots: {
customRender: 'index',
},
customHeaderCell: () => {
return {
style: {
'padding-left': '60px !important',
},
}
},
customCell: () => {
return {
style: {
'padding-left': '60px !important',
},
}
},
},
{
title: 'LINE',
align: 'left',
dataIndex: 'line',
},
{
title: 'RESULT',
align: 'left',
dataIndex: 'result',
},
],
dataSource: [],
}
},
created() {
@ -421,8 +463,10 @@ export default {
try {
const formData = new FormData()
formData.append('file', file)
const { success, failure } = await postAction('/sysTask/importExcel', formData)
const { success, failure, detailList } = await postAction('/sysTask/importExcel', formData)
this.$message.success(`${success} Success, ${failure} Fail`)
this.dataSource = detailList
this.visibleRes = true
this.isImport = false
this.getList()
} catch (error) {