<template>
    <div class="hc-project-list-adjust-excel-set-formula">
        <el-form ref="formRef" :model="formModel" :rules="formRules" label-position="left" label-width="auto">
            <el-form-item label="不知道是什么：" prop="key1">
                <el-select v-model="formModel.key1" filterable block placeholder="请选择">
                    <el-option label="功能还没开发" :value="1" />
                    <el-option label="不清楚是什么" :value="2" />
                </el-select>
            </el-form-item>
            <el-form-item label="不知道是什么：" prop="key2">
                <el-input v-model="formModel.key2" placeholder="不知道是什么" />
            </el-form-item>
            <el-form-item label="默认开放：" prop="key3">
                <el-switch v-model="formModel.key3" />
            </el-form-item>
            <el-form-item label="VIP开放：" prop="key4">
                <el-switch v-model="formModel.key4" />
            </el-form-item>
        </el-form>
        <div class="action-btn-box mt-10px text-center">
            <el-button type="primary" :loading="submitLoading" @click="dialogSubmit">保存设置</el-button>
        </div>
    </div>
</template>

<script setup>
import { onMounted, ref, watch } from 'vue'
import { getObjValue } from 'js-fast-way'
//import mainApi from '~api/project/tree'

const props = defineProps({
    info: {
        type: Object,
        default: () => ({}),
    },
})

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

//监听数据
const dataInfo = ref(props.info)
watch(() => props.info, (data) => {
    dataInfo.value = getObjValue(data)
}, { deep: true })

//渲染完成
onMounted(() => {
    formModel.value = {}
})

//基础表单
const formRef = ref(null)
const formModel = ref({})
const formRules = {
    type: { required: true, trigger: 'change', message: '请选择证书类型' },
    roleType: { required: true, trigger: 'change', message: '请选择所属方' },
}

//提交
const submitLoading = ref(false)
const dialogSubmit = async () => {
    window.$message.warning('此功能还没开发哦～')
    //emit('finish')
}
</script>

<style scoped lang="scss">

</style>
