<!-- 解冻  -->
<template>
    <StepFormPackage ref="stepFormPackageRef" prefixKey="ry_jd" @resetRecord="resetRecord" :form-config="formConfig"
        :formData="formData" />
</template>

<script>
import StepFormPackage from '@/components/Template/StepFormPackage.vue';
import stepMixins from '@/components/Template/mixins/stepMixins.js';

export default {
    mixins: [stepMixins],
    props: {
        sn: {
            type: String,
            default: 'jd',
        },
    },
    components: {
        StepFormPackage
    },
    computed: {
        formConfig() {
            let config = this.sn==='jd_swypfx'?
            [{
                config: {
                    text1: {
                        label: "将上述样品预计放置于",
                        type: "text",
                    },
                    ccwz: {
                        type: "select",
                        options: this.getDictOptions("business_ccwz"),
                        fillType: "preFill",
                        otherCode: "ccwzOther",
                    },
                    text3: {
                        label: "实际放置于",
                        type: "text",
                    },
                    sjccwz: {
                        type: "select",
                        options: this.getDictOptions("business_ccwz"),
                        fillType: "actFill",
                        otherCode: "sjccwzOther",
                        compareTo: "ccwz",
                    },
                    text4: {
                        label: "位置，其环境条件预计为",
                        type: "text",
                    },
                    yjwd: {
                        type: "select",
                        options: this.getDictOptions("business_wddw"),
                        fillType: "preFill",
                        otherCode: "yjwdOther",
                    },
                    yjhj: {
                        type: "select",
                        options: this.getDictOptions("business_hjxx"),
                        fillType: "preFill",
                        otherCode: "yjhjOther",
                    },
                    text5: {
                        label: "，实际条件为",
                        type: "text",
                    },
                    sjwd: {
                        type: "select",
                        options: this.getDictOptions("business_wddw"),
                        fillType: "actFill",
                        otherCode: "sjwdOther",
                        compareTo: "yjwd",
                    },
                    sjhj: {
                        type: "select",
                        options: this.getDictOptions("business_hjxx"),
                        fillType: "actFill",
                        otherCode: "sjhjOther",
                        compareTo: "yjhj",
                    },
                     text6: {
                        label: "，放置",
                        type: "text",
                    },
                    sr1:{
                        type: "input",
                        fillType: "preFill",
                    },  
                    text7:{
                        type:"text",
                        label:"，解冻",
                    },
                    startDate: {
                        type: "input",
                        fillType: "actFill",
                        disabled: true,
                    },
                    button1:{
                        type:"button",
                        buttonName:"开始",
                    },
                    text8:{
                        type:"text",
                        label:"，解冻",
                    },
                    endDate: {
                        type: "input",
                        fillType: "actFill",
                        disabled: true,
                    },
                    button2:{
                        type:"button",
                        buttonName:"结束",
                    },
                    text9: {
                        type: "text",
                        label: "。",
                    },
                    

                }
            }]:
            [{
                config: {
                    text1: {
                        label: "将",
                        type: "text",
                    },
                    sjsr: {
                        type: "input",
                        fillType: "preFill",
                    },
                    sj: {
                        type: "sj",
                        fillType: "actFill",
                    },
                    text2: {
                        label: "预计放置于",
                        type: "text",
                    },
                    ccwz: {
                        type: "select",
                        options: this.getDictOptions("business_ccwz"),
                        fillType: "preFill",
                        otherCode: "ccwzOther",
                    },
                    text3: {
                        label: "实际放置于",
                        type: "text",
                    },
                    sjccwz: {
                        type: "select",
                        options: this.getDictOptions("business_ccwz"),
                        fillType: "actFill",
                        otherCode: "sjccwzOther",
                        compareTo: "ccwz",
                    },
                    text4: {
                        label: "位置，其环境条件预计为",
                        type: "text",
                    },
                    yjwd: {
                        type: "select",
                        options: this.getDictOptions("business_wddw"),
                        fillType: "preFill",
                        otherCode: "yjwdOther",
                    },
                    yjhj: {
                        type: "select",
                        options: this.getDictOptions("business_hjxx"),
                        fillType: "preFill",
                        otherCode: "yjhjOther",
                    },
                    text5: {
                        label: "，实际条件为",
                        type: "text",
                    },
                    sjwd: {
                        type: "select",
                        options: this.getDictOptions("business_wddw"),
                        fillType: "actFill",
                        otherCode: "sjwdOther",
                        compareTo: "yjwd",
                    },
                    sjhj: {
                        type: "select",
                        options: this.getDictOptions("business_hjxx"),
                        fillType: "actFill",
                        otherCode: "sjhjOther",
                        compareTo: "yjhj",
                    },
                     text6: {
                        label: "，放置",
                        type: "text",
                    },
                    sr1:{
                        type: "input",
                        fillType: "preFill",
                    },  
                    text7:{
                        type:"text",
                        label:"，解冻",
                    },
                    startDate: {
                        type: "input",
                        fillType: "actFill",
                        disabled: true,
                    },
                    button1:{
                        type:"button",
                        buttonName:"开始",
                    },
                    text8:{
                        type:"text",
                        label:"，解冻",
                    },
                    endDate: {
                        type: "input",
                        fillType: "actFill",
                        disabled: true,
                    },
                    button2:{
                        type:"button",
                        buttonName:"结束",
                    },
                    text9: {
                        type: "text",
                        label: "。",
                    },
                    

                }
            }]
            if(this.sn==='jd_b'){
                config[0].config.remark = {
                    type: "input",
                    fillType: "actFill",
                }
            }
            return config
        }
    },
}
</script>

<style lang="scss" scoped></style>