浏览代码

表格单元格样式修改

zhongxiaoyu 2 年之前
父节点
当前提交
aa2b6765c6

+ 3 - 3
src/router/routes/routes-file-five.js

@@ -1,7 +1,7 @@
 /*
  * @Author: zk
  * @Date: 2022-01-17 10:40:48
- * @LastEditTime: 2022-05-03 15:07:36
+ * @LastEditTime: 2022-05-16 15:40:43
  * @LastEditors: your name
  * @Description: 离港路由
  */
@@ -134,10 +134,10 @@ const arrivalRoutes = {
 const transferRoutes = {
   path: '/transfer',
   component: Layout,
-  meta: { roles: ["is_showTransit"] },
+  meta: { roles: ['is_showTransit'] },
   children: [
     {
-      path: '/transfer/arrival',
+      path: '/transfer',
       component: () => import('@/views/baggageManagement'),
       meta: {
         title: '中转管理',

+ 4 - 0
src/styles/index.scss

@@ -567,3 +567,7 @@ li {
     flex-wrap: wrap;
   }
 }
+
+.el-table .el-table__cell.pre-line .cell {
+  white-space: pre-line;
+}

+ 10 - 1
src/utils/table.js

@@ -1,7 +1,7 @@
 /*
  * @Author: Badguy
  * @Date: 2022-02-11 09:20:58
- * @LastEditTime: 2022-02-14 09:35:10
+ * @LastEditTime: 2022-05-16 15:45:46
  * @LastEditors: your name
  * @Description: 表格用
  * have a nice day!
@@ -51,3 +51,12 @@ export function mergeTableRow(config) {
   })
   return data
 }
+
+// 表格单元格class设置
+export function commonTableCellClass({ row, column, rowIndex, columnIndex }) {
+  let classString = ''
+  if (['ActualDepartureTime', 'ActualLandingTime'].includes(column.property)) {
+    classString += 'pre-line'
+  }
+  return classString
+}

+ 8 - 16
src/views/advancedQuery/views/advancedHome.vue

@@ -57,6 +57,7 @@
         :data="tableData"
         border
         stripe
+        fit
         height="calc(100vh - 155px)"
         style="width: 100%"
         show-summary
@@ -336,7 +337,8 @@ export default {
         },
         {
           prop: 'DepartureTime',
-          label: '起飞时间'
+          label: '起飞时间',
+          width: 150
         },
         {
           prop: 'SourceAirport',
@@ -568,21 +570,11 @@ export default {
     },
     // 查询
     getSearchData(val) {
-      // this.form = {
-      //   time: [parseTime(new Date(), '{y}-{m}-{d}'), parseTime(new Date(), '{y}-{m}-{d}')],
-      //   status: '',
-      //   flightNumber: '',
-      //   destination: '',
-      //   station: '',
-      //   grade: '',
-      //   type: '',
-      //   U_Device_ID: '',
-      //   name: '',
-      //   pnr: '',
-      //   check: '',
-      //   transferArrival: '',
-      //   transferDeparture: ''
-      // }
+      // 清除表单
+      Object.keys(this.form).forEach(key => {
+        this.form[key] = ''
+      })
+
       if (this.time[0] === '' || this.time[1] === '' || val === '') {
         this.$message.error('请先输入完整查询信息')
       } else {

+ 138 - 88
src/views/baggageManagement/components/arrival/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: zk
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-05-13 13:50:30
+ * @LastEditTime: 2022-05-16 15:46:13
  * @LastEditors: your name
  * @Description: 进港01
 -->
@@ -161,7 +161,7 @@
         :data="tableData"
         class="table"
         :height="computedTableHeight"
-        :header-cell-class-name="tableCellClassName"
+        :header-cell-class-name="headerCellClassName"
         :row-class-name="tableRowClassName"
         show-summary
         :summary-method="summaryMethod"
@@ -174,15 +174,23 @@
           :key="index"
           :prop="item.statCode"
           :label="item.statName"
-          :width="item.width"
-          :filters="tableDataFilters[item.statCode]"
-          :filter-method="
-            tableDataFilters[item.statCode] && filterHandler
-          "
         >
-          <template slot="header">
-            <el-tooltip :content="item.statName" placement="top"><span>{{ item.statName }}</span></el-tooltip>
-          </template>
+          <el-table-column
+            v-for="(p, i) in item.children"
+            :key="i"
+            :prop="p.statCode"
+            :label="p.statName"
+            :width="p.width"
+            :filters="tableDataFilters[p.statCode]"
+            :filter-method="tableDataFilters[p.statCode] && filterHandler"
+          >
+            <template slot="header">
+              <el-tooltip
+                :content="p.statName"
+                placement="top"
+              ><span>{{ p.statName }}</span></el-tooltip>
+            </template>
+          </el-table-column>
         </el-table-column>
       </el-table>
     </div>
@@ -242,95 +250,137 @@ export default {
       // 初始表头
       tableCols: [
         {
-          statCode: 'FlightNO',
-          statName: '航班号',
-          width: 80
-        },
-        {
-          statCode: 'FlightDate',
-          statName: '执飞日期',
-          width: 105
-        },
-        {
-          statCode: 'arrivalTime',
-          statName: '到港时间',
-          width: 150
-        },
-        {
-          statCode: 'departureTerminal',
-          statName: '起飞航站'
-        },
-        {
-          statCode: 'arrivalTerminal',
-          statName: '到达航站'
-        },
-        {
-          statCode: 'luggageCarousel',
-          statName: '行李转盘'
-        },
-        {
-          statCode: 'parkingSpace',
-          statName: '停机位'
-        },
-        {
-          statCode: 'checkIns',
-          statName: '值机数'
-        },
-        {
-          statCode: 'projectedLoad',
-          statName: '预计装载'
-        },
-        {
-          statCode: 'loadedQuantity',
-          statName: '已装载'
-        },
-        {
-          statCode: 'numberOfDestinationArrivals',
-          statName: '中转到达'
-        },
-        {
-          statCode: 'endPointNotReached',
-          statName: '中转未到达'
-        },
-        {
-          statCode: 'specialQuantity',
-          statName: '特殊'
-        },
-        {
-          statCode: 'numberOfClaims',
-          statName: '理赔'
-        },
-        {
-          statCode: 'uninstalled',
-          statName: '已卸载'
-        },
-        {
-          statCode: 'numberToBeUninstalled',
-          statName: '待卸载'
+          statCode: 'flightInfo',
+          statName: '航班信息',
+          children: [
+            {
+              statCode: 'FlightNO',
+              statName: '航班号',
+              width: 80
+            },
+            {
+              statCode: 'FlightDate',
+              statName: '执飞日期',
+              width: 105
+            },
+            {
+              statCode: 'arrivalTime',
+              statName: '到港时间',
+              width: 150
+            },
+            {
+              statCode: 'departureTerminal',
+              statName: '起飞航站'
+            },
+            {
+              statCode: 'arrivalTerminal',
+              statName: '到达航站'
+            },
+            {
+              statCode: 'luggageCarousel',
+              statName: '行李转盘'
+            },
+            {
+              statCode: 'parkingSpace',
+              statName: '停机位'
+            }
+          ]
         },
         {
-          statCode: 'terminateArrivalQuantity',
-          statName: '终点到达'
+          statCode: 'originAirportBaggageInfo',
+          statName: '始飞站行李信息',
+          children: [
+            {
+              statCode: 'checkIns',
+              statName: '值机'
+            },
+            {
+              statCode: 'projectedLoad',
+              statName: '预计装载'
+            },
+            {
+              statCode: 'loadedQuantity',
+              statName: '已装载'
+            }
+          ]
         },
         {
-          statCode: 'terminateUnreachedQuantity',
-          statName: '终点未到达'
+          statCode: 'arrvivalBaggageInfo',
+          statName: '到达行李信息',
+          children: [
+            {
+              statCode: 'numberOfDestinationArrivals',
+              statName: '到达'
+            },
+            {
+              statCode: 'endPointNotReached',
+              statName: '未到达'
+            },
+            {
+              statCode: 'specialQuantity',
+              statName: '特殊'
+            },
+            {
+              statCode: 'numberOfClaims',
+              statName: '理赔'
+            }
+          ]
         },
         {
-          statCode: 'quantityShipped',
-          statName: '已交运'
+          statCode: 'uninstallInfo',
+          statName: '卸载状态',
+          children: [
+            {
+              statCode: 'uninstalled',
+              statName: '已卸载'
+            },
+            {
+              statCode: 'numberToBeUninstalled',
+              statName: '待卸载'
+            }
+          ]
         },
         {
-          statCode: 'undeliveredQuantity',
-          statName: '未交运'
+          statCode: 'terminationdBaggageInfo',
+          statName: '终止行李',
+          children: [
+            {
+              statCode: 'terminateArrivalQuantity',
+              statName: '到达'
+            },
+            {
+              statCode: 'terminateUnreachedQuantity',
+              statName: '未到达'
+            }
+          ]
         },
         {
-          statCode: 'numberOfContainers',
-          statName: '容器'
+          statCode: 'transferBaggageInfo',
+          statName: '转运行李',
+          children: [
+            {
+              statCode: 'quantityShipped',
+              statName: '已交运'
+            },
+            {
+              statCode: 'undeliveredQuantity',
+              statName: '未交运'
+            }
+          ]
         },
         {
-          statCode: 'numberOfBulk',
-          statName: '散装'
+          statCode: 'baggageDistributionInfo',
+          statName: '行李分布',
+          children: [
+            {
+              statCode: 'numberOfContainers',
+              statName: '容器'
+            },
+            {
+              statCode: 'numberOfBulk',
+              statName: '散装'
+            }
+          ]
         }
       ],
       AirportList: [],
@@ -392,7 +442,7 @@ export default {
         }
       }
     },
-    tableCellClassName({ row, column }) {
+    headerCellClassName({ row, column }) {
       if (
         column.property === 'transfer_all' ||
         column.property === 'departureAnomaly' ||

+ 8 - 2
src/views/baggageManagement/components/baggage/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-05-12 16:55:51
+ * @LastEditTime: 2022-05-16 15:33:46
  * @LastEditors: your name
  * @Description: 行李视图
 -->
@@ -102,6 +102,8 @@
         border
         stripe
         fit
+        :header-cell-class-name="cellClass"
+        :cell-class-name="cellClass"
         :span-method="tableSpanMethod"
         :header-cell-style="{ color: '#101116' }"
       >
@@ -476,6 +478,11 @@ export default {
       this.spanArr = spanArr
       this.pos = pos
     },
+    cellClass({ row, column, rowIndex, columnIndex }) {
+      if (['departureAirport', 'landingAirport'].includes(column.property)) {
+        return 'pre-line'
+      }
+    },
     tableSpanMethod({ row, column, rowIndex, columnIndex }) {
       if (['flightNo', 'flightDate', 'departureAirport', 'landingAirport'].includes(column['property'])) {
         const _row = this.spanArr[rowIndex]
@@ -724,7 +731,6 @@ export default {
         font-family: Helvetica, 'Microsoft YaHei';
         font-weight: 400;
         color: #303133;
-        white-space: pre-line;
       }
     }
   }

+ 2 - 6
src/views/baggageManagement/components/departure/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: zk
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-05-13 14:29:51
+ * @LastEditTime: 2022-05-16 15:48:33
  * @LastEditors: your name
  * @Description: 离港01
 -->
@@ -391,11 +391,7 @@ export default {
       }
     },
     tableCellClassName({ row, column }) {
-      if (
-        column.property === 'transfer_all' ||
-        column.property === 'departureAnomaly' ||
-        column.property === 'riskWarning'
-      ) {
+      if (['riskWarning', 'departureAnomaly', 'midIn'].includes(column.property)) {
         return 'bgl-huang'
       }
     },

+ 1 - 55
src/views/baggageManagement/components/flight/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-05-11 17:48:54
+ * @LastEditTime: 2022-05-16 16:16:40
  * @LastEditors: your name
  * @Description: 航班视图
 -->
@@ -539,57 +539,6 @@ export default {
       const property = column['property']
       return row[property] === value
     },
-    // async getBaggageSearchIOAll(data) {
-    //   const getNodeInfo = node => `${node.locationPointDescribe ? node.locationPointDescribe : node.locationPoint}\n
-    //         ${node.realTime}`
-    //   try {
-    //     const result = await baggageSearchIOAll(data)
-    //     this.flightBaggageTableData = result.returnData.map(element => {
-    //       element['nodeInfos'].forEach(node => {
-    //         switch (node.nodeCode) {
-    //           case 'CHECKIN':
-    //             element['checkIn'] = getNodeInfo(node)
-    //             break
-    //           case 'SECURITY':
-    //             element['security'] = getNodeInfo(node)
-    //             break
-    //           case 'SORT':
-    //             element['sorting'] = getNodeInfo(node)
-    //             break
-    //           case 'LOAD':
-    //             element['loading'] = getNodeInfo(node)
-    //             break
-    //           case 'INF':
-    //             element['installed'] = getNodeInfo(node)
-    //             break
-    //           case 'UNLOAD':
-    //             element['security'] = getNodeInfo(node)
-    //             element['arrival'] = getNodeInfo(node)
-    //             break
-    //           case 'TiQu':
-    //             element['extract'] = getNodeInfo(node)
-    //             break
-    //           default:
-    //             break
-    //         }
-    //       })
-    //       return element
-    //     })
-    //     // result.returnData.forEach(element => {
-    //     //   element['checkIn'] = element.checkInLocation + '\n' + element.checkInTime
-    //     //   element['security'] = element.securityStatus + '\n' + element.securityTime
-    //     //   element['sorting'] = element.sortingNo + '\n' + element.sortingTime
-    //     //   element['loading'] = element.loadingNumber + '\n' + element.loadingTime
-    //     //   element['installed'] = element.installedNumber + '\n' + element.installedTime
-    //     //   element['uninstall'] = element.uninstall + '\n' + element.uninstallTime
-    //     //   element['arrival'] = element.reach + '\n' + element.timeOfArrival
-    //     //   element['extract'] = element.extract + '\n' + element.extractionTime
-    //     // })
-    //     // this.flightBaggageTableData = this._.cloneDeep(result.returnData)
-    //   } catch (error) {
-    //     console.log(error)
-    //   }
-    // },
     containeClick(row) {
       this.$router.push({
         path: '/advance',
@@ -815,9 +764,6 @@ export default {
           margin-right: 30px;
         }
       }
-      ::v-deep .el-table .cell {
-        white-space: pre-line;
-      }
       .el-table {
         .el-table__body-wrapper {
           min-height: 178px;

+ 29 - 34
src/views/baggageManagement/components/transferArrival/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: zk
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-05-13 16:31:41
+ * @LastEditTime: 2022-05-16 15:59:28
  * @LastEditors: your name
  * @Description: 离港01
 -->
@@ -200,6 +200,7 @@
         :cell-class-name="cellClass"
         border
         stripe
+        fit
         @cell-click="cellClick"
       >
         <el-table-column
@@ -213,6 +214,7 @@
             :key="i"
             :prop="p.statCode"
             :label="p.statName"
+            :width="p.width"
             :formatter="tableFormat"
           >
             <template slot="header">
@@ -267,6 +269,7 @@ import terminalMixin from '../../mixins/terminal'
 import formMixin from '../../mixins/form'
 import tableColsMixin from '../../mixins/tableCols'
 import { getQuery } from '@/api/flight'
+import { commonTableCellClass } from '@/utils/table'
 
 export default {
   name: 'DepartureTerminalView',
@@ -293,47 +296,42 @@ export default {
             {
               statCode: 'PreFlightNO',
               statName: '航班号',
-              width: 122
+              width: 80
             },
             {
               statCode: 'PreFlightDate',
               statName: '航班日期',
-              width: 83
+              width: 100
             },
             {
               statCode: 'PreAirport',
-              statName: '起飞机场',
-              width: 79
+              statName: '起飞机场'
             },
             {
               statCode: 'ActualLandingTime',
               statName: '降落时间',
-              width: 79
+              width: 100
             },
             {
               statCode: 'LandingBuild',
-              statName: '降落航站楼',
-              width: 79
+              statName: '降落航站楼'
             },
             {
               statCode: 'Carousel',
-              statName: '行李转盘',
-              width: 79
+              statName: '行李转盘'
             },
             {
               statCode: 'StandForLanding',
-              statName: '降落停机位',
-              width: 79
+              statName: '降落停机位'
             },
             {
               statCode: 'inTransferBaggageCount',
-              statName: '中转行李数',
-              width: 58
+              statName: '中转行李数'
             },
             {
               statCode: 'inTransferredBaggageCount',
               statName: '已中转行李数',
-              width: 63
+              width: 100
             }
           ]
         },
@@ -344,7 +342,7 @@ export default {
             {
               statCode: 'FlightNO',
               statName: '航班号',
-              width: 81
+              width: 80
             },
             {
               statCode: 'FlightDate',
@@ -358,28 +356,24 @@ export default {
             },
             {
               statCode: 'TargetAirport',
-              statName: '目的站',
-              width: 93
+              statName: '目的站'
             },
             {
               statCode: 'DepartureBuild',
-              statName: '起飞航站楼',
-              width: 81
+              statName: '起飞航站楼'
             },
             {
               statCode: 'BordingGate',
-              statName: '起飞登机口',
-              width: 81
+              statName: '起飞登机口'
             },
             {
               statCode: 'StandForDepartrue',
-              statName: '起飞停机位',
-              width: 81
+              statName: '起飞停机位'
             },
             {
               statCode: 'outTransferBaggageCount',
               statName: '中转进行李数',
-              width: 93
+              width: 100
             },
             {
               statCode: 'outTransferredBaggageCount',
@@ -388,8 +382,7 @@ export default {
             },
             {
               statCode: 'timeDifference',
-              statName: '转运时间',
-              width: 93
+              statName: '转运时间'
             }
           ]
         }
@@ -427,10 +420,12 @@ export default {
   //   },
   // },
   methods: {
-    cellClass(row, column, rowIndex, columnIndex) {
-      if (['FlightNO', 'PreFlightNO', 'outTransferBaggageCount'].includes(row.column.property)) {
-        return 'clickCell'
+    cellClass({ row, column, rowIndex, columnIndex }) {
+      let classString = commonTableCellClass({ row, column, rowIndex, columnIndex })
+      if (['FlightNO', 'PreFlightNO', 'inTransferBaggageCount'].includes(column.property)) {
+        classString += '' + 'clickCell'
       }
+      return classString
     },
     cellClick(row, column, cell, event) {
       switch (column.property) {
@@ -443,12 +438,12 @@ export default {
           this.$router.push({ path: '/transfer/arrival/flightView', query: row2 })
           break
         }
-        case 'outTransferBaggageCount':
+        case 'inTransferBaggageCount':
           this.$router.push({
             path: '/advance',
             query: {
-              FlightNO: row.PreFlightNO,
-              transferDeparture: row.FlightNO,
+              FlightNO: row.FlightNO,
+              transferArrival: row.PreFlightNO,
               startDate: row.FlightDate,
               endDate: row.FlightDate
             }
@@ -738,7 +733,7 @@ export default {
     // this.arraySpanMethod();
     let that = this
     this.loopEvent = setInterval(function () {
-      console.log(this.contactDot)
+      // console.log(this.contactDot)
       that.getTableData()
     }, 3000)
   },

+ 25 - 30
src/views/baggageManagement/components/transferDeparture/index.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: zk
  * @Date: 2022-01-17 10:39:22
- * @LastEditTime: 2022-05-13 16:30:13
+ * @LastEditTime: 2022-05-16 16:01:33
  * @LastEditors: your name
  * @Description: 离港01
 -->
@@ -214,6 +214,7 @@
         :cell-class-name="cellClass"
         border
         stripe
+        fit
         @cell-click="cellClick"
       >
         <el-table-column
@@ -227,6 +228,7 @@
             :key="i"
             :prop="p.statCode"
             :label="p.statName"
+            :width="p.width"
             :formatter="tableFormat"
           >
             <template slot="header">
@@ -281,6 +283,7 @@ import terminalMixin from '../../mixins/terminal'
 import formMixin from '../../mixins/form'
 import tableColsMixin from '../../mixins/tableCols'
 import { getQuery } from '@/api/flight'
+import { commonTableCellClass } from '@/utils/table'
 
 export default {
   name: 'DepartureTerminalView',
@@ -306,7 +309,7 @@ export default {
             {
               statCode: 'FlightNO',
               statName: '航班号',
-              width: 81
+              width: 80
             },
             {
               statCode: 'FlightDate',
@@ -320,28 +323,24 @@ export default {
             },
             {
               statCode: 'TargetAirport',
-              statName: '目的站',
-              width: 93
+              statName: '目的站'
             },
             {
               statCode: 'DepartureBuild',
-              statName: '起飞航站楼',
-              width: 81
+              statName: '起飞航站楼'
             },
             {
               statCode: 'BordingGate',
-              statName: '起飞登机口',
-              width: 81
+              statName: '起飞登机口'
             },
             {
               statCode: 'StandForDepartrue',
-              statName: '起飞停机位',
-              width: 81
+              statName: '起飞停机位'
             },
             {
               statCode: 'outTransferBaggageCount',
               statName: '中转进行李数',
-              width: 93
+              width: 100
             },
             {
               statCode: 'outTransferredBaggageCount',
@@ -350,8 +349,7 @@ export default {
             },
             {
               statCode: 'timeDifference',
-              statName: '转运时间',
-              width: 93
+              statName: '转运时间'
             }
           ]
         },
@@ -362,47 +360,42 @@ export default {
             {
               statCode: 'PreFlightNO',
               statName: '航班号',
-              width: 122
+              width: 80
             },
             {
               statCode: 'PreFlightDate',
               statName: '航班日期',
-              width: 83
+              width: 100
             },
             {
               statCode: 'PreAirport',
-              statName: '起飞机场',
-              width: 79
+              statName: '起飞机场'
             },
             {
               statCode: 'ActualLandingTime',
               statName: '降落时间',
-              width: 79
+              width: 100
             },
             {
               statCode: 'LandingBuild',
-              statName: '降落航站楼',
-              width: 79
+              statName: '降落航站楼'
             },
             {
               statCode: 'Carousel',
-              statName: '行李转盘',
-              width: 79
+              statName: '行李转盘'
             },
             {
               statCode: 'StandForLanding',
-              statName: '降落停机位',
-              width: 79
+              statName: '降落停机位'
             },
             {
               statCode: 'inTransferBaggageCount',
-              statName: '中转行李数',
-              width: 58
+              statName: '中转行李数'
             },
             {
               statCode: 'inTransferredBaggageCount',
               statName: '已中转行李数',
-              width: 63
+              width: 100
             }
           ]
         }
@@ -431,10 +424,12 @@ export default {
     this.getAirPortData()
   },
   methods: {
-    cellClass(row, column, rowIndex, columnIndex) {
-      if (['FlightNO', 'PreFlightNO', 'inTransferBaggageCount'].includes(row.column.property)) {
-        return 'clickCell'
+    cellClass({ row, column, rowIndex, columnIndex }) {
+      let classString = commonTableCellClass({ row, column, rowIndex, columnIndex })
+      if (['FlightNO', 'PreFlightNO', 'inTransferBaggageCount'].includes(column.property)) {
+        classString += '' + 'clickCell'
       }
+      return classString
     },
     cellClick(row, column, cell, event) {
       switch (column.property) {

+ 5 - 3
src/views/baggageManagement/mixins/terminal.js

@@ -1,7 +1,7 @@
 /*
  * @Author: Badguy
  * @Date: 2022-03-04 11:41:55
- * @LastEditTime: 2022-05-13 15:45:14
+ * @LastEditTime: 2022-05-16 15:37:54
  * @LastEditors: your name
  * @Description: 航站视图通用部分
  * have a nice day!
@@ -82,7 +82,9 @@ export default {
           case 'ActualDepartureTime':
           case 'ActualLandingTime':
             // return cellValue.split('T')[1].split(':').slice(0, 2).join(':')
-            return cellValue.replace('T', ' ')
+            return cellValue.replace('T', '\n')
+          case 'timeDifference':
+            return cellValue <= -120 ? '-2h+' : cellValue >= 120 ? '2h+' : cellValue
           default:
             return cellValue
         }
@@ -96,7 +98,7 @@ export default {
       if (columns.length > 0) {
         columns.forEach((column, index) => {
           if (index === 0) {
-            sums[index] = '航班数:'+this.tableData.length
+            sums[index] = '航班数:' + this.tableData.length
           } else if (
             // 需要计算的列
             [

+ 12 - 8
src/views/systemSettings/views/serviceManagement/serviceEdit.vue

@@ -1,6 +1,6 @@
 <!--
  * @Date: 2022-03-24 09:55:13
- * @LastEditTime: 2022-05-16 09:29:59
+ * @LastEditTime: 2022-05-16 09:55:51
  * @LastEditors: your name
  * @Description: 服务管理-编辑服务
  * have a nice day!
@@ -642,14 +642,18 @@ export default {
     async deleteSubmitHandler() {
       const operate = this.dataInMap(this.deleteDialogType, 'operate')
       let message
-      if (this.deleteDialogType === 'output') {
-        message = await operate('delete', this.delObj)
-      } else {
-        message = await operate('delete', this.delObj[this.dataInMap(this.deleteDialogType, 'key')])
+      try {
+        if (this.deleteDialogType === 'output') {
+          message = await operate('delete', this.delObj)
+        } else {
+          message = await operate('delete', this.delObj[this.dataInMap(this.deleteDialogType, 'key')])
+        }
+        this.$message.success(message ?? '成功')
+        await this.queryAll()
+        this.hideDeleteDialog()
+      } catch (error) {
+        this.$message.error(error)
       }
-      this.$message.success(message ?? '成功')
-      await this.queryAll()
-      this.hideDeleteDialog()
     },
     // 关联删除-隐藏弹框
     hideDeleteDialog() {