Эх сурвалжийг харах

Merge branch 'master' of http://120.26.64.82:3000/BFFE/CABaggageData2.0

chenjun 2 жил өмнө
parent
commit
67985a5fda

+ 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: '中转管理',

+ 9 - 1
src/router/routes/routes-file-four.js

@@ -112,7 +112,7 @@ const roleRoutes = {
               path: 'editRole',
               name: 'AuthorityRoleEdit',
               component: () => import('@/views/authorityManagement/components/authorityRoleEdit'),
-              meta: { title: '编辑角色' }
+              meta: { title: '账号权限' }
             }
           ]
         }
@@ -172,6 +172,14 @@ const accountRoutes = {
                 title: '编辑账号',
                 doesAccountExist: true
               }
+            },
+            {
+              path: 'accountAuth',
+              name: 'accountAuth',
+              component: () => import('@/views/accountManagement/components/accountAuth'),
+              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
+}

+ 239 - 0
src/views/accountManagement/components/accountAuth.vue

@@ -0,0 +1,239 @@
+<!--
+ * @Author: your name
+ * @Date: 2021-11-29 16:31:31
+ * @LastEditTime: 2022-03-02 13:51:29
+ * @LastEditors: Please set LastEditors
+ * @Description: 新增/编辑角色
+ * @FilePath: \Foshan4A2.0\src\views\authorityManagement\components\authorityRoleStatus.vue
+-->
+<template>
+  <div class="authorityPower">
+    <!--新增权限项-->
+    <div class="power-content flex-wrap">
+      <div class="r24 flex1 part">
+        <div style="padding: 27px 24px;height: 100%;" class="addApp-form">
+          <div class="addApp-form-title flex">
+            <div class="manageTitle">账号信息</div>
+            <!-- <div class="title">
+              编辑角色
+              <span class="isqy">
+                <span>是否启用</span>
+                <el-radio v-model="radio" :label="1">是</el-radio>
+                <el-radio v-model="radio" :label="0">否</el-radio>
+              </span>
+            </div> -->
+            <!-- <div v-is="['role_edit save']" class="btn">
+              <el-button class="r24" @click="removeRole" type="danger">删除</el-button>
+              <el-button @click="saveBtn('form')" size="small" type="primary">保存</el-button>
+            </div> -->
+          </div>
+          <div class="addApp-form-content dialog-public-background">
+            <el-form :inline="true" label-width="80px" ref="form" :rules="rules" class="form" :model="form">
+              <el-form-item prop="name" label="账号名称">
+                <el-input disabled placeholder="请输入角色名称" maxlength="32" v-model="form.name"></el-input>
+              </el-form-item>
+              <el-form-item label="账号描述">
+                <el-input style="width: 340px" disabled type="textarea" :rows="3" maxlength="200" placeholder="请输入描述" v-model="form.app"></el-input>
+              </el-form-item>
+              <el-form-item label="是否启用">
+                <el-radio disabled v-model="radio" :label="1">是</el-radio>
+                <el-radio disabled v-model="radio" :label="0">否</el-radio>
+              </el-form-item>
+            </el-form>
+          </div>
+        </div>
+      </div>
+      <div class="flex1 r24 part">
+        <Rolelist v-loading="loading" element-loading-text="数据加载中" @checkChange="checkChange" @checkClick="checkClick" :roleType="roleType" :checkBoxList="radioCheck" :active="true" class="hucRole" :imageSize="80" :number="8" title="角色" />
+      </div>
+      <div class="flex1 part">
+        <Permissionlist v-loading="permission" element-loading-text="数据加载中" :check="true" :imageSize="80" :RoleList="RoleList" class="hucPower" title="权限名称" />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import Permissionlist from "@/components/permissionlist";
+import Rulesofcompetency from "@/components/rulesofcompetency";
+import Permissiontree from "@/components/permissiontree";
+import Rolelist from "@/components/rolelist";
+import { RoleDetails, EditRole, RoleAuths } from "@/api/apiAuthority";
+export default {
+  name: "AuthorityRoleEdit",
+  components: { Permissionlist, Rulesofcompetency, Permissiontree, Rolelist },
+  data () {
+    return {
+      radio: 1,
+      form: {
+        //应用表单
+        name: "",
+        id: "",
+        app: "",
+      },
+      rules: {
+        //表单验证
+        name: [{ required: true, message: "请输入角色名称", trigger: "blur" }],
+      },
+      loading: false,
+      permission: false,
+      treeData: [],
+      arrs: [],
+      checkedKeys: [],
+      RoleList: [],
+      radioCheck: [],
+      checkedBoxs: [],
+      defRoleId: [],
+      roleId: null,
+      Status: null,
+      authTo: {},
+      authList: [],
+      authId: [],
+      type: null, //参数类型
+      roleType: "",
+    };
+  },
+  created () {
+    //this.getAuthTree();
+    const { RoleId, Status } = this.$route.query;
+    this.roleId = RoleId;
+    this.Status = Status;
+  },
+  mounted () {
+    this.roleType = "onlyRole";
+  },
+  methods: {
+    //角色明细
+    async roleDetails (id) {
+      try {
+        this.loading = true;
+        const res = await RoleDetails({
+          RoleId: id,
+        });
+        if (res.code === 0) {
+          const { RoleName, RoleDesc, AuthList, RoleStatus, DefRoleList } =
+            res.returnData;
+          this.form.name = RoleName;
+          this.form.app = RoleDesc;
+          this.radio = RoleStatus;
+          if (AuthList && AuthList.length) {
+            AuthList.forEach((item) => {
+              this.authId.push(item.AuthId);
+            });
+            this.checkedKeys = this.authId;
+            this.authList = _.cloneDeep(AuthList);
+            this.authTo = AuthList[0];
+          }
+          if (DefRoleList && DefRoleList.length) {
+            this.checkedBoxs = DefRoleList;
+            DefRoleList.forEach((item) => {
+              item.RoleId = item.DefRoleId;
+            });
+            this.radioCheck = DefRoleList;
+            this.roleAuths(DefRoleList[0].DefRoleId);
+          }
+          this.loading = false;
+        } else {
+          this.$message.error(res.message);
+          this.loading = false;
+        }
+      } catch (error) {
+        console.log("出错了", error);
+        this.loading = false;
+      }
+    },
+    //删除
+    removeRole () {
+      this.deleteRole(this.roleId);
+    },
+    //获取权限树回调
+    getTreeData (arr) {
+      this.treeData = arr;
+    },
+    //获取权限规则回调
+    getData (obj) {
+      this.authTo = obj;
+    },
+    //互斥角色选中回调
+    checkChange (arr) {
+      const arrs = [];
+      arr.forEach((item) => {
+        const obj = {
+          DefRoleId: item.RoleId,
+          IsSelected: 1,
+          DefRoleName: item.RoleName,
+        };
+        arrs.push(obj);
+      });
+      this.checkedBoxs = arrs;
+    },
+    //互斥角色点击回调
+    checkClick (item) {
+      this.roleAuths(item.RoleId);
+    },
+    async roleAuths (id) {
+      try {
+        let params = {
+          RoleId: id,
+        };
+        this.permission = true;
+        const res = await RoleAuths(params);
+        if (res.code === 0) {
+          this.RoleList = res.returnData;
+          this.permission = false;
+        } else {
+          this.$message.error(res.message);
+          this.permission = false;
+        }
+      } catch (error) {
+        console.log("出错了", error);
+        this.permission = false;
+      }
+    },
+    //保存
+    saveBtn (formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.editRole();
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    //确认保存
+    async editRole () {
+      try {
+        const datas = [];
+        this.treeData.forEach((item) => {
+          datas.push(item.AuthList);
+        });
+        const res = await EditRole({
+          RoleName: this.form.name,
+          RoleDesc: this.form.app,
+          DefRoleList: this.checkedBoxs,
+          AuthList: datas,
+          RoleStatus: this.radio,
+          RoleId: this.roleId,
+        });
+        if (res.code === 0) {
+          this.$message.success(res.message);
+          this.$store.dispatch("tagsView/delView", this.$route);
+          this.$router.push("/role");
+        } else {
+          this.$message.error(res.message);
+        }
+      } catch (error) {
+        console.log("出错了", error);
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+@import "../../authorityManagement/css/role.scss";
+.part {
+  background-color: #fff;
+}
+</style>

+ 204 - 106
src/views/accountManagement/components/accountHome.vue

@@ -7,53 +7,24 @@
         <div class="status2"><span class="icon" />离线</div>
         <div class="status3"><span class="icon" />禁用</div>
       </div>
-      <Search
-        :is-slot="true"
-        :is-title="false"
-        @getSearchData="getSearchData"
-        @clearSearchData="clearSearchData"
-      >
-        <el-button
-          v-is="['userlist_btn_add']"
-          class="btnAdd"
-          @click="addAccount"
-        >新增</el-button>
+      <Search :is-slot="true" :is-title="false" @getSearchData="getSearchData" @clearSearchData="clearSearchData">
+        <el-button v-is="['userlist_btn_add']" class="btnAdd" @click="addAccount">新增</el-button>
       </Search>
     </div>
     <div class="content-box scrollbar">
       <template v-if="accountArr.length">
-        <el-row
-          v-infinite-scroll="load"
-          :infinite-scroll-disabled="disabled"
-          :infinite-scroll-distance="20"
-          :gutter="24"
-        >
-          <el-col
-            v-for="account in accountArr"
-            :key="account.UserId"
-            :xs="24"
-            :sm="12"
-            :md="8"
-            :lg="4"
-            class="account-box"
-          >
+        <el-row v-infinite-scroll="load" :infinite-scroll-disabled="disabled" :infinite-scroll-distance="20" :gutter="24">
+          <el-col v-for="account in accountArr" :key="account.UserId" :xs="24" :sm="12" :md="8" :lg="4" class="account-box">
             <div class="account-box-wrap">
               <div :class="account.Status === 1 ? 'headOnline' : account.Status === 2 ? 'headOffline' : 'headDisabled'" />
               <div>
                 <div class="nameBox flex">
                   <div class="flex-wrap">
                     <div class="name">{{ account.UserName }}</div>
-                    <div
-                      v-is="['userlist_btn_update']"
-                      class="loger"
-                      @click="toEdit(account.UserId)"
-                    />
+                    <div v-is="['userlist_btn_update']" class="loger" @click="toEdit(account.UserId)" />
+                    <div @click="authAccount(account)" class="loger cap-auth"></div>
                   </div>
-                  <div
-                    v-is="['userlist_btn_del']"
-                    class="del"
-                    @click="deleteUser(account)"
-                  >
+                  <div v-is="['userlist_btn_del']" class="del" @click="deleteUser(account)">
                     <i class="el-icon-close" />
                   </div>
                 </div>
@@ -64,38 +35,18 @@
 
                 <el-row class="content">
                   <el-col :span="12">登录次数:<span>{{ account.LoginCount }}</span></el-col>
-                  <el-col
-                    :span="12"
-                    class="flexLeft"
-                  >异常登录:<span>{{ account.ExceptionCount }}</span></el-col>
+                  <el-col :span="12" class="flexLeft">异常登录:<span>{{ account.ExceptionCount }}</span></el-col>
                 </el-row>
                 <el-row class="content">
                   <el-col :span="24">权限项数:<span>{{ account.AuthCount }}</span></el-col>
                 </el-row>
                 <el-row class="content">
                   <el-col :span="12">
-                    状态:<span
-                      v-if="account.Status == 1 || account.Status == 2"
-                      class="used"
-                    >启用</span>
-                    <span
-                      v-else-if="account.Status == 3"
-                      class="unUsed"
-                    >停用</span>
+                    状态:<span v-if="account.Status == 1 || account.Status == 2" class="used">启用</span>
+                    <span v-else-if="account.Status == 3" class="unUsed">停用</span>
                   </el-col>
-                  <el-col
-                    v-is="['userlist_btn_status_change']"
-                    :span="12"
-                    class="flexLeft"
-                  >
-                    <el-switch
-                      v-model="account.Flag"
-                      :active-value="true"
-                      :inactive-value="false"
-                      active-color="#2D67E3"
-                      inactive-color="#CFD6E2"
-                      @change="userActiveToggle(account)"
-                    />
+                  <el-col v-is="['userlist_btn_status_change']" :span="12" class="flexLeft">
+                    <el-switch v-model="account.Flag" :active-value="true" :inactive-value="false" active-color="#2D67E3" inactive-color="#CFD6E2" @change="userActiveToggle(account)" />
                   </el-col>
                 </el-row>
               </div>
@@ -103,14 +54,8 @@
           </el-col>
         </el-row>
         <template v-if="pages > 1">
-          <p
-            v-if="loading"
-            class="center"
-          >加载中...</p>
-          <p
-            v-if="noMore"
-            class="center"
-          >没有更多数据了~</p>
+          <p v-if="loading" class="center">加载中...</p>
+          <p v-if="noMore" class="center">没有更多数据了~</p>
         </template>
       </template>
     </div>
@@ -119,17 +64,39 @@
         <div class="title del-title">删除账号</div>
         <div class="content del-content"><i class="el-icon-error error r10" />你确定要删除<span class="error l10">{{ deleteUserName }}</span>?</div>
         <div class="foot Delfoot right t30">
-          <el-button
-            size="medium"
-            type="danger"
-            class="r24"
-            @click="del()"
-          >删除</el-button>
+          <el-button size="medium" type="danger" class="r24" @click="del()">删除</el-button>
 
-          <el-button
-            size="medium"
-            @click="dialogVisible = false"
-          >取消</el-button>
+          <el-button size="medium" @click="dialogVisible = false">取消</el-button>
+        </div>
+      </div>
+    </Dialog>
+    <!--新增/编辑-->
+    <Dialog :flag="editDialogVisible" width="508px" :show-flag="true">
+      <div class="airportInfoDialog dialog-public-background">
+        <div class="title">{{ editDialogTitle }}</div>
+        <div class="content">
+          <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="130px" class="demo-ruleForm">
+            <el-form-item label="账号名称" prop="UserName">
+              <el-input v-model="ruleForm.UserName" size="medium" placeholder="请输入账号名称" />
+            </el-form-item>
+            <el-form-item label="账号密码" prop="UserPwd">
+              <div class="flex-wrap">
+                <el-input v-model="ruleForm.UserPwd" class="r25" disabled size="medium" placeholder="请输入密码" />
+                <el-button size="medium" @click="resetPwd" style="position: relative;top: 4px;" class="r26" type="primary">重置密码</el-button>
+              </div>
+            </el-form-item>
+            <el-form-item label="账号描述" prop="UserDesc">
+              <el-input v-model="ruleForm.UserDesc" size="medium" type="textarea" :rows="3" placeholder="请输入角色描述" />
+            </el-form-item>
+            <el-form-item label="是否启用" prop="Status">
+              <el-radio v-model="ruleForm.Status" :label="1">是</el-radio>
+              <el-radio v-model="ruleForm.Status" :label="2">否</el-radio>
+            </el-form-item>
+          </el-form>
+        </div>
+        <div class="foot center t30">
+          <el-button size="medium" type="primary" class="r25 r26" @click="submitClickHandler()">提交</el-button>
+          <el-button size="medium" class="r26" @click="resetForm('ruleForm')">取消</el-button>
         </div>
       </div>
     </Dialog>
@@ -139,11 +106,16 @@
 <script>
 import Search from '@/layout/components/Search'
 import Dialog from '@/layout/components/Dialog'
-import { GetAccountList, ChangeUserStatus, delAccount } from '@/api/Account'
+import { GetAccountList, ChangeUserStatus, delAccount, getAccountDetails, editAccount, addAccount } from '@/api/Account'
+import { pwdProduce } from '@/utils/validate'
+import { mapGetters } from 'vuex'
 export default {
   components: { Search, Dialog },
-  data() {
+  data () {
     return {
+      pwdStruc: '',
+      pwdLengthBegin: 0,
+      pwdLengthEnd: 0,
       dialogVisible: false,
       accountArr: [],
       deleteUserId: '',
@@ -155,23 +127,58 @@ export default {
       PageIndex: 1,
       PageSize: 20,
       pages: null,
-      loading: false
+      loading: false,
+      editDialogVisible: false,
+      editDialogTitle: '新增账号',
+      editType: 'add',
+      ruleForm: {
+        // 协议信息表单
+        UserName: "",
+        Status: "",
+        UserDesc: "",
+        UserPwd: "",
+        AuthList: [],
+        GroupList: [],
+        RoleList: [],
+        TacList: [],
+      },
+      rules: {
+        // 协议信息表单验证
+        UserName: [
+          { required: true, message: "请输入账号名称", trigger: "blur" },
+        ],
+      },
+      ruleFormObj: {},
+      roleId: ''
     }
   },
   computed: {
-    noMore() {
+    ...mapGetters(['systemSet']),
+    noMore () {
       return this.PageIndex >= this.pages
     },
-    disabled() {
+    disabled () {
       return this.loading || this.noMore
     }
   },
   watch: {
-    searchInfo(val) {
+    searchInfo (val) {
       val.length === 0 && this.pageInit()
     }
   },
-  created() {
+  created () {
+    // 获取系统配置
+    let obj
+    if (typeof this.systemSet === 'string') {
+      obj = JSON.parse(this.systemSet)
+    } else {
+      obj = this.systemSet
+    }
+    // console.log(obj)
+    const { PwdStruc, PwdLengthBegin, PwdLengthEnd } = obj
+    this.pwdStruc = PwdStruc
+    this.pwdLengthBegin = PwdLengthBegin
+    this.pwdLengthEnd = PwdLengthEnd
     if (!this.searchInfo) {
       this.accountList()
     } else {
@@ -179,30 +186,96 @@ export default {
       this.accountList()
     }
   },
+  mounted () {
+    this.resetPwd()
+  },
   methods: {
+    // 随机生成密码
+    resetPwd () {
+      this.ruleForm.UserPwd = pwdProduce(this.pwdLengthBegin, this.pwdLengthEnd, this.pwdStruc)
+    },
+    // 编辑账号
+    async saveEditAccount () {
+      try {
+        const res = await editAccount(this.ruleForm)
+        if (res.code === 0) {
+          this.$message.success(res.message)
+          this.resetForm('ruleForm')
+          this.pageInit()
+        } else {
+          this.$message.error(res.message)
+        }
+      } catch (error) {
+        console.log('出错了', error)
+      }
+    },
+    // 新增账号
+    async saveAddAccount () {
+      try {
+        const res = await addAccount(this.ruleForm)
+        if (res.code === 0) {
+          this.$message.success(res.message)
+          this.resetForm('ruleForm')
+          this.pageInit()
+        } else {
+          this.$message.error(res.message)
+        }
+      } catch (error) {
+        console.log('出错了', error)
+      }
+    },
+    // 获取当前账号信息
+    async getAccountInfo () {
+      const res = await getAccountDetails({
+        UserId: this.roleId
+      })
+      if (res.code == 0) {
+        const { Status, UserDesc, UserName, UserPwd } = res.returnData
+        this.ruleForm.Status = Status
+        this.ruleForm.UserDesc = UserDesc
+        this.ruleForm.UserName = UserName
+        this.ruleForm.UserPwd = UserPwd
+      } else {
+        this.$message.error(res.message)
+      }
+    },
+    // 新增/编辑-确认
+    submitClickHandler () {
+      this.$refs["ruleForm"].validate((valid) => {
+        if (valid) {
+          if (this.editType == 'add') {
+            this.saveAddAccount()
+          } else {
+            this.saveEditAccount()
+          }
+        } else {
+          return false
+        }
+      });
+    },
     // 滚动加载
-    load() {
+    load () {
       this.PageIndex += 1
       this.accountList()
     },
     // 回到第一页
-    pageInit() {
+    pageInit () {
       this.PageIndex = 1
       this.accountArr = []
       this.accountList()
     },
     // 查询
-    getSearchData(val) {
+    getSearchData (val) {
       this.searchInfo = val
       this.pageInit()
     },
 
     // 清除查询
-    clearSearchData() {
+    clearSearchData () {
       this.searchInfo = ''
     },
     // 修改状态
-    async userActiveToggle({ Flag, Status, UserId }) {
+    async userActiveToggle ({ Flag, Status, UserId }) {
       Status = Flag ? 2 : 3
       try {
         const result = await ChangeUserStatus({
@@ -224,25 +297,33 @@ export default {
         console.log('出错了', error)
       }
     },
-    deleteUser(user) {
+    deleteUser (user) {
       this.dialogVisible = true
       this.deleteUserId = user.UserId
       this.deleteUserName = user.UserName
     },
-    toEdit(userId) {
-      this.userId = userId
-      this.$router.push({
-        path: '/account/accountEdit',
-        query: { userId: this.userId }
-      })
+    toEdit (userId) {
+      this.editDialogVisible = true
+      this.editType = 'edit'
+      this.editDialogTitle = '编辑账号'
+      this.roleId = userId
+      this.getAccountInfo()
     },
-    addAccount() {
-      this.$router.push({
-        path: '/account/accountAdd'
-      })
+    addAccount () {
+      this.editDialogTitle = '新增账号'
+      this.editDialogVisible = true
+      this.editType = 'add'
+      // this.$router.push({
+      //   path: '/account/accountAdd'
+      // })
+    },
+    // 重置
+    resetForm (formName) {
+      this.$refs[formName].resetFields()
+      this.editDialogVisible = false
     },
     // 获取列表
-    async accountList() {
+    async accountList () {
       try {
         this.loading = true
         const result = await GetAccountList({
@@ -267,7 +348,7 @@ export default {
     },
 
     // 删除接口
-    async del() {
+    async del () {
       const result = await delAccount({
         UserId: this.deleteUserId
       })
@@ -280,6 +361,15 @@ export default {
       } else {
         this.$message.success(result.message)
       }
+    },
+
+    // 账号权限
+    authAccount (item) {
+      this.roleId = item.userId
+      this.$router.push({
+        path: '/account/accountAuth',
+        query: { userId: this.roleId }
+      })
     }
   }
 }
@@ -415,14 +505,22 @@ export default {
           width: 14px;
           height: 14px;
           margin-left: 24px;
-          background: url('../../../assets/status/ic_edit_default.png') no-repeat;
+          background: url("../../../assets/status/ic_edit_default.png")
+            no-repeat;
           background-size: 100% 100%;
           cursor: pointer;
         }
         .loger:hover {
-          background: url('../../../assets/status/ic_edit_hovar.png') no-repeat;
+          background: url("../../../assets/status/ic_edit_hovar.png") no-repeat;
           background-size: 100% 100%;
         }
+        .cap-auth {
+          margin-left: 12px;
+          background-image: url("../../../assets/status/ic_edit_authorization.png");
+          &:hover {
+            background-image: url("../../../assets/status/ic_edit_authorization_hover.png");
+          }
+        }
       }
 
       .content {

+ 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 {

+ 4 - 4
src/views/authorityManagement/components/authorityRoleEdit.vue

@@ -30,14 +30,14 @@
           <div class="addApp-form-content dialog-public-background">
             <el-form :inline="true" label-width="80px" ref="form" :rules="rules" class="form" :model="form">
               <el-form-item prop="name" label="角色名称">
-                <el-input placeholder="请输入角色名称" maxlength="32" v-model="form.name"></el-input>
+                <el-input disabled placeholder="请输入角色名称" maxlength="32" v-model="form.name"></el-input>
               </el-form-item>
               <el-form-item label="角色描述">
-                <el-input style="width: 340px" type="textarea" :rows="3" maxlength="200" placeholder="请输入描述" v-model="form.app"></el-input>
+                <el-input style="width: 340px" disabled type="textarea" :rows="3" maxlength="200" placeholder="请输入描述" v-model="form.app"></el-input>
               </el-form-item>
               <el-form-item label="是否启用">
-                <el-radio v-model="radio" :label="1">是</el-radio>
-                <el-radio v-model="radio" :label="0">否</el-radio>
+                <el-radio disabled v-model="radio" :label="1">是</el-radio>
+                <el-radio disabled v-model="radio" :label="0">否</el-radio>
               </el-form-item>
             </el-form>
           </div>

+ 4 - 11
src/views/authorityManagement/components/authorityRoleHome.vue

@@ -258,7 +258,6 @@ export default {
           } else {
             this.editRoleFunc()
           }
-          this.resetForm('ruleForm')
         } else {
           return false
         }
@@ -275,6 +274,7 @@ export default {
         const res = await SaveRole(this.ruleForm);
         if (res.code === 0) {
           this.$message.success(res.message);
+          this.resetForm('ruleForm');
           this.gueryRole({
             QueryName: this.keyWords,
             PageSize: this.PageSize,
@@ -294,10 +294,7 @@ export default {
           RoleId: id,
         });
         if (res.code === 0) {
-          const { RoleName, RoleDesc, RoleStatus } = res.returnData;
-          this.ruleForm.RoleName = RoleName;
-          this.ruleForm.RoleDesc = RoleDesc;
-          this.ruleForm.RoleStatus = RoleStatus;
+          this.ruleForm = res.returnData;
         } else {
           this.$message.error(res.message);
         }
@@ -308,14 +305,10 @@ export default {
     //确认保存
     async editRoleFunc () {
       try {
-        const res = await EditRole({
-          RoleName: this.ruleForm.RoleName,
-          RoleDesc: this.ruleForm.RoleDesc,
-          RoleStatus: this.ruleForm.RoleStatus,
-          RoleId: this.roleId,
-        });
+        const res = await EditRole(this.ruleForm);
         if (res.code === 0) {
           this.$message.success(res.message);
+          this.resetForm('ruleForm');
           this.gueryRole({
             QueryName: this.keyWords,
             PageSize: this.PageSize,

+ 1 - 1
src/views/authorityManagement/css/role.scss

@@ -46,7 +46,7 @@
   }
 }
 .power-content {
-  margin-top: 24px;
+  // margin-top: 24px;
   height: 704px;
   .part{
     height: 704px;

+ 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() {