Newer
Older
Nanping_sponge_JXKH / src / views / home / rationality / components / list.vue
@liyingjing liyingjing on 25 Oct 1 KB 海绵绩效考个
<template>
  <div class="list">
    <el-card class="box-card" shadow="never" style="margin-bottom: 10px">
      <template #header>
        <div class="card-header">
          <span class="title">建设工程下垫面</span>
        </div>
      </template>
      <underlySurfaceTable :list="underlySurfaceTableList"/>
    </el-card>
    <el-card class="box-card" shadow="never" style="margin-bottom: 10px">
      <template #header>
        <div class="card-header">
          <span class="title">建设工程设施</span>
        </div>
      </template>
      <facilityTable
        class="facilityTable"
        v-for="item in facilityList"
        :name="item.name"
        :list="item.list"
      />
    </el-card>
    <el-card class="box-card" shadow="never" v-if="props.index > 0">
      <template #header>
        <div class="card-header">
          <span class="title">分区高程</span>
        </div>
      </template>
      <elevation :data="elevationData"/>
    </el-card>
  </div>
</template>

<script setup>
import { computed } from 'vue'
import underlySurfaceTable from './underlySurfaceTable.vue'
import facilityTable from './facilityTable.vue'
import elevation from './elevation.vue'
const props = defineProps({
  data: {
    type: Object,
    default: () => {}
  },
  index: {
    type: [Number, String],
    default: 0
  }
})
const underlySurfaceTableList = computed(() => {
  return props?.data?.underlySurface?.list || []
})

const facilityList = computed(() => {
  return props?.data?.facility?.list || []
})

const elevationData = computed(() => {
  return props?.data?.elevation || {}
})
</script>

<style lang="scss" scoped>
.facilityTable {
  margin-bottom: 10px;
  &:last-of-type {
    margin-bottom: 0;
  }
}
.title {
  font-weight: 700;
  font-size: 16px;
  }
</style>