<!--
 * @Descripttion: 
 * @version: 
 * @Author: ysh
 * @Date: 2022-11-22 11:41:47
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2024-06-28 16:04:26
-->
<template>
  <div id="popup" class="ol-popup">
    <span id="popup-closer" class="ol-popup-closer" @click="$emit('closePopup')"></span>
    <div id="popup-content">
      <el-descriptions :column="1" border v-if="datas.type == 'projectPoint'">
        <el-descriptions-item label="项目编号" width="130px">
          {{ datas.projectNumber }}
        </el-descriptions-item>
        <el-descriptions-item label="项目名称" width="130px">
          {{ datas.projectName }}
        </el-descriptions-item>
        <el-descriptions-item label="项目负责人" width="130px">
          {{ datas.projectLeader }}
        </el-descriptions-item>
        <el-descriptions-item label="存放地址" width="130px">
          {{ datas.storageAddress == '' || datas.storageAddress == null ? '暂无' :
      datas.storageAddress }}
        </el-descriptions-item>
      </el-descriptions>

      <div v-if="datas.type == 'featurePoint'">
        <div class="title">项目编号:{{ datas.projectNumber }}</div>
        <el-descriptions :column="1" border>
          <el-descriptions-item label="名称" width="130px">
            {{ datas.selectFeatures.values_.name }}
          </el-descriptions-item>
        </el-descriptions>
      </div>
    </div>
    <div class="look-achi" @click="$emit('open')" v-if="datas.type == 'projectPoint'">成果目录>></div>
  </div>
</template>

<script>


export default {
  props: {
    datas: {
      type: Object,
      required: true
    },
  },
  data() {
    return {
    };
  },
  watch: {
    'datas.type'(val){
      console.log(val);
    }
  },
  mounted() {
    console.log(this.datas);
  },
  methods: {},
}

</script>

<style lang="scss" scoped>
// 弹出框
.ol-popup {
  position: absolute;
  background-color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  padding: 22px;
  border-radius: 10px;
  // border: 1px solid #cccccc;
  bottom: 17px;
  left: -129px;
  min-width: 280px;
  width: 200px;

  .ol-popup-closer {
    text-decoration: none;
    position: absolute;
    top: 2px;
    right: 8px;
  }

  .ol-popup-closer:after {
    content: "✖";
    cursor: pointer;
  }

  .ol-popup-closer:hover:after {
    color: #409EFF;
  }
}


.ol-popup:after,
.ol-popup:before {
  top: 100%;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
}

.ol-popup:after {
  border-top-color: #fff;
  border-width: 10px;
  left: 50%;
  transform: translate(-50%, 0);
  margin-left: -10px;
}

.ol-popup:before {
  border-top-color: #fff;
  border-width: 11px;
  left: 50%;
  transform: translate(-50%, 0);
  margin-left: -11px;
}

.look-achi {
  text-align: right;
  color: #409EFF;
  cursor: pointer;
  font-size: 14px;
  margin-top: 10px;
  font-family: '微软雅黑';
}

.title {
  font-size: 14px;
  font-family: 'Times New Roman', '黑体', Times, serif, ;
}
</style>