Ver Fonte

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

chenrui  há 2 anos atrás
pai
commit
125e70bace

+ 1 - 1
src/layout/components/NavBarTop/index.vue

@@ -5,7 +5,7 @@
         <el-avatar class="appNav-avatar" :size="25" :src="imgUrl" @error="errorHandler">
           <img src="https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png" />
         </el-avatar>
-        <span class="appNav-name">名称</span>
+        <span class="appNav-name">深圳机场货运一个码系统-管理端</span>
       </div>
       <div class="appNav-right">
         <el-avatar class="appNav-avatar" :size="25" :src="imgUrl" @error="errorHandler">

+ 1 - 1
src/router/routes/routes-file-six.ts

@@ -20,6 +20,7 @@ const ActualTimeRoutes = {
       redirect: '/realTime/departure/airport',
       meta: {
         title: '国内出港',
+        breadcrumb: false,
         roles: ['view_of_domestic_departure_termina_page'],
       },
       component: {
@@ -31,7 +32,6 @@ const ActualTimeRoutes = {
           name: 'DepartureAirport',
           meta: {
             title: '国内出港航站视图',
-            breadcrumb: false,
           },
           component: {
             render: () => h(resolveComponent('router-view')),

+ 6 - 6
src/views/BasicsData/containerMaintenance/index.vue

@@ -9,7 +9,7 @@
       >
         <template #header>
           <div class="status flex-wrap">
-            <div class="manageTitle">容器维护</div>
+            <div class="manageTitle">容器类型维护</div>
           </div>
         </template></Minheader
       >
@@ -147,7 +147,7 @@ const tableBtnGroup = ref([
 ]);
 //新增
 const addForm = () => {
-  msgTitle.value = "新增容器维护";
+  msgTitle.value = "新增类型维护";
   flag.value = true;
   type.value = "";
   tableForm.event = 1;
@@ -163,7 +163,7 @@ const resetForm = () => {
 };
 //编辑
 const editDialog = (data) => {
-  msgTitle.value = "编辑容器维护";
+  msgTitle.value = "编辑容器类型维护";
   flag.value = true;
   type.value = "";
   tableForm.name = data.name;
@@ -172,7 +172,7 @@ const editDialog = (data) => {
 };
 //删除
 const eleDialog = () => {
-  msgTitle.value = "删除容器维护";
+  msgTitle.value = "删除容器类型维护";
   flag.value = true;
   type.value = "del";
 };
@@ -187,7 +187,7 @@ const delRest = () => {
 //编辑-删除
 const btnClick = (row, index, param) => {
   if (param === 2) {
-    msgTitle.value = "编辑容器维护";
+    msgTitle.value = "编辑容器类型维护";
     flag.value = true;
     type.value = "";
     tableForm.event = 2;
@@ -197,7 +197,7 @@ const btnClick = (row, index, param) => {
     tableForm.containerDesc = index.containerDesc;
     tableForm.containerUnit = index.containerUnit;
   } else if (param === 3) {
-    msgTitle.value = "删除容器维护";
+    msgTitle.value = "删除容器类型维护";
     flag.value = true;
     type.value = "del";
     tableForm.event = 3;

+ 1 - 1
src/views/realTime/components/AirportView/index.scss

@@ -33,7 +33,7 @@
       .el-table-v2__header-cell,
       .el-table-v2__row-cell {
         padding: 0;
-        &:not(:last-child) {
+        &:not(:last-of-type) {
           border-right: 1px solid #dfe3ea;
         }
       }

+ 42 - 6
src/views/realTime/components/AirportView/index.vue

@@ -14,12 +14,18 @@
         />
       </div>
       <div class="airport-settings">
-        <CommonSwitch v-model:flag="goodsCountFlag" label="显示件数" />
-        <CommonSwitch v-model:flag="UTCFlag" label="开启UTC" />
-        <ColumnSet
-          :table-columns="tableColumns"
-          @checked-submit="columnChecked"
-        />
+        <div v-permission="getPermission('count')">
+          <CommonSwitch v-model:flag="goodsCountFlag" label="显示件数" />
+        </div>
+        <div v-permission="getPermission('UTC')">
+          <CommonSwitch v-model:flag="UTCFlag" label="开启UTC" />
+        </div>
+        <div v-permission="getPermission('columnSet')">
+          <ColumnSet
+            :table-columns="tableColumns"
+            @checked-submit="columnChecked"
+          />
+        </div>
       </div>
     </div>
     <div class="airport-table">
@@ -129,6 +135,36 @@ const {
   tableDataSortRuleMap,
   dealedTableData,
 } = useTableFilterAndSort(tableColumns, tableData)
+
+const permissionMap = {
+  DepartureAirport: {
+    count:
+      'number_of_pieces_displayed_in_domestic_departure_terminal_view_button',
+    UTC: 'turn_on_utc_in_view_of_domestic_departure_terminal_button',
+    columnSet: 'domestic_departure_terminal_view_column_setting_button',
+  },
+  InternationalDepartureAirport: {
+    count:
+      'number_of_pieces_displayed_in_international_departure_terminal_view_button',
+    UTC: 'international_departure_terminal_view_opens_utc_button',
+    columnSet: 'international_departure_terminal_view_column_setting_button',
+  },
+  ArrivalAirport: {
+    count:
+      'number_of_pieces_displayed_in_domestic_inbound_terminal_view_button',
+    UTC: 'turn_on_utc_in_view_of_domestic_inbound_terminal_button',
+    columnSet: 'domestic_inbound_terminal_view_column_setting_button',
+  },
+  InternationalArrivalAirport: {
+    count:
+      'number_of_display_pieces_of_international_inbound_terminal_view_button',
+    UTC: 'the_view_of_international_inbound_terminal_opens_utc_button',
+    columnSet: 'view_column_setting_of_international_inbound_terminal_button',
+  },
+}
+const getPermission = (type?: string) => {
+  return [permissionMap[props.name][type]]
+}
 </script>
 <style lang="scss" scoped>
 @import './index.scss';

+ 19 - 9
src/views/realTime/components/AirportView/useAirportTable.ts

@@ -1,10 +1,16 @@
 import { Query } from '@/api/webApi'
 import { CommonData, CommonTableColumn } from '~/common'
 
+interface SimpleColumn {
+  columnName: string
+  columnLabel: string
+  [x: string]: any
+}
+
 const columnGroupsMap: {
   [x: string]: {
     groupName: string
-    children: { columnName: string; columnLabel: string; [x: string]: any }[]
+    children: SimpleColumn[]
   }[]
 } = {
   departure: [
@@ -19,10 +25,12 @@ const columnGroupsMap: {
         {
           columnName: 'flightDate',
           columnLabel: '执飞日期',
+          width: 73,
         },
         {
           columnName: 'planDepartureTime',
           columnLabel: '起飞时间',
+          width: 73,
         },
         {
           columnName: 'landingAirport',
@@ -40,6 +48,7 @@ const columnGroupsMap: {
         {
           columnName: 'planLandingTime',
           columnLabel: '实际降落\n时间',
+          width: 73,
         },
       ],
     },
@@ -326,22 +335,23 @@ const simulateTableDataMap = {
 }
 const headerClassMap = ['bg-yellow', 'bg-green', 'bg-cyan']
 
-const computedWidth = (text: string) => {
+const computedWidth = (column: SimpleColumn) => {
   let width = 0
-  text.split('\n').forEach(line => {
+  column.columnLabel.split('\n').forEach(line => {
     const len = line.length
     let realLength = 0
     for (let i = 0; i < len; i++) {
       realLength += line.charCodeAt(i) > 255 ? 2 : 1
     }
-    if (width < realLength * 8) {
-      width = realLength * 8
+    if (width < (realLength + 2) * 6) {
+      width = (realLength + 2) * 6
     }
   })
-  if (['航班号', '目的站'].includes(text)) {
-    width += 8
+  if (column.needFilters || column.needSort) {
+    width += 6
   }
-  return width
+  // border
+  return width + 1
 }
 
 export default function useAirportTable(name: string, formData: CommonData) {
@@ -369,7 +379,7 @@ export default function useAirportTable(name: string, formData: CommonData) {
             orderNumber: null,
             queryTemplateColumnSetID: null,
             queryTemplateID: null,
-            width: computedWidth(column.columnLabel),
+            width: computedWidth(column),
             flexGrow: 1,
             align: 'center',
             headerClass: headerClassMap[groupIndex],

+ 1 - 0
src/views/realTime/trackMap/index.vue

@@ -13,6 +13,7 @@
           @clear="clearHandler"
         />
         <el-button
+          v-permission="['waybill_query_button']"
           class="search-button"
           size="default"
           type="primary"

+ 25 - 3
src/views/userManagement/account/index.vue

@@ -18,16 +18,21 @@
     <!--新增/编辑-->
     <Dialog :flag="editDialogVisible" :msgTitle="editDialogTitle" @submitForm="submitForm(ruleFormRef)" @resetForm="resetForm(ruleFormRef)" :show-flag="true">
       <el-form ref="ruleFormRef" :model="ruleForm" label-width="110px" class="demo-ruleForm">
-        <el-form-item label="账号名称" prop="user_name">
+        <el-form-item label="账号名称" :rules="[{required: true,message: '请输入账号名称',trigger: 'blur',}]" prop="user_name">
           <el-input :disabled="dT == 'edit'" v-model="ruleForm.user_name" size="default" placeholder="请输入账号名称" />
         </el-form-item>
-        <el-form-item label="账号密码" prop="user_pwd">
+        <el-form-item label="账号密码" :rules="[{required: true,message: '请输入账号密码',trigger: 'blur',}]" prop="user_pwd">
           <el-input v-model="ruleForm.user_pwd" type="password" show-password size="default" placeholder="请输入账号名称" />
         </el-form-item>
+        <el-form-item label="账号组关联" prop="user_gropu_id">
+          <el-select size="default" style="width: 100%" v-model="ruleForm.user_group_id" placeholder="请选择">
+            <el-option v-for="item in options" :key="item.v" :label="item.k" :value="item.v"> </el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="账号描述" prop="user_comment">
           <el-input v-model="ruleForm.user_comment" size="default" type="textarea" :rows="3" placeholder="请输入账号描述" />
         </el-form-item>
-        <el-form-item label="是否启用" prop="user_status">
+        <el-form-item label="是否启用" :rules="[{required: true,message: '请选择是否启用',trigger: 'change',}]" prop="user_status">
           <el-radio-group v-model="ruleForm.user_status">
             <el-radio :label="1">启用</el-radio>
             <el-radio :label="2"> 禁用</el-radio>
@@ -83,9 +88,11 @@ const ruleForm = ref<any>({
   user_comment: "",
   user_status: "",
   user_pwd: "",
+  user_group_id: "",
 });
 const rowIndex = ref<any>({});
 const data = ref<any>([]);
+const options = ref<any>([]);
 const msgId = ref(null);
 const msgType = ref("all");
 const PageIndex = ref(1);
@@ -168,9 +175,24 @@ const dataChange = async (event, data) => {
   }
 };
 
+//获取账号组
+const getGroupSelect = async () => {
+  const res = await Query({
+    id: DATACONTENT_ID.accountGroupSelId,
+    dataContent: [],
+  });
+  if (res.code == 0) {
+    const { listValues } = res.returnData;
+    options.value = listValues;
+  } else {
+    ElMessage.error(res.message);
+  }
+};
+
 onBeforeMount(() => {
   getGroup();
   accountList();
+  getGroupSelect();
 });
 
 const handleNodeClick = (data) => {

+ 1 - 1
src/views/userManagement/accountGroup/index.vue

@@ -15,7 +15,7 @@
     <!--新增/编辑-->
     <Dialog :flag="editDialogVisible" :msgTitle="editDialogTitle" @submitForm="submitForm(ruleFormRef)" @resetForm="resetForm(ruleFormRef)" :show-flag="true">
       <el-form ref="ruleFormRef" :model="ruleForm" label-width="110px" class="demo-ruleForm">
-        <el-form-item label="账号组名称" prop="user_group_name">
+        <el-form-item label="账号组名称" :rules="[{required: true,message: '请输入账号组名称',trigger: 'blur',}]" prop="user_group_name">
           <el-input v-model="ruleForm.user_group_name" size="default" placeholder="请输入账号组名称" />
         </el-form-item>
         <el-form-item label="账号组描述" prop="user_group_comment">

+ 3 - 4
src/views/userManagement/application/index.vue

@@ -14,13 +14,13 @@
     <!--新增/编辑-->
     <Dialog :flag="editDialogVisible" :msgTitle="editDialogTitle" @submitForm="submitForm(ruleFormRef)" @resetForm="resetForm(ruleFormRef)" :show-flag="true">
       <el-form ref="ruleFormRef" :model="ruleForm" label-width="110px" class="demo-ruleForm">
-        <el-form-item label="应用名称" prop="app_name" :rules="formRules.isNotNull">
+        <el-form-item label="应用名称" prop="app_name" :rules="[{required: true,message: '请输入应用名称',trigger: 'blur',}]">
           <el-input v-model="ruleForm.app_name" size="default" placeholder="请输入应用名称" />
         </el-form-item>
-        <el-form-item label="应用链接账号" prop="app_show_id" :rules="formRules.isNotNull">
+        <el-form-item label="应用链接账号" prop="app_show_id" :rules="[{required: true,message: '请输入应用链接账号',trigger: 'blur',}]">
           <el-input v-model="ruleForm.app_show_id" size="default" placeholder="请输入应用链接账号" />
         </el-form-item>
-        <el-form-item label="应用链接密钥" prop="app_show_id" :rules="formRules.isNotNull">
+        <el-form-item label="应用链接密钥" prop="app_show_secret" :rules="[{required: true,message: '请输入应用链接密钥',trigger: 'blur',}]">
           <el-input v-model="ruleForm.app_show_secret" size="default" placeholder="请输入应用链接密钥" />
         </el-form-item>
         <el-form-item label="应用描述" prop="app_comment">
@@ -40,7 +40,6 @@ import table from "../hooks/useTable";
 const ruleFormRef = ref<FormInstance>();
 const tableHeader = ref<any>([]);
 const tableData = ref<any>([]);
-const formRules = useElement().formRules;
 const tableBtnGroup = [
   {
     name: "编辑",

+ 4 - 1
src/views/userManagement/permission/index.vue

@@ -10,7 +10,9 @@
       <div class="permission-content-tree box">
         <div class="manageTitle">权限树</div>
         <div class="contentTree">
-          <el-tree :data="data" :props="defaultProps" node-key="auth_id" highlight-current :default-expanded-keys="currentKey" :expand-on-click-node="false" @node-click="handleNodeClick" />
+          <el-scrollbar>
+            <el-tree :data="data" :props="defaultProps" node-key="auth_id" highlight-current :default-expanded-keys="currentKey" :expand-on-click-node="false" @node-click="handleNodeClick" />
+          </el-scrollbar>
         </div>
       </div>
       <div class="permission-content-card box">
@@ -367,6 +369,7 @@ const resetForm = (formEl: FormInstance | undefined) => {
       margin-right: 24px;
       .contentTree {
         margin-top: 30px;
+        height: calc(100% - 60px);
       }
     }
     &-card {

+ 4 - 4
src/views/userManagement/role/index.vue

@@ -17,16 +17,16 @@
     <!--新增/编辑-->
     <Dialog :flag="editDialogVisible" :msgTitle="editDialogTitle" @submitForm="submitForm(ruleFormRef)" @resetForm="resetForm(ruleFormRef)" :show-flag="true">
       <el-form ref="ruleFormRef" :model="ruleForm" label-width="110px" class="demo-ruleForm">
-        <el-form-item label="角色名称" prop="role_name">
+        <el-form-item label="角色名称" :rules="[{required: true,message: '请输入角色名称',trigger: 'blur',}]" prop="role_name">
           <el-input v-model="ruleForm.role_name" size="default" placeholder="请输入角色名称" />
         </el-form-item>
         <el-form-item label="角色描述" prop="role_comment">
           <el-input v-model="ruleForm.role_comment" size="default" type="textarea" :rows="3" placeholder="请输入角色描述" />
         </el-form-item>
-        <el-form-item label="是否启用" prop="role_status">
+        <el-form-item label="是否启用" :rules="[{required: true,message: '请选择是否启用',trigger: 'change',}]" prop="role_status">
           <el-radio-group v-model="ruleForm.role_status">
-            <el-radio label="1">启用</el-radio>
-            <el-radio label="2"> 禁用</el-radio>
+            <el-radio :label="1">启用</el-radio>
+            <el-radio :label="2"> 禁用</el-radio>
           </el-radio-group>
         </el-form-item>
       </el-form>