f492ed7683e361edbb93be6412b6c14dbcd62123.svn-base 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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-hhglfwx-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></rm-hhglfwx-form>
  13. </div>
  14. <div class="geomPane">
  15. <basic-map height='775px' layersUrl='/resManager.catalog/rescatalog/resList' :model="{...model,layerName:'管理范围线'}"></basic-map>
  16. </div>
  17. </j-modal>
  18. </template>
  19. <script>
  20. import RmHhglfwxForm from './RmHhglfwxForm';
  21. import {getAction} from "@api/manage";
  22. import BasicMap from "../../../../../components/BasicMap/BasicMap";
  23. export default {
  24. name: 'RmHhglfwxModal',
  25. components: {
  26. BasicMap,
  27. RmHhglfwxForm
  28. },
  29. data() {
  30. return {
  31. title: '',
  32. width: 1200,
  33. visible: false,
  34. mapHeight: "775px",
  35. disableSubmit: false,
  36. model:{}
  37. }
  38. },
  39. methods: {
  40. add() {
  41. this.visible = true
  42. this.$nextTick(() => {
  43. this.$refs.realForm.add();
  44. })
  45. },
  46. edit(record) {
  47. this.geoinfo = record.geoinfo;
  48. this.visible = true;
  49. this.model = record;
  50. this.$nextTick(() => {
  51. this.$refs.realForm.edit(record);
  52. })
  53. },
  54. close() {
  55. this.$emit('close');
  56. this.visible = false;
  57. },
  58. handleOk() {
  59. this.$refs.realForm.submitForm();
  60. },
  61. submitCallback() {
  62. this.$emit('ok');
  63. this.visible = false;
  64. },
  65. handleCancel() {
  66. this.close();
  67. },
  68. locMapReady(){
  69. this.locateByGeom();
  70. },
  71. locateByGeom() {
  72. this.$refs.locMap.locateByGeometry(JSON.parse(this.geoinfo));
  73. }
  74. }
  75. }
  76. </script>
  77. <style scoped>
  78. .attrPane {
  79. width: 33%;
  80. display: inline-block;
  81. overflow-y: auto;
  82. height: 775px;
  83. }
  84. .geomPane {
  85. width: 66%;
  86. display: inline-block;
  87. }
  88. </style>