zhangjie hace 3 años
padre
commit
70be283e40

+ 1493 - 1490
card/assets/styles/card-preview.scss

@@ -1,1490 +1,1493 @@
-// card-preview
-.card-preview {
-  padding: 10px 0;
-  background-color: #f0f0f0;
-  color: #000;
-  .page-box {
-    margin: 10px auto;
-    box-shadow: 0 0 4px #ddd;
-  }
-}
-.card-print {
-  padding: 0;
-
-  .page-box {
-    margin: 0 auto;
-    box-shadow: none;
-    page-break-after: always;
-  }
-  // 印刷模式:隐藏客观题强调标记
-  .elem-fill-question-first {
-    &::before {
-      display: none;
-    }
-  }
-}
-
-// page-box
-.page-box {
-  position: relative;
-  background: #fff;
-  margin: 0 auto;
-  font-weight: normal;
-
-  .page-main {
-    height: 100%;
-    position: relative;
-    white-space: nowrap;
-    margin: 0 -10px;
-
-    &-2 {
-      .page-column {
-        width: 50%;
-      }
-    }
-    &-3 {
-      .page-column {
-        width: 33.33%;
-      }
-    }
-    &-4 {
-      .page-column {
-        width: 25%;
-      }
-    }
-  }
-
-  &-A3 {
-    width: 1586px;
-    height: 1122px;
-
-    .page-main {
-      &-inner {
-        padding: 60px 80px 86px;
-      }
-
-      &-1 {
-        .page-column-forbid-area {
-          &::before {
-            width: 2000px;
-            transform: rotate(34.326deg);
-          }
-          &::after {
-            width: 2000px;
-            transform: rotate(-34.326deg);
-          }
-        }
-      }
-      &-2 {
-        .page-column-forbid-area {
-          &::before {
-            transform: rotate(54.216deg);
-          }
-          &::after {
-            transform: rotate(-54.216deg);
-          }
-        }
-      }
-
-      &-3 {
-        .page-column-forbid-area {
-          &::before {
-            transform: rotate(64.6555deg);
-          }
-          &::after {
-            transform: rotate(-64.6555deg);
-          }
-        }
-      }
-      &-4 {
-        .page-column-forbid-area {
-          &::before {
-            transform: rotate(70.3109deg);
-          }
-          &::after {
-            transform: rotate(-70.3109deg);
-          }
-        }
-      }
-    }
-  }
-  &-A4 {
-    width: 793px;
-    height: 1122px;
-
-    .page-main {
-      &-inner {
-        padding: 60px 45px 86px;
-      }
-
-      &-1 {
-        .page-column-forbid-area {
-          &::before {
-            transform: rotate(54.216deg);
-          }
-          &::after {
-            transform: rotate(-54.216deg);
-          }
-        }
-      }
-
-      &-2 {
-        .page-column-forbid-area {
-          &::before {
-            transform: rotate(70.5109deg);
-          }
-          &::after {
-            transform: rotate(-70.5109deg);
-          }
-        }
-      }
-    }
-  }
-}
-
-// 分栏间距,默认20px
-// page-main-inner
-.page-main-inner {
-  position: absolute;
-  width: 100%;
-  height: 100%;
-  top: 0;
-  left: 0;
-  padding: 60px 80px 86px;
-  z-index: 9;
-  font-size: 0;
-}
-// page-main-outer
-.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;
-
-  &-forbid-area {
-    position: absolute;
-    top: 0;
-    left: 0;
-    bottom: 0;
-    right: 0;
-    z-index: 1;
-    border: 1px solid #333;
-    overflow: hidden;
-    &::before {
-      content: "";
-      display: block;
-      position: absolute;
-      width: 1200px;
-      border-bottom: 1px solid rgba(172, 172, 172, 1);
-      top: 0;
-      left: 0;
-      transform: rotate(54.216deg);
-      transform-origin: left;
-      z-index: 1;
-    }
-    &::after {
-      content: "";
-      display: block;
-      position: absolute;
-      width: 1200px;
-      border-bottom: 1px solid rgba(172, 172, 172, 1);
-      bottom: 0;
-      left: 0;
-      transform: rotate(-54.216deg);
-      transform-origin: left;
-      z-index: 1;
-    }
-    > 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: #999;
-      background-color: #fff;
-      text-align: center;
-    }
-  }
-  &-main {
-    position: relative;
-    height: 100%;
-  }
-  &-body {
-    position: absolute;
-    top: 0;
-    bottom: 0;
-    left: 0;
-    right: 0;
-    z-index: 9;
-  }
-  &-element {
-    .element-item {
-      position: relative;
-
-      &-width {
-        width: 100% !important;
-      }
-
-      &::before {
-        content: "";
-        position: absolute;
-        width: 100%;
-        height: 100%;
-        top: 0;
-        left: 0;
-        box-sizing: border-box;
-        z-index: 2;
-        border: 1px solid #333;
-        border-top: 0;
-      }
-
-      > div {
-        z-index: 9;
-        position: relative;
-      }
-      &-card-head {
-        &::before {
-          border: 0;
-        }
-      }
-
-      &-topic-head {
-        &::before {
-          border: 0;
-        }
-      }
-      &-fill-question,
-      &-fill-line {
-        &::before {
-          border-bottom: 0;
-        }
-      }
-      // 预览时,小题扩展答题区之间隐藏分割线
-      &-explain {
-        &::before {
-          border-bottom-color: transparent;
-        }
-      }
-      &-type-last {
-        &::before {
-          border-bottom: 1px solid #333;
-        }
-      }
-    }
-    &:last-child {
-      .element-item {
-        &::before {
-          border-bottom: 1px solid #333;
-        }
-      }
-      .element-item-card-head.element-item-type-pre {
-        &::before {
-          border-bottom: none;
-        }
-      }
-    }
-  }
-}
-
-// locator
-.page-locators {
-  position: absolute;
-  top: 60px;
-  left: 80px;
-  right: 80px;
-  bottom: 86px;
-  z-index: 8;
-}
-.page-locator-group {
-  position: absolute;
-  top: 0;
-  bottom: 0;
-  width: 24px;
-  &:first-child {
-    left: 0;
-  }
-  &:nth-of-type(2) {
-    left: 50%;
-    margin-left: -12px;
-  }
-  &:last-child {
-    left: auto;
-    right: 96px;
-  }
-  li {
-    position: absolute;
-    width: 24px;
-    border-bottom: 16px solid #000;
-    z-index: 99;
-    &:first-child {
-      top: -20px;
-    }
-    &:last-child {
-      bottom: -46px;
-    }
-  }
-}
-.page-box-1 {
-  .page-locator-group {
-    &:first-child {
-      left: -30px;
-    }
-  }
-}
-// page-number
-.page-number {
-  position: absolute;
-  bottom: 40px;
-  &-rect {
-    left: 152px;
-  }
-  &-rect-list {
-    font-size: 0;
-
-    li {
-      display: inline-block;
-      vertical-align: top;
-      font-size: 14px;
-      width: 24px;
-      height: 16px;
-      border: 1px solid #000;
-      margin-right: 10px;
-      &.rect-li-act {
-        height: 0;
-        border: none;
-        border-bottom: 16px solid #000;
-      }
-    }
-  }
-  &-text {
-    right: 25%;
-  }
-  &-text-cont {
-    height: 16px;
-    line-height: 16px;
-  }
-}
-
-// elem
-.elem {
-  &-title {
-    padding: 10px;
-    font-size: 14px;
-    color: rgba(0, 0, 0, 1);
-    line-height: 1;
-    white-space: normal;
-  }
-  &-body {
-    padding: 10px;
-  }
-}
-// grid
-.grid-container {
-  margin-left: -10px;
-  margin-right: -10px;
-}
-.grid-row {
-  display: table;
-  width: 100%;
-  border-spacing: 10px 0;
-  border-collapse: separate;
-
-  &:nth-of-type(2) {
-    margin-top: 10px;
-  }
-
-  .grid-col {
-    display: table-cell;
-    width: 50%;
-    vertical-align: top;
-    border: 1px solid #333;
-    &-dash {
-      border-style: dashed;
-      vertical-align: middle;
-    }
-  }
-}
-// card-head
-.card-head {
-  &-top {
-    text-align: center;
-    color: #000;
-  }
-  &-title {
-    font-size: 24px;
-    font-weight: bold;
-    overflow: hidden;
-
-    > h1 {
-      line-height: 33px;
-      white-space: nowrap;
-      letter-spacing: -1px;
-    }
-  }
-  &-subtitle {
-    height: 44px;
-    font-family: $--font-family;
-    font-size: 14px;
-    overflow: hidden;
-    white-space: normal;
-    margin-bottom: 10px;
-
-    > p {
-      padding: 0 10px;
-      line-height: 22px;
-      white-space: pre;
-    }
-  }
-  &-body {
-    font-weight: normal;
-    .el-col {
-      padding-top: 5px;
-      padding-bottom: 5px;
-    }
-    &-spin {
-      padding: 5px 12px;
-      white-space: normal;
-      word-break: break-all;
-    }
-    .stdinfo-item {
-      height: 30px;
-      line-height: 30px;
-      position: relative;
-      overflow: hidden;
-
-      &::after {
-        content: "";
-        display: block;
-        position: absolute;
-        width: 100%;
-        border-bottom: 1px solid #333;
-        bottom: 6px;
-        left: 0;
-        z-index: 1;
-      }
-
-      > span {
-        z-index: 2;
-        display: block;
-        position: relative;
-        font-size: 14px;
-
-        &:first-child {
-          float: left;
-          background-color: #fff;
-          text-align: justify;
-
-          &::after {
-            content: "";
-            display: inline-block;
-            width: 100%;
-            height: 0;
-            line-height: 0;
-          }
-        }
-        &:nth-of-type(2) {
-          float: left;
-          width: 20px;
-          background-color: #fff;
-        }
-        &:last-child {
-          margin-left: 80px;
-          height: 100%;
-        }
-      }
-    }
-    .head-stdno {
-      height: 100%;
-      padding: 0;
-      .stdno-empty {
-        font-weight: bold;
-        letter-spacing: 3px;
-        text-align: center;
-      }
-      .stdno-fill {
-        min-height: 284px;
-        height: 100%;
-        position: relative;
-
-        &-rect {
-          font-size: 0;
-          height: 27px;
-          border-bottom: 1px solid #333;
-        }
-        &-number {
-          display: inline-block;
-          vertical-align: top;
-          width: 7.692%;
-          height: 100%;
-          &:not(:last-child) {
-            border-right: 1px solid #333;
-          }
-        }
-
-        &-head {
-          position: absolute;
-          width: 100%;
-          height: 51px;
-          top: 0;
-          left: 0;
-          z-index: 9;
-
-          > h5 {
-            border-bottom: 1px solid #333;
-            line-height: 24px;
-            font-size: 16px;
-            font-weight: bold;
-            text-align: center;
-          }
-        }
-
-        &-body {
-          position: absolute;
-          top: 0;
-          bottom: 0;
-          padding-top: 51px;
-          display: table;
-          width: 100%;
-        }
-        &-list {
-          display: table-cell;
-          width: 7.692%;
-          padding: 1px 0;
-        }
-        &-option {
-          margin: 8px auto;
-          width: 20px;
-          height: 14px;
-          font-size: 12px;
-          line-height: 1;
-          text-align: center;
-          color: #000;
-          // border-rect
-          border: 1px solid #000;
-          font-family: "Times New Roman", Arial, sans-serif;
-          > i {
-            display: inline-block;
-            transform: scale(0.67, 0.67);
-          }
-        }
-      }
-      .stdno-auto {
-        &-barcode {
-          height: 70px;
-          text-align: center;
-
-          > img {
-            display: block;
-            height: 50px;
-            width: 300px;
-            margin: 0 auto;
-          }
-          > p {
-            line-height: 20px;
-          }
-        }
-      }
-    }
-
-    .head-notice {
-      > h4 {
-        font-weight: normal;
-        margin-bottom: 8px;
-      }
-      &-cont {
-        line-height: 1.5;
-        font-size: 12px;
-        margin-bottom: 5px;
-
-        > span {
-          display: block;
-
-          &:first-child {
-            width: 20px;
-            white-space: nowrap;
-            float: left;
-          }
-          &:last-child {
-            margin-left: 20px;
-          }
-        }
-      }
-
-      &-exam-number-fill {
-        span {
-          display: inline;
-
-          &:first-child {
-            float: none;
-          }
-          &:last-child {
-            margin: 0;
-          }
-        }
-      }
-    }
-
-    .head-dynamic {
-      padding: 0;
-      font-size: 12px;
-      border-spacing: 0;
-      border-collapse: collapse;
-
-      &-part:not(:last-child) {
-        border-bottom: 1px solid #000;
-      }
-      &-write {
-        padding: 5px 12px;
-        .stdinfo-item {
-          margin-bottom: 0;
-        }
-        > p {
-          line-height: 18px;
-        }
-      }
-      &-missfill {
-        display: table;
-        width: 100%;
-      }
-      &-miss {
-        padding: 10px;
-        display: table-cell;
-        vertical-align: middle;
-
-        &:nth-of-type(2) {
-          border-left: 1px solid #000;
-        }
-        span {
-          display: block;
-        }
-        .dynamic-miss-title {
-          width: 54px;
-          float: left;
-        }
-        .dynamic-miss-body {
-          margin-left: 54px;
-          text-align: center;
-        }
-        .head-dynamic-rect {
-          margin: auto;
-          vertical-align: middle;
-        }
-      }
-      &-fill {
-        padding: 10px;
-
-        p {
-          display: inline-block;
-          vertical-align: middle;
-          line-height: 18px;
-          word-wrap: normal;
-
-          &:first-child {
-            margin-right: 20px;
-          }
-
-          > span,
-          > i {
-            display: inline-block;
-            vertical-align: middle;
-            box-sizing: border-box;
-          }
-          &:first-child {
-            i {
-              width: 28px;
-              height: 14px;
-              background-color: #000;
-            }
-          }
-          &: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;
-
-              &:last-child {
-                margin-right: 0;
-              }
-              // wkhtmltopdf 工具无法渲染如下样式:
-              // &:nth-of-type(1) {
-              //   position: relative;
-              //   &::before {
-              //     content: "";
-              //     display: block;
-              //     position: absolute;
-              //     left: 30%;
-              //     top: 1px;
-              //     height: 5px;
-              //     width: 11px;
-              //     transform: rotate(-45deg);
-              //     border-left: 1px solid #000;
-              //     border-bottom: 1px solid #000;
-              //   }
-              // }
-              // &:nth-of-type(2) {
-              //   position: relative;
-              //   &::before {
-              //     content: "";
-              //     display: block;
-              //     position: absolute;
-              //     left: 7px;
-              //     top: 5px;
-              //     width: 11px;
-              //     transform: rotate(-45deg);
-              //     transform-origin: center center;
-              //     border-bottom: 1px solid #000;
-              //   }
-              //   &::after {
-              //     content: "";
-              //     display: block;
-              //     position: absolute;
-              //     left: 8px;
-              //     top: 5px;
-              //     width: 11px;
-              //     transform: rotate(45deg);
-              //     transform-origin: center center;
-              //     border-bottom: 1px solid #000;
-              //   }
-              // }
-
-              &:nth-of-type(3) {
-                &::before {
-                  content: "";
-                  display: inline-block;
-                  vertical-align: top;
-                  margin-left: -5px;
-                  height: 100%;
-                  width: 5px;
-                  background-color: #000;
-                }
-              }
-              &:nth-of-type(4) {
-                &::before {
-                  content: "";
-                  display: inline-block;
-                  margin-top: 1px;
-                  width: 10px;
-                  height: 10px;
-                  border-radius: 50%;
-                  background-color: #000;
-                }
-              }
-            }
-          }
-        }
-      }
-      &-rect {
-        display: inline-block;
-        width: 30px;
-        height: 14px;
-        // border-rect
-        border: 1px solid #000;
-        font-size: 12px;
-        text-align: center;
-        line-height: 1;
-        color: #000;
-        margin: 0 5px;
-        font-family: "Times New Roman", Arial, sans-serif;
-
-        > i {
-          display: inline-block;
-          transform: scale(0.67, 0.67);
-        }
-      }
-      &-aorb {
-        display: table;
-        width: 100%;
-        .dynamic-aorb-item {
-          display: table-cell;
-          vertical-align: middle;
-          text-align: center;
-          &:not(:last-child) {
-            border-right: 1px solid #333;
-          }
-        }
-        &-fill {
-          .dynamic-aorb-item:first-child {
-            border: none;
-          }
-        }
-
-        .dynamic-aorb-title {
-          width: 83px;
-        }
-        .dynamic-aorb-info {
-          width: 50px;
-          font-size: 16px;
-          position: relative;
-          overflow: hidden;
-          .dynamic-aorb-content {
-            position: absolute;
-            top: 50%;
-            left: 0;
-            width: 100%;
-            transform: translateY(-50%);
-            z-index: auto;
-          }
-        }
-        .dynamic-aorb-barcode {
-          img {
-            display: block;
-            position: relative;
-            margin: 0 auto;
-            width: 200px;
-            height: 26px;
-            padding: 7px 0;
-          }
-        }
-        .dynamic-aorb-rects {
-          padding: 16px 10px;
-        }
-      }
-    }
-  }
-  &-part {
-    border: 1px solid #333;
-    &:not(:last-child) {
-      margin-bottom: 10px;
-    }
-  }
-  &-normal {
-    .head-dynamic {
-      &-1 {
-        .head-dynamic-part {
-          height: 100%;
-        }
-      }
-    }
-  }
-  &-narrow {
-    .head-stdno {
-      height: 138px;
-      .stdno-auto {
-        position: relative;
-        top: 50%;
-        margin-top: -40px;
-      }
-    }
-  }
-
-  &-handle {
-    &.card-head-narrow {
-      .head-stdno {
-        height: 286px;
-      }
-    }
-  }
-}
-// card-head-body-auto-resize
-.card-head-body-auto-resize {
-  margin-left: -5px;
-  margin-right: -5px;
-  overflow: hidden;
-
-  &.col-item-auto-height {
-    .card-head-body-spin {
-      height: auto;
-    }
-  }
-
-  .head-dynamic-2 {
-    .head-dynamic-part {
-      height: auto;
-    }
-  }
-
-  .rect-col {
-    padding: 5px;
-    &:first-child {
-      float: left;
-      width: 289px;
-    }
-    &:last-child {
-      float: right;
-      width: 424px;
-    }
-
-    &-item {
-      border: 1px solid #333;
-      &:nth-of-type(2) {
-        margin-top: 10px;
-      }
-      &-none {
-        border: none;
-        margin: 0 !important;
-      }
-    }
-  }
-}
-// elem-topic-head
-.elem-topic-head {
-  text-align: center;
-  .elem-body {
-    padding: 0;
-    border: 1px solid #333;
-  }
-  &-pad {
-    padding-top: 10px;
-  }
-  h3 {
-    font-size: 16px;
-    height: 29px;
-    line-height: 28px;
-    border-bottom: 1px dotted #333;
-    font-weight: normal;
-  }
-  p {
-    font-size: 12px;
-    height: 29px;
-    line-height: 29px;
-    white-space: nowrap;
-    overflow: hidden;
-    // text-overflow: ellipsis;
-  }
-}
-// elem-line
-.elem-line-horizontal {
-  height: 100%;
-  line-height: 30px;
-  .line-body {
-    display: inline-block;
-    vertical-align: middle;
-    width: 100%;
-    border-bottom: 1px solid #000;
-  }
-}
-.elem-line-vertical {
-  height: 100%;
-  text-align: center;
-  .line-body {
-    display: inline-block;
-    vertical-align: top;
-    height: 100%;
-    border-left: 1px solid #000;
-  }
-}
-// elem-lines
-.elem-lines {
-  .line-item {
-    display: inline-block;
-    vertical-align: top;
-  }
-}
-// elem-rect
-.elem-rect {
-  .rect-body {
-    position: absolute;
-    width: 100%;
-    height: 100%;
-    top: 0;
-    left: 0;
-  }
-}
-// elem-text
-.elem-text {
-  .text-body {
-    padding: 5px;
-    line-height: 1.4;
-
-    span {
-      white-space: pre-wrap;
-      word-wrap: normal;
-      word-break: break-all;
-      &.cont-variate {
-        color: #a0a0a0;
-        margin: 0 2px;
-      }
-    }
-  }
-}
-// elem-barcode
-.elem-barcode {
-  height: 100%;
-  border-color: transparent;
-  border-width: 1pt;
-  position: relative;
-  > img {
-    max-height: 100%;
-    max-width: 100%;
-    position: absolute;
-    top: 0;
-    bottom: 0;
-    left: 0;
-    right: 0;
-    margin: auto;
-  }
-}
-// elem-image
-.elem-image {
-  height: 100%;
-  border-color: transparent;
-  border-width: 1pt;
-  position: relative;
-  > p {
-    position: absolute;
-    width: 100%;
-    height: 100%;
-    top: 0;
-    left: 0;
-    display: table;
-    text-align: center;
-    color: #b0b0b0;
-    font-size: 30pt;
-
-    i {
-      display: table-cell;
-      vertical-align: middle;
-    }
-  }
-  > img {
-    max-height: 100%;
-    max-width: 100%;
-    position: absolute;
-    top: 0;
-    bottom: 0;
-    left: 0;
-    right: 0;
-    margin: auto;
-  }
-}
-// elem-girds
-.elem-grids {
-  > table {
-    table-layout: fixed;
-    border-spacing: 0;
-    border-collapse: collapse;
-    td {
-      border: 1px solid #333;
-    }
-  }
-  &-halving {
-    > table {
-      table-layout: auto;
-      width: 100%;
-    }
-  }
-}
-// elem-fill-question
-.elem-fill-question {
-  white-space: normal;
-
-  // 客观题强调标记
-  &-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;
-  }
-
-  &-first.elem-fill-question-simple {
-    &::before {
-      content: "单选";
-      background-color: mix(#fff, $--color-success, 20%);
-    }
-  }
-  &-first.elem-fill-question-multiply {
-    &::before {
-      content: "多选";
-      background-color: $--color-primary-light;
-    }
-  }
-  &-first.elem-fill-question-boolean {
-    &::before {
-      content: "判断";
-      background-color: mix(#fff, $--color-warning, 20%);
-    }
-  }
-
-  .elem-body {
-    padding: 18px 0 18px 16px;
-  }
-
-  .group-item {
-    font-family: "Times New Roman", Arial, sans-serif;
-    display: inline-block;
-    vertical-align: top;
-    font-size: 0;
-    // margin-bottom: 20px;
-  }
-  .question-item {
-    font-size: 0;
-  }
-  .option-item {
-    display: inline-block;
-    vertical-align: middle;
-    padding: 0;
-    width: 18px;
-    height: 14px;
-    text-align: center;
-    font-size: 12px;
-    line-height: 1;
-    // border-rect
-    border: 1px solid #000;
-    color: #000;
-    box-sizing: border-box;
-
-    > i {
-      display: inline-block;
-      transform: scale(0.67, 0.67);
-    }
-
-    &:first-child {
-      text-align: right;
-      border-color: transparent;
-      font-size: 12px;
-      color: #000;
-      > i {
-        transform: scale(1, 1);
-      }
-    }
-    &:last-child {
-      margin-right: 0 !important;
-    }
-  }
-
-  &-vertical {
-    .question-item {
-      display: inline-block;
-      vertical-align: top;
-      &:last-child {
-        margin-right: 0 !important;
-      }
-    }
-    .option-item {
-      display: block;
-
-      &:first-child {
-        padding: 0;
-        text-align: center;
-      }
-      &:last-child {
-        margin-bottom: 0 !important;
-      }
-    }
-  }
-}
-// elem-fill-area
-.elem-fill-area {
-  .option-item {
-    display: inline-block;
-    vertical-align: middle;
-    width: 30px;
-    height: 16px;
-    border: 1px solid #000;
-
-    &:last-child {
-      margin-right: 0 !important;
-    }
-  }
-
-  &-vertical {
-    .option-item {
-      display: block;
-      &:last-child {
-        margin-bottom: 0 !important;
-      }
-    }
-  }
-}
-// elem-fill-line
-.elem-fill-line {
-  white-space: normal;
-
-  .elem-body {
-    padding: 0 15px 0 10px;
-    font-size: 0;
-  }
-  .elem-fill-quesiton {
-    display: inline-block;
-    vertical-align: top;
-    position: relative;
-    padding: 0 1px;
-    font-size: 12px;
-
-    li {
-      &.elem-fill-line {
-        height: 40px;
-        position: relative;
-        margin: 0 10px 0 20px;
-        z-index: 8;
-        &::after {
-          content: "";
-          display: block;
-          position: absolute;
-          width: 100%;
-          border-bottom: 1px solid #000;
-          bottom: 8px;
-        }
-      }
-      &.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;
-
-        span {
-          display: block;
-          position: relative;
-          padding-bottom: 5px;
-          padding-right: 3px;
-          transform: translateY(-100%);
-        }
-      }
-      &.elem-fill-comma {
-        position: absolute;
-        top: 0;
-        right: -10px;
-        z-index: 9;
-        transform: translateY(-100%);
-        width: 10px;
-        padding-bottom: 4px;
-        background-color: #fff;
-        text-align: center;
-        border: none;
-      }
-    }
-  }
-}
-
-// elem-explain
-.elem-explain {
-  .elem-title {
-    padding-bottom: 0;
-  }
-  .elem-body {
-    min-height: 60px;
-    position: relative;
-  }
-  .elem-explain-no {
-    position: absolute;
-    left: 20px;
-    top: 10px;
-    font-size: 12px;
-    z-index: 9;
-  }
-  .elem-explain-elements {
-    position: absolute;
-    width: 100%;
-    height: 100%;
-    top: 0;
-    left: 0;
-    z-index: 8;
-  }
-  .elem-explain-element {
-    .explain-element-body {
-      position: absolute;
-    }
-  }
-}
-// .elem-composition
-.elem-composition {
-  .elem-title {
-    padding-bottom: 0;
-  }
-  .elem-body {
-    min-height: 60px;
-    position: relative;
-  }
-  &-elements {
-    position: absolute;
-    width: 100%;
-    height: 100%;
-    top: 0;
-    left: 0;
-    z-index: 8;
-  }
-
-  .elem-composition-element {
-    .composition-element-body {
-      position: absolute;
-      overflow: hidden;
-    }
-  }
-}
-// elem-fill-number
-.elem-fill-number {
-  border: 1px solid #000;
-  .fill-number {
-    &-rect {
-      font-size: 0;
-      height: 27px;
-      border-bottom: 1px solid #333;
-    }
-    &-number {
-      display: inline-block;
-      vertical-align: top;
-      width: 7.692%;
-      height: 100%;
-      &:not(:last-child) {
-        border-right: 1px solid #333;
-      }
-    }
-
-    &-head {
-      height: 51px;
-
-      > h5 {
-        border-bottom: 1px solid #333;
-        line-height: 24px;
-        font-size: 16px;
-        font-weight: bold;
-        text-align: center;
-      }
-    }
-
-    &-body {
-      display: table;
-      width: 100%;
-    }
-    &-list {
-      display: table-cell;
-      width: 7.692%;
-      padding: 1px 0;
-    }
-    &-option {
-      margin: 8px auto;
-      width: 20px;
-      height: 14px;
-      font-size: 12px;
-      line-height: 1;
-      text-align: center;
-      color: #000;
-      // border-rect
-      border: 1px solid #000;
-      font-family: "Times New Roman", Arial, sans-serif;
-      > i {
-        display: inline-block;
-        transform: scale(0.67, 0.67);
-      }
-    }
-  }
-}
-// elem-fill-field
-.elem-fill-field {
-  white-space: normal;
-  overflow: hidden;
-}
-.fill-field {
-  &-item {
-    display: inline-block;
-    padding: 0 10px;
-    width: 100%;
-  }
-  &-content {
-    height: 30px;
-    line-height: 26px;
-    overflow: hidden;
-    position: relative;
-
-    &::after {
-      content: "";
-      display: block;
-      position: absolute;
-      width: 100%;
-      border-bottom: 1px solid #333;
-      bottom: 2px;
-      left: 0;
-      z-index: 1;
-    }
-
-    > span {
-      z-index: 2;
-      display: inline-block;
-      position: relative;
-      font-size: 14px;
-      vertical-align: top;
-
-      &:first-child {
-        background-color: #fff;
-        text-align: justify;
-
-        &::after {
-          content: "";
-          display: inline-block;
-          width: 100%;
-          height: 0;
-          line-height: 0;
-        }
-      }
-      &:nth-of-type(2) {
-        width: 10px;
-        background-color: #fff;
-      }
-    }
-  }
-}
-
-// elem-fill-pane
-.elem-fill-pane {
-  font-size: 0;
-  white-space: normal;
-  overflow: hidden;
-  .fill-pane {
-    &-item {
-      display: inline-block;
-      vertical-align: top;
-      font-size: 14px;
-    }
-    &-cont {
-      border: 1px solid #000;
-    }
-  }
-}
-
-// card-free-preview
-.card-free-preview {
-  &:not(.card-print) {
-    padding: 10px 0;
-    background-color: #f0f0f0;
-
-    .page-box {
-      margin: 10px auto;
-      box-shadow: 0 0 4px #ddd;
-    }
-  }
-  .page-column-element {
-    .element-item {
-      position: absolute;
-
-      &::before {
-        display: none;
-      }
-    }
-  }
-}
+// card-preview
+.card-preview {
+  padding: 10px 0;
+  background-color: #f0f0f0;
+  color: #000;
+  .page-box {
+    margin: 10px auto;
+    box-shadow: 0 0 4px #ddd;
+  }
+}
+.card-print {
+  padding: 0;
+
+  .page-box {
+    margin: 0 auto;
+    box-shadow: none;
+    page-break-after: always;
+  }
+  // 印刷模式:隐藏客观题强调标记
+  .elem-fill-question-first {
+    &::before {
+      display: none;
+    }
+  }
+}
+
+// page-box
+.page-box {
+  position: relative;
+  background: #fff;
+  margin: 0 auto;
+  font-weight: normal;
+
+  .page-main {
+    height: 100%;
+    position: relative;
+    white-space: nowrap;
+    margin: 0 -10px;
+
+    &-2 {
+      .page-column {
+        width: 50%;
+      }
+    }
+    &-3 {
+      .page-column {
+        width: 33.33%;
+      }
+    }
+    &-4 {
+      .page-column {
+        width: 25%;
+      }
+    }
+  }
+
+  &-A3 {
+    width: 1586px;
+    height: 1122px;
+
+    .page-main {
+      &-inner {
+        padding: 60px 80px 86px;
+      }
+
+      &-1 {
+        .page-column-forbid-area {
+          &::before {
+            width: 2000px;
+            transform: rotate(34.326deg);
+          }
+          &::after {
+            width: 2000px;
+            transform: rotate(-34.326deg);
+          }
+        }
+      }
+      &-2 {
+        .page-column-forbid-area {
+          &::before {
+            transform: rotate(54.216deg);
+          }
+          &::after {
+            transform: rotate(-54.216deg);
+          }
+        }
+      }
+
+      &-3 {
+        .page-column-forbid-area {
+          &::before {
+            transform: rotate(64.6555deg);
+          }
+          &::after {
+            transform: rotate(-64.6555deg);
+          }
+        }
+      }
+      &-4 {
+        .page-column-forbid-area {
+          &::before {
+            transform: rotate(70.3109deg);
+          }
+          &::after {
+            transform: rotate(-70.3109deg);
+          }
+        }
+      }
+    }
+  }
+  &-A4 {
+    width: 793px;
+    height: 1122px;
+
+    .page-main {
+      &-inner {
+        padding: 60px 45px 86px;
+      }
+
+      &-1 {
+        .page-column-forbid-area {
+          &::before {
+            transform: rotate(54.216deg);
+          }
+          &::after {
+            transform: rotate(-54.216deg);
+          }
+        }
+      }
+
+      &-2 {
+        .page-column-forbid-area {
+          &::before {
+            transform: rotate(70.5109deg);
+          }
+          &::after {
+            transform: rotate(-70.5109deg);
+          }
+        }
+      }
+    }
+  }
+}
+
+// 分栏间距,默认20px
+// page-main-inner
+.page-main-inner {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  top: 0;
+  left: 0;
+  padding: 60px 80px 86px;
+  z-index: 9;
+  font-size: 0;
+}
+// page-main-outer
+.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;
+
+  &-forbid-area {
+    position: absolute;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    right: 0;
+    z-index: 1;
+    border: 1px solid #333;
+    overflow: hidden;
+    &::before {
+      content: "";
+      display: block;
+      position: absolute;
+      width: 1200px;
+      border-bottom: 1px solid rgba(172, 172, 172, 1);
+      top: 0;
+      left: 0;
+      transform: rotate(54.216deg);
+      transform-origin: left;
+      z-index: 1;
+    }
+    &::after {
+      content: "";
+      display: block;
+      position: absolute;
+      width: 1200px;
+      border-bottom: 1px solid rgba(172, 172, 172, 1);
+      bottom: 0;
+      left: 0;
+      transform: rotate(-54.216deg);
+      transform-origin: left;
+      z-index: 1;
+    }
+    > 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: #999;
+      background-color: #fff;
+      text-align: center;
+    }
+  }
+  &-main {
+    position: relative;
+    height: 100%;
+  }
+  &-body {
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    z-index: 9;
+  }
+  &-element {
+    .element-item {
+      position: relative;
+
+      &-width {
+        width: 100% !important;
+      }
+
+      &::before {
+        content: "";
+        position: absolute;
+        width: 100%;
+        height: 100%;
+        top: 0;
+        left: 0;
+        box-sizing: border-box;
+        z-index: 2;
+        border: 1px solid #333;
+        border-top: 0;
+      }
+
+      > div {
+        z-index: 9;
+        position: relative;
+      }
+      &-card-head {
+        &::before {
+          border: 0;
+        }
+      }
+
+      &-topic-head {
+        &::before {
+          border: 0;
+        }
+      }
+      &-fill-question,
+      &-fill-line {
+        &::before {
+          border-bottom: 0;
+        }
+      }
+      // 预览时,小题扩展答题区之间隐藏分割线
+      &-explain {
+        &::before {
+          border-bottom-color: transparent;
+        }
+      }
+      &-type-last {
+        &::before {
+          border-bottom: 1px solid #333;
+        }
+      }
+    }
+    &:last-child {
+      .element-item {
+        &::before {
+          border-bottom: 1px solid #333;
+        }
+      }
+      .element-item-card-head.element-item-type-pre {
+        &::before {
+          border-bottom: none;
+        }
+      }
+    }
+  }
+}
+
+// locator
+.page-locators {
+  position: absolute;
+  top: 60px;
+  left: 80px;
+  right: 80px;
+  bottom: 86px;
+  z-index: 8;
+}
+.page-locator-group {
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  width: 24px;
+  &:first-child {
+    left: 0;
+  }
+  &:nth-of-type(2) {
+    left: 50%;
+    margin-left: -12px;
+  }
+  &:last-child {
+    left: auto;
+    right: 96px;
+  }
+  li {
+    position: absolute;
+    width: 24px;
+    border-bottom: 16px solid #000;
+    z-index: 99;
+    &:first-child {
+      top: -20px;
+    }
+    &:last-child {
+      bottom: -46px;
+    }
+  }
+}
+.page-box-1 {
+  .page-locator-group {
+    &:first-child {
+      left: -30px;
+    }
+  }
+}
+// page-number
+.page-number {
+  position: absolute;
+  bottom: 40px;
+  &-rect {
+    left: 152px;
+  }
+  &-rect-list {
+    font-size: 0;
+
+    li {
+      display: inline-block;
+      vertical-align: top;
+      font-size: 14px;
+      width: 24px;
+      height: 16px;
+      border: 1px solid #000;
+      margin-right: 10px;
+      &.rect-li-act {
+        height: 0;
+        border: none;
+        border-bottom: 16px solid #000;
+      }
+    }
+  }
+  &-text {
+    right: 25%;
+  }
+  &-text-cont {
+    height: 16px;
+    line-height: 16px;
+  }
+}
+
+// elem
+.elem {
+  &-title {
+    padding: 10px;
+    font-size: 14px;
+    color: rgba(0, 0, 0, 1);
+    line-height: 1;
+    white-space: normal;
+  }
+  &-body {
+    padding: 10px;
+  }
+}
+// grid
+.grid-container {
+  margin-left: -10px;
+  margin-right: -10px;
+}
+.grid-row {
+  display: table;
+  width: 100%;
+  border-spacing: 10px 0;
+  border-collapse: separate;
+
+  &:nth-of-type(2) {
+    margin-top: 10px;
+  }
+
+  .grid-col {
+    display: table-cell;
+    width: 50%;
+    vertical-align: top;
+    border: 1px solid #333;
+    &-dash {
+      border-style: dashed;
+      vertical-align: middle;
+    }
+  }
+}
+// card-head
+.card-head {
+  &-top {
+    text-align: center;
+    color: #000;
+  }
+  &-title {
+    font-size: 24px;
+    font-weight: bold;
+    overflow: hidden;
+
+    > h1 {
+      line-height: 33px;
+      white-space: nowrap;
+      letter-spacing: -1px;
+    }
+  }
+  &-subtitle {
+    height: 44px;
+    font-family: $--font-family;
+    font-size: 14px;
+    overflow: hidden;
+    white-space: normal;
+    margin-bottom: 10px;
+
+    > p {
+      padding: 0 10px;
+      line-height: 22px;
+      white-space: pre;
+    }
+  }
+  &-body {
+    font-weight: normal;
+    .el-col {
+      padding-top: 5px;
+      padding-bottom: 5px;
+    }
+    &-spin {
+      padding: 5px 12px;
+      white-space: normal;
+      word-break: break-all;
+    }
+    .stdinfo-item {
+      height: 30px;
+      line-height: 30px;
+      position: relative;
+      overflow: hidden;
+
+      &::after {
+        content: "";
+        display: block;
+        position: absolute;
+        width: 100%;
+        border-bottom: 1px solid #333;
+        bottom: 6px;
+        left: 0;
+        z-index: 1;
+      }
+
+      > span {
+        z-index: 2;
+        display: block;
+        position: relative;
+        font-size: 14px;
+
+        &:first-child {
+          float: left;
+          background-color: #fff;
+          text-align: justify;
+
+          &::after {
+            content: "";
+            display: inline-block;
+            width: 100%;
+            height: 0;
+            line-height: 0;
+          }
+        }
+        &:nth-of-type(2) {
+          float: left;
+          width: 20px;
+          background-color: #fff;
+        }
+        &:last-child {
+          margin-left: 80px;
+          height: 100%;
+        }
+      }
+    }
+    .head-stdno {
+      height: 100%;
+      padding: 0;
+      .stdno-empty {
+        font-weight: bold;
+        letter-spacing: 3px;
+        text-align: center;
+      }
+      .stdno-fill {
+        min-height: 284px;
+        height: 100%;
+        position: relative;
+
+        &-rect {
+          font-size: 0;
+          height: 27px;
+          border-bottom: 1px solid #333;
+        }
+        &-number {
+          display: inline-block;
+          vertical-align: top;
+          width: 7.692%;
+          height: 100%;
+          &:not(:last-child) {
+            border-right: 1px solid #333;
+          }
+        }
+
+        &-head {
+          position: absolute;
+          width: 100%;
+          height: 51px;
+          top: 0;
+          left: 0;
+          z-index: 9;
+
+          > h5 {
+            border-bottom: 1px solid #333;
+            line-height: 24px;
+            font-size: 16px;
+            font-weight: bold;
+            text-align: center;
+          }
+        }
+
+        &-body {
+          position: absolute;
+          top: 0;
+          bottom: 0;
+          padding-top: 51px;
+          display: table;
+          width: 100%;
+        }
+        &-list {
+          display: table-cell;
+          width: 7.692%;
+          padding: 1px 0;
+        }
+        &-option {
+          margin: 8px auto;
+          width: 20px;
+          height: 14px;
+          font-size: 12px;
+          line-height: 1;
+          text-align: center;
+          color: #000;
+          // border-rect
+          border: 1px solid #000;
+          font-family: "Times New Roman", Arial, sans-serif;
+          > i {
+            display: inline-block;
+            transform: scale(0.67, 0.67);
+          }
+        }
+      }
+      .stdno-auto {
+        &-barcode {
+          height: 70px;
+          text-align: center;
+
+          > img {
+            display: block;
+            height: 50px;
+            width: 300px;
+            margin: 0 auto;
+          }
+          > p {
+            line-height: 20px;
+          }
+        }
+      }
+    }
+
+    .head-notice {
+      > h4 {
+        font-weight: normal;
+        margin-bottom: 8px;
+      }
+      &-cont {
+        line-height: 1.5;
+        font-size: 12px;
+        margin-bottom: 5px;
+
+        > span {
+          display: block;
+
+          &:first-child {
+            width: 20px;
+            white-space: nowrap;
+            float: left;
+          }
+          &:last-child {
+            margin-left: 20px;
+          }
+        }
+      }
+
+      &-exam-number-fill {
+        span {
+          display: inline;
+
+          &:first-child {
+            float: none;
+          }
+          &:last-child {
+            margin: 0;
+          }
+        }
+      }
+    }
+
+    .head-dynamic {
+      padding: 0;
+      font-size: 12px;
+      border-spacing: 0;
+      border-collapse: collapse;
+
+      &-part:not(:last-child) {
+        border-bottom: 1px solid #000;
+      }
+      &-write {
+        padding: 5px 12px;
+        .stdinfo-item {
+          margin-bottom: 0;
+        }
+        > p {
+          line-height: 18px;
+        }
+      }
+      &-missfill {
+        display: table;
+        width: 100%;
+      }
+      &-miss {
+        padding: 10px;
+        display: table-cell;
+        vertical-align: middle;
+
+        &:nth-of-type(2) {
+          border-left: 1px solid #000;
+        }
+        span {
+          display: block;
+        }
+        .dynamic-miss-title {
+          width: 54px;
+          float: left;
+        }
+        .dynamic-miss-body {
+          margin-left: 54px;
+          text-align: center;
+        }
+        .head-dynamic-rect {
+          margin: auto;
+          vertical-align: middle;
+        }
+      }
+      &-fill {
+        padding: 10px;
+
+        p {
+          display: inline-block;
+          vertical-align: middle;
+          line-height: 18px;
+          word-wrap: normal;
+
+          &:first-child {
+            margin-right: 20px;
+          }
+
+          > span,
+          > i {
+            display: inline-block;
+            vertical-align: middle;
+            box-sizing: border-box;
+          }
+          &:first-child {
+            i {
+              width: 28px;
+              height: 14px;
+              background-color: #000;
+            }
+          }
+          &: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;
+
+              &:last-child {
+                margin-right: 0;
+              }
+              // wkhtmltopdf 工具无法渲染如下样式:
+              // &:nth-of-type(1) {
+              //   position: relative;
+              //   &::before {
+              //     content: "";
+              //     display: block;
+              //     position: absolute;
+              //     left: 30%;
+              //     top: 1px;
+              //     height: 5px;
+              //     width: 11px;
+              //     transform: rotate(-45deg);
+              //     border-left: 1px solid #000;
+              //     border-bottom: 1px solid #000;
+              //   }
+              // }
+              // &:nth-of-type(2) {
+              //   position: relative;
+              //   &::before {
+              //     content: "";
+              //     display: block;
+              //     position: absolute;
+              //     left: 7px;
+              //     top: 5px;
+              //     width: 11px;
+              //     transform: rotate(-45deg);
+              //     transform-origin: center center;
+              //     border-bottom: 1px solid #000;
+              //   }
+              //   &::after {
+              //     content: "";
+              //     display: block;
+              //     position: absolute;
+              //     left: 8px;
+              //     top: 5px;
+              //     width: 11px;
+              //     transform: rotate(45deg);
+              //     transform-origin: center center;
+              //     border-bottom: 1px solid #000;
+              //   }
+              // }
+
+              &:nth-of-type(3) {
+                &::before {
+                  content: "";
+                  display: inline-block;
+                  vertical-align: top;
+                  margin-left: -5px;
+                  height: 100%;
+                  width: 5px;
+                  background-color: #000;
+                }
+              }
+              &:nth-of-type(4) {
+                &::before {
+                  content: "";
+                  display: inline-block;
+                  margin-top: 1px;
+                  width: 10px;
+                  height: 10px;
+                  border-radius: 50%;
+                  background-color: #000;
+                }
+              }
+            }
+          }
+        }
+      }
+      &-rect {
+        display: inline-block;
+        width: 30px;
+        height: 14px;
+        // border-rect
+        border: 1px solid #000;
+        font-size: 12px;
+        text-align: center;
+        line-height: 1;
+        color: #000;
+        margin: 0 5px;
+        font-family: "Times New Roman", Arial, sans-serif;
+
+        > i {
+          display: inline-block;
+          transform: scale(0.67, 0.67);
+        }
+      }
+      &-aorb {
+        display: table;
+        width: 100%;
+        .dynamic-aorb-item {
+          display: table-cell;
+          vertical-align: middle;
+          text-align: center;
+          &:not(:last-child) {
+            border-right: 1px solid #333;
+          }
+        }
+        &-fill {
+          .dynamic-aorb-item:first-child {
+            border: none;
+          }
+        }
+
+        .dynamic-aorb-title {
+          width: 83px;
+        }
+        .dynamic-aorb-info {
+          width: 50px;
+          font-size: 16px;
+          position: relative;
+          overflow: hidden;
+          .dynamic-aorb-content {
+            position: absolute;
+            top: 50%;
+            left: 0;
+            width: 100%;
+            transform: translateY(-50%);
+            z-index: auto;
+          }
+        }
+        .dynamic-aorb-barcode {
+          img {
+            display: block;
+            position: relative;
+            margin: 0 auto;
+            width: 200px;
+            height: 26px;
+            padding: 7px 0;
+          }
+        }
+        .dynamic-aorb-rects {
+          padding: 16px 10px;
+        }
+      }
+    }
+  }
+  &-part {
+    border: 1px solid #333;
+    &:not(:last-child) {
+      margin-bottom: 10px;
+    }
+  }
+  &-normal {
+    .head-dynamic {
+      &-1 {
+        .head-dynamic-part {
+          height: 100%;
+        }
+      }
+    }
+  }
+  &-narrow {
+    .head-stdno {
+      height: 138px;
+      .stdno-auto {
+        position: relative;
+        top: 50%;
+        margin-top: -40px;
+      }
+    }
+  }
+
+  &-handle {
+    &.card-head-narrow {
+      .head-stdno {
+        height: 286px;
+      }
+    }
+  }
+}
+// card-head-body-auto-resize
+.card-head-body-auto-resize {
+  margin-left: -5px;
+  margin-right: -5px;
+  overflow: hidden;
+
+  &.col-item-auto-height {
+    .card-head-body-spin {
+      height: auto;
+    }
+  }
+
+  .head-dynamic-2 {
+    .head-dynamic-part {
+      height: auto;
+    }
+  }
+
+  .rect-col {
+    padding: 5px;
+    &:first-child {
+      float: left;
+      width: 289px;
+    }
+    &:last-child {
+      float: right;
+      width: 424px;
+    }
+
+    &-item {
+      border: 1px solid #333;
+      &:nth-of-type(2) {
+        margin-top: 10px;
+      }
+      &-none {
+        border: none;
+        margin: 0 !important;
+      }
+    }
+  }
+}
+// elem-topic-head
+.elem-topic-head {
+  text-align: center;
+  .elem-body {
+    padding: 0;
+    border: 1px solid #333;
+  }
+  &-pad {
+    padding-top: 10px;
+  }
+  h3 {
+    font-size: 16px;
+    height: 29px;
+    line-height: 28px;
+    border-bottom: 1px dotted #333;
+    font-weight: normal;
+  }
+  p {
+    font-size: 12px;
+    height: 29px;
+    line-height: 29px;
+    white-space: nowrap;
+    overflow: hidden;
+    // text-overflow: ellipsis;
+  }
+}
+// elem-line
+.elem-line-horizontal {
+  height: 100%;
+  line-height: 30px;
+  .line-body {
+    display: inline-block;
+    vertical-align: middle;
+    width: 100%;
+    border-bottom: 1px solid #000;
+  }
+}
+.elem-line-vertical {
+  height: 100%;
+  text-align: center;
+  .line-body {
+    display: inline-block;
+    vertical-align: top;
+    height: 100%;
+    border-left: 1px solid #000;
+  }
+}
+// elem-lines
+.elem-lines {
+  .line-item {
+    display: inline-block;
+    vertical-align: top;
+  }
+}
+// elem-rect
+.elem-rect {
+  .rect-body {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    top: 0;
+    left: 0;
+  }
+}
+// elem-text
+.elem-text {
+  .text-body {
+    padding: 5px;
+    line-height: 1.4;
+
+    span {
+      white-space: pre-wrap;
+      word-wrap: normal;
+      word-break: break-all;
+      &.cont-variate {
+        color: #a0a0a0;
+        margin: 0 2px;
+      }
+    }
+  }
+}
+// elem-barcode
+.elem-barcode {
+  height: 100%;
+  border-color: transparent;
+  border-width: 1pt;
+  position: relative;
+  > img {
+    max-height: 100%;
+    max-width: 100%;
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    margin: auto;
+  }
+}
+// elem-image
+.elem-image {
+  height: 100%;
+  border-color: transparent;
+  border-width: 1pt;
+  position: relative;
+  > p {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    top: 0;
+    left: 0;
+    display: table;
+    text-align: center;
+    color: #b0b0b0;
+    font-size: 30pt;
+
+    i {
+      display: table-cell;
+      vertical-align: middle;
+    }
+  }
+  > img {
+    max-height: 100%;
+    max-width: 100%;
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    margin: auto;
+  }
+}
+// elem-girds
+.elem-grids {
+  > table {
+    table-layout: fixed;
+    border-spacing: 0;
+    border-collapse: collapse;
+    td {
+      border: 1px solid #333;
+    }
+  }
+  &-halving {
+    > table {
+      table-layout: auto;
+      width: 100%;
+    }
+  }
+}
+.elem-pane {
+  height: 100%;
+}
+// elem-fill-question
+.elem-fill-question {
+  white-space: normal;
+
+  // 客观题强调标记
+  &-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;
+  }
+
+  &-first.elem-fill-question-simple {
+    &::before {
+      content: "单选";
+      background-color: mix(#fff, $--color-success, 20%);
+    }
+  }
+  &-first.elem-fill-question-multiply {
+    &::before {
+      content: "多选";
+      background-color: $--color-primary-light;
+    }
+  }
+  &-first.elem-fill-question-boolean {
+    &::before {
+      content: "判断";
+      background-color: mix(#fff, $--color-warning, 20%);
+    }
+  }
+
+  .elem-body {
+    padding: 18px 0 18px 16px;
+  }
+
+  .group-item {
+    font-family: "Times New Roman", Arial, sans-serif;
+    display: inline-block;
+    vertical-align: top;
+    font-size: 0;
+    // margin-bottom: 20px;
+  }
+  .question-item {
+    font-size: 0;
+  }
+  .option-item {
+    display: inline-block;
+    vertical-align: middle;
+    padding: 0;
+    width: 18px;
+    height: 14px;
+    text-align: center;
+    font-size: 12px;
+    line-height: 1;
+    // border-rect
+    border: 1px solid #000;
+    color: #000;
+    box-sizing: border-box;
+
+    > i {
+      display: inline-block;
+      transform: scale(0.67, 0.67);
+    }
+
+    &:first-child {
+      text-align: right;
+      border-color: transparent;
+      font-size: 12px;
+      color: #000;
+      > i {
+        transform: scale(1, 1);
+      }
+    }
+    &:last-child {
+      margin-right: 0 !important;
+    }
+  }
+
+  &-vertical {
+    .question-item {
+      display: inline-block;
+      vertical-align: top;
+      &:last-child {
+        margin-right: 0 !important;
+      }
+    }
+    .option-item {
+      display: block;
+
+      &:first-child {
+        padding: 0;
+        text-align: center;
+      }
+      &:last-child {
+        margin-bottom: 0 !important;
+      }
+    }
+  }
+}
+// elem-fill-area
+.elem-fill-area {
+  .option-item {
+    display: inline-block;
+    vertical-align: middle;
+    width: 30px;
+    height: 16px;
+    border: 1px solid #000;
+
+    &:last-child {
+      margin-right: 0 !important;
+    }
+  }
+
+  &-vertical {
+    .option-item {
+      display: block;
+      &:last-child {
+        margin-bottom: 0 !important;
+      }
+    }
+  }
+}
+// elem-fill-line
+.elem-fill-line {
+  white-space: normal;
+
+  .elem-body {
+    padding: 0 15px 0 10px;
+    font-size: 0;
+  }
+  .elem-fill-quesiton {
+    display: inline-block;
+    vertical-align: top;
+    position: relative;
+    padding: 0 1px;
+    font-size: 12px;
+
+    li {
+      &.elem-fill-line {
+        height: 40px;
+        position: relative;
+        margin: 0 10px 0 20px;
+        z-index: 8;
+        &::after {
+          content: "";
+          display: block;
+          position: absolute;
+          width: 100%;
+          border-bottom: 1px solid #000;
+          bottom: 8px;
+        }
+      }
+      &.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;
+
+        span {
+          display: block;
+          position: relative;
+          padding-bottom: 5px;
+          padding-right: 3px;
+          transform: translateY(-100%);
+        }
+      }
+      &.elem-fill-comma {
+        position: absolute;
+        top: 0;
+        right: -10px;
+        z-index: 9;
+        transform: translateY(-100%);
+        width: 10px;
+        padding-bottom: 4px;
+        background-color: #fff;
+        text-align: center;
+        border: none;
+      }
+    }
+  }
+}
+
+// elem-explain
+.elem-explain {
+  .elem-title {
+    padding-bottom: 0;
+  }
+  .elem-body {
+    min-height: 60px;
+    position: relative;
+  }
+  .elem-explain-no {
+    position: absolute;
+    left: 20px;
+    top: 10px;
+    font-size: 12px;
+    z-index: 9;
+  }
+  .elem-explain-elements {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    top: 0;
+    left: 0;
+    z-index: 8;
+  }
+  .elem-explain-element {
+    .explain-element-body {
+      position: absolute;
+    }
+  }
+}
+// .elem-composition
+.elem-composition {
+  .elem-title {
+    padding-bottom: 0;
+  }
+  .elem-body {
+    min-height: 60px;
+    position: relative;
+  }
+  &-elements {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    top: 0;
+    left: 0;
+    z-index: 8;
+  }
+
+  .elem-composition-element {
+    .composition-element-body {
+      position: absolute;
+      overflow: hidden;
+    }
+  }
+}
+// elem-fill-number
+.elem-fill-number {
+  border: 1px solid #000;
+  .fill-number {
+    &-rect {
+      font-size: 0;
+      height: 27px;
+      border-bottom: 1px solid #333;
+    }
+    &-number {
+      display: inline-block;
+      vertical-align: top;
+      width: 7.692%;
+      height: 100%;
+      &:not(:last-child) {
+        border-right: 1px solid #333;
+      }
+    }
+
+    &-head {
+      height: 51px;
+
+      > h5 {
+        border-bottom: 1px solid #333;
+        line-height: 24px;
+        font-size: 16px;
+        font-weight: bold;
+        text-align: center;
+      }
+    }
+
+    &-body {
+      display: table;
+      width: 100%;
+    }
+    &-list {
+      display: table-cell;
+      width: 7.692%;
+      padding: 1px 0;
+    }
+    &-option {
+      margin: 8px auto;
+      width: 20px;
+      height: 14px;
+      font-size: 12px;
+      line-height: 1;
+      text-align: center;
+      color: #000;
+      // border-rect
+      border: 1px solid #000;
+      font-family: "Times New Roman", Arial, sans-serif;
+      > i {
+        display: inline-block;
+        transform: scale(0.67, 0.67);
+      }
+    }
+  }
+}
+// elem-fill-field
+.elem-fill-field {
+  white-space: normal;
+  overflow: hidden;
+}
+.fill-field {
+  &-item {
+    display: inline-block;
+    padding: 0 10px;
+    width: 100%;
+  }
+  &-content {
+    height: 30px;
+    line-height: 26px;
+    overflow: hidden;
+    position: relative;
+
+    &::after {
+      content: "";
+      display: block;
+      position: absolute;
+      width: 100%;
+      border-bottom: 1px solid #333;
+      bottom: 2px;
+      left: 0;
+      z-index: 1;
+    }
+
+    > span {
+      z-index: 2;
+      display: inline-block;
+      position: relative;
+      font-size: 14px;
+      vertical-align: top;
+
+      &:first-child {
+        background-color: #fff;
+        text-align: justify;
+
+        &::after {
+          content: "";
+          display: inline-block;
+          width: 100%;
+          height: 0;
+          line-height: 0;
+        }
+      }
+      &:nth-of-type(2) {
+        width: 10px;
+        background-color: #fff;
+      }
+    }
+  }
+}
+
+// elem-fill-pane
+.elem-fill-pane {
+  font-size: 0;
+  white-space: normal;
+  overflow: hidden;
+  .fill-pane {
+    &-item {
+      display: inline-block;
+      vertical-align: top;
+      font-size: 14px;
+    }
+    &-cont {
+      border: 1px solid #000;
+    }
+  }
+}
+
+// card-free-preview
+.card-free-preview {
+  &:not(.card-print) {
+    padding: 10px 0;
+    background-color: #f0f0f0;
+
+    .page-box {
+      margin: 10px auto;
+      box-shadow: 0 0 4px #ddd;
+    }
+  }
+  .page-column-element {
+    .element-item {
+      position: absolute;
+
+      &::before {
+        display: none;
+      }
+    }
+  }
+}

+ 672 - 668
src/modules/exam/components/createExamAndPrintTask/InfoExamTask.vue

@@ -1,668 +1,672 @@
-<template>
-  <div class="info-exam-task">
-    <div class="part-box part-box-pad part-box-border part-box-gray">
-      <el-form
-        ref="examTaskComp"
-        :model="examTask"
-        :rules="rules"
-        label-width="120px"
-      >
-        <el-row>
-          <el-col :span="12">
-            <el-form-item prop="semesterId" label="使用学期:">
-              <semester-select
-                v-model="examTask.semesterId"
-                class="width-full"
-                @change="semesterChange"
-              ></semester-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item prop="examId" label="考试:">
-              <exam-select
-                v-model="examTask.examId"
-                :semester-id="examTask.semesterId"
-                :clearable="false"
-                class="width-full"
-                @change="examChange"
-              ></exam-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item prop="teachingRoomId" label="教研室:">
-              <teaching-room-select
-                v-model="examTask.teachingRoomId"
-                class="width-full"
-                @change="teachingRoomChange"
-              ></teaching-room-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item prop="courseCode" label="课程(代码):">
-              <el-select
-                v-model="examTask.courseCode"
-                placeholder="请选择"
-                filterable
-                class="width-full"
-                :disabled="!examTask.examId"
-                @change="courseChange"
-              >
-                <el-option
-                  v-for="item in courses"
-                  :key="item.code"
-                  :value="item.code"
-                  :label="`${item.name}(${item.code})`"
-                >
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item prop="paperNumber" label="试卷编号:">
-              <el-input
-                v-model.trim="examTask.paperNumber"
-                placeholder="试卷编号不填写时会自动生成"
-                :maxlength="50"
-                clearable
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item prop="teacherName" label="拟卷教师:">
-              <el-input
-                v-model.trim="examTask.teacherName"
-                placeholder="请输入拟卷教师"
-                :maxlength="50"
-                clearable
-              ></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </div>
-
-    <div class="apply-content task-detail">
-      <div class="task-body">
-        <div class="mb-2 text-right">
-          <el-button
-            type="info"
-            icon="el-icon-circle-plus-outline"
-            @click="addAtachment"
-            >增加卷型</el-button
-          >
-        </div>
-        <table class="table mb-2">
-          <colgroup>
-            <col width="100" />
-            <col width="280" />
-            <col width="140" />
-            <col />
-            <col width="60" />
-          </colgroup>
-          <tr>
-            <th>试卷类型</th>
-            <th>试卷文件</th>
-            <th>答题卡创建方式</th>
-            <th>答题卡</th>
-            <th>操作</th>
-          </tr>
-          <tr v-for="(attachment, index) in paperAttachments" :key="index">
-            <td>{{ attachment.name }}卷</td>
-            <td>
-              <el-button
-                type="text"
-                class="btn-primary"
-                @click="toUpload(attachment)"
-              >
-                <i
-                  :class="[
-                    'icon',
-                    attachment.attachmentId ? 'icon-files-act' : 'icon-files'
-                  ]"
-                ></i
-                >{{
-                  attachment.attachmentId
-                    ? attachment.filename
-                    : "点击上传试卷文件"
-                }}
-              </el-button>
-            </td>
-            <td :rowspan="paperAttachments.length" v-if="index === 0">
-              {{ createCardTypeName }}
-            </td>
-            <td :rowspan="paperAttachments.length" v-if="index === 0">
-              <el-select
-                class="mr-2"
-                v-model="examTaskDetail.cardId"
-                placeholder="请选择"
-                style="width: 200px"
-                @change="cardChange"
-              >
-                <el-option
-                  v-for="item in cards"
-                  :key="item.id"
-                  :value="item.id"
-                  :label="item.title"
-                >
-                </el-option>
-              </el-select>
-              <el-button
-                class="btn-primary"
-                type="text"
-                :disabled="!examTaskDetail.cardId"
-                @click="toViewCard"
-                >预览</el-button
-              >
-              <el-button
-                class="btn-primary"
-                type="text"
-                :disabled="
-                  !examTaskDetail.cardId ||
-                    examTaskDetail.cardType === 'GENERIC'
-                "
-                @click="toEditCard"
-                >编辑</el-button
-              >
-              <el-button
-                class="btn-primary"
-                type="text"
-                :disabled="!canCreateCard"
-                @click="toCreateCard"
-                >新建</el-button
-              >
-            </td>
-            <td>
-              <el-button
-                class="btn-danger"
-                type="text"
-                @click="deleteAttachment(index)"
-                >删除</el-button
-              >
-            </td>
-          </tr>
-          <tr v-if="!paperAttachments.length">
-            <td colspan="5">
-              <p class="tips-info text-center">暂无数据</p>
-            </td>
-          </tr>
-        </table>
-
-        <p class="tips-info tips-dark mb-2">
-          提示:多卷型试卷由于会绑定一个答题卡模板,因此试卷结构必须相同。多卷型试卷之间客观题要求试题内容相同,可允许大题内的小题题序不同。
-        </p>
-
-        <el-form>
-          <el-form-item label="单次抽卷卷型数量:" label-width="150">
-            <el-input-number
-              v-model="examTaskDetail.drawCount"
-              :min="1"
-              :max="maxFetchCount"
-              :step="1"
-              step-strictly
-              disabled
-              :controls="false"
-            ></el-input-number>
-          </el-form-item>
-        </el-form>
-
-        <h4 class="mb-2">附件<span>(最多4张)</span>:</h4>
-        <div class="image-list">
-          <div
-            class="image-item"
-            v-for="(img, index) in paperConfirmAttachments"
-            :key="index"
-          >
-            <img
-              :src="img.url"
-              :alt="img.filename"
-              title="点击查看大图"
-              @click="toPreview(index)"
-            />
-            <div class="image-delete">
-              <i
-                class="el-icon-delete-solid"
-                @click="deletePaperConfirmAttachment(index)"
-              ></i>
-            </div>
-          </div>
-          <div
-            v-if="paperConfirmAttachments.length < 4"
-            class="image-item image-add"
-            title="上传入库审核表"
-            @click="toUploadPaperConfirm"
-          >
-            <i class="el-icon-plus"></i>
-          </div>
-        </div>
-
-        <h4 class="mb-2">附件说明:</h4>
-        <el-input
-          class="mb-2"
-          v-model="examTaskDetail.remark"
-          type="textarea"
-          resize="none"
-          :rows="2"
-          :maxlength="100"
-          clearable
-          show-word-limit
-          placeholder="建议不超过100个字"
-        ></el-input>
-      </div>
-    </div>
-
-    <!-- upload-paper-dialog -->
-    <upload-paper-dialog
-      :paper-attachment="curAttachment"
-      :upload-type="curUploadType"
-      @confirm="uploadConfirm"
-      ref="UploadPaperDialog"
-    ></upload-paper-dialog>
-    <!-- image-preview -->
-    <simple-image-preview
-      :cur-image="curImage"
-      @on-prev="toPrevImage"
-      @on-next="toNextImage"
-      ref="SimpleImagePreview"
-    ></simple-image-preview>
-    <!-- ModifyCard -->
-    <modify-card ref="ModifyCard" @modified="cardModified"></modify-card>
-  </div>
-</template>
-
-<script>
-import UploadPaperDialog from "../UploadPaperDialog";
-import SimpleImagePreview from "@/components/SimpleImagePreview";
-import ModifyCard from "../../../card/components/ModifyCard";
-import {
-  CARD_SOURCE_TYPE,
-  COMMON_CARD_RULE_ID
-} from "../../../../constants/enumerate";
-import { cardForSelectList } from "../../api";
-import { courseQuery, examConfigByExamIdOrgId } from "../../../base/api";
-import { mapState, mapMutations } from "vuex";
-
-export default {
-  name: "info-exam-task",
-  components: { UploadPaperDialog, SimpleImagePreview, ModifyCard },
-  data() {
-    return {
-      task: {},
-      rules: {
-        semesterId: [
-          {
-            required: true,
-            message: "请选择使用学期",
-            trigger: "change"
-          }
-        ],
-        examId: [
-          {
-            required: true,
-            message: "请选择考试",
-            trigger: "change"
-          }
-        ],
-        teachingRoomId: [
-          {
-            required: true,
-            message: "请选择教研室",
-            trigger: "change"
-          }
-        ],
-        courseCode: [
-          {
-            required: true,
-            message: "请选择课程",
-            trigger: "change"
-          }
-        ],
-        paperNumber: [
-          {
-            message: "试卷编号不能超过50个字符",
-            max: 50,
-            trigger: "change"
-          }
-        ],
-        teacherName: [
-          {
-            message: "拟卷教师不能超过50个字符",
-            max: 50,
-            trigger: "change"
-          }
-        ]
-      },
-      examTask: {},
-      cards: [],
-      courses: [],
-      semesters: [],
-      cardRuleName: "全部通卡",
-      // exam-task-detail
-      examTaskDetail: { makeMethod: "" },
-      paperConfirmAttachmentId: { attachmentId: "", filename: "", url: "" },
-      paperAttachments: [],
-      paperConfirmAttachments: [],
-      curAttachment: {},
-      curUploadType: "paper",
-      attachmentLimitCount: 26,
-      abc: "abcdefghijklmnopqrstuvwxyz".toUpperCase(),
-      // image-preview
-      curImage: {},
-      curImageIndex: 0
-    };
-  },
-  computed: {
-    ...mapState("exam", [
-      "infoExamTask",
-      "infoExamTaskDetail",
-      "infoExamPrintPlan"
-    ]),
-    createCardTypeName() {
-      return CARD_SOURCE_TYPE[this.examTaskDetail.makeMethod] || "";
-    },
-    maxFetchCount() {
-      return this.paperAttachments.length < 1
-        ? 1
-        : this.paperAttachments.length;
-    },
-    canCreateCard() {
-      return (
-        this.examTask.courseCode &&
-        this.examTask.examId &&
-        this.examTask.cardRuleId !== COMMON_CARD_RULE_ID
-      );
-    }
-  },
-  watch: {
-    "examTask.examId": function(val, oldval) {
-      if (val !== oldval) this.examAndRoomChange();
-    },
-    "examTask.teachingRoomId": function(val, oldval) {
-      if (val !== oldval) this.examAndRoomChange();
-    }
-  },
-  mounted() {
-    this.initData();
-  },
-  methods: {
-    ...mapMutations("exam", ["updateTaskInfo"]),
-    initData() {
-      this.examTask = { ...this.infoExamTask };
-      this.examTaskDetail = { ...this.infoExamTaskDetail };
-      this.paperAttachments = this.examTaskDetail.paperAttachmentIds
-        ? JSON.parse(this.examTaskDetail.paperAttachmentIds)
-        : [];
-
-      if (!this.paperAttachments.length) {
-        this.addAtachment();
-      }
-
-      this.paperConfirmAttachments = this.examTaskDetail
-        .paperConfirmAttachmentIds
-        ? JSON.parse(this.examTaskDetail.paperConfirmAttachmentIds)
-        : [];
-
-      this.getCourses();
-      this.getCardList(true);
-
-      this.$nextTick(() => {
-        this.$refs.examTaskComp.clearValidate();
-      });
-    },
-    async getCardList(selectDefaultCard = false) {
-      if (!this.examTask.courseCode || !this.examTask.examId) return;
-      const data = await cardForSelectList({
-        courseCode: this.examTask.courseCode,
-        examId: this.examTask.examId
-      });
-      this.cards = data || [];
-      if (this.cards.length && selectDefaultCard) {
-        this.examTaskDetail.cardId = data[0].id;
-      }
-    },
-    async getCourses() {
-      if (!this.examTask.teachingRoomId) return;
-      const res = await courseQuery({
-        teachingRoomId: this.examTask.teachingRoomId
-      });
-      this.courses = res || [];
-    },
-    semesterChange(val) {
-      this.examTask.paperName = val.name;
-    },
-    examChange(val) {
-      console.log(val);
-      this.examTask.examModel = val.examModel;
-      this.examTaskDetail.cardId = "";
-      this.cards = [];
-      this.getCardList();
-    },
-    teachingRoomChange() {
-      this.examTask.courseCode = "";
-      this.examTask.courseName = "";
-      this.courses = [];
-      this.examTaskDetail.cardId = "";
-      this.cards = [];
-      this.getCourses();
-    },
-    courseChange(val) {
-      if (val) {
-        const course = this.courses.find(item => item.code === val);
-        this.examTask.courseName = course.name;
-      } else {
-        this.examTask.courseName = "";
-      }
-
-      this.examTaskDetail.cardId = "";
-      this.cards = [];
-      this.getCardList();
-      this.updateTaskInfo({ infoExamTask: this.examTask });
-    },
-    async examAndRoomChange() {
-      this.updateTaskInfo({ infoExamTask: this.examTask });
-
-      const { examId, teachingRoomId } = this.examTask;
-      if (examId && teachingRoomId) {
-        const examPrintPlan = await examConfigByExamIdOrgId({
-          examId,
-          orgId: teachingRoomId
-        });
-        this.examTask.cardRuleId = examPrintPlan.cardRuleId;
-        this.updateTaskInfo({
-          infoExamPrintPlan: Object.assign(
-            {},
-            this.infoExamPrintPlan,
-            examPrintPlan
-          ),
-          infoExamTask: this.examTask
-        });
-      }
-    },
-    cardChange() {
-      const card = this.cards.find(
-        item => item.id === this.examTaskDetail.cardId
-      );
-      if (card) {
-        this.examTaskDetail.cardType = card.type;
-      }
-    },
-    toCreateCard() {
-      this.$ls.set("prepareTcPCard", {
-        courseCode: this.examTask.courseCode,
-        courseName: this.examTask.courseName,
-        schoolName: this.$ls.get("schoolName"),
-        makeMethod: "SELF",
-        cardRuleId: this.examTask.cardRuleId,
-        type: "CUSTOM",
-        createMethod: "STANDARD"
-      });
-      this.$refs.ModifyCard.open();
-    },
-    toEditCard() {
-      this.$ls.set("prepareTcPCard", {
-        id: this.examTaskDetail.cardId,
-        courseCode: this.examTask.courseCode,
-        courseName: this.examTask.courseName,
-        schoolName: this.$ls.get("schoolName"),
-        makeMethod: "SELF",
-        cardRuleId: this.examTask.cardRuleId,
-        type: "CUSTOM",
-        createMethod: "STANDARD"
-      });
-      this.$refs.ModifyCard.open();
-    },
-    toViewCard() {
-      window.open(
-        this.getRouterPath({
-          name: "CardPreview",
-          params: {
-            cardId: this.examTaskDetail.cardId,
-            viewType: "view"
-          }
-        })
-      );
-    },
-    async cardModified(cardId) {
-      if (!cardId) return;
-      let card = this.cards.find(item => item.id === cardId);
-      if (card) {
-        this.examTaskDetail.cardId = card.id;
-      } else {
-        await this.getCardList();
-        card = this.cards.find(item => item.id === cardId);
-        this.examTaskDetail.cardId = card.id;
-      }
-    },
-    async checkData() {
-      const valid = await this.$refs.examTaskComp.validate().catch(() => {});
-      if (!valid) return Promise.reject();
-
-      const attachmentValid = !this.paperAttachments.some(
-        item => !item.attachmentId
-      );
-      // 设置了入库强制包含试卷时,校验试卷是否上传。
-      if (this.examTaskDetail.includePaper && !attachmentValid) {
-        this.$message.error("请完成试卷文件上传!");
-        return Promise.reject();
-      }
-      // if (!this.paperConfirmAttachments.length) {
-      //   this.$message.error("请上传附件!");
-      //   return;
-      // }
-
-      if (!this.examTaskDetail.cardId) {
-        this.$message.error("请选择题卡!");
-        return Promise.reject();
-      }
-
-      return Promise.resolve(true);
-    },
-    updeteData() {
-      let data = {
-        infoExamTask: this.examTask,
-        infoExamTaskDetail: this.getTaskDetailData()
-      };
-      this.updateTaskInfo(data);
-    },
-    emitRelateInfo(type) {
-      this.$emit("relate-info-change", this.getData(), type);
-    },
-    // exam-task-detail edit
-    addAtachment() {
-      if (this.paperAttachments.length >= this.attachmentLimitCount) return;
-
-      const newAttachment = {
-        name: this.abc[this.paperAttachments.length],
-        attachmentId: "",
-        filename: "",
-        pages: 0
-      };
-      this.paperAttachments.push(newAttachment);
-    },
-    deleteAttachment(index) {
-      if (this.paperAttachments.length <= 1) {
-        this.$message.error("试卷类型数量不得少于1");
-        return;
-      }
-      this.paperAttachments.splice(index, 1);
-      this.paperAttachments.forEach((item, itemIndex) => {
-        item.name = this.abc[itemIndex];
-      });
-      if (
-        this.examTaskDetail.drawCount &&
-        this.examTaskDetail.drawCount > this.paperAttachments.length
-      ) {
-        this.examTaskDetail.drawCount = this.paperAttachments.length;
-      }
-    },
-    toUpload(attachment) {
-      this.curUploadType = "paper";
-      this.curAttachment = {
-        ...attachment
-      };
-      this.$refs.UploadPaperDialog.open();
-    },
-    toUploadPaperConfirm() {
-      if (this.paperConfirmAttachments.length >= 4) return;
-      this.curUploadType = "paperConfirm";
-      this.curAttachment = {
-        ...this.paperConfirmAttachmentId
-      };
-      this.$refs.UploadPaperDialog.open();
-    },
-    uploadConfirm(attachment, uploadType) {
-      if (uploadType === "paper") {
-        const index = this.paperAttachments.findIndex(
-          item => item.name === attachment.name
-        );
-        this.paperAttachments.splice(index, 1, { ...attachment });
-      } else {
-        this.paperConfirmAttachments.push(attachment);
-      }
-    },
-    deletePaperConfirmAttachment(index) {
-      this.paperConfirmAttachments.splice(index, 1);
-    },
-    // cardConfirm(data) {
-    //   this.examTaskDetail = this.$objAssign(this.examTaskDetail, data);
-    // },
-    getTaskDetailData() {
-      let data = { ...this.examTaskDetail };
-      data.paperType = this.paperAttachments.map(item => item.name).join(",");
-      data.paperAttachmentIds = JSON.stringify(this.paperAttachments, (k, v) =>
-        k === "url" ? undefined : v
-      );
-      data.paperConfirmAttachmentIds = JSON.stringify(
-        this.paperConfirmAttachments
-      );
-      return data;
-    },
-    // image-preview
-    toPreview(index) {
-      this.curImageIndex = index;
-      this.selectImage(index);
-      this.$refs.SimpleImagePreview.open();
-    },
-    selectImage(index) {
-      this.curImage = this.paperConfirmAttachments[index];
-    },
-    toPrevImage() {
-      if (this.curImageIndex === 0) {
-        this.curImageIndex = this.paperConfirmAttachments.length - 1;
-      } else {
-        this.curImageIndex--;
-      }
-
-      this.selectImage(this.curImageIndex);
-    },
-    toNextImage() {
-      if (this.curImageIndex === this.paperConfirmAttachments.length - 1) {
-        this.curImageIndex = 0;
-      } else {
-        this.curImageIndex++;
-      }
-
-      this.selectImage(this.curImageIndex);
-    }
-  }
-};
-</script>
+<template>
+  <div class="info-exam-task">
+    <div class="part-box part-box-pad part-box-border part-box-gray">
+      <el-form
+        ref="examTaskComp"
+        :model="examTask"
+        :rules="rules"
+        label-width="120px"
+      >
+        <el-row>
+          <el-col :span="12">
+            <el-form-item prop="semesterId" label="使用学期:">
+              <semester-select
+                v-model="examTask.semesterId"
+                class="width-full"
+                @change="semesterChange"
+              ></semester-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item prop="examId" label="考试:">
+              <exam-select
+                v-model="examTask.examId"
+                :semester-id="examTask.semesterId"
+                :clearable="false"
+                class="width-full"
+                @change="examChange"
+              ></exam-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item prop="teachingRoomId" label="教研室:">
+              <teaching-room-select
+                v-model="examTask.teachingRoomId"
+                class="width-full"
+                @change="teachingRoomChange"
+              ></teaching-room-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item prop="courseCode" label="课程(代码):">
+              <el-select
+                v-model="examTask.courseCode"
+                placeholder="请选择"
+                filterable
+                class="width-full"
+                :disabled="!examTask.examId"
+                @change="courseChange"
+              >
+                <el-option
+                  v-for="item in courses"
+                  :key="item.code"
+                  :value="item.code"
+                  :label="`${item.name}(${item.code})`"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item prop="paperNumber" label="试卷编号:">
+              <el-input
+                v-model.trim="examTask.paperNumber"
+                placeholder="试卷编号不填写时会自动生成"
+                :maxlength="50"
+                clearable
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item prop="teacherName" label="拟卷教师:">
+              <el-input
+                v-model.trim="examTask.teacherName"
+                placeholder="请输入拟卷教师"
+                :maxlength="50"
+                clearable
+              ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+
+    <div class="apply-content task-detail">
+      <div class="task-body">
+        <div class="mb-2 text-right">
+          <el-button
+            type="info"
+            icon="el-icon-circle-plus-outline"
+            @click="addAtachment"
+            >增加卷型</el-button
+          >
+        </div>
+        <table class="table mb-2">
+          <colgroup>
+            <col width="100" />
+            <col width="280" />
+            <col width="140" />
+            <col />
+            <col width="60" />
+          </colgroup>
+          <tr>
+            <th>试卷类型</th>
+            <th>试卷文件</th>
+            <th>答题卡创建方式</th>
+            <th>答题卡</th>
+            <th>操作</th>
+          </tr>
+          <tr v-for="(attachment, index) in paperAttachments" :key="index">
+            <td>{{ attachment.name }}卷</td>
+            <td>
+              <el-button
+                type="text"
+                class="btn-primary"
+                @click="toUpload(attachment)"
+              >
+                <i
+                  :class="[
+                    'icon',
+                    attachment.attachmentId ? 'icon-files-act' : 'icon-files'
+                  ]"
+                ></i
+                >{{
+                  attachment.attachmentId
+                    ? attachment.filename
+                    : "点击上传试卷文件"
+                }}
+              </el-button>
+            </td>
+            <td :rowspan="paperAttachments.length" v-if="index === 0">
+              {{ createCardTypeName }}
+            </td>
+            <td :rowspan="paperAttachments.length" v-if="index === 0">
+              <el-select
+                class="mr-2"
+                v-model="examTaskDetail.cardId"
+                placeholder="请选择"
+                style="width: 200px"
+                @change="cardChange"
+              >
+                <el-option
+                  v-for="item in cards"
+                  :key="item.id"
+                  :value="item.id"
+                  :label="item.title"
+                >
+                </el-option>
+              </el-select>
+              <el-button
+                class="btn-primary"
+                type="text"
+                :disabled="!examTaskDetail.cardId"
+                @click="toViewCard"
+                >预览</el-button
+              >
+              <el-button
+                class="btn-primary"
+                type="text"
+                :disabled="
+                  !examTaskDetail.cardId ||
+                    examTaskDetail.cardType === 'GENERIC'
+                "
+                @click="toEditCard"
+                >编辑</el-button
+              >
+              <el-button
+                class="btn-primary"
+                type="text"
+                :disabled="!canCreateCard"
+                @click="toCreateCard"
+                >新建</el-button
+              >
+            </td>
+            <td>
+              <el-button
+                class="btn-danger"
+                type="text"
+                @click="deleteAttachment(index)"
+                >删除</el-button
+              >
+            </td>
+          </tr>
+          <tr v-if="!paperAttachments.length">
+            <td colspan="5">
+              <p class="tips-info text-center">暂无数据</p>
+            </td>
+          </tr>
+        </table>
+
+        <p class="tips-info tips-dark mb-2">
+          提示:多卷型试卷由于会绑定一个答题卡模板,因此试卷结构必须相同。多卷型试卷之间客观题要求试题内容相同,可允许大题内的小题题序不同。
+        </p>
+
+        <el-form>
+          <el-form-item label="单次抽卷卷型数量:" label-width="150">
+            <el-input-number
+              v-model="examTaskDetail.drawCount"
+              :min="1"
+              :max="maxFetchCount"
+              :step="1"
+              step-strictly
+              disabled
+              :controls="false"
+            ></el-input-number>
+          </el-form-item>
+        </el-form>
+
+        <h4 class="mb-2">附件<span>(最多4张)</span>:</h4>
+        <div class="image-list">
+          <div
+            class="image-item"
+            v-for="(img, index) in paperConfirmAttachments"
+            :key="index"
+          >
+            <img
+              :src="img.url"
+              :alt="img.filename"
+              title="点击查看大图"
+              @click="toPreview(index)"
+            />
+            <div class="image-delete">
+              <i
+                class="el-icon-delete-solid"
+                @click="deletePaperConfirmAttachment(index)"
+              ></i>
+            </div>
+          </div>
+          <div
+            v-if="paperConfirmAttachments.length < 4"
+            class="image-item image-add"
+            title="上传入库审核表"
+            @click="toUploadPaperConfirm"
+          >
+            <i class="el-icon-plus"></i>
+          </div>
+        </div>
+
+        <h4 class="mb-2">附件说明:</h4>
+        <el-input
+          class="mb-2"
+          v-model="examTaskDetail.remark"
+          type="textarea"
+          resize="none"
+          :rows="2"
+          :maxlength="100"
+          clearable
+          show-word-limit
+          placeholder="建议不超过100个字"
+        ></el-input>
+      </div>
+    </div>
+
+    <!-- upload-paper-dialog -->
+    <upload-paper-dialog
+      :paper-attachment="curAttachment"
+      :upload-type="curUploadType"
+      @confirm="uploadConfirm"
+      ref="UploadPaperDialog"
+    ></upload-paper-dialog>
+    <!-- image-preview -->
+    <simple-image-preview
+      :cur-image="curImage"
+      @on-prev="toPrevImage"
+      @on-next="toNextImage"
+      ref="SimpleImagePreview"
+    ></simple-image-preview>
+    <!-- ModifyCard -->
+    <modify-card ref="ModifyCard" @modified="cardModified"></modify-card>
+  </div>
+</template>
+
+<script>
+import UploadPaperDialog from "../UploadPaperDialog";
+import SimpleImagePreview from "@/components/SimpleImagePreview";
+import ModifyCard from "../../../card/components/ModifyCard";
+import {
+  CARD_SOURCE_TYPE,
+  COMMON_CARD_RULE_ID
+} from "../../../../constants/enumerate";
+import { cardForSelectList } from "../../api";
+import { courseQuery, examConfigByExamIdOrgId } from "../../../base/api";
+import { mapState, mapMutations } from "vuex";
+
+export default {
+  name: "info-exam-task",
+  components: { UploadPaperDialog, SimpleImagePreview, ModifyCard },
+  data() {
+    return {
+      task: {},
+      rules: {
+        semesterId: [
+          {
+            required: true,
+            message: "请选择使用学期",
+            trigger: "change"
+          }
+        ],
+        examId: [
+          {
+            required: true,
+            message: "请选择考试",
+            trigger: "change"
+          }
+        ],
+        teachingRoomId: [
+          {
+            required: true,
+            message: "请选择教研室",
+            trigger: "change"
+          }
+        ],
+        courseCode: [
+          {
+            required: true,
+            message: "请选择课程",
+            trigger: "change"
+          }
+        ],
+        paperNumber: [
+          {
+            message: "试卷编号不能超过50个字符",
+            max: 50,
+            trigger: "change"
+          }
+        ],
+        teacherName: [
+          {
+            message: "拟卷教师不能超过50个字符",
+            max: 50,
+            trigger: "change"
+          }
+        ]
+      },
+      examTask: {},
+      cards: [],
+      courses: [],
+      semesters: [],
+      cardRuleName: "全部通卡",
+      // exam-task-detail
+      examTaskDetail: { makeMethod: "" },
+      paperConfirmAttachmentId: { attachmentId: "", filename: "", url: "" },
+      paperAttachments: [],
+      paperConfirmAttachments: [],
+      curAttachment: {},
+      curUploadType: "paper",
+      attachmentLimitCount: 26,
+      abc: "abcdefghijklmnopqrstuvwxyz".toUpperCase(),
+      // image-preview
+      curImage: {},
+      curImageIndex: 0
+    };
+  },
+  computed: {
+    ...mapState("exam", [
+      "infoExamTask",
+      "infoExamTaskDetail",
+      "infoExamPrintPlan"
+    ]),
+    createCardTypeName() {
+      return CARD_SOURCE_TYPE[this.examTaskDetail.makeMethod] || "";
+    },
+    maxFetchCount() {
+      return this.paperAttachments.length < 1
+        ? 1
+        : this.paperAttachments.length;
+    },
+    canCreateCard() {
+      return (
+        this.examTask.courseCode &&
+        this.examTask.examId &&
+        this.examTask.cardRuleId !== COMMON_CARD_RULE_ID
+      );
+    }
+  },
+  watch: {
+    "examTask.examId": function(val, oldval) {
+      if (val !== oldval) this.examAndRoomChange();
+    },
+    "examTask.teachingRoomId": function(val, oldval) {
+      if (val !== oldval) this.examAndRoomChange();
+    }
+  },
+  mounted() {
+    this.initData();
+  },
+  methods: {
+    ...mapMutations("exam", ["updateTaskInfo"]),
+    initData() {
+      this.examTask = { ...this.infoExamTask };
+      this.examTaskDetail = { ...this.infoExamTaskDetail };
+      this.paperAttachments = this.examTaskDetail.paperAttachmentIds
+        ? JSON.parse(this.examTaskDetail.paperAttachmentIds)
+        : [];
+
+      if (!this.paperAttachments.length) {
+        this.addAtachment();
+      }
+
+      this.paperConfirmAttachments = this.examTaskDetail
+        .paperConfirmAttachmentIds
+        ? JSON.parse(this.examTaskDetail.paperConfirmAttachmentIds)
+        : [];
+
+      this.getCourses();
+      this.getCardList(true);
+
+      this.$nextTick(() => {
+        this.$refs.examTaskComp.clearValidate();
+      });
+    },
+    async getCardList(selectDefaultCard = false) {
+      if (!this.examTask.courseCode || !this.examTask.examId) return;
+      const data = await cardForSelectList({
+        courseCode: this.examTask.courseCode,
+        examId: this.examTask.examId
+      });
+      this.cards = data || [];
+      if (this.cards.length && selectDefaultCard) {
+        this.examTaskDetail.cardId = data[0].id;
+      }
+    },
+    async getCourses() {
+      if (!this.examTask.teachingRoomId) return;
+      const res = await courseQuery({
+        teachingRoomId: this.examTask.teachingRoomId
+      });
+      this.courses = res || [];
+    },
+    semesterChange(val) {
+      this.examTask.paperName = val.name;
+    },
+    examChange(val) {
+      console.log(val);
+      this.examTask.examModel = val.examModel;
+      this.examTaskDetail.cardId = "";
+      this.cards = [];
+      this.getCardList();
+    },
+    teachingRoomChange() {
+      this.examTask.courseCode = "";
+      this.examTask.courseName = "";
+      this.courses = [];
+      this.examTaskDetail.cardId = "";
+      this.cards = [];
+      this.getCourses();
+    },
+    courseChange(val) {
+      if (val) {
+        const course = this.courses.find(item => item.code === val);
+        this.examTask.courseName = course.name;
+      } else {
+        this.examTask.courseName = "";
+      }
+
+      this.examTaskDetail.cardId = "";
+      this.cards = [];
+      this.getCardList();
+      this.updateTaskInfo({ infoExamTask: this.examTask });
+    },
+    async examAndRoomChange() {
+      this.updateTaskInfo({ infoExamTask: this.examTask });
+
+      const { examId, teachingRoomId } = this.examTask;
+      if (examId && teachingRoomId) {
+        const examPrintPlan = await examConfigByExamIdOrgId({
+          examId,
+          orgId: teachingRoomId
+        });
+        this.examTask.cardRuleId = examPrintPlan.cardRuleId;
+        this.updateTaskInfo({
+          infoExamPrintPlan: Object.assign(
+            {},
+            this.infoExamPrintPlan,
+            examPrintPlan
+          ),
+          infoExamTask: this.examTask
+        });
+      }
+    },
+    cardChange() {
+      const card = this.cards.find(
+        item => item.id === this.examTaskDetail.cardId
+      );
+      if (card) {
+        this.examTaskDetail.cardType = card.type;
+      }
+    },
+    toCreateCard() {
+      if (!this.examTask.cardRuleId) {
+        this.$message.error("题卡规则缺失!");
+        return;
+      }
+      this.$ls.set("prepareTcPCard", {
+        courseCode: this.examTask.courseCode,
+        courseName: this.examTask.courseName,
+        schoolName: this.$ls.get("schoolName"),
+        makeMethod: "SELF",
+        cardRuleId: this.examTask.cardRuleId,
+        type: "CUSTOM",
+        createMethod: "STANDARD"
+      });
+      this.$refs.ModifyCard.open();
+    },
+    toEditCard() {
+      this.$ls.set("prepareTcPCard", {
+        id: this.examTaskDetail.cardId,
+        courseCode: this.examTask.courseCode,
+        courseName: this.examTask.courseName,
+        schoolName: this.$ls.get("schoolName"),
+        makeMethod: "SELF",
+        cardRuleId: this.examTask.cardRuleId,
+        type: "CUSTOM",
+        createMethod: "STANDARD"
+      });
+      this.$refs.ModifyCard.open();
+    },
+    toViewCard() {
+      window.open(
+        this.getRouterPath({
+          name: "CardPreview",
+          params: {
+            cardId: this.examTaskDetail.cardId,
+            viewType: "view"
+          }
+        })
+      );
+    },
+    async cardModified(cardId) {
+      if (!cardId) return;
+      let card = this.cards.find(item => item.id === cardId);
+      if (card) {
+        this.examTaskDetail.cardId = card.id;
+      } else {
+        await this.getCardList();
+        card = this.cards.find(item => item.id === cardId);
+        this.examTaskDetail.cardId = card.id;
+      }
+    },
+    async checkData() {
+      const valid = await this.$refs.examTaskComp.validate().catch(() => {});
+      if (!valid) return Promise.reject();
+
+      const attachmentValid = !this.paperAttachments.some(
+        item => !item.attachmentId
+      );
+      // 设置了入库强制包含试卷时,校验试卷是否上传。
+      if (this.examTaskDetail.includePaper && !attachmentValid) {
+        this.$message.error("请完成试卷文件上传!");
+        return Promise.reject();
+      }
+      // if (!this.paperConfirmAttachments.length) {
+      //   this.$message.error("请上传附件!");
+      //   return;
+      // }
+
+      if (!this.examTaskDetail.cardId) {
+        this.$message.error("请选择题卡!");
+        return Promise.reject();
+      }
+
+      return Promise.resolve(true);
+    },
+    updeteData() {
+      let data = {
+        infoExamTask: this.examTask,
+        infoExamTaskDetail: this.getTaskDetailData()
+      };
+      this.updateTaskInfo(data);
+    },
+    emitRelateInfo(type) {
+      this.$emit("relate-info-change", this.getData(), type);
+    },
+    // exam-task-detail edit
+    addAtachment() {
+      if (this.paperAttachments.length >= this.attachmentLimitCount) return;
+
+      const newAttachment = {
+        name: this.abc[this.paperAttachments.length],
+        attachmentId: "",
+        filename: "",
+        pages: 0
+      };
+      this.paperAttachments.push(newAttachment);
+    },
+    deleteAttachment(index) {
+      if (this.paperAttachments.length <= 1) {
+        this.$message.error("试卷类型数量不得少于1");
+        return;
+      }
+      this.paperAttachments.splice(index, 1);
+      this.paperAttachments.forEach((item, itemIndex) => {
+        item.name = this.abc[itemIndex];
+      });
+      if (
+        this.examTaskDetail.drawCount &&
+        this.examTaskDetail.drawCount > this.paperAttachments.length
+      ) {
+        this.examTaskDetail.drawCount = this.paperAttachments.length;
+      }
+    },
+    toUpload(attachment) {
+      this.curUploadType = "paper";
+      this.curAttachment = {
+        ...attachment
+      };
+      this.$refs.UploadPaperDialog.open();
+    },
+    toUploadPaperConfirm() {
+      if (this.paperConfirmAttachments.length >= 4) return;
+      this.curUploadType = "paperConfirm";
+      this.curAttachment = {
+        ...this.paperConfirmAttachmentId
+      };
+      this.$refs.UploadPaperDialog.open();
+    },
+    uploadConfirm(attachment, uploadType) {
+      if (uploadType === "paper") {
+        const index = this.paperAttachments.findIndex(
+          item => item.name === attachment.name
+        );
+        this.paperAttachments.splice(index, 1, { ...attachment });
+      } else {
+        this.paperConfirmAttachments.push(attachment);
+      }
+    },
+    deletePaperConfirmAttachment(index) {
+      this.paperConfirmAttachments.splice(index, 1);
+    },
+    // cardConfirm(data) {
+    //   this.examTaskDetail = this.$objAssign(this.examTaskDetail, data);
+    // },
+    getTaskDetailData() {
+      let data = { ...this.examTaskDetail };
+      data.paperType = this.paperAttachments.map(item => item.name).join(",");
+      data.paperAttachmentIds = JSON.stringify(this.paperAttachments, (k, v) =>
+        k === "url" ? undefined : v
+      );
+      data.paperConfirmAttachmentIds = JSON.stringify(
+        this.paperConfirmAttachments
+      );
+      return data;
+    },
+    // image-preview
+    toPreview(index) {
+      this.curImageIndex = index;
+      this.selectImage(index);
+      this.$refs.SimpleImagePreview.open();
+    },
+    selectImage(index) {
+      this.curImage = this.paperConfirmAttachments[index];
+    },
+    toPrevImage() {
+      if (this.curImageIndex === 0) {
+        this.curImageIndex = this.paperConfirmAttachments.length - 1;
+      } else {
+        this.curImageIndex--;
+      }
+
+      this.selectImage(this.curImageIndex);
+    },
+    toNextImage() {
+      if (this.curImageIndex === this.paperConfirmAttachments.length - 1) {
+        this.curImageIndex = 0;
+      } else {
+        this.curImageIndex++;
+      }
+
+      this.selectImage(this.curImageIndex);
+    }
+  }
+};
+</script>