Showing
31 changed files
with
869 additions
and
1058 deletions
| 1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
| 2 | 2 | ||
| 3 | +//航班预审模板下载 | ||
| 4 | +/** | ||
| 5 | + * @param | ||
| 6 | + */ | ||
| 3 | export function downLoadTemplate(template) { | 7 | export function downLoadTemplate(template) { |
| 4 | return request({ | 8 | return request({ |
| 5 | url:'/caPreReviewImport/downLoadTemplate?template=' + template, | 9 | url:'/caPreReviewImport/downLoadTemplate?template=' + template, |
| ... | @@ -8,6 +12,11 @@ export function downLoadTemplate(template) { | ... | @@ -8,6 +12,11 @@ export function downLoadTemplate(template) { |
| 8 | }) | 12 | }) |
| 9 | } | 13 | } |
| 10 | 14 | ||
| 15 | +//预审回执导入 | ||
| 16 | +/** | ||
| 17 | + * @param file 文件 * | ||
| 18 | + * @param type 状态 * | ||
| 19 | + */ | ||
| 11 | export function importcaPreReview(file, type){ | 20 | export function importcaPreReview(file, type){ |
| 12 | let formData = new FormData(); | 21 | let formData = new FormData(); |
| 13 | formData.append("file", file); | 22 | formData.append("file", file); | ... | ... |
| 1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
| 2 | 2 | ||
| 3 | -// 货物查询查询条件数据 | 3 | +//货物查询查询条件数据 |
| 4 | +/** | ||
| 5 | + * @param | ||
| 6 | + */ | ||
| 4 | export function findConditionData(data) { | 7 | export function findConditionData(data) { |
| 5 | return request({ | 8 | return request({ |
| 6 | url: '/cargo/findConditionData', | 9 | url: '/cargo/findConditionData', |
| ... | @@ -10,6 +13,9 @@ export function findConditionData(data) { | ... | @@ -10,6 +13,9 @@ export function findConditionData(data) { |
| 10 | } | 13 | } |
| 11 | 14 | ||
| 12 | //货物查询 | 15 | //货物查询 |
| 16 | +/** | ||
| 17 | + * @param | ||
| 18 | + */ | ||
| 13 | export function findCargoData(data) { | 19 | export function findCargoData(data) { |
| 14 | return request({ | 20 | return request({ |
| 15 | url: '/cargo/findCargoData', | 21 | url: '/cargo/findCargoData', |
| ... | @@ -53,3 +59,12 @@ export function downloadExcel(data) { | ... | @@ -53,3 +59,12 @@ export function downloadExcel(data) { |
| 53 | responseType: 'blob', | 59 | responseType: 'blob', |
| 54 | }) | 60 | }) |
| 55 | } | 61 | } |
| 62 | + | ||
| 63 | +//释放仓位 | ||
| 64 | +export function releaseCargo(data) { | ||
| 65 | + return request({ | ||
| 66 | + url: '/cargo/releaseCargo', | ||
| 67 | + method: 'post', | ||
| 68 | + data: data, | ||
| 69 | + }) | ||
| 70 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -27,11 +27,13 @@ export function findFltById(data) { | ... | @@ -27,11 +27,13 @@ export function findFltById(data) { |
| 27 | }) | 27 | }) |
| 28 | } | 28 | } |
| 29 | //删除航班 | 29 | //删除航班 |
| 30 | +/** | ||
| 31 | + * @param data id List * | ||
| 32 | + */ | ||
| 30 | export function delFlight(data) { | 33 | export function delFlight(data) { |
| 31 | return request({ | 34 | return request({ |
| 32 | - url: '/FlightPreserveController/delFlight/'+ data, | 35 | + url: '/FlightPreserveController/delFlight/' + data, |
| 33 | method: 'post' | 36 | method: 'post' |
| 34 | - | ||
| 35 | }) | 37 | }) |
| 36 | } | 38 | } |
| 37 | //新增修改 | 39 | //新增修改 |
| ... | @@ -54,10 +56,19 @@ export function findFltCommonConf(data) { | ... | @@ -54,10 +56,19 @@ export function findFltCommonConf(data) { |
| 54 | }) | 56 | }) |
| 55 | } | 57 | } |
| 56 | 58 | ||
| 57 | -export function updateStatusBatch(data){ | 59 | +export function updateStatusBatch(data) { |
| 58 | return request({ | 60 | return request({ |
| 59 | url: '/FlightPreserveController/updateStatusBatch', | 61 | url: '/FlightPreserveController/updateStatusBatch', |
| 60 | method: 'post', | 62 | method: 'post', |
| 61 | data: data | 63 | data: data |
| 62 | }) | 64 | }) |
| 63 | } | 65 | } |
| 66 | + | ||
| 67 | +//自动推送开关 | ||
| 68 | +export function updateAutoPushBatch(data) { | ||
| 69 | + return request({ | ||
| 70 | + url: '/FlightPreserveController/updateAutoPushBatch', | ||
| 71 | + method: 'post', | ||
| 72 | + data: data | ||
| 73 | + }) | ||
| 74 | +} | ... | ... |
src/api/system/logConfig.js
0 → 100644
| 1 | +import request from '@/utils/request' | ||
| 2 | + | ||
| 3 | +// DM数据查询 | ||
| 4 | +/** | ||
| 5 | + * @param createTime 创建时间 * | ||
| 6 | + * @param fltNo 航班号 | ||
| 7 | + * @param fltDate 航班日期 | ||
| 8 | + * @param status 状态 | ||
| 9 | + * @param portName 口岸名称 | ||
| 10 | + * @param page 页数 * | ||
| 11 | + * @param size 数据长度 | ||
| 12 | + */ | ||
| 13 | +export function getDmDataList(data) { | ||
| 14 | + return request({ | ||
| 15 | + url: '/dmDataLog/getDmDataList', | ||
| 16 | + method: 'post', | ||
| 17 | + data: data | ||
| 18 | + }) | ||
| 19 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -93,6 +93,13 @@ import { praseStrEmpty } from "@/utils/FedEx"; | ... | @@ -93,6 +93,13 @@ import { praseStrEmpty } from "@/utils/FedEx"; |
| 93 | // } | 93 | // } |
| 94 | 94 | ||
| 95 | // 查询用户列表 | 95 | // 查询用户列表 |
| 96 | +/** | ||
| 97 | + * @param page 页码 * | ||
| 98 | + * @param size 数据长度 * | ||
| 99 | + * @param isValid 用户状态 | ||
| 100 | + * @param username 用户名 | ||
| 101 | + * @param phone 手机号码 | ||
| 102 | + */ | ||
| 96 | export function listUser(data) { | 103 | export function listUser(data) { |
| 97 | return request({ | 104 | return request({ |
| 98 | url: '/sysUser/getUserList', | 105 | url: '/sysUser/getUserList', |
| ... | @@ -102,6 +109,9 @@ export function listUser(data) { | ... | @@ -102,6 +109,9 @@ export function listUser(data) { |
| 102 | } | 109 | } |
| 103 | 110 | ||
| 104 | // 查询用户详细 | 111 | // 查询用户详细 |
| 112 | +/** | ||
| 113 | + * @param id 用户id * | ||
| 114 | + */ | ||
| 105 | export function detailUser(userId) { | 115 | export function detailUser(userId) { |
| 106 | return request({ | 116 | return request({ |
| 107 | url: '/sysUser/detailUser?id=' + praseStrEmpty(userId), | 117 | url: '/sysUser/detailUser?id=' + praseStrEmpty(userId), |
| ... | @@ -110,6 +120,15 @@ export function detailUser(userId) { | ... | @@ -110,6 +120,15 @@ export function detailUser(userId) { |
| 110 | } | 120 | } |
| 111 | 121 | ||
| 112 | // 新增用户 | 122 | // 新增用户 |
| 123 | +/** | ||
| 124 | + * @param loginName 员工号 * | ||
| 125 | + * @param username 用户姓名 * | ||
| 126 | + * @param phone 手机号 | ||
| 127 | + * @param email 电子邮箱 | ||
| 128 | + * @param portName 所属口岸 * | ||
| 129 | + * @param roleIds 所属角色 * | ||
| 130 | + * @param remark 备注 | ||
| 131 | + */ | ||
| 113 | export function addOrUpdateUser(data) { | 132 | export function addOrUpdateUser(data) { |
| 114 | return request({ | 133 | return request({ |
| 115 | url: '/sysUser/addOrUpdateUser', | 134 | url: '/sysUser/addOrUpdateUser', |
| ... | @@ -119,6 +138,16 @@ export function addOrUpdateUser(data) { | ... | @@ -119,6 +138,16 @@ export function addOrUpdateUser(data) { |
| 119 | } | 138 | } |
| 120 | 139 | ||
| 121 | // 修改用户状态 | 140 | // 修改用户状态 |
| 141 | +/** | ||
| 142 | + * @param id 用户id * | ||
| 143 | + * @param loginName 员工号 * | ||
| 144 | + * @param username 用户姓名 * | ||
| 145 | + * @param phone 手机号 | ||
| 146 | + * @param email 电子邮箱 | ||
| 147 | + * @param portName 所属口岸 * | ||
| 148 | + * @param roleIds 所属角色 * | ||
| 149 | + * @param remark 备注 | ||
| 150 | + */ | ||
| 122 | export function updateUserStatus(data) { | 151 | export function updateUserStatus(data) { |
| 123 | return request({ | 152 | return request({ |
| 124 | url: '/sysUser/updateUserStatus', | 153 | url: '/sysUser/updateUserStatus', |
| ... | @@ -128,6 +157,9 @@ export function updateUserStatus(data) { | ... | @@ -128,6 +157,9 @@ export function updateUserStatus(data) { |
| 128 | } | 157 | } |
| 129 | 158 | ||
| 130 | //菜单信息 | 159 | //菜单信息 |
| 160 | +/** | ||
| 161 | + * @param | ||
| 162 | + */ | ||
| 131 | export function getAllAuth() { | 163 | export function getAllAuth() { |
| 132 | return request({ | 164 | return request({ |
| 133 | url: '/sysMenu/getAllAuth', | 165 | url: '/sysMenu/getAllAuth', |
| ... | @@ -136,6 +168,10 @@ export function getAllAuth() { | ... | @@ -136,6 +168,10 @@ export function getAllAuth() { |
| 136 | } | 168 | } |
| 137 | 169 | ||
| 138 | //菜单开启关闭 | 170 | //菜单开启关闭 |
| 171 | +/** | ||
| 172 | + * @param id 菜单id * | ||
| 173 | + * @param status 菜单状态 * | ||
| 174 | + */ | ||
| 139 | export function updateStatus(data) { | 175 | export function updateStatus(data) { |
| 140 | return request({ | 176 | return request({ |
| 141 | url: '/sysMenu/updateStatus', | 177 | url: '/sysMenu/updateStatus', |
| ... | @@ -145,6 +181,14 @@ export function updateStatus(data) { | ... | @@ -145,6 +181,14 @@ export function updateStatus(data) { |
| 145 | } | 181 | } |
| 146 | 182 | ||
| 147 | //角色列表 | 183 | //角色列表 |
| 184 | +/** | ||
| 185 | + * @param name 角色名称 | ||
| 186 | + * @param size 数据长度 * | ||
| 187 | + * @param page 页码 * | ||
| 188 | + * @param createStart 创建开始时间 | ||
| 189 | + * @param createEnd 创建结束时间 | ||
| 190 | + * @param valid 角色状态 | ||
| 191 | + */ | ||
| 148 | export function getRoleList(data) { | 192 | export function getRoleList(data) { |
| 149 | return request({ | 193 | return request({ |
| 150 | url: '/role/getRoleList', | 194 | url: '/role/getRoleList', |
| ... | @@ -154,6 +198,9 @@ export function getRoleList(data) { | ... | @@ -154,6 +198,9 @@ export function getRoleList(data) { |
| 154 | } | 198 | } |
| 155 | 199 | ||
| 156 | //角色详情 | 200 | //角色详情 |
| 201 | +/** | ||
| 202 | + * @param id 角色id * | ||
| 203 | + */ | ||
| 157 | export function detailRole(id) { | 204 | export function detailRole(id) { |
| 158 | return request({ | 205 | return request({ |
| 159 | url: '/role/detailRole?id=' + id, | 206 | url: '/role/detailRole?id=' + id, |
| ... | @@ -162,6 +209,13 @@ export function detailRole(id) { | ... | @@ -162,6 +209,13 @@ export function detailRole(id) { |
| 162 | } | 209 | } |
| 163 | 210 | ||
| 164 | //新增修改角色 | 211 | //新增修改角色 |
| 212 | +/** | ||
| 213 | + * @param id 角色id * | ||
| 214 | + * @param name 角色名 * | ||
| 215 | + * @param remark 角色描述 | ||
| 216 | + * @param menuIds 角色权限 | ||
| 217 | + * @param valid 角色状态 | ||
| 218 | + */ | ||
| 165 | export function addOrUpdateRole(data) { | 219 | export function addOrUpdateRole(data) { |
| 166 | return request({ | 220 | return request({ |
| 167 | url: '/role/addOrUpdateRole', | 221 | url: '/role/addOrUpdateRole', |
| ... | @@ -171,6 +225,10 @@ export function addOrUpdateRole(data) { | ... | @@ -171,6 +225,10 @@ export function addOrUpdateRole(data) { |
| 171 | } | 225 | } |
| 172 | 226 | ||
| 173 | //角色状态修改 | 227 | //角色状态修改 |
| 228 | +/** | ||
| 229 | + * @param id 角色id * | ||
| 230 | + * @param valid 角色状态 * | ||
| 231 | + */ | ||
| 174 | export function updateRoleStatus(data) { | 232 | export function updateRoleStatus(data) { |
| 175 | return request({ | 233 | return request({ |
| 176 | url: '/role/updateRoleStatus', | 234 | url: '/role/updateRoleStatus', |
| ... | @@ -180,6 +238,9 @@ export function updateRoleStatus(data) { | ... | @@ -180,6 +238,9 @@ export function updateRoleStatus(data) { |
| 180 | } | 238 | } |
| 181 | 239 | ||
| 182 | //口岸列表 | 240 | //口岸列表 |
| 241 | +/** | ||
| 242 | + * @param | ||
| 243 | + */ | ||
| 183 | export function portNameList() { | 244 | export function portNameList() { |
| 184 | return request({ | 245 | return request({ |
| 185 | url: '/dictionary/port', | 246 | url: '/dictionary/port', |
| ... | @@ -188,6 +249,9 @@ export function portNameList() { | ... | @@ -188,6 +249,9 @@ export function portNameList() { |
| 188 | } | 249 | } |
| 189 | 250 | ||
| 190 | //口岸变更 | 251 | //口岸变更 |
| 252 | +/** | ||
| 253 | + * @param | ||
| 254 | + */ | ||
| 191 | export function changeCurrentPort(data) { | 255 | export function changeCurrentPort(data) { |
| 192 | return request({ | 256 | return request({ |
| 193 | url: '/sysUser/changeCurrentPort', | 257 | url: '/sysUser/changeCurrentPort', | ... | ... |
| 1 | let ductLabels = { | 1 | let ductLabels = { |
| 2 | - "cargoRulesStatus": { | 2 | + "cargo": {//货物查询 |
| 3 | - "1": "手动", | 3 | + "cargoRulesStatus": { |
| 4 | - "2": "自动" | 4 | + "1": "手动", |
| 5 | + "2": "自动" | ||
| 6 | + }, | ||
| 7 | + "releasing": { | ||
| 8 | + "1": "正在释放" | ||
| 9 | + }, | ||
| 10 | + "cargoAllocationDataStatus": { | ||
| 11 | + "已推送": "已推送", | ||
| 12 | + "不推送": "不推送", | ||
| 13 | + "已配": " ", | ||
| 14 | + "待推送": "待推送", | ||
| 15 | + "手动配舱": ' ', | ||
| 16 | + "已释放": ' ', | ||
| 17 | + "原航班配舱": ' ', | ||
| 18 | + "顺位配舱": ' ', | ||
| 19 | + }, | ||
| 5 | }, | 20 | }, |
| 6 | - "menuType": { | 21 | + "menu": {//菜单设置 |
| 7 | - "M": "菜单", | 22 | + "menuType": { |
| 8 | - "C": "菜单", | 23 | + "M": "菜单", |
| 9 | - "B": "按钮" | 24 | + "C": "菜单", |
| 25 | + "B": "按钮" | ||
| 26 | + }, | ||
| 27 | + "status": { | ||
| 28 | + "1": "启用", | ||
| 29 | + "2": "停用", | ||
| 30 | + }, | ||
| 10 | }, | 31 | }, |
| 11 | - "status": { | 32 | + "role": {//角色设置 |
| 12 | - "1": "启用", | 33 | + "valid": { |
| 13 | - "2": "停用", | 34 | + "1": "启用", |
| 35 | + "2": "关闭", | ||
| 36 | + }, | ||
| 14 | }, | 37 | }, |
| 15 | - "valid": { | 38 | + "user": {//用户设置 |
| 16 | - "1": "启用", | 39 | + "isValid": { |
| 17 | - "2": "关闭", | 40 | + "1": "启用", |
| 41 | + "2": "关闭", | ||
| 42 | + }, | ||
| 18 | }, | 43 | }, |
| 19 | - "isValid": { | 44 | + "FlightInformation": {//航班信息维护 |
| 20 | - "1": "启用", | 45 | + "ticketToPiece": { |
| 21 | - "2": "关闭", | 46 | + "1": "是", |
| 47 | + "0": "否", | ||
| 48 | + }, | ||
| 49 | + "needRequired": { | ||
| 50 | + "1": "是", | ||
| 51 | + "0": "否", | ||
| 52 | + }, | ||
| 53 | + "highLowPriceFlg": { | ||
| 54 | + "1": "开启", | ||
| 55 | + "0": "未开启", | ||
| 56 | + }, | ||
| 57 | + "pushDateSwitch": { | ||
| 58 | + "1": "是", | ||
| 59 | + "2": "否", | ||
| 60 | + }, | ||
| 22 | }, | 61 | }, |
| 23 | - "ticketToPiece": { | 62 | + "logDmData": {//DM数据 |
| 24 | - "1": "是", | 63 | + "status": { |
| 25 | - "0": "否", | 64 | + "0": "未处理", |
| 26 | - }, | 65 | + "1": "已处理", |
| 27 | - "needRequired": { | 66 | + "2": "无需处理", |
| 28 | - "1": "是", | 67 | + "3": "处理失败", |
| 29 | - "0": "否", | 68 | + "4": "校验不通过", |
| 30 | - }, | 69 | + "5": "数据不能被多次处理", |
| 31 | - "highLowPriceFlg": { | 70 | + "9": "处理中", |
| 32 | - "1": "启用", | 71 | + }, |
| 33 | - "0": "未开启", | ||
| 34 | } | 72 | } |
| 35 | - | ||
| 36 | } | 73 | } |
| 37 | 74 | ||
| 38 | export default ductLabels; | 75 | export default ductLabels; |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -4,241 +4,276 @@ | ... | @@ -4,241 +4,276 @@ |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | /** 基础通用 **/ | 6 | /** 基础通用 **/ |
| 7 | -.pt5 { | 7 | + .wid100 { |
| 8 | - padding-top: 5px; | 8 | + width: 100% !important; |
| 9 | -} | 9 | + } |
| 10 | -.pr5 { | 10 | + |
| 11 | - padding-right: 5px; | 11 | + .wid90 { |
| 12 | -} | 12 | + width: 90% !important; |
| 13 | -.pb5 { | 13 | + } |
| 14 | - padding-bottom: 5px; | 14 | + |
| 15 | -} | 15 | + .wid80 { |
| 16 | -.mt5 { | 16 | + width: 80% !important; |
| 17 | - margin-top: 5px; | 17 | + } |
| 18 | -} | 18 | + |
| 19 | -.mr5 { | 19 | + .pt5 { |
| 20 | - margin-right: 5px; | 20 | + padding-top: 5px; |
| 21 | -} | 21 | + } |
| 22 | -.mb5 { | 22 | + |
| 23 | - margin-bottom: 5px; | 23 | + .pr5 { |
| 24 | -} | 24 | + padding-right: 5px; |
| 25 | -.mb8 { | 25 | + } |
| 26 | - margin-bottom: 8px; | 26 | + |
| 27 | -} | 27 | + .pb5 { |
| 28 | -.ml5 { | 28 | + padding-bottom: 5px; |
| 29 | - margin-left: 5px; | 29 | + } |
| 30 | -} | 30 | + |
| 31 | -.mt10 { | 31 | + .mt5 { |
| 32 | - margin-top: 10px; | 32 | + margin-top: 5px; |
| 33 | -} | 33 | + } |
| 34 | -.mr10 { | 34 | + |
| 35 | - margin-right: 10px; | 35 | + .mr5 { |
| 36 | -} | 36 | + margin-right: 5px; |
| 37 | -.mb10 { | 37 | + } |
| 38 | - margin-bottom: 10px; | 38 | + |
| 39 | -} | 39 | + .mb5 { |
| 40 | -.ml0 { | 40 | + margin-bottom: 5px; |
| 41 | - margin-left: 10px; | 41 | + } |
| 42 | -} | 42 | + |
| 43 | -.mt20 { | 43 | + .mb8 { |
| 44 | - margin-top: 20px; | 44 | + margin-bottom: 8px; |
| 45 | -} | 45 | + } |
| 46 | -.mr20 { | 46 | + |
| 47 | - margin-right: 20px; | 47 | + .ml5 { |
| 48 | -} | 48 | + margin-left: 5px; |
| 49 | -.mb20 { | 49 | + } |
| 50 | - margin-bottom: 20px; | 50 | + |
| 51 | -} | 51 | + .mt10 { |
| 52 | -.m20 { | 52 | + margin-top: 10px; |
| 53 | - margin-left: 20px; | 53 | + } |
| 54 | -} | 54 | + |
| 55 | - | 55 | + .mr10 { |
| 56 | -.el-dialog:not(.is-fullscreen){ | 56 | + margin-right: 10px; |
| 57 | - margin-top: 6vh !important; | 57 | + } |
| 58 | -} | 58 | + |
| 59 | - | 59 | + .mb10 { |
| 60 | -.el-table { | 60 | + margin-bottom: 10px; |
| 61 | - .el-table__header-wrapper, .el-table__fixed-header-wrapper { | 61 | + } |
| 62 | - th { | 62 | + |
| 63 | - word-break: break-word; | 63 | + .ml0 { |
| 64 | - background-color: #f8f8f9; | 64 | + margin-left: 10px; |
| 65 | - color: #515a6e; | 65 | + } |
| 66 | - height: 40px; | 66 | + |
| 67 | - font-size: 13px; | 67 | + .mt20 { |
| 68 | - } | 68 | + margin-top: 20px; |
| 69 | - } | 69 | + } |
| 70 | - .el-table__body-wrapper { | 70 | + |
| 71 | - .el-button [class*="el-icon-"] + span { | 71 | + .mr20 { |
| 72 | - margin-left: 1px; | 72 | + margin-right: 20px; |
| 73 | - } | 73 | + } |
| 74 | - } | 74 | + |
| 75 | -} | 75 | + .mb20 { |
| 76 | - | 76 | + margin-bottom: 20px; |
| 77 | -/** 表单布局 **/ | 77 | + } |
| 78 | -.form-header { | 78 | + |
| 79 | - font-size:15px; | 79 | + .m20 { |
| 80 | - color:#6379bb; | 80 | + margin-left: 20px; |
| 81 | - border-bottom:1px solid #ddd; | 81 | + } |
| 82 | - margin:8px 10px 25px 10px; | 82 | + |
| 83 | - padding-top:15px; | 83 | + .el-dialog:not(.is-fullscreen) { |
| 84 | - padding-bottom:5px; | 84 | + margin-top: 6vh !important; |
| 85 | - .formItem { | 85 | + } |
| 86 | - width: 100%; | 86 | + |
| 87 | - // max-width: 310px; | 87 | + .el-table { |
| 88 | - } | 88 | + |
| 89 | -} | 89 | + .el-table__header-wrapper, |
| 90 | - | 90 | + .el-table__fixed-header-wrapper { |
| 91 | -/** 表格布局 **/ | 91 | + th { |
| 92 | -.pagination-container { | 92 | + word-break: break-word; |
| 93 | - position: relative; | 93 | + background-color: #f8f8f9; |
| 94 | - height: 25px; | 94 | + color: #515a6e; |
| 95 | - margin-bottom: 10px; | 95 | + height: 40px; |
| 96 | - margin-top: 15px; | 96 | + font-size: 13px; |
| 97 | - padding: 10px 20px !important; | 97 | + } |
| 98 | -} | 98 | + } |
| 99 | - | 99 | + |
| 100 | -/* tree border */ | 100 | + .el-table__body-wrapper { |
| 101 | -.tree-border { | 101 | + .el-button [class*="el-icon-"]+span { |
| 102 | - margin-top: 5px; | 102 | + margin-left: 1px; |
| 103 | - border: 1px solid #e5e6e7; | 103 | + } |
| 104 | - background: #FFFFFF none; | 104 | + } |
| 105 | - border-radius:4px; | 105 | + } |
| 106 | -} | 106 | + |
| 107 | - | 107 | + /** 表单布局 **/ |
| 108 | -.pagination-container .el-pagination { | 108 | + .form-header { |
| 109 | - right: 0; | 109 | + font-size: 15px; |
| 110 | - position: absolute; | 110 | + color: #6379bb; |
| 111 | -} | 111 | + border-bottom: 1px solid #ddd; |
| 112 | - | 112 | + margin: 8px 10px 25px 10px; |
| 113 | -.el-table .fixed-width .el-button--mini { | 113 | + padding-top: 15px; |
| 114 | - padding-left: 0; | 114 | + padding-bottom: 5px; |
| 115 | - padding-right: 0; | 115 | + |
| 116 | - width: inherit; | 116 | + .formItem { |
| 117 | -} | 117 | + width: 90%; |
| 118 | - | 118 | + // max-width: 300px; |
| 119 | -.el-tree-node__content > .el-checkbox { | 119 | + } |
| 120 | - margin-right: 8px; | 120 | + } |
| 121 | -} | 121 | + |
| 122 | - | 122 | + /** 表格布局 **/ |
| 123 | -.list-group-striped > .list-group-item { | 123 | + .pagination-container { |
| 124 | - border-left: 0; | 124 | + position: relative; |
| 125 | - border-right: 0; | 125 | + height: 25px; |
| 126 | - border-radius: 0; | 126 | + margin-bottom: 10px; |
| 127 | - padding-left: 0; | 127 | + margin-top: 15px; |
| 128 | - padding-right: 0; | 128 | + padding: 10px 20px !important; |
| 129 | -} | 129 | + } |
| 130 | - | 130 | + |
| 131 | -.list-group { | 131 | + /* tree border */ |
| 132 | - padding-left: 0px; | 132 | + .tree-border { |
| 133 | - list-style: none; | 133 | + margin-top: 5px; |
| 134 | -} | 134 | + border: 1px solid #e5e6e7; |
| 135 | - | 135 | + background: #FFFFFF none; |
| 136 | -.list-group-item { | 136 | + border-radius: 4px; |
| 137 | - border-bottom: 1px solid #e7eaec; | 137 | + } |
| 138 | - border-top: 1px solid #e7eaec; | 138 | + |
| 139 | - margin-bottom: -1px; | 139 | + .pagination-container .el-pagination { |
| 140 | - padding: 11px 0px; | 140 | + right: 0; |
| 141 | - font-size: 13px; | 141 | + position: absolute; |
| 142 | -} | 142 | + } |
| 143 | - | 143 | + |
| 144 | -.pull-right { | 144 | + .el-table .fixed-width .el-button--mini { |
| 145 | - float: right !important; | 145 | + padding-left: 0; |
| 146 | -} | 146 | + padding-right: 0; |
| 147 | - | 147 | + width: inherit; |
| 148 | -.el-card__header { | 148 | + } |
| 149 | - padding: 14px 15px 7px; | 149 | + |
| 150 | - min-height: 40px; | 150 | + .el-tree-node__content>.el-checkbox { |
| 151 | -} | 151 | + margin-right: 8px; |
| 152 | - | 152 | + } |
| 153 | -.el-card__body { | 153 | + |
| 154 | - padding: 15px 20px 20px 20px; | 154 | + .list-group-striped>.list-group-item { |
| 155 | -} | 155 | + border-left: 0; |
| 156 | - | 156 | + border-right: 0; |
| 157 | -.card-box { | 157 | + border-radius: 0; |
| 158 | - padding-right: 15px; | 158 | + padding-left: 0; |
| 159 | - padding-left: 15px; | 159 | + padding-right: 0; |
| 160 | - margin-bottom: 10px; | 160 | + } |
| 161 | -} | 161 | + |
| 162 | - | 162 | + .list-group { |
| 163 | -/* button color */ | 163 | + padding-left: 0px; |
| 164 | -.el-button--cyan.is-active, | 164 | + list-style: none; |
| 165 | -.el-button--cyan:active { | 165 | + } |
| 166 | - background: #20B2AA; | 166 | + |
| 167 | - border-color: #20B2AA; | 167 | + .list-group-item { |
| 168 | - color: #FFFFFF; | 168 | + border-bottom: 1px solid #e7eaec; |
| 169 | -} | 169 | + border-top: 1px solid #e7eaec; |
| 170 | - | 170 | + margin-bottom: -1px; |
| 171 | -.el-button--cyan:focus, | 171 | + padding: 11px 0px; |
| 172 | -.el-button--cyan:hover { | 172 | + font-size: 13px; |
| 173 | - background: #48D1CC; | 173 | + } |
| 174 | - border-color: #48D1CC; | 174 | + |
| 175 | - color: #FFFFFF; | 175 | + .pull-right { |
| 176 | -} | 176 | + float: right !important; |
| 177 | - | 177 | + } |
| 178 | -.el-button--cyan { | 178 | + |
| 179 | - background-color: #20B2AA; | 179 | + .el-card__header { |
| 180 | - border-color: #20B2AA; | 180 | + padding: 14px 15px 7px; |
| 181 | - color: #FFFFFF; | 181 | + min-height: 40px; |
| 182 | -} | 182 | + } |
| 183 | - | 183 | + |
| 184 | -/* text color */ | 184 | + .el-card__body { |
| 185 | -.text-navy { | 185 | + padding: 15px 20px 20px 20px; |
| 186 | - color: #1ab394; | 186 | + } |
| 187 | -} | 187 | + |
| 188 | - | 188 | + .card-box { |
| 189 | -.text-primary { | 189 | + padding-right: 15px; |
| 190 | - color: inherit; | 190 | + padding-left: 15px; |
| 191 | -} | 191 | + margin-bottom: 10px; |
| 192 | - | 192 | + } |
| 193 | -.text-success { | 193 | + |
| 194 | - color: #1c84c6; | 194 | + /* button color */ |
| 195 | -} | 195 | + .el-button--cyan.is-active, |
| 196 | - | 196 | + .el-button--cyan:active { |
| 197 | -.text-info { | 197 | + background: #20B2AA; |
| 198 | - color: #23c6c8; | 198 | + border-color: #20B2AA; |
| 199 | -} | 199 | + color: #FFFFFF; |
| 200 | - | 200 | + } |
| 201 | -.text-warning { | 201 | + |
| 202 | - color: #f8ac59; | 202 | + .el-button--cyan:focus, |
| 203 | -} | 203 | + .el-button--cyan:hover { |
| 204 | - | 204 | + background: #48D1CC; |
| 205 | -.text-danger { | 205 | + border-color: #48D1CC; |
| 206 | - color: #ed5565; | 206 | + color: #FFFFFF; |
| 207 | -} | 207 | + } |
| 208 | - | 208 | + |
| 209 | -.text-muted { | 209 | + .el-button--cyan { |
| 210 | - color: #888888; | 210 | + background-color: #20B2AA; |
| 211 | -} | 211 | + border-color: #20B2AA; |
| 212 | - | 212 | + color: #FFFFFF; |
| 213 | -/* image */ | 213 | + } |
| 214 | -.img-circle { | 214 | + |
| 215 | - border-radius: 50%; | 215 | + /* text color */ |
| 216 | -} | 216 | + .text-navy { |
| 217 | - | 217 | + color: #1ab394; |
| 218 | -.img-lg { | 218 | + } |
| 219 | - width: 120px; | 219 | + |
| 220 | - height: 120px; | 220 | + .text-primary { |
| 221 | -} | 221 | + color: inherit; |
| 222 | - | 222 | + } |
| 223 | -.avatar-upload-preview { | 223 | + |
| 224 | - position: absolute; | 224 | + .text-success { |
| 225 | - top: 50%; | 225 | + color: #1c84c6; |
| 226 | - transform: translate(50%, -50%); | 226 | + } |
| 227 | - width: 200px; | 227 | + |
| 228 | - height: 200px; | 228 | + .text-info { |
| 229 | - border-radius: 50%; | 229 | + color: #23c6c8; |
| 230 | - box-shadow: 0 0 4px #ccc; | 230 | + } |
| 231 | - overflow: hidden; | 231 | + |
| 232 | -} | 232 | + .text-warning { |
| 233 | - | 233 | + color: #f8ac59; |
| 234 | -/* 拖拽列样式 */ | 234 | + } |
| 235 | -.sortable-ghost{ | 235 | + |
| 236 | - opacity: .8; | 236 | + .text-danger { |
| 237 | - color: #fff!important; | 237 | + color: #ed5565; |
| 238 | - background: #42b983!important; | 238 | + } |
| 239 | -} | 239 | + |
| 240 | - | 240 | + .text-muted { |
| 241 | -.top-right-btn { | 241 | + color: #888888; |
| 242 | - position: relative; | 242 | + } |
| 243 | - float: right; | 243 | + |
| 244 | -} | 244 | + /* image */ |
| 245 | + .img-circle { | ||
| 246 | + border-radius: 50%; | ||
| 247 | + } | ||
| 248 | + | ||
| 249 | + .img-lg { | ||
| 250 | + width: 120px; | ||
| 251 | + height: 120px; | ||
| 252 | + } | ||
| 253 | + | ||
| 254 | + .avatar-upload-preview { | ||
| 255 | + position: absolute; | ||
| 256 | + top: 50%; | ||
| 257 | + transform: translate(50%, -50%); | ||
| 258 | + width: 200px; | ||
| 259 | + height: 200px; | ||
| 260 | + border-radius: 50%; | ||
| 261 | + box-shadow: 0 0 4px #ccc; | ||
| 262 | + overflow: hidden; | ||
| 263 | + } | ||
| 264 | + | ||
| 265 | + /* 拖拽列样式 */ | ||
| 266 | + .sortable-ghost { | ||
| 267 | + opacity: .8; | ||
| 268 | + color: #fff !important; | ||
| 269 | + background: #42b983 !important; | ||
| 270 | + } | ||
| 271 | + | ||
| 272 | + .top-right-btn { | ||
| 273 | + position: relative; | ||
| 274 | + float: right; | ||
| 275 | + } | ||
| 276 | + | ||
| 277 | + .dialogColumn .el-tooltip { | ||
| 278 | + white-space: pre-line !important; | ||
| 279 | + } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -189,3 +189,51 @@ aside { | ... | @@ -189,3 +189,51 @@ aside { |
| 189 | .multiselect--active { | 189 | .multiselect--active { |
| 190 | z-index: 1000 !important; | 190 | z-index: 1000 !important; |
| 191 | } | 191 | } |
| 192 | + | ||
| 193 | + | ||
| 194 | +.el-table__body-wrapper { | ||
| 195 | + &::-webkit-scrollbar { | ||
| 196 | + height: 10px; | ||
| 197 | + width: 10px; | ||
| 198 | + } | ||
| 199 | + | ||
| 200 | + &::-webkit-scrollbar-track { | ||
| 201 | + background-color: #fff; | ||
| 202 | + } | ||
| 203 | + | ||
| 204 | + &::-webkit-scrollbar-thumb { | ||
| 205 | + background-color: #ccc; | ||
| 206 | + } | ||
| 207 | + | ||
| 208 | + &::-webkit-scrollbar-thumb:hover { | ||
| 209 | + background-color: #409eff; | ||
| 210 | + } | ||
| 211 | +} | ||
| 212 | + | ||
| 213 | +// 解决表格固定列问题 | ||
| 214 | +.el-table__fixed, | ||
| 215 | +.el-table__fixed-right { | ||
| 216 | + height: calc(100% - 7px) !important; | ||
| 217 | + box-shadow: -5px -2px 10px rgba(0, 0, 0, .12) !important; | ||
| 218 | + | ||
| 219 | + .el-table__fixed-body-wrapper { | ||
| 220 | + height: calc(100% - 36px) !important; | ||
| 221 | + } | ||
| 222 | +} | ||
| 223 | + | ||
| 224 | +// 当表格没有滚动条时 | ||
| 225 | +.el-table__body-wrapper.is-scrolling-none~.el-table__fixed-right { | ||
| 226 | + height: 100% !important; | ||
| 227 | + bottom: 0 !important; | ||
| 228 | + box-shadow: none !important; | ||
| 229 | +} | ||
| 230 | + | ||
| 231 | +// 当表格有纵向滚动条时 | ||
| 232 | +.el-table--scrollable-y .el-table__fixed-right { | ||
| 233 | + right: 7px !important; | ||
| 234 | +} | ||
| 235 | + | ||
| 236 | +// 当表格只有横向滚动条,没有纵向滚动条时 | ||
| 237 | +.el-table--scrollable-x:not(.el-table--scrollable-y) .el-table__fixed-right { | ||
| 238 | + right: 0 !important; | ||
| 239 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
This diff is collapsed. Click to expand it.
| 1 | <template> | 1 | <template> |
| 2 | <div class="navbar"> | 2 | <div class="navbar"> |
| 3 | - <hamburger | 3 | + <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" |
| 4 | - id="hamburger-container" | 4 | + @toggleClick="toggleSideBar" /> |
| 5 | - :is-active="sidebar.opened" | 5 | + <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav" /> |
| 6 | - class="hamburger-container" | ||
| 7 | - @toggleClick="toggleSideBar" | ||
| 8 | - /> | ||
| 9 | - <breadcrumb | ||
| 10 | - id="breadcrumb-container" | ||
| 11 | - class="breadcrumb-container" | ||
| 12 | - v-if="!topNav" | ||
| 13 | - /> | ||
| 14 | <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" /> | 6 | <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" /> |
| 15 | 7 | ||
| 16 | <div class="right-menu"> | 8 | <div class="right-menu"> |
| 17 | <template v-if="device !== 'mobile'"> </template> | 9 | <template v-if="device !== 'mobile'"> </template> |
| 18 | - <el-select | 10 | + <el-select v-model="portName" size="mini" style="width: 120px; top: -17px; right: 7px" placeholder="选择口岸"> |
| 19 | - v-model="portName" | 11 | + <el-option v-for="item in portNameList" :label="item" :value="item" :key="item"> |
| 20 | - size="mini" | ||
| 21 | - style="width: 120px; top: -17px; right: 7px" | ||
| 22 | - placeholder="选择口岸" | ||
| 23 | - > | ||
| 24 | - <el-option | ||
| 25 | - v-for="item in portNameList" | ||
| 26 | - :label="item" | ||
| 27 | - :value="item" | ||
| 28 | - :key="item" | ||
| 29 | - > | ||
| 30 | </el-option> | 12 | </el-option> |
| 31 | </el-select> | 13 | </el-select> |
| 32 | - <el-dropdown | 14 | + <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click"> |
| 33 | - class="avatar-container right-menu-item hover-effect" | ||
| 34 | - trigger="click" | ||
| 35 | - > | ||
| 36 | <div class="userName-wrapper"> | 15 | <div class="userName-wrapper"> |
| 37 | <!-- <img :src="avatar" class="user-avatar" /> --> | 16 | <!-- <img :src="avatar" class="user-avatar" /> --> |
| 38 | - <span><i class="el-icon-user-solid" style="color:#1890ff"></i>欢迎!{{userName}}</span> | 17 | + <span><i class="el-icon-user-solid" style="color:#1890ff"></i>欢迎!{{ userName }}</span> |
| 39 | </div> | 18 | </div> |
| 40 | <el-dropdown-menu slot="dropdown"> | 19 | <el-dropdown-menu slot="dropdown"> |
| 41 | <el-dropdown-item @click.native="logout"> | 20 | <el-dropdown-item @click.native="logout"> |
| ... | @@ -57,11 +36,12 @@ | ... | @@ -57,11 +36,12 @@ |
| 57 | </template> | 36 | </template> |
| 58 | 37 | ||
| 59 | <script> | 38 | <script> |
| 60 | -import { mapGetters } from "vuex"; | 39 | +import { mapGetters } from "vuex" |
| 61 | -import Breadcrumb from "@/components/Breadcrumb"; | 40 | +import Breadcrumb from "@/components/Breadcrumb" |
| 62 | -import TopNav from "@/components/TopNav"; | 41 | +import TopNav from "@/components/TopNav" |
| 63 | -import Hamburger from "@/components/Hamburger"; | 42 | +import Hamburger from "@/components/Hamburger" |
| 64 | import { removeToken } from '@/utils/auth' | 43 | import { removeToken } from '@/utils/auth' |
| 44 | +import settings from "@/settings" | ||
| 65 | 45 | ||
| 66 | export default { | 46 | export default { |
| 67 | components: { | 47 | components: { |
| ... | @@ -71,7 +51,7 @@ export default { | ... | @@ -71,7 +51,7 @@ export default { |
| 71 | }, | 51 | }, |
| 72 | data() { | 52 | data() { |
| 73 | return { | 53 | return { |
| 74 | - userName:"", | 54 | + userName: "", |
| 75 | portNameList: [], | 55 | portNameList: [], |
| 76 | locale: "zh", | 56 | locale: "zh", |
| 77 | }; | 57 | }; |
| ... | @@ -111,20 +91,20 @@ export default { | ... | @@ -111,20 +91,20 @@ export default { |
| 111 | this.$store.dispatch('tagsView/delAllCachedViews') | 91 | this.$store.dispatch('tagsView/delAllCachedViews') |
| 112 | this.$store.dispatch('tagsView/delAllVisitedViews') | 92 | this.$store.dispatch('tagsView/delAllVisitedViews') |
| 113 | // location.reload(); | 93 | // location.reload(); |
| 114 | - if(this.$route.path != '/index'){ | 94 | + if (this.$route.path != '/index') { |
| 115 | this.$router.push('/index') | 95 | this.$router.push('/index') |
| 116 | } | 96 | } |
| 117 | } else { | 97 | } else { |
| 118 | this.$confirm(res.msg, "提示", { | 98 | this.$confirm(res.msg, "提示", { |
| 119 | type: "warning", | 99 | type: "warning", |
| 120 | - }).then(()=>{ | 100 | + }).then(() => { |
| 121 | // location.reload(); | 101 | // location.reload(); |
| 122 | - if(this.$route.path != '/index'){ | 102 | + if (this.$route.path != '/index') { |
| 123 | this.$router.push('/index') | 103 | this.$router.push('/index') |
| 124 | } | 104 | } |
| 125 | - }).catch(()=>{ | 105 | + }).catch(() => { |
| 126 | // location.reload(); | 106 | // location.reload(); |
| 127 | - if(this.$route.path != '/index'){ | 107 | + if (this.$route.path != '/index') { |
| 128 | this.$router.push('/index') | 108 | this.$router.push('/index') |
| 129 | } | 109 | } |
| 130 | }); | 110 | }); |
| ... | @@ -148,7 +128,7 @@ export default { | ... | @@ -148,7 +128,7 @@ export default { |
| 148 | }).then(() => { | 128 | }).then(() => { |
| 149 | this.$store.dispatch("LogOut").then(() => { | 129 | this.$store.dispatch("LogOut").then(() => { |
| 150 | removeToken() | 130 | removeToken() |
| 151 | - window.location.href = "https://test-myapps.secure.fedex.com/purpleid/signout/";//wsso系统跳转 | 131 | + window.location.href = settings.logoutURL;//wsso系统跳转 |
| 152 | }); | 132 | }); |
| 153 | }); | 133 | }); |
| 154 | }, | 134 | }, |
| ... | @@ -225,16 +205,19 @@ export default { | ... | @@ -225,16 +205,19 @@ export default { |
| 225 | text-align: center; | 205 | text-align: center; |
| 226 | margin-right: 15px; | 206 | margin-right: 15px; |
| 227 | font-weight: 700; | 207 | font-weight: 700; |
| 228 | - i{ | 208 | + |
| 209 | + i { | ||
| 229 | display: inline-block; | 210 | display: inline-block; |
| 230 | height: 50px; | 211 | height: 50px; |
| 231 | - margin-right:5px; | 212 | + margin-right: 5px; |
| 232 | font-size: 24px; | 213 | font-size: 24px; |
| 233 | line-height: 50px; | 214 | line-height: 50px; |
| 234 | } | 215 | } |
| 216 | + | ||
| 235 | .userName-wrapper { | 217 | .userName-wrapper { |
| 236 | position: relative; | 218 | position: relative; |
| 237 | - font-size:14px; | 219 | + font-size: 14px; |
| 220 | + | ||
| 238 | .user-avatar { | 221 | .user-avatar { |
| 239 | cursor: pointer; | 222 | cursor: pointer; |
| 240 | width: 40px; | 223 | width: 40px; | ... | ... |
| ... | @@ -2,6 +2,7 @@ import router from './router' | ... | @@ -2,6 +2,7 @@ import router from './router' |
| 2 | import store from './store' | 2 | import store from './store' |
| 3 | import { Message } from 'element-ui' | 3 | import { Message } from 'element-ui' |
| 4 | import { getToken, setToken, removeToken } from '@/utils/auth' | 4 | import { getToken, setToken, removeToken } from '@/utils/auth' |
| 5 | +import settings from "@/settings" | ||
| 5 | 6 | ||
| 6 | 7 | ||
| 7 | const whiteList = ['/login', '/auth-redirect', '/bind', '/register'] | 8 | const whiteList = ['/login', '/auth-redirect', '/bind', '/register'] |
| ... | @@ -24,7 +25,7 @@ router.beforeEach((to, from, next) => { | ... | @@ -24,7 +25,7 @@ router.beforeEach((to, from, next) => { |
| 24 | Message.error(err) | 25 | Message.error(err) |
| 25 | store.dispatch('LogOut').then(() => { | 26 | store.dispatch('LogOut').then(() => { |
| 26 | // next({ path: '/' }) | 27 | // next({ path: '/' }) |
| 27 | - window.location.href = "https://test-myapps.secure.fedex.com/purpleid/signout/";//wsso系统跳转 | 28 | + window.location.href = settings.logoutURL;//wsso系统跳转 |
| 28 | }) | 29 | }) |
| 29 | }) | 30 | }) |
| 30 | } else { | 31 | } else { |
| ... | @@ -44,7 +45,7 @@ router.beforeEach((to, from, next) => { | ... | @@ -44,7 +45,7 @@ router.beforeEach((to, from, next) => { |
| 44 | // 在免登录白名单,直接进入 | 45 | // 在免登录白名单,直接进入 |
| 45 | next() | 46 | next() |
| 46 | } else { | 47 | } else { |
| 47 | - window.location.href = "https://test-myapps.secure.fedex.com/purpleid/signout/";//wsso系统跳转 | 48 | + window.location.href = settings.logoutURL;//wsso系统跳转 |
| 48 | } | 49 | } |
| 49 | } | 50 | } |
| 50 | 51 | ... | ... |
| 1 | import Vue from 'vue' | 1 | import Vue from 'vue' |
| 2 | import Router from 'vue-router' | 2 | import Router from 'vue-router' |
| 3 | +import settings from "@/settings" | ||
| 3 | 4 | ||
| 4 | Vue.use(Router) | 5 | Vue.use(Router) |
| 5 | 6 | ||
| ... | @@ -92,5 +93,5 @@ export default new Router({ | ... | @@ -92,5 +93,5 @@ export default new Router({ |
| 92 | mode: 'history', // 去掉url中的# | 93 | mode: 'history', // 去掉url中的# |
| 93 | scrollBehavior: () => ({ y: 0 }), | 94 | scrollBehavior: () => ({ y: 0 }), |
| 94 | routes: constantRoutes, | 95 | routes: constantRoutes, |
| 95 | - base: '/imacuat' | 96 | + base: settings.routerBase |
| 96 | }) | 97 | }) |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -39,8 +39,24 @@ module.exports = { | ... | @@ -39,8 +39,24 @@ module.exports = { |
| 39 | */ | 39 | */ |
| 40 | errorLog: 'production', | 40 | errorLog: 'production', |
| 41 | 41 | ||
| 42 | - /** | 42 | + /** |
| 43 | + * logout | ||
| 44 | + */ | ||
| 45 | + logoutURL: 'https://test-myapps.secure.fedex.com/purpleid/signout/', | ||
| 46 | + | ||
| 47 | + /** | ||
| 48 | + * 后端接口 | ||
| 49 | + */ | ||
| 50 | + baseURL: `https://imacuat.zmd.apac.fedex.com/iMAC`, | ||
| 51 | + downLoadURL: `https://imacuat.zmd.apac.fedex.com/iMAC`,//下载、导出地址 | ||
| 52 | + | ||
| 53 | + /** | ||
| 54 | + * 项目存放地址 | ||
| 55 | + */ | ||
| 56 | + routerBase: '/imacuat', | ||
| 57 | + | ||
| 58 | + /** | ||
| 43 | * 版本号 | 59 | * 版本号 |
| 44 | */ | 60 | */ |
| 45 | - version:'version:1.1.0' | 61 | + version: 'version:1.3.0' |
| 46 | } | 62 | } | ... | ... |
| 1 | import axios from 'axios' | 1 | import axios from 'axios' |
| 2 | -import { Message,MessageBox } from 'element-ui' | 2 | +import { Message, MessageBox } from 'element-ui' |
| 3 | import store from '@/store' | 3 | import store from '@/store' |
| 4 | -import { getToken,setToken } from '@/utils/auth' | 4 | +import { getToken, setToken } from '@/utils/auth' |
| 5 | import errorCode from '@/utils/errorCode' | 5 | import errorCode from '@/utils/errorCode' |
| 6 | +import settings from "@/settings" | ||
| 6 | 7 | ||
| 7 | axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' | 8 | axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' |
| 8 | // 创建axios实例 | 9 | // 创建axios实例 |
| 9 | const service = axios.create({ | 10 | const service = axios.create({ |
| 10 | // axios中请求配置有baseURL选项,表示请求URL公共部分 | 11 | // axios中请求配置有baseURL选项,表示请求URL公共部分 |
| 11 | - //baseURL: process.env.VUE_APP_BASE_API, | 12 | + baseURL: settings.baseURL, |
| 12 | - // baseURL: `http://47.103.140.98:7001/iMAC`, | ||
| 13 | - baseURL: 'https://imacuat.zmd.apac.fedex.com/iMAC', | ||
| 14 | - // baseURL: 'http://192.168.1.133:7001/iMAC', | ||
| 15 | - // baseURL: 'http://192.168.1.133:7001/iMAC',//生产 | ||
| 16 | 13 | ||
| 17 | // 超时 | 14 | // 超时 |
| 18 | timeout: 30000, | 15 | timeout: 30000, |
| ... | @@ -54,7 +51,7 @@ service.interceptors.request.use(config => { | ... | @@ -54,7 +51,7 @@ service.interceptors.request.use(config => { |
| 54 | 51 | ||
| 55 | // 响应拦截器 | 52 | // 响应拦截器 |
| 56 | service.interceptors.response.use(res => { | 53 | service.interceptors.response.use(res => { |
| 57 | - if(res.headers['token']){ | 54 | + if (res.headers['token']) { |
| 58 | setToken(decodeURIComponent(res.headers['token'])) | 55 | setToken(decodeURIComponent(res.headers['token'])) |
| 59 | } | 56 | } |
| 60 | // 未设置状态码则默认成功状态 | 57 | // 未设置状态码则默认成功状态 |
| ... | @@ -69,8 +66,7 @@ service.interceptors.response.use(res => { | ... | @@ -69,8 +66,7 @@ service.interceptors.response.use(res => { |
| 69 | ).then(() => { | 66 | ).then(() => { |
| 70 | store.dispatch('LogOut').then(() => { | 67 | store.dispatch('LogOut').then(() => { |
| 71 | // location.href = '/'; | 68 | // location.href = '/'; |
| 72 | - window.location.href = "https://test-myapps.secure.fedex.com/purpleid/signout/";//wsso系统跳转 | 69 | + window.location.href = settings.logoutURL;//wsso系统跳转 |
| 73 | - // testsso.ute.apac.fedex.com/iMAC | ||
| 74 | }) | 70 | }) |
| 75 | }); | 71 | }); |
| 76 | } else if (code === 403) { | 72 | } else if (code === 403) { |
| ... | @@ -83,7 +79,7 @@ service.interceptors.response.use(res => { | ... | @@ -83,7 +79,7 @@ service.interceptors.response.use(res => { |
| 83 | type: 'error' | 79 | type: 'error' |
| 84 | }) | 80 | }) |
| 85 | return Promise.reject(new Error(msg)) | 81 | return Promise.reject(new Error(msg)) |
| 86 | - } else if (code !== 200 && code !== 201 && code !== 202 && code !== 603) { | 82 | + } else if (code !== 200 && code !== 201 && code !== 202 && code !== 603) { |
| 87 | Message({ | 83 | Message({ |
| 88 | message: msg, | 84 | message: msg, |
| 89 | type: 'error' | 85 | type: 'error' | ... | ... |
| 1 | import axios from 'axios' | 1 | import axios from 'axios' |
| 2 | import { getToken } from '@/utils/auth' | 2 | import { getToken } from '@/utils/auth' |
| 3 | +import settings from "@/settings" | ||
| 3 | 4 | ||
| 4 | const mimeMap = { | 5 | const mimeMap = { |
| 5 | xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', | 6 | xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', |
| 6 | zip: 'application/zip' | 7 | zip: 'application/zip' |
| 7 | } | 8 | } |
| 8 | -const baseUrl = 'https://imacuat.zmd.apac.fedex.com/iMAC' //uat服务器 | 9 | +const baseUrl = settings.downLoadURL //uat服务器 |
| 9 | -// const baseUrl = 'http://47.103.140.98:7001/iMAC' //阿里云服务器 | ||
| 10 | -// const baseUrl = 'http://192.168.1.133:7001/iMAC' //测试服务器 | ||
| 11 | -// const baseUrl = 'http://192.168.1.133:7001/iMAC' //生产 | ||
| 12 | 10 | ||
| 13 | export function downLoadZip(str, filename) { | 11 | export function downLoadZip(str, filename) { |
| 14 | var url = baseUrl + str | 12 | var url = baseUrl + str |
| ... | @@ -27,7 +25,7 @@ export function downLoadZip(str, filename) { | ... | @@ -27,7 +25,7 @@ export function downLoadZip(str, filename) { |
| 27 | * @param {*} res blob响应内容 | 25 | * @param {*} res blob响应内容 |
| 28 | * @param {String} mimeType MIME类型 | 26 | * @param {String} mimeType MIME类型 |
| 29 | */ | 27 | */ |
| 30 | - export function resolveBlob(res, mimeType) { | 28 | +export function resolveBlob(res, mimeType) { |
| 31 | const aLink = document.createElement('a') | 29 | const aLink = document.createElement('a') |
| 32 | var blob = new Blob([res], { type: mimeType }) | 30 | var blob = new Blob([res], { type: mimeType }) |
| 33 | // //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名; | 31 | // //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名; |
| ... | @@ -44,33 +42,33 @@ export function downLoadZip(str, filename) { | ... | @@ -44,33 +42,33 @@ export function downLoadZip(str, filename) { |
| 44 | } | 42 | } |
| 45 | 43 | ||
| 46 | // excel导出请求 | 44 | // excel导出请求 |
| 47 | -export function downLoadXlsx(str, data,fileName) { | 45 | +export function downLoadXlsx(str, data, fileName) { |
| 48 | var url = baseUrl + str | 46 | var url = baseUrl + str |
| 49 | - return new Promise((resolve,reject)=>{ | 47 | + return new Promise((resolve, reject) => { |
| 50 | axios({ | 48 | axios({ |
| 51 | method: 'post', | 49 | method: 'post', |
| 52 | url: url, | 50 | url: url, |
| 53 | data: data, | 51 | data: data, |
| 54 | - timeout:500000, | 52 | + timeout: 500000, |
| 55 | responseType: 'blob', | 53 | responseType: 'blob', |
| 56 | headers: { 'Authorization': decodeURIComponent(getToken()) } | 54 | headers: { 'Authorization': decodeURIComponent(getToken()) } |
| 57 | // headers: { 'Authorization': decodeURIComponent(getToken()) } | 55 | // headers: { 'Authorization': decodeURIComponent(getToken()) } |
| 58 | //uat环境token需要做url解码处理 | 56 | //uat环境token需要做url解码处理 |
| 59 | }).then(res => { | 57 | }).then(res => { |
| 60 | if (res.status === 200) { | 58 | if (res.status === 200) { |
| 61 | - downLoadExcal(res,fileName) | 59 | + downLoadExcal(res, fileName) |
| 62 | } | 60 | } |
| 63 | resolve(res) | 61 | resolve(res) |
| 64 | - }).catch((err)=>{ | 62 | + }).catch((err) => { |
| 65 | reject(err) | 63 | reject(err) |
| 66 | }) | 64 | }) |
| 67 | }) | 65 | }) |
| 68 | } | 66 | } |
| 69 | 67 | ||
| 70 | //excel导出下载 | 68 | //excel导出下载 |
| 71 | -export function downLoadExcal(val,filename) { | 69 | +export function downLoadExcal(val, filename) { |
| 72 | const aLink = document.createElement('a') | 70 | const aLink = document.createElement('a') |
| 73 | - const fileName = filename+".xlsx" | 71 | + const fileName = filename + ".xlsx" |
| 74 | aLink.href = URL.createObjectURL(val.data) | 72 | aLink.href = URL.createObjectURL(val.data) |
| 75 | aLink.setAttribute('download', fileName) // 设置下载文件名称 | 73 | aLink.setAttribute('download', fileName) // 设置下载文件名称 |
| 76 | document.body.appendChild(aLink) | 74 | document.body.appendChild(aLink) |
| ... | @@ -81,7 +79,7 @@ export function downLoadExcal(val,filename) { | ... | @@ -81,7 +79,7 @@ export function downLoadExcal(val,filename) { |
| 81 | //航班预审导出 | 79 | //航班预审导出 |
| 82 | export function cargoXlsxPre(str, data) { | 80 | export function cargoXlsxPre(str, data) { |
| 83 | var url = baseUrl + str | 81 | var url = baseUrl + str |
| 84 | - return new Promise((resolve,reject)=>{ | 82 | + return new Promise((resolve, reject) => { |
| 85 | axios({ | 83 | axios({ |
| 86 | method: 'post', | 84 | method: 'post', |
| 87 | url: url, | 85 | url: url, |
| ... | @@ -93,7 +91,7 @@ export function cargoXlsxPre(str, data) { | ... | @@ -93,7 +91,7 @@ export function cargoXlsxPre(str, data) { |
| 93 | cargoTableXlsxPre(res) | 91 | cargoTableXlsxPre(res) |
| 94 | } | 92 | } |
| 95 | resolve() | 93 | resolve() |
| 96 | - }).catch((err)=>{ | 94 | + }).catch((err) => { |
| 97 | reject(err) | 95 | reject(err) |
| 98 | }) | 96 | }) |
| 99 | }) | 97 | }) |
| ... | @@ -101,11 +99,11 @@ export function cargoXlsxPre(str, data) { | ... | @@ -101,11 +99,11 @@ export function cargoXlsxPre(str, data) { |
| 101 | 99 | ||
| 102 | //航班预审导出 | 100 | //航班预审导出 |
| 103 | export function cargoTableXlsxPre(val) { | 101 | export function cargoTableXlsxPre(val) { |
| 104 | - const aLink = document.createElement('a') | 102 | + const aLink = document.createElement('a') |
| 105 | - const fileName = "航班预审表.xlsx" | 103 | + const fileName = "航班预审表.xlsx" |
| 106 | - aLink.href = URL.createObjectURL(val.data) | 104 | + aLink.href = URL.createObjectURL(val.data) |
| 107 | - aLink.setAttribute('download', fileName) // 设置下载文件名称 | 105 | + aLink.setAttribute('download', fileName) // 设置下载文件名称 |
| 108 | - document.body.appendChild(aLink) | 106 | + document.body.appendChild(aLink) |
| 109 | - aLink.click() | 107 | + aLink.click() |
| 110 | - document.body.removeChild(aLink); | 108 | + document.body.removeChild(aLink); |
| 111 | } | 109 | } | ... | ... |
This diff is collapsed. Click to expand it.
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | - <el-form | 3 | + <el-form :inline="true" :model="queryParams" class="form-header" size="medium" label-position="right" |
| 4 | - :inline="true" | 4 | + label-width="auto"> |
| 5 | - :model="queryParams" | ||
| 6 | - class="form-header" | ||
| 7 | - size="medium" | ||
| 8 | - label-position="right" | ||
| 9 | - label-width="auto" | ||
| 10 | - > | ||
| 11 | <el-form-item label="航班号"> | 5 | <el-form-item label="航班号"> |
| 12 | - <el-input | 6 | + <el-input v-model.trim="purposeOfFlightNo" placeholder="航班号" @keyup.enter.native="getList" clearable></el-input> |
| 13 | - v-model.trim="purposeOfFlightNo" | ||
| 14 | - placeholder="航班号" | ||
| 15 | - @keyup.enter.native="getList" | ||
| 16 | - clearable | ||
| 17 | - ></el-input> | ||
| 18 | </el-form-item> | 7 | </el-form-item> |
| 19 | <el-form-item label="状态"> | 8 | <el-form-item label="状态"> |
| 20 | <el-select v-model="queryParams.status" placeholder="状态" clearable> | 9 | <el-select v-model="queryParams.status" placeholder="状态" clearable> |
| ... | @@ -23,45 +12,21 @@ | ... | @@ -23,45 +12,21 @@ |
| 23 | </el-select> | 12 | </el-select> |
| 24 | </el-form-item> | 13 | </el-form-item> |
| 25 | <el-form-item> | 14 | <el-form-item> |
| 26 | - <el-button | 15 | + <el-button type="primary" icon="el-icon-search" @click="getList" size="mini">查询</el-button> |
| 27 | - type="primary" | ||
| 28 | - icon="el-icon-search" | ||
| 29 | - @click="getList" | ||
| 30 | - size="mini" | ||
| 31 | - >查询</el-button | ||
| 32 | - > | ||
| 33 | </el-form-item> | 16 | </el-form-item> |
| 34 | <div> | 17 | <div> |
| 35 | - <el-button | 18 | + <el-button style="margin-bottom: 20px" type="primary" icon="el-icon-plus" size="mini" |
| 36 | - style="margin-bottom: 20px" | 19 | + v-hasPermi="['allocation:alloc:add']" @click=" |
| 37 | - type="primary" | ||
| 38 | - icon="el-icon-plus" | ||
| 39 | - size="mini" | ||
| 40 | - v-hasPermi="['allocation:alloc:add']" | ||
| 41 | - @click=" | ||
| 42 | $router.push({ | 20 | $router.push({ |
| 43 | name: 'FlightAllocConfigAdd', | 21 | name: 'FlightAllocConfigAdd', |
| 44 | params: { handle: 'add' }, | 22 | params: { handle: 'add' }, |
| 45 | }) | 23 | }) |
| 46 | - " | 24 | + ">添加</el-button> |
| 47 | - >添加</el-button | ||
| 48 | - > | ||
| 49 | </div> | 25 | </div> |
| 50 | </el-form> | 26 | </el-form> |
| 51 | - | 27 | + |
| 52 | - <el-table | 28 | + <el-table :data="flyList" v-loading="loading" size="small" highlight-current-row border stripe> |
| 53 | - :data="flyList" | 29 | + <el-table-column prop="purposeOfFlightNo" label="航班号" align="center"></el-table-column> |
| 54 | - v-loading="loading" | ||
| 55 | - size="small" | ||
| 56 | - highlight-current-row | ||
| 57 | - border | ||
| 58 | - stripe | ||
| 59 | - > | ||
| 60 | - <el-table-column | ||
| 61 | - prop="purposeOfFlightNo" | ||
| 62 | - label="航班号" | ||
| 63 | - align="center" | ||
| 64 | - ></el-table-column> | ||
| 65 | 30 | ||
| 66 | <el-table-column prop="status" label="状态" align="center"> | 31 | <el-table-column prop="status" label="状态" align="center"> |
| 67 | <template slot-scope="scope"> | 32 | <template slot-scope="scope"> |
| ... | @@ -80,62 +45,22 @@ | ... | @@ -80,62 +45,22 @@ |
| 80 | 45 | ||
| 81 | <el-table-column label="操作" prop="id" align="center"> | 46 | <el-table-column label="操作" prop="id" align="center"> |
| 82 | <template slot-scope="scope"> | 47 | <template slot-scope="scope"> |
| 83 | - <el-button | 48 | + <el-button type="text" size="mini" icon="el-icon-view" @click="handleClick(scope.row.id, 'detail')">查看 |
| 84 | - type="text" | 49 | + </el-button> |
| 85 | - size="mini" | 50 | + <el-button type="text" size="mini" icon="el-icon-edit" v-hasPermi="['allocation:alloc:update']" |
| 86 | - icon="el-icon-view" | 51 | + @click="handleClick(scope.row.id, 'update')">修改</el-button> |
| 87 | - @click="handleClick(scope.row.id, 'detail')" | 52 | + <el-button type="text" size="mini" icon="el-icon-delete" v-hasPermi="['allocation:alloc:delete']" |
| 88 | - >查看</el-button | 53 | + @click="del(scope.row.id, scope.row.status)">删除</el-button> |
| 89 | - > | 54 | + <el-button type="text" size="mini" icon="el-icon-video-pause" v-hasPermi="['allocation:alloc:openClose']" |
| 90 | - <el-button | 55 | + @click="changeStatus(scope.row.id, 3)" v-if="scope.row.status == '1'">停用</el-button> |
| 91 | - type="text" | 56 | + <el-button type="text" size="mini" icon="el-icon-video-play" v-hasPermi="['allocation:alloc:openClose']" |
| 92 | - size="mini" | 57 | + @click="changeStatus(scope.row.id, 1)" v-else>启用</el-button> |
| 93 | - icon="el-icon-edit" | ||
| 94 | - v-hasPermi="['allocation:alloc:update']" | ||
| 95 | - @click="handleClick(scope.row.id, 'update')" | ||
| 96 | - >修改</el-button | ||
| 97 | - > | ||
| 98 | - <el-button | ||
| 99 | - type="text" | ||
| 100 | - size="mini" | ||
| 101 | - icon="el-icon-delete" | ||
| 102 | - v-hasPermi="['allocation:alloc:delete']" | ||
| 103 | - @click="del(scope.row.id, scope.row.status)" | ||
| 104 | - >删除</el-button | ||
| 105 | - > | ||
| 106 | - <el-button | ||
| 107 | - type="text" | ||
| 108 | - size="mini" | ||
| 109 | - icon="el-icon-video-pause" | ||
| 110 | - v-hasPermi="['allocation:alloc:openClose']" | ||
| 111 | - @click="changeStatus(scope.row.id, 3)" | ||
| 112 | - v-if="scope.row.status == '1'" | ||
| 113 | - >停用</el-button | ||
| 114 | - > | ||
| 115 | - <el-button | ||
| 116 | - type="text" | ||
| 117 | - size="mini" | ||
| 118 | - icon="el-icon-video-play" | ||
| 119 | - v-hasPermi="['allocation:alloc:openClose']" | ||
| 120 | - @click="changeStatus(scope.row.id, 1)" | ||
| 121 | - v-else | ||
| 122 | - >启用</el-button | ||
| 123 | - > | ||
| 124 | </template> | 58 | </template> |
| 125 | </el-table-column> | 59 | </el-table-column> |
| 126 | </el-table> | 60 | </el-table> |
| 127 | - <el-pagination | 61 | + <el-pagination @size-change="getList" @current-change="getList" :current-page.sync="curPage" |
| 128 | - @size-change="getList" | 62 | + :page-sizes="[10, 20, 30, 40]" :page-size.sync="limit" layout="prev, pager, next, jumper, sizes, total" |
| 129 | - @current-change="getList" | 63 | + :total="total" background :hide-on-single-page="true" style="margin-top: 40px; text-align: right"> |
| 130 | - :current-page.sync="curPage" | ||
| 131 | - :page-sizes="[10, 20, 30, 40]" | ||
| 132 | - :page-size.sync="limit" | ||
| 133 | - layout="prev, pager, next, jumper, sizes, total" | ||
| 134 | - :total="total" | ||
| 135 | - background | ||
| 136 | - :hide-on-single-page="true" | ||
| 137 | - style="margin-top: 40px; text-align: right" | ||
| 138 | - > | ||
| 139 | </el-pagination> | 64 | </el-pagination> |
| 140 | </div> | 65 | </div> |
| 141 | </template> | 66 | </template> |
| ... | @@ -165,14 +90,14 @@ export default { | ... | @@ -165,14 +90,14 @@ export default { |
| 165 | }; | 90 | }; |
| 166 | }, | 91 | }, |
| 167 | created() { | 92 | created() { |
| 168 | - if(this.$store.state.tagsView.cachedViews.length == 0){ | 93 | + if (this.$store.state.tagsView.cachedViews.length == 0) { |
| 169 | this.getList(); | 94 | this.getList(); |
| 170 | } | 95 | } |
| 171 | }, | 96 | }, |
| 172 | - activated(){ | 97 | + activated() { |
| 173 | this.getList() | 98 | this.getList() |
| 174 | }, | 99 | }, |
| 175 | - deactivated(){ | 100 | + deactivated() { |
| 176 | this.flyList = [] | 101 | this.flyList = [] |
| 177 | }, | 102 | }, |
| 178 | methods: { | 103 | methods: { |
| ... | @@ -228,7 +153,7 @@ export default { | ... | @@ -228,7 +153,7 @@ export default { |
| 228 | }); | 153 | }); |
| 229 | this.getList(); | 154 | this.getList(); |
| 230 | }) | 155 | }) |
| 231 | - .catch(() => {}); | 156 | + .catch(() => { }); |
| 232 | }); | 157 | }); |
| 233 | } | 158 | } |
| 234 | }, | 159 | }, |
| ... | @@ -249,7 +174,7 @@ export default { | ... | @@ -249,7 +174,7 @@ export default { |
| 249 | this.msgSuccess(tip + "成功"); | 174 | this.msgSuccess(tip + "成功"); |
| 250 | } | 175 | } |
| 251 | }) | 176 | }) |
| 252 | - .catch(() => {}); | 177 | + .catch(() => { }); |
| 253 | }); | 178 | }); |
| 254 | }, | 179 | }, |
| 255 | }, | 180 | }, | ... | ... |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
| 1 | <template> | 1 | <template> |
| 2 | - <div class="app-container"> | 2 | + <div> |
| 3 | - <el-form | 3 | + <el-form class="form-header" :model="queryParams" label-position="right" label-width="auto" size="medium"> |
| 4 | - class="form-header" | ||
| 5 | - :model="queryParams" | ||
| 6 | - label-position="right" | ||
| 7 | - label-width="auto" | ||
| 8 | - size="medium" | ||
| 9 | - > | ||
| 10 | <el-row> | 4 | <el-row> |
| 11 | <el-col :span="6"> | 5 | <el-col :span="6"> |
| 12 | <el-form-item label="航班日期从" prop="fltDateStart"> | 6 | <el-form-item label="航班日期从" prop="fltDateStart"> |
| 13 | - <el-date-picker | 7 | + <el-date-picker value-format="yyyy-MM-dd" class="formItem" v-model="queryParams.fltDateStart" type="date" |
| 14 | - value-format="yyyy-MM-dd" | 8 | + placeholder="选择日期"> |
| 15 | - class="formItem" | ||
| 16 | - v-model="queryParams.fltDateStart" | ||
| 17 | - type="date" | ||
| 18 | - placeholder="选择日期" | ||
| 19 | - > | ||
| 20 | </el-date-picker> | 9 | </el-date-picker> |
| 21 | </el-form-item> | 10 | </el-form-item> |
| 22 | </el-col> | 11 | </el-col> |
| 23 | <el-col :span="6"> | 12 | <el-col :span="6"> |
| 24 | <el-form-item label="到" prop="fltDateEnd"> | 13 | <el-form-item label="到" prop="fltDateEnd"> |
| 25 | - <el-date-picker | 14 | + <el-date-picker value-format="yyyy-MM-dd" class="formItem" v-model="queryParams.fltDateEnd" type="date" |
| 26 | - value-format="yyyy-MM-dd" | 15 | + placeholder="选择日期"> |
| 27 | - class="formItem" | ||
| 28 | - v-model="queryParams.fltDateEnd" | ||
| 29 | - type="date" | ||
| 30 | - placeholder="选择日期" | ||
| 31 | - > | ||
| 32 | </el-date-picker> | 16 | </el-date-picker> |
| 33 | </el-form-item> | 17 | </el-form-item> |
| 34 | </el-col> | 18 | </el-col> |
| 35 | <el-col :span="6"> | 19 | <el-col :span="6"> |
| 36 | <el-form-item label="航班号"> | 20 | <el-form-item label="航班号"> |
| 37 | - <el-input | 21 | + <el-input type="textarea" v-model="fltNo" clearable class="formItem" placeholder="AC001;AC002" :rows="1"> |
| 38 | - type="textarea" | ||
| 39 | - v-model="fltNo" | ||
| 40 | - clearable | ||
| 41 | - class="formItem" | ||
| 42 | - placeholder="AC001;AC002" | ||
| 43 | - rows="1" | ||
| 44 | - > | ||
| 45 | </el-input> | 22 | </el-input> |
| 46 | </el-form-item> | 23 | </el-form-item> |
| 47 | </el-col> | 24 | </el-col> |
| 48 | <el-col :span="6"> | 25 | <el-col :span="6"> |
| 49 | <el-form-item label="运单号"> | 26 | <el-form-item label="运单号"> |
| 50 | - <el-input | 27 | + <el-input clearable type="textarea" v-model="queryParams.waybillNo" class="formItem" |
| 51 | - clearable | 28 | + placeholder="请输入运单号(回车间隔)" :rows="1"></el-input> |
| 52 | - type="textarea" | ||
| 53 | - v-model="queryParams.waybillNo" | ||
| 54 | - class="formItem" | ||
| 55 | - placeholder="请输入运单号(回车间隔)" | ||
| 56 | - rows="1" | ||
| 57 | - ></el-input> | ||
| 58 | </el-form-item> | 29 | </el-form-item> |
| 59 | </el-col> | 30 | </el-col> |
| 31 | + </el-row> | ||
| 32 | + <el-row> | ||
| 60 | <el-col :span="6"> | 33 | <el-col :span="6"> |
| 61 | <el-form-item label="站点"> | 34 | <el-form-item label="站点"> |
| 62 | - <el-input | 35 | + <el-input type="textarea" v-model="siteName" class="formItem" placeholder="PVG;PEK" clearable :rows="1"> |
| 63 | - type="textarea" | ||
| 64 | - v-model="siteName" | ||
| 65 | - class="formItem" | ||
| 66 | - placeholder="PVG;PEK" | ||
| 67 | - clearable | ||
| 68 | - rows="1" | ||
| 69 | - > | ||
| 70 | </el-input> | 36 | </el-input> |
| 71 | </el-form-item> | 37 | </el-form-item> |
| 72 | </el-col> | 38 | </el-col> |
| 73 | <el-col :span="6"> | 39 | <el-col :span="6"> |
| 74 | <el-form-item label="URSA"> | 40 | <el-form-item label="URSA"> |
| 75 | - <el-input | 41 | + <el-input clearable type="textarea" v-model="ursa" class="formItem" placeholder="S_;P_;E2" :rows="1"> |
| 76 | - clearable | ||
| 77 | - type="textarea" | ||
| 78 | - v-model="ursa" | ||
| 79 | - class="formItem" | ||
| 80 | - placeholder="S_;P_;E2" | ||
| 81 | - rows="1" | ||
| 82 | - > | ||
| 83 | </el-input> | 42 | </el-input> |
| 84 | </el-form-item> | 43 | </el-form-item> |
| 85 | </el-col> | 44 | </el-col> |
| 86 | - <el-col :span="24"> | ||
| 87 | - <el-switch | ||
| 88 | - v-model="queryParams.reExport" | ||
| 89 | - active-color="#13ce66" | ||
| 90 | - active-text="重新导出" | ||
| 91 | - style="padding-left: 35px" | ||
| 92 | - > | ||
| 93 | - </el-switch> | ||
| 94 | - </el-col> | ||
| 95 | </el-row> | 45 | </el-row> |
| 96 | - <div style="margin-top: 25px"> | 46 | + <el-switch v-model="queryParams.reExport" active-color="#13ce66" active-text="重新导出" style="padding-left: 35px"> |
| 97 | - <el-button | 47 | + </el-switch> |
| 98 | - type="primary" | 48 | + <div style="margin-top:25px"> |
| 99 | - icon="el-icon-search" | 49 | + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| 100 | - size="mini" | 50 | + <el-button type="warning" :disabled="tableData.length == 0" v-hasPermi="['base:caExport:export']" |
| 101 | - @click="handleQuery" | 51 | + @click="xlse()" :loading="downLoadingTip.downloading" icon="el-icon-download" size="mini">{{ |
| 102 | - >搜索</el-button | 52 | + downLoadingTip.downloading ? downLoadingTip.tip : "导出" |
| 103 | - > | 53 | + }}</el-button> |
| 104 | - <el-button | ||
| 105 | - type="warning" | ||
| 106 | - :disabled="tableData.length == 0" | ||
| 107 | - @click="xlse()" | ||
| 108 | - :loading="downLoadingTip.downloading" | ||
| 109 | - icon="el-icon-download" | ||
| 110 | - size="mini" | ||
| 111 | - v-hasPermi="['base:caExport:export']" | ||
| 112 | - >{{ | ||
| 113 | - downLoadingTip.downloading ? downLoadingTip.tip : "导出" | ||
| 114 | - }}</el-button | ||
| 115 | - > | ||
| 116 | </div> | 54 | </div> |
| 117 | </el-form> | 55 | </el-form> |
| 118 | 56 | ||
| 119 | - <el-table | 57 | + <el-table max-height="500" highlight-current-row border stripe v-loading="loading" :data="tableData"> |
| 120 | - max-height="500" | 58 | + <el-table-column label="运单号" align="center" prop="waybillNo" /> |
| 121 | - highlight-current-row | 59 | + <el-table-column :show-overflow-tooltip="true" label="品牌描述" align="center" prop="nameDescription" /> |
| 122 | - border | 60 | + <el-table-column label="航班日期" align="center" prop="fltDate" /> |
| 123 | - stripe | 61 | + <el-table-column label="航班号" align="center" prop="fltNo" width="100" /> |
| 124 | - v-loading="loading" | 62 | + <el-table-column label="航班路线" align="center" prop="route" /> |
| 125 | - :data="tableData" | 63 | + <el-table-column label="配置航班类型" align="center" prop="kindName" width="130" /> |
| 126 | - > | 64 | + <el-table-column label="尺寸" align="center" prop="sizeStr" width="70" /> |
| 127 | - <el-table-column | 65 | + <el-table-column label="件数" align="center" prop="qty" width="70" /> |
| 128 | - label="运单号" | 66 | + <el-table-column label="实际重量" align="center" prop="actualWeight" width="100" /> |
| 129 | - align="center" | 67 | + <el-table-column label="创建时间" align="center" prop="createTime" width="180" /> |
| 130 | - prop="waybillNo" | ||
| 131 | - width="150" | ||
| 132 | - /> | ||
| 133 | - <el-table-column | ||
| 134 | - :show-overflow-tooltip="true" | ||
| 135 | - label="品牌描述" | ||
| 136 | - align="center" | ||
| 137 | - prop="nameDescription" | ||
| 138 | - width="150" | ||
| 139 | - /> | ||
| 140 | - <el-table-column | ||
| 141 | - label="航班日期" | ||
| 142 | - align="center" | ||
| 143 | - prop="fltDate" | ||
| 144 | - width="150" | ||
| 145 | - /> | ||
| 146 | - <el-table-column label="航班号" align="center" prop="fltNo" /> | ||
| 147 | - <el-table-column | ||
| 148 | - label="航班路线" | ||
| 149 | - align="center" | ||
| 150 | - prop="route" | ||
| 151 | - width="150" | ||
| 152 | - /> | ||
| 153 | - <el-table-column | ||
| 154 | - label="配置航班类型" | ||
| 155 | - align="center" | ||
| 156 | - prop="kindName" | ||
| 157 | - width="130" | ||
| 158 | - /> | ||
| 159 | - <el-table-column label="尺寸" align="center" prop="sizeStr" /> | ||
| 160 | - <el-table-column label="件数" align="center" prop="qty" /> | ||
| 161 | - <el-table-column label="实际重量" align="center" prop="actualWeight" /> | ||
| 162 | - <el-table-column | ||
| 163 | - label="创建时间" | ||
| 164 | - align="center" | ||
| 165 | - prop="createTime" | ||
| 166 | - width="180" | ||
| 167 | - /> | ||
| 168 | </el-table> | 68 | </el-table> |
| 169 | - <pagination | 69 | + <pagination v-show="total > 0" :total="total" layout=" prev, pager, next, jumper, sizes,total" |
| 170 | - v-show="total > 0" | 70 | + :page.sync="queryParams.pageNum" :limit.sync="queryParams.limitSize" @pagination="findAllFltData" /> |
| 171 | - :total="total" | ||
| 172 | - layout=" prev, pager, next, jumper, sizes,total" | ||
| 173 | - :page.sync="queryParams.pageNum" | ||
| 174 | - :limit.sync="queryParams.limitSize" | ||
| 175 | - @pagination="findAllFltData" | ||
| 176 | - /> | ||
| 177 | </div> | 71 | </div> |
| 178 | </template> | 72 | </template> |
| 179 | 73 | ||
| ... | @@ -221,7 +115,6 @@ export default { | ... | @@ -221,7 +115,6 @@ export default { |
| 221 | rules: {}, | 115 | rules: {}, |
| 222 | }; | 116 | }; |
| 223 | }, | 117 | }, |
| 224 | - created() {}, | ||
| 225 | methods: { | 118 | methods: { |
| 226 | // 导出表格 | 119 | // 导出表格 |
| 227 | xlse() { | 120 | xlse() { |
| ... | @@ -233,8 +126,9 @@ export default { | ... | @@ -233,8 +126,9 @@ export default { |
| 233 | ); | 126 | ); |
| 234 | cargoXlse.cargoExportPreQueryDto.limitStart = 0; | 127 | cargoXlse.cargoExportPreQueryDto.limitStart = 0; |
| 235 | cargoXlse.cargoExportPreQueryDto.limitSize = -1; | 128 | cargoXlse.cargoExportPreQueryDto.limitSize = -1; |
| 236 | - downLoadXlsx("/cargo/excelPre", cargoXlse,'航班预审表') | 129 | + downLoadXlsx("/cargo/excelPre", cargoXlse, '航班预审表') |
| 237 | .then(() => { | 130 | .then(() => { |
| 131 | + | ||
| 238 | this.downLoadingTip.downloading = false; | 132 | this.downLoadingTip.downloading = false; |
| 239 | this.downLoadingTip.tip = ""; | 133 | this.downLoadingTip.tip = ""; |
| 240 | this.progress = 100; | 134 | this.progress = 100; |
| ... | @@ -244,7 +138,6 @@ export default { | ... | @@ -244,7 +138,6 @@ export default { |
| 244 | this.downLoadingTip.tip = ""; | 138 | this.downLoadingTip.tip = ""; |
| 245 | }); | 139 | }); |
| 246 | }, | 140 | }, |
| 247 | - | ||
| 248 | /** 搜索按钮操作 */ | 141 | /** 搜索按钮操作 */ |
| 249 | handleQuery() { | 142 | handleQuery() { |
| 250 | this.queryParams.pageNum = 1; | 143 | this.queryParams.pageNum = 1; |
| ... | @@ -265,6 +158,12 @@ export default { | ... | @@ -265,6 +158,12 @@ export default { |
| 265 | this.tableData = response.data.list; | 158 | this.tableData = response.data.list; |
| 266 | this.total = response.data.totalCount; | 159 | this.total = response.data.totalCount; |
| 267 | this.loading = false; | 160 | this.loading = false; |
| 161 | + if (response.data.list.length == 0) { | ||
| 162 | + this.$message({ | ||
| 163 | + message: "未查询到数据", | ||
| 164 | + type: "warning", | ||
| 165 | + }); | ||
| 166 | + } | ||
| 268 | } else { | 167 | } else { |
| 269 | this.msgError(response.msg); | 168 | this.msgError(response.msg); |
| 270 | } | 169 | } | ... | ... |
| ... | @@ -15,7 +15,8 @@ | ... | @@ -15,7 +15,8 @@ |
| 15 | <div style="font-size: 12px; font-weight: 700"> | 15 | <div style="font-size: 12px; font-weight: 700"> |
| 16 | 提示:<span style="color: #1890ff">以下为所提交的数据或出错信息</span> | 16 | 提示:<span style="color: #1890ff">以下为所提交的数据或出错信息</span> |
| 17 | </div> | 17 | </div> |
| 18 | - <el-table ref="filterTable" :data="tableData" v-loading="loading" style="width: 100%; margin-top: 20px" size="small" border> | 18 | + <el-table ref="filterTable" :data="tableData" v-loading="loading" style="width: 100%; margin-top: 20px" size="small" |
| 19 | + border> | ||
| 19 | <el-table-column label="行号" prop="line" fixed width="50" align="center"> | 20 | <el-table-column label="行号" prop="line" fixed width="50" align="center"> |
| 20 | </el-table-column> | 21 | </el-table-column> |
| 21 | <el-table-column label="错误信息" prop="errorMessage" fixed width="300"> | 22 | <el-table-column label="错误信息" prop="errorMessage" fixed width="300"> |
| ... | @@ -31,103 +32,100 @@ | ... | @@ -31,103 +32,100 @@ |
| 31 | <el-table-column v-if="tableData.length > 0" label="航班日期" align="center" prop="C" /> | 32 | <el-table-column v-if="tableData.length > 0" label="航班日期" align="center" prop="C" /> |
| 32 | <el-table-column v-if="tableData.length > 0" label="航班号" align="center" prop="D" /> | 33 | <el-table-column v-if="tableData.length > 0" label="航班号" align="center" prop="D" /> |
| 33 | <el-table-column v-if="tableData.length > 0" label="预审意见" align="center" prop="E" /> | 34 | <el-table-column v-if="tableData.length > 0" label="预审意见" align="center" prop="E" /> |
| 34 | - <!-- <el-table-column v-for="(value, key) in this.tableData[0]" :key="key" | 35 | + <!-- <el-table-column v-for="(value, key) in this.tableData[0]" :key="key" |
| 35 | v-if="key != 'errorMessage' && key != 'line'" :label="key" :prop="key" width="120"></el-table-column>--> | 36 | v-if="key != 'errorMessage' && key != 'line'" :label="key" :prop="key" width="120"></el-table-column>--> |
| 36 | </el-table> | 37 | </el-table> |
| 37 | </div> | 38 | </div> |
| 38 | </template> | 39 | </template> |
| 39 | 40 | ||
| 40 | <script> | 41 | <script> |
| 41 | - import { | 42 | +import { |
| 42 | - downLoadTemplate, | 43 | + downLoadTemplate, |
| 43 | - importcaPreReview, | 44 | + importcaPreReview, |
| 44 | - } from "@/api/caPreReviewImport"; | 45 | +} from "@/api/caPreReviewImport"; |
| 45 | - export default { | 46 | +export default { |
| 46 | - name:"CAPreReviewImport", | 47 | + name: "CAPreReviewImport", |
| 47 | - data() { | 48 | + data() { |
| 48 | - return { | 49 | + return { |
| 49 | - // 遮罩层 | 50 | + // 遮罩层 |
| 50 | - loading: false, | 51 | + loading: false, |
| 51 | - flightType: [], | 52 | + flightType: [], |
| 52 | - form: { | 53 | + form: { |
| 53 | - type: "", | 54 | + type: "", |
| 54 | - region: "", | 55 | + region: "", |
| 55 | - }, | 56 | + }, |
| 56 | - fileList: [], | 57 | + fileList: [], |
| 57 | - tableData: [], | 58 | + tableData: [], |
| 58 | - }; | 59 | + }; |
| 59 | - }, | 60 | + }, |
| 60 | - methods: { | 61 | + methods: { |
| 61 | - downloadTempleate() { | 62 | + downloadTempleate() { |
| 62 | 63 | ||
| 63 | - let fileName = "航班预审导入模板.xlsx"; | 64 | + let fileName = "航班预审导入模板.xlsx"; |
| 64 | - downLoadTemplate().then((res) => { | 65 | + downLoadTemplate().then((res) => { |
| 65 | - if (res) { | 66 | + if (res) { |
| 66 | - const blob = new Blob([res]); | 67 | + const blob = new Blob([res]); |
| 67 | - const link = document.createElement("a"); //创建a标签 | 68 | + const link = document.createElement("a"); //创建a标签 |
| 68 | - link.download = fileName; //a标签添加属性 | 69 | + link.download = fileName; //a标签添加属性 |
| 69 | - link.style.display = "none"; | 70 | + link.style.display = "none"; |
| 70 | - link.href = URL.createObjectURL(blob); | 71 | + link.href = URL.createObjectURL(blob); |
| 71 | - document.body.appendChild(link); | 72 | + document.body.appendChild(link); |
| 72 | - link.click(); //执行下载 | 73 | + link.click(); //执行下载 |
| 73 | - URL.revokeObjectURL(link.href); //释放url | 74 | + URL.revokeObjectURL(link.href); //释放url |
| 74 | - document.body.removeChild(link); //释放标签 | 75 | + document.body.removeChild(link); //释放标签 |
| 75 | - } else { | 76 | + } else { |
| 76 | - this.$message.error("下载失败"); | 77 | + this.$message.error("下载失败"); |
| 77 | - } | 78 | + } |
| 78 | - }); | 79 | + }); |
| 79 | 80 | ||
| 80 | - }, | 81 | + }, |
| 81 | - uploadExcel(option) { | 82 | + uploadExcel(option) { |
| 82 | - //上传excel | 83 | + //上传excel |
| 83 | - const file = option.file; | 84 | + const file = option.file; |
| 84 | - this.loading=true; | 85 | + this.loading = true; |
| 85 | - importcaPreReview(file, this.form.type).then((res) => { | 86 | + importcaPreReview(file, this.form.type).then((res) => { |
| 86 | - this.loading=false; | 87 | + this.loading = false; |
| 87 | - if (res.code != 200) { | 88 | + if (res.code != 200) { |
| 88 | - if (res.code == 603) { | 89 | + if (res.code == 603) { |
| 89 | - this.$alert(res.msg, "提示", { | 90 | + this.$alert(res.msg, "提示", { |
| 90 | - confirmButtonText: "确定", | 91 | + confirmButtonText: "确定", |
| 91 | - type: "warning", | 92 | + type: "warning", |
| 92 | - }); | 93 | + }); |
| 93 | - } else { | ||
| 94 | - this.$message.error(res.msg); | ||
| 95 | - this.tableData = res.data; | ||
| 96 | - } | ||
| 97 | } else { | 94 | } else { |
| 98 | - this.$message.success(res.msg); | 95 | + this.$message.error(res.msg); |
| 99 | this.tableData = res.data; | 96 | this.tableData = res.data; |
| 100 | } | 97 | } |
| 101 | - }); | 98 | + } else { |
| 102 | - }, | 99 | + this.$message.success(res.msg); |
| 103 | - handleRemove(file, fileList) { | 100 | + this.tableData = res.data; |
| 104 | - //清掉上传的文件 | 101 | + } |
| 105 | - this.tableData = []; | 102 | + }); |
| 106 | - this.fileList = []; | ||
| 107 | - }, | ||
| 108 | - handleExceed(files) { | ||
| 109 | - //重复上传文件 | ||
| 110 | - let file = {}; | ||
| 111 | - file.file = files[0]; | ||
| 112 | - file.name = files[0].name; | ||
| 113 | - this.fileList = []; | ||
| 114 | - this.fileList.push(file); | ||
| 115 | - this.uploadExcel(file); | ||
| 116 | - }, | ||
| 117 | }, | 103 | }, |
| 118 | - created() { | 104 | + handleRemove(file, fileList) { |
| 119 | - | 105 | + //清掉上传的文件 |
| 106 | + this.tableData = []; | ||
| 107 | + this.fileList = []; | ||
| 108 | + }, | ||
| 109 | + handleExceed(files) { | ||
| 110 | + //重复上传文件 | ||
| 111 | + let file = {}; | ||
| 112 | + file.file = files[0]; | ||
| 113 | + file.name = files[0].name; | ||
| 114 | + this.fileList = []; | ||
| 115 | + this.fileList.push(file); | ||
| 116 | + this.uploadExcel(file); | ||
| 120 | }, | 117 | }, |
| 121 | - }; | 118 | + }, |
| 119 | +}; | ||
| 122 | </script> | 120 | </script> |
| 123 | <style rel="stylesheet/scss" lang="scss"> | 121 | <style rel="stylesheet/scss" lang="scss"> |
| 124 | - .upload-demo { | 122 | +.upload-demo { |
| 125 | - float: right; | 123 | + float: right; |
| 126 | - } | 124 | +} |
| 127 | 125 | ||
| 128 | - .el-upload-list { | 126 | +.el-upload-list { |
| 129 | - display: inline-block; | 127 | + display: inline-block; |
| 130 | - margin-left: 10px; | 128 | + margin-left: 10px; |
| 131 | - vertical-align: top; | 129 | + vertical-align: top; |
| 132 | - } | 130 | +} |
| 133 | </style> | 131 | </style> | ... | ... |
| ... | @@ -3,47 +3,27 @@ | ... | @@ -3,47 +3,27 @@ |
| 3 | <el-form :inline="true" :model="form" class="demo-form-inline" size="small"> | 3 | <el-form :inline="true" :model="form" class="demo-form-inline" size="small"> |
| 4 | <el-form-item label="航班种类"> | 4 | <el-form-item label="航班种类"> |
| 5 | <el-select v-model="form.type" placeholder="航班种类"> | 5 | <el-select v-model="form.type" placeholder="航班种类"> |
| 6 | - <el-option | 6 | + <el-option v-for="item in flightType" :key="item.id" :label="item.englishName" :value="item.code">{{ |
| 7 | - v-for="item in flightType" | 7 | + item.englishName |
| 8 | - :key="item.id" | 8 | + }}</el-option> |
| 9 | - :label="item.englishName" | ||
| 10 | - :value="item.code" | ||
| 11 | - >{{ item.englishName }}</el-option | ||
| 12 | - > | ||
| 13 | </el-select> | 9 | </el-select> |
| 14 | </el-form-item> | 10 | </el-form-item> |
| 15 | <el-form-item> | 11 | <el-form-item> |
| 16 | - <el-upload | 12 | + <el-upload action="/flightInfoImport/importFlight" name="file" :http-request="uploadExcel" |
| 17 | - action="/flightInfoImport/importFlight" | 13 | + :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList" accept=".xlsx" |
| 18 | - name="file" | 14 | + class="upload-demo" v-hasPermi="['base:flightImport:importFlight']"> |
| 19 | - :http-request="uploadExcel" | ||
| 20 | - :on-remove="handleRemove" | ||
| 21 | - :limit="1" | ||
| 22 | - :on-exceed="handleExceed" | ||
| 23 | - :file-list="fileList" | ||
| 24 | - accept=".xlsx" | ||
| 25 | - class="upload-demo" | ||
| 26 | - v-hasPermi="['base:flightImport:importFlight']" | ||
| 27 | - > | ||
| 28 | <el-button type="primary">点击上传</el-button> | 15 | <el-button type="primary">点击上传</el-button> |
| 29 | </el-upload> | 16 | </el-upload> |
| 30 | </el-form-item> | 17 | </el-form-item> |
| 31 | <el-form-item> | 18 | <el-form-item> |
| 32 | - <el-button type="primary" @click="downloadTempleate" v-hasPermi="['base:flightImport:exportExcel']" | 19 | + <el-button type="primary" @click="downloadTempleate" v-hasPermi="['base:flightImport:exportExcel']">下载模板 |
| 33 | - >下载模板</el-button | 20 | + </el-button> |
| 34 | - > | ||
| 35 | </el-form-item> | 21 | </el-form-item> |
| 36 | </el-form> | 22 | </el-form> |
| 37 | <div style="font-size: 12px; font-weight: 700"> | 23 | <div style="font-size: 12px; font-weight: 700"> |
| 38 | 提示:<span style="color: #1890ff">以下为所提交的数据或出错信息</span> | 24 | 提示:<span style="color: #1890ff">以下为所提交的数据或出错信息</span> |
| 39 | </div> | 25 | </div> |
| 40 | - <el-table | 26 | + <el-table ref="filterTable" :data="tableData" style="margin-top: 20px" size="small" border> |
| 41 | - ref="filterTable" | ||
| 42 | - :data="tableData" | ||
| 43 | - style="width: 100%; margin-top: 20px" | ||
| 44 | - size="small" | ||
| 45 | - border | ||
| 46 | - > | ||
| 47 | <el-table-column label="行号" prop="line" fixed width="50" align="center"> | 27 | <el-table-column label="行号" prop="line" fixed width="50" align="center"> |
| 48 | </el-table-column> | 28 | </el-table-column> |
| 49 | <el-table-column label="错误信息" prop="errorMessage" fixed width="200"> | 29 | <el-table-column label="错误信息" prop="errorMessage" fixed width="200"> |
| ... | @@ -54,14 +34,8 @@ | ... | @@ -54,14 +34,8 @@ |
| 54 | </template> | 34 | </template> |
| 55 | </el-table-column> | 35 | </el-table-column> |
| 56 | <el-table-column v-if="tableData.length == 0"></el-table-column> | 36 | <el-table-column v-if="tableData.length == 0"></el-table-column> |
| 57 | - <el-table-column | 37 | + <el-table-column v-for="(value, key) in this.tableData[0]" :key="key" |
| 58 | - v-for="(value, key) in this.tableData[0]" | 38 | + v-if="key != 'errorMessage' && key != 'line'" :label="key" :prop="key"></el-table-column> |
| 59 | - :key="key" | ||
| 60 | - v-if="key != 'errorMessage' && key != 'line'" | ||
| 61 | - :label="key" | ||
| 62 | - :prop="key" | ||
| 63 | - width="120" | ||
| 64 | - ></el-table-column> | ||
| 65 | </el-table> | 39 | </el-table> |
| 66 | </div> | 40 | </div> |
| 67 | </template> | 41 | </template> |
| ... | @@ -172,11 +146,11 @@ export default { | ... | @@ -172,11 +146,11 @@ export default { |
| 172 | }, | 146 | }, |
| 173 | }; | 147 | }; |
| 174 | </script> | 148 | </script> |
| 175 | - | ||
| 176 | <style rel="stylesheet/scss" lang="scss"> | 149 | <style rel="stylesheet/scss" lang="scss"> |
| 177 | .upload-demo { | 150 | .upload-demo { |
| 178 | float: right; | 151 | float: right; |
| 179 | } | 152 | } |
| 153 | + | ||
| 180 | .el-upload-list { | 154 | .el-upload-list { |
| 181 | display: inline-block; | 155 | display: inline-block; |
| 182 | margin-left: 10px; | 156 | margin-left: 10px; | ... | ... |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
| 1 | <template> | 1 | <template> |
| 2 | <div class="menuDrawer"> | 2 | <div class="menuDrawer"> |
| 3 | - <el-dialog | 3 | + <el-dialog :title="drawerTitle" width="50%" :visible.sync="dialogVisible" :close-on-click-modal="false" |
| 4 | - :title="drawerTitle" | 4 | + :append-to-body="true"> |
| 5 | - width="50%" | 5 | + <el-form ref="userForm" :model="menuForm" :disabled="menuFormDisabled" :rules="rules" label-width="auto" |
| 6 | - :visible.sync="dialogVisible" | 6 | + style="margin: 10px"> |
| 7 | - :close-on-click-modal="false" | ||
| 8 | - :append-to-body="true" | ||
| 9 | - > | ||
| 10 | - <el-form | ||
| 11 | - ref="userForm" | ||
| 12 | - :model="menuForm" | ||
| 13 | - :disabled="menuFormDisabled" | ||
| 14 | - :rules="rules" | ||
| 15 | - label-width="auto" | ||
| 16 | - style="margin: 10px" | ||
| 17 | - > | ||
| 18 | <el-row> | 7 | <el-row> |
| 19 | <el-col :span="12"> | 8 | <el-col :span="12"> |
| 20 | <el-form-item label="菜单名称" prop=""> | 9 | <el-form-item label="菜单名称" prop=""> |
| ... | @@ -48,12 +37,8 @@ | ... | @@ -48,12 +37,8 @@ |
| 48 | </el-col> | 37 | </el-col> |
| 49 | <el-col :span="24"> | 38 | <el-col :span="24"> |
| 50 | <el-form-item label="菜单状态" prop=""> | 39 | <el-form-item label="菜单状态" prop=""> |
| 51 | - <el-switch | 40 | + <el-switch v-model="menuData.menuStatus" active-color="#13ce66" inactive-color="#ff4949" |
| 52 | - v-model="menuData.menuStatus" | 41 | + :disabled="menuFormDisabled"></el-switch> |
| 53 | - active-color="#13ce66" | ||
| 54 | - inactive-color="#ff4949" | ||
| 55 | - :disabled="menuFormDisabled" | ||
| 56 | - ></el-switch> | ||
| 57 | </el-form-item> | 42 | </el-form-item> |
| 58 | </el-col> | 43 | </el-col> |
| 59 | <el-col :span="24"> | 44 | <el-col :span="24"> |
| ... | @@ -114,15 +99,15 @@ export default { | ... | @@ -114,15 +99,15 @@ export default { |
| 114 | data() { | 99 | data() { |
| 115 | return { | 100 | return { |
| 116 | menuForm: {}, | 101 | menuForm: {}, |
| 117 | - rules:{} | 102 | + rules: {} |
| 118 | }; | 103 | }; |
| 119 | }, | 104 | }, |
| 120 | updated() { | 105 | updated() { |
| 121 | this.menuForm = this.menuData; | 106 | this.menuForm = this.menuData; |
| 122 | }, | 107 | }, |
| 123 | - watch:{ | 108 | + watch: { |
| 124 | - dialogVisible(val,oldVal){ | 109 | + dialogVisible(val, oldVal) { |
| 125 | - if(val){ | 110 | + if (val) { |
| 126 | this.menuForm = this.menuData; | 111 | this.menuForm = this.menuData; |
| 127 | } | 112 | } |
| 128 | } | 113 | } |
| ... | @@ -134,7 +119,7 @@ export default { | ... | @@ -134,7 +119,7 @@ export default { |
| 134 | selected(val) { | 119 | selected(val) { |
| 135 | console.log(val); | 120 | console.log(val); |
| 136 | }, | 121 | }, |
| 137 | - submit() {}, | 122 | + submit() { }, |
| 138 | }, | 123 | }, |
| 139 | }; | 124 | }; |
| 140 | </script> | 125 | </script> | ... | ... |
| ... | @@ -8,78 +8,34 @@ | ... | @@ -8,78 +8,34 @@ |
| 8 | >新增菜单</el-button | 8 | >新增菜单</el-button |
| 9 | > | 9 | > |
| 10 | </div> --> | 10 | </div> --> |
| 11 | - <el-table | 11 | + <el-table :data="data" row-key="id" fit border stripe highlightCurrentRow v-loading="loading" default-expand-all |
| 12 | - :data="data" | 12 | + :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> |
| 13 | - row-key="id" | ||
| 14 | - fit | ||
| 15 | - border | ||
| 16 | - stripe | ||
| 17 | - highlightCurrentRow | ||
| 18 | - v-loading="loading" | ||
| 19 | - default-expand-all | ||
| 20 | - :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" | ||
| 21 | - > | ||
| 22 | <template v-for="(item, index) in tableHeader"> | 13 | <template v-for="(item, index) in tableHeader"> |
| 23 | - <el-table-column | 14 | + <el-table-column v-if="item.value === 'menuType'" :prop="item.value" :label="item.name" :key="index" |
| 24 | - v-if="item.value === 'menuType'" | 15 | + :align="item.align" header-align="center" showOverflowTooltip :width="item.width" :formatter="formatter"> |
| 25 | - :prop="item.value" | ||
| 26 | - :label="item.name" | ||
| 27 | - :key="index" | ||
| 28 | - :align="item.align" | ||
| 29 | - header-align="center" | ||
| 30 | - showOverflowTooltip | ||
| 31 | - :width="item.width" | ||
| 32 | - :formatter="formatter" | ||
| 33 | - > | ||
| 34 | <template slot-scope="scope"> | 16 | <template slot-scope="scope"> |
| 35 | - <el-tag | 17 | + <el-tag :type="scope.row.menuType === 'B' ? '' : 'success'" disable-transitions>{{ scope.row.menuType === |
| 36 | - :type="scope.row.menuType === 'B' ? '' : 'success'" | 18 | + "B" ? "按钮" : "菜单" |
| 37 | - disable-transitions | 19 | + }}</el-tag> |
| 38 | - >{{ scope.row.menuType === "B" ? "按钮" : "菜单" }}</el-tag | ||
| 39 | - > | ||
| 40 | </template> | 20 | </template> |
| 41 | </el-table-column> | 21 | </el-table-column> |
| 42 | - <el-table-column | 22 | + <el-table-column v-else :prop="item.value" :label="item.name" :key="index" :align="item.align" |
| 43 | - v-else | 23 | + header-align="center" showOverflowTooltip :width="item.width" :formatter="formatter"> |
| 44 | - :prop="item.value" | ||
| 45 | - :label="item.name" | ||
| 46 | - :key="index" | ||
| 47 | - :align="item.align" | ||
| 48 | - header-align="center" | ||
| 49 | - showOverflowTooltip | ||
| 50 | - :width="item.width" | ||
| 51 | - :formatter="formatter" | ||
| 52 | - > | ||
| 53 | </el-table-column> | 24 | </el-table-column> |
| 54 | </template> | 25 | </template> |
| 55 | 26 | ||
| 56 | - <el-table-column | 27 | + <el-table-column header-align="center" align="center" label="操作" width="auto"> |
| 57 | - header-align="center" | ||
| 58 | - align="center" | ||
| 59 | - label="操作" | ||
| 60 | - width="auto" | ||
| 61 | - > | ||
| 62 | <template slot-scope="scope"> | 28 | <template slot-scope="scope"> |
| 63 | <!-- <el-button type="success" size="mini" @click="buttonClick(scope)">修改</el-button> | 29 | <!-- <el-button type="success" size="mini" @click="buttonClick(scope)">修改</el-button> |
| 64 | <el-button type="primary" size="mini" @click="buttonClick(scope)" | 30 | <el-button type="primary" size="mini" @click="buttonClick(scope)" |
| 65 | >查看</el-button | 31 | >查看</el-button |
| 66 | > --> | 32 | > --> |
| 67 | - <el-button | 33 | + <el-button :type="scope.row.status == 1 ? 'warning' : 'primary'" v-hasPermi="['system:menu:openClose']" |
| 68 | - :type="scope.row.status == 1 ? 'warning' : 'primary'" | 34 | + size="mini" @click="menuStatus(scope)" v-if="scope.row.menuType == 'C'">{{ scope.row.status == 1 ? "停用菜单" : |
| 69 | - v-hasPermi="['system:menu:openClose']" | 35 | + "启用菜单" |
| 70 | - size="mini" | 36 | + }}</el-button> |
| 71 | - @click="menuStatus(scope)" | 37 | + <el-button type="danger" size="mini" v-hasPermi="['system:menu:delete']" @click="removeMenu(scope)" |
| 72 | - v-if="scope.row.menuType == 'C'" | 38 | + v-if="scope.row.menuType == 'C'">删除菜单</el-button> |
| 73 | - >{{ scope.row.status == 1 ? "停用菜单" : "启用菜单" }}</el-button | ||
| 74 | - > | ||
| 75 | - <el-button | ||
| 76 | - type="danger" | ||
| 77 | - size="mini" | ||
| 78 | - v-hasPermi="['system:menu:delete']" | ||
| 79 | - @click="removeMenu(scope)" | ||
| 80 | - v-if="scope.row.menuType == 'C'" | ||
| 81 | - >删除菜单</el-button | ||
| 82 | - > | ||
| 83 | </template> | 39 | </template> |
| 84 | </el-table-column> | 40 | </el-table-column> |
| 85 | </el-table> | 41 | </el-table> |
| ... | @@ -144,7 +100,7 @@ export default { | ... | @@ -144,7 +100,7 @@ export default { |
| 144 | { | 100 | { |
| 145 | name: "菜单名", | 101 | name: "菜单名", |
| 146 | value: "title", | 102 | value: "title", |
| 147 | - width: "200", | 103 | + width: "", |
| 148 | align: "left", | 104 | align: "left", |
| 149 | sorTable: false, | 105 | sorTable: false, |
| 150 | }, | 106 | }, |
| ... | @@ -220,9 +176,9 @@ export default { | ... | @@ -220,9 +176,9 @@ export default { |
| 220 | res.data.length > 0 | 176 | res.data.length > 0 |
| 221 | ? (this.data = res.data) | 177 | ? (this.data = res.data) |
| 222 | : this.$message({ | 178 | : this.$message({ |
| 223 | - message: "数据为空", | 179 | + message: "数据为空", |
| 224 | - type: "warning", | 180 | + type: "warning", |
| 225 | - }); | 181 | + }); |
| 226 | } else { | 182 | } else { |
| 227 | this.$message({ | 183 | this.$message({ |
| 228 | message: res.msg, | 184 | message: res.msg, |
| ... | @@ -275,7 +231,7 @@ export default { | ... | @@ -275,7 +231,7 @@ export default { |
| 275 | data.status = row.row.status == 1 ? "2" : "1"; | 231 | data.status = row.row.status == 1 ? "2" : "1"; |
| 276 | this.statusUpdate(data); | 232 | this.statusUpdate(data); |
| 277 | }) | 233 | }) |
| 278 | - .catch(() => {}); | 234 | + .catch(() => { }); |
| 279 | }, | 235 | }, |
| 280 | 236 | ||
| 281 | //菜单删除 | 237 | //菜单删除 |
| ... | @@ -291,13 +247,13 @@ export default { | ... | @@ -291,13 +247,13 @@ export default { |
| 291 | data.status = "0"; | 247 | data.status = "0"; |
| 292 | this.statusUpdate(data); | 248 | this.statusUpdate(data); |
| 293 | }) | 249 | }) |
| 294 | - .catch(() => {}); | 250 | + .catch(() => { }); |
| 295 | }, | 251 | }, |
| 296 | 252 | ||
| 297 | formatter(row, column, cellValue, index) { | 253 | formatter(row, column, cellValue, index) { |
| 298 | - if (dictLabels[column.property]) { | 254 | + if (dictLabels["menu"][column.property]) { |
| 299 | - if (dictLabels[column.property][cellValue]) { | 255 | + if (dictLabels["menu"][column.property][cellValue]) { |
| 300 | - return dictLabels[column.property][cellValue]; | 256 | + return dictLabels["menu"][column.property][cellValue]; |
| 301 | } | 257 | } |
| 302 | } | 258 | } |
| 303 | return cellValue; | 259 | return cellValue; | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div class="roleDrawer"> | 2 | <div class="roleDrawer"> |
| 3 | - <el-drawer | 3 | + <el-drawer :title="drawerTitle" :visible.sync="drawer" direction="rtl" size="40%" destroy-on-close |
| 4 | - :title="drawerTitle" | 4 | + :close-on-click-modal="false" :wrapperClosable="false" :show-close="false"> |
| 5 | - :visible.sync="drawer" | 5 | + <el-form ref="roleForm" :model="roleForm" label-width="auto" :rules="rules" size="mini" style="margin: 10px"> |
| 6 | - direction="rtl" | ||
| 7 | - size="40%" | ||
| 8 | - destroy-on-close | ||
| 9 | - :close-on-click-modal="false" | ||
| 10 | - :wrapperClosable="false" | ||
| 11 | - :show-close="false" | ||
| 12 | - > | ||
| 13 | - <el-form | ||
| 14 | - ref="roleForm" | ||
| 15 | - :model="roleForm" | ||
| 16 | - label-width="auto" | ||
| 17 | - :rules="rules" | ||
| 18 | - size="mini" | ||
| 19 | - style="margin: 10px" | ||
| 20 | - > | ||
| 21 | <el-row :gutter="10"> | 6 | <el-row :gutter="10"> |
| 22 | <el-col :span="12"> | 7 | <el-col :span="12"> |
| 23 | <el-form-item label="角色名:" prop="name"> | 8 | <el-form-item label="角色名:" prop="name"> |
| 24 | - <el-input | 9 | + <el-input placeholder="请输入角色名" v-model.trim="roleForm.name" :disabled="roleFormDisabled" |
| 25 | - placeholder="请输入角色名" | 10 | + v-if="!roleFormDisabled" clearable></el-input> |
| 26 | - v-model.trim="roleForm.name" | ||
| 27 | - :disabled="roleFormDisabled" | ||
| 28 | - v-if="!roleFormDisabled" | ||
| 29 | - clearable | ||
| 30 | - ></el-input> | ||
| 31 | <div v-else>{{ roleData.name }}</div> | 11 | <div v-else>{{ roleData.name }}</div> |
| 32 | </el-form-item> | 12 | </el-form-item> |
| 33 | </el-col> | 13 | </el-col> |
| 34 | <el-col :span="24"> | 14 | <el-col :span="24"> |
| 35 | <el-form-item label="角色描述:" prop="remark"> | 15 | <el-form-item label="角色描述:" prop="remark"> |
| 36 | - <el-input | 16 | + <el-input v-model="roleForm.remark" type="textarea" placeholder="请输入角色描述" :disabled="roleFormDisabled" |
| 37 | - v-model="roleForm.remark" | 17 | + v-if="!roleFormDisabled" clearable></el-input> |
| 38 | - type="textarea" | ||
| 39 | - placeholder="请输入角色描述" | ||
| 40 | - :disabled="roleFormDisabled" | ||
| 41 | - v-if="!roleFormDisabled" | ||
| 42 | - clearable | ||
| 43 | - ></el-input> | ||
| 44 | <div v-else>{{ roleData.remark }}</div> | 18 | <div v-else>{{ roleData.remark }}</div> |
| 45 | </el-form-item> | 19 | </el-form-item> |
| 46 | </el-col> | 20 | </el-col> |
| ... | @@ -58,31 +32,16 @@ | ... | @@ -58,31 +32,16 @@ |
| 58 | </el-col> --> | 32 | </el-col> --> |
| 59 | <el-col :span="24"> | 33 | <el-col :span="24"> |
| 60 | <el-form-item label="角色权限:" prop="menuIdList"> | 34 | <el-form-item label="角色权限:" prop="menuIdList"> |
| 61 | - <el-tree | 35 | + <el-tree ref="tree" :data="treeData" node-key="id" :props="defaultProps" :show-checkbox="true" |
| 62 | - ref="tree" | 36 | + :default-checked-keys="roleData.menuIds" accordion> |
| 63 | - :data="treeData" | ||
| 64 | - node-key="id" | ||
| 65 | - :props="defaultProps" | ||
| 66 | - :show-checkbox="true" | ||
| 67 | - :default-checked-keys="roleData.menuIds" | ||
| 68 | - accordion | ||
| 69 | - > | ||
| 70 | </el-tree> | 37 | </el-tree> |
| 71 | </el-form-item> | 38 | </el-form-item> |
| 72 | </el-col> | 39 | </el-col> |
| 73 | </el-row> | 40 | </el-row> |
| 74 | <el-form-item> | 41 | <el-form-item> |
| 75 | - <el-button | 42 | + <el-button type="primary" v-if="!roleFormDisabled" size="mini" :loading="loading" @click="submit">提交 |
| 76 | - type="primary" | 43 | + </el-button> |
| 77 | - v-if="!roleFormDisabled" | 44 | + <el-button type="primary" size="mini" @click="handleClose">取消</el-button> |
| 78 | - size="mini" | ||
| 79 | - :loading="loading" | ||
| 80 | - @click="submit" | ||
| 81 | - >提交</el-button | ||
| 82 | - > | ||
| 83 | - <el-button type="primary" size="mini" @click="handleClose" | ||
| 84 | - >取消</el-button | ||
| 85 | - > | ||
| 86 | </el-form-item> | 45 | </el-form-item> |
| 87 | </el-form> | 46 | </el-form> |
| 88 | </el-drawer> | 47 | </el-drawer> |
| ... | @@ -173,7 +132,7 @@ export default { | ... | @@ -173,7 +132,7 @@ export default { |
| 173 | let formData = {}; | 132 | let formData = {}; |
| 174 | this.loading = true; | 133 | this.loading = true; |
| 175 | let arr = []; | 134 | let arr = []; |
| 176 | - arr = this.$refs.tree.getCheckedKeys().filter((item,index)=>{ | 135 | + arr = this.$refs.tree.getCheckedKeys().filter((item, index) => { |
| 177 | return this.$refs.tree.getCheckedKeys().indexOf(item) == index | 136 | return this.$refs.tree.getCheckedKeys().indexOf(item) == index |
| 178 | }) | 137 | }) |
| 179 | formData.menuIdList = arr; | 138 | formData.menuIdList = arr; |
| ... | @@ -186,7 +145,7 @@ export default { | ... | @@ -186,7 +145,7 @@ export default { |
| 186 | this.loading = false; | 145 | this.loading = false; |
| 187 | if (res.code === 200) { | 146 | if (res.code === 200) { |
| 188 | this.$message({ | 147 | this.$message({ |
| 189 | - message: "操作成功", | 148 | + message: "操作成功,新增权限需重新登陆后刷新。", |
| 190 | type: "success", | 149 | type: "success", |
| 191 | }); | 150 | }); |
| 192 | this.$emit("handleClose", false); | 151 | this.$emit("handleClose", false); |
| ... | @@ -224,7 +183,7 @@ export default { | ... | @@ -224,7 +183,7 @@ export default { |
| 224 | data.push(menuItem) | 183 | data.push(menuItem) |
| 225 | if (item.children && item.children.length) { | 184 | if (item.children && item.children.length) { |
| 226 | menuItem.children = this.treeDataInfo(item.children); | 185 | menuItem.children = this.treeDataInfo(item.children); |
| 227 | - menuItem.children.unshift({id:item.id,title:`${item.title}(菜单)`}) | 186 | + menuItem.children.unshift({ id: item.id, title: `${item.title}(菜单)` }) |
| 228 | } | 187 | } |
| 229 | }); | 188 | }); |
| 230 | return data; | 189 | return data; | ... | ... |
| ... | @@ -4,24 +4,13 @@ | ... | @@ -4,24 +4,13 @@ |
| 4 | <el-row :gutter="50"> | 4 | <el-row :gutter="50"> |
| 5 | <el-col :span="6"> | 5 | <el-col :span="6"> |
| 6 | <el-form-item label="角色名称"> | 6 | <el-form-item label="角色名称"> |
| 7 | - <el-input | 7 | + <el-input v-model="formData.name" placeholder="请输入角色名称" clearable></el-input> |
| 8 | - v-model="formData.name" | ||
| 9 | - placeholder="请输入角色名称" | ||
| 10 | - clearable | ||
| 11 | - ></el-input> | ||
| 12 | </el-form-item> | 8 | </el-form-item> |
| 13 | </el-col> | 9 | </el-col> |
| 14 | <el-col :span="6"> | 10 | <el-col :span="6"> |
| 15 | <el-form-item label="创建时间"> | 11 | <el-form-item label="创建时间"> |
| 16 | - <el-date-picker | 12 | + <el-date-picker v-model="createTime" type="daterange" range-separator="至" start-placeholder="开始日期" |
| 17 | - v-model="createTime" | 13 | + end-placeholder="结束日期" value-format="yyyy-MM-dd" clearable> |
| 18 | - type="daterange" | ||
| 19 | - range-separator="至" | ||
| 20 | - start-placeholder="开始日期" | ||
| 21 | - end-placeholder="结束日期" | ||
| 22 | - value-format="yyyy-MM-dd" | ||
| 23 | - clearable | ||
| 24 | - > | ||
| 25 | </el-date-picker> | 14 | </el-date-picker> |
| 26 | </el-form-item> | 15 | </el-form-item> |
| 27 | </el-col> | 16 | </el-col> |
| ... | @@ -36,61 +25,31 @@ | ... | @@ -36,61 +25,31 @@ |
| 36 | </el-row> | 25 | </el-row> |
| 37 | </el-form> | 26 | </el-form> |
| 38 | <div style="margin:20px"> | 27 | <div style="margin:20px"> |
| 39 | - <el-button | 28 | + <el-button type="primary" icon="el-icon-search" size="mini" :loading="tableLoading" @click="selectRoleList(0)">搜索 |
| 40 | - type="primary" | 29 | + </el-button> |
| 41 | - icon="el-icon-search" | 30 | + <el-button type="primary" icon="el-icon-plus" size="mini" @click="addRole" v-hasPermi="['system:role:add']">新增角色 |
| 42 | - size="mini" | 31 | + </el-button> |
| 43 | - :loading="tableLoading" | ||
| 44 | - @click="selectRoleList(0)" | ||
| 45 | - >搜索</el-button | ||
| 46 | - > | ||
| 47 | - <el-button type="primary" icon="el-icon-plus" size="mini" @click="addRole" v-hasPermi="['system:role:add']" | ||
| 48 | - >新增角色</el-button | ||
| 49 | - > | ||
| 50 | </div> | 32 | </div> |
| 51 | - <Tables | 33 | + <Tables ductName="role" :data="data" :headerData="tableHeader" :infoData="tableHeader" :totalCount="total" |
| 52 | - :data="data" | 34 | + :limitSize="formData.size" :page="formData.page" :pageSizes="[20, 30, 40, 50]" :loading="tableLoading" |
| 53 | - :headerData="tableHeader" | 35 | + height="600" @sizeChange="sizeChange" @currentChange="currentChange"> |
| 54 | - :infoData="tableHeader" | 36 | + <template slot="optionColumn"> |
| 55 | - :totalCount="total" | ||
| 56 | - :limitSize="formData.size" | ||
| 57 | - :page="formData.page" | ||
| 58 | - :pageSizes="[20,30,40,50]" | ||
| 59 | - :loading="tableLoading" | ||
| 60 | - height="600" | ||
| 61 | - @sizeChange="sizeChange" | ||
| 62 | - @currentChange="currentChange" | ||
| 63 | - > | ||
| 64 | - <template> | ||
| 65 | <el-table-column header-align="center" align="center" label="操作"> | 37 | <el-table-column header-align="center" align="center" label="操作"> |
| 66 | <template slot-scope="scope"> | 38 | <template slot-scope="scope"> |
| 67 | - <el-button type="primary" size="mini" @click="buttonClick(scope, 0)" | 39 | + <el-button type="primary" size="mini" @click="buttonClick(scope, 0)">查看</el-button> |
| 68 | - >查看</el-button | 40 | + <el-button type="primary" size="mini" @click="buttonClick(scope, 1)" v-hasPermi="['system:role:update']">修改 |
| 69 | - > | 41 | + </el-button> |
| 70 | - <el-button type="primary" size="mini" @click="buttonClick(scope, 1)" v-hasPermi="['system:role:update']" | 42 | + <el-button :type="scope.row.valid == 1 ? 'warning' : 'primary'" size="mini" |
| 71 | - >修改</el-button | 43 | + v-hasPermi="['system:role:openClose']" @click="roleStatus(scope)">{{ scope.row.valid == 1 ? "停用" : "启用" }} |
| 72 | - > | 44 | + </el-button> |
| 73 | - <el-button | 45 | + <el-button type="danger" size="mini" @click="removeRole(scope)" v-hasPermi="['system:role:delete']">删除角色 |
| 74 | - :type="scope.row.valid == 1 ? 'warning' : 'primary'" | 46 | + </el-button> |
| 75 | - size="mini" | ||
| 76 | - v-hasPermi="['system:role:openClose']" | ||
| 77 | - @click="roleStatus(scope)" | ||
| 78 | - >{{ scope.row.valid == 1 ? "停用" : "启用" }}</el-button | ||
| 79 | - > | ||
| 80 | - <el-button type="danger" size="mini" @click="removeRole(scope)" v-hasPermi="['system:role:delete']" | ||
| 81 | - >删除角色</el-button | ||
| 82 | - > | ||
| 83 | </template> | 47 | </template> |
| 84 | </el-table-column> | 48 | </el-table-column> |
| 85 | </template> | 49 | </template> |
| 86 | </Tables> | 50 | </Tables> |
| 87 | - <Drawer | 51 | + <Drawer :drawer="drawer" :drawerTitle="drawerTitle" :roleFormDisabled="roleFormDisabled" :roleData="roleData" |
| 88 | - :drawer="drawer" | 52 | + @handleClose="handleClose"></Drawer> |
| 89 | - :drawerTitle="drawerTitle" | ||
| 90 | - :roleFormDisabled="roleFormDisabled" | ||
| 91 | - :roleData="roleData" | ||
| 92 | - @handleClose="handleClose" | ||
| 93 | - ></Drawer> | ||
| 94 | </div> | 53 | </div> |
| 95 | </template> | 54 | </template> |
| 96 | 55 | ||
| ... | @@ -103,7 +62,7 @@ import { | ... | @@ -103,7 +62,7 @@ import { |
| 103 | updateRoleStatus, | 62 | updateRoleStatus, |
| 104 | } from "@/api/system/user.js"; | 63 | } from "@/api/system/user.js"; |
| 105 | export default { | 64 | export default { |
| 106 | - name:"RoleConfig", | 65 | + name: "RoleConfig", |
| 107 | components: { | 66 | components: { |
| 108 | Drawer, | 67 | Drawer, |
| 109 | }, | 68 | }, |
| ... | @@ -120,67 +79,52 @@ export default { | ... | @@ -120,67 +79,52 @@ export default { |
| 120 | data: [], //表格数据 | 79 | data: [], //表格数据 |
| 121 | tableHeader: [ | 80 | tableHeader: [ |
| 122 | { | 81 | { |
| 123 | - type: "index", | ||
| 124 | - name: "", | ||
| 125 | - value: "", | ||
| 126 | - width: "", | ||
| 127 | - align: "center", | ||
| 128 | - sorTable: false, | ||
| 129 | - disabled:true | ||
| 130 | - }, | ||
| 131 | - { | ||
| 132 | - type: "", | ||
| 133 | name: "角色名称", | 82 | name: "角色名称", |
| 134 | value: "name", | 83 | value: "name", |
| 135 | width: "150px", | 84 | width: "150px", |
| 136 | align: "center", | 85 | align: "center", |
| 137 | sorTable: false, | 86 | sorTable: false, |
| 138 | - disabled:true | 87 | + disabled: true |
| 139 | }, | 88 | }, |
| 140 | { | 89 | { |
| 141 | - type: "", | ||
| 142 | name: "角色状态", | 90 | name: "角色状态", |
| 143 | value: "valid", | 91 | value: "valid", |
| 144 | width: "150px", | 92 | width: "150px", |
| 145 | align: "center", | 93 | align: "center", |
| 146 | sorTable: false, | 94 | sorTable: false, |
| 147 | - disabled:true | 95 | + disabled: true |
| 148 | }, | 96 | }, |
| 149 | { | 97 | { |
| 150 | - type: "", | ||
| 151 | name: "创建人", | 98 | name: "创建人", |
| 152 | value: "createUserName", | 99 | value: "createUserName", |
| 153 | width: "150px", | 100 | width: "150px", |
| 154 | align: "center", | 101 | align: "center", |
| 155 | sorTable: false, | 102 | sorTable: false, |
| 156 | - disabled:true | 103 | + disabled: true |
| 157 | }, | 104 | }, |
| 158 | { | 105 | { |
| 159 | - type: "", | ||
| 160 | name: "创建时间", | 106 | name: "创建时间", |
| 161 | value: "createTime", | 107 | value: "createTime", |
| 162 | width: "150px", | 108 | width: "150px", |
| 163 | align: "center", | 109 | align: "center", |
| 164 | sorTable: false, | 110 | sorTable: false, |
| 165 | - disabled:true | 111 | + disabled: true |
| 166 | }, | 112 | }, |
| 167 | { | 113 | { |
| 168 | - type: "", | ||
| 169 | name: "修改时间", | 114 | name: "修改时间", |
| 170 | value: "updateTime", | 115 | value: "updateTime", |
| 171 | width: "150px", | 116 | width: "150px", |
| 172 | align: "center", | 117 | align: "center", |
| 173 | sorTable: false, | 118 | sorTable: false, |
| 174 | - disabled:true | 119 | + disabled: true |
| 175 | }, | 120 | }, |
| 176 | { | 121 | { |
| 177 | - type: "", | ||
| 178 | name: "备注", | 122 | name: "备注", |
| 179 | value: "remark", | 123 | value: "remark", |
| 180 | width: "400px", | 124 | width: "400px", |
| 181 | align: "center", | 125 | align: "center", |
| 182 | sorTable: false, | 126 | sorTable: false, |
| 183 | - disabled:true | 127 | + disabled: true |
| 184 | }, | 128 | }, |
| 185 | ], //表头数据 | 129 | ], //表头数据 |
| 186 | roleData: {}, //角色详情 | 130 | roleData: {}, //角色详情 |
| ... | @@ -193,20 +137,20 @@ export default { | ... | @@ -193,20 +137,20 @@ export default { |
| 193 | }; | 137 | }; |
| 194 | }, | 138 | }, |
| 195 | created() { | 139 | created() { |
| 196 | - if(this.$store.state.tagsView.cachedViews.length == 0){ | 140 | + if (this.$store.state.tagsView.cachedViews.length == 0) { |
| 197 | this.selectRoleList(); | 141 | this.selectRoleList(); |
| 198 | } | 142 | } |
| 199 | }, | 143 | }, |
| 200 | - activated(){ | 144 | + activated() { |
| 201 | this.selectRoleList(); | 145 | this.selectRoleList(); |
| 202 | }, | 146 | }, |
| 203 | - deactivated(){ | 147 | + deactivated() { |
| 204 | this.data = [] | 148 | this.data = [] |
| 205 | }, | 149 | }, |
| 206 | methods: { | 150 | methods: { |
| 207 | //角色列表 | 151 | //角色列表 |
| 208 | selectRoleList(val) { | 152 | selectRoleList(val) { |
| 209 | - if(val == 0){ | 153 | + if (val == 0) { |
| 210 | this.formData.page = 1 | 154 | this.formData.page = 1 |
| 211 | } | 155 | } |
| 212 | this.tableLoading = true; | 156 | this.tableLoading = true; |
| ... | @@ -341,7 +285,7 @@ export default { | ... | @@ -341,7 +285,7 @@ export default { |
| 341 | } | 285 | } |
| 342 | }); | 286 | }); |
| 343 | }) | 287 | }) |
| 344 | - .catch(() => {}); | 288 | + .catch(() => { }); |
| 345 | } else { | 289 | } else { |
| 346 | this.$message({ | 290 | this.$message({ |
| 347 | message: res.msg, | 291 | message: res.msg, |
| ... | @@ -360,7 +304,7 @@ export default { | ... | @@ -360,7 +304,7 @@ export default { |
| 360 | this.formData.page = val.page; | 304 | this.formData.page = val.page; |
| 361 | this.selectRoleList(); | 305 | this.selectRoleList(); |
| 362 | }, | 306 | }, |
| 363 | - sizeChange(val){ | 307 | + sizeChange(val) { |
| 364 | this.formData.size = val; | 308 | this.formData.size = val; |
| 365 | this.selectRoleList() | 309 | this.selectRoleList() |
| 366 | } | 310 | } | ... | ... |
| ... | @@ -4,20 +4,12 @@ | ... | @@ -4,20 +4,12 @@ |
| 4 | <el-row :gutter="50"> | 4 | <el-row :gutter="50"> |
| 5 | <el-col :span="6"> | 5 | <el-col :span="6"> |
| 6 | <el-form-item label="用户姓名"> | 6 | <el-form-item label="用户姓名"> |
| 7 | - <el-input | 7 | + <el-input placeholder="请输入用户名称" v-model="formData.username" clearable></el-input> |
| 8 | - placeholder="请输入用户名称" | ||
| 9 | - v-model="formData.username" | ||
| 10 | - clearable | ||
| 11 | - ></el-input> | ||
| 12 | </el-form-item> | 8 | </el-form-item> |
| 13 | </el-col> | 9 | </el-col> |
| 14 | <el-col :span="6"> | 10 | <el-col :span="6"> |
| 15 | <el-form-item label="手机号码"> | 11 | <el-form-item label="手机号码"> |
| 16 | - <el-input | 12 | + <el-input placeholder="请输入手机号码" v-model="formData.phone" clearable></el-input> |
| 17 | - placeholder="请输入手机号码" | ||
| 18 | - v-model="formData.phone" | ||
| 19 | - clearable | ||
| 20 | - ></el-input> | ||
| 21 | </el-form-item> | 13 | </el-form-item> |
| 22 | </el-col> | 14 | </el-col> |
| 23 | <el-col :span="6"> | 15 | <el-col :span="6"> |
| ... | @@ -31,68 +23,34 @@ | ... | @@ -31,68 +23,34 @@ |
| 31 | </el-row> | 23 | </el-row> |
| 32 | </el-form> | 24 | </el-form> |
| 33 | <div style="margin:20px"> | 25 | <div style="margin:20px"> |
| 34 | - <el-button | 26 | + <el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="selectUser(0)">搜索 |
| 35 | - type="primary" | 27 | + </el-button> |
| 36 | - icon="el-icon-search" | 28 | + <el-button type="primary" icon="el-icon-plus" size="mini" @click="addUser" v-hasPermi="['system:user:add']">新增用户 |
| 37 | - size="mini" | 29 | + </el-button> |
| 38 | - :loading="loading" | ||
| 39 | - @click="selectUser(0)" | ||
| 40 | - >搜索</el-button | ||
| 41 | - > | ||
| 42 | - <el-button type="primary" icon="el-icon-plus" size="mini" @click="addUser" v-hasPermi="['system:user:add']" | ||
| 43 | - >新增用户</el-button | ||
| 44 | - > | ||
| 45 | </div> | 30 | </div> |
| 46 | - <Tables | 31 | + <Tables ductName="user" :data="data" :headerData="tableHeader" :limitSize="formData.size" :totalCount="total" |
| 47 | - :data="data" | 32 | + :loading="loading" :page="formData.page" :pageSizes="[20, 30, 40, 50]" height="600" @sizeChange="sizeChange" |
| 48 | - :headerData="tableHeader" | 33 | + @currentChange="currentChange"> |
| 49 | - :limitSize="formData.size" | 34 | + <template slot="optionColumn"> |
| 50 | - :totalCount="total" | 35 | + <el-table-column header-align="center" align="center" width="auto" label="操作"> |
| 51 | - :loading="loading" | ||
| 52 | - :page="formData.page" | ||
| 53 | - :pageSizes="[20,30,40,50]" | ||
| 54 | - height="600" | ||
| 55 | - @sizeChange="sizeChange" | ||
| 56 | - @currentChange="currentChange" | ||
| 57 | - > | ||
| 58 | - <template> | ||
| 59 | - <el-table-column | ||
| 60 | - header-align="center" | ||
| 61 | - align="center" | ||
| 62 | - width="auto" | ||
| 63 | - label="操作" | ||
| 64 | - > | ||
| 65 | <template slot-scope="scope"> | 36 | <template slot-scope="scope"> |
| 66 | - <el-button type="primary" size="mini" @click="buttonClick(scope, 0)" | 37 | + <el-button type="primary" size="mini" @click="buttonClick(scope, 0)">查看</el-button> |
| 67 | - >查看</el-button | 38 | + <el-button type="primary" size="mini" @click="buttonClick(scope, 1)" v-hasPermi="['system:user:update']">修改 |
| 68 | - > | 39 | + </el-button> |
| 69 | - <el-button type="primary" size="mini" @click="buttonClick(scope, 1)" v-hasPermi="['system:user:update']" | ||
| 70 | - >修改</el-button | ||
| 71 | - > | ||
| 72 | <!-- <el-button type="primary" size="mini" @click="passwordShow = !passwordShow" | 40 | <!-- <el-button type="primary" size="mini" @click="passwordShow = !passwordShow" |
| 73 | >修改密码</el-button | 41 | >修改密码</el-button |
| 74 | > --> | 42 | > --> |
| 75 | - <el-button | 43 | + <el-button :type="scope.row.isValid == 1 ? 'warning' : 'primary'" size="mini" |
| 76 | - :type="scope.row.isValid == 1 ? 'warning' : 'primary'" | 44 | + v-hasPermi="['system:user:openClose']" @click="userStatus(scope)">{{ scope.row.isValid == 1 ? "停用" : "启用" |
| 77 | - size="mini" | 45 | + }}</el-button> |
| 78 | - v-hasPermi="['system:user:openClose']" | 46 | + <el-button type="danger" size="mini" @click="removeUser(scope)" v-hasPermi="['system:user:delete']">删除用户 |
| 79 | - @click="userStatus(scope)" | 47 | + </el-button> |
| 80 | - >{{ scope.row.isValid == 1 ? "停用" : "启用" }}</el-button | ||
| 81 | - > | ||
| 82 | - <el-button type="danger" size="mini" @click="removeUser(scope)" v-hasPermi="['system:user:delete']" | ||
| 83 | - >删除用户</el-button | ||
| 84 | - > | ||
| 85 | </template> | 48 | </template> |
| 86 | </el-table-column> | 49 | </el-table-column> |
| 87 | </template> | 50 | </template> |
| 88 | </Tables> | 51 | </Tables> |
| 89 | - <Drawer | 52 | + <Drawer :drawer="drawer" :drawerTitle="drawerTitle" :userFormDisabled="userFormDisabled" :userData="userData" |
| 90 | - :drawer="drawer" | 53 | + @handleClose="handleClose"></Drawer> |
| 91 | - :drawerTitle="drawerTitle" | ||
| 92 | - :userFormDisabled="userFormDisabled" | ||
| 93 | - :userData="userData" | ||
| 94 | - @handleClose="handleClose" | ||
| 95 | - ></Drawer> | ||
| 96 | <!-- <el-dialog | 54 | <!-- <el-dialog |
| 97 | title="修改密码" | 55 | title="修改密码" |
| 98 | :visible.sync="passwordShow" | 56 | :visible.sync="passwordShow" |
| ... | @@ -147,85 +105,68 @@ export default { | ... | @@ -147,85 +105,68 @@ export default { |
| 147 | }, //查询条件 | 105 | }, //查询条件 |
| 148 | tableHeader: [ | 106 | tableHeader: [ |
| 149 | { | 107 | { |
| 150 | - type: "index", | ||
| 151 | - name: "", | ||
| 152 | - value: "", | ||
| 153 | - width: "", | ||
| 154 | - align: "center", | ||
| 155 | - sorTable: false, | ||
| 156 | - disabled:true | ||
| 157 | - }, | ||
| 158 | - { | ||
| 159 | - type: "", | ||
| 160 | name: "员工号", | 108 | name: "员工号", |
| 161 | value: "loginName", | 109 | value: "loginName", |
| 162 | width: "150px", | 110 | width: "150px", |
| 163 | align: "center", | 111 | align: "center", |
| 164 | sorTable: false, | 112 | sorTable: false, |
| 165 | - disabled:true | 113 | + disabled: true |
| 166 | }, | 114 | }, |
| 167 | { | 115 | { |
| 168 | - type: "", | ||
| 169 | name: "用户姓名", | 116 | name: "用户姓名", |
| 170 | value: "username", | 117 | value: "username", |
| 171 | width: "150px", | 118 | width: "150px", |
| 172 | align: "center", | 119 | align: "center", |
| 173 | sorTable: false, | 120 | sorTable: false, |
| 174 | - disabled:true | 121 | + disabled: true |
| 175 | }, | 122 | }, |
| 176 | { | 123 | { |
| 177 | - type: "", | ||
| 178 | name: "所属口岸", | 124 | name: "所属口岸", |
| 179 | value: "portName", | 125 | value: "portName", |
| 180 | width: "150px", | 126 | width: "150px", |
| 181 | align: "center", | 127 | align: "center", |
| 182 | sortable: false, | 128 | sortable: false, |
| 183 | - disabled:true | 129 | + disabled: true |
| 184 | }, | 130 | }, |
| 185 | { | 131 | { |
| 186 | - type: "", | ||
| 187 | name: "所属角色", | 132 | name: "所属角色", |
| 188 | value: "roleNames", | 133 | value: "roleNames", |
| 189 | width: "150px", | 134 | width: "150px", |
| 190 | align: "center", | 135 | align: "center", |
| 191 | sorTable: false, | 136 | sorTable: false, |
| 192 | - disabled:true | 137 | + disabled: true |
| 193 | }, | 138 | }, |
| 194 | { | 139 | { |
| 195 | - type: "", | ||
| 196 | name: "电子邮箱", | 140 | name: "电子邮箱", |
| 197 | value: "email", | 141 | value: "email", |
| 198 | width: "150px", | 142 | width: "150px", |
| 199 | align: "center", | 143 | align: "center", |
| 200 | sorTable: false, | 144 | sorTable: false, |
| 201 | - disabled:true | 145 | + disabled: true |
| 202 | }, | 146 | }, |
| 203 | { | 147 | { |
| 204 | - type: "", | ||
| 205 | name: "用户状态", | 148 | name: "用户状态", |
| 206 | value: "isValid", | 149 | value: "isValid", |
| 207 | width: "100px", | 150 | width: "100px", |
| 208 | align: "center", | 151 | align: "center", |
| 209 | sorTable: false, | 152 | sorTable: false, |
| 210 | - disabled:true | 153 | + disabled: true, |
| 211 | }, | 154 | }, |
| 212 | { | 155 | { |
| 213 | - type: "", | ||
| 214 | name: "修改时间", | 156 | name: "修改时间", |
| 215 | value: "updateTime", | 157 | value: "updateTime", |
| 216 | width: "150px", | 158 | width: "150px", |
| 217 | align: "center", | 159 | align: "center", |
| 218 | sorTable: false, | 160 | sorTable: false, |
| 219 | - disabled:true | 161 | + disabled: true |
| 220 | }, | 162 | }, |
| 221 | { | 163 | { |
| 222 | - type: "", | ||
| 223 | name: "备注", | 164 | name: "备注", |
| 224 | value: "remark", | 165 | value: "remark", |
| 225 | width: "150px", | 166 | width: "150px", |
| 226 | align: "center", | 167 | align: "center", |
| 227 | sorTable: false, | 168 | sorTable: false, |
| 228 | - disabled:true | 169 | + disabled: true |
| 229 | }, | 170 | }, |
| 230 | ], //表头数据 | 171 | ], //表头数据 |
| 231 | userData: {}, //用户详情 | 172 | userData: {}, //用户详情 |
| ... | @@ -239,20 +180,20 @@ export default { | ... | @@ -239,20 +180,20 @@ export default { |
| 239 | }; | 180 | }; |
| 240 | }, | 181 | }, |
| 241 | created() { | 182 | created() { |
| 242 | - if(this.$store.state.tagsView.cachedViews.length == 0){ | 183 | + if (this.$store.state.tagsView.cachedViews.length == 0) { |
| 243 | this.selectUser(); | 184 | this.selectUser(); |
| 244 | } | 185 | } |
| 245 | }, | 186 | }, |
| 246 | - activated(){ | 187 | + activated() { |
| 247 | this.selectUser(); | 188 | this.selectUser(); |
| 248 | }, | 189 | }, |
| 249 | - deactivated(){ | 190 | + deactivated() { |
| 250 | this.data = [] | 191 | this.data = [] |
| 251 | }, | 192 | }, |
| 252 | methods: { | 193 | methods: { |
| 253 | //用户列表 | 194 | //用户列表 |
| 254 | selectUser(val) { | 195 | selectUser(val) { |
| 255 | - if(val == 0){ | 196 | + if (val == 0) { |
| 256 | this.formData.page = 1 | 197 | this.formData.page = 1 |
| 257 | } | 198 | } |
| 258 | this.loading = true; | 199 | this.loading = true; |
| ... | @@ -285,7 +226,7 @@ export default { | ... | @@ -285,7 +226,7 @@ export default { |
| 285 | if (res.code === 200) { | 226 | if (res.code === 200) { |
| 286 | this.userData = res.data; | 227 | this.userData = res.data; |
| 287 | this.userData.portName | 228 | this.userData.portName |
| 288 | - ?this.userData.portName=this.userData.portName.split(",") | 229 | + ? this.userData.portName = this.userData.portName.split(",") |
| 289 | : ''; | 230 | : ''; |
| 290 | } else { | 231 | } else { |
| 291 | this.$message({ | 232 | this.$message({ |
| ... | @@ -391,7 +332,7 @@ export default { | ... | @@ -391,7 +332,7 @@ export default { |
| 391 | this.selectUser(); | 332 | this.selectUser(); |
| 392 | }, | 333 | }, |
| 393 | 334 | ||
| 394 | - sizeChange(val){ | 335 | + sizeChange(val) { |
| 395 | this.formData.size = val; | 336 | this.formData.size = val; |
| 396 | this.selectUser() | 337 | this.selectUser() |
| 397 | } | 338 | } | ... | ... |
| ... | @@ -17,7 +17,7 @@ module.exports = { | ... | @@ -17,7 +17,7 @@ module.exports = { |
| 17 | // 部署生产环境和开发环境下的URL。 | 17 | // 部署生产环境和开发环境下的URL。 |
| 18 | // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 | 18 | // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 |
| 19 | // 例如 https://www.FedEx.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.FedEx.vip/admin/,则设置 baseUrl 为 /admin/。 | 19 | // 例如 https://www.FedEx.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.FedEx.vip/admin/,则设置 baseUrl 为 /admin/。 |
| 20 | - publicPath: process.env.NODE_ENV === "production" ? "/imacuat/" : "/", | 20 | + publicPath: process.env.NODE_ENV === "production" ? defaultSettings.routerBase : "/", |
| 21 | // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) | 21 | // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) |
| 22 | outputDir: 'dist', | 22 | outputDir: 'dist', |
| 23 | // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) | 23 | // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) |
| ... | @@ -34,10 +34,7 @@ module.exports = { | ... | @@ -34,10 +34,7 @@ module.exports = { |
| 34 | proxy: { | 34 | proxy: { |
| 35 | // detail: https://cli.vuejs.org/config/#devserver-proxy | 35 | // detail: https://cli.vuejs.org/config/#devserver-proxy |
| 36 | [process.env.VUE_APP_BASE_API]: { | 36 | [process.env.VUE_APP_BASE_API]: { |
| 37 | - target: `https://imacuat.zmd.apac.fedex.com/iMAC`, | 37 | + target: defaultSettings.baseURL, |
| 38 | - // target: `http://47.103.140.98:7001/iMAC`, | ||
| 39 | - // target: `http://192.168.1.134:18080`, | ||
| 40 | - // target: `http://47.103.140.98:7001/IMAC2`, //生产 | ||
| 41 | changeOrigin: true, | 38 | changeOrigin: true, |
| 42 | pathRewrite: { | 39 | pathRewrite: { |
| 43 | ['^' + process.env.VUE_APP_BASE_API]: '' | 40 | ['^' + process.env.VUE_APP_BASE_API]: '' | ... | ... |
-
Please register or login to post a comment