previewTemp.js 25 KB

1234567891011121314151617181920212223
  1. const resetCss = `a,body,div,footer,h1,h2,h3,h4,h5,h6,header,input,li,ol,i,p,span,td,th,tr,ul{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)}li{list-style:none}em,i,u{font-style:normal}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:700}fieldset,img{border:0;}img{vertical-align:middle;}body{font-size:14px;color:#000;background:#f5f5f5;}`;
  2. const previewCss = `.card-preview{padding:10px 0;background-color:#f0f0f0;color:#000;}.card-preview .page-box{margin:10px auto;box-shadow:0 0 4px #ddd;}.card-print{padding:0;}.card-print .page-box{margin:0 auto;box-shadow:none;page-break-after:always;}.card-print .elem-fill-question-first::before{display:none;}.card-print .elem-fill-question .option-item,.card-print .elem-fill-number .fill-number-option,.card-print .card-head-body .head-stdno .stdno-fill-option,.card-print .page-number-rect-list li,.card-print .card-head-body .head-dynamic-rect{border-width:0.5pt;}.card-print .elem-fill-question .option-item{line-height:9px;}.card-print .package-number{display:block !important;}.page-box{position:relative;background:#fff;margin:0 auto;font-weight:normal;font-family:"宋体","宋体-简",Arial,sans-serif;}.page-box .package-number{position:absolute;width:400px;height:40px;padding:0 20px;top:10px;left:54%;text-align:center;z-index:99;display:none;}.page-box .package-number img{display:inline-block;height:28px;width:auto;border:none;}.page-box .package-number p{line-height:1;font-size:12px;margin:0;}.page-box .page-main{height:100%;position:relative;white-space:nowrap;margin:0 -10px;font-size:0;}.page-box .page-main-2 .page-column{width:50%;}.page-box .page-main-3 .page-column{width:33.33%;}.page-box .page-main-4 .page-column{width:25%;}.page-box-A3{width:1586px;height:1122px;}.page-box-A4{width:793px;height:1122px;}.page-box-A4 .page-main-inner{padding:60px 45px;}.page-box-8K{width: 1474px;height: 1020px;}.page-box-less .page-number-rect{display:none;}.page-main-inner{position:absolute;width:100%;height:100%;top:0;left:0;padding:60px 80px;z-index:9;font-size:0;}.page-main-outer{position:absolute;top:0;left:0;right:0;bottom:0;z-index:7;background-color:transparent;overflow:hidden;}.page-column{display:inline-block;vertical-align:middle;position:relative;height:100%;width:100%;font-size:14px;padding:0 10px;}.page-column-forbid-area{position:absolute;top:0;left:0;bottom:0;right:0;z-index:1;border:1px solid #000;overflow:hidden;}.page-column-forbid-area > p{padding:20px;position:absolute;width:260px;height:82px;top:50%;left:50%;margin-top:-41px;margin-left:-130px;z-index:9;font-weight:bold;font-size:30px;color:#333;background-color:#fff;text-align:center;}.page-column-main{position:relative;height:100%;}.page-column-body{position:absolute;top:0;bottom:0;left:0;right:0;z-index:9;}.page-column-element .element-item{position:relative;}.page-column-element .element-item-width{width:100% !important;}.page-column-element .element-item::before{content:"";position:absolute;width:100%;height:100%;top:0;left:0;box-sizing:border-box;z-index:2;border:1px solid #000;border-top:0;}.page-column-element .element-item > div{z-index:9;position:relative;}.page-column-element .element-item-card-head::before{border:0;}.page-column-element .element-item-topic-head::before{border:0;}.page-column-element .element-item-fill-question::before,.page-column-element .element-item-fill-line::before{border-bottom:0;}.page-column-element .element-item-explain::before{border-bottom-color:transparent;}.page-column-element .element-item-type-last::before{border-bottom:1px solid #000;}.page-column-element:last-child .element-item::before{border-bottom:1px solid #000;}.page-column-element:last-child .element-item-card-head.element-item-type-pre::before{border-bottom:none;}.page-locator{position:absolute;left:80px;right:80px;height:16px;z-index:8;}.page-locator-top{top:30px;}.page-locator-bottom{bottom:30px;}.page-locator-item{position:absolute;width:24px;border-bottom:16px solid #000;top:0;}.page-locator-item:nth-of-type(1){left:0;}.page-locator-item:nth-of-type(2){right:96px;}.page-box-1 .page-locator-bottom .page-locator-item:nth-of-type(1){right:0;left:auto;}.page-box-1 .page-locator-item:nth-of-type(1){left:96px;}.page-box-1 .page-locator-item:nth-of-type(2){right:0;}.page-number{position:absolute;bottom:30px;}.page-number-rect{left:25%;transform:translateX(-50%);-webkit-transform:translateX(-50%);}.page-number-rect-list{font-size:0;}.page-number-rect-list li{display:inline-block;vertical-align:top;font-size:14px;width:24px;height:16px;border:1px solid #000;margin-right:10px;}.page-number-rect-list li.rect-li-act{background-color:#000;}.page-number-text{right:25%;}.page-number-text-cont{height:16px;line-height:16px;}.page-box-A4 .page-number-rect{left:50%;}.course-barcode{position:absolute;width:400px;height:40px;padding:0 20px;top:10px;left:50%;margin-left:-400px;text-align:center;}.course-barcode img{display: inline-block;height:28px;width:auto;border:none;}.course-barcode img[src=""]{display:none;}.course-barcode p{line-height:1;font-size:12px;margin:0;}.elem-title{padding:10px;font-size:14px;font-weight:bold;color:rgb(0,0,0);line-height:1;white-space:normal;}.elem-body{padding:10px;}.grid-container{margin-left:-10px;margin-right:-10px;}.grid-row{display:table;width:100%;border-spacing:10px 0;border-collapse:separate;}.grid-row:nth-of-type(2){margin-top:10px;}.grid-row .grid-col{display:table-cell;width:50%;vertical-align:top;border:1px solid #000;}.grid-row .grid-col-dash{border-style:dashed;vertical-align:middle;}.card-head-top{text-align:center;color:#000;}.card-head-title{font-size:24px;font-weight:bold;overflow:hidden;}.card-head-title > h1{line-height:33px;white-space:nowrap;letter-spacing:-1px;}.card-head-subtitle{height:44px;font-size:14px;overflow:hidden;white-space:normal;margin-bottom:10px;}.card-head-subtitle p{padding:0 10px;line-height:22px;height:22px;white-space:pre;}.card-head-body{font-weight:normal;}.card-head-body .el-col{padding-top:5px;padding-bottom:5px;}.card-head-body-spin{padding:5px 12px;white-space:normal;word-break:break-all;}.card-head-body .stdinfo-item{height:30px;line-height:30px;position:relative;overflow:hidden;}.card-head-body .stdinfo-item::after{content:"";display:block;position:absolute;width:100%;border-bottom:1px solid #000;bottom:6px;left:0;z-index:1;}.card-head-body .stdinfo-item > span{z-index:2;display:block;position:relative;font-size:14px;}.card-head-body .stdinfo-item > span:first-child{float:left;background-color:#fff;text-align:justify;font-size:0px;}.card-head-body .stdinfo-item > span:first-child > i{font-size:14px;}.card-head-body .stdinfo-item > span:first-child::after{content:"";display:inline-block;width:100%;height:0;line-height:0;}.card-head-body .stdinfo-item > span:nth-of-type(2){float:left;width:20px;background-color:#fff;}.card-head-body .stdinfo-item > span:last-child{margin-left:80px;height:100%;}.card-head-body .head-stdno{height:100%;padding:0;}.card-head-body .head-stdno .stdno-empty{min-height:130px;font-weight:bold;letter-spacing:3px;text-align:center;position:relative;}.card-head-body .head-stdno .stdno-empty > p{position:absolute;left:0;width:100%;top:50%;transform:translateY(-50%);-webkit-transform:translateY(-50%);}.card-head-body .head-stdno .stdno-fill{min-height:240px;height:100%;position:relative;}.card-head-body .head-stdno .stdno-fill-rect{font-size:0;height:27px;border-bottom:1px solid #000;}.card-head-body .head-stdno .stdno-fill-number{display:inline-block;vertical-align:top;width:7.692%;height:100%;}.card-head-body .head-stdno .stdno-fill-number:not(:last-child){border-right:1px solid #000;}.card-head-body .head-stdno .stdno-fill-head{position:absolute;width:100%;height:51px;top:0;left:0;z-index:9;}.card-head-body .head-stdno .stdno-fill-head > h5{border-bottom:1px solid #000;line-height:24px;font-size:14px;font-weight:bold;text-align:center;}.card-head-body .head-stdno .stdno-fill-body{position:absolute;top:0;bottom:0;padding-top:51px;display:table;width:100%;}.card-head-body .head-stdno .stdno-fill-list{display:table-cell;width:7.692%;padding:1px 0;}.card-head-body .head-stdno .stdno-fill-option{margin:8px auto;width:18px;height:10px;font-size:12px;line-height:8px;text-align:center;color:#000;border:1px solid #000;font-family:"Times New Roman",Arial,sans-serif;}.card-head-body .head-stdno .stdno-fill-option > i{display:inline-block;transform:scale(0.67,0.67);-webkit-transform:scale(0.67,0.67);}.card-head-body .head-stdno .stdno-auto-barcode{height:70px;text-align:center;}.card-head-body .head-stdno .stdno-auto-barcode > img{display:block;height:50px;width:300px;margin:0 auto;}.card-head-body .head-stdno .stdno-auto-barcode > p{line-height:20px;}.card-head-body .head-notice > h4{font-weight:normal;margin-bottom:8px;line-height:20px;}.card-head-body .head-notice-cont{line-height:1.5;font-size:12px;margin-bottom:5px;}.card-head-body .head-notice-cont > span{display:block;}.card-head-body .head-notice-cont > span:first-child{width:20px;white-space:nowrap;float:left;}.card-head-body .head-notice-cont > span:last-child{margin-left:20px;}.card-head-body .head-notice-exam-number-fill span{display:inline;}.card-head-body .head-notice-exam-number-fill span:first-child{float:none;}.card-head-body .head-notice-exam-number-fill span:last-child{margin:0;}.card-head-body .head-dynamic{padding:0;font-size:12px;border-spacing:0;border-collapse:collapse;}.card-head-body .head-dynamic-part:not(:last-child){border-bottom:1px solid #000;}.card-head-body .head-dynamic-write{padding:5px 12px;}.card-head-body .head-dynamic-write .stdinfo-item{margin-bottom:0;}.card-head-body .head-dynamic-write > p{line-height:18px;}.card-head-body .head-dynamic-missfill{display:table;width:100%;}.card-head-body .head-dynamic-miss{padding:10px;display:table-cell;vertical-align:middle;}.card-head-body .head-dynamic-miss:nth-of-type(2){border-left:1px solid #000;}.card-head-body .head-dynamic-miss span{display:block;}.card-head-body .head-dynamic-miss .head-dynamic-content{height:14px;line-height:14px;}.card-head-body .head-dynamic-miss .dynamic-miss-title{width:54px;float:left;}.card-head-body .head-dynamic-miss .dynamic-miss-body{margin-left:54px;height:14px;text-align:center;font-size:0;}.card-head-body .head-dynamic-fill{padding:10px;}.card-head-body .head-dynamic-fill p{display:inline-block;vertical-align:middle;line-height:18px;word-wrap:normal;}.card-head-body .head-dynamic-fill p:first-child{margin-right:20px;}.card-head-body .head-dynamic-fill p > span,.card-head-body .head-dynamic-fill p > i{display:inline-block;vertical-align:middle;box-sizing:border-box;}.card-head-body .head-dynamic-fill p:first-child i{width:28px;height:14px;background-color:#000;}.card-head-body .head-dynamic-fill p:last-child > i{width:28px;height:14px;border:1px solid #000;font-size:14px;font-weight:bold;margin-right:6px;line-height:12px;text-align:center;}.card-head-body .head-dynamic-fill p:last-child > i:last-child{margin-right:0;}.card-head-body .head-dynamic-fill p:last-child > i:nth-of-type(3)::before{content:"";display:inline-block;vertical-align:top;margin-left:-5px;height:100%;width:5px;background-color:#000;}.card-head-body .head-dynamic-fill p:last-child > i:nth-of-type(4)::before{content:"";display:inline-block;margin-top:1px;width:10px;height:10px;border-radius:50%;background-color:#000;}.card-head-body .head-dynamic-rect{display:inline-block;vertical-align:middle;width:24px;height:12px;border:1px solid #000;font-size:12px;text-align:center;line-height:10px;color:#000;margin:0 5px;font-family:"Times New Roman",Arial,sans-serif;}.card-head-body .head-dynamic-rect > i{display:inline-block;transform:scale(0.67,0.67);-webkit-transform:scale(0.67,0.67);}.card-head-body .head-dynamic-aorb{display:table;width:100%;}.card-head-body .head-dynamic-aorb .dynamic-aorb-item{display:table-cell;vertical-align:middle;}.card-head-body .head-dynamic-aorb-fill .dynamic-aorb-item:first-child{border:none;}.card-head-body .head-dynamic-aorb .dynamic-aorb-title{width:40%;padding:10px;}.card-head-body .head-dynamic-aorb .dynamic-aorb-info{width:60%;font-size:16px;position:relative;overflow:hidden;text-align:center;}.card-head-body .head-dynamic-aorb .dynamic-aorb-info .dynamic-aorb-content{position:absolute;top:50%;left:0;width:100%;transform:translateY(-50%);-webkit-transform:translateY(-50%);z-index:auto;}.card-head-body .head-dynamic-aorb .dynamic-aorb-barcode img{display:block;position:relative;margin:0 auto;width:200px;height:26px;padding:7px 0;}.card-head-body .head-dynamic-aorb .dynamic-aorb-rects{width:60%;padding:16px 10px;text-align:center;}.card-head-body .head-dynamic-aorb .dynamic-aorb-rects .head-dynamic-rect{margin:0 30px;}.card-head-body .head-dynamic-aorb .head-dynamic-rect:first-child{margin-left:0;}.card-head-body .head-dynamic-aorb .head-dynamic-rect:last-child{margin-right:0;}.card-head-part{border:1px solid #000;}.card-head-part:not(:last-child){margin-bottom:10px;}.card-head-normal .head-dynamic-1 .head-dynamic-part{height:100%;}.card-head-narrow .head-stdno{height:138px;}.card-head-narrow .head-stdno .stdno-auto{position:relative;top:50%;margin-top:-40px;}.card-head-handle.card-head-narrow .head-stdno{height:242px;}.card-head-body-auto-resize{margin-left:-5px;margin-right:-5px;overflow:hidden;}.card-head-body-auto-resize.col-item-auto-height .card-head-body-spin{height:auto;}.card-head-body-auto-resize .head-dynamic-2 .head-dynamic-part{height:auto;}.card-head-body-auto-resize .rect-col{padding:5px;}.card-head-body-auto-resize .rect-col:first-child{float:left;width:50%;}.card-head-body-auto-resize .rect-col:last-child{float:right;width:50%;}.card-head-body-auto-resize .rect-col-item{border:1px solid #000;}.card-head-body-auto-resize .rect-col-item:nth-of-type(2){margin-top:10px;}.card-head-body-auto-resize .rect-col-item-none{border:none;margin:0 !important;}.elem-topic-head{text-align:center;}.elem-topic-head .elem-body{padding:0;border:1px solid #000;}.elem-topic-head-pad{padding-top:10px;}.elem-topic-head-empty .elem-body{border-top:none;}.elem-topic-head h3{font-size:16px;height:29px;line-height:28px;border-bottom:1px dotted #000;font-weight:normal;}.elem-topic-head p{font-size:12px;height:22px;line-height:22px;white-space:nowrap;overflow:hidden;}.elem-line-horizontal{height:100%;line-height:30px;}.elem-line-horizontal .line-body{display:inline-block;vertical-align:middle;width:100%;border-bottom:1px solid #000;}.elem-line-vertical{height:100%;text-align:center;}.elem-line-vertical .line-body{display:inline-block;vertical-align:top;height:100%;border-left:1px solid #000;}.elem-lines .line-item{display:inline-block;vertical-align:top;}.elem-rect .rect-body{position:absolute;width:100%;height:100%;top:0;left:0;}.elem-text .text-body{padding:5px;line-height:1.4;}.elem-text .text-body span{white-space:pre-wrap;word-wrap:normal;word-break:break-all;}.elem-text .text-body span.cont-variate{color:#a0a0a0;margin:0 2px;}.elem-barcode{height:100%;border-color:transparent;border-width:1pt;position:relative;}.elem-barcode > img{max-height:100%;max-width:100%;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;}.elem-image{height:100%;border-color:transparent;border-width:1pt;position:relative;}.elem-image > p{position:absolute;width:100%;height:100%;top:0;left:0;display:table;text-align:center;color:#b0b0b0;font-size:30pt;}.elem-image > p i{display:table-cell;vertical-align:middle;}.elem-image > img{max-height:100%;max-width:100%;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;}.elem-grids > table{table-layout:fixed;border-spacing:0;border-collapse:collapse;}.elem-grids > table td{border:1px solid #000;}.elem-grids-halving > table{table-layout:auto;width:100%;}.elem-grids-halving td > div{padding-bottom:100%;}.elem-pane{height:100%;}.elem-fill-question{white-space:normal;}.elem-fill-question-first::before{content:"";position:absolute;right:0;top:0;z-index:99;color:#fff;padding:6px 10px;line-height:1;font-size:18px;border-bottom-left-radius:10px;}.elem-fill-question-first.elem-fill-question-simple::before{content:"单选";background-color:#65d5ad;}.elem-fill-question-first.elem-fill-question-multiply::before{content:"多选";background-color:#617bea;}.elem-fill-question-first.elem-fill-question-boolean::before{content:"判断";background-color:#ffa952;}.elem-fill-question-boolean .option-item:nth-of-type(2) i{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAItJREFUOE/Vk9ERgCAMQ8M+GUInEyfTITKQV065KuDh8SWftHkNAQIGVxjU44cAkhHAAmCVFD8dwYktulnS3g2oiY2SAdZglmq34sS7pNn3JADJCcAGoGggaftWL2qFgzOc3OjEKbCau1sG3uo51TRN8c3BRX+E9SquAlwmU8t2EeLIf+h+B60hw4ADyTE7EWzzfYYAAAAASUVORK5CYII=);background-size:100% 100%;width:10px;height:10px;margin-top:-1px;}.elem-fill-question-boolean .option-item:nth-of-type(3) i{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAIVJREFUOE+tk9sNwCAIRa/7MES7WTerQ7BPGxolCpKmVT+Fe3gnTL40qUcHIKKNmXMEFTsA8TmqjwKK8SyG3YIiewQQjkKMGMysOlcCgJrFAykZdX9tdq6JNprphyttOIUA4sQCXw+YKmEg/tZEIrqapoVjbEe8bpEk8tsqj3zWHtOfy7wB41tXEXo/wKEAAAAASUVORK5CYII=);background-size:100% 100%;width:8px;height:8px;}.elem-fill-question .elem-body{padding:10px 5px;font-size:0;}.elem-fill-question .group-item{font-family:"Times New Roman",Arial,sans-serif;display:inline-block;vertical-align:top;font-size:0;}.elem-fill-question .question-item{font-size:0;}.elem-fill-question .option-item{display:inline-block;vertical-align:middle;padding:0;width:18px;height:10px;text-align:center;font-size:12px;line-height:8px;border:1px solid #000;color:#000;box-sizing:border-box;}.elem-fill-question .option-item > i{display:inline-block;transform:scale(0.67,0.67);-webkit-transform:scale(0.67,0.67);}.elem-fill-question .option-item:first-child{text-align:center;border:none;font-size:12px;line-height:10px;color:#000;}.elem-fill-question .option-item:first-child > i{transform:scale(0.9,0.9);-webkit-transform:scale(0.9,0.9);}.elem-fill-question .option-item:last-child{margin-right:0 !important;}.elem-fill-question-vertical .elem-body{padding:10px 20px;}.elem-fill-question-vertical .question-item{display:inline-block;vertical-align:top;}.elem-fill-question-vertical .question-item:last-child{margin-right:0 !important;}.elem-fill-question-vertical .option-item{display:block;}.elem-fill-question-vertical .option-item:first-child{padding:0;text-align:center;}.elem-fill-question-vertical .option-item:last-child{margin-bottom:0 !important;}.elem-fill-area .option-item{display:inline-block;vertical-align:middle;width:30px;height:16px;border:1px solid #000;}.elem-fill-area .option-item:last-child{margin-right:0 !important;}.elem-fill-area-vertical .option-item{display:block;}.elem-fill-area-vertical .option-item:last-child{margin-bottom:0 !important;}.elem-fill-line{white-space:normal;}.elem-fill-line .elem-body{padding:0 15px 0 10px;font-size:0;}.elem-fill-line .elem-fill-quesiton{display:inline-block;vertical-align:top;position:relative;padding:0 1px;font-size:12px;}.elem-fill-line .elem-fill-quesiton li.elem-fill-line{height:40px;position:relative;margin:0 10px 0 20px;z-index:8;}.elem-fill-line .elem-fill-quesiton li.elem-fill-line::after{content:"";display:block;position:absolute;width:100%;border-bottom:1px solid #000;bottom:8px;}.elem-fill-line .elem-fill-quesiton li.elem-fill-no{position:absolute;top:2px;bottom:2px;left:1px;z-index:9;min-width:20px;text-align:left;background-color:#fff;border:none;}.elem-fill-line .elem-fill-quesiton li.elem-fill-no span{display:block;position:relative;padding-bottom:5px;padding-right:3px;transform:translateY(-100%);-webkit-transform:translateY(-100%);}.elem-fill-line .elem-fill-quesiton li.elem-fill-comma{position:absolute;top:0;right:-10px;z-index:9;transform:translateY(-100%);-webkit-transform:translateY(-100%);width:10px;padding-bottom:4px;background-color:#fff;text-align:center;border:none;}.elem-explain .elem-title{padding-bottom:0;}.elem-explain .elem-body{min-height:60px;position:relative;}.elem-explain .elem-explain-no{position:absolute;left:20px;top:10px;font-size:12px;z-index:9;}.elem-explain .elem-explain-elements{position:absolute;width:100%;height:100%;top:0;left:0;z-index:8;}.elem-explain .elem-explain-element .explain-element-body{position:absolute;}.elem-composition .elem-title{padding-bottom:0;}.elem-composition .elem-body{min-height:60px;position:relative;}.elem-composition-elements{position:absolute;width:100%;height:100%;top:0;left:0;z-index:8;}.elem-composition .elem-composition-element .composition-element-body{position:absolute;overflow:hidden;}.elem-fill-number{border:1px solid #000;}.elem-fill-number .fill-number-rect{font-size:0;height:27px;border-bottom:1px solid #000;}.elem-fill-number .fill-number-number{display:inline-block;vertical-align:top;width:7.692%;height:100%;}.elem-fill-number .fill-number-number:not(:last-child){border-right:1px solid #000;}.elem-fill-number .fill-number-head{height:51px;}.elem-fill-number .fill-number-head > h5{border-bottom:1px solid #000;line-height:24px;font-size:16px;font-weight:bold;text-align:center;}.elem-fill-number .fill-number-body{display:table;width:100%;}.elem-fill-number .fill-number-list{display:table-cell;width:7.692%;padding:1px 0;}.elem-fill-number .fill-number-option{margin:8px auto;width:18px;height:10px;font-size:12px;line-height:8px;text-align:center;color:#000;border:1px solid #000;font-family:"Times New Roman",Arial,sans-serif;}.elem-fill-number .fill-number-option > i{display:inline-block;transform:scale(0.67,0.67);-webkit-transform:scale(0.67,0.67);}.elem-fill-field{white-space:normal;overflow:hidden;}.fill-field-item{display:inline-block;padding:0 10px;width:100%;}.fill-field-content{height:30px;line-height:26px;overflow:hidden;position:relative;}.fill-field-content::after{content:"";display:block;position:absolute;width:100%;border-bottom:1px solid #000;bottom:2px;left:0;z-index:1;}.fill-field-content > span{z-index:2;display:block;position:relative;font-size:14px;}.fill-field-content > span:first-child{float:left;background-color:#fff;text-align:justify;font-size:0px;}.fill-field-content > span:first-child > i{font-size:14px;}.fill-field-content > span:first-child::after{content:"";display:inline-block;width:100%;height:0;line-height:0;}.fill-field-content > span:nth-of-type(2){float:left;width:20px;background-color:#fff;}.fill-field-content > span:last-child{margin-left:80px;height:100%;}.elem-fill-pane{font-size:0;white-space:normal;overflow:hidden;}.elem-fill-pane .fill-pane-item{display:inline-block;vertical-align:top;font-size:14px;}.elem-fill-pane .fill-pane-cont{border:1px solid #000;}.elem-forbid-area{height:100%;position:relative;}.elem-forbid-area .text-body{position:absolute;width:100%;left:0;top:50%;transform:translateY(-50%);-webkit-transform:translateY(-50%);font-size:30px;text-align:center;}.elem-fill-table .table{width:100%;border-spacing:0;border-collapse:collapse;text-align:left;}.elem-fill-table .table td{padding:0;}.elem-undertaking{position:absolute;width:60px;top:60px;bottom:60px;right:10px;font-size:12px;line-height:15px;}.elem-undertaking .para-text{width:15px;text-align:center;position:absolute;top:0;}.elem-undertaking .para-text span{display:inline-block;transform:rotate(90deg);-webkit-transform:rotate(90deg);}.elem-undertaking .para-text em{display:inline-block;margin-left:5px;margin-bottom:5px;height:10px;line-height:10px;}.elem-undertaking .para-title{right:0;top:50%;transform:translateY(-50%);-webkit-transform:translateY(-50%);}.elem-undertaking .para-cl{right:15px;}.elem-undertaking .para-body{right:30px;height:100%;width:30px;}.elem-undertaking .para-body > p{display:block;width:15px;height:100%;float:right;}.elem-undertaking .para-body > p:first-child{padding-top:30px;}.elem-undertaking .para-std{bottom:130px;top:auto;left:0;}.card-free-preview:not(.card-print){padding:10px 0;background-color:#f0f0f0;}.card-free-preview:not(.card-print) .page-box{margin:10px auto;box-shadow:0 0 4px #ddd;}.card-free-preview .page-column-element .element-item{position:absolute;overflow:hidden;}.card-free-preview .page-column-element .element-item::before{display:none;}@media print{.card-preview{padding:0;}.card-preview .page-box{margin:0 auto;box-shadow:none;page-break-after:always;}.card-preview .elem-fill-question-first::before{display:none;}.card-preview .elem-fill-question .option-item,.card-preview .card-print .elem-fill-number .fill-number-option,.card-preview .card-head-body .head-stdno .stdno-fill-option,.card-preview .page-number-rect-list li,.card-preview .card-head-body .head-dynamic-rect{border-width:0.5pt;}.card-preview .elem-fill-question .option-item{line-height:9px;}}`;
  3. export default (domeStr, fonts) => {
  4. const defaultFonts = '"宋体","宋体-简",Arial,sans-serif';
  5. const ff = fonts ? `${fonts},${defaultFonts}` : defaultFonts;
  6. return `
  7. <!DOCTYPE html>
  8. <html lang="zh-cn">
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  11. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  12. <title>知学知考题卡</title>
  13. <style>${resetCss}${previewCss}</style>
  14. <style>
  15. .page-box{font-family:${ff};}
  16. </style>
  17. </head>
  18. <body>${domeStr}</body>
  19. </html>
  20. `;
  21. };