| | |
| | | return request.get('/perms/selectLayers', { params: params }); |
| | | } |
| | | |
| | | |
| | | //综åå±ç¤º=>å页æ¥è¯¢æ¨¡åå¹¶è¿åè®°å½æ° |
| | | export function comprehensive_selectModelByPageAndCount(params) { |
| | | return request.get('/comprehensive/selectModelByPageAndCount', { params: params }); |
| | | } |
| | | //综åå±ç¤º=>æ ¹æ®Guidæ¥è¯¢æ¨¡å |
| | | export function comprehensive_selectModelByGuid(params) { |
| | | return request.get('/comprehensive/selectModelByGuid', { params: params }); |
| | | } |
| | | |
| | | |
| | | //综åå±ç¤º=>æ ¹æ®Guidæ¥è¯¢æ¨¡å |
| | | export function comprehensive_selectFiles(params) { |
| | | return request.get('/comprehensive/selectFiles', { params: params }); |
| | | } |
| | | |
| | | |
| | | //综åå±ç¤º=>æ ¹æ®Guidæ¥è¯¢æ¨¡å |
| | | export function comprehensive_deletes(params) { |
| | | return request.get('/comprehensive/deletes', { params: params }); |
| | | } |
| | | //综åå±ç¤º=>æå
¥ä¸ä¸ªæ¨¡å |
| | | export function comprehensive_insertModel(params) { |
| | | return request.post('/comprehensive/insertModel', params); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | title: 'Title', |
| | | preview: 'preview', |
| | | attribute: 'Attribute', |
| | | id: "ID", |
| | | info: 'Info' |
| | | }, |
| | | |
| | | dataManage: { |
| | |
| | | title: 'æ é¢', |
| | | preview: 'é¢è§', |
| | | attribute: '屿§', |
| | | id: "ID", |
| | | info: 'ä¿¡æ¯' |
| | | }, |
| | | dataManage: { |
| | | dataManage: 'æ°æ®ç®¡ç', |
| | |
| | | //åå§åæ¥è¯¢æ¡ä»¶ |
| | | showSpacePopLayer() { |
| | | let val_date = this.optionx[0] |
| | | if (val_date == null || val_date == undefined) { |
| | | return |
| | | } |
| | | this.formInline.name = val_date.field |
| | | this.options = [] |
| | | var std = [] |
| | |
| | | > |
| | | <el-card class="box-card"> |
| | | <div slot="header"> |
| | | <span>{{$store.state.propertiesName.tabDesc || '屿§ä¿¡æ¯'}}</span> |
| | | <span>屿§ä¿¡æ¯</span> |
| | | <div style="float: right; cursor: pointer"> |
| | | <el-link |
| | | type="primary" |
| | |
| | | |
| | | </el-card> |
| | | </div> |
| | | |
| | | <!--éä»¶å表弹çª--> |
| | | <el-dialog |
| | | title="éä»¶å表" |
| | |
| | | this.$bus.$on('changemapType', (e) => { |
| | | this.show2DMap = e; |
| | | }); |
| | | //æ¨¡åææ |
| | | this.catchmodel() |
| | | }, |
| | | methods: { |
| | | |
| | | catchmodel() { |
| | | var that = this; |
| | | window.pickedFeature; |
| | | window.pickedColor; |
| | | window.modeCatchHandler = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas); |
| | | window.modeCatchHandler.setInputAction((event) => { |
| | | window.pickedFeature && (window.pickedFeature.color = window.pickedColor); |
| | | window.pickedFeature = sgworld.Viewer.scene.pick(event.position); |
| | | if (Cesium.defined(window.pickedFeature)) { |
| | | if (window.pickedFeature.primitive instanceof Cesium.Cesium3DTileset) { |
| | | if (window.pickedFeature && window.pickedFeature.getProperty) { |
| | | window.pickedColor = window.pickedFeature.color |
| | | window.pickedFeature.color = Cesium.Color.RED.withAlpha(0.3); |
| | | |
| | | this.$store.state.catModel = true; |
| | | this.$store.state.catModelInfo = { |
| | | id: pickedFeature.getProperty("id"), |
| | | name: pickedFeature.getProperty("name"), |
| | | layerId: pickedFeature.primitive.layerId, |
| | | layerName: pickedFeature.primitive.id |
| | | }; |
| | | } |
| | | } |
| | | } |
| | | }, Cesium.ScreenSpaceEventType.LEFT_CLICK) |
| | | }, |
| | | drawTerrainLevel() { |
| | | this.clearTerrainLevel() |
| | | var deep = parseFloat(this.terrainFrom.height) |
| | |
| | | url: gaoDeBaseUrl[1].url, |
| | | }) |
| | | ); |
| | | this.layer3 = Viewer.imageryLayers.addImageryProvider( |
| | | new Cesium.UrlTemplateImageryProvider({ |
| | | url: gaoDeBaseUrl[2].url, |
| | | }) |
| | | ); |
| | | // this.layer3 = Viewer.imageryLayers.addImageryProvider( |
| | | // new Cesium.UrlTemplateImageryProvider({ |
| | | // url: gaoDeBaseUrl[2].url, |
| | | // }) |
| | | // ); |
| | | |
| | | window.ImageLayer3 = this.layer3; |
| | | // window.ImageLayer3 = this.layer3; |
| | | |
| | | // for (var i in gaoDeBaseUrl) { |
| | | // sgworld.Creator.createUrlTemplateImageryProvider( |
| | |
| | | }, |
| | | setLayerVisible() { |
| | | if (this.isActive == true) { |
| | | // Viewer.imageryLayers._layers[1].show = true |
| | | // Viewer.imageryLayers._layers[2].show = false |
| | | Viewer.imageryLayers._layers[1].show = true |
| | | Viewer.imageryLayers._layers[2].show = false |
| | | // Viewer.imageryLayers._layers[3].show = false |
| | | |
| | | Viewer.imageryLayers.lower(this.layer2); |
| | | Viewer.imageryLayers.lower(this.layer3); |
| | | // Viewer.imageryLayers.lower(this.layer2); |
| | | // Viewer.imageryLayers.lower(this.layer3); |
| | | } else { |
| | | Viewer.imageryLayers.raise(this.layer3); |
| | | Viewer.imageryLayers.raise(this.layer2); |
| | | // Viewer.imageryLayers.raise(this.layer3); |
| | | // Viewer.imageryLayers.raise(this.layer2); |
| | | |
| | | // Viewer.imageryLayers._layers[1].show = false |
| | | // Viewer.imageryLayers._layers[2].show = true |
| | | Viewer.imageryLayers._layers[1].show = false |
| | | Viewer.imageryLayers._layers[2].show = true |
| | | // Viewer.imageryLayers._layers[3].show = true |
| | | } |
| | | }, |
| | |
| | | }, |
| | | //è·åéä»¶å表 |
| | | async getAttatchList() { |
| | | if (this.$store.state.propertiesName == null) { |
| | | return |
| | | } |
| | | let tabName = this.$store.state.propertiesName.ns + '.' + this.$store.state.propertiesName.tab; |
| | | let eventid = this.$store.state.propertiesInfo.eventid; |
| | | |
| | | var obj = { |
| | | eventid: eventid, |
| | | tabName: tabName, |
| | |
| | | padding: 10px 20px; |
| | | } |
| | | } |
| | | |
| | | .terrainLevelBox { |
| | | width: 350px; |
| | | height: 370px; |
| | |
| | | position: absolute; |
| | | right: 8%; |
| | | bottom: -11%; |
| | | } |
| | | .pathAnalysisBox { |
| | | width: 412px; |
| | | |
| | | z-index: 40; |
| | | position: absolute; |
| | | right: 8%; |
| | | bottom: 1%; |
| | | } |
| | | |
| | | .box-card { |
| | |
| | | checkedKeys: [], |
| | | queryInfo: [], |
| | | Map3: [], |
| | | histogramLayer: [] |
| | | histogramLayer: [], |
| | | attachModel: false, |
| | | attachinfo: null, |
| | | catModel: false, |
| | | catModelInfo: null, |
| | | }, |
| | | mutations: { |
| | | //è·åæéåé |
| | |
| | | <span v-show="formInline.dataType !='type2'">{{item.tabDesc}}</span> |
| | | <div style="float: right; padding: 3px 0"> |
| | | <i |
| | | v-show="!showView(item.type) && formInline.dataType=='type2'" |
| | | v-show=" formInline.dataType=='type2'" |
| | | v-if="showView(item.type) " |
| | | class="el-icon-view" |
| | | :title="$t('common.preview')" |
| | | @click="setAttatchFileView(index, item)" |
| | |
| | | }, |
| | | showView(name) { |
| | | if (!name) return false |
| | | return name.indexOf('pdf') || name.indexOf('jpg') != -1 || name.indexOf('gif') != -1 || name.indexOf('png') != -1 || name.indexOf('jpeg') != -1 |
| | | if (name.indexOf('pdf') || name.indexOf('jpg') != -1 || name.indexOf('gif') != -1 || name.indexOf('png') != -1 || name.indexOf('jpeg') != -1) { |
| | | return true |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | //éä»¶åªé¤ |
| | | async setAttachDel() { |
| | |
| | | <maplayer ref="maplayer" /> |
| | | <queryinfo ref="queryinfo" /> |
| | | <terrainDig ref="terrainDig" /> |
| | | <modelAttach ref="modelAttach" /> |
| | | <input |
| | | type="file" |
| | | accept=".kml" |
| | |
| | | multiple="multiple" |
| | | @change="handleOpenShp()" |
| | | /> |
| | | |
| | | <el-dialog |
| | | :title="formInline.title" |
| | | :visible.sync="dialogVisible" |
| | | :modal="false" |
| | | :modal-append-to-body="false" |
| | | :close-on-click-modal="false" |
| | | :before-close="handleClose" |
| | | width="30%" |
| | | > |
| | | <el-dialog |
| | | title="é¢è§" |
| | | :append-to-body="false" |
| | | :visible.sync="dialog.dialogVisible" |
| | | width="70%" |
| | | :modal="false" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <div |
| | | v-if="dialog.isPdf" |
| | | class="pdfClass" |
| | | > |
| | | <iframe |
| | | :src="dialog.src" |
| | | type="application/x-google-chrome-pdf" |
| | | width="100%" |
| | | height="100%" |
| | | > |
| | | </iframe> |
| | | </div> |
| | | <div |
| | | v-if="dialog.isJpg" |
| | | class="pdfClass" |
| | | > |
| | | <img |
| | | style="width:100%; height:100%" |
| | | :src="dialog.src" |
| | | alt="" |
| | | /> |
| | | </div> |
| | | </el-dialog> |
| | | <div style="height:63vh"> |
| | | <el-tabs |
| | | v-model="activeName" |
| | | @tab-click="handleClick" |
| | | > |
| | | <el-tab-pane |
| | | label="屿§" |
| | | name="first" |
| | | > |
| | | <el-form |
| | | ref="form" |
| | | :model="formInline" |
| | | label-width="80px" |
| | | > |
| | | |
| | | <el-form-item :label="$t('common.name')"> |
| | | <el-input v-model="formInline.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('common.type')"> |
| | | <el-input v-model="formInline.type"></el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item :label="$t('common.info')"> |
| | | <el-input v-model="formInline.info"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="URL"> |
| | | <el-input v-model="formInline.url"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="Icon"> |
| | | <el-input v-model="formInline.icon"></el-input> |
| | | </el-form-item> --> |
| | | <el-form-item :label="$t('common.bak')"> |
| | | <el-input v-model="formInline.bak"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | v-show="isShowModel" |
| | | type="success" |
| | | plain |
| | | size="small" |
| | | @click="InsertData" |
| | | >{{$t('common.increase')}}</el-button> |
| | | <el-button |
| | | v-show="!isShowModel" |
| | | type="info" |
| | | plain |
| | | size="small" |
| | | @click="EditData" |
| | | >{{$t('common.update')}}</el-button> |
| | | </el-form-item> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | </el-tab-pane> |
| | | <el-tab-pane |
| | | label="éä»¶" |
| | | name="second" |
| | | > |
| | | <el-table |
| | | :data="tableData" |
| | | ref="filterTable" |
| | | height="calc(100% - 130px)" |
| | | border |
| | | style="width: 100%" |
| | | @selection-change="handleAttatchChange" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="70" |
| | | /> |
| | | <el-table-column |
| | | width="60" |
| | | type="index" |
| | | :label="$t('common.index')" |
| | | /> |
| | | <el-table-column |
| | | prop="name" |
| | | :label="$t('common.name')" |
| | | /> |
| | | |
| | | <el-table-column |
| | | prop="sizes" |
| | | :label="$t('common.size')" |
| | | :formatter="statSizeChange" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('common.operate')" |
| | | min-width="100" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-link |
| | | v-if="matchState(scope, /[]/)" |
| | | @click="setAttatchDetail(scope.$index, scope.row)" |
| | | class="elLink" |
| | | >{{ $t('common.see') }}</el-link> |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | </el-tab-pane> |
| | | |
| | | </el-tabs> |
| | | <!-- <el-form :model="formInline"> |
| | | <el-form-item> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="20"> |
| | | <el-input |
| | | size="small" |
| | | disabled |
| | | v-model="formInline.file" |
| | | ></el-input> |
| | | |
| | | <input |
| | | name="file1" |
| | | type="file" |
| | | id="insertFile" |
| | | multiple="multiple" |
| | | style="display: none" |
| | | @change="insertFile( )" |
| | | /> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-link |
| | | @click="getInsertFile( )" |
| | | :underline="false" |
| | | icon="el-icon-folder" |
| | | > </el-link> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | @click="setAttachInsert" |
| | | size="mini" |
| | | type="primary" |
| | | plain |
| | | >æ·»å </el-button> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | size="mini" |
| | | @click="setAttachDel" |
| | | >å é¤</el-button> |
| | | </el-form-item> |
| | | </el-form> --> |
| | | <!-- @selection-change="handleAttatchChange" --> |
| | | |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import maplayer from "../Tools/maplayer.vue"; |
| | | import queryinfo from "../Tools/queryinfo.vue"; |
| | | import terrainDig from "../Tools/terrainDig.vue"; |
| | | import modelAttach from "../Tools/ModelAttach.vue"; |
| | | import $ from "jquery"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import ImageWMS from "ol/source/ImageWMS"; |
| | |
| | | import GeoJSON from "ol/format/GeoJSON.js"; |
| | | import { Vector as VectorSource } from "ol/source"; |
| | | import { Vector as VectorLayer } from "ol/layer"; |
| | | import { perms_selectLayers } from '../../api/api.js' |
| | | import { |
| | | perms_selectLayers, |
| | | comprehensive_selectModelByGuid, |
| | | comprehensive_selectFiles, |
| | | comprehensive_deletes, |
| | | comprehensive_selectModelByPageAndCount, |
| | | comprehensive_insertModel |
| | | } from "../../api/api.js"; |
| | | import { |
| | | OverviewMap, |
| | | defaults as defaultControls, |
| | |
| | | import { geometry } from "@turf/turf"; |
| | | |
| | | export default { |
| | | components: { mapinfo, maplayer, queryinfo, terrainDig }, |
| | | components: { mapinfo, maplayer, queryinfo, terrainDig, modelAttach }, |
| | | data() { |
| | | return { |
| | | showTwoMenuFlag: false, |
| | |
| | | isRouter: false, //è·¯å¾åæ |
| | | isPiple: false, //管éåæ |
| | | DXZPState: null, //å°å½¢æ´å¹³ |
| | | dialogVisible: false, |
| | | formInline: { |
| | | title: '', |
| | | file: '', |
| | | name: '', |
| | | type: '', |
| | | info: '', |
| | | icon: '', |
| | | bak: '' |
| | | }, |
| | | tableData: [], |
| | | dialog: { |
| | | dialogVisible: false, |
| | | isPdf: false, |
| | | isJpg: false, |
| | | src: '' |
| | | }, |
| | | activeName: "first", |
| | | isShowModel: false, |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | } |
| | | |
| | | if (this.isMenuFlag != val) { |
| | | if (res.id != 'b9') { |
| | | if (res.id != "b9") { |
| | | this.$store.state.mapMenuBoolean = false; |
| | | this.$store.state.mapMenuBoxFlag = null; |
| | | this.$store.state.mapPopBoolean = false; |
| | |
| | | this.$store.state.primitLayer = null; |
| | | } |
| | | } |
| | | |
| | | } |
| | | this.showTwoMenuFlag = res.id; |
| | | |
| | |
| | | var val = { |
| | | name: "Lengend", |
| | | id: res, |
| | | vshow: that.isslopeFlag |
| | | vshow: that.isslopeFlag, |
| | | }; |
| | | this.$bus.$emit("mapChangeBox", val); |
| | | window.PDelevationTool = new SmartEarth.ElevationTool(sgworld); //å
¨å±åé |
| | |
| | | |
| | | break; |
| | | case "d3": //è·¯å¾åæ |
| | | |
| | | this.isRouter = !this.isRouter; |
| | | let value; |
| | | if (this.isRouter) { |
| | | value = { |
| | | name: "Analysis", |
| | | id: 3, |
| | | show: true |
| | | show: true, |
| | | }; |
| | | } else { |
| | | value = { |
| | | name: "Analysis", |
| | | id: 3, |
| | | show: false |
| | | show: false, |
| | | }; |
| | | } |
| | | this.$bus.$emit("mapChangeBox", value); |
| | |
| | | var that = this; |
| | | window.model = sgworld.Creator.create3DTilesets( |
| | | "", |
| | | modelUrl + '/tileset/m/SN/tileset.json', |
| | | modelUrl + "/tileset/m/SN/tileset.json", |
| | | {}, |
| | | {}, |
| | | "0", |
| | |
| | | close: () => { |
| | | if (this.$store.state.pipelineEntity.length != 0) { |
| | | for (var i in this.$store.state.pipelineEntity) { |
| | | sgworld.Viewer.entities.remove(this.$store.state.pipelineEntity[i]); |
| | | sgworld.Viewer.entities.remove( |
| | | this.$store.state.pipelineEntity[i] |
| | | ); |
| | | } |
| | | } |
| | | }, |
| | |
| | | break; |
| | | |
| | | case "d11": //å°å½¢å¼æ |
| | | this.$refs && |
| | | this.$refs.terrainDig && |
| | | this.$refs.terrainDig.open("管é空é´åæ", null, { |
| | | close: () => { |
| | | // this.$refs && |
| | | // this.$refs.terrainDig && |
| | | // this.$refs.terrainDig.open("管é空é´åæ", null, { |
| | | // close: () => { |
| | | |
| | | }, |
| | | }); |
| | | // if (window.Excavation) { |
| | | // window.Excavation.drawHandler && |
| | | // window.Excavation.drawHandler.destroy(); |
| | | // Viewer._container.style.cursor = "default"; |
| | | // window.Excavation.tooltip && window.Excavation.tooltip.show(false); |
| | | // window.Excavation.clear(); |
| | | // window.Excavation = null; |
| | | // } else { |
| | | // window.Excavation = sgworld.Analysis.TerrainExcavation( |
| | | // 10, |
| | | // {}, |
| | | // function () { } |
| | | // ); |
| | | // } |
| | | // }, |
| | | // }); |
| | | if (window.Excavation) { |
| | | window.Excavation.drawHandler && |
| | | window.Excavation.drawHandler.destroy(); |
| | | Viewer._container.style.cursor = "default"; |
| | | window.Excavation.tooltip && window.Excavation.tooltip.show(false); |
| | | window.Excavation.clear(); |
| | | window.Excavation = null; |
| | | } else { |
| | | window.Excavation = sgworld.Analysis.TerrainExcavation( |
| | | 10, |
| | | {}, |
| | | function () { } |
| | | ); |
| | | } |
| | | break; |
| | | |
| | | case "d12": //éè§åæ |
| | |
| | | ); |
| | | }, |
| | | setWander(res) { |
| | | ; |
| | | switch (res) { |
| | | |
| | | case "c1": |
| | | if (window.PointMY != null) { |
| | | window.PointMY.drawHandler && window.PointMY.drawHandler.destroy(); |
| | |
| | | } |
| | | this.$store.state.treeData = res; |
| | | // this.$refs.tree.setCheckedKeys(checkKey); |
| | | this.$store.state.checkedKeys = checkKey |
| | | this.$store.state.checkedKeys = checkKey; |
| | | }, |
| | | setTreeData(source) { |
| | | let cloneData = JSON.parse(JSON.stringify(source)); // å¯¹æºæ°æ®æ·±åº¦å
é |
| | |
| | | }); |
| | | window.map.addLayer(vectorLayer); |
| | | } else if (res.serveType == "Tileset") { |
| | | |
| | | var tileset = Viewer.scene.primitives.add( |
| | | new Cesium.Cesium3DTileset({ |
| | | name: res.cnName, |
| | |
| | | |
| | | tileset.readyPromise.then(function (tileset) { |
| | | tileset.id = res.cnName; |
| | | tileset.layerId = res.id; |
| | | Viewer.flyTo(tileset); |
| | | }); |
| | | } |
| | | }, |
| | | showModelAttach() { |
| | | if (this.$store.state.attachModel) { |
| | | var name = this.$store.state.attachinfo.cnName; |
| | | this.$refs && |
| | | this.$refs.modelAttach && |
| | | this.$refs.modelAttach.open(name, null, { |
| | | close: () => { }, |
| | | }); |
| | | } else { |
| | | } |
| | | }, |
| | | async showModelCatch() { |
| | | if (this.$store.state.catModel) { |
| | | |
| | | this.startModelData(); |
| | | this.formInline.title = this.$store.state.catModelInfo.name; |
| | | |
| | | this.formInline.Id = this.$store.state.catModelInfo.id; |
| | | this.formInline.LayerName = this.$store.state.catModelInfo.layerName; |
| | | |
| | | this.activeName = "first" |
| | | this.getAttacthFlieList(); |
| | | this.dialogVisible = true; |
| | | } else { |
| | | this.dialogVisible = false; |
| | | window.pickedFeature.color = window.pickedColor; |
| | | } |
| | | }, |
| | | async startModelData() { |
| | | var obj = { |
| | | layerid: this.$store.state.catModelInfo.layerId, |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | } |
| | | const data = await comprehensive_selectModelByPageAndCount(obj); |
| | | if (data.code != 200) { |
| | | return; |
| | | } |
| | | if (data.count == 0) { |
| | | this.isShowModel = true; |
| | | this.formInline.name = this.formInline.title; |
| | | } else { |
| | | this.formInline = data.result; |
| | | |
| | | this.isShowModel = false; |
| | | } |
| | | }, |
| | | async InsertData() { |
| | | const data = await comprehensive_insertModel(this.formInline) |
| | | debugger |
| | | this.startModelData(); |
| | | |
| | | }, |
| | | handleClose() { |
| | | this.$store.state.catModel = false; |
| | | }, |
| | | |
| | | //éä»¶å表æ°å¢ |
| | | setAttachInsert() { |
| | | var token = getToken(); |
| | | var fs = document.getElementById("insertFile"); |
| | | if (fs.files.length == 0) { |
| | | |
| | | this.$message({ |
| | | message: 'è¯·éæ©è¦ä¸ä¼ çæä»¶ï¼', |
| | | type: 'warning' |
| | | }); |
| | | return; |
| | | } |
| | | const formData = new FormData() |
| | | for (var i = 0, c = fs.files.length; i < c; i++) { |
| | | |
| | | formData.append('file', fs.files[i]); // fs.files[i].name,file |
| | | } |
| | | |
| | | $.ajax(BASE_URL + "/comprehensive/uploadFiles?token=" + token + "&tabName=lf.sys_style&eventid=" + this.$store.state.catModelInfo.id, { |
| | | type: "post", |
| | | data: formData, |
| | | async: true, |
| | | cache: false, |
| | | processData: false, |
| | | contentType: false, |
| | | success: (rs) => { |
| | | this.$message({ |
| | | message: 'éä»¶æ·»å æå', |
| | | type: 'success' |
| | | }); |
| | | document.getElementById("insertFile").value = ""; |
| | | this.formInline.file = ""; |
| | | this.getAttacthFlieList(); |
| | | }, |
| | | error: (e) => { |
| | | document.getElementById("insertFile").value = ""; |
| | | this.formInline.file = ""; |
| | | this.$message.error('éä»¶æ·»å 失败'); |
| | | } |
| | | }); |
| | | }, |
| | | //éä»¶å表æ¥è¯¢ |
| | | async getAttacthFlieList() { |
| | | var obj = { |
| | | eventid: this.$store.state.catModelInfo.id, |
| | | tabName: "lf.sys_style" |
| | | }; |
| | | const res = await comprehensive_selectFiles(obj); |
| | | if (res.code != 200) { |
| | | this.$message.error('å表è°ç¨å¤±è´¥'); |
| | | return |
| | | } |
| | | this.tableData = res.result; |
| | | }, |
| | | |
| | | |
| | | //éä»¶=>æä»¶éæ© |
| | | getInsertFile() { |
| | | $('#insertFile').click(); |
| | | }, |
| | | insertFile() { |
| | | var val = document.getElementById('insertFile').files; |
| | | if (!val || !val.length) return; |
| | | this.formInline.file = val[0].name; |
| | | }, |
| | | statSizeChange(row, column) { |
| | | return this.stateFormatSizes(row.sizes) |
| | | }, |
| | | stateFormatSizes(res) { |
| | | if (res >= 1024) { |
| | | const val = parseFloat(res / 1024).toFixed(3); |
| | | return val + ' GB'; |
| | | } else { |
| | | return res + ' MB'; |
| | | } |
| | | }, |
| | | matchState(state = "", reg) { |
| | | var row = state.row; |
| | | var name = row.name; |
| | | if (name.indexOf('.pdf') != -1 || name.indexOf('.jpg') != -1 || name.indexOf('.gif') != -1 || name.indexOf('.png') != -1 || name.indexOf('.jpeg') != -1) { |
| | | return true; |
| | | } |
| | | |
| | | return false; |
| | | }, |
| | | refreshAttatchDetail() { |
| | | this.dialog.src = ""; |
| | | this.dialog.dialogVisible = false; |
| | | this.dialog.isPdf = false; |
| | | this.dialog.isJpg = false; |
| | | }, |
| | | //éä»¶æ¥ç |
| | | setAttatchDetail(index, row) { |
| | | this.refreshAttatchDetail() |
| | | var name = row.name; |
| | | if (name.indexOf('.pdf') != -1) { |
| | | this.dialog.dialogVisible = true; |
| | | this.dialog.isPdf = true; |
| | | var url = BASE_URL + "/comprehensive/downloadForView?guid=" + row.guid + "&token=" + getToken(); |
| | | this.dialog.src = url |
| | | } else if (name.indexOf('.jpg') != -1 || name.indexOf('.gif') != -1 || name.indexOf('.png') != -1 || name.indexOf('.jpeg') != -1) { |
| | | this.dialog.dialogVisible = true; |
| | | this.dialog.isJpg = true; |
| | | var url = BASE_URL + "/comprehensive/downloadForView?guid=" + row.guid + "&token=" + getToken(); |
| | | this.dialog.src = url |
| | | } |
| | | }, |
| | | handleClick(tab, event) { |
| | | if (tab.name == "second") { |
| | | this.getAttacthFlieList(); |
| | | } |
| | | }, |
| | | //éä»¶åªé¤ |
| | | async setAttachDel() { |
| | | var std = []; |
| | | for (var i in this.attacgSelection) { |
| | | std.push(this.attacgSelection[i].id); |
| | | } |
| | | |
| | | const res = await comprehensive_deletes({ ids: std.toString() }); |
| | | if (res.code != 200) { |
| | | this.$message.error('æä»¶å é¤å¤±è´¥'); |
| | | } |
| | | this.getAttacthFlieList(); |
| | | }, |
| | | // éä»¶=>è¡¨æ ¼éæ© |
| | | handleAttatchChange(val) { |
| | | this.attacgSelection = val; |
| | | }, |
| | | }, |
| | | mounted() { |
| | |
| | | this.$store.state.treeData = null; |
| | | this.$store.state.checkedKeys = []; |
| | | // this.setCoverage("a1"); |
| | | this.layersStart() |
| | | |
| | | this.layersStart(); |
| | | }, |
| | | watch: { |
| | | Obj(newVal, oldVal) { |
| | | this.showModelAttach(); |
| | | }, |
| | | catch(newVal, oldVal) { |
| | | this.showModelCatch(); |
| | | }, |
| | | }, |
| | | computed: { |
| | | Obj() { |
| | | return this.$store.state.attachModel; |
| | | }, |
| | | catch() { |
| | | return this.$store.state.catModel; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | height: 30px; |
| | | display: inline-block; |
| | | } |
| | | .pdfClass { |
| | | height: 63vh; |
| | | width: 100%; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | @check-change="handleCheckChange" |
| | | :default-checked-keys="handleTreeCheck" |
| | | :expand-on-click-node="false" |
| | | :filter-node-method="filterNode" |
| | | > |
| | | <span |
| | | class="slot-t-node" |
| | |
| | | v-show="shwoHistogram" |
| | | > |
| | | <i class="el-icon-tickets"></i> é»åæ±ç¶å¾ |
| | | </div> |
| | | <div |
| | | class="edit" |
| | | v-show="showModelAttach" |
| | | @click="modelAttach()" |
| | | > |
| | | <i class="el-icon-tickets"></i> 模å屿§ |
| | | </div> |
| | | <!-- <div |
| | | class="edit" |
| | |
| | | rightClickMenuStyle: {}, |
| | | handleTreeCheck: [], |
| | | dialogVisible: false, |
| | | showModelAttach: false, |
| | | addFormServer: { |
| | | opacity: 100, |
| | | serveType: "WMS", |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | |
| | | //è½¬åæ±ç¶å¾ |
| | | async histogram() { |
| | | this.menuVisible = false |
| | |
| | | }, |
| | | }); |
| | | }, |
| | | modelAttach() { |
| | | this.menuVisible = false; |
| | | this.$store.state.attachinfo = this.currentData; |
| | | this.$store.state.attachModel = true; |
| | | |
| | | |
| | | }, |
| | | NodeBlur(Node, data) { |
| | | if (data.label.length === 0) { |
| | | this.$message.error("èååä¸å¯ä¸ºç©ºï¼"); |
| | |
| | | }); |
| | | } |
| | | }, |
| | | // æ¥è¯¢ |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.label.indexOf(value) !== -1; |
| | | }, |
| | | |
| | | |
| | | allowDrop(draggingNode, dropNode, type) { |
| | | if (dropNode.data.label === "äºçº§ 3-1") { |
| | |
| | | rightClick(event, object, Node, element) { |
| | | this.currentData = object; |
| | | this.currentNode = Node; |
| | | this.$store.state.propertiesName = this.currentData; |
| | | if (this.currentData.serveType == "Tileset") { |
| | | this.showModelAttach = true; |
| | | } else { |
| | | this.showModelAttach = false; |
| | | } |
| | | if (this.currentData.enName == "s_explorationpoint") { |
| | | this.shwoHistogram = true; |
| | | } else { |
| | |
| | | }) |
| | | ); |
| | | |
| | | tileset.readyPromise.then((tileset0) => { |
| | | tileset.readyPromise.then((tileset) => { |
| | | tileset.id = res.cnName; |
| | | |
| | | tileset.layerId = res.id; |
| | | this.tileSet(tileset, parseFloat(res.elev)) |
| | | |
| | | |
| | | |
| | | Viewer.flyTo(tileset); |
| | | }); |
| | | } |
| | |
| | | } |
| | | this.$refs.tree.setCheckedKeys(std); |
| | | }, |
| | | // æ¥è¯¢ |
| | | filterNode(value, data) { |
| | | |
| | | if (!value) return true; |
| | | return data.cnName.indexOf(value) !== -1; |
| | | }, |
| | | }, |
| | | watch: { |
| | | filterText(val) { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="InfoPopup"> |
| | | <Popup |
| | | ref="pop" |
| | | v-for="(data, index) in PopupData" |
| | | :key="data.id" |
| | | :title="data.title || '屿§'" |
| | | maxHeight="400" |
| | | @close="close(data.id)" |
| | | left="calc(90% - 800px)" |
| | | top="calc(100% - 550px) " |
| | | > |
| | | |
| | | <div> |
| | | <div style="width:300px;height:200px;"> |
| | | <model-layer-vue></model-layer-vue> |
| | | </div> |
| | | |
| | | </div> |
| | | </Popup> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ModelLayerVue from './ModelLayer.vue'; |
| | | import Popup from './Popup.vue'; |
| | | |
| | | export default { |
| | | name: 'modelAttach', |
| | | |
| | | components: { |
| | | Popup, |
| | | ModelLayerVue, |
| | | |
| | | }, |
| | | data() { |
| | | return { |
| | | // å¼¹çªæ°æ® |
| | | PopupData: ['modelAttach'], |
| | | left: 'calc(100% - 600px)', |
| | | top: 'calc(100% - 10px)', |
| | | |
| | | |
| | | }; |
| | | }, |
| | | computed: {}, |
| | | mounted() { |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | // å
³éææ |
| | | closeAll() { |
| | | this.PopupData.forEach((item) => { |
| | | item.close && item.close(); |
| | | }); |
| | | this.PopupData = []; |
| | | }, |
| | | // å
³éå¼¹çª |
| | | close(id) { |
| | | let index = this.PopupData.findIndex((item) => { |
| | | return item.id === id; |
| | | }); |
| | | this.$store.state.attachModel = false; |
| | | }, |
| | | // æå¼å¼¹çª |
| | | open(title, value, style = {}) { |
| | | this.PopupData.push({ |
| | | id: this.createRandomId(), |
| | | title, |
| | | value, |
| | | ...style, |
| | | }); |
| | | let index = this.PopupData.length - 1; |
| | | this.$nextTick(() => { |
| | | this.$refs.pop[index].open(); |
| | | }); |
| | | return this.PopupData[index]; |
| | | }, |
| | | // éæºid |
| | | createRandomId() { |
| | | return ( |
| | | (Math.random() * 10000000).toString(16).substr(0, 4) + |
| | | '-' + |
| | | new Date().getTime() + |
| | | '-' + |
| | | Math.random().toString().substr(2, 5) |
| | | ); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="modelBox"> |
| | | <el-form |
| | | label-width="80px" |
| | | :model="formLabelAlign" |
| | | > |
| | | <el-form-item :label="$t('common.name')"> |
| | | <el-input v-model="formLabelAlign.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('common.type')"> |
| | | <el-input v-model="formLabelAlign.type"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | v-show="isShow" |
| | | type="success" |
| | | plain |
| | | size="small" |
| | | @click="InsertData" |
| | | >{{$t('common.increase')}}</el-button> |
| | | <el-button |
| | | v-show="!isShow" |
| | | type="info" |
| | | plain |
| | | size="small" |
| | | @click="EditData" |
| | | >{{$t('common.update')}}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <!-- <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | height="calc(100% - 50px)" |
| | | > |
| | | </el-table> --> |
| | | <!-- <div |
| | | class="bottomPage pagination_box" |
| | | style="margin-top:10px" |
| | | > --> |
| | | <!-- <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="listData.pageIndex" |
| | | :page-sizes="[10, 20, 50, 100]" |
| | | :page-size="listData.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="listData.count" |
| | | > |
| | | </el-pagination> --> |
| | | <!-- </div> --> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { comprehensive_selectModelByPageAndCount, comprehensive_insertModel } from '../../api/api.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | resinfo: null, |
| | | tableData: [], |
| | | listData: { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | layerid: null, |
| | | }, |
| | | isShow: false, |
| | | formLabelAlign: { |
| | | name: '', |
| | | type: '' |
| | | } |
| | | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.startListData(); |
| | | this.setModeCatch(); |
| | | }, |
| | | methods: { |
| | | async InsertData() { |
| | | var obj = { |
| | | modelid: this.resinfo.id, |
| | | name: this.formLabelAlign.name, |
| | | type: this.formLabelAlign.type |
| | | } |
| | | const data = await comprehensive_insertModel(obj) |
| | | this.startModelData(); |
| | | |
| | | }, |
| | | EditData() { |
| | | |
| | | }, |
| | | //æ¨¡åææ |
| | | setModeCatch() { |
| | | var that = this; |
| | | |
| | | }, |
| | | //å页忢 |
| | | handleSizeChange(val) { |
| | | this.listdata.pageSize = val; |
| | | this.listData.pageIndex = 1; |
| | | this.startModelData(); |
| | | }, |
| | | //å页忢 |
| | | handleCurrentChange(val) { |
| | | this.listData.pageIndex = val; |
| | | this.startModelData(); |
| | | }, |
| | | //åå§åæ¥è¯¢ |
| | | startListData() { |
| | | this.listData = { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | layerid: null, |
| | | }; |
| | | |
| | | this.resinfo = this.$store.state.attachinfo; |
| | | this.startModelData(); |
| | | }, |
| | | //æ¥è¯¢æ¨¡å屿§æ°æ® |
| | | async startModelData() { |
| | | if (this.resinfo) { |
| | | this.listData.layerid = this.resinfo.id; |
| | | |
| | | const data = await comprehensive_selectModelByPageAndCount(this.listData) |
| | | if (data.code != 200) { |
| | | return; |
| | | } |
| | | if (data.count == 0) { |
| | | this.isShow = true; |
| | | } else { |
| | | this.isShow = false; |
| | | } |
| | | |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .modelBox { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <Popup ref="pop" :title="form.title" left="calc(100% - 330px)"> |
| | | <Popup |
| | | ref="pop" |
| | | :title="form.title" |
| | | left="calc(100% - 330px)" |
| | | > |
| | | <div class="terrainDig"> |
| | | <el-form ref="form" :model="form" label-width="100px"> |
| | | <el-form |
| | | ref="form" |
| | | :model="form" |
| | | label-width="100px" |
| | | > |
| | | <el-form-item label="深度(米):"> |
| | | <el-input-number |
| | | v-model="form.depth" |
| | |
| | | <el-switch v-model="form.showWall"></el-switch> |
| | | </el-form-item> --> |
| | | <el-form-item> |
| | | <el-button type="primary" size="mini" @click="dig">ç»å¶</el-button> |
| | | <el-button |
| | | type="primary" |
| | | size="mini" |
| | | @click="dig" |
| | | >ç»å¶</el-button> |
| | | <!-- <el-upload |
| | | class="button-group" |
| | | action="" |
| | |
| | | }; |
| | | }, |
| | | computed: {}, |
| | | mounted() {}, |
| | | mounted() { }, |
| | | methods: { |
| | | // å
³éå¼¹çª |
| | | close() { |
| | | this.$refs.pop.close(); |
| | | if (window.Excavation) { |
| | | window.Excavation.drawHandler.destroy(); |
| | | } |
| | | }, |
| | | // æå¼å¼¹çª |
| | | open() { |
| | |
| | | }, |
| | | // å°å½¢å¼æ |
| | | dig() { |
| | | // if (window.Excavation) { |
| | | // window.Excavation.drawHandler.destroy(); |
| | | // } |
| | | window.Excavation = sgworld.Analysis.TerrainExcavation( |
| | | this.form.depth, |
| | | { |
| | |
| | | ) { |
| | | degreesArr.splice(length - 3, 3); |
| | | } |
| | | Excavation = sgworld.Analysis.TerrainExcavation(this.form.depth, { |
| | | window.Excavation = sgworld.Analysis.TerrainExcavation(this.form.depth, { |
| | | positions: degreesArr, |
| | | showWall: this.form.showWall, |
| | | }); |
| | | this.addToTree(Excavation, degreesArr); |
| | | // this.addToTree(Excavation, degreesArr); |
| | | }); |
| | | this.$message('弿åºå已导å
¥'); |
| | | }; |