<template>
    <el-dialog
        title="病历"
        width="1000px"
        :visible.sync="visible"
        :before-close="_close"
    >
        <div>
            <el-form :model="form" :rules="rules" class="medicalRecordForm" ref="form" label-width="100px" style="display: flex;flex-wrap: wrap;justify-content: space-between;">
                <el-form-item class="width33" label="传染病:" prop="name">
                    <el-radio v-model="radio" label="1">阴性</el-radio>
                    <el-radio v-model="radio" label="2">阳性</el-radio>
                </el-form-item>
                <el-form-item class="width33" label="患病类型:" prop="name">
                    <el-radio v-model="radio" label="1">慢性病</el-radio>
                    <el-radio v-model="radio" label="2">神经病</el-radio>
                    <el-radio v-model="radio" label="3">抑郁症</el-radio>
                </el-form-item>
                <el-form-item class="width33" label="透析之前情况:" prop="name">
                    <el-radio v-model="radio" label="1">腹膜透析</el-radio>
                    <el-radio v-model="radio" label="2">肾移植</el-radio>
                </el-form-item>
                <el-form-item class="width100" label="主诉 : " prop="name">
                    <el-input v-model="form.name" placeholder=""></el-input>
                </el-form-item>
                <el-form-item class="width100" label="现病史 : " prop="name">
                    <el-input v-model="form.name" placeholder=""></el-input>
                </el-form-item>
                <el-form-item class="width100" label="既往史 : " prop="name">
                    <el-input v-model="form.name" placeholder=""></el-input>
                </el-form-item>
                <el-form-item class="width50" label="药品规格 : " prop="name">
                    <el-input v-model="form.name" placeholder="" style="width:180px;"></el-input>
                    <el-select v-model="value" style="width:180px;margin-left:9px;" 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 class="width50" label="总量 : " prop="name">
                    <el-input v-model="form.name" placeholder="" style="width:180px;"></el-input>
                    <el-select v-model="value" style="width:180px;margin-left:9px;" 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 class="width50" label="每次量 : " prop="name">
                    <el-input v-model="form.name" placeholder="" style="width:180px;"></el-input>
                    <el-select v-model="value" style="width:180px;margin-left:9px;" 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 class="width50" label="用法 : " prop="name">
                    <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 class="width50" label="执行频率 : " prop="name">
                    <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 class="width50" label="天数 : " prop="name">
                    <el-input v-model="form.name" placeholder=""></el-input>
                </el-form-item>
                <el-form-item label="限制说明 : " prop="name" style="width:100%;">
                    <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="textarea"></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>

<style lang="scss" scoped>
.medicalRecordForm{
    .width33{
        width:33%;
    }
    .width50{
        width:50%;
    }
    .width100{
        width:100%;
    }
    .el-radio{
        margin-right:2px;
    }
}
</style>

