瀏覽代碼

Merge branch 'master' of http://git.cc-lotus.info/free-lab/lab-mobile

lrf 3 年之前
父節點
當前提交
71de2a23ea

+ 22 - 0
src/store/index.js

@@ -16,6 +16,21 @@ import title from '@common/src/store/title';
 import personnelname from '@common/src/store/personnelname';
 // 设备
 import equipment from '@common/src/store/equipment';
+// 社会服务活动
+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';
+// 主任及科研助理
+import assistant from '@common/src/store/assistant';
+// 学术委员会
+import committee from '@common/src/store/committee';
+// 平台活动时间段
+import times from '@common/src/store/times';
+
 Vue.use(Vuex);
 
 export default new Vuex.Store({
@@ -31,5 +46,12 @@ export default new Vuex.Store({
     title,
     personnelname,
     equipment,
+    socialservices,
+    technicalservice,
+    scienceactivities,
+    report,
+    assistant,
+    committee,
+    times,
   },
 });

+ 9 - 19
src/views/activity/time/index.vue

@@ -18,6 +18,7 @@ import info1 from '@/layout/activity/time/info-1.vue';
 import search1 from '@/layout/activity/time/search-1.vue';
 import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('times');
 export default {
   name: 'index',
   props: {},
@@ -29,22 +30,7 @@ export default {
   },
   data: function () {
     return {
-      list: [
-        {
-          createBy: '1',
-          createTime: '2021-11-17 15:20:03',
-          endTime: '2021-12-31',
-          id: '3d927a9ce1b54ba2879b7c6a8aab6370',
-          isOpen: '0',
-          params: {},
-          remark: null,
-          searchValue: null,
-          startTime: '2021-11-01',
-          title: '测试',
-          updateBy: null,
-          updateTime: null,
-        },
-      ],
+      list: [],
       total: 0,
       limit: 5,
       // 查询
@@ -59,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, isOpen: '0', ...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/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) {

+ 10 - 34
src/views/personnel/director/index.vue

@@ -18,6 +18,8 @@ import info1 from '@/layout/personnel/director/info-1.vue';
 import search1 from '@/layout/personnel/director/search-1.vue';
 import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('assistant');
+
 export default {
   name: 'index',
   props: {},
@@ -29,37 +31,7 @@ export default {
   },
   data: function () {
     return {
-      list: [
-        {
-          assistantArea: null,
-          assistantCardtime: null,
-          assistantJob: '',
-          assistantJobtime: null,
-          assistantName: '',
-          assistantPosition: null,
-          committeeArea: '脑功能和脑疾病机制及其神经调控',
-          committeeCardtime: '2021-10-07',
-          committeeJob: null,
-          committeeJobtime: null,
-          committeeName: '舒友生',
-          committeePosition: '副院长',
-          createBy: '1',
-          createTime: '1900-01-20 00:05:43',
-          delFlag: '0',
-          id: '1',
-          labArea: '癫痫及小儿神经系统疾病基础与临床',
-          labCardtime: '2021-09-23',
-          labJob: null,
-          labJobtime: null,
-          labName: '梁建民',
-          labPosition: '科主任',
-          params: {},
-          remark: null,
-          searchValue: null,
-          updateBy: null,
-          updateTime: '2021-09-23 13:17:54',
-        },
-      ],
+      list: [],
       total: 0,
       limit: 5,
       // 查询
@@ -74,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) {

+ 10 - 23
src/views/personnel/learning/index.vue

@@ -18,6 +18,8 @@ import info1 from '@/layout/personnel/learning/info-1.vue';
 import search1 from '@/layout/personnel/learning/search-1.vue';
 import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('committee');
+
 export default {
   name: 'index',
   props: {},
@@ -29,26 +31,7 @@ export default {
   },
   data: function () {
     return {
-      list: [
-        {
-          age: null,
-          createBy: '1',
-          createTime: '2021-09-17 13:36:25',
-          delFlag: '0',
-          directionId: '生物钟异常与癫痫病机理',
-          id: 'c6c020e1d88643f59db9a2f7b0c533cb',
-          job: null,
-          name: '李培军',
-          params: {},
-          remark: null,
-          searchValue: null,
-          title: null,
-          type: '2',
-          unit: '温州医科大学附属第二医院、育英儿童医院',
-          updateBy: null,
-          updateTime: null,
-        },
-      ],
+      list: [],
       total: 0,
       limit: 5,
       // 查询
@@ -63,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) {