<script setup>
import router from "@/router";

const props = defineProps({
  list: {
    type: Array,
    required: true,
    default: () => []
  }
})


const handleTo = (item) => {
  const { bddMc, bddDz, wd, jd, fgdwMc, fgdwId } = item
  router.push({ path: "/collectAndAdd", query: { item: JSON.stringify({ bddMc, bddDz, wd, jd, fgdwId, mc: fgdwMc }) } });
}
</script>

<template>
  <div class="item-wrapper">
    <template v-for="(item, index) in list" :key="index">
      <div class="item" @click="handleTo(item)">
        <div class="title">{{ item.bddMc }}</div>
        <div class="infoWrapper">
<!--          <div class="mt">所属部门：{{ item.sssgaj }}</div>-->
          <div class="mt">所属方格：{{ item?.fgdwMc }}</div>
          <div class="mt">地址：{{ item.bddDz }}</div>
        </div>
      </div>
    </template>
  </div>
</template>

<style scoped lang="scss">
.item-wrapper {
  margin: 2vw;

  .item {
    padding: 2vw;
    border-top: 0.13333vw solid #f4f5f1;

    .title {
      font-size: 14px;
    }

    .mt {
      margin-top: 2vw;
    }

    .infoWrapper {
      font-size: 12px;
      color: #999999;

    }
  }
}
</style>
