Showing
13 changed files
with
106 additions
and
589 deletions
src/assets/languages/tableHeaders.js
0 → 100644
This diff is collapsed. Click to expand it.
| ... | @@ -8,6 +8,10 @@ | ... | @@ -8,6 +8,10 @@ |
| 8 | width: 100% !important; | 8 | width: 100% !important; |
| 9 | } | 9 | } |
| 10 | 10 | ||
| 11 | + .wid95 { | ||
| 12 | + width: 95% !important; | ||
| 13 | + } | ||
| 14 | + | ||
| 11 | .wid90 { | 15 | .wid90 { |
| 12 | width: 90% !important; | 16 | width: 90% !important; |
| 13 | } | 17 | } |
| ... | @@ -80,9 +84,9 @@ | ... | @@ -80,9 +84,9 @@ |
| 80 | margin-left: 20px; | 84 | margin-left: 20px; |
| 81 | } | 85 | } |
| 82 | 86 | ||
| 83 | -// .el-dialog:not(.is-fullscreen) { | 87 | + // .el-dialog:not(.is-fullscreen) { |
| 84 | -// margin-top: 6vh !important; | 88 | + // margin-top: 6vh !important; |
| 85 | -// } | 89 | + // } |
| 86 | 90 | ||
| 87 | .el-table { | 91 | .el-table { |
| 88 | 92 | ||
| ... | @@ -108,13 +112,13 @@ | ... | @@ -108,13 +112,13 @@ |
| 108 | .form-header { | 112 | .form-header { |
| 109 | font-size: 15px; | 113 | font-size: 15px; |
| 110 | color: #6379bb; | 114 | color: #6379bb; |
| 111 | - border-bottom: 1px solid #ddd; | 115 | + // border-bottom: 1px solid #ddd; |
| 112 | margin: 8px 10px 25px 10px; | 116 | margin: 8px 10px 25px 10px; |
| 113 | padding-top: 15px; | 117 | padding-top: 15px; |
| 114 | padding-bottom: 5px; | 118 | padding-bottom: 5px; |
| 115 | 119 | ||
| 116 | .formItem { | 120 | .formItem { |
| 117 | - width: 90%; | 121 | + width: 95%; |
| 118 | // max-width: 300px; | 122 | // max-width: 300px; |
| 119 | } | 123 | } |
| 120 | } | 124 | } | ... | ... |
| ... | @@ -10,7 +10,7 @@ | ... | @@ -10,7 +10,7 @@ |
| 10 | <el-table-column v-if="selection" type="selection" width="50" align="center" :fixed="true"></el-table-column> | 10 | <el-table-column v-if="selection" type="selection" width="50" align="center" :fixed="true"></el-table-column> |
| 11 | <!-- 序号 --> | 11 | <!-- 序号 --> |
| 12 | <el-table-column v-if="order" type="index" width="50" align="center" :index="indexAdd"></el-table-column> | 12 | <el-table-column v-if="order" type="index" width="50" align="center" :index="indexAdd"></el-table-column> |
| 13 | - <template v-for="(item, index) in headerData"> | 13 | + <template v-for="(item, index) in headerData" v-if="item.status == 1"> |
| 14 | <!-- 自定义插槽 --> | 14 | <!-- 自定义插槽 --> |
| 15 | <el-table-column v-if="item.slot" :prop="item.value" :label="item.name" :width="item.width" :align="item.align" | 15 | <el-table-column v-if="item.slot" :prop="item.value" :label="item.name" :width="item.width" :align="item.align" |
| 16 | :fixed="item.fixed ? item.fixed : false" :show-overflow-tooltip="showOverflowTooltip" | 16 | :fixed="item.fixed ? item.fixed : false" :show-overflow-tooltip="showOverflowTooltip" |
| ... | @@ -27,7 +27,7 @@ | ... | @@ -27,7 +27,7 @@ |
| 27 | :sortable="item.sorTable ? true : false" :column-key="index.toString()" | 27 | :sortable="item.sorTable ? true : false" :column-key="index.toString()" |
| 28 | :show-overflow-tooltip="showOverflowTooltip" header-align="center" | 28 | :show-overflow-tooltip="showOverflowTooltip" header-align="center" |
| 29 | :sort-orders="['descending', 'ascending', null]" :slotHeader="slotHeader" :render-header="renderHeader" | 29 | :sort-orders="['descending', 'ascending', null]" :slotHeader="slotHeader" :render-header="renderHeader" |
| 30 | - :formatter="formatter" :key="index"> | 30 | + :formatter="formatter" :key="item.index"> |
| 31 | <template slot-scope="scope"> | 31 | <template slot-scope="scope"> |
| 32 | <slot :name="item.value" :row="scope.row"></slot> | 32 | <slot :name="item.value" :row="scope.row"></slot> |
| 33 | </template> | 33 | </template> |
| ... | @@ -37,7 +37,7 @@ | ... | @@ -37,7 +37,7 @@ |
| 37 | :align="item.align" :fixed="item.fixed ? item.fixed : false" :sortable="item.sorTable ? true : false" | 37 | :align="item.align" :fixed="item.fixed ? item.fixed : false" :sortable="item.sorTable ? true : false" |
| 38 | :column-key="index.toString()" :show-overflow-tooltip="showOverflowTooltip" header-align="center" | 38 | :column-key="index.toString()" :show-overflow-tooltip="showOverflowTooltip" header-align="center" |
| 39 | :sort-orders="['descending', 'ascending', null]" :slotHeader="slotHeader" :render-header="renderHeader" | 39 | :sort-orders="['descending', 'ascending', null]" :slotHeader="slotHeader" :render-header="renderHeader" |
| 40 | - :formatter="formatter" :key="index"> | 40 | + :formatter="formatter" :key="item.id"> |
| 41 | </el-table-column> | 41 | </el-table-column> |
| 42 | </template> | 42 | </template> |
| 43 | <slot name="optionColumn"></slot> | 43 | <slot name="optionColumn"></slot> |
| ... | @@ -312,7 +312,9 @@ export default { | ... | @@ -312,7 +312,9 @@ export default { |
| 312 | } | 312 | } |
| 313 | } | 313 | } |
| 314 | } | 314 | } |
| 315 | + if (row.index) { | ||
| 315 | selection = this.selectTable.sort(this.compare("index", "ascending")); | 316 | selection = this.selectTable.sort(this.compare("index", "ascending")); |
| 317 | + } | ||
| 316 | this.$emit("tableSelect", { selection, row }); | 318 | this.$emit("tableSelect", { selection, row }); |
| 317 | }, | 319 | }, |
| 318 | //表格全选 | 320 | //表格全选 |
| ... | @@ -442,13 +444,18 @@ export default { | ... | @@ -442,13 +444,18 @@ export default { |
| 442 | } | 444 | } |
| 443 | } | 445 | } |
| 444 | 446 | ||
| 447 | + .cell { | ||
| 448 | + min-width: 24px; | ||
| 449 | + | ||
| 445 | .thead-cell { | 450 | .thead-cell { |
| 451 | + width: 100%; | ||
| 446 | padding: 0; | 452 | padding: 0; |
| 447 | display: inline-flex; | 453 | display: inline-flex; |
| 448 | flex-direction: column; | 454 | flex-direction: column; |
| 449 | align-items: left; | 455 | align-items: left; |
| 450 | overflow: initial; | 456 | overflow: initial; |
| 451 | 457 | ||
| 458 | + | ||
| 452 | &:before { | 459 | &:before { |
| 453 | content: ""; | 460 | content: ""; |
| 454 | position: absolute; | 461 | position: absolute; |
| ... | @@ -457,6 +464,19 @@ export default { | ... | @@ -457,6 +464,19 @@ export default { |
| 457 | bottom: 0; | 464 | bottom: 0; |
| 458 | right: 0; | 465 | right: 0; |
| 459 | } | 466 | } |
| 467 | + | ||
| 468 | + div { | ||
| 469 | + overflow: hidden; | ||
| 470 | + text-overflow: ellipsis; | ||
| 471 | + white-space: nowrap; | ||
| 472 | + } | ||
| 473 | + } | ||
| 474 | + | ||
| 475 | + .caret-wrapper { | ||
| 476 | + position: absolute; | ||
| 477 | + top: -20%; | ||
| 478 | + right: 3%; | ||
| 479 | + } | ||
| 460 | } | 480 | } |
| 461 | 481 | ||
| 462 | &.w-table_moving { | 482 | &.w-table_moving { | ... | ... |
| ... | @@ -20,6 +20,7 @@ import Pagination from "@/components/Pagination"; | ... | @@ -20,6 +20,7 @@ import Pagination from "@/components/Pagination"; |
| 20 | // 自定义表格工具扩展 | 20 | // 自定义表格工具扩展 |
| 21 | import RightToolbar from "@/components/RightToolbar" | 21 | import RightToolbar from "@/components/RightToolbar" |
| 22 | import Table from "@/components/Table" | 22 | import Table from "@/components/Table" |
| 23 | +import tableHeaders from '@/assets/languages/tableHeaders' | ||
| 23 | 24 | ||
| 24 | // 全局方法挂载 | 25 | // 全局方法挂载 |
| 25 | Vue.prototype.parseTime = parseTime | 26 | Vue.prototype.parseTime = parseTime |
| ... | @@ -31,6 +32,7 @@ Vue.prototype.download = download | ... | @@ -31,6 +32,7 @@ Vue.prototype.download = download |
| 31 | Vue.prototype.handleTree = handleTree | 32 | Vue.prototype.handleTree = handleTree |
| 32 | Vue.prototype.upCase = upCase | 33 | Vue.prototype.upCase = upCase |
| 33 | Vue.prototype.nowDate = nowDate | 34 | Vue.prototype.nowDate = nowDate |
| 35 | +Vue.prototype.tableHeaders = tableHeaders | ||
| 34 | 36 | ||
| 35 | Vue.prototype.msgSuccess = function (msg) { | 37 | Vue.prototype.msgSuccess = function (msg) { |
| 36 | this.$message({ showClose: true, message: msg, type: "success" }); | 38 | this.$message({ showClose: true, message: msg, type: "success" }); | ... | ... |
| ... | @@ -178,7 +178,6 @@ import Dialog from "./info.vue"; | ... | @@ -178,7 +178,6 @@ import Dialog from "./info.vue"; |
| 178 | import { findConditionData, findCargoAllocationData } from "@/api/cargoSelect"; | 178 | import { findConditionData, findCargoAllocationData } from "@/api/cargoSelect"; |
| 179 | import { allDictData } from "@/api/destinationFlight"; | 179 | import { allDictData } from "@/api/destinationFlight"; |
| 180 | import { downLoadXlsx } from "@/utils/zipdownload"; | 180 | import { downLoadXlsx } from "@/utils/zipdownload"; |
| 181 | -import { upCase } from "@/utils/FedEx"; | ||
| 182 | 181 | ||
| 183 | export default { | 182 | export default { |
| 184 | name: "CargoAllocation", | 183 | name: "CargoAllocation", |
| ... | @@ -209,294 +208,7 @@ export default { | ... | @@ -209,294 +208,7 @@ export default { |
| 209 | customsReceiptStatusId: null, | 208 | customsReceiptStatusId: null, |
| 210 | accsPool: "OSPR" | 209 | accsPool: "OSPR" |
| 211 | }, //查询数据 | 210 | }, //查询数据 |
| 212 | - tableHeader: [ | 211 | + tableHeader: this.tableHeaders['cargoAllocation'], //表头数据 |
| 213 | - { | ||
| 214 | - name: "口岸代码", | ||
| 215 | - value: "portName", | ||
| 216 | - width: "100", | ||
| 217 | - align: "center", | ||
| 218 | - sorTable: true, | ||
| 219 | - }, | ||
| 220 | - { | ||
| 221 | - name: "取件日期", | ||
| 222 | - value: "pickUpDate", | ||
| 223 | - width: "120", | ||
| 224 | - align: "center", | ||
| 225 | - sorTable: true, | ||
| 226 | - }, | ||
| 227 | - { | ||
| 228 | - name: "取件扫描号", | ||
| 229 | - value: "pickUpScanNo", | ||
| 230 | - width: "120", | ||
| 231 | - align: "center", | ||
| 232 | - sorTable: true, | ||
| 233 | - }, | ||
| 234 | - { | ||
| 235 | - name: "站点", | ||
| 236 | - value: "siteName", | ||
| 237 | - width: "80", | ||
| 238 | - align: "center", | ||
| 239 | - sorTable: true, | ||
| 240 | - }, | ||
| 241 | - { | ||
| 242 | - name: "运单号", | ||
| 243 | - value: "waybillNo", | ||
| 244 | - width: "120", | ||
| 245 | - align: "center", | ||
| 246 | - sorTable: true, | ||
| 247 | - }, | ||
| 248 | - { | ||
| 249 | - name: "总单号", | ||
| 250 | - value: "totalWaybillNo", | ||
| 251 | - width: "120", | ||
| 252 | - align: "center", | ||
| 253 | - sorTable: true, | ||
| 254 | - }, | ||
| 255 | - { | ||
| 256 | - name: "服务类型", | ||
| 257 | - value: "serviceTypeName", | ||
| 258 | - width: "100", | ||
| 259 | - align: "center", | ||
| 260 | - sorTable: true, | ||
| 261 | - }, | ||
| 262 | - { | ||
| 263 | - name: "服务代码", | ||
| 264 | - value: "serviceCode", | ||
| 265 | - width: "100", | ||
| 266 | - align: "center", | ||
| 267 | - }, | ||
| 268 | - { | ||
| 269 | - name: "URSA", | ||
| 270 | - value: "ursa", | ||
| 271 | - width: "100", | ||
| 272 | - align: "center", | ||
| 273 | - sorTable: true, | ||
| 274 | - }, | ||
| 275 | - { | ||
| 276 | - name: "申报类型", | ||
| 277 | - value: "typeName", | ||
| 278 | - width: "100", | ||
| 279 | - align: "center", | ||
| 280 | - sorTable: true, | ||
| 281 | - }, | ||
| 282 | - { | ||
| 283 | - name: "HandlingCode", | ||
| 284 | - value: "handingCode", | ||
| 285 | - width: "150", | ||
| 286 | - align: "center", | ||
| 287 | - sorTable: true, | ||
| 288 | - }, | ||
| 289 | - { | ||
| 290 | - name: "subcategory", | ||
| 291 | - value: "subCategory", | ||
| 292 | - width: "140", | ||
| 293 | - align: "center", | ||
| 294 | - sorTable: true, | ||
| 295 | - }, | ||
| 296 | - { | ||
| 297 | - name: "件数", | ||
| 298 | - value: "qty", | ||
| 299 | - width: "80", | ||
| 300 | - align: "center", | ||
| 301 | - sorTable: true, | ||
| 302 | - }, | ||
| 303 | - { | ||
| 304 | - name: "实际重量", | ||
| 305 | - value: "actualWeight", | ||
| 306 | - width: "100", | ||
| 307 | - align: "center", | ||
| 308 | - sorTable: true, | ||
| 309 | - }, | ||
| 310 | - { | ||
| 311 | - name: "收件人国家代码", | ||
| 312 | - value: "consigneeCountry", | ||
| 313 | - width: "150", | ||
| 314 | - align: "center", | ||
| 315 | - sorTable: true, | ||
| 316 | - }, | ||
| 317 | - { | ||
| 318 | - name: "品名描述", | ||
| 319 | - value: "nameDescription", | ||
| 320 | - width: "100", | ||
| 321 | - align: "center", | ||
| 322 | - }, | ||
| 323 | - { | ||
| 324 | - name: "海关回执状态", | ||
| 325 | - value: "customsReceiptStatusName", | ||
| 326 | - width: "140", | ||
| 327 | - align: "center", | ||
| 328 | - sorTable: true, | ||
| 329 | - }, | ||
| 330 | - { | ||
| 331 | - name: "预审状态", | ||
| 332 | - value: "preQualificationStatus", | ||
| 333 | - width: "100", | ||
| 334 | - align: "center", | ||
| 335 | - sorTable: true, | ||
| 336 | - }, | ||
| 337 | - { | ||
| 338 | - name: "航班预审意见", | ||
| 339 | - value: "caPretrialOpinion", | ||
| 340 | - width: "120", | ||
| 341 | - align: "center", | ||
| 342 | - sorTable: false, | ||
| 343 | - }, | ||
| 344 | - { | ||
| 345 | - name: "货物状态", | ||
| 346 | - value: "statusName", | ||
| 347 | - width: "100", | ||
| 348 | - align: "center", | ||
| 349 | - sorTable: true, | ||
| 350 | - }, | ||
| 351 | - { | ||
| 352 | - name: "终配航班号", | ||
| 353 | - value: "finalFlightNo", | ||
| 354 | - width: "120", | ||
| 355 | - align: "center", | ||
| 356 | - sorTable: true, | ||
| 357 | - }, | ||
| 358 | - { | ||
| 359 | - name: "终配航班日期", | ||
| 360 | - value: "finalFlightTime", | ||
| 361 | - width: "140", | ||
| 362 | - align: "center", | ||
| 363 | - sorTable: true, | ||
| 364 | - }, | ||
| 365 | - { | ||
| 366 | - name: "二配航班号", | ||
| 367 | - value: "twoMatchFlightNo", | ||
| 368 | - width: "120", | ||
| 369 | - align: "center", | ||
| 370 | - sorTable: true, | ||
| 371 | - }, | ||
| 372 | - { | ||
| 373 | - name: "二配航班日期", | ||
| 374 | - value: "twoMatchFlightTime", | ||
| 375 | - width: "150", | ||
| 376 | - align: "center", | ||
| 377 | - sorTable: true, | ||
| 378 | - }, | ||
| 379 | - { | ||
| 380 | - name: "预配航班号", | ||
| 381 | - value: "preplanFlightNo", | ||
| 382 | - width: "120", | ||
| 383 | - align: "center", | ||
| 384 | - sorTable: true, | ||
| 385 | - }, | ||
| 386 | - { | ||
| 387 | - name: "预配航班日期", | ||
| 388 | - value: "preplanFlightTime", | ||
| 389 | - width: "150", | ||
| 390 | - align: "center", | ||
| 391 | - sorTable: true, | ||
| 392 | - }, | ||
| 393 | - { | ||
| 394 | - name: "ACCS原航班号", | ||
| 395 | - value: "fltNoAccs", | ||
| 396 | - width: "150", | ||
| 397 | - align: "center", | ||
| 398 | - sorTable: true, | ||
| 399 | - }, | ||
| 400 | - { | ||
| 401 | - name: "ACCS原航班日期", | ||
| 402 | - value: "fltDateAccs", | ||
| 403 | - width: "150", | ||
| 404 | - align: "center", | ||
| 405 | - sorTable: true, | ||
| 406 | - }, | ||
| 407 | - { | ||
| 408 | - name: "ACCS原航线", | ||
| 409 | - value: "accsFlightRoute", | ||
| 410 | - width: "140", | ||
| 411 | - align: "center", | ||
| 412 | - sorTable: true, | ||
| 413 | - }, | ||
| 414 | - { | ||
| 415 | - name: "是否RDE手工录入", | ||
| 416 | - value: "manualRde", | ||
| 417 | - width: "170", | ||
| 418 | - align: "center", | ||
| 419 | - sorTable: true, | ||
| 420 | - }, | ||
| 421 | - { | ||
| 422 | - name: "是否自动", | ||
| 423 | - value: "cargoRulesStatus", | ||
| 424 | - width: "100", | ||
| 425 | - align: "center", | ||
| 426 | - sorTable: true, | ||
| 427 | - }, | ||
| 428 | - { | ||
| 429 | - name: "发件人账号", | ||
| 430 | - value: "shipperAccount", | ||
| 431 | - width: "120", | ||
| 432 | - align: "center", | ||
| 433 | - }, | ||
| 434 | - { | ||
| 435 | - name: "发件公司中文名称", | ||
| 436 | - value: "shipperCompany", | ||
| 437 | - width: "150", | ||
| 438 | - align: "center", | ||
| 439 | - }, | ||
| 440 | - { | ||
| 441 | - name: "始发地城市名称", | ||
| 442 | - value: "originCity", | ||
| 443 | - width: "130", | ||
| 444 | - align: "center", | ||
| 445 | - }, | ||
| 446 | - { | ||
| 447 | - name: "收件地", | ||
| 448 | - value: "destinationSiteName", | ||
| 449 | - width: "90", | ||
| 450 | - align: "center", | ||
| 451 | - }, | ||
| 452 | - { | ||
| 453 | - name: "尺寸", | ||
| 454 | - value: "sizeStr", | ||
| 455 | - width: "80", | ||
| 456 | - align: "center", | ||
| 457 | - sorTable: true, | ||
| 458 | - }, | ||
| 459 | - { | ||
| 460 | - name: "大货预审意见(是否可以配置航班)", | ||
| 461 | - value: "bigPretrialOpinion", | ||
| 462 | - width: "250", | ||
| 463 | - align: "center", | ||
| 464 | - }, | ||
| 465 | - { | ||
| 466 | - name: "大货预审时间", | ||
| 467 | - value: "bigPretrialTime", | ||
| 468 | - width: "120", | ||
| 469 | - align: "center", | ||
| 470 | - }, | ||
| 471 | - { | ||
| 472 | - name: "海关回执时间", | ||
| 473 | - value: "customsReceiptTime", | ||
| 474 | - width: "150", | ||
| 475 | - align: "center", | ||
| 476 | - sorTable: true, | ||
| 477 | - }, | ||
| 478 | - { | ||
| 479 | - name: "航班预审时间", | ||
| 480 | - value: "caPretrialTime", | ||
| 481 | - width: "150", | ||
| 482 | - align: "center", | ||
| 483 | - sorTable: true, | ||
| 484 | - }, | ||
| 485 | - { | ||
| 486 | - name: "创建人", | ||
| 487 | - value: "createUserName", | ||
| 488 | - width: "90", | ||
| 489 | - align: "center", | ||
| 490 | - sorTable: true, | ||
| 491 | - }, | ||
| 492 | - { | ||
| 493 | - name: "创建时间", | ||
| 494 | - value: "createTime", | ||
| 495 | - width: "100", | ||
| 496 | - align: "center", | ||
| 497 | - sorTable: true, | ||
| 498 | - }, | ||
| 499 | - ], //表头数据 | ||
| 500 | tableData: [], //表格数据 | 212 | tableData: [], //表格数据 |
| 501 | tableSelection: [], //选中数据 | 213 | tableSelection: [], //选中数据 |
| 502 | selectData: { | 214 | selectData: { |
| ... | @@ -534,6 +246,7 @@ export default { | ... | @@ -534,6 +246,7 @@ export default { |
| 534 | } | 246 | } |
| 535 | }, | 247 | }, |
| 536 | activated() { | 248 | activated() { |
| 249 | + this.seleData(); | ||
| 537 | this.select(); | 250 | this.select(); |
| 538 | }, | 251 | }, |
| 539 | deactivated() { | 252 | deactivated() { |
| ... | @@ -577,7 +290,7 @@ export default { | ... | @@ -577,7 +290,7 @@ export default { |
| 577 | .catch(() => { }); | 290 | .catch(() => { }); |
| 578 | }, | 291 | }, |
| 579 | //查询 | 292 | //查询 |
| 580 | - async select(val) { | 293 | + select(val) { |
| 581 | this.loading = true; | 294 | this.loading = true; |
| 582 | this.dataInfo(); | 295 | this.dataInfo(); |
| 583 | if (val === 0) { | 296 | if (val === 0) { |
| ... | @@ -591,9 +304,6 @@ export default { | ... | @@ -591,9 +304,6 @@ export default { |
| 591 | this.tableData = res.data.list; | 304 | this.tableData = res.data.list; |
| 592 | this.totalCount = res.data.total; | 305 | this.totalCount = res.data.total; |
| 593 | if (res.data.list.length > 0) { | 306 | if (res.data.list.length > 0) { |
| 594 | - // this.tableData.forEach((item, index = 0) => { | ||
| 595 | - // item.index = index; | ||
| 596 | - // }); | ||
| 597 | } else { | 307 | } else { |
| 598 | this.msgWarning('未查询到数据') | 308 | this.msgWarning('未查询到数据') |
| 599 | } | 309 | } |
| ... | @@ -729,9 +439,6 @@ export default { | ... | @@ -729,9 +439,6 @@ export default { |
| 729 | } | 439 | } |
| 730 | this.tableSelection = [] | 440 | this.tableSelection = [] |
| 731 | this.cargoTotal() | 441 | this.cargoTotal() |
| 732 | - // this.tableData.forEach((item, index = 0) => { | ||
| 733 | - // item.index = index; | ||
| 734 | - // }); | ||
| 735 | }, | 442 | }, |
| 736 | sizeChange(val) { | 443 | sizeChange(val) { |
| 737 | this.size = val | 444 | this.size = val |
| ... | @@ -758,7 +465,7 @@ export default { | ... | @@ -758,7 +465,7 @@ export default { |
| 758 | return this.formData.fltNo; | 465 | return this.formData.fltNo; |
| 759 | }, | 466 | }, |
| 760 | set: function (val) { | 467 | set: function (val) { |
| 761 | - this.formData.fltNo = upCase(val); | 468 | + this.formData.fltNo = this.upCase(val); |
| 762 | }, | 469 | }, |
| 763 | }, | 470 | }, |
| 764 | ursa: { | 471 | ursa: { |
| ... | @@ -766,7 +473,7 @@ export default { | ... | @@ -766,7 +473,7 @@ export default { |
| 766 | return this.ursaList; | 473 | return this.ursaList; |
| 767 | }, | 474 | }, |
| 768 | set: function (val) { | 475 | set: function (val) { |
| 769 | - this.ursaList = upCase(val); | 476 | + this.ursaList = this.upCase(val); |
| 770 | }, | 477 | }, |
| 771 | }, | 478 | }, |
| 772 | siteName: { | 479 | siteName: { |
| ... | @@ -774,7 +481,7 @@ export default { | ... | @@ -774,7 +481,7 @@ export default { |
| 774 | return this.siteNameList; | 481 | return this.siteNameList; |
| 775 | }, | 482 | }, |
| 776 | set: function (val) { | 483 | set: function (val) { |
| 777 | - this.siteNameList = upCase(val); | 484 | + this.siteNameList = this.upCase(val); |
| 778 | }, | 485 | }, |
| 779 | }, | 486 | }, |
| 780 | portName: { | 487 | portName: { |
| ... | @@ -782,7 +489,7 @@ export default { | ... | @@ -782,7 +489,7 @@ export default { |
| 782 | return this.formData.portName; | 489 | return this.formData.portName; |
| 783 | }, | 490 | }, |
| 784 | set: function (val) { | 491 | set: function (val) { |
| 785 | - this.formData.portName = upCase(val); | 492 | + this.formData.portName = this.upCase(val); |
| 786 | }, | 493 | }, |
| 787 | }, | 494 | }, |
| 788 | }, | 495 | }, | ... | ... |
| ... | @@ -44,7 +44,7 @@ | ... | @@ -44,7 +44,7 @@ |
| 44 | </el-button> | 44 | </el-button> |
| 45 | <el-button type="text" size="mini" icon="el-icon-edit" v-hasPermi="['allocation:alloc:update']" | 45 | <el-button type="text" size="mini" icon="el-icon-edit" v-hasPermi="['allocation:alloc:update']" |
| 46 | @click="handleClick(scope.row.id, 'update')">修改</el-button> | 46 | @click="handleClick(scope.row.id, 'update')">修改</el-button> |
| 47 | - <el-button type="text" size="mini" icon="el-icon-delete" v-hasPermi="['allocation:alloc:delete']" | 47 | + <el-button type="text" size="mini" icon="el-icon-delete" style="color:#ff4949" v-hasPermi="['allocation:alloc:delete']" |
| 48 | @click="del(scope.row.id, scope.row.status)">删除</el-button> | 48 | @click="del(scope.row.id, scope.row.status)">删除</el-button> |
| 49 | <el-button type="text" size="mini" icon="el-icon-video-pause" v-hasPermi="['allocation:alloc:openClose']" | 49 | <el-button type="text" size="mini" icon="el-icon-video-pause" v-hasPermi="['allocation:alloc:openClose']" |
| 50 | @click="changeStatus(scope.row.id, 3)" v-if="scope.row.status == '1'">停用</el-button> | 50 | @click="changeStatus(scope.row.id, 3)" v-if="scope.row.status == '1'">停用</el-button> | ... | ... |
| ... | @@ -48,7 +48,7 @@ | ... | @@ -48,7 +48,7 @@ |
| 48 | <el-button size="mini" type="text" icon="el-icon-edit" v-hasPermi="['allocation:rand:update']" | 48 | <el-button size="mini" type="text" icon="el-icon-edit" v-hasPermi="['allocation:rand:update']" |
| 49 | @click="handleUpdate(scope.row)">修改</el-button> | 49 | @click="handleUpdate(scope.row)">修改</el-button> |
| 50 | <el-button size="mini" type="text" icon="el-icon-delete" v-hasPermi="['allocation:rand:delete']" | 50 | <el-button size="mini" type="text" icon="el-icon-delete" v-hasPermi="['allocation:rand:delete']" |
| 51 | - @click="handleDeleteorPlayorpause(scope.row, 0, '删除')"> | 51 | + @click="handleDeleteorPlayorpause(scope.row, 0, '删除')" style="color:#ff4949"> |
| 52 | 删除</el-button> | 52 | 删除</el-button> |
| 53 | <el-button size="mini" type="text" icon="el-icon-video-play" v-if="scope.row.status == '3'" | 53 | <el-button size="mini" type="text" icon="el-icon-video-play" v-if="scope.row.status == '3'" |
| 54 | v-hasPermi="['allocation:rand:openClose']" @click="handleDeleteorPlayorpause(scope.row, 1, '启用')">启用 | 54 | v-hasPermi="['allocation:rand:openClose']" @click="handleDeleteorPlayorpause(scope.row, 1, '启用')">启用 | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | <el-form class="form-header" :model="queryParams" ref="queryForm" label-position="right" label-width="auto" | 3 | <el-form class="form-header" :model="queryParams" ref="queryForm" label-position="right" label-width="auto" |
| 4 | - size="medium"> | 4 | + size="small"> |
| 5 | <el-row> | 5 | <el-row> |
| 6 | <el-col :span="6"> | 6 | <el-col :span="6"> |
| 7 | <el-form-item label="航班日期从" prop="fltDateStart"> | 7 | <el-form-item label="航班日期从" prop="fltDateStart"> |
| ... | @@ -64,10 +64,10 @@ | ... | @@ -64,10 +64,10 @@ |
| 64 | </el-button> | 64 | </el-button> |
| 65 | </el-form> | 65 | </el-form> |
| 66 | <Tables ref="flightInfoTable" ductName="FlightInformation" :data="findAllFltDatList" :headerData="tableHeader" | 66 | <Tables ref="flightInfoTable" ductName="FlightInformation" :data="findAllFltDatList" :headerData="tableHeader" |
| 67 | - :infoData="tableHeader" :order="true" :selection="true" :totalCount="total" :loading="loading" | 67 | + :order="true" :selection="true" :totalCount="total" :loading="loading" :limitSize="queryParams.limitSize" |
| 68 | - :limitSize="queryParams.limitSize" :page="queryParams.pageNum" :shiftKey="shiftKey" :height="tableHeight" | 68 | + :page="queryParams.pageNum" :shiftKey="shiftKey" :height="tableHeight" :pageSizes="[20, 30, 40, 50, 100]" |
| 69 | - :pageSizes="[20, 30, 40, 50, 100]" @tableSelect="tableSelect" @tableSelectAll="tableSelectAll" | 69 | + @tableSelect="tableSelect" @tableSelectAll="tableSelectAll" @currentChange="currentChange" |
| 70 | - @currentChange="currentChange" @sortChange="sortChange" @sizeChange="sizeChange"> | 70 | + @sortChange="sortChange" @sizeChange="sizeChange"> |
| 71 | <template slot="optionColumn"> | 71 | <template slot="optionColumn"> |
| 72 | <el-table-column v-if="findAllFltDatList.length > 0" label="操作" align="center" | 72 | <el-table-column v-if="findAllFltDatList.length > 0" label="操作" align="center" |
| 73 | class-name="small-padding fixed-width" fixed="right"> | 73 | class-name="small-padding fixed-width" fixed="right"> |
| ... | @@ -79,8 +79,9 @@ | ... | @@ -79,8 +79,9 @@ |
| 79 | </template> | 79 | </template> |
| 80 | </Tables> | 80 | </Tables> |
| 81 | <!-- 添加或修改对话框 --> | 81 | <!-- 添加或修改对话框 --> |
| 82 | - <el-dialog :title="title" :visible.sync="open" width="60%" :close-on-click-modal="false" :append-to-body="true"> | 82 | + <el-dialog :title="title" :visible.sync="open" width="60%" :close-on-click-modal="false" :append-to-body="true" |
| 83 | - <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto"> | 83 | + :show-close="false"> |
| 84 | + <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto" size="small"> | ||
| 84 | <el-row> | 85 | <el-row> |
| 85 | <el-col :span="12"> | 86 | <el-col :span="12"> |
| 86 | <el-form-item label="航班号" prop="fltNo"> | 87 | <el-form-item label="航班号" prop="fltNo"> |
| ... | @@ -99,7 +100,7 @@ | ... | @@ -99,7 +100,7 @@ |
| 99 | <el-row> | 100 | <el-row> |
| 100 | <el-col :span="12"> | 101 | <el-col :span="12"> |
| 101 | <el-form-item label="Pre-MDE CutOff时间" prop="cutOffTime"> | 102 | <el-form-item label="Pre-MDE CutOff时间" prop="cutOffTime"> |
| 102 | - <el-select class="wid80" v-model="form.cutOffTime" clearable placeholder="选择时间(可查找)" type="string" | 103 | + <el-select class="wid80" v-model="form.cutOffTime" clearable placeholder="选择时间(输入查找选项)" type="string" |
| 103 | filterable> | 104 | filterable> |
| 104 | <el-option v-for="item in selectOption.cutOffTime" :key="item" :label="item" :value="item"> | 105 | <el-option v-for="item in selectOption.cutOffTime" :key="item" :label="item" :value="item"> |
| 105 | </el-option> | 106 | </el-option> |
| ... | @@ -108,7 +109,7 @@ | ... | @@ -108,7 +109,7 @@ |
| 108 | </el-col> | 109 | </el-col> |
| 109 | <el-col :span="12"> | 110 | <el-col :span="12"> |
| 110 | <el-form-item label="航班路线" prop="route"> | 111 | <el-form-item label="航班路线" prop="route"> |
| 111 | - <el-input class="wid80" v-model="form.route" placeholder="请输入航班路线" /> | 112 | + <el-input class="wid80" v-model="form.route" placeholder="请输入航班路线(XXX-XXX字母大写)" /> |
| 112 | </el-form-item> | 113 | </el-form-item> |
| 113 | </el-col> | 114 | </el-col> |
| 114 | </el-row> | 115 | </el-row> |
| ... | @@ -228,7 +229,7 @@ | ... | @@ -228,7 +229,7 @@ |
| 228 | </div> | 229 | </div> |
| 229 | </el-dialog> | 230 | </el-dialog> |
| 230 | <el-dialog title="未删除成功航班" width="40%" center :visible.sync="dialogTableVisible" :close-on-click-modal="false" | 231 | <el-dialog title="未删除成功航班" width="40%" center :visible.sync="dialogTableVisible" :close-on-click-modal="false" |
| 231 | - :append-to-body="true"> | 232 | + :append-to-body="true" :show-close="false"> |
| 232 | <el-table :data="gridData"> | 233 | <el-table :data="gridData"> |
| 233 | <el-table-column property="fltNo" label="航班号"></el-table-column> | 234 | <el-table-column property="fltNo" label="航班号"></el-table-column> |
| 234 | <el-table-column property="fltDate" label="航班日期"></el-table-column> | 235 | <el-table-column property="fltDate" label="航班日期"></el-table-column> |
| ... | @@ -298,168 +299,22 @@ export default { | ... | @@ -298,168 +299,22 @@ export default { |
| 298 | trigger: "blur", | 299 | trigger: "blur", |
| 299 | }, | 300 | }, |
| 300 | ], | 301 | ], |
| 301 | - }, | 302 | + route: [ |
| 302 | - //原航班规则数据 | ||
| 303 | - findAllFltDatList: [], | ||
| 304 | - //表头 | ||
| 305 | - tableHeader: [ | ||
| 306 | - { | ||
| 307 | - name: "航班日期", | ||
| 308 | - value: "fltDate", | ||
| 309 | - width: "100", | ||
| 310 | - align: "center", | ||
| 311 | - }, | ||
| 312 | - { | ||
| 313 | - name: "航班起飞时间", | ||
| 314 | - value: "takeOffTime", | ||
| 315 | - width: "120", | ||
| 316 | - align: "center", | ||
| 317 | - }, | ||
| 318 | - { | ||
| 319 | - name: "Pre-MDE CutOff时间", | ||
| 320 | - value: "cutOffTime", | ||
| 321 | - width: "150", | ||
| 322 | - align: "center", | ||
| 323 | - }, | ||
| 324 | - { | ||
| 325 | - name: "航班号", | ||
| 326 | - value: "fltNo", | ||
| 327 | - width: "100", | ||
| 328 | - align: "center", | ||
| 329 | - }, | ||
| 330 | - { | ||
| 331 | - name: "航班路线", | ||
| 332 | - value: "route", | ||
| 333 | - width: "140", | ||
| 334 | - align: "center", | ||
| 335 | - }, | ||
| 336 | - { | ||
| 337 | - name: "航班类型", | ||
| 338 | - value: "typeName", | ||
| 339 | - width: "100", | ||
| 340 | - align: "center", | ||
| 341 | - }, | ||
| 342 | - { | ||
| 343 | - name: "航班种类", | ||
| 344 | - value: "flightKindName", | ||
| 345 | - width: "100", | ||
| 346 | - align: "center", | ||
| 347 | - }, | ||
| 348 | - { | ||
| 349 | - name: "航班状态", | ||
| 350 | - value: "statusName", | ||
| 351 | - width: "100", | ||
| 352 | - align: "center", | ||
| 353 | - }, | ||
| 354 | - { | ||
| 355 | - name: "是否自动推送", | ||
| 356 | - value: "pushDateSwitch", | ||
| 357 | - width: "120", | ||
| 358 | - align: "center", | ||
| 359 | - }, | ||
| 360 | - { | ||
| 361 | - name: "总重量", | ||
| 362 | - value: "totalWeight", | ||
| 363 | - width: "90", | ||
| 364 | - align: "center", | ||
| 365 | - }, | ||
| 366 | - { | ||
| 367 | - name: "原始重量(KG)", | ||
| 368 | - value: "originalWeight", | ||
| 369 | - width: "120", | ||
| 370 | - align: "center", | ||
| 371 | - }, | ||
| 372 | - { | ||
| 373 | - name: "已配重量", | ||
| 374 | - value: "alloctedWeight", | ||
| 375 | - width: "90", | ||
| 376 | - align: "center", | ||
| 377 | - }, | ||
| 378 | - { | ||
| 379 | - name: "总体积(cm³)", | ||
| 380 | - value: "totalVolume", | ||
| 381 | - width: "100", | ||
| 382 | - align: "center", | ||
| 383 | - }, | ||
| 384 | - { | ||
| 385 | - name: "已配体积(cm³)", | ||
| 386 | - value: "alloctedVolume", | ||
| 387 | - width: "120", | ||
| 388 | - align: "center", | ||
| 389 | - }, | ||
| 390 | - { | ||
| 391 | - name: "是否需要预审", | ||
| 392 | - value: "needRequired", | ||
| 393 | - width: "130", | ||
| 394 | - align: "center", | ||
| 395 | - }, | ||
| 396 | - { | ||
| 397 | - name: "是否开启高低价", | ||
| 398 | - value: "highLowPriceFlg", | ||
| 399 | - width: "140", | ||
| 400 | - align: "center", | ||
| 401 | - }, | ||
| 402 | - { | ||
| 403 | - name: "是否限制一票一件", | ||
| 404 | - value: "ticketToPiece", | ||
| 405 | - width: "140", | ||
| 406 | - align: "center", | ||
| 407 | - }, | ||
| 408 | - { | ||
| 409 | - name: "额外增重百分比", | ||
| 410 | - value: "extraWeightPercent", | ||
| 411 | - width: "140", | ||
| 412 | - align: "center", | ||
| 413 | - }, | ||
| 414 | - { | ||
| 415 | - name: "高价百分比", | ||
| 416 | - value: "highPriceWeightPercent", | ||
| 417 | - width: "120", | ||
| 418 | - align: "center", | ||
| 419 | - }, | ||
| 420 | - { | ||
| 421 | - name: "低价百分比", | ||
| 422 | - value: "lowPriceWeightPercent", | ||
| 423 | - width: "120", | ||
| 424 | - align: "center", | ||
| 425 | - }, | ||
| 426 | { | 303 | { |
| 427 | - name: "航班优先级", | 304 | + required: true, |
| 428 | - value: "priorityName", | 305 | + message: "航班线路不能为空", |
| 429 | - width: "100", | 306 | + trigger: "blur", |
| 430 | - align: "center", | ||
| 431 | - }, | ||
| 432 | - { | ||
| 433 | - name: "配舱优先级", | ||
| 434 | - value: "priorityRuleName", | ||
| 435 | - width: "100", | ||
| 436 | - align: "center", | ||
| 437 | - }, | ||
| 438 | - { | ||
| 439 | - name: "创建人", | ||
| 440 | - value: "createUserName", | ||
| 441 | - width: "90", | ||
| 442 | - align: "center", | ||
| 443 | - }, | ||
| 444 | - { | ||
| 445 | - name: "创建时间", | ||
| 446 | - value: "createTime", | ||
| 447 | - width: "100", | ||
| 448 | - align: "center", | ||
| 449 | - }, | ||
| 450 | - { | ||
| 451 | - name: "最后修改人", | ||
| 452 | - value: "lastModifyUserName", | ||
| 453 | - width: "120", | ||
| 454 | - align: "center", | ||
| 455 | }, | 307 | }, |
| 456 | { | 308 | { |
| 457 | - name: "最后修改时间", | 309 | + pattern: /^([A-Z]{3,4})(\-[A-Z]{3,4})+$/, |
| 458 | - value: "lastModifyTime", | 310 | + message: "请输入正确得航班线路" |
| 459 | - width: "120", | 311 | + } |
| 460 | - align: "center", | 312 | + ] |
| 461 | }, | 313 | }, |
| 462 | - ], | 314 | + //原航班规则数据 |
| 315 | + findAllFltDatList: [], | ||
| 316 | + //表头 | ||
| 317 | + tableHeader: this.tableHeaders['FlightInformation'], | ||
| 463 | //删除失败数据 | 318 | //删除失败数据 |
| 464 | gridData: [], | 319 | gridData: [], |
| 465 | //form属性禁用状态 | 320 | //form属性禁用状态 |
| ... | @@ -566,12 +421,13 @@ export default { | ... | @@ -566,12 +421,13 @@ export default { |
| 566 | created() { | 421 | created() { |
| 567 | //查询条件数据源 | 422 | //查询条件数据源 |
| 568 | this.queryParams.fltDateStart = this.nowDate() | 423 | this.queryParams.fltDateStart = this.nowDate() |
| 569 | - this.findFltConditionData(); | ||
| 570 | if (this.$store.state.tagsView.cachedViews.length == 0) { | 424 | if (this.$store.state.tagsView.cachedViews.length == 0) { |
| 425 | + this.findFltConditionData(); | ||
| 571 | this.findAllFltData(); | 426 | this.findAllFltData(); |
| 572 | } | 427 | } |
| 573 | }, | 428 | }, |
| 574 | activated() { | 429 | activated() { |
| 430 | + this.findFltConditionData(); | ||
| 575 | this.findAllFltData(); | 431 | this.findAllFltData(); |
| 576 | }, | 432 | }, |
| 577 | deactivated() { | 433 | deactivated() { |
| ... | @@ -599,7 +455,7 @@ export default { | ... | @@ -599,7 +455,7 @@ export default { |
| 599 | this.form.fltNo != undefined && | 455 | this.form.fltNo != undefined && |
| 600 | this.form.fltNo != "" | 456 | this.form.fltNo != "" |
| 601 | ) { | 457 | ) { |
| 602 | - this.form.fltNo = this.upCase(this.form.fltNo); | 458 | + this.form.fltNo = this.form.fltNo.toUpperCase(); |
| 603 | findFltCommonConf(this.form).then((response) => { | 459 | findFltCommonConf(this.form).then((response) => { |
| 604 | if (response.code == 200) { | 460 | if (response.code == 200) { |
| 605 | //额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑 | 461 | //额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑 |
| ... | @@ -697,7 +553,7 @@ export default { | ... | @@ -697,7 +553,7 @@ export default { |
| 697 | this.queryParams.fltNo != undefined && | 553 | this.queryParams.fltNo != undefined && |
| 698 | this.queryParams.fltNo != "" | 554 | this.queryParams.fltNo != "" |
| 699 | ) { | 555 | ) { |
| 700 | - this.queryParams.fltNo = this.upCase(this.queryParams.fltNo); | 556 | + this.queryParams.fltNo = this.queryParams.fltNo.toUpperCase(); |
| 701 | } | 557 | } |
| 702 | findAllFltDataApi(this.queryParams).then((response) => { | 558 | findAllFltDataApi(this.queryParams).then((response) => { |
| 703 | this.loading = false; | 559 | this.loading = false; |
| ... | @@ -712,6 +568,7 @@ export default { | ... | @@ -712,6 +568,7 @@ export default { |
| 712 | /** 新增按钮操作 */ | 568 | /** 新增按钮操作 */ |
| 713 | handleAdd() { | 569 | handleAdd() { |
| 714 | this.reset(); | 570 | this.reset(); |
| 571 | + this.findFltConditionData(); | ||
| 715 | this.open = true; | 572 | this.open = true; |
| 716 | this.title = "添加航班信息"; | 573 | this.title = "添加航班信息"; |
| 717 | this.form.id = null; | 574 | this.form.id = null; |
| ... | @@ -827,6 +684,7 @@ export default { | ... | @@ -827,6 +684,7 @@ export default { |
| 827 | /** 修改按钮操作 */ | 684 | /** 修改按钮操作 */ |
| 828 | handleUpdate(row) { | 685 | handleUpdate(row) { |
| 829 | this.reset(); | 686 | this.reset(); |
| 687 | + this.findFltConditionData(); | ||
| 830 | this.open = true; | 688 | this.open = true; |
| 831 | this.title = "修改航班信息"; | 689 | this.title = "修改航班信息"; |
| 832 | //航班号 | 690 | //航班号 |
| ... | @@ -854,7 +712,6 @@ export default { | ... | @@ -854,7 +712,6 @@ export default { |
| 854 | this.ids.forEach(item => { | 712 | this.ids.forEach(item => { |
| 855 | fIds.push(item.id) | 713 | fIds.push(item.id) |
| 856 | }) | 714 | }) |
| 857 | - console.log(fIds) | ||
| 858 | this.$confirm("是否确认删除所选数据?", "警告", { | 715 | this.$confirm("是否确认删除所选数据?", "警告", { |
| 859 | confirmButtonText: "确定", | 716 | confirmButtonText: "确定", |
| 860 | cancelButtonText: "取消", | 717 | cancelButtonText: "取消", |
| ... | @@ -939,6 +796,7 @@ export default { | ... | @@ -939,6 +796,7 @@ export default { |
| 939 | cancel() { | 796 | cancel() { |
| 940 | this.open = false; | 797 | this.open = false; |
| 941 | this.findAllFltData(); | 798 | this.findAllFltData(); |
| 799 | + this.findFltConditionData(); | ||
| 942 | this.reset(); | 800 | this.reset(); |
| 943 | }, | 801 | }, |
| 944 | /** 重置按钮操作 */ | 802 | /** 重置按钮操作 */ |
| ... | @@ -1040,7 +898,20 @@ export default { | ... | @@ -1040,7 +898,20 @@ export default { |
| 1040 | this.queryParams.limitSize = val; | 898 | this.queryParams.limitSize = val; |
| 1041 | this.findAllFltData(); | 899 | this.findAllFltData(); |
| 1042 | }, | 900 | }, |
| 901 | + setClose() { | ||
| 902 | + this.tableHeader = this.tableHeaders['FlightInformation'] | ||
| 903 | + }, | ||
| 1043 | }, | 904 | }, |
| 905 | + computed: { | ||
| 906 | + route: { | ||
| 907 | + get: function () { | ||
| 908 | + return this.form.route; | ||
| 909 | + }, | ||
| 910 | + set: function (val) { | ||
| 911 | + this.form.route = this.upCase(val); | ||
| 912 | + }, | ||
| 913 | + } | ||
| 914 | + } | ||
| 1044 | }; | 915 | }; |
| 1045 | </script> | 916 | </script> |
| 1046 | 917 | ... | ... |
This diff is collapsed. Click to expand it.
| ... | @@ -30,9 +30,9 @@ | ... | @@ -30,9 +30,9 @@ |
| 30 | <el-button type="primary" icon="el-icon-plus" size="mini" @click="addRole" v-hasPermi="['system:role:add']">新增角色 | 30 | <el-button type="primary" icon="el-icon-plus" size="mini" @click="addRole" v-hasPermi="['system:role:add']">新增角色 |
| 31 | </el-button> | 31 | </el-button> |
| 32 | </div> | 32 | </div> |
| 33 | - <Tables ductName="role" :data="data" :headerData="tableHeader" :infoData="tableHeader" :totalCount="total" | 33 | + <Tables ref="role" ductName="role" :data="data" :headerData="tableHeader" :totalCount="total" |
| 34 | :limitSize="formData.size" :page="formData.page" :pageSizes="[20, 30, 40, 50]" :loading="tableLoading" | 34 | :limitSize="formData.size" :page="formData.page" :pageSizes="[20, 30, 40, 50]" :loading="tableLoading" |
| 35 | - height="600" @sizeChange="sizeChange" @currentChange="currentChange"> | 35 | + :height="tableHeight" @sizeChange="sizeChange" @currentChange="currentChange"> |
| 36 | <template slot="optionColumn"> | 36 | <template slot="optionColumn"> |
| 37 | <el-table-column header-align="center" align="center" label="操作"> | 37 | <el-table-column header-align="center" align="center" label="操作"> |
| 38 | <template slot-scope="scope"> | 38 | <template slot-scope="scope"> |
| ... | @@ -77,44 +77,7 @@ export default { | ... | @@ -77,44 +77,7 @@ export default { |
| 77 | name: null, | 77 | name: null, |
| 78 | }, //查询条件 | 78 | }, //查询条件 |
| 79 | data: [], //表格数据 | 79 | data: [], //表格数据 |
| 80 | - tableHeader: [ | 80 | + tableHeader: this.tableHeaders['role'], //表头数据 |
| 81 | - { | ||
| 82 | - name: "角色名称", | ||
| 83 | - value: "name", | ||
| 84 | - width: "150px", | ||
| 85 | - align: "center", | ||
| 86 | - }, | ||
| 87 | - { | ||
| 88 | - name: "角色状态", | ||
| 89 | - value: "valid", | ||
| 90 | - width: "150px", | ||
| 91 | - align: "center", | ||
| 92 | - }, | ||
| 93 | - { | ||
| 94 | - name: "创建人", | ||
| 95 | - value: "createUserName", | ||
| 96 | - width: "150px", | ||
| 97 | - align: "center", | ||
| 98 | - }, | ||
| 99 | - { | ||
| 100 | - name: "创建时间", | ||
| 101 | - value: "createTime", | ||
| 102 | - width: "150px", | ||
| 103 | - align: "center", | ||
| 104 | - }, | ||
| 105 | - { | ||
| 106 | - name: "修改时间", | ||
| 107 | - value: "updateTime", | ||
| 108 | - width: "150px", | ||
| 109 | - align: "center", | ||
| 110 | - }, | ||
| 111 | - { | ||
| 112 | - name: "备注", | ||
| 113 | - value: "remark", | ||
| 114 | - width: "400px", | ||
| 115 | - align: "center", | ||
| 116 | - }, | ||
| 117 | - ], //表头数据 | ||
| 118 | roleData: {}, //角色详情 | 81 | roleData: {}, //角色详情 |
| 119 | createTime: [], | 82 | createTime: [], |
| 120 | drawer: false, | 83 | drawer: false, |
| ... | @@ -122,6 +85,7 @@ export default { | ... | @@ -122,6 +85,7 @@ export default { |
| 122 | roleFormDisabled: false, | 85 | roleFormDisabled: false, |
| 123 | tableLoading: false, | 86 | tableLoading: false, |
| 124 | total: 0, | 87 | total: 0, |
| 88 | + tableHeight: null | ||
| 125 | }; | 89 | }; |
| 126 | }, | 90 | }, |
| 127 | created() { | 91 | created() { |
| ... | @@ -129,6 +93,9 @@ export default { | ... | @@ -129,6 +93,9 @@ export default { |
| 129 | this.selectRoleList(); | 93 | this.selectRoleList(); |
| 130 | } | 94 | } |
| 131 | }, | 95 | }, |
| 96 | + mounted() { | ||
| 97 | + this.tableHeight = window.innerHeight - this.$refs.selectionRoleForm.$el.offsetHeight - 250 | ||
| 98 | + }, | ||
| 132 | activated() { | 99 | activated() { |
| 133 | this.selectRoleList(); | 100 | this.selectRoleList(); |
| 134 | }, | 101 | }, | ... | ... |
| ... | @@ -172,8 +172,6 @@ export default { | ... | @@ -172,8 +172,6 @@ export default { |
| 172 | }, | 172 | }, |
| 173 | }; | 173 | }; |
| 174 | }, | 174 | }, |
| 175 | - created() { | ||
| 176 | - }, | ||
| 177 | watch: { | 175 | watch: { |
| 178 | drawer(val, oldVal) { | 176 | drawer(val, oldVal) { |
| 179 | if (val) { | 177 | if (val) { |
| ... | @@ -229,7 +227,6 @@ export default { | ... | @@ -229,7 +227,6 @@ export default { |
| 229 | console.log(err); | 227 | console.log(err); |
| 230 | }); | 228 | }); |
| 231 | }, | 229 | }, |
| 232 | - | ||
| 233 | //关闭 | 230 | //关闭 |
| 234 | handleClose() { | 231 | handleClose() { |
| 235 | this.roleid = []; | 232 | this.roleid = []; |
| ... | @@ -240,7 +237,6 @@ export default { | ... | @@ -240,7 +237,6 @@ export default { |
| 240 | this.clearValidate('userForm') | 237 | this.clearValidate('userForm') |
| 241 | this.$emit("handleClose", false); | 238 | this.$emit("handleClose", false); |
| 242 | }, | 239 | }, |
| 243 | - | ||
| 244 | //提交 | 240 | //提交 |
| 245 | submit() { | 241 | submit() { |
| 246 | if (this.port.join(",").length > 0) { | 242 | if (this.port.join(",").length > 0) { | ... | ... |
| ... | @@ -29,8 +29,8 @@ | ... | @@ -29,8 +29,8 @@ |
| 29 | </el-button> | 29 | </el-button> |
| 30 | </div> | 30 | </div> |
| 31 | <Tables ductName="user" :data="data" :headerData="tableHeader" :limitSize="formData.size" :totalCount="total" | 31 | <Tables ductName="user" :data="data" :headerData="tableHeader" :limitSize="formData.size" :totalCount="total" |
| 32 | - :loading="loading" :page="formData.page" :pageSizes="[20, 30, 40, 50]" height="600" @sizeChange="sizeChange" | 32 | + :loading="loading" :page="formData.page" :pageSizes="[20, 30, 40, 50]" :height="tableHeight" |
| 33 | - @currentChange="currentChange"> | 33 | + @sizeChange="sizeChange" @currentChange="currentChange"> |
| 34 | <template slot="optionColumn"> | 34 | <template slot="optionColumn"> |
| 35 | <el-table-column header-align="center" align="center" width="auto" label="操作"> | 35 | <el-table-column header-align="center" align="center" width="auto" label="操作"> |
| 36 | <template slot-scope="scope"> | 36 | <template slot-scope="scope"> |
| ... | @@ -88,7 +88,6 @@ | ... | @@ -88,7 +88,6 @@ |
| 88 | <script> | 88 | <script> |
| 89 | import Drawer from "./drawer.vue"; | 89 | import Drawer from "./drawer.vue"; |
| 90 | import { listUser, detailUser, updateUserStatus } from "@/api/system/user.js"; | 90 | import { listUser, detailUser, updateUserStatus } from "@/api/system/user.js"; |
| 91 | - | ||
| 92 | export default { | 91 | export default { |
| 93 | name: "UserConfig", | 92 | name: "UserConfig", |
| 94 | components: { | 93 | components: { |
| ... | @@ -103,56 +102,7 @@ export default { | ... | @@ -103,56 +102,7 @@ export default { |
| 103 | username: null, | 102 | username: null, |
| 104 | phone: null, | 103 | phone: null, |
| 105 | }, //查询条件 | 104 | }, //查询条件 |
| 106 | - tableHeader: [ | 105 | + tableHeader: this.tableHeaders['user'], //表头数据 |
| 107 | - { | ||
| 108 | - name: "员工号", | ||
| 109 | - value: "loginName", | ||
| 110 | - width: "150px", | ||
| 111 | - align: "center", | ||
| 112 | - }, | ||
| 113 | - { | ||
| 114 | - name: "用户姓名", | ||
| 115 | - value: "username", | ||
| 116 | - width: "150px", | ||
| 117 | - align: "center", | ||
| 118 | - }, | ||
| 119 | - { | ||
| 120 | - name: "所属口岸", | ||
| 121 | - value: "portName", | ||
| 122 | - width: "150px", | ||
| 123 | - align: "center", | ||
| 124 | - }, | ||
| 125 | - { | ||
| 126 | - name: "所属角色", | ||
| 127 | - value: "roleNames", | ||
| 128 | - width: "150px", | ||
| 129 | - align: "center", | ||
| 130 | - }, | ||
| 131 | - { | ||
| 132 | - name: "电子邮箱", | ||
| 133 | - value: "email", | ||
| 134 | - width: "150px", | ||
| 135 | - align: "center", | ||
| 136 | - }, | ||
| 137 | - { | ||
| 138 | - name: "用户状态", | ||
| 139 | - value: "isValid", | ||
| 140 | - width: "100px", | ||
| 141 | - align: "center", | ||
| 142 | - }, | ||
| 143 | - { | ||
| 144 | - name: "修改时间", | ||
| 145 | - value: "updateTime", | ||
| 146 | - width: "150px", | ||
| 147 | - align: "center", | ||
| 148 | - }, | ||
| 149 | - { | ||
| 150 | - name: "备注", | ||
| 151 | - value: "remark", | ||
| 152 | - width: "150px", | ||
| 153 | - align: "center", | ||
| 154 | - }, | ||
| 155 | - ], //表头数据 | ||
| 156 | userData: {}, //用户详情 | 106 | userData: {}, //用户详情 |
| 157 | data: [], //用户列表 | 107 | data: [], //用户列表 |
| 158 | drawer: false, | 108 | drawer: false, |
| ... | @@ -161,6 +111,7 @@ export default { | ... | @@ -161,6 +111,7 @@ export default { |
| 161 | drawerTitle: "", | 111 | drawerTitle: "", |
| 162 | total: 0, | 112 | total: 0, |
| 163 | loading: false, | 113 | loading: false, |
| 114 | + tableHeight: null | ||
| 164 | }; | 115 | }; |
| 165 | }, | 116 | }, |
| 166 | created() { | 117 | created() { |
| ... | @@ -168,6 +119,9 @@ export default { | ... | @@ -168,6 +119,9 @@ export default { |
| 168 | this.selectUser(); | 119 | this.selectUser(); |
| 169 | } | 120 | } |
| 170 | }, | 121 | }, |
| 122 | + mounted() { | ||
| 123 | + this.tableHeight = window.innerHeight - this.$refs.selectionUserForm.$el.offsetHeight - 250 | ||
| 124 | + }, | ||
| 171 | activated() { | 125 | activated() { |
| 172 | this.selectUser(); | 126 | this.selectUser(); |
| 173 | }, | 127 | }, |
| ... | @@ -197,7 +151,6 @@ export default { | ... | @@ -197,7 +151,6 @@ export default { |
| 197 | console.log(err); | 151 | console.log(err); |
| 198 | }); | 152 | }); |
| 199 | }, | 153 | }, |
| 200 | - | ||
| 201 | //用户详情 | 154 | //用户详情 |
| 202 | userDetail(id) { | 155 | userDetail(id) { |
| 203 | detailUser(id) | 156 | detailUser(id) |
| ... | @@ -217,7 +170,6 @@ export default { | ... | @@ -217,7 +170,6 @@ export default { |
| 217 | console.log(err); | 170 | console.log(err); |
| 218 | }); | 171 | }); |
| 219 | }, | 172 | }, |
| 220 | - | ||
| 221 | //新增用户 | 173 | //新增用户 |
| 222 | addUser() { | 174 | addUser() { |
| 223 | this.userData = {}; | 175 | this.userData = {}; |
| ... | @@ -225,7 +177,6 @@ export default { | ... | @@ -225,7 +177,6 @@ export default { |
| 225 | this.drawerTitle = "新增用户"; | 177 | this.drawerTitle = "新增用户"; |
| 226 | this.userFormDisabled = false; | 178 | this.userFormDisabled = false; |
| 227 | }, | 179 | }, |
| 228 | - | ||
| 229 | //查询修改用户 | 180 | //查询修改用户 |
| 230 | buttonClick(row, status) { | 181 | buttonClick(row, status) { |
| 231 | this.userDetail(row.row.id); | 182 | this.userDetail(row.row.id); |
| ... | @@ -233,7 +184,6 @@ export default { | ... | @@ -233,7 +184,6 @@ export default { |
| 233 | ? (this.userFormDisabled = true) | 184 | ? (this.userFormDisabled = true) |
| 234 | : (this.userFormDisabled = false); | 185 | : (this.userFormDisabled = false); |
| 235 | }, | 186 | }, |
| 236 | - | ||
| 237 | //修改用户状态 | 187 | //修改用户状态 |
| 238 | userStatus(row) { | 188 | userStatus(row) { |
| 239 | let msg = ""; | 189 | let msg = ""; |
| ... | @@ -261,9 +211,8 @@ export default { | ... | @@ -261,9 +211,8 @@ export default { |
| 261 | .catch((err) => { | 211 | .catch((err) => { |
| 262 | console.log(err); | 212 | console.log(err); |
| 263 | }) | 213 | }) |
| 264 | - .catch(() => { }); | 214 | + .catch(() => {}); |
| 265 | }, | 215 | }, |
| 266 | - | ||
| 267 | //删除用户 | 216 | //删除用户 |
| 268 | removeUser(row) { | 217 | removeUser(row) { |
| 269 | this.$confirm("是否要删除此用户", "提示", { | 218 | this.$confirm("是否要删除此用户", "提示", { |
| ... | @@ -284,20 +233,17 @@ export default { | ... | @@ -284,20 +233,17 @@ export default { |
| 284 | .catch((err) => { | 233 | .catch((err) => { |
| 285 | console.log(err); | 234 | console.log(err); |
| 286 | }) | 235 | }) |
| 287 | - .catch(() => []); | 236 | + .catch(() => {}); |
| 288 | }, | 237 | }, |
| 289 | - | ||
| 290 | handleClose(val) { | 238 | handleClose(val) { |
| 291 | this.drawer = val; | 239 | this.drawer = val; |
| 292 | this.userData = {}; | 240 | this.userData = {}; |
| 293 | this.selectUser(); | 241 | this.selectUser(); |
| 294 | }, | 242 | }, |
| 295 | - | ||
| 296 | currentChange(val) { | 243 | currentChange(val) { |
| 297 | this.formData.page = val.page; | 244 | this.formData.page = val.page; |
| 298 | this.selectUser(); | 245 | this.selectUser(); |
| 299 | }, | 246 | }, |
| 300 | - | ||
| 301 | sizeChange(val) { | 247 | sizeChange(val) { |
| 302 | this.formData.size = val; | 248 | this.formData.size = val; |
| 303 | this.selectUser() | 249 | this.selectUser() | ... | ... |
-
Please register or login to post a comment