|
@@ -0,0 +1,107 @@
|
|
|
+<template>
|
|
|
+ <div id="index">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" class="main">
|
|
|
+ <el-col :span="24" class="top">
|
|
|
+ <top topType="4" @back="back" @add="add"></top>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="info" :style="{ height: clientHeight + 'px' }"> 列表 </el-col>
|
|
|
+ <el-col :span="24" class="foot">
|
|
|
+ <page limit="4" :total="total" @search="search"></page>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import top from '@/layout/common/top.vue';
|
|
|
+import page from '@/layout/common/page.vue';
|
|
|
+import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: ticket } = createNamespacedHelpers('ticket');
|
|
|
+export default {
|
|
|
+ name: 'index',
|
|
|
+ props: {},
|
|
|
+ components: {
|
|
|
+ top,
|
|
|
+ page,
|
|
|
+ },
|
|
|
+ data: function () {
|
|
|
+ return {
|
|
|
+ clientHeight: '',
|
|
|
+ list: [],
|
|
|
+ total: 0,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ async created() {
|
|
|
+ await this.search();
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ let clientHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 80;
|
|
|
+ this.$set(this, `clientHeight`, clientHeight);
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...ticket(['query']),
|
|
|
+ async search({ skip = 0, limit = 4, ...info } = {}) {
|
|
|
+ const res = await this.query({ skip, limit, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 添加
|
|
|
+ add() {},
|
|
|
+ // 查看
|
|
|
+ // toView(data) {},
|
|
|
+ // 返回
|
|
|
+ back() {
|
|
|
+ this.$router.push('/userCenter');
|
|
|
+ },
|
|
|
+ // 处理状态
|
|
|
+ getStatus(data) {
|
|
|
+ const r = policyStatus.find((f) => f.value === data);
|
|
|
+ if (r) return r.label;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ // 添加
|
|
|
+ add() {},
|
|
|
+ // 查看
|
|
|
+ // toView(data) {},
|
|
|
+ // 返回
|
|
|
+ back() {
|
|
|
+ this.$router.push('/userCenter');
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ },
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ test: {
|
|
|
+ deep: true,
|
|
|
+ immediate: true,
|
|
|
+ handler(val) {},
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.main {
|
|
|
+ .top {
|
|
|
+ height: 40px;
|
|
|
+ overflow: hidden;
|
|
|
+ border-bottom: 1px solid #f1f1f1;
|
|
|
+ }
|
|
|
+ .info {
|
|
|
+ overflow-x: hidden;
|
|
|
+ overflow-y: auto;
|
|
|
+ }
|
|
|
+ .foot {
|
|
|
+ height: 50px;
|
|
|
+ overflow: hidden;
|
|
|
+ border-top: 1px solid #f1f1f1;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|