| | |
| | | <el-button type="info" @click="clearQuery" plain>重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <queryinfo ref="queryinfo" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import queryinfo from "../../views/Tools/queryinfo.vue" |
| | | import $ from 'jquery'; |
| | | import { inquiry_SelectTabs, inquiry_uploadShp, encr } from '../../api/api.js'; |
| | | import { getToken } from '@/utils/auth'; |
| | | import * as turf from '@turf/turf'; |
| | | export default { |
| | | components:{queryinfo}, |
| | | data() { |
| | | return { |
| | | menuTopFrom: { |
| | |
| | | layerData: [ |
| | | { |
| | | id: 1, |
| | | label: '基础数据', |
| | | tabDesc: '基础数据', |
| | | value: 'BD', |
| | | children: [], |
| | | }, |
| | | { |
| | | id: 2, |
| | | label: '业务数据', |
| | | tabDesc: '业务数据', |
| | | value: 'BS', |
| | | children: [], |
| | |
| | | ], |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'tabDesc', |
| | | label: 'label', |
| | | }, |
| | | graphicLayer: null, |
| | | }; |
| | |
| | | for (var i in option) { |
| | | var val_Data = option[i]; |
| | | val_Data.id = '1' + i; |
| | | val_Data.label = val_Data.tabDesc + '(' + val_Data.tab + ')'; |
| | | if (option[i].ns == 'bd') { |
| | | this.layerData[0].children.push(val_Data); |
| | | } else { |
| | |
| | | //清空标绘 |
| | | sgworld.Creator.SimpleGraphic.edit(false, { editProp: false }); |
| | | sgworld.Creator.SimpleGraphic.clear(); |
| | | |
| | | if (this.treeChange.length == 0) { |
| | | this.$message.error('请选择要查询的数据'); |
| | | return; |
| | | } |
| | | if (this.menuTopFrom.queryType != 'inputFile') { |
| | | sgworld.Creator.createSimpleGraphic( |
| | | this.menuTopFrom.queryType, |
| | | {}, |
| | | { |
| | | color: '#00FF0060', |
| | | outlineColor: '#0f0', |
| | | outlineWidth: 5, |
| | | }, |
| | | (entity) => { |
| | | this.setTurfGeometry(entity); |
| | | } |
| | |
| | | if (type == 'polyline') { |
| | | var line = turf.lineString(std, { name: 'polyline' }); |
| | | restVal = turf.buffer(line, 10, { units: 'miles' }); |
| | | console.log('line', restVal); |
| | | } else if (type == 'rectangle') { |
| | | var ste = this.setCartesianToEightFour(res[0]); |
| | | std.push([ste.lng, ste.lat]); |
| | |
| | | }, |
| | | showMapMenuPop() { |
| | | this.$store.state.mapSpaceQueryLayer = this.treeChange; |
| | | if ( |
| | | this.$store.state.mapPopBoolean != true && |
| | | this.$store.state.mapPopBoxFlag != '1' |
| | | ) { |
| | | this.$store.state.mapPopBoolean = true; |
| | | this.$store.state.mapPopBoxFlag = '1'; |
| | | } |
| | | this.$store.state.mapPopBoxFlag = '1'; |
| | | this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.open("空间查询",null,{ close: () => { |
| | | |
| | | }}); |
| | | this.$bus.$emit('changeMapMenuTop', 'true'); |
| | | sgworld.Creator.SimpleGraphic.edit(false, { editProp: false }); |
| | | sgworld.Creator.SimpleGraphic.clear(); |
| | | //清空inputFile |
| | | // var file = document.getElementById('getMenuTopFile'); |
| | | // file.outerHTML = file.outerHTML; |