123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <template>
- <j-modal
- :title="title"
- :width="width"
- :visible="visible"
- switchFullscreen
- @ok="handleOk"
- :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
- @cancel="handleCancel"
- cancelText="关闭">
- <div class="attrPane">
- <rm-gcxxcj-form ref="realForm" :lng="this.lng" :lat="this.lat" @ok="submitCallback"
- :disabled="disableSubmit" @coordsChange="coordsChange"></rm-gcxxcj-form>
- </div>
- <div class="geomPane">
- <basic-map ref="locMap" height='702px' layersUrl='/resManager.catalog/rescatalog/resList'
- :model="{...model,layerName:'临时采集'}"></basic-map>
- </div>
- </j-modal>
- </template>
- <script>
- import RmGcxxcjForm from './RmGcxxcjForm'
- import BasicMap from "../../../../../components/BasicMap/BasicMap";
- export default {
- name: 'RmGcxxcjModal',
- components: {
- RmGcxxcjForm,
- BasicMap
- },
- data () {
- return {
- title:'',
- width:800,
- visible: false,
- disableSubmit: false
- }
- },
- methods: {
- add () {
- this.visible=true
- this.$nextTick(()=>{
- this.$refs.realForm.add();
- })
- },
- edit (record) {
- this.visible=true
- 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.submitForm();
- },
- submitCallback(){
- this.$emit('ok');
- this.visible = false;
- },
- handleCancel () {
- this.close()
- },
- tabsChange(key) {
- let that = this;
- if (key == "map") {
- this.$nextTick(() => {
- this.$refs.locMap.locateByCoords({...this.model});
- })
- }
- },
- 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>
- .attrPane {
- width: 33%;
- display: inline-block;
- overflow-y: auto;
- height: 703px;
- }
- .geomPane {
- width: 66%;
- display: inline-block;
- }
- </style>
|