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
<template>
<div class="dee-page border white-bg position-page">
<DeeStaticCmp
ref="table"
:cmp-options="{value:layoutKey,typeName:layoutType}"
:tool-event="toolEvent"
/>
<import-post :dialog-visible="importDialogVisible" @getList="getList" @handleClose="handleClose" />
</div>
</template>
<script>
import { exportTemplate, exportData } from '@/api/userSystem/user'
import ImportPost from './importPost'
export default {
components: { ImportPost },
props: {},
data() {
return {
importDialogVisible: false,
layoutType: 'Post',
layoutKey: 'defaultResult',
toolEvent: {
'tb-importPost': (data) => {
this.importDialogVisible = true
},
'tb-exportPost': (data) => {
exportData('Post', {}).then(res => {
this.$utils.downLoadFile(res)
}).catch(e => {
const message = e.data && e.data.message
this.$utils.showMessageWarning(message || '数据包下载出错:未找到数据包内容的下载链接,请联系管理员排查问题!')
})
},
'tb-downloadPostTemplate': (data) => {
exportTemplate('Post').then(res => {
this.$utils.downLoadFile(res)
}).catch(e => {
const message = e.data && e.data.message
this.$utils.showMessageWarning(message || '数据包下载出错:未找到数据包内容的下载链接,请联系管理员排查问题!')
})
}
}
}
},
computed: {},
watch: {},
// 生命周期 - 创建完成(访问当前this实例)
created() {},
// 生命周期 - 挂载完成(访问DOM元素)
mounted() {},
methods: {
getList() {
this.$refs.table.freshRewritingGetData()
},
handleClose() {
this.importDialogVisible = false
}
}
}
</script>
<style lang="scss">
/* @import url(); 引入css类 */
.position-page{
height:100%;
.dee-model.table{
flex:1;
.dee-table-cmt{
height: calc(100% );
.dee-table{
height: calc(100% );
.dee-table-body{
height: calc(100% - 90px);
overflow: auto;
}
}
}
}
}
</style>