| | |
| | | <template> |
| | | <div class="menu_Box box_div"> |
| | | <div class="leftMen_div" |
| | | @click="setChangeTwoMenu(item)" |
| | | v-for="(item, index) in setListTwoMenu" |
| | | :class="{ lefMenuDivActive: showTwoMenuFlag == item.id }"> |
| | | <div class="menuTwoImage" |
| | | :class="item.css"></div> |
| | | <div |
| | | class="leftMen_div" |
| | | @click="setChangeTwoMenu(item)" |
| | | v-for="(item, index) in setListTwoMenu" |
| | | :class="{ lefMenuDivActive: showTwoMenuFlag == item.id }" |
| | | > |
| | | <div |
| | | class="menuTwoImage" |
| | | :class="item.css" |
| | | ></div> |
| | | <div>{{ $t(item.label) }}</div> |
| | | </div> |
| | | <mapinfo ref="mapinfo" /> |
| | |
| | | <modelAttach ref="modelAttach" /> |
| | | <undergroundModel ref="undergroundModel" /> |
| | | <setPellucidity ref="setPellucidity" /> |
| | | <input type="file" |
| | | accept=".kml" |
| | | class="file" |
| | | style="display: none" /> |
| | | <input :accept="'.shp, .shx, .dbf, .prj'" |
| | | style="display: none" |
| | | ref="pathClear" |
| | | type="file" |
| | | name="file" |
| | | id="shpFile" |
| | | multiple="multiple" |
| | | @change="handleOpenShp()" /> |
| | | <input |
| | | type="file" |
| | | accept=".kml" |
| | | class="file" |
| | | style="display: none" |
| | | /> |
| | | <input |
| | | :accept="'.shp, .shx, .dbf, .prj'" |
| | | style="display: none" |
| | | ref="pathClear" |
| | | type="file" |
| | | name="file" |
| | | id="shpFile" |
| | | 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%"> |
| | | <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"> |
| | | <div |
| | | v-if="dialog.isJpg" |
| | | class="pdfClass" |
| | | > |
| | | |
| | | <el-image style="width:100%; height:100%" |
| | | :src="dialog.src" |
| | | :preview-src-list="[dialog.src]"> |
| | | <el-image |
| | | style="width:100%; height:100%" |
| | | :src="dialog.src" |
| | | :preview-src-list="[dialog.src]" |
| | | > |
| | | </el-image> |
| | | |
| | | </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-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> |
| | | |
| | | </el-tab-pane> |
| | | <el-tab-pane label="附件" |
| | | name="second"> |
| | | <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 |
| | | :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"> |
| | | <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> |
| | | <el-link |
| | | v-if="matchState(scope, /[]/)" |
| | | @click="setAttatchDetail(scope.$index, scope.row)" |
| | | class="elLink" |
| | | >{{ $t('common.see') }}</el-link> |
| | | |
| | | </template> |
| | | </el-table-column> |
| | |
| | | |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog title="数据申请" |
| | | :visible.sync="dialogInsertVisible" |
| | | width="30%" |
| | | top="35vh" |
| | | :modal="false" |
| | | :before-close="handleInsertClose"> |
| | | <el-dialog |
| | | title="数据申请" |
| | | :visible.sync="dialogInsertVisible" |
| | | width="30%" |
| | | top="35vh" |
| | | :modal="false" |
| | | :before-close="handleInsertClose" |
| | | > |
| | | <div style="width: 100%; max-height: 450px; overflow-y: auto"> |
| | | <el-form ref="form" |
| | | :model="ruleForm" |
| | | label-width="100px"> |
| | | <el-form |
| | | ref="form" |
| | | :model="ruleForm" |
| | | label-width="100px" |
| | | > |
| | | <el-form-item label="审核单位"> |
| | | <div> |
| | | <ul> |
| | |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="条件"> |
| | | <el-input :title="ruleForm.wkt" |
| | | v-model="ruleForm.wkt" |
| | | disabled></el-input> |
| | | <el-input |
| | | :title="ruleForm.wkt" |
| | | v-model="ruleForm.wkt" |
| | | disabled |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="描述"> |
| | | <el-input type="textarea" |
| | | placeholder="请输入内容" |
| | | v-model="ruleForm.descr" |
| | | maxlength="50" |
| | | show-word-limit> |
| | | <el-input |
| | | type="textarea" |
| | | placeholder="请输入内容" |
| | | v-model="ruleForm.descr" |
| | | maxlength="50" |
| | | show-word-limit |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button class="primary" |
| | | size="small" |
| | | @click="getInsertDownz()">{{ |
| | | <el-button |
| | | class="primary" |
| | | size="small" |
| | | @click="getInsertDownz()" |
| | | >{{ |
| | | $t("common.confirm") |
| | | }}</el-button> |
| | | <el-button type="info" |
| | | size="small" |
| | | @click="closeInsertDown">{{ |
| | | <el-button |
| | | type="info" |
| | | size="small" |
| | | @click="closeInsertDown" |
| | | >{{ |
| | | $t("common.cancel") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog :title="$t('common.passworld')" |
| | | :visible.sync="dialogVisible1" |
| | | width="30%" |
| | | top="35vh" |
| | | :modal="false" |
| | | :before-close="handleCloseDown1"> |
| | | <el-form :model="codeForm" |
| | | :rules="rules" |
| | | ref="codeForm" |
| | | label-width="100px" |
| | | class="codeForm"> |
| | | <el-form-item :label="$t('common.passworld')" |
| | | prop="password"> |
| | | <el-input type="password" |
| | | v-model="codeForm.password" |
| | | show-password></el-input> |
| | | <el-dialog |
| | | :title="$t('common.passworld')" |
| | | :visible.sync="dialogVisible1" |
| | | width="30%" |
| | | top="35vh" |
| | | :modal="false" |
| | | :before-close="handleCloseDown1" |
| | | > |
| | | <el-form |
| | | :model="codeForm" |
| | | :rules="rules" |
| | | ref="codeForm" |
| | | label-width="100px" |
| | | class="codeForm" |
| | | > |
| | | <el-form-item |
| | | :label="$t('common.passworld')" |
| | | prop="password" |
| | | > |
| | | <el-input |
| | | type="password" |
| | | v-model="codeForm.password" |
| | | show-password |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('common.SPassword')" |
| | | prop="repassword"> |
| | | <el-input type="password" |
| | | v-model="codeForm.repassword" |
| | | show-password></el-input> |
| | | <el-form-item |
| | | :label="$t('common.SPassword')" |
| | | prop="repassword" |
| | | > |
| | | <el-input |
| | | type="password" |
| | | v-model="codeForm.repassword" |
| | | show-password |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button class="primary" |
| | | size="small" |
| | | @click="downloadx('codeForm')">{{ $t("common.confirm") }}</el-button> |
| | | <el-button type="info" |
| | | size="small" |
| | | @click="closeDownx('codeForm')">{{ |
| | | <el-button |
| | | class="primary" |
| | | size="small" |
| | | @click="downloadx('codeForm')" |
| | | >{{ $t("common.confirm") }}</el-button> |
| | | <el-button |
| | | type="info" |
| | | size="small" |
| | | @click="closeDownx('codeForm')" |
| | | >{{ |
| | | $t("common.cancel") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-dialog> |
| | | <el-dialog title="范围" |
| | | :visible.sync="dialogExtentVisible" |
| | | width="30%" |
| | | :before-close="handleExtentClose" |
| | | :modal="false" |
| | | :lock-scroll="false" |
| | | :close-on-click-modal="false"> |
| | | <el-dialog |
| | | title="范围" |
| | | :visible.sync="dialogExtentVisible" |
| | | width="30%" |
| | | :before-close="handleExtentClose" |
| | | :modal="false" |
| | | :lock-scroll="false" |
| | | :close-on-click-modal="false" |
| | | > |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="16"> |
| | |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" |
| | | class="dialog-footer"> |
| | | <span |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <el-button @click="handleExtentClose">取 消</el-button> |
| | | <el-button @click="handleExtentinsert" |
| | | type="primary">确 定</el-button> |
| | | <el-button |
| | | @click="handleExtentinsert" |
| | | type="primary" |
| | | >确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | |
| | | export default { |
| | | components: { mapinfo, maplayer, queryinfo, terrainDig, modelAttach, undergroundModel, setPellucidity }, |
| | | data () { |
| | | data() { |
| | | var repasswordValidator = (rule, value, callback) => { |
| | | if (value === '') { |
| | | callback(new Error('请再次输入密码')); |
| | |
| | | }, |
| | | methods: { |
| | | //二級菜单点击切换 |
| | | setChangeTwoMenu (res) { |
| | | setChangeTwoMenu(res) { |
| | | var val = res.id[0]; |
| | | if (window.model != null) { |
| | | // window.model.deleteObject(); |
| | |
| | | break; |
| | | } |
| | | }, |
| | | setPlot (res) { |
| | | setPlot(res) { |
| | | |
| | | switch (res) { |
| | | case "h1": |
| | |
| | | break; |
| | | } |
| | | }, |
| | | handleSaveClick () { |
| | | handleSaveClick() { |
| | | let funDownload = function (content, filename) { |
| | | let eleLink = document.createElement("a"); |
| | | eleLink.download = filename; |
| | |
| | | alert("当前场景没有entities实体"); |
| | | } |
| | | }, |
| | | handleSaveShp () { |
| | | handleSaveShp() { |
| | | var entities = sgworld.Viewer.entities.values; |
| | | if (entities.length == 0) { |
| | | return; |
| | |
| | | error: function (e) { }, |
| | | }); |
| | | }, |
| | | handleOpenShp () { |
| | | handleOpenShp() { |
| | | var formData = new FormData(); |
| | | var fs = document.getElementById("shpFile"); |
| | | var exts = [".shp", ".shx", ".dbf", ".prj"]; |
| | |
| | | |
| | | document.getElementById("shpFile").value = ""; |
| | | }, |
| | | showShpEntity (res) { |
| | | showShpEntity(res) { |
| | | for (var i in res) { |
| | | var wkt = this.$wkt.parse(res[i].wkt); |
| | | var fillColor = res[i].fillColor.split(","); |
| | |
| | | } |
| | | }, |
| | | |
| | | setCartesianToEightFour (res) { |
| | | setCartesianToEightFour(res) { |
| | | var std = []; |
| | | let ellipsoid = Viewer.scene.globe.ellipsoid; |
| | | let cartographic = ellipsoid.cartesianToCartographic(res); |
| | |
| | | std = [lng, lat, alt]; |
| | | return std; |
| | | }, |
| | | handleOpenClick () { |
| | | handleOpenClick() { |
| | | var that = this; |
| | | sgworld.Creator.SimpleGraphic.edit(true, { editProp: true }); |
| | | let fileInput = document.querySelector(".file"); |
| | |
| | | }; |
| | | fileInput.click(); |
| | | }, |
| | | setLayerScene () { |
| | | setLayerScene() { |
| | | var URL = window.location.href.split("#"); |
| | | this.openwindow({ url: URL[0] + "LfSKyline/index.html" }); |
| | | }, |
| | | |
| | | openwindow (data) { |
| | | openwindow(data) { |
| | | var url = data.url; //转向网页的地址; |
| | | var name = data.title || "选择要添加的页面"; //网页名称,可为空; |
| | | var iWidth = window.screen.width; //弹出窗口的宽度; |
| | |
| | | ); |
| | | }, |
| | | |
| | | setMeasurement (res) { |
| | | setMeasurement(res) { |
| | | switch (res) { |
| | | case "j1": |
| | | var measure = window.sgworld.Command.execute( |
| | |
| | | break; |
| | | } |
| | | }, |
| | | openMeasureResultInfo (name, data) { |
| | | openMeasureResultInfo(name, data) { |
| | | let info = ""; |
| | | switch (name) { |
| | | case "表面距离": |
| | |
| | | }) |
| | | ); |
| | | }, |
| | | clearMeasure (id) { |
| | | clearMeasure(id) { |
| | | if (id) { |
| | | let data = this.measureData.get(id); |
| | | data && data.deleteObject && data.deleteObject(); |
| | |
| | | this.measureData.clear(); |
| | | } |
| | | }, |
| | | setIquery (res) { |
| | | setIquery(res) { |
| | | switch (res) { |
| | | case "e2": |
| | | this.showPickUp = false; |
| | |
| | | break; |
| | | } |
| | | }, |
| | | clearAllAnalsy () { |
| | | clearAllAnalsy() { |
| | | // switch (this.showTwoMenuFlag) { |
| | | // case 'd1': |
| | | // that.isolineFlag = false; |
| | |
| | | // break; |
| | | // } |
| | | }, |
| | | ClearDraw () { |
| | | ClearDraw() { |
| | | //console.log(sgworld); |
| | | // console.log(sgworld.drawObj.drawHandler); |
| | | // sgworld.drawObj.drawHandler.destroy(); |
| | | // sgworld.drawObj.end() |
| | | }, |
| | | |
| | | setAnalsy (res) { |
| | | setAnalsy(res) { |
| | | //this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close("queryinfo"); |
| | | this.$bus.$emit("closeMenuPop", res); |
| | | var that = this; |
| | |
| | | }, |
| | | |
| | | //模型裁切 |
| | | modelClipping () { |
| | | modelClipping() { |
| | | const scene = Viewer.scene; |
| | | let targetY = 40.0; |
| | | let planeEntities = []; |
| | |
| | | // console.log("targetY----",targetY) |
| | | } |
| | | }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); |
| | | function createPlaneUpdateFunction (plane) { |
| | | function createPlaneUpdateFunction(plane) { |
| | | return function () { |
| | | plane.distance = targetY; |
| | | // console.log("targetY----",targetY) |
| | |
| | | }; |
| | | } |
| | | //获取切面的type // 上、下、左、右、前、后 |
| | | function getType4Plane (plane) { |
| | | function getType4Plane(plane) { |
| | | var m_type; |
| | | var normal = plane._normal; |
| | | var x = normal.x; |
| | |
| | | } |
| | | return m_type; |
| | | } |
| | | function createPlaneUpdateFunction_box (plane, type, origin) { |
| | | function createPlaneUpdateFunction_box(plane, type, origin) { |
| | | return function () { |
| | | var num_x = window.localStorage.getItem('slider_x') / 100000; |
| | | var num_y = window.localStorage.getItem('slider_y') / 100000; |
| | |
| | | }; |
| | | } |
| | | |
| | | function createPlanePos (origin, x, y, z) { |
| | | function createPlanePos(origin, x, y, z) { |
| | | var clipbox = Viewer.entities.getById('ClopBox'); |
| | | if (clipbox) { |
| | | clipbox.position = new Cesium.CallbackProperty(function () { |
| | |
| | | }, false); |
| | | } |
| | | } |
| | | function cartesian3ToDegrees (cartesian3) { |
| | | function cartesian3ToDegrees(cartesian3) { |
| | | var ellipsoid = Viewer.scene.globe.ellipsoid; |
| | | var cartographic = ellipsoid.cartesianToCartographic(cartesian3); |
| | | var lat = Cesium.Math.toDegrees(cartographic.latitude); |
| | |
| | | }, |
| | | |
| | | //关闭管道信息弹窗 |
| | | closePipelinePop () { |
| | | closePipelinePop() { |
| | | this.$refs && |
| | | this.$refs.queryinfo && |
| | | this.$refs.queryinfo.close("queryinfo"); |
| | | }, |
| | | setclippingModel () { |
| | | setclippingModel() { |
| | | if (window.model) { |
| | | setTimeout(() => { |
| | | window.model.clippingModel({ |
| | |
| | | // }); |
| | | } |
| | | }, |
| | | clear (res) { |
| | | clear(res) { |
| | | switch (res) { |
| | | case "d4": |
| | | layer.close(this.dxpmIndex); |
| | |
| | | break; |
| | | } |
| | | }, |
| | | addAnalysisFlood () { |
| | | addAnalysisFlood() { |
| | | var url = window.location.href; |
| | | var testurl = ""; |
| | | if (url.indexOf("web") != -1) { |
| | |
| | | (value) => { } |
| | | ); |
| | | }, |
| | | addterrainSectionAnalysis () { |
| | | addterrainSectionAnalysis() { |
| | | window.AnalysisDXPM = sgworld.Command.execute( |
| | | 2, |
| | | 6, |
| | |
| | | } |
| | | ); |
| | | }, |
| | | setWander (res) { |
| | | setWander(res) { |
| | | switch (res) { |
| | | case "c1": |
| | | if (window.PointMY != null) { |
| | |
| | | break; |
| | | } |
| | | }, |
| | | setOrientation (res) { |
| | | setOrientation(res) { |
| | | var resid; |
| | | switch (res) { |
| | | case "f1": |
| | |
| | | }; |
| | | this.$bus.$emit("mapChangeBox", val); |
| | | }, |
| | | setViewport (res) { |
| | | setViewport(res) { |
| | | switch (res) { |
| | | case "b1": //分屏 |
| | | this.$bus.$emit("changemap", 1); |
| | |
| | | break; |
| | | } |
| | | }, |
| | | setCoverage (res) { |
| | | setCoverage(res) { |
| | | switch (res) { |
| | | case "a1": |
| | | if (this.$store.state.layerMnage == false) { |
| | |
| | | break; |
| | | } |
| | | }, |
| | | menuChange (res) { |
| | | menuChange(res) { |
| | | this.setListTwoMenu = this.setListTwoMenuAll[res]; |
| | | }, |
| | | async layersStart () { |
| | | async layersStart() { |
| | | const data = await perms_selectLayers(); |
| | | if (data.code != 200) { |
| | | return this.$message.error("图层列表查询失败"); |
| | |
| | | |
| | | this.$store.state.checkedKeys = checkKey; |
| | | }, |
| | | setTreeData (source) { |
| | | setTreeData(source) { |
| | | let cloneData = JSON.parse(JSON.stringify(source)); // 对源数据深度克隆 |
| | | return cloneData.filter((father) => { |
| | | // 循环所有项 |
| | |
| | | return father.pid == 0; // 返回一级菜单 |
| | | }); |
| | | }, |
| | | setAddLayers (res) { |
| | | setAddLayers(res) { |
| | | this.setClearWmsLayer() |
| | | var std = [[]]; |
| | | for (var i in res) { |
| | |
| | | |
| | | } |
| | | }, |
| | | setPrjidWmsLayer (res) { |
| | | setPrjidWmsLayer(res) { |
| | | var layer = []; |
| | | var sql = []; |
| | | var dirid = this.$store.state.pigCode |
| | | |
| | | var that = this; |
| | | for (var i in res) { |
| | | layer.push(res[i].url) |
| | | |
| | |
| | | layer = layer.reverse(); |
| | | sql = sql.reverse().join(";") |
| | | var getFeatureInfoFormat = new Cesium.GetFeatureInfoFormat("html", null, function (html) { |
| | | |
| | | that.getFeatureInfo(html) |
| | | }); |
| | | window.layerWMS = new Cesium.WebMapServiceImageryProvider({ |
| | |
| | | |
| | | |
| | | |
| | | setClearWmsLayer () { |
| | | setClearWmsLayer() { |
| | | for (var i = 0; i < window.Viewer.imageryLayers._layers.length; i++) { |
| | | var val_id = window.Viewer.imageryLayers._layers[i].imageryProvider.name; |
| | | if (val_id == "Wms_Layer") { |
| | |
| | | } |
| | | } |
| | | }, |
| | | setAddWmsLayer (res) { |
| | | setAddWmsLayer(res) { |
| | | |
| | | var url = []; |
| | | for (var i in res) { |
| | |
| | | } |
| | | window.map.addLayer(layer2); |
| | | }, |
| | | async getFeatureInfo (html) { |
| | | async getFeatureInfo(html) { |
| | | var start = html.indexOf("<caption class=\"featureInfo\">") + "<caption class=\"featureInfo\">".length; |
| | | var end = html.indexOf("</caption>"); |
| | | var tab = html.substr(start, end - start); |
| | |
| | | } |
| | | }, |
| | | //格式化时间 |
| | | format (shijianchuo) { |
| | | format(shijianchuo) { |
| | | //shijianchuo是整数,否则要parseInt转换 |
| | | var time = new Date(shijianchuo); |
| | | var y = time.getFullYear(); |
| | |
| | | ); |
| | | }, |
| | | //格式化时间 |
| | | add0 (m) { |
| | | add0(m) { |
| | | return m < 10 ? '0' + m : m; |
| | | }, |
| | | async getTableData () { |
| | | async getTableData() { |
| | | this.tableData = [] |
| | | const data = await dataQuery_selectByGid(this.$store.state.pickoption) |
| | | if (data.code != 200) { |
| | |
| | | |
| | | }, |
| | | |
| | | showModelAttach () { |
| | | showModelAttach() { |
| | | if (this.$store.state.attachModel) { |
| | | var name = this.$store.state.attachinfo.cnName; |
| | | this.$refs && |
| | |
| | | } else { |
| | | } |
| | | }, |
| | | async showModelCatch () { |
| | | async showModelCatch() { |
| | | if (this.$store.state.catModel) { |
| | | this.formInline = { |
| | | title: '', |
| | |
| | | window.pickedFeature.color = window.pickedColor; |
| | | } |
| | | }, |
| | | async startModelData () { |
| | | async startModelData() { |
| | | var obj = { |
| | | layerid: this.$store.state.catModelInfo.layerId, |
| | | modelid: this.$store.state.catModelInfo.id |
| | |
| | | |
| | | } |
| | | }, |
| | | async EditData () { |
| | | async EditData() { |
| | | const data = await comprehensive_updateModel(this.formInline) |
| | | if (data.code != 200) { |
| | | this.$message.error('修改失败'); |
| | |
| | | } |
| | | this.startModelData(); |
| | | }, |
| | | async InsertData () { |
| | | async InsertData() { |
| | | var std = { |
| | | "bak": this.formInline.bak, |
| | | "guid": this.$store.state.catModelInfo.id, |
| | |
| | | this.startModelData(); |
| | | |
| | | }, |
| | | handleClose () { |
| | | handleClose() { |
| | | this.$store.state.catModel = false; |
| | | }, |
| | | |
| | | //附件列表新增 |
| | | setAttachInsert () { |
| | | setAttachInsert() { |
| | | var token = getToken(); |
| | | var fs = document.getElementById("insertFile"); |
| | | if (fs.files.length == 0) { |
| | |
| | | }); |
| | | }, |
| | | //附件列表查询 |
| | | async getAttacthFlieList () { |
| | | async getAttacthFlieList() { |
| | | var obj = { |
| | | eventid: this.$store.state.catModelInfo.id, |
| | | tabName: "lf.sys_style" |
| | |
| | | |
| | | |
| | | //附件=>文件选择 |
| | | getInsertFile () { |
| | | getInsertFile() { |
| | | $('#insertFile').click(); |
| | | }, |
| | | insertFile () { |
| | | insertFile() { |
| | | var val = document.getElementById('insertFile').files; |
| | | if (!val || !val.length) return; |
| | | this.formInline.file = val[0].name; |
| | | }, |
| | | statSizeChange (row, column) { |
| | | statSizeChange(row, column) { |
| | | return this.stateFormatSizes(row.sizes) |
| | | }, |
| | | stateFormatSizes (res) { |
| | | stateFormatSizes(res) { |
| | | if (res >= 1024) { |
| | | const val = parseFloat(res / 1024).toFixed(3); |
| | | return val + ' GB'; |
| | |
| | | return res + ' MB'; |
| | | } |
| | | }, |
| | | matchState (state = "", reg) { |
| | | matchState(state = "", reg) { |
| | | var row = state.row; |
| | | var name = row.name; |
| | | if (name.indexOf('.pdf') != -1 |
| | |
| | | |
| | | return false; |
| | | }, |
| | | refreshAttatchDetail () { |
| | | refreshAttatchDetail() { |
| | | this.dialog.src = ""; |
| | | this.dialog.dialogVisible = false; |
| | | this.dialog.isPdf = false; |
| | | this.dialog.isJpg = false; |
| | | }, |
| | | //附件查看 |
| | | setAttatchDetail (index, row) { |
| | | setAttatchDetail(index, row) { |
| | | this.refreshAttatchDetail() |
| | | var name = row.name; |
| | | if (name.indexOf('.pdf') != -1 || name.indexOf('.PDF') != -1) { |
| | |
| | | this.dialog.src = url |
| | | } |
| | | }, |
| | | handleClick (tab, event) { |
| | | handleClick(tab, event) { |
| | | if (tab.name == "second") { |
| | | this.getAttacthFlieList(); |
| | | } |
| | | }, |
| | | //附件刪除 |
| | | async setAttachDel () { |
| | | async setAttachDel() { |
| | | var std = []; |
| | | for (var i in this.attacgSelection) { |
| | | std.push(this.attacgSelection[i].id); |
| | |
| | | this.getAttacthFlieList(); |
| | | }, |
| | | // 附件=>表格选择 |
| | | handleAttatchChange (val) { |
| | | handleAttatchChange(val) { |
| | | this.attacgSelection = val; |
| | | }, |
| | | //拾取数据获取 |
| | | async getPickUpData (info) { |
| | | async getPickUpData(info) { |
| | | let checkedLayers = JSON.parse(sessionStorage.getItem("checkedLayers")); |
| | | let showPop = false; |
| | | for (const item of checkedLayers) { |
| | |
| | | this.$message.warning("暂无数据!"); |
| | | } |
| | | }, |
| | | showPopBox () { |
| | | showPopBox() { |
| | | |
| | | if (this.$store.state.showPopBoxFlag == true) { |
| | | this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close(); |
| | |
| | | }); |
| | | } |
| | | }, |
| | | setPellucidity () { |
| | | setPellucidity() { |
| | | this.$refs && this.$refs.setPellucidity && this.$refs.setPellucidity.open(); |
| | | }, |
| | | setDialogInsertVisible (res) { |
| | | setDialogInsertVisible(res) { |
| | | this.ruleForm = res; |
| | | this.dialogInsertVisible = true; |
| | | }, |
| | | downloadx () { |
| | | downloadx() { |
| | | this.$bus.$emit("setInsertDown1", this.codeForm) |
| | | this.closeDownx(); |
| | | }, |
| | | handleCloseDown1 () { |
| | | handleCloseDown1() { |
| | | this.$confirm("确认关闭?") |
| | | .then(_ => { |
| | | this.closeDownx(); |
| | | }) |
| | | .catch(_ => { }) |
| | | }, |
| | | closeDownx () { |
| | | closeDownx() { |
| | | this.dialogVisible1 = false; |
| | | this.codeForm = { |
| | | password: '', |
| | | repassword: '', |
| | | } |
| | | }, |
| | | closeInsertDown () { |
| | | closeInsertDown() { |
| | | this.ruleForm = { |
| | | depname: [], |
| | | tabs: [], |
| | |
| | | } |
| | | this.dialogInsertVisible = false |
| | | }, |
| | | handleInsertClose () { |
| | | handleInsertClose() { |
| | | this.$confirm("确认关闭?") |
| | | .then(_ => { |
| | | this.closeInsertDown() |
| | | }) |
| | | .catch(_ => { }) |
| | | }, |
| | | getInsertDownz () { |
| | | getInsertDownz() { |
| | | this.dialogInsertVisible = false; |
| | | // this.dialogVisible1 = true; |
| | | // |
| | | |
| | | this.$bus.$emit("setInsertApply1", this.ruleForm) |
| | | }, |
| | | handleExtentClose () { |
| | | handleExtentClose() { |
| | | this.dialogExtentVisible = false |
| | | this.setExtent = 10; |
| | | }, |
| | | handleExtentinsert () { |
| | | handleExtentinsert() { |
| | | this.$bus.$emit("setExtentBUff", this.setExtent) |
| | | this.handleExtentClose(); |
| | | |
| | | } |
| | | }, |
| | | mounted () { |
| | | mounted() { |
| | | this.$bus.$off(); |
| | | this.measureData = new Map(); |
| | | this.colorAll = { |
| | |
| | | |
| | | }, |
| | | watch: { |
| | | Obj (newVal, oldVal) { |
| | | Obj(newVal, oldVal) { |
| | | this.showModelAttach(); |
| | | }, |
| | | catch (newVal, oldVal) { |
| | | catch(newVal, oldVal) { |
| | | this.showModelCatch(); |
| | | }, |
| | | popObj (newVal, oldVal) { |
| | | popObj(newVal, oldVal) { |
| | | this.showPopBox(); |
| | | } |
| | | }, |
| | | computed: { |
| | | Obj () { |
| | | Obj() { |
| | | return this.$store.state.attachModel; |
| | | }, |
| | | catch () { |
| | | catch() { |
| | | return this.$store.state.catModel; |
| | | }, |
| | | popObj () { |
| | | popObj() { |
| | | return this.$store.state.showPopBoxFlag; |
| | | } |
| | | }, |