12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <template>
- <j-modal
- :title="title"
- :width="width"
- :visible="visible"
- switchFullscreen
- @ok="handleOk"
- :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
- @cancel="handleCancel"
- cancelText="关闭">
- <div class="attrPane">
- <rm-hhglfwx-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></rm-hhglfwx-form>
- </div>
- <div class="geomPane">
- <basic-map height='775px' layersUrl='/resManager.catalog/rescatalog/resList' :model="{...model,layerName:'管理范围线'}"></basic-map>
- </div>
- </j-modal>
- </template>
- <script>
- import RmHhglfwxForm from './RmHhglfwxForm';
- import {getAction} from "@api/manage";
- import BasicMap from "../../../../../components/BasicMap/BasicMap";
- export default {
- name: 'RmHhglfwxModal',
- components: {
- BasicMap,
- RmHhglfwxForm
- },
- data() {
- return {
- title: '',
- width: 1200,
- visible: false,
- mapHeight: "775px",
- disableSubmit: false,
- model:{}
- }
- },
- methods: {
- add() {
- this.visible = true
- this.$nextTick(() => {
- this.$refs.realForm.add();
- })
- },
- edit(record) {
- this.geoinfo = record.geoinfo;
- this.visible = true;
- this.model = record;
- 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();
- },
- locMapReady(){
- this.locateByGeom();
- },
- locateByGeom() {
- this.$refs.locMap.locateByGeometry(JSON.parse(this.geoinfo));
- }
- }
- }
- </script>
- <style scoped>
- .attrPane {
- width: 33%;
- display: inline-block;
- overflow-y: auto;
- height: 775px;
- }
- .geomPane {
- width: 66%;
- display: inline-block;
- }
- </style>
|