Browse Source

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

zhongxiaoyu 2 years ago
parent
commit
842c475990

+ 97 - 99
src/views/BasicsData/airportInfo/airportInfoChild/index.vue

@@ -1,67 +1,66 @@
 <template>
-  <keep-alive>
-    <div class="airportInfo scroll-y">
-      <div class="wrap">
-        <Minheader :is-auth="true" :is-statuser="true" @addForm="addForm">
-          <template #header>
-            <div class="status flex-wrap">
-              <div class="manageTitle">区域设置</div>
-            </div>
-          </template></Minheader
-        >
-        <div class="app-containers">
-          <DataTable
-            :tableHeader="tableCols"
-            :tableData="tableData"
-            :tableBtnGroup="tableBtnGroup"
-            :tableProperty="{ rowKey: 'ID' }"
-            @btnClick="btnClick"
-          />
-        </div>
-        <Dialog
-          :flag="flag"
-          :type="type"
-          :msgTitle="msgTitle"
-          :delName="tableForm.terminalName"
-          @resetForm="resetForm"
-          @delRest="delRest"
-          @submitForm="submitForm"
-          @delRemove="delRemove"
-        >
-          <div class="diacont">
-            <el-form
-              :model="tableForm"
-              :rules="formRules"
-              ref="airportInfoChildForm"
-            >
-              <el-row :gutter="24">
-                <el-col>
-                  <el-form-item
-                    label="区域名称"
-                    size="default"
-                    prop="terminalName"
-                    :rules="formRules.isNotNull"
-                  >
-                    <el-input
-                      v-model="tableForm.terminalName"
-                      placeholder="请输入区域名称"
-                    />
-                  </el-form-item>
-                </el-col>
-                <el-col>
-                  <el-form-item
-                    label="区域编码"
-                    size="default"
-                    prop="terminalID"
-                    :rules="formRules.isNotNull"
-                  >
-                    <el-input
-                      v-model="tableForm.terminalID"
-                      placeholder="请输入区域编码"
-                    />
-                  </el-form-item>
-                </el-col>
-                <!-- <el-col>
+  <div class="airportInfo scroll-y">
+    <div class="wrap">
+      <Minheader :is-auth="true" :is-statuser="true" @addForm="addForm">
+        <template #header>
+          <div class="status flex-wrap">
+            <div class="manageTitle">区域设置</div>
+          </div>
+        </template></Minheader
+      >
+      <div class="app-containers">
+        <DataTable
+          :tableHeader="tableCols"
+          :tableData="tableData"
+          :tableBtnGroup="tableBtnGroup"
+          :tableProperty="{ rowKey: 'ID' }"
+          @btnClick="btnClick"
+        />
+      </div>
+      <Dialog
+        :flag="flag"
+        :type="type"
+        :msgTitle="msgTitle"
+        :delName="tableForm.terminalName"
+        @resetForm="resetForm"
+        @delRest="delRest"
+        @submitForm="submitForm"
+        @delRemove="delRemove"
+      >
+        <div class="diacont">
+          <el-form
+            :model="tableForm"
+            :rules="formRules"
+            ref="airportInfoChildForm"
+          >
+            <el-row :gutter="24">
+              <el-col>
+                <el-form-item
+                  label="区域名称"
+                  size="default"
+                  prop="terminalName"
+                  :rules="formRules.isNotNull"
+                >
+                  <el-input
+                    v-model="tableForm.terminalName"
+                    placeholder="请输入区域名称"
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col>
+                <el-form-item
+                  label="区域编码"
+                  size="default"
+                  prop="terminalID"
+                  :rules="formRules.isNotNull"
+                >
+                  <el-input
+                    v-model="tableForm.terminalID"
+                    placeholder="请输入区域编码"
+                  />
+                </el-form-item>
+              </el-col>
+              <!-- <el-col>
                 <el-form-item
                   label="机场三字码"
                   size="default"
@@ -75,31 +74,30 @@
                   />
                 </el-form-item>
               </el-col> -->
-                <el-col>
-                  <el-form-item label="机场名称" size="default">
-                    <el-input
-                      disabled
-                      v-model="tableForm.abbreviation"
-                      placeholder="请输入机场名称"
-                    />
-                  </el-form-item>
-                </el-col>
-                <el-col :span="24">
-                  <el-form-item label="备注" size="default">
-                    <el-input
-                      type="textarea"
-                      v-model="tableForm.remarks"
-                      placeholder="请输入备注"
-                    />
-                  </el-form-item>
-                </el-col>
-              </el-row>
-            </el-form>
-          </div>
-        </Dialog>
-      </div>
+              <el-col>
+                <el-form-item label="机场名称" size="default">
+                  <el-input
+                    disabled
+                    v-model="tableForm.abbreviation"
+                    placeholder="请输入机场名称"
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="备注" size="default">
+                  <el-input
+                    type="textarea"
+                    v-model="tableForm.remarks"
+                    placeholder="请输入备注"
+                  />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </div>
+      </Dialog>
     </div>
-  </keep-alive>
+  </div>
 </template>
 <script setup lang="ts">
 import DataTable from "@/components/tableTemp/index.vue";
@@ -158,14 +156,14 @@ const state = reactive({
   ],
   listLoading: true,
 });
-// tableForm.airportCode = route.query.IATACode
-//   ? route.query.IATACode
-//   : Cookies.get("IATACode");
-// tableForm.abbreviation = route.query.abbreviation
-//   ? route.query.abbreviation
-//   : Cookies.get("abbreviation");
-tableForm.airportCode = route.query.IATACode;
-tableForm.abbreviation = route.query.abbreviation;
+tableForm.airportCode = route.query.IATACode
+  ? route.query.IATACode
+  : Cookies.get("IATACode");
+tableForm.abbreviation = route.query.abbreviation
+  ? route.query.abbreviation
+  : Cookies.get("abbreviation");
+// tableForm.airportCode = route.query.IATACode;
+// tableForm.abbreviation = route.query.abbreviation;
 //新增
 const addForm = () => {
   msgTitle.value = "新增区域";
@@ -243,7 +241,7 @@ const getQuery = async () => {
       id: DATACONTENT_ID.terminalTableId,
       needPage: ++page.value,
       dataContent: [
-        route.query.IATACode ? route.query.IATACode : Cookies.get("IATACode"),
+        route.query.IATACode ? tableForm.airportCode : Cookies.get("IATACode"),
       ],
     });
     if (code === "0") {
@@ -259,8 +257,8 @@ const getQuery = async () => {
       }
       tableData.value.push(...returnData.listValues);
       tableData.value.forEach((element) => {
-        element.abbreviation = route.query.abbreviation
-          ? route.query.abbreviation
+        element.abbreviation = tableForm.abbreviation
+          ? tableForm.abbreviation
           : Cookies.get("abbreviation");
       });
       tableCols.value = returnData.columnSet;
@@ -299,7 +297,7 @@ const resetTable = () => {
 const generalDataReception = async (data) => {
   try {
     let obj = {
-      IATACode: route.query.IATACode,
+      IATACode: tableForm.airportCode,
     };
     data = {
       ...data,

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

@@ -439,8 +439,8 @@ const btnClick = (row, index, param) => {
     tableForm.companyName = index.companyName;
     tableForm.event = index.event;
   } else if (param === 4) {
-    // Cookies.set("IATACode", index.IATACode);
-    // Cookies.set("abbreviation", index.abbreviation);
+    Cookies.set("IATACode", index.IATACode);
+    Cookies.set("abbreviation", index.abbreviation);
     router.push({
       path: "/BasicsData/airportInfoChild",
       query: {

+ 3 - 1
src/views/BasicsData/index.vue

@@ -1,5 +1,7 @@
 <template>
   <div>
-    <router-view />
+    <keep-alive include="AirportInfoChild">
+      <router-view />
+    </keep-alive>
   </div>
 </template>

+ 41 - 79
src/views/realTime/components/GoodsView/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="goods">
     <div class="goods-info">
-      <div class="goods-info-title">运单基本信息</div>
+      <div class="goods-info-title">货物基本信息</div>
       <div class="goods-info-content">
         <div v-for="item in goodsInfoItems" :key="item.key" class="info-item">
           {{ item.label }}:{{ goodsInfo[item.key] }}
@@ -10,55 +10,28 @@
     </div>
     <div class="goods-header flex">
       <div class="goods-header-title flex-wrap">
-        <div class="manageTitle">运单跟踪信息</div>
+        <div class="manageTitle">货物跟踪信息</div>
         <div class="status">正常</div>
       </div>
       <div class="goods-header-operate flex-wrap">
         <Search @clear="clear" @search="search" />
-        <el-button
-          class="button-sqaure"
-          :icon="Download"
-          color="#ac014d"
-          @click="downloadHandler"
-        />
-        <ColumnSet
-          class="button-sqaure"
-          :table-columns="tableColumns"
-          @checked-submit="columnChecked"
-        />
+        <el-button class="button-sqaure" :icon="Download" color="#ac014d" @click="downloadHandler" />
+        <ColumnSet class="button-sqaure" :table-columns="tableColumns" @checked-submit="columnChecked" />
       </div>
     </div>
-    <div
-      :style="{
+    <div :style="{
         maxHeight: trackAirlines.length > 1 ? `${208 * 2 + 8}px` : '208px',
-      }"
-      class="goods-track"
-    >
+      }" class="goods-track">
       <el-scrollbar always>
         <div class="goods-track-warpper">
-          <div
-            v-for="trackAirline in trackAirlines"
-            :key="trackAirline.flightNO"
-            class="goods-track-row"
-          >
-            <div
-              v-for="(trackAirport, index) in trackAirline.airports"
-              :key="trackAirport.airport"
-              class="goods-track-box"
-              :style="trackBoxStyle(trackAirline.airports, index)"
-            >
+          <div v-for="trackAirline in trackAirlines" :key="trackAirline.flightNO" class="goods-track-row">
+            <div v-for="(trackAirport, index) in trackAirline.airports" :key="trackAirport.airport" class="goods-track-box" :style="trackBoxStyle(trackAirline.airports, index)">
               <div class="title flex-wrap">
-                <span v-if="index === 0" class="title-span"
-                  >航班号:{{ trackAirline.flightNO }}</span
-                >
-                <span class="title-span"
-                  >{{ trackAirport.isDeparture ? '出港' : '进港' }}:{{
+                <span v-if="index === 0" class="title-span">航班号:{{ trackAirline.flightNO }}</span>
+                <span class="title-span">{{ trackAirport.isDeparture ? '出港' : '进港' }}:{{
                     trackAirport.airport
-                  }}</span
-                >
-                <span class="title-span"
-                  >日期:{{ trackAirline.flightDate }}</span
-                >
+                  }}</span>
+                <span class="title-span">日期:{{ trackAirline.flightDate }}</span>
               </div>
               <Steps :steps="trackAirport.trackSteps" />
             </div>
@@ -67,16 +40,7 @@
       </el-scrollbar>
     </div>
     <div class="goods-list">
-      <SimpleTable
-        ref="tableRef"
-        :data="tableData"
-        :columns="filteredColumns"
-        scrollbar-always-on
-        :row-class-name="rowClass"
-        :cell-class-name="cellClass"
-        :column-props="{ formatter }"
-        @cell-click="cellClickHandler"
-      />
+      <SimpleTable ref="tableRef" :data="tableData" :columns="filteredColumns" scrollbar-always-on :row-class-name="rowClass" :cell-class-name="cellClass" :column-props="{ formatter }" @cell-click="cellClickHandler" />
     </div>
   </div>
 </template>
@@ -87,7 +51,6 @@ import Search from '@/components/search/index.vue'
 import Steps from '@/components/steps/index.vue'
 import ColumnSet from '../../components/ColumnSet/index.vue'
 import SimpleTable from '@/components/SimpleTable/index.vue'
-import { CommonData } from '~/common'
 import useTrackData from '../../hooks/useTrackData'
 import useTable from '../../hooks/useTable'
 import useTableColumnSet from '../../hooks/useTableColumnSet'
@@ -95,7 +58,6 @@ import useTableExport from '../../hooks/useTableExport'
 import useTableStyle from '../../hooks/useTableStyle'
 import useTableCellClick from '../../hooks/useTableCellClick'
 import { Query } from '@/api/webApi'
-import { ElMessage } from 'element-plus'
 import useGoodsInfo from './useGoodsInfo'
 
 const props = defineProps({
@@ -103,22 +65,22 @@ const props = defineProps({
     type: String,
     required: true,
   },
-})
+});
 
-const route = useRoute()
-const { goodsNO, waybillNO } = route.query
+const route = useRoute();
+const { goodsNO, waybillNO } = route.query;
 
 const { goodsInfoItems, goodsInfo } = useGoodsInfo(props.name, [
   goodsNO as string,
 ])
 
 interface Airline {
-  C0: string // 航班号
-  C1: string // 机场
-  C2: string // 航班日期
-  C3: number // 起飞/降落
+  C0: string; // 航班号
+  C1: string; // 机场
+  C2: string; // 航班日期
+  C3: number; // 起飞/降落
 }
-const goodsAirlines = ref<Airline[]>([])
+const goodsAirlines = ref<Airline[]>([]);
 const getGoodsAirlines = async () => {
   try {
     const {
@@ -128,15 +90,15 @@ const getGoodsAirlines = async () => {
     } = await Query<Airline>({
       id: DATACONTENT_ID.goodsAirline,
       dataContent: [goodsNO],
-    })
+    });
     if (Number(code) !== 0) {
-      throw new Error(message || '失败')
+      throw new Error(message || "失败");
     }
-    goodsAirlines.value = listValues
+    goodsAirlines.value = listValues;
   } catch (error) {
-    console.error(error)
+    console.error(error);
   }
-}
+};
 // onMounted(() => {
 //   getGoodsAirlines()
 // })
@@ -149,34 +111,34 @@ const trackDataContentList = computed(() =>
     isDeparture: C3,
     dataContent: [waybillNO, goodsNO] as string[],
   }))
-)
+);
 const { trackAirlines, trackBoxStyle } = useTrackData(
   props.name,
   trackDataContentList
-)
+);
 
 const dataContent = [waybillNO, goodsNO] as string[]
 const { tableColumns, tableData } = useTable(`${props.name}Flight`, dataContent)
 
 const search = (text: string) => {
-  console.log(text)
-}
-const clear = () => {}
+  console.log(text);
+};
+const clear = () => {};
 
-const tableRef = ref<InstanceType<typeof SimpleTable> | null>(null)
-const { exportToExcel } = useTableExport()
+const tableRef = ref<InstanceType<typeof SimpleTable> | null>(null);
+const { exportToExcel } = useTableExport();
 const downloadHandler = () => {
-  const table = tableRef.value!.table!
-  exportToExcel({ table })
-}
+  const table = tableRef.value!.table!;
+  exportToExcel({ table });
+};
 const formatter = (row, column, cellValue, index) => {
-  if (column.property === 'C7') {
-    return String(cellValue ?? '').replace(' ', '\n')
+  if (column.property === "C7") {
+    return String(cellValue ?? "").replace(" ", "\n");
   }
-  return cellValue
-}
+  return cellValue;
+};
 
-const { filteredColumns, columnChecked } = useTableColumnSet(tableColumns)
+const { filteredColumns, columnChecked } = useTableColumnSet(tableColumns);
 
 const { rowClass, cellClass } = useTableStyle(`${props.name}Flight`)
 

+ 68 - 10
src/views/userManagement/application/index.vue

@@ -7,21 +7,77 @@
       </div>
     </div>
     <div class="application-content">
-      <Table :tableHeader="tableHeader" @btnClick="btnClick" :tableBtnGroup="tableBtnGroup" :tableData="tableData" />
+      <Table
+        :tableHeader="tableHeader"
+        @btnClick="btnClick"
+        :tableBtnGroup="tableBtnGroup"
+        :tableData="tableData"
+      />
     </div>
     <!--删除弹框-->
-    <Dialog :flag="flag" msgTitle="删除应用" type="del" :delName="title" @delRest="delRest" @delRemove="remove" />
+    <Dialog
+      :flag="flag"
+      msgTitle="删除应用"
+      type="del"
+      :delName="title"
+      @delRest="delRest"
+      @delRemove="remove"
+    />
     <!--新增/编辑-->
-    <Dialog :flag="editDialogVisible" :msgTitle="editDialogTitle" @submitForm="submitForm(ruleFormRef)" @resetForm="resetForm(ruleFormRef)" :show-flag="true">
-      <el-form ref="ruleFormRef" :model="ruleForm" label-width="110px" class="demo-ruleForm">
-        <el-form-item label="应用名称" prop="app_name">
-          <el-input v-model="ruleForm.app_name" size="default" placeholder="请输入应用名称" />
+    <Dialog
+      :flag="editDialogVisible"
+      :msgTitle="editDialogTitle"
+      @submitForm="submitForm(ruleFormRef)"
+      @resetForm="resetForm(ruleFormRef)"
+      :show-flag="true"
+    >
+      <el-form
+        ref="ruleFormRef"
+        :model="ruleForm"
+        label-width="110px"
+        class="demo-ruleForm"
+      >
+        <el-form-item
+          label="应用名称"
+          prop="app_name"
+          :rules="formRules.isNotNull"
+        >
+          <el-input
+            v-model="ruleForm.app_name"
+            size="default"
+            placeholder="请输入应用名称"
+          />
         </el-form-item>
-        <el-form-item label="appid" prop="app_show_id">
-          <el-input v-model="ruleForm.app_show_id" size="default" placeholder="请输入appid" />
+        <el-form-item
+          label="应用链接账号"
+          prop="app_show_id"
+          :rules="formRules.isNotNull"
+        >
+          <el-input
+            v-model="ruleForm.app_show_id"
+            size="default"
+            placeholder="请输入应用链接账号"
+          />
+        </el-form-item>
+        <el-form-item
+          label="应用链接密钥"
+          prop="app_show_id"
+          :rules="formRules.isNotNull"
+        >
+          <el-input
+            v-model="ruleForm.app_show_secret"
+            size="default"
+            placeholder="请输入应用链接密钥"
+          />
         </el-form-item>
         <el-form-item label="应用描述" prop="app_comment">
-          <el-input v-model="ruleForm.app_comment" size="default" type="textarea" :rows="3" placeholder="请输入应用描述" />
+          <el-input
+            v-model="ruleForm.app_comment"
+            size="default"
+            type="textarea"
+            :rows="3"
+            placeholder="请输入应用描述"
+          />
         </el-form-item>
       </el-form>
     </Dialog>
@@ -37,6 +93,7 @@ import table from "../hooks/useTable";
 const ruleFormRef = ref<FormInstance>();
 const tableHeader = ref<any>([]);
 const tableData = ref<any>([]);
+const formRules = useElement().formRules;
 const tableBtnGroup = [
   {
     name: "编辑",
@@ -58,6 +115,7 @@ const ruleForm = ref<any>({
   app_name: "",
   app_comment: "",
   app_show_id: "",
+  app_show_secre: "",
 });
 const rowIndex = ref(1);
 const searchInfo = ref("");
@@ -145,4 +203,4 @@ const resetForm = (formEl: FormInstance | undefined) => {
     height: calc(100% - 56px);
   }
 }
-</style>
+</style>