<template>
  <!-- 增加修改 -->
  <a-modal width="35%" :label-col="4" :wrapper-col="14" :visible="visible" @cancel="onClose" @ok="handleOk">
    <a-divider orientation="left">
      <b>注销</b>
    </a-divider>
    <a-form-model ref="form" :model="form">
      <a-form-model-item label="注销原因" prop="insuranceInsured">
        <a-input v-model="form.logoutReason" type="textarea" placeholder="请输入注销原因" />
      </a-form-model-item>
      <!-- <div class="bottom-control">
          <a-space>
            <a-button type="primary" @click="submitForm"> 保存11111111 </a-button>
            <a-button type="dashed" @click="onClose"> 取消 </a-button>
          </a-space>
        </div> -->
    </a-form-model>
  </a-modal>
</template>

<script>
export default {
  components: {},
  data() {
    return {
      // 表单参数
      form: {
        logoutReason: '',
        gasId: '',
        status: 0,
      },
      visible: false,
    }
  },
  filters: {},
  created() {},
  computed: {},
  watch: {},
  methods: {
    onClose() {
      this.visible = false
      this.reset()
    },
    // 取消按钮
    onClose() {
      this.visible = false
      this.reset()
    },
    // 表单重置
    reset() {
      this.form = {
        logoutReason: undefined,
        gasId: undefined,
        status: 0,
      }
    },
    /** 提交按钮 */
    // submitForm: function () {
    //   this.$emit('add', this.form)
    //   this.onClose()
    // },
    handleOk() {
      this.$emit('signCar', this.form)
      this.onClose()
      this.reset()
    },
    // 注销
    signOut(row, ids) {
      this.form.gasId = row.gasId
      this.visible = true
    },
  },
}
</script>
