|
@@ -0,0 +1,170 @@
|
|
|
+<template>
|
|
|
+ <div id="index">
|
|
|
+ <admin-frame @search="search" :limit="limit" :total="total" topType="2" :leftArrow="false" @add="toAdd" :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>
|
|
|
+ <search-1 :form="searhForm" v-else-if="dialog.type == '2'" @reseat="reseat" @onSubmit="onSubmit"></search-1>
|
|
|
+ </van-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import list1 from '@/layout/infoview/task/list-1.vue';
|
|
|
+import info1 from '@/layout/infoview/task/info-1.vue';
|
|
|
+import search1 from '@/layout/infoview/task/search-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,
|
|
|
+ search1,
|
|
|
+ },
|
|
|
+ data: function () {
|
|
|
+ return {
|
|
|
+ list: [
|
|
|
+ {
|
|
|
+ cooperativeunit: '中心',
|
|
|
+ createBy: '1',
|
|
|
+ createTime: '2021-09-23 10:30:01',
|
|
|
+ delFlag: '0',
|
|
|
+ direction: 'direction001',
|
|
|
+ directionName: '开创视觉光刺激治疗癫痫研究',
|
|
|
+ fzuser: 'person001',
|
|
|
+ id: '6db0514ae17443e0a6017a30381df660',
|
|
|
+ labname: null,
|
|
|
+ laiyuancontent: '横向合作<横向合作',
|
|
|
+ money: 105,
|
|
|
+ name: '名称',
|
|
|
+ params: {},
|
|
|
+ participants: null,
|
|
|
+ persons: [
|
|
|
+ {
|
|
|
+ createBy: null,
|
|
|
+ createTime: '2021-10-09 09:52:14',
|
|
|
+ delFlag: '0',
|
|
|
+ id: '30501382e525433bba47df3ecc0789db',
|
|
|
+ params: {},
|
|
|
+ projectid: '6db0514ae17443e0a6017a30381df660',
|
|
|
+ remark: null,
|
|
|
+ searchValue: null,
|
|
|
+ updateBy: null,
|
|
|
+ updateTime: null,
|
|
|
+ userName: '张彤',
|
|
|
+ userid: 'person004',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ createBy: null,
|
|
|
+ createTime: '2021-10-09 09:52:14',
|
|
|
+ delFlag: '0',
|
|
|
+ id: '4637ac39b76545dfb27718e9d8d169a0',
|
|
|
+ params: {},
|
|
|
+ projectid: '6db0514ae17443e0a6017a30381df660',
|
|
|
+ remark: null,
|
|
|
+ searchValue: null,
|
|
|
+ updateBy: null,
|
|
|
+ updateTime: null,
|
|
|
+ userName: '王江涛',
|
|
|
+ userid: 'person001',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ createBy: null,
|
|
|
+ createTime: '2021-10-09 09:52:14',
|
|
|
+ delFlag: '0',
|
|
|
+ id: '98953aab18c04f3499ca6fafcb823c8d',
|
|
|
+ params: {},
|
|
|
+ projectid: '6db0514ae17443e0a6017a30381df660',
|
|
|
+ remark: null,
|
|
|
+ searchValue: null,
|
|
|
+ updateBy: null,
|
|
|
+ updateTime: null,
|
|
|
+ userName: '刘光耀',
|
|
|
+ userid: 'person002',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ projectlevelone: 'xm666sss',
|
|
|
+ projectsource: '5',
|
|
|
+ projectsourcetwo: '21',
|
|
|
+ remark: null,
|
|
|
+ searchValue: null,
|
|
|
+ state: null,
|
|
|
+ statemoney: 5,
|
|
|
+ time: '2021-09-22',
|
|
|
+ updateBy: null,
|
|
|
+ updateTime: '2021-10-09 09:52:14',
|
|
|
+ userName: '王江涛',
|
|
|
+ usernum: '10',
|
|
|
+ userproportion: '30%',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ total: 0,
|
|
|
+ limit: 5,
|
|
|
+ // 查询
|
|
|
+ searhForm: {},
|
|
|
+ // 弹框
|
|
|
+ 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;
|
|
|
+ console.log(this.searhForm);
|
|
|
+ },
|
|
|
+ // 查看信息
|
|
|
+ async toView(data) {
|
|
|
+ data.persons = JSON.stringify(data.persons.map((i) => i.userName));
|
|
|
+ this.$set(this, `info`, data);
|
|
|
+ this.dialog = { show: true, title: '详细信息', type: '1' };
|
|
|
+ },
|
|
|
+ // 添加查询条件
|
|
|
+ toAdd() {
|
|
|
+ this.dialog = { show: true, title: '查询条件', type: '2' };
|
|
|
+ },
|
|
|
+ // 重置条件
|
|
|
+ reseat() {
|
|
|
+ this.searhForm = {};
|
|
|
+ this.dialog = { show: false, title: '查询条件', type: '2' };
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ // 提交查询
|
|
|
+ onSubmit({ data }) {
|
|
|
+ this.search(data);
|
|
|
+ this.dialog = { show: false, title: '查询条件', type: '2' };
|
|
|
+ },
|
|
|
+ },
|
|
|
+ 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>
|