|
@@ -87,6 +87,7 @@ export default {
|
|
return {
|
|
return {
|
|
isPrint: this.$route.params.viewType !== "view",
|
|
isPrint: this.$route.params.viewType !== "view",
|
|
isFrame: this.$route.params.viewType === "frame",
|
|
isFrame: this.$route.params.viewType === "frame",
|
|
|
|
+ isFrameView: this.$route.params.viewType === "frame-view",
|
|
studentNo: this.$route.params.studentNo,
|
|
studentNo: this.$route.params.studentNo,
|
|
cardId: this.$route.params.cardId,
|
|
cardId: this.$route.params.cardId,
|
|
cardConfig: {},
|
|
cardConfig: {},
|
|
@@ -106,6 +107,8 @@ export default {
|
|
mounted() {
|
|
mounted() {
|
|
if (this.isFrame) {
|
|
if (this.isFrame) {
|
|
this.initFrame();
|
|
this.initFrame();
|
|
|
|
+ } else if (this.isFrameView) {
|
|
|
|
+ this.initFrameView();
|
|
} else {
|
|
} else {
|
|
this.init();
|
|
this.init();
|
|
}
|
|
}
|
|
@@ -140,6 +143,30 @@ export default {
|
|
window.parent.submitCardTemp(cardContentTemp);
|
|
window.parent.submitCardTemp(cardContentTemp);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ async initFrameView() {
|
|
|
|
+ const tempData = await cardTempDetail(this.cardId);
|
|
|
|
+ if (!tempData) {
|
|
|
|
+ this.$message.error("很抱歉,当前题卡还没开始制作!");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ const { cardConfig, pages } = JSON.parse(tempData.content);
|
|
|
|
+ let fieldInfos = {};
|
|
|
|
+ cardConfig.businessParams.map(item => {
|
|
|
|
+ fieldInfos[item.field] = "${" + item.field + "}";
|
|
|
|
+ });
|
|
|
|
+ if (cardConfig.examNumberStyle === "auto") {
|
|
|
|
+ fieldInfos.examNumber = "data:image/png;base64,${examNumber}";
|
|
|
|
+ fieldInfos.examNumberStr = "${examNumberStr}";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (cardConfig.aOrB && cardConfig.aOrBType === "auto") {
|
|
|
|
+ fieldInfos.paperType = "data:image/png;base64,${paperType}";
|
|
|
|
+ fieldInfos.paperTypeName = "${paperTypeName}";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.cardConfig = cardConfig;
|
|
|
|
+ this.pages = this.appendFieldInfo(pages, fieldInfos);
|
|
|
|
+ },
|
|
async init() {
|
|
async init() {
|
|
const tempData = await cardTempDetail(this.cardId);
|
|
const tempData = await cardTempDetail(this.cardId);
|
|
if (!tempData) {
|
|
if (!tempData) {
|