guhongwei 4 年之前
父節點
當前提交
2c43072bf8

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

@@ -96,7 +96,15 @@ export default {
         list.push(...data);
         this.$set(this, `items`, _.uniqBy(list, 'index'));
       } else {
-        console.log('用户');
+        let data = [
+          { icon: 'el-icon-eleme', index: 'userExamine', title: '申请书' },
+          { icon: 'el-icon-eleme', index: 'userScore', title: '评分总结' },
+          { icon: 'el-icon-eleme', index: 'userExamine', title: '申请书' },
+          { icon: 'el-icon-eleme', index: 'userExamine', title: '申请书' },
+          { icon: 'el-icon-eleme', index: 'userExamine', title: '申请书' },
+        ];
+        list.push(...data);
+        this.$set(this, `items`, _.uniqBy(list, 'index'));
       }
       // if (user) {
       //   // 复制列表

+ 12 - 0
src/router/index.js

@@ -76,6 +76,18 @@ export default new Router({
           component: () => import('../views/adminCenter/adminCate/index.vue'),
           meta: { title: '证书发放' },
         },
+        // 用户中心
+        {
+          path: '/userExamine',
+          component: () => import('../views/userCenter/userExamine/index.vue'),
+          meta: { title: '申请书' },
+        },
+        // 评分总结
+        {
+          path: '/userScore',
+          component: () => import('../views/userCenter/userScore/index.vue'),
+          meta: { title: '评分总结' },
+        },
       ],
     },
     {

+ 76 - 0
src/views/userCenter/userExamine/index.vue

@@ -0,0 +1,76 @@
+<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" @view="toView"></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: [
+        {
+          label: '审核结果查看',
+          method: 'view',
+        },
+      ],
+      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 === '0' ? '待审中' : item === '-1' ? '审核未通过' : '未识别';
+          },
+        },
+      ],
+      list: [],
+      total: 0,
+    };
+  },
+  async created() {
+    console.log(this.user);
+    await this.search();
+  },
+  methods: {
+    ...achieveApply(['query']),
+    // 查询列表
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      const res = await this.query({ skip, limit, user_id: this.user.id, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, 'list', res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 审核结果查看
+    toView({ data }) {
+      console.log(data);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 30 - 0
src/views/userCenter/userScore/index.vue

@@ -0,0 +1,30 @@
+<template>
+  <div id="index">
+    <p>评分总结</p>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'index',
+  props: {},
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>