From 2ff59bd14d4b8f2ec46a80190ef540e6d88f3766 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Thu, 29 Jul 2021 20:06:40 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises

---
 src/views/exam/examination.vue         |    4 
 src/views/applyexam/index.vue          |   57 ++-
 src/views/trainingRegistration/data.js |    2 
 src/router/views/index.js              |   72 ++++
 public/papers.html                     |  200 +++++++++++++
 src/util/util.js                       |   40 ++
 src/views/applyexam/papers.vue         |   40 ++
 src/styles/element-ui.scss             |  193 +++++++-----
 src/views/exam/subject.vue             |    2 
 src/views/singleperformance/index.vue  |   64 ++--
 src/views/exam/startexam.vue           |    4 
 src/api/exam/exam.js                   |    2 
 src/views/startexam/index.vue          |   16 
 src/views/exam/performance.vue         |  175 ++++++++--
 14 files changed, 681 insertions(+), 190 deletions(-)

diff --git a/public/papers.html b/public/papers.html
new file mode 100644
index 0000000..09d177a
--- /dev/null
+++ b/public/papers.html
@@ -0,0 +1,200 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <style>
+        #table {
+            color: #000;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            flex-direction: column;
+        }
+        
+        .user-info-table {
+            margin-top: 30px;
+            width: 60%;
+            height: 60%;
+            border: 1px solid #000;
+            background-color: #fff;
+        }
+        
+        .user-info-tr {
+            height: 50px;
+        }
+        
+        .avatar {
+            width: 140px;
+            height: 190px;
+        }
+        
+        .title {
+            margin-top: 20px;
+        }
+        
+        .avatar {
+            width: 140px;
+            height: 190px;
+        }
+    </style>
+    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
+    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
+</head>
+
+
+<body>
+    <div>
+        <div>
+            <button onclick="preview(1)">打印</button>
+        </div>
+        <!--startprint-->
+        <div id="table">
+            <!-- <span class="title">准考证信息</span>
+            <table class="user-info-table" border="1px" align="center" cellspacing="0" cellpadding="10">
+                <tr class="user-info-tr">
+                    <td width="150px">姓名</td>
+                    <td width="150px"></td>
+                    <td width="150px">身份证号</td>
+                    <td width="150px"></td>
+                    <td rowspan="4" align="center" width="150px" v-if="data.avatar == ''">
+                        照片
+                    </td>
+                </tr>
+
+                <tr class="user-info-tr">
+                    <td>准考证号</td>
+                    <td></td>
+                    <td width="150px">性别</td>
+                    <td width="150px" v-if="data.sex == 1">男</td>
+                </tr>
+
+                <tr class="user-info-tr">
+                    <td>考点名称</td>
+                    <td colspan="3"></td>
+                </tr>
+
+                <tr class="user-info-tr">
+                    <td>考点地址</td>
+                    <td colspan="3"></td>
+                </tr>
+
+                <tr class="user-info-tr" style="height:5px">
+                    <td colspan="5"></td>
+                </tr>
+
+                <tr class="user-info-tr">
+                    <td>考试名称</td>
+                    <td>考试类型</td>
+                    <td>考试时间</td>
+                    <td>考场号</td>
+                    <td>座位号</td>
+                </tr>
+
+                <tr class="user-info-tr">
+                    <td>{{data.examName}}</td>
+                    <td></td>
+                    <td></td>
+                    <td></td>
+                    <td></td>
+                </tr>
+
+            </table>
+        </div> -->
+            <!--endprint-->
+
+        </div>
+        <script>
+            var getData = function(name) {
+                var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
+                var r = window.location.search.substr(1).match(reg);
+                if (r != null) return unescape(r[2]);
+                return null;
+            };
+            var id = JSON.parse(getData("data")).id;
+
+            axios.get('http://192.168.0.114:81/apply/getApplyInfo?id=' + id).then(function(res) {
+                var data = res.data.data;
+                var str = `<span class="title">${data.examName}</span>
+                    <span class="title">准考证信息</span>
+                    <table class="user-info-table" border="1px" align="center" cellspacing="0" cellpadding="10">
+                        <tr class="user-info-tr">
+                            <td width="150px">姓名</td>
+                            <td width="150px">${data.realName}</td>
+                            <td width="150px">身份证号</td>
+                            <td width="150px">${data.idCardNo}</td>
+                            <td rowspan="4" align="center" width="150px"">
+                                照片
+                            </td>
+                        </tr>
+
+                        <tr class="user-info-tr">
+                            <td>准考证号</td>
+                            <td>${data.candidateNo}</td>
+                            <td width="150px">性别</td>
+                            <td width="150px">${data.sex==1?"男":(data.sex==2?"女":"")}</td>
+                        </tr>
+
+                        <tr class="user-info-tr">
+                            <td>考点名称</td>
+                            <td colspan="3"></td>
+                        </tr>
+
+                        <tr class="user-info-tr">
+                            <td>考点地址</td>
+                            <td colspan="3"></td>
+                        </tr>
+
+                        <tr class="user-info-tr" style="height:5px">
+                            <td colspan="5"></td>
+                        </tr>
+
+                        <tr class="user-info-tr">
+                            <td>考试名称</td>
+                            <td width="120px">考试类型</td>
+                            <td width="180px">考试时间</td>
+                            <td>考场号</td>
+                            <td>座位号</td>
+                        </tr>
+
+                        <tr class="user-info-tr">
+                            <td>${data.examName}</td>
+                            <td width="120px"></td>
+                            <td width="180px">${data.stringTime}</td>
+                            <td></td>
+                            <td></td>
+                        </tr>
+
+                    </table>
+                </div>`
+
+                var dom = $('#table');
+                dom.empty();
+                dom.append(str);
+            })
+
+            function preview(oper) {
+                if (oper < 10) {
+                    bdhtml = window.document.body.innerHTML;
+                    // 打印开始的标志
+                    sprnstr = "<!--startprint-->";
+                    // 打印结束的标志
+                    eprnstr = "<!--endprint-->";
+                    // 从打印开始的位置截取到末尾
+                    prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr));
+                    // 从开始截取到打印结束的位置
+                    prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
+                    // 替换html
+                    window.document.body.innerHTML = prnhtml;
+                    // 打印
+                    window.print();
+                    window.document.body.innerHTML = bdhtml;
+                } else {
+                    window.print();
+                }
+            }
+        </script>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/src/api/exam/exam.js b/src/api/exam/exam.js
index b87bfe5..eb925cc 100644
--- a/src/api/exam/exam.js
+++ b/src/api/exam/exam.js
@@ -36,7 +36,7 @@
 
 export const getSubjectIds = (param) => {
   return request({
-    url: '/api/exampaper/queryPagerSubject/',
+    url: '/api/exampaper/queryRandomSubject/',
     method: 'get',
     params: {
       ...param
diff --git a/src/router/views/index.js b/src/router/views/index.js
index c142848..b031e53 100644
--- a/src/router/views/index.js
+++ b/src/router/views/index.js
@@ -549,6 +549,19 @@
             component: () =>
                 import ( /* webpackChunkName: "views" */ '@/views/dispatchChild/index')
         }]
+    }, {
+        path: '/applyexam',
+        redirect: '/applyexam/papers',
+        component: Layout,
+        children: [{
+            path: 'papers',
+            name: '准考证信息',
+            meta: {
+                i18n: 'index',
+            },
+            component: () =>
+                import ( /* webpackChunkName: "views" */ '@/views/applyexam/papers')
+        }]
     },
     // {
     //     path: '/equipments',
@@ -647,5 +660,60 @@
             component: () =>
                 import ( /* webpackChunkName: "views" */ '@/views/trainExam/index')
         }]
-    }
-]
\ No newline at end of file
+    },
+  {
+    path: '/applyexam',
+    redirect: '/applyexam/index',
+    component: Layout,
+    children: [{
+      path: 'index',
+      name: '报名考试',
+      meta: {
+        i18n: 'index',
+      },
+      component: () =>
+        import( /* webpackChunkName: "views" */ '@/views/applyexam/index')
+    }]
+  },
+  {
+    path: '/startexam',
+    redirect: '/startexam/index',
+    component: Layout,
+    children: [{
+      path: 'index',
+      name: '开始考试',
+      meta: {
+        i18n: 'index',
+      },
+      component: () =>
+        import( /* webpackChunkName: "views" */ '@/views/startexam/index')
+    }]
+  },
+  {
+    path: '/titleDetails',
+    component: () =>
+      import( /* webpackChunkName: "views" */ '@/views/exam/topicDetails')
+  },
+  {
+    path: '',
+    component: Layout,
+    children: [{
+      path: '/exam/subjects/:id',
+      component: () => import('@/views/exam/examSubjects'),
+      name: '题目管理',
+      title: '题目管理',
+      noCache: true
+    }]
+  },
+  {
+    path: '',
+    component: Layout,
+    children: [{
+      path: '/startexam/:id',
+      component: () => import('@/views/startexam/index'),
+      name: '开始考试',
+      title: '开始考试',
+      noCache: true
+    }]
+  },
+]
diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss
index 1b8abea..0283869 100644
--- a/src/styles/element-ui.scss
+++ b/src/styles/element-ui.scss
@@ -1,204 +1,243 @@
 .el-dropdown-menu__item {
-  font-size: 12px !important;
-  line-height: 28px !important;
+    font-size: 12px !important;
+    line-height: 28px !important;
 }
 
 //.el-card.is-always-shadow {
 //  box-shadow: none;
 //  border: none !important;
 //}
-
 .el-scrollbar__view {
-  height: 100%;
+    height: 100%;
 }
 
 .el-menu--horizontal {
-  border-bottom: none !important;
+    border-bottom: none !important;
 }
 
 .el-menu {
-  border-right: none !important;
+    border-right: none !important;
 }
 
 .el-menu--display,
-.el-menu--display + .el-submenu__icon-arrow {
-  display: none;
+.el-menu--display+.el-submenu__icon-arrow {
+    display: none;
 }
 
 .el-message__icon,
 .el-message__content {
-  display: inline-block;
+    display: inline-block;
 }
 
 .el-date-editor .el-range-input,
 .el-date-editor .el-range-separator {
-  height: auto;
-  overflow: hidden;
+    height: auto;
+    overflow: hidden;
 }
 
 .el-dialog__wrapper {
-  z-index: 2048;
+    z-index: 2048;
 }
 
 .el-col {
-  margin-bottom: 8px;
+    margin-bottom: 8px;
 }
 
 .el-main {
-  padding: 0 !important;
+    padding: 0 !important;
 }
 
 .el-dropdown-menu__item--divided:before,
 .el-menu,
-.el-menu--horizontal > .el-menu-item:not(.is-disabled):focus,
-.el-menu--horizontal > .el-menu-item:not(.is-disabled):hover,
-.el-menu--horizontal > .el-submenu .el-submenu__title:hover {
-  background-color: transparent;
+.el-menu--horizontal>.el-menu-item:not(.is-disabled):focus,
+.el-menu--horizontal>.el-menu-item:not(.is-disabled):hover,
+.el-menu--horizontal>.el-submenu .el-submenu__title:hover {
+    background-color: transparent;
 }
 
 .el-dropdown-menu__item--divided:before,
 .el-menu,
-.el-menu--horizontal > .el-menu-item:not(.is-disabled):focus,
-.el-menu--horizontal > .el-menu-item:not(.is-disabled):hover,
-.el-menu--horizontal > .el-submenu .el-submenu__title:hover {
-  background-color: transparent !important;
+.el-menu--horizontal>.el-menu-item:not(.is-disabled):focus,
+.el-menu--horizontal>.el-menu-item:not(.is-disabled):hover,
+.el-menu--horizontal>.el-submenu .el-submenu__title:hover {
+    background-color: transparent !important;
 }
 
 .el-card__header {
-  padding: 6px 18px !important;
+    padding: 6px 18px !important;
 }
 
 .el-card__body {
-  //padding: 16px !important;
+    //padding: 16px !important;
 }
 
 .el-divider--horizontal {
-  margin: 12px 0 !important;
+    margin: 12px 0 !important;
 }
 
 //表格斑马纹
 .el-table tr:nth-child(2n -1) {
-  // background-color: rgba($color: #000000, $alpha: 0.1) !important;
+    // background-color: rgba($color: #000000, $alpha: 0.1) !important;
 }
 
 //顶部搜索栏
 .el-card.is-never-shadow.avue-crud__search {
-  position: absolute !important;
-  width: calc(100% - 220px) !important;
-  z-index: 500 !important;
-  border: none !important;
-  box-shadow: none !important;
-  height: 40px;
+    position: absolute !important;
+    width: calc(100% - 220px) !important;
+    z-index: 500 !important;
+    border: none !important;
+    box-shadow: none !important;
+    height: 40px;
 }
 
 //取消顶部搜索栏
 .user .el-card.is-never-shadow.avue-crud__search {
-  position: relative !important;
-  width: auto !important;
-  z-index: 500 !important;
-  border: none !important;
-  box-shadow: none !important;
-  height: auto;
+    position: relative !important;
+    width: auto !important;
+    z-index: 500 !important;
+    border: none !important;
+    box-shadow: none !important;
+    height: auto;
 }
 
 .desk .el-card.is-never-shadow.avue-crud__search {
-  width: calc(100% - 360px) !important;
+    width: calc(100% - 360px) !important;
 }
+
 .securityGuard .el-card.is-never-shadow.avue-crud__search {
-  width: calc(100% - 300px) !important;
-  left: 120px;
+    width: calc(100% - 300px) !important;
+    left: 120px;
 }
+
 .securityUnit .el-card.is-never-shadow.avue-crud__search {
-  left: 200px;
-  width: calc(100% - 380px) !important;
+    left: 200px;
+    width: calc(100% - 380px) !important;
 }
+
 .equipments .el-card.is-never-shadow.avue-crud__search {
-  width: calc(100% - 380px) !important;
-  left: 200px;
+    width: calc(100% - 380px) !important;
+    left: 200px;
 }
+
 .dispatch .el-card.is-never-shadow.avue-crud__search {
-  width: calc(100% - 380px) !important;
-  left: 200px;
+    width: calc(100% - 380px) !important;
+    left: 200px;
 }
+
 .dispatchChildoperable .el-card.is-never-shadow.avue-crud__search {
-  width: calc(100% - 280px) !important;
-  left: 90px;
+    width: calc(100% - 280px) !important;
+    left: 90px;
 }
+
 .workreply .el-card.is-never-shadow.avue-crud__search {
-  width: calc(100% - 380px) !important;
-  left: 200px !important;
+    width: calc(100% - 380px) !important;
+    left: 200px !important;
 }
+
 .recruitmentManagement .el-card.is-never-shadow.avue-crud__search {
-  width: calc(100% - 380px) !important;
-  left: 200px !important;
+    width: calc(100% - 380px) !important;
+    left: 200px !important;
 }
 
 .hasButOne .el-card.is-never-shadow.avue-crud__search {
-  width: calc(100% - 300px) !important;
-  left: 120px !important;
+    width: calc(100% - 300px) !important;
+    left: 120px !important;
 }
+
 .hasButTwo .el-card.is-never-shadow.avue-crud__search {
-  width: calc(100% - 380px) !important;
-  left: 200px !important;
+    width: calc(100% - 380px) !important;
+    left: 200px !important;
 }
+
 .topmenu .el-card.is-never-shadow.avue-crud__search {
-  width: calc(100% - 390px) !important;
-  left: 220px !important;
+    width: calc(100% - 390px) !important;
+    left: 220px !important;
 }
+
 .hasButThree .el-card.is-never-shadow.avue-crud__search {
-  width: calc(100% - 510px) !important;
-  left: 310px !important;
+    width: calc(100% - 510px) !important;
+    left: 310px !important;
 }
+
+.morpheus-box .el-card.is-never-shadow.avue-crud__search {
+    width: calc(100% - 390px) !important;
+    left: 270px !important;
+}
+
+.morpheus-box-exam .el-card.is-never-shadow.avue-crud__search {
+    width: calc(100% - 390px) !important;
+    left: 20px !important;
+}
+
+.morpheus-box-paper .el-card.is-never-shadow.avue-crud__search {
+    width: calc(100% - 390px) !important;
+    left: 220px !important;
+}
+
+.morpheus-box-score .el-card.is-never-shadow.avue-crud__search {
+    width: calc(100% - 390px) !important;
+    left: 150px !important;
+}
+
+.morpheus-box-apply-exam .el-card.is-never-shadow.avue-crud__search {
+    width: calc(100% - 390px) !important;
+    left: 300px !important;
+}
+
 .avue-form {
-  position: relative;
-  top: -10px;
+    position: relative;
+    top: -10px;
 }
+
 //顶部按钮栏
 .avue-crud__menu {
-  height: 60px;
+    height: 60px;
 }
+
 //顶部按钮
 .avue-crud .avue-crud__left .el-button,
 .avue-crud .avue-crud__right .el-button,
 .avue-form .avue-crud__left .el-button,
 .avue-form .avue-crud__right .el-button {
-  position: relative;
-  top: 5px;
+    position: relative;
+    top: 5px;
 }
 
 //左侧导航栏
 .avue-logo {
-  background-color: #409eff !important;
-  color: #fff !important;
+    background-color: #409eff !important;
+    color: #fff !important;
 }
+
 .avue-sidebar {
-  background-color: #fff !important;
+    background-color: #fff !important;
 }
 
 .avue-header {
-  background-color: #409eff !important;
-  color: #fff !important;
+    background-color: #409eff !important;
+    color: #fff !important;
 }
 
 .avue-sidebar .el-menu-item span,
 .avue-sidebar .el-submenu__title span,
 .avue-sidebar .el-submenu__title i,
 .avue-sidebar .el-menu-item i {
-  color: #000 !important;
+    color: #000 !important;
 }
 
 // 菜单 活动背景
 .avue-sidebar .el-menu-item.is-active {
-  background-color: #409eff !important;
+    background-color: #409eff !important;
 }
+
 .avue-sidebar .el-menu-item.is-active span,
 .el-menu-item.is-active i {
-  color: #fff !important;
+    color: #fff !important;
 }
 
 //top 导航 按钮
-.el-menu--horizontal > .el-menu-item.is-active,
+.el-menu--horizontal>.el-menu-item.is-active,
 .avue-top,
 .el-dropdown {
-  color: #fff !important;
-}
+    color: #fff !important;
+}
\ No newline at end of file
diff --git a/src/util/util.js b/src/util/util.js
index 6634ab1..0c0cdb8 100644
--- a/src/util/util.js
+++ b/src/util/util.js
@@ -365,3 +365,43 @@
     }
   };
 }
+
+/**
+ * 判断对象是否为空
+ * @param obj
+ * @returns {boolean}
+ */
+export const isNotEmpty = (obj) => {
+  let flag = true
+  if (obj === '' || obj == null || obj === undefined || obj === 'undefined') {
+    flag = false
+  }
+  return flag
+}
+
+/**
+ * 警告消息提示
+ * @param obj
+ * @param message
+ */
+export const messageWarn = (obj, message) => {
+  obj.$message({ message: message, type: 'warning', offset: 70 })
+}
+
+/**
+ * 失败消息提示
+ * @param obj
+ * @param message
+ */
+export const messageFail = (obj, message) => {
+  obj.$message({ message: message, type: 'error', offset: 70 })
+}
+
+/**
+ * 成功消息提示
+ * @param obj
+ * @param message
+ */
+export const messageSuccess = (obj, message) => {
+  obj.$message({ message: message, type: 'success', offset: 70 })
+}
diff --git a/src/views/applyexam/index.vue b/src/views/applyexam/index.vue
index a0eea0b..02e65dd 100644
--- a/src/views/applyexam/index.vue
+++ b/src/views/applyexam/index.vue
@@ -6,7 +6,7 @@
  * menu-name 报名考试
  */
 <template>
-    <el-row class="morpheus-box">
+    <el-row class="morpheus-box-apply-exam">
         <el-col :span="24" class="hasButOne">
             <el-card>
                 <div class="exam-card-body">
@@ -55,6 +55,16 @@
                                        size="small"
                                        icon="el-icon-delete"
                                        @click="questionBankHandleDelete">删 除
+                            </el-button>
+                        </template>
+
+                        <template slot-scope="{ type,row }" slot="menu">
+                            <el-button
+                            :type="type"
+                            size="small"
+                            icon="el-icon-receiving"
+                            @click="handlePrint(row)"
+                            >准考证打印
                             </el-button>
                         </template>
 
@@ -110,7 +120,7 @@
                 //dialogType: 'drawer',
                 dialogClickModal: false,
                 // 操作栏宽度
-                menuWidth: 100,
+                menuWidth: 200,
 
                 column: [
                     {
@@ -263,23 +273,23 @@
                             trigger: "blur"
                         }],
                     },
-                    {
-                        label: "试卷分数",
-                        prop: "paperScore",
-                        slot: true,
-                        // 表单新增时是否禁止
-                        addDisabled: false,
-                        // 表单新增时是否可见
-                        addDisplay: false,
-                        // 表单新增时是否为查看模式
-                        addDetail: false,
-                        // 表单编辑时是否禁止
-                        editDisabled: true,
-                        // 表单编辑时是否可见
-                        editDisplay: true,
-                        // 表单编辑时是否为查看模式
-                        editDetail: false
-                    },
+                    // {
+                    //     label: "试卷分数",
+                    //     prop: "paperScore",
+                    //     slot: true,
+                    //     // 表单新增时是否禁止
+                    //     addDisabled: false,
+                    //     // 表单新增时是否可见
+                    //     addDisplay: false,
+                    //     // 表单新增时是否为查看模式
+                    //     addDetail: false,
+                    //     // 表单编辑时是否禁止
+                    //     editDisabled: true,
+                    //     // 表单编辑时是否可见
+                    //     editDisplay: true,
+                    //     // 表单编辑时是否为查看模式
+                    //     editDetail: false
+                    // },
                     {
                         label: "报名时间",
                         prop: "applyTime",
@@ -406,6 +416,15 @@
         },
     },
     methods: {
+        //准考证查看
+        handlePrint(row) {
+            var obj = row;
+            obj["name"] = "准考证信息";
+            this.$router.push({
+                path: `/applyexam/papers`,
+                query: obj,
+            });
+        },
         questionBankOnLoad (page, params = {}) {
             this.questionBankLoading = false;
             getApplyList(page.currentPage, page.pageSize, Object.assign(params, this.questionBankQuery)).then(res => {
diff --git a/src/views/applyexam/papers.vue b/src/views/applyexam/papers.vue
new file mode 100644
index 0000000..70fee4a
--- /dev/null
+++ b/src/views/applyexam/papers.vue
@@ -0,0 +1,40 @@
+<template>
+  <!-- <iframe src="http://124.71.113.22/map/index.html?openid=PatrolManagement" style="width: 100%;height: 100%" frameborder="0"></iframe> -->
+  <iframe :src="url" style="width: 100%; height: 100%" frameborder="0"></iframe>
+</template>
+
+<script>
+//占位路由 巡逻管理
+export default {
+  data() {
+    return {
+      url: "/papers.html",
+    };
+  },
+  created(){
+      var d = this.$route.query;
+      this.url += "?data=" + JSON.stringify(d);
+    //   console.log(d);
+  },
+  mounted() {
+    var flag = false,
+      i = 0,
+      ind = null;
+    this.$store.state.tags.tagList.forEach((item, index) => {
+      if (item.label == "准考证信息") {
+        if (flag == false) {
+          ind = index;
+          flag = true;
+        }
+        i++;
+      }
+    });
+    if (i > 1) {
+      this.$store.state.tags.tagList.splice(ind, 1);
+    }
+  },
+};
+</script>
+
+<style>
+</style>
\ No newline at end of file
diff --git a/src/views/exam/examination.vue b/src/views/exam/examination.vue
index 4a8b01b..c06b14d 100644
--- a/src/views/exam/examination.vue
+++ b/src/views/exam/examination.vue
@@ -6,7 +6,7 @@
  * menu-name 试卷管理
  */
 <template>
-    <el-row class="morpheus-box">
+    <el-row class="morpheus-box-paper">
         <el-col :span="24">
             <el-card>
 
@@ -144,7 +144,7 @@
                         label: "试卷名称",
                         prop: "examName",
                         search: true,
-                        searchSpan: 4,
+                        searchSpan: 5,
                         slot: true,
                         // 表单新增时是否禁止
                         addDisabled: false,
diff --git a/src/views/exam/performance.vue b/src/views/exam/performance.vue
index 78bc56d..d65578f 100644
--- a/src/views/exam/performance.vue
+++ b/src/views/exam/performance.vue
@@ -7,7 +7,7 @@
  */
 <template>
     <el-row class="morpheus-box">
-        <el-col :span="24">
+        <el-col :span="24" class="recruitmentManagement">
             <el-card>
 
                 <div class="exam-card-body">
@@ -34,28 +34,49 @@
                         </template>
 
                         <!-- 自定义按钮 -->
-                        <!-- <template slot="menuLeft">
-                            <el-button type="danger"
+                        <template slot="menuLeft">
+                            <!-- <el-button type="danger"
                                        size="mini"
                                        icon="el-icon-delete"
                                        plain
                                        @click="handleDelete">新增
-                            </el-button>
-                            <el-button type="danger"
+                            </el-button> -->
+                            <!-- <el-button type="danger"
                                        size="mini"
                                        icon="el-icon-delete"
                                        plain
                                        @click="handleDelete">删除
+                            </el-button> -->
+                            <el-button
+                                type="success"
+                                size="small"
+                                plain
+                                icon="el-icon-upload2"
+                                @click="handleImport"
+                                >实操成绩导入
                             </el-button>
-                            <el-button type="danger"
-                                       size="mini"
-                                       icon="el-icon-delete"
-                                       plain
-                                       @click="handleDelete">导出
-                            </el-button>
-                        </template> -->
+                        </template>
 
                     </avue-crud>
+
+                    <el-dialog
+                        title="实操成绩导入"
+                        append-to-body
+                        :visible.sync="excelBox"
+                        width="555px"
+                        >
+                        <avue-form
+                            :option="excelOption"
+                            v-model="excelForm"
+                            :upload-after="uploadAfter"
+                        >
+                            <template slot="excelTemplate">
+                            <el-button type="primary" @click="handleTemplate">
+                                点击下载<i class="el-icon-download el-icon--right"></i>
+                            </el-button>
+                            </template>
+                        </avue-form>
+                    </el-dialog>
 
                 </div>
 
@@ -97,6 +118,7 @@
             obj: {
                 name: '张三',
             },
+            excelBox:false,
             questionBankOption: {
                 // 操作栏多余按钮去除
                 delBtn: false,
@@ -107,8 +129,7 @@
                 excelBtn: true,
                 excelBtnText: '成绩导出',
                 viewBtn: true,
-                title: '成绩',
-
+                // title: '成绩',
                 align: 'center',
                 height: 'auto',
                 calcHeight: 80,
@@ -129,7 +150,7 @@
                         label: "试卷名称",
                         prop: "examName",
                         search: true,
-                        searchSpan: 4,
+                        searchSpan: 5,
                         slot: true,
                         // 表单新增时是否禁止
                         addDisabled: false,
@@ -175,14 +196,14 @@
                     },
                     {
                         label: "所属公司",
-                        prop: "company",
+                        prop: "companyName",
                         search: true,
-                        searchSpan: 4,
-                        dicUrl: '/api/blade-system/dept/tree',
-                        props: {
-                            label: "title",
-                            value: "id",
-                        },
+                        searchSpan: 5,
+                        // dicUrl: '/api/blade-system/dept/tree',
+                        // props: {
+                        //     label: "title",
+                        //     value: "id",
+                        // },
                         slot: true,
                         // 表单新增时是否禁止
                         addDisabled: false,
@@ -260,28 +281,30 @@
                         editDetail: false,
                         rules: [{ validator: validatePass, required: true, trigger: 'blur' }],
                     },
-                    {
-                        label: "总成绩",
-                        prop: "allGrade",
-                        slot: true,
-                        // 表单新增时是否禁止
-                        addDisabled: false,
-                        // 表单新增时是否可见
-                        addDisplay: true,
-                        // 表单新增时是否为查看模式
-                        addDetail: false,
-                        // 表单编辑时是否禁止
-                        editDisabled: true,
-                        // 表单编辑时是否可见
-                        editDisplay: true,
-                        // 表单编辑时是否为查看模式
-                        editDetail: false,
-                        rules: [{
-                            required: true,
-                            message: "请输入考试名称",
-                            trigger: "blur"
-                        }]
-                    },
+                    // {
+                    //     label: "总成绩",
+                    //     prop: "allGrade",
+                    //     slot: true,
+                    //     hide:true,
+                    //     // 表单新增时是否禁止
+                    //     addDisabled: false,
+                    //     viewDisplay:false,
+                    //     // 表单新增时是否可见
+                    //     addDisplay: false,
+                    //     // 表单新增时是否为查看模式
+                    //     addDetail: false,
+                    //     // 表单编辑时是否禁止
+                    //     editDisabled: false,
+                    //     // 表单编辑时是否可见
+                    //     editDisplay: false,
+                    //     // 表单编辑时是否为查看模式
+                    //     editDetail: false,
+                    //     rules: [{
+                    //         required: true,
+                    //         message: "请输入考试名称",
+                    //         trigger: "blur"
+                    //     }]
+                    // },
                     {
                         label: "是否合格",
                         prop: "qualified",
@@ -330,6 +353,58 @@
             },
             questionBankQuery: {},
             questionBankSelectionList: [],
+            excelForm: {},
+            excelOption: {
+                submitBtn: false,
+                emptyBtn: false,
+                column: [
+                {
+                    label: "模板上传",
+                    prop: "excelFile",
+                    type: "upload",
+                    drag: true,
+                    loadText: "模板上传中,请稍等",
+                    span: 24,
+                    propsHttp: {
+                    res: "data",
+                    },
+                    tip: "请上传 .xls,.xlsx 标准格式文件",
+                    action: "/api/examScore/import-examScore",
+                },
+                // {
+                //     label: "数据覆盖",
+                //     prop: "isCovered",
+                //     type: "switch",
+                //     align: "center",
+                //     width: 80,
+                //     dicData: [
+                //     {
+                //         label: "否",
+                //         value: 0,
+                //     },
+                //     {
+                //         label: "是",
+                //         value: 1,
+                //     },
+                //     ],
+                //     value: 0,
+                //     slot: true,
+                //     rules: [
+                //     {
+                //         required: true,
+                //         message: "请选择是否覆盖",
+                //         trigger: "blur",
+                //     },
+                //     ],
+                // },
+                {
+                    label: "模板下载",
+                    prop: "excelTemplate",
+                    formslot: true,
+                    span: 24,
+                },
+                ],
+            },
         }
     },
     created () {
@@ -389,6 +464,18 @@
                 loading();
             });
         },
+        handleTemplate() {
+            window.open(`/api/examScore/export-template`);
+        },
+        handleImport() {
+            this.excelBox = true;
+        },
+        uploadAfter(res, done, loading, column) {
+            window.console.log(column);
+            this.excelBox = false;
+            this.refreshChange();
+            done();
+        },
 
     }
 }
diff --git a/src/views/exam/startexam.vue b/src/views/exam/startexam.vue
index 36b593e..ebd62f0 100644
--- a/src/views/exam/startexam.vue
+++ b/src/views/exam/startexam.vue
@@ -6,7 +6,7 @@
  * menu-name 考试管理
  */
 <template>
-    <el-row class="morpheus-box">
+    <el-row class="morpheus-box-exam">
         <el-col :span="24">
             <el-card>
 
@@ -133,7 +133,7 @@
                         label: "试卷名称",
                         prop: "examName",
                         search: true,
-                        searchSpan: 4,
+                        searchSpan: 5,
                         slot: true,
                         // 表单新增时是否禁止
                         addDisabled: false,
diff --git a/src/views/exam/subject.vue b/src/views/exam/subject.vue
index cac637c..22c054e 100644
--- a/src/views/exam/subject.vue
+++ b/src/views/exam/subject.vue
@@ -67,7 +67,7 @@
                 // 导出按钮
                 excelBtn: true,
                 excelBtnText: '题库导出',
-                title: '题库',
+                // title: '题库',
 
                 align: 'center',
                 height: 'auto',
diff --git a/src/views/singleperformance/index.vue b/src/views/singleperformance/index.vue
index 792827c..b0626d4 100644
--- a/src/views/singleperformance/index.vue
+++ b/src/views/singleperformance/index.vue
@@ -6,7 +6,7 @@
  * menu-name 成绩管理
  */
 <template>
-    <el-row class="morpheus-box">
+    <el-row class="morpheus-box-score">
         <el-col :span="24">
             <el-card>
 
@@ -107,7 +107,7 @@
                 excelBtn: true,
                 excelBtnText: '成绩导出',
                 viewBtn: true,
-                title: '成绩',
+                // title: '成绩',
 
                 align: 'center',
                 height: 'auto',
@@ -129,7 +129,7 @@
                         label: "试卷名称",
                         prop: "examName",
                         search: true,
-                        searchSpan: 4,
+                        searchSpan: 5,
                         slot: true,
                         // 表单新增时是否禁止
                         addDisabled: false,
@@ -175,14 +175,14 @@
                     },
                     {
                         label: "所属公司",
-                        prop: "company",
+                        prop: "companyName",
                         search: true,
-                        searchSpan: 4,
-                        dicUrl: '/api/blade-system/dept/tree',
-                        props: {
-                            label: "title",
-                            value: "id",
-                        },
+                        searchSpan: 5,
+                        // dicUrl: '/api/blade-system/dept/tree',
+                        // props: {
+                        //     label: "title",
+                        //     value: "id",
+                        // },
                         slot: true,
                         // 表单新增时是否禁止
                         addDisabled: false,
@@ -260,28 +260,28 @@
                         editDetail: false,
                         rules: [{ validator: validatePass, required: true, trigger: 'blur' }],
                     },
-                    {
-                        label: "总成绩",
-                        prop: "allGrade",
-                        slot: true,
-                        // 表单新增时是否禁止
-                        addDisabled: false,
-                        // 表单新增时是否可见
-                        addDisplay: true,
-                        // 表单新增时是否为查看模式
-                        addDetail: false,
-                        // 表单编辑时是否禁止
-                        editDisabled: true,
-                        // 表单编辑时是否可见
-                        editDisplay: true,
-                        // 表单编辑时是否为查看模式
-                        editDetail: false,
-                        rules: [{
-                            required: true,
-                            message: "请输入考试名称",
-                            trigger: "blur"
-                        }]
-                    },
+                    // {
+                    //     label: "总成绩",
+                    //     prop: "allGrade",
+                    //     slot: true,
+                    //     // 表单新增时是否禁止
+                    //     addDisabled: false,
+                    //     // 表单新增时是否可见
+                    //     addDisplay: true,
+                    //     // 表单新增时是否为查看模式
+                    //     addDetail: false,
+                    //     // 表单编辑时是否禁止
+                    //     editDisabled: true,
+                    //     // 表单编辑时是否可见
+                    //     editDisplay: true,
+                    //     // 表单编辑时是否为查看模式
+                    //     editDetail: false,
+                    //     rules: [{
+                    //         required: true,
+                    //         message: "请输入考试名称",
+                    //         trigger: "blur"
+                    //     }]
+                    // },
                     {
                         label: "是否合格",
                         prop: "qualified",
diff --git a/src/views/startexam/index.vue b/src/views/startexam/index.vue
index baf14c7..32bec52 100644
--- a/src/views/startexam/index.vue
+++ b/src/views/startexam/index.vue
@@ -240,19 +240,18 @@
         },
         startExam () {
             // 获取题目ID列表
-            getSubjectIds({ id: this.query.examinationId }).then(subjectResponse => {
-                const subjectData = subjectResponse.data.data.examExaminationSubjects
+            getSubjectIds().then(subjectResponse => {
+                const subjectData = subjectResponse.data.data
                 if (subjectData.length > 0) {
                     for (let i = 0; i < subjectData.length; i++) {
-                        const { examSubjectChoices } = subjectData[i]
                         this.subjectIds.push({
-                            subjectId: subjectResponse.data.data.id,
-                            everyID: examSubjectChoices.id,
-                            type: examSubjectChoices.choicesType,
+                            subjectId: 1,
+                            everyID: subjectData[i].id,
+                            type: subjectData[i].choicesType,
                             index: i + 1,
                             answered: false,
-                            answer: examSubjectChoices.answer,
-                            score: examSubjectChoices.score
+                            answer: subjectData[i].answer,
+                            score: subjectData[i].score
                         })
                     }
 
@@ -444,7 +443,6 @@
             })
         },
         doSubmitExam () {
-
             var obj = {
                 examName: this.$route.query.examName,
                 securityName: this.userInfo.user_name,
diff --git a/src/views/trainingRegistration/data.js b/src/views/trainingRegistration/data.js
index 77c5cdb..a53d540 100644
--- a/src/views/trainingRegistration/data.js
+++ b/src/views/trainingRegistration/data.js
@@ -98,7 +98,7 @@
             message: "请输入培训公司名称",
             trigger: "blur"
         }],
-        searchSpan: 5,
+        searchSpan: 6,
         searchLabelWidth: 110,
         search: true,
         overHidden: true

--
Gitblit v1.9.3