浏览代码

第三方检测整改-部分

zhongxiaoyu 1 年之前
父节点
当前提交
657fd94ede

+ 4 - 4
public/extraConfig.js

@@ -55,10 +55,10 @@ var NODE_CODE = {
     { nodeName: '机下交接', nodeCode: '出港货邮' },
     { nodeName: '装机', nodeCode: '装载完成' },
     { nodeName: '关闭舱门', nodeCode: '关闭舱门' },
-    { nodeName: '拉下登记', nodeCode: 'CARGOS_OFFLOAD' },
-    { nodeName: '拉回确认', nodeCode: 'OFFLOAD_CONFIRM' },
+    { nodeName: '拉下登记', nodeCode: 'CARGOS_OFFLOAD', defaultDisabled: true },
+    { nodeName: '拉回确认', nodeCode: 'OFFLOAD_CONFIRM', defaultDisabled: true },
     // { nodeName: '起飞', nodeCode: 'TAKEOFF', // 待定 },
-    { nodeName: '退运', nodeCode: 'BILL_RETURN' },
+    { nodeName: '退运', nodeCode: 'BILL_RETURN', defaultDisabled: true },
   ],
   arrival: [
     { nodeName: '卸机', nodeCode: 'CARGOS_ARR_HANDOVER' },
@@ -80,7 +80,7 @@ var NODE_CODE = {
     { nodeName: '交接复核', nodeCode: 'CARGOS_HANDOVER_STATUS_03' },
     { nodeName: '机下交接', nodeCode: '出港货邮' },
     { nodeName: '装机', nodeCode: '装载完成' },
-    { nodeName: '拉下', nodeCode: 'CARGOS_OFFLOAD' },
+    { nodeName: '拉下', nodeCode: 'CARGOS_OFFLOAD', defaultDisabled: true },
     // { nodeName: '退运', nodeCode: '' },
   ],
   internationalArrival: [

+ 3 - 3
src/components/steps/index.vue

@@ -166,7 +166,7 @@ const stepStyle = (index: number) => {
 <style lang="scss" scoped>
 .steps {
   height: calc(100% - 16px - 10px);
-  padding: 0 13px;
+  padding: 0 20px;
   display: flex;
   align-items: center;
   .step {
@@ -326,7 +326,7 @@ const stepStyle = (index: number) => {
         .step-info {
           top: 0;
           bottom: unset;
-          transform: translate(-50%, 12px);
+          transform: translate(-50%, 0);
         }
       }
       &.sub-step-down {
@@ -342,7 +342,7 @@ const stepStyle = (index: number) => {
           top: 20px;
         }
         .step-info {
-          transform: translate(-50%, -12px);
+          transform: translate(-50%, -20px);
         }
       }
     }

+ 21 - 0
src/store/timeZone.ts

@@ -0,0 +1,21 @@
+import { defineStore } from 'pinia'
+
+const savedUTCFlag = sessionStorage.getItem('UTCFlag')
+
+export const useTimeZoneStore = defineStore('timeZone', () => {
+  const UTCFlag = ref(Boolean(savedUTCFlag))
+
+  const toggleUTCFlag = (flag: boolean) => {
+    UTCFlag.value = flag
+    if (flag) {
+      sessionStorage.setItem('UTCFlag', 'true')
+    } else {
+      sessionStorage.removeItem('UTCFlag')
+    }
+  }
+
+  return {
+    UTCFlag,
+    toggleUTCFlag,
+  }
+})

+ 27 - 13
src/utils/validate.ts

@@ -172,23 +172,37 @@ export function translateDataToTreeAll(arr, parentKey, key) {
 
 export function datetimeToTime(
   datetimeValue: CommonValue,
-  currentDate: CommonValue
+  currentDate: CommonValue,
+  UTCFlag?: boolean
 ) {
-  if (typeof datetimeValue !== "string" || !datetimeValue) {
-    return "";
+  if (typeof datetimeValue !== 'string' || !datetimeValue) {
+    return ''
   }
-  if (typeof currentDate !== "string") {
-    return "";
+  if (typeof currentDate !== 'string') {
+    return ''
   }
-  const [date, time] = datetimeValue.trim().split(/[T|\s]+/);
-  let clipTime = time.slice(0, -3);
-  if (date !== currentDate) {
-    const days =
-      (new Date(date).getTime() - new Date(currentDate).getTime()) /
-      (24 * 60 * 60 * 1000);
-    clipTime += ` (${days > 0 ? "+" : ""}${days})`;
+  const [date, time] = datetimeValue.trim().split(/[T|\s]+/)
+  let clipTime = time.slice(0, -3)
+  let dateChange = false
+  if (UTCFlag) {
+    let [hourString, minuteString] = clipTime.split(':')
+    let hour = Number(hourString) - 8
+    if (hour < 0) {
+      dateChange = true
+      hour += 24
+    }
+    clipTime = `${String(hour).padStart(2, '0')}:${minuteString}`
+  }
+  let days =
+    (new Date(date).getTime() - new Date(currentDate).getTime()) /
+    (24 * 60 * 60 * 1000)
+  if (dateChange) {
+    days--
+  }
+  if (days) {
+    clipTime += ` (${days > 0 ? '+' : ''}${days})`
   }
-  return clipTime;
+  return clipTime
 }
 
 export const Format = (fmt, date) => {

+ 29 - 0
src/views/BasicsData/cargoInformation/index.vue

@@ -39,6 +39,19 @@
             ref="cargoInformationForm"
           >
             <el-row :gutter="24">
+              <el-col>
+                <el-form-item
+                  label="货代ID"
+                  size="default"
+                  prop="agentID"
+                  :rules="formRules.isNotNull"
+                >
+                  <el-input
+                    v-model="tableForm.agentID"
+                    placeholder="请输入货代ID"
+                  />
+                </el-form-item>
+              </el-col>
               <el-col>
                 <el-form-item
                   label="货代名称"
@@ -65,6 +78,19 @@
                   />
                 </el-form-item>
               </el-col>
+              <el-col>
+                <el-form-item
+                  label="货代等级"
+                  size="default"
+                  prop="level"
+                  :rules="formRules.isNotNull"
+                >
+                  <el-input
+                    v-model="tableForm.level"
+                    placeholder="请输入货代等级"
+                  />
+                </el-form-item>
+              </el-col>
               <el-col>
                 <el-form-item label="备注" size="default">
                   <el-input
@@ -103,6 +129,7 @@ const tableForm = reactive({
   agentID: "",
   agentName: "",
   agentCode: "",
+  level: "",
   agentDesc: "",
   event: "",
 }); //弹窗内容
@@ -181,6 +208,7 @@ const btnClick = (row, index, param) => {
     tableForm.agentID = index.agentID;
     tableForm.agentName = index.agentName;
     tableForm.agentCode = index.agentCode;
+    tableForm.level = index.level;
     tableForm.agentDesc = index.agentDesc;
   } else if (param === 3) {
     msgTitle.value = "删除货代管理";
@@ -190,6 +218,7 @@ const btnClick = (row, index, param) => {
     tableForm.agentID = index.agentID;
     tableForm.agentName = index.agentName;
     tableForm.agentCode = index.agentCode;
+    tableForm.level = index.level;
     tableForm.agentDesc = index.agentDesc;
   } else if (param === 4) {
   }

+ 13 - 0
src/views/BasicsData/containerMaintenance/index.vue

@@ -39,6 +39,19 @@
             ref="containerMaintenanceForm"
           >
             <el-row :gutter="24">
+              <el-col>
+                <el-form-item
+                  label="容器类型ID"
+                  size="default"
+                  prop="containerID"
+                  :rules="formRules.isNotNull"
+                >
+                  <el-input
+                    v-model="tableForm.containerID"
+                    placeholder="请输入容器类型ID"
+                  />
+                </el-form-item>
+              </el-col>
               <el-col>
                 <el-form-item
                   label="容器类型名称"

+ 0 - 3
src/views/BasicsData/equipmentMaintenance/index.vue

@@ -286,9 +286,6 @@ const resetTable = () => {
 //新增-编辑-删除
 const generalDataReception = async (data) => {
   try {
-    data = {
-      ...data,
-    };
     const { code } = await GeneralDataReception({
       serviceId: serviceId.value,
       dataContent: JSON.stringify(data),

+ 13 - 0
src/views/BasicsData/specialCargoMaintenance/index.vue

@@ -39,6 +39,19 @@
             ref="specialCargoMaintenanceForm"
           >
             <el-row :gutter="24">
+              <el-col>
+                <el-form-item
+                  label="特殊货物类型ID"
+                  size="default"
+                  prop="specialTypeID"
+                  :rules="formRules.isNotNull"
+                >
+                  <el-input
+                    v-model="tableForm.specialTypeID"
+                    placeholder="请输入特殊货物类型ID"
+                  />
+                </el-form-item>
+              </el-col>
               <el-col>
                 <el-form-item
                   label="特殊货物类型名称"

+ 3 - 3
src/views/realTime/components/AirportView/AirportForm.vue

@@ -24,7 +24,7 @@
         :clearable="false"
       />
     </el-form-item>
-    <el-form-item :prop="formData.flightState" style="width: 134px">
+    <el-form-item :prop="formData.flightState" style="width: 104px">
       <el-select
         v-model="formData.flightState"
         size="default"
@@ -38,7 +38,7 @@
         />
       </el-select>
     </el-form-item>
-    <!-- <el-form-item :prop="formData.flightWarning" style="width: 104px">
+    <el-form-item :prop="formData.flightWarning" style="width: 104px">
       <el-select
         v-model="formData.flightWarning"
         size="default"
@@ -51,7 +51,7 @@
           :value="option.value"
         />
       </el-select>
-    </el-form-item> -->
+    </el-form-item>
     <!-- <el-form-item
       v-if="name.includes('International')"
       :prop="formData.waybillType"

+ 44 - 15
src/views/realTime/components/AirportView/index.vue

@@ -23,9 +23,13 @@
         <div v-permission="getPermission('count')">
           <CommonSwitch v-model:flag="countFlag" label="显示件数" />
         </div>
-        <!-- <div v-permission="getPermission('UTC')">
-          <CommonSwitch v-model:flag="UTCFlag" label="开启UTC" />
-        </div> -->
+        <div v-permission="getPermission('UTC')">
+          <CommonSwitch
+            :flag="UTCFlag"
+            label="开启UTC"
+            @update:flag="flag => timeZoneStore.toggleUTCFlag(flag)"
+          />
+        </div>
         <div v-permission="getPermission('columnSet')">
           <ColumnSet
             :table-columns="tableColumns"
@@ -72,6 +76,7 @@ import { useFormatter } from './useFormatter'
 import { CommonData } from '~/common'
 import { useLoop } from '@/hooks/useLoop'
 import { useTableSettingsStore } from '@/store/tableSettings'
+import { useTimeZoneStore } from '@/store/timeZone'
 import { useFlightState } from './useFlightState'
 import { Query } from '@/api/webApi'
 import { ElMessage, SummaryMethod } from 'element-plus'
@@ -158,13 +163,14 @@ const { warningNodesMap, getWarningNodes } = useFlightState(
 useLoop([getAirportCount, getTableData, getWarningNodes], 'airport', [formData])
 
 const countFlag = ref(false)
+const timeZoneStore = useTimeZoneStore()
+const { UTCFlag } = storeToRefs(timeZoneStore)
 const { tableColumnFormatter, tableDataFormatter } = useFormatter(
   countFlag,
-  tableColumnsCountIndexMap
+  tableColumnsCountIndexMap,
+  UTCFlag
 )
 
-// const UTCFlag = ref(true)
-
 const summaryMethod: SummaryMethod<CommonData> = ({ columns, data }) => {
   const sums: string[] = []
   columns.forEach((column, index) => {
@@ -427,25 +433,48 @@ const route = useRoute()
 const tableSettingsStore = useTableSettingsStore()
 const { savedTableFilterValueMap } = storeToRefs(tableSettingsStore)
 const defaultFilterValueMap = savedTableFilterValueMap.value[route.path]
-const flightStateFilter = computed<{} | { [x: string]: string[] }>(() => {
+const flightStateFilter = computed(() => {
+  const filters: { [x: string]: string[] } = {}
   switch (formData.flightState) {
     case 'hasTakenOff':
-      return { hasTakenOff: ['Y'] }
+      filters.hasTakenOff = ['Y']
+      break
     case 'hasNotTakenOff':
-      return { hasTakenOff: ['N'] }
+      filters.hasTakenOff = ['N']
+      break
     case 'hasLanded':
-      return { hasLanded: ['Y'] }
+      filters.hasLanded = ['Y']
+      break
     case 'hasNotLanded':
-      return { hasLanded: ['N'] }
+      filters.hasLanded = ['N']
+      break
     case 'canceled':
-      return { flightState: ['CAN'] }
+      filters.flightState = ['CAN']
+      break
     case 'groundService':
-      return { groundService: ['Y'] }
+      filters.groundService = ['Y']
+      break
     case 'groundServiceSZ':
-      return { groundServiceSZ: ['Y'] }
+      filters.groundServiceSZ = ['Y']
+      break
     default:
-      return {}
+      break
   }
+
+  switch (formData.flightWarning) {
+    case 'normal':
+      filters.warning = ['N']
+      filters.alarm = ['N']
+      break
+    case 'warning':
+      filters.warning = ['Y']
+      break
+    case 'alarm':
+      filters.alarm = ['Y']
+      break
+  }
+
+  return filters
 })
 
 const cacheKeys = ['IATACode']

+ 28 - 4
src/views/realTime/components/AirportView/useFlightState.ts

@@ -28,7 +28,9 @@ export function useFlightState(
   //   }
   // }
 
-  const warningNodesMap = reactive<{ [nodeCode: string]: WarningNode[] }>({})
+  const warningNodesMap = reactive<{
+    [rowKey: string]: { warningNodes: WarningNode[]; alarmNodes: WarningNode[] }
+  }>({})
   const getWarningNodes = async () => {
     try {
       const {
@@ -46,10 +48,20 @@ export function useFlightState(
         delete warningNodesMap[key]
       })
       listValues.forEach(node => {
-        if (warningNodesMap[node.node_code]) {
-          warningNodesMap[node.node_code].push({ ...node })
+        if (!node.alarm_type) {
+          return
+        }
+        const rowKey = `${node.iata_code}-${node.flight_no}-${node.flight_date}`
+        if (!warningNodesMap[rowKey]) {
+          warningNodesMap[rowKey] = {
+            warningNodes: [],
+            alarmNodes: [],
+          }
+        }
+        if (String(node.alarm_type) === '1') {
+          warningNodesMap[rowKey].warningNodes.push({ ...node })
         } else {
-          warningNodesMap[node.node_code] = [{ ...node }]
+          warningNodesMap[rowKey].alarmNodes.push({ ...node })
         }
       })
     } catch (error) {
@@ -109,6 +121,18 @@ export function useFlightState(
           row.hasLanded = 'N'
         }
       }
+
+      row.warning = 'N'
+      row.alarm = 'N'
+      if (row.rowKey && warningNodesMap[row.rowKey]) {
+        const { warningNodes, alarmNodes } = warningNodesMap[row.rowKey]
+        if (warningNodes.length) {
+          row.warning = 'Y'
+        }
+        if (alarmNodes.length) {
+          row.alarm = 'Y'
+        }
+      }
     })
   })
 

+ 4 - 3
src/views/realTime/components/AirportView/useFormatter.ts

@@ -1,10 +1,11 @@
 import { datetimeToTime } from '@/utils/validate'
 import { Ref } from 'vue'
-import { CommonTableFormatter } from '~/common'
+import { CommonTableFormatter, MaybeRef } from '~/common'
 
 export function useFormatter(
   flag: Ref<boolean>,
-  tableColumnsCountIndexMap: { [columnName: string]: number }
+  tableColumnsCountIndexMap: { [columnName: string]: number },
+  UTCFlag?: MaybeRef<boolean>
 ) {
   const tableColumnFormatter = (columnLabel: string) => {
     return unref(flag) ? columnLabel : columnLabel.replace(/(\/件)|(件\/)/, '')
@@ -55,7 +56,7 @@ export function useFormatter(
       // } else {
       //   return datetimeToTime(cellValue, row.flightDate)
       // }
-      return datetimeToTime(cellValue, row.flightDate)
+      return datetimeToTime(cellValue, row.flightDate, unref(UTCFlag))
     }
     if (property === 'jiahuo') {
       return cellValue ? '是' : ''

+ 6 - 3
src/views/realTime/components/WaybillView/index.vue

@@ -229,9 +229,9 @@ const tableData = computed(() => {
         execResult,
         execTime,
       } = current
-      const nodeValue = `${execPosition ?? ''}\n${
+      const nodeValue = `位置:${execPosition ?? '--'}\n结果:${
         execResult ? '通过' : '未通过'
-      }\n${execTime ?? ''}`
+      }\n时间:${execTime ?? ''}`
       if (sameRow) {
         sameRow[String(nodeCode)] = nodeValue
         ;[
@@ -290,7 +290,10 @@ const formatter: CommonTableFormatter = (row, column, cellValue, index) => {
   }
   const value = String(cellValue ?? '').split('\n')
   if (value[2]) {
-    value[2] = datetimeToTime(value[2], flightDate as CommonValue)
+    value[2] = `时间:${datetimeToTime(
+      value[2].replace('时间:', ''),
+      flightDate as CommonValue
+    )}`
   }
   return value.join('\n')
 }

+ 38 - 348
src/views/realTime/hooks/useTable.ts

@@ -136,114 +136,18 @@ const tableColumnsMap: {
       needFilters: 1,
       width: 60,
     },
-    {
-      columnLabel: '收运核单',
-      columnName: 'DEH',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    // {
-    //   columnLabel: '收运核查',
-    //   columnName: 'ACC_CHECK',
-    //   className: 'cell-filter cell-filter-green node-departure',
-    // },
-    // {
-    //   columnLabel: '拒运',
-    //   columnName: 'ACC_CHECK_2',
-    //   className: 'cell-filter cell-filter-green node-departure',
-    // },
-    {
-      columnLabel: '安检',
-      columnName: '安检',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '加货',
-      columnName: 'ACC_BUP',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '预配载',
-      columnName: 'LS_CARGO',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    // {
-    //   columnLabel: '待运区',
-    //   columnName: 'WAT_LOC',
-    //   className: 'cell-filter cell-filter-green node-departure',
-    // },
-    // {
-    //   columnLabel: '货站交接',
-    //   columnName: 'CARGOS_HANDOVER_STATUS_02',
-    //   className: 'cell-filter cell-filter-green node-departure',
-    // },
-    {
-      columnLabel: '交接复核',
-      columnName: 'CARGOS_HANDOVER_STATUS_03',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '机下交接',
-      columnName: '出港货邮',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '装机',
-      columnName: '装载完成',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '关闭舱门',
-      columnName: '关闭舱门',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '拉下登记',
-      columnName: 'CARGOS_OFFLOAD',
-      className: 'cell-filter cell-filter-green node-departure',
-      defaultDisabled: true,
-    },
-    {
-      columnLabel: '拉回确认',
-      columnName: 'OFFLOAD_CONFIRM',
-      className: 'cell-filter cell-filter-green node-departure',
-      defaultDisabled: true,
-    },
-    // {
-    //   columnLabel: '起飞',
-    //   columnName: 'C15',
-    //   className: 'cell-filter cell-filter-green node-departure',
-    // },
-    {
-      columnLabel: '退运',
-      columnName: 'BILL_RETURN',
-      className: 'cell-filter cell-filter-green node-departure',
-      defaultDisabled: true,
-    },
-    {
-      columnLabel: '卸机',
-      columnName: 'CARGOS_ARR_HANDOVER',
+    ...NODE_CODE.departure.map(node => ({
+      columnLabel: node.nodeName,
+      columnName: node.nodeCode,
+      className: 'cell-filter cell-filter-green node-departure',
+      defaultDisabled: node.defaultDisabled,
+    })),
+    ...NODE_CODE.arrival.map(node => ({
+      columnLabel: node.nodeName,
+      columnName: node.nodeCode,
       className: 'cell-filter cell-filter-cyan node-arrival',
-    },
-    {
-      columnLabel: '库区到达',
-      columnName: 'CARGOS_HANDOVER_STATUS_01',
-      className: 'cell-filter cell-filter-cyan node-arrival',
-    },
-    {
-      columnLabel: '货站交接',
-      columnName: '货站交接',
-      className: 'cell-filter cell-filter-cyan node-arrival',
-    },
-    {
-      columnLabel: '理货',
-      columnName: 'IMP_TALLY',
-      className: 'cell-filter cell-filter-cyan node-arrival',
-    },
-    {
-      columnLabel: '出库',
-      columnName: 'FSU_DLV',
-      className: 'cell-filter cell-filter-cyan node-arrival',
-    },
+      defaultDisabled: node.defaultDisabled,
+    })),
   ],
   DepartureWaybillPull: [
     {
@@ -392,114 +296,18 @@ const tableColumnsMap: {
     //   needFilters: 1,
     //   width: 60,
     // },
-    {
-      columnLabel: '卸机',
-      columnName: 'CARGOS_ARR_HANDOVER',
+    ...NODE_CODE.arrival.map(node => ({
+      columnLabel: node.nodeName,
+      columnName: node.nodeCode,
       className: 'cell-filter cell-filter-cyan node-arrival',
-    },
-    {
-      columnLabel: '库区到达',
-      columnName: 'CARGOS_HANDOVER_STATUS_01',
-      className: 'cell-filter cell-filter-cyan node-arrival',
-    },
-    {
-      columnLabel: '货站交接',
-      columnName: 'CARGOS_HANDOVER_STATUS_99',
-      className: 'cell-filter cell-filter-cyan node-arrival',
-    },
-    {
-      columnLabel: '理货',
-      columnName: 'IMP_TALLY',
-      className: 'cell-filter cell-filter-cyan node-arrival',
-    },
-    {
-      columnLabel: '出库',
-      columnName: 'FSU_DLV',
-      className: 'cell-filter cell-filter-cyan node-arrival',
-    },
-    {
-      columnLabel: '收运核单',
-      columnName: 'DEH',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    // {
-    //   columnLabel: '收运核查',
-    //   columnName: 'ACC_CHECK',
-    //   className: 'cell-filter cell-filter-green node-departure',
-    // },
-    // {
-    //   columnLabel: '拒运',
-    //   columnName: 'ACC_CHECK_2',
-    //   className: 'cell-filter cell-filter-green node-departure',
-    // },
-    {
-      columnLabel: '安检',
-      columnName: '安检',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '加货',
-      columnName: 'ACC_BUP',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '预配载',
-      columnName: 'LS_CARGO',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    // {
-    //   columnLabel: '待运区',
-    //   columnName: 'WAT_LOC',
-    //   className: 'cell-filter cell-filter-green node-departure',
-    // },
-    // {
-    //   columnLabel: '货站交接',
-    //   columnName: 'CARGOS_HANDOVER_STATUS_02',
-    //   className: 'cell-filter cell-filter-green node-departure',
-    // },
-    {
-      columnLabel: '交接复核',
-      columnName: 'CARGOS_HANDOVER_STATUS_03',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '机下交接',
-      columnName: '出港货邮',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '装机',
-      columnName: '装载完成',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '关闭舱门',
-      columnName: '关闭舱门',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '拉下登记',
-      columnName: 'CARGOS_OFFLOAD',
-      className: 'cell-filter cell-filter-green node-departure',
-      defaultDisabled: true,
-    },
-    {
-      columnLabel: '拉回确认',
-      columnName: 'OFFLOAD_CONFIRM',
-      className: 'cell-filter cell-filter-green node-departure',
-      defaultDisabled: true,
-    },
-    // {
-    //   columnLabel: '起飞',
-    //   columnName: 'C15',
-    //   className: 'cell-filter cell-filter-green node-departure',
-    // },
-    {
-      columnLabel: '退运',
-      columnName: 'BILL_RETURN',
-      className: 'cell-filter cell-filter-green node-departure',
-      defaultDisabled: true,
-    },
+      defaultDisabled: node.defaultDisabled,
+    })),
+    ...NODE_CODE.departure.map(node => ({
+      columnLabel: node.nodeName,
+      columnName: node.nodeCode,
+      className: 'cell-filter cell-filter-green node-departure',
+      defaultDisabled: node.defaultDisabled,
+    })),
   ],
   ArrivalGoodsFlight: [
     { columnLabel: '航班号', columnName: 'C0' },
@@ -637,72 +445,12 @@ const tableColumnsMap: {
       needFilters: 1,
       width: 60,
     },
-    {
-      columnLabel: '入园',
-      columnName: 'EPORTREL',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '海关',
-      columnName: 'MTREL_out',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '运抵',
-      columnName: 'FOH',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '安检',
-      columnName: 'REH',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '收运核单',
-      columnName: 'RCS',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '理货',
-      columnName: 'ACC_BUP',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    // {
-    //   columnLabel: '待运区',
-    //   columnName: 'WAT_LOC',
-    //   className: 'cell-filter cell-filter-green node-departure',
-    // },
-    // {
-    //   columnLabel: '货站交接',
-    //   columnName: 'CARGOS_HANDOVER_STATUS_02',
-    //   className: 'cell-filter cell-filter-green node-departure',
-    // },
-    {
-      columnLabel: '交接复核',
-      columnName: 'CARGOS_HANDOVER_STATUS_03',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '机下交接',
-      columnName: '出港货邮',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '装机',
-      columnName: '装载完成',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '拉下',
-      columnName: 'CARGOS_OFFLOAD',
+    ...NODE_CODE.internationalDeparture.map(node => ({
+      columnLabel: node.nodeName,
+      columnName: node.nodeCode,
       className: 'cell-filter cell-filter-green node-departure',
-      defaultDisabled: true,
-    },
-    {
-      columnLabel: '实配',
-      columnName: 'LS_CARGO',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
+      defaultDisabled: node.defaultDisabled,
+    })),
   ],
   InternationalDepartureWaybillPull: [
     {
@@ -861,41 +609,12 @@ const tableColumnsMap: {
       needFilters: 1,
       width: 100,
     },
-    {
-      columnLabel: '卸机',
-      columnName: 'FFM',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '机下交接',
-      columnName: 'CARGOS_HANDOVER_STATUS_01',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '货站交接',
-      columnName: 'CARGOS_HANDOVER_STATUS_99',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '理货',
-      columnName: 'RCF报',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '海关放行',
-      columnName: 'MTREL_in',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '出库',
-      columnName: 'DLV报',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    // {
-    //   columnLabel: '海关罚没',
-    //   columnName: 'C11',
-    //   className: 'cell-filter cell-filter-green node-departure',
-    // },
+    ...NODE_CODE.internationalArrival.map(node => ({
+      columnLabel: node.nodeName,
+      columnName: node.nodeCode,
+      className: 'cell-filter cell-filter-green node-arrival',
+      defaultDisabled: node.defaultDisabled,
+    })),
   ],
   InternationalArrivalGoodsFlight: [
     { columnLabel: '航班号', columnName: 'C0' },
@@ -984,41 +703,12 @@ const tableColumnsMap: {
       needFilters: 1,
       width: 60,
     },
-    {
-      columnLabel: '入园',
-      columnName: 'EPORTREL',
+    ...NODE_CODE.internationalDepartureTransfer.map(node => ({
+      columnLabel: node.nodeName,
+      columnName: node.nodeCode,
       className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '海关',
-      columnName: 'MTREL_out',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '运抵',
-      columnName: 'FOH',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '安检',
-      columnName: 'REH',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '收运核单',
-      columnName: 'RCS',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '理货',
-      columnName: 'ACC_BUP',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
-    {
-      columnLabel: '实配',
-      columnName: 'LS_CARGO',
-      className: 'cell-filter cell-filter-green node-departure',
-    },
+      defaultDisabled: node.defaultDisabled,
+    })),
   ],
   InternationalDepartureTransferWaybillPull: [
     {

+ 15 - 15
src/views/realTime/hooks/useTableStyle.ts

@@ -56,7 +56,9 @@ type CellClassGetter = (params: {
 
 export function useTableStyle(
   tableName: string,
-  warningNodesMap?: { [nodeCode: string]: WarningNode[] }
+  warningNodesMap?: {
+    [rowKey: string]: { warningNodes: WarningNode[]; alarmNodes: WarningNode[] }
+  }
 ) {
   const rowClass = ({ row, rowIndex }) => {
     const classes: string[] = []
@@ -84,21 +86,19 @@ export function useTableStyle(
       }
 
       if (!tableName?.includes('Transfer')) {
-        if (warningNodesMap && warningNodesMap[column.property]) {
-          const warningNodes = warningNodesMap[column.property]
-          const matchedNode = warningNodes.find(
-            node =>
-              node.flight_no === row.flightNO &&
-              node.flight_date === row.flightDate &&
-              node.iata_code === row.IATACode
+        if (warningNodesMap && warningNodesMap[row.rowKey]) {
+          const { warningNodes, alarmNodes } = warningNodesMap[row.rowKey]
+          const hasWarningNode = warningNodes.some(
+            node => node.node_code === column.property
+          )
+          const hasAlarmNode = alarmNodes.some(
+            node => node.node_code === column.property
           )
-          if (matchedNode) {
-            if (String(matchedNode.alarm_type) === '1') {
-              classes.push('cell-warning')
-            }
-            if (String(matchedNode.alarm_type) === '2') {
-              classes.push('cell-alarm')
-            }
+          if (hasWarningNode) {
+            classes.push('cell-warning')
+          }
+          if (hasAlarmNode) {
+            classes.push('cell-alarm')
           }
         }
       }

+ 9 - 8
src/views/realTime/hooks/useTrackData.ts

@@ -57,7 +57,7 @@ export function useTrackData(name: string, trackData: MaybeRef<CommonData[]>) {
           departureAirport,
           arriveAirport,
           nodeCode,
-          // execPosition,
+          execPosition,
           // ConsignmentItemPackagingQuantityQuantity,
           execResult,
           execTime,
@@ -81,15 +81,16 @@ export function useTrackData(name: string, trackData: MaybeRef<CommonData[]>) {
           : String(arriveAirport ?? '')
         const trackNode = {
           active: Boolean(
-            // execPosition ||
-            //   ConsignmentItemPackagingQuantityQuantity ||
-            execResult || execTime
+            execPosition ||
+              //   ConsignmentItemPackagingQuantityQuantity ||
+              execResult ||
+              execTime
           ),
           descriptions: [
-            // String(execPosition ?? ''),
+            `位置:${String(execPosition ?? '--')}`,
             // String(ConsignmentItemPackagingQuantityQuantity ?? ''),
-            execResult ? '通过' : '未通过',
-            datetimeToTime(execTime, flightDate),
+            `结果:${execResult ? '通过' : '未通过'}`,
+            `时间:${datetimeToTime(execTime, flightDate)}`,
           ],
         }
         const nodeList = NODE_CODE[
@@ -112,7 +113,7 @@ export function useTrackData(name: string, trackData: MaybeRef<CommonData[]>) {
             return {
               ...node,
               active: false,
-              descriptions: ['', ''],
+              descriptions: ['', '', ''],
             }
           }
         })

+ 6 - 6
src/views/systemSettings/warningEdit/index.vue

@@ -180,12 +180,12 @@
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="运单数报警百分比" label-width="140" size="default">
+              <el-form-item label="运单数报警百分比" :label-width="140" size="default">
                 <el-input v-model="tableForms.percentage" placeholder="请输入运单数报警百分比" />
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="板卡数报警百分比" label-width="140" size="default">
+              <el-form-item label="板卡数报警百分比" :label-width="140" size="default">
                 <el-input v-model="tableForms.percentuld" placeholder="请输入板卡数报警百分比" />
               </el-form-item>
             </el-col>
@@ -286,7 +286,7 @@ const ditypeAll = ref<any>([
 ]);
 const flag = ref<boolean>(false); //弹窗开关
 const type = ref<string>(""); //判断是否删除
-const msgTitle = ref<string>("新增报警预警策略"); //弹窗标题
+const msgTitle = ref<string>("新增预警告警策略"); //弹窗标题
 //列表
 const tableData = ref<any>([]);
 //表头
@@ -319,7 +319,7 @@ const tableBtnGroup = ref([
 ]);
 //新增
 const addForm = () => {
-  msgTitle.value = "新增报警预警策略";
+  msgTitle.value = "新增预警告警策略";
   flag.value = true;
   type.value = "add";
   tableForms.event = 1;
@@ -368,7 +368,7 @@ const delRest = () => {
 //编辑-删除
 const btnClick = (row, index, param) => {
   if (param === 2) {
-    msgTitle.value = "编辑报警预警策略";
+    msgTitle.value = "编辑预警告警策略";
     flag.value = true;
     type.value = "edit";
     const newVal = _.cloneDeep(index);
@@ -383,7 +383,7 @@ const btnClick = (row, index, param) => {
       }
     }
   } else if (param === 3) {
-    msgTitle.value = "删除报警预警策略";
+    msgTitle.value = "删除预警告警策略";
     flag.value = true;
     type.value = "del";
     // tableForms.event = 3;

+ 2 - 2
src/views/userManagement/account/auth.vue

@@ -14,8 +14,8 @@
               </el-form-item>
               <el-form-item label="是否启用" prop="user_status">
                 <el-radio-group disabled v-model="ruleForm.user_status">
-                  <el-radio :label="1">启用</el-radio>
-                  <el-radio :label="2"> 禁用</el-radio>
+                  <el-radio :label="ruleForm.user_status || 2">启用</el-radio>
+                  <el-radio :label="0">禁用</el-radio>
                 </el-radio-group>
               </el-form-item>
             </el-form>

+ 7 - 8
src/views/userManagement/account/index.vue

@@ -9,7 +9,7 @@
     </div>
     <div class="application-content flex">
       <div class="box account-tree">
-        <el-tree :data="data" :props="defaultProps" node-key="user_group_id" default-expand-all @node-click="handleNodeClick" />
+        <el-tree :data="data" :props="defaultProps" node-key="user_group_id" default-expand-all :expand-on-click-node="false" @node-click="handleNodeClick" />
       </div>
       <Table class="account-table" btnGroupWidth="250px" :tableHeader="tableHeader" @btnClick="btnClick" :tableBtnGroup="tableBtnGroup" :tableData="tableData" />
     </div>
@@ -34,9 +34,8 @@
         </el-form-item>
         <el-form-item label="是否启用" :rules="[{required: true,message: '请选择是否启用',trigger: 'change',}]" prop="user_status">
           <el-radio-group v-model="ruleForm.user_status">
-            <el-radio v-if="statusInfo != 1" :label="2">启用</el-radio>
-            <el-radio v-else :label="1">启用</el-radio>
-            <el-radio :label="0"> 禁用</el-radio>
+            <el-radio :label="ruleForm.user_status || 2">启用</el-radio>
+            <el-radio :label="0">禁用</el-radio>
           </el-radio-group>
         </el-form-item>
       </el-form>
@@ -99,7 +98,6 @@ const msgType = ref("all");
 const PageIndex = ref(1);
 const searchInfo = ref("");
 const pwdInfo = ref(null);
-const statusInfo = ref(2);
 //获取用户组
 const getGroup = async () => {
   const { code, returnData } = await Query({
@@ -168,7 +166,10 @@ const dataChange = async (event, data) => {
   const { code, message } = await table.dataChange(
     SERVICE_ID.accountScId,
     event,
-    data
+    {
+      ...data,
+      user_status: data.user_status != 0 ? 2 : 0
+    }
   );
   if (code == 0) {
     ElMessage.success(message);
@@ -233,7 +234,6 @@ const btnClick = (index, row, param) => {
     dT.value = "edit";
     editDialogVisible.value = true;
     pwdInfo.value = row.user_pwd;
-    statusInfo.value = row.user_status;
     editDialogTitle.value = "编辑账号";
     ruleForm.value = _.cloneDeep(row);
   } else {
@@ -256,7 +256,6 @@ const addApp = () => {
   editDialogVisible.value = true;
   editDialogTitle.value = "新增账号";
   dT.value = "add";
-  statusInfo.value = 2;
   ruleForm.value = {};
 };
 const submitForm = async (formEl: FormInstance | undefined) => {

+ 8 - 4
src/views/userManagement/application/index.vue

@@ -14,13 +14,16 @@
     <!--新增/编辑-->
     <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="[{required: true,message: '请输入应用名称',trigger: 'blur',}]">
+        <el-form-item label="应用ID" prop="app_id" :rules="[{required: dT === 'edit', message: '请输入应用ID', trigger: 'blur',}]">
+          <el-input v-model="ruleForm.app_id" size="default" placeholder="请输入应用ID" />
+        </el-form-item>
+        <el-form-item label="应用名称" prop="app_name" :rules="[{required: true, message: '请输入应用名称', trigger: 'blur',}]">
           <el-input v-model="ruleForm.app_name" size="default" placeholder="请输入应用名称" />
         </el-form-item>
-        <el-form-item label="应用链接账号" prop="app_show_id" :rules="[{required: true,message: '请输入应用链接账号',trigger: 'blur',}]">
-          <el-input v-model="ruleForm.app_show_id" size="default" placeholder="请输入应用链接账号" />
+        <el-form-item label="appid" prop="app_show_id" :rules="[{required: true, message: '请输入appid', trigger: 'blur',}]">
+          <el-input v-model="ruleForm.app_show_id" size="default" placeholder="请输入appid" />
         </el-form-item>
-        <el-form-item label="应用链接密钥" prop="app_show_secret" :rules="[{required: true,message: '请输入应用链接密钥',trigger: 'blur',}]">
+        <el-form-item label="应用链接密钥" prop="app_show_secret" :rules="[{required: true, message: '请输入应用链接密钥', trigger: 'blur',}]">
           <el-input v-model="ruleForm.app_show_secret" size="default" placeholder="请输入应用链接密钥" />
         </el-form-item>
         <el-form-item label="应用描述" prop="app_comment">
@@ -60,6 +63,7 @@ const dT = ref("add");
 const editDialogVisible = ref(false);
 const editDialogTitle = ref("新增应用");
 const ruleForm = ref<any>({
+  app_id: "",
   app_name: "",
   app_comment: "",
   app_show_id: "",