<template>
  <div class="ZTGlobal" style="height: 100%; width: 100%; padding: 5px">
    <el-row>
      <el-col span="24">
        <el-descriptions
          :title="'项目名称：' + info.projectInfo.projectname"
          :column="1"
        >
          <el-descriptions-item label="项目地址">{{
            info.projectInfo.address
          }}</el-descriptions-item>
          <el-descriptions-item label="设计单位">{{
            info.projectInfo.design
          }}</el-descriptions-item>
          <el-descriptions-item label="申报日期">{{
            info.projectInfo.checkDate
          }}</el-descriptions-item>
          <el-descriptions-item label="简介">
            {{ info.projectInfo.description }}
          </el-descriptions-item>
        </el-descriptions>
      </el-col>
    </el-row>
    <el-row>
      <el-col span="24">
        <el-table :data="billboardModelList" style="width: 100%">
          <el-table-column prop="billboardName" label="模型名称">
          </el-table-column>
          <el-table-column prop="billboardType" label="模型类型">
          </el-table-column>
        </el-table>
      </el-col>
    </el-row>
  </div>
</template>
<script>
import {
  cartesian3ToWGS84,
  mapQuery,
  flatten,
  mercator2lonLat,
  undergroundMode,
} from "@/utils/MapHelper/MapHelper.js";
import { listBillboardModelList } from "@/api/zt/ztApi.js";
export default {
  data() {
    return {
      billboardModelList: [],
    };
  },
  props: {
    info: {
      type: Object,
      default: () => {
        return {};
      },
    },
    layerid: {
      type: String,
      default: "",
    },
    lydata: {
      type: Object,
      default: () => {
        return {};
      },
    },
    lyoption: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  mounted() {
    this.init();
  },
  methods: {
    async init() {
      let that = this;
      debugger;
      // if (that.info.projectInfo.dataurl) {
      //   let queryBySQLParameters = {
      //     getFeatureMode: "SQL",
      //     datasetNames: [that.info.projectInfo.datasourcename + ":" + "GGP"],
      //     queryParameter: {
      //       attributeFilter: "1=1",
      //     },
      //     hasGeometry: "true",
      //   };
      //   let e = await mapQuery(
      //     that.info.projectInfo.dataurl +
      //       "/featureResults.json?returnContent=true",
      //     queryBySQLParameters
      //   );
      //   if (e && e.totalCount > 0) {
      //     e.features.forEach((feature) => {
      //       let featureData = {
      //         id: uuidv4(),
      //         data: [],
      //         geometry: feature.geometry,
      //       };

      //       feature.fieldNames.forEach((fieldName, i) => {
      //         let Field = e.datasetInfos
      //           ? e.datasetInfos[0].fieldInfos.find(
      //               (c) =>
      //                 c.name &&
      //                 c.name.toUpperCase() == fieldName.toUpperCase() &&
      //                 c.name.toUpperCase().indexOf("SM") == -1
      //             )
      //           : null;
      //         if (Field) {
      //           featureData.data.push({
      //             label: fieldName,
      //             labelCN: Field ? Field.caption : fieldName,
      //             value: feature.fieldValues[i],
      //           });
      //         }
      //       });
      //       featureDataList.push(featureData);
      //     });
      //     debugger;
      //     this.billboardModelList = [];
      //   } else {
      //     this.billboardModelList = [];
      //   }
      // } else {
      let data = await listBillboardModelList({
        billboardInfoId: that.info.projectInfo.id,
      });
      debugger;
      this.billboardModelList = data.rows;
      // }

      // this.billboardModelList = window.billboardModelList.filter(
      //   (c) => c.billboardInfoId == that.info.projectInfo.id
      // );
    },
  },
};
</script>
<style lang="scss">
@import "@/../../zt.scss";
</style>
<style scoped></style>
