| | |
| | | spaceLayer: '', |
| | | imagePoint: null, |
| | | domainsLayer: null, |
| | | querytype: null, |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | 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") { |
| | |
| | | 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") { |
| | |
| | | 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 |
| | | |
| | | } |
| | | |
| | | const data = await dataQuerySelectByPage(this.listdata); |
| | | if (data.code != 200) { |
| | | this.$message.error('列表调用失败'); |
| | |
| | | this.$store.state.primitLayer = null; |
| | | } |
| | | var wkt = this.$wkt.parse(val1); |
| | | this.setMapLoaction(wkt,row); |
| | | |
| | | this.setMapLoaction(wkt, row); |
| | | } |
| | | }, |
| | | handleSizeChange(val) { |
| | |
| | | this.listdata.pageIndex = val; |
| | | this.getSpaceTableLayer(); |
| | | }, |
| | | setMapLoaction(res,properties) { |
| | | setMapLoaction(res, properties) { |
| | | if (this.$store.state.primitLayer != null) { |
| | | sgworld.Creator.DeleteObject(this.$store.state.primitLayer); |
| | | // this.$store.state.primitLayer = null; |
| | |
| | | this.$store.state.primitLayer = null; |
| | | } |
| | | var coord = res.coordinates; |
| | | |
| | | if (res.type == 'Point') { |
| | | var val = Cesium.Cartesian3.fromDegrees( |
| | | res.coordinates[0], |
| | |
| | | |
| | | ); |
| | | this.$store.state.primitLayer = Viewer.entities.add({ |
| | | properties:properties, |
| | | tag : "properties_point", |
| | | properties: properties, |
| | | tag: "properties_point", |
| | | position: val, |
| | | billboard: { |
| | | // 图像地址,URI或Canvas的属性 |
| | |
| | | sgworld.Navigate.flyToObj(this.$store.state.primitLayer) |
| | | |
| | | window.propertieshandler = new Cesium.ScreenSpaceEventHandler( |
| | | sgworld.Viewer.scene.canvas |
| | | sgworld.Viewer.scene.canvas |
| | | ); |
| | | window.propertieshandler.setInputAction(event => { |
| | | let pick = sgworld.Viewer.scene.pick(event.position); |
| | | // debugger; |
| | | // ; |
| | | if (pick && pick.id && pick.id.tag == "properties_point") { |
| | | 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){ |
| | | if (itemElement == item.field) { |
| | | obj[item.alias] = properties[itemElement]._value |
| | | } |
| | | }) |
| | |
| | | }, 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), |
| | |
| | | border: 1px solid gray; |
| | | float: left; |
| | | .centTable { |
| | | margin-top: 1%; |
| | | position: absolute; |
| | | height: 66%; |
| | | width: 98%; |
| | |
| | | position: absolute; |
| | | bottom: 3%; |
| | | } |
| | | /deep/.el-form-item { |
| | | margin-bottom: 0px; |
| | | } |
| | | } |
| | | </style> |