From c2a6c53657baaf0830cd881e1a23a15af23ac6fa Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期四, 21 九月 2023 18:35:14 +0800 Subject: [PATCH] 代码更新 --- src/views/datamanage/uploadmanage.vue | 144 ++- src/api/api.js | 12 src/assets/lang/zh.js | 6 src/components/MapView/mapSpacePop1.vue | 1509 ++++++++++++++++++++++++++++++++++++++++ src/views/Tools/LayerTree.vue | 9 public/config/config.js | 10 src/components/preview_map.vue | 153 ++++ src/assets/lang/en.js | 5 src/components/MapView/mapMenuPop.vue | 19 src/views/Tools/queryinfo.vue | 4 src/components/MapView/mapSpacePop.vue | 23 src/views/datamanage/dataUpdata.vue | 291 ++++++- 12 files changed, 2,037 insertions(+), 148 deletions(-) diff --git a/public/config/config.js b/public/config/config.js index 525d8e4..799b0e7 100644 --- a/public/config/config.js +++ b/public/config/config.js @@ -1,13 +1,13 @@ //var isWeb = location.hostname.indexOf("103.85.165.") > -1; var isWeb = false; -var is_production = false;//鍒ゆ柇鏄惁涓虹敓浜х幆澧� +var is_production = true;//鍒ゆ柇鏄惁涓虹敓浜х幆澧� //192.168.21.194 -var webHost = isWeb ? "103.85.165.99" + ":8052" : '192.168.20.205' + ":8088"; -// var webHost = isWeb ? "103.85.165.99" + ":8052" : '192.168.16.162' + ":12316"; +// var webHost = isWeb ? "103.85.165.99" + ":8052" : '192.168.20.205' + ":8088"; +var webHost = isWeb ? "103.85.165.99" + ":8052" : '192.168.21.194' + ":12316"; -var fmeHost = isWeb ? "103.85.165.99" + ":8051" : '192.168.20.205' + ":88"; +var fmeHost = isWeb ? "103.85.165.99" + ":8051" : '192.168.21.194' + ":88"; -var iisHost = isWeb ? "103.85.165.99" + ":8050" : '192.168.20.205' + ":80"; +var iisHost = isWeb ? "103.85.165.99" + ":8050" : '192.168.21.194' + ":80"; var menuStartName = "绠¢亾鍩虹澶ф暟鎹钩鍙�"; diff --git a/src/api/api.js b/src/api/api.js index db31f9c..2285a01 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -624,6 +624,13 @@ export function dataUpload_insertFiles(params) { return service.post('/dataUpload/insertFiles', params); } +//鏁版嵁涓婁紶=鎻掑叆KML +export function dataUpload_insertKml(params) { + return service.post('/dataUpload/insertKml', params); +} + + + //鏁版嵁涓婁紶=鏌ヨ瀛楁淇℃伅 export function dataUpload_selectFields(params) { return request.get('/dataUpload/selectFields', { params: params }); @@ -1180,7 +1187,10 @@ export function publish_selectLasCs(params) { return request.get('/publish/selectLasCs?' + params); } - +//鏁版嵁鍙戝竷 => 鏌ヨLas鏂囦欢鍧愭爣绯籌D +export function publish_selectRasterCs(params) { + return request.get('/publish/selectRasterCs', { params: params }); +} //缁煎悎灞曠ず => 鏍规嵁ID鏌ヨ鍙戝竷娓呭崟 export function comprehensive_selectPubById(params) { diff --git a/src/assets/lang/en.js b/src/assets/lang/en.js index da81f2d..0eb0e03 100644 --- a/src/assets/lang/en.js +++ b/src/assets/lang/en.js @@ -165,7 +165,9 @@ coordinateSystem: 'Coordinate System', fileExtension: "File extension", inspectionItems: "Inspection items", - code: 'Code' + code: 'Code', + labe11: 'Line category', + labe12: 'Pipeline category', }, metadataManage: 'information management', uploadManage: 'Release management', @@ -909,6 +911,7 @@ select: "Please select", dFile: "Single file upload", dFiles: "Overall project upload", + dFfilest: "KML upload", SurveyDiscipline: "Survey Discipline", SurveyingAndMapping: 'Surveying and Mapping', diff --git a/src/assets/lang/zh.js b/src/assets/lang/zh.js index 150925b..285f361 100644 --- a/src/assets/lang/zh.js +++ b/src/assets/lang/zh.js @@ -157,7 +157,9 @@ coordinateSystem: '鍧愭爣绯�', fileExtension: "鏂囦欢鎵╁睍鍚�", inspectionItems: "妫�鏌ラ」", - code: '缂栫爜' + code: '缂栫爜', + labe11: '绾胯矾绫诲埆', + labe12: '绠$嚎绫诲埆', }, metadataManage: '淇℃伅绠$悊', @@ -915,9 +917,9 @@ select: "璇烽�夋嫨", dFile: "鍗曟枃浠朵笂浼�", dFiles: "椤圭洰鏁翠綋涓婁紶", + dFfilest: "KML涓婁紶", SurveyDiscipline: "娴嬮噺涓撲笟", SurveyingAndMapping: '娴嬬粯涓撲笟', - SurveysDiscipline: "鍕樺療涓撲笟", GeologicalDisasterSpecialty: "鍦扮伨涓撲笟", CavernSpecialty: "娲炲簱涓撲笟", diff --git a/src/components/MapView/mapMenuPop.vue b/src/components/MapView/mapMenuPop.vue index a4f0255..0afb133 100644 --- a/src/components/MapView/mapMenuPop.vue +++ b/src/components/MapView/mapMenuPop.vue @@ -543,14 +543,21 @@ this.getTableDateHidder() }, async getTableDateHidder() { + this.$store.state.loading = true; const data = await inquiry_selectFields({ name: this.listdata.name }) if (data.code != 200) { this.$message.error("鍒楄〃璋冪敤澶辫触") + } + if (data.result.length == 0) { + this.$message("鍒楄〃瀛楁鏌ユ棤鏁版嵁") } const data1 = await inquiry_selectDomains({ name: this.listdata.name }) if (data1.code != 200) { this.$message.error("鍒楄〃璋冪敤澶辫触") } + // if (data.result.length == 0) { + // this.$message("鍒楄〃闃堝�兼煡鏃犳暟鎹�") + // } this.optionx = [] this.attributeData = [] var valadata = data.result @@ -583,7 +590,9 @@ if (data.code != 200) { this.$message.error("鍒楄〃璋冪敤澶辫触") } - + // if (data.result.length == 0) { + // return this.$message.error("鍒楄〃鏌ユ棤鏁版嵁") + // } var val1 = decr(data.result) if (val1) { if (this.imagePoint != null) { @@ -727,9 +736,15 @@ this.tableData = [] const data = await dataQuery_selectByPage(this.listdata) + this.$store.state.loading = false; if (data.code != 200) { - this.$message.error("鍒楄〃璋冪敤澶辫触") + return this.$message.error("鍒楄〃璋冪敤澶辫触") } + if (data.result.length == 0) { + + return this.$message.error("鍒楄〃鏌ユ棤鏁版嵁") + } + var val_Data = data.result for (var i in val_Data) { diff --git a/src/components/MapView/mapSpacePop.vue b/src/components/MapView/mapSpacePop.vue index 010381d..415b3ec 100644 --- a/src/components/MapView/mapSpacePop.vue +++ b/src/components/MapView/mapSpacePop.vue @@ -507,8 +507,12 @@ async getTableselectFields() { const data = await inquiry_selectFields({ name: this.spaceLayer }) if (data.code != 200) { - this.$message.error("鍒楄〃璋冪敤澶辫触") + this.$message.error("鍒楄〃璋冪敤瀛楁澶辫触") } + if (data.result.length == 0) { + this.$message("鍒楄〃璋冪敤瀛楁鏌ユ棤鏁版嵁") + } + this.filedsOption = []; this.optionx = [] var valadata = data.result @@ -590,10 +594,14 @@ }, //鍒濆鍖栨煡璇㈤槇鍊艰〃 async getDomainsLayer() { + this.$store.state.loading = true; const data = await inquiry_selectDomains({ name: this.spaceLayer }) if (data.code != 200) { - this.$message.error("鍒楄〃璋冪敤澶辫触") + this.$message.error("鍒楄〃闃堝�艰皟鐢ㄥけ璐�") } + // if (data.result.length == 0) { + // this.$message("鍒楄〃闃堝�兼煡鏃犳暟鎹�") + // } this.domainsLayer = data.result this.setListDataStart() @@ -625,9 +633,16 @@ } const data = await dataQuerySelectByPage(this.listdata) + this.$store.state.loading = false; if (data.code != 200) { - this.$message.error("鍒楄〃璋冪敤澶辫触") + return this.$message.error("鍒楄〃璋冪敤澶辫触") } + if (data.result.length == 0) { + return this.$message("鍒楄〃鏌ユ棤鏁版嵁") + } + + + var val = data.result; val = val.filter((res) => { @@ -1485,7 +1500,7 @@ } .bottomPage { position: absolute; - bottom: 3%; + bottom: 10px; } /deep/.el-form-item { margin-bottom: 0px; diff --git a/src/components/MapView/mapSpacePop1.vue b/src/components/MapView/mapSpacePop1.vue new file mode 100644 index 0000000..fb74118 --- /dev/null +++ b/src/components/MapView/mapSpacePop1.vue @@ -0,0 +1,1509 @@ +<template> + <div class="menuPop"> + <div style="padding: 5px"> + <el-form + :inline="true" + :model="ruleForm" + class="demo-form-inline" + > + <el-form-item> + <el-input + size="small" + style="width:47vh" + v-model="ruleForm.fileName" + disabled + placeholder="璇疯緭鍏�..." + ></el-input> + </el-form-item> + <el-form-item> + <el-button + @click="conditionVisible = true" + size="small" + type="success" + >{{$t('common.lable6')}}</el-button> + <el-button + size="small" + @click="resetForm" + >閲嶇疆</el-button> + </el-form-item> + <el-form-item v-if="spaceLayer == 'sexplorationpoint'"> + <el-button + size="small" + @click="spaceHistogram()" + plain + >鏌辩姸鍥�</el-button> + <el-button + plain + size="small" + @click="spaceGeobody()" + >鍦拌川浣�</el-button> + </el-form-item> + </el-form> + <!-- <el-form + :inline="true" + :model="formInline" + class="demo-form-inline" + > + <el-form-item> + <el-select + v-model="formInline.name" + style="width: 150px" + placeholder="...." + @change="changeValue($event)" + > + <el-option + v-for="item in optionx" + :key="item.field" + :label="item.alias" + :value="item.field" + > + </el-option> + </el-select> + </el-form-item> + <el-form-item> + <el-select + v-model="formInline.region" + style="width: 100px" + placeholder="...." + > + <el-option + v-for="item in options" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + </el-form-item> + <el-form-item> + <el-input + style="width: 150px" + v-model="formInline.input" + placeholder="璇疯緭鍏�..." + ></el-input> + </el-form-item> + <el-form-item> + <el-button + size="small" + plain + @click="setSpaceTableLayer" + >鏌ヨ</el-button> + <el-button + plain + size="small" + @click="restSpacePopLayer" + >閲嶇疆</el-button> + </el-form-item> + + <el-form-item v-if="spaceLayer == 'sexplorationpoint'"> + <el-button + size="small" + @click="spaceHistogram( )" + plain + >鏌辩姸鍥�</el-button> + <!-- <el-button + plain + size="small" + >鍓栧垏鍥�</el-button> + </el-form-item> + </el-form> --> + <div class="centTable"> + <el-table + :data="tableData" + border + height="100%" + ref="filterTable" + style="width: 100%" + > + <el-table-column + align="center" + type="index" + label="搴忓彿" + width="50" + /> + <el-table-column + label="瀹氫綅" + width="100" + align="center" + > + <template slot-scope="scope"> + <el-button + icon="el-icon-map-location" + size="small" + @click="spaceLocation(scope.$index, scope.row)" + ></el-button> + </template> + </el-table-column> + <!-- <el-table-column + label="鏌辩姸鍥�" + width="100" + align="center" + v-if="spaceLayer == 'sexplorationpoint'" + > + <template slot-scope="scope"> + <el-button + icon="el-icon-map-location" + size="small" + @click="spaceHistogram(scope.$index, scope.row)" + ></el-button> + </template> + </el-table-column> --> + <el-table-column + v-for="(item, index) in attributeData" + :key="index" + :label="item.alias" + :prop="item.field" + show-overflow-tooltip + align="center" + :fit="true" + ></el-table-column> + </el-table> + </div> + + <div class="bottomPage pagination_box"> + <el-pagination + @size-change="handleSizeChange" + @current-change="handleCurrentChange" + :current-page="listdata.pageIndex" + :page-sizes="[10, 20, 50, 100]" + :page-size="listdata.pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="count" + > + </el-pagination> + </div> + </div> + <el-dialog + :visible.sync="conditionVisible" + title="楂樼骇鏌ヨ" + width="44%" + :close-on-click-modal="false" + :modal="false" + > + + <el-form + :inline=" true" + :model="formSql" + class="demo-form-inline" + label-position="top" + > + + <el-form-item> + <el-select + @change="fieldChange($event)" + v-model="formSql.field" + :popper-append-to-body="false" + > + <el-option + v-for="item in filedsOption" + :key="item.field" + :label="item.alias" + :value="item.field" + > + </el-option> + </el-select> + </el-form-item> + <el-form-item> + <el-select + :popper-append-to-body="false" + v-model="formSql.condition" + > + <el-option + v-for="item in condOption" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + </el-form-item> + <el-form-item v-show="!fromSqlflag"> + <el-input + v-model="formSql.value" + :placeholder="$t('shuJuGuanLi.shuJuJianSuo.queryContent')" + > </el-input> + </el-form-item> + <el-form-item v-show="fromSqlflag"> + <el-date-picker + v-model="formSql.date" + type="date" + placeholder="閫夋嫨鏃ユ湡" + value-format="yyyy-MM-dd" + > + </el-date-picker> + </el-form-item> + + </el-form> + + <span + slot="footer" + class="dialog-footer" + > + <el-button + size="small" + @click="startFiledAndcondition" + >鍙� 娑�</el-button> + <el-button + class="primaries" + size="small" + @click="appendQueryFilter" + >纭� 瀹�</el-button> + </span> + </el-dialog> + + </div> +</template> + +<script> +import { + dataQuerySelectByPage, + dataQuerySelectWktById, + inquiry_selectFields, + inquiry_selectDomains, + decr, + encr, +} from "../../api/api.js" +import * as turf from "@turf/turf" +import { conditions } from "../../views/Archive/Archive.js"; +export default { + computed: { + storeTime() { + return this.$store.state.mapSpaceQueryLayer + }, + }, + data() { + return { + conditionVisible: false, + filedsOption: [], + condOption: [], + ruleForm: { + fileName: "", + }, + fromSqlflag: false, + count: 0, + listdata: { + pageIndex: 1, + pageSize: 10, + name: null, + srid: 4326, + wkt: null, + filter: null, + }, + formInline: { + name: "", + region: "", + }, + attributeData: [], + optionx: [], + options: [], + conditions: [ + ["=", "<>", "like"], + [">=", ">", " =", "<=", "<", "<>"], + [">=", ">", " =", "<=", "<", "<>"], + ], + options1: [ + { + value: "=", + label: "=", + }, + { + value: "like", + label: "like", + }, + { + value: "<>", + label: "<>", + }, + ], + options2: [ + { + value: "=", + label: "=", + }, + { + value: "<>", + label: "<>", + }, + { + value: "<=", + label: "<=", + }, + { + value: "<", + label: "<", + }, + { + value: ">=", + label: ">=", + }, + { + value: ">", + label: ">", + }, + ], + value: "", + tableData: [], + spaceLayer: "", + imagePoint: null, + domainsLayer: null, + querytype: null, + formSql: { + field: "", + condition: "", + value: "", + type: "", + date: "", + }, + geobodyCount: null, + outlineList: [ + { 'name': '绮夎川榛忓湡', 'color': 'rgba(139,106,77,1)' }, + { 'name': '娣ゆ偿璐ㄧ矇鍦�', 'color': 'rgba(141,85,69,1)' }, + { 'name': '鍦嗙牼', 'color': 'rgba(102,166,184,1)' }, + { 'name': '鍗电煶', 'color': 'rgba(54,83,173,1)' }, + { 'name': '娉ュ博', 'color': 'rgba(47,30,13,1)' }, + { 'name': '缁嗙爞', 'color': 'rgba(93,88,15,1)' }, + { 'name': '涓爞', 'color': 'rgba(164,140,21,1)' }, + { 'name': '娣ゆ偿璐ㄥ湡', 'color': 'rgba(75,74,78,1)' }, + { 'name': '鍏朵粬', 'color': 'rgba(225,225,225,1)' }, + ] + } + }, + watch: { + async storeTime(index) { + this.spaceLayer = index + this.resetForm(); + // this.getDomainsLayer() + // this.getTableselectFields(); + // this.restSpacePopLayer(); + }, + }, + created() { + this.spaceLayer = this.$store.state.mapSpaceQueryLayer + // this.showSpacePopLayer(); + // this.getTableselectFields(); + this.resetForm(); + // this.getDomainsLayer() + }, + + methods: { + fieldChange(value) { + var obj = {}; + obj = this.filedsOption.find(function (item) { + return item.field === value; + }); + this.conditionChange(obj); + }, + conditionChange(res) { + this.formSql.field = res.field; + this.formSql.type = res.type; + if (res.type == "date" || res.type == "datetime") { + this.fromSqlflag = true; + } else { + this.fromSqlflag = false; + } + var std = []; + this.condOption = []; + if (res.type == "text" || res.type == "blob") { + std = conditions[0]; + } else if (res.type == "date" || res.type == "datetime") { + std = conditions[2]; + } else { + std = conditions[1]; + } + for (var i in std) { + this.condOption.push({ + label: std[i], + value: std[i], + }); + } + this.formSql.condition = this.condOption[0].value; + }, + closeSpaceBox() { + if (this.imagePoint != null) { + sgworld.Creator.DeleteObject(this.imagePoint) + this.imagePoint = null + } + this.$store.state.mapPopBoolean = false + this.$store.state.mapPopBoxFlag = null + }, + setSpaceTableLayer() { + this.setListDataStart() + this.getSpaceTableLayer() + }, + restSpacePopLayer() { + this.formInline.input = null + this.showSpacePopLayer() + }, + changeValue(value) { + var obj = {} + obj = this.optionx.find(function (item) { + return item.field === value + }) + + // if (obj.type == 'serial' || obj.type == 'int') { + // this.options = this.options2; + // } else { + // this.options = this.options1; + // } + this.options = [] + + var std = [] + this.querytype = obj.type + if (obj.type == "text" || obj.type == "blob") { + std = this.conditions[0] + } else if (obj.type == "date" || obj.type == "datetime") { + std = this.conditions[2] + } else { + std = this.conditions[1] + } + for (var i in std) { + this.options.push({ + label: std[i], + value: std[i], + }) + } + + this.formInline.region = this.options[0].value + }, + setListDataStart() { + this.listdata = { + pageIndex: 1, + pageSize: 10, + name: null, + srid: 4326, + wkt: null, + filter: null, + } + this.tableData = [] + }, + //鍒濆鍖栨煡璇㈡潯浠� + showSpacePopLayer() { + let val_date = this.optionx[0] + if (val_date == null || val_date == undefined) { + return + } + this.formInline.name = val_date.field + this.options = [] + var std = [] + this.querytype = val_date.type + if (val_date.type == "text" || val_date.type == "blob") { + std = this.conditions[0] + } else if (val_date.type == "date" || val_date.type == "datetime") { + std = this.conditions[2] + } else { + std = this.conditions[1] + } + for (var i in std) { + this.options.push({ + label: std[i], + value: std[i], + }) + } + + this.formInline.region = this.options[0].value + this.getSpaceTableLayer() + }, + //鍒濆鍖栨煡璇㈣〃鐨勫瓧娈� + async getTableselectFields() { + const data = await inquiry_selectFields({ name: this.spaceLayer }) + if (data.code != 200) { + this.$message.error("鍒楄〃璋冪敤瀛楁澶辫触") + } + if (data.result.length == 0) { + this.$message("鍒楄〃璋冪敤瀛楁鏌ユ棤鏁版嵁") + } + + this.filedsOption = []; + this.optionx = [] + var valadata = data.result + for (var i in valadata) { + if (valadata[i].showtype == 1) { + if ( + valadata[i].domainNa != null && + valadata[i].domainNa != undefined + ) { + valadata[i].domainNa = this.getMatchDomainNa(valadata[i].domainNa) + } + this.optionx.push(valadata[i]) + this.filedsOption.push(valadata[i]) + this.attributeData.push(valadata[i]) + } + } + this.startFiledAndcondition(); + this.showSpacePopLayer() + }, + appendQueryFilter() { + if (this.formSql.type == "date" || this.formSql.type == "datetime") { + if (this.formSql.date == null) { + this.$message.error("璇疯緭鍏ヨ鏌ヨ鐨勪俊鎭�!"); + return; + } + } else { + if (this.formSql.value == "") { + this.$message.error("璇疯緭鍏ヨ鏌ヨ鐨勪俊鎭�!"); + return; + } + } + + if (this.ruleForm.fileName != "") { + this.ruleForm.fileName += " and "; + } + var val; + + if (this.formSql.type == "long" || this.formSql.type == "integer") { + val = parseInt(this.formSql.value); + } else if (this.formSql.type == "double") { + if (this.formSql.value.indexOf(".") != -1) { + val = this.formSql.value; + } else { + val = parseFloat(this.formSql.value).toFixed(1); + } + } else if ( + this.formSql.type == "date" || + this.formSql.type == "datetime" + ) { + var time = new Date(this.formSql.date); + var m = time.getMonth() + 1; + var d = time.getDate(); + var y = time.getFullYear(); + val = "'" + y + "-" + this.add0(m) + "-" + this.add0(d) + "'"; + } else { + val = "'" + this.formSql.value + "'"; + } + this.ruleForm.fileName += + this.formSql.field + " " + this.formSql.condition + " " + val; + + this.startFiledAndcondition(); + this.getSpaceTableLayer(); + }, + + startFiledAndcondition() { + this.conditionVisible = false; + this.conditionChange(this.filedsOption[0]); + this.formSql.value = ""; + this.formSql.date = new Date(); + }, + getMatchDomainNa(res) { + var std = null + for (var i in this.domainsLayer) { + if (this.domainsLayer[i].domName == res) { + return (std = this.domainsLayer[i].codeDesc) + } + } + return std + }, + //鍒濆鍖栨煡璇㈤槇鍊艰〃 + async getDomainsLayer() { + this.$store.state.loading = true; + const data = await inquiry_selectDomains({ name: this.spaceLayer }) + if (data.code != 200) { + this.$message.error("鍒楄〃闃堝�艰皟鐢ㄥけ璐�") + } + // if (data.result.length == 0) { + // this.$message("鍒楄〃闃堝�兼煡鏃犳暟鎹�") + // } + this.domainsLayer = data.result + + this.setListDataStart() + this.getTableselectFields() + }, + + + + resetForm() { + this.ruleForm.fileName = ""; + this.listdata.pageIndex = 1; + this.listdata.pageSize = 10; + //鑾峰彇table淇℃伅 + this.getDomainsLayer() + }, + + //鍒濆鍖栨煡璇㈣〃鏍间俊鎭� + async getSpaceTableLayer() { + + this.listdata.name = this.spaceLayer + if (this.ruleForm.fileName != "") { + this.listdata.filter = this.ruleForm.fileName; + } else { + this.listdata.filter = null; + } + if (this.$store.state.pigCode) { + this.listdata.dirs = this.$store.state.pigCode; + + } + + const data = await dataQuerySelectByPage(this.listdata) + this.$store.state.loading = false; + if (data.code != 200) { + return this.$message.error("鍒楄〃璋冪敤澶辫触") + } + if (data.result.length == 0) { + return this.$message("鍒楄〃鏌ユ棤鏁版嵁") + } + + + + var val = data.result; + val = val.filter((res) => { + + if (res.dirName) { + res.dirid = res.dirName + } + if (res.depName) { + res.depid = res.depName + } + if (res.verName) { + res.verid = res.verName + } + if (res.updateName) { + res.updateuser = res.updateName + } + if (res.createName) { + res.createuser = res.createName + } + + if (res.createtime) { + res.createtime = this.format(res.createtime) + } + if (res.updatetime) { + res.createtime = this.format(res.updatetime) + } + return res + }) + + + var val_Data = data.result + this.count = data.count + + for (var i in val_Data) { + var valste = val_Data[i] + for (var j in this.optionx) { + if ( + this.optionx[j].domainNa != null && + this.optionx[j].domainNa != undefined + ) { + valste[this.optionx[j].field] = this.optionx[j].domainNa + } + } + } + + + this.tableData = val + // this.$refs.filterTable.doLayout() + }, + + async setCartesianToEightFour(entities) { + var east = Cesium.Math.toDegrees( + entities.rectangle.coordinates.getValue().east + ); + var north = Cesium.Math.toDegrees( + entities.rectangle.coordinates.getValue().north + ); + var west = Cesium.Math.toDegrees( + entities.rectangle.coordinates.getValue().west + ); + var south = Cesium.Math.toDegrees( + entities.rectangle.coordinates.getValue().south + ); + var line = turf.polygon([ + [ + [east, north], + [west, north], + [west, south], + [east, south], + [east, north], + ], + ]); + var wkt = this.$wkt.convert(line.geometry); + this.listdata.pageIndex = 1; + this.listdata.pageSize = 10; + this.listdata.wkt = encr(wkt) + + const data = await dataQuerySelectByPage(this.listdata) + + if (data.code != 200) { + return this.$message.error("鍒楄〃璋冪敤澶辫触") + } + + this.count = data.count; + if (data.result.length == 0) { + return this.$message({ + message: '鏈煡璇㈠埌杞瓟鐐规暟鎹�', + type: 'warning' + }); + } else { + this.$message({ + message: '鏌辩姸鍥炬煡璇㈡垚鍔�', + type: 'success' + }); + setTimeout(() => { + var val = data.result; + val = val.filter((res) => { + + if (res.dirName) { + res.dirid = res.dirName + } + if (res.depName) { + res.depid = res.depName + } + if (res.verName) { + res.verid = res.verName + } + if (res.updateName) { + res.updateuser = res.updateName + } + if (res.createName) { + res.createuser = res.createName + } + + if (res.createtime) { + res.createtime = this.format(res.createtime) + } + if (res.updatetime) { + res.createtime = this.format(res.updatetime) + } + return res + }) + + + + this.tableData = val; + this.geobodyCount = data.count; + this.showHistogramLayer(data.count) + this.$refs.filterTable.doLayout(); + var that = this; + + window.histogramHandler = new Cesium.ScreenSpaceEventHandler( + sgworld.Viewer.scene.canvas + ) + window.histogramHandler.setInputAction((event) => { + var pick = sgworld.Viewer.scene.pick(event.endPosition); + if (pick) { + + var propertiesFlag = that.$store.state.propertiesFlag + + if (Cesium.defined(pick)) { + if (pick && pick.id && pick.id.tag && pick.id.tag == "Histogram") { + that.$store.state.propertiesInfo = { + title: pick.id.properties._exppointid._value, + name: pick.id.properties._geoname._value, + type: pick.id.properties.geotype._value, + botdepth: pick.id.properties._botdepth._value, + describe: pick.id.properties._describe._value, + } + that.$store.state.propertiesFlag = "2" + } else { + if (propertiesFlag == 1) { + that.$store.state.propertiesFlag = propertiesFlag + } else { + that.$store.state.propertiesFlag = null + } + } + } else { + if (propertiesFlag == 1) { + that.$store.state.propertiesFlag = propertiesFlag + } else { + that.$store.state.propertiesFlag = null + } + } + } + + }, Cesium.ScreenSpaceEventType.MOUSE_MOVE) + }, 500); + } + + + }, + async showHistogramLayer(res) { + var obj = { + pageIndex: 1, + pageSize: res, + wkt: this.listdata.wkt, + name: this.listdata.name, + hasGeom: 1, + } + const data = await dataQuerySelectByPage(obj) + if (data.code != 200) { + return + } + var val = data.result; + // for (var i in val) { + this.setShowHistogramLayer(val) + // } + }, + async setShowHistogramLayer(res) { + var gid = []; + for (var i in res) { + + gid.push(res[i].exppointid) + } + // var param = { + // gid: res.gid, + // name: this.spaceLayer, + // } + + + // const data1 = await dataQuerySelectWktById(param) + // if (data1.code != 200) { + // this.$message.error("鍒楄〃璋冪敤澶辫触") + // } + // var val1 = decr(data1.result) + // var wkt = this.$wkt.parse(val1) + // var coord = wkt.coordinates + var obj = { + pageIndex: 1, + pageSize: 100000000, + name: 'sexplorationpointstratum', + filter: "exppointid in '" + gid.toString() + "'" + } + var data = await dataQuerySelectByPage(obj) + if (data.code != 200) { return } + if (data.result.length == 0) { + return this.$message('鏌ユ棤鏁版嵁'); + } + for (var i in res) { + this.setHistogramLayer(res[i], data.result) + } + // if (data.result.length != 0) { + // var val = data.result; + // //鍐掓场鎺掑簭 + // for (var i = 0; i < val.length; i++) { + // for (var u = i + 1; u < val.length; u++) { + // if (val[i].botdepth > val[u].botdepth) { + // var num = val[i]; + // val[i] = val[u]; + // val[u] = num; + // } + // } + // } + + + // var num = res.elev; + // var height = 0; + // for (var i = 0; i < val.length; i++) { + // var line; + + // var geoname = val[i].geoname; + // var col = outlineList.filter((res) => { + // if (res.name == geoname) { + // return res + // } + // }) + // line = col[0].color + // var height = num - val[i].botdepth + // var layer = Viewer.entities.add({ + // position: Cesium.Cartesian3.fromDegrees(coord[0], coord[1]), + // tag: 'Histogram', + // properties: val[i], + // ellipse: { + // semiMinorAxis: 1.0, //鐭酱 + // semiMajorAxis: 1.0, //闀胯酱 + // height: height, //鎷変几楂樺害 elev gwaterdep + // extrudedHeight: num, //绂诲湴楂樺害 + // rotation: Cesium.Math.toRadians(0), //鏃嬭浆 + // fill: true, //鏄惁鏄剧ず鍦嗙殑濉厖 + // material: Cesium.Color.fromCssColorString(line), //鍦嗙殑棰滆壊, + // outline: false, //鏄惁鏄剧ず鍦嗚疆寤� + + // }, + // }); + // num -= val[i].botdepth; + // this.$store.state.histogramLayer.push(layer) + // } + // } else { + // + // } + // + }, + setHistogramLayer(res, data) { + + var exppointid = res.exppointid; + + var val1 = decr(res.geom) + var wkt = this.$wkt.parse(val1) + var coord = wkt.coordinates; + + var std = []; + var num = res.elev == null ? 0 : res.elev; + + var height = 0; + for (var i in data) { + if (data[i].exppointid == exppointid) { + std.push(data[i]) + } + } + + var outlineList = this.outlineList; + if (std.length > 0) { + for (var i in std) { + var line; + var geoname = std[i].geoname; + var col = outlineList.filter((ste) => { + if (ste.name == geoname) { + return res + } + }) + + if (col.length == 0) { + col = outlineList.filter((ste) => { + if (ste.name == '鍏朵粬') { + return res + } + }) + } + line = col[0].color + + var height = num - std[i].botdepth + // console.log(num, std[i].botdepth) + var layer = Viewer.entities.add({ + position: Cesium.Cartesian3.fromDegrees(coord[0], coord[1]), + tag: 'Histogram', + properties: std[i], + ellipse: { + semiMinorAxis: 2.0, //鐭酱 + semiMajorAxis: 2.0, //闀胯酱 + height: height, //鎷変几楂樺害 elev gwaterdep + extrudedHeight: num, //绂诲湴楂樺害 + rotation: Cesium.Math.toRadians(0), //鏃嬭浆 + fill: true, //鏄惁鏄剧ず鍦嗙殑濉厖 + material: Cesium.Color.fromCssColorString(line), //鍦嗙殑棰滆壊, + outline: false, //鏄惁鏄剧ず鍦嗚疆寤� + + }, + }); + num -= std[i].botdepth; + this.$store.state.histogramLayer.push(layer) + } + this.$store.state.histLenged = true; + } + + + + }, + + + + spaceHistogram() { + this.resetForm(); + if (this.$store.state.histogramLayer.length != 0) { + for (var i in this.$store.state.histogramLayer) { + Viewer.entities.remove(this.$store.state.histogramLayer[i]) + } + } + if (window.histogramHandler != null && Cesium.defined(window.histogramHandler)) { + window.histogramHandler.removeInputAction( + Cesium.ScreenSpaceEventType.MOUSE_MOVE + ) + window.histogramHandler = null + } + var entitys = Viewer.entities._entities._array; + for (var i = 0; i < entitys.length; i++) { + if (entitys[i]._name === "鍦拌川浣撴ā鍨�") { + Viewer.entities.remove(entitys[i]); + i--; + } + } + this.geobodyCount = null; + var that = this; + sgworld.Creator.createSimpleGraphic('rectangle', { showSize: false }, function (entity) { + sgworld.Creator.SimpleGraphic.remove(entity.id); + that.setCartesianToEightFour(entity) + }); + + }, + async spaceGeobody() { + var entitys = Viewer.entities._entities._array; + for (var i = 0; i < entitys.length; i++) { + if (entitys[i]._name === "鍦拌川浣撴ā鍨�") { + Viewer.entities.remove(entitys[i]); + i--; + } + } + + if (this.geobodyCount) { + + var obj = { + pageIndex: 1, + pageSize: this.geobodyCount, + wkt: this.listdata.wkt, + name: this.listdata.name, + hasGeom: 1, + } + const data = await dataQuerySelectByPage(obj) + if (data.code != 200) { + return + } + var gid = []; + var val = data.result; + for (var i in val) { + gid.push(val[i].exppointid) + } + var obj = { + pageIndex: 1, + pageSize: 100000000, + name: 'sexplorationpointstratum', + filter: "exppointid in '" + gid.toString() + "'" + } + var data2 = await dataQuerySelectByPage(obj) + + if (data2.code == 200) { + var val2 = data2.result; + var std = []; + for (var i in val) { + var soilLayers = []; + + for (var j in val2) { + if (val2[j].exppointid == val[i].exppointid) { + soilLayers.push(val2[j]) + } + } + var val1 = decr(val[i].geom) + var wkt = this.$wkt.parse(val1) + var coord = wkt.coordinates + std.push({ + bh: val[i].exppointid, + X: coord[0], + Y: coord[1], + Z: val[i].elev, + soilLayers: soilLayers + }) + } + this.setLayerByZFBH(std); + } + + } else { + return this.$message('鏈煡璇㈠埌杞瓟鐐规暟鎹�,鏃犳硶鐢熸垚鍦拌川浣�'); + } + }, + setLayerByZFBH(res) { + var list = [ + { 'name': '绮夎川榛忓湡', 'color': [139, 106, 77, 1] }, + { 'name': '娣ゆ偿璐ㄧ矇鍦�', 'color': [141, 85, 69, 1] }, + { 'name': '鍦嗙牼', 'color': [102, 166, 184, 1] }, + { 'name': '鍗电煶', 'color': [54, 83, 173, 1] }, + { 'name': '娉ュ博', 'color': [47, 30, 13, 1] }, + { 'name': '缁嗙爞', 'color': [93, 88, 15, 1] }, + { 'name': '涓爞', 'color': [164, 140, 21, 1] }, + { 'name': '娣ゆ偿璐ㄥ湡', 'color': [75, 74, 78, 1] }, + { 'name': '鍏朵粬', 'color': [225, 225, 225, 1] } + ] + for (var i = 0; i < list.length; i++) { + var out_color = list[i].color + var color = new Cesium.Color(out_color[0] / 255.0, out_color[1] / 255.0, out_color[2] / 255.0).withAlpha(0.9) + this.CreateLayerByZFBH(list[i].name, res, color) + + } + // var color = new Cesium.Color(139 / 255, 106 / 255, 77 / 255).withAlpha(0.9) + // this.CreateLayerByZFBH("娣ゆ偿璐ㄧ矇鍦�", res, color) + + }, + CreateLayerByZFBH(zfbh, jsonObj, materialColor) { + + var featurePoints = []; + var featurePoints1 = []; + let points = turf.featureCollection([]); + for (let i = 0; i < jsonObj.length; i++) { + var p = jsonObj[i]; + var layers = p.soilLayers; + points.features.push(turf.point([parseFloat(p.X), parseFloat(p.Y)], { alt: p.Z })); + for (let j = 0; j < layers.length; j++) { + let obj = layers[j]; + + if (obj.geoname == zfbh) { + if (j == 0) { + + featurePoints.push(...[parseFloat(p.X), parseFloat(p.Y), parseFloat(p.Z)]); + featurePoints1.push(...[parseFloat(p.X), parseFloat(p.Y), (parseFloat(p.Z) - parseFloat(obj.botdepth))]); + } else { + let obj_height = this.GetRealHeight(j, layers, p.Z); + + featurePoints.push(...[parseFloat(p.X), parseFloat(p.Y), parseFloat(obj_height.topHeight)]); + featurePoints1.push(...[parseFloat(p.X), parseFloat(p.Y), parseFloat(obj_height.bottomHeight)]); + + } + + } + } + } + this.CreateSoilLayer(featurePoints, featurePoints1, materialColor); + }, + CreateSoilLayer(abovePoints, underPoints, materialColor) { + let aboveCollection = this.CreateCollectionByArray(abovePoints); + let underCollection = this.CreateCollectionByArray(underPoints); + //璁$畻鎻掑�� + let options = { gridType: "points", property: "alt", units: "miles" }; + let aboveGrid = turf.interpolate(aboveCollection, 0.01, options); + let underGrid = turf.interpolate(underCollection, 0.01, options); + //鍒涘缓tin闈� + let aboveTin = turf.tin(aboveGrid, "alt"); + let underTin = turf.tin(underGrid, "alt"); + //鑾峰彇tin闈㈢殑鍑犱釜椤剁偣 + let aboveHull = turf.convex(aboveTin); + let underHull = turf.convex(underTin); + + //缁勮椤跺簳闈㈠洓涓《鐐� + this.CreateRoundMian(aboveTin, aboveHull, underTin, underHull, materialColor); + //鍒涘缓闈� + this.CreateTin(aboveTin, materialColor); + this.CreateTin(underTin, materialColor); + }, + + CreateRoundMian(tinArr, hull, tinArr1, hull1, materialColor) { + if (!hull) { + return; + } + let left = turf.lineIntersect(tinArr, turf.lineString([[hull.geometry.coordinates[0][0][0], hull.geometry.coordinates[0][0][1]], [hull.geometry.coordinates[0][1][0], hull.geometry.coordinates[0][1][1]]])); + let right = turf.lineIntersect(tinArr, turf.lineString([[hull.geometry.coordinates[0][1][0], hull.geometry.coordinates[0][1][1]], [hull.geometry.coordinates[0][2][0], hull.geometry.coordinates[0][2][1]]])); + let top = turf.lineIntersect(tinArr, turf.lineString([[hull.geometry.coordinates[0][2][0], hull.geometry.coordinates[0][2][1]], [hull.geometry.coordinates[0][3][0], hull.geometry.coordinates[0][3][1]]])); + let bottom = turf.lineIntersect(tinArr, turf.lineString([[hull.geometry.coordinates[0][3][0], hull.geometry.coordinates[0][3][1]], [hull.geometry.coordinates[0][4][0], hull.geometry.coordinates[0][4][1]]])); + let left1 = turf.lineIntersect(tinArr1, turf.lineString([[hull1.geometry.coordinates[0][0][0], hull1.geometry.coordinates[0][0][1]], [hull1.geometry.coordinates[0][1][0], hull1.geometry.coordinates[0][1][1]]])); + let right1 = turf.lineIntersect(tinArr1, turf.lineString([[hull1.geometry.coordinates[0][1][0], hull1.geometry.coordinates[0][1][1]], [hull1.geometry.coordinates[0][2][0], hull1.geometry.coordinates[0][2][1]]])); + let top1 = turf.lineIntersect(tinArr1, turf.lineString([[hull1.geometry.coordinates[0][2][0], hull1.geometry.coordinates[0][2][1]], [hull1.geometry.coordinates[0][3][0], hull1.geometry.coordinates[0][3][1]]])); + let bottom1 = turf.lineIntersect(tinArr1, turf.lineString([[hull1.geometry.coordinates[0][3][0], hull1.geometry.coordinates[0][3][1]], [hull1.geometry.coordinates[0][4][0], hull1.geometry.coordinates[0][4][1]]])); + // console.log(left); + // console.log(intPoints); + // console.log(tinArr); + this.SetAltAttribut(tinArr, left); + this.SetAltAttribut(tinArr, right); + this.SetAltAttribut(tinArr, top); + this.SetAltAttribut(tinArr, bottom); + this.SetAltAttribut(tinArr1, left1); + this.SetAltAttribut(tinArr1, right1); + this.SetAltAttribut(tinArr1, top1); + this.SetAltAttribut(tinArr1, bottom1); + ///缁樺埗闈� + this.CreateSoilLayerRound(left, left1, materialColor); + this.CreateSoilLayerRound(right, right1, materialColor); + this.CreateSoilLayerRound(top, top1, materialColor); + this.CreateSoilLayerRound(bottom, bottom1, materialColor); + }, + SetAltAttribut(tinarr, points) { + for (let i = 0; i < tinarr.features.length; i++) { + for (let j = 0; j < points.features.length; j++) { + if (!turf.booleanDisjoint(tinarr.features[i].geometry, points.features[j].geometry)) { + for (let n = 0; n < tinarr.features[i].geometry.coordinates[0].length; n++) { + if (tinarr.features[i].geometry.coordinates[0][n][0] == points.features[j].geometry.coordinates[0] && tinarr.features[i].geometry.coordinates[0][n][1] == points.features[j].geometry.coordinates[1]) { + if (n == 0) { + points.features[j].properties.alt = tinarr.features[i].properties.a; + break; + } + if (n == 1) { + points.features[j].properties.alt = tinarr.features[i].properties.b; + break; + } + if (n == 2) { + points.features[j].properties.alt = tinarr.features[i].properties.c; + break; + } + } + + } + } + } + } + }, + CreateCollectionByArray(arr) { + let newCollection = turf.featureCollection([]); + for (let i = 0; i < arr.length; i += 3) { + let tmpPoint = turf.point([arr[i], arr[i + 1]], { + alt: arr[i + 2] + }); + newCollection.features.push(tmpPoint); + } + return newCollection; + }, + + CreateTin(tin, materialColor) { + for (let n = 0; n < tin.features.length; n++) { + let geoms = tin.features[n].geometry.coordinates[0]; + + let points = []; + let p1 = new Cesium.Cartesian3.fromDegrees(geoms[0][0], geoms[0][1], tin.features[n].properties.a); + let p2 = new Cesium.Cartesian3.fromDegrees(geoms[1][0], geoms[1][1], tin.features[n].properties.b); + let p3 = new Cesium.Cartesian3.fromDegrees(geoms[2][0], geoms[2][1], tin.features[n].properties.c); + points.push(p1) + points.push(p2) + points.push(p3) + let aa = Viewer.entities.add({ + name: '鍦拌川浣撴ā鍨�', + polygon: { + hierarchy: new Cesium.PolygonHierarchy(points), + material: materialColor, + // material: new Cesium.Color(Math.random() * 255, Math.random() * 255, Math.random() * 255), + perPositionHeight: true + } + }); + Viewer.flyTo(aa) + } + }, + CreateSoilLayerRound(above, under, materialColor) { + for (let i = 0; i < under.features.length; i++) { + above.features.push(under.features[under.features.length - 1 - i]); + } + + let points = []; + for (let j = 0; j < above.features.length; j++) { + let geo = above.features[j].geometry.coordinates; + let alt = above.features[j].properties.alt; + let p = new Cesium.Cartesian3.fromDegrees(geo[0], geo[1], alt); + points.push(p); + } + Viewer.entities.add({ + name: '鍦拌川浣撴ā鍨�', + polygon: { + hierarchy: new Cesium.PolygonHierarchy(points), + material: materialColor, + + perPositionHeight: true + } + }); + }, + GetRealHeight(index, arr, parentZ) { + + var top = 0; + var bottom = 0; + var std = 0; + var start = index + 1 + var end = index - 1; + for (let i = 0; i < start; i++) { + std += parseFloat(arr[i].botdepth) + + if (i == end) { + + top = parseFloat(parentZ - std).toFixed(6); + + } + + bottom = parseFloat(parentZ - std).toFixed(6); + } + + + return { + topHeight: top, + bottomHeight: bottom + }; + }, + async spaceLocation(index, row) { + var param = { + gid: row.gid, + name: this.spaceLayer, + } + const data = await dataQuerySelectWktById(param) + if (data.code != 200) { + this.$message.error("鍒楄〃璋冪敤澶辫触") + } + + var val1 = decr(data.result) + if (val1) { + if (this.$store.state.primitLayer != null) { + sgworld.Viewer.entities.remove(this.$store.state.primitLayer) + sgworld.Creator.DeleteObject(this.$store.state.primitLayer) + this.$store.state.primitLayer = null + } + var wkt = this.$wkt.parse(val1) + + this.setMapLoaction(wkt, row) + } + }, + handleSizeChange(val) { + this.listdata.pageSize = val + this.getSpaceTableLayer() + }, + handleCurrentChange(val) { + this.listdata.pageIndex = val + this.getSpaceTableLayer() + }, + setMapLoaction(res, properties) { + if (this.$store.state.primitLayer != null) { + sgworld.Creator.DeleteObject(this.$store.state.primitLayer) + // this.$store.state.primitLayer = null; + sgworld.Viewer.entities.remove(this.$store.state.primitLayer) + this.$store.state.primitLayer = null + } + var coord = res.coordinates + + switch (res.type) { + case "Point": + var val = Cesium.Cartesian3.fromDegrees( + res.coordinates[0], + res.coordinates[1] + ) + var point = Viewer.entities.add({ + properties: properties, + tag: "properties_point", + position: val, + billboard: { + // 鍥惧儚鍦板潃锛孶RI鎴朇anvas鐨勫睘鎬� + image: SmartEarthRootUrl + "Workers/image/mark.png", + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, + // 澶у皬鏄惁浠ョ背涓哄崟浣� + sizeInMeters: false, + // 鐩稿浜庡潗鏍囩殑鍨傜洿浣嶇疆 + verticalOrigin: Cesium.VerticalOrigin.CENTER, + // 鐩稿浜庡潗鏍囩殑姘村钩浣嶇疆 + horizontalOrigin: Cesium.HorizontalOrigin.LEFT, + // 搴旂敤浜庡浘鍍忕殑缁熶竴姣斾緥銆傛瘮渚嬪ぇ浜庝細1.0鏀惧ぇ鏍囩锛岃�屾瘮渚嬪皬浜庝細1.0缂╁皬鏍囩銆� + scale: 1.0, + // 鏄惁鏄剧ず + show: true, + }, + }) + point.billboard.disableDepthTestDistance = Number.POSITIVE_INFINITY + this.$store.state.queryInfo.push(point) + sgworld.Navigate.flyToObj(point) + this.$store.state.primitLayer = point + break + case "LineString": + case "MultiLineString": + var line = res.coordinates[0] + var std = [] + for (var i in line) { + std.push(line[i][0], line[i][1]) + } + var polyline = Viewer.entities.add({ + properties: properties, + tag: "properties_line", + polyline: { + positions: Cesium.Cartesian3.fromDegreesArray(std), + width: 5, + material: new Cesium.Color(1.0, 0.0, 0.0, 0.3), + clampToGround: true, + }, + }) + this.$store.state.queryInfo.push(polyline) + sgworld.Navigate.flyToObj(polyline) + this.$store.state.primitLayer = polyline + break + case "MultiPolygon": + var val = res.coordinates[0][0] + var std = [] + for (var i in val) { + std.push(val[i][0], val[i][1]) + } + var entity = Viewer.entities.add({ + properties: properties, + tag: "properties_polygon", + polygon: { + hierarchy: Cesium.Cartesian3.fromDegreesArray(std), + //height : 100000, + material: new Cesium.Color(1.0, 0.0, 0.0, 0.3), + outline: true, + outlineColor: new Cesium.Color(1.0, 0.0, 0.0, 0.3), + }, + }) + this.$store.state.queryInfo.push(entity) + sgworld.Navigate.flyToObj(entity) + this.$store.state.primitLayer = entity + break + } + this.setMapHandler() + }, + setMapHandler() { + var that = this; + window.propertieshandler = new Cesium.ScreenSpaceEventHandler( + sgworld.Viewer.scene.canvas + ) + window.propertieshandler.setInputAction(event => { + let pick = sgworld.Viewer.scene.pick(event.position) + if ( + pick && + pick.id && + pick.id.tag && + pick.id.tag.includes("properties_") + ) { + if (this.spaceLayer == 'msurfacedeformationdata') { + this.$store.state.surfaceDeForm.flag = true; + this.$store.state.surfaceDeForm.gid = pick.id.properties.gid._value; + } else { + this.$store.state.surfaceDeForm.flag = false; + this.$store.state.surfaceDeForm.gid = null; + } + this.$store.state.propertiesFlag = "1" + let properties = pick.id.properties + let propertyNames = pick.id.properties.propertyNames + let obj = {} + obj["eventid"] = properties["_eventid"]._value + // + this.attributeData.forEach(item => { + propertyNames.forEach(itemElement => { + if (itemElement == item.field) { + obj[item.alias] = properties[itemElement]._value + } + }) + }) + if (obj['鏇存柊鏃堕棿']) { + obj['鏇存柊鏃堕棿'] = that.format(obj['鏇存柊鏃堕棿']) + } + if (obj['鍒涘缓鏃堕棿']) { + + + obj['鍒涘缓鏃堕棿'] = that.format(obj['鍒涘缓鏃堕棿']) + } + + this.$store.state.propertiesInfo = obj + } + }, Cesium.ScreenSpaceEventType.LEFT_CLICK) + }, + //鏍煎紡鍖栨椂闂� + format(shijianchuo) { + //shijianchuo鏄暣鏁帮紝鍚﹀垯瑕乸arseInt杞崲 + var time = new Date(shijianchuo); + var y = time.getFullYear(); + var m = time.getMonth() + 1; + var d = time.getDate(); + var h = time.getHours(); + var mm = time.getMinutes(); + var s = time.getSeconds(); + return y + "-" + this.add0(m) + "-" + this.add0(d); + }, + //鏍煎紡鍖栨椂闂� + add0(m) { + return m < 10 ? "0" + m : m; + }, + + }, + + destroyed() { + this.$store.state.propertiesFlag = null + if (window.propertieshandler != null && Cesium.defined(window.propertieshandler)) { + window.propertieshandler.removeInputAction( + Cesium.ScreenSpaceEventType.LEFT_CLICK + ) + window.propertieshandler = null + } + }, +} +</script> + +<style lang="less" scoped> +.menuPop { + width: calc(100% - 1px); + height: calc(100% - 1px); + margin: 0; + padding: 0; + overflow: hidden; + border: 1px solid gray; + float: left; + .centTable { + position: absolute; + height: 66%; + width: 98%; + } + .rightTitle { + padding: 5px; + + width: 100%; + .boxClose { + float: right; + margin-right: 20px; + } + } + .bottomPage { + position: absolute; + bottom: 3%; + } + /deep/.el-form-item { + margin-bottom: 0px; + } +} +</style> diff --git a/src/components/preview_map.vue b/src/components/preview_map.vue index 2060f0b..0f9b5bd 100644 --- a/src/components/preview_map.vue +++ b/src/components/preview_map.vue @@ -43,6 +43,10 @@ <el-form-item> <el-button size="small" + @click="dialogLayerVisible = true" + >鍥惧眰</el-button> + <el-button + size="small" v-if="$store.state.previewLayer.type == 'mpt'" @click="setcropping" >瑁佸壀</el-button> @@ -56,11 +60,13 @@ v-if="$store.state.previewLayer.type != 'mpt'" @click="showTileset" >鏄鹃殣</el-button> + <el-button size="small" v-if="$store.state.previewLayer.type != 'mpt'" @click="setUndergroundMode" >鍦颁笅</el-button> + <br /> <el-button v-if="$store.state.previewLayer.type != '3dml' && $store.state.previewLayer.type != 'cpt' && @@ -373,6 +379,40 @@ </div> </el-dialog> + + <div + v-show="dialogLayerVisible" + class="levelLayer box_divm" + > + <div class="levelTitle"> + <div> + 鍥惧眰鍒楄〃 + </div> + <div @click="dialogLayerVisible = false"> + <i class="el-icon-close"></i> + </div> + </div> + <div class="layerContent"> + <div + v-for="(item,index) in layerTree" + class="contLayer" + > + <div> <el-checkbox + v-model="item.checked" + @change="setLayerTreeChange(item)" + >{{item.cnName}}</el-checkbox></div> + <div> + + <el-button + icon="el-icon-map-location" + size="mini" + @click="setLayerTreeLocation(item)" + ></el-button> + </div> + </div> + </div> + + </div> <div v-show="modelKeyFlag" class="modelLayer box_divm" @@ -417,6 +457,7 @@ <i class="el-icon-tickets"></i> 闄勪欢 </div> </el-card> + </div> </template> @@ -454,6 +495,7 @@ }, childOption: [], dialogVisible: false, + dialogLayerVisible: false, isShowModel: false, tableData: [], formInline: { @@ -525,13 +567,87 @@ menuVisible: false, rightClickMenuStyle: {}, // 鍙抽敭鑿滃崟鏍峰紡 serveType: true, - layerData: "lf.sys_style" + layerData: "lf.sys_style", + layerTree: null } }, mounted() { this.init3DMap(); + this.getLayers(); }, methods: { + async getLayers() { + const data = await perms_selectLayers(); + if (data.code != 200) { + return this.$message.error("鍥惧眰鍒楄〃鏌ヨ澶辫触"); + } + + var layer = data.result.filter(res => { + if (res.type == 2) { + if (res.serveType == 'WMTS' || res.serveType == 'TMS') { + res.checked = false; + return res + } + } + }) + this.layerTree = layer + }, + setLayerTreeChange(res) { + if (res.checked) { + this.setAddTreeLayers(res) + } else { + this.setRemoveTreeLayers(res) + } + }, + async setLayerTreeLocation(res) { + if (res.pubid) { + let data = await comprehensive_selectPubById({ id: res.pubid }); + if (data.result && data.result.geom) { + let wkt = this.$wkt.parse(data.result.geom); + let height = this.getHeight(wkt.coordinates[2]); + Viewer.camera.flyTo({ + destination: Cesium.Cartesian3.fromDegrees(wkt.coordinates[1], wkt.coordinates[0], sceneConfig.extureHeight), // 2000 + }); + } + } + }, + async setAddTreeLayers(res) { + var url = res.url.indexOf("{host}") > -1 ? res.url.replace("{host}", iisHost) : res.url; + + var layer = Viewer.imageryLayers.addImageryProvider( + new Cesium.UrlTemplateImageryProvider({ + url: url, + maximumLevel: 18, + }) + ); + layer.name = res.cnName + '_' + res.id + }, + setRemoveTreeLayers(res) { + var name = res.cnName + '_' + res.id; + var layers = Viewer.imageryLayers._layers; + for (var i in layers) { + if (layers[i].name == name) { + Viewer.imageryLayers.remove(layers[i]) + } + } + }, + setTreeData(source) { + let cloneData = JSON.parse(JSON.stringify(source)); // 瀵规簮鏁版嵁娣卞害鍏嬮殕 + return cloneData.filter((father) => { + // 寰幆鎵�鏈夐」 + let branchArr = cloneData.filter((child) => father.id == child.pid); // 瀵规瘮ID锛屽垎鍒笂涓嬬骇鑿滃崟锛屽苟杩斿洖鏁版嵁 + if (branchArr.length > 0) { + branchArr.sort(function (a, b) { + + return a.orderNum - b.orderNum + }) + } + branchArr.length > 0 ? (father.children = branchArr) : ""; // 缁欑埗绾ф坊鍔犱竴涓猚hildren灞炴�э紝骞惰祴鍊� + // 灞炰簬鍚屼竴瀵硅薄闂锛屼緥濡傦細浠� a=b銆乧=1 锛岀劧鍚庡啀浠� b.c=c 锛� 閭d箞 a.c=b.c=c=1 锛涘悓鐞嗭紝鍚庣画浠� c.d=2 ,閭d箞 a.c.d 涔熸槸=2锛� + // 鐢辨寰幆澶氭鍚庯紝灏辫兘褰㈡垚鐩稿簲鐨勬爲褰㈡暟鎹粨鏋� + return father.pid == 0; // 杩斿洖涓�绾ц彍鍗� + }); + }, // 榧犳爣鍙冲嚮浜嬩欢 rightClick(event, object, node, element) { if (object.type == 1 || node.data.children != null) return; @@ -1154,6 +1270,7 @@ if (this.$store.state.previewLayer) { var res = this.$store.state.previewLayer; var type = res.type; + console.log(type) res.ulr = res.url.replace("{host}", iisHost); if (type == 'DEM') { window.terrainLayer.deleteObject(); @@ -1253,8 +1370,8 @@ }, async resave() { - - if (this.$store.state.previewLayer.type != "mpt") { + var type = this.$store.state.previewLayer.type; + if (type && type != "mpt" && type != "mpt") { if (!this.modelForm.modelid) { return this.$message('鏈�夋嫨妯″瀷涓婚敭ID'); } @@ -1280,7 +1397,7 @@ this.reload(); }, reload() { - debugger + sgworld.Analysis.UndergroundMode(this.app.under, this.modelForm.alpha) var json = JSON.stringify(this.modelForm); var modelScale = this.modelForm.scale @@ -1577,7 +1694,8 @@ if (level > 0 && level < 23) { return this.levelArray[level] } - return this.levelArray[this.levelArray.length - 1] + var res = 7 + return this.levelArray[res] }, }, @@ -1606,6 +1724,31 @@ } } + .levelLayer { + position: absolute; + z-index: 40; + padding: 10px 20px; + max-height: 450px; + overflow: auto; + border: 1px solid #409eff; + top: 20%; + left: 50%; + transform: translate(-50%, 0%); + .levelTitle { + width: 100%; + display: flex; + justify-content: space-between; + font-size: 16px; + font-family: Source Han Sans CN; + } + .contLayer { + margin: 10px 0px; + font-size: 14px; + font-family: Source Han Sans CN; + display: flex; + justify-content: space-between; + } + } .pdfClass { height: 70vh; width: 100%; diff --git a/src/views/Tools/LayerTree.vue b/src/views/Tools/LayerTree.vue index a8257d9..3a2e50f 100644 --- a/src/views/Tools/LayerTree.vue +++ b/src/views/Tools/LayerTree.vue @@ -40,7 +40,6 @@ :default-checked-keys="handleTreeCheck" :expand-on-click-node="false" :filter-node-method="filterNode" - draggable > <span class="slot-t-node" @@ -320,7 +319,7 @@ let wkt = this.$wkt.parse(data.result.geom); let height = this.getHeight(wkt.coordinates[2]); Viewer.camera.flyTo({ - destination: Cesium.Cartesian3.fromDegrees(wkt.coordinates[1], wkt.coordinates[0], height), // 2000 + destination: Cesium.Cartesian3.fromDegrees(wkt.coordinates[1], wkt.coordinates[0], sceneConfig.extureHeight), // 2000 }); } return; @@ -363,8 +362,8 @@ // 鑾峰彇楂樺害 getHeight(level) { if (level > -1 && level < 23) return this.levelArray[level]; - - return this.levelArray[this.levelArray.length - 1]; + var res = 7 + return this.levelArray[res]; }, //闄勪欢涓嬭浇 annexDownload() { @@ -567,7 +566,7 @@ }, // 娣诲姞TMS鍥惧眰 addTMSLayers(layers) { - debugger + for (let i in layers) { let res = layers[i]; res.url = res.url.indexOf("{host}") > -1 ? res.url.replace("{host}", iisHost) : res.url; diff --git a/src/views/Tools/queryinfo.vue b/src/views/Tools/queryinfo.vue index bb7d8ad..da00c5d 100644 --- a/src/views/Tools/queryinfo.vue +++ b/src/views/Tools/queryinfo.vue @@ -8,11 +8,11 @@ maxHeight="400" @close="close(data.id)" left="calc(90% - 900px)" - top="calc(100% - 470px) " + top="calc(100% - 530px) " > <div> <div - style="width:940px;height:400px;" + style="width:940px;height:460px;" v-drag > <map-menu-pop v-if="$store.state.mapPopBoxFlag == '1'" /> diff --git a/src/views/datamanage/dataUpdata.vue b/src/views/datamanage/dataUpdata.vue index 444e5ed..d18246f 100644 --- a/src/views/datamanage/dataUpdata.vue +++ b/src/views/datamanage/dataUpdata.vue @@ -57,7 +57,10 @@ :label="$t('shuJuGuanLi.pselect.dFiles')" value="v2" /> - + <el-option + :label="$t('shuJuGuanLi.pselect.dFfilest')" + value="v3" + /> </el-select> </el-form-item> @@ -204,6 +207,45 @@ </el-form-item> <div class="flex_box"> <div style="margin-right: auto"> + <!-- 绾胯矾绫诲埆 --> + <el-form-item + size="small" + :label="$t('dataManage.dataUpObj.labe11')" + v-show="formInline.uploadType =='v3'" + > + <el-select + v-model="formInline.tab" + placeholder="璇烽�夋嫨" + > + <el-option + v-for="item in lineOptions" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + </el-form-item> + <!-- 绾胯矾绫诲埆 --> + <el-form-item + :label="$t('dataManage.dataUpObj.labe12')" + v-show="formInline.uploadType =='v3'" + size="small" + > + <el-select + v-model="formInline.medium" + size="small" + placeholder="璇烽�夋嫨" + > + <el-option + v-for="item in mediumOptions" + :key="item.value" + :label="item.label" + :value="item.value" + > + </el-option> + </el-select> + </el-form-item> <!-- 閫夋嫨鏁版嵁 --> <el-form-item size="small"> <el-link @@ -243,7 +285,8 @@ </el-form-item> <!-- 閫夋嫨鍏冩暟鎹� --> <el-form-item - v-show="uploadFlag" + v-show="uploadFlag " + v-if="formInline.uploadType =='v1'" style="padding-left: 16px" > <el-link @@ -273,6 +316,7 @@ </el-form-item> <el-form-item v-show="uploadFlag" + v-if="formInline.uploadType =='v1'" size="small" > <el-input @@ -1493,6 +1537,7 @@ dataUploadSelectVerByDirid, dataUpload_selectMetaById, selectdirTab, + dataUpload_insertKml } from "../../api/api"; export default { @@ -1609,6 +1654,8 @@ coordinateId: null, path: null, verid: null, + tab: "", + medium: "", }, cascader: { label: "name", @@ -1632,6 +1679,67 @@ { value: "娲炲簱涓撲笟", label: "娲炲簱涓撲笟", + }, + ], + lineOptions: [ + { + value: 'plpipelinef', + label: "鍙爺涓嚎", + }, + { + value: 'plpipelineb', + label: "璁捐涓嚎", + }, + { + value: 'plpipelined', + label: "鏂藉伐鍥句腑绾�", + }, + { + value: 'plpipelinea', + label: "绔e伐鍥句腑绾�", + }, + ], + mediumOptions: [ + { + value: 'GS', + label: "澶╃劧姘�", + }, + { + value: 'CO', + label: "鍘熸补", + }, + { + value: 'RP', + label: "鎴愬搧娌�", + }, + { + value: 'LN', + label: "娑插寲澶╃劧姘�", + }, + { + value: 'SL', + label: "娑插寲鐭虫补姘�", + }, { + value: 'WA', + label: "鐭挎祮", + }, { + value: 'ST', + label: "钂告苯", + }, { + value: 'CD', + label: "浜屾哀鍖栫⒊", + }, { + value: 'HY', + label: "姘㈡皵", + }, { + value: 'QT', + label: "鍏朵粬", + }, { + value: '-1', + label: "鏈煡", + }, { + value: '0', + label: "鏈皟鏌�", }, ], fileType: [], @@ -2213,72 +2321,120 @@ this.getDataLoaderSelectTabs(); this.dialogWarehousing = true; }, - //鏁版嵁鍏ュ簱 - async setFileWare() { - if (this.pathBak != null) { - //鏄惁鏈夎川妫�鏂规 - if (this.formInline.uploadType == "v1") { - //鍗曟枃浠朵笂浼� - var std = []; - for (var i in this.tableData) { - if (this.tableData[i].name.indexOf(".zip") != -1) { - if (this.tableData[i].code != null) { - std.push(this.tableData[i].name); - } - } - } - if (std.length != 0) { - return this.$message.error( - std.toString() + ",鏈川妫�鎴栬川妫�澶辫触,涓嶈兘鍏ュ簱" - ); - } - } else if (this.formInline.uploadType == "v2") { - //鏁翠綋椤圭洰涓婁紶 - - if (this.tableData.length != 2) { - return this.$message.error("璇蜂繚鐣欎竴涓獄ip鏁版嵁,涓�涓猈BS鏁版嵁杩涜鍏ュ簱"); - } - var std = []; - for (var i in this.tableData) { - if (this.tableData[i].code != null) { - std.push(this.tableData[i].name); - } - } - if (std.length != 0) { - return this.$message.error( - std.toString() + ",鏈川妫�鎴栬川妫�澶辫触,涓嶈兘鍏ュ簱" - ); - } - } - } + //kml鏂囦欢鍏ュ簱 + async setKMlWare() { this.loading = true; var obj = { dirid: this.formInline.dirid, epsgCode: this.formInline.coordinateId, path: this.formInline.path, verid: this.formInline.verid, + entity: this.formInline.tab, + medium: this.formInline.medium, }; this.loadText = "鏁版嵁鏄犲皠鏌ヨ涓�,璇风瓑寰�..." - //鏌ヨ鏄犲皠 const data = await dataUpload_selectMappers(obj); if (data.code != 200) { return this.$message.error("鏁版嵁鏄犲皠澶辫触"); } - this.loading = false; - this.loadText = " " - var std = []; - var result = data.result; - this.insertWareList = data.result; - for (var i in result) { - if (result[i].type == "shp" || result[i].type == "gdb") { - std.push(result[i]); - } + + var std = data.result.filter((res) => { + res.entity = obj.entity + res.medium = obj.medium + return res; + }) + + this.loadText = "鏁版嵁鍏ュ簱涓�,璇风瓑寰�..." + const res = await dataUpload_insertKml( + JSON.stringify(std) + ); + if (res.code != 200) { + this.$message.error("鏁版嵁鍏ュ簱澶辫触"); + return; } - if (std.length != 0) { - this.tableWareOne = std; - this.showWareHousing(); + + this.$message({ + message: "鏁版嵁鍏ュ簱鎴愬姛", + type: "success", + }); + this.loading = false; + this.loadText = "" + if (res.result.length > 0) { + this.warehouseDialog = true; + this.wareData = res.result; + } + + this.setInsrtWareTableClose(); + }, + //鏁版嵁鍏ュ簱 + async setFileWare() { + if (this.formInline.uploadType == "v3") { + this.setKMlWare() } else { - this.setInsrtWareTable(); + if (this.pathBak != null) { + //鏄惁鏈夎川妫�鏂规 + if (this.formInline.uploadType == "v1") { + //鍗曟枃浠朵笂浼� + var std = []; + for (var i in this.tableData) { + if (this.tableData[i].name.indexOf(".zip") != -1) { + if (this.tableData[i].code != null) { + std.push(this.tableData[i].name); + } + } + } + if (std.length != 0) { + return this.$message.error( + std.toString() + ",鏈川妫�鎴栬川妫�澶辫触,涓嶈兘鍏ュ簱" + ); + } + } else if (this.formInline.uploadType == "v2") { + //鏁翠綋椤圭洰涓婁紶 + if (this.tableData.length != 2) { + return this.$message.error("璇蜂繚鐣欎竴涓獄ip鏁版嵁,涓�涓猈BS鏁版嵁杩涜鍏ュ簱"); + } + var std = []; + for (var i in this.tableData) { + if (this.tableData[i].code != null) { + std.push(this.tableData[i].name); + } + } + if (std.length != 0) { + return this.$message.error( + std.toString() + ",鏈川妫�鎴栬川妫�澶辫触,涓嶈兘鍏ュ簱" + ); + } + } + } + this.loading = true; + var obj = { + dirid: this.formInline.dirid, + epsgCode: this.formInline.coordinateId, + path: this.formInline.path, + verid: this.formInline.verid, + }; + this.loadText = "鏁版嵁鏄犲皠鏌ヨ涓�,璇风瓑寰�..." + //鏌ヨ鏄犲皠 + const data = await dataUpload_selectMappers(obj); + if (data.code != 200) { + return this.$message.error("鏁版嵁鏄犲皠澶辫触"); + } + this.loading = false; + this.loadText = " " + var std = []; + var result = data.result; + this.insertWareList = data.result; + for (var i in result) { + if (result[i].type == "shp" || result[i].type == "gdb") { + std.push(result[i]); + } + } + if (std.length != 0) { + this.tableWareOne = std; + this.showWareHousing(); + } else { + this.setInsrtWareTable(); + } } }, //涓嬭浇鏃ュ織 @@ -2576,11 +2732,18 @@ //娓呴櫎鎵�鏈塱nput File; clearFileSelect() { this.formInline.specialtyData = "璇烽�夋嫨鏁版嵁"; - document.getElementById("selectDataFile").value = ""; + if (document.getElementById("selectDataFile")) { + document.getElementById("selectDataFile").value = ""; + } this.formInline.metaData = "璇烽�夋嫨鍏冩暟鎹�"; - document.getElementById("metaDataFile").value = ""; + if (document.getElementById("metaDataFile")) { + document.getElementById("metaDataFile").value = "" + } this.formInline.wbsData = "璇烽�夋嫨WBS鏁版嵁"; - document.getElementById("wbsDataFile").value = ""; + + if (document.getElementById("wbsDataFile")) { + document.getElementById("wbsDataFile").value = ""; + } }, //鑾峰彇涓婁紶鏂囦欢鏁伴噺 async getFileLength() { @@ -2622,6 +2785,8 @@ if (fs2.files.length == 0) { return this.$message.error("璇烽�夋嫨闇�瑕佷笂浼犵殑WBS鏁版嵁鏂囦欢"); } + } else if (this.formInline.uploadType == "v3") { + } for (var i = 0, c = fs1.files.length; i < c; i++) { formData.append(fs1.files[i].name, fs1.files[i]); @@ -3007,6 +3172,8 @@ this.formInline.entryId = null; this.formInline.selectFileType = "*.*"; this.formInline.coordinateId = this.coordinateOption[0].epsgcode; + this.formInline.medium = ""; + this.formInline.tab = ""; }, //閫夋嫨鏁版嵁 setSelectFile() { @@ -3027,8 +3194,16 @@ this.formInline.dirid = this.entryOption[0].id; this.getselectVerByDirid(); this.pathBak = this.entryOption[0].checks; + } else if (res == "v3") { + this.formInline.selectFileType = ".kml"; + this.getSelectdirTab(); + this.getselectVerByDirid(); + this.formInline.specialtyId = "绾胯矾涓撲笟"; + this.uploadFlag = true; + this.formInline.tab = this.lineOptions[0].value; + this.formInline.medium = this.mediumOptions[0].value } else { - this.getStartDirChecked(this.catalogOption); + this.getSelectdirTab(); this.getselectVerByDirid(); this.uploadFlag = true; } diff --git a/src/views/datamanage/uploadmanage.vue b/src/views/datamanage/uploadmanage.vue index 89ed182..d888444 100644 --- a/src/views/datamanage/uploadmanage.vue +++ b/src/views/datamanage/uploadmanage.vue @@ -879,6 +879,21 @@ > </div> </div> + <el-dialog + :title="$t('common.details')" + :visible.sync="rasterCsVisible" + :close-on-click-modal="false" + width="35%" + > + <div class="rasterCsBox"> + <div v-for="(item,index) in rasterCsOption"> + <div class="rasterCsContent"> + <label>{{ item.name }} : </label> + <label>{{ item.bak }}</label> + </div> + </div> + </div> + </el-dialog> </div> </template> @@ -900,7 +915,8 @@ dataUpload_selectCoords, publish_selectLasCs, task_selectByPageAndCount, - task_deleteTask + task_deleteTask, + publish_selectRasterCs } from '../../api/api.js' import { conditions } from '../Archive/Archive'; @@ -1037,7 +1053,9 @@ }, stridOption: [], osgbLasOption: [], - loadingText: '鏁版嵁鍙戝竷涓�' + loadingText: '鏁版嵁鍙戝竷涓�', + rasterCsVisible: false, + rasterCsOption: [] } }, methods: { @@ -1099,21 +1117,8 @@ srids: [], zs: zs } - this.loadingText = '鏁版嵁鍙戝竷涓�'; - this.loadDialogVisible = true - this.setOsgbCanel(); - const data = await publish_insert(obj); + this.setPublish_insert(obj) - if (data.code == 200 && data.result > 0) { - this.$message({ - message: '鏁版嵁鍙戝竷鎴愬姛', - type: 'success' - }); - } else { - this.$message.error("鏁版嵁鍙戝竷澶辫触") - } - this.loadDialogVisible = false - this.getTableData(); }, setModelCanel() { @@ -1153,22 +1158,7 @@ models: models } - this.loadingText = '鏁版嵁鍙戝竷涓�'; - this.loadDialogVisible = true - this.insertModelVisible = false; - - const data = await publish_insert(obj); - - if (data.code == 200 && data.result > 0) { - this.$message({ - message: '鏁版嵁鍙戝竷鎴愬姛', - type: 'success' - }); - } else { - this.$message.error("鏁版嵁鍙戝竷澶辫触") - } - this.loadDialogVisible = false - this.getTableData(); + this.setPublish_insert(obj) }, @@ -1236,6 +1226,21 @@ for (var i in this.multipleSelection) { std.push(this.multipleSelection[i].id) } + + if (this.formInline.type == 'DOM') { + const data1 = await publish_selectRasterCs({ + ids: std.toString() + }) + if (data1.code == 200 && data1.result.length == 0) { + } else { + this.rasterCsOption = data1.result; + this.insertDialogVisible = false; + this.rasterCsVisible = true; + return + } + } + + var obj = { dircode: this.formInline.dirid, depcode: this.formInline.depid, @@ -1246,23 +1251,11 @@ type: this.formInline.type, noData: this.insertLayer.noData } - this.loadingText = '鏁版嵁鍙戝竷涓�'; - this.loadDialogVisible = true - this.insertDialogVisible = false; - - const data = await publish_insert(obj); - - if (data.code == 200 && data.result > 0) { - this.$message({ - message: '鏁版嵁鍙戝竷鎴愬姛', - type: 'success' - }); - } else { - this.$message.error("鏁版嵁鍙戝竷澶辫触") - } - this.loadDialogVisible = false - this.getTableData(); + this.setPublish_insert(obj) }, + + + //鏁版嵁鍙戝竷 async setPagePublish() { @@ -1270,7 +1263,6 @@ this.$message("璇烽�夋嫨瑕佸彂甯冪殑鏁版嵁") return } - if (this.formInline.type == "DOM" || this.formInline.type == "DEM") { this.insertLayer.name = this.multipleSelection[0].name.split('.')[0]; @@ -1341,24 +1333,41 @@ ids: std, type: this.formInline.type } - this.loadingText = '鏁版嵁鍙戝竷涓�'; - this.loadDialogVisible = true - this.insertDialogVisible = false; - const data = await publish_insert(obj); - if (data.code == 200 && data.result > 0) { - this.$message({ - message: '鏁版嵁鍙戝竷鎴愬姛', - type: 'success' - }); - } else { - this.$message.error("鏁版嵁鍙戝竷澶辫触") - } - this.loadDialogVisible = false - this.getTableData(); + this.setPublish_insert(obj) } }, + + async setPublish_insert(obj) { + this.insertDialogVisible = false; + this.insertModelVisible = false; + this.insertOsgbVisible = false; + var std = []; + + + + this.loadingText = '鏁版嵁鍙戝竷涓�'; + this.loadDialogVisible = true + this.insertDialogVisible = false; + const data = await publish_insert(obj); + if (data.code == 200 && data.result > 0) { + this.$message({ + message: '鏁版嵁鍙戝竷鎴愬姛', + type: 'success' + }); + } else { + this.$message.error("鏁版嵁鍙戝竷澶辫触") + } + this.loadDialogVisible = false + this.getTableData(); + + + }, + + + + //鏁版嵁璇︽儏 setPreviewDetails(res) { this.itemdetail = res; @@ -1925,5 +1934,14 @@ width: 140px; text-align: right; } + .rasterCsBox { + max-height: 60vh; + overflow: auto; + .rasterCsContent { + padding: 10px; + font-size: 16px; + font-family: Source Han Sans CN; + } + } } </style> \ No newline at end of file -- Gitblit v1.9.3