Browse Source

学术交流

guhongwei 3 years ago
parent
commit
98d650d3e6

+ 12 - 0
src/store/index.js

@@ -11,6 +11,14 @@ import doctor from '@common/src/store/doctor';
 import title from '@common/src/store/title';
 // 人才称号
 import personnelname from '@common/src/store/personnelname';
+// 社会服务活动
+import socialservices from '@common/src/store/socialservices';
+// 技术服务活动
+import technicalservice from '@common/src/store/technicalservice';
+// 科普活动
+import scienceactivities from '@common/src/store/scienceactivities';
+// 提交报告
+import report from '@common/src/store/report';
 
 Vue.use(Vuex);
 
@@ -25,5 +33,9 @@ export default new Vuex.Store({
     doctor,
     title,
     personnelname,
+    socialservices,
+    technicalservice,
+    scienceactivities,
+    report,
   },
 });

+ 9 - 22
src/views/learning/report/index.vue

@@ -18,6 +18,7 @@ import info1 from '@/layout/learning/report/info-1.vue';
 import search1 from '@/layout/learning/report/search-1.vue';
 import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('report');
 export default {
   name: 'index',
   props: {},
@@ -29,25 +30,7 @@ export default {
   },
   data: function () {
     return {
-      list: [
-        {
-          content: '这里是备注',
-          createBy: '1',
-          createTime: '2021-09-16 17:01:23',
-          delFlag: '0',
-          department: '部门1嗯嗯额',
-          id: '8f40b840c46e454dbfd00f0949dc82eb',
-          isadopt: '1',
-          message: '反馈信息',
-          name: '报告名称',
-          params: {},
-          remark: null,
-          searchValue: null,
-          type: '3',
-          updateBy: null,
-          updateTime: null,
-        },
-      ],
+      list: [],
       total: 0,
       limit: 5,
       // 查询
@@ -62,9 +45,13 @@ export default {
     await this.search();
   },
   methods: {
-    async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
-      if (searchName) info.name = searchName;
-      console.log(this.searhForm);
+    ...mapActions(['query', 'fetch']),
+    async search({ skip = 0, limit = this.limit, ...info } = {}) {
+      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) {

+ 9 - 22
src/views/learning/science/index.vue

@@ -18,6 +18,7 @@ import info1 from '@/layout/learning/science/info-1.vue';
 import search1 from '@/layout/learning/science/search-1.vue';
 import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('scienceactivities');
 export default {
   name: 'index',
   props: {},
@@ -29,25 +30,7 @@ export default {
   },
   data: function () {
     return {
-      list: [
-        {
-          content: '这里是备注',
-          createBy: '1',
-          createTime: '2021-09-16 16:55:49',
-          delFlag: '0',
-          id: '2f85135d401c4e4186c0cc8ae47edf7b',
-          name: '活动主题',
-          numbers: '参与对象50人',
-          params: {},
-          propaganda: '1',
-          remark: null,
-          searchValue: null,
-          timestr: '2021-09-04',
-          updateBy: null,
-          updateTime: null,
-          usersnumber: '参与人数',
-        },
-      ],
+      list: [],
       total: 0,
       limit: 5,
       // 查询
@@ -62,9 +45,13 @@ export default {
     await this.search();
   },
   methods: {
-    async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
-      if (searchName) info.name = searchName;
-      console.log(this.searhForm);
+    ...mapActions(['query', 'fetch']),
+    async search({ skip = 0, limit = this.limit, ...info } = {}) {
+      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 - 22
src/views/learning/sociology/index.vue

@@ -18,6 +18,8 @@ import info1 from '@/layout/learning/sociology/info-1.vue';
 import search1 from '@/layout/learning/sociology/search-1.vue';
 import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('socialservices');
+
 export default {
   name: 'index',
   props: {},
@@ -29,25 +31,7 @@ export default {
   },
   data: function () {
     return {
-      list: [
-        {
-          content: '111',
-          createBy: '1',
-          createTime: '2021-09-16 15:37:41',
-          delFlag: '0',
-          id: '91d0c1548b3b4e0ea8db25839faf50cf',
-          name: '活动名称',
-          numbers: 50,
-          params: {},
-          propaganda: '1',
-          remark: null,
-          role: '角色111',
-          searchValue: null,
-          updateBy: null,
-          updateTime: '2021-09-22 09:01:40',
-          usernames: '组织者11',
-        },
-      ],
+      list: [],
       total: 0,
       limit: 5,
       // 查询
@@ -62,9 +46,13 @@ export default {
     await this.search();
   },
   methods: {
-    async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
-      if (searchName) info.name = searchName;
-      console.log(this.searhForm);
+    ...mapActions(['query', 'fetch']),
+    async search({ skip = 0, limit = this.limit, ...info } = {}) {
+      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) {

+ 9 - 23
src/views/learning/technology/index.vue

@@ -18,6 +18,7 @@ import info1 from '@/layout/learning/technology/info-1.vue';
 import search1 from '@/layout/learning/technology/search-1.vue';
 import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('technicalservice');
 export default {
   name: 'index',
   props: {},
@@ -29,26 +30,7 @@ export default {
   },
   data: function () {
     return {
-      list: [
-        {
-          content: '备注拉拉',
-          createBy: '1',
-          createTime: '2021-09-16 16:34:09',
-          delFlag: '0',
-          id: 'fa0fa9b8b8134588b7750596cb36275b',
-          name: '活动名称',
-          params: {},
-          remark: null,
-          result: '结果拉拉',
-          searchValue: null,
-          servicetype: '2',
-          serviceusers: '500人',
-          transfertype: '1',
-          type: '2',
-          updateBy: null,
-          updateTime: null,
-        },
-      ],
+      list: [],
       total: 0,
       limit: 5,
       // 查询
@@ -63,9 +45,13 @@ export default {
     await this.search();
   },
   methods: {
-    async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
-      if (searchName) info.name = searchName;
-      console.log(this.searhForm);
+    ...mapActions(['query', 'fetch']),
+    async search({ skip = 0, limit = this.limit, ...info } = {}) {
+      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) {