CheckStepTwoModal.vue 2.14 KB
<template>
  <j-modal
    :title="title"
    :width="width"
    :visible="visible"
    switchFullscreen
    @ok="handleOk"
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
    @cancel="handleCancel"
    cancelText="关闭">
    <check-step-two-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></check-step-two-form>
  </j-modal>
</template>

<script>

  import CheckStepTwoForm from './CheckStepTwoForm'
  export default {
    name: 'CheckStepTwoModal',
    components: {
      CheckStepTwoForm
    },
    data () {
      return {
        title:'',
        width:800,
        visible: false,
        disableSubmit: false
      }
    },
    methods: {
      add () {
        this.visible=true
        this.$nextTick(()=>{
          this.$refs.realForm.add();
        })
      },
      edit (record) {
        record={
          wgjy:'合格',
          wgjy2:'Pass',
          bhxl1:'合格',
          bhxl2:'合格',
          bhxl3:'合格',
          bhxl4:'合格',
          bhxl5:'合格',
          bhxl1v2:'Pass',
          bhxl2v2:'Pass',
          bhxl3v2:'Pass',
          bhxl4v2:'Pass',
          bhxl5v2:'Pass',

          jdqd1:'500',
          jdqd2:'1100',
          jdqd3:'1875',
          jdqd4:'1875',
          jdqd5:'1100',
          jdqd6:'3750',
          jdqd1v2:'Pass',
          jdqd2v2:'Pass',
          jdqd3v2:'Pass',
          jdqd4v2:'Pass',
          jdqd5v2:'Pass',
          jdqd6v2:'Pass',

          jydz1:'5',
          jydz2:'2.5',
          jydz3:'2.5',
          jydz4:'2.5',
          jydz5:'2.5',
          jydz6:'2.5',
          jydz1v2:'Pass',
          jydz2v2:'Pass',
          jydz3v2:'Pass',
          jydz4v2:'Pass',
          jydz5v2:'Pass',
          jydz6v2:'Pass',
        };
        this.visible=true
        this.$nextTick(()=>{
          this.$refs.realForm.edit(record);
        })
      },
      close () {
        this.$emit('close');
        this.visible = false;
      },
      handleOk () {
        this.$refs.realForm.submitForm();
      },
      submitCallback(){
        this.$emit('ok');
        this.visible = false;
      },
      handleCancel () {
        this.close()
      }
    }
  }
</script>