Browse Source

题卡转pdf样式调整

zhangjie 1 year ago
parent
commit
1f95215e23

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

@@ -23,13 +23,17 @@
     }
     }
   }
   }
   .elem-fill-question .option-item,
   .elem-fill-question .option-item,
-  .card-print .elem-fill-number .fill-number-option,
+  .elem-fill-number .fill-number-option,
   .card-head-body .head-stdno .stdno-fill-option,
   .card-head-body .head-stdno .stdno-fill-option,
   .page-number-rect-list li,
   .page-number-rect-list li,
   .card-head-body .head-dynamic-rect {
   .card-head-body .head-dynamic-rect {
     border-width: 0.5pt;
     border-width: 0.5pt;
   }
   }
 
 
+  .elem-fill-question .option-item {
+    line-height: 9px;
+  }
+
   .package-number {
   .package-number {
     display: block !important;
     display: block !important;
   }
   }
@@ -72,6 +76,7 @@
     position: relative;
     position: relative;
     white-space: nowrap;
     white-space: nowrap;
     margin: 0 -10px;
     margin: 0 -10px;
+    font-size: 0;
 
 
     &-2 {
     &-2 {
       .page-column {
       .page-column {
@@ -574,6 +579,7 @@
       > h4 {
       > h4 {
         font-weight: normal;
         font-weight: normal;
         margin-bottom: 8px;
         margin-bottom: 8px;
+        line-height: 20px;
       }
       }
       &-cont {
       &-cont {
         line-height: 1.5;
         line-height: 1.5;
@@ -1617,5 +1623,8 @@
     .card-head-body .head-dynamic-rect {
     .card-head-body .head-dynamic-rect {
       border-width: 0.5pt;
       border-width: 0.5pt;
     }
     }
+    .elem-fill-question .option-item {
+      line-height: 9px;
+    }
   }
   }
 }
 }

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

@@ -7,7 +7,6 @@
   margin: 10px auto;
   margin: 10px auto;
   box-shadow: 0 0 4px #ddd;
   box-shadow: 0 0 4px #ddd;
 }
 }
-
 .card-print {
 .card-print {
   padding: 0;
   padding: 0;
 }
 }
@@ -20,16 +19,18 @@
   display: none;
   display: none;
 }
 }
 .card-print .elem-fill-question .option-item,
 .card-print .elem-fill-question .option-item,
-.card-print .card-print .elem-fill-number .fill-number-option,
+.card-print .elem-fill-number .fill-number-option,
 .card-print .card-head-body .head-stdno .stdno-fill-option,
 .card-print .card-head-body .head-stdno .stdno-fill-option,
 .card-print .page-number-rect-list li,
 .card-print .page-number-rect-list li,
 .card-print .card-head-body .head-dynamic-rect {
 .card-print .card-head-body .head-dynamic-rect {
   border-width: 0.5pt;
   border-width: 0.5pt;
 }
 }
+.card-print .elem-fill-question .option-item {
+  line-height: 9px;
+}
 .card-print .package-number {
 .card-print .package-number {
   display: block !important;
   display: block !important;
 }
 }
-
 .page-box {
 .page-box {
   position: relative;
   position: relative;
   background: #fff;
   background: #fff;
@@ -64,6 +65,7 @@
   position: relative;
   position: relative;
   white-space: nowrap;
   white-space: nowrap;
   margin: 0 -10px;
   margin: 0 -10px;
+  font-size: 0;
 }
 }
 .page-box .page-main-2 .page-column {
 .page-box .page-main-2 .page-column {
   width: 50%;
   width: 50%;
@@ -91,7 +93,6 @@
 .page-box-less .page-number-rect {
 .page-box-less .page-number-rect {
   display: none;
   display: none;
 }
 }
-
 .page-main-inner {
 .page-main-inner {
   position: absolute;
   position: absolute;
   width: 100%;
   width: 100%;
@@ -102,7 +103,6 @@
   z-index: 9;
   z-index: 9;
   font-size: 0;
   font-size: 0;
 }
 }
-
 .page-main-outer {
 .page-main-outer {
   position: absolute;
   position: absolute;
   top: 0;
   top: 0;
@@ -113,7 +113,6 @@
   background-color: transparent;
   background-color: transparent;
   overflow: hidden;
   overflow: hidden;
 }
 }
-
 .page-column {
 .page-column {
   display: inline-block;
   display: inline-block;
   vertical-align: middle;
   vertical-align: middle;
@@ -206,7 +205,6 @@
   .element-item-card-head.element-item-type-pre::before {
   .element-item-card-head.element-item-type-pre::before {
   border-bottom: none;
   border-bottom: none;
 }
 }
-
 .page-locator {
 .page-locator {
   position: absolute;
   position: absolute;
   left: 80px;
   left: 80px;
@@ -232,7 +230,6 @@
 .page-locator-item:nth-of-type(2) {
 .page-locator-item:nth-of-type(2) {
   right: 96px;
   right: 96px;
 }
 }
-
 .page-box-1 .page-locator-bottom .page-locator-item:nth-of-type(1) {
 .page-box-1 .page-locator-bottom .page-locator-item:nth-of-type(1) {
   right: 0;
   right: 0;
   left: auto;
   left: auto;
@@ -243,7 +240,6 @@
 .page-box-1 .page-locator-item:nth-of-type(2) {
 .page-box-1 .page-locator-item:nth-of-type(2) {
   right: 0;
   right: 0;
 }
 }
-
 .page-number {
 .page-number {
   position: absolute;
   position: absolute;
   bottom: 30px;
   bottom: 30px;
@@ -275,11 +271,9 @@
   height: 16px;
   height: 16px;
   line-height: 16px;
   line-height: 16px;
 }
 }
-
 .page-box-A4 .page-number-rect {
 .page-box-A4 .page-number-rect {
   left: 50%;
   left: 50%;
 }
 }
-
 .elem-title {
 .elem-title {
   padding: 10px;
   padding: 10px;
   font-size: 14px;
   font-size: 14px;
@@ -290,12 +284,10 @@
 .elem-body {
 .elem-body {
   padding: 10px;
   padding: 10px;
 }
 }
-
 .grid-container {
 .grid-container {
   margin-left: -10px;
   margin-left: -10px;
   margin-right: -10px;
   margin-right: -10px;
 }
 }
-
 .grid-row {
 .grid-row {
   display: table;
   display: table;
   width: 100%;
   width: 100%;
@@ -315,7 +307,6 @@
   border-style: dashed;
   border-style: dashed;
   vertical-align: middle;
   vertical-align: middle;
 }
 }
-
 .card-head-top {
 .card-head-top {
   text-align: center;
   text-align: center;
   color: #000;
   color: #000;
@@ -491,6 +482,7 @@
 .card-head-body .head-notice > h4 {
 .card-head-body .head-notice > h4 {
   font-weight: normal;
   font-weight: normal;
   margin-bottom: 8px;
   margin-bottom: 8px;
+  line-height: 20px;
 }
 }
 .card-head-body .head-notice-cont {
 .card-head-body .head-notice-cont {
   line-height: 1.5;
   line-height: 1.5;
@@ -700,7 +692,6 @@
 .card-head-handle.card-head-narrow .head-stdno {
 .card-head-handle.card-head-narrow .head-stdno {
   height: 286px;
   height: 286px;
 }
 }
-
 .card-head-body-auto-resize {
 .card-head-body-auto-resize {
   margin-left: -5px;
   margin-left: -5px;
   margin-right: -5px;
   margin-right: -5px;
@@ -733,7 +724,6 @@
   border: none;
   border: none;
   margin: 0 !important;
   margin: 0 !important;
 }
 }
-
 .elem-topic-head {
 .elem-topic-head {
   text-align: center;
   text-align: center;
 }
 }
@@ -761,7 +751,6 @@
   white-space: nowrap;
   white-space: nowrap;
   overflow: hidden;
   overflow: hidden;
 }
 }
-
 .elem-line-horizontal {
 .elem-line-horizontal {
   height: 100%;
   height: 100%;
   line-height: 30px;
   line-height: 30px;
@@ -772,7 +761,6 @@
   width: 100%;
   width: 100%;
   border-bottom: 1px solid #000;
   border-bottom: 1px solid #000;
 }
 }
-
 .elem-line-vertical {
 .elem-line-vertical {
   height: 100%;
   height: 100%;
   text-align: center;
   text-align: center;
@@ -783,12 +771,10 @@
   height: 100%;
   height: 100%;
   border-left: 1px solid #000;
   border-left: 1px solid #000;
 }
 }
-
 .elem-lines .line-item {
 .elem-lines .line-item {
   display: inline-block;
   display: inline-block;
   vertical-align: top;
   vertical-align: top;
 }
 }
-
 .elem-rect .rect-body {
 .elem-rect .rect-body {
   position: absolute;
   position: absolute;
   width: 100%;
   width: 100%;
@@ -796,7 +782,6 @@
   top: 0;
   top: 0;
   left: 0;
   left: 0;
 }
 }
-
 .elem-text .text-body {
 .elem-text .text-body {
   padding: 5px;
   padding: 5px;
   line-height: 1.4;
   line-height: 1.4;
@@ -810,7 +795,6 @@
   color: #a0a0a0;
   color: #a0a0a0;
   margin: 0 2px;
   margin: 0 2px;
 }
 }
-
 .elem-barcode {
 .elem-barcode {
   height: 100%;
   height: 100%;
   border-color: transparent;
   border-color: transparent;
@@ -827,7 +811,6 @@
   right: 0;
   right: 0;
   margin: auto;
   margin: auto;
 }
 }
-
 .elem-image {
 .elem-image {
   height: 100%;
   height: 100%;
   border-color: transparent;
   border-color: transparent;
@@ -859,7 +842,6 @@
   right: 0;
   right: 0;
   margin: auto;
   margin: auto;
 }
 }
-
 .elem-grids > table {
 .elem-grids > table {
   table-layout: fixed;
   table-layout: fixed;
   border-spacing: 0;
   border-spacing: 0;
@@ -875,11 +857,9 @@
 .elem-grids-halving td > div {
 .elem-grids-halving td > div {
   padding-bottom: 100%;
   padding-bottom: 100%;
 }
 }
-
 .elem-pane {
 .elem-pane {
   height: 100%;
   height: 100%;
 }
 }
-
 .elem-fill-question {
 .elem-fill-question {
   white-space: normal;
   white-space: normal;
 }
 }
@@ -985,7 +965,6 @@
 .elem-fill-question-vertical .option-item:last-child {
 .elem-fill-question-vertical .option-item:last-child {
   margin-bottom: 0 !important;
   margin-bottom: 0 !important;
 }
 }
-
 .elem-fill-area .option-item {
 .elem-fill-area .option-item {
   display: inline-block;
   display: inline-block;
   vertical-align: middle;
   vertical-align: middle;
@@ -1002,7 +981,6 @@
 .elem-fill-area-vertical .option-item:last-child {
 .elem-fill-area-vertical .option-item:last-child {
   margin-bottom: 0 !important;
   margin-bottom: 0 !important;
 }
 }
-
 .elem-fill-line {
 .elem-fill-line {
   white-space: normal;
   white-space: normal;
 }
 }
@@ -1063,7 +1041,6 @@
   text-align: center;
   text-align: center;
   border: none;
   border: none;
 }
 }
-
 .elem-explain .elem-title {
 .elem-explain .elem-title {
   padding-bottom: 0;
   padding-bottom: 0;
 }
 }
@@ -1089,7 +1066,6 @@
 .elem-explain .elem-explain-element .explain-element-body {
 .elem-explain .elem-explain-element .explain-element-body {
   position: absolute;
   position: absolute;
 }
 }
-
 .elem-composition .elem-title {
 .elem-composition .elem-title {
   padding-bottom: 0;
   padding-bottom: 0;
 }
 }
@@ -1109,7 +1085,6 @@
   position: absolute;
   position: absolute;
   overflow: hidden;
   overflow: hidden;
 }
 }
-
 .elem-fill-number {
 .elem-fill-number {
   border: 1px solid #000;
   border: 1px solid #000;
 }
 }
@@ -1162,12 +1137,10 @@
   transform: scale(0.67, 0.67);
   transform: scale(0.67, 0.67);
   -webkit-transform: scale(0.67, 0.67);
   -webkit-transform: scale(0.67, 0.67);
 }
 }
-
 .elem-fill-field {
 .elem-fill-field {
   white-space: normal;
   white-space: normal;
   overflow: hidden;
   overflow: hidden;
 }
 }
-
 .fill-field-item {
 .fill-field-item {
   display: inline-block;
   display: inline-block;
   padding: 0 10px;
   padding: 0 10px;
@@ -1220,7 +1193,6 @@
   margin-left: 80px;
   margin-left: 80px;
   height: 100%;
   height: 100%;
 }
 }
-
 .elem-fill-pane {
 .elem-fill-pane {
   font-size: 0;
   font-size: 0;
   white-space: normal;
   white-space: normal;
@@ -1234,7 +1206,6 @@
 .elem-fill-pane .fill-pane-cont {
 .elem-fill-pane .fill-pane-cont {
   border: 1px solid #000;
   border: 1px solid #000;
 }
 }
-
 .elem-forbid-area {
 .elem-forbid-area {
   height: 100%;
   height: 100%;
   position: relative;
   position: relative;
@@ -1249,7 +1220,6 @@
   font-size: 30px;
   font-size: 30px;
   text-align: center;
   text-align: center;
 }
 }
-
 .elem-fill-table .table {
 .elem-fill-table .table {
   width: 100%;
   width: 100%;
   border-spacing: 0;
   border-spacing: 0;
@@ -1259,7 +1229,6 @@
 .elem-fill-table .table td {
 .elem-fill-table .table td {
   padding: 0;
   padding: 0;
 }
 }
-
 .elem-undertaking {
 .elem-undertaking {
   position: absolute;
   position: absolute;
   width: 60px;
   width: 60px;
@@ -1315,7 +1284,6 @@
   top: auto;
   top: auto;
   left: 0;
   left: 0;
 }
 }
-
 .card-free-preview:not(.card-print) {
 .card-free-preview:not(.card-print) {
   padding: 10px 0;
   padding: 10px 0;
   background-color: #f0f0f0;
   background-color: #f0f0f0;
@@ -1331,7 +1299,6 @@
 .card-free-preview .page-column-element .element-item::before {
 .card-free-preview .page-column-element .element-item::before {
   display: none;
   display: none;
 }
 }
-
 @media print {
 @media print {
   .card-preview {
   .card-preview {
     padding: 0;
     padding: 0;
@@ -1351,4 +1318,7 @@
   .card-preview .card-head-body .head-dynamic-rect {
   .card-preview .card-head-body .head-dynamic-rect {
     border-width: 0.5pt;
     border-width: 0.5pt;
   }
   }
+  .card-preview .elem-fill-question .option-item {
+    line-height: 9px;
+  }
 }
 }

File diff suppressed because it is too large
+ 0 - 0
card/previewTemp.js


+ 1 - 1
src/modules/mark/components/report/previewTemp.js

@@ -5,7 +5,7 @@ export default (domeStr) => {
     <!DOCTYPE html>
     <!DOCTYPE html>
     <html lang="zh-cn">
     <html lang="zh-cn">
       <head>
       <head>
-        <meta http-equiv="X-UA-Compatible" content="IE=edge">
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
         <meta name="viewport" content="width=device-width, initial-scale=1.0">
         <meta name="viewport" content="width=device-width, initial-scale=1.0">
         <title>知学知考报告</title>
         <title>知学知考报告</title>
         <style>${previewCss}</style>
         <style>${previewCss}</style>

Some files were not shown because too many files changed in this diff