|
@@ -136,7 +136,12 @@ import AnswerTemplateView from "../components/AnswerTemplateView.vue";
|
|
|
|
|
|
import { deepCopy } from "../../card/plugins/utils";
|
|
import { deepCopy } from "../../card/plugins/utils";
|
|
import { paperDetailInfoApi } from "../../paper/api";
|
|
import { paperDetailInfoApi } from "../../paper/api";
|
|
-import { paperTemplateListApi, paperAndAnswerPdfDownloadApi } from "../api";
|
|
|
|
|
|
+import {
|
|
|
|
+ paperTemplateListApi,
|
|
|
|
+ paperAndAnswerPdfDownloadApi,
|
|
|
|
+ paperParamInfoApi,
|
|
|
|
+ paperParamSaveApi,
|
|
|
|
+} from "../api";
|
|
import paperTemplateBuildMixins from "./paperTemplateBuildMixins";
|
|
import paperTemplateBuildMixins from "./paperTemplateBuildMixins";
|
|
import { buildPdf } from "@/plugins/htmlToPdf";
|
|
import { buildPdf } from "@/plugins/htmlToPdf";
|
|
|
|
|
|
@@ -155,6 +160,7 @@ export default {
|
|
viewType: this.$route.params.viewType,
|
|
viewType: this.$route.params.viewType,
|
|
seqMode: "MODE3",
|
|
seqMode: "MODE3",
|
|
showScaleEdit: false,
|
|
showScaleEdit: false,
|
|
|
|
+ buildConfig: {},
|
|
keys: [],
|
|
keys: [],
|
|
pdfScale: 6,
|
|
pdfScale: 6,
|
|
paperJson: {},
|
|
paperJson: {},
|
|
@@ -189,7 +195,6 @@ export default {
|
|
this.initFrame();
|
|
this.initFrame();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
-
|
|
|
|
this.initData();
|
|
this.initData();
|
|
this.registScaleEvent();
|
|
this.registScaleEvent();
|
|
},
|
|
},
|
|
@@ -293,6 +298,8 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
async initData() {
|
|
async initData() {
|
|
|
|
+ await this.getParamInfo();
|
|
|
|
+
|
|
this.watermarkBg = await this.initWatermark();
|
|
this.watermarkBg = await this.initWatermark();
|
|
await this.getPaperJson();
|
|
await this.getPaperJson();
|
|
await this.getPaperTempList();
|
|
await this.getPaperTempList();
|
|
@@ -303,6 +310,20 @@ export default {
|
|
}
|
|
}
|
|
this.paperTempChange(this.paperTempList[0]);
|
|
this.paperTempChange(this.paperTempList[0]);
|
|
},
|
|
},
|
|
|
|
+ async getParamInfo() {
|
|
|
|
+ const res = await paperParamInfoApi(this.paperId);
|
|
|
|
+ this.seqMode = res.data.seqMode;
|
|
|
|
+ this.curPaperTemp = res.data.curPaperTemp;
|
|
|
|
+ this.buildConfig = res.data;
|
|
|
|
+ },
|
|
|
|
+ async saveParamInfo() {
|
|
|
|
+ await paperParamSaveApi({
|
|
|
|
+ paperId: this.paperId,
|
|
|
|
+ seqMode: this.seqMode,
|
|
|
|
+ curPaperTemp: this.curPaperTemp,
|
|
|
|
+ ...this.$refs.PaperBuildConfig.getData(),
|
|
|
|
+ });
|
|
|
|
+ },
|
|
async getPaperJson() {
|
|
async getPaperJson() {
|
|
const res = await paperDetailInfoApi({
|
|
const res = await paperDetailInfoApi({
|
|
paperId: this.paperId,
|
|
paperId: this.paperId,
|
|
@@ -513,6 +534,7 @@ export default {
|
|
);
|
|
);
|
|
if (!valid) return;
|
|
if (!valid) return;
|
|
|
|
|
|
|
|
+ this.saveParamInfo();
|
|
this.actionType = actionType;
|
|
this.actionType = actionType;
|
|
const configData = this.$refs.PaperBuildConfig.getData();
|
|
const configData = this.$refs.PaperBuildConfig.getData();
|
|
if (JSON.stringify(configData) === JSON.stringify(this.configModalForm)) {
|
|
if (JSON.stringify(configData) === JSON.stringify(this.configModalForm)) {
|