|
@@ -31,6 +31,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { mapState } from "vuex";
|
|
|
import CodeArea from "./steps/CodeArea.vue";
|
|
|
import CoverArea from "./steps/CoverArea.vue";
|
|
|
import ImageOrientation from "./steps/ImageOrientation.vue";
|
|
@@ -39,33 +40,6 @@ import TailorTailorArea from "./steps/TailorTailorArea.vue";
|
|
|
import AnswerCheckArea from "./steps/AnswerCheckArea.vue";
|
|
|
import { deepCopy, objTypeOf } from "../../../plugins/utils";
|
|
|
|
|
|
-const STEPS_LIST = [
|
|
|
- {
|
|
|
- name: "code-area",
|
|
|
- title: "条形码区域"
|
|
|
- },
|
|
|
- {
|
|
|
- name: "cover-area",
|
|
|
- title: "信息覆盖区域设置"
|
|
|
- },
|
|
|
- {
|
|
|
- name: "origin-tailor-area",
|
|
|
- title: "原图切图设置"
|
|
|
- },
|
|
|
- {
|
|
|
- name: "tailor-tailor-area",
|
|
|
- title: "阅卷图切图设置"
|
|
|
- },
|
|
|
- {
|
|
|
- name: "answer-check-area",
|
|
|
- title: "是否作答检测区域"
|
|
|
- },
|
|
|
- {
|
|
|
- name: "image-orientation",
|
|
|
- title: "图片方向设置"
|
|
|
- }
|
|
|
-];
|
|
|
-
|
|
|
export default {
|
|
|
name: "scan-area-steps",
|
|
|
components: {
|
|
@@ -90,7 +64,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- STEPS_LIST,
|
|
|
+ stepList: [],
|
|
|
current: 0,
|
|
|
nextHolder: true,
|
|
|
dataReady: true,
|
|
@@ -98,14 +72,16 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
+ this.getSteps();
|
|
|
this.newSetting = deepCopy(this.curSetting);
|
|
|
},
|
|
|
computed: {
|
|
|
+ ...mapState("client", ["clientConfig"]),
|
|
|
currentComponent() {
|
|
|
- return this.STEPS_LIST[this.current].name;
|
|
|
+ return this.stepList[this.current].name;
|
|
|
},
|
|
|
currentComponentTitle() {
|
|
|
- return this.STEPS_LIST[this.current].title;
|
|
|
+ return this.stepList[this.current].title;
|
|
|
},
|
|
|
isFirstStep() {
|
|
|
return this.current === 0;
|
|
@@ -114,10 +90,41 @@ export default {
|
|
|
return this.current === this.lastStep;
|
|
|
},
|
|
|
lastStep() {
|
|
|
- return this.STEPS_LIST.length - 1;
|
|
|
+ return this.stepList.length - 1;
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getSteps() {
|
|
|
+ const steps = [
|
|
|
+ {
|
|
|
+ name: "code-area",
|
|
|
+ title: "条形码区域"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "cover-area",
|
|
|
+ title: "信息覆盖区域设置"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "origin-tailor-area",
|
|
|
+ title: "原图切图设置"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "tailor-tailor-area",
|
|
|
+ title: "阅卷图切图设置"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "answer-check-area",
|
|
|
+ title: "是否作答检测区域"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "image-orientation",
|
|
|
+ title: "图片方向设置"
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ this.stepList = this.clientConfig.packageScan
|
|
|
+ ? steps.splice(4, 1)
|
|
|
+ : steps;
|
|
|
+ },
|
|
|
prevStep() {
|
|
|
if (this.isFirstStep) return;
|
|
|
this.current -= 1;
|