Browse Source

修改报警预警

zhaoke 2 years ago
parent
commit
f8e9099c55

+ 7 - 0
src/styles/index.scss

@@ -354,6 +354,13 @@ li {
     margin: auto;
     background: #2d67e3;
   }
+  .btn-back {
+    margin-left: 24px;
+    font-size: 16px;
+    font-weight: normal;
+    color: #2d67e3;
+    cursor: pointer;
+  }
 }
 
 /*鼠标样式-手*/

+ 29 - 80
src/views/baggageManagement/components/departure/index.vue

@@ -53,18 +53,7 @@
             />
           </el-form-item> -->
           <el-form-item prop="flightDate" label="航班日期">
-            <el-date-picker
-              v-model="formData.flightDate"
-              :clearable="false"
-              size="small"
-              style="width: 300px"
-              type="daterange"
-              value-format="yyyy-MM-dd"
-              start-placeholder="开始日期"
-              end-placeholder="结束日期"
-              :picker-options="dateRangePickerOptions"
-              @change="dateChangeHandler"
-            />
+            <el-date-picker v-model="formData.flightDate" :clearable="false" size="small" style="width: 300px" type="daterange" value-format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="dateRangePickerOptions" @change="dateChangeHandler" />
           </el-form-item>
           <el-form-item>
             <div class="box-item">
@@ -82,18 +71,7 @@
           <el-form-item prop="search">
             <el-popover :value="popoverVisible" placement="bottom" trigger="manual">
               <span>请输入航班号(示例:CA1234)或行李牌号(示例:1234567890)</span>
-              <el-input
-                slot="reference"
-                v-model="formData.search"
-                class="input-shadow"
-                style="width: 240px; margin-left: 105px"
-                size="small"
-                placeholder="请输入内容"
-                prefix-icon="el-icon-search"
-                clearable
-                @focus="popoverVisible = true"
-                @blur="popoverVisible = false"
-              />
+              <el-input slot="reference" v-model="formData.search" class="input-shadow" style="width: 240px; margin-left: 105px" size="small" placeholder="请输入内容" prefix-icon="el-icon-search" clearable @focus="popoverVisible = true" @blur="popoverVisible = false" />
             </el-popover>
           </el-form-item>
           <el-form-item>
@@ -122,31 +100,11 @@
     </div>
     <!--表格-->
     <div v-loading="loading" class="terminal-table" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)">
-      <el-table
-        ref="table"
-        class="table"
-        :height="computedTableHeight"
-        :data="dealedTableData"
-        :header-cell-class-name="headerCellClass"
-        :row-class-name="tableRowClassName"
-        :cell-class-name="cellClass"
-        show-summary
-        :summary-method="summaryMethod"
-        border
-        stripe
-        fit
-        @cell-click="cellClickHandler"
-      >
+      <el-table ref="table" class="table" :height="computedTableHeight" :data="dealedTableData" :header-cell-class-name="headerCellClass" :row-class-name="tableRowClassName" :cell-class-name="cellClass" show-summary :summary-method="summaryMethod" border stripe fit @cell-click="cellClickHandler">
         <el-table-column v-for="col in tableColsCopy" :key="col.prop" :prop="col.prop" :label="col.label" :width="col.width" :fixed="col.fixed" :formatter="tableFormat">
           <template #header>
             <el-tooltip :content="col.desc || childCol.label" placement="top">
-              <TableHeaderCell
-                :label="col.label"
-                :filter-options="tableDataFilters[col.prop]"
-                :filter-values.sync="filterValues[col.prop]"
-                :sortable="col.sortable"
-                :sort-rule.sync="tableDataSortRules[col.prop]"
-              />
+              <TableHeaderCell :label="col.label" :filter-options="tableDataFilters[col.prop]" :filter-values.sync="filterValues[col.prop]" :sortable="col.sortable" :sort-rule.sync="tableDataSortRules[col.prop]" />
             </el-tooltip>
           </template>
         </el-table-column>
@@ -157,19 +115,10 @@
       <div class="dialog-wrapper">
         <div class="title">列设置</div>
         <div class="content">
-          <el-tree
-            :data="tableCols"
-            :class="colsCheckClass"
-            show-checkbox
-            node-key="index"
-            :default-expand-all="true"
-            :props="{
+          <el-tree :data="tableCols" :class="colsCheckClass" show-checkbox node-key="index" :default-expand-all="true" :props="{
               label: 'label',
               children: 'children',
-            }"
-            :default-checked-keys="checkedKeysTemp"
-            @check="handleCheck"
-          />
+            }" :default-checked-keys="checkedKeysTemp" @check="handleCheck" />
         </div>
         <div class="foot right t30">
           <el-button size="medium" class="r24" type="primary" @click="onCheck">确定</el-button>
@@ -197,7 +146,7 @@ export default {
   name: "DepartureTerminalView",
   components: { Dialog, TimeZoneSelector, TableHeaderCell },
   mixins: [terminalMixin, formMixin, tableColsMixin, timeZoneMixin],
-  data() {
+  data () {
     return {
       orderNum: ["0", "0", "0", "0", "0", "0"], // 默认总数
       popoverVisible: false,
@@ -347,12 +296,12 @@ export default {
     };
   },
   computed: {
-    singleDay() {
+    singleDay () {
       return this.startDate === this.endDate;
     },
     ...mapGetters(["timeZone"]),
   },
-  mounted() {
+  mounted () {
     this.getAirPortData();
     this.table = this.$refs.table.bodyWrapper;
     const that = this;
@@ -360,39 +309,39 @@ export default {
       that.scrollTop = this.table.scrollTop;
     });
   },
-  activated() {
+  activated () {
     this.table.scrollTop = this.scrollTop;
     this.getTableData();
     this.getWarningData();
     this.loopEvent = setInterval(this.getTableData, LOOP_INTERVAL.departureTable);
   },
-  deactivated() {
+  deactivated () {
     if (this.loopEvent) {
       clearInterval(this.loopEvent);
       this.loopEvent = null;
     }
   },
-  beforeDestroy() {
+  beforeDestroy () {
     if (this.loopEvent) {
       clearInterval(this.loopEvent);
       this.loopEvent = null;
     }
   },
   methods: {
-    resetLoopEvent() {
+    resetLoopEvent () {
       this.loading = true;
       this.hasSetTableScroll = false;
       this.loopEvent && clearInterval(this.loopEvent);
       this.getTableData();
       this.loopEvent = setInterval(this.getTableData, LOOP_INTERVAL.departureTable);
     },
-    airPortChange() {
+    airPortChange () {
       this.resetLoopEvent();
     },
-    dateChangeHandler() {
+    dateChangeHandler () {
       this.resetLoopEvent();
     },
-    async getAirPortData() {
+    async getAirPortData () {
       try {
         const res = await getQuery({
           id: DATACONTENT_ID.departureAirMainId,
@@ -409,7 +358,7 @@ export default {
         this.$message.error("失败");
       }
     },
-    async getWarningData() {
+    async getWarningData () {
       try {
         const res = await getQuery({
           id: DATACONTENT_ID.departureWarningId,
@@ -425,7 +374,7 @@ export default {
         this.$message.error("失败");
       }
     },
-    tableRowClassName({ row, rowIndex }) {
+    tableRowClassName ({ row, rowIndex }) {
       const classes = [];
       if (row.flightStatus === "DLY") {
         classes.push("bgl-delayed");
@@ -441,7 +390,7 @@ export default {
       }
       return classes.join(" ");
     },
-    headerCellClass({ row, column }) {
+    headerCellClass ({ row, column }) {
       const classes = [];
       if (["warning", "exceptions", "midIn"].includes(column.property)) {
         classes.push("bgl-huang");
@@ -463,7 +412,7 @@ export default {
     //   this.flightAttrQuery(params)
     // },
     // 获取表格数据
-    async getTableData() {
+    async getTableData () {
       if (!this.formData.currentAirport || !this.startDate || !this.endDate) {
         return;
       }
@@ -486,7 +435,7 @@ export default {
         this.loading = false;
       }
     },
-    initTableData(tableData) {
+    initTableData (tableData) {
       const currentTime = new Date();
       const curTime = this.formatTime(currentTime);
       this.leaveCount = 0;
@@ -505,7 +454,7 @@ export default {
             const planTime = this.formatTime(timeInZone((item.planDepartureTime ?? "").replace("T", " "), this.timeZone), 2);
             const capTime = Math.ceil((planTime - curTime) / (1000 * 60));
             if (Number(startTime) - Number(curTime) < 0 && Number(endTime) - Number(curTime) > 0) {
-              if (p.flightNO != "" && p.flightNO == item.flightNO) {
+              if (p.flightNO && p.flightNO == item.flightNO) {
                 if (capTime - p.warningDuration < 0 && capTime - p.alarmDuration > 0) {
                   item["warning"] = item["preLoad"] - Math.max(item.loadNumber, item.boardID);
                   item["warningState"] = 1;
@@ -518,7 +467,7 @@ export default {
                   const returnedTarget = Object.assign(item, p);
                   this.sendLog(returnedTarget);
                 }
-              } else if (p.flightNO == "" && p.IATACode != "") {
+              } else if (!p.flightNO && p.IATACode) {
                 if (item.flightNO.substring(0, 2) == p.IATACode) {
                   if (capTime - p.warningDuration < 0 && capTime - p.alarmDuration > 0) {
                     item["warning"] = item["preLoad"] - Math.max(item.loadNumber, item.boardID);
@@ -546,7 +495,7 @@ export default {
         this.setTableScroll();
       });
     },
-    formatTime(date, type = 1) {
+    formatTime (date, type = 1) {
       let time = null;
       if (type == 1) {
         time = parseTime(date, "{y}-{m}-{d} {h}:{i}:{s}");
@@ -556,7 +505,7 @@ export default {
       const newTimt = new Date(time);
       return newTimt.getTime();
     },
-    async sendLog(obj) {
+    async sendLog (obj) {
       try {
         const newObj = {
           logTime: parseTime(new Date(), "{y}-{m}-{d} {h}:{i}:{s}"),
@@ -575,7 +524,7 @@ export default {
         this.$message.error("失败");
       }
     },
-    setTableScroll() {
+    setTableScroll () {
       if (!this.singleDay || this.hasSetTableScroll || this.leaveCount === 0) {
         return;
       }
@@ -595,7 +544,7 @@ export default {
       }, 0);
       this.hasSetTableScroll = true;
     },
-    setNumberTransform() {
+    setNumberTransform () {
       const numberItems = this.$refs.numberItem; // 拿到数字的ref,计算元素数量
       const numberArr = this.orderNum.filter((item) => !isNaN(item));
       // 结合CSS 对数字字符进行滚动,显示订单数量
@@ -605,7 +554,7 @@ export default {
       }
     },
 
-    toOrderNum(num) {
+    toOrderNum (num) {
       num = num.toString();
       if (num.length < 6) {
         num = "0" + num; // 如未满八位数,添加"0"补位
@@ -618,7 +567,7 @@ export default {
       }
       this.setNumberTransform();
     },
-    exportHandler(refName, tableName) {
+    exportHandler (refName, tableName) {
       if (this.loading) {
         return;
       }

+ 29 - 20
src/views/baggageManagement/components/flight/index.vue

@@ -10,7 +10,10 @@
     <div class="flight-wrapper">
       <div class="part1">
         <div class="title">
-          <span class="manageTitle">航班基本信息</span>
+          <span class="manageTitle">
+            <span>航班基本信息</span>
+            <span class="btn-back"><i class="el-icon-arrow-left" />返回上一步</span>
+          </span>
         </div>
         <div class="part1-wrapper">
           <div class="airline">{{ queryData.flightNO }}
@@ -28,19 +31,19 @@
                   <span>{{ flightInfo.departureName }}</span>
                 </el-col>
               </el-row>
-              <el-row>
+              <!-- <el-row>
                 <el-col :xs="24" :sm="24" :xl="12">
                   <span>起飞机场三字码:</span>
                 </el-col>
                 <el-col :xs="24" :sm="24" :xl="12">
                   <span>{{ flightInfo.planDepartureApt }}</span>
                 </el-col>
-              </el-row>
+              </el-row> -->
               <el-row>
-                <el-col :xs="24" :sm="24" :xl="12">
+                <!-- <el-col :xs="24" :sm="24" :xl="12">
                   <span>航站楼:{{ flightInfo.departureBuild }}</span>
-                </el-col>
-                <el-col :xs="24" :sm="24" :xl="12">
+                </el-col> -->
+                <el-col :span="24">
                   <span>分拣转盘:{{ flightInfo.sortCarousel }}</span>
                 </el-col>
               </el-row>
@@ -67,14 +70,14 @@
             </div>
             <i class="part1_info_arrow_right el-icon-caret-right" />
             <div class="part1_info_box">
-              <el-row>
+              <!-- <el-row>
                 <el-col :span="12">
                   <span>航班号:</span>
                 </el-col>
                 <el-col :span="12">
                   <span>{{ flightInfo.flightNO }}</span>
                 </el-col>
-              </el-row>
+              </el-row> -->
               <el-row>
                 <el-col :xs="16" :sm="16" :xl="12">
                   <span>航班状态:</span>
@@ -84,16 +87,22 @@
                 </el-col>
               </el-row>
               <el-row>
-                <el-col :xs="24" :sm="24" :xl="12">
+                <el-col :xs="16" :sm="16" :xl="12">
                   <span>托运旅客数:</span>
+                </el-col>
+                <el-col :xs="8" :sm="8" :xl="12">
                   <span>{{ flightInfo.count1 }}</span>
                 </el-col>
-                <el-col :xs="24" :sm="24" :xl="12">
+              </el-row>
+              <el-row>
+                <el-col :xs="16" :sm="16" :xl="12">
                   <span>终点行李数:</span>
+                </el-col>
+                <el-col :xs="8" :sm="8" :xl="12">
                   <span>{{ flightInfo.count2 }}</span>
                 </el-col>
               </el-row>
-              <el-row>
+              <!-- <el-row>
                 <el-col :xs="18" :sm="18" :xl="12">
                   <span>中转进行李数:</span>
                 </el-col>
@@ -108,7 +117,7 @@
                 <el-col :xs="6" :sm="6" :xl="12">
                   <span>{{ flightInfo.count3 }}</span>
                 </el-col>
-              </el-row>
+              </el-row> -->
             </div>
             <i class="part1_info_arrow_right el-icon-caret-right" />
             <div class="part1_info_box">
@@ -120,22 +129,22 @@
                   <span>{{ flightInfo.landingName }}</span>
                 </el-col>
               </el-row>
-              <el-row>
+              <!-- <el-row>
                 <el-col :xs="24" :sm="24" :xl="12">
                   <span>降落机场三字码:</span>
                 </el-col>
                 <el-col :xs="24" :sm="24" :xl="12">
                   <span>{{ flightInfo.planLandingApt }}</span>
                 </el-col>
-              </el-row>
-              <el-row>
+              </el-row> -->
+              <!-- <el-row>
                 <el-col :span="12">
                   <span>航站楼:</span>
                 </el-col>
                 <el-col :span="12">
                   <span>{{ flightInfo.landingBuild }}</span>
                 </el-col>
-              </el-row>
+              </el-row> -->
               <el-row>
                 <el-col :xs="24" :sm="24" :xl="12">
                   <span>
@@ -165,7 +174,7 @@
           <span class="manageTitle">航班容器列表</span>
           <img class="btn-square btn-shadow" src="@/assets/baggage/ic_export.png" title="导出" @click="exportHandler('containerTable', '航班容器列表')">
         </div>
-        <el-table ref="containerTable" :data="containerTableData" border style="width: 100%" height="344px" stripe size="mini" show-summary :summary-method="summaryMethod" :header-cell-style="{ color: '#101116' }" :row-class-name="rowClass" @row-click="containerClick">
+        <el-table ref="containerTable" :data="containerTableData" border style="width: 100%" height="290px" stripe size="mini" show-summary :summary-method="summaryMethod" :header-cell-style="{ color: '#101116' }" :row-class-name="rowClass" @row-click="containerClick">
           <el-table-column v-for="col in containerTableColumn" :key="col.id" :prop="col.prop" :label="col.label" :width="col.width" :align="col.align || 'center'" :show-overflow-tooltip="true" />
         </el-table>
       </div>
@@ -433,7 +442,7 @@ export default {
     },
     draggableStyle () {
       return {
-        height: `calc(100vh - 80px - 64px - 16px - 344px + ${this.dragHeight}px)`
+        height: `calc(100vh - 80px - 64px - 16px - 290px + ${this.dragHeight}px)`
       }
     },
     dragLineStyle () {
@@ -838,7 +847,7 @@ export default {
     .part1 {
       width: 71.15%;
       .part1-wrapper {
-        height: 344px;
+        height: 290px;
         background: #041741;
         padding: 24px;
         .airline {
@@ -868,7 +877,7 @@ export default {
 
           .part1_info_box {
             width: calc(33.333% - 48px);
-            height: 244px;
+            height: 190px;
             background: #2c416d;
             padding: 24px 2% 12px;
             display: flex;