瀏覽代碼

Merge branch 'master' of http://git.qmth.com.cn/ExamCloud-3/examcloud-web-admin

chenken 6 年之前
父節點
當前提交
bcbfddf4c0

+ 59 - 28
src/modules/examwork/view/examStudent.vue

@@ -166,7 +166,7 @@
           @close="closeAddingStudentDialog"
           title="考生信息页面"
           :visible.sync="addingStudentDialog"
-          width="60%"
+          width="650px"
         >
           <el-form
             :model="examStudentForm"
@@ -202,6 +202,7 @@
                 class="input"
                 v-model="examStudentForm.studentName"
                 auto-complete="off"
+                maxlength="20"
               ></el-input>
             </el-form-item>
             <el-form-item label="学号" prop="studentCode">
@@ -209,6 +210,7 @@
                 class="input"
                 v-model="examStudentForm.studentCode"
                 auto-complete="off"
+                maxlength="20"
               ></el-input>
             </el-form-item>
             <el-form-item label="身份证号" prop="identityNumber">
@@ -216,6 +218,7 @@
                 class="input"
                 v-model="examStudentForm.identityNumber"
                 auto-complete="off"
+                maxlength="20"
               ></el-input>
             </el-form-item>
             <el-form-item label="学习中心" prop="orgId">
@@ -281,6 +284,7 @@
                 class="input"
                 v-model="examStudentForm.specialtyName"
                 auto-complete="off"
+                maxlength="20"
               ></el-input>
             </el-form-item>
             <el-form-item label="考点">
@@ -288,6 +292,7 @@
                 class="input"
                 v-model="examStudentForm.examSite"
                 auto-complete="off"
+                maxlength="20"
               ></el-input>
             </el-form-item>
             <el-form-item label="年级">
@@ -301,6 +306,7 @@
               <el-input
                 class="input"
                 v-model="examStudentForm.infoCollector"
+                maxlength="20"
               ></el-input>
             </el-form-item>
             <el-form-item label="电话">
@@ -308,10 +314,15 @@
                 class="input"
                 v-model="examStudentForm.phone"
                 auto-complete="off"
+                maxlength="20"
               ></el-input>
             </el-form-item>
             <el-form-item label="试卷袋编码">
-              <el-input class="input" v-model="examStudentForm.ext1"></el-input>
+              <el-input
+                class="input"
+                v-model="examStudentForm.ext1"
+                maxlength="20"
+              ></el-input>
             </el-form-item>
           </el-form>
           <div style="text-align: center;">
@@ -322,7 +333,7 @@
 
         <!-- 修改弹出窗口 -->
         <el-dialog
-          width="60%"
+          width="650px"
           @close="closeUpdateStudentDialog"
           title="考生信息页面"
           :visible.sync="updateStudentDialog"
@@ -363,12 +374,14 @@
                 class="input"
                 v-model="examStudentForm.studentName"
                 auto-complete="off"
+                maxlength="20"
               ></el-input>
             </el-form-item>
             <el-form-item label="学号" prop="studentCode">
               <el-input
                 class="input"
                 v-model="examStudentForm.studentCode"
+                maxlength="20"
                 readonly
               ></el-input>
             </el-form-item>
@@ -376,6 +389,7 @@
               <el-input
                 class="input"
                 v-model="examStudentForm.identityNumber"
+                maxlength="20"
                 readonly
               ></el-input>
             </el-form-item>
@@ -443,12 +457,14 @@
                 class="input"
                 v-model="examStudentForm.specialtyName"
                 auto-complete="off"
+                maxlength="20"
               ></el-input>
             </el-form-item>
             <el-form-item label="考点">
               <el-input
                 class="input"
                 v-model="examStudentForm.examSite"
+                maxlength="20"
                 auto-complete="off"
               ></el-input>
             </el-form-item>
@@ -456,6 +472,7 @@
               <el-input
                 class="input"
                 v-model="examStudentForm.grade"
+                maxlength="20"
                 auto-complete="off"
               ></el-input>
             </el-form-item>
@@ -463,17 +480,23 @@
               <el-input
                 class="input"
                 v-model="examStudentForm.infoCollector"
+                maxlength="20"
               ></el-input>
             </el-form-item>
             <el-form-item label="电话">
               <el-input
                 class="input"
                 v-model="examStudentForm.phone"
+                maxlength="20"
                 auto-complete="off"
               ></el-input>
             </el-form-item>
             <el-form-item label="试卷袋编码">
-              <el-input class="input" v-model="examStudentForm.ext1"></el-input>
+              <el-input
+                class="input"
+                v-model="examStudentForm.ext1"
+                maxlength="20"
+              ></el-input>
             </el-form-item>
           </el-form>
           <div style="text-align: center;">
@@ -796,31 +819,38 @@ import {
 } from "@/constants/constants.js";
 import { mapState } from "vuex";
 
+let _this = null;
+
+let validateStuCode = (rule, value, callback) => {
+  if (
+    _this.examStudentForm.studentCode &&
+    _this.examStudentForm.studentCode.length < 6
+  ) {
+    callback(new Error("学号至少6位"));
+  } else {
+    callback();
+  }
+};
+
+let validateIdentityNumber = (rule, value, callback) => {
+  if (
+    !_this.examStudentForm.identityNumber ||
+    _this.examStudentForm.identityNumber === ""
+  ) {
+    return callback(new Error("请输入身份证"));
+  }
+  if (
+    _this.examStudentForm.identityNumber &&
+    _this.examStudentForm.identityNumber.length < 6
+  ) {
+    callback(new Error("身份证至少6位"));
+  } else {
+    callback();
+  }
+};
+
 export default {
   data() {
-    var validateStuCode = (rule, value, callback) => {
-      if (
-        this.examStudentForm.studentCode &&
-        this.examStudentForm.studentCode.length < 6
-      ) {
-        callback(new Error("学号至少6位"));
-      } else {
-        callback();
-      }
-    };
-    var validateIdenNum = (rule, value, callback) => {
-      if (this.examStudentForm.identityNumber === "") {
-        return callback(new Error("请输入身份证"));
-      }
-      if (
-        this.examStudentForm.identityNumber &&
-        this.examStudentForm.identityNumber.length < 6
-      ) {
-        callback(new Error("身份证至少6位"));
-      } else {
-        callback();
-      }
-    };
     return {
       rolePrivileges: {
         search_examStudent: false,
@@ -942,7 +972,7 @@ export default {
         ],
         studentCode: [{ validator: validateStuCode, trigger: "blur" }],
         identityNumber: [
-          { required: true, validator: validateIdenNum, trigger: "blur" }
+          { validator: validateIdentityNumber, trigger: "blur" }
         ],
         courseId: [
           {
@@ -1677,6 +1707,7 @@ export default {
     }
   },
   created() {
+    _this = this;
     this.initPrivileges();
     this.init();
     this.uploadHeaders = {

+ 5 - 1
src/modules/examwork/view/offlineExam.vue

@@ -33,7 +33,11 @@
                     prop="name"
                     :label-width="style.label_width_tab1"
                   >
-                    <el-input v-model="form.name" class="input"></el-input>
+                    <el-input
+                      maxlength="20"
+                      v-model="form.name"
+                      class="input"
+                    ></el-input>
                   </el-form-item>
                 </el-row>
                 <el-row>

+ 17 - 1
src/modules/examwork/view/onlineExam.vue

@@ -33,7 +33,11 @@
                     prop="name"
                     :label-width="style.label_width_tab1"
                   >
-                    <el-input v-model="form.name" class="input"></el-input>
+                    <el-input
+                      v-model="form.name"
+                      class="input"
+                      maxlength="20"
+                    ></el-input>
                   </el-form-item>
                 </el-row>
                 <el-row>
@@ -97,6 +101,7 @@
                     :label-width="style.label_width_tab2"
                   >
                     <el-input
+                      maxlength="20"
                       v-model.trim.number="form.duration"
                       auto-complete="off"
                       class="input"
@@ -113,6 +118,7 @@
                     :label-width="style.label_width_tab2"
                   >
                     <el-input
+                      maxlength="20"
                       v-model.trim.number="form.examTimes"
                       auto-complete="off"
                       class="input"
@@ -129,6 +135,7 @@
                     :label-width="style.label_width_tab2"
                   >
                     <el-input
+                      maxlength="20"
                       v-model.trim.number="form.properties.FREEZE_TIME"
                       auto-complete="off"
                       class="input"
@@ -145,6 +152,7 @@
                     :label-width="style.label_width_tab2"
                   >
                     <el-input
+                      maxlength="20"
                       v-model.trim.number="form.properties.EXAM_RECONNECT_TIME"
                       auto-complete="off"
                       class="input"
@@ -206,6 +214,7 @@
                     :label-width="style.label_width_tab3"
                   >
                     <el-input
+                      maxlength="20"
                       :disabled="!form.properties.SINGLE_EDIT"
                       v-model="form.properties.SINGLE_ANSWER_REMARK"
                       auto-complete="off"
@@ -226,6 +235,7 @@
                     :label-width="style.label_width_tab3"
                   >
                     <el-input
+                      maxlength="20"
                       :disabled="!form.properties.MUTIPLE_EDIT"
                       v-model="form.properties.MUTIPLE_ANSWER_REMARK"
                       auto-complete="off"
@@ -246,6 +256,7 @@
                     :label-width="style.label_width_tab3"
                   >
                     <el-input
+                      maxlength="20"
                       :disabled="!form.properties.BOOL_EDIT"
                       v-model="form.properties.BOOL_ANSWER_REMARK"
                       class="input"
@@ -266,6 +277,7 @@
                     :label-width="style.label_width_tab3"
                   >
                     <el-input
+                      maxlength="20"
                       :disabled="!form.properties.FILL_BLANK_EDIT"
                       v-model="form.properties.FILL_BLANK_REMARK"
                       class="input"
@@ -332,6 +344,7 @@
                     :label-width="style.label_width_tab4"
                   >
                     <el-input
+                      maxlength="20"
                       v-model.trim.number="form.properties.SNAPSHOT_INTERVAL"
                       auto-complete="off"
                       class="input"
@@ -348,6 +361,7 @@
                     :label-width="style.label_width_tab4"
                   >
                     <el-input
+                      maxlength="20"
                       v-model.trim.number="form.properties.WARN_THRESHOLD"
                       auto-complete="off"
                       class="input"
@@ -364,6 +378,7 @@
                     :label-width="style.label_width_tab4"
                   >
                     <el-input
+                      maxlength="20"
                       v-model.number="form.properties.LIVING_WARN_THRESHOLD"
                       auto-complete="off"
                       class="input"
@@ -410,6 +425,7 @@
                     :label-width="style.label_width_tab6"
                   >
                     <el-input
+                      maxlength="20"
                       v-model="form.properties.IP_ADDRESSES"
                       class="input"
                     ></el-input>

+ 9 - 1
src/modules/examwork/view/practiceExam.vue

@@ -33,7 +33,11 @@
                     placeholder="请输入考试名称"
                     prop="name"
                   >
-                    <el-input v-model="form.name" class="input"></el-input>
+                    <el-input
+                      maxlength="20"
+                      v-model="form.name"
+                      class="input"
+                    ></el-input>
                   </el-form-item>
                 </el-row>
                 <el-row>
@@ -97,6 +101,7 @@
                     :label-width="style.label_width_tab2"
                   >
                     <el-input
+                      maxlength="20"
                       class="input"
                       v-model.trim.number="form.duration"
                       auto-complete="off"
@@ -113,6 +118,7 @@
                     :label-width="style.label_width_tab2"
                   >
                     <el-input
+                      maxlength="20"
                       class="input"
                       v-model.trim.number="form.examTimes"
                       auto-complete="off"
@@ -129,6 +135,7 @@
                     :label-width="style.label_width_tab2"
                   >
                     <el-input
+                      maxlength="20"
                       class="input"
                       v-model.trim.number="form.properties.FREEZE_TIME"
                       auto-complete="off"
@@ -145,6 +152,7 @@
                     :label-width="style.label_width_tab2"
                   >
                     <el-input
+                      maxlength="20"
                       class="input"
                       v-model.trim.number="form.properties.EXAM_RECONNECT_TIME"
                       auto-complete="off"

+ 5 - 1
src/modules/examwork/view/printExam.vue

@@ -33,7 +33,11 @@
                     placeholder="请输入考试名称"
                     prop="name"
                   >
-                    <el-input v-model="form.name" class="input"></el-input>
+                    <el-input
+                      maxlength="20"
+                      v-model="form.name"
+                      class="input"
+                    ></el-input>
                   </el-form-item>
                 </el-row>
                 <el-row>

+ 5 - 1
src/modules/examwork/view/traditionExam.vue

@@ -33,7 +33,11 @@
                     placeholder="请输入考试名称"
                     prop="name"
                   >
-                    <el-input v-model="form.name" class="input"></el-input>
+                    <el-input
+                      maxlength="20"
+                      v-model="form.name"
+                      class="input"
+                    ></el-input>
                   </el-form-item>
                 </el-row>
                 <el-row>

+ 25 - 3
src/modules/portal/views/home/HomeSide.vue

@@ -1,9 +1,19 @@
 <template>
-  <el-aside width="200px" v-if="menuList.length > 0">
+  <el-aside width="" v-if="menuList.length > 0">
     <div
       style="height: 50px; margin-top: 20px; margin-left: 20px; font-size: 20px"
     >
-      <i class="el-icon-location"></i> <span>{{ group.name }}</span>
+      <span v-if="!isCollapse">{{ group.name }}</span>
+
+      <el-button
+        type="text"
+        class="float-right"
+        size="mini"
+        style="padding: 0; padding-right: 12px;"
+        @click="toggoleSidebar"
+      >
+        <v-icon name="bars" scale="2" />
+      </el-button>
     </div>
     <el-menu
       class="el-menu-vertical-demo"
@@ -12,6 +22,7 @@
       active-text-color="#409eff"
       router
       :default-active="$route.path"
+      :collapse="isCollapse"
     >
       <el-submenu
         v-for="menu1 in menuList1"
@@ -19,6 +30,7 @@
         :index="menu1.nodeCode"
       >
         <template slot="title">
+          <i class="el-icon-menu"></i>
           <router-link
             v-if="menu1.ext5"
             :to="{ path: menu1.ext5 }"
@@ -98,7 +110,8 @@ export default {
   data() {
     return {
       group: null,
-      menuList: []
+      menuList: [],
+      isCollapse: false
     };
   },
   computed: {
@@ -111,6 +124,9 @@ export default {
   },
   methods: {
     ...mapMutations([UPDATE_CURRENT_PATHS]),
+    toggoleSidebar() {
+      this.isCollapse = !this.isCollapse;
+    },
     async getUserPrivileges(groupCode) {
       var url = CORE_API + "/rolePrivilege/getUserPrivileges";
       const params = new URLSearchParams();
@@ -163,6 +179,12 @@ export default {
 .el-menu-vertical-demo {
   height: calc(100vh - 60px - 70px);
 }
+
+.el-menu-vertical-demo:not(.el-menu--collapse) {
+  width: 200px;
+  min-height: 400px;
+}
+
 .el-aside {
   background: rgba(34, 44, 50, 1);
   color: #fff;

+ 1 - 0
src/plugins/vueAwesome.js

@@ -7,5 +7,6 @@ import "vue-awesome/icons/user";
 import "vue-awesome/icons/users";
 import "vue-awesome/icons/sign-out-alt";
 import "vue-awesome/icons/lock";
+import "vue-awesome/icons/bars";
 
 Vue.component("v-icon", Icon);

+ 1 - 0
src/styles/global.css

@@ -2,6 +2,7 @@
 
 body {
   margin: 0;
+  min-width: 1280px;
 }
 
 .qm-primary-text {