| | |
| | | @click="setChangeTwoMenu(item)" |
| | | v-for="(item, index) in setListTwoMenu" |
| | | :class="{ lefMenuDivActive: showTwoMenuFlag == item.id }" |
| | | :key="index" |
| | | > |
| | | <div |
| | | class="menuTwoImage" |
| | | :class="item.css" |
| | | ></div> |
| | | <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 type="file" accept=".kml" class="file" style="display: none" /> |
| | | <input |
| | | :accept="'.shp, .shx, .dbf, .prj'" |
| | | style="display: none" |
| | |
| | | :modal="false" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <div |
| | | v-if="dialog.isPdf" |
| | | class="pdfClass" |
| | | > |
| | | <div v-if="dialog.isPdf" class="pdfClass"> |
| | | <iframe |
| | | :src="dialog.src" |
| | | type="application/x-google-chrome-pdf" |
| | |
| | | > |
| | | </iframe> |
| | | </div> |
| | | <div |
| | | v-if="dialog.isJpg" |
| | | class="pdfClass" |
| | | > |
| | | |
| | | <div v-if="dialog.isJpg" class="pdfClass"> |
| | | <el-image |
| | | style="width:100%; height:100%" |
| | | 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" |
| | | > |
| | | |
| | | <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> --> |
| | | {{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 |
| | |
| | | @click="EditData" |
| | | >{{$t('common.update')}}</el-button> |
| | | </el-form-item> --> |
| | | |
| | | </el-form> |
| | | |
| | | </el-tab-pane> |
| | | <el-tab-pane |
| | | label="附件" |
| | | name="second" |
| | | > |
| | | |
| | | <el-tab-pane label="附件" name="second"> |
| | | <el-table |
| | | :data="tableData" |
| | | ref="filterTable" |
| | |
| | | style="width: 100%" |
| | | @selection-change="handleAttatchChange" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="70" |
| | | /> |
| | | <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="name" :label="$t('common.name')" /> |
| | | |
| | | <el-table-column |
| | | prop="sizes" |
| | |
| | | v-if="matchState(scope, /[]/)" |
| | | @click="setAttatchDetail(scope.$index, scope.row)" |
| | | class="elLink" |
| | | >{{ $t('common.see') }}</el-link> |
| | | |
| | | >{{ $t("common.see") }}</el-link |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | </el-tab-pane> |
| | | |
| | | </el-tabs> |
| | | |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | |
| | | :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> |
| | |
| | | </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> |
| | |
| | | label-width="100px" |
| | | class="codeForm" |
| | | > |
| | | <el-form-item |
| | | :label="$t('common.passworld')" |
| | | prop="password" |
| | | > |
| | | <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-form-item :label="$t('common.SPassword')" prop="repassword"> |
| | | <el-input |
| | | type="password" |
| | | v-model="codeForm.repassword" |
| | |
| | | class="primary" |
| | | size="small" |
| | | @click="downloadx('codeForm')" |
| | | >{{ $t("common.confirm") }}</el-button> |
| | | <el-button |
| | | type="info" |
| | | size="small" |
| | | @click="closeDownx('codeForm')" |
| | | >{{ |
| | | >{{ $t("common.confirm") }}</el-button |
| | | > |
| | | <el-button type="info" size="small" @click="closeDownx('codeForm')">{{ |
| | | $t("common.cancel") |
| | | }}</el-button> |
| | | </el-form-item> |
| | |
| | | :lock-scroll="false" |
| | | :close-on-click-modal="false" |
| | | > |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="16"> |
| | | <el-input v-model="setExtent"></el-input> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <div> |
| | | 单位:(m) |
| | | </div> |
| | | <div>单位:(m)</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> |
| | |
| | | comprehensive_deletes, |
| | | comprehensive_selectModelByPageAndCount, |
| | | comprehensive_insertModel, |
| | | comprehensive_updateModel, selectByBuffer, |
| | | comprehensive_updateModel, |
| | | selectByBuffer, |
| | | dataQuery_selectTabByEntity, |
| | | inquiry_selectDomains, |
| | | inquiry_selectFields, |
| | | dataQuery_selectByGid, |
| | | } from '../../api/api.js' |
| | | } from "../../api/api.js"; |
| | | import { |
| | | OverviewMap, |
| | | defaults as defaultControls, |
| | |
| | | import { geometry } from "@turf/turf"; |
| | | |
| | | export default { |
| | | components: { mapinfo, maplayer, queryinfo, terrainDig, modelAttach, undergroundModel, setPellucidity }, |
| | | components: { |
| | | mapinfo, |
| | | maplayer, |
| | | queryinfo, |
| | | terrainDig, |
| | | modelAttach, |
| | | undergroundModel, |
| | | setPellucidity, |
| | | }, |
| | | data() { |
| | | var repasswordValidator = (rule, value, callback) => { |
| | | if (value === '') { |
| | | callback(new Error('请再次输入密码')); |
| | | if (value === "") { |
| | | callback(new Error("请再次输入密码")); |
| | | } else if (value !== this.codeForm.password) { |
| | | callback(new Error('两次输入密码不一致!')); |
| | | callback(new Error("两次输入密码不一致!")); |
| | | } else { |
| | | callback(); |
| | | } |
| | |
| | | var passwordreg = |
| | | /^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![a-z0-9]+$)(?![a-z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![0-9\W!@#$%^&*`~()\\-_+=,.?;<>]+$)[a-zA-Z0-9\W!@#$%^&*`~()\\-_+=,.?;<>]{12,20}$/; |
| | | if (!passwordreg.test(value)) { |
| | | callback( |
| | | new Error('密码必须由数字、字母、特殊字符组合,请输入13-20位') |
| | | ); |
| | | callback(new Error("密码必须由数字、字母、特殊字符组合,请输入13-20位")); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }; |
| | | return { |
| | | rules: { |
| | | password: [{ required: true, message: '请输入密码', trigger: 'blur' }, { validator: passwordValidator, trigger: 'blur' }], |
| | | password: [ |
| | | { required: true, message: "请输入密码", trigger: "blur" }, |
| | | { validator: passwordValidator, trigger: "blur" }, |
| | | ], |
| | | repassword: [ |
| | | { required: true, message: '请输入确认密码', trigger: 'blur' }, |
| | | { validator: repasswordValidator, trigger: 'blur' }, |
| | | { required: true, message: "请输入确认密码", trigger: "blur" }, |
| | | { validator: repasswordValidator, trigger: "blur" }, |
| | | ], |
| | | }, |
| | | codeForm: { |
| | | password: '', |
| | | repassword: '', |
| | | password: "", |
| | | repassword: "", |
| | | }, |
| | | showTwoMenuFlag: false, |
| | | setListTwoMenu: [], |
| | |
| | | name: "空间查询", |
| | | css: "twoMenu_imge52", |
| | | }, |
| | | |
| | | ], |
| | | [ |
| | | { |
| | |
| | | css: "twoMenu_imge84", |
| | | }, |
| | | { |
| | | id: "h11", |
| | | label: "synthesis.militaryMark", |
| | | name: "军事标绘", |
| | | css: "twoMenu_imge84", |
| | | }, |
| | | { |
| | | id: "h12", |
| | | label: "synthesis.modelPlotting", |
| | | name: "模型标绘", |
| | | css: "twoMenu_imge84", |
| | | }, |
| | | { |
| | | id: "h5", |
| | | label: "synthesis.import", |
| | | name: "导入KML", |
| | |
| | | DXZPState: null, //地形整平 |
| | | dialogVisible: false, |
| | | formInline: { |
| | | title: '', |
| | | file: '', |
| | | name: '', |
| | | type: '', |
| | | info: '', |
| | | icon: '', |
| | | bak: '' |
| | | title: "", |
| | | file: "", |
| | | name: "", |
| | | type: "", |
| | | info: "", |
| | | icon: "", |
| | | bak: "", |
| | | }, |
| | | tableData: [], |
| | | dialog: { |
| | | dialogVisible: false, |
| | | isPdf: false, |
| | | isJpg: false, |
| | | src: '' |
| | | src: "", |
| | | }, |
| | | activeName: "first", |
| | | isShowModel: false, |
| | | options: [ |
| | | { |
| | | value: '倾斜模型', |
| | | label: '倾斜模型' |
| | | }, { |
| | | value: 'BIM模型', |
| | | label: 'BIM模型' |
| | | }, { |
| | | value: '点云模型', |
| | | label: '点云模型' |
| | | }, { |
| | | value: '地质设计模型', |
| | | label: '地质设计模型' |
| | | }, { |
| | | value: '人工模型', |
| | | label: '人工模型' |
| | | }, { |
| | | value: '其他模型', |
| | | label: '其他模型' |
| | | }], |
| | | value: "倾斜模型", |
| | | label: "倾斜模型", |
| | | }, |
| | | { |
| | | value: "BIM模型", |
| | | label: "BIM模型", |
| | | }, |
| | | { |
| | | value: "点云模型", |
| | | label: "点云模型", |
| | | }, |
| | | { |
| | | value: "地质设计模型", |
| | | label: "地质设计模型", |
| | | }, |
| | | { |
| | | value: "人工模型", |
| | | label: "人工模型", |
| | | }, |
| | | { |
| | | value: "其他模型", |
| | | label: "其他模型", |
| | | }, |
| | | ], |
| | | modelClip: false, |
| | | showPickUp: false, |
| | | dialogInsertVisible: false, |
| | |
| | | this.clearAllAnalsy(); |
| | | } |
| | | |
| | | this.$store.state.propertiesFlag = ''; |
| | | this.$store.state.propertiesFlag = ""; |
| | | |
| | | if (this.isMenuFlag != val) { |
| | | if (res.id != "b9") { |
| | |
| | | } |
| | | } |
| | | this.showTwoMenuFlag = res.id; |
| | | if (val != 'h' && res.id != "b9") { |
| | | if (val != "h" && res.id != "b9") { |
| | | sgworld.Creator.SimpleGraphic.clear(); |
| | | Viewer.entities.removeAll(); |
| | | } |
| | |
| | | } |
| | | }, |
| | | setPlot(res) { |
| | | |
| | | switch (res) { |
| | | case "h1": |
| | | sgworld.Creator.createSimpleGraphic( |
| | | "point", |
| | | {}, |
| | | function (entity) { } |
| | | function (entity) {} |
| | | ); |
| | | break; |
| | | case "h2": |
| | | sgworld.Creator.createSimpleGraphic( |
| | | "polyline", |
| | | {}, |
| | | function (entity) { } |
| | | function (entity) {} |
| | | ); |
| | | break; |
| | | case "h3": |
| | | sgworld.Creator.createSimpleGraphic( |
| | | "rectangle", |
| | | {}, |
| | | function (entity) { } |
| | | function (entity) {} |
| | | ); |
| | | break; |
| | | case "h4": |
| | | sgworld.Creator.createSimpleGraphic( |
| | | "polygon", |
| | | {}, |
| | | function (entity) { } |
| | | function (entity) {} |
| | | ); |
| | | break; |
| | | case "h5": |
| | |
| | | sgworld.Creator.createSimpleGraphic( |
| | | "label", |
| | | {}, |
| | | function (entity) { } |
| | | function (entity) {} |
| | | ); |
| | | break; |
| | | // 军标 |
| | | case "h11": |
| | | this.$bus.$emit("setShowMilitaryMark", true); |
| | | this.$bus.$emit("setShowModelPlotting", false); |
| | | break; |
| | | // 模型 |
| | | case "h12": |
| | | this.$bus.$emit("setShowModelPlotting", true); |
| | | this.$bus.$emit("setShowMilitaryMark", false); |
| | | break; |
| | | } |
| | | }, |
| | |
| | | document.body.removeChild(a); // 释放 |
| | | } |
| | | }, |
| | | error: function (e) { }, |
| | | error: function (e) {}, |
| | | }); |
| | | }, |
| | | handleOpenShp() { |
| | |
| | | }, |
| | | }); |
| | | this.entityaLayers.push(entity); |
| | | sgworld.Navigate.flyToObj(entity) |
| | | sgworld.Navigate.flyToObj(entity); |
| | | break; |
| | | case "point": |
| | | let point = Viewer.entities.add({ |
| | |
| | | }); |
| | | |
| | | this.entityaLayers.push(point); |
| | | sgworld.Navigate.flyToObj(point) |
| | | sgworld.Navigate.flyToObj(point); |
| | | break; |
| | | case "polyline": |
| | | var std = []; |
| | |
| | | }); |
| | | |
| | | this.entityaLayers.push(line); |
| | | sgworld.Navigate.flyToObj(line) |
| | | sgworld.Navigate.flyToObj(line); |
| | | break; |
| | | case "label": |
| | | const label = Viewer.entities.add({ |
| | |
| | | }, |
| | | }); |
| | | this.entityaLayers.push(label); |
| | | sgworld.Navigate.flyToObj(label) |
| | | sgworld.Navigate.flyToObj(label); |
| | | break; |
| | | } |
| | | } |
| | |
| | | kmlOptions |
| | | ); |
| | | |
| | | sgworld.Navigate.flyToObj(geocachePromise) |
| | | sgworld.Navigate.flyToObj(geocachePromise); |
| | | |
| | | geocachePromise.then(function (dataSource) { |
| | | var geocacheEntities = dataSource.entities.values; |
| | |
| | | url, |
| | | name, |
| | | "height=" + |
| | | iHeight + |
| | | ",,innerHeight=" + |
| | | iHeight + |
| | | ",width=" + |
| | | iWidth + |
| | | ",innerWidth=" + |
| | | iWidth + |
| | | ",top=" + |
| | | iTop + |
| | | ",left=" + |
| | | iLeft + |
| | | ",toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no" |
| | | iHeight + |
| | | ",,innerHeight=" + |
| | | iHeight + |
| | | ",width=" + |
| | | iWidth + |
| | | ",innerWidth=" + |
| | | iWidth + |
| | | ",top=" + |
| | | iTop + |
| | | ",left=" + |
| | | iLeft + |
| | | ",toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no" |
| | | ); |
| | | }, |
| | | |
| | |
| | | "auto", |
| | | (data) => { |
| | | if (volumetricMeasurementTool.popupData) { |
| | | volumetricMeasurementTool.popupData.value = `填方:${data.volume.fill.toFixed(4) + data.unit.fill |
| | | }<br>挖方:${data.volume.dig.toFixed(4) + data.unit.dig}`; |
| | | volumetricMeasurementTool.popupData.value = `填方:${ |
| | | data.volume.fill.toFixed(4) + data.unit.fill |
| | | }<br>挖方:${data.volume.dig.toFixed(4) + data.unit.dig}`; |
| | | } else { |
| | | data.id = window.sgworld.Core.getuid(); |
| | | this.measureData.set(data.id, volumetricMeasurementTool); |
| | |
| | | }); |
| | | break; |
| | | case "体积方量": |
| | | info = `填方:${data.volume.fill.toFixed(4) + data.unit.fill |
| | | }<br>挖方:${data.volume.dig.toFixed(4) + data.unit.dig}`; |
| | | info = `填方:${ |
| | | data.volume.fill.toFixed(4) + data.unit.fill |
| | | }<br>挖方:${data.volume.dig.toFixed(4) + data.unit.dig}`; |
| | | break; |
| | | } |
| | | return ( |
| | |
| | | }, Cesium.ScreenSpaceEventType.LEFT_CLICK); |
| | | } else { |
| | | this.$refs.queryinfo.closeAll(); |
| | | Viewer.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK); |
| | | Viewer.screenSpaceEventHandler.removeInputAction( |
| | | Cesium.ScreenSpaceEventType.LEFT_CLICK |
| | | ); |
| | | } |
| | | break; |
| | | } |
| | |
| | | "auto", |
| | | (data) => { |
| | | if (TFvolumetricMeasurementTool.popupData) { |
| | | TFvolumetricMeasurementTool.popupData.value = `填方:${data.volume.fill.toFixed(4) + data.unit.fill |
| | | }<br>挖方:${data.volume.dig.toFixed(4) + data.unit.dig}`; |
| | | TFvolumetricMeasurementTool.popupData.value = `填方:${ |
| | | data.volume.fill.toFixed(4) + data.unit.fill |
| | | }<br>挖方:${data.volume.dig.toFixed(4) + data.unit.dig}`; |
| | | } else { |
| | | data.id = sgworld.Core.getuid(); |
| | | this.measureData.set(data.id, TFvolumetricMeasurementTool); |
| | |
| | | // that.$store.state.propertiesFlag = '3'; |
| | | if (window.model) { |
| | | that.modelClipping(); |
| | | } |
| | | else { |
| | | } else { |
| | | var tileset = Viewer.scene.primitives.add( |
| | | new Cesium.Cesium3DTileset({ |
| | | name: res.cnName, |
| | | url: modelUrl + "/tileset/m/SN/tileset.json", |
| | | maximumScreenSpaceError: modelUrl.indexOf("/pnts/") > -1 ? 16 : 64, // 最大屏幕空间错误:16 |
| | | maximumScreenSpaceError: |
| | | modelUrl.indexOf("/pnts/") > -1 ? 16 : 64, // 最大屏幕空间错误:16 |
| | | maximumMemoryUsage: 768, // 最大内存:512 |
| | | dynamicScreenSpaceError: true, // 减少离相机较远的屏幕空间错误:false |
| | | skipLevelOfDetail: true, // 在遍历时候跳过详情:false |
| | |
| | | Viewer.flyTo(tileset); |
| | | that.modelClipping(); |
| | | }); |
| | | window.model = tileset |
| | | window.model = tileset; |
| | | } |
| | | } |
| | | else { |
| | | } else { |
| | | // that.$store.state.propertiesFlag = ''; |
| | | Viewer.entities.removeAll(); |
| | | } |
| | |
| | | this.closePipelinePop(); |
| | | if (this.isContrastFlag == false) { |
| | | this.isContrastFlag = true; |
| | | var localUrl = 'http://{host}/LFData/2d/tiles/img/{z}/{x}/{y}.png' |
| | | localUrl = localUrl.replace("{host}", iisHost) |
| | | var localUrl = "http://{host}/LFData/2d/tiles/img/{z}/{x}/{y}.png"; |
| | | localUrl = localUrl.replace("{host}", iisHost); |
| | | window.contRastLayer = Viewer.imageryLayers.addImageryProvider( |
| | | new Cesium.UrlTemplateImageryProvider({ |
| | | url: localUrl, |
| | | maximumLevel: 22, |
| | | enablePickFeatures: false |
| | | enablePickFeatures: false, |
| | | }) |
| | | ); |
| | | Viewer.imageryLayers.lowerToBottom(window.contRastLayer);//将图层移到最底层 |
| | | Viewer.imageryLayers.lowerToBottom(window.contRastLayer); //将图层移到最底层 |
| | | |
| | | Viewer.imageryLayers.raise(window.contRastLayer);//将图层上移一层 |
| | | Viewer.imageryLayers.raise(window.contRastLayer); //将图层上移一层 |
| | | if (window.BaseMapLayer) { |
| | | Viewer.imageryLayers.raise(window.contRastLayer);//将图层上移一层 |
| | | Viewer.imageryLayers.raise(window.contRastLayer); //将图层上移一层 |
| | | sgworld.Analysis.createCurtainContrast(1, 2); |
| | | } else { |
| | | sgworld.Analysis.createCurtainContrast(0, 1); |
| | | } |
| | | |
| | | } else { |
| | | this.isContrastFlag = false; |
| | | sgworld.Analysis.clearCurtainContrast(); |
| | | if (window.contRastLayer) { |
| | | window.Viewer.imageryLayers.remove( |
| | | window.contRastLayer |
| | | ); |
| | | window.Viewer.imageryLayers.remove(window.contRastLayer); |
| | | window.contRastLayer = null; |
| | | } |
| | | } |
| | |
| | | window.Excavation = sgworld.Analysis.TerrainExcavation( |
| | | 10, |
| | | {}, |
| | | function () { } |
| | | function () {} |
| | | ); |
| | | } |
| | | break; |
| | |
| | | let planeEntities = []; |
| | | let selectedPlane; |
| | | let clippingPlanes = new Cesium.ClippingPlaneCollection({ |
| | | planes: [ // ClippingPlane对象数组集合 |
| | | planes: [ |
| | | // ClippingPlane对象数组集合 |
| | | new Cesium.ClippingPlane( // 裁切面 |
| | | new Cesium.Cartesian3(0.0, 0.0, -1.0), // 法线方向 |
| | | 0// 原点到平面的最短距离,设置0就好 |
| | | 0 // 原点到平面的最短距离,设置0就好 |
| | | ), |
| | | ], |
| | | enabled: true, |
| | |
| | | dimensions: new Cesium.Cartesian2( |
| | | boundingSphere.radius * 1.5, |
| | | boundingSphere.radius * 1.5 |
| | | ),//切面的长和宽 |
| | | ), //切面的长和宽 |
| | | material: Cesium.Color.WHITE.withAlpha(0.1), |
| | | plane: new Cesium.CallbackProperty( |
| | | // 添加绑定事件,不断调用 |
| | |
| | | window.model.clippingPlanes = clippingPlanes; |
| | | if (window.modelHeight && window.modelHeight != 0) { |
| | | // console.log("window.modelHeight---",window.modelHeight) |
| | | window.model.clippingPlanes.modelMatrix = Cesium.Matrix4.fromTranslation( |
| | | new Cesium.Cartesian3(0.0, 0.0, window.modelHeight) |
| | | ); |
| | | window.model.clippingPlanes.modelMatrix = |
| | | Cesium.Matrix4.fromTranslation( |
| | | new Cesium.Cartesian3(0.0, 0.0, window.modelHeight) |
| | | ); |
| | | } |
| | | // 绑定上移动事件 |
| | | const downHandler = new Cesium.ScreenSpaceEventHandler( |
| | |
| | | }, Cesium.ScreenSpaceEventType.LEFT_DOWN); |
| | | |
| | | // 绑定下移动事件 |
| | | const upHandler = new Cesium.ScreenSpaceEventHandler( |
| | | Viewer.scene.canvas |
| | | ); |
| | | const upHandler = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas); |
| | | upHandler.setInputAction(function () { |
| | | if (Cesium.defined(selectedPlane)) { |
| | | selectedPlane.material = Cesium.Color.WHITE.withAlpha(0.1); |
| | |
| | | var y = normal.y; |
| | | var z = normal.z; |
| | | if (x == 1 && y == 0 && z == 0) { |
| | | m_type = 'left'; |
| | | } |
| | | else if (x == -1 && y == 0 && z == 0) { |
| | | m_type = 'right'; |
| | | } |
| | | else if (x == 0 && y == 1 && z == 0) { |
| | | m_type = 'behind'; |
| | | } |
| | | else if (x == 0 && y == -1 && z == 0) { |
| | | m_type = 'front'; |
| | | } |
| | | else if (x == 0 && y == 0 && z == -1) { |
| | | m_type = 'top'; |
| | | m_type = "left"; |
| | | } else if (x == -1 && y == 0 && z == 0) { |
| | | m_type = "right"; |
| | | } else if (x == 0 && y == 1 && z == 0) { |
| | | m_type = "behind"; |
| | | } else if (x == 0 && y == -1 && z == 0) { |
| | | m_type = "front"; |
| | | } else if (x == 0 && y == 0 && z == -1) { |
| | | m_type = "top"; |
| | | } |
| | | return m_type; |
| | | } |
| | | 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; |
| | | var num_z = window.localStorage.getItem('slider_z') / 1.5;//读取滑动条值 |
| | | var num_x = window.localStorage.getItem("slider_x") / 100000; |
| | | var num_y = window.localStorage.getItem("slider_y") / 100000; |
| | | var num_z = window.localStorage.getItem("slider_z") / 1.5; //读取滑动条值 |
| | | var origin_degree = cartesian3ToDegrees(origin); |
| | | var target_degree_x = [origin_degree[0] + num_x, origin_degree[1], +origin_degree[2]]; |
| | | var target_degree_y = [origin_degree[0], origin_degree[1] + num_y, +origin_degree[2]]; |
| | | var target_degree_z = [origin_degree[0], origin_degree[1], +origin_degree[2] + num_z]; |
| | | var m_dis_x = Cesium.Cartesian3.distance(origin, Cesium.Cartesian3.fromDegrees(target_degree_x[0], target_degree_x[1], target_degree_x[2])); |
| | | var m_dis_y = Cesium.Cartesian3.distance(origin, Cesium.Cartesian3.fromDegrees(target_degree_y[0], target_degree_y[1], target_degree_y[2])); |
| | | var m_dis_z = Cesium.Cartesian3.distance(origin, Cesium.Cartesian3.fromDegrees(target_degree_z[0], target_degree_z[1], target_degree_z[2])); |
| | | var target_degree_x = [ |
| | | origin_degree[0] + num_x, |
| | | origin_degree[1], |
| | | +origin_degree[2], |
| | | ]; |
| | | var target_degree_y = [ |
| | | origin_degree[0], |
| | | origin_degree[1] + num_y, |
| | | +origin_degree[2], |
| | | ]; |
| | | var target_degree_z = [ |
| | | origin_degree[0], |
| | | origin_degree[1], |
| | | +origin_degree[2] + num_z, |
| | | ]; |
| | | var m_dis_x = Cesium.Cartesian3.distance( |
| | | origin, |
| | | Cesium.Cartesian3.fromDegrees( |
| | | target_degree_x[0], |
| | | target_degree_x[1], |
| | | target_degree_x[2] |
| | | ) |
| | | ); |
| | | var m_dis_y = Cesium.Cartesian3.distance( |
| | | origin, |
| | | Cesium.Cartesian3.fromDegrees( |
| | | target_degree_y[0], |
| | | target_degree_y[1], |
| | | target_degree_y[2] |
| | | ) |
| | | ); |
| | | var m_dis_z = Cesium.Cartesian3.distance( |
| | | origin, |
| | | Cesium.Cartesian3.fromDegrees( |
| | | target_degree_z[0], |
| | | target_degree_z[1], |
| | | target_degree_z[2] |
| | | ) |
| | | ); |
| | | createPlanePos(origin_degree, num_x, num_y, num_z); |
| | | let distance = 140; |
| | | if (type == 'left') { |
| | | if (type == "left") { |
| | | if (num_x < 0) { |
| | | plane.distance = distance - (-m_dis_x); |
| | | plane.distance = distance - -m_dis_x; |
| | | return plane; |
| | | } else { |
| | | plane.distance = distance - m_dis_x |
| | | plane.distance = distance - m_dis_x; |
| | | return plane; |
| | | } |
| | | } |
| | | else if (type == 'behind') { |
| | | } else if (type == "behind") { |
| | | if (num_y < 0) { |
| | | plane.distance = distance - (-m_dis_y); |
| | | plane.distance = distance - -m_dis_y; |
| | | return plane; |
| | | } else { |
| | | plane.distance = distance - m_dis_y; |
| | | return plane; |
| | | } |
| | | } |
| | | else if (type == 'right') { |
| | | } else if (type == "right") { |
| | | if (num_x < 0) { |
| | | plane.distance = distance - m_dis_x; |
| | | return plane; |
| | | } else { |
| | | plane.distance = distance - (-m_dis_x); |
| | | plane.distance = distance - -m_dis_x; |
| | | return plane; |
| | | } |
| | | } |
| | | else if (type == 'front') { |
| | | } else if (type == "front") { |
| | | if (num_y < 0) { |
| | | plane.distance = distance - m_dis_y; |
| | | return plane; |
| | | } else { |
| | | plane.distance = distance - (-m_dis_y); |
| | | plane.distance = distance - -m_dis_y; |
| | | return plane; |
| | | } |
| | | } |
| | | else if (type == 'top') { |
| | | } else if (type == "top") { |
| | | if (num_z < 0) { |
| | | plane.distance = m_dis_z; |
| | | // console.log('num_z=========',num_z) |
| | |
| | | return plane; |
| | | } else { |
| | | // plane.distance = 100; |
| | | plane.distance = distance - (-m_dis_z); |
| | | plane.distance = distance - -m_dis_z; |
| | | return plane; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | function createPlanePos(origin, x, y, z) { |
| | | var clipbox = Viewer.entities.getById('ClopBox'); |
| | | var clipbox = Viewer.entities.getById("ClopBox"); |
| | | if (clipbox) { |
| | | clipbox.position = new Cesium.CallbackProperty(function () { |
| | | return Cesium.Cartesian3.fromDegrees(origin[0] + x, origin[1] + y, +origin[2] + z);//实时返回当前盒子的位置 |
| | | return Cesium.Cartesian3.fromDegrees( |
| | | origin[0] + x, |
| | | origin[1] + y, |
| | | +origin[2] + z |
| | | ); //实时返回当前盒子的位置 |
| | | }, false); |
| | | } |
| | | } |
| | |
| | | var pos = [lng, lat, alt]; |
| | | return pos; |
| | | } |
| | | |
| | | }, |
| | | |
| | | //关闭管道信息弹窗 |
| | |
| | | 2, |
| | | 2, |
| | | method, |
| | | (value) => { } |
| | | (value) => {} |
| | | ); |
| | | }, |
| | | addterrainSectionAnalysis() { |
| | |
| | | } else { |
| | | this.$refs && |
| | | this.$refs.undergroundModel && |
| | | this.$refs.undergroundModel.open("地下模式", null,); |
| | | this.$refs.undergroundModel.open("地下模式", null); |
| | | } |
| | | |
| | | break; |
| | |
| | | if (str.url != null && str.type == 2 && str.isShow == 1) { |
| | | return str; |
| | | } |
| | | |
| | | }) |
| | | }); |
| | | var layer = std.filter((str) => { |
| | | if (str.isProject == 1 && str.type == 2) { |
| | | this.$store.state.isProjectLayer.push(str); |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | this.setAddLayers(value); |
| | | var res = this.setTreeData(val); |
| | |
| | | let branchArr = cloneData.filter((child) => father.id == child.pid); // 对比ID,分别上下级菜单,并返回数据 |
| | | if (branchArr.length > 0) { |
| | | branchArr.sort(function (a, b) { |
| | | |
| | | return a.orderNum - b.orderNum |
| | | }) |
| | | return a.orderNum - b.orderNum; |
| | | }); |
| | | } |
| | | branchArr.length > 0 ? (father.children = branchArr) : ""; // 给父级添加一个children属性,并赋值 |
| | | // 属于同一对象问题,例如:令 a=b、c=1 ,然后再令 b.c=c , 那么 a.c=b.c=c=1 ;同理,后续令 c.d=2 ,那么 a.c.d 也是=2; |
| | |
| | | }); |
| | | }, |
| | | setAddLayers(res) { |
| | | this.setClearWmsLayer() |
| | | this.setClearWmsLayer(); |
| | | var std = [[]]; |
| | | for (var i in res) { |
| | | switch (res[i].serveType) { |
| | | case "WMS": |
| | | std[0].push(res[i]) |
| | | std[0].push(res[i]); |
| | | break; |
| | | } |
| | | } |
| | | if (std[0].length != 0) { |
| | | if (this.$store.state.pigCode) { |
| | | |
| | | this.setPrjidWmsLayer(std[0]) |
| | | this.setPrjidWmsLayer(std[0]); |
| | | } else { |
| | | |
| | | this.setAddWmsLayer(std[0]) |
| | | this.setAddWmsLayer(std[0]); |
| | | } |
| | | |
| | | } |
| | | }, |
| | | setPrjidWmsLayer(res) { |
| | | var layer = []; |
| | | var sql = []; |
| | | var dirid = this.$store.state.pigCode |
| | | var dirid = this.$store.state.pigCode; |
| | | var that = this; |
| | | for (var i in res) { |
| | | layer.push(res[i].url) |
| | | layer.push(res[i].url); |
| | | |
| | | if (res[i].isProject == 1) { |
| | | var val = "dirid like '" + dirid + "%'" |
| | | sql.push(val) |
| | | var val = "dirid like '" + dirid + "%'"; |
| | | sql.push(val); |
| | | } else { |
| | | sql.push("1 = 1") |
| | | sql.push("1 = 1"); |
| | | } |
| | | } |
| | | layer = layer.reverse(); |
| | | sql = sql.reverse().join(";") |
| | | var getFeatureInfoFormat = new Cesium.GetFeatureInfoFormat("html", null, function (html) { |
| | | |
| | | that.getFeatureInfo(html) |
| | | }); |
| | | sql = sql.reverse().join(";"); |
| | | var getFeatureInfoFormat = new Cesium.GetFeatureInfoFormat( |
| | | "html", |
| | | null, |
| | | function (html) { |
| | | that.getFeatureInfo(html); |
| | | } |
| | | ); |
| | | window.layerWMS = new Cesium.WebMapServiceImageryProvider({ |
| | | url: geoServerURl, |
| | | layers: layer.toString(), |
| | | getFeatureInfoParameters: { info_format: 'text/html' }, |
| | | getFeatureInfoParameters: { info_format: "text/html" }, |
| | | enablePickFeatures: true, |
| | | getFeatureInfoFormats: [getFeatureInfoFormat], |
| | | parameters: { |
| | |
| | | format: "image/png", |
| | | srs: "EPSG:4490", |
| | | styles: "", |
| | | cql_filter: sql |
| | | cql_filter: sql, |
| | | }, |
| | | tileWidth: 512, |
| | | tileHeight: 512, |
| | |
| | | FORMAT: "image/png", |
| | | VERSION: "1.1.1", |
| | | LAYERS: layer.toString(), |
| | | cql_filter: sql |
| | | cql_filter: sql, |
| | | }, |
| | | }), |
| | | }); |
| | |
| | | window.map.addLayer(layer2); |
| | | }, |
| | | |
| | | |
| | | |
| | | setClearWmsLayer() { |
| | | for (var i = 0; i < window.Viewer.imageryLayers._layers.length; i++) { |
| | | var val_id = window.Viewer.imageryLayers._layers[i].imageryProvider.name; |
| | | var val_id = |
| | | window.Viewer.imageryLayers._layers[i].imageryProvider.name; |
| | | if (val_id == "Wms_Layer") { |
| | | window.Viewer.imageryLayers.remove( |
| | | window.Viewer.imageryLayers._layers[i] |
| | |
| | | } |
| | | }, |
| | | setAddWmsLayer(res) { |
| | | |
| | | var url = []; |
| | | for (var i in res) { |
| | | if (res[i].url) { |
| | | url.push(res[i].url) |
| | | url.push(res[i].url); |
| | | } |
| | | } |
| | | |
| | | url = url.reverse(); |
| | | var that = this; |
| | | var getFeatureInfoFormat = new Cesium.GetFeatureInfoFormat("html", null, function (html) { |
| | | that.getFeatureInfo(html) |
| | | }); |
| | | var getFeatureInfoFormat = new Cesium.GetFeatureInfoFormat( |
| | | "html", |
| | | null, |
| | | function (html) { |
| | | that.getFeatureInfo(html); |
| | | } |
| | | ); |
| | | window.layerWMS = new Cesium.WebMapServiceImageryProvider({ |
| | | url: geoServerURl, |
| | | layers: url.toString(), |
| | | getFeatureInfoParameters: { info_format: 'text/html' }, |
| | | getFeatureInfoParameters: { info_format: "text/html" }, |
| | | enablePickFeatures: true, |
| | | getFeatureInfoFormats: [getFeatureInfoFormat], |
| | | parameters: { |
| | |
| | | window.map.addLayer(layer2); |
| | | }, |
| | | async getFeatureInfo(html) { |
| | | var start = html.indexOf("<caption class=\"featureInfo\">") + "<caption class=\"featureInfo\">".length; |
| | | 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; |
| | |
| | | if (gid && tab) { |
| | | this.$store.state.pickoption = { |
| | | gid: gid, |
| | | name: tab.replaceAll("_", "") |
| | | } |
| | | if (tab == 'm_surface_deformation_data') { |
| | | 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.gid = null; |
| | | } |
| | | const res = await dataQuery_selectTabByEntity({ |
| | | name: this.$store.state.pickoption.name |
| | | }) |
| | | name: this.$store.state.pickoption.name, |
| | | }); |
| | | |
| | | if (res.code != 200) { |
| | | return; |
| | | } |
| | | var value = res.result.split('.') |
| | | var value = res.result.split("."); |
| | | this.$store.state.propertiesName = { |
| | | ns: value[0], |
| | | enName: value[1], |
| | | tabDesc: '拾取信息' |
| | | } |
| | | tabDesc: "拾取信息", |
| | | }; |
| | | var name = this.$store.state.pickoption.name; |
| | | const data = await inquiry_selectFields({ name: name }) |
| | | const data = await inquiry_selectFields({ name: name }); |
| | | if (data.code != 200) { |
| | | this.$message.error("列表调用失败") |
| | | this.$message.error("列表调用失败"); |
| | | } |
| | | const data1 = await inquiry_selectDomains({ name: name }) |
| | | const data1 = await inquiry_selectDomains({ name: name }); |
| | | if (data1.code != 200) { |
| | | this.$message.error("列表调用失败") |
| | | this.$message.error("列表调用失败"); |
| | | } |
| | | this.optionx = [] |
| | | this.attributeData = [] |
| | | var valadata = data.result |
| | | var laydomain = data1.result |
| | | this.optionx = data1.result |
| | | 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 ( |
| | |
| | | } |
| | | } |
| | | // this.optionx.push(valadata[i]) |
| | | this.attributeData.push(valadata[i]) |
| | | this.attributeData.push(valadata[i]); |
| | | } |
| | | } |
| | | |
| | | this.getTableData() |
| | | this.getTableData(); |
| | | } |
| | | }, |
| | | //格式化时间 |
| | |
| | | var s = time.getSeconds(); |
| | | return ( |
| | | y + |
| | | '-' + |
| | | "-" + |
| | | this.add0(m) + |
| | | '-' + |
| | | "-" + |
| | | this.add0(d) + |
| | | ' ' + |
| | | " " + |
| | | h + |
| | | ':' + |
| | | ":" + |
| | | mm + |
| | | ':' + |
| | | ":" + |
| | | s |
| | | ); |
| | | }, |
| | | //格式化时间 |
| | | add0(m) { |
| | | return m < 10 ? '0' + m : m; |
| | | return m < 10 ? "0" + m : m; |
| | | }, |
| | | async getTableData() { |
| | | this.tableData = [] |
| | | const data = await dataQuery_selectByGid(this.$store.state.pickoption) |
| | | this.tableData = []; |
| | | const data = await dataQuery_selectByGid(this.$store.state.pickoption); |
| | | if (data.code != 200) { |
| | | return |
| | | return; |
| | | } |
| | | |
| | | var valste = data.result |
| | | var valste = data.result; |
| | | valste.dirid = valste.dirName; |
| | | valste.depid = valste.depName; |
| | | valste.verid = valste.verName; |
| | | valste.createuser = valste.createName; |
| | | valste.updateuser = valste.updateName; |
| | | if (valste.createtime) { |
| | | valste.createtime = this.format(valste.createtime) |
| | | valste.createtime = this.format(valste.createtime); |
| | | } |
| | | if (valste.updatetime) { |
| | | valste.updatetime = this.format(valste.updatetime) |
| | | valste.updatetime = this.format(valste.updatetime); |
| | | } |
| | | |
| | | for (var j in this.optionx) { |
| | |
| | | this.optionx[j].domainNa != null && |
| | | this.optionx[j].domainNa != undefined |
| | | ) { |
| | | |
| | | valste[this.optionx[j].field] = this.optionx[j].domainNa |
| | | valste[this.optionx[j].field] = this.optionx[j].domainNa; |
| | | } |
| | | } |
| | | var arr = {} |
| | | for (var i = (this.attributeData.length - 1); i >= 0; i--) { |
| | | var vla = this.attributeData[i] |
| | | |
| | | var arr = {}; |
| | | for (var i = this.attributeData.length - 1; i >= 0; i--) { |
| | | var vla = this.attributeData[i]; |
| | | |
| | | if (vla.domainNa) { |
| | | |
| | | var val = this.optionx.filter(res => { |
| | | if (res.domName == vla.domainNa && res.domCode == valste[vla.field]) { |
| | | var val = this.optionx.filter((res) => { |
| | | if ( |
| | | res.domName == vla.domainNa && |
| | | res.domCode == valste[vla.field] |
| | | ) { |
| | | return res; |
| | | } |
| | | }) |
| | | var vlue = null |
| | | }); |
| | | var vlue = null; |
| | | if (val.length > 0) { |
| | | vlue = val[0].codeDesc |
| | | vlue = val[0].codeDesc; |
| | | } else { |
| | | vlue = '' |
| | | vlue = ""; |
| | | } |
| | | arr[vla.alias] = vlue |
| | | arr[vla.alias] = vlue; |
| | | } else { |
| | | arr[vla.alias] = valste[vla.field] |
| | | arr[vla.alias] = valste[vla.field]; |
| | | } |
| | | } |
| | | |
| | | arr['eventid'] = valste.eventid |
| | | |
| | | arr["eventid"] = valste.eventid; |
| | | |
| | | this.$store.state.propertiesInfo = arr; |
| | | |
| | | this.$store.state.propertiesFlag = '1' |
| | | |
| | | this.$store.state.propertiesFlag = "1"; |
| | | }, |
| | | |
| | | showModelAttach() { |
| | |
| | | this.$refs && |
| | | this.$refs.modelAttach && |
| | | this.$refs.modelAttach.open(name, null, { |
| | | close: () => { }, |
| | | close: () => {}, |
| | | }); |
| | | } else { |
| | | } |
| | |
| | | async showModelCatch() { |
| | | if (this.$store.state.catModel) { |
| | | this.formInline = { |
| | | title: '', |
| | | file: '', |
| | | name: '', |
| | | type: '', |
| | | info: '', |
| | | icon: '', |
| | | bak: '' |
| | | } |
| | | title: "", |
| | | file: "", |
| | | name: "", |
| | | type: "", |
| | | info: "", |
| | | icon: "", |
| | | bak: "", |
| | | }; |
| | | 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.startModelData(); |
| | | this.activeName = "first" |
| | | this.activeName = "first"; |
| | | this.getAttacthFlieList(); |
| | | this.dialogVisible = true; |
| | | } else { |
| | |
| | | async startModelData() { |
| | | var obj = { |
| | | layerid: this.$store.state.catModelInfo.layerId, |
| | | modelid: this.$store.state.catModelInfo.id |
| | | } |
| | | modelid: this.$store.state.catModelInfo.id, |
| | | }; |
| | | const data = await comprehensive_selectModelByGuid(obj); |
| | | if (data.code != 200) { |
| | | return; |
| | |
| | | this.formInline = data.result; |
| | | |
| | | this.formInline.title = this.formInline.name; |
| | | |
| | | } |
| | | }, |
| | | async EditData() { |
| | | const data = await comprehensive_updateModel(this.formInline) |
| | | const data = await comprehensive_updateModel(this.formInline); |
| | | if (data.code != 200) { |
| | | this.$message.error('修改失败'); |
| | | this.$message.error("修改失败"); |
| | | } else { |
| | | this.$message({ |
| | | message: '修改成功', |
| | | type: 'success' |
| | | message: "修改成功", |
| | | type: "success", |
| | | }); |
| | | } |
| | | this.startModelData(); |
| | | }, |
| | | async InsertData() { |
| | | var std = { |
| | | "bak": this.formInline.bak, |
| | | "guid": this.$store.state.catModelInfo.id, |
| | | "layerid": this.$store.state.catModelInfo.layerId, |
| | | "modelid": this.$store.state.catModelInfo.id, |
| | | "name": this.formInline.name, |
| | | "type": this.formInline.type |
| | | } |
| | | const data = await comprehensive_insertModel(std) |
| | | bak: this.formInline.bak, |
| | | guid: this.$store.state.catModelInfo.id, |
| | | layerid: this.$store.state.catModelInfo.layerId, |
| | | modelid: this.$store.state.catModelInfo.id, |
| | | name: this.formInline.name, |
| | | type: this.formInline.type, |
| | | }; |
| | | const data = await comprehensive_insertModel(std); |
| | | if (data.code != 200) { |
| | | this.$message.error('添加失败'); |
| | | this.$message.error("添加失败"); |
| | | } else { |
| | | this.$message({ |
| | | message: '添加成功', |
| | | type: 'success' |
| | | message: "添加成功", |
| | | type: "success", |
| | | }); |
| | | } |
| | | this.startModelData(); |
| | | |
| | | }, |
| | | handleClose() { |
| | | this.$store.state.catModel = false; |
| | |
| | | var token = getToken(); |
| | | var fs = document.getElementById("insertFile"); |
| | | if (fs.files.length == 0) { |
| | | |
| | | this.$message({ |
| | | message: '请选择要上传的文件!', |
| | | type: 'warning' |
| | | message: "请选择要上传的文件!", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | | const formData = new FormData() |
| | | 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 |
| | | 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('附件添加失败'); |
| | | $.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" |
| | | tabName: "lf.sys_style", |
| | | }; |
| | | const res = await comprehensive_selectFiles(obj); |
| | | if (res.code != 200) { |
| | | this.$message.error('列表调用失败'); |
| | | return |
| | | this.$message.error("列表调用失败"); |
| | | return; |
| | | } |
| | | this.tableData = res.result; |
| | | }, |
| | | |
| | | |
| | | //附件=>文件选择 |
| | | getInsertFile() { |
| | | $('#insertFile').click(); |
| | | $("#insertFile").click(); |
| | | }, |
| | | insertFile() { |
| | | var val = document.getElementById('insertFile').files; |
| | | 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) |
| | | return this.stateFormatSizes(row.sizes); |
| | | }, |
| | | stateFormatSizes(res) { |
| | | if (res >= 1024) { |
| | | const val = parseFloat(res / 1024).toFixed(3); |
| | | return val + ' GB'; |
| | | return val + " GB"; |
| | | } else { |
| | | return res + ' MB'; |
| | | 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 |
| | | || name.indexOf('.PDF') != -1 |
| | | || name.indexOf('.JPG') != -1 |
| | | || name.indexOf('.GIF') != -1 |
| | | || name.indexOf('.PNG') != -1 |
| | | || name.indexOf('.JPEG') != -1 |
| | | || name.indexOf('.BMP') != -1 |
| | | || name.indexOf('.bmp') != -1) { |
| | | if ( |
| | | name.indexOf(".pdf") != -1 || |
| | | name.indexOf(".jpg") != -1 || |
| | | name.indexOf(".gif") != -1 || |
| | | name.indexOf(".png") != -1 || |
| | | name.indexOf(".jpeg") != -1 || |
| | | name.indexOf(".PDF") != -1 || |
| | | name.indexOf(".JPG") != -1 || |
| | | name.indexOf(".GIF") != -1 || |
| | | name.indexOf(".PNG") != -1 || |
| | | name.indexOf(".JPEG") != -1 || |
| | | name.indexOf(".BMP") != -1 || |
| | | name.indexOf(".bmp") != -1 |
| | | ) { |
| | | return true; |
| | | } |
| | | |
| | |
| | | }, |
| | | //附件查看 |
| | | setAttatchDetail(index, row) { |
| | | this.refreshAttatchDetail() |
| | | this.refreshAttatchDetail(); |
| | | var name = row.name; |
| | | if (name.indexOf('.pdf') != -1 || name.indexOf('.PDF') != -1) { |
| | | if (name.indexOf(".pdf") != -1 || 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 |
| | | 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 |
| | | || name.indexOf('.JPG') != -1 |
| | | || name.indexOf('.GIF') != -1 |
| | | || name.indexOf('.PNG') != -1 |
| | | || name.indexOf('.JPEG') != -1 |
| | | || name.indexOf('.BMP') != -1 |
| | | || name.indexOf('.bmp') != -1 |
| | | name.indexOf(".jpg") != -1 || |
| | | name.indexOf(".gif") != -1 || |
| | | name.indexOf(".png") != -1 || |
| | | name.indexOf(".jpeg") != -1 || |
| | | name.indexOf(".JPG") != -1 || |
| | | name.indexOf(".GIF") != -1 || |
| | | name.indexOf(".PNG") != -1 || |
| | | name.indexOf(".JPEG") != -1 || |
| | | name.indexOf(".BMP") != -1 || |
| | | name.indexOf(".bmp") != -1 |
| | | ) { |
| | | this.dialog.dialogVisible = true; |
| | | this.dialog.isJpg = true; |
| | | var url = BASE_URL + "/comprehensive/downloadForView?guid=" + row.guid + "&token=" + getToken(); |
| | | this.dialog.src = url |
| | | var url = |
| | | BASE_URL + |
| | | "/comprehensive/downloadForView?guid=" + |
| | | row.guid + |
| | | "&token=" + |
| | | getToken(); |
| | | this.dialog.src = url; |
| | | } |
| | | }, |
| | | handleClick(tab, event) { |
| | |
| | | |
| | | const res = await comprehensive_deletes({ ids: std.toString() }); |
| | | if (res.code != 200) { |
| | | this.$message.error('文件删除失败'); |
| | | this.$message.error("文件删除失败"); |
| | | } |
| | | this.getAttacthFlieList(); |
| | | }, |
| | |
| | | limit: 20, |
| | | name: name, |
| | | wkt: `POINT (${info.lon} ${info.lat})`, |
| | | } |
| | | }; |
| | | const res = await selectByBuffer(params); |
| | | if (res.result && res.result.length > 0) { |
| | | this.$store.state.mapPopBoxFlag = "4"; |
| | | this.$store.state.pickUpPointInfo = info; |
| | | this.$refs && |
| | | this.$refs.queryinfo && |
| | | this.$refs.queryinfo.open("拾取分析", null,); |
| | | this.$refs.queryinfo.open("拾取分析", null); |
| | | showPop = true; |
| | | break; |
| | | } |
| | |
| | | } |
| | | }, |
| | | showPopBox() { |
| | | |
| | | if (this.$store.state.showPopBoxFlag == true) { |
| | | this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close(); |
| | | this.$refs && |
| | | this.$refs.queryinfo && |
| | | this.$refs.queryinfo.open("属性", null, { |
| | | close: () => { |
| | | this.$store.state.showPopBoxFlag == false |
| | | this.$store.state.showPopBoxFlag == false; |
| | | if (this.$store.state.primitLayer != null) { |
| | | sgworld.Creator.DeleteObject(this.$store.state.primitLayer); |
| | | this.$store.state.primitLayer = null; |
| | |
| | | } |
| | | }, |
| | | setPellucidity() { |
| | | this.$refs && this.$refs.setPellucidity && this.$refs.setPellucidity.open(); |
| | | this.$refs && |
| | | this.$refs.setPellucidity && |
| | | this.$refs.setPellucidity.open(); |
| | | }, |
| | | setDialogInsertVisible(res) { |
| | | this.ruleForm = res; |
| | | this.dialogInsertVisible = true; |
| | | }, |
| | | downloadx() { |
| | | this.$bus.$emit("setInsertDown1", this.codeForm) |
| | | this.$bus.$emit("setInsertDown1", this.codeForm); |
| | | this.closeDownx(); |
| | | }, |
| | | handleCloseDown1() { |
| | | this.$confirm("确认关闭?") |
| | | .then(_ => { |
| | | .then((_) => { |
| | | this.closeDownx(); |
| | | }) |
| | | .catch(_ => { }) |
| | | .catch((_) => {}); |
| | | }, |
| | | closeDownx() { |
| | | this.dialogVisible1 = false; |
| | | this.codeForm = { |
| | | password: '', |
| | | repassword: '', |
| | | } |
| | | password: "", |
| | | repassword: "", |
| | | }; |
| | | }, |
| | | closeInsertDown() { |
| | | this.ruleForm = { |
| | |
| | | repwd: null, |
| | | wkt: null, |
| | | descr: null, |
| | | } |
| | | this.dialogInsertVisible = false |
| | | }; |
| | | this.dialogInsertVisible = false; |
| | | }, |
| | | handleInsertClose() { |
| | | this.$confirm("确认关闭?") |
| | | .then(_ => { |
| | | this.closeInsertDown() |
| | | .then((_) => { |
| | | this.closeInsertDown(); |
| | | }) |
| | | .catch(_ => { }) |
| | | .catch((_) => {}); |
| | | }, |
| | | getInsertDownz() { |
| | | this.dialogInsertVisible = false; |
| | | // this.dialogVisible1 = true; |
| | | // |
| | | // |
| | | |
| | | this.$bus.$emit("setInsertApply1", this.ruleForm) |
| | | this.$bus.$emit("setInsertApply1", this.ruleForm); |
| | | }, |
| | | handleExtentClose() { |
| | | this.dialogExtentVisible = false |
| | | this.dialogExtentVisible = false; |
| | | this.setExtent = 10; |
| | | }, |
| | | handleExtentinsert() { |
| | | this.$bus.$emit("setExtentBUff", this.setExtent) |
| | | this.$bus.$emit("setExtentBUff", this.setExtent); |
| | | this.handleExtentClose(); |
| | | |
| | | } |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.$bus.$off(); |
| | |
| | | polyline: Cesium.Color.fromCssColorString("#ffff00").withAlpha(0.6), |
| | | polygon: Cesium.Color.fromCssColorString("#ffff00").withAlpha(0.6), |
| | | }; |
| | | this.$store.state.setAlphaList = [] |
| | | this.$store.state.setAlphaList = []; |
| | | this.$bus.$on("setChangeTwoMenu", (res) => { |
| | | if (res == 8) { |
| | | this.setLayerScene(); |
| | |
| | | this.menuChange(res); |
| | | } |
| | | }); |
| | | this.$bus.$on("showMenuLayer", ((res) => { |
| | | |
| | | this.$bus.$on("showMenuLayer", (res) => { |
| | | this.setAddLayers(res); |
| | | })); |
| | | this.$bus.$on("showPellucidity", res => { |
| | | }); |
| | | this.$bus.$on("showPellucidity", (res) => { |
| | | this.setPellucidity(); |
| | | }); |
| | | |
| | | |
| | | this.$store.state.isProjectLayer = []; |
| | | this.$store.state.pigCode = null; |
| | |
| | | // this.setCoverage("a1"); |
| | | this.layersStart(); |
| | | |
| | | |
| | | this.$bus.$on("setDialogInsertVisible", (res) => { |
| | | if (res == true) { |
| | | this.dialogVisible1 = true; |
| | | } else { |
| | | this.setDialogInsertVisible(res); |
| | | } |
| | | }) |
| | | this.$bus.$on('showExtentLayer', res => { |
| | | }); |
| | | this.$bus.$on("showExtentLayer", (res) => { |
| | | this.dialogExtentVisible = res; |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }, |
| | | watch: { |
| | | Obj(newVal, oldVal) { |
| | |
| | | }, |
| | | popObj(newVal, oldVal) { |
| | | this.showPopBox(); |
| | | } |
| | | }, |
| | | }, |
| | | computed: { |
| | | Obj() { |
| | |
| | | }, |
| | | popObj() { |
| | | return this.$store.state.showPopBoxFlag; |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |