|
@@ -0,0 +1,66 @@
|
|
|
+<template>
|
|
|
+ <div id="statList">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" class="index">
|
|
|
+ <el-col :span="24" class="top">
|
|
|
+ <topInfo :topTitle="pageTitle"></topInfo>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="info">
|
|
|
+ <data-table :fields="fields" @delete="toDelete" :data="list" :opera="opera" @edit="toEdit" :total="total" @query="search"></data-table>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import topInfo from '@/layout/public/top.vue';
|
|
|
+import dataTable from '@/components/data-table.vue';
|
|
|
+import { mapActions, mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: lookuser } = createNamespacedHelpers('lookuser');
|
|
|
+export default {
|
|
|
+ name: 'statList',
|
|
|
+ props: {},
|
|
|
+ components: {
|
|
|
+ topInfo,
|
|
|
+ dataTable,
|
|
|
+ },
|
|
|
+ data: () => ({
|
|
|
+ opera: [],
|
|
|
+ fields: [{ label: '机构名称', prop: 'username', filter: 'input' }],
|
|
|
+ list: [],
|
|
|
+ total: 0,
|
|
|
+ }),
|
|
|
+ created() {
|
|
|
+ this.searchInfo();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...lookuser(['query']),
|
|
|
+ async searchInfo() {
|
|
|
+ const res = await this.query({ roomname: this.name });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ name() {
|
|
|
+ return this.$route.query.name;
|
|
|
+ },
|
|
|
+ pageTitle() {
|
|
|
+ return `${this.$route.meta.title}`;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="less" scoped>
|
|
|
+.add {
|
|
|
+ height: 40px;
|
|
|
+ line-height: 35px;
|
|
|
+ padding: 0 15px;
|
|
|
+}
|
|
|
+</style>
|