Преглед изворни кода

卡头修改/选题宽度调整

zhangjie пре 2 година
родитељ
комит
57e2ba5939

+ 7 - 10
card/assets/styles/card-preview.scss

@@ -871,11 +871,11 @@
     padding: 5px;
     &:first-child {
       float: left;
-      width: 289px;
+      width: 50%;
     }
     &:last-child {
       float: right;
-      width: 424px;
+      width: 50%;
     }
 
     &-item {
@@ -1083,10 +1083,6 @@
     }
   }
 
-  .elem-title {
-    padding-bottom: 0;
-  }
-
   .elem-body {
     padding: 10px 5px;
   }
@@ -1106,10 +1102,10 @@
     vertical-align: middle;
     padding: 0;
     width: 18px;
-    height: 14px;
+    height: 12px;
     text-align: center;
     font-size: 12px;
-    line-height: 1;
+    line-height: 10px;
     // border-rect
     border: 1px solid #000;
     color: #000;
@@ -1121,12 +1117,13 @@
     }
 
     &:first-child {
-      text-align: right;
+      text-align: center;
       border: none;
       font-size: 12px;
+      line-height: 12px;
       color: #000;
       > i {
-        transform: scale(1, 1);
+        transform: scale(0.9, 0.9);
       }
     }
     &:last-child {

+ 7 - 9
card/assets/styles/card-temp.css

@@ -690,11 +690,11 @@
 }
 .card-head-body-auto-resize .rect-col:first-child {
   float: left;
-  width: 289px;
+  width: 50%;
 }
 .card-head-body-auto-resize .rect-col:last-child {
   float: right;
-  width: 424px;
+  width: 50%;
 }
 .card-head-body-auto-resize .rect-col-item {
   border: 1px solid #000;
@@ -877,9 +877,6 @@
   content: "判断";
   background-color: #ffa952;
 }
-.elem-fill-question .elem-title {
-  padding-bottom: 0;
-}
 .elem-fill-question .elem-body {
   padding: 10px 5px;
 }
@@ -897,10 +894,10 @@
   vertical-align: middle;
   padding: 0;
   width: 18px;
-  height: 14px;
+  height: 12px;
   text-align: center;
   font-size: 12px;
-  line-height: 1;
+  line-height: 10px;
   border: 1px solid #000;
   color: #000;
   box-sizing: border-box;
@@ -910,13 +907,14 @@
   transform: scale(0.67, 0.67);
 }
 .elem-fill-question .option-item:first-child {
-  text-align: right;
+  text-align: center;
   border: none;
   font-size: 12px;
+  line-height: 12px;
   color: #000;
 }
 .elem-fill-question .option-item:first-child > i {
-  transform: scale(1, 1);
+  transform: scale(0.9, 0.9);
 }
 .elem-fill-question .option-item:last-child {
   margin-right: 0 !important;

+ 1 - 1
card/elements/card-head/CardHead.vue

@@ -56,7 +56,7 @@
         </div>
       </div>
       <div class="card-head-body" v-else>
-        <card-head-body-auto-resize>
+        <card-head-body-auto-resize :data="data">
           <head-stdinfo :data="data" slot="stdinfo"></head-stdinfo>
           <head-notice :data="data" slot="notice"></head-notice>
           <head-stdno :data="data" slot="stdno"></head-stdno>

+ 21 - 2
card/elements/card-head/CardHeadBodyAutoResize.vue

@@ -1,6 +1,6 @@
 <template>
   <div :class="classes">
-    <div class="rect-col">
+    <div class="rect-col" :style="{ width: leftColWidth + '%' }">
       <div
         class="rect-col-item"
         ref="stdinfoContainer"
@@ -16,7 +16,7 @@
         <slot name="notice"></slot>
       </div>
     </div>
-    <div class="rect-col">
+    <div class="rect-col" :style="{ width: rightColWidth + '%' }">
       <div
         class="rect-col-item"
         ref="stdnoContainer"
@@ -38,6 +38,11 @@
 <script>
 export default {
   name: "card-head-body-auto-resize",
+  props: {
+    data: {
+      type: Object,
+    },
+  },
   data() {
     return {
       orgHeights: {
@@ -52,6 +57,9 @@ export default {
         stdno: 40,
         dynamic: 40,
       },
+      leftColWidth: 50,
+      rightColWidth: 50,
+      maxRigthColWidth: 60,
     };
   },
   computed: {
@@ -77,6 +85,17 @@ export default {
       this.resizeRect();
     },
     resizeRect() {
+      // width size
+      const fillNumber = this.data.fillNumber || 13;
+      if (fillNumber <= 10) {
+        this.rightColWidth = 50;
+      } else {
+        let rightColWidth = 50 + 4 * (fillNumber - 10);
+        this.rightColWidth = Math.min(this.maxRigthColWidth, rightColWidth);
+      }
+      this.leftColWidth = 100 - this.rightColWidth;
+
+      // height size
       let col1 = this.orgHeights.stdinfo + this.orgHeights.notice;
       let col2 = this.orgHeights.stdno + this.orgHeights.dynamic;
       if (this.$slots.dynamic) {

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

@@ -12,6 +12,7 @@ const MODEL = {
   paperType: "PRINT", // PRINT: "印刷",FILL: "填涂"
   examAbsent: true,
   writeSign: true,
+  fillNumber: 10,
   examNumberStyle: "PRINT", // PRINT:印刷条码, PASTE:粘贴条码, FILL:考号填涂
   businessParams: [],
   attention: [],

+ 4 - 4
card/elements/fill-question/model.js

@@ -108,16 +108,16 @@ const getFullModel = (model, { pageSize, columnNumber }) => {
     if (model.optionDirection === "vertical") {
       const optionCount = model.optionCount + 1;
       const optionsHeight =
-        14 * optionCount + (optionCount - 1) * model.optionGap + 20;
-      child.h = i ? optionsHeight : optionsHeight + 24;
+        12 * optionCount + (optionCount - 1) * model.optionGap + 20;
+      child.h = i ? optionsHeight : optionsHeight + 34;
     } else {
       const optionCount =
         model.questionDirection === "vertical"
           ? Math.min(child.questionsCount, model.questionCountPerGroup)
           : Math.ceil(child.questionsCount / groupPerLine);
       const optionsHeight =
-        14 * optionCount + (optionCount - 1) * model.questionGap + 20;
-      child.h = i ? optionsHeight : optionsHeight + 24;
+        12 * optionCount + (optionCount - 1) * model.questionGap + 20;
+      child.h = i ? optionsHeight : optionsHeight + 34;
     }
     child.minHeight = child.h;
 

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
card/previewTemp.js


+ 5 - 0
src/modules/print/api.js

@@ -99,6 +99,11 @@ export const resubmitPrintTask = ({ id, printPlanId }) => {
 export const cancelPrintTask = (id) => {
   return $post("/api/admin/exam/print/task_cancel", { id, status: "READY" });
 };
+export const batchCancelPrintTask = (ids) => {
+  return $post("/api/admin/exam/print/task_batch_cancel", {
+    ids,
+  });
+};
 export const printTaskTotalInfo = (datas) => {
   return $postParam("/api/admin/exam/print/task_total_data", datas);
 };

+ 28 - 0
src/modules/print/views/PrintTaskManage.vue

@@ -129,6 +129,14 @@
       <div class="box-justify">
         <div></div>
         <div>
+          <el-button
+            v-if="checkPrivilege('button', 'BatchEnd')"
+            icon="el-icon-download"
+            type="danger"
+            @click="toBatchCancel"
+          >
+            批量撤回
+          </el-button>
           <el-button
             v-if="checkPrivilege('button', 'BatchDownload')"
             icon="el-icon-download"
@@ -423,6 +431,7 @@ import {
   submitPrintTask,
   resubmitPrintTask,
   cancelPrintTask,
+  batchCancelPrintTask,
   printTaskTotalInfo,
   getPrintTaskPdf,
   downloadPrintTaskPdf,
@@ -582,6 +591,25 @@ export default {
         })
         .catch(() => {});
     },
+    toBatchCancel() {
+      if (!this.multipleSelection.length) {
+        this.$message.error("请选择要撤回的记录!");
+        return;
+      }
+      this.$confirm("确定撤回选中的印刷任务的提交吗?", "提示", {
+        type: "warning",
+      })
+        .then(async () => {
+          const data = await batchCancelPrintTask(
+            this.multipleSelection.join()
+          );
+          if (!data) return;
+
+          this.$message.success("撤回成功!");
+          this.getList();
+        })
+        .catch(() => {});
+    },
     async toViewPdf(row) {
       this.pdfList = [];
       let result = true;

Неке датотеке нису приказане због велике количине промена