Newer
Older
Nanping_sponge_HHDP / src / views / Sponge_screen / DialogTabs / component / GongChenKaoHe.vue
@liyingjing liyingjing on 25 Oct 2023 1 KB 海绵大屏
<template>
  <div class="GongChenKaoHe">
    <el-table
      :data="tableData"
      border
      style="width: 100%"
    >
      <el-table-column type='index' label="序号" width="180" />
      <el-table-column label="改造前" width="180" />
      <el-table-column prop="remouldBefore" label="建设目标" />
      <el-table-column prop="remouldBeforeAfter" label="改造后" />
      <el-table-column label="专家评估" />
      <el-table-column label="改造对比">
        <template #default={row}>
           <el-button link type='primary' @click='ChwckBox(row)'>查看</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script setup name="GongChenKaoHe">
import { ref, onMounted, inject } from 'vue'
import { getSelectProjectEngineeringAssessment } from  '@/api/gcpjApi'
const emit = defineEmits(['update-tabs-type'])
const getProjectInfo = inject('getProjectInfo')
const projectInfo = getProjectInfo()
const tableData= ref([])
// const dialogConfig = reactive({
//   visible: false,
//   data: {},
//   title: "改造对比"
// })
function ChwckBox(v){
  console.log(v)
  emit('update-tabs-type', 'jsdb')
  // dialogConfig.visible = true
  // dialogConfig.data = v
}

const getData = async () => {
  if(!projectInfo?.projectNo) return
  const res = await getSelectProjectEngineeringAssessment(projectInfo.projectNo)
  if(res?.code !== 200) return
  tableData.value = res.data || []
}

onMounted(() => {
  getData()
})
</script>

<style lang="scss" scoped></style>