|
@@ -18,6 +18,7 @@ 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';
|
|
|
+const { mapActions } = createNamespacedHelpers('task');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
@@ -29,81 +30,7 @@ export default {
|
|
|
},
|
|
|
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%',
|
|
|
- },
|
|
|
- ],
|
|
|
+ list: [],
|
|
|
total: 0,
|
|
|
limit: 5,
|
|
|
// 查询
|
|
@@ -118,13 +45,19 @@ export default {
|
|
|
await this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
+ ...mapActions(['query']),
|
|
|
async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
|
|
|
if (searchName) info.name = searchName;
|
|
|
- console.log(this.searhForm);
|
|
|
+ const res = await this.query({ skip, limit, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `list`, res.rows);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
},
|
|
|
// 查看信息
|
|
|
async toView(data) {
|
|
|
- data.persons = JSON.stringify(data.persons.map((i) => i.userName));
|
|
|
+ console.log(data);
|
|
|
+ data.persons = data.persons.map((i) => i.userName).join(',');
|
|
|
this.$set(this, `info`, data);
|
|
|
this.dialog = { show: true, title: '详细信息', type: '1' };
|
|
|
},
|