9d4128e795e814044cb6339229a6bb3026082951.svn-base 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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-videogeo-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" @coordsChange="coordsChange"></rm-videogeo-form>
  13. </div>
  14. <div class="geomPane">
  15. <basic-map height='482px' layersUrl='/resManager.catalog/rescatalog/resList' :model="{...model,layerName:'视频监控'}"></basic-map>
  16. </div>
  17. </j-modal>
  18. </template>
  19. <script>
  20. import RmVideogeoForm from './RmVideogeoForm'
  21. import BasicMap from "../../../../components/BasicMap/BasicMap";
  22. export default {
  23. name: 'RmVideogeoModal',
  24. components: {
  25. BasicMap,
  26. RmVideogeoForm
  27. },
  28. data() {
  29. return {
  30. title: '',
  31. width: 1000,
  32. visible: false,
  33. disableSubmit: false,
  34. mapHeight: "482px",
  35. model:{}
  36. }
  37. },
  38. methods: {
  39. add() {
  40. this.visible = true
  41. this.$nextTick(() => {
  42. this.$refs.realForm.add();
  43. })
  44. },
  45. edit(record) {
  46. this.model = record;
  47. this.lng = record.lng;
  48. this.lat = record.lat;
  49. this.visible = true
  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. locateByCoords() {
  69. this.$nextTick(() => {
  70. this.$refs.locMap.locateByCoords(this.lng, this.lat);
  71. })
  72. },
  73. locMapReady() {
  74. this.locateByCoords();
  75. },
  76. coordsChange(lng, lat) {
  77. this.$refs.locMap.locateByCoords(lng, lat);
  78. }
  79. }
  80. }
  81. </script>
  82. <style scoped>
  83. .attrPane {
  84. width: 33%;
  85. display: inline-block;
  86. }
  87. .geomPane {
  88. width: 66%;
  89. display: inline-block;
  90. }
  91. </style>