|
@@ -48,10 +48,15 @@
|
|
|
@delRemove="delRemove"
|
|
|
>
|
|
|
<div class="diacont">
|
|
|
- <el-form :model="tableForm">
|
|
|
+ <el-form :model="tableForm" :rules="formRules" ref="airportInfoForm">
|
|
|
<el-row :gutter="24">
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="机场名称" size="default">
|
|
|
+ <el-form-item
|
|
|
+ label="机场名称"
|
|
|
+ size="default"
|
|
|
+ prop="airportName"
|
|
|
+ :rules="formRules.isNotNull"
|
|
|
+ >
|
|
|
<el-input
|
|
|
v-model="tableForm.airportName"
|
|
|
placeholder="请输入机场名称"
|
|
@@ -59,7 +64,12 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="三字码" size="default">
|
|
|
+ <el-form-item
|
|
|
+ label="三字码"
|
|
|
+ size="default"
|
|
|
+ prop="IATACode"
|
|
|
+ :rules="formRules.isNotNull"
|
|
|
+ >
|
|
|
<el-input
|
|
|
v-model="tableForm.IATACode"
|
|
|
placeholder="请输入三字码"
|
|
@@ -67,7 +77,12 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="四字码" size="default">
|
|
|
+ <el-form-item
|
|
|
+ label="四字码"
|
|
|
+ size="default"
|
|
|
+ prop="ICAOCode"
|
|
|
+ :rules="formRules.isNotNull"
|
|
|
+ >
|
|
|
<el-input
|
|
|
v-model="tableForm.ICAOCode"
|
|
|
placeholder="请输入四字码"
|
|
@@ -75,7 +90,12 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="中文简称" size="default">
|
|
|
+ <el-form-item
|
|
|
+ label="中文简称"
|
|
|
+ size="default"
|
|
|
+ prop="abbreviation"
|
|
|
+ :rules="formRules.isNotNull"
|
|
|
+ >
|
|
|
<el-input
|
|
|
v-model="tableForm.abbreviation"
|
|
|
placeholder="请输入中文简称"
|
|
@@ -83,7 +103,12 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="英文简称" size="default">
|
|
|
+ <el-form-item
|
|
|
+ label="英文简称"
|
|
|
+ size="default"
|
|
|
+ prop="englishAbbreviation"
|
|
|
+ :rules="formRules.isNotNull"
|
|
|
+ >
|
|
|
<el-input
|
|
|
v-model="tableForm.englishAbbreviation"
|
|
|
placeholder="请输入英文简称"
|
|
@@ -91,7 +116,12 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="全称" size="default">
|
|
|
+ <el-form-item
|
|
|
+ label="全称"
|
|
|
+ size="default"
|
|
|
+ prop="fullName"
|
|
|
+ :rules="formRules.isNotNull"
|
|
|
+ >
|
|
|
<el-input
|
|
|
v-model="tableForm.fullName"
|
|
|
placeholder="请输入全称"
|
|
@@ -99,7 +129,12 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="时区" size="default">
|
|
|
+ <el-form-item
|
|
|
+ label="时区"
|
|
|
+ size="default"
|
|
|
+ prop="airportTimeZone"
|
|
|
+ :rules="formRules.isNotNull"
|
|
|
+ >
|
|
|
<!-- <el-input v-model="tableForm.china" /> -->
|
|
|
<el-select
|
|
|
style="width: 100%"
|
|
@@ -121,7 +156,12 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="公司名称" size="default">
|
|
|
+ <el-form-item
|
|
|
+ label="公司名称"
|
|
|
+ size="default"
|
|
|
+ prop="companyName"
|
|
|
+ :rules="formRules.isNotNull"
|
|
|
+ >
|
|
|
<el-input
|
|
|
v-model="tableForm.companyName"
|
|
|
placeholder="请输入公司名称"
|
|
@@ -140,6 +180,7 @@ import Dialog from "@/components/dialog/index.vue";
|
|
|
import { translateDataToTreeAll } from "@/utils/validate";
|
|
|
import { Query, GeneralDataReception } from "@/api/webApi";
|
|
|
import { ElMessage } from "element-plus";
|
|
|
+const formRules = useElement().formRules;
|
|
|
const router = useRouter();
|
|
|
const tableBtnGroup = ref<Array>([
|
|
|
{
|
|
@@ -481,8 +522,15 @@ const getAirlines = async () => {
|
|
|
}
|
|
|
};
|
|
|
//确认提交
|
|
|
+const airportInfoForm: any = ref(null);
|
|
|
const submitForm = () => {
|
|
|
- generalDataReception(tableForm);
|
|
|
+ airportInfoForm.value.validate((valid: any) => {
|
|
|
+ if (valid) {
|
|
|
+ generalDataReception(tableForm);
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
};
|
|
|
const resetTable = () => {
|
|
|
page.value = 0;
|