zhangjie 1 rok temu
rodzic
commit
9077790502

+ 6 - 1
src/modules/card/assets/styles/card-preview.scss

@@ -811,7 +811,7 @@
     }
     &-notice {
       position: relative;
-      min-height: 200px;
+      min-height: 160px;
       width: 50%;
       left: 50%;
       border: none;
@@ -826,6 +826,11 @@
       z-index: 2;
       border-bottom: 1px solid #000;
 
+      &:last-child {
+        border-bottom: none;
+        height: 100%;
+      }
+
       .stdno-empty {
         position: absolute;
         width: 100%;

+ 5 - 1
src/modules/card/assets/styles/card-temp.css

@@ -670,7 +670,7 @@
 }
 .card-head-model-two .card-head-notice {
   position: relative;
-  min-height: 200px;
+  min-height: 160px;
   width: 50%;
   left: 50%;
   border: none;
@@ -685,6 +685,10 @@
   z-index: 2;
   border-bottom: 1px solid #000;
 }
+.card-head-model-two .card-head-stdno:last-child {
+  border-bottom: none;
+  height: 100%;
+}
 .card-head-model-two .card-head-stdno .stdno-empty {
   position: absolute;
   width: 100%;

+ 14 - 0
src/modules/card/components/CardDesign.vue

@@ -181,6 +181,12 @@
             >
               <div id="topic-column" class="page-column-main">
                 <div class="page-column-body">
+                  <!-- card-head-sample -->
+                  <card-head-sample
+                    :data="cardHeadSampleData"
+                    id="simple-card-head"
+                    v-if="topics.length && cardHeadSampleData"
+                  ></card-head-sample>
                   <!-- topic element -->
                   <topic-element-preview
                     v-for="element in topics"
@@ -222,6 +228,7 @@ import PageNumber from "./PageNumber";
 import { getPageInitElements } from "../pageModel";
 // test auto build
 import { buildCardFromPaperSimpleStruct } from "../autoBuild/simplePaperCard";
+import CardHeadSample from "../elements/card-head/CardHead";
 
 export default {
   name: "CardDesign",
@@ -233,6 +240,7 @@ export default {
     ElementPropEdit,
     RightClickMenu,
     PageNumber,
+    CardHeadSample,
   },
   props: {
     content: {
@@ -270,6 +278,12 @@ export default {
       "curPage",
       "curPageNo",
     ]),
+    cardHeadSampleData() {
+      if (!this.cardConfig["pageSize"]) return;
+      const data = getCardHeadModel(this.cardConfig);
+      data.isSimple = true;
+      return data;
+    },
   },
   mounted() {
     this.initCard();

+ 1 - 1
src/modules/card/elements/card-head/CardHeadModelTwo.vue

@@ -28,7 +28,7 @@
       <div class="card-head-stdno">
         <div class="stdno-empty">条码粘贴区</div>
       </div>
-      <div class="card-head-dynamic">
+      <div v-if="!data.isSimple" class="card-head-dynamic">
         <div class="head-dynamic-content">
           <span class="dynamic-miss-title">
             <h5>缺考标记</h5>

+ 1 - 0
src/modules/card/elements/card-head/model.js

@@ -11,6 +11,7 @@ const MODEL = {
   objectiveAttention: "测试题卡规则1-客观题-注意事项",
   subjectiveAttention: "测试题卡规则1-主观题-注意事项",
   modelType: "MODEL_ONE",
+  isSimple: false, // 是否是简化形式
   sign: "head",
 };
 

Plik diff jest za duży
+ 0 - 0
src/modules/card/previewTemp.js


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

@@ -568,6 +568,7 @@ const actions = {
     const pageSize = state.cardConfig.pageSize;
     // 更新元件最新的高度信息
     // 整理所有元件
+    const cardHeadElement = state.topics[0];
     state.topics.forEach((element) => {
       const elementDom = document.getElementById(`preview-${element.id}`);
 
@@ -585,6 +586,8 @@ const actions = {
 
     // 动态计算每列可以分配的元件
     const columnHeight = document.getElementById("topic-column").offsetHeight;
+    const simpleCardHeadHeight =
+      document.getElementById("simple-card-head").offsetHeight;
     let pages = [];
     let page = {};
     let columns = [];
@@ -594,6 +597,23 @@ const actions = {
     const initCurColumnElements = () => {
       curColumnElements = [];
       curColumnHeight = 0;
+      const groupColumnNumber = columnNumber * 2;
+      // 奇数页第一栏;
+      if (!(columns.length % groupColumnNumber)) {
+        // 非第一页奇数页第一栏
+        if (columns.length) {
+          const cardHeadSimpleElement = Object.assign({}, cardHeadElement, {
+            id: getElementId(),
+            isSimple: true,
+            h: simpleCardHeadHeight,
+          });
+          curColumnElements.push(cardHeadSimpleElement);
+          curColumnHeight += simpleCardHeadHeight;
+        } else {
+          curColumnElements.push(cardHeadElement);
+          curColumnHeight += cardHeadElement.h;
+        }
+      }
     };
 
     const checkElementIsCurColumnFirstType = (element) => {
@@ -641,7 +661,7 @@ const actions = {
 
     // 批量添加所有元素。
     initCurColumnElements();
-    state.topics.forEach((element, eindex) => {
+    state.topics.slice(1).forEach((element, eindex) => {
       element.elementSerialNo = eindex;
       pushElement(element);
     });

+ 3 - 0
src/modules/question/components/QuestionImportDialog.vue

@@ -281,6 +281,9 @@ export default {
         if (error.response?.data.desc) {
           this.errorMsgModalIsShow = true;
           this.excelErrorMsgs = error.response.data.desc.split("\n");
+          if (this.excelErrorMsgs.some((item) => item.includes("no login"))) {
+            this.excelErrorMsgs = ["登陆失效,请重新登录!"];
+          }
         }
       });
       this.loading = false;

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików