|
@@ -5,18 +5,21 @@
|
|
<div class="airport-count">
|
|
<div class="airport-count">
|
|
<CountBox
|
|
<CountBox
|
|
:count-number="tableDataCount.flightCount"
|
|
:count-number="tableDataCount.flightCount"
|
|
|
|
+ :length="4"
|
|
label="今日计划航班数"
|
|
label="今日计划航班数"
|
|
/>
|
|
/>
|
|
<CountBox
|
|
<CountBox
|
|
:count-number="
|
|
:count-number="
|
|
isDeparture ? finishedCount : tableDataCount.tallyCount
|
|
isDeparture ? finishedCount : tableDataCount.tallyCount
|
|
"
|
|
"
|
|
|
|
+ :length="4"
|
|
label="已完成航班数"
|
|
label="已完成航班数"
|
|
/>
|
|
/>
|
|
- <!-- <CountBox
|
|
|
|
- :count-number="tableDataCount.weightCount"
|
|
|
|
- label="已转载重量"
|
|
|
|
- /> -->
|
|
|
|
|
|
+ <CountBox
|
|
|
|
+ :count-number="weightCount"
|
|
|
|
+ label="已转载重量KG"
|
|
|
|
+ :length="8"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
<div class="airport-settings">
|
|
<div class="airport-settings">
|
|
<div v-permission="getPermission('count')">
|
|
<div v-permission="getPermission('count')">
|
|
@@ -85,6 +88,8 @@ import { CommonData } from '~/common'
|
|
import { useLoop } from '@/hooks/useLoop'
|
|
import { useLoop } from '@/hooks/useLoop'
|
|
import { useTableSettingsStore } from '@/store/tableSettings'
|
|
import { useTableSettingsStore } from '@/store/tableSettings'
|
|
import { useFlightState } from './useFlightState'
|
|
import { useFlightState } from './useFlightState'
|
|
|
|
+import { Query } from '@/api/webApi'
|
|
|
|
+import { ElMessage } from 'element-plus'
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
name: {
|
|
name: {
|
|
@@ -107,12 +112,45 @@ const { tableColumns, tableData, getTableData } = useAirportTable(
|
|
|
|
|
|
const finishedCount = ref(0)
|
|
const finishedCount = ref(0)
|
|
|
|
|
|
|
|
+const weightCount = ref(0)
|
|
|
|
+const getWeightCount = async () => {
|
|
|
|
+ try {
|
|
|
|
+ const { startDate, endDate } = formData
|
|
|
|
+ const dataContent = [startDate, endDate]
|
|
|
|
+ const {
|
|
|
|
+ code,
|
|
|
|
+ returnData: { listValues },
|
|
|
|
+ message,
|
|
|
|
+ } = await Query({
|
|
|
|
+ id:
|
|
|
|
+ DATACONTENT_ID[
|
|
|
|
+ `${
|
|
|
|
+ props.name.slice(0, 1).toLowerCase() + props.name.slice(1)
|
|
|
|
+ }WeightCount`
|
|
|
|
+ ],
|
|
|
|
+ dataContent,
|
|
|
|
+ })
|
|
|
|
+ if (Number(code) !== 0) {
|
|
|
|
+ throw new Error(message || '失败')
|
|
|
|
+ }
|
|
|
|
+ if (!listValues.length) {
|
|
|
|
+ ElMessage.info('未查询到重量信息')
|
|
|
|
+ weightCount.value = 0
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ weightCount.value = listValues[0].weight
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.error(error)
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
const { getWarningRules } = useFlightState(props.name, tableData, finishedCount)
|
|
const { getWarningRules } = useFlightState(props.name, tableData, finishedCount)
|
|
|
|
|
|
useLoop(
|
|
useLoop(
|
|
[
|
|
[
|
|
- // getWarningRules,
|
|
|
|
|
|
+ getWeightCount,
|
|
getTableData,
|
|
getTableData,
|
|
|
|
+ // getWarningRules,
|
|
],
|
|
],
|
|
'airport',
|
|
'airport',
|
|
[formData]
|
|
[formData]
|
|
@@ -249,7 +287,6 @@ const tableDataCount = computed(() =>
|
|
loadCount: 0,
|
|
loadCount: 0,
|
|
unloadCount: 0,
|
|
unloadCount: 0,
|
|
tallyCount: 0,
|
|
tallyCount: 0,
|
|
- weightCount: 0,
|
|
|
|
}
|
|
}
|
|
)
|
|
)
|
|
)
|
|
)
|