importErrDialog.vue
1.72 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<template>
<GLDialog
mode="small"
title="操作结果"
:visible.sync="importObj.show"
:before-close="handleClose"
>
<template #default>
<div class="importObj-content">
<div class="success item">
<div class="num">{{importObj.successCount}}</div>
有效数据
</div>
<div class="line"></div>
<div class="error item">
<div class="num">{{importObj.errorCount}}</div>
异常数据
</div>
</div>
</template>
<template #footer>
<el-button
size="small"
@click="handleClose"
>确定</el-button>
<el-button
type="primary"
size="small"
@click="handleConfirm"
>导出错误结果</el-button>
</template>
</GLDialog>
</template>
<script type='text/ecmascript-6'>
import { aToExport } from '@/common/constant'
export default {
name: '',
props: {
importObj: {
type: Object,
default: () => { }
}
},
data () {
return {
loading: false,
checked: false
}
},
mounted () {
},
methods: {
handleClose () {
this.$emit('update:importObj', {})
},
handleConfirm () {
aToExport(this.importObj.errorUrl)
this.handleClose()
}
}
}
</script>
<style scoped lang='scss'>
.importObj-content {
height: 100%;
display: flex;
align-items: center;
.item {
flex: 1;
text-align: center;
.num {
font-weight: 700;
font-size: 26px;
line-height: 32px;
margin-bottom: 10px;
}
}
.error {
.num {
color: #eb4e4e;
}
}
.success {
.num {
color: #2cca74;
}
}
.line {
width: 1px;
height: 56px;
background: #e8e8ea;
}
}
</style>