printTpl.js 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. var styleStr = `/*printstyle:start*/@media print {@page {size: "auto";margin: 0mm;}}
  2. html {-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;text-size-adjust: 100%;}body {background-color: #666;color: #333;font: 3.7041666666666666mm Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial, sans-serif;line-height: 1;}* {margin: 0;padding: 0;border: 0;list-style: none;}.fl {float: left;}.fr {float: right;}.clearfix:after {content: "";display: block;clear: both;}.red {color: red;}.printIframeContent {background: #fff;display: -webkit-box;display: -ms-flexbox;display: flex;-ms-flex-wrap: wrap;flex-wrap: wrap;margin: 0 auto;position: relative;}.printIframeContent.previewIframe {margin-bottom: 2.6458333333333335mm;}.printIframeContent.column1 .pageContent {width: 100%;}.printIframeContent.column2 .pageContent {width: 50%;}.printIframeContent.column3 .pageContent {width: 33.33%;}.pageContent {position: relative;}
  3. .hasBindingLine .pageContent .dtk-content {padding-left: 13.229166666666666mm;}/* .hasBindingLine .pageContent .dtk-content {padding-left: 13.229166666666666mm;padding-right: 13.229166666666666mm;} *//* .hasBindingLine:first-child .pageContent:first-child .dtk-content {padding-left: 13.229166666666666mm;}.hasBindingLine:nth-child(2) .pageContent:nth-child(2) .dtk-content {padding-right: 13.229166666666666mm;} */.printIframeContent .pageContent {position: relative;background: #fff;}.printIframeContent .pageContent .forbiddenArea {position: absolute;display: flex;align-items: center;justify-content: center;width: calc(100% - 15.875mm);height: calc(100% - 26.458333333333332mm);top: 13.229166666666666mm;right: 7.9375mm;border: 0.2645833333333333mm solid #ddd;box-sizing: border-box;border-radius: 1.0583333333333331mm;}
  4. .pageContent .pageLabel {position: absolute;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;bottom: 1.3229166666666667mm;left: 50%;-webkit-transform: translateX(-50%);transform: translateX(-50%);color: #999;}.pageContent .pageLabel .item {width: 22.489583333333332mm;height: 5.820833333333333mm;font-size: 3.175mm;text-align: center;line-height: 5.820833333333333mm;}.pageContent .bindingLine {position: absolute;top: 0;left: 0;height: 100%;width: 10.054166666666665mm;border-right: 0.5291666666666666mm dashed #bbb;display: none;}
  5. .pageContent .bindingLine img {position: absolute;width: 0.5291666666666666mm;height: 100%;right: 0;top: 50%;margin-top: -148.16666666666666mm;}.pageContent .bindingLine .line {position: absolute;right: -2.1166666666666663mm;width: 4.2333333333333325mm;height: 100%;display: flex;flex-direction: column;justify-content: space-around;}.pageContent .bindingLine.left,.pageContent .bindingLine.right {display: block;width: 5.291666666666667mm;border: 0;}.pageContent .bindingLine.right{left: auto;right: 0;border-left: 0.5291666666666666mm dashed #bbb;}.pageContent .bindingLine.left {left: 0;border-right: 0.5291666666666666mm dashed #bbb;}.pageContent .bindingLine.right .line {left: -2.1166666666666663mm;}.pageContent .bindingLine.left .line {right: -2.1166666666666663mm;}.pageContent .bindingLine .line span {display: block;font-size: 3.175mm;color: #999;transform: rotate(-90deg);-webkit-transform: rotate(-90deg);/* Firefox */-moz-transform: rotate(-90deg);}.pageContent .bindingLine .examineeInfo {position: absolute;display: flex;justify-content: space-around;flex-direction: column;height: 100%;width: 10.583333333333334mm;top: 50%;transform: translateY(-50%);transform: translateY(-50%);left: 0;}.pageContent .bindingLine .examineeInfo .item {height: 71.4375mm;font-style: normal;}.pageContent .bindingLine .examineeInfo .item em {display: block;width: 3.7041666666666666mm;margin-left: 2.6458333333333335mm;font-size: 3.7041666666666666mm;font-style: normal;}.pageContent .bindingLine .examineeInfo .item em i {display: block;font-size: 3.7041666666666666mm;font-style: normal;transform: rotate(-90deg);-webkit-transform: rotate(-90deg);-ms-transform: rotate(-90deg);-o-transform: rotate(-90deg);-moz-transform: rotate(-90deg);}.pageContent .bindingLine .examineeInfo .item span {display: flex;flex-direction: column-reverse;justify-content: center;align-items: center;position: relative;width: 5.291666666666667mm;height: 52.916666666666664mm;margin-left: 2.6458333333333335mm;border-right: 0.5291666666666666mm solid #333;}.pageContent .bindingLine .examineeInfo .item span b {transform: rotate(-90deg);}.pageContent .bindingLine .examineeInfo .item span .red {font-weight: normal;}.dtk-content {padding: 13.229166666666666mm 7.9375mm;}.dtk-content .dtkName {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;height: 14.552083333333332mm;font-size: 4.762499999999999mm;margin-bottom: 2.6458333333333335mm;text-align: center;}.dtk-content .dtkName textarea {display: block;width: 100%;height: 14.552083333333332mm;text-align: center;resize: none;outline: none;font-size: 4.762499999999999mm;box-sizing: border-box;-webkit-box-sizing: border-box;border: 0.2645833333333333mm solid #bbbbbb;}.dtk-content .examineeInfo {display: flex;height: 5.820833333333333mm;margin-bottom: 2.645833333333333mm;}.dtk-content .examineeInfo .item {display: flex;flex: 1;padding: 0 3.96875mm;font-style: normal;}.dtk-content .examineeInfo .item em {height: 5.820833333333333mm;line-height: 5.820833333333333mm;color: #333;font-style: normal;font-size: 4.2333333333333325mm;}.dtk-content .examineeInfo .item span {flex: 1;height: 5.291666666666667mm;border-bottom: 0.5291666666666666mm solid #bbbbbb;display: flex;justify-content: center;}.dtk-content .examineeInfo .item span .red {font-weight: normal;}.dtk-content .examInfo {display: flex;height: 13.229166666666666mm;justify-content: space-around;align-items: center;}.dtk-content .examInfo span {font-size: 3.7041666666666666mm;color: #333;line-height: 13.229166666666666mm;text-align: center;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;flex: 1;}.dtk-content .examInfo span:nth-child(1){min-width: 29.104166666666664mm;}.dtk-content .examInfo span:nth-child(2){min-width: 29.104166666666664mm;}.dtk-content .examInfo .input-examInfo{width: 100px;background: #fff;}
  6. .dtk-content .examInfo .input-examInfo.time , .dtk-content .examInfo .input-examInfo.fraction {width: 25px;}.dtk-content .noticeInfo {position: relative;display: flex;align-items: center;border: 0.5291666666666666mm solid #bbbbbb;border-radius: 1.0583333333333331mm;font-size: 3.175mm;flex-wrap: wrap;margin-bottom: 5.291666666666667mm;height: 31.75mm;}.pageContent.smallLayout .dtk-content .noticeInfo {height: 37.041666666666664mm;}.pageContent.smallLayout .dtk-content .noticeInfo .tipsInfo {width: 66.14583333333333mm;}.pageContent.smallLayout .dtk-content .noticeInfo .simpleBorder.right {left: 87.3125mm;}.pageContent.smallLayout .dtk-content .noticeInfo .noticeEwm {width: 21.166666666666668mm;}.pageContent.smallLayout .ticketNumber{flex-direction: column;}
  7. .pageContent .dtk-content .noticeInfo .noticeEwm {position: relative;}.pageContent .dtk-content .noticeInfo .noticeEwm .cover {position: absolute;width: 21.166666666666668mm;height: 21.166666666666668mm;top: 50%;left: 50%;transform: translate(-50%, -50%);display: flex;align-items: center;justify-content: center;background: #fff;font-style: normal;text-align: center;border: 0.2645833333333333mm dashed #bbb;display: none;z-index: 10;}.pageContent.smallLayout .dtk-content .noticeInfo .noticeEwm .dtkEwm {width: 18.520833333333332mm;height: 18.520833333333332mm;}.dtk-content .noticeInfo .tipsInfo {display: flex;position: relative;width: 100.54166666666667mm;}.dtk-content .noticeInfo .warmingInfo {display: flex;flex: 1;}
  8. .dtk-content .noticeInfo .simpleBorder {position: absolute;height: 100%;width: 0.5291666666666666mm;background: #bbb;left: 7.9375mm;top: 0;}.dtk-content .noticeInfo .simpleBorder.right {left: 124.35416666666666mm;}.dtk-content .noticeInfo .noticeTitle {width: 7.9375mm;display: flex;flex-direction: column;justify-content: space-around;font-size: 3.7041666666666666mm;align-items: center;font-weight: bold;}.dtk-content .noticeInfo .noticeTitle i {font-style: normal;}.dtk-content .noticeInfo .noticeDetail {flex: 1;padding: 1.3229166666666667mm;padding-right: 0;line-height: 4.2333333333333325mm;color: #333;border-right: 0.5291666666666666mm solid #bbb;}.dtk-content .noticeInfo .noticeDetail p {line-height: 4.2333333333333325mm;}.dtk-content .noticeInfo .noticeEwm {width: 23.8125mm;display: flex;justify-content: center;align-items: center;}.dtk-content .noticeInfo .noticeEwm .dtkEwm {position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);-webkit-transform: translate(-50%, -50%);width: 21.166666666666668mm;height: 21.166666666666668mm;}.dtk-content .noticeInfo .noticeEwm .dtkEwm canvas {width: 100%;height: 100%;}.dtk-content .noticeInfo .noticeLose {flex: 1;padding: 1.3229166666666667mm;box-sizing: border-box;}.dtk-content .noticeInfo .noticeLose p {line-height: 4.2333333333333325mm;}.dtk-content .noticeInfo .noticeLose h4 {display: flex;align-items: center;font-weight: normal;}.dtk-content .noticeInfo .noticeLose h4 i {width: 5.291666666666667mm;height: 2.6458333333333335mm;margin-left: 2.6458333333333335mm;border: 0.5291666666666666mm solid #bbb;}.dtk-content .examNumberLayout.useqrcode .examNumber {display: none !important;}.dtk-content .examNumber {display: flex;justify-content: space-between;align-items: center;margin-bottom: 2.6458333333333335mm;}.dtk-content .examNumber.examNumberForQrCode {display: none;}.dtk-content .examNumber.examNumberForQrCode .ticketNumber {display: flex;height: auto;align-items: center;font-size: 3.7041666666666666mm;}.dtk-content .examNumber.examNumberForQrCode .ticketNumber em {font-style: normal;}.dtk-content .examNumber.examNumberForQrCode .ticketNumber p {display: flex;border: 0.5291666666666666mm solid #bbb;}.dtk-content .examNumber.examNumberForQrCode .ticketNumber p span {width: 5.291666666666667mm;height: 5.291666666666667mm;border-right: 0.5291666666666666mm solid #bbb;}.dtk-content .examNumber.examNumberForQrCode .ticketNumber p span:last-child {border: none;}/* .dtk-content .examNumber .ticketNumber{height: 58.20833333333333mm;} */.dtk-content .examNumber .numberCol {position: relative;/* width: 5.291666666666667mm; */font-size: 3.175mm;text-align: center;}.dtk-content .examNumber .numberCol:last-child {border: 0;}/* //第一列 左边框//第一行 上边框 下边框//最后一行 下边框 */.dtk-content .examNumber .numberCol span {position: relative;display: flex;align-items: center;justify-content: center;width: 5.291666666666667mm;height: 5.291666666666667mm;border-right: 0.2645833333333333mm solid #bbbbbb;}/* 第一行 */.dtk-content .examNumber .numberCol span:nth-child(1) {border-top: 0.2645833333333333mm solid #bbbbbb;border-bottom: 0.2645833333333333mm solid #bbbbbb;}/* 最后一行 */.dtk-content .examNumber .numberCol span:last-child {border-bottom: 0.2645833333333333mm solid #bbbbbb;}/* 第一列 */.dtk-content .examNumber .numberCol:nth-child(1) span {border-left: 0.2645833333333333mm solid #bbbbbb;}.dtk-content .examNumber .numberCol span i {width: 3.96875mm;height: 3.175mm;font-style: normal;line-height: 3.175mm;text-align: center;font-size: 3.175mm;display: flex;align-items: center;justify-content: center;}.dtk-content .examNumber .numberCol span i b{font-weight: normal;padding: 0 0.396875mm;font-size: 2.6458333333333335mm;color: #777;}.dtk-content .examNumber .barCode {padding: 2.6458333333333335mm;border: 0.2645833333333333mm dashed #bbb;border-radius: 0.79375mm;}.dtk-content .examNumber.examNumberForQrCode .barCode {padding: 10px;}.dtk-content .examNumber.examNumberForQrCode .barCode .codeImg {width: 52.916666666666664mm;height: 26.458333333333332mm;}.dtk-content .examNumber.examNumberForQrCode .barCode .codeImg .barCodeTip {flex-direction: row;}.dtk-content .examNumber .barCode .codeImg {position: relative;width: 26.458333333333332mm;height: 52.916666666666664mm;border: 0.5291666666666666mm solid #bbb;border-radius: 0.79375mm;}.dtk-content .examNumber .barCode .codeImg .barCodeTip {position: absolute;width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: space-around;color: #bbb;}.dtk-content .examNumber .barCode .codeImg .barCodeTip i {font-style: normal;}.dtk-content .examNumber .barCode .codeImg img {position: absolute;height: 100%;width: 100%;}.dtk-content h3 {font-family: 'SimSun';font-size: 3.7041666666666666mm;color: #333;line-height: 7.9375mm;}.dtk-content h3 span {font-size: 3.175mm;font-weight: normal;}.dtk-content .objectiveItem{
  9. font-size: 3.7041666666666666mm;}.dtk-content .objectiveItem p{padding:1.3229166666666667mm 0;}.dtk-content .objectiveItem img{max-width: 100%;}/* .dtk-content .objectiveItem .optionObjectiveWrap{display: flex;flex-wrap: wrap;} */.dtk-content .objectiveItem .optionObjectiveWrap .optionItemObjective{width: 100%;}.dtk-content .objectiveItem .optionObjectiveWrap.column-2 .optionItemObjective{width: 50%;}.dtk-content .objectiveItem .optionObjectiveWrap.column-4 .optionItemObjective{width: 25%;}
  10. /* .dtk-content .objectiveItem .optionItemObjective{display: flex;align-items: center;} */.dtk-content .objectiveItem p{display:inline-block;vertical-align: middle;}.dtk-content .objectiveItem span{display: inline-block;padding-right: 1.3229166666666667mm;vertical-align: middle;}.dtk-content .objectiveItem p:nth-child(2){display: inline-block;vertical-align: middle;}
  11. .dtk-content .completion-topic .module {padding: 0 2.6458333333333335mm 2.6458333333333335mm;}.dtk-content .module {position: relative;padding: 2.6458333333333335mm;font-size: 3.175mm;border: 0.5291666666666666mm solid #bbbbbb;border-radius: 1.0583333333333331mm;-webkit-border-radius: 1.0583333333333331mm;}.dtk-content .objectiveModule .module{padding: 0;border: 0;position: static;}.dtk-content .short-answer .module img{max-width: 100%;}.dtk-content .short-answer .module .customImg {position: absolute;max-width: calc(100% - 5.820833333333333mm);max-height: calc(100% - 7.9375mm);}.dtk-content h3 .originSubjectInfo{font-weight: normal;}.dtk-content h3 .originSubjectInfo .questionItemBody{display: flex;}.dtk-content h3 .originSubjectInfo .questionItemBody b{font-weight: normal;}.dtk-content .short-answer .module {padding: 10.583333333333334mm 2.6458333333333335mm 2.6458333333333335mm;margin: 2.6458333333333335mm 0;}.dtk-content .short-answer .module.pdt10 {padding-top: 2.6458333333333335mm;}.dtk-content .short-answer .module .selTopic {position: absolute;height: 3.96875mm;right: 2.6458333333333335mm;}.dtk-content .short-answer .module .selTopic span {width: 10.583333333333334mm;height: 3.96875mm;margin: 0 2.6458333333333335mm;line-height: 3.96875mm;text-align: center;-webkit-box-sizing: border-box;box-sizing: border-box;}.dtk-content .module .scortColumn {position: absolute;top: 0;left: 0;width: 100%;display: flex;border-bottom: 0.2645833333333333mm solid #bbb;font-size: 2.645833333333333mm;}
  12. .dtk-content .module .scortColumn span {float: left;position: relative;height: 7.9375mm;text-align: center;line-height: 7.9375mm;flex: 1;border-right: 0.2645833333333333mm solid #bbb;}.dtk-content .module .scortColumn span:last-child {border-right: 0;}.dtk-content .module .editorQuestionNum{float: left;}.single-select {position: relative;}.single-select.horizontal .single-option {flex-direction: column;}.single-select.horizontal .single-option li {flex-direction: row;}.singleContent.module {position: relative;padding: 0;display: flex;flex-wrap: wrap;}.single-option {position: relative;padding: 2.6458333333333335mm;display: flex;font-size: 3.175mm;flex-direction: row;flex-wrap: wrap;align-content: flex-start;}/* .single-option.more-option{width: 55.5625mm;} */.single-option li {display: flex;align-items: center;flex-direction: column;}.single-option li em,.single-option li span {display: flex;width: 3.96875mm;height: 3.175mm;text-align: center;line-height: 3.175mm;margin: 0.79375mm 1.3229166666666667mm;font-style: normal;align-items: center;justify-content: center;}.single-option li span i{font-style: normal;padding: 0 0.5291666666666666mm;color: #777;font-size: 2.6458333333333335mm;}.single-option li em {margin: 0.79375mm 0;}.short-answer textarea {width: 100%;resize: vertical;outline: none;}.subjectCol {width: 100%;line-height: 10.583333333333334mm;}
  13. .subjectCol.rowLineHeight-25 .subjectItem em {height: 6.614583333333333mm;}.subjectCol.rowLineHeight-30 .subjectItem em {height: 7.9375mm;}.subjectCol.rowLineHeight-35 .subjectItem em {height: 9.260416666666666mm;}.subjectCol.rowLineHeight-40 .subjectItem em {height: 10.583333333333334mm;}.subjectCol.rowLineHeight-45 .subjectItem em {height: 11.90625mm;}.subjectCol.rowLineHeight-50 .subjectItem em {height: 13.229166666666666mm;}.subjectCol.rowLineHeight-25 {line-height: 6.614583333333333mm;}.subjectCol.rowLineHeight-30 {line-height: 7.9375mm;}.subjectCol.rowLineHeight-35 {line-height: 9.260416666666666mm;}.subjectCol.rowLineHeight-40 {line-height: 10.583333333333334mm;}.subjectCol.rowLineHeight-45 {line-height: 11.90625mm;}.subjectCol.rowLineHeight-50 {line-height: 13.229166666666666mm;}.subjectCol.col-1 .subjectItem {width: 100%;}.subjectCol.col-2 .subjectItem {width: calc(50% - 2.6458333333333335mm);}.subjectCol.col-3 .subjectItem {width: calc(33% - 2.6458333333333335mm);}.subjectCol .subjectItem {float: left;align-items: flex-end;padding-right: 2.6458333333333335mm;padding-top: 2.6458333333333335mm;width: 100%;display: flex;}
  14. .subjectCol .subjectItem span {display: flex;width: 6.614583333333333mm;align-items: flex-end;text-align: center;line-height: 6.614583333333333mm;}.subjectCol .subjectItem em {position: relative;height: 10.583333333333334mm;flex: 1;border-bottom: 0.2645833333333333mm solid #bbbbbb;}.subjectCol .subjectItem strong {display: flex;align-items: flex-end;}.subjectCol .subjectItem strong i {width: 6.614583333333333mm;height: 6.614583333333333mm;font-style: normal;text-align: center;line-height: 6.614583333333333mm;border: 0.2645833333333333mm solid #bbb;font-weight: normal;color: #999;}.scan-dot {position: absolute;height: 5.291666666666667mm;top: 5.291666666666667mm;left: 7.9375mm;width: calc(100% - 15.875mm);}.printIframeContent.hasBindingLine .scan-dot {width: calc(100% - 21.166666666666668mm);left: 13.229166666666666mm;}.scan-dot.bot {top: auto;bottom: 5.291666666666667mm;}.scan-dot span {position: absolute;width: 10.583333333333334mm;height: 5.291666666666667mm;left: 0;top: 0;background: #000;}.scan-dot span.center1 {right: auto;left: 40%;}.scan-dot span.center2 {left: auto;right: 40%;}.scan-dot span.right {left: auto;right: 0;}.module table {margin: 2.6458333333333335mm 0;line-height: 1.5;}.module table {border-top: 0.2645833333333333mm solid #ccc;border-left: 0.2645833333333333mm solid #ccc;}.module table td,.module table th {border-bottom: 0.2645833333333333mm solid #ccc;border-right: 0.2645833333333333mm solid #ccc;padding: 0.79375mm 1.3229166666666667mm;}.module .composition-column {position: relative;display: flex;margin-top: 2.6458333333333335mm;border-bottom: 0.2645833333333333mm solid #333;border-top: 0.2645833333333333mm solid #333;}.module .composition-column.en {margin-top: 8.73125mm;border-bottom: 0;}.module .composition-column.en:after,.module .composition-column.en:before {display: none;}.module .composition-column span {position: relative;flex: 1;height: 7.9375mm;border-right: 0.2645833333333333mm solid #333;}.module .composition-column span:nth-child(1) {border-left: 0.2645833333333333mm solid #333;}.module .composition-column span b {position: absolute;font-size: 2.6458333333333335mm;left: 50%;transform: translateX(-50%);bottom: -3.4395833333333328mm;}.module .composition-column:after,.module .composition-column:before {position: absolute;content: "';height: 3.175mm;top: 7.9375mm;right: 0;width: 0.2645833333333333mm;background: #333;}.module div[class~='composition-column']:last-of-type:after,.module div[class~='composition-column']:last-of-type:before {width: 0;}.module .composition-column:before {left: 0;} .answerModule .delTopicBtn {display: none;}/*printstyle:end*/;`
  15. var PRINT_TPL = {
  16. examInfoTpl:
  17. '<span>时间:{wpTimes}分钟</span>\
  18. <span>满分:{fullScore}分</span>\
  19. <span>命卷人:{wpAuthor}</span>\
  20. <span>审核人:{wpReviewer}</span>\
  21. <div class="btn-examInfo"></div>',
  22. //用于打印pdf的html
  23. htmlSkeleton:
  24. '<!DOCTYPE html>\
  25. <html lang="en">\
  26. <head>\
  27. <meta charset="UTF-8">\
  28. <meta name="viewport" content="width=device-width, initial-scale=1.0">\
  29. <meta http-equiv="X-UA-Compatible" content="ie=edge">\
  30. <title>Document</title>\
  31. <style>' +
  32. styleStr +
  33. '</style>\
  34. </head>\
  35. <body>',
  36. //准考证区域
  37. examNumberItemTpl:
  38. '<li class="numberCol fl">\
  39. <span></span>\
  40. <span>\
  41. <i>[<b>0</b>]</i>\
  42. </span>\
  43. <span>\
  44. <i>[<b>1</b>]</i>\
  45. </span>\
  46. <span>\
  47. <i>[<b>2</b>]</i>\
  48. </span>\
  49. <span>\
  50. <i>[<b>3</b>]</i>\
  51. </span>\
  52. <span>\
  53. <i>[<b>4</b>]</i>\
  54. </span>\
  55. <span>\
  56. <i>[<b>5</b>]</i>\
  57. </span>\
  58. <span>\
  59. <i>[<b>6</b>]</i>\
  60. </span>\
  61. <span>\
  62. <i>[<b>7</b>]</i>\
  63. </span>\
  64. <span>\
  65. <i>[<b>8</b>]</i>\
  66. </span>\
  67. <span>\
  68. <i>[<b>9</b>]</i>\
  69. </span>\
  70. </li>',
  71. moduleTitleTpl: '<h3 contenteditable="true" id="h3_title">{title}</h3>',
  72. //系统默认提示
  73. systemClassNoticeInfoTpl:'<b class="red">系统自动生成班级信息</b>',
  74. systemNameNoticeInfoTpl:'<b class="red">系统自动生成姓名信息</b>',
  75. systemClassNoticeInfoForLineTpl:'<b class="red">系</b><b class="red">统</b><b class="red">生</b><b class="red">成</b><b class="red">班</b><b class="red">级</b><b class="red">信</b><b class="red">息</b>',
  76. systemNameNoticeInfoForLineTpl:'<b class="red">系</b><b class="red">统</b><b class="red">生</b><b class="red">成</b><b class="red">姓</b><b class="red">名</b><b class="red">信</b><b class="red">息</b>',
  77. moduleTitleContentTpl:'本大题共{subjectCount}小题,每小题{subjectPoint}分,共{totalPoint}分',
  78. //选择题模板
  79. selectTpl:
  80. '<div class="single-select answerModule {moduleType} clearfix {direction}" data-type="{moduleType}" data-modelId="{modelId}" data-direction="{direction}">\
  81. {title}\
  82. <div class="singleContent module clearfix">\
  83. {settingBtn}\
  84. <div class="delTopicBtn" data-type="{moduleType}">X</div>\
  85. {selectContent}</div></div>',
  86. settingBtnTpl:'<div class="settingBtn" data-type="{moduleType}"></div>',
  87. selectContentTpl:'<div class="singleContent module clearfix">\
  88. <div class="settingBtn" data-type="{moduleType}"></div>\
  89. <div class="delTopicBtn" data-type="{moduleType}">X</div>\
  90. {selectContent}</div>',
  91. selectAnswerTpl:'<div class="single-select {moduleType} answerModule clearfix {direction}" data-type="{moduleType}" data-modelId="{modelId}" data-direction="{direction}">{editModule}</div>',
  92. //单选题moduletpl
  93. selectSubjectModuleTpl:
  94. '<div class="singleContent module clearfix">{moduleHtml}</div>',
  95. singleSelectOptionTpl:
  96. '<li class="clearfix" title-number="{questionNum}" data-answer="{answer}">\
  97. <em>{alias}</em>\
  98. {singleContent}\
  99. </li>',
  100. //填空题模块
  101. fillInBlankTpl:
  102. '<div class="completion-topic answerModule" data-type="fillInBlank" data-modelId="{modelId}">\
  103. {title}\
  104. <div class="module">\
  105. <div class="settingBtn" data-type="fillInBlank"></div>\
  106. <div class="delTopicBtn" data-type="fillInBlank">X</div>\
  107. <div class="subjectCol col-{columns} clearfix rowLineHeight-{rowLineHeight}" data-column="{columns}" data-rowLineHeight="{rowLineHeight}" data-scoreStyle="{scoreStyle}" id="fillInBlank">\
  108. {fillInBlankContent}\
  109. </div>\
  110. </div>\
  111. </div>',
  112. fillInBlankItemTpl:
  113. '<div class="subjectItem clearfix" title-number="{questionNum}" data-fullScore="{fullScore}">\
  114. <span>{alias}、</span>\
  115. <em></em>\
  116. <strong>{scoreHtml}</strong>\
  117. </div>',
  118. //解答题模块
  119. shortAnswerTpl:
  120. '<div class="short-answer answerModule" data-type="answer" id="shortAnswerModule" data-modelId="{modelId}">\
  121. <h3 contenteditable="true">{title}</h3>\
  122. {shortAnswerContent}\
  123. </div>',
  124. shortAnswerItemTpl:
  125. '<div class="module" data-cutId="{questionNum}" data-editorIndex="{topicEditorIndex}" title-number="{questionNum}" scorelimit="{scoreLimit}" data-fullScore="{fullScore}">\
  126. <div class="dragBtn"></div>\
  127. <div class="settingBtn" data-type="shortAnswer"></div>\
  128. <div class="delTopicBtn" data-type="shortAnswer">X</div>\
  129. <div class="scortColumn clearfix col-16">\
  130. {scoreColumnHtml}\
  131. </div>\
  132. <div id="toolbar{topicEditorIndex}" class="toolbar"></div>\
  133. <div id="editorContent{topicEditorIndex}" class="editorContent">\
  134. <div class="editorQuestionNum">{alias}、</div>\
  135. </div>\
  136. </div>',
  137. //选做题模块
  138. chooseAnswerTpl:
  139. '<div class="short-answer answerModule" data-type="chooseAnswer" data-modelId="{modelId}" id="chooseAnswerModule">\
  140. <h3 contenteditable="true">{title}</h3>\
  141. {chooseAnswerContent}\
  142. </div>',
  143. chooseAnswerItemTpl:
  144. '<div class="module" data-cutId="{questionNum}" data-editorIndex="{questionNum}" title-number="{titleNumber}" scorelimit="{scoreLimit}" data-fullScore="{fullScore}">\
  145. <div class="dragBtn"></div>\
  146. <div class="settingBtn" data-type="shortAnswer"></div>\
  147. <div class="delTopicBtn" data-type="chooseAnswer">X</div>\
  148. <div class="selTopic">{selOptionHtml}</div>\
  149. <div class="scortColumn clearfix col-16">\
  150. {scoreColumnHtml}\
  151. </div>\
  152. <div id="toolbar{questionNum}" class="toolbar"></div>\
  153. <div id="editorContent{questionNum}" class="editorContent">\
  154. <div class="editorQuestionNum">{questionNumShow}、</div>\
  155. </div>\
  156. </div>',
  157. printPageStyle:
  158. '<style id="pageSizeStyle">\
  159. .printcontent{width:{pageWidth}px;}\
  160. .pageContent{height:{pageHeight}px;}\
  161. </style>',
  162. pageLabelTpl:'<div class="number item">第{currentPage}页 共<b class="totalPage">{totalPage}</b>页</div>\
  163. <div class="size item">\
  164. <div class="itemContent">\
  165. 第{currentPaper}张纸<b class="currentPaperPage">{currentPaperPage}</b>\
  166. </div>',
  167. pageModuleTpl:
  168. '<div class="pageContent" style="page-break-after:always;">\
  169. <div class="dtk-content">{subjectModule}</div>\
  170. <div class="pageLabel">\
  171. <div class="number item">第{currentPage}页 共<b class="totalPage">{totalPage}</b>页</div>\
  172. <div class="size item">\
  173. <div class="itemContent">\
  174. 第{currentPaper}张纸<b class="currentPaperPage">{currentPaperPage}</b>\
  175. </div>\
  176. </div>\
  177. </div>\
  178. </div>',
  179. //大题
  180. answerModuleTpl:
  181. '<div class="short-answer answerModule" data-type="{moduleType}" data-modelId="{modelId}">\
  182. {editModule}\
  183. </div>',
  184. //装订线
  185. bindLineTpl:'<div class="bindingLine {pos}">\
  186. <div class="line">\
  187. <span>线</span>\
  188. <span>订</span>\
  189. <span>装</span>\
  190. </div>\
  191. </div>',
  192. //禁止作答提示
  193. forbiddenAreaTpl:'<div class="dtk-content"><div class="forbiddenArea">此区域禁止作答</div></div>',
  194. fillInBlankSettingBtnTpl:
  195. '<div class="settingBtn" data-type="fillInBlank"></div>',
  196. fillInBlankContentTpl:
  197. '<div class="module">\
  198. {settingBtn}\
  199. <div class="subjectCol col-{columns} clearfix rowLineHeight-{rowLineHeight}" data-column="{columns}" data-scoreStyle="{scoreStyle}" data-rowLineHeight="{rowLineHeight}">{addFillInBlankHtml}</div>\
  200. </div>',
  201. answerModulForFillInBlankTpl:
  202. '<div class="completion-topic answerModule" data-type="{moduleType}" data-modelId="{modelId}">\
  203. {editModule}\
  204. </div>',
  205. moduleTpl:
  206. '<div class="module" title-number="{titleNumber}" data-cutId="{moduleIndex}" data-editorIndex="{moduleIndex}">\
  207. {moduleHtml}</div>',
  208. //小题
  209. overModuleTpl:
  210. '<div class="module pdt10" isSurplus title-number="{titleNumber}" data-linkparm="{linkparm}" data-cutId="{cutId}" data-editorIndex="{overIndex}"><div class="dragBtn"></div><div class="delBtn"></div>\
  211. <div id="toolbar{overIndex}" class="toolbar"></div>\
  212. <div id="editorContent{overIndex}" class="editorContent" style="height:{editorContentHeight}px;">\
  213. </div></div>',
  214. flexibleIconTpl:'<div class="flexible_icon"><i class="resize_nwse"></i></div>',
  215. scanDotPaper1:
  216. '<div class="scan-dot">\
  217. <span data-option="bl" class=""></span>\
  218. <span data-option="bl" class="center1"></span>\
  219. <span data-option="br" class="right"></span>\
  220. </div>\
  221. <div class="scan-dot bot">\
  222. <span data-option="bl" class="left"></span>\
  223. <span data-option="br" class="right"></span>\
  224. </div>',
  225. scanDotPaper2:
  226. '<div class="scan-dot">\
  227. <span data-option="bl" class=""></span>\
  228. <span data-option="bl" class="center2"></span>\
  229. <span data-option="br" class="right"></span>\
  230. </div>\
  231. <div class="scan-dot bot">\
  232. <span data-option="bl" class="left"></span>\
  233. <span data-option="br" class="right"></span>\
  234. </div>',
  235. //打印的模版
  236. printIframeContentTpl:
  237. '{linkSrc}<div class="printIframeContent column{columns} {bindingLine} {previewClass}" style="width:{widthMm}mm;" id="printIframeContent">{printHtml}</div>{scriptSrc}',
  238. // 选择题设置选项
  239. selectSetTpl:
  240. '<div class="formItem">\
  241. <em>选择排列方向:</em>\
  242. <div class="h_radioBox" id="selectDirection">\
  243. <div class="h_radioItem {verticalChecked}" data-value="vertical">\
  244. <i></i><em>横向</em>\
  245. </div>\
  246. <div class="h_radioItem {horizontalChecked}" data-value="horizontal">\
  247. <i></i><em>纵向</em>\
  248. </div>\
  249. </div>\
  250. </div>',
  251. //填空题设置选项
  252. fillInBlankSetTpl:
  253. '<div class="formItem">\
  254. <em>每行列数:</em>\
  255. <select id="fillInBlankColumn">\
  256. <option value="1" {columnOneSelected}>1</option>\
  257. <option value="2" {columnTwoSelected}>2</option>\
  258. <option value="3" {columnThreeSelected}>3</option>\
  259. </select>\
  260. </div>\
  261. <div class="formItem">\
  262. <em>行间距:</em>\
  263. <select id="fillInBlankLineHeight">\
  264. <option {rowLineOneSelected} value="25">25px</option>\
  265. <option {rowLineTwoSelected} value="30">30px</option>\
  266. <option {rowLineThreeSelected} value="35">35px</option>\
  267. <option {rowLineFourSelected} value="40">40px</option>\
  268. <option {rowLineFiveSelected} value="45">45px</option>\
  269. <option {rowLineSixSelected} value="50">50px</option>\
  270. </select>\
  271. </div>\
  272. <div class="formItem">\
  273. <em>手写打分:</em>\
  274. <select id="scoringBox">\
  275. <option value="">空白方框</option>\
  276. <option {scoreOneSelected} {max4disabled} value="2/3/5">2/3/5</option>\
  277. <option {scoreTwoSelected} {max6disabled} value="2/3/4/6">2/3/4/6</option>\
  278. <option {scoreThreeSelected} {max4disabled} value="2/4">2/4</option>\
  279. </select>\
  280. </div>',
  281. //解答题设置选项
  282. shortAnswerOptionTpl:
  283. '<div class="formItem">\
  284. <em>分值上限:</em>\
  285. <select id="scoreLimit">\
  286. <option value="15" {limit15selected} {disabled15}>上限15分</option>\
  287. <option value="16" {limit16selected} {disabled16}>上限16分</option>\
  288. <option value="29" {limit29selected} {disabled29}>上限29分</option>\
  289. <option value="49" {limit49selected} {disabled49}>上限49分</option>\
  290. </select>\
  291. </div>\
  292. <div class="formItem">\
  293. <em></em>\
  294. <p class="halfPoint"><input {isAddHalfChecked} type="checkbox" id="isAddHalf" />\
  295. <b>加入0.5分</b></p>\
  296. </div>',
  297. objectiveWrapTpl:'<div class="objectiveModule answerModule" data-type="objective">{editModule}</div>',
  298. objectiveItemTpl:'<div class="objectiveItem" contenteditable="true">{content}{options}</div>'
  299. }