guhongwei 4 năm trước cách đây
mục cha
commit
7489b18eb0

+ 17 - 1
src/components/common/Sidebar.vue

@@ -159,7 +159,23 @@ export default {
             ],
           },
           { icon: 'el-icon-eleme', index: '/perfectData', title: '完善资料' },
-          { icon: 'el-icon-eleme', index: 'userCert', title: '证书发放' },
+          {
+            icon: 'el-icon-eleme',
+            index: '6',
+            title: '证书管理',
+            subs: [
+              {
+                icon: 'el-icon-eleme',
+                index: '/readyCert',
+                title: '待发证书',
+              },
+              {
+                icon: 'el-icon-eleme',
+                index: '/alreadyCert',
+                title: '已发证书',
+              },
+            ],
+          },
         ];
         list.push(...data);
         this.$set(this, `items`, _.uniqBy(list, 'index'));

+ 8 - 3
src/router/index.js

@@ -183,9 +183,14 @@ export default new Router({
         },
         // 证书发放
         {
-          path: '/userCert',
-          component: () => import('../views/userCenter/userCert/index.vue'),
-          meta: { title: '证书发放' },
+          path: '/readyCert',
+          component: () => import('../views/userCenter/userCert/readyCert.vue'),
+          meta: { title: '待发证书' },
+        },
+        {
+          path: '/alreadyCert',
+          component: () => import('../views/userCenter/userCert/alreadyCert.vue'),
+          meta: { title: '已发证书' },
         },
       ],
     },

+ 1 - 1
src/views/adminCenter/adminCate/index.vue

@@ -28,7 +28,7 @@ export default {
     return {
       opera: [
         {
-          label: '已收到证书',
+          label: '发放证书',
           method: 'cert',
         },
       ],

+ 1 - 1
src/views/userCenter/userCert/index.vue

@@ -29,7 +29,7 @@ export default {
           label: '状态',
           prop: 'status',
           format: item => {
-            return item === '4' ? '完善资料&待发放' : '未识别';
+            return item === '6' ? '已发证书' : '未识别';
           },
         },
       ],

+ 66 - 0
src/views/userCenter/userCert/readyCert.vue

@@ -0,0 +1,66 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="down">
+          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search"></data-table>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: achieveApply } = createNamespacedHelpers('achieveApply');
+export default {
+  name: 'index',
+  props: {},
+  components: { dataTable },
+  data: function() {
+    return {
+      opera: [],
+      fields: [
+        { label: '成果编号', prop: 'basic.achieve_num', filter: 'input', showTip: true },
+        { label: '成果名称', prop: 'basic.achieve_name', showTip: true },
+        { label: '成果类别', prop: 'basic.achieve_type', showTip: true },
+        {
+          label: '状态',
+          prop: 'status',
+          format: item => {
+            return item === '5' ? '待发证书' : '未识别';
+          },
+        },
+      ],
+      list: [],
+      total: 0,
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...achieveApply(['query']),
+    // 查询列表
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      const res = await this.query({ skip, limit, status: 5, user_id: this.user.id, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, 'list', res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>