From c609695d14564f0bf4a2b119718400b2a2be037e Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期五, 03 三月 2023 19:02:44 +0800 Subject: [PATCH] 属性查询高级查询修改,数据查询工点表属性查询 --- src/components/MapView/mapSpacePop.vue | 54 ++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 46 insertions(+), 8 deletions(-) diff --git a/src/components/MapView/mapSpacePop.vue b/src/components/MapView/mapSpacePop.vue index f00e178..9a6f285 100644 --- a/src/components/MapView/mapSpacePop.vue +++ b/src/components/MapView/mapSpacePop.vue @@ -194,6 +194,7 @@ spaceLayer: '', imagePoint: null, domainsLayer: null, + querytype: null, }; }, watch: { @@ -243,7 +244,7 @@ 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") { @@ -271,6 +272,7 @@ 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") { @@ -337,13 +339,41 @@ if (this.formInline.input == undefined || this.formInline.input == null) { this.listdata.filter = null; } else { + + var val; + var value = this.formInline.input + if (this.querytype == "long" || this.querytype == "integer") { + + val = parseInt(value); + } else if (this.querytype == 'double') { + + if (this.formSql.value.indexOf(".") != -1) { + val = value; + } else { + val = parseFloat(value).toFixed(1) + } + } else if (querytype == "date" || querytype == "datetime") { + var time = new Date(value); + var m = time.getMonth() + 1; + var d = time.getDate(); + var y = time.getFullYear(); + val = "'" + y + + '-' + + this.add0(m) + + '-' + + this.add0(d) + "'"; + } else { + val = "'" + value + "'"; + } + + + + this.listdata.filter = - this.formInline.name + - ' ' + - this.formInline.region + - ' ' + - this.formInline.input; + this.formInline.name + " " + this.formInline.region + " " + val + } + debugger const data = await dataQuerySelectByPage(this.listdata); if (data.code != 200) { this.$message.error('鍒楄〃璋冪敤澶辫触'); @@ -383,6 +413,7 @@ this.$store.state.primitLayer = null; } var wkt = this.$wkt.parse(val1); + this.setMapLoaction(wkt, row); } }, @@ -402,6 +433,7 @@ this.$store.state.primitLayer = null; } var coord = res.coordinates; + debugger if (res.type == 'Point') { var val = Cesium.Cartesian3.fromDegrees( res.coordinates[0], @@ -457,12 +489,16 @@ }, Cesium.ScreenSpaceEventType.LEFT_CLICK); } else if (res.type == 'MultiPolygon' || res.type == 'LineString') { + var val = res.coordinates[0][0]; var std = []; for (var i in val) { - std.push({ x: val[i][0], y: val[i][1] }) + std.push(val[i][0]) + + std.push(val[i][1]) } + this.$store.state.primitLayer = Viewer.entities.add({ polyline: { positions: Cesium.Cartesian3.fromDegreesArray(std), @@ -506,7 +542,6 @@ border: 1px solid gray; float: left; .centTable { - margin-top: 1%; position: absolute; height: 66%; width: 98%; @@ -524,5 +559,8 @@ position: absolute; bottom: 3%; } + /dep/.el-form-item { + margin-bottom: 0px; + } } </style> -- Gitblit v1.9.3