|  | @@ -11,7 +11,11 @@
 | 
	
		
			
				|  |  |            v-model="input3"
 | 
	
		
			
				|  |  |            class="input-with-select"
 | 
	
		
			
				|  |  |          >
 | 
	
		
			
				|  |  | -          <el-button slot="append" icon="el-icon-search"></el-button>
 | 
	
		
			
				|  |  | +          <el-button
 | 
	
		
			
				|  |  | +            slot="append"
 | 
	
		
			
				|  |  | +            icon="el-icon-search"
 | 
	
		
			
				|  |  | +            @click="getZtBillboardInfoList()"
 | 
	
		
			
				|  |  | +          ></el-button>
 | 
	
		
			
				|  |  |          </el-input>
 | 
	
		
			
				|  |  |        </el-col>
 | 
	
		
			
				|  |  |        <el-col :span="6">
 | 
	
	
		
			
				|  | @@ -78,14 +82,13 @@
 | 
	
		
			
				|  |  |      </el-row>
 | 
	
		
			
				|  |  |      <el-row>
 | 
	
		
			
				|  |  |        <el-pagination
 | 
	
		
			
				|  |  | +        :hide-on-single-page="true"
 | 
	
		
			
				|  |  |          style="color: white"
 | 
	
		
			
				|  |  |          @size-change="handleSizeChange"
 | 
	
		
			
				|  |  |          @current-change="handleCurrentChange"
 | 
	
		
			
				|  |  | -        :current-page="currentPage4"
 | 
	
		
			
				|  |  | -        :page-sizes="10"
 | 
	
		
			
				|  |  | -        :page-size="100"
 | 
	
		
			
				|  |  | -        layout="total, prev,pager,next,jumper"
 | 
	
		
			
				|  |  | -        :total="total"
 | 
	
		
			
				|  |  | +        :page-size="queryParams.pageSize"
 | 
	
		
			
				|  |  | +        layout="prev, pager, next"
 | 
	
		
			
				|  |  | +        :total="queryParams.total"
 | 
	
		
			
				|  |  |        >
 | 
	
		
			
				|  |  |        </el-pagination>
 | 
	
		
			
				|  |  |      </el-row>
 | 
	
	
		
			
				|  | @@ -106,38 +109,67 @@ import {
 | 
	
		
			
				|  |  |    undergroundMode,
 | 
	
		
			
				|  |  |  } from "@/utils/MapHelper/MapHelper.js";
 | 
	
		
			
				|  |  |  import lodash from "lodash-es";
 | 
	
		
			
				|  |  | +import { v4 as uuidv4 } from "uuid";
 | 
	
		
			
				|  |  | +import {
 | 
	
		
			
				|  |  | +  listZtBillboardInfoList,
 | 
	
		
			
				|  |  | +  listBillboardModelList,
 | 
	
		
			
				|  |  | +  delZtBillboardInfoList,
 | 
	
		
			
				|  |  | +} from "@/api/zt/ztApi.js";
 | 
	
		
			
				|  |  |  let entityList = [];
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  | +      input3: "",
 | 
	
		
			
				|  |  |        thislayers: [],
 | 
	
		
			
				|  |  | -      projects: window.billboardInfoList,
 | 
	
		
			
				|  |  | -      currentPage4: 1,
 | 
	
		
			
				|  |  | -      total: 20,
 | 
	
		
			
				|  |  | +      // projects: window.billboardInfoList,
 | 
	
		
			
				|  |  | +      projects: [],
 | 
	
		
			
				|  |  |        deltailLayerId: null,
 | 
	
		
			
				|  |  |        checklLayerId: null,
 | 
	
		
			
				|  |  |        addlLayerId: null,
 | 
	
		
			
				|  |  |        // entityList: [],
 | 
	
		
			
				|  |  |        //点查entities事件
 | 
	
		
			
				|  |  |        getEntitiesHandler: null,
 | 
	
		
			
				|  |  | +      selectBillardId: "",
 | 
	
		
			
				|  |  | +      queryParams: {
 | 
	
		
			
				|  |  | +        total: 0,
 | 
	
		
			
				|  |  | +        pageNum: 1,
 | 
	
		
			
				|  |  | +        pageSize: 10,
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    computed: {},
 | 
	
		
			
				|  |  |    mounted() {
 | 
	
		
			
				|  |  |      this.initEntitiesHandler();
 | 
	
		
			
				|  |  |      // this.init();
 | 
	
		
			
				|  |  | -    let that = this;
 | 
	
		
			
				|  |  | -    var promisse11w = scene.open(window.billboardModelLT.url);
 | 
	
		
			
				|  |  | -    Cesium.when(promisse11w, function (layers) {
 | 
	
		
			
				|  |  | -      layers.forEach((element) => {
 | 
	
		
			
				|  |  | -        that.thislayers.push(element.name);
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  | -    });
 | 
	
		
			
				|  |  | -    this.yp();
 | 
	
		
			
				|  |  | +    this.getZtBillboardInfoList();
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | -    handleCurrentChange() {},
 | 
	
		
			
				|  |  | -    handleSizeChange() {},
 | 
	
		
			
				|  |  | +    //页大小触发
 | 
	
		
			
				|  |  | +    handleSizeChange(val) {
 | 
	
		
			
				|  |  | +      this.queryParams.pageSize = val;
 | 
	
		
			
				|  |  | +      this.queryParams.pageNum = 1;
 | 
	
		
			
				|  |  | +      this.getZtBillboardInfoList();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    //跳转页触发
 | 
	
		
			
				|  |  | +    handleCurrentChange(val) {
 | 
	
		
			
				|  |  | +      this.queryParams.pageNum = val;
 | 
	
		
			
				|  |  | +      this.getZtBillboardInfoList();
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     * 获取广告项目信息
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    async getZtBillboardInfoList() {
 | 
	
		
			
				|  |  | +      debugger;
 | 
	
		
			
				|  |  | +      let BenchmarkLandPrices = await listZtBillboardInfoList({
 | 
	
		
			
				|  |  | +        projectname: this.input3,
 | 
	
		
			
				|  |  | +        ...this.queryParams,
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +      this.queryParams.total = BenchmarkLandPrices.total;
 | 
	
		
			
				|  |  | +      this.projects = BenchmarkLandPrices.rows;
 | 
	
		
			
				|  |  | +      // this.BenchmarkLandPriceList = window.BenchmarkLandPriceList;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      // 新增项目
 | 
	
		
			
				|  |  |      addProjectInfo() {
 | 
	
		
			
				|  |  |        if (this.addlLayerId != null) this.$layer.close(this.addlLayerId);
 | 
	
	
		
			
				|  | @@ -153,25 +185,35 @@ export default {
 | 
	
		
			
				|  |  |          maxmin: false,
 | 
	
		
			
				|  |  |          shade: false, //是否显示遮罩
 | 
	
		
			
				|  |  |          shadeClose: false, //点击遮罩是否关闭
 | 
	
		
			
				|  |  | -        cancel: () => {
 | 
	
		
			
				|  |  | +        cancel: async () => {
 | 
	
		
			
				|  |  |            //关闭事件
 | 
	
		
			
				|  |  |            // alert("关闭iframe");
 | 
	
		
			
				|  |  | -          this.projects = window.billboardInfoList;
 | 
	
		
			
				|  |  | +          // this.projects = window.billboardInfoList;
 | 
	
		
			
				|  |  | +          await this.getZtBillboardInfoList();
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      /*
 | 
	
		
			
				|  |  |       *定位
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  | -    locationModel(item) {
 | 
	
		
			
				|  |  | +    async locationModel(item) {
 | 
	
		
			
				|  |  | +      debugger;
 | 
	
		
			
				|  |  | +      this.intoModel(item);
 | 
	
		
			
				|  |  |        this.removeAllentities();
 | 
	
		
			
				|  |  |        //渲染范围
 | 
	
		
			
				|  |  |        // this.DrawProjectScope(item);
 | 
	
		
			
				|  |  |        //渲染单个广告牌
 | 
	
		
			
				|  |  | -      window.billboardModelList.forEach((billboardModel) => {
 | 
	
		
			
				|  |  | -        if (billboardModel.billboardInfoId == item.id) {
 | 
	
		
			
				|  |  | -          this.DrawBillboard(billboardModel);
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +      // window.billboardModelList.forEach((billboardModel) => {
 | 
	
		
			
				|  |  | +      //   if (billboardModel.billboardInfoId == item.id) {
 | 
	
		
			
				|  |  | +      //     this.DrawBillboard(billboardModel);
 | 
	
		
			
				|  |  | +      //   }
 | 
	
		
			
				|  |  | +      // });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      let data = await listBillboardModelList({
 | 
	
		
			
				|  |  | +        billboardInfoId: item.id,
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +      data.rows.forEach((element) => {
 | 
	
		
			
				|  |  | +        this.DrawBillboard(element);
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        window.viewer.flyTo(entityList);
 | 
	
	
		
			
				|  | @@ -182,26 +224,24 @@ export default {
 | 
	
		
			
				|  |  |       * @param Mitem 模型实体
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  |      locationSingleModel(Mitem) {
 | 
	
		
			
				|  |  | -      let entitie = viewer.entities.getById("billboard_" + Mitem.id);
 | 
	
		
			
				|  |  | +      let entitie = viewer.entities.getById("top_billboard_" + Mitem.id);
 | 
	
		
			
				|  |  |        if (entitie) {
 | 
	
		
			
				|  |  |          viewer.flyTo(entitie);
 | 
	
		
			
				|  |  |        } else {
 | 
	
		
			
				|  |  |          //渲染单个广告牌
 | 
	
		
			
				|  |  | -        window.billboardModelList.forEach((billboardModel) => {
 | 
	
		
			
				|  |  | -          if (billboardModel.id == Mitem.id) {
 | 
	
		
			
				|  |  | -            this.DrawBillboard(billboardModel);
 | 
	
		
			
				|  |  | -            let entitie = viewer.entities.getById("billboard_" + Mitem.id);
 | 
	
		
			
				|  |  | -            viewer.flyTo(entitie);
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        });
 | 
	
		
			
				|  |  | +        // if (billboardModel.id == Mitem.id) {
 | 
	
		
			
				|  |  | +        this.DrawBillboard(Mitem);
 | 
	
		
			
				|  |  | +        let entitie = viewer.entities.getById("top_billboard_" + Mitem.id);
 | 
	
		
			
				|  |  | +        viewer.flyTo(entitie);
 | 
	
		
			
				|  |  | +        // }
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       *查看详情
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    billboarddetial(item) {
 | 
	
		
			
				|  |  | -      this.locationModel(item);
 | 
	
		
			
				|  |  | +    async billboarddetial(item) {
 | 
	
		
			
				|  |  | +      await this.locationModel(item);
 | 
	
		
			
				|  |  |        this.$layer.iframe({
 | 
	
		
			
				|  |  |          id: "billboarddetail",
 | 
	
		
			
				|  |  |          content: {
 | 
	
	
		
			
				|  | @@ -226,8 +266,8 @@ export default {
 | 
	
		
			
				|  |  |       *
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    checkModel(item) {
 | 
	
		
			
				|  |  | -      this.locationModel(item);
 | 
	
		
			
				|  |  | +    async checkModel(item) {
 | 
	
		
			
				|  |  | +      await this.locationModel(item);
 | 
	
		
			
				|  |  |        if (this.checklLayerId != null) this.$layer.close(this.checklLayerId);
 | 
	
		
			
				|  |  |        var width = 400;
 | 
	
		
			
				|  |  |        var top = 250;
 | 
	
	
		
			
				|  | @@ -256,6 +296,7 @@ export default {
 | 
	
		
			
				|  |  |       *删除广告牌
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  |      deleteBillard(model) {
 | 
	
		
			
				|  |  | +      debugger;
 | 
	
		
			
				|  |  |        var that = this;
 | 
	
		
			
				|  |  |        //  that.$layer.confirm("确定要删除当前广告吗?", {
 | 
	
		
			
				|  |  |        //     btn: ['确定', '取消']     //按钮
 | 
	
	
		
			
				|  | @@ -275,13 +316,23 @@ export default {
 | 
	
		
			
				|  |  |          cancelButtonText: "取消",
 | 
	
		
			
				|  |  |          type: "warning",
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  | -        .then(() => {
 | 
	
		
			
				|  |  | -          this.$message({
 | 
	
		
			
				|  |  | -            type: "success",
 | 
	
		
			
				|  |  | -            message: "删除成功!",
 | 
	
		
			
				|  |  | -          });
 | 
	
		
			
				|  |  | +        .then(async () => {
 | 
	
		
			
				|  |  | +          debugger;
 | 
	
		
			
				|  |  | +          let result = await delZtBillboardInfoList(model.id);
 | 
	
		
			
				|  |  | +          debugger;
 | 
	
		
			
				|  |  | +          if (result.code == 200) {
 | 
	
		
			
				|  |  | +            that.getZtBillboardInfoList();
 | 
	
		
			
				|  |  | +            viewer.entities.removeAll();
 | 
	
		
			
				|  |  | +            // that.lyoption.cancel();
 | 
	
		
			
				|  |  | +            that.$layer.close(that.layerid);
 | 
	
		
			
				|  |  | +            that.$message({
 | 
	
		
			
				|  |  | +              message: "删除成功",
 | 
	
		
			
				|  |  | +              type: "success",
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |          .catch(() => {
 | 
	
		
			
				|  |  | +          debugger;
 | 
	
		
			
				|  |  |            this.$message({
 | 
	
		
			
				|  |  |              type: "info",
 | 
	
		
			
				|  |  |              message: "已取消删除",
 | 
	
	
		
			
				|  | @@ -292,6 +343,7 @@ export default {
 | 
	
		
			
				|  |  |       * 导入模型(添加广告牌模型)
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  |      importModel(project) {
 | 
	
		
			
				|  |  | +      this.intoModel(project);
 | 
	
		
			
				|  |  |        // this.locationModel(project);
 | 
	
		
			
				|  |  |        if (this.addlLayerId != null) this.$layer.close(this.addlLayerId);
 | 
	
		
			
				|  |  |        var width = 600;
 | 
	
	
		
			
				|  | @@ -343,69 +395,336 @@ export default {
 | 
	
		
			
				|  |  |       * 绘制广告牌
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  |      DrawBillboard(billboardModel) {
 | 
	
		
			
				|  |  | -      if (billboardModel.isAddModel) {
 | 
	
		
			
				|  |  | -        this.removeBillboard(billboardModel);
 | 
	
		
			
				|  |  | -        var modelurl = "../../../../static/ModelData/billboard/box.gltf";
 | 
	
		
			
				|  |  | -        let newposition = Cesium.Cartesian3.fromDegrees(
 | 
	
		
			
				|  |  | -          billboardModel.x,
 | 
	
		
			
				|  |  | -          billboardModel.y,
 | 
	
		
			
				|  |  | -          billboardModel.z
 | 
	
		
			
				|  |  | +      if (billboardModel.template) {
 | 
	
		
			
				|  |  | +        billboardModel.template = JSON.parse(billboardModel.template);
 | 
	
		
			
				|  |  | +      } else {
 | 
	
		
			
				|  |  | +        billboardModel.template = {};
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      if (billboardModel.templateBottom) {
 | 
	
		
			
				|  |  | +        billboardModel.templateBottom = JSON.parse(
 | 
	
		
			
				|  |  | +          billboardModel.templateBottom
 | 
	
		
			
				|  |  |          );
 | 
	
		
			
				|  |  | -        var orientation = Cesium.Transforms.headingPitchRollQuaternion(
 | 
	
		
			
				|  |  | -          newposition,
 | 
	
		
			
				|  |  | -          new Cesium.HeadingPitchRoll(
 | 
	
		
			
				|  |  | -            Cesium.Math.toRadians(billboardModel.rotateX),
 | 
	
		
			
				|  |  | -            Cesium.Math.toRadians(billboardModel.rotateY),
 | 
	
		
			
				|  |  | -            Cesium.Math.toRadians(billboardModel.rotateZ)
 | 
	
		
			
				|  |  | -          )
 | 
	
		
			
				|  |  | +      } else {
 | 
	
		
			
				|  |  | +        billboardModel.templateBottom = {};
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      if (billboardModel.templateCentre) {
 | 
	
		
			
				|  |  | +        billboardModel.templateCentre = JSON.parse(
 | 
	
		
			
				|  |  | +          billboardModel.templateCentre
 | 
	
		
			
				|  |  |          );
 | 
	
		
			
				|  |  | -        var entity = viewer.entities.add({
 | 
	
		
			
				|  |  | -          id: "billboard_" + billboardModel.id,
 | 
	
		
			
				|  |  | -          name: "gltf",
 | 
	
		
			
				|  |  | -          show: true,
 | 
	
		
			
				|  |  | -          position: newposition,
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -          /**
 | 
	
		
			
				|  |  | -           * 长方体
 | 
	
		
			
				|  |  | -           */
 | 
	
		
			
				|  |  | -          box: {
 | 
	
		
			
				|  |  | -            dimensions: new Cesium.Cartesian3(
 | 
	
		
			
				|  |  | -              billboardModel.xL,
 | 
	
		
			
				|  |  | -              billboardModel.zL,
 | 
	
		
			
				|  |  | -              billboardModel.yL
 | 
	
		
			
				|  |  | -            ),
 | 
	
		
			
				|  |  | -            show: true,
 | 
	
		
			
				|  |  | -            material: Cesium.Color.LIGHTGREEN,
 | 
	
		
			
				|  |  | -            // outline: true,
 | 
	
		
			
				|  |  | -            // outlineColor: Cesium.Color.SPRINGGREEN,
 | 
	
		
			
				|  |  | -            // outlineWidth: 1,
 | 
	
		
			
				|  |  | -          },
 | 
	
		
			
				|  |  | -          /**
 | 
	
		
			
				|  |  | -           * 模型
 | 
	
		
			
				|  |  | -           */
 | 
	
		
			
				|  |  | -          // model: {
 | 
	
		
			
				|  |  | -          //   uri: modelurl,
 | 
	
		
			
				|  |  | -          //   scale: billboardModel.xL,
 | 
	
		
			
				|  |  | -          // },
 | 
	
		
			
				|  |  | -          /**
 | 
	
		
			
				|  |  | -           * 广告牌
 | 
	
		
			
				|  |  | -           */
 | 
	
		
			
				|  |  | -          // billboard: {
 | 
	
		
			
				|  |  | -          //     image: imageurl,
 | 
	
		
			
				|  |  | -          //     width: billboardModel.xL,
 | 
	
		
			
				|  |  | -          //     height: billboardModel.zL,
 | 
	
		
			
				|  |  | -          //     rotation: 0,
 | 
	
		
			
				|  |  | -          // },
 | 
	
		
			
				|  |  | -          orientation: orientation,
 | 
	
		
			
				|  |  | -        });
 | 
	
		
			
				|  |  | -        entityList.push(entity);
 | 
	
		
			
				|  |  | +      } else {
 | 
	
		
			
				|  |  | +        billboardModel.templateCentre = {};
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +      if (billboardModel.templateTop) {
 | 
	
		
			
				|  |  | +        billboardModel.templateTop = JSON.parse(billboardModel.templateTop);
 | 
	
		
			
				|  |  | +      } else {
 | 
	
		
			
				|  |  | +        billboardModel.templateTop = {};
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      debugger;
 | 
	
		
			
				|  |  | +      var newposition = Cesium.Cartesian3.fromDegrees(
 | 
	
		
			
				|  |  | +        billboardModel.x,
 | 
	
		
			
				|  |  | +        billboardModel.y,
 | 
	
		
			
				|  |  | +        billboardModel.z
 | 
	
		
			
				|  |  | +      );
 | 
	
		
			
				|  |  | +      var orientation = Cesium.Transforms.headingPitchRollQuaternion(
 | 
	
		
			
				|  |  | +        newposition,
 | 
	
		
			
				|  |  | +        new Cesium.HeadingPitchRoll(
 | 
	
		
			
				|  |  | +          Cesium.Math.toRadians(billboardModel.rotateZ),
 | 
	
		
			
				|  |  | +          Cesium.Math.toRadians(billboardModel.rotateY),
 | 
	
		
			
				|  |  | +          Cesium.Math.toRadians(billboardModel.rotateX)
 | 
	
		
			
				|  |  | +        )
 | 
	
		
			
				|  |  | +      );
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      if (billboardModel.template) {
 | 
	
		
			
				|  |  | +        var imageurl = "../../../../static/ModelData/billboard/1.jpg";
 | 
	
		
			
				|  |  | +        var modelurl = "../../../../static/ModelData/billboard/box.gltf";
 | 
	
		
			
				|  |  | +        switch (billboardModel.template.ModelType) {
 | 
	
		
			
				|  |  | +          //矩形广告
 | 
	
		
			
				|  |  | +          case "rectangleBillboard":
 | 
	
		
			
				|  |  | +            //计算当前实体的xyz
 | 
	
		
			
				|  |  | +            var p = Cesium.Cartesian3.fromDegrees(
 | 
	
		
			
				|  |  | +              billboardModel.templateTop.x,
 | 
	
		
			
				|  |  | +              billboardModel.templateTop.y,
 | 
	
		
			
				|  |  | +              billboardModel.templateTop.z
 | 
	
		
			
				|  |  | +            );
 | 
	
		
			
				|  |  | +            var topentity = viewer.entities.add({
 | 
	
		
			
				|  |  | +              id: "top_billboard_" + billboardModel.id,
 | 
	
		
			
				|  |  | +              name: "gltf",
 | 
	
		
			
				|  |  | +              show: true,
 | 
	
		
			
				|  |  | +              position: p,
 | 
	
		
			
				|  |  | +              /**
 | 
	
		
			
				|  |  | +               * 长方体
 | 
	
		
			
				|  |  | +               */
 | 
	
		
			
				|  |  | +              box: {
 | 
	
		
			
				|  |  | +                dimensions: new Cesium.Cartesian3(
 | 
	
		
			
				|  |  | +                  billboardModel.templateTop.xL,
 | 
	
		
			
				|  |  | +                  billboardModel.templateTop.zL,
 | 
	
		
			
				|  |  | +                  billboardModel.templateTop.yL
 | 
	
		
			
				|  |  | +                ),
 | 
	
		
			
				|  |  | +                show: true,
 | 
	
		
			
				|  |  | +                material: Cesium.Color.LIGHTGREEN,
 | 
	
		
			
				|  |  | +              },
 | 
	
		
			
				|  |  | +              orientation: orientation,
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            entityList.push(topentity);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            break;
 | 
	
		
			
				|  |  | +          // 立杆型广告
 | 
	
		
			
				|  |  | +          case "postsBillboard":
 | 
	
		
			
				|  |  | +            var c_p = Cesium.Cartesian3.fromDegrees(
 | 
	
		
			
				|  |  | +              billboardModel.templateCentre.x,
 | 
	
		
			
				|  |  | +              billboardModel.templateCentre.y,
 | 
	
		
			
				|  |  | +              billboardModel.templateCentre.z
 | 
	
		
			
				|  |  | +            );
 | 
	
		
			
				|  |  | +            var Centreentity = viewer.entities.add({
 | 
	
		
			
				|  |  | +              id: "Centre_billboard_" + billboardModel.id,
 | 
	
		
			
				|  |  | +              name: "gltf",
 | 
	
		
			
				|  |  | +              show: true,
 | 
	
		
			
				|  |  | +              position: c_p,
 | 
	
		
			
				|  |  | +              /**
 | 
	
		
			
				|  |  | +               * 圆柱
 | 
	
		
			
				|  |  | +               */
 | 
	
		
			
				|  |  | +              cylinder: {
 | 
	
		
			
				|  |  | +                length: billboardModel.templateCentre.yL, //圆柱体长度
 | 
	
		
			
				|  |  | +                topRadius: billboardModel.templateCentre.rL, //圆柱顶部半径
 | 
	
		
			
				|  |  | +                bottomRadius: billboardModel.templateCentre.rL, //圆柱体底部半径
 | 
	
		
			
				|  |  | +                material: Cesium.Color.LIGHTGREEN,
 | 
	
		
			
				|  |  | +                shadows: Cesium.ShadowMode.DISABLED, //指定圆柱体是否从每个光源投射或接收阴影
 | 
	
		
			
				|  |  | +              },
 | 
	
		
			
				|  |  | +              orientation: Cesium.Transforms.headingPitchRollQuaternion(
 | 
	
		
			
				|  |  | +                newposition,
 | 
	
		
			
				|  |  | +                new Cesium.HeadingPitchRoll(
 | 
	
		
			
				|  |  | +                  Cesium.Math.toRadians(billboardModel.rotateZ),
 | 
	
		
			
				|  |  | +                  Cesium.Math.toRadians(0),
 | 
	
		
			
				|  |  | +                  Cesium.Math.toRadians(0)
 | 
	
		
			
				|  |  | +                )
 | 
	
		
			
				|  |  | +              ),
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            entityList.push(Centreentity);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            //计算当前实体的xyz
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            var t_p = Cesium.Cartesian3.fromDegrees(
 | 
	
		
			
				|  |  | +              billboardModel.templateTop.x,
 | 
	
		
			
				|  |  | +              billboardModel.templateTop.y,
 | 
	
		
			
				|  |  | +              billboardModel.templateTop.z
 | 
	
		
			
				|  |  | +            );
 | 
	
		
			
				|  |  | +            var topentity = viewer.entities.add({
 | 
	
		
			
				|  |  | +              id: "top_billboard_" + billboardModel.id,
 | 
	
		
			
				|  |  | +              name: "gltf",
 | 
	
		
			
				|  |  | +              show: true,
 | 
	
		
			
				|  |  | +              position: t_p,
 | 
	
		
			
				|  |  | +              /**
 | 
	
		
			
				|  |  | +               * 矩形
 | 
	
		
			
				|  |  | +               */
 | 
	
		
			
				|  |  | +              box: {
 | 
	
		
			
				|  |  | +                dimensions: new Cesium.Cartesian3(
 | 
	
		
			
				|  |  | +                  billboardModel.templateTop.xL,
 | 
	
		
			
				|  |  | +                  billboardModel.templateTop.zL,
 | 
	
		
			
				|  |  | +                  billboardModel.templateTop.yL
 | 
	
		
			
				|  |  | +                ),
 | 
	
		
			
				|  |  | +                material: Cesium.Color.LIGHTGREEN,
 | 
	
		
			
				|  |  | +                // outline: false,
 | 
	
		
			
				|  |  | +                // outlineColor: Cesium.Color.SPRINGGREEN,
 | 
	
		
			
				|  |  | +                // outlineWidth: 1,
 | 
	
		
			
				|  |  | +              },
 | 
	
		
			
				|  |  | +              orientation: orientation,
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            entityList.push(topentity);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            break;
 | 
	
		
			
				|  |  | +          //底座型立杆广告
 | 
	
		
			
				|  |  | +          case "ColumnWithaseBillboard":
 | 
	
		
			
				|  |  | +            var b_p = Cesium.Cartesian3.fromDegrees(
 | 
	
		
			
				|  |  | +              billboardModel.templateBottom.x,
 | 
	
		
			
				|  |  | +              billboardModel.templateBottom.y,
 | 
	
		
			
				|  |  | +              billboardModel.templateBottom.z
 | 
	
		
			
				|  |  | +            );
 | 
	
		
			
				|  |  | +            var bottomentity = viewer.entities.add({
 | 
	
		
			
				|  |  | +              id: "bottom_billboard_" + billboardModel.id,
 | 
	
		
			
				|  |  | +              name: "gltf",
 | 
	
		
			
				|  |  | +              show: true,
 | 
	
		
			
				|  |  | +              position: b_p,
 | 
	
		
			
				|  |  | +              /**
 | 
	
		
			
				|  |  | +               * 矩形
 | 
	
		
			
				|  |  | +               */
 | 
	
		
			
				|  |  | +              box: {
 | 
	
		
			
				|  |  | +                dimensions: new Cesium.Cartesian3(
 | 
	
		
			
				|  |  | +                  billboardModel.templateBottom.xL,
 | 
	
		
			
				|  |  | +                  billboardModel.templateBottom.zL,
 | 
	
		
			
				|  |  | +                  billboardModel.templateBottom.yL
 | 
	
		
			
				|  |  | +                ),
 | 
	
		
			
				|  |  | +                material: Cesium.Color.LIGHTGREEN,
 | 
	
		
			
				|  |  | +                // outline: false,
 | 
	
		
			
				|  |  | +                // outlineColor: Cesium.Color.SPRINGGREEN,
 | 
	
		
			
				|  |  | +                // outlineWidth: 1,
 | 
	
		
			
				|  |  | +              },
 | 
	
		
			
				|  |  | +              orientation: Cesium.Transforms.headingPitchRollQuaternion(
 | 
	
		
			
				|  |  | +                newposition,
 | 
	
		
			
				|  |  | +                new Cesium.HeadingPitchRoll(
 | 
	
		
			
				|  |  | +                  Cesium.Math.toRadians(billboardModel.rotateZ),
 | 
	
		
			
				|  |  | +                  Cesium.Math.toRadians(0),
 | 
	
		
			
				|  |  | +                  Cesium.Math.toRadians(0)
 | 
	
		
			
				|  |  | +                )
 | 
	
		
			
				|  |  | +              ),
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            entityList.push(bottomentity);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            var c_p = Cesium.Cartesian3.fromDegrees(
 | 
	
		
			
				|  |  | +              billboardModel.templateCentre.x,
 | 
	
		
			
				|  |  | +              billboardModel.templateCentre.y,
 | 
	
		
			
				|  |  | +              billboardModel.templateCentre.z
 | 
	
		
			
				|  |  | +            );
 | 
	
		
			
				|  |  | +            var Centreentity = viewer.entities.add({
 | 
	
		
			
				|  |  | +              id: "Centre_billboard_" + billboardModel.id,
 | 
	
		
			
				|  |  | +              name: "gltf",
 | 
	
		
			
				|  |  | +              show: true,
 | 
	
		
			
				|  |  | +              position: c_p,
 | 
	
		
			
				|  |  | +              /**
 | 
	
		
			
				|  |  | +               * 圆柱
 | 
	
		
			
				|  |  | +               */
 | 
	
		
			
				|  |  | +              cylinder: {
 | 
	
		
			
				|  |  | +                length: billboardModel.templateCentre.yL, //圆柱体长度
 | 
	
		
			
				|  |  | +                topRadius: billboardModel.templateCentre.rL, //圆柱顶部半径
 | 
	
		
			
				|  |  | +                bottomRadius: billboardModel.templateCentre.rL, //圆柱体底部半径
 | 
	
		
			
				|  |  | +                material: Cesium.Color.LIGHTGREEN,
 | 
	
		
			
				|  |  | +                shadows: Cesium.ShadowMode.DISABLED, //指定圆柱体是否从每个光源投射或接收阴影
 | 
	
		
			
				|  |  | +              },
 | 
	
		
			
				|  |  | +              orientation: Cesium.Transforms.headingPitchRollQuaternion(
 | 
	
		
			
				|  |  | +                newposition,
 | 
	
		
			
				|  |  | +                new Cesium.HeadingPitchRoll(
 | 
	
		
			
				|  |  | +                  Cesium.Math.toRadians(billboardModel.rotateZ),
 | 
	
		
			
				|  |  | +                  Cesium.Math.toRadians(0),
 | 
	
		
			
				|  |  | +                  Cesium.Math.toRadians(0)
 | 
	
		
			
				|  |  | +                )
 | 
	
		
			
				|  |  | +              ),
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            entityList.push(Centreentity);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            var t_p = Cesium.Cartesian3.fromDegrees(
 | 
	
		
			
				|  |  | +              billboardModel.templateTop.x,
 | 
	
		
			
				|  |  | +              billboardModel.templateTop.y,
 | 
	
		
			
				|  |  | +              billboardModel.templateTop.z
 | 
	
		
			
				|  |  | +            );
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            var topentity = viewer.entities.add({
 | 
	
		
			
				|  |  | +              id: "top_billboard_" + billboardModel.id,
 | 
	
		
			
				|  |  | +              name: "gltf",
 | 
	
		
			
				|  |  | +              show: true,
 | 
	
		
			
				|  |  | +              position: t_p,
 | 
	
		
			
				|  |  | +              /**
 | 
	
		
			
				|  |  | +               * 矩形
 | 
	
		
			
				|  |  | +               */
 | 
	
		
			
				|  |  | +              box: {
 | 
	
		
			
				|  |  | +                dimensions: new Cesium.Cartesian3(
 | 
	
		
			
				|  |  | +                  billboardModel.templateTop.xL,
 | 
	
		
			
				|  |  | +                  billboardModel.templateTop.zL,
 | 
	
		
			
				|  |  | +                  billboardModel.templateTop.yL
 | 
	
		
			
				|  |  | +                ),
 | 
	
		
			
				|  |  | +                material: Cesium.Color.LIGHTGREEN,
 | 
	
		
			
				|  |  | +                // outline: false,
 | 
	
		
			
				|  |  | +                // outlineColor: Cesium.Color.SPRINGGREEN,
 | 
	
		
			
				|  |  | +                // outlineWidth: 1,
 | 
	
		
			
				|  |  | +              },
 | 
	
		
			
				|  |  | +              orientation: orientation,
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            entityList.push(topentity);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            break;
 | 
	
		
			
				|  |  | +          //实物型广告(模型型)
 | 
	
		
			
				|  |  | +          case "ModelBillboard":
 | 
	
		
			
				|  |  | +            var p = Cesium.Cartesian3.fromDegrees(
 | 
	
		
			
				|  |  | +              billboardModel.templateTop.x,
 | 
	
		
			
				|  |  | +              billboardModel.templateTop.y,
 | 
	
		
			
				|  |  | +              billboardModel.templateTop.z
 | 
	
		
			
				|  |  | +            );
 | 
	
		
			
				|  |  | +            var url = billboardModel.template.templateTopUrl || modelurl;
 | 
	
		
			
				|  |  | +            var entity = viewer.entities.add({
 | 
	
		
			
				|  |  | +              id: "top_billboard_" + billboardModel.id,
 | 
	
		
			
				|  |  | +              name: "gltf",
 | 
	
		
			
				|  |  | +              show: true,
 | 
	
		
			
				|  |  | +              position: p,
 | 
	
		
			
				|  |  | +              /**
 | 
	
		
			
				|  |  | +               * 模型
 | 
	
		
			
				|  |  | +               */
 | 
	
		
			
				|  |  | +              model: {
 | 
	
		
			
				|  |  | +                uri: url,
 | 
	
		
			
				|  |  | +                scale: billboardModel.templateTop.scaleL,
 | 
	
		
			
				|  |  | +              },
 | 
	
		
			
				|  |  | +              orientation: orientation,
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            entityList.push(entity);
 | 
	
		
			
				|  |  | +            break;
 | 
	
		
			
				|  |  | +          //图片型广告
 | 
	
		
			
				|  |  | +          case "imgBillboard":
 | 
	
		
			
				|  |  | +            var p = Cesium.Cartesian3.fromDegrees(
 | 
	
		
			
				|  |  | +              billboardModel.templateTop.x,
 | 
	
		
			
				|  |  | +              billboardModel.templateTop.y,
 | 
	
		
			
				|  |  | +              billboardModel.templateTop.z
 | 
	
		
			
				|  |  | +            );
 | 
	
		
			
				|  |  | +            var url = billboardModel.template.templateTopUrl || imageurl;
 | 
	
		
			
				|  |  | +            var entity = viewer.entities.add({
 | 
	
		
			
				|  |  | +              id: "top_billboard_" + billboardModel.id,
 | 
	
		
			
				|  |  | +              name: "gltf",
 | 
	
		
			
				|  |  | +              show: true,
 | 
	
		
			
				|  |  | +              position: p,
 | 
	
		
			
				|  |  | +              /**
 | 
	
		
			
				|  |  | +               * 广告牌
 | 
	
		
			
				|  |  | +               */
 | 
	
		
			
				|  |  | +              billboard: {
 | 
	
		
			
				|  |  | +                image: url,
 | 
	
		
			
				|  |  | +                width: billboardModel.templateTop.xL,
 | 
	
		
			
				|  |  | +                height: billboardModel.templateTop.yL,
 | 
	
		
			
				|  |  | +                rotation: billboardModel.rotateX,
 | 
	
		
			
				|  |  | +                sizeInMeters: true,
 | 
	
		
			
				|  |  | +              },
 | 
	
		
			
				|  |  | +              orientation: orientation,
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            entityList.push(entity);
 | 
	
		
			
				|  |  | +            break;
 | 
	
		
			
				|  |  | +          default:
 | 
	
		
			
				|  |  | +            //计算当前实体的xyz
 | 
	
		
			
				|  |  | +            var p = Cesium.Cartesian3.fromDegrees(
 | 
	
		
			
				|  |  | +              billboardModel.templateTop.x,
 | 
	
		
			
				|  |  | +              billboardModel.templateTop.y,
 | 
	
		
			
				|  |  | +              billboardModel.templateTop.z
 | 
	
		
			
				|  |  | +            );
 | 
	
		
			
				|  |  | +            var topentity = viewer.entities.add({
 | 
	
		
			
				|  |  | +              id: "top_billboard_" + billboardModel.id,
 | 
	
		
			
				|  |  | +              name: "gltf",
 | 
	
		
			
				|  |  | +              show: true,
 | 
	
		
			
				|  |  | +              position: p,
 | 
	
		
			
				|  |  | +              /**
 | 
	
		
			
				|  |  | +               * 长方体
 | 
	
		
			
				|  |  | +               */
 | 
	
		
			
				|  |  | +              box: {
 | 
	
		
			
				|  |  | +                dimensions: new Cesium.Cartesian3(
 | 
	
		
			
				|  |  | +                  billboardModel.templateTop.xL,
 | 
	
		
			
				|  |  | +                  billboardModel.templateTop.zL,
 | 
	
		
			
				|  |  | +                  billboardModel.templateTop.yL
 | 
	
		
			
				|  |  | +                ),
 | 
	
		
			
				|  |  | +                show: true,
 | 
	
		
			
				|  |  | +                material: Cesium.Color.LIGHTGREEN,
 | 
	
		
			
				|  |  | +              },
 | 
	
		
			
				|  |  | +              orientation: orientation,
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            entityList.push(topentity);
 | 
	
		
			
				|  |  | +            break;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        var h = 0;
 | 
	
		
			
				|  |  | +        if (billboardModel.templateTop.yL) {
 | 
	
		
			
				|  |  | +          h = billboardModel.templateTop.yL / 2;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          const point = viewer.entities.add({
 | 
	
		
			
				|  |  |            id: "pointBillboard_" + billboardModel.id,
 | 
	
		
			
				|  |  |            //点
 | 
	
		
			
				|  |  |            position: Cesium.Cartesian3.fromDegrees(
 | 
	
		
			
				|  |  | -            billboardModel.x,
 | 
	
		
			
				|  |  | -            billboardModel.y,
 | 
	
		
			
				|  |  | -            billboardModel.z + billboardModel.yL / 2
 | 
	
		
			
				|  |  | +            billboardModel.templateTop.x,
 | 
	
		
			
				|  |  | +            billboardModel.templateTop.y,
 | 
	
		
			
				|  |  | +            billboardModel.templateTop.z + h
 | 
	
		
			
				|  |  |            ),
 | 
	
		
			
				|  |  |            label: {
 | 
	
		
			
				|  |  |              text: billboardModel.billboardName, //描述内容
 | 
	
	
		
			
				|  | @@ -430,6 +749,94 @@ export default {
 | 
	
		
			
				|  |  |            },
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      // if (billboardModel.isAddModel) {
 | 
	
		
			
				|  |  | +      //   this.removeBillboard(billboardModel);
 | 
	
		
			
				|  |  | +      //   var modelurl = "../../../../static/ModelData/billboard/box.gltf";
 | 
	
		
			
				|  |  | +      //   let newposition = Cesium.Cartesian3.fromDegrees(
 | 
	
		
			
				|  |  | +      //     billboardModel.x,
 | 
	
		
			
				|  |  | +      //     billboardModel.y,
 | 
	
		
			
				|  |  | +      //     billboardModel.z
 | 
	
		
			
				|  |  | +      //   );
 | 
	
		
			
				|  |  | +      //   var orientation = Cesium.Transforms.headingPitchRollQuaternion(
 | 
	
		
			
				|  |  | +      //     newposition,
 | 
	
		
			
				|  |  | +      //     new Cesium.HeadingPitchRoll(
 | 
	
		
			
				|  |  | +      //       Cesium.Math.toRadians(billboardModel.rotateX),
 | 
	
		
			
				|  |  | +      //       Cesium.Math.toRadians(billboardModel.rotateY),
 | 
	
		
			
				|  |  | +      //       Cesium.Math.toRadians(billboardModel.rotateZ)
 | 
	
		
			
				|  |  | +      //     )
 | 
	
		
			
				|  |  | +      //   );
 | 
	
		
			
				|  |  | +      //   var entity = viewer.entities.add({
 | 
	
		
			
				|  |  | +      //     id: "billboard_" + billboardModel.id,
 | 
	
		
			
				|  |  | +      //     name: "gltf",
 | 
	
		
			
				|  |  | +      //     show: true,
 | 
	
		
			
				|  |  | +      //     position: newposition,
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      //     /**
 | 
	
		
			
				|  |  | +      //      * 长方体
 | 
	
		
			
				|  |  | +      //      */
 | 
	
		
			
				|  |  | +      //     box: {
 | 
	
		
			
				|  |  | +      //       dimensions: new Cesium.Cartesian3(
 | 
	
		
			
				|  |  | +      //         billboardModel.xL,
 | 
	
		
			
				|  |  | +      //         billboardModel.zL,
 | 
	
		
			
				|  |  | +      //         billboardModel.yL
 | 
	
		
			
				|  |  | +      //       ),
 | 
	
		
			
				|  |  | +      //       show: true,
 | 
	
		
			
				|  |  | +      //       material: Cesium.Color.LIGHTGREEN,
 | 
	
		
			
				|  |  | +      //       // outline: true,
 | 
	
		
			
				|  |  | +      //       // outlineColor: Cesium.Color.SPRINGGREEN,
 | 
	
		
			
				|  |  | +      //       // outlineWidth: 1,
 | 
	
		
			
				|  |  | +      //     },
 | 
	
		
			
				|  |  | +      //     /**
 | 
	
		
			
				|  |  | +      //      * 模型
 | 
	
		
			
				|  |  | +      //      */
 | 
	
		
			
				|  |  | +      //     // model: {
 | 
	
		
			
				|  |  | +      //     //   uri: modelurl,
 | 
	
		
			
				|  |  | +      //     //   scale: billboardModel.xL,
 | 
	
		
			
				|  |  | +      //     // },
 | 
	
		
			
				|  |  | +      //     /**
 | 
	
		
			
				|  |  | +      //      * 广告牌
 | 
	
		
			
				|  |  | +      //      */
 | 
	
		
			
				|  |  | +      //     // billboard: {
 | 
	
		
			
				|  |  | +      //     //     image: imageurl,
 | 
	
		
			
				|  |  | +      //     //     width: billboardModel.xL,
 | 
	
		
			
				|  |  | +      //     //     height: billboardModel.zL,
 | 
	
		
			
				|  |  | +      //     //     rotation: 0,
 | 
	
		
			
				|  |  | +      //     // },
 | 
	
		
			
				|  |  | +      //     orientation: orientation,
 | 
	
		
			
				|  |  | +      //   });
 | 
	
		
			
				|  |  | +      //   entityList.push(entity);
 | 
	
		
			
				|  |  | +      //   const point = viewer.entities.add({
 | 
	
		
			
				|  |  | +      //     id: "pointBillboard_" + billboardModel.id,
 | 
	
		
			
				|  |  | +      //     //点
 | 
	
		
			
				|  |  | +      //     position: Cesium.Cartesian3.fromDegrees(
 | 
	
		
			
				|  |  | +      //       billboardModel.x,
 | 
	
		
			
				|  |  | +      //       billboardModel.y,
 | 
	
		
			
				|  |  | +      //       billboardModel.z + billboardModel.yL / 2
 | 
	
		
			
				|  |  | +      //     ),
 | 
	
		
			
				|  |  | +      //     label: {
 | 
	
		
			
				|  |  | +      //       text: billboardModel.billboardName, //描述内容
 | 
	
		
			
				|  |  | +      //       font: "20px Sans-Serif", //字体大小 类型
 | 
	
		
			
				|  |  | +      //       fillColor: Cesium.Color.RED, //颜色
 | 
	
		
			
				|  |  | +      //       outlineColor: Cesium.Color.GOLD,
 | 
	
		
			
				|  |  | +      //       style: Cesium.LabelStyle.CENTER_LABEL,
 | 
	
		
			
				|  |  | +      //       // 垂直位置
 | 
	
		
			
				|  |  | +      //       verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
 | 
	
		
			
				|  |  | +      //       // 中心位置
 | 
	
		
			
				|  |  | +      //       pixelOffset: new Cesium.Cartesian2(0, -10),
 | 
	
		
			
				|  |  | +      //       //设置背景颜色透明
 | 
	
		
			
				|  |  | +      //       backgroundColor: new Cesium.Color(0.0, 0.0, 0.0, 0.0),
 | 
	
		
			
				|  |  | +      //       //打开背景  打开背景 (不会被线段覆盖)
 | 
	
		
			
				|  |  | +      //       showBackground: true,
 | 
	
		
			
				|  |  | +      //       // heightReference: Cesium.HeightReference.RELATIVE_TO_GROUND,
 | 
	
		
			
				|  |  | +      //       distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
 | 
	
		
			
				|  |  | +      //         0.0,
 | 
	
		
			
				|  |  | +      //         300.0
 | 
	
		
			
				|  |  | +      //       ),
 | 
	
		
			
				|  |  | +      //       heightReference: Cesium.HeightReference.NONE,
 | 
	
		
			
				|  |  | +      //     },
 | 
	
		
			
				|  |  | +      //   });
 | 
	
		
			
				|  |  | +      // }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      initEntitiesHandler() {
 | 
	
	
		
			
				|  | @@ -439,9 +846,10 @@ export default {
 | 
	
		
			
				|  |  |        );
 | 
	
		
			
				|  |  |        this.getEntitiesHandler.setInputAction(function (click) {
 | 
	
		
			
				|  |  |          var pick = viewer.scene.pick(click.position);
 | 
	
		
			
				|  |  | +        debugger;
 | 
	
		
			
				|  |  |          //广告牌信息弹窗
 | 
	
		
			
				|  |  | -        if (pick && pick.id.id && pick.id.id.indexOf("billboard") !== -1) {
 | 
	
		
			
				|  |  | -          let id = pick.id.id.split("billboard_")[1];
 | 
	
		
			
				|  |  | +        if (pick && pick.id.id && pick.id.id.indexOf("_") !== -1) {
 | 
	
		
			
				|  |  | +          let id = pick.id.id.split("_")[2];
 | 
	
		
			
				|  |  |            let info = window.billboardModelList.find((c) => c.id == id);
 | 
	
		
			
				|  |  |            that.openOBJInfo("广告牌信息详情", info);
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -503,12 +911,35 @@ export default {
 | 
	
		
			
				|  |  |        viewer.entities.removeAll();
 | 
	
		
			
				|  |  |        entityList = [];
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     * 加载报建模型
 | 
	
		
			
				|  |  | +     * @param info
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    intoModel(info) {
 | 
	
		
			
				|  |  | +      if (info.url && this.selectBillardId != info.id) {
 | 
	
		
			
				|  |  | +        this.selectBillardId = info.id;
 | 
	
		
			
				|  |  | +        try {
 | 
	
		
			
				|  |  | +          var promisse11w = scene.open(info.url);
 | 
	
		
			
				|  |  | +          Cesium.when(promisse11w, function (layers) {
 | 
	
		
			
				|  |  | +            layers.forEach((element) => {
 | 
	
		
			
				|  |  | +              that.thislayers.push(element.name);
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +          this.yp(info);
 | 
	
		
			
				|  |  | +        } catch (error) {
 | 
	
		
			
				|  |  | +          console.log(error);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 压平
 | 
	
		
			
				|  |  |       * @param Minfos 模型信息
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  | -    async yp() {
 | 
	
		
			
				|  |  | -      const Minfo = window.billboardModelLT;
 | 
	
		
			
				|  |  | +    async yp(info) {
 | 
	
		
			
				|  |  | +      this.qxyp();
 | 
	
		
			
				|  |  | +      const Minfo = info;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        //获取模型信息
 | 
	
		
			
				|  |  |        let queryBySQLParameters = {
 | 
	
	
		
			
				|  | @@ -546,6 +977,11 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    beforeDestroy() {
 | 
	
		
			
				|  |  | +    if (this.getEntitiesHandler) {
 | 
	
		
			
				|  |  | +      this.getEntitiesHandler.removeInputAction(
 | 
	
		
			
				|  |  | +        Cesium.ScreenSpaceEventType.LEFT_CLICK
 | 
	
		
			
				|  |  | +      );
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |      this.qxyp();
 | 
	
		
			
				|  |  |      this.removeAllentities();
 | 
	
		
			
				|  |  |      debugger;
 |