zhaoke 1 year ago
parent
commit
4ff836dead
3 changed files with 13 additions and 5 deletions
  1. 6 0
      src/utils/request.js
  2. 5 3
      src/views/newQuery/components/table.vue
  3. 2 2
      src/views/newTransfer/index.vue

+ 6 - 0
src/utils/request.js

@@ -71,6 +71,12 @@ service.interceptors.response.use(
             location.reload();
           },
         });
+      } else {
+        Message({
+          message: res.message || "网络错误",
+          type: "error",
+          duration: 3 * 1000
+        });
       }
       return Promise.reject(new Error(res.message || "Error"));
     } else {

+ 5 - 3
src/views/newQuery/components/table.vue

@@ -623,14 +623,16 @@ export default {
     },
     // 表格-设置单元格样式
     cellClass ({ row, column, rowIndex, columnIndex }) {
+      const classes = []
       if (this.authBtnColName.includes(column.property) && Number(row[column.property]) !== 0) {
-        return 'is-click-btn'
+        classes.push('is-click-btn')
       }
       if (this.$route.path == '/newDeparture') {
-        if (column.property === 'NO_check_number' && Number(row['NO_check_number']) > 0) {
-          return 'cell-toUnload'
+        if (column.property === 'NO_check_number' && row['NO_check_number'] != 0) {
+          classes.push('cell-toUnload')
         }
       }
+      return classes.join(' ')
     },
     // 表格-设置行样式
     rowClass ({ row, rowIndex }) {

+ 2 - 2
src/views/newTransfer/index.vue

@@ -150,8 +150,8 @@ export default {
         if (Number(res.code) === 0) {
           this.AirportList = res.returnData;
           if (type && !this.formData.currentAirport) {
-            const flag = res.returnData.filter(item => item.IATACode == 'CAN');
-            this.formData.currentAirport = this.TauthId && flag.length ? 'CAN' : res.returnData[0].IATACode;
+            const flag = res.returnData.filter(item => item.IATACode == 'PEK');
+            this.formData.currentAirport = this.TauthId && flag.length ? 'PEK' : res.returnData[0].IATACode;
           }
           this.tableTag = {
             filter: this.formatParams(),