| | |
| | | <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> --> |
| | | {{formInline.name}} |
| | | {{ formInline.name }} |
| | | </el-form-item> |
| | | <el-form-item :label="$t('common.type')"> |
| | | <!-- <el-select |
| | |
| | | > |
| | | </el-option> |
| | | </el-select> --> |
| | | {{formInline.type}} |
| | | {{ formInline.type }} |
| | | </el-form-item> |
| | | |
| | | <el-form-item :label="$t('common.bak')"> |
| | | <!-- <el-input v-model="formInline.bak"></el-input> --> |
| | | {{formInline.bak}} |
| | | {{ formInline.bak }} |
| | | </el-form-item> |
| | | <!-- <el-form-item> |
| | | <el-button |
| | |
| | | </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()" |
| | | >{{ |
| | | $t("common.confirm") |
| | | }}</el-button> |
| | | <el-button |
| | | type="info" |
| | | size="small" |
| | | @click="closeInsertDown" |
| | | >{{ |
| | | $t("common.cancel") |
| | | }}</el-button> |
| | | <el-button class="primary" size="small" @click="getInsertDownz()">{{ |
| | | $t("common.confirm") |
| | | }}</el-button> |
| | | <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')" |
| | | >{{ |
| | | $t("common.cancel") |
| | | }}</el-button> |
| | | <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> |
| | |
| | | } from "ol/control.js"; |
| | | import * as turf from "@turf/turf"; |
| | | import { geometry } from "@turf/turf"; |
| | | import layerManager from "./layer"; |
| | | |
| | | export default { |
| | | components: { mapinfo, maplayer, queryinfo, terrainDig, modelAttach, undergroundModel, setPellucidity }, |
| | |
| | | name: "图层管理", |
| | | css: "twoMenu_imge11", |
| | | }, |
| | | { |
| | | id: "b1", |
| | | label: "synthesis.split", |
| | | name: "分屏", |
| | | css: "twoMenu_imge21", |
| | | }, |
| | | // { |
| | | // id: "b1", |
| | | // label: "synthesis.split", |
| | | // name: "分屏", |
| | | // css: "twoMenu_imge21", |
| | | // }, |
| | | { |
| | | id: "b9", |
| | | label: "synthesis.undergroundMode", |
| | |
| | | // name: "坡度分析", |
| | | // css: "twoMenu_imge42", |
| | | // }, |
| | | { |
| | | id: "d3", |
| | | label: "synthesis.pathanalysis", |
| | | name: "路径分析", |
| | | css: "twoMenu_imge43", |
| | | }, |
| | | // { |
| | | // id: "d3", |
| | | // label: "synthesis.pathanalysis", |
| | | // name: "路径分析", |
| | | // css: "twoMenu_imge43", |
| | | // }, |
| | | // { |
| | | // id: "d4", |
| | | // label: "synthesis.cuttinganalysis", |
| | | // name: "地形剖切", |
| | | // css: "twoMenu_imge44", |
| | | // }, |
| | | { |
| | | id: "d5", |
| | | label: "synthesis.floodanalysis", |
| | | name: "淹没分析", |
| | | css: "twoMenu_imge45", |
| | | }, |
| | | // { |
| | | // id: "d5", |
| | | // label: "synthesis.floodanalysis", |
| | | // name: "淹没分析", |
| | | // css: "twoMenu_imge45", |
| | | // }, |
| | | |
| | | // { |
| | | // id: "d6", |
| | | // label: "synthesis.earthworkcalculation", |
| | |
| | | // name: "影像对比", |
| | | // css: "twoMenu_imge48", |
| | | // }, |
| | | { |
| | | id: "d9", |
| | | label: "synthesis.pipelineAnalysis", |
| | | name: "线路分析", |
| | | css: "twoMenu_imge49", |
| | | }, |
| | | { |
| | | id: "d10", |
| | | label: "synthesis.flatterrain", |
| | | name: "地形平整", |
| | | css: "twoMenu_imge410", |
| | | }, |
| | | { |
| | | id: "d11", |
| | | label: "synthesis.terrainexcavation", |
| | | name: "地形开挖", |
| | | css: "twoMenu_imge411", |
| | | }, |
| | | { |
| | | id: "d12", |
| | | label: "synthesis.visibilityAnalysis", |
| | | name: "通视分析", |
| | | css: "twoMenu_imge412", |
| | | }, |
| | | { |
| | | id: "d13", |
| | | label: "synthesis.viewAnalysis", |
| | | name: "视域分析", |
| | | css: "twoMenu_imge413", |
| | | }, |
| | | { |
| | | id: "d14", |
| | | label: "synthesis.circularViewAnalysis", |
| | | name: "圆形视域分析", |
| | | css: "twoMenu_imge414", |
| | | }, |
| | | // { |
| | | // id: "d9", |
| | | // label: "synthesis.pipelineAnalysis", |
| | | // name: "线路分析", |
| | | // css: "twoMenu_imge49", |
| | | // }, |
| | | // { |
| | | // id: "d10", |
| | | // label: "synthesis.flatterrain", |
| | | // name: "地形平整", |
| | | // css: "twoMenu_imge410", |
| | | // }, |
| | | // { |
| | | // id: "d11", |
| | | // label: "synthesis.terrainexcavation", |
| | | // name: "地形开挖", |
| | | // css: "twoMenu_imge411", |
| | | // }, |
| | | // { |
| | | // id: "d12", |
| | | // label: "synthesis.visibilityAnalysis", |
| | | // name: "通视分析", |
| | | // css: "twoMenu_imge412", |
| | | // }, |
| | | // { |
| | | // id: "d13", |
| | | // label: "synthesis.viewAnalysis", |
| | | // name: "视域分析", |
| | | // css: "twoMenu_imge413", |
| | | // }, |
| | | // { |
| | | // id: "d14", |
| | | // label: "synthesis.circularViewAnalysis", |
| | | // name: "圆形视域分析", |
| | | // css: "twoMenu_imge414", |
| | | // }, |
| | | // { |
| | | // id: "d15", |
| | | // label: "synthesis.fireAnalysis", |
| | | // name: "火灾分析", |
| | | // css: "twoMenu_imge414", |
| | | // }, |
| | | ], |
| | | [ |
| | | { |
| | | id: "e1", |
| | | label: "synthesis.attributequery", |
| | | name: "属性查询", |
| | | css: "twoMenu_imge51", |
| | | }, |
| | | { |
| | | id: "e2", |
| | | label: "synthesis.rangequery", |
| | | name: "空间查询", |
| | | css: "twoMenu_imge52", |
| | | }, |
| | | // { |
| | | // id: "e1", |
| | | // label: "synthesis.attributequery", |
| | | // name: "属性查询", |
| | | // css: "twoMenu_imge51", |
| | | // }, |
| | | // { |
| | | // id: "e2", |
| | | // label: "synthesis.rangequery", |
| | | // name: "空间查询", |
| | | // css: "twoMenu_imge52", |
| | | // }, |
| | | |
| | | ], |
| | | [ |
| | |
| | | name: "坐标定位", |
| | | css: "twoMenu_imge61", |
| | | }, |
| | | { |
| | | id: "f2", |
| | | label: "synthesis.placenamelocation", |
| | | name: "地名定位", |
| | | css: "twoMenu_imge62", |
| | | }, |
| | | // { |
| | | // id: "f2", |
| | | // label: "synthesis.placenamelocation", |
| | | // name: "地名定位", |
| | | // css: "twoMenu_imge62", |
| | | // }, |
| | | ], |
| | | [ |
| | | { |
| | |
| | | name: "平面面积", |
| | | css: "twoMenu_imge73", |
| | | }, |
| | | { |
| | | id: "j4", |
| | | label: "synthesis.synthobj.m7", |
| | | name: "体积", |
| | | css: "twoMenu_imge74", |
| | | }, |
| | | // { |
| | | // id: "j4", |
| | | // label: "synthesis.synthobj.m7", |
| | | // name: "体积", |
| | | // css: "twoMenu_imge74", |
| | | // }, |
| | | { |
| | | id: "j5", |
| | | label: "synthesis.synthobj.m5", |
| | |
| | | label: "synthesis.synthobj.m9", |
| | | name: "高程量测", |
| | | css: "twoMenu_imge77", |
| | | }, |
| | | { |
| | | id: "j8", |
| | | label: "synthesis.removeMeasure", |
| | | name: "清除", |
| | | css: "twoMenu_imge87", |
| | | }, |
| | | ], |
| | | [ |
| | |
| | | name: "多边形", |
| | | css: "twoMenu_imge84", |
| | | }, |
| | | { |
| | | id: "h5", |
| | | label: "synthesis.import", |
| | | name: "导入KML", |
| | | css: "twoMenu_imge85", |
| | | }, |
| | | // { |
| | | // id: "h5", |
| | | // label: "synthesis.import", |
| | | // name: "导入KML", |
| | | // css: "twoMenu_imge85", |
| | | // }, |
| | | { |
| | | id: "h6", |
| | | label: "synthesis.export", |
| | |
| | | css: "twoMenu_imge86", |
| | | }, |
| | | |
| | | { |
| | | id: "h9", |
| | | label: "synthesis.import1", |
| | | name: "导入SHP", |
| | | css: "twoMenu_imge85", |
| | | }, |
| | | { |
| | | id: "h10", |
| | | label: "synthesis.export1", |
| | | name: "导出SHP", |
| | | css: "twoMenu_imge86", |
| | | }, |
| | | // { |
| | | // id: "h9", |
| | | // label: "synthesis.import1", |
| | | // name: "导入SHP", |
| | | // css: "twoMenu_imge85", |
| | | // }, |
| | | // { |
| | | // id: "h10", |
| | | // label: "synthesis.export1", |
| | | // name: "导出SHP", |
| | | // css: "twoMenu_imge86", |
| | | // }, |
| | | |
| | | { |
| | | id: "h7", |
| | |
| | | name: "三维演示", |
| | | css: "twoMenu_imge35", |
| | | }, |
| | | ], |
| | | ], [ |
| | | { |
| | | id: "g1", |
| | | name: "知识图谱", |
| | | label: "synthesis.knowledgeGraph", |
| | | css: "twoMenu_imge12", |
| | | }, |
| | | ], [ |
| | | { |
| | | id: "k1", |
| | | name: "数据统计", |
| | | label: "dataManage.dataStatistics", |
| | | css: "twoMenu_imge12", |
| | | }, { |
| | | id: "k2", |
| | | name: "属性信息", |
| | | label: "synthesis.attributeInformation", |
| | | css: "twoMenu_imge12", |
| | | }, |
| | | ], [], [ |
| | | { |
| | | id: "m1", |
| | | label: "synthesis.fireAnalysis", |
| | | name: "火灾分析", |
| | | css: "twoMenu_imge414", |
| | | }, { |
| | | id: "m2", |
| | | label: "synthesis.floodanalysis", |
| | | name: "淹没分析", |
| | | css: "twoMenu_imge45", |
| | | }, |
| | | ] |
| | | ], |
| | | isRuler: false, |
| | | isNaviget: false, |
| | |
| | | this.isMenuFlag = val; |
| | | if (this.entityaLayers.length != 0) { |
| | | for (var i in this.entityaLayers) { |
| | | sgworld.Viewer.entities.remove(this.entityaLayers[i]); |
| | | if (this.entityaLayers[i].name != 'build') { |
| | | sgworld.Viewer.entities.remove(this.entityaLayers[i]); |
| | | i-- |
| | | } |
| | | |
| | | } |
| | | this.entityaLayers = []; |
| | | } |
| | |
| | | this.showTwoMenuFlag = res.id; |
| | | if (val != 'h' && res.id != "b9") { |
| | | sgworld.Creator.SimpleGraphic.clear(); |
| | | Viewer.entities.removeAll(); |
| | | // Viewer.entities.removeAll(); |
| | | var entities = Viewer.entities._entities._array; |
| | | for (var i = 0; i < entities.length; i++) { |
| | | |
| | | if (entities[i].name != 'build') { |
| | | Viewer.entities.remove(entities[i]) |
| | | i-- |
| | | } |
| | | } |
| | | } |
| | | switch (val) { |
| | | case "a": //图层管理 |
| | |
| | | case "h": |
| | | sgworld.Creator.SimpleGraphic.edit(true, { editProp: true }); |
| | | this.setPlot(res.id); |
| | | break; |
| | | case "g": |
| | | this.setknowledgeGraph(res.id) |
| | | break; |
| | | case "k": |
| | | this.setTransportInspection(res.id) |
| | | break; |
| | | case "m": |
| | | this.setDisaster(res.id) |
| | | break; |
| | | |
| | | } |
| | | }, |
| | | setDisaster(res) { |
| | | switch (res) { |
| | | case "m1": |
| | | var that = this; |
| | | const handler = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas) |
| | | handler.setInputAction((event) => { |
| | | let cartesian = Viewer.camera.pickEllipsoid(event.position); |
| | | let cartographic = Cesium.Cartographic.fromCartesian(cartesian); |
| | | |
| | | if (cartesian) { |
| | | let lng = parseFloat( |
| | | Cesium.Math.toDegrees(cartographic.longitude) |
| | | ).toFixed(6); // 经度 |
| | | let lat = parseFloat( |
| | | Cesium.Math.toDegrees(cartographic.latitude) |
| | | ).toFixed(6); // 纬度 |
| | | var alt = Viewer.camera.positionCartographic.height.toFixed(0); |
| | | that.setCreateFireAnalysis(lng, lat, alt); |
| | | } |
| | | handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK); |
| | | }, Cesium.ScreenSpaceEventType.LEFT_CLICK) |
| | | break; |
| | | case "m2": |
| | | this.closePipelinePop(); |
| | | if (window.AnalysisFlood) { |
| | | this.clear(res); |
| | | } else { |
| | | this.addAnalysisFlood(); |
| | | } |
| | | break; |
| | | } |
| | | }, |
| | | setTransportInspection(res) { |
| | | switch (res) { |
| | | case 'k1': |
| | | this.$store.state.showEchartCount = true; |
| | | break; |
| | | case 'k2': |
| | | this.$store.state.showPopBoxFlag = true; |
| | | this.$store.state.mapPopBoxFlag = "2"; |
| | | break; |
| | | } |
| | | }, |
| | | setknowledgeGraph(res) { |
| | | switch (res) { |
| | | case 'g1': |
| | | this.$store.state.knowledgeFlag = true; |
| | | break; |
| | | } |
| | | }, |
| | |
| | | document.body.removeChild(eleLink); |
| | | }; |
| | | let entities = new Cesium.EntityCollection(); |
| | | let dataSources = sgworld.Viewer.dataSources; |
| | | let dataSources = Viewer.dataSources; |
| | | for (let i = 0, j = dataSources.length; i < j; i++) { |
| | | for (let v of dataSources.get(i).entities.values) { |
| | | entities.add(v); |
| | | } |
| | | } |
| | | for (let v of sgworld.Viewer.entities.values) { |
| | | for (let v of Viewer.entities.values) { |
| | | entities.add(v); |
| | | } |
| | | |
| | | if (entities.values.length) { |
| | | console.log(sgworld.Viewer.entities); |
| | | // console.log(sgworld.Viewer.entities); |
| | | |
| | | let promise = Cesium.exportKml({ entities: sgworld.Viewer.entities }); |
| | | console.log(entities); |
| | | let promise = Cesium.exportKml({ entities: Viewer.entities }); |
| | | |
| | | // let promise = Cesium.exportKml({ entities: entities }); |
| | | promise.then(function (e) { |
| | | funDownload(e.kml, new Date().getTime() + ".kml"); |
| | |
| | | } |
| | | }, |
| | | handleSaveShp() { |
| | | var entities = sgworld.Viewer.entities.values; |
| | | var entities = Viewer.entities.values; |
| | | if (entities.length == 0) { |
| | | return; |
| | | } |
| | |
| | | }, |
| | | handleOpenClick() { |
| | | var that = this; |
| | | sgworld.Creator.SimpleGraphic.edit(true, { editProp: true }); |
| | | earthCtrl.factory.SimpleGraphic.edit(true, { editProp: true }); |
| | | let fileInput = document.querySelector(".file"); |
| | | fileInput.onchange = function (evt) { |
| | | let files = evt.target.files; |
| | |
| | | fileReader.readAsDataURL(file); |
| | | fileReader.onload = () => { |
| | | var kmlOptions = { |
| | | camera: sgworld.Viewer.scene.camera, |
| | | canvas: sgworld.Viewer.scene.canvas, |
| | | camera: Viewer.scene.camera, |
| | | canvas: Viewer.scene.canvas, |
| | | clampToGround: true, |
| | | }; |
| | | var geocachePromise = Cesium.KmlDataSource.load( |
| | | var geocachePromise = SmartEarth.Cesium.KmlDataSource.load( |
| | | fileReader.result, |
| | | kmlOptions |
| | | ); |
| | | |
| | | sgworld.Navigate.flyToObj(geocachePromise) |
| | | earthCtrl.camera.flyTo(geocachePromise) |
| | | |
| | | geocachePromise.then(function (dataSource) { |
| | | var geocacheEntities = dataSource.entities.values; |
| | |
| | | for (var i = 0; i < geocacheEntities.length; i++) { |
| | | var entity = geocacheEntities[i]; |
| | | |
| | | sgworld.Viewer.entities.add(entity); |
| | | Viewer.entities.add(entity); |
| | | } |
| | | }); |
| | | // sgworld.Viewer.dataSources |
| | |
| | | setMeasurement(res) { |
| | | switch (res) { |
| | | case "j1": |
| | | var measure = window.sgworld.Command.execute( |
| | | 0, |
| | | 2, |
| | | this.colorAll, |
| | | (data) => { |
| | | data.id = window.sgworld.Core.getuid(); |
| | | this.measureData.set(data.id, measure); |
| | | this.openMeasureResultInfo("表面距离", data); |
| | | } |
| | | ); |
| | | earthCtrl.measure.clampLineDistance(this.colorAll, (e) => { |
| | | console.log(e) |
| | | }); |
| | | break; |
| | | case "j6": |
| | | var measure = window.sgworld.Command.execute( |
| | | 0, |
| | | 10, |
| | | this.colorAll, |
| | | (data) => { |
| | | data.id = window.sgworld.Core.getuid(); |
| | | this.measureData.set(data.id, measure); |
| | | this.openMeasureResultInfo("空间距离", data); |
| | | } |
| | | ); |
| | | earthCtrl.measure.horizontalDistance(this.colorAll, (e) => { |
| | | console.log(e); |
| | | }); |
| | | break; |
| | | // case 'j3': |
| | | |
| | |
| | | |
| | | // break; |
| | | case "j2": |
| | | var measure = window.sgworld.Command.execute( |
| | | 0, |
| | | 5, |
| | | this.colorAll, |
| | | (data) => { |
| | | data.id = window.sgworld.Core.getuid(); |
| | | this.measureData.set(data.id, measure); |
| | | this.openMeasureResultInfo("垂直高度", data); |
| | | } |
| | | ); |
| | | earthCtrl.measure.height(this.colorAll, (e) => { |
| | | console.log(e) |
| | | }); |
| | | break; |
| | | case "j5": |
| | | var measure = window.sgworld.Command.execute( |
| | | var color = this.colorAll; |
| | | var measure = earthCtrl.measure.surfaceArea( |
| | | 0, |
| | | 8, |
| | | { |
| | | ...this.colorAll, |
| | | ...color, |
| | | tin: true, // 是否显示tin三角网 |
| | | onlyTerrain: false, // 是否只测量精细地形 |
| | | }, |
| | | (data) => { |
| | | data.id = window.sgworld.Core.getuid(); |
| | | this.measureData.set(data.id, measure); |
| | | this.openMeasureResultInfo("表面面积", data); |
| | | |
| | | } |
| | | ); |
| | | break; |
| | | case "j3": |
| | | var measure = window.sgworld.Command.execute( |
| | | 0, |
| | | 3, |
| | | this.colorAll, |
| | | (data) => { |
| | | data.id = window.sgworld.Core.getuid(); |
| | | this.measureData.set(data.id, measure); |
| | | this.openMeasureResultInfo("平面面积", data); |
| | | } |
| | | ); |
| | | earthCtrl.measure.surfaceArea({ |
| | | ...this.colorAll, |
| | | tin: true, // 是否显示tin三角网 |
| | | onlyTerrain: false // 是否只测量精细地形 |
| | | }, (e) => { |
| | | console.log(e) |
| | | |
| | | }); |
| | | break; |
| | | case "j4": |
| | | var volumetricMeasurementTool = |
| | |
| | | } |
| | | ); |
| | | break; |
| | | case "j8": |
| | | var measure = window.sgworld.Command.execute( |
| | | 0, |
| | | 12, |
| | | this.colorAll, |
| | | (data) => { |
| | | data.id = window.sgworld.Core.getuid(); |
| | | this.measureData.set(data.id, measure); |
| | | this.openMeasureResultInfo("角度", data); |
| | | } |
| | | ); |
| | | break; |
| | | // case "j8": |
| | | // var measure = window.sgworld.Command.execute( |
| | | // 0, |
| | | // 12, |
| | | // this.colorAll, |
| | | // (data) => { |
| | | // data.id = window.sgworld.Core.getuid(); |
| | | // this.measureData.set(data.id, measure); |
| | | // this.openMeasureResultInfo("角度", data); |
| | | // } |
| | | // ); |
| | | // break; |
| | | case "j7": |
| | | var measure = window.sgworld.Command.execute( |
| | | 1, |
| | | 11, |
| | | this.colorAll, |
| | | (data) => { |
| | | data.id = window.sgworld.Core.getuid(); |
| | | this.measureData.set(data.id, measure); |
| | | this.openMeasureResultInfo("海拔高度", data); |
| | | } |
| | | ); |
| | | earthCtrl.measure.altitude(this.colorAll, (e) => { |
| | | console.log(e) |
| | | }); |
| | | break; |
| | | case "j8": |
| | | earthCtrl.measure.clearResult() |
| | | break; |
| | | } |
| | | }, |
| | |
| | | } |
| | | |
| | | break; |
| | | |
| | | } |
| | | }, |
| | | |
| | | setCreateFireAnalysis(lon, lat, alt) { |
| | | console.log(lon, lat, alt) |
| | | var particle = earthCtrl.factory.createParticleEffect("flame", { |
| | | x: lon, |
| | | y: lat, |
| | | z: 0 |
| | | }, { |
| | | translation: SmartEarth.Cesium.Cartesian3.fromElements(0, 0, 0), //平移 |
| | | }, (data) => { } |
| | | ); |
| | | }, |
| | | //模型裁切 |
| | | modelClipping() { |
| | | const scene = Viewer.scene; |
| | |
| | | } |
| | | break; |
| | | case "c2": |
| | | var url = window.location.href; |
| | | var testurl = ""; |
| | | if (url.indexOf("web") != -1) { |
| | | testurl = "/web"; |
| | | } |
| | | window.sgworld.Command.execute(2, 3, "", (data) => { |
| | | data.showPoint = false; |
| | | data.showLine = true; |
| | | data.mode = 0; |
| | | // 弹窗数据 |
| | | window.PathAnimationData = { |
| | | flyData: data, |
| | | }; |
| | | window.PathAnimationData.winIndex = layer.open({ |
| | | type: 2, |
| | | title: "路径动画", |
| | | shade: false, |
| | | area: ["352px", "690px"], |
| | | offset: "r", |
| | | skin: "other-class", |
| | | content: testurl + "/SmartEarthSDK/Workers/path/Path.html", |
| | | end: function () { |
| | | PathAnimationData.fly && PathAnimationData.fly.exit(); |
| | | }, |
| | | }); |
| | | }); |
| | | this.$store.state.lineRoam = true; |
| | | break; |
| | | case "c3": |
| | | sgworld.Analysis.createindoormode({ showHelp: true }); |
| | |
| | | this.$store.state.isProjectLayer.push(str); |
| | | } |
| | | }) |
| | | var geoJson = std.filter((str) => { |
| | | if (str.serveType != 'GEOJSON' && str.type == 2 && str.isShow == 1) { |
| | | return str; |
| | | } |
| | | |
| | | }) |
| | | layerManager.setAddGeoLayer(geoJson) |
| | | this.setAddLayers(value); |
| | | var res = this.setTreeData(val); |
| | | this.$store.state.pigCode = null; |
| | |
| | | window.map.addLayer(layer2); |
| | | }, |
| | | 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); |
| | | start = html.lastIndexOf(tab) + tab.length + 1; |
| | | end = html.indexOf("</td>", start); |
| | | var gid = html.substr(start, end - start); |
| | | |
| | | if (gid && tab) { |
| | | this.$store.state.pickoption = { |
| | | gid: gid, |
| | | name: tab.replaceAll("_", "") |
| | | var std = html.substr(html.indexOf('<th>'), html.lastIndexOf('</th>') - html.indexOf('<th>') + 5).replaceAll(' ', '').replaceAll('\n', '').split('</th>') |
| | | var str = html.substr(html.indexOf('<td>'), html.lastIndexOf('</td>') - html.indexOf('<td>') + 5).replaceAll(' ', '').replaceAll('\n', '').split('</td>') |
| | | var arr = []; |
| | | for (var i in std) { |
| | | var name, val; |
| | | name = std[i]; |
| | | val = str[i] |
| | | if (name == "") { |
| | | continue |
| | | } |
| | | if (tab == 'm_surface_deformation_data') { |
| | | this.$store.state.surfaceDeForm.flag = true; |
| | | this.$store.state.surfaceDeForm.gid = gid; |
| | | } else { |
| | | this.$store.state.surfaceDeForm.flag = false; |
| | | this.$store.state.surfaceDeForm.gid = null; |
| | | if (name.indexOf('<th>') > -1) { |
| | | name = name.replaceAll('<th>', '') |
| | | } |
| | | const res = await dataQuery_selectTabByEntity({ |
| | | name: this.$store.state.pickoption.name |
| | | }) |
| | | |
| | | if (res.code != 200) { |
| | | return; |
| | | if (val.indexOf('<td>') > -1) { |
| | | val = val.replaceAll('<td>', '') |
| | | } |
| | | var value = res.result.split('.') |
| | | this.$store.state.propertiesName = { |
| | | ns: value[0], |
| | | enName: value[1], |
| | | tabDesc: '拾取信息' |
| | | } |
| | | var name = this.$store.state.pickoption.name; |
| | | const data = await inquiry_selectFields({ name: name }) |
| | | if (data.code != 200) { |
| | | this.$message.error("列表调用失败") |
| | | } |
| | | const data1 = await inquiry_selectDomains({ name: name }) |
| | | if (data1.code != 200) { |
| | | this.$message.error("列表调用失败") |
| | | } |
| | | this.optionx = [] |
| | | this.attributeData = [] |
| | | var valadata = data.result |
| | | var laydomain = data1.result |
| | | this.optionx = data1.result |
| | | for (var i in valadata) { |
| | | if (valadata[i].showtype == 1) { |
| | | if ( |
| | | valadata[i].domainNa != null && |
| | | valadata[i].domainNa != undefined |
| | | ) { |
| | | for (var j in laydomain) { |
| | | if (laydomain[j].domName == valadata[i].domainNa) { |
| | | // valadata[i].domainNa = laydomain[j].codeDesc |
| | | } |
| | | } |
| | | } |
| | | // this.optionx.push(valadata[i]) |
| | | this.attributeData.push(valadata[i]) |
| | | } |
| | | if (name != ">") { |
| | | arr.push({ |
| | | name: name, |
| | | val: val |
| | | }) |
| | | } |
| | | |
| | | this.getTableData() |
| | | } |
| | | |
| | | if (arr.length > 0) { |
| | | this.$store.state.propertiesInfo = arr; |
| | | |
| | | this.$store.state.propertiesFlag = '1' |
| | | } |
| | | |
| | | |
| | | // this.getTableData() |
| | | // if (gid && tab) { |
| | | // this.$store.state.pickoption = { |
| | | // gid: gid, |
| | | // name: tab.replaceAll("_", "") |
| | | // } |
| | | // if (tab == 'm_surface_deformation_data') { |
| | | // this.$store.state.surfaceDeForm.flag = true; |
| | | // this.$store.state.surfaceDeForm.gid = gid; |
| | | // } else { |
| | | // this.$store.state.surfaceDeForm.flag = false; |
| | | // this.$store.state.surfaceDeForm.gid = null; |
| | | // } |
| | | // const res = await dataQuery_selectTabByEntity({ |
| | | // name: this.$store.state.pickoption.name |
| | | // }) |
| | | |
| | | // if (res.code != 200) { |
| | | // return; |
| | | // } |
| | | // var value = res.result.split('.') |
| | | // this.$store.state.propertiesName = { |
| | | // ns: value[0], |
| | | // enName: value[1], |
| | | // tabDesc: '拾取信息' |
| | | // } |
| | | // var name = this.$store.state.pickoption.name; |
| | | // const data = await inquiry_selectFields({ name: name }) |
| | | // if (data.code != 200) { |
| | | // this.$message.error("列表调用失败") |
| | | // } |
| | | // const data1 = await inquiry_selectDomains({ name: name }) |
| | | // if (data1.code != 200) { |
| | | // this.$message.error("列表调用失败") |
| | | // } |
| | | // this.optionx = [] |
| | | // this.attributeData = [] |
| | | // var valadata = data.result |
| | | // var laydomain = data1.result |
| | | // this.optionx = data1.result |
| | | // for (var i in valadata) { |
| | | // if (valadata[i].showtype == 1) { |
| | | // if ( |
| | | // valadata[i].domainNa != null && |
| | | // valadata[i].domainNa != undefined |
| | | // ) { |
| | | // for (var j in laydomain) { |
| | | // if (laydomain[j].domName == valadata[i].domainNa) { |
| | | // // valadata[i].domainNa = laydomain[j].codeDesc |
| | | // } |
| | | // } |
| | | // } |
| | | // // this.optionx.push(valadata[i]) |
| | | // this.attributeData.push(valadata[i]) |
| | | // } |
| | | // } |
| | | |
| | | // this.getTableData() |
| | | // } |
| | | }, |
| | | //格式化时间 |
| | | format(shijianchuo) { |
| | |
| | | this.$bus.$off(); |
| | | this.measureData = new Map(); |
| | | this.colorAll = { |
| | | point: Cesium.Color.fromCssColorString("#ff0000"), |
| | | polyline: Cesium.Color.fromCssColorString("#ffff00").withAlpha(0.6), |
| | | polygon: Cesium.Color.fromCssColorString("#ffff00").withAlpha(0.6), |
| | | point: SmartEarth.Cesium.Color.fromCssColorString("#ff0000"), |
| | | polyline: SmartEarth.Cesium.Color.fromCssColorString("#ffff00").withAlpha(0.6), |
| | | polygon: SmartEarth.Cesium.Color.fromCssColorString("#ffff00").withAlpha(0.6), |
| | | }; |
| | | this.$store.state.setAlphaList = [] |
| | | this.$bus.$on("setChangeTwoMenu", (res) => { |
| | |
| | | this.$store.state.treeData = null; |
| | | this.$store.state.checkedKeys = []; |
| | | // this.setCoverage("a1"); |
| | | this.layersStart(); |
| | | |
| | | setTimeout(() => { |
| | | this.layersStart(); |
| | | }, 1000); |
| | | |
| | | this.$bus.$on("setDialogInsertVisible", (res) => { |
| | | if (res == true) { |
| | |
| | | height: 30px; |
| | | display: inline-block; |
| | | } |
| | | |
| | | .pdfClass { |
| | | height: 63vh; |
| | | width: 100%; |