From 25d930f19475c075d75a10799c7dde4421c31ee9 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期四, 14 九月 2023 10:37:01 +0800 Subject: [PATCH] 图层管理,在线制图,地名定位修改 --- src/api/api.js | 6 +++ src/views/layer/layerDetail.vue | 45 +++++++++++++--------- src/assets/js/Map/menuData.js | 14 +++--- src/views/search/search.vue | 34 +++++++++-------- 4 files changed, 57 insertions(+), 42 deletions(-) diff --git a/src/api/api.js b/src/api/api.js index 4dce71d..af1bc9b 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -100,3 +100,9 @@ export function selectByPolyline(params) { return request.get("/rasterAnalysis/selectByPolyline", { params: params }); } +//鏁版嵁绠$悊=>鏇存柊鏁扮畝鏈嶅姟 +export function publish_updateSjLayerStretch(params) { + return request.post("/publish/updateSjLayerStretch", params); +} + + diff --git a/src/assets/js/Map/menuData.js b/src/assets/js/Map/menuData.js index a71b984..0ea2eaf 100644 --- a/src/assets/js/Map/menuData.js +++ b/src/assets/js/Map/menuData.js @@ -226,13 +226,13 @@ level: 1, checkImgUrl: "妞渾 3 鎷疯礉 22.png", }, - { - id: "t3", - imgUrl: "娓呴櫎.png", - level: 1, - name: "娓呴櫎", - checkImgUrl: "娓呴櫎 鎷疯礉 2.png", - }, + // { + // id: "t3", + // imgUrl: "娓呴櫎.png", + // level: 1, + // name: "娓呴櫎", + // checkImgUrl: "娓呴櫎 鎷疯礉 2.png", + // }, { id: "t4", imgUrl: "褰㈢姸 9.png", diff --git a/src/views/layer/layerDetail.vue b/src/views/layer/layerDetail.vue index 304821e..39befd1 100644 --- a/src/views/layer/layerDetail.vue +++ b/src/views/layer/layerDetail.vue @@ -83,7 +83,7 @@ /> </div> </div> - <div + <!-- <div class="selectBox" v-show="colorShow" > @@ -101,8 +101,8 @@ ></el-option> </el-select> - </div> - <div + </div> --> + <!-- <div class="selectBox" v-show="colorShow " > @@ -133,10 +133,10 @@ :style="item.domCss" ></div> - <!-- <img :src="item.url" style="height: 30px; width: 100%" /> --> + </el-option> </el-select> - </div> + </div> --> <div v-show="colorShow"> <div class="selectBox"> <el-button @@ -168,6 +168,7 @@ import { publish_selectSjColorTables, publish_updateSjService, + publish_updateSjLayerStretch, } from "@/api/api"; import { ElMessage } from "element-plus"; import store from "@/store"; @@ -428,25 +429,31 @@ geom = releaseLayer.value.geom; } var obj = { - colorTable: color1, // 鏅�氶鑹茶〃锛屽彲涓嶈 - gradientColorTable: color2, + // colorTable: color1, // 鏅�氶鑹茶〃锛屽彲涓嶈 + // gradientColorTable: color2, enhanceType: stretchValue.value, // 鎷変几鏂瑰紡 0锛氫笉鎷変几锛�1 绾挎�ф媺浼革紝2 鐩存柟鍥惧潎琛★紝3 鏍囧噯宸媺浼革紝4 浼介┈鎷変几 enhanceFactor: stretchNum.value, // 鎷変几鍥犲瓙 null 鎴� 灏忔暟 - dircode: "00", // 鐩綍缂栫爜 - epsg: 104903, // 104903-鏈堢悆2000锛�4326-WGS84 - ids: null, // 涓嶈璁惧畾 - name: releaseLayer.value.cnName, // 褰撳墠鏈嶅姟鍚嶇О - nodata: 0, // 榛戣壊-0锛岀櫧鑹�-255 - type: releaseLayer.value.type, // 褰卞儚-DOM锛岄珮绋�- - geom: geom, - pubid: releaseLayer.value.pubid, + // dircode: "00", // 鐩綍缂栫爜 + // epsg: 104903, // 104903-鏈堢悆2000锛�4326-WGS84 + layerId: releaseLayer.value.id, // 涓嶈璁惧畾 + // name: releaseLayer.value.cnName, // 褰撳墠鏈嶅姟鍚嶇О + // nodata: 0, // 榛戣壊-0锛岀櫧鑹�-255 + // type: releaseLayer.value.type, // 褰卞儚-DOM锛岄珮绋�- + // geom: geom, + // pubid: releaseLayer.value.pubid, }; - publish_updateSjService(obj).then((res) => { + store.state.loading = true; + publish_updateSjLayerStretch(obj).then((res) => { if (res.code != 200) { return ElMessage(data.msg); } - store.state.restLayer = true; - setSpatialClose(); + if (res.code == 200 && res.result > 0) { + store.state.loading = false; + store.state.restLayer = true; + setSpatialClose(); + } else { + store.state.loading = false; + } }); // const data = ; // console.log("1122223" + data.code); @@ -465,7 +472,7 @@ colorShow.value = true; } }); -getColorJson(); +// getColorJson(); </script> <style lang="less" scoped> diff --git a/src/views/search/search.vue b/src/views/search/search.vue index 546e6f9..2b9cec9 100644 --- a/src/views/search/search.vue +++ b/src/views/search/search.vue @@ -115,6 +115,7 @@ // import config from "../../../public/config/config.js"; import { dataQuery_selectByPage } from "@/api/api.js"; import { ElMessage } from "element-plus"; +import menuTool from "@/assets/js/Map/menuTool"; let searchValue = ref(""); const searchFLag = ref(false); const tableData = ref([]); @@ -129,25 +130,26 @@ const NumhandleChange = (value: number) => {}; const handleChange = (val: string[]) => {}; const setPoitCannel = () => { - if (imageLabel) { - imageLabel.deleteObject(); - imageLabel = null; - } + // if (imageLabel) { + // imageLabel.deleteObject(); + // imageLabel = null; + // } + menuTool.setClearLocation("鍦板悕瀹氫綅"); }; const setPointLocal = (res) => { - if (imageLabel) { - setPoitCannel(); - } + setPoitCannel(); + var position = { X: res.lon, Y: res.lat, Altitude: 10 }; - imageLabel = window.sgworld.Creator.CreateImageLabel( - position, - config.StaticFileBaseUrl + "/Workers/image/location.png", - {}, - 0, - "鏍囩鐐�" - ); - var id = imageLabel.item.id; - window.sgworld.Navigate.flyToObj(imageLabel.item); + menuTool.setLocationPoint([res.lon, res.lat], "鍦板悕瀹氫綅"); + // imageLabel = window.sgworld.Creator.CreateImageLabel( + // position, + // config.StaticFileBaseUrl + "/Workers/image/location.png", + // {}, + // 0, + // "鏍囩鐐�" + // ); + // var id = imageLabel.item.id; + // window.sgworld.Navigate.flyToObj(imageLabel.item); // window.earthCtrl.camera.flyTo(res.log, res.lat, 300, 9.5, -45, 0.0, 5); }; const setInputCahgne = () => { -- Gitblit v1.9.3