From 968394a4f9885e7df2a4af4b5b35af070975f4b6 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期二, 29 八月 2023 17:03:02 +0800 Subject: [PATCH] 资源查询页面修改,接口对接调试,图层管理页面修改,数据上传页面修改 --- src/views/resourceQuery/resourceQuery.vue | 279 +++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 178 insertions(+), 101 deletions(-) diff --git a/src/views/resourceQuery/resourceQuery.vue b/src/views/resourceQuery/resourceQuery.vue index 79ba022..7abc8fe 100644 --- a/src/views/resourceQuery/resourceQuery.vue +++ b/src/views/resourceQuery/resourceQuery.vue @@ -29,12 +29,12 @@ <el-form-item label="浼犳劅鍣ㄧ被鍨�"> <el-select style="width: 100%" - v-model="form.region" + v-model="form.sensorType" placeholder="" > <el-option - v-for="(e, i) in stretchOptions" - :label="e.label" + v-for="(e, i) in sensorOption" + :label="e.name" :value="e.value" :key="i" /> @@ -43,12 +43,12 @@ <el-form-item label="鏁版嵁绫诲瀷"> <el-select style="width: 100%" - v-model="form.region" + v-model="form.mataType" placeholder="" > <el-option - v-for="(e, i) in stretchOptions" - :label="e.label" + v-for="(e, i) in metaOption" + :label="e.name" :value="e.value" :key="i" /> @@ -57,7 +57,7 @@ <el-form-item label="鏃堕棿鑼冨洿"> <el-date-picker style="width: 100%" - v-model="form.time" + v-model="form.acqTime" type="datetimerange" range-separator="鑷�" start-placeholder="寮�濮嬫棩鏈�" @@ -66,12 +66,7 @@ > </el-date-picker> </el-form-item> - <el-form-item> - <!-- <div class="btnstyle editBtn"> - <el-button type="primary" @click="onSubmit">纭畾</el-button> - <el-button class="delbtn">鍙栨秷</el-button> - </div> --> - </el-form-item> + </el-form> <div class="KJCX"> <div class="KJCX_title">绌洪棿鏌ヨ</div> @@ -104,6 +99,13 @@ <span>澶氳竟褰�</span> <div class="btn_bg db"></div> </div> + <div + class="KJCX_btn" + @click="setDrawMenu(5)" + > + <span>娓呴櫎</span> + <div class="btn_bg db"></div> + </div> </div> </div> </div> @@ -118,33 +120,39 @@ <el-button type="primary" class="btnbox" + @click="setQueryRetrieval" >妫�绱�</el-button> </div> <div> <el-button type="primary" class="btnbox delbtn" + @click="setQueryRestRetrieval" >閲嶇疆</el-button> </div> </div> </div> - <div v-show="listDialog"> - </div> - <!-- <div class="pagination"> + <div + class="pagination" + v-show="listDialog" + > <el-pagination small @size-change="handleSizeChange" @current-change="handleCurrentChange" - :current-page="currentPage4" + :current-page="form.pageIndex" :page-sizes="[100, 200, 300, 400]" - :page-size="100" + :page-size="form.pageSize" layout="sizes, prev, pager, next, jumper" - :total="400" + :total="form.count" > </el-pagination> - </div> --> - <!-- <div class="list_box"> + </div> + <div + class="list_box" + v-show="listDialog" + > <div class="list" v-for="(e, i) in list" @@ -180,10 +188,13 @@ <i class="el-icon-more"></i> </div> </div> - </div> --> - <!-- <div class="bottom_box"> - <span class="msg_box">鏄剧ず绗瑊{ paginationData.pageNo }}鍒皗{ - paginationData.pageSize + </div> + <div + class="bottom_box" + v-show="listDialog" + > + <span class="msg_box">鏄剧ず绗瑊{ (( (form.pageIndex - 1)*form.pageSize)+1 )}}鍒皗{(form.pageIndex*form.pageSize) + }}鏉★紝鍏眥{ list.length }}鏉¤褰曪紝宸查�夋嫨{{ listChecked.length }}鏉�</span> @@ -191,17 +202,20 @@ <el-button type="primary" class="btnbox" + @click="setListCheckAll" >鍏ㄩ��</el-button> <el-button type="primary" class="btnbox delbtn" + @click="setListRemoveCheckAll" >鍙栨秷</el-button> </div> - </div> --> + </div> </div> <div class="details_box" v-show="detailsBox" + v-drag="true" > <div class="details_t"> <i @@ -214,14 +228,17 @@ <div class="table_td">灞炴��</div> <div class="table_td">灞炴�у��</div> </div> - <div - class="table_tr" - v-for="(e, i) in tableList" - :key="i" - > - <div class="table_td">{{ e.name }}</div> - <div class="table_td">{{ e.value }}</div> + <div style="height: 430px;overflow: auto;"> + <div + class="table_tr" + v-for="(e,key, i) in tableList" + :key="i" + > + <div class="table_td">{{ key}}</div> + <div class="table_td">{{ e }}</div> + </div> </div> + </div> </div> <el-dialog @@ -262,6 +279,8 @@ <script> import * as turf from "@turf/turf" import moonMap from "../../components/MapView/moonMap.vue"; //鍦板浘 +import { meta_type, sensor_type } from "../datamanage/js/layerManage"; +import { select_meta_ByPageAndCount, encr } from '../../api/api' export default { components: { moonMap, @@ -273,89 +292,84 @@ pageSize: 10, }, tableList: [ - { - name: "dataid", - value: "LC81350352022001LGN00", - }, - { - name: "satellite", - value: "LANDSAT8", - }, - { - name: "datatype", - value: "OLLTIRS", - }, - { - name: "ines samples", - value: "7931.0", - }, - { - name: "sensor", - value: "7811.0", - }, + ], listChecked: [], list: [ - { - name: "鍚嶇О", - CQWZ: "浣嶇疆", - time: "鏃堕棿", - data: "澶у皬", - checked: false, - }, - { - name: "鍚嶇О", - CQWZ: "浣嶇疆", - time: "鏃堕棿", - data: "澶у皬", - checked: false, - }, - { - name: "鍚嶇О", - CQWZ: "浣嶇疆", - time: "鏃堕棿", - data: "澶у皬", - checked: false, - }, - { - name: "鍚嶇О", - CQWZ: "浣嶇疆", - time: "鏃堕棿", - data: "澶у皬", - checked: false, - }, + ], currentPage4: 4, form: { name: "", - region: "", - selectName: "", - layerUrl: "", - children: [], - value1: "", + sensorType: 0, + mataType: 0, + acqTime: null, + wkt: null, + pageIndex: 1, + pageSize: 100, + count: 0, }, - stretchOptions: [ - { - value: "鐩綍", - label: "鐩綍", - }, - ], + sensorOption: [], + metaOption: [], detailsBox: false, listDialog: false, leftDialog: true, drawType: null, dialogVisible: false, bufferNumber: 100, + geoWkt: null, + wktEntity: null }; }, methods: { - details(val) { - this.detailsBox = true; + setListCheckAll() { + for (var i in this.list) { + var checked = this.list[i].checked + if (!checked) { + this.list[i].checked = true; + this.listChecked.push(this.list[i]); + } + } }, + setListRemoveCheckAll() { + for (var i in this.list) { + this.list[i].checked = false; + } + this.listChecked = []; + }, + details(e) { + this.detailsBox = true; + this.tableList = e; + }, + setQueryRestRetrieval() { + this.listDialog = false; + this.setFromStart(); + this.setDrawMenu(5); + this.listChecked = []; + }, + async setQueryRetrieval() { + if (this.geoWkt) { + this.form.wkt = encr(this.geoWkt) + } else { + this.form.wkt = null; + } + const data = await select_meta_ByPageAndCount(this.form); + if (data.code != 200) return; + this.form.count = data.count; + this.list = data.result; + this.listDialog = true; + }, + handleSizeChange(val) { - console.log(`姣忛〉 ${val} 鏉); + this.form.pageIndex = 1; + this.form.pageSize = val; + this.setQueryRetrieval(); + }, handleCurrentChange(val) { + this.form.pageIndex = val; + this.setQueryRetrieval(); + console.log(`褰撳墠椤�: ${val}`); }, checkedList(val) { @@ -367,7 +381,7 @@ if (this.listChecked.length > 0) { if (!val.checked) { this.listChecked.forEach((e, i) => { - if (e.name == val.name) { + if (e.id == val.id) { this.listChecked.splice(i, 1); } }); @@ -393,6 +407,9 @@ this.drawType = 'polygon'; this.setDrawEntity(); break + case 5: + this.setClearWktGeom(); + break } }, handleClose() { @@ -410,6 +427,9 @@ var config = {} if (this.drawType != 'point') { config = { showSize: false } + } + if (this.wktEntity) { + this.setClearWktGeom(); } var that = this; sgworld.Creator.createSimpleGraphic(this.drawType, config, (entity) => { @@ -433,8 +453,43 @@ res_val = res.polygon.hierarchy.getValue().positions; break; } - var val = this.getEntityGeometry(res_val, this.drawType) - debugger + this.geoWkt = this.getEntityGeometry(res_val, this.drawType) + if (this.geoWkt) { + + this.setAddWktEntity(this.geoWkt) + } + + }, + setAddWktEntity(res) { + var wkt = this.$wkt.parse(res).coordinates[0]; + var geom = []; + for (var i in wkt) { + + geom.push(Cesium.Cartesian3.fromDegrees(wkt[i][0], wkt[i][1], wkt[i][2] ?? 0)) + } + this.wktEntity = Viewer.entities.add({ + name: '璧勬簮鏌ヨ', + polygon: { + hierarchy: geom, + material: Cesium.Color.BLUE.withAlpha(0), + heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, + outline: true, + outlineColor: Cesium.Color.GREEN, + outlineWidth: 5, + classificationType: Cesium.ClassificationType.BOTH,//璐村湴褰㈠拰3dtile + clampToGround: true,//寮�鍚创鍦� + height: 0, + }, + + }); + }, + setClearWktGeom() { + if (this.wktEntity) { + Viewer.entities.remove(this.wktEntity) + this.wktEntity = null; + this.geoWkt = null; + } + }, getEntityGeometry(res, type) { var res_val; @@ -503,9 +558,29 @@ std.lng = Cesium.Math.toDegrees(cartographic.longitude) std.alt = cartographic.height return std + }, + getSensorMeta() { + this.metaOption = meta_type; + this.sensorOption = sensor_type; + }, + setFromStart() { + this.form = { + name: "", + sensorType: 0, + mataType: 0, + acqTime: null, + wkt: null, + pageIndex: 1, + pageSize: 100, + count: 0, + } } }, created() { }, + mounted() { + this.getSensorMeta(); + this.setFromStart(); + } }; </script> @@ -524,7 +599,7 @@ background-size: 100% 100%; } .left_box { - width: 427px; + min-width: 427px; height: auto; left: 10px; top: 10px; @@ -645,8 +720,9 @@ } .list_box { overflow: auto; - // height: 350px; - height: 42%; + height: 350px; + //height: 42%; + .list { padding: 10px; background: #0d131d; @@ -730,6 +806,7 @@ .details_box { width: 533px; // height: 430px; + overflow: auto; background: rgba(7, 8, 14, 0.8); padding: 10px; position: absolute; -- Gitblit v1.9.3