12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <template>
- <j-modal
- :title="title"
- :width="1200"
- :visible="visible"
- :maskClosable="false"
- switchFullscreen
- @ok="handleOk"
- :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
- @cancel="handleCancel">
- <a-tabs default-active-key="attrs" @change="tabsChange">
- <a-tab-pane key="attrs" tab="属性信息">
- <rm-shxmxxb-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></rm-shxmxxb-form>
- </a-tab-pane>
- <a-tab-pane key="map" tab="位置信息">
- <basic-map layersUrl='/resManager.catalog/rescatalog/resList' :model="{...model,layerName:''}"></basic-map>
- </a-tab-pane>
- </a-tabs>
- </j-modal>
- </template>
- <script>
- import RmShxmxxbForm from './RmShxmxxbForm'
- import BasicMap from "../../../../../components/BasicMap/BasicMap";
- export default {
- name: 'RmShxmxxbModal',
- components: {
- BasicMap,
- RmShxmxxbForm
- },
- data() {
- return {
- title:'',
- width:800,
- visible: false,
- disableSubmit: false
- }
- },
- methods:{
- add () {
- this.visible=true
- this.$nextTick(()=>{
- this.$refs.realForm.add();
- })
- },
- edit (record) {
- this.lng = record.jd;
- this.lat = record.wd;
- this.model = record;
- this.visible = true
- this.$nextTick(() => {
- this.$refs.realForm.edit(record);
- })
- },
- close () {
- this.$emit('close');
- this.visible = false;
- },
- handleOk () {
- this.$refs.realForm.handleOk();
- },
- submitCallback(){
- this.$emit('ok');
- this.visible = false;
- },
- handleCancel () {
- this.close()
- },
- tabsChange(key) {
- let that = this;
- if (key == "map") {
- this.$nextTick(() => {
- // this.$refs.queryTool.handleCoord(this.geoinfo);
- })
- }
- },
- locateByCoords() {
- let loc_x = this.lng;
- let loc_y = this.lat;
- this.$refs.locMap.locateByCoords(loc_x, loc_y);
- }
- },
- beforeMount() {
- if (!this.height) {
- let calcHeight = window.document.documentElement.clientHeight - 225;
- let m_height = calcHeight.toString() + 'px';
- this.mapHeight = m_height;
- }
- }
- }
- </script>
- <style scoped>
- </style>
|