<template>
  <ant-modal
    modalWidth="800"
    modalHeight="550"
    :visible="open"
    :modal-title="formTitle"
    :adjust-size="true"
    @cancel="cancel"
  >
    <a-form-model ref="form" :model="form" :rules="rules" slot="content" layout="vertical">
      <a-row :gutter="32">
        <a-col :span="12">
          <a-form-model-item label="API类型" prop="apiType">
            <a-input v-model="form.apiType" placeholder="请输入API类型"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="错误次数" prop="apiErrornum">
            <a-input-number v-model="form.apiErrornum" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="成功次数" prop="apiScuessnum">
            <a-input-number v-model="form.apiScuessnum" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="日期" prop="logDate">
            <a-date-picker
              v-model="form.logDate"
              valueFormat="YYYY-MM-DD"
              :show-today="true"
              placeholder="选择日期"
            />
          </a-form-model-item>
        </a-col>
      </a-row>
    </a-form-model>
    <template slot="footer">
      <a-button @click="cancel">
        取消
      </a-button>
      <a-button type="primary" @click="submitForm">
        保存
      </a-button>
    </template>
  </ant-modal>
</template>
<script>
import ApiLogAddForm from './ApiLogForm'
export default {
  ...ApiLogAddForm
}
</script>
