Explorar o código

bug md and adaptive style

zhangjie %!s(int64=5) %!d(string=hai) anos
pai
achega
d3dc2e1948

+ 19 - 19
public/index.html

@@ -1,25 +1,25 @@
 <!DOCTYPE html>
 <html>
-
-<head>
-  <meta charset="utf-8" />
-  <meta name="viewport" content="width=device-width,initial-scale=1.0,
+  <head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width,initial-scale=1.0,
     maximum-scale=1.0,minimum-scale=1.0, user-scalable=no"" />
     <meta name=" renderer" content="webkit|ie-comp|ie-stand" />
-  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
-  <meta name="apple-mobile-web-app-capable" content="yes" />
-  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
-  <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
-  <title>教务处平台</title>
-</head>
-
-<body>
-  <noscript>
-    <strong>We're sorry but 管理后台 doesn't work properly without JavaScript
-      enabled. Please enable it to continue.</strong>
-  </noscript>
-  <div id="app"></div>
-  <!-- built files will be auto injected -->
-</body>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
+    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+    <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
+    <title>逸教云</title>
+  </head>
 
+  <body>
+    <noscript>
+      <strong
+        >We're sorry but 管理后台 doesn't work properly without JavaScript
+        enabled. Please enable it to continue.</strong
+      >
+    </noscript>
+    <div id="app"></div>
+    <!-- built files will be auto injected -->
+  </body>
 </html>

BIN=BIN
public/temps/扩展字段.xlsx


BIN=BIN
public/temps/考务导入模版.xlsx


+ 66 - 0
src/assets/styles/adaptive.scss

@@ -1,10 +1,76 @@
 @media screen and (max-width: 1400px) {
+  .home-body {
+    top: 50px;
+  }
+  .home-main {
+    padding: 0 0 50px 205px;
+  }
   .home-header {
+    height: 50px;
+    .head-logo {
+      width: 205px;
+      font-size: 17px;
+      padding: 10px 15px;
+    }
     .menu-list {
       li {
         width: 138px;
+        padding: 10px 0;
+        font-size: 14px;
+        .icon {
+          width: 18px;
+          height: 18px;
+        }
+        span {
+          margin-left: 10px;
+        }
+      }
+    }
+  }
+  .home-navs {
+    width: 205px;
+    top: 50px;
+    font-size: 14px;
+    .nav-head {
+      padding: 15px 20px;
+      font-size: 15px;
+      line-height: 30px;
+      .icon-exam-center-gray {
+        width: 20px;
+        height: 20px;
       }
     }
+    .nav-list {
+      padding: 0 20px;
+    }
+    .nav-item {
+      &-main {
+        line-height: 20px;
+      }
+      &-icon {
+        top: 15px;
+        right: 5px;
+      }
+    }
+  }
+  .home-breadcrumb {
+    padding: 20px 25px;
+  }
+  .home-view {
+    padding: 0 25px;
+  }
+
+  .el-table__header thead {
+    font-size: 14px;
+  }
+
+  // element
+  .el-button {
+    padding: 10px 15px;
+  }
+  .el-input__inner {
+    height: 36px;
+    line-height: 36px;
   }
 }
 @media screen and (max-width: 1100px) {

+ 61 - 0
src/assets/styles/card-design.scss

@@ -543,3 +543,64 @@
     text-align: right;
   }
 }
+
+@media screen and (max-width: 1400px) {
+  .card-design {
+    .design-top {
+      height: 50px;
+      &-logo {
+        width: 200px;
+        height: 50px;
+        margin-top: -10px;
+        padding: 10px 15px;
+        font-size: 15px;
+        line-height: 30px;
+
+        .icon {
+          width: 24px;
+          height: 24px;
+          margin-right: 8px;
+        }
+      }
+      &-info {
+        padding-right: 15px;
+        height: 30px;
+        line-height: 30px;
+
+        .info-help {
+          font-size: 15px;
+          .icon {
+            width: 24px;
+            height: 24px;
+            margin-right: 8px;
+          }
+        }
+      }
+    }
+    .design-main {
+      padding-top: 50px;
+    }
+    .design-action {
+      padding: 20px 15px;
+      top: 50px;
+      width: 230px;
+      .type-item .el-button {
+        padding: 10px 0;
+        width: 90px;
+      }
+    }
+    .design-head {
+      top: 50px;
+      left: 230px;
+      padding: 10px 20px;
+      height: 110px;
+    }
+    .design-steps {
+      padding: 10px 0 10px;
+    }
+    .design-body {
+      padding: 140px 30px 30px 250px;
+      min-height: 1132px;
+    }
+  }
+}

+ 2 - 2
src/constants/enumerate.js

@@ -16,8 +16,8 @@ export const PRINT_STATUS = {
 };
 // 撤回状态
 export const REVOKE_STATUS = {
-  0: "未撤回",
-  1: "已撤回"
+  0: "待确认",
+  1: ""
 };
 // 审核状态
 export const AUDITING_STATUS = {

+ 4 - 3
src/modules/base/components/ModifyCourse.vue

@@ -4,6 +4,7 @@
     :visible.sync="modalIsShow"
     :title="title"
     top="10vh"
+    width="500px"
     :close-on-click-modal="false"
     :close-on-press-escape="false"
     append-to-body
@@ -23,10 +24,10 @@
           clearable
         ></el-input>
       </el-form-item>
-      <el-form-item prop="courseCode" label="科目码:">
+      <el-form-item prop="courseCode" label="科目码:">
         <el-input
           v-model.trim="modalForm.courseCode"
-          placeholder="请输入科目码"
+          placeholder="请输入科目码"
           clearable
         ></el-input>
       </el-form-item>
@@ -81,7 +82,7 @@ export default {
             trigger: "change"
           }
         ],
-        courseCode: commonCode({ prop: "科目码" })
+        courseCode: commonCode({ prop: "科目码" })
       }
     };
   },

+ 9 - 1
src/modules/base/components/RuleCard.vue

@@ -12,6 +12,7 @@
         <el-select
           v-model="modalForm.examNumberStyle"
           style="width: 142px;"
+          @change="numStyleChange"
           placeholder="请选择"
         >
           <el-option
@@ -40,7 +41,11 @@
         <el-checkbox v-model="modalForm.examAbsent">启用“缺考填涂”</el-checkbox>
       </el-form-item>
       <el-form-item style="margin-left: 30px;">
-        <el-checkbox v-model="modalForm.writeSign">启用“手写签名”</el-checkbox>
+        <el-checkbox
+          v-model="modalForm.writeSign"
+          :disabled="modalForm.examNumberStyle === '2'"
+          >启用“手写签名”</el-checkbox
+        >
       </el-form-item>
     </el-form>
 
@@ -166,6 +171,9 @@ export default {
       this.modalForm.writeSign = Boolean(this.modalForm.writeSign);
       this.dataReady = true;
     },
+    numStyleChange() {
+      this.modalForm.writeSign = this.modalForm.examNumberStyle !== "2";
+    },
     async submit() {
       const valid1 = await this.$refs["ModalFormLine"]
         .validate()

+ 32 - 8
src/modules/base/views/CourseManage.vue

@@ -1,16 +1,37 @@
 <template>
   <div class="course-manage">
-    <div class="part-box">
-      <div class="part-title">
-        <div class="part-title-infos">
-          <el-button type="primary" icon="icon icon-plus" @click="toAdd"
+    <div class="part-box part-box-filter">
+      <el-form ref="FilterForm" label-position="left" label-width="85px" inline>
+        <el-form-item label="科目名称:">
+          <el-input
+            style="width: 142px;"
+            v-model.trim="filter.courseName"
+            placeholder="请输入内容"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="科目编码:">
+          <el-input
+            style="width: 142px;"
+            v-model.trim="filter.courseCode"
+            placeholder="请输入内容"
+            clearable
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" icon="icon icon-search" @click="toPage(1)"
+            >查询</el-button
+          >
+          <el-button type="warning" icon="icon icon-plus" @click="toAdd"
             >新增科目</el-button
           >
-        </div>
-      </div>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="part-box">
       <el-table ref="TableList" :data="courses" border stripe>
         <el-table-column prop="courseName" label="科目名称"></el-table-column>
-        <el-table-column prop="courseCode" label="科目代码"></el-table-column>
+        <el-table-column prop="courseCode" label="科目码"></el-table-column>
         <el-table-column label="操作" align="center" width="120px">
           <template slot-scope="scope">
             <el-button
@@ -60,7 +81,10 @@ export default {
   components: { ModifyCourse },
   data() {
     return {
-      filter: {},
+      filter: {
+        courseName: "",
+        courseCode: ""
+      },
       current: 1,
       size: this.GLOBAL.pageSize,
       total: 0,

+ 5 - 1
src/modules/card/components/PagePropEdit.vue

@@ -121,7 +121,7 @@ export default {
   mounted() {},
   methods: {
     ...mapMutations("card", ["setCurElement", "setCardConfig"]),
-    ...mapActions("card", ["rebuildPages"]),
+    ...mapActions("card", ["rebuildPages", "resetElementProp"]),
     modifyColumnNum(item) {
       this.$confirm(
         "此操作可能会导致当前题卡所有元素位置变动, 是否继续?",
@@ -143,6 +143,10 @@ export default {
       this.$nextTick(() => {
         this.rebuildPages();
         this.setCurElement({});
+        // TODO:重排之后,元素宽度变化 印象了拖动
+        this.$nextTick(() => {
+          this.resetElementProp(true);
+        });
       });
     },
     modifyPageSize(pageSize) {

+ 1 - 0
src/modules/card/components/common/ElementResize.vue

@@ -297,6 +297,7 @@ export default {
     },
     moveElement({ left, top }) {
       if (!this.move) return;
+
       const sp = {
         ...this.sizePos,
         ...{

+ 1 - 1
src/modules/card/components/elementEdit/CardHead.vue

@@ -29,7 +29,7 @@
               <head-stdinfo :data="data"></head-stdinfo>
             </div>
           </div>
-          <div class="grid-row">
+          <div class="grid-row" v-if="!data.isSimple">
             <div class="grid-col">
               <head-notice :data="data"></head-notice>
             </div>

+ 3 - 7
src/modules/card/components/elementEdit/cardHeadSpin/HeadDynamic.vue

@@ -15,11 +15,8 @@
       </p>
     </div>
     <!-- miss-fill -->
-    <div
-      class="head-dynamic-part head-dynamic-missfill"
-      v-if="data.missAndFill"
-    >
-      <div class="head-dynamic-miss">
+    <div class="head-dynamic-part head-dynamic-missfill">
+      <div class="head-dynamic-miss" v-if="data.missAndFill">
         <div class="head-dynamic-content">
           <span class="dynamic-miss-title">缺考标记</span>
           <span class="dynamic-miss-body"
@@ -103,10 +100,9 @@ export default {
   },
   computed: {
     classes() {
-      let partNum = 0;
+      let partNum = 1;
       if (this.data.examNumberStyle !== "fill" && this.data.writeSign)
         partNum++;
-      if (this.data.missAndFill) partNum++;
       if (this.data.aOrB) partNum++;
 
       return ["head-dynamic", "card-head-body-spin", `head-dynamic-${partNum}`];

+ 3 - 3
src/modules/card/components/elementPreview/FillQuestion.vue

@@ -70,7 +70,7 @@ export default {
     parseQuestion(data) {
       let questionNo = data.startNumber;
       let questions = [];
-      const choiceList = this.getChoiceList(data.optionCount, data.isSelect);
+      const choiceList = this.getChoiceList(data.optionCount, data.isFill);
       const groupNum = Math.ceil(
         data.questionsCount / data.questionCountPerGroup
       );
@@ -86,8 +86,8 @@ export default {
       }
       this.questions = questions;
     },
-    getChoiceList(num, isSelect) {
-      const options = isSelect ? "abcdefghijklmn" : "√×";
+    getChoiceList(num, isFill) {
+      const options = !isFill ? "abcdefghijklmn" : "√×";
       return options
         .toUpperCase()
         .slice(0, num)

+ 9 - 8
src/modules/card/components/elementPropEdit/EditFillQuestion.vue

@@ -57,18 +57,19 @@
           :step="1"
           step-strictly
           :controls="false"
-          :disabled="!modalForm.isSelect"
+          :disabled="modalForm.isFill"
         ></el-input-number>
       </el-form-item>
       <el-form-item>
-        <el-checkbox v-model="modalForm.isSelect" @change="selectTypeChange"
-          >选择题</el-checkbox
+        <el-checkbox
+          v-model="modalForm.isFill"
+          @change="selectTypeChange"
+          :disabled="modalForm.isMultiply"
+          >判断题</el-checkbox
         >
       </el-form-item>
       <el-form-item>
-        <el-checkbox
-          v-model="modalForm.isMultiply"
-          :disabled="!modalForm.isSelect"
+        <el-checkbox v-model="modalForm.isMultiply" :disabled="modalForm.isFill"
           >多选</el-checkbox
         >
       </el-form-item>
@@ -88,7 +89,7 @@ const initModalForm = {
   endNumber: 5,
   questionsCount: 10,
   optionCount: 5,
-  isSelect: true,
+  isFill: false,
   isMultiply: false
 };
 
@@ -131,7 +132,7 @@ export default {
         this.modalForm.startNumber + this.modalForm.questionsCount - 1;
     },
     selectTypeChange(val) {
-      if (!val) {
+      if (val) {
         this.modalForm.optionCount = 2;
         this.modalForm.isMultiply = false;
       }

+ 2 - 2
src/modules/card/components/pageInfo/PageNumber.vue

@@ -1,13 +1,13 @@
 <template>
   <div :class="classes">
-    <ul class="page-number-rect-list" v-if="type === 'rect'">
+    <ul class="page-number-rect-list" v-if="type === 'rect' && current % 2">
       <li
         v-for="n in total"
         :key="n"
         :class="{ 'rect-li-act': n === current }"
       ></li>
     </ul>
-    <div class="page-number-text-cont" v-else>
+    <div class="page-number-text-cont" v-if="type === 'text'">
       第{{ current }}页(共{{ total }}页)
     </div>
   </div>

+ 1 - 0
src/modules/card/directives/move-ele.js

@@ -13,6 +13,7 @@ module.exports = {
 
       let left = e.pageX - _x;
       let top = e.pageY - _y;
+
       value.moveElement({ left, top });
     };
 

+ 3 - 3
src/modules/card/elementModel.js

@@ -159,13 +159,13 @@ const FILL_QUESTION_PROP = {
   topicName: "",
   startNumber: 1,
   questionsCount: 10,
-  optionCount: 5,
+  optionCount: 4,
   questionCountPerGroup: 5,
   optionDirection: "horizontal",
   questionGap: 8,
   groupGap: 22,
   optionGap: 8,
-  isSelect: true,
+  isFill: false,
   isMultiply: false,
   fontSize: "14px"
 };
@@ -280,7 +280,7 @@ const ELEMENT_INFOS = {
     icon: "el-icon-picture-outline"
   },
   FILL_QUESTION: {
-    name: "客观题",
+    name: "选择题",
     icon: "el-icon-s-operation"
   },
   FILL_AREA: {

+ 21 - 2
src/modules/card/store.js

@@ -259,6 +259,22 @@ const actions = {
     });
     commit("setCurElement", element);
   },
+  resetElementProp({ state }, isResetId = false) {
+    state.pages.forEach(page => {
+      page.columns.forEach(column => {
+        column.elements.forEach(element => {
+          const elementDom = document.getElementById(element.id);
+          if (elementDom) {
+            element.h = elementDom.offsetHeight;
+            element.w = elementDom.offsetWidth;
+          }
+          if (isResetId) {
+            element.id = getElementId();
+          }
+        });
+      });
+    });
+  },
   rebuildPages({ state, commit }) {
     const columnNumber = state.cardConfig.columnNumber;
     // 更新元件最新的高度信息
@@ -270,8 +286,11 @@ const actions = {
       page.columns.forEach(column => {
         column.elements.forEach(element => {
           const elementDom = document.getElementById(element.id);
-          element.h = elementDom.offsetHeight;
-          element.w = elementDom.offsetWidth;
+
+          if (elementDom) {
+            element.h = elementDom.offsetHeight;
+            element.w = elementDom.offsetWidth;
+          }
           // 过滤掉所有topic-head元素,这个元素是动态加的,页面重排时可能会添加重复元件。
           if (element.sign && element.type !== "TOPIC_HEAD") {
             if (element.sign === "objective") objectiveElements.push(element);

+ 2 - 1
src/modules/card/views/CardDesign.vue

@@ -398,7 +398,8 @@ export default {
     },
     // 操作
     async toPreview() {
-      await this.toSave(this.$refs.SavePage.getPageModel());
+      const result = await this.save();
+      if (!result) return;
       window.open(
         this.getRouterPath({
           name: "CardPreview",

+ 2 - 0
src/modules/exam-center/components/UploadFileView.vue

@@ -156,6 +156,7 @@ export default {
         success: false,
         msg: content
       };
+      this.loading = false;
       this.$emit("upload-error", content);
     },
     handleExceededSize() {
@@ -165,6 +166,7 @@ export default {
         success: false,
         msg: content
       };
+      this.loading = false;
       this.$emit("upload-error", content);
     },
     setAttachmentName(name) {

+ 10 - 1
src/modules/exam-center/views/ExamModify.vue

@@ -23,6 +23,13 @@
           ref="UploadFileView"
         ></upload-file-view>
         <el-button @click="toPreview" style="margin-left:16px;">预览</el-button>
+        <el-button
+          type="warning"
+          icon="icon icon-plus"
+          style="margin-left:10px;"
+        >
+          <a :href="downloadUrl" download="考务导入模版.xlsx">考务模板下载</a>
+        </el-button>
       </el-form-item>
       <el-form-item label="考试开始时间:">
         <p class="form-item-content">{{ modalForm.beginTime }}</p>
@@ -144,7 +151,7 @@ export default {
             trigger: "change"
           }
         ],
-        examCode: [
+        examCodeTemp: [
           {
             required: true,
             message: "请上传考务文件",
@@ -182,6 +189,7 @@ export default {
       RESERVE_TYPE,
       courses: [],
       isSubmit: false,
+      downloadUrl: this.GLOBAL.domain + "/temps/考务导入模版.xlsx",
       // import
       uploadUrl: "/api/print/exam/exam/impExamData"
     };
@@ -247,6 +255,7 @@ export default {
       }
       this.$refs.BusinessData.open();
     },
+
     // upload-handler
     uplaodError(msg) {
       this.$message.error(msg);

+ 4 - 1
src/modules/exam-center/views/PrintManage.vue

@@ -57,7 +57,10 @@
         <el-table-column prop="printProgress" label="打印进度">
           <template slot-scope="scope">{{ scope.row.printProgress }}%</template>
         </el-table-column>
-        <el-table-column prop="revokeStatus" label="撤回申请"></el-table-column>
+        <el-table-column
+          prop="revokeStatusName"
+          label="撤回申请"
+        ></el-table-column>
         <el-table-column label="操作" align="center">
           <template slot-scope="scope">
             <el-button