|
@@ -1,26 +1,71 @@
|
|
|
<template>
|
|
|
<div id="index">
|
|
|
- <van-row>
|
|
|
- <van-col span="24" class="main"> test </van-col>
|
|
|
- </van-row>
|
|
|
+ <admin-frame @search="search" :limit="limit" :total="total" :useNav="false">
|
|
|
+ <template v-slot:info>
|
|
|
+ <list-1 :list="list" @toView="toView"></list-1>
|
|
|
+ </template>
|
|
|
+ </admin-frame>
|
|
|
+ <van-dialog class="dialog" v-model="dialog.show" :title="dialog.title" :show-confirm-button="false" show-cancel-button cancel-button-text="返回">
|
|
|
+ <info-1 :info="info"></info-1>
|
|
|
+ </van-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import list1 from '@/layout/innovate/popularization/list-1.vue';
|
|
|
+import info1 from '@/layout/innovate/popularization/info-1.vue';
|
|
|
+import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions } = createNamespacedHelpers('usual');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
|
- components: {},
|
|
|
+ components: {
|
|
|
+ adminFrame,
|
|
|
+ list1,
|
|
|
+ info1,
|
|
|
+ },
|
|
|
data: function () {
|
|
|
- return {};
|
|
|
+ return {
|
|
|
+ list: [],
|
|
|
+ total: 0,
|
|
|
+ limit: 4,
|
|
|
+ dialog: { show: false, title: '详细信息' },
|
|
|
+ info: {},
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.search();
|
|
|
},
|
|
|
- created() {},
|
|
|
- methods: {},
|
|
|
+ methods: {
|
|
|
+ ...mapActions(['query', 'fetch']),
|
|
|
+ async search({ skip = 0, limit = this.limit, ...info } = {}) {
|
|
|
+ const res = await this.query({ table: 'Losc', skip, limit, ...info });
|
|
|
+ if (res.errcode == '0') {
|
|
|
+ this.$set(this, 'list', res.data);
|
|
|
+ this.$set(this, 'total', res.total);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async toView(data) {
|
|
|
+ const res = await this.fetch({ table: 'Losc', id: data.id });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, 'info', res.data);
|
|
|
+ this.dialog = { show: true, title: '详细信息' };
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
metaInfo() {
|
|
|
return { title: this.$route.meta.title };
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
-<style lang="less" scoped></style>
|
|
|
+<style lang="less" scoped>
|
|
|
+.dialog {
|
|
|
+ /deep/.van-dialog__content {
|
|
|
+ max-height: 350px;
|
|
|
+ overflow-y: auto;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|