error.vue
1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<template>
<el-dialog v-model="showDialog" width="400" center title="导入结果">
<!-- <div class="row">-->
<!-- <span class="">导入成功:{{ form.rightCount }}条</span>-->
<!-- </div>-->
<div v-if="!form.finishFlag" class="row">
<span class="error">导入失败:{{ form.info.length }}条</span>
</div>
<br>
<br>
<div style="text-align: center">
<el-button type="primary" @click="showDialog=false">确定</el-button>
<el-button v-if="!form.finishFlag" type="warning" @click="downloadExcel">导出错误信息</el-button>
</div>
</el-dialog>
</template>
<script setup>
import { ref, getCurrentInstance } from 'vue'
const { proxy } = getCurrentInstance()
const form = ref({
finishFlag: false
})
const showDialog = ref(false)
function open(row) {
form.value = row
showDialog.value = true
}
function downloadExcel() {
proxy.download(
`/system/duanInputRange/exportImportPersonDuanResult`, { info: JSON.stringify(form.value.info) }, `导入结果${new Date().getTime()}.xlsx`
)
}
defineExpose({
open
})
</script>
<style scoped lang="scss">
.row{
text-align: center;
font-size: 18px;
}
.error{
color: red;
}
.success{
color: #e6a23c;
}
</style>