Procházet zdrojové kódy

Merge branch 'master' of http://120.26.64.82:3000/BFFE/SZYGM1.0

zhongxiaoyu před 2 roky
rodič
revize
2c355a0173

+ 44 - 7
src/views/BasicsData/airlineCompany/index.vue

@@ -27,10 +27,19 @@
         @delRemove="delRemove"
       >
         <div class="diacont">
-          <el-form :model="tableForm">
+          <el-form
+            :model="tableForm"
+            :rules="formRules"
+            ref="airlineCompanyForm"
+          >
             <el-row :gutter="24">
               <el-col>
-                <el-form-item label="航司名称" size="default">
+                <el-form-item
+                  label="航司名称"
+                  size="default"
+                  prop="fullName"
+                  :rules="formRules.isNotNull"
+                >
                   <el-input
                     v-model="tableForm.fullName"
                     placeholder="请输入航司名称"
@@ -38,7 +47,12 @@
                 </el-form-item>
               </el-col>
               <el-col>
-                <el-form-item label="中文简称" size="default">
+                <el-form-item
+                  label="中文简称"
+                  size="default"
+                  prop="abbreviation"
+                  :rules="formRules.isNotNull"
+                >
                   <el-input
                     v-model="tableForm.abbreviation"
                     placeholder="请输入中文简称"
@@ -46,7 +60,12 @@
                 </el-form-item>
               </el-col>
               <el-col>
-                <el-form-item label="英文简称" size="default">
+                <el-form-item
+                  label="英文简称"
+                  size="default"
+                  prop="englishAbbreviation"
+                  :rules="formRules.isNotNull"
+                >
                   <el-input
                     v-model="tableForm.englishAbbreviation"
                     placeholder="请输入英文简称"
@@ -54,7 +73,12 @@
                 </el-form-item>
               </el-col>
               <el-col>
-                <el-form-item label="航司二字码" size="default">
+                <el-form-item
+                  label="航司二字码"
+                  size="default"
+                  prop="ITATCode"
+                  :rules="formRules.isNotNull"
+                >
                   <el-input
                     v-model="tableForm.ITATCode"
                     placeholder="请输入航司二字码"
@@ -62,7 +86,12 @@
                 </el-form-item>
               </el-col>
               <el-col>
-                <el-form-item label="航司三字码" size="default">
+                <el-form-item
+                  label="航司三字码"
+                  size="default"
+                  prop="ICAOCode"
+                  :rules="formRules.isNotNull"
+                >
                   <el-input
                     v-model="tableForm.ICAOCode"
                     placeholder="请输入航司三字码"
@@ -91,6 +120,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);
@@ -236,8 +266,15 @@ const getQuery = async () => {
   }
 };
 //确认提交
+const airlineCompanyForm: any = ref(null);
 const submitForm = () => {
-  generalDataReception(tableForm);
+  airlineCompanyForm.value.validate((valid: any) => {
+    if (valid) {
+      generalDataReception(tableForm);
+    } else {
+      return false;
+    }
+  });
 };
 const resetTable = () => {
   page.value = 0;

+ 20 - 3
src/views/BasicsData/airportCompany/index.vue

@@ -27,10 +27,19 @@
         @delRemove="delRemove"
       >
         <div class="diacont">
-          <el-form :model="tableForm">
+          <el-form
+            :model="tableForm"
+            :rules="formRules"
+            ref="airportCompanyForm"
+          >
             <el-row :gutter="24">
               <el-col>
-                <el-form-item label="公司名称" size="default">
+                <el-form-item
+                  label="公司名称"
+                  size="default"
+                  :rules="formRules.isNotNull"
+                  prop="companyName"
+                >
                   <el-input
                     v-model="tableForm.companyName"
                     placeholder="请输入公司名称"
@@ -80,6 +89,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);
@@ -263,8 +273,15 @@ const generalDataReception = async (data) => {
   }
 };
 //确认提交
+const airportCompanyForm: any = ref(null);
 const submitForm = () => {
-  generalDataReception(tableForm);
+  airportCompanyForm.value.validate((valid: any) => {
+    if (valid) {
+      generalDataReception(tableForm);
+    } else {
+      return false;
+    }
+  });
 };
 const delRemove = () => {
   tableForm.event = 3;

+ 26 - 4
src/views/BasicsData/airportInfo/airportInfoChild/index.vue

@@ -27,7 +27,11 @@
         @delRemove="delRemove"
       >
         <div class="diacont">
-          <el-form :model="tableForm">
+          <el-form
+            :model="tableForm"
+            :rules="formRules"
+            ref="airportInfoChildForm"
+          >
             <el-row :gutter="24">
               <el-col>
                 <el-form-item label="航站楼编码" size="default">
@@ -38,7 +42,12 @@
                 </el-form-item>
               </el-col>
               <el-col>
-                <el-form-item label="航站名称" size="default">
+                <el-form-item
+                  label="航站名称"
+                  size="default"
+                  prop="terminalName"
+                  :rules="formRules.isNotNull"
+                >
                   <el-input
                     v-model="tableForm.terminalName"
                     placeholder="请输入航站名称"
@@ -46,7 +55,12 @@
                 </el-form-item>
               </el-col>
               <el-col>
-                <el-form-item label="机场三字码" size="default">
+                <el-form-item
+                  label="机场三字码"
+                  size="default"
+                  prop="airportCode"
+                  :rules="formRules.isNotNull"
+                >
                   <el-input
                     v-model="tableForm.airportCode"
                     placeholder="请输入机场三字码"
@@ -66,6 +80,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 router = useRouter();
 const route = useRoute();
 const page = ref<number>(0); //分页参数
@@ -218,8 +233,15 @@ const getQuery = async () => {
   }
 };
 //确认提交
+const airportInfoChildForm: any = ref(null);
 const submitForm = () => {
-  generalDataReception(tableForm);
+  airportInfoChildForm.value.validate((valid: any) => {
+    if (valid) {
+      generalDataReception(tableForm);
+    } else {
+      return false;
+    }
+  });
 };
 const resetTable = () => {
   page.value = 0;

+ 61 - 10
src/views/BasicsData/airportInfo/index.vue

@@ -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>([
   {
@@ -466,6 +507,9 @@ const getAirlines = async () => {
         "companyID"
       );
       data.value = arr;
+      companyID.value = data.value[0].companyID;
+      company.value = data.value[0].companyName;
+      getQuery();
       // if (!company.length) {
       //   company.value = arr[0].companyID;
       //   company.value = arr[0].companyName;
@@ -478,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;

+ 37 - 9
src/views/BasicsData/airportInfo/positionSetting/index.vue

@@ -27,10 +27,19 @@
         @delRemove="delRemove"
       >
         <div class="diacont">
-          <el-form :model="tableForm">
+          <el-form
+            :model="tableForm"
+            :rules="formRules"
+            ref="positionSettingForm"
+          >
             <el-row :gutter="24">
               <el-col>
-                <el-form-item label="位置序号" size="default">
+                <el-form-item
+                  label="位置序号"
+                  size="default"
+                  prop="positionSN"
+                  :rules="formRules.isNotNull"
+                >
                   <el-input
                     v-model="tableForm.positionSN"
                     placeholder="请输入位置序号"
@@ -38,7 +47,12 @@
                 </el-form-item>
               </el-col>
               <el-col>
-                <el-form-item label="位置描述" size="default">
+                <el-form-item
+                  label="位置描述"
+                  size="default"
+                  prop="positionDescribe"
+                  :rules="formRules.isNotNull"
+                >
                   <el-input
                     v-model="tableForm.positionDescribe"
                     placeholder="请输入位置描述"
@@ -46,7 +60,12 @@
                 </el-form-item>
               </el-col>
               <el-col>
-                <el-form-item label="位置英文描述" size="default">
+                <el-form-item
+                  label="位置英文描述"
+                  size="default"
+                  prop="englishDescribe"
+                  :rules="formRules.isNotNull"
+                >
                   <el-input
                     v-model="tableForm.englishDescribe"
                     placeholder="请输入位置英文描述"
@@ -54,7 +73,12 @@
                 </el-form-item>
               </el-col>
               <el-col>
-                <el-form-item label="位置编码" size="default">
+                <el-form-item
+                  label="位置编码"
+                  size="default"
+                  prop="locationCode"
+                  :rules="formRules.isNotNull"
+                >
                   <el-input
                     v-model="tableForm.locationCode"
                     placeholder="请输入位置编码"
@@ -62,9 +86,13 @@
                 </el-form-item>
               </el-col>
               <el-col>
-                <el-form-item label="航站楼ID" size="default">
+                <el-form-item
+                  label="航站楼ID"
+                  size="default"
+                  prop="terminalID"
+                  :rules="formRules.isNotNull"
+                >
                   <el-input
-                    type="textarea"
                     v-model="tableForm.terminalID"
                     placeholder="请输入航站楼ID"
                   />
@@ -83,6 +111,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 route = useRoute();
 const page = ref<number>(0); //分页参数
 const dataContent = ref<object>({});
@@ -145,7 +174,6 @@ const resetForm = () => {
   tableForm.positionDescribe = "";
   tableForm.englishDescribe = "";
   tableForm.locationCode = "";
-  tableForm.terminalID = "";
 };
 //编辑
 const editDialog = (data) => {
@@ -287,6 +315,6 @@ getQuery();
 </script>
 <style lang="scss" scoped>
 ::v-deep .el-form-item__label {
-  width: 100px;
+  width: 110px;
 }
 </style>

+ 16 - 3
src/views/systemSettings/datastructure/datastructureTerm.vue

@@ -40,7 +40,11 @@
               </el-col>
               <el-col :span="12">
                 <el-form-item label="数据项类型" size="default">
-                  <el-select
+                  <el-input
+                    v-model="tableForm.dataType"
+                    placeholder="请输入数据项类型"
+                  />
+                  <!-- <el-select
                     style="width: 100%"
                     v-model="tableForm.dataType"
                     class="input-shadow"
@@ -56,7 +60,7 @@
                       :value="item.v ? item.v : item.planDepartureApt"
                     >
                     </el-option>
-                  </el-select>
+                  </el-select> -->
                 </el-form-item>
               </el-col>
               <el-col :span="12">
@@ -216,7 +220,16 @@ const flag = ref<Boolean>(false); //弹窗开关
 const type = ref<String>(""); //判断是否删除
 const msgTitle = ref<String>("新增数据项"); //弹窗标题
 const tableColsCopys = reactive<Object>({}); //弹窗
-const tableOptionser = ref<Array>([]); //弹窗下拉
+const tableOptionser = ref<Array>([
+  {
+    k: "是",
+    v: "1",
+  },
+  {
+    k: "否",
+    v: "0",
+  },
+]); //弹窗下拉
 const tableForm = reactive({
   ItemID: "",
   dataStructureID: route.query.dataStructureID,