ソースを参照

承担任务明细,成果

lrf 3 年 前
コミット
3678274a06

+ 6 - 0
src/store/index.js

@@ -8,6 +8,10 @@ import login from '@common/src/store/login';
 import laboratory from '@common/src/store/laboratory';
 // 研究方向
 import direction from '@common/src/store/direction';
+// 重要成果
+import achievement from '@common/src/store/achievement';
+// 承担项目明星
+import task from '@common/src/store/task';
 // 博硕培养情况
 import doctor from '@common/src/store/doctor';
 // 职称晋升
@@ -53,5 +57,7 @@ export default new Vuex.Store({
     assistant,
     committee,
     times,
+    achievement,
+    task,
   },
 });

+ 8 - 6
src/views/infoview/achievement/index.vue

@@ -16,6 +16,7 @@ import list1 from '@/layout/infoview/achievement/list-1.vue';
 import info1 from '@/layout/infoview/achievement/info-1.vue';
 import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('achievement');
 export default {
   name: 'index',
   props: {},
@@ -26,12 +27,7 @@ export default {
   },
   data: function () {
     return {
-      list: [
-        {
-          name: '成果名称',
-          content: '成果内容成果内容成果内容成果内容成果内容成果内容成果内容成果内容成果内容成果内容成果内容成果内容成果内容成果内容成果内容成果内容成果内容',
-        },
-      ],
+      list: [],
       total: 0,
       limit: 5,
       // 弹框
@@ -44,8 +40,14 @@ export default {
     await this.search();
   },
   methods: {
+    ...mapActions(['query']),
     async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
       if (searchName) info.name = searchName;
+      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) {

+ 10 - 77
src/views/infoview/task/index.vue

@@ -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' };
     },