123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- <template>
- <div id="index">
- <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" v-if="dialog.type == '1'"></info-1>
- </van-dialog>
- </div>
- </template>
- <script>
- import list1 from '@/layout/research/list-1.vue';
- import info1 from '@/layout/research/info-1.vue';
- import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
- import { mapState, createNamespacedHelpers } from 'vuex';
- export default {
- name: 'index',
- props: {},
- components: {
- adminFrame,
- list1,
- info1,
- },
- data: function () {
- return {
- list: [
- {
- createBy: '1',
- createTime: '2021-09-24 15:10:01',
- delFlag: '0',
- id: 'direction001',
- name: '开创视觉光刺激治疗癫痫研究',
- params: {},
- personId: 'person001',
- personName: '王江涛',
- persons: [
- {
- createBy: null,
- createTime: '2021-10-11 19:57:29',
- direction: 'direction001',
- id: '2896b42a57ec49b4aa2102d324fca81e',
- params: {},
- personId: 'person435',
- personName: '张洪波',
- remark: null,
- searchValue: null,
- updateBy: null,
- updateTime: null,
- },
- {
- createBy: null,
- createTime: '2021-10-11 19:57:29',
- direction: 'direction001',
- id: '39ec9611c3814f738cf8118522e00c7a',
- params: {},
- personId: 'person1119',
- personName: '李国亮',
- remark: null,
- searchValue: null,
- updateBy: null,
- updateTime: null,
- },
- {
- createBy: null,
- createTime: '2021-10-11 19:57:29',
- direction: 'direction001',
- id: '509af2c53cfa4a28aa58eab8c7491a19',
- params: {},
- personId: 'person579',
- personName: '张艳凤',
- remark: null,
- searchValue: null,
- updateBy: null,
- updateTime: null,
- },
- {
- createBy: null,
- createTime: '2021-10-11 19:57:29',
- direction: 'direction001',
- id: '9dfa64d3f9594e509880eded42cabbcf',
- params: {},
- personId: 'person986',
- personName: '杨诺',
- remark: null,
- searchValue: null,
- updateBy: null,
- updateTime: null,
- },
- {
- createBy: null,
- createTime: '2021-10-11 19:57:29',
- direction: 'direction001',
- id: 'bb3b9aa4c1104833940896349a2d9b05',
- params: {},
- personId: 'person004',
- personName: '张彤',
- remark: null,
- searchValue: null,
- updateBy: null,
- updateTime: null,
- },
- ],
- remark: null,
- searchValue: null,
- updateBy: '1',
- updateTime: '2021-10-11 19:57:28',
- },
- ],
- total: 0,
- limit: 5,
- // 弹框
- dialog: { show: false, title: '详细信息', type: '1' },
- // 详细信息
- info: {},
- };
- },
- async created() {
- await this.search();
- },
- methods: {
- async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
- if (searchName) info.name = searchName;
- },
- // 查看信息
- async toView(data) {
- data.persons = JSON.stringify(data.persons.map((i) => i.personName));
- this.$set(this, `info`, data);
- this.dialog = { show: true, title: '详细信息', type: '1' };
- },
- },
- computed: {
- ...mapState(['user']),
- },
- metaInfo() {
- return { title: this.$route.meta.title };
- },
- watch: {
- test: {
- deep: true,
- immediate: true,
- handler(val) {},
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .dialog {
- /deep/.van-dialog__content {
- max-height: 350px;
- overflow-y: auto;
- }
- }
- </style>
|