<template>
  <a-drawer
    width="576"
    :title="formTitle"
    :label-col="4"
    :wrapper-col="14"
    :visible="open"
    :body-style="{height:'calc(100vh - 100px)',overflow:'auto'}"
    @close="cancel">
    <a-form-model ref="form" :model="form" :rules="rules" layout="vertical">
      <a-spin :spinning="spinning" :delay="delayTime" tip="Loading...">
        <a-row :gutter="32">
          <a-col :span="12">
            <a-form-model-item label="船只编号" prop="shipNum">
              <a-input v-model="form.shipNum" placeholder="请输入船只编号"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="船只名称" prop="shipNanme">
              <a-input v-model="form.shipNanme" placeholder="请输入船只名称"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="gps设备编号" prop="gpsDeviceNum">
              <a-input v-model="form.gpsDeviceNum" placeholder="请输入gps设备编号"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="核载人数" prop="nuclearLoadNum">
              <a-input-number v-model="form.nuclearLoadNum" :min="0" style="width: 100%"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="当前维度" prop="lat">
              <a-input v-model="form.lat" placeholder="请输入当前维度"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="当前维度" prop="lng">
              <a-input v-model="form.lng" placeholder="请输入当前维度"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="12" >
            <a-form-model-item label="船只在线状态" prop="status">
              <a-radio-group v-model="form.status">
                <a-radio
                  v-for="(dict, index) in statusOptions"
                  :key="index"
                  :value="dict.dictValue"
                >
                  {{ dict.dictLabel }}
                </a-radio>
              </a-radio-group>
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-spin>
      <div class="bottom-control">
        <a-space>
          <a-button :disabled="disabled" @click="cancel">
            取消
          </a-button>
          <a-button type="primary" :disabled="disabled" @click="submitForm(true)">
            保存
          </a-button>
        </a-space>
      </div>
    </a-form-model>
  </a-drawer>
</template>
<script>
import SysShipEditForm from './SysShipForm'
export default {
  ...SysShipEditForm
}
</script>
