d1a276e47ef29680962f27c2892c2f6b7ccd03d9.svn-base 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. <!-- <rm-xcjgjl-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></rm-xcjgjl-form>-->
  12. <a-tabs default-active-key="attrs" @change="tabsChange">
  13. <a-tab-pane key="attrs" tab="属性信息">
  14. <rm-xcjgjl-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></rm-xcjgjl-form>
  15. </a-tab-pane>
  16. <a-tab-pane key="map" tab="位置信息">
  17. <basic-map ref="locMap" layersUrl='/resManager.catalog/rescatalog/resList' :model="{...model,layerName:''}"></basic-map>
  18. </a-tab-pane>
  19. </a-tabs>
  20. </j-modal>
  21. </template>
  22. <script>
  23. import RmXcjgjlForm from './RmXcjgjlForm'
  24. import BasicMap from "../../../../../components/BasicMap/BasicMap";
  25. export default {
  26. name: 'RmXcjgjlModal',
  27. components: {
  28. BasicMap,
  29. RmXcjgjlForm
  30. },
  31. data () {
  32. return {
  33. title:'',
  34. width:896,
  35. visible: false,
  36. disableSubmit: false,
  37. model:''
  38. }
  39. },
  40. methods: {
  41. add () {
  42. this.visible=true
  43. this.$nextTick(()=>{
  44. this.$refs.realForm.add();
  45. })
  46. },
  47. edit (record) {
  48. this.lng = record.jd;
  49. this.lat = record.wd;
  50. this.model = record;
  51. this.visible = true
  52. this.$nextTick(() => {
  53. this.$refs.realForm.edit(record);
  54. })
  55. },
  56. close () {
  57. this.$emit('close');
  58. this.visible = false;
  59. },
  60. handleOk () {
  61. this.$refs.realForm.submitForm();
  62. },
  63. submitCallback(){
  64. this.$emit('ok');
  65. this.visible = false;
  66. },
  67. handleCancel () {
  68. this.close()
  69. } ,
  70. tabsChange(key) {
  71. let that = this;
  72. if (key == "map") {
  73. this.$nextTick(() => {
  74. this.$refs.locMap.handleCoord({...this.model});
  75. })
  76. }
  77. },
  78. }
  79. }
  80. </script>