<template>
    <hc-new-dialog v-model="isShow" widths="666px" title="项目报表初始化" @save="modalSave">
        <el-checkbox-group v-model="checkList" class="w-full p-4">
            <el-checkbox label="中间计量申请" />
            <el-checkbox label="开工预付款" />
            <el-checkbox label="材料预付款" />
        </el-checkbox-group>
    </hc-new-dialog>
</template>

<script setup>
import { ref, watch } from 'vue'

const props = defineProps({
    ids: {
        type: [String, Number],
        default: '',
    },
})

//事件
const emit = defineEmits(['finish', 'close'])

//双向绑定
// eslint-disable-next-line no-undef
const isShow = defineModel('modelValue', {
    default: false,
})

//监听
watch(() => [
    props.ids,
], ([ids]) => {
    console.log('ids', ids)
}, { immediate: true })

//监听
watch(isShow, (val) => {
    if (val) {
        console.log('处理数据')
    }
})

const checkList = ref([])

const modalSave = () => {
    emit('finish')
}
</script>
