|
@@ -23,9 +23,11 @@ import GDBH from './cockpitNew1/gdbh';
|
|
|
import STXF from './cockpitNew1/stxf';
|
|
|
import WPJG from './cockpitNew1/wpjg';
|
|
|
import datePicker from './cockpitNew1/datePicker.vue';
|
|
|
-import { cockpitInfo } from '@/api/cockpit'
|
|
|
import xzqh from "../../static/data/460200_full.json";
|
|
|
import SerCenter from './cockpitNew1/serCenter.vue';
|
|
|
+
|
|
|
+import { cockpitInfo } from '@/api/cockpit'
|
|
|
+
|
|
|
export default {
|
|
|
components: { serCenter, JSYD, TDSC, HYSY, TDSY, GDBH, STXF, WPJG, datePicker, SerCenter },
|
|
|
data() {
|
|
@@ -48,10 +50,10 @@ export default {
|
|
|
deteChange(date) {
|
|
|
|
|
|
},
|
|
|
- pick_xzqh() {
|
|
|
+ async pick_xzqh() {
|
|
|
const that = this;
|
|
|
const handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
|
|
|
- handler.setInputAction(event => {
|
|
|
+ handler.setInputAction(async event => {
|
|
|
let pickObj = viewer.scene.pick(event.position);
|
|
|
var position = viewer.scene.pickPosition(event.position);
|
|
|
|
|
@@ -88,9 +90,11 @@ export default {
|
|
|
const address = pickObj.id.properties.adcode.getValue();
|
|
|
const center = pickObj.id.properties.centroid.getValue();
|
|
|
|
|
|
+ // 选中状态
|
|
|
pickObj.id.polygon._material.color = Cesium.Color.fromCssColorString(that.xzqh_color_click);
|
|
|
pickObj.id.polygon.extrudedHeight = 850;
|
|
|
|
|
|
+ // 恢复其他状态
|
|
|
viewer.entities.values.forEach((res) => {
|
|
|
|
|
|
if (res.properties.name._value != name) {
|
|
@@ -101,6 +105,47 @@ export default {
|
|
|
|
|
|
}
|
|
|
})
|
|
|
+ // 选中xzqh查询
|
|
|
+ let obj = {
|
|
|
+ beginTime: '20240101',
|
|
|
+ endTime: '20240501',
|
|
|
+ jscType: 'jsc_hysyq_ztsh',
|
|
|
+ id: address
|
|
|
+ };
|
|
|
+ let data = await cockpitInfo(obj);
|
|
|
+
|
|
|
+ let obg_text = {
|
|
|
+ xzqhdm_number: data.data[0].xzqhdm_number,
|
|
|
+ zhmj: data.data[0].zhmj,
|
|
|
+
|
|
|
+ }
|
|
|
+ console.log(obg_text, "obg_echart");
|
|
|
+
|
|
|
+ store.setCockpitHysyText(obg_text);
|
|
|
+
|
|
|
+ // 图表数据
|
|
|
+ let obj_echart = {
|
|
|
+ beginTime: '20240101',
|
|
|
+ endTime: '20240501',
|
|
|
+ jscType: 'jsc_hysyq_yelx',
|
|
|
+ id: address
|
|
|
+ };
|
|
|
+ let data_echart = await cockpitInfo(obj_echart);
|
|
|
+
|
|
|
+ let obg_echart = {
|
|
|
+ x: data_echart.data.map(item => item.yhlx_name),
|
|
|
+ bar: data_echart.data.map(item => item.zhmj)
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ store.setCockpitHysyEchart(obg_echart);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ console.log(address, "address");
|
|
|
+
|
|
|
} else {
|
|
|
|
|
|
}
|