chenrui  2 жил өмнө
parent
commit
9ef7a998f3

+ 2 - 0
public/demo.js

@@ -29,6 +29,8 @@ const DATACONTENT_ID = {
   airportTableId: 79, //基础数据-机场信息维护-表格-id
   terminalTableId: 1803432, //基础数据-机场信息维护-航站楼-表格-id
   airpositTableId: 1803433, //基础数据-机场信息维护-航站楼位置-表格-id
+  deployNodeId: 54, //基础数据-节点信息维护-id
+  modelMainNodeId: 1803434, //基础数据-机型维护-id
 
   /***-----系统设置------***/
   sysSourceId: 13, //系统设置-数据源-id

+ 1 - 1
src/utils/axiosReq2.ts

@@ -14,7 +14,7 @@ service.interceptors.request.use(
   (request: AxiosReqTy) => {
     // token setting
     request.headers["AUTHORIZE_TOKEN"] = getToken();
-    request.headers["token"] = "ca7c45f8a4754528b966c5266df906fb";
+    request.headers["token"] = "4f51529071dc4c8f9ed0677f7811e530";
     request.data["OperatorId"] = "1656481036138";
     /* download file*/
     if (request.isDownLoadFile) {

+ 0 - 1
src/views/BasicsData/airlineCompany/index.vue

@@ -249,7 +249,6 @@ const generalDataReception = async (data) => {
   try {
     data = {
       ...data,
-      ...dataContent,
     };
     const { code } = await GeneralDataReception({
       serviceId: serviceId.value,

+ 0 - 1
src/views/BasicsData/airportCompany/index.vue

@@ -232,7 +232,6 @@ const generalDataReception = async (data) => {
   try {
     data = {
       ...data,
-      ...dataContent,
     };
     const { code } = await GeneralDataReception({
       serviceId: serviceId.value,

+ 35 - 24
src/views/BasicsData/airportInfo/airportInfoChild/index.vue

@@ -30,14 +30,17 @@
           <el-form :model="tableForm">
             <el-row :gutter="24">
               <el-col>
-                <el-form-item label="ID" size="default">
-                  <el-input v-model="tableForm.name" placeholder="请输入ID" />
+                <el-form-item label="航站楼编码" size="default">
+                  <el-input
+                    v-model="tableForm.terminalID"
+                    placeholder="请输入航站楼编码"
+                  />
                 </el-form-item>
               </el-col>
               <el-col>
                 <el-form-item label="航站名称" size="default">
                   <el-input
-                    v-model="tableForm.china"
+                    v-model="tableForm.terminalName"
                     placeholder="请输入航站名称"
                   />
                 </el-form-item>
@@ -45,7 +48,7 @@
               <el-col>
                 <el-form-item label="机场三字码" size="default">
                   <el-input
-                    v-model="tableForm.englin"
+                    v-model="tableForm.airportCode"
                     placeholder="请输入机场三字码"
                   />
                 </el-form-item>
@@ -64,6 +67,7 @@ import Dialog from "@/components/dialog/index.vue";
 import { Query, GeneralDataReception } from "@/api/webApi";
 import { ElMessage } from "element-plus";
 const router = useRouter();
+const route = useRoute();
 const page = ref<number>(0); //分页参数
 const dataContent = ref<object>({});
 const noMore = ref<Boolean>(false);
@@ -92,21 +96,14 @@ const tableBtnGroup = ref<Array>([
     param: 3,
   },
 ]); //单独的编辑
-// console.log(router.IATACode);
 const tableForm = reactive({
-  name: "",
-  china: "",
-  englin: "",
+  terminalID: "",
+  terminalName: "",
+  airportCode: "",
   event: "",
 }); //弹窗内容
 //列表
-const tableData = ref([
-  {
-    name: "1",
-    china: "t1",
-    englin: "CCA",
-  },
-]);
+const tableData = ref([]);
 //表头
 const state = reactive({
   list: [
@@ -116,6 +113,7 @@ const state = reactive({
   ],
   listLoading: true,
 });
+tableForm.airportCode = route.query.IATACode;
 //新增
 const addForm = () => {
   msgTitle.value = "新增航站楼";
@@ -126,9 +124,8 @@ const addForm = () => {
 //取消
 const resetForm = () => {
   flag.value = false;
-  tableForm.name = "";
-  tableForm.china = "";
-  tableForm.englin = "";
+  tableForm.terminalID = "";
+  tableForm.terminalName = "";
 };
 //编辑
 const editDialog = (data) => {
@@ -163,15 +160,25 @@ const btnClick = (row, index, param) => {
     msgTitle.value = "编辑航站楼";
     flag.value = true;
     type.value = "";
-    tableForm.name = index.name;
-    tableForm.china = index.china;
-    tableForm.englin = index.englin;
+    tableForm.event = 2;
+    tableForm.terminalID = index.terminalID;
+    tableForm.terminalName = index.terminalName;
+    tableForm.airportCode = index.airportCode;
   } else if (param === 3) {
     msgTitle.value = "删除航站楼";
     flag.value = true;
     type.value = "del";
+    tableForm.event = 3;
+    tableForm.terminalID = index.terminalID;
+    tableForm.terminalName = index.terminalName;
+    tableForm.airportCode = index.airportCode;
   } else if (param === 4) {
-    router.push({ path: "/BasicsData/positionSetting" });
+    router.push({
+      path: "/BasicsData/positionSetting",
+      query: {
+        terminalID: index.terminalID,
+      },
+    });
   }
 };
 //获取表格数据
@@ -180,7 +187,7 @@ const getQuery = async () => {
     const { code, returnData } = await Query({
       id: DATACONTENT_ID.terminalTableId,
       needPage: ++page.value,
-      dataContent: Object.values(dataContent.value),
+      dataContent: [route.query.IATACode],
     });
     if (code === "0") {
       if (returnData.listValues.length === 0) {
@@ -222,9 +229,12 @@ const resetTable = () => {
 //新增-编辑-删除
 const generalDataReception = async (data) => {
   try {
+    let obj = {
+      IATACode: route.query.IATACode,
+    };
     data = {
       ...data,
-      ...dataContent,
+      ...obj,
     };
     const { code } = await GeneralDataReception({
       serviceId: serviceId.value,
@@ -255,6 +265,7 @@ const generalDataReception = async (data) => {
     resetForm();
   }
 };
+getQuery();
 </script>
 <style lang="scss" scoped>
 ::v-deep .el-form-item__label {

+ 2 - 3
src/views/BasicsData/airportInfo/index.vue

@@ -384,8 +384,8 @@ const btnClick = (row, index, param) => {
   } else if (param === 4) {
     router.push({
       path: "/BasicsData/airportInfoChild",
-      params: {
-        IATACode: row.IATACode,
+      query: {
+        IATACode: index.IATACode,
       },
     });
   }
@@ -479,7 +479,6 @@ const generalDataReception = async (data) => {
   try {
     data = {
       ...data,
-      ...dataContent,
     };
     const { code } = await GeneralDataReception({
       serviceId: serviceId.value,

+ 8 - 25
src/views/BasicsData/airportInfo/positionSetting/index.vue

@@ -83,6 +83,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 route = useRoute();
 const page = ref<number>(0); //分页参数
 const dataContent = ref<object>({});
 const noMore = ref<Boolean>(false);
@@ -103,29 +104,7 @@ const tableForm = reactive({
   event: "",
 }); //弹窗内容
 //列表
-const tableData = ref([
-  {
-    name: "测试",
-    china: "测试",
-    englin: "测试",
-    two: "测试",
-    three: "",
-  },
-  {
-    name: "测试",
-    china: "测试",
-    englin: "测试",
-    two: "测试",
-    three: "",
-  },
-  {
-    name: "测试",
-    china: "测试",
-    englin: "测试",
-    two: "测试",
-    three: "",
-  },
-]);
+const tableData = ref([]);
 //表头
 const state = reactive({
   list: [
@@ -214,7 +193,7 @@ const getQuery = async () => {
     const { code, returnData } = await Query({
       id: DATACONTENT_ID.airpositTableId,
       needPage: ++page.value,
-      dataContent: Object.values(dataContent.value),
+      dataContent: [route.query.terminalID],
     });
     if (code === "0") {
       if (returnData.listValues.length === 0) {
@@ -256,9 +235,12 @@ const resetTable = () => {
 //新增-编辑-删除
 const generalDataReception = async (data) => {
   try {
+    let obj = {
+      terminalID: route.query.terminalID,
+    };
     data = {
       ...data,
-      ...dataContent,
+      obj,
     };
     const { code } = await GeneralDataReception({
       serviceId: serviceId.value,
@@ -289,6 +271,7 @@ const generalDataReception = async (data) => {
     resetForm();
   }
 };
+getQuery();
 </script>
 <style lang="scss" scoped>
 ::v-deep .el-form-item__label {

+ 121 - 31
src/views/BasicsData/deployNode/index.vue

@@ -10,7 +10,7 @@
       >
       <div class="app-containers">
         <DataTable
-          :tableHeader="state.list"
+          :tableHeader="tableCols"
           :tableData="tableData"
           :tableBtnGroup="tableBtnGroup"
           :tableProperty="{ rowKey: 'ID' }"
@@ -23,19 +23,24 @@
         :msgTitle="msgTitle"
         @resetForm="resetForm"
         @delRest="delRest"
+        @submitForm="submitForm"
+        @delRemove="delRemove"
       >
         <div class="diacont">
           <el-form :model="tableForm">
             <el-row :gutter="24">
               <el-col>
                 <el-form-item label="名称" size="default">
-                  <el-input v-model="tableForm.name" placeholder="请输入ID" />
+                  <el-input
+                    v-model="tableForm.nodeName"
+                    placeholder="请输入名称"
+                  />
                 </el-form-item>
               </el-col>
               <el-col>
                 <el-form-item label="编码" size="default">
                   <el-input
-                    v-model="tableForm.china"
+                    v-model="tableForm.nodeCode"
                     placeholder="请输入航站名称"
                   />
                 </el-form-item>
@@ -44,8 +49,8 @@
                 <el-form-item label="描述" size="default">
                   <el-input
                     type="textarea"
-                    v-model="tableForm.englin"
-                    placeholder="请输入机场三字码"
+                    v-model="tableForm.nodeDescribe"
+                    placeholder="请输入描述"
                   />
                 </el-form-item>
               </el-col>
@@ -60,36 +65,28 @@
 import DataTable from "@/components/tableTemp/index.vue";
 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 page = ref<number>(0); //分页参数
+const dataContent = ref<object>({});
+const noMore = ref<Boolean>(false);
+const rowTitle = ref<String>("");
+const tableCols = ref([]); //表头数据
+const serviceId = ref<String>("");
+const tableObj = ref({}); //增删改数据缓存
 const flag = ref<Boolean>(false); //弹窗开关
 const type = ref<String>(""); //判断是否删除
 const msgTitle = ref<String>("新增节点信息维护"); //弹窗标题
 const tableColsCopys = reactive<Object>({}); //弹窗
 const tableForm = reactive({
-  name: "",
-  china: "",
-  englin: "",
+  nodeID: "",
+  nodeName: "",
+  nodeCode: "",
+  nodeDescribe: "",
+  event: "",
 }); //弹窗内容
 //列表
-const tableData = ref([
-  {
-    name: "测试",
-    china: "测试",
-    englin: "测试",
-    two: "测试",
-  },
-  {
-    name: "测试",
-    china: "测试",
-    englin: "测试",
-    two: "测试",
-  },
-  {
-    name: "测试",
-    china: "测试",
-    englin: "测试",
-    two: "测试",
-  },
-]);
+const tableData = ref([]);
 //表头
 const state = reactive({
   list: [
@@ -117,6 +114,7 @@ const addForm = () => {
   msgTitle.value = "新增节点信息维护";
   flag.value = true;
   type.value = "";
+  tableForm.event = 1;
 };
 //取消
 const resetForm = () => {
@@ -140,6 +138,10 @@ const eleDialog = () => {
   flag.value = true;
   type.value = "del";
 };
+const delRemove = () => {
+  tableForm.event = 3;
+  generalDataReception(tableForm);
+};
 //删除
 const delRest = () => {
   flag.value = false;
@@ -150,16 +152,104 @@ const btnClick = (row, index, param) => {
     msgTitle.value = "编辑节点信息维护";
     flag.value = true;
     type.value = "";
-    tableForm.name = index.name;
-    tableForm.china = index.china;
-    tableForm.englin = index.englin;
+    tableForm.event = 2;
+    tableForm.nodeID = index.nodeID;
+    tableForm.nodeName = index.nodeName;
+    tableForm.nodeCode = index.nodeCode;
+    tableForm.nodeDescribe = index.nodeDescribe;
   } else if (param === 3) {
     msgTitle.value = "删除节点信息维护";
     flag.value = true;
     type.value = "del";
+    tableForm.event = 3;
+    tableForm.nodeID = index.nodeID;
+    tableForm.nodeName = index.nodeName;
+    tableForm.nodeCode = index.nodeCode;
+    tableForm.nodeDescribe = index.nodeDescribe;
   } else if (param === 4) {
   }
 };
+//获取表格数据
+const getQuery = async () => {
+  try {
+    const { code, returnData } = await Query({
+      id: DATACONTENT_ID.deployNodeId,
+      needPage: ++page.value,
+      dataContent: Object.values(dataContent.value),
+    });
+    if (code === "0") {
+      if (returnData.listValues.length === 0) {
+        page.value--;
+        noMore.value = true;
+      }
+      const titleColumn = returnData.columnSet.find(
+        (item) => item.needShow === 1
+      );
+      if (titleColumn) {
+        rowTitle.value = titleColumn.columnName;
+      }
+      tableData.value.push(...returnData.listValues);
+      tableCols.value = returnData.columnSet;
+      tableCols.value.forEach((element) => {
+        element.label = element.columnLabel;
+        element.key = element.columnName;
+        // if (element.columnName === "queryTemplate") {
+        //   element.width = "300px";
+        // }
+      });
+      serviceId.value = returnData.submitID;
+    } else {
+      page.value--;
+    }
+  } catch (error) {
+    page.value--;
+  }
+};
+//确认提交
+const submitForm = () => {
+  generalDataReception(tableForm);
+};
+const resetTable = () => {
+  page.value = 0;
+  noMore.value = false;
+  tableData.value = [];
+};
+//新增-编辑-删除
+const generalDataReception = async (data) => {
+  try {
+    data = {
+      ...data,
+    };
+    const { code } = await GeneralDataReception({
+      serviceId: serviceId.value,
+      dataContent: JSON.stringify(data),
+    });
+    if (code == 0) {
+      ElMessage.success(`操作成功`);
+      // this.$message.success("操作成功");
+      resetTable();
+      getQuery();
+      resetForm();
+      flag.value = false;
+      // rmFlag.value = false;
+      tableObj.value = {};
+      // this.$router.go(0);
+    } else {
+      ElMessage.error(`操作失败`);
+      // this.$message.error("操作失败");
+      // this.flag = false;
+      // this.rmFlag = false;
+      tableObj.value = {};
+      resetForm();
+    }
+  } catch (error) {
+    flag.value = false;
+    //  rmFlag.value = false;
+    tableObj.value = {};
+    resetForm();
+  }
+};
+getQuery();
 </script>
 <style lang="scss" scoped>
 ::v-deep .el-form-item__label {

+ 100 - 18
src/views/BasicsData/modelMaintenance/index.vue

@@ -10,7 +10,7 @@
       >
       <div class="app-containers">
         <DataTable
-          :tableHeader="state.list"
+          :tableHeader="tableCols"
           :tableData="tableData"
           :tableBtnGroup="tableBtnGroup"
           :tableProperty="{ rowKey: 'ID' }"
@@ -23,6 +23,8 @@
         :msgTitle="msgTitle"
         @resetForm="resetForm"
         @delRest="delRest"
+        @submitForm="submitForm"
+        @delRemove="delRemove"
       >
         <div class="diacont">
           <el-form :model="tableForm">
@@ -63,6 +65,15 @@
 import DataTable from "@/components/tableTemp/index.vue";
 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 page = ref<number>(0); //分页参数
+const dataContent = ref<object>({});
+const noMore = ref<Boolean>(false);
+const rowTitle = ref<String>("");
+const tableCols = ref([]); //表头数据
+const serviceId = ref<String>("");
+const tableObj = ref({}); //增删改数据缓存
 const router = useRouter();
 const flag = ref<Boolean>(false); //弹窗开关
 const type = ref<String>(""); //判断是否删除
@@ -92,25 +103,10 @@ const tableForm = reactive({
   two: "",
   three: "",
   text: "",
+  event: "",
 }); //弹窗内容
 //列表
-const tableData = ref([
-  {
-    name: "测试",
-    china: "测试",
-    englin: "测试",
-  },
-  {
-    name: "测试",
-    china: "测试",
-    englin: "测试",
-  },
-  {
-    name: "测试",
-    china: "测试",
-    englin: "测试",
-  },
-]);
+const tableData = ref([]);
 //表头
 const state = reactive({
   list: [
@@ -123,6 +119,7 @@ const state = reactive({
 //新增
 const addForm = () => {
   msgTitle.value = "新增机型维护";
+  tableForm.event = 1;
   flag.value = true;
   type.value = "";
 };
@@ -148,6 +145,10 @@ const eleDialog = () => {
   flag.value = true;
   type.value = "del";
 };
+const delRemove = () => {
+  tableForm.event = 3;
+  generalDataReception(tableForm);
+};
 //删除
 const delRest = () => {
   flag.value = false;
@@ -173,6 +174,87 @@ const btnClick = (row, index, param) => {
     router.push({ path: "/BasicsData/shippingSpace" });
   }
 };
+//获取表格数据
+const getQuery = async () => {
+  try {
+    const { code, returnData } = await Query({
+      id: DATACONTENT_ID.modelMainNodeId,
+      needPage: ++page.value,
+      dataContent: Object.values(dataContent.value),
+    });
+    if (code === "0") {
+      if (returnData.listValues.length === 0) {
+        page.value--;
+        noMore.value = true;
+      }
+      const titleColumn = returnData.columnSet.find(
+        (item) => item.needShow === 1
+      );
+      if (titleColumn) {
+        rowTitle.value = titleColumn.columnName;
+      }
+      tableData.value.push(...returnData.listValues);
+      tableCols.value = returnData.columnSet;
+      tableCols.value.forEach((element) => {
+        element.label = element.columnLabel;
+        element.key = element.columnName;
+        // if (element.columnName === "queryTemplate") {
+        //   element.width = "300px";
+        // }
+      });
+      serviceId.value = returnData.submitID;
+    } else {
+      page.value--;
+    }
+  } catch (error) {
+    page.value--;
+  }
+};
+//确认提交
+const submitForm = () => {
+  generalDataReception(tableForm);
+};
+const resetTable = () => {
+  page.value = 0;
+  noMore.value = false;
+  tableData.value = [];
+};
+//新增-编辑-删除
+const generalDataReception = async (data) => {
+  try {
+    data = {
+      ...data,
+    };
+    const { code } = await GeneralDataReception({
+      serviceId: serviceId.value,
+      dataContent: JSON.stringify(data),
+    });
+    if (code == 0) {
+      ElMessage.success(`操作成功`);
+      // this.$message.success("操作成功");
+      resetTable();
+      getQuery();
+      resetForm();
+      flag.value = false;
+      // rmFlag.value = false;
+      tableObj.value = {};
+      // this.$router.go(0);
+    } else {
+      ElMessage.error(`操作失败`);
+      // this.$message.error("操作失败");
+      // this.flag = false;
+      // this.rmFlag = false;
+      tableObj.value = {};
+      resetForm();
+    }
+  } catch (error) {
+    flag.value = false;
+    //  rmFlag.value = false;
+    tableObj.value = {};
+    resetForm();
+  }
+};
+getQuery();
 </script>
 <style lang="scss" scoped>
 ::v-deep .el-form-item__label {

+ 2 - 1
src/views/systemSettings/queryTemplate/index.vue

@@ -101,12 +101,13 @@ const resetForm = () => {
 //编辑-删除
 const btnClick = (row, index, param) => {
   if (param === 2) {
-    router.push({ path: "/systemSettings/queryTemplateColumn" });
+    router.push({ path: "/systemSettings/queryTemplateAdd" });
   } else if (param === 3) {
     msgTitle.value = "删除查询模板";
     flag.value = true;
     type.value = "del";
   } else if (param === 4) {
+    router.push({ path: "/systemSettings/queryTemplateColumn" });
   }
 };
 //删除