浏览代码

论文发表

guhongwei 3 年之前
父节点
当前提交
b1286b55a2
共有 3 个文件被更改,包括 19 次插入30 次删除
  1. 6 6
      src/layout/scientific/paper/search-1.vue
  2. 3 0
      src/store/index.js
  3. 10 24
      src/views/scientific/paper/index.vue

+ 6 - 6
src/layout/scientific/paper/search-1.vue

@@ -4,12 +4,12 @@
       <van-col span="24" class="main">
         <van-col span="24" class="one">
           <van-form label-width="4em">
-            <van-field v-model="form.name" name="name" label="论文题目" placeholder="请输入论文题目" />
-            <van-field v-model="form.name" name="name" label="期刊卷号" placeholder="请输入期刊卷号" />
-            <van-field v-model="form.name" name="name" label="起止页码" placeholder="请输入起止页码" />
-            <van-field v-model="form.name" name="name" label="论文类别" placeholder="请输入论文类别" />
-            <van-field v-model="form.name" name="name" label="研究方向" placeholder="请输入研究方向" />
-            <van-field v-model="form.name" name="name" label="作者" placeholder="请输入作者" />
+            <van-field v-model="form.title" name="title" label="论文题目" placeholder="请输入论文题目" />
+            <van-field v-model="form.number" name="number" label="期刊卷号" placeholder="请输入期刊卷号" />
+            <van-field v-model="form.startnum" name="startnum" label="起止页码" placeholder="请输入起止页码" />
+            <van-field v-model="form.type" name="type" label="论文类别" placeholder="请输入论文类别" />
+            <van-field v-model="form.directionName" name="directionName" label="研究方向" placeholder="请输入研究方向" />
+            <van-field v-model="form.userName" name="userName" label="作者" placeholder="请输入作者" />
             <div class="btn">
               <van-button type="info" size="small" @click="reseat">重置条件</van-button>
               <van-button type="primary" size="small" @click="onSubmit">提交查询</van-button>

+ 3 - 0
src/store/index.js

@@ -32,6 +32,8 @@ import committee from '@common/src/store/committee';
 import times from '@common/src/store/times';
 // 其他成果
 import other from '@common/src/store/other';
+// 论文发表
+import paper from '@common/src/store/paper';
 
 Vue.use(Vuex);
 
@@ -56,5 +58,6 @@ export default new Vuex.Store({
     committee,
     times,
     other,
+    paper,
   },
 });

+ 10 - 24
src/views/scientific/paper/index.vue

@@ -18,6 +18,8 @@ import info1 from '@/layout/scientific/paper/info-1.vue';
 import search1 from '@/layout/scientific/paper/search-1.vue';
 import adminFrame from '@common/src/components/mobile-frame/mobile-main.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('paper');
+
 export default {
   name: 'index',
   props: {},
@@ -29,27 +31,7 @@ export default {
   },
   data: function () {
     return {
-      list: [
-        {
-          createBy: '1',
-          createTime: '2021-09-16 10:08:17',
-          delFlag: '0',
-          direction: '338fa9ec011644778ffc28040c835f2a',
-          directionName: null,
-          id: '1846e091f4eb4b028ef2219a22fd2fc3',
-          number: '这里是卷号',
-          params: {},
-          remark: null,
-          searchValue: null,
-          startnum: '1-25',
-          title: '这里是题目',
-          type: '2',
-          updateBy: null,
-          updateTime: '2021-09-22 20:05:03',
-          userId: 'person001',
-          userName: '王江涛',
-        },
-      ],
+      list: [],
       total: 0,
       limit: 5,
       // 查询
@@ -64,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) {