ScanAreaDialog.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <Modal
  3. class="scan-area-dialog"
  4. v-model="modalIsShow"
  5. title="设置当前试卷采集信息"
  6. :mask-closable="false"
  7. :closable="false"
  8. fullscreen
  9. footer-hide
  10. >
  11. <div class="part-box">
  12. <scan-area-steps
  13. :image-url="curImage.url"
  14. :cur-setting="curCollectConfig"
  15. @on-finished="finished"
  16. v-if="curImage.url && modalIsShow && curCollectConfig"
  17. ></scan-area-steps>
  18. </div>
  19. </Modal>
  20. </template>
  21. <script>
  22. import ScanAreaSteps from "../components/ScanAreaSteps";
  23. export default {
  24. name: "scan-area-dialog",
  25. components: { ScanAreaSteps },
  26. props: {
  27. curImage: {
  28. type: Object,
  29. default() {
  30. return {
  31. url: "",
  32. name: ""
  33. };
  34. }
  35. },
  36. curCollectConfig: {
  37. type: Object,
  38. default() {
  39. return {};
  40. }
  41. }
  42. },
  43. data() {
  44. return {
  45. modalIsShow: false,
  46. curSetting: null
  47. };
  48. },
  49. methods: {
  50. cancel() {
  51. this.modalIsShow = false;
  52. },
  53. open() {
  54. this.modalIsShow = true;
  55. },
  56. finished(setting) {
  57. this.$emit("confirm", setting);
  58. this.cancel();
  59. }
  60. }
  61. };
  62. </script>