<template>
    <div class="app-container">

        <el-table v-loading="loading" :data="checksubjectList">
            <el-table-column :label="tLang('pms','项目名称')" align="center" prop="subjectCode" width="200px">
            </el-table-column>
            <el-table-column :label="tLang('pms','项目编码')" align="center" prop="subjectCode"></el-table-column>
            <el-table-column :label="tLang('pms','项目类型')" align="center" prop="subjectType" >
                <template #default="scope">
                    <dict-tag :options="pms_dvsubject_type" :value="scope.row.subjectType" />
                </template>
            </el-table-column>
            <el-table-column :label="tLang('pms','项目内容')" align="center" prop="subjectContent"
                :show-overflow-tooltip="true" />
            <el-table-column :label="tLang('pms','标准')" align="center" prop="subjectStandard"
                :show-overflow-tooltip="true" />
        </el-table>
    </div>
</template>

<script setup>
import { getCurrentInstance } from 'vue';
const prop = defineProps({
    checksubjectList: {
        type: Array,
        default: () => []
    }
});
const { proxy } = getCurrentInstance();
const { sys_yes_no, pms_dvsubject_type } = proxy.useDict("sys_yes_no", "pms_dvsubject_type");
// 遮罩层
let loading = ref(false);
const emit = defineEmits();











/** 新增按钮操作 */
function handleAdd() {
    let list = prop.checksubjectList || [];
    list.push({
        subjectCode: "",
        subjectName: "",
        subjectType: "",
        subjectContent: "",
        subjectStandard: "",
    });
    emit("update:checksubjectList", list);
}


/** 删除按钮操作 */
function handleDelete(i) {

    let list = prop.checksubjectList || [];
    let length = list.length;
    list.splice(i, 1);
    emit("update:checksubjectList", list);
}

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

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