123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <template>
- <j-modal
- :title="title"
- :width="width"
- :visible="visible"
- switchFullscreen
- @ok="handleOk"
- :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
- @cancel="handleCancel"
- cancelText="关闭">
- <div class="attrPane">
- <rm-videogeo-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" @coordsChange="coordsChange"></rm-videogeo-form>
- </div>
- <div class="geomPane">
- <basic-map height='482px' layersUrl='/resManager.catalog/rescatalog/resList' :model="{...model,layerName:'视频监控'}"></basic-map>
- </div>
- </j-modal>
- </template>
- <script>
- import RmVideogeoForm from './RmVideogeoForm'
- import BasicMap from "../../../../components/BasicMap/BasicMap";
- export default {
- name: 'RmVideogeoModal',
- components: {
- BasicMap,
- RmVideogeoForm
- },
- data() {
- return {
- title: '',
- width: 1000,
- visible: false,
- disableSubmit: false,
- mapHeight: "482px",
- model:{}
- }
- },
- methods: {
- add() {
- this.visible = true
- this.$nextTick(() => {
- this.$refs.realForm.add();
- })
- },
- edit(record) {
- this.model = record;
- this.lng = record.lng;
- this.lat = record.lat;
- 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()
- },
- locateByCoords() {
- this.$nextTick(() => {
- this.$refs.locMap.locateByCoords(this.lng, this.lat);
- })
- },
- locMapReady() {
- this.locateByCoords();
- },
- coordsChange(lng, lat) {
- this.$refs.locMap.locateByCoords(lng, lat);
- }
- }
- }
- </script>
- <style scoped>
- .attrPane {
- width: 33%;
- display: inline-block;
- }
- .geomPane {
- width: 66%;
- display: inline-block;
- }
- </style>
|