78e9b4898c21a4dbb53cbaa87e4e57b726c40b98.svn-base 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <j-modal
  3. :title="title"
  4. :width="width"
  5. :visible="visible"
  6. switchFullscreen
  7. @ok="handleOk"
  8. :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
  9. @cancel="handleCancel"
  10. cancelText="关闭">
  11. <div class="attrPane">
  12. <rm-yhdl-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></rm-yhdl-form>
  13. </div>
  14. <div class="geomPane">
  15. <basic-map layersUrl='/resManager.catalog/rescatalog/resList' :model="{...model,layerName:'沿河道路'}"></basic-map>
  16. </div>
  17. </j-modal>
  18. </template>
  19. <script>
  20. import RmYhdlForm from './RmYhdlForm'
  21. import BasicMap from "@comp/BasicMap/BasicMap";
  22. export default {
  23. name: 'RmYhdlModal',
  24. components: {
  25. RmYhdlForm,
  26. BasicMap
  27. },
  28. data() {
  29. return {
  30. title: '',
  31. width: 800,
  32. visible: false,
  33. disableSubmit: false
  34. }
  35. },
  36. methods: {
  37. add() {
  38. this.visible = true
  39. this.$nextTick(() => {
  40. this.$refs.realForm.add();
  41. })
  42. },
  43. edit(record) {
  44. this.visible = true;
  45. this.model = record;
  46. this.$nextTick(() => {
  47. this.$refs.realForm.edit(record);
  48. })
  49. },
  50. close() {
  51. this.$emit('close');
  52. this.visible = false;
  53. },
  54. handleOk() {
  55. this.$refs.realForm.submitForm();
  56. },
  57. submitCallback() {
  58. this.$emit('ok');
  59. this.visible = false;
  60. },
  61. handleCancel() {
  62. this.close()
  63. }
  64. }
  65. }
  66. </script>
  67. <style scoped>
  68. .attrPane {
  69. width: 33%;
  70. display: inline-block;
  71. overflow-y: auto;
  72. height: 750px;
  73. }
  74. .geomPane {
  75. width: 66%;
  76. display: inline-block;
  77. }
  78. </style>