<template>
    <el-dialog
        title="新增医嘱"
        width="600px"
        :visible.sync="visible"
        :before-close="_close"
    >
        <div>
            <el-form :model="form" :rules="rules" class="adviceForm" ref="form" label-width="100px" style="display: flex;flex-wrap: wrap;justify-content: space-between;">
                <el-form-item label="模板名称 : " prop="name" style="width: 100%;">
                    <el-input v-model="form.name" placeholder=""></el-input>
                </el-form-item>
                <el-form-item label="模板类型 : " prop="name" style="width: 100%;">
                    <el-select v-model="value" style="width:100%;" placeholder="请选择">
                        <el-option
                        v-for="item in options"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value">
                        </el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="模板等级 : " prop="name" style="width: 100%;">
                    <el-input v-model="form.name" placeholder=""></el-input>
                </el-form-item>
                <el-form-item label="创建时间 : " prop="name" style="width: 100%;">
                    <el-input v-model="form.name" placeholder=""></el-input>
                </el-form-item>
            </el-form>
        </div>
        <div slot="footer" class="dialog-footer">
            <el-button @click="hide">取 消</el-button>
            <el-button type="primary" :loading="submitLoading" @click="submitAction()">保 存</el-button>
        </div>
    </el-dialog>         
</template>

<script>
export default {
    data(){
        return{
            visible:false,
            form:{
                name:''
            },
        }
    },
    methods:{
        _close: function(done) {
            // this.clear()
            done()
        },
        clear: function() {
            this.form.id = 0;
            this.form.name = "";
            this.form.intro = "";
        },
        show() {
            // this.clear()
            this.visible = true
        },
        hide() {
            // this.clear()
            this.visible = false
        },
    }
}
</script>


