|
@@ -27,10 +27,15 @@
|
|
|
@delRemove="delRemove"
|
|
|
>
|
|
|
<div class="diacont">
|
|
|
- <el-form :model="tableForm">
|
|
|
+ <el-form :model="tableForm" :rules="formRules" ref="deployNodeForm">
|
|
|
<el-row :gutter="24">
|
|
|
<el-col>
|
|
|
- <el-form-item label="名称" size="default">
|
|
|
+ <el-form-item
|
|
|
+ label="名称"
|
|
|
+ size="default"
|
|
|
+ prop="nodeName"
|
|
|
+ :rules="formRules.isNotNull"
|
|
|
+ >
|
|
|
<el-input
|
|
|
v-model="tableForm.nodeName"
|
|
|
placeholder="请输入名称"
|
|
@@ -38,7 +43,12 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col>
|
|
|
- <el-form-item label="编码" size="default">
|
|
|
+ <el-form-item
|
|
|
+ label="编码"
|
|
|
+ size="default"
|
|
|
+ prop="nodeCode"
|
|
|
+ :rules="formRules.isNotNull"
|
|
|
+ >
|
|
|
<el-input
|
|
|
v-model="tableForm.nodeCode"
|
|
|
placeholder="请输入航站名称"
|
|
@@ -67,6 +77,7 @@ import Minheader from "@/components/minheader/index.vue";
|
|
|
import Dialog from "@/components/dialog/index.vue";
|
|
|
import { Query, GeneralDataReception } from "@/api/webApi";
|
|
|
import { ElMessage } from "element-plus";
|
|
|
+const formRules = useElement().formRules;
|
|
|
const page = ref<number>(0); //分页参数
|
|
|
const dataContent = ref<object>({});
|
|
|
const noMore = ref<Boolean>(false);
|
|
@@ -207,8 +218,15 @@ const getQuery = async () => {
|
|
|
}
|
|
|
};
|
|
|
//确认提交
|
|
|
+const deployNodeForm: any = ref(null);
|
|
|
const submitForm = () => {
|
|
|
- generalDataReception(tableForm);
|
|
|
+ deployNodeForm.value.validate((valid: any) => {
|
|
|
+ if (valid) {
|
|
|
+ generalDataReception(tableForm);
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
};
|
|
|
const resetTable = () => {
|
|
|
page.value = 0;
|
|
@@ -254,6 +272,6 @@ getQuery();
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
::v-deep .el-form-item__label {
|
|
|
- width: 50px;
|
|
|
+ width: 70px;
|
|
|
}
|
|
|
</style>
|