<template>
    <el-dialog :title="type" :visible.sync="dialogVisible" width="650px" id="addEqDialog">
        <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
            <h5 style="margin-bottom: 15px">模型中的属性</h5>
            <el-form-item label="属性名称" prop="name">
                <el-input v-model="ruleForm.name"></el-input>
            </el-form-item>
            <h5 style="margin-bottom: 15px">对应到数据字典中的信息点</h5>
            <el-form-item label="信息点名称" prop="desc">
                <el-input v-model="ruleForm.name"></el-input>
            </el-form-item>
            <el-form-item label="规则应用" prop="resource">
                <el-radio-group v-model="ruleForm.resource">
                    <el-radio label="创建时"></el-radio>
                    <el-radio label="更新时"></el-radio>
                </el-radio-group>
            </el-form-item>
        </el-form>
        <span slot="footer" class="dialog-footer">
            <el-button size="small" @click="dialogVisible = false">取 消</el-button>
            <el-button size="small" type="primary" @click="savaRelation">确 定</el-button>
        </span>
    </el-dialog>
</template>

<script>
import { mapGetters } from "vuex";

export default {
    computed: {
        ...mapGetters("layout", ["projectId"]),
    },
    data() {
        return {
            dialogVisible: false,
            ruleForm: {
                name: "",
                resource: "创建时",
                desc: "",
            },
            rules: {
                name: [{ required: true, message: "请输入属性名称", trigger: "blur" }],
                resource: [{ required: true, message: "请选择规则应用", trigger: "change" }],
                desc: [{ required: true, message: "请选择信息点", trigger: "blur" }],
            },
        };
    },
    props: {
        type: String, //选中的tab页
    },
    created() {
    },
    methods: {
        /**
         * 显示弹窗
         */
        showDialog() {
            this.dialogVisible = true;
            // this.page.pageNumber = 1;
            // this.tableData = [];
            // this.getTableData();
        },
        /**
         * 修改规则
         */
        savaRelation() {

        },
    },
};
</script>
<style lang="less" scoped>
</style>
