<template>
    <HcTable ui="no-border" border :column="tableColumn" :datas="tableData" :loading="tableLoading">
        <template #key3="{row}">
            <span class="text-blue text-hover" @click="opinionClick(row)">{{row.key3}}</span>
        </template>
    </HcTable>
</template>

<script setup>
import {ref, onMounted} from "vue";
import {getArrValue} from "js-fast-way"
import {delMessage} from "~uti/tools";

//参数
const props = defineProps({
    projectId: {
        type: [String,Number],
        default: ''
    },
    contractId: {
        type: [String,Number],
        default: ''
    }
})

//变量
const projectId = ref(props.projectId);
const contractId = ref(props.contractId);

//渲染完成
onMounted(() => {

})

//表格数据
const tableColumn = ref([
    {key:'key1', name: '专家', width: 80},
    {key:'key2', name: '抽检所属', width: 100},
    {key:'key3', name: '抽检意见'}
])
const tableData = ref([
    {
        id: 1,
        key1: '张三',
        key2: '施工',
        key3: '这是专家抽检意见XXXXX'
    },
    {
        id: 2,
        key1: '张三',
        key2: '业主',
        key3: '这是专家抽检意见XXXXX'
    },
    {
        id: 3,
        key1: '李四',
        key2: '业主',
        key3: '这是专家抽检意见XXXXX'
    }
])

const tableLoading = ref(false)

//编辑
const editClick = (row) => {
    row.isEdit = true
}
//保存
const saveClick = (row) => {
    row.isEdit = false
}
//删除
const delClick = (row) => {
    delMessage(() => {

    })
}

//事件
const emit = defineEmits(['opinionTap'])

//查看意见
const opinionClick = (row) => {
    emit('opinionTap', row)
}
</script>

<style lang="scss" scoped>

</style>
