<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 getProjectInfo = sessionStorage.getItem('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 (p) => { if(!p) return const res = await getSelectProjectEngineeringAssessment(p) if(res?.code !== 200) return tableData.value = res.data || [] } onMounted(() => { getData(getProjectInfo) }) </script> <style lang="scss" scoped></style>