Browse Source

修改时间

y595705120 1 week ago
parent
commit
71563bc33e

+ 4 - 0
src/containers/center/components/menu/menu.js

@@ -58,6 +58,10 @@ const menu = [
        {
          path: '/center/examScore',
          name: '成绩查询'
+       },
+       {
+         path: '/center/userCert',
+         name: '我的证书'
        }
      ]
     }

+ 2 - 2
src/containers/center/home/index.vue

@@ -68,7 +68,7 @@
     httpServer
   } from "@/components/httpServer/httpServer.js";
   import setting from '@/setting';
-  import {curDate} from '@/utils/date.js'
+  import {curDatetime} from '@/utils/date.js'
   export default {
     name: "Index",
     data() {
@@ -77,7 +77,7 @@
         size: 6,
         total: 1,
         media: {},
-        curDate:curDate(),
+        curDate:curDatetime(),
         list: [],
         setting
       };

+ 96 - 0
src/containers/center/userCert/index.vue

@@ -0,0 +1,96 @@
+<template>
+  <div class="m-right-block fr mh576" style="position: relative;">
+    <div class="right-block-bd">
+      <div class="mb10 tc mt20">
+        <span class="p-ico2 worm-ico-o"></span>
+        注:<span class="txt-o"></span>考试通过一周内生成,若未看到,请联系管理员
+      </div>
+
+      <div  class="ng-scope">
+        <el-table v-loading="listLoading" :data="list" border fit highlight-current-row>
+          <el-table-column label="流水号" align="center"  prop="uuid"/>
+          <el-table-column label="岗位类别" prop="courseName" align="center"/>
+
+          <el-table-column label="所在企业" prop="company" align="center"/>
+
+          <el-table-column label="发布时间" prop="publishDate" align="center"/>
+
+          <el-table-column label="操作" fixed="right" align="center" width="100">
+            <template slot-scope="{row}">
+              <el-button  @click="printCert( row )" type="text" size="small">查看</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <el-pagination
+            @current-change="handleCurrentChange"
+            :current-page="page"
+           :page-size="size"
+           layout="total, prev,pager, next"
+           :total="list.length">
+        </el-pagination>
+
+      </div>
+
+    </div>
+  </div>
+</template>
+
+<script>
+  import {httpServer} from "@/components/httpServer/httpServer.js";
+  import {formatTimeToStr} from "@/utils/date.js";
+ import { mapGetters } from "vuex";
+  export default {
+    name: "Index",
+    data() {
+      return {
+        page:1,
+        size:10,
+        total: 20,
+        info:{},
+        list: [],
+        printCertDialog:false,
+        listLoading: false
+      };
+    },
+    beforeMount() {
+      this.getData()
+    },
+    computed: {
+    	...mapGetters("user", ["userInfo"])
+    },
+    methods: {
+      getData() {
+        this.listLoading = true
+        httpServer('Course.GetSmCertificateList', {}).then( res=>{
+            if( res.code == 200){
+              this.list = res.data||[]
+            }
+            this.listLoading = false
+        })
+      },
+      printCert( row  ){
+        window.open(row.certUrl, '_blank')
+      },
+      handleCurrentChange: function(page) {
+        this.page = page
+        this.getData()
+      }
+    }
+  }
+</script>
+
+<style>
+  .previewDialog{
+      text-align: center;
+  }
+  .previewDialog.el-dialog {
+    .el-dialog__header {
+      display: none;
+    }
+    .dj-dialog-content {
+      padding: 0;
+      overflow: unset;
+    }
+  }
+</style>

+ 5 - 0
src/router/index.js

@@ -43,6 +43,7 @@ import CenterExamScore from '@/containers/center/exam/score'
 import CenterExamDownload from '@/containers/center/exam/download'
 
 import CenterUserSeat from '@/containers/center/userSeat/index'
+import CenterUserCert from '@/containers/center/userCert/index'
 import PublicCertificate from '@/containers/certificate/index'
 
 Vue.use(Router)
@@ -205,6 +206,10 @@ export default new Router({
         {
           path: 'examDownload',
           component: CenterExamDownload,
+        },
+        {
+          path: 'userCert',
+          component: CenterUserCert
         }
       ],
     }

+ 4 - 0
src/utils/date.js

@@ -21,6 +21,10 @@ export function curDate( ) {
     return d.toLocaleString();
 }
 
+export function curDatetime( ) {
+    var d = new Date().Format("yyyy-MM-dd hh:mm:ss");
+    return d.toLocaleString();
+}
 export function formatTimeToStr(times, pattern) {
     var d = new Date(times).Format("yyyy-MM-dd hh:mm:ss");
     if (pattern) {