| | |
| | | this.modelBase = config.modelBase; |
| | | this.getSettingPublicKey(); |
| | | const token = getToken(); |
| | | console.log("token", token); |
| | | if (token) { |
| | | this.getModelLayerList(); |
| | | } else { |
| | | getPublickey().then((response) => { |
| | | const password = this.modelBase.password; |
| | | const userId = this.modelBase.userId; |
| | | const publickey = response.data; |
| | | this.publickey = response.data; |
| | | const encrypt = new JSEncrypt(); |
| | | encrypt.setPublicKey(publickey); |
| | | encrypt.setPublicKey(this.publickey); |
| | | let encrypted = encrypt.encrypt(password.substring(0, 50)) + ""; |
| | | let submit = { |
| | | userid: userId, |
| | |
| | | } |
| | | }); |
| | | }, |
| | | getQueryGroupBy(layer, filed, ction) { |
| | | const layerId = this.layers.filter((item) => { |
| | | if (item.name == layer) { |
| | | return item; |
| | | } |
| | | }); |
| | | if (layerId.length <= 0) { |
| | | return; |
| | | } |
| | | |
| | | const url = |
| | | config.modelBase.url + |
| | | config.modelBase.geo + |
| | | "/entitydbdata/query/entity"; |
| | | const obj = [ |
| | | { |
| | | type: "count", |
| | | field: filed, |
| | | outfield: "count_" + filed |
| | | } |
| | | ]; |
| | | axios |
| | | .post( |
| | | url, |
| | | { |
| | | layerid: layerId[0].id, |
| | | dbid: this.dbid, |
| | | token: getToken(), |
| | | statistics: JSON.stringify(obj), |
| | | containCount: true, |
| | | groupby: filed |
| | | }, |
| | | { |
| | | headers: { |
| | | Authorization: getToken(), |
| | | "Content-Type": "application/x-www-form-urlencoded" |
| | | } |
| | | } |
| | | ) |
| | | .then((response) => { |
| | | ction(response); |
| | | }) |
| | | .catch((error) => { |
| | | error; |
| | | }); |
| | | }, |
| | | |
| | | setLayerQuery() { |
| | | const token = getToken(); |
| | | this.geom = mapConfig.setPointToCrical(120.27, 14.79, null); |
| | |
| | | } |
| | | ) |
| | | .then((response) => { |
| | | console.log("List", response); |
| | | that.setLayerFilter(response.data.data.items); |
| | | }); |
| | | }, |
| | |
| | | const a = []; |
| | | // rs.filter((item) => { |
| | | // if (item.targettype == "军事目标") { |
| | | // console.log(item); |
| | | // // a.push(["${id} === '" + item.sid + "'", "color('#FF0000', 0.5)"]); |
| | | // } |
| | | // }); |
| | |
| | | 'color("purple", 0.5)' |
| | | ]); |
| | | a.push(["true", "color('#E8F1F2', 0.5)"]); |
| | | console.log(tileset); |
| | | tileset.style = new Cesium.Cesium3DTileStyle({ |
| | | // color: "vec4(1.0,1.0,1.0, 1.0)", // 红色 |
| | | color: { |
| | |
| | | }); |
| | | // window.Cesium.when(tileset.readyPromise, function(tileset) { |
| | | // var tilesetId = tileset.id; |
| | | // console.log('Tileset ID: ' + tilesetId); |
| | | // }); |
| | | // tileset.readyPromise.then( (item)=> { |
| | | // tileset.tileVisible.addEventListener( (tile)=> { |
| | | // console.log(tile); |
| | | // }) |
| | | // }) |
| | | } |