ExportBox.vue
1.04 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
<template>
<el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible"
class="NCC-dialog NCC-dialog_center" lock-scroll width="480px">
<el-form label-position="top" label-width="80px">
<el-form-item label="数据选择">
<el-radio-group v-model="type">
<el-radio :label="0">当前页面数据</el-radio>
<el-radio :label="1">全部页面数据</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible=false">取 消</el-button>
<el-button type="primary" @click="downLoad">导 出</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
data() {
return {
visible: false,
type: 0
}
},
methods: {
init() {
this.visible = true
this.type = 0
},
downLoad() {
this.$emit('download', { dataType: this.type })
}
}
}
</script>
<style lang="scss" scoped>
>>> .el-dialog__body {
padding: 20px !important;
}
</style>