|
@@ -1,34 +1,61 @@
|
|
|
<template>
|
|
|
- <el-drawer
|
|
|
- title="我是标题"
|
|
|
- :visible.sync="drawer"
|
|
|
- :direction="direction"
|
|
|
- :before-close="handleClose"
|
|
|
- >
|
|
|
- <span>我来啦!</span>
|
|
|
+ <el-drawer :title="Statistics.label" :visible.sync="drawer_" :direction="direction" :modal="false" :before-close="handleClose">
|
|
|
+ <div class="integration-num">{{ Statistics.total }}</div>
|
|
|
+ <el-table :data="tableData" style="width: 100%" class="integration-num">
|
|
|
+ <el-table-column prop="date" label="日期" min-width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.date }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
</el-drawer>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
export default {
|
|
|
+ props: {
|
|
|
+ data: { type: Object, required: true },
|
|
|
+ drawer: { type: Boolean, default: false }
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
- drawer: TextTrackCue,
|
|
|
- direction: 'rtl'
|
|
|
+ Statistics: {}, // title
|
|
|
+ direction: 'rtl',
|
|
|
+ tableData: [{
|
|
|
+ date: '2016-05-02',
|
|
|
+ name: '王小虎',
|
|
|
+ address: '上海市普陀区金沙江路 1518 弄'
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ drawer_: {
|
|
|
+ get() { return this.drawer },
|
|
|
+ set(v) {
|
|
|
+ console.log(v, 'co')
|
|
|
+ this.$emit('clone', v)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ data: {
|
|
|
+ handler(newV, oldV) {
|
|
|
+ this.Statistics = newV
|
|
|
+ },
|
|
|
+ immediate: true
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
handleClose(done) {
|
|
|
- this.$confirm('确认关闭?')
|
|
|
- .then(_ => {
|
|
|
- done()
|
|
|
- })
|
|
|
- .catch(_ => {})
|
|
|
+ this.drawer = false
|
|
|
+ this.$emit('clone')
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style>
|
|
|
-
|
|
|
+<style lang="scss" scoped>
|
|
|
+.integration-num {
|
|
|
+ margin: 0 20px;
|
|
|
+}
|
|
|
</style>
|