Browse Source

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

zhaoke 2 years ago
parent
commit
e7998e830f
29 changed files with 1240 additions and 372 deletions
  1. 1 1
      .eslintrc-auto-import.json
  2. 14 0
      public/demo.js
  3. 1 1
      src/api/webApi.ts
  4. 2 2
      src/components/tableColumnSet/index.vue
  5. 8 8
      src/components/tableTemp/index.vue
  6. 28 28
      src/router/routes/routes-file-one.ts
  7. 1 1
      src/utils/axiosReq2.ts
  8. 0 1
      src/views/BasicsData/airlineCompany/index.vue
  9. 0 1
      src/views/BasicsData/airportCompany/index.vue
  10. 132 22
      src/views/BasicsData/airportInfo/airportInfoChild/index.vue
  11. 111 3
      src/views/BasicsData/airportInfo/index.vue
  12. 145 52
      src/views/BasicsData/airportInfo/positionSetting/index.vue
  13. 125 34
      src/views/BasicsData/deployNode/index.vue
  14. 127 34
      src/views/BasicsData/modelMaintenance/index.vue
  15. 49 18
      src/views/BasicsData/shippingSpace/index.vue
  16. 311 15
      src/views/dashboard/index.vue
  17. 1 14
      src/views/realTime/components/ColumnSet/index.vue
  18. 38 27
      src/views/realTime/components/StationForm/index.vue
  19. 21 3
      src/views/realTime/components/StationView/index.vue
  20. 2 2
      src/views/realTime/departure/flight/index.vue
  21. 1 23
      src/views/realTime/hooks/useTableCellClick.ts
  22. 1 1
      src/views/realTime/hooks/useTableColumnSet.ts
  23. 6 2
      src/views/realTime/hooks/useTableData.ts
  24. 2 11
      src/views/realTime/hooks/useTableExport.ts
  25. 2 20
      src/views/realTime/hooks/useTableStyle.ts
  26. 51 0
      src/views/realTime/type.d.ts
  27. 2 1
      src/views/systemSettings/queryTemplate/index.vue
  28. 55 47
      src/views/systemSettings/queryTemplate/queryTemplateAdd.vue
  29. 3 0
      typings/global.d.ts

+ 1 - 1
.eslintrc-auto-import.json

@@ -66,4 +66,4 @@
     "watch": true,
     "watchEffect": true
   }
-}
+}

+ 14 - 0
public/demo.js

@@ -31,6 +31,20 @@ const DATACONTENT_ID = {
   airlineTableId: 80, //基础数据-航司信息维护-表格-id
   airportTreeId: 58, //基础数据-机场信息维护-公司列表-id
   airportTableId: 79, //基础数据-机场信息维护-表格-id
+  terminalTableId: 1803432, //基础数据-机场信息维护-航站楼-表格-id
+  airpositTableId: 1803433, //基础数据-机场信息维护-航站楼位置-表格-id
+  deployNodeId: 54, //基础数据-节点信息维护-id
+  modelMainNodeId: 1803434, //基础数据-机型维护-id
+  shippingNodeId: 1803435, //基础数据-舱位-id
+
+  /***-----系统设置------***/
+  sysSourceId: 13, //系统设置-数据源-id
+  sysProtoTabId: 1, //系统设置-协议管理-表格-id
+  sysServiceTabId: 2, //系统设置-服务管理-表格-id
+};
+
+const SERVICE_ID = {
+  sysQueryTabId: 5, //系统设置-查询模板-表格-增删改
 };
 
 const SERVICE_ID = {

+ 1 - 1
src/api/webApi.ts

@@ -1,4 +1,4 @@
-import request from "@/utils/axiosReq2";
+import request from "@/utils/axiosReq";
 import { ObjTy } from "~/common";
 
 export function Query(params) {

+ 2 - 2
src/components/tableColumnSet/index.vue

@@ -1,8 +1,8 @@
 <template>
   <Dialog :flag="dialogVisible" msgTitle="列设置" width="1080px" @submitForm="submitForm" @resetForm="resetForm">
     <div class="columnSet">
-        <el-checkbox v-for="(item,index) in tableHeaderList" :key="index" :label="item.key" v-model="item.isShow" :checked="item.isShow">
-          {{item.label}}
+        <el-checkbox v-for="(item,index) in tableHeaderList" :key="index" :label="item.columnName" v-model="item.needShow" :checked="item.needShow">
+          {{item.columnLabel}}
         </el-checkbox>
     </div>
   </Dialog>

+ 8 - 8
src/components/tableTemp/index.vue

@@ -50,8 +50,8 @@
       </template>
     </el-table-column>
     <!-- label-class-name  可通过 tableHeader中传入class来修改某一个或某一类表头的样式-->
-    <el-table-column class="infinite-list-item" v-for="(items, index) in tableHeaderList" :key="index" :label="items.label" :prop="items.key" :width="items.width?items.width:props.tableColumnProperty.width" :sortable="
-        items.sortable ? items.sortable : props.tableColumnProperty.sortable
+    <el-table-column class="infinite-list-item" v-for="(items, index) in tableHeaderList" :key="index" :label="items.columnLabel" :prop="items.columnName" :width="items.width?items.width:props.tableColumnProperty.width" :sortable="
+        items.needSort ? items.needSort : props.tableColumnProperty.sortable
       " :show-overflow-tooltip="props.tableColumnProperty.showOverflowTooltip" :align="items.align ? items.align : props.tableColumnProperty.align" :header-align="
         items.headerAlign
           ? items.headerAlign
@@ -59,14 +59,14 @@
       " :label-class-name="items.lableClass ? items.lableClass : ''" :class-name="items.columnClassName">
       <template #default="scope">
         <!-- 枚举值则为 items.key+'-enum' -->
-        <template v-if="isChild(scope.row[items.key])">
-          <div class="child-list" v-for="(newItem,ni) in childDatas(scope.row[items.key])" :key="ni">{{newItem}}</div>
+        <template v-if="isChild(scope.row[items.columnName])">
+          <div class="child-list" v-for="(newItem,ni) in childDatas(scope.row[items.columnName])" :key="ni">{{newItem}}</div>
         </template>
         <template v-else>
           {{
-          scope.row[items.key + "-enum"]
-            ? scope.row[items.key + "-enum"]
-            : scope.row[items.key]
+          scope.row[items.columnName + "-enum"]
+            ? scope.row[items.columnName + "-enum"]
+            : scope.row[items.columnName]
         }}
         </template>
       </template>
@@ -170,7 +170,7 @@ watchEffect(() => {
   let newArray = []
   console.log(props.tableHeader)
   props.tableHeader.map(item => {
-      if(item.isShow != false){
+      if(item.needShow != false){
         newArray.push(item)
       }
   })

+ 28 - 28
src/router/routes/routes-file-one.ts

@@ -10,37 +10,37 @@ const HomeRoutes = {
       name: 'Dashboard',
       component: () => import('@/views/dashboard/index.vue'),
       //using el svg icon, the elSvgIcon first when at the same time using elSvgIcon and icon
-      meta: { title: 'Dashboard', elSvgIcon: 'Fold' }
+      meta: { title: '决策管理驾驶舱', elSvgIcon: 'Fold' }
     }
   ]
 }
 
-const DemoRoutes = {
-  path: '/example',
-  component: Layout,
-  redirect: '/example/table',
-  name: 'Example',
-  meta: { title: 'Example', icon: 'example' },
-  children: [
-    {
-      path: 'table',
-      name: 'Table',
-      component: () => import('@/views/table/index.vue'),
-      meta: { title: 'Table', icon: 'table' }
-    },
-    {
-      path: 'tree',
-      name: 'Tree',
-      component: () => import('@/views/tree/index.vue'),
-      meta: { title: 'Tree', icon: 'tree' }
-    },
-    {
-      path: 'worker-Demo',
-      name: 'WorkerDemo',
-      component: () => import('@/views/example/worker'),
-      meta: { title: 'Worker Demo', icon: 'nested' }
-    }
-  ]
-}
+// const DemoRoutes = {
+//   path: '/example',
+//   component: Layout,
+//   redirect: '/example/table',
+//   name: 'Example',
+//   meta: { title: 'Example', icon: 'example' },
+//   children: [
+//     {
+//       path: 'table',
+//       name: 'Table',
+//       component: () => import('@/views/table/index.vue'),
+//       meta: { title: 'Table', icon: 'table' }
+//     },
+//     {
+//       path: 'tree',
+//       name: 'Tree',
+//       component: () => import('@/views/tree/index.vue'),
+//       meta: { title: 'Tree', icon: 'tree' }
+//     },
+//     {
+//       path: 'worker-Demo',
+//       name: 'WorkerDemo',
+//       component: () => import('@/views/example/worker'),
+//       meta: { title: 'Worker Demo', icon: 'nested' }
+//     }
+//   ]
+// }
 
 export default [HomeRoutes]

+ 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"] = "ba729239f8b04ee682ada8fe08dbd7ab";
+    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,

+ 132 - 22
src/views/BasicsData/airportInfo/airportInfoChild/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="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>
@@ -43,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>
@@ -59,7 +64,17 @@
 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 router = useRouter();
+const route = useRoute();
+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>("新增航站楼"); //弹窗标题
@@ -82,18 +97,13 @@ const tableBtnGroup = ref<Array>([
   },
 ]); //单独的编辑
 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: [
@@ -103,18 +113,19 @@ const state = reactive({
   ],
   listLoading: true,
 });
+tableForm.airportCode = route.query.IATACode;
 //新增
 const addForm = () => {
   msgTitle.value = "新增航站楼";
+  tableForm.event = 1;
   flag.value = true;
   type.value = "";
 };
 //取消
 const resetForm = () => {
   flag.value = false;
-  tableForm.name = "";
-  tableForm.china = "";
-  tableForm.englin = "";
+  tableForm.terminalID = "";
+  tableForm.terminalName = "";
 };
 //编辑
 const editDialog = (data) => {
@@ -131,6 +142,10 @@ const eleDialog = () => {
   flag.value = true;
   type.value = "del";
 };
+const delRemove = () => {
+  tableForm.event = 3;
+  generalDataReception(tableForm);
+};
 //删除取消
 const delRest = () => {
   flag.value = false;
@@ -145,17 +160,112 @@ 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,
+      },
+    });
+  }
+};
+//获取表格数据
+const getQuery = async () => {
+  try {
+    const { code, returnData } = await Query({
+      id: DATACONTENT_ID.terminalTableId,
+      needPage: ++page.value,
+      dataContent: [route.query.IATACode],
+    });
+    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 {
+    let obj = {
+      IATACode: route.query.IATACode,
+    };
+    data = {
+      ...data,
+      ...obj,
+    };
+    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 {

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

@@ -174,7 +174,100 @@ const BtnGroupWidth = ref<String>("");
 const flag = ref<Boolean>(false); //弹窗开关
 const type = ref<String>(""); //判断是否删除
 const msgTitle = ref<String>("新增机场信息维护"); //弹窗标题
-const tableOptionser = ref<Array>([]); //弹窗下拉
+const tableOptionser = ref<Array>([
+  {
+    k: "UTC",
+    v: "1",
+  },
+  {
+    k: "UTC+1",
+    v: "+1",
+  },
+  {
+    k: "UTC+2",
+    v: "+2",
+  },
+  {
+    k: "UTC+3",
+    v: "+3",
+  },
+  {
+    k: "UTC+4",
+    v: "+4",
+  },
+  {
+    k: "UTC+5",
+    v: "+5",
+  },
+  {
+    k: "UTC+6",
+    v: "+6",
+  },
+  {
+    k: "UTC+7",
+    v: "+7",
+  },
+  {
+    k: "UTC+8",
+    v: "+8",
+  },
+  {
+    k: "UTC+9",
+    v: "+9",
+  },
+  {
+    k: "UTC+10",
+    v: "+10",
+  },
+  {
+    k: "UTC+11",
+    v: "+11",
+  },
+  {
+    k: "UTC-1",
+    v: "-1",
+  },
+  {
+    k: "UTC-2",
+    v: "-2",
+  },
+  {
+    k: "UTC-3",
+    v: "-3",
+  },
+  {
+    k: "UTC-4",
+    v: "-4",
+  },
+  {
+    k: "UTC-5",
+    v: "-5",
+  },
+  {
+    k: "UTC-6",
+    v: "-6",
+  },
+  {
+    k: "UTC-7",
+    v: "-7",
+  },
+  {
+    k: "UTC-8",
+    v: "-8",
+  },
+  {
+    k: "UTC-9",
+    v: "-9",
+  },
+  {
+    k: "UTC-10",
+    v: "-10",
+  },
+  {
+    k: "UTC-11",
+    v: "-11",
+  },
+]); //弹窗下拉
 const tableColsCopys = reactive<Object>({}); //弹窗
 const tableForm = reactive({
   airportID: "",
@@ -226,6 +319,17 @@ const addForm = () => {
 //取消
 const resetForm = () => {
   flag.value = false;
+  tableForm.airportID = "";
+  tableForm.airportName = "";
+  tableForm.IATACode = "";
+  tableForm.ICAOCode = "";
+  tableForm.abbreviation = "";
+  tableForm.englishAbbreviation = "";
+  tableForm.fullName = "";
+  tableForm.companyID = "";
+  tableForm.airportTimeZone = "";
+  tableForm.companyName = "";
+  tableForm.event = "";
 };
 //编辑
 const editDialog = (data) => {
@@ -289,7 +393,12 @@ const btnClick = (row, index, param) => {
     tableForm.companyName = index.companyName;
     tableForm.event = index.event;
   } else if (param === 4) {
-    router.push({ path: "/BasicsData/airportInfoChild" });
+    router.push({
+      path: "/BasicsData/airportInfoChild",
+      query: {
+        IATACode: index.IATACode,
+      },
+    });
   }
 };
 //点击树事件
@@ -381,7 +490,6 @@ const generalDataReception = async (data) => {
   try {
     data = {
       ...data,
-      ...dataContent,
     };
     const { code } = await GeneralDataReception({
       serviceId: serviceId.value,

+ 145 - 52
src/views/BasicsData/airportInfo/positionSetting/index.vue

@@ -10,7 +10,7 @@
       >
       <div class="app-containers">
         <DataTable
-          :tableHeader="state.list"
+          :tableHeader="tableCols"
           :tableData="tableData"
           :tableBtnGroup="tableBtnGroup"
           :tableProperty="{ rowKey: 'ID' }"
@@ -23,48 +23,50 @@
         :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-form-item label="位置序号" size="default">
                   <el-input
-                    v-model="tableForm.name"
-                    placeholder="请输入位置名称"
+                    v-model="tableForm.positionSN"
+                    placeholder="请输入位置序号"
                   />
                 </el-form-item>
               </el-col>
               <el-col>
-                <el-form-item label="位置所属节点" size="default">
+                <el-form-item label="位置描述" size="default">
                   <el-input
-                    v-model="tableForm.china"
-                    placeholder="请输入位置所属节点"
+                    v-model="tableForm.positionDescribe"
+                    placeholder="请输入位置描述"
                   />
                 </el-form-item>
               </el-col>
               <el-col>
-                <el-form-item label="位置标识" size="default">
+                <el-form-item label="位置英文描述" size="default">
                   <el-input
-                    v-model="tableForm.englin"
-                    placeholder="请输入位置标识"
+                    v-model="tableForm.englishDescribe"
+                    placeholder="请输入位置英文描述"
                   />
                 </el-form-item>
               </el-col>
               <el-col>
                 <el-form-item label="位置编码" size="default">
                   <el-input
-                    v-model="tableForm.two"
+                    v-model="tableForm.locationCode"
                     placeholder="请输入位置编码"
                   />
                 </el-form-item>
               </el-col>
               <el-col>
-                <el-form-item label="位置描述" size="default">
+                <el-form-item label="航站楼ID" size="default">
                   <el-input
                     type="textarea"
-                    v-model="tableForm.three"
-                    placeholder="请输入位置描述"
+                    v-model="tableForm.terminalID"
+                    placeholder="请输入航站楼ID"
                   />
                 </el-form-item>
               </el-col>
@@ -79,41 +81,32 @@
 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 route = useRoute();
+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: "",
-  two: "",
-  three: "",
+  positionID: "",
+  positionSN: "",
+  positionDescribe: "",
+  englishDescribe: "",
+  locationCode: "",
+  terminalID: "",
+  event: "",
 }); //弹窗内容
 //列表
-const tableData = ref([
-  {
-    name: "测试",
-    china: "测试",
-    englin: "测试",
-    two: "测试",
-    three: "",
-  },
-  {
-    name: "测试",
-    china: "测试",
-    englin: "测试",
-    two: "测试",
-    three: "",
-  },
-  {
-    name: "测试",
-    china: "测试",
-    englin: "测试",
-    two: "测试",
-    three: "",
-  },
-]);
+tableForm.terminalID = route.query.terminalID;
+const tableData = ref([]);
 //表头
 const state = reactive({
   list: [
@@ -140,17 +133,19 @@ const tableBtnGroup = ref([
 //新增
 const addForm = () => {
   msgTitle.value = "新增位置";
+  tableForm.event = 1;
   flag.value = true;
   type.value = "";
 };
 //取消
 const resetForm = () => {
   flag.value = false;
-  tableForm.name = "";
-  tableForm.china = "";
-  tableForm.englin = "";
-  tableForm.two = "";
-  tableForm.three = "";
+  tableForm.positionID = "";
+  tableForm.positionSN = "";
+  tableForm.positionDescribe = "";
+  tableForm.englishDescribe = "";
+  tableForm.locationCode = "";
+  tableForm.terminalID = "";
 };
 //编辑
 const editDialog = (data) => {
@@ -169,6 +164,10 @@ const eleDialog = () => {
   flag.value = true;
   type.value = "del";
 };
+const delRemove = () => {
+  tableForm.event = 3;
+  generalDataReception(tableForm);
+};
 //删除
 const delRest = () => {
   flag.value = false;
@@ -179,18 +178,112 @@ 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.two = index.two;
-    tableForm.three = index.three;
+    tableForm.event = 2;
+    tableForm.positionID = index.positionID;
+    tableForm.positionSN = index.positionSN;
+    tableForm.positionDescribe = index.positionDescribe;
+    tableForm.englishDescribe = index.englishDescribe;
+    tableForm.locationCode = index.locationCode;
+    tableForm.terminalID = index.terminalID;
   } else if (param === 3) {
     msgTitle.value = "删除位置";
     flag.value = true;
     type.value = "del";
+    tableForm.event = 3;
+    tableForm.positionID = index.positionID;
+    tableForm.positionSN = index.positionSN;
+    tableForm.positionDescribe = index.positionDescribe;
+    tableForm.englishDescribe = index.englishDescribe;
+    tableForm.locationCode = index.locationCode;
+    tableForm.terminalID = index.terminalID;
   } else if (param === 4) {
   }
 };
+//获取表格数据
+const getQuery = async () => {
+  try {
+    const { code, returnData } = await Query({
+      id: DATACONTENT_ID.airpositTableId,
+      needPage: ++page.value,
+      dataContent: [route.query.terminalID],
+    });
+    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 {
+    let obj = {
+      terminalID: route.query.terminalID,
+    };
+    data = {
+      ...data,
+      obj,
+    };
+    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 {

+ 125 - 34
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,13 +114,15 @@ const addForm = () => {
   msgTitle.value = "新增节点信息维护";
   flag.value = true;
   type.value = "";
+  tableForm.event = 1;
 };
 //取消
 const resetForm = () => {
   flag.value = false;
-  tableForm.name = "";
-  tableForm.china = "";
-  tableForm.englin = "";
+  tableForm.nodeID = "";
+  tableForm.nodeName = "";
+  tableForm.nodeCode = "";
+  tableForm.nodeDescribe = "";
 };
 //编辑
 const editDialog = (data) => {
@@ -140,6 +139,10 @@ const eleDialog = () => {
   flag.value = true;
   type.value = "del";
 };
+const delRemove = () => {
+  tableForm.event = 3;
+  generalDataReception(tableForm);
+};
 //删除
 const delRest = () => {
   flag.value = false;
@@ -150,16 +153,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 {

+ 127 - 34
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">
@@ -30,7 +32,7 @@
               <el-col>
                 <el-form-item label="机型名称" size="default">
                   <el-input
-                    v-model="tableForm.name"
+                    v-model="tableForm.modelName"
                     placeholder="请输入机型名称"
                   />
                 </el-form-item>
@@ -38,7 +40,7 @@
               <el-col>
                 <el-form-item label="标识符" size="default">
                   <el-input
-                    v-model="tableForm.china"
+                    v-model="tableForm.modelType"
                     placeholder="请输入标识符"
                   />
                 </el-form-item>
@@ -47,7 +49,7 @@
                 <el-form-item label="机型描述" size="default">
                   <el-input
                     type="textarea"
-                    v-model="tableForm.englin"
+                    v-model="tableForm.modelDesc"
                     placeholder="请输入机型描述"
                   />
                 </el-form-item>
@@ -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>(""); //判断是否删除
@@ -86,31 +97,14 @@ const tableBtnGroup = ref<Array>([
   },
 ]); //单独的编辑
 const tableForm = reactive({
-  name: "",
-  china: "",
-  englin: "",
-  two: "",
-  three: "",
-  text: "",
+  modelID: "",
+  modelName: "",
+  modelType: "",
+  modelDesc: "",
+  event: "",
 }); //弹窗内容
 //列表
-const tableData = ref([
-  {
-    name: "测试",
-    china: "测试",
-    englin: "测试",
-  },
-  {
-    name: "测试",
-    china: "测试",
-    englin: "测试",
-  },
-  {
-    name: "测试",
-    china: "测试",
-    englin: "测试",
-  },
-]);
+const tableData = ref([]);
 //表头
 const state = reactive({
   list: [
@@ -123,15 +117,17 @@ const state = reactive({
 //新增
 const addForm = () => {
   msgTitle.value = "新增机型维护";
+  tableForm.event = 1;
   flag.value = true;
   type.value = "";
 };
 //取消
 const resetForm = () => {
   flag.value = false;
-  tableForm.name = "";
-  tableForm.china = "";
-  tableForm.englin = "";
+  tableForm.modelID = "";
+  tableForm.modelName = "";
+  tableForm.modelType = "";
+  tableForm.modelDesc = "";
 };
 //编辑
 const editDialog = (data) => {
@@ -148,6 +144,10 @@ const eleDialog = () => {
   flag.value = true;
   type.value = "del";
 };
+const delRemove = () => {
+  tableForm.event = 3;
+  generalDataReception(tableForm);
+};
 //删除
 const delRest = () => {
   flag.value = false;
@@ -162,17 +162,110 @@ 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.modelID = index.modelID;
+    tableForm.modelName = index.modelName;
+    tableForm.modelType = index.modelType;
+    tableForm.modelDesc = index.modelDesc;
   } else if (param === 3) {
     msgTitle.value = "删除机型维护";
     flag.value = true;
     type.value = "del";
+    tableForm.event = 3;
+    tableForm.modelID = index.modelID;
+    tableForm.modelName = index.modelName;
+    tableForm.modelType = index.modelType;
+    tableForm.modelDesc = index.modelDesc;
   } else if (param === 4) {
-    router.push({ path: "/BasicsData/shippingSpace" });
+    router.push({
+      path: "/BasicsData/shippingSpace",
+      query: {
+        modelID: index.modelID,
+      },
+    });
+  }
+};
+//获取表格数据
+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 {

+ 49 - 18
src/views/BasicsData/shippingSpace/index.vue

@@ -10,7 +10,7 @@
       >
       <div class="app-containers">
         <DataTable
-          :tableHeader="state.list"
+          :tableHeader="tableCols"
           :tableData="tableData"
           :tableBtnGroup="tableBtnGroup"
           :tableProperty="{ rowKey: 'ID' }"
@@ -60,6 +60,16 @@
 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 route = useRoute();
+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>("新增舱位管理"); //弹窗标题
@@ -70,23 +80,7 @@ const tableForm = reactive({
   englin: "",
 }); //弹窗内容
 //列表
-const tableData = ref([
-  {
-    name: "测试",
-    china: "测试",
-    englin: "测试",
-  },
-  {
-    name: "测试",
-    china: "测试",
-    englin: "测试",
-  },
-  {
-    name: "测试",
-    china: "测试",
-    englin: "测试",
-  },
-]);
+const tableData = ref([]);
 //表头
 const state = reactive({
   list: [
@@ -156,6 +150,43 @@ const btnClick = (row, index, param) => {
   } else if (param === 4) {
   }
 };
+//获取表格数据
+const getQuery = async () => {
+  try {
+    const { code, returnData } = await Query({
+      id: DATACONTENT_ID.shippingNodeId,
+      needPage: ++page.value,
+      dataContent: [route.query.modelID],
+    });
+    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--;
+  }
+};
+getQuery();
 </script>
 <style lang="scss" scoped>
 ::v-deep .el-form-item__label {

+ 311 - 15
src/views/dashboard/index.vue

@@ -1,29 +1,168 @@
 <template>
   <div class="dashboard">
     <div class="dashboard-head flex">
-      <div class="dashboard-head-title">{{title}}</div>
+      <!-- <div class="dashboard-head-title">{{title}}</div> -->
       <div class="dashboard-head-tabs flex-wrap">
         <div class="dashboard-head-tabs-list" :class="tabsIndex == index ? 'active' : ''" @click="tabClick(item,index)" v-for="(item,index) in tabs" :key="index">{{item.label}}</div>
       </div>
-      <div class="dashboard-head-zw"></div>
+      <!-- <div class="dashboard-head-zw"></div> -->
     </div>
     <div class="dashboard-content">
-      <div v-if="false" class="dashboard-content-top flex">
+      <div class="dashboard-content-top flex">
         <div class="dashboard-content-top-left">
-          <Echarts id="ww" :option="optionLeft" />
+          <div class="dashboard-content-top-left-item">
+            <div class="dashboard-content-top-left-item-top">
+              <div class="dashboard-content-top-left-item-top-title">小时峰值分布</div>
+              <div class="dashboard-content-top-left-item-top-time" @click="showDatePicker">
+                <el-icon color="#ffffff" size="18"><Calendar /></el-icon>
+                <el-icon color="#ffffff"><CaretBottom /></el-icon>
+              </div>
+            </div>
+            <div class="dashboard-content-top-left-item-bottom">
+              <Echarts id="ww1" :option="optionLeft" />
+            </div>
+          </div>
+          <div class="dashboard-content-top-left-item">
+            <div class="dashboard-content-top-left-item-top">
+              <div class="dashboard-content-top-left-item-top-title">运单趋势分析</div>
+              <div class="dashboard-content-top-left-item-top-time" @click="showDatePicker">
+                <el-icon color="#ffffff" size="18"><Calendar /></el-icon>
+                <el-icon color="#ffffff"><CaretBottom /></el-icon>
+              </div>
+            </div>
+            <div class="dashboard-content-top-left-item-bottom">
+              <Echarts id="ww12" :option="optionLeft" />
+            </div>
+          </div>
+
+        </div>
+        <div class="dashboard-content-top-center">
+          <div class="dashboard-content-bottom-center-top">
+
+          </div>
+          <div class="dashboard-content-bottom-center-bottom">
+            <Echarts id="ww2" :option="optionLeft" />
+          </div>
+        </div>
+        <div class="dashboard-content-top-right">
+          <div class="dashboard-content-top-right-item">
+            <div class="dashboard-content-top-right-item-top">
+              <div class="dashboard-content-top-right-item-top-title">航班预警报警分析</div>
+              <div class="dashboard-content-top-right-item-top-time" @click="showDatePicker">
+                <el-icon color="#ffffff" size="18"><Calendar /></el-icon>
+                <el-icon color="#ffffff"><CaretBottom /></el-icon>
+              </div>
+            </div>
+            <div class="dashboard-content-top-right-item-bottom">
+              <Echarts id="ww3" :option="optionLeft" />
+            </div>
+          </div>
+          <div class="dashboard-content-top-right-item">
+            <div class="dashboard-content-top-right-item-top">
+              <div class="dashboard-content-top-right-item-top-title">航司运量统计</div>
+              <div class="dashboard-content-top-right-item-top-time" @click="showDatePicker">
+                <el-icon color="#ffffff" size="18"><Calendar /></el-icon>
+                <el-icon color="#ffffff"><CaretBottom /></el-icon>
+              </div>
+            </div>
+            <div class="dashboard-content-top-left-item-bottom">
+              <Echarts id="ww33" :option="optionLeft" />
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="dashboard-content-bottom flex">
+        <div class="dashboard-content-bottom-left">
+          <div class="dashboard-content-bottom-left-top">
+            <div class="dashboard-content-bottom-left-top-title">节点峰值分布</div>
+            <div class="dashboard-content-bottom-left-top-time" @click="showDatePicker">
+              <el-icon color="#ffffff" size="18"><Calendar /></el-icon>
+              <el-icon color="#ffffff"><CaretBottom /></el-icon>
+            </div>
+          </div>
+          <div class="dashboard-content-bottom-left-bottom">
+            <Echarts id="ww4" :option="optionLeft" />
+          </div>
+        </div>
+        <div class="dashboard-content-bottom-center">
+          <div class="dashboard-content-bottom-center-top">
+            <div class="dashboard-content-bottom-center-top-title">节点效率分析</div>
+            <div class="dashboard-content-bottom-center-top-time" @click="showDatePicker">
+              <el-icon color="#ffffff" size="18"><Calendar /></el-icon>
+              <el-icon color="#ffffff"><CaretBottom /></el-icon>
+            </div>
+          </div>
+          <div class="dashboard-content-bottom-center-bottom">
+            <Echarts id="ww5" :option="optionLeft" />
+          </div>
+        </div>
+        <div class="dashboard-content-bottom-right">
+          <div class="dashboard-content-bottom-right-top">
+            <div class="dashboard-content-bottom-center-top-title">航班动态统计</div>
+          </div>
+          <div class="dashboard-content-bottom-right-bottom">
+            <Echarts id="ww6" :option="optionLeft" />
+          </div>
         </div>
-        <div class="dashboard-content-top-center">2</div>
-        <div class="dashboard-content-top-right">3</div>
       </div>
-      <div class="dashboard-content-bottom"></div>
     </div>
+    <Dialog :flag="flag" @resetForm="resetForm" @submitForm="submitForm">
+      <el-form :model="form" label-width="120px">
+        <el-form-item label="开始日期">
+          <el-date-picker
+          :disabled-date="disabledStartDate"
+            v-model="form.startDate"
+            type="date"
+            placeholder="请选择开始日期"
+            size="default"
+            format="YYYY/MM/DD"
+            value-format="YYYY-MM-DD"
+          />
+        </el-form-item>
+        <el-form-item label="结束日期">
+          <el-date-picker
+            :disabled-date="disabledEndDate"
+            v-model="form.endDate"
+            type="date"
+            placeholder="请选择结束日期"
+            size="default"
+            format="YYYY-MM-DD"
+            value-format="YYYY-MM-DD"
+          />
+        </el-form-item>
+      </el-form>
+    </Dialog>
   </div>
 </template>
 
 <script setup lang="ts">
 import { ref } from "vue";
 import Echarts from "@/components/Echarts/commonChartsBar.vue";
+import {Calendar,CaretBottom} from "@element-plus/icons-vue"
+import  Dialog  from "@/components/dialog/index.vue";
 const title = ref("决策管理驾驶舱");
+const form = ref({
+  startDate:Date.now(),
+  endDate:Date.now()
+})
+
+const disabledStartDate = (time: Date) => {
+  let data = new Date(form.value.endDate)
+  return time.getTime() > data.getTime()
+}
+const disabledEndDate = (time: Date) => {
+  let data = new Date(form.value.startDate)
+  return  data.getTime() > time.getTime()
+}
+
+const flag = ref(false)
+const resetForm = () => {
+  flag.value = false
+}
+
+const submitForm = () => {
+  flag.value = false
+}
 const tabs = [
   {
     id: 1,
@@ -158,6 +297,11 @@ const tabClick = (item, index) => {
   tabsIndex.value = index;
   console.log(item, index);
 };
+
+const showDatePicker = () =>{
+  flag.value = true;
+}
+
 </script>
 
 <style lang="scss" scoped>
@@ -172,9 +316,12 @@ const tabClick = (item, index) => {
   color: #fff;
   &-head {
     padding: 0 32px;
-    height: 48px;
-    line-height: 48px;
+    height: 40px;
+    line-height: 40px;
     background: #1d2948;
+    width: 100%;
+    display: flex;
+    justify-content: center;
     &-title {
       font-size: 24px;
       font-family: Microsoft YaHei;
@@ -212,17 +359,166 @@ const tabClick = (item, index) => {
     }
   }
   &-content {
-    padding: 24px 32px;
+    padding:0 20px;
+    height: calc(100% - 40px);
+    box-sizing: border-box;
+    display: flex;
+    flex-direction: column;
     &-top {
       width: 100%;
-      height: 60vh;
+      height: 65%;
       &-left,
       &-right {
-        width: 25%;
-        position: relative;
+        width: calc(30% - 20px);
+        &-item{
+          width: 100%;
+          height: calc(50% - 20px);
+          margin: 20px 0;
+          display: flex;
+          flex-direction: column;
+          background-image: url("../../assets/home/pic_border.png");
+          background-repeat: no-repeat;
+          background-size: 100% 100%;
+          padding: 13px;
+          box-sizing: border-box;
+        &-top{
+          width: 100%;
+          height: 45px;
+          display: flex;
+          padding-top: 15px;
+          box-sizing: border-box;
+          &-title{
+            font-size: 16px;
+            font-weight: bold;
+            color: #75CEE1;
+            line-height: 1.8;
+            margin-right: 10px;
+          }
+          &-time{
+            display: flex;
+            justify-content: flex-start;
+            align-items: center;
+            cursor: pointer;
+          }
+        }
+        &-bottom{
+          width: 100%;
+          flex: 1;
+          position: relative;
+          // margin-top: 10px;
+        }
+        }
       }
       &-center {
-        width: 50%;
+        width: 40%;
+        box-sizing: border-box;
+        display: flex;
+        flex-direction: column;
+        &-top{
+          width: 100%;
+          height: 55px;
+          display: flex;
+          padding-top: 15px;
+          box-sizing: border-box;
+          &-title{
+            font-size: 16px;
+            font-weight: bold;
+            color: #75CEE1;
+            line-height: 1.8;
+            margin-right: 10px;
+          }
+          &-time{
+            display: flex;
+            justify-content: flex-start;
+            align-items: center;
+            cursor: pointer;
+          }
+        }
+        &-bottom{
+          width: 100%;
+          flex: 1;
+          position: relative;
+          // margin-top: 10px;
+        }
+      }
+    }
+    &-bottom {
+      width: 100%;
+      flex: 1;
+      &-left,
+      &-right {
+        width: calc(30% - 20px);
+        display: flex;
+        flex-direction: column;
+        box-sizing: border-box;
+        background-image: url("../../assets/home/pic_border.png");
+        background-repeat: no-repeat;
+        background-size: 100% 100%;
+        padding: 13px;
+        box-sizing: border-box;
+        margin-top: 20px;
+        margin-bottom: 20px;
+        &-top{
+          width: 100%;
+          height: 45px;
+          display: flex;
+          padding-top: 15px;
+          box-sizing: border-box;
+          &-title{
+            font-size: 16px;
+            font-weight: bold;
+            color: #75CEE1;
+            line-height: 1.8;
+            margin-right: 10px;
+          }
+          &-time{
+            display: flex;
+            justify-content: flex-start;
+            align-items: center;
+            cursor: pointer;
+          }
+        }
+        &-bottom{
+          width: 100%;
+          flex: 1;
+          position: relative;
+          // margin-top: 10px;
+        }
+      }
+      &-center {
+        width: 40%;
+        padding: 13px;
+        margin-top: 20px;
+        margin-bottom: 20px;
+        box-sizing: border-box;
+        display: flex;
+        flex-direction: column;
+        &-top{
+          width: 100%;
+          height: 45px;
+          display: flex;
+          padding-top: 15px;
+          box-sizing: border-box;
+          &-title{
+            font-size: 16px;
+            font-weight: bold;
+            color: #75CEE1;
+            line-height: 1.8;
+            margin-right: 10px;
+          }
+          &-time{
+            display: flex;
+            justify-content: flex-start;
+            align-items: center;
+            cursor: pointer;
+          }
+        }
+        &-bottom{
+          width: 100%;
+          flex: 1;
+          position: relative;
+          // margin-top: 10px;
+        }
       }
     }
     .pBox {
@@ -232,4 +528,4 @@ const tabClick = (item, index) => {
     }
   }
 }
-</style>
+</style>

+ 1 - 14
src/views/realTime/components/ColumnSet/index.vue

@@ -45,22 +45,9 @@
 </template>
 
 <script setup lang="ts">
+import type { KeyType, TableColumn, TableColumnInGroup, tableColumnGroup } from '../../type'
 import { Tools } from '@element-plus/icons-vue'
 import Dialog from '@/components/dialog/index.vue'
-import type { Column } from 'element-plus'
-
-export type KeyType = string | number | symbol
-export interface TableColumn <T = any> extends Column<T> {
-  dataKey: KeyType
-  title: string
-}
-export interface TableColumnInGroup<T = any> extends TableColumn<T> {
-  groupTitle: string
-}
-export interface tableColumnGroup {
-  title: string
-  columns: TableColumnInGroup[]
-}
 
 const props = defineProps({
   tableColumns: {

+ 38 - 27
src/views/realTime/components/StationForm/index.vue

@@ -1,26 +1,26 @@
 <template>
   <el-form :model="formData" inline class="station-form">
-    <el-form-item :prop="formData.startDate" style="width: 176px">
+    <el-form-item :prop="formData.startDate" style="width: 160px">
       <el-date-picker
         v-model="formData.startDate"
         type="datetime"
-        format="YYYY-MM-DD HH:mm:ss"
-        value-format="YYYY-MM-DD hh:mm:ss"
+        format="YYYY-MM-DD HH:mm"
+        value-format="YYYY-MM-DD hh:mm"
         size="default"
         :clearable="false"
       />
     </el-form-item>
-    <el-form-item :prop="formData.endDate" style="width: 176px">
+    <el-form-item :prop="formData.endDate" style="width: 160px">
       <el-date-picker
         v-model="formData.endDate"
         type="datetime"
-        format="YYYY-MM-DD HH:mm:ss"
-        value-format="YYYY-MM-DD hh:mm:ss"
+        format="YYYY-MM-DD HH:mm"
+        value-format="YYYY-MM-DD hh:mm"
         size="default"
         :clearable="false"
       />
     </el-form-item>
-    <el-form-item :prop="formData.flightStatus" style="width: 96px">
+    <el-form-item :prop="formData.flightStatus" style="width: 104px">
       <el-select
         v-model="formData.flightStatus"
         size="default"
@@ -34,7 +34,7 @@
         />
       </el-select>
     </el-form-item>
-    <el-form-item :prop="formData.flightWarning" style="width: 96px">
+    <el-form-item :prop="formData.flightWarning" style="width: 104px">
       <el-select
         v-model="formData.flightWarning"
         size="default"
@@ -51,7 +51,7 @@
     <el-form-item
       v-if="international"
       :prop="formData.waybillType"
-      style="width: 96px"
+      style="width: 104px"
     >
       <el-select
         v-model="formData.waybillType"
@@ -71,11 +71,7 @@
 
 <script setup lang="ts">
 import { parseTime } from '@/utils/validate'
-
-interface selectOptions {
-  label: string
-  value: string | number
-}
+import type { selectOptions } from '../../type'
 
 const props = defineProps({
   international: {
@@ -84,16 +80,33 @@ const props = defineProps({
   },
 })
 
+const emit = defineEmits(['formDataChange'])
+
 const formData = reactive({
-  startDate: parseTime(new Date(), '{y}/{m}/{d} {h}:{i}:{s}'),
-  endDate: parseTime(new Date(), '{y}/{m}/{d} {h}:{i}:{s}'),
+  startDate: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'),
+  endDate: parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'),
   flightStatus: '',
   flightWarning: '',
   waybillType: '',
 })
-const flightStatusOptions = ref<selectOptions[]>([])
-const flightWarningOptions = ref<selectOptions[]>([])
-const waybillTypeOptions = ref<selectOptions[]>([])
+watchEffect(() => {
+  emit('formDataChange', formData)
+})
+
+const flightStatusOptions = ref<selectOptions>([])
+const flightWarningOptions = ref<selectOptions>([])
+const waybillTypeOptions = ref<selectOptions>([])
+const getFlightStatusOptions = async () => {}
+const getFlightWarningOptions = async () => {}
+const getWaybillTypeOptions = async () => {}
+const getSelectOptions = () => {
+  getFlightStatusOptions()
+  getFlightWarningOptions()
+  getWaybillTypeOptions()
+}
+onMounted(() => {
+  getSelectOptions()
+})
 </script>
 
 <style scoped lang="scss">
@@ -103,17 +116,15 @@ const waybillTypeOptions = ref<selectOptions[]>([])
     &:not(:last-of-type) {
       margin-right: 8px;
     }
-    .el-input__wrapper {
-      padding: 1px 8px;
-      .el-input__inner {
+
+    .el-input__inner {
+      font-size: 14px;
+      font-family: Helvetica, Microsoft YaHei;
+      color: #303133;
+      &::-webkit-input-placeholder {
         font-size: 14px;
         font-family: Helvetica, Microsoft YaHei;
         color: #303133;
-        &::-webkit-input-placeholder {
-          font-size: 14px;
-          font-family: Helvetica, Microsoft YaHei;
-          color: #303133;
-        }
       }
     }
   }

+ 21 - 3
src/views/realTime/components/StationView/index.vue

@@ -1,7 +1,10 @@
 <template>
   <div class="station-view">
     <div class="station-header">
-      <StationForm :international="international" />
+      <StationForm
+        :international="international"
+        @form-data-change="formDataChangeHandler"
+      />
       <div class="station-count">
         <CountBox
           :count-number="tableDataCount.waybillCount"
@@ -66,7 +69,7 @@
 </template>
 <script lang="ts" setup>
 import { PropType } from 'vue'
-import type { CellSlotProps } from '../../hooks/useTableStyle'
+import type { StationFormData, CellSlotProps } from '../../type'
 import StationForm from '../../components/StationForm/index.vue'
 import ColumnSet from '../../components/ColumnSet/index.vue'
 import CountBox from '../../components/CountBox/index.vue'
@@ -94,11 +97,26 @@ const international = computed(() =>
     props.stationViewName
   )
 )
+const formData: StationFormData = {
+  startDate: '',
+  endDate: '',
+  flightStatus: '',
+  flightWarning: '',
+  waybillType: '',
+}
+const formDataChangeHandler = (data: StationFormData) => {
+  Object.keys(data).forEach(key => {
+    formData[key] = data[key]
+  })
+}
 
 const goodsCountFlag = ref(true)
 const UTCFlag = ref(true)
 
-const { tableColumns, tableData } = useTableData(props.stationViewName)
+const { tableColumns, tableData } = useTableData(
+  props.stationViewName,
+  formData
+)
 const { columnChecked, filteredColumns } = useTableColumnSet(tableColumns)
 const { rowClass, cellClass } = useTableStyle()
 

+ 2 - 2
src/views/realTime/departure/flight/index.vue

@@ -68,7 +68,7 @@ import tableColumnSet from "@/components/tableColumnSet/index.vue";
 import {CaretRight} from "@element-plus/icons-vue"
 import { Ref, ref } from 'vue';
 import useTableExport from "../../hooks/useTableExport";
-import { ElTable } from "element-plus";
+import { TableInstance } from "element-plus";
 
 const state = reactive({
   tableHeader: [
@@ -214,7 +214,7 @@ const { exportToExcel } = useTableExport()
 const downLoad=(data) =>{
   const table = ref((domeTable.value as InstanceType<typeof tableTemp>).table)
   exportToExcel({
-    table: table as Ref<InstanceType<typeof ElTable>>
+    table: table as Ref<TableInstance>
   })
 }
 

+ 1 - 23
src/views/realTime/hooks/useTableCellClick.ts

@@ -1,26 +1,4 @@
-import type {
-  TableColumn,
-  TableColumnInGroup,
-} from '../components/ColumnSet/index.vue'
-import type { CSSProperties } from 'vue'
-
-type CellSlotProps = {
-  column: TableColumn | TableColumnInGroup
-  columns: TableColumn[] | TableColumnInGroup[]
-  columnIndex: number
-  depth: number
-  style: CSSProperties
-  rowData: any
-  rowIndex: number
-  isScrolling: boolean
-  expandIconProps?:
-    | {
-        rowData: any
-        rowIndex: number
-        onExpand: (expand: boolean) => void
-      }
-    | undefined
-}
+import type { CellSlotProps } from '../type'
 
 export default function useTableCellClick() {
   const router = useRouter()

+ 1 - 1
src/views/realTime/hooks/useTableColumnSet.ts

@@ -2,7 +2,7 @@ import type {
   KeyType,
   TableColumn,
   TableColumnInGroup,
-} from '../components/ColumnSet/index.vue'
+} from '../type'
 import { Ref } from 'vue'
 
 export default function useTableColumnSet(

+ 6 - 2
src/views/realTime/hooks/useTableData.ts

@@ -2,7 +2,8 @@ import type {
   KeyType,
   TableColumn,
   TableColumnInGroup,
-} from '../components/ColumnSet/index.vue'
+  StationFormData,
+} from '../type'
 
 type TableColumnsGroup = {
   groupTitle: string
@@ -509,7 +510,10 @@ const tableDatas = {
   ],
 }
 
-export default function useTableData(tableDataSource: TableDataSource) {
+export default function useTableData(
+  tableDataSource: TableDataSource,
+  formData: StationFormData
+) {
   const tableColumns = ref<TableColumnInGroup[] | TableColumn[]>([])
   const tableData = ref<{}[]>([])
   const getTableData = () => {

+ 2 - 11
src/views/realTime/hooks/useTableExport.ts

@@ -1,17 +1,8 @@
-import { Ref } from 'vue'
-import { ElMessage, ElTable } from 'element-plus'
+import type { ExportHandler } from '../type'
+import { ElMessage } from 'element-plus'
 import * as XLSX from 'xlsx'
 import FileSaver from 'file-saver'
 
-type ElTableType = InstanceType<typeof ElTable>
-interface ExportOptions {
-  table: ElTableType | Ref<ElTableType>
-  sheetName?: string
-  fileName?: string
-  headerRowNumber?: number
-}
-type ExportHandler = (option: ExportOptions) => void
-
 export default function useTableExport() {
   const exportToExcel: ExportHandler = ({
     table,

+ 2 - 20
src/views/realTime/hooks/useTableStyle.ts

@@ -1,8 +1,8 @@
 import type {
   TableColumn,
   TableColumnInGroup,
-} from '../components/ColumnSet/index.vue'
-import type { CSSProperties } from 'vue'
+  CellSlotProps
+} from '../type'
 
 type RowClassGetter = (param: {
   columns: TableColumn[] | TableColumnInGroup[]
@@ -10,24 +10,6 @@ type RowClassGetter = (param: {
   rowIndex: number
 }) => string
 
-export type CellSlotProps = {
-  column: TableColumn | TableColumnInGroup
-  columns: TableColumn[] | TableColumnInGroup[]
-  columnIndex: number
-  depth: number
-  style: CSSProperties
-  rowData: any
-  rowIndex: number
-  isScrolling: boolean
-  expandIconProps?:
-    | {
-        rowData: any
-        rowIndex: number
-        onExpand: (expand: boolean) => void
-      }
-    | undefined
-}
-
 type CellClassGetter = (param: CellSlotProps) => string
 
 const defaultCellClass = 'el-table-v2__cell-text'

+ 51 - 0
src/views/realTime/type.d.ts

@@ -0,0 +1,51 @@
+import { Ref } from 'vue'
+import type { TableInstance, Column } from 'element-plus'
+import type { CSSProperties } from 'vue'
+
+export type StationFormData = {
+  startDate: string
+  endDate: string
+  flightStatus: string
+  flightWarning: string
+  waybillType: string
+}
+export type selectOptions = {
+  label: string | number
+  value: string | number | boolean | object
+}[]
+export type KeyType = string | number | symbol
+export interface TableColumn<T = any> extends Column<T> {
+  dataKey: KeyType
+  title: string
+}
+export interface TableColumnInGroup<T = any> extends TableColumn<T> {
+  groupTitle: string
+}
+export interface tableColumnGroup {
+  title: string
+  columns: TableColumnInGroup[]
+}
+export type CellSlotProps = {
+  column: TableColumn | TableColumnInGroup
+  columns: TableColumn[] | TableColumnInGroup[]
+  columnIndex: number
+  depth: number
+  style: CSSProperties
+  rowData: any
+  rowIndex: number
+  isScrolling: boolean
+  expandIconProps?:
+    | {
+        rowData: any
+        rowIndex: number
+        onExpand: (expand: boolean) => void
+      }
+    | undefined
+}
+interface ExportOptions {
+  table: TableInstance | Ref<TableInstance>
+  sheetName?: string
+  fileName?: string
+  headerRowNumber?: number
+}
+export type ExportHandler = (option: ExportOptions) => void

+ 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" });
   }
 };
 //删除

+ 55 - 47
src/views/systemSettings/queryTemplate/queryTemplateAdd.vue

@@ -13,66 +13,64 @@
       </template></Minheader
     >
     <div class="app-container">
-      <el-form :model="tableForm">
+      <el-form :model="ruleForm">
         <el-row :gutter="24">
-          <el-col :span="5">
+          <el-col :span="6">
             <el-form-item label="查询模板名称" size="default">
               <el-input
-                v-model="tableForm.queryTemplateName"
+                v-model="ruleForm.queryTemplateName"
                 placeholder="请输入查询模板名称"
               />
             </el-form-item>
           </el-col>
-          <el-col :span="5">
+          <el-col :span="6">
             <el-form-item label="数据源" prop="dataSourceID" size="default">
               <el-select
-                v-model="tableForm.dataSourceID"
+                v-model="ruleForm.dataSourceID"
                 placeholder="请选择"
                 clearable
               >
                 <el-option
-                  v-for="item in tableOptionser"
-                  :key="item.v"
-                  :label="item.k"
-                  :value="item.v"
+                  v-for="item in dataSourceList"
+                  :key="item.dataSourceID"
+                  :label="item.dataSourceName"
+                  :value="item.dataSourceID"
                 />
               </el-select>
             </el-form-item>
-            <!-- <el-form-item label="查询协议" size="default">
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="服务名称" prop="submitID" size="default">
               <el-select
-                style="width: 100%"
-                v-model="tableForm.china"
-                class="input-shadow"
-                filterable
-                default-first-option
+                v-model="ruleForm.submitID"
+                placeholder="请选择"
                 clearable
-                placeholder="请选择查询协议"
               >
                 <el-option
-                  v-for="item in tableOptionser"
-                  :key="item.v ? item.v : item.planDepartureApt"
-                  :label="item.k ? item.k : item.planDepartureApt"
-                  :value="item.v ? item.v : item.planDepartureApt"
-                >
-                </el-option>
+                  v-for="item in serviceList"
+                  :key="item.submitID"
+                  :label="item.serviceName"
+                  :value="item.submitID"
+                />
               </el-select>
-            </el-form-item> -->
+            </el-form-item>
           </el-col>
-          <el-col :span="14">
-            <el-form-item label="查询模板描述" size="default">
+          <el-col :span="6">
+            <el-form-item label="每页显示" prop="pageRows" size="default">
               <el-input
-                v-model="tableForm.queryTemplateDescribe"
-                placeholder="请输入查询模板描述"
+                v-model="ruleForm.pageRows"
+                size="medium"
+                placeholder="请输入每页显示行数"
+                type="number"
+                clearable
               />
             </el-form-item>
           </el-col>
           <el-col>
-            <el-form-item label="查询配置" size="default">
+            <el-form-item label="查询模板描述" size="default">
               <el-input
-                :autosize="{ minRows: 4, maxRows: 4 }"
-                type="textarea"
-                v-model="tableForm.two"
-                placeholder="请输入查询配置"
+                v-model="ruleForm.queryTemplateDescribe"
+                placeholder="请输入查询模板描述"
               />
             </el-form-item>
           </el-col>
@@ -81,7 +79,7 @@
               <el-input
                 :autosize="{ minRows: 24, maxRows: 24 }"
                 type="textarea"
-                v-model="tableForm.serviceName"
+                v-model="ruleForm.serviceName"
                 placeholder="请输入查询语句"
               />
             </el-form-item>
@@ -95,43 +93,47 @@
 <script setup lang="ts">
 import Minheader from "@/components/minheader/index.vue";
 import { Query, myQuery } from "@/api/webApi";
+import { ElMessage } from "element-plus";
 const router = useRouter();
-const tableOptionser = ref<Array>([]); //下拉
-const tableForm = reactive({
+const asShOW = ref<boolean>(false);
+const dataSourceList = ref<Array>([]); //下拉
+const serviceList = ref<Array>([]); //下拉
+const ruleForm = reactive({
   queryTemplateName: "",
   queryTemplateDescribe: "",
   submitID: null,
   queryTemplate: "",
   pageRows: null,
-  serviceName: "",
-  dataSourceID: "",
 }); //内容
 //保存
 const preserForm = async () => {
   const params = {
-    ...tableForm,
-    submitID: tableForm.serviceID,
+    ...ruleForm,
+    submitID: ruleForm.serviceID,
   };
   delete params.serviceID;
   try {
     const res = await Query({
-      serviceId: "5",
+      serviceId: SERVICE_ID.sysQueryTabId,
       dataContent: JSON.stringify(params),
     });
     if (Number(res.code) === 0) {
+      ElMessage.success(`成功`);
+      router.push({ path: "/systemSettings/queryTemplate" });
       // this.$message.success(res.message ?? "成功");
       // this.$router.push("/systemSettings/queryTemplate");
     } else {
+      ElMessage.error(`失败`);
       // this.$message.error(res.message ?? "失败");
     }
   } catch (error) {
-    // this.$message.error("失败");
+    ElMessage.error(`失败`);
   }
   // router.push({ path: "/systemSettings/queryTemplate" });
 };
 const getDataSourceList = async () => {
-  const tableOptionser = await getSelectOption(13);
-  tableOptionser.value = tableOptionser.map((item) => {
+  const dataSourceLists = await getSelectOption(13);
+  dataSourceList.value = dataSourceLists.map((item) => {
     item[item.setlabel] = item.k;
     item[item.setvalue] = item.v;
     return item;
@@ -146,10 +148,16 @@ const getSelectOption = async (ID) => {
     return [];
   }
 };
-
-onMounted(() => {
-  getDataSourceList();
-});
+const queryServiceList = async (ID) => {
+  const serviceLists = await getSelectOption(DATACONTENT_ID.sysServiceTabId);
+  serviceList.value = serviceLists.map((item) => {
+    item[item.setlabel] = item.k;
+    item[item.setvalue] = item.v;
+    return item;
+  });
+};
+getDataSourceList();
+queryServiceList();
 </script>
 
 <style lang="scss" scoped>

+ 3 - 0
typings/global.d.ts

@@ -7,6 +7,9 @@ declare global {
   declare let GLOBAL_VAR: any
   declare let defineOptions: any
   declare let $ref: any
+  declare const PLATFROM_CONFIG: any
+  declare const LOOP_INTERVAL: any
+  declare const DATACONTENT_ID: any
 }
 
 export {}