<template>
  <a-modal
    :title="title"
    :width="width"
    :visible="visible"
    switchFullscreen
    @ok="handleOk"
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
    @cancel="handleCancel"
    cancelText="关闭">
    <a-form-model ref="form" :model="model">
      <a-row>
        <a-col :span="24">
          <a-form-model-item label="拒绝原因" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="yuanyin">
            <a-input v-model="model.yuanyin" placeholder="请输入拒绝原因"  ></a-input>
          </a-form-model-item>
        </a-col>
      </a-row>
    </a-form-model>
  </a-modal>
</template>

<script>

  import { runFlowPathRejectDQ } from '@api/api'

  export default {
    name: 'ItdmRunFlowPathShenhel',
    components: {
    },
    data () {
      return {
        model:{},
        title:'驳回',
        width:800,
        visible: false,
        disableSubmit: false,
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 },
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 },
        },
      }
    },
    methods: {
      bohui (record) {
        this.visible=true
        this.model = record
      },
      handleOk () {
        var data = { 'runFlowPath': this.model.id,"yuanyin":this.model.yuanyin }
        console.log(data)
        runFlowPathRejectDQ(data).then(response => {
          this.visible = false;
          this.$emit('ok');
        })

      },

      handleCancel () {
        this.visible = false;

      }

    }
  }
</script>