Showing
10 changed files
with
1590 additions
and
285 deletions
| 1 | -import request from '@/utils/request' | 1 | +import request from "@/utils/request"; |
| 2 | 2 | ||
| 3 | // 获取路由所有路由 | 3 | // 获取路由所有路由 |
| 4 | export const getRouters = () => { | 4 | export const getRouters = () => { |
| 5 | return request({ | 5 | return request({ |
| 6 | - url: '/bus-customer/menu/selectMenu', | 6 | + url: "/bus-customer/menu/selectMenu", |
| 7 | - method: 'get' | 7 | + method: "get", |
| 8 | - }) | 8 | + }); |
| 9 | -} | 9 | +}; |
| 10 | 10 | ||
| 11 | //获取用户可访问的路由 | 11 | //获取用户可访问的路由 |
| 12 | export const getUserRouters = () => { | 12 | export const getUserRouters = () => { |
| 13 | return request({ | 13 | return request({ |
| 14 | - url: '/bus-customer/obtainUserRights', | 14 | + url: "/bus-customer/obtainUserRights", |
| 15 | - method: 'post' | 15 | + method: "post", |
| 16 | - }) | 16 | + }); |
| 17 | -} | 17 | +}; |
| 18 | + | ||
| 19 | +// /menu/addMenu 添加菜单 | ||
| 20 | +export const addMenu = (data) => { | ||
| 21 | + return request({ | ||
| 22 | + url: "/bus-customer/menu/addMenu", | ||
| 23 | + method: "post", | ||
| 24 | + data: data, | ||
| 25 | + }); | ||
| 26 | +}; | ||
| 27 | + | ||
| 28 | +// PUT /menu/deleteMenu 删除菜单 | ||
| 29 | +export const deleteMenu = (data) => { | ||
| 30 | + return request({ | ||
| 31 | + url: `/bus-customer/menu/deleteMenu?menuId=${data.menuId}`, | ||
| 32 | + method: "put", | ||
| 33 | + }); | ||
| 34 | +}; | ||
| 35 | + | ||
| 36 | +// POST /menu/updateMenu 更新菜单 | ||
| 37 | +export const updateMenu = (data) => { | ||
| 38 | + return request({ | ||
| 39 | + url: "/bus-customer/menu/updateMenu", | ||
| 40 | + method: "post", | ||
| 41 | + data: data, | ||
| 42 | + }); | ||
| 43 | +}; | ... | ... |
src/api/system/supervise-place-manage.js
0 → 100644
| 1 | +import request from "@/utils/request"; | ||
| 2 | + | ||
| 3 | +// POST | ||
| 4 | +// /operatorPlace/addOperatorPlace | ||
| 5 | +// 新增监管场所 | ||
| 6 | +export function addOperatorPlace(data) { | ||
| 7 | + return request({ | ||
| 8 | + url: "/bus-customer/operatorPlace/addOperatorPlace", | ||
| 9 | + method: "post", | ||
| 10 | + data: data, | ||
| 11 | + }); | ||
| 12 | +} | ||
| 13 | + | ||
| 14 | +// POST | ||
| 15 | +// /operatorPlace/getOperatorPlaceList | ||
| 16 | +// 查询监管场所列表 | ||
| 17 | +export function getOperatorPlaceList(data) { | ||
| 18 | + return request({ | ||
| 19 | + url: "/bus-customer/operatorPlace/getOperatorPlaceList", | ||
| 20 | + method: "post", | ||
| 21 | + data: data, | ||
| 22 | + }); | ||
| 23 | +} | ||
| 24 | + | ||
| 25 | +// POST | ||
| 26 | +// /operatorPlace/updateOperatorPlace | ||
| 27 | +// 修改监管场所 | ||
| 28 | +export function updateOperatorPlace(data) { | ||
| 29 | + return request({ | ||
| 30 | + url: "/bus-customer/operatorPlace/updateOperatorPlace", | ||
| 31 | + method: "post", | ||
| 32 | + data: data, | ||
| 33 | + }); | ||
| 34 | +} |
| 1 | -@import './variables.scss'; | 1 | +@import "./variables.scss"; |
| 2 | -@import './mixin.scss'; | 2 | +@import "./mixin.scss"; |
| 3 | -@import './transition.scss'; | 3 | +@import "./transition.scss"; |
| 4 | -@import './element-ui.scss'; | 4 | +@import "./element-ui.scss"; |
| 5 | -@import './sidebar.scss'; | 5 | +@import "./sidebar.scss"; |
| 6 | -@import './btn.scss'; | 6 | +@import "./btn.scss"; |
| 7 | 7 | ||
| 8 | //fedex样式 | 8 | //fedex样式 |
| 9 | // .el-loading-spinner .path { | 9 | // .el-loading-spinner .path { |
| ... | @@ -70,7 +70,6 @@ | ... | @@ -70,7 +70,6 @@ |
| 70 | } | 70 | } |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | - | ||
| 74 | .el-radio__label { | 73 | .el-radio__label { |
| 75 | color: #999; | 74 | color: #999; |
| 76 | font-size: 12px; | 75 | font-size: 12px; |
| ... | @@ -92,7 +91,7 @@ | ... | @@ -92,7 +91,7 @@ |
| 92 | background-color: #fff !important; | 91 | background-color: #fff !important; |
| 93 | } | 92 | } |
| 94 | 93 | ||
| 95 | -.el-radio__input.is-checked+.el-radio__label { | 94 | +.el-radio__input.is-checked + .el-radio__label { |
| 96 | color: $fedexButton !important; | 95 | color: $fedexButton !important; |
| 97 | } | 96 | } |
| 98 | 97 | ||
| ... | @@ -102,8 +101,6 @@ | ... | @@ -102,8 +101,6 @@ |
| 102 | } | 101 | } |
| 103 | } | 102 | } |
| 104 | 103 | ||
| 105 | - | ||
| 106 | - | ||
| 107 | //button | 104 | //button |
| 108 | .el-button { | 105 | .el-button { |
| 109 | border-radius: 0; | 106 | border-radius: 0; |
| ... | @@ -150,7 +147,6 @@ | ... | @@ -150,7 +147,6 @@ |
| 150 | } | 147 | } |
| 151 | 148 | ||
| 152 | .el-button-group { | 149 | .el-button-group { |
| 153 | - | ||
| 154 | .el-button, | 150 | .el-button, |
| 155 | .el-button.is-disabled { | 151 | .el-button.is-disabled { |
| 156 | border-top-color: $fedexBottonColor !important; | 152 | border-top-color: $fedexBottonColor !important; |
| ... | @@ -163,7 +159,7 @@ | ... | @@ -163,7 +159,7 @@ |
| 163 | border-left-color: $fedexBottonColor !important; | 159 | border-left-color: $fedexBottonColor !important; |
| 164 | 160 | ||
| 165 | span { | 161 | span { |
| 166 | - color: $fedexBottonColor ; | 162 | + color: $fedexBottonColor; |
| 167 | } | 163 | } |
| 168 | } | 164 | } |
| 169 | 165 | ||
| ... | @@ -172,24 +168,20 @@ | ... | @@ -172,24 +168,20 @@ |
| 172 | border-left: 1px solid $fedexBottonColor !important; | 168 | border-left: 1px solid $fedexBottonColor !important; |
| 173 | 169 | ||
| 174 | .el-dropdown__icon { | 170 | .el-dropdown__icon { |
| 175 | - color: $fedexBottonColor ; | 171 | + color: $fedexBottonColor; |
| 176 | } | 172 | } |
| 177 | } | 173 | } |
| 178 | 174 | ||
| 179 | .is-disabled { | 175 | .is-disabled { |
| 180 | - | ||
| 181 | span, | 176 | span, |
| 182 | .el-dropdown__icon { | 177 | .el-dropdown__icon { |
| 183 | color: $formDisabledColor !important; | 178 | color: $formDisabledColor !important; |
| 184 | - | ||
| 185 | } | 179 | } |
| 186 | } | 180 | } |
| 187 | } | 181 | } |
| 188 | 182 | ||
| 189 | .el-dropdown:hover { | 183 | .el-dropdown:hover { |
| 190 | .el-button-group { | 184 | .el-button-group { |
| 191 | - | ||
| 192 | - | ||
| 193 | .el-button, | 185 | .el-button, |
| 194 | .el-button.is-disabled { | 186 | .el-button.is-disabled { |
| 195 | border-top-color: $fedexBottonColor !important; | 187 | border-top-color: $fedexBottonColor !important; |
| ... | @@ -202,10 +194,10 @@ | ... | @@ -202,10 +194,10 @@ |
| 202 | border-left-color: $fedexBottonColor !important; | 194 | border-left-color: $fedexBottonColor !important; |
| 203 | 195 | ||
| 204 | span { | 196 | span { |
| 205 | - color: $fedexBottonColor!important ; | 197 | + color: $fedexBottonColor !important ; |
| 206 | 198 | ||
| 207 | svg { | 199 | svg { |
| 208 | - color: $fedexBottonColor!important ; | 200 | + color: $fedexBottonColor !important ; |
| 209 | } | 201 | } |
| 210 | } | 202 | } |
| 211 | } | 203 | } |
| ... | @@ -215,12 +207,11 @@ | ... | @@ -215,12 +207,11 @@ |
| 215 | border-left: 1px solid $fedexBottonColor !important; | 207 | border-left: 1px solid $fedexBottonColor !important; |
| 216 | 208 | ||
| 217 | .el-dropdown__icon { | 209 | .el-dropdown__icon { |
| 218 | - color: $fedexBottonColor!important ; | 210 | + color: $fedexBottonColor !important ; |
| 219 | } | 211 | } |
| 220 | } | 212 | } |
| 221 | 213 | ||
| 222 | .is-disabled { | 214 | .is-disabled { |
| 223 | - | ||
| 224 | span { | 215 | span { |
| 225 | color: $formDisabledColor !important; | 216 | color: $formDisabledColor !important; |
| 226 | 217 | ||
| ... | @@ -243,7 +234,6 @@ | ... | @@ -243,7 +234,6 @@ |
| 243 | border: none; | 234 | border: none; |
| 244 | } | 235 | } |
| 245 | 236 | ||
| 246 | - | ||
| 247 | .entrySave { | 237 | .entrySave { |
| 248 | margin-top: 64px; | 238 | margin-top: 64px; |
| 249 | text-align: center; | 239 | text-align: center; |
| ... | @@ -304,15 +294,11 @@ | ... | @@ -304,15 +294,11 @@ |
| 304 | 294 | ||
| 305 | //update | 295 | //update |
| 306 | .upload-demo { | 296 | .upload-demo { |
| 307 | - | ||
| 308 | .el-upload-list { | 297 | .el-upload-list { |
| 309 | - | ||
| 310 | - | ||
| 311 | .el-upload-list__item { | 298 | .el-upload-list__item { |
| 312 | margin: 0px; | 299 | margin: 0px; |
| 313 | line-height: normal; | 300 | line-height: normal; |
| 314 | } | 301 | } |
| 315 | - | ||
| 316 | } | 302 | } |
| 317 | } | 303 | } |
| 318 | 304 | ||
| ... | @@ -326,8 +312,6 @@ | ... | @@ -326,8 +312,6 @@ |
| 326 | color: #fff; | 312 | color: #fff; |
| 327 | } | 313 | } |
| 328 | 314 | ||
| 329 | - | ||
| 330 | - | ||
| 331 | //dialog | 315 | //dialog |
| 332 | .el-dialog { | 316 | .el-dialog { |
| 333 | display: flex; | 317 | display: flex; |
| ... | @@ -363,7 +347,6 @@ | ... | @@ -363,7 +347,6 @@ |
| 363 | .el-input, | 347 | .el-input, |
| 364 | .el-textarea, | 348 | .el-textarea, |
| 365 | .el-select { | 349 | .el-select { |
| 366 | - | ||
| 367 | input, | 350 | input, |
| 368 | textarea { | 351 | textarea { |
| 369 | border-radius: 0px !important; | 352 | border-radius: 0px !important; |
| ... | @@ -391,11 +374,11 @@ input:disabled { | ... | @@ -391,11 +374,11 @@ input:disabled { |
| 391 | border-color: $fedexBorder; | 374 | border-color: $fedexBorder; |
| 392 | } | 375 | } |
| 393 | 376 | ||
| 394 | -.el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label::before { | 377 | +.el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label::before { |
| 395 | content: ""; | 378 | content: ""; |
| 396 | } | 379 | } |
| 397 | 380 | ||
| 398 | -.el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label:after { | 381 | +.el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:after { |
| 399 | content: "*"; | 382 | content: "*"; |
| 400 | color: #ff4949; | 383 | color: #ff4949; |
| 401 | margin-right: 4px; | 384 | margin-right: 4px; |
| ... | @@ -446,12 +429,12 @@ input:disabled { | ... | @@ -446,12 +429,12 @@ input:disabled { |
| 446 | font-weight: 700; | 429 | font-weight: 700; |
| 447 | color: #333; | 430 | color: #333; |
| 448 | height: max-content; | 431 | height: max-content; |
| 449 | - padding: 0 0 0 .6rem; | 432 | + padding: 0 0 0 0.6rem; |
| 450 | line-height: 14px; | 433 | line-height: 14px; |
| 451 | /*设置行高,防止因为字体缩放导致元素高度变化*/ | 434 | /*设置行高,防止因为字体缩放导致元素高度变化*/ |
| 452 | transform: translate3d(0, 10px, 0); | 435 | transform: translate3d(0, 10px, 0); |
| 453 | /*标题平移至合适位置*/ | 436 | /*标题平移至合适位置*/ |
| 454 | - transition: all .2s ease; | 437 | + transition: all 0.2s ease; |
| 455 | cursor: text; | 438 | cursor: text; |
| 456 | z-index: 5; | 439 | z-index: 5; |
| 457 | } | 440 | } |
| ... | @@ -496,11 +479,9 @@ input:disabled { | ... | @@ -496,11 +479,9 @@ input:disabled { |
| 496 | background-color: transparent; | 479 | background-color: transparent; |
| 497 | padding-top: 0.775rem; | 480 | padding-top: 0.775rem; |
| 498 | // padding-right: 1.15rem; | 481 | // padding-right: 1.15rem; |
| 499 | - padding-left: calc(.6rem + .1875rem); | 482 | + padding-left: calc(0.6rem + 0.1875rem); |
| 500 | font-size: 0.875rem !important; | 483 | font-size: 0.875rem !important; |
| 501 | } | 484 | } |
| 502 | - | ||
| 503 | - | ||
| 504 | } | 485 | } |
| 505 | 486 | ||
| 506 | .el-range-editor.el-input__inner { | 487 | .el-range-editor.el-input__inner { |
| ... | @@ -520,7 +501,7 @@ input:disabled { | ... | @@ -520,7 +501,7 @@ input:disabled { |
| 520 | background-color: transparent; | 501 | background-color: transparent; |
| 521 | padding-top: 0.775rem; | 502 | padding-top: 0.775rem; |
| 522 | // padding-right: 1.15rem; | 503 | // padding-right: 1.15rem; |
| 523 | - padding-left: calc(.6rem + .1875rem); | 504 | + padding-left: calc(0.6rem + 0.1875rem); |
| 524 | font-size: 0.875rem !important; | 505 | font-size: 0.875rem !important; |
| 525 | } | 506 | } |
| 526 | 507 | ||
| ... | @@ -530,7 +511,7 @@ input:disabled { | ... | @@ -530,7 +511,7 @@ input:disabled { |
| 530 | background-color: transparent; | 511 | background-color: transparent; |
| 531 | margin-top: 0.85rem; | 512 | margin-top: 0.85rem; |
| 532 | // padding-right: 1.15rem; | 513 | // padding-right: 1.15rem; |
| 533 | - padding-left: calc(.625rem + .1875rem); | 514 | + padding-left: calc(0.625rem + 0.1875rem); |
| 534 | font-size: 1rem !important; | 515 | font-size: 1rem !important; |
| 535 | } | 516 | } |
| 536 | } | 517 | } |
| ... | @@ -550,8 +531,8 @@ input:disabled { | ... | @@ -550,8 +531,8 @@ input:disabled { |
| 550 | height: max-content; | 531 | height: max-content; |
| 551 | line-height: 20px; | 532 | line-height: 20px; |
| 552 | color: $fedexError; | 533 | color: $fedexError; |
| 553 | - font-size: .75rem; | 534 | + font-size: 0.75rem; |
| 554 | - padding: .225rem .9375rem; | 535 | + padding: 0.225rem 0.9375rem; |
| 555 | background-color: #fff; | 536 | background-color: #fff; |
| 556 | margin-top: 3px; | 537 | margin-top: 3px; |
| 557 | } | 538 | } |
| ... | @@ -561,7 +542,6 @@ input:disabled { | ... | @@ -561,7 +542,6 @@ input:disabled { |
| 561 | // display: none; | 542 | // display: none; |
| 562 | // } | 543 | // } |
| 563 | // } | 544 | // } |
| 564 | - | ||
| 565 | } | 545 | } |
| 566 | 546 | ||
| 567 | .el-form-item:has(.formError) { | 547 | .el-form-item:has(.formError) { |
| ... | @@ -572,7 +552,6 @@ input:disabled { | ... | @@ -572,7 +552,6 @@ input:disabled { |
| 572 | .el-form-item__content { | 552 | .el-form-item__content { |
| 573 | .fedexFormItem { | 553 | .fedexFormItem { |
| 574 | &:first-child { | 554 | &:first-child { |
| 575 | - | ||
| 576 | .formError { | 555 | .formError { |
| 577 | position: absolute; | 556 | position: absolute; |
| 578 | top: 50px; | 557 | top: 50px; |
| ... | @@ -606,7 +585,6 @@ input:disabled { | ... | @@ -606,7 +585,6 @@ input:disabled { |
| 606 | } | 585 | } |
| 607 | 586 | ||
| 608 | .el-form-item__content { | 587 | .el-form-item__content { |
| 609 | - | ||
| 610 | .el-input, | 588 | .el-input, |
| 611 | .el-select, | 589 | .el-select, |
| 612 | .el-date-editor, | 590 | .el-date-editor, |
| ... | @@ -634,10 +612,9 @@ input:disabled { | ... | @@ -634,10 +612,9 @@ input:disabled { |
| 634 | 612 | ||
| 635 | .el-form-item__content { | 613 | .el-form-item__content { |
| 636 | input { | 614 | input { |
| 637 | - color: $formDisabledColor ; | 615 | + color: $formDisabledColor; |
| 638 | } | 616 | } |
| 639 | } | 617 | } |
| 640 | - | ||
| 641 | } | 618 | } |
| 642 | 619 | ||
| 643 | .is-error { | 620 | .is-error { |
| ... | @@ -655,12 +632,12 @@ input:disabled { | ... | @@ -655,12 +632,12 @@ input:disabled { |
| 655 | font-size: 0.625rem; | 632 | font-size: 0.625rem; |
| 656 | font-weight: 700; | 633 | font-weight: 700; |
| 657 | height: max-content; | 634 | height: max-content; |
| 658 | - padding: 0 0 0 .6rem; | 635 | + padding: 0 0 0 0.6rem; |
| 659 | line-height: 14px; | 636 | line-height: 14px; |
| 660 | /*设置行高,防止因为字体缩放导致元素高度变化*/ | 637 | /*设置行高,防止因为字体缩放导致元素高度变化*/ |
| 661 | transform: translate3d(0, 1px, 0); | 638 | transform: translate3d(0, 1px, 0); |
| 662 | /*标题平移至合适位置*/ | 639 | /*标题平移至合适位置*/ |
| 663 | - transition: all .2s ease; | 640 | + transition: all 0.2s ease; |
| 664 | z-index: 10; | 641 | z-index: 10; |
| 665 | } | 642 | } |
| 666 | } | 643 | } |
| ... | @@ -710,7 +687,7 @@ input:disabled { | ... | @@ -710,7 +687,7 @@ input:disabled { |
| 710 | .el-radio { | 687 | .el-radio { |
| 711 | display: block; | 688 | display: block; |
| 712 | margin-top: 25px; | 689 | margin-top: 25px; |
| 713 | - margin-left: 5px | 690 | + margin-left: 5px; |
| 714 | } | 691 | } |
| 715 | } | 692 | } |
| 716 | 693 | ||
| ... | @@ -724,7 +701,6 @@ input:disabled { | ... | @@ -724,7 +701,6 @@ input:disabled { |
| 724 | height: 100%; | 701 | height: 100%; |
| 725 | 702 | ||
| 726 | .el-form-item { | 703 | .el-form-item { |
| 727 | - | ||
| 728 | .el-form-item__label { | 704 | .el-form-item__label { |
| 729 | width: 100%; | 705 | width: 100%; |
| 730 | height: 34px; | 706 | height: 34px; |
| ... | @@ -732,7 +708,7 @@ input:disabled { | ... | @@ -732,7 +708,7 @@ input:disabled { |
| 732 | font-size: 12px; | 708 | font-size: 12px; |
| 733 | font-weight: 600; | 709 | font-weight: 600; |
| 734 | color: #333; | 710 | color: #333; |
| 735 | - background-color: #E3E3E3; | 711 | + background-color: #e3e3e3; |
| 736 | padding-left: 16px; | 712 | padding-left: 16px; |
| 737 | } | 713 | } |
| 738 | 714 | ||
| ... | @@ -740,7 +716,7 @@ input:disabled { | ... | @@ -740,7 +716,7 @@ input:disabled { |
| 740 | width: 100%; | 716 | width: 100%; |
| 741 | height: 100%; | 717 | height: 100%; |
| 742 | min-height: 36px; | 718 | min-height: 36px; |
| 743 | - background-color: #F2F2F2; | 719 | + background-color: #f2f2f2; |
| 744 | margin-top: 2px; | 720 | margin-top: 2px; |
| 745 | 721 | ||
| 746 | div { | 722 | div { |
| ... | @@ -757,13 +733,11 @@ input:disabled { | ... | @@ -757,13 +733,11 @@ input:disabled { |
| 757 | background-color: transparent; | 733 | background-color: transparent; |
| 758 | } | 734 | } |
| 759 | } | 735 | } |
| 760 | - | ||
| 761 | } | 736 | } |
| 762 | } | 737 | } |
| 763 | } | 738 | } |
| 764 | 739 | ||
| 765 | .backgroundCol { | 740 | .backgroundCol { |
| 766 | - | ||
| 767 | .el-form-item { | 741 | .el-form-item { |
| 768 | .el-form-item__label { | 742 | .el-form-item__label { |
| 769 | color: $fedexBottonColor !important; | 743 | color: $fedexBottonColor !important; |
| ... | @@ -773,8 +747,6 @@ input:disabled { | ... | @@ -773,8 +747,6 @@ input:disabled { |
| 773 | 747 | ||
| 774 | //table | 748 | //table |
| 775 | .el-table { | 749 | .el-table { |
| 776 | - | ||
| 777 | - | ||
| 778 | .el-table__header-wrapper { | 750 | .el-table__header-wrapper { |
| 779 | overflow-y: scroll; | 751 | overflow-y: scroll; |
| 780 | } | 752 | } |
| ... | @@ -795,21 +767,19 @@ input:disabled { | ... | @@ -795,21 +767,19 @@ input:disabled { |
| 795 | font-size: 13px; | 767 | font-size: 13px; |
| 796 | border-left-color: transparent; | 768 | border-left-color: transparent; |
| 797 | border-right-color: transparent; | 769 | border-right-color: transparent; |
| 798 | - | ||
| 799 | } | 770 | } |
| 800 | } | 771 | } |
| 801 | 772 | ||
| 802 | .el-table__body-wrapper { | 773 | .el-table__body-wrapper { |
| 803 | - | 774 | + .el-button [class*="el-icon-"] + span { |
| 804 | - .el-button [class*="el-icon-"]+span { | ||
| 805 | margin-left: 1px; | 775 | margin-left: 1px; |
| 806 | } | 776 | } |
| 807 | } | 777 | } |
| 808 | } | 778 | } |
| 809 | 779 | ||
| 810 | .customTable { | 780 | .customTable { |
| 811 | - .el-table th>.cell { | 781 | + .el-table th > .cell { |
| 812 | - width: max-content !important | 782 | + width: max-content !important; |
| 813 | } | 783 | } |
| 814 | 784 | ||
| 815 | .activeTableCell { | 785 | .activeTableCell { |
| ... | @@ -842,7 +812,7 @@ input:disabled { | ... | @@ -842,7 +812,7 @@ input:disabled { |
| 842 | height: 0; | 812 | height: 0; |
| 843 | } | 813 | } |
| 844 | 814 | ||
| 845 | - .el-table tbody tr:hover>td { | 815 | + .el-table tbody tr:hover > td { |
| 846 | background-color: rgba(0, 122, 183, 0.1) !important; | 816 | background-color: rgba(0, 122, 183, 0.1) !important; |
| 847 | } | 817 | } |
| 848 | 818 | ||
| ... | @@ -870,9 +840,7 @@ input:disabled { | ... | @@ -870,9 +840,7 @@ input:disabled { |
| 870 | min-height: 100px; | 840 | min-height: 100px; |
| 871 | 841 | ||
| 872 | .el-table__body { | 842 | .el-table__body { |
| 873 | - | ||
| 874 | tbody { | 843 | tbody { |
| 875 | - | ||
| 876 | tr:not(.el-table__expanded-cell) { | 844 | tr:not(.el-table__expanded-cell) { |
| 877 | width: 100%; | 845 | width: 100%; |
| 878 | height: 50px !important; | 846 | height: 50px !important; |
| ... | @@ -898,7 +866,6 @@ input:disabled { | ... | @@ -898,7 +866,6 @@ input:disabled { |
| 898 | } | 866 | } |
| 899 | } | 867 | } |
| 900 | 868 | ||
| 901 | - | ||
| 902 | &:first-child { | 869 | &:first-child { |
| 903 | border-left: 1px solid $fedexTableBorderColor; | 870 | border-left: 1px solid $fedexTableBorderColor; |
| 904 | } | 871 | } |
| ... | @@ -944,7 +911,7 @@ input:disabled { | ... | @@ -944,7 +911,7 @@ input:disabled { |
| 944 | } | 911 | } |
| 945 | 912 | ||
| 946 | .expanded { | 913 | .expanded { |
| 947 | - color: #409EFF; | 914 | + color: #409eff; |
| 948 | } | 915 | } |
| 949 | 916 | ||
| 950 | .el-table__row_isError { | 917 | .el-table__row_isError { |
| ... | @@ -1002,7 +969,6 @@ input:disabled { | ... | @@ -1002,7 +969,6 @@ input:disabled { |
| 1002 | } | 969 | } |
| 1003 | 970 | ||
| 1004 | .fedexFormTable { | 971 | .fedexFormTable { |
| 1005 | - | ||
| 1006 | .el-table__body-wrapper { | 972 | .el-table__body-wrapper { |
| 1007 | .el-table__body { | 973 | .el-table__body { |
| 1008 | tbody { | 974 | tbody { |
| ... | @@ -1013,7 +979,6 @@ input:disabled { | ... | @@ -1013,7 +979,6 @@ input:disabled { |
| 1013 | 979 | ||
| 1014 | .el-form-item__conten { | 980 | .el-form-item__conten { |
| 1015 | line-height: 20px !important; | 981 | line-height: 20px !important; |
| 1016 | - | ||
| 1017 | } | 982 | } |
| 1018 | } | 983 | } |
| 1019 | 984 | ||
| ... | @@ -1043,7 +1008,7 @@ input:disabled { | ... | @@ -1043,7 +1008,7 @@ input:disabled { |
| 1043 | color: $formItemBackgroundColor; | 1008 | color: $formItemBackgroundColor; |
| 1044 | } | 1009 | } |
| 1045 | 1010 | ||
| 1046 | - &:hover>td { | 1011 | + &:hover > td { |
| 1047 | background-color: none !important; | 1012 | background-color: none !important; |
| 1048 | 1013 | ||
| 1049 | .formError { | 1014 | .formError { |
| ... | @@ -1054,7 +1019,6 @@ input:disabled { | ... | @@ -1054,7 +1019,6 @@ input:disabled { |
| 1054 | } | 1019 | } |
| 1055 | } | 1020 | } |
| 1056 | } | 1021 | } |
| 1057 | - | ||
| 1058 | } | 1022 | } |
| 1059 | } | 1023 | } |
| 1060 | } | 1024 | } |
| ... | @@ -1075,7 +1039,7 @@ input:disabled { | ... | @@ -1075,7 +1039,7 @@ input:disabled { |
| 1075 | // } | 1039 | // } |
| 1076 | // } | 1040 | // } |
| 1077 | 1041 | ||
| 1078 | -.el-popper[x-placement^=bottom] { | 1042 | +.el-popper[x-placement^="bottom"] { |
| 1079 | margin-top: 2px; | 1043 | margin-top: 2px; |
| 1080 | } | 1044 | } |
| 1081 | 1045 | ||
| ... | @@ -1095,8 +1059,10 @@ input:disabled { | ... | @@ -1095,8 +1059,10 @@ input:disabled { |
| 1095 | 1059 | ||
| 1096 | .el-dropdown-menu__item:not(.is-disabled):hover, | 1060 | .el-dropdown-menu__item:not(.is-disabled):hover, |
| 1097 | .el-dropdown-menu__item:focus { | 1061 | .el-dropdown-menu__item:focus { |
| 1098 | - color: #333; | 1062 | + // color: #333; |
| 1099 | - background-color: $formItemBackgroundColor; | 1063 | + // background-color: $formItemBackgroundColor; |
| 1064 | + color: #ffffff !important; | ||
| 1065 | + background-color: $fedexBottonColor !important; | ||
| 1100 | } | 1066 | } |
| 1101 | 1067 | ||
| 1102 | .is-disabled { | 1068 | .is-disabled { |
| ... | @@ -1129,7 +1095,7 @@ input:disabled { | ... | @@ -1129,7 +1095,7 @@ input:disabled { |
| 1129 | width: 36px !important; | 1095 | width: 36px !important; |
| 1130 | height: 36px !important; | 1096 | height: 36px !important; |
| 1131 | display: block; | 1097 | display: block; |
| 1132 | - margin-right: 25px | 1098 | + margin-right: 25px; |
| 1133 | } | 1099 | } |
| 1134 | } | 1100 | } |
| 1135 | 1101 | ||
| ... | @@ -1175,8 +1141,6 @@ input:disabled { | ... | @@ -1175,8 +1141,6 @@ input:disabled { |
| 1175 | // } | 1141 | // } |
| 1176 | } | 1142 | } |
| 1177 | 1143 | ||
| 1178 | - | ||
| 1179 | - | ||
| 1180 | //other | 1144 | //other |
| 1181 | .TemplateSave { | 1145 | .TemplateSave { |
| 1182 | width: 240px; | 1146 | width: 240px; |
| ... | @@ -1215,7 +1179,6 @@ input:disabled { | ... | @@ -1215,7 +1179,6 @@ input:disabled { |
| 1215 | border: 1px solid $fedexColor !important; | 1179 | border: 1px solid $fedexColor !important; |
| 1216 | 1180 | ||
| 1217 | .el-input { | 1181 | .el-input { |
| 1218 | - | ||
| 1219 | input { | 1182 | input { |
| 1220 | border: none !important; | 1183 | border: none !important; |
| 1221 | font-size: 20px; | 1184 | font-size: 20px; |
| ... | @@ -1232,9 +1195,7 @@ input:disabled { | ... | @@ -1232,9 +1195,7 @@ input:disabled { |
| 1232 | } | 1195 | } |
| 1233 | } | 1196 | } |
| 1234 | 1197 | ||
| 1235 | - | ||
| 1236 | .el-message-box { | 1198 | .el-message-box { |
| 1237 | - | ||
| 1238 | .el-button { | 1199 | .el-button { |
| 1239 | border-color: $fedexBottonColor; | 1200 | border-color: $fedexBottonColor; |
| 1240 | color: $fedexBottonColor; | 1201 | color: $fedexBottonColor; |
| ... | @@ -1255,7 +1216,6 @@ input:disabled { | ... | @@ -1255,7 +1216,6 @@ input:disabled { |
| 1255 | .el-button--primary:focus { | 1216 | .el-button--primary:focus { |
| 1256 | background-color: rgba(255, 102, 0, 0.7); | 1217 | background-color: rgba(255, 102, 0, 0.7); |
| 1257 | } | 1218 | } |
| 1258 | - | ||
| 1259 | } | 1219 | } |
| 1260 | 1220 | ||
| 1261 | .el-select-dropdown__item.selected { | 1221 | .el-select-dropdown__item.selected { |
| ... | @@ -1323,7 +1283,7 @@ input:disabled { | ... | @@ -1323,7 +1283,7 @@ input:disabled { |
| 1323 | .el-table__fixed, | 1283 | .el-table__fixed, |
| 1324 | .el-table__fixed-right { | 1284 | .el-table__fixed-right { |
| 1325 | height: calc(100% - 7px) !important; | 1285 | height: calc(100% - 7px) !important; |
| 1326 | - box-shadow: -5px -2px 10px rgba(0, 0, 0, .12) !important; | 1286 | + box-shadow: -5px -2px 10px rgba(0, 0, 0, 0.12) !important; |
| 1327 | 1287 | ||
| 1328 | .el-table__fixed-body-wrapper { | 1288 | .el-table__fixed-body-wrapper { |
| 1329 | // height: calc(100% - 7px) !important; | 1289 | // height: calc(100% - 7px) !important; |
| ... | @@ -1331,7 +1291,7 @@ input:disabled { | ... | @@ -1331,7 +1291,7 @@ input:disabled { |
| 1331 | } | 1291 | } |
| 1332 | 1292 | ||
| 1333 | // 当表格没有滚动条时 | 1293 | // 当表格没有滚动条时 |
| 1334 | -.el-table__body-wrapper.is-scrolling-none~.el-table__fixed-right { | 1294 | +.el-table__body-wrapper.is-scrolling-none ~ .el-table__fixed-right { |
| 1335 | height: 100% !important; | 1295 | height: 100% !important; |
| 1336 | bottom: 0 !important; | 1296 | bottom: 0 !important; |
| 1337 | box-shadow: none !important; | 1297 | box-shadow: none !important; |
| ... | @@ -1347,7 +1307,6 @@ input:disabled { | ... | @@ -1347,7 +1307,6 @@ input:disabled { |
| 1347 | right: 0 !important; | 1307 | right: 0 !important; |
| 1348 | } | 1308 | } |
| 1349 | 1309 | ||
| 1350 | - | ||
| 1351 | ::-webkit-scrollbar { | 1310 | ::-webkit-scrollbar { |
| 1352 | height: 8px; | 1311 | height: 8px; |
| 1353 | width: 8px; | 1312 | width: 8px; |
| ... | @@ -1365,7 +1324,6 @@ input:disabled { | ... | @@ -1365,7 +1324,6 @@ input:disabled { |
| 1365 | background-color: #409eff; | 1324 | background-color: #409eff; |
| 1366 | } | 1325 | } |
| 1367 | 1326 | ||
| 1368 | - | ||
| 1369 | .el-scrollbar__wrap { | 1327 | .el-scrollbar__wrap { |
| 1370 | &::-webkit-scrollbar { | 1328 | &::-webkit-scrollbar { |
| 1371 | height: 0px; | 1329 | height: 0px; |
| ... | @@ -1398,13 +1356,10 @@ input:disabled { | ... | @@ -1398,13 +1356,10 @@ input:disabled { |
| 1398 | margin-right: 80px; | 1356 | margin-right: 80px; |
| 1399 | } | 1357 | } |
| 1400 | } | 1358 | } |
| 1401 | - | ||
| 1402 | - | ||
| 1403 | } | 1359 | } |
| 1404 | } | 1360 | } |
| 1405 | 1361 | ||
| 1406 | .imgViewDialog { | 1362 | .imgViewDialog { |
| 1407 | - | ||
| 1408 | .el-dialog__header { | 1363 | .el-dialog__header { |
| 1409 | .el-dialog__headerbtn { | 1364 | .el-dialog__headerbtn { |
| 1410 | font-size: 22px; | 1365 | font-size: 22px; |
| ... | @@ -1463,7 +1418,6 @@ input:disabled { | ... | @@ -1463,7 +1418,6 @@ input:disabled { |
| 1463 | color: $fedexButton; | 1418 | color: $fedexButton; |
| 1464 | } | 1419 | } |
| 1465 | } | 1420 | } |
| 1466 | - | ||
| 1467 | } | 1421 | } |
| 1468 | 1422 | ||
| 1469 | .el-image-viewer__canvas { | 1423 | .el-image-viewer__canvas { |
| ... | @@ -1537,7 +1491,7 @@ input:disabled { | ... | @@ -1537,7 +1491,7 @@ input:disabled { |
| 1537 | 1491 | ||
| 1538 | .el-button { | 1492 | .el-button { |
| 1539 | display: block; | 1493 | display: block; |
| 1540 | - color: $fedexButton ; | 1494 | + color: $fedexButton; |
| 1541 | text-align: center; | 1495 | text-align: center; |
| 1542 | margin-left: 0; | 1496 | margin-left: 0; |
| 1543 | border: none !important; | 1497 | border: none !important; |
| ... | @@ -1546,10 +1500,7 @@ input:disabled { | ... | @@ -1546,10 +1500,7 @@ input:disabled { |
| 1546 | font-size: 16px; | 1500 | font-size: 16px; |
| 1547 | font-weight: 700; | 1501 | font-weight: 700; |
| 1548 | } | 1502 | } |
| 1549 | - | ||
| 1550 | - | ||
| 1551 | } | 1503 | } |
| 1552 | - | ||
| 1553 | } | 1504 | } |
| 1554 | } | 1505 | } |
| 1555 | 1506 | ||
| ... | @@ -1578,7 +1529,6 @@ input:disabled { | ... | @@ -1578,7 +1529,6 @@ input:disabled { |
| 1578 | } | 1529 | } |
| 1579 | } | 1530 | } |
| 1580 | 1531 | ||
| 1581 | - | ||
| 1582 | .historyEmpty { | 1532 | .historyEmpty { |
| 1583 | .el-empty__description { | 1533 | .el-empty__description { |
| 1584 | font-weight: 700; | 1534 | font-weight: 700; |
| ... | @@ -1597,7 +1547,7 @@ input:disabled { | ... | @@ -1597,7 +1547,7 @@ input:disabled { |
| 1597 | .el-pagination__jump { | 1547 | .el-pagination__jump { |
| 1598 | margin-right: 10px; | 1548 | margin-right: 10px; |
| 1599 | 1549 | ||
| 1600 | - .el-input>input { | 1550 | + .el-input > input { |
| 1601 | border: none; | 1551 | border: none; |
| 1602 | border-bottom: 1px solid #dcdfe6; | 1552 | border-bottom: 1px solid #dcdfe6; |
| 1603 | } | 1553 | } |
| ... | @@ -1616,7 +1566,7 @@ input:disabled { | ... | @@ -1616,7 +1566,7 @@ input:disabled { |
| 1616 | } | 1566 | } |
| 1617 | } | 1567 | } |
| 1618 | 1568 | ||
| 1619 | -.textareaPopover+.popper__arrow { | 1569 | +.textareaPopover + .popper__arrow { |
| 1620 | display: none; | 1570 | display: none; |
| 1621 | } | 1571 | } |
| 1622 | 1572 | ||
| ... | @@ -1624,7 +1574,7 @@ input:disabled { | ... | @@ -1624,7 +1574,7 @@ input:disabled { |
| 1624 | .is-left { | 1574 | .is-left { |
| 1625 | .el-date-range-picker__header { | 1575 | .el-date-range-picker__header { |
| 1626 | div:before { | 1576 | div:before { |
| 1627 | - content: '起 '; | 1577 | + content: "起 "; |
| 1628 | } | 1578 | } |
| 1629 | } | 1579 | } |
| 1630 | } | 1580 | } |
| ... | @@ -1632,7 +1582,7 @@ input:disabled { | ... | @@ -1632,7 +1582,7 @@ input:disabled { |
| 1632 | .is-right { | 1582 | .is-right { |
| 1633 | .el-date-range-picker__header { | 1583 | .el-date-range-picker__header { |
| 1634 | div:before { | 1584 | div:before { |
| 1635 | - content: '止 '; | 1585 | + content: "止 "; |
| 1636 | } | 1586 | } |
| 1637 | } | 1587 | } |
| 1638 | } | 1588 | } |
| ... | @@ -1640,7 +1590,7 @@ input:disabled { | ... | @@ -1640,7 +1590,7 @@ input:disabled { |
| 1640 | 1590 | ||
| 1641 | .addLogin { | 1591 | .addLogin { |
| 1642 | .el-input__inner { | 1592 | .el-input__inner { |
| 1643 | - border: 1px solid #DCDFE6 !important; | 1593 | + border: 1px solid #dcdfe6 !important; |
| 1644 | } | 1594 | } |
| 1645 | } | 1595 | } |
| 1646 | 1596 | ||
| ... | @@ -1710,7 +1660,6 @@ input:disabled { | ... | @@ -1710,7 +1660,6 @@ input:disabled { |
| 1710 | color: #999; | 1660 | color: #999; |
| 1711 | } | 1661 | } |
| 1712 | } | 1662 | } |
| 1713 | - | ||
| 1714 | } | 1663 | } |
| 1715 | } | 1664 | } |
| 1716 | } | 1665 | } |
| ... | @@ -1749,7 +1698,6 @@ input:disabled { | ... | @@ -1749,7 +1698,6 @@ input:disabled { |
| 1749 | } | 1698 | } |
| 1750 | 1699 | ||
| 1751 | .activeFormItemInfo { | 1700 | .activeFormItemInfo { |
| 1752 | - | ||
| 1753 | .el-input__inner, | 1701 | .el-input__inner, |
| 1754 | input { | 1702 | input { |
| 1755 | font-weight: 700 !important; | 1703 | font-weight: 700 !important; |
| ... | @@ -1758,7 +1706,6 @@ input:disabled { | ... | @@ -1758,7 +1706,6 @@ input:disabled { |
| 1758 | } | 1706 | } |
| 1759 | 1707 | ||
| 1760 | .activeFormItemWarning { | 1708 | .activeFormItemWarning { |
| 1761 | - | ||
| 1762 | .el-input__inner, | 1709 | .el-input__inner, |
| 1763 | input { | 1710 | input { |
| 1764 | font-weight: 700 !important; | 1711 | font-weight: 700 !important; |
| ... | @@ -1767,7 +1714,6 @@ input:disabled { | ... | @@ -1767,7 +1714,6 @@ input:disabled { |
| 1767 | } | 1714 | } |
| 1768 | 1715 | ||
| 1769 | .activeFormItemError { | 1716 | .activeFormItemError { |
| 1770 | - | ||
| 1771 | .el-input__inner, | 1717 | .el-input__inner, |
| 1772 | input { | 1718 | input { |
| 1773 | font-weight: 700 !important; | 1719 | font-weight: 700 !important; |
| ... | @@ -1775,7 +1721,6 @@ input:disabled { | ... | @@ -1775,7 +1721,6 @@ input:disabled { |
| 1775 | } | 1721 | } |
| 1776 | } | 1722 | } |
| 1777 | 1723 | ||
| 1778 | - | ||
| 1779 | .portLogPopper { | 1724 | .portLogPopper { |
| 1780 | border: 2px solid $fedexColor; | 1725 | border: 2px solid $fedexColor; |
| 1781 | // background-color: rgba(77, 20, 140, 0.1) !important; | 1726 | // background-color: rgba(77, 20, 140, 0.1) !important; |
| ... | @@ -1811,7 +1756,7 @@ input:disabled { | ... | @@ -1811,7 +1756,7 @@ input:disabled { |
| 1811 | 1756 | ||
| 1812 | .el-select__input { | 1757 | .el-select__input { |
| 1813 | position: absolute; | 1758 | position: absolute; |
| 1814 | - top: -2000px | 1759 | + top: -2000px; |
| 1815 | } | 1760 | } |
| 1816 | } | 1761 | } |
| 1817 | } | 1762 | } |
| ... | @@ -1842,7 +1787,6 @@ input:disabled { | ... | @@ -1842,7 +1787,6 @@ input:disabled { |
| 1842 | } | 1787 | } |
| 1843 | } | 1788 | } |
| 1844 | 1789 | ||
| 1845 | - | ||
| 1846 | .checkBoxGroupStyle1 { | 1790 | .checkBoxGroupStyle1 { |
| 1847 | label { | 1791 | label { |
| 1848 | .el-checkbox__label { | 1792 | .el-checkbox__label { |
| ... | @@ -1885,7 +1829,6 @@ input:disabled { | ... | @@ -1885,7 +1829,6 @@ input:disabled { |
| 1885 | .el-table__body { | 1829 | .el-table__body { |
| 1886 | tbody { | 1830 | tbody { |
| 1887 | .tableErrorRow { | 1831 | .tableErrorRow { |
| 1888 | - | ||
| 1889 | td, | 1832 | td, |
| 1890 | .table_cell { | 1833 | .table_cell { |
| 1891 | background-color: rgba(222, 0, 46, 0.2) !important; | 1834 | background-color: rgba(222, 0, 46, 0.2) !important; |
| ... | @@ -1893,7 +1836,6 @@ input:disabled { | ... | @@ -1893,7 +1836,6 @@ input:disabled { |
| 1893 | } | 1836 | } |
| 1894 | 1837 | ||
| 1895 | .tableErrorRow:hover { | 1838 | .tableErrorRow:hover { |
| 1896 | - | ||
| 1897 | td, | 1839 | td, |
| 1898 | .table_cell { | 1840 | .table_cell { |
| 1899 | background-color: rgba(222, 0, 46, 0.2) !important; | 1841 | background-color: rgba(222, 0, 46, 0.2) !important; |
| ... | @@ -1901,12 +1843,10 @@ input:disabled { | ... | @@ -1901,12 +1843,10 @@ input:disabled { |
| 1901 | } | 1843 | } |
| 1902 | } | 1844 | } |
| 1903 | } | 1845 | } |
| 1904 | - | ||
| 1905 | } | 1846 | } |
| 1906 | } | 1847 | } |
| 1907 | 1848 | ||
| 1908 | .radioStatus { | 1849 | .radioStatus { |
| 1909 | - | ||
| 1910 | .el-radio { | 1850 | .el-radio { |
| 1911 | .el-radio__label { | 1851 | .el-radio__label { |
| 1912 | font-weight: 700; | 1852 | font-weight: 700; |
| ... | @@ -1921,8 +1861,6 @@ input:disabled { | ... | @@ -1921,8 +1861,6 @@ input:disabled { |
| 1921 | } | 1861 | } |
| 1922 | } | 1862 | } |
| 1923 | 1863 | ||
| 1924 | - | ||
| 1925 | - | ||
| 1926 | // #eagleMapContainer { | 1864 | // #eagleMapContainer { |
| 1927 | // overflow-y: auto; | 1865 | // overflow-y: auto; |
| 1928 | // margin-top: 10px; | 1866 | // margin-top: 10px; | ... | ... |
| ... | @@ -31,7 +31,14 @@ | ... | @@ -31,7 +31,14 @@ |
| 31 | :pageSizes="[20, 30, 50, 100]" | 31 | :pageSizes="[20, 30, 50, 100]" |
| 32 | :totalCount="0" | 32 | :totalCount="0" |
| 33 | :loading="tableLoading" | 33 | :loading="tableLoading" |
| 34 | - :emptyText="(loadingDatas && !rowData.popoverData.length) ? '数据加载中' : $t('portEntry.emptyText')" | 34 | + :emptyText=" |
| 35 | + loadingDatas && | ||
| 36 | + rowData && | ||
| 37 | + rowData.popoverData && | ||
| 38 | + !rowData.popoverData.length | ||
| 39 | + ? '数据加载中' | ||
| 40 | + : $t('portEntry.emptyText') | ||
| 41 | + " | ||
| 35 | height="350px" | 42 | height="350px" |
| 36 | maxHeight="500px" | 43 | maxHeight="500px" |
| 37 | rowKey="id" | 44 | rowKey="id" |
| ... | @@ -82,20 +89,20 @@ export default { | ... | @@ -82,20 +89,20 @@ export default { |
| 82 | }, | 89 | }, |
| 83 | data() { | 90 | data() { |
| 84 | return { | 91 | return { |
| 85 | - tableLoading: false | 92 | + tableLoading: false, |
| 86 | }; | 93 | }; |
| 87 | }, | 94 | }, |
| 88 | - computed:{ | 95 | + computed: { |
| 89 | - loadingDatas(){ | 96 | + loadingDatas() { |
| 90 | - return this.$store.state.viewOption.loadingDatas | 97 | + return this.$store.state.viewOption.loadingDatas; |
| 91 | - } | 98 | + }, |
| 92 | }, | 99 | }, |
| 93 | methods: { | 100 | methods: { |
| 94 | //弹框关闭 | 101 | //弹框关闭 |
| 95 | popoverClose() { | 102 | popoverClose() { |
| 96 | this.$emit("popoverClose"); | 103 | this.$emit("popoverClose"); |
| 97 | this.parentDom.$refs.tables.$refs.bodyWrapper.style.overflowY = "auto"; | 104 | this.parentDom.$refs.tables.$refs.bodyWrapper.style.overflowY = "auto"; |
| 98 | - this.$store.dispatch('setLoadingState', true) | 105 | + this.$store.dispatch("setLoadingState", true); |
| 99 | }, | 106 | }, |
| 100 | //弹框状态改版 | 107 | //弹框状态改版 |
| 101 | popoverChange(data, type) { | 108 | popoverChange(data, type) { | ... | ... |
| 1 | -import Vue from 'vue' | 1 | +import Vue from "vue"; |
| 2 | -import Router from 'vue-router' | 2 | +import Router from "vue-router"; |
| 3 | 3 | ||
| 4 | -Vue.use(Router) | 4 | +Vue.use(Router); |
| 5 | 5 | ||
| 6 | /* Layout */ | 6 | /* Layout */ |
| 7 | -import Layout from '@/layout' | 7 | +import Layout from "@/layout"; |
| 8 | -import ParentView from '@/components/ParentView'; | 8 | +import ParentView from "@/components/ParentView"; |
| 9 | 9 | ||
| 10 | /** | 10 | /** |
| 11 | * Note: 路由配置项 | 11 | * Note: 路由配置项 |
| ... | @@ -28,37 +28,37 @@ import ParentView from '@/components/ParentView'; | ... | @@ -28,37 +28,37 @@ import ParentView from '@/components/ParentView'; |
| 28 | // 公共路由 | 28 | // 公共路由 |
| 29 | export const constantRoutes = [ | 29 | export const constantRoutes = [ |
| 30 | { | 30 | { |
| 31 | - path: '/redirect', | 31 | + path: "/redirect", |
| 32 | component: Layout, | 32 | component: Layout, |
| 33 | hidden: true, | 33 | hidden: true, |
| 34 | children: [ | 34 | children: [ |
| 35 | { | 35 | { |
| 36 | - path: '/redirect/:path(.*)', | 36 | + path: "/redirect/:path(.*)", |
| 37 | - component: (resolve) => require(['@/views/redirect'], resolve) | 37 | + component: (resolve) => require(["@/views/redirect"], resolve), |
| 38 | - } | 38 | + }, |
| 39 | - ] | 39 | + ], |
| 40 | }, | 40 | }, |
| 41 | { | 41 | { |
| 42 | - path: '/404', | 42 | + path: "/404", |
| 43 | - component: (resolve) => require(['@/views/error/404'], resolve), | 43 | + component: (resolve) => require(["@/views/error/404"], resolve), |
| 44 | - hidden: true | 44 | + hidden: true, |
| 45 | }, | 45 | }, |
| 46 | { | 46 | { |
| 47 | - path: '/401', | 47 | + path: "/401", |
| 48 | - component: (resolve) => require(['@/views/error/401'], resolve), | 48 | + component: (resolve) => require(["@/views/error/401"], resolve), |
| 49 | - hidden: true | 49 | + hidden: true, |
| 50 | }, | 50 | }, |
| 51 | { | 51 | { |
| 52 | - path: '/login', | 52 | + path: "/login", |
| 53 | - component: (resolve) => require(['@/views/login'], resolve), | 53 | + component: (resolve) => require(["@/views/login"], resolve), |
| 54 | hidden: true, | 54 | hidden: true, |
| 55 | - meta: { noCache: true } | 55 | + meta: { noCache: true }, |
| 56 | }, | 56 | }, |
| 57 | { | 57 | { |
| 58 | - path: '/relogin', | 58 | + path: "/relogin", |
| 59 | - component: (resolve) => require(['@/views/redjrectLogin'], resolve), | 59 | + component: (resolve) => require(["@/views/redjrectLogin"], resolve), |
| 60 | hidden: true, | 60 | hidden: true, |
| 61 | - meta: { noCache: true, breadcrumb: false } | 61 | + meta: { noCache: true, breadcrumb: false }, |
| 62 | }, | 62 | }, |
| 63 | // { | 63 | // { |
| 64 | // path: '', | 64 | // path: '', |
| ... | @@ -82,10 +82,10 @@ export const constantRoutes = [ | ... | @@ -82,10 +82,10 @@ export const constantRoutes = [ |
| 82 | // ] | 82 | // ] |
| 83 | // }, | 83 | // }, |
| 84 | { | 84 | { |
| 85 | - path: '/reporting', | 85 | + path: "/reporting", |
| 86 | component: Layout, | 86 | component: Layout, |
| 87 | hidden: false, | 87 | hidden: false, |
| 88 | - meta: { title: '申报数据管理', icon: 'upload' }, | 88 | + meta: { title: "申报数据管理", icon: "upload" }, |
| 89 | children: [ | 89 | children: [ |
| 90 | // { | 90 | // { |
| 91 | // path: '/reportingData', | 91 | // path: '/reportingData', |
| ... | @@ -95,19 +95,20 @@ export const constantRoutes = [ | ... | @@ -95,19 +95,20 @@ export const constantRoutes = [ |
| 95 | // meta: { title: '申报数据管理', icon: 'upload' } | 95 | // meta: { title: '申报数据管理', icon: 'upload' } |
| 96 | // }, | 96 | // }, |
| 97 | { | 97 | { |
| 98 | - path: '/editReportingData', | 98 | + path: "/editReportingData", |
| 99 | - component: (resolve) => require(['@/views/editReportingData/index'], resolve), | 99 | + component: (resolve) => |
| 100 | + require(["@/views/editReportingData/index"], resolve), | ||
| 100 | hidden: true, | 101 | hidden: true, |
| 101 | - name: 'EditReportingData', | 102 | + name: "EditReportingData", |
| 102 | - meta: { title: '申报数据编辑', icon: 'edit' } | 103 | + meta: { title: "申报数据编辑", icon: "edit" }, |
| 103 | }, | 104 | }, |
| 104 | - ] | 105 | + ], |
| 105 | }, | 106 | }, |
| 106 | { | 107 | { |
| 107 | - path: '/export', | 108 | + path: "/export", |
| 108 | component: Layout, | 109 | component: Layout, |
| 109 | hidden: false, | 110 | hidden: false, |
| 110 | - meta: { title: '查询管理', icon: 'fedexExportIcon' }, | 111 | + meta: { title: "查询管理", icon: "fedexExportIcon" }, |
| 111 | children: [ | 112 | children: [ |
| 112 | // { | 113 | // { |
| 113 | // path: '/exportBillQuery', | 114 | // path: '/exportBillQuery', |
| ... | @@ -117,25 +118,28 @@ export const constantRoutes = [ | ... | @@ -117,25 +118,28 @@ export const constantRoutes = [ |
| 117 | // meta: { title: '出口订单查询', icon: '' }, | 118 | // meta: { title: '出口订单查询', icon: '' }, |
| 118 | // }, | 119 | // }, |
| 119 | { | 120 | { |
| 120 | - path: '/exportBillDetail', | 121 | + path: "/exportBillDetail", |
| 121 | - component: (resolve) => require(['@/views/exportBillDetail/index'], resolve), | 122 | + component: (resolve) => |
| 123 | + require(["@/views/exportBillDetail/index"], resolve), | ||
| 122 | hidden: true, | 124 | hidden: true, |
| 123 | - name: 'ExportBillDetail', | 125 | + name: "ExportBillDetail", |
| 124 | - meta: { title: '出口订单详情', icon: '' }, | 126 | + meta: { title: "出口订单详情", icon: "" }, |
| 125 | }, | 127 | }, |
| 126 | { | 128 | { |
| 127 | - path: '/exportTransportDetail', | 129 | + path: "/exportTransportDetail", |
| 128 | - component: (resolve) => require(['@/views/exportTransportDetail/index'], resolve), | 130 | + component: (resolve) => |
| 131 | + require(["@/views/exportTransportDetail/index"], resolve), | ||
| 129 | hidden: true, | 132 | hidden: true, |
| 130 | - name: 'ExportTransportDetail', | 133 | + name: "ExportTransportDetail", |
| 131 | - meta: { title: '出口运单详情', icon: '' }, | 134 | + meta: { title: "出口运单详情", icon: "" }, |
| 132 | }, | 135 | }, |
| 133 | { | 136 | { |
| 134 | - path: '/exportListDetail', | 137 | + path: "/exportListDetail", |
| 135 | - component: (resolve) => require(['@/views/exportListDetail/index'], resolve), | 138 | + component: (resolve) => |
| 139 | + require(["@/views/exportListDetail/index"], resolve), | ||
| 136 | hidden: true, | 140 | hidden: true, |
| 137 | - name: 'ExportListDetail', | 141 | + name: "ExportListDetail", |
| 138 | - meta: { title: '出口清单详情', icon: '' }, | 142 | + meta: { title: "出口清单详情", icon: "" }, |
| 139 | }, | 143 | }, |
| 140 | // { | 144 | // { |
| 141 | // path: '/exportTransportBillQuery', | 145 | // path: '/exportTransportBillQuery', |
| ... | @@ -159,18 +163,20 @@ export const constantRoutes = [ | ... | @@ -159,18 +163,20 @@ export const constantRoutes = [ |
| 159 | // meta: { title: '清单总分单查询', icon: '' } | 163 | // meta: { title: '清单总分单查询', icon: '' } |
| 160 | // }, | 164 | // }, |
| 161 | { | 165 | { |
| 162 | - path: '/listBranchDetail', | 166 | + path: "/listBranchDetail", |
| 163 | - component: (resolve) => require(['@/views/listBranchDetail/index'], resolve), | 167 | + component: (resolve) => |
| 164 | - name: 'ListBranchDetail', | 168 | + require(["@/views/listBranchDetail/index"], resolve), |
| 169 | + name: "ListBranchDetail", | ||
| 165 | hidden: true, | 170 | hidden: true, |
| 166 | - meta: { title: '清单总分单详情', icon: '' } | 171 | + meta: { title: "清单总分单详情", icon: "" }, |
| 167 | }, | 172 | }, |
| 168 | { | 173 | { |
| 169 | - path: '/logisticsExitDetail', | 174 | + path: "/logisticsExitDetail", |
| 170 | - component: (resolve) => require(['@/views/logisticsExitDetail/index'], resolve), | 175 | + component: (resolve) => |
| 171 | - name: 'LogisticsExitDetail', | 176 | + require(["@/views/logisticsExitDetail/index"], resolve), |
| 177 | + name: "LogisticsExitDetail", | ||
| 172 | hidden: true, | 178 | hidden: true, |
| 173 | - meta: { title: '物流离境单详情', icon: '' } | 179 | + meta: { title: "物流离境单详情", icon: "" }, |
| 174 | }, | 180 | }, |
| 175 | // { | 181 | // { |
| 176 | // path: '/logisticsExitQuery', | 182 | // path: '/logisticsExitQuery', |
| ... | @@ -184,20 +190,20 @@ export const constantRoutes = [ | ... | @@ -184,20 +190,20 @@ export const constantRoutes = [ |
| 184 | // name: 'ExportRevokeBillQuery', | 190 | // name: 'ExportRevokeBillQuery', |
| 185 | // meta: { title: '出口撤销单查询', icon: '' } | 191 | // meta: { title: '出口撤销单查询', icon: '' } |
| 186 | // } | 192 | // } |
| 187 | - ] | 193 | + ], |
| 188 | }, | 194 | }, |
| 189 | { | 195 | { |
| 190 | - path: '/summary', | 196 | + path: "/summary", |
| 191 | component: Layout, | 197 | component: Layout, |
| 192 | hidden: false, | 198 | hidden: false, |
| 193 | - meta: { title: '汇总申报', icon: 'fedexSummary' }, | 199 | + meta: { title: "汇总申报", icon: "fedexSummary" }, |
| 194 | children: [ | 200 | children: [ |
| 195 | { | 201 | { |
| 196 | - path: '/summary', | 202 | + path: "/summary", |
| 197 | - component: (resolve) => require(['@/views/summaryEdit/index'], resolve), | 203 | + component: (resolve) => require(["@/views/summaryEdit/index"], resolve), |
| 198 | hidden: false, | 204 | hidden: false, |
| 199 | - name: 'Summary', | 205 | + name: "Summary", |
| 200 | - meta: { title: '汇总申报', icon: '' } | 206 | + meta: { title: "汇总申报", icon: "" }, |
| 201 | }, | 207 | }, |
| 202 | // { | 208 | // { |
| 203 | // path: '/summaryDataSearch', | 209 | // path: '/summaryDataSearch', |
| ... | @@ -207,13 +213,14 @@ export const constantRoutes = [ | ... | @@ -207,13 +213,14 @@ export const constantRoutes = [ |
| 207 | // meta: { title: '汇总申请单查询', icon: '' } | 213 | // meta: { title: '汇总申请单查询', icon: '' } |
| 208 | // } | 214 | // } |
| 209 | { | 215 | { |
| 210 | - path: '/summaryDetail', | 216 | + path: "/summaryDetail", |
| 211 | - component: (resolve) => require(['@/views/summaryDetail/index'], resolve), | 217 | + component: (resolve) => |
| 212 | - name: 'SummaryDetail', | 218 | + require(["@/views/summaryDetail/index"], resolve), |
| 219 | + name: "SummaryDetail", | ||
| 213 | hidden: true, | 220 | hidden: true, |
| 214 | - meta: { title: '汇总申请单详情', icon: '' } | 221 | + meta: { title: "汇总申请单详情", icon: "" }, |
| 215 | - } | 222 | + }, |
| 216 | - ] | 223 | + ], |
| 217 | }, | 224 | }, |
| 218 | // { | 225 | // { |
| 219 | // path: '/system', | 226 | // path: '/system', |
| ... | @@ -256,13 +263,13 @@ export const constantRoutes = [ | ... | @@ -256,13 +263,13 @@ export const constantRoutes = [ |
| 256 | // name: 'RoleConfig', | 263 | // name: 'RoleConfig', |
| 257 | // meta: { title: '角色管理权限', icon: '' } | 264 | // meta: { title: '角色管理权限', icon: '' } |
| 258 | // }, | 265 | // }, |
| 266 | + // 监管场所管理 supervise-place-manage | ||
| 259 | // ] | 267 | // ] |
| 260 | // }, | 268 | // }, |
| 261 | -] | 269 | +]; |
| 262 | 270 | ||
| 263 | export default new Router({ | 271 | export default new Router({ |
| 264 | - mode: 'hash', // 去掉url中的# | 272 | + mode: "hash", // 去掉url中的# |
| 265 | scrollBehavior: () => ({ y: 0 }), | 273 | scrollBehavior: () => ({ y: 0 }), |
| 266 | - routes: constantRoutes | 274 | + routes: constantRoutes, |
| 267 | -}) | 275 | +}); |
| 268 | - | ... | ... |
src/views/menu-list/dialog.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <el-dialog | ||
| 3 | + class="entryDialog classCUploadDialog" | ||
| 4 | + :title="title" | ||
| 5 | + :visible.sync="outerVisible" | ||
| 6 | + :show-close="false" | ||
| 7 | + width="25%" | ||
| 8 | + :close-on-click-modal="false" | ||
| 9 | + :destroy-on-close="true" | ||
| 10 | + v-loading="loadings.dialogLoading" | ||
| 11 | + @close="close" | ||
| 12 | + > | ||
| 13 | + <div class="modelItem"> | ||
| 14 | + <el-form | ||
| 15 | + v-if="type != 'menuChange'" | ||
| 16 | + class="fedexFormStyle" | ||
| 17 | + ref="formData" | ||
| 18 | + :model="formData" | ||
| 19 | + :rules="rules" | ||
| 20 | + label-position="top" | ||
| 21 | + size="small" | ||
| 22 | + > | ||
| 23 | + <Formitem label="上级名称" prop="parentMenuId" type="edit"> | ||
| 24 | + <el-input | ||
| 25 | + type="text" | ||
| 26 | + class="inputShadow" | ||
| 27 | + id="inputInner-edit-roleName" | ||
| 28 | + resize="none" | ||
| 29 | + v-model="formData.parentMenuId" | ||
| 30 | + clearable | ||
| 31 | + placeholder="" | ||
| 32 | + ></el-input> | ||
| 33 | + </Formitem> | ||
| 34 | + <Formitem label="菜单名称" prop="menuName" type="edit"> | ||
| 35 | + <el-input | ||
| 36 | + type="text" | ||
| 37 | + class="inputShadow" | ||
| 38 | + id="inputInner-edit-roleName" | ||
| 39 | + resize="none" | ||
| 40 | + v-model="formData.menuName" | ||
| 41 | + clearable | ||
| 42 | + placeholder="" | ||
| 43 | + ></el-input> | ||
| 44 | + </Formitem> | ||
| 45 | + | ||
| 46 | + <Formitem label="菜单名称" prop="menuName" type="edit"> | ||
| 47 | + <el-input | ||
| 48 | + type="text" | ||
| 49 | + class="inputShadow" | ||
| 50 | + id="inputInner-edit-roleName" | ||
| 51 | + resize="none" | ||
| 52 | + v-model="formData.menuName" | ||
| 53 | + clearable | ||
| 54 | + placeholder="" | ||
| 55 | + ></el-input> | ||
| 56 | + </Formitem> | ||
| 57 | + <Formitem label="菜单名称" prop="menuName" type="edit"> | ||
| 58 | + <el-input | ||
| 59 | + type="text" | ||
| 60 | + class="inputShadow" | ||
| 61 | + id="inputInner-edit-roleName" | ||
| 62 | + resize="none" | ||
| 63 | + v-model="formData.menuName" | ||
| 64 | + clearable | ||
| 65 | + placeholder="" | ||
| 66 | + ></el-input> | ||
| 67 | + </Formitem> | ||
| 68 | + </el-form> | ||
| 69 | + <el-tree | ||
| 70 | + ref="tree" | ||
| 71 | + class="menuTree" | ||
| 72 | + v-else | ||
| 73 | + :data="treeData" | ||
| 74 | + show-checkbox | ||
| 75 | + default-expand-all | ||
| 76 | + node-key="id" | ||
| 77 | + :default-expanded-keys="expandedKeys" | ||
| 78 | + :default-checked-keys="checkedKeys" | ||
| 79 | + :props="defaultProps" | ||
| 80 | + @check="treeCheckChange" | ||
| 81 | + > | ||
| 82 | + </el-tree> | ||
| 83 | + </div> | ||
| 84 | + <div class="dialogOption entrySave"> | ||
| 85 | + <el-button | ||
| 86 | + class="entrySaveButton" | ||
| 87 | + :disabled="loadings.submitLoading" | ||
| 88 | + @click="submit" | ||
| 89 | + >确 定</el-button | ||
| 90 | + > | ||
| 91 | + <el-button | ||
| 92 | + class="entrySaveButton" | ||
| 93 | + :disabled="loadings.uploadLoading" | ||
| 94 | + @click="close" | ||
| 95 | + >关 闭</el-button | ||
| 96 | + > | ||
| 97 | + </div> | ||
| 98 | + </el-dialog> | ||
| 99 | +</template> | ||
| 100 | + | ||
| 101 | +<script> | ||
| 102 | +import { | ||
| 103 | + addRoleData, | ||
| 104 | + updateRoleData, | ||
| 105 | + updateRoleMenuData, | ||
| 106 | + getMenuByRoleId, | ||
| 107 | +} from "@/api/system/user.js"; | ||
| 108 | +import { getRouters } from "@/api/menu"; | ||
| 109 | +export default { | ||
| 110 | + props: { | ||
| 111 | + outerVisible: { | ||
| 112 | + type: Boolean, | ||
| 113 | + default: false, | ||
| 114 | + }, | ||
| 115 | + title: { | ||
| 116 | + type: String, | ||
| 117 | + default: "新增角色", | ||
| 118 | + }, | ||
| 119 | + type: { | ||
| 120 | + type: String, | ||
| 121 | + default: "", | ||
| 122 | + }, | ||
| 123 | + active: { | ||
| 124 | + type: Object, | ||
| 125 | + default: null, | ||
| 126 | + }, | ||
| 127 | + }, | ||
| 128 | + watch: { | ||
| 129 | + outerVisible(val) { | ||
| 130 | + if (val) { | ||
| 131 | + this.loadings.dialogLoading = false; | ||
| 132 | + if (this.type == "update") { | ||
| 133 | + this.formData = this.active; | ||
| 134 | + } else if (this.type == "menuChange") { | ||
| 135 | + this.formData = this.active; | ||
| 136 | + this.searchTreeData(); | ||
| 137 | + this.loadCheckedKeys(); //加载已绑定的菜单 | ||
| 138 | + } | ||
| 139 | + } | ||
| 140 | + }, | ||
| 141 | + }, | ||
| 142 | + data() { | ||
| 143 | + return { | ||
| 144 | + formData: { | ||
| 145 | + menuName: "", | ||
| 146 | + icon: "", | ||
| 147 | + order: 0, | ||
| 148 | + parentMenuId: 0, //父级菜单id | ||
| 149 | + physicalUrl: "", //前端地址 | ||
| 150 | + url: "", //后端地址 | ||
| 151 | + }, | ||
| 152 | + treeData: [], | ||
| 153 | + treeCheckData: [], | ||
| 154 | + expandedKeys: [], | ||
| 155 | + checkedKeys: [], | ||
| 156 | + rules: { | ||
| 157 | + menuName: [ | ||
| 158 | + { | ||
| 159 | + required: true, | ||
| 160 | + trigger: "blur", | ||
| 161 | + message: "菜单名称不能为空!", | ||
| 162 | + }, | ||
| 163 | + ], | ||
| 164 | + }, | ||
| 165 | + defaultProps: { | ||
| 166 | + children: "children", | ||
| 167 | + label: "label", | ||
| 168 | + }, | ||
| 169 | + searchForm: {}, | ||
| 170 | + loadings: { | ||
| 171 | + dialogLoading: false, | ||
| 172 | + uploadLoading: false, | ||
| 173 | + submitLoading: false, | ||
| 174 | + }, | ||
| 175 | + loadingText: "", | ||
| 176 | + }; | ||
| 177 | + }, | ||
| 178 | + methods: { | ||
| 179 | + //查询菜单数据 | ||
| 180 | + searchTreeData() { | ||
| 181 | + this.loadings.dialogLoading = true; | ||
| 182 | + getRouters() | ||
| 183 | + .then((res) => { | ||
| 184 | + if (res.code === "200") { | ||
| 185 | + let arr = []; | ||
| 186 | + res.data.forEach((item) => { | ||
| 187 | + let status = true; | ||
| 188 | + if (item.parentMenuId == 0) { | ||
| 189 | + let obj = { | ||
| 190 | + id: item.menuId, | ||
| 191 | + label: item.menuName, | ||
| 192 | + children: [], | ||
| 193 | + }; | ||
| 194 | + arr.forEach((menuItem) => { | ||
| 195 | + if (menuItem.id == item.menuId) { | ||
| 196 | + status = false; | ||
| 197 | + menuItem.label = item.menuName; | ||
| 198 | + } | ||
| 199 | + }); | ||
| 200 | + if (status) { | ||
| 201 | + arr.push(obj); | ||
| 202 | + } | ||
| 203 | + } else { | ||
| 204 | + let obj = { | ||
| 205 | + id: item.menuId, | ||
| 206 | + label: item.menuName, | ||
| 207 | + }; | ||
| 208 | + arr.forEach((menuItem) => { | ||
| 209 | + if (menuItem.id == item.parentMenuId) { | ||
| 210 | + status = false; | ||
| 211 | + menuItem.children.push(obj); | ||
| 212 | + } | ||
| 213 | + }); | ||
| 214 | + if (status) { | ||
| 215 | + arr.push({ | ||
| 216 | + id: item.parentMenuId, | ||
| 217 | + label: "", | ||
| 218 | + children: [obj], | ||
| 219 | + }); | ||
| 220 | + } | ||
| 221 | + } | ||
| 222 | + }); | ||
| 223 | + this.treeData = arr; | ||
| 224 | + } else { | ||
| 225 | + this.alertWarningMsg(res.message); | ||
| 226 | + } | ||
| 227 | + this.loadings.dialogLoading = false; | ||
| 228 | + }) | ||
| 229 | + .catch((err) => { | ||
| 230 | + console.log(err); | ||
| 231 | + this.loadings.dialogLoading = false; | ||
| 232 | + }); | ||
| 233 | + }, | ||
| 234 | + //数据保存 | ||
| 235 | + submit() { | ||
| 236 | + this.loadings.dialogLoading = true; | ||
| 237 | + let obj = {}; | ||
| 238 | + if (this.type == "add") { | ||
| 239 | + this.$refs.formData.validate((valid) => { | ||
| 240 | + if (valid) { | ||
| 241 | + obj.menuName = this.formData.menuName; | ||
| 242 | + this.addapi(obj); | ||
| 243 | + } else { | ||
| 244 | + this.loadings.dialogLoading = false; | ||
| 245 | + } | ||
| 246 | + }); | ||
| 247 | + } else if (this.type == "update") { | ||
| 248 | + this.$refs.formData.validate((valid) => { | ||
| 249 | + if (valid) { | ||
| 250 | + obj.roleId = this.formData.roleId; | ||
| 251 | + obj.menuName = this.formData.menuName; | ||
| 252 | + this.updateapi(obj); | ||
| 253 | + } else { | ||
| 254 | + this.loadings.dialogLoading = false; | ||
| 255 | + } | ||
| 256 | + }); | ||
| 257 | + } else if (this.type == "menuChange") { | ||
| 258 | + obj.menuId = this.treeCheckData; // 使用合并后的选中节点 | ||
| 259 | + obj.roleId = this.formData.roleId; | ||
| 260 | + this.menuChangeapi(obj); | ||
| 261 | + } | ||
| 262 | + }, | ||
| 263 | + //新增 | ||
| 264 | + addapi(val) { | ||
| 265 | + addRoleData(val) | ||
| 266 | + .then((res) => { | ||
| 267 | + if (res.code === "200") { | ||
| 268 | + this.msgSuccess(res.message); | ||
| 269 | + this.close(); | ||
| 270 | + } else { | ||
| 271 | + this.alertWarningMsg(res.message); | ||
| 272 | + this.loadings.dialogLoading = false; | ||
| 273 | + } | ||
| 274 | + }) | ||
| 275 | + .catch((err) => { | ||
| 276 | + console.log(err); | ||
| 277 | + this.loadings.dialogLoading = false; | ||
| 278 | + }); | ||
| 279 | + }, | ||
| 280 | + //修改 | ||
| 281 | + updateapi(val) { | ||
| 282 | + updateRoleData(val) | ||
| 283 | + .then((res) => { | ||
| 284 | + if (res.code === "200") { | ||
| 285 | + this.msgSuccess(res.message); | ||
| 286 | + this.close(); | ||
| 287 | + } else { | ||
| 288 | + this.alertWarningMsg(res.message); | ||
| 289 | + this.loadings.dialogLoading = false; | ||
| 290 | + } | ||
| 291 | + }) | ||
| 292 | + .catch((err) => { | ||
| 293 | + console.log(err); | ||
| 294 | + this.loadings.dialogLoading = false; | ||
| 295 | + }); | ||
| 296 | + }, | ||
| 297 | + //菜单权限修改 | ||
| 298 | + menuChangeapi(val) { | ||
| 299 | + updateRoleMenuData(val) | ||
| 300 | + .then((res) => { | ||
| 301 | + if (res.code === "200") { | ||
| 302 | + this.msgSuccess(res.message); | ||
| 303 | + this.close(); | ||
| 304 | + this.$store.dispatch("GenerateRoutes"); | ||
| 305 | + } else { | ||
| 306 | + this.alertWarningMsg(res.message); | ||
| 307 | + this.loadings.dialogLoading = false; | ||
| 308 | + } | ||
| 309 | + }) | ||
| 310 | + .catch((err) => { | ||
| 311 | + console.log(err); | ||
| 312 | + this.loadings.dialogLoading = false; | ||
| 313 | + }); | ||
| 314 | + }, | ||
| 315 | + treeCheckChange(data, checked) { | ||
| 316 | + console.log(data, checked); | ||
| 317 | + let arr = []; | ||
| 318 | + arr = checked.checkedKeys.concat(checked.halfCheckedKeys); | ||
| 319 | + this.treeCheckData = arr; | ||
| 320 | + }, | ||
| 321 | + close() { | ||
| 322 | + this.formData = { | ||
| 323 | + menuName: "", | ||
| 324 | + }; | ||
| 325 | + this.checkedKeys = []; | ||
| 326 | + this.$emit("close"); | ||
| 327 | + }, | ||
| 328 | + // 加载已绑定的菜单 | ||
| 329 | + loadCheckedKeys() { | ||
| 330 | + if (this.formData.roleId) { | ||
| 331 | + getMenuByRoleId(this.formData.roleId) | ||
| 332 | + .then((res) => { | ||
| 333 | + if (res.code === "200") { | ||
| 334 | + this.checkedKeys = res.data | ||
| 335 | + .filter((item) => item.isBinding && item.parentMenuId != 0) | ||
| 336 | + .map((item) => item.menuId); | ||
| 337 | + //console.log('初始 checkedKeys:', this.checkedKeys); | ||
| 338 | + this.$nextTick(() => { | ||
| 339 | + this.$refs.tree.setCheckedKeys(this.checkedKeys); | ||
| 340 | + this.updateTreeCheckData(); | ||
| 341 | + }); | ||
| 342 | + } else { | ||
| 343 | + this.alertWarningMsg(res.message); | ||
| 344 | + } | ||
| 345 | + }) | ||
| 346 | + .catch((err) => { | ||
| 347 | + console.log(err); | ||
| 348 | + }); | ||
| 349 | + } | ||
| 350 | + }, | ||
| 351 | + //加载选中的节点及半选中的父节点 | ||
| 352 | + updateTreeCheckData() { | ||
| 353 | + const checkedKeys = this.$refs.tree.getCheckedKeys(); | ||
| 354 | + const halfCheckedKeys = this.$refs.tree.getHalfCheckedKeys(); | ||
| 355 | + this.treeCheckData = checkedKeys.concat(halfCheckedKeys); | ||
| 356 | + //console.log('合并后的 treeCheckData:', this.treeCheckData); | ||
| 357 | + }, | ||
| 358 | + }, | ||
| 359 | +}; | ||
| 360 | +</script> | ||
| 361 | + | ||
| 362 | +<style lang="scss" scoped> | ||
| 363 | +@import "@/assets/styles/variables.scss"; | ||
| 364 | + | ||
| 365 | +.menuTree { | ||
| 366 | + max-width: 350px; | ||
| 367 | + max-height: 300px; | ||
| 368 | + overflow: auto; | ||
| 369 | + margin: 0 auto; | ||
| 370 | + border: 1px solid #999; | ||
| 371 | + padding: 10px; | ||
| 372 | +} | ||
| 373 | +</style> |
src/views/menu-list/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div class="entrySreach"> | ||
| 3 | + <el-form | ||
| 4 | + class="fedexFormStyle fedexformSreach fedexformSreachBottomBorder" | ||
| 5 | + ref="sreachForm" | ||
| 6 | + :model="sreachFormData" | ||
| 7 | + label-position="top" | ||
| 8 | + size="small" | ||
| 9 | + > | ||
| 10 | + <el-row class="row-border"> | ||
| 11 | + <!-- 角色名称 --> | ||
| 12 | + <el-col :span="5"> | ||
| 13 | + <Formitem label="菜单名称" prop="menuName"> | ||
| 14 | + <el-input | ||
| 15 | + type="text" | ||
| 16 | + class="inputShadow" | ||
| 17 | + id="inputInner--roleName" | ||
| 18 | + resize="none" | ||
| 19 | + v-model="sreachFormData.menuName" | ||
| 20 | + clearable | ||
| 21 | + placeholder="" | ||
| 22 | + ></el-input> | ||
| 23 | + </Formitem> | ||
| 24 | + </el-col> | ||
| 25 | + <el-col :span="2"> | ||
| 26 | + <el-form-item class="textCenter"> | ||
| 27 | + <el-button | ||
| 28 | + class="entrySreachButton" | ||
| 29 | + type="text" | ||
| 30 | + icon="el-icon-search" | ||
| 31 | + :loading="loadings.searchLoading" | ||
| 32 | + @click="search(0)" | ||
| 33 | + ></el-button> | ||
| 34 | + </el-form-item> | ||
| 35 | + </el-col> | ||
| 36 | + </el-row> | ||
| 37 | + </el-form> | ||
| 38 | + <div class="optionButton"> | ||
| 39 | + <el-button | ||
| 40 | + class="entrySaveButton" | ||
| 41 | + icon="el-icon-plus" | ||
| 42 | + size="small" | ||
| 43 | + @click="addHandle" | ||
| 44 | + > | ||
| 45 | + 新增菜单 | ||
| 46 | + </el-button> | ||
| 47 | + </div> | ||
| 48 | + <Table | ||
| 49 | + class="fedexDetialTable fedexSreachTable" | ||
| 50 | + ref="entryTable" | ||
| 51 | + :data="tableData" | ||
| 52 | + :headerData="headerData" | ||
| 53 | + :maxHeight="tableMaxheight" | ||
| 54 | + :border="true" | ||
| 55 | + :pagination="true" | ||
| 56 | + :order="false" | ||
| 57 | + :loading="loadings.searchLoading" | ||
| 58 | + :page="page.pageIndex" | ||
| 59 | + :pageSizes="[20, 30, 50, 100]" | ||
| 60 | + :totalCount="page.total" | ||
| 61 | + @sizeChange="sizeChange" | ||
| 62 | + @currentChange="currentChange" | ||
| 63 | + :selection="false" | ||
| 64 | + :selectFixed="false" | ||
| 65 | + :rowSelectDataType="false" | ||
| 66 | + > | ||
| 67 | + <template slot="optionColumn"> | ||
| 68 | + <el-table-column align="left" label="操作"> | ||
| 69 | + <template slot-scope="scope"> | ||
| 70 | + <el-button type="text" @click="update(scope.row)"> | ||
| 71 | + 角色修改 | ||
| 72 | + </el-button> | ||
| 73 | + <el-button type="text" @click="muenChange(scope.row)"> | ||
| 74 | + 权限绑定 | ||
| 75 | + </el-button> | ||
| 76 | + </template> | ||
| 77 | + </el-table-column> | ||
| 78 | + </template> | ||
| 79 | + </Table> | ||
| 80 | + <DialogVue | ||
| 81 | + :outerVisible="outerVisible" | ||
| 82 | + :title="dialogTitle" | ||
| 83 | + :type="editType" | ||
| 84 | + :active="activeData" | ||
| 85 | + @close="dialogClose" | ||
| 86 | + /> | ||
| 87 | + </div> | ||
| 88 | +</template> | ||
| 89 | + | ||
| 90 | +<script> | ||
| 91 | +import { getRoleList } from "@/api/system/user.js"; | ||
| 92 | +import DialogVue from "./dialog.vue"; | ||
| 93 | +import { addMenu, deleteMenu } from "@/api/menu"; | ||
| 94 | + | ||
| 95 | +export default { | ||
| 96 | + name: "SupervisePlaceManage", | ||
| 97 | + components: { | ||
| 98 | + DialogVue, | ||
| 99 | + }, | ||
| 100 | + data() { | ||
| 101 | + return { | ||
| 102 | + sreachFormData: { | ||
| 103 | + menuName: "", | ||
| 104 | + }, | ||
| 105 | + page: { | ||
| 106 | + pageIndex: 1, | ||
| 107 | + pageSize: 20, | ||
| 108 | + total: 0, | ||
| 109 | + }, | ||
| 110 | + activeData: null, | ||
| 111 | + tableData: [], | ||
| 112 | + headerData: [ | ||
| 113 | + { | ||
| 114 | + name: "角色名", | ||
| 115 | + value: "roleName", | ||
| 116 | + width: "", | ||
| 117 | + align: "left", | ||
| 118 | + }, | ||
| 119 | + ], | ||
| 120 | + loadings: { | ||
| 121 | + searchLoading: false, | ||
| 122 | + }, | ||
| 123 | + tableMaxheight: null, | ||
| 124 | + outerVisible: false, | ||
| 125 | + dialogTitle: "", | ||
| 126 | + editType: "", | ||
| 127 | + }; | ||
| 128 | + }, | ||
| 129 | + created() { | ||
| 130 | + this.search(0); | ||
| 131 | + }, | ||
| 132 | + mounted() { | ||
| 133 | + this.tableMaxheight = window.innerHeight - 300; | ||
| 134 | + }, | ||
| 135 | + methods: { | ||
| 136 | + //查询 | ||
| 137 | + search(val) { | ||
| 138 | + this.loadings.searchLoading = true; | ||
| 139 | + if (val == 0) { | ||
| 140 | + this.page.pageIndex = 1; | ||
| 141 | + } | ||
| 142 | + let obj = this.sreachFormData; | ||
| 143 | + obj.pageIndex = this.page.pageIndex; | ||
| 144 | + obj.pageSize = this.page.pageSize; | ||
| 145 | + getRoleList(obj) | ||
| 146 | + .then((res) => { | ||
| 147 | + if (res.code === "200") { | ||
| 148 | + this.tableData = res.data.value; | ||
| 149 | + this.page.total = res.data.totalItems; | ||
| 150 | + this.tableData.forEach((item, idx) => { | ||
| 151 | + item.index = idx; | ||
| 152 | + }); | ||
| 153 | + } else { | ||
| 154 | + this.alertWarningMsg(res.message); | ||
| 155 | + } | ||
| 156 | + this.loadings.searchLoading = false; | ||
| 157 | + }) | ||
| 158 | + .catch((err) => { | ||
| 159 | + console.log(err); | ||
| 160 | + this.loadings.searchLoading = false; | ||
| 161 | + }); | ||
| 162 | + }, | ||
| 163 | + addHandle() { | ||
| 164 | + // this.dialogTitle = "新增菜单"; | ||
| 165 | + // this.editType = "add"; | ||
| 166 | + // this.outerVisible = true; | ||
| 167 | + | ||
| 168 | + // let params = { | ||
| 169 | + // icon: "", | ||
| 170 | + // menuName: "监管场所管理", | ||
| 171 | + // order: 4.4, | ||
| 172 | + // parentMenuId: 90, | ||
| 173 | + // physicalUrl: "/supervise-place-manage", | ||
| 174 | + // url: "", | ||
| 175 | + // }; | ||
| 176 | + deleteMenu({ | ||
| 177 | + menuId: 1, | ||
| 178 | + }).then((res) => { | ||
| 179 | + console.log(res); | ||
| 180 | + }); | ||
| 181 | + // addMenu(params).then((res) => { | ||
| 182 | + // console.log(res); | ||
| 183 | + // }); | ||
| 184 | + }, | ||
| 185 | + update(val) { | ||
| 186 | + this.dialogTitle = "修改角色"; | ||
| 187 | + this.editType = "update"; | ||
| 188 | + this.outerVisible = true; | ||
| 189 | + this.activeData = val; | ||
| 190 | + }, | ||
| 191 | + muenChange(val) { | ||
| 192 | + this.dialogTitle = "绑定权限"; | ||
| 193 | + this.editType = "menuChange"; | ||
| 194 | + this.outerVisible = true; | ||
| 195 | + this.activeData = val; | ||
| 196 | + }, | ||
| 197 | + dialogClose() { | ||
| 198 | + this.outerVisible = false; | ||
| 199 | + this.activeData = null; | ||
| 200 | + this.search(1); | ||
| 201 | + }, | ||
| 202 | + //分页 | ||
| 203 | + currentChange(val) { | ||
| 204 | + this.page.pageIndex = val.page; | ||
| 205 | + this.search(1); | ||
| 206 | + }, | ||
| 207 | + sizeChange(val) { | ||
| 208 | + this.page.pageSize = val; | ||
| 209 | + this.search(1); | ||
| 210 | + }, | ||
| 211 | + input() { | ||
| 212 | + this.$forceUpdate(); | ||
| 213 | + }, | ||
| 214 | + }, | ||
| 215 | +}; | ||
| 216 | +</script> | ||
| 217 | + | ||
| 218 | +<style scoped lang="scss"> | ||
| 219 | +@import "@/assets/styles/variables.scss"; | ||
| 220 | +.entrySreach { | ||
| 221 | + height: 100%; | ||
| 222 | + background-color: $menuLightBg; | ||
| 223 | + | ||
| 224 | + .entrySreachButton { | ||
| 225 | + display: inline-block; | ||
| 226 | + font-size: 20px; | ||
| 227 | + color: $fedexButton !important; | ||
| 228 | + } | ||
| 229 | + | ||
| 230 | + .optionButton { | ||
| 231 | + padding: 10px; | ||
| 232 | + text-align: left; | ||
| 233 | + | ||
| 234 | + .el-button { | ||
| 235 | + color: $fedexButton; | ||
| 236 | + border-color: $fedexButton !important; | ||
| 237 | + | ||
| 238 | + svg { | ||
| 239 | + display: inline-block; | ||
| 240 | + margin-right: 5px; | ||
| 241 | + fill: $fedexButton; | ||
| 242 | + } | ||
| 243 | + } | ||
| 244 | + | ||
| 245 | + .entrySaveButton:hover, | ||
| 246 | + .entrySaveButton:focus { | ||
| 247 | + color: $menuLightBg !important; | ||
| 248 | + background-color: $fedexButton !important; | ||
| 249 | + } | ||
| 250 | + } | ||
| 251 | +} | ||
| 252 | + | ||
| 253 | +.texttareaTip { | ||
| 254 | + position: absolute; | ||
| 255 | + top: 52%; | ||
| 256 | + right: 20px; | ||
| 257 | + transform: translate(0, -50%); | ||
| 258 | + z-index: 10; | ||
| 259 | +} | ||
| 260 | +</style> |
| ... | @@ -137,6 +137,15 @@ | ... | @@ -137,6 +137,15 @@ |
| 137 | > | 137 | > |
| 138 | 批量修改 | 138 | 批量修改 |
| 139 | </el-button> | 139 | </el-button> |
| 140 | + <el-button | ||
| 141 | + class="entrySaveButton" | ||
| 142 | + size="small" | ||
| 143 | + icon="el-icon-download" | ||
| 144 | + v-loading="loadings.exportDeclareLoading" | ||
| 145 | + @click="downloadData" | ||
| 146 | + > | ||
| 147 | + 导出 | ||
| 148 | + </el-button> | ||
| 140 | </div> | 149 | </div> |
| 141 | <div class="optionButton-right"> | 150 | <div class="optionButton-right"> |
| 142 | <el-dropdown | 151 | <el-dropdown |
| ... | @@ -172,13 +181,31 @@ | ... | @@ -172,13 +181,31 @@ |
| 172 | > | 181 | > |
| 173 | </el-dropdown-menu> | 182 | </el-dropdown-menu> |
| 174 | </el-dropdown> | 183 | </el-dropdown> |
| 184 | + <!-- 运抵单申报按钮 --> | ||
| 185 | + <el-button | ||
| 186 | + size="small" | ||
| 187 | + type="primary" | ||
| 188 | + class="dropdown-style-button" | ||
| 189 | + :loading="loadings.departureLoading" | ||
| 190 | + @click=" | ||
| 191 | + declareData('departureLoading', '运抵单申报', 'logisticsDeparture') | ||
| 192 | + " | ||
| 193 | + > | ||
| 194 | + <svg-icon | ||
| 195 | + class="el-icon-user-solid" | ||
| 196 | + icon-class="fedexDeclareIcon" | ||
| 197 | + ></svg-icon> | ||
| 198 | + 运抵单申报 | ||
| 199 | + </el-button> | ||
| 175 | <!-- 离境单申报按钮 --> | 200 | <!-- 离境单申报按钮 --> |
| 176 | <el-button | 201 | <el-button |
| 177 | size="small" | 202 | size="small" |
| 178 | type="primary" | 203 | type="primary" |
| 179 | class="dropdown-style-button" | 204 | class="dropdown-style-button" |
| 180 | :loading="loadings.departureLoading" | 205 | :loading="loadings.departureLoading" |
| 181 | - @click="declareData('departureLoading', '离境单申报', 'logisticsDeparture')" | 206 | + @click=" |
| 207 | + declareData('departureLoading', '离境单申报', 'logisticsDeparture') | ||
| 208 | + " | ||
| 182 | > | 209 | > |
| 183 | <svg-icon | 210 | <svg-icon |
| 184 | class="el-icon-user-solid" | 211 | class="el-icon-user-solid" |
| ... | @@ -192,7 +219,7 @@ | ... | @@ -192,7 +219,7 @@ |
| 192 | type="primary" | 219 | type="primary" |
| 193 | class="dropdown-style-button" | 220 | class="dropdown-style-button" |
| 194 | :loading="loadings.revokeLoading" | 221 | :loading="loadings.revokeLoading" |
| 195 | - @click="declareData('revokeLoading', '撤销单申报' ,'cancellation')" | 222 | + @click="declareData('revokeLoading', '撤销单申报', 'cancellation')" |
| 196 | > | 223 | > |
| 197 | <svg-icon | 224 | <svg-icon |
| 198 | class="el-icon-user-solid" | 225 | class="el-icon-user-solid" |
| ... | @@ -200,18 +227,9 @@ | ... | @@ -200,18 +227,9 @@ |
| 200 | ></svg-icon> | 227 | ></svg-icon> |
| 201 | 撤销单申报 | 228 | 撤销单申报 |
| 202 | </el-button> | 229 | </el-button> |
| 203 | - <el-button | ||
| 204 | - class="entrySaveButton" | ||
| 205 | - size="small" | ||
| 206 | - icon="el-icon-download" | ||
| 207 | - v-loading="loadings.exportDeclareLoading" | ||
| 208 | - @click="downloadData" | ||
| 209 | - > | ||
| 210 | - 导出 | ||
| 211 | - </el-button> | ||
| 212 | </div> | 230 | </div> |
| 213 | </div> | 231 | </div> |
| 214 | - <section style="position:fixed;top:350px;left: 500px;"> | 232 | + <section style="position: fixed; top: 350px; left: 500px"> |
| 215 | <TablePopover | 233 | <TablePopover |
| 216 | ref="allLogDataReceiptStatusPopover" | 234 | ref="allLogDataReceiptStatusPopover" |
| 217 | dataKey="allLogDataReceiptStatus" | 235 | dataKey="allLogDataReceiptStatus" |
| ... | @@ -237,7 +255,7 @@ | ... | @@ -237,7 +255,7 @@ |
| 237 | ref="entryTable" | 255 | ref="entryTable" |
| 238 | :data="tableData" | 256 | :data="tableData" |
| 239 | :headerData="headerData" | 257 | :headerData="headerData" |
| 240 | - :maxHeight="tableMaxheight" | 258 | + :height="tableMaxheight" |
| 241 | :border="true" | 259 | :border="true" |
| 242 | :pagination="true" | 260 | :pagination="true" |
| 243 | :order="false" | 261 | :order="false" |
| ... | @@ -364,7 +382,9 @@ | ... | @@ -364,7 +382,9 @@ |
| 364 | <el-table-column align="center" label="操作" width="150"> | 382 | <el-table-column align="center" label="操作" width="150"> |
| 365 | <template slot-scope="scope"> | 383 | <template slot-scope="scope"> |
| 366 | <el-button type="text" @click="update(scope.row)"> 修改 </el-button> | 384 | <el-button type="text" @click="update(scope.row)"> 修改 </el-button> |
| 367 | - <el-button type="text" @click="showTotalLog(scope.row)">日志</el-button> | 385 | + <el-button type="text" @click="showTotalLog(scope.row)" |
| 386 | + >日志</el-button | ||
| 387 | + > | ||
| 368 | </template> | 388 | </template> |
| 369 | </el-table-column> | 389 | </el-table-column> |
| 370 | </template> | 390 | </template> |
| ... | @@ -379,7 +399,8 @@ | ... | @@ -379,7 +399,8 @@ |
| 379 | :showDialog="revokeVisible" | 399 | :showDialog="revokeVisible" |
| 380 | :selectedDatas="selected" | 400 | :selectedDatas="selected" |
| 381 | :dropdownCode="dropdownCode" | 401 | :dropdownCode="dropdownCode" |
| 382 | - @cancelRevoke="cancelRevoke" /> | 402 | + @cancelRevoke="cancelRevoke" |
| 403 | + /> | ||
| 383 | <TemplateDownloadDialog | 404 | <TemplateDownloadDialog |
| 384 | :showDialog="templateDownloadVisible" | 405 | :showDialog="templateDownloadVisible" |
| 385 | @cancelDownload="cancelDownload" | 406 | @cancelDownload="cancelDownload" |
| ... | @@ -408,9 +429,9 @@ import { | ... | @@ -408,9 +429,9 @@ import { |
| 408 | getTotalReceipt, | 429 | getTotalReceipt, |
| 409 | getLogisticsReceipt, | 430 | getLogisticsReceipt, |
| 410 | getDeclarationLog, | 431 | getDeclarationLog, |
| 411 | - exportDeclareData | 432 | + exportDeclareData, |
| 412 | } from "@/api/declareData-api.js"; | 433 | } from "@/api/declareData-api.js"; |
| 413 | -import { getDictData } from '@/api/system/dict-api.js' | 434 | +import { getDictData } from "@/api/system/dict-api.js"; |
| 414 | import DialogVue from "./dialog.vue"; | 435 | import DialogVue from "./dialog.vue"; |
| 415 | import RevokeDialog from "./revokeDialog.vue"; | 436 | import RevokeDialog from "./revokeDialog.vue"; |
| 416 | import TemplateDownloadDialog from "./templateDownloadDialog.vue"; | 437 | import TemplateDownloadDialog from "./templateDownloadDialog.vue"; |
| ... | @@ -423,7 +444,7 @@ export default { | ... | @@ -423,7 +444,7 @@ export default { |
| 423 | RevokeDialog, | 444 | RevokeDialog, |
| 424 | TemplateDownloadDialog, | 445 | TemplateDownloadDialog, |
| 425 | ExportDialog, | 446 | ExportDialog, |
| 426 | - BatchModify | 447 | + BatchModify, |
| 427 | }, | 448 | }, |
| 428 | data() { | 449 | data() { |
| 429 | return { | 450 | return { |
| ... | @@ -505,6 +526,14 @@ export default { | ... | @@ -505,6 +526,14 @@ export default { |
| 505 | slot: true, | 526 | slot: true, |
| 506 | }, | 527 | }, |
| 507 | { | 528 | { |
| 529 | + // release-v1.0.9 | ||
| 530 | + name: "运抵单回执", | ||
| 531 | + value: "listReceiptStatus", | ||
| 532 | + width: "", | ||
| 533 | + align: "left", | ||
| 534 | + slot: true, | ||
| 535 | + }, | ||
| 536 | + { | ||
| 508 | name: "清单总分单回执", | 537 | name: "清单总分单回执", |
| 509 | value: "totalSplitOrderStatus", | 538 | value: "totalSplitOrderStatus", |
| 510 | width: "", | 539 | width: "", |
| ... | @@ -577,7 +606,7 @@ export default { | ... | @@ -577,7 +606,7 @@ export default { |
| 577 | dwonloadModelLoading: false, | 606 | dwonloadModelLoading: false, |
| 578 | dropDownLoading: false, | 607 | dropDownLoading: false, |
| 579 | logTableLoading: false, | 608 | logTableLoading: false, |
| 580 | - exportDeclareLoading:false, | 609 | + exportDeclareLoading: false, |
| 581 | revokeLoading: false, // 撤销单申报加载状态 | 610 | revokeLoading: false, // 撤销单申报加载状态 |
| 582 | departureLoading: false, // 离境单申报加载状态 | 611 | departureLoading: false, // 离境单申报加载状态 |
| 583 | }, | 612 | }, |
| ... | @@ -586,10 +615,10 @@ export default { | ... | @@ -586,10 +615,10 @@ export default { |
| 586 | outerVisible: false, | 615 | outerVisible: false, |
| 587 | dropdownName: "一键申报", | 616 | dropdownName: "一键申报", |
| 588 | dropdownCode: "full", | 617 | dropdownCode: "full", |
| 589 | - revokeVisible:false, | 618 | + revokeVisible: false, |
| 590 | - templateDownloadVisible:false, | 619 | + templateDownloadVisible: false, |
| 591 | - datasExportVisible:false, | 620 | + datasExportVisible: false, |
| 592 | - batchModifyVisible:false | 621 | + batchModifyVisible: false, |
| 593 | }; | 622 | }; |
| 594 | }, | 623 | }, |
| 595 | created() { | 624 | created() { |
| ... | @@ -597,10 +626,14 @@ export default { | ... | @@ -597,10 +626,14 @@ export default { |
| 597 | // this.getCancellationReasons() | 626 | // this.getCancellationReasons() |
| 598 | }, | 627 | }, |
| 599 | mounted() { | 628 | mounted() { |
| 600 | - this.tableMaxheight = window.innerHeight - 355; | 629 | + this.tableMaxheight = window.innerHeight - 280; |
| 601 | - window.addEventListener('resize',()=>{ | 630 | + window.addEventListener( |
| 602 | - this.tableMaxheight = window.innerHeight - 355; | 631 | + "resize", |
| 603 | - },false) | 632 | + () => { |
| 633 | + this.tableMaxheight = window.innerHeight - 280; | ||
| 634 | + }, | ||
| 635 | + false | ||
| 636 | + ); | ||
| 604 | }, | 637 | }, |
| 605 | watch: { | 638 | watch: { |
| 606 | $route(val, oldval) { | 639 | $route(val, oldval) { |
| ... | @@ -608,7 +641,7 @@ export default { | ... | @@ -608,7 +641,7 @@ export default { |
| 608 | }, | 641 | }, |
| 609 | }, | 642 | }, |
| 610 | beforeRouteEnter(to, from, next) { | 643 | beforeRouteEnter(to, from, next) { |
| 611 | - next(vm => { | 644 | + next((vm) => { |
| 612 | // 检查标志是否需要刷新数据 | 645 | // 检查标志是否需要刷新数据 |
| 613 | if (to.meta.needsRefresh) { | 646 | if (to.meta.needsRefresh) { |
| 614 | vm.search(0); | 647 | vm.search(0); |
| ... | @@ -678,12 +711,14 @@ export default { | ... | @@ -678,12 +711,14 @@ export default { |
| 678 | //下载模板 | 711 | //下载模板 |
| 679 | dwonloadModelFile() { | 712 | dwonloadModelFile() { |
| 680 | this.loadings.dwonloadModelLoading = true; | 713 | this.loadings.dwonloadModelLoading = true; |
| 681 | - this.$store.dispatch("GetInfo").then(res =>{ | 714 | + this.$store |
| 682 | - console.log('res====', res) | 715 | + .dispatch("GetInfo") |
| 716 | + .then((res) => { | ||
| 717 | + console.log("res====", res); | ||
| 683 | if (res.code == 200) { | 718 | if (res.code == 200) { |
| 684 | - console.log('port===', res.data?.port?.split(',')) | 719 | + console.log("port===", res.data?.port?.split(",")); |
| 685 | - if (res.data?.port?.split(',').length == 2) { | 720 | + if (res.data?.port?.split(",").length == 2) { |
| 686 | - this.templateDownloadVisible = true | 721 | + this.templateDownloadVisible = true; |
| 687 | } else { | 722 | } else { |
| 688 | this.fileDownload | 723 | this.fileDownload |
| 689 | .downLoadZip( | 724 | .downLoadZip( |
| ... | @@ -692,27 +727,27 @@ export default { | ... | @@ -692,27 +727,27 @@ export default { |
| 692 | "申报数据模板.xlsx", | 727 | "申报数据模板.xlsx", |
| 693 | "xlsx", | 728 | "xlsx", |
| 694 | "get", | 729 | "get", |
| 695 | - {type: res.data?.port} | 730 | + { type: res.data?.port } |
| 696 | ) | 731 | ) |
| 697 | .finally(() => { | 732 | .finally(() => { |
| 698 | - this.cancelDownload() | 733 | + this.cancelDownload(); |
| 699 | }); | 734 | }); |
| 700 | } | 735 | } |
| 701 | } | 736 | } |
| 702 | - }).catch(err =>{ | ||
| 703 | - console.log(err) | ||
| 704 | }) | 737 | }) |
| 705 | - | 738 | + .catch((err) => { |
| 739 | + console.log(err); | ||
| 740 | + }); | ||
| 706 | }, | 741 | }, |
| 707 | 742 | ||
| 708 | - datasDownload(dataSource){ | 743 | + datasDownload(dataSource) { |
| 709 | let obj = { | 744 | let obj = { |
| 710 | billNo: this.sreachFormData.billNo, | 745 | billNo: this.sreachFormData.billNo, |
| 711 | declareId: [], | 746 | declareId: [], |
| 712 | logisticsNo: this.sreachFormData.logisticsNo, | 747 | logisticsNo: this.sreachFormData.logisticsNo, |
| 713 | orderNo: this.sreachFormData.orderNo, | 748 | orderNo: this.sreachFormData.orderNo, |
| 714 | receiptStatus: this.sreachFormData.receiptStatus, | 749 | receiptStatus: this.sreachFormData.receiptStatus, |
| 715 | - dataSource | 750 | + dataSource, |
| 716 | }; | 751 | }; |
| 717 | obj.startCreateTime = ""; | 752 | obj.startCreateTime = ""; |
| 718 | obj.endCreateTime = ""; | 753 | obj.endCreateTime = ""; |
| ... | @@ -723,45 +758,50 @@ export default { | ... | @@ -723,45 +758,50 @@ export default { |
| 723 | this.selected.forEach((item) => { | 758 | this.selected.forEach((item) => { |
| 724 | obj.declareId.push(item.declareId); | 759 | obj.declareId.push(item.declareId); |
| 725 | }); | 760 | }); |
| 726 | - exportDeclareData(obj).then((res)=>{ | 761 | + exportDeclareData(obj) |
| 762 | + .then((res) => { | ||
| 727 | // if (res.code === "200") { | 763 | // if (res.code === "200") { |
| 728 | // // this.alertSuccessMsg(res.message); | 764 | // // this.alertSuccessMsg(res.message); |
| 729 | // } else { | 765 | // } else { |
| 730 | // console.log(res.message); | 766 | // console.log(res.message); |
| 731 | // this.alertWarningMsg(res.message); | 767 | // this.alertWarningMsg(res.message); |
| 732 | // } | 768 | // } |
| 733 | - | 769 | + }) |
| 734 | - }).catch((err)=>{ | 770 | + .catch((err) => { |
| 735 | console.log(err); | 771 | console.log(err); |
| 736 | this.alertErrorMsg(err); | 772 | this.alertErrorMsg(err); |
| 737 | - }).finally(res =>{ | ||
| 738 | - this.loadings.exportDeclareLoading = false; | ||
| 739 | - this.datasExportVisible = false | ||
| 740 | - this.$refs.exportDialog.datasExportVisible = false | ||
| 741 | }) | 773 | }) |
| 774 | + .finally((res) => { | ||
| 775 | + this.loadings.exportDeclareLoading = false; | ||
| 776 | + this.datasExportVisible = false; | ||
| 777 | + this.$refs.exportDialog.datasExportVisible = false; | ||
| 778 | + }); | ||
| 742 | }, | 779 | }, |
| 743 | //导出 | 780 | //导出 |
| 744 | downloadData() { | 781 | downloadData() { |
| 745 | this.loadings.exportDeclareLoading = true; | 782 | this.loadings.exportDeclareLoading = true; |
| 746 | - this.$store.dispatch("GetInfo").then(res =>{ | 783 | + this.$store |
| 747 | - console.log('res====', res) | 784 | + .dispatch("GetInfo") |
| 785 | + .then((res) => { | ||
| 786 | + console.log("res====", res); | ||
| 748 | if (res.code == 200) { | 787 | if (res.code == 200) { |
| 749 | - console.log('port===', res.data?.port?.split(',')) | 788 | + console.log("port===", res.data?.port?.split(",")); |
| 750 | - if (res.data?.port?.split(',').length == 2) { | 789 | + if (res.data?.port?.split(",").length == 2) { |
| 751 | - this.datasExportVisible = true | 790 | + this.datasExportVisible = true; |
| 752 | } else { | 791 | } else { |
| 753 | - this.datasDownload(res.data?.port) | 792 | + this.datasDownload(res.data?.port); |
| 754 | } | 793 | } |
| 755 | } | 794 | } |
| 756 | - }).catch(err =>{ | ||
| 757 | - console.log(err) | ||
| 758 | }) | 795 | }) |
| 796 | + .catch((err) => { | ||
| 797 | + console.log(err); | ||
| 798 | + }); | ||
| 759 | }, | 799 | }, |
| 760 | - startDatasExport(dataSource){ | 800 | + startDatasExport(dataSource) { |
| 761 | - this.datasDownload(dataSource) | 801 | + this.datasDownload(dataSource); |
| 762 | }, | 802 | }, |
| 763 | - cancelDatasExport(){ | 803 | + cancelDatasExport() { |
| 764 | - this.datasExportVisible = false | 804 | + this.datasExportVisible = false; |
| 765 | this.loadings.exportDeclareLoading = false; | 805 | this.loadings.exportDeclareLoading = false; |
| 766 | }, | 806 | }, |
| 767 | 807 | ||
| ... | @@ -781,12 +821,12 @@ export default { | ... | @@ -781,12 +821,12 @@ export default { |
| 781 | this.$set(this.loadings, loadingKey, true); | 821 | this.$set(this.loadings, loadingKey, true); |
| 782 | // 构造请求参数 | 822 | // 构造请求参数 |
| 783 | const obj = { | 823 | const obj = { |
| 784 | - declareIds: this.selected.map(item => item.declareId), | 824 | + declareIds: this.selected.map((item) => item.declareId), |
| 785 | type: dropdownCode, | 825 | type: dropdownCode, |
| 786 | }; | 826 | }; |
| 787 | 827 | ||
| 788 | // 如果是撤销单申报,显示弹窗并返回 | 828 | // 如果是撤销单申报,显示弹窗并返回 |
| 789 | - if (dropdownName === '撤销单申报') { | 829 | + if (dropdownName === "撤销单申报") { |
| 790 | this.revokeVisible = true; | 830 | this.revokeVisible = true; |
| 791 | this.$set(this.loadings, loadingKey, false); | 831 | this.$set(this.loadings, loadingKey, false); |
| 792 | this.dropdownCode = dropdownCode; | 832 | this.dropdownCode = dropdownCode; |
| ... | @@ -823,8 +863,8 @@ export default { | ... | @@ -823,8 +863,8 @@ export default { |
| 823 | // } | 863 | // } |
| 824 | this.search(1); | 864 | this.search(1); |
| 825 | this.outerVisible = false; | 865 | this.outerVisible = false; |
| 826 | - this.tableMaxheight = window.innerHeight - 355; | 866 | + this.tableMaxheight = window.innerHeight - 280; |
| 827 | - this.$forceUpdate() | 867 | + this.$forceUpdate(); |
| 828 | }, | 868 | }, |
| 829 | popoverChange(val) { | 869 | popoverChange(val) { |
| 830 | this.tableData = val.tableData; | 870 | this.tableData = val.tableData; |
| ... | @@ -839,7 +879,7 @@ export default { | ... | @@ -839,7 +879,7 @@ export default { |
| 839 | }) | 879 | }) |
| 840 | .finally(() => { | 880 | .finally(() => { |
| 841 | this.$nextTick(() => { | 881 | this.$nextTick(() => { |
| 842 | - this.$store.dispatch('setLoadingState', false) | 882 | + this.$store.dispatch("setLoadingState", false); |
| 843 | this.$refs.orderReceiptStatusPopover.tableLoading = false; | 883 | this.$refs.orderReceiptStatusPopover.tableLoading = false; |
| 844 | this.$refs.wayBillReceiptPopover.tableLoading = false; | 884 | this.$refs.wayBillReceiptPopover.tableLoading = false; |
| 845 | this.$refs.listReceiptStatusPopover.tableLoading = false; | 885 | this.$refs.listReceiptStatusPopover.tableLoading = false; |
| ... | @@ -905,8 +945,7 @@ export default { | ... | @@ -905,8 +945,7 @@ export default { |
| 905 | console.log(err); | 945 | console.log(err); |
| 906 | reject(); | 946 | reject(); |
| 907 | }); | 947 | }); |
| 908 | - } | 948 | + } else if (type == "logisticsReceiptStatus") { |
| 909 | - else if (type == "logisticsReceiptStatus") { | ||
| 910 | getLogisticsReceipt(obj) | 949 | getLogisticsReceipt(obj) |
| 911 | .then((res) => { | 950 | .then((res) => { |
| 912 | if (res.code === "200") { | 951 | if (res.code === "200") { |
| ... | @@ -919,8 +958,7 @@ export default { | ... | @@ -919,8 +958,7 @@ export default { |
| 919 | console.log(err); | 958 | console.log(err); |
| 920 | reject(); | 959 | reject(); |
| 921 | }); | 960 | }); |
| 922 | - } | 961 | + } else if (type == "allLogDataReceiptStatus") { |
| 923 | - else if (type == "allLogDataReceiptStatus") { | ||
| 924 | getDeclarationLog(id) | 962 | getDeclarationLog(id) |
| 925 | .then((res) => { | 963 | .then((res) => { |
| 926 | if (res.code === "200") { | 964 | if (res.code === "200") { |
| ... | @@ -980,10 +1018,10 @@ export default { | ... | @@ -980,10 +1018,10 @@ export default { |
| 980 | }); | 1018 | }); |
| 981 | } | 1019 | } |
| 982 | }, | 1020 | }, |
| 983 | - cancelRevoke(){ | 1021 | + cancelRevoke() { |
| 984 | this.loadings.dropDownLoading = false; | 1022 | this.loadings.dropDownLoading = false; |
| 985 | - this.revokeVisible = false | 1023 | + this.revokeVisible = false; |
| 986 | - this.dropdownCode = 'full' | 1024 | + this.dropdownCode = "full"; |
| 987 | }, | 1025 | }, |
| 988 | update(val) { | 1026 | update(val) { |
| 989 | this.$router.push({ | 1027 | this.$router.push({ |
| ... | @@ -995,42 +1033,43 @@ export default { | ... | @@ -995,42 +1033,43 @@ export default { |
| 995 | showTotalLog(row) { | 1033 | showTotalLog(row) { |
| 996 | this.$store.state.viewOption.loadingDatas = true; | 1034 | this.$store.state.viewOption.loadingDatas = true; |
| 997 | this.selectedLogRow = row; | 1035 | this.selectedLogRow = row; |
| 998 | - this.$set(row, 'logLoading', true); | 1036 | + this.$set(row, "logLoading", true); |
| 999 | 1037 | ||
| 1000 | - this.receiptApi(row.declareId, "allLogDataReceiptStatus") | 1038 | + this.receiptApi(row.declareId, "allLogDataReceiptStatus").then( |
| 1001 | - .then((logData) => { | 1039 | + (logData) => { |
| 1002 | - this.$set(row, 'popoverData', logData); | 1040 | + this.$set(row, "popoverData", logData); |
| 1003 | 1041 | ||
| 1004 | - if(!this.selectedLogRow.popoverData.length){ | 1042 | + if (!this.selectedLogRow.popoverData.length) { |
| 1005 | this.$store.state.viewOption.loadingDatas = false; | 1043 | this.$store.state.viewOption.loadingDatas = false; |
| 1006 | } | 1044 | } |
| 1007 | 1045 | ||
| 1008 | // 手动触发状态更新 | 1046 | // 手动触发状态更新 |
| 1009 | this.$nextTick(() => { | 1047 | this.$nextTick(() => { |
| 1010 | // 强制设置弹窗状态为true | 1048 | // 强制设置弹窗状态为true |
| 1011 | - row.allLogDataReceiptStatusPopoverType = true | 1049 | + row.allLogDataReceiptStatusPopoverType = true; |
| 1012 | // 强制更新表格 | 1050 | // 强制更新表格 |
| 1013 | this.tableData = [...this.tableData]; | 1051 | this.tableData = [...this.tableData]; |
| 1014 | }); | 1052 | }); |
| 1015 | - }) | 1053 | + } |
| 1054 | + ); | ||
| 1016 | }, | 1055 | }, |
| 1017 | - cancelDownload(){ | 1056 | + cancelDownload() { |
| 1018 | this.loadings.dwonloadModelLoading = false; | 1057 | this.loadings.dwonloadModelLoading = false; |
| 1019 | - this.templateDownloadVisible = false | 1058 | + this.templateDownloadVisible = false; |
| 1020 | }, | 1059 | }, |
| 1021 | - batchModify(){ | 1060 | + batchModify() { |
| 1022 | if (!this.selected.length) { | 1061 | if (!this.selected.length) { |
| 1023 | this.alertWarningMsg("请选择数据!"); | 1062 | this.alertWarningMsg("请选择数据!"); |
| 1024 | - return | 1063 | + return; |
| 1025 | } | 1064 | } |
| 1026 | - this.batchModifyVisible = true | 1065 | + this.batchModifyVisible = true; |
| 1027 | }, | 1066 | }, |
| 1028 | - cancelBatchModify(val){ | 1067 | + cancelBatchModify(val) { |
| 1029 | - this.batchModifyVisible = false | 1068 | + this.batchModifyVisible = false; |
| 1030 | - if(val === 1){ | 1069 | + if (val === 1) { |
| 1031 | this.search(0); | 1070 | this.search(0); |
| 1032 | } | 1071 | } |
| 1033 | - } | 1072 | + }, |
| 1034 | }, | 1073 | }, |
| 1035 | }; | 1074 | }; |
| 1036 | </script> | 1075 | </script> |
| ... | @@ -1060,6 +1099,11 @@ export default { | ... | @@ -1060,6 +1099,11 @@ export default { |
| 1060 | color: $fedexBottonColor !important; | 1099 | color: $fedexBottonColor !important; |
| 1061 | font-size: 12px !important; | 1100 | font-size: 12px !important; |
| 1062 | } | 1101 | } |
| 1102 | + .el-button.dropdown-style-button:hover, | ||
| 1103 | + .el-button.dropdown-style-button:focus { | ||
| 1104 | + color: #ffffff !important; | ||
| 1105 | + background-color: $fedexBottonColor !important; | ||
| 1106 | + } | ||
| 1063 | 1107 | ||
| 1064 | .el-button { | 1108 | .el-button { |
| 1065 | color: $fedexButton; | 1109 | color: $fedexButton; |
| ... | @@ -1087,9 +1131,9 @@ export default { | ... | @@ -1087,9 +1131,9 @@ export default { |
| 1087 | transform: translate(0, -50%); | 1131 | transform: translate(0, -50%); |
| 1088 | z-index: 10; | 1132 | z-index: 10; |
| 1089 | } | 1133 | } |
| 1090 | -.revokeOperation{ | 1134 | +.revokeOperation { |
| 1091 | - margin-bottom:25px; | 1135 | + margin-bottom: 25px; |
| 1092 | - .revokeSubmitBtn{ | 1136 | + .revokeSubmitBtn { |
| 1093 | margin-right: 30px; | 1137 | margin-right: 30px; |
| 1094 | } | 1138 | } |
| 1095 | } | 1139 | } | ... | ... |
src/views/supervise-place-manage/dialog.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <el-dialog | ||
| 3 | + class="entryDialog classCUploadDialog" | ||
| 4 | + :title="title" | ||
| 5 | + :visible.sync="outerVisible" | ||
| 6 | + :show-close="false" | ||
| 7 | + width="25%" | ||
| 8 | + :close-on-click-modal="false" | ||
| 9 | + :destroy-on-close="true" | ||
| 10 | + v-loading="loadings.dialogLoading" | ||
| 11 | + @close="close" | ||
| 12 | + > | ||
| 13 | + <div class="modelItem"> | ||
| 14 | + <el-form | ||
| 15 | + v-if="type != 'menuChange'" | ||
| 16 | + class="fedexFormStyle" | ||
| 17 | + ref="formData" | ||
| 18 | + :model="formData" | ||
| 19 | + :rules="rules" | ||
| 20 | + label-position="top" | ||
| 21 | + size="small" | ||
| 22 | + > | ||
| 23 | + <Formitem label="角色名称" prop="roleName" type="edit"> | ||
| 24 | + <el-input | ||
| 25 | + type="text" | ||
| 26 | + class="inputShadow" | ||
| 27 | + id="inputInner-edit-roleName" | ||
| 28 | + resize="none" | ||
| 29 | + v-model="formData.roleName" | ||
| 30 | + clearable | ||
| 31 | + placeholder="" | ||
| 32 | + ></el-input> | ||
| 33 | + </Formitem> | ||
| 34 | + </el-form> | ||
| 35 | + <el-tree | ||
| 36 | + ref="tree" | ||
| 37 | + class="menuTree" | ||
| 38 | + v-else | ||
| 39 | + :data="treeData" | ||
| 40 | + show-checkbox | ||
| 41 | + default-expand-all | ||
| 42 | + node-key="id" | ||
| 43 | + :default-expanded-keys="expandedKeys" | ||
| 44 | + :default-checked-keys="checkedKeys" | ||
| 45 | + :props="defaultProps" | ||
| 46 | + @check="treeCheckChange" | ||
| 47 | + > | ||
| 48 | + </el-tree> | ||
| 49 | + </div> | ||
| 50 | + <div class="dialogOption entrySave"> | ||
| 51 | + <el-button | ||
| 52 | + class="entrySaveButton" | ||
| 53 | + :disabled="loadings.submitLoading" | ||
| 54 | + @click="submit" | ||
| 55 | + >确 定</el-button | ||
| 56 | + > | ||
| 57 | + <el-button | ||
| 58 | + class="entrySaveButton" | ||
| 59 | + :disabled="loadings.uploadLoading" | ||
| 60 | + @click="close" | ||
| 61 | + >关 闭</el-button | ||
| 62 | + > | ||
| 63 | + </div> | ||
| 64 | + </el-dialog> | ||
| 65 | +</template> | ||
| 66 | + | ||
| 67 | +<script> | ||
| 68 | +import { | ||
| 69 | + addRoleData, | ||
| 70 | + updateRoleData, | ||
| 71 | + updateRoleMenuData, | ||
| 72 | + getMenuByRoleId, | ||
| 73 | +} from "@/api/system/user.js"; | ||
| 74 | +import { getRouters } from "@/api/menu"; | ||
| 75 | +export default { | ||
| 76 | + props: { | ||
| 77 | + outerVisible: { | ||
| 78 | + type: Boolean, | ||
| 79 | + default: false, | ||
| 80 | + }, | ||
| 81 | + title: { | ||
| 82 | + type: String, | ||
| 83 | + default: "新增角色", | ||
| 84 | + }, | ||
| 85 | + type: { | ||
| 86 | + type: String, | ||
| 87 | + default: "", | ||
| 88 | + }, | ||
| 89 | + active: { | ||
| 90 | + type: Object, | ||
| 91 | + default: null, | ||
| 92 | + }, | ||
| 93 | + }, | ||
| 94 | + watch: { | ||
| 95 | + outerVisible(val) { | ||
| 96 | + if (val) { | ||
| 97 | + this.loadings.dialogLoading = false; | ||
| 98 | + if (this.type == "update") { | ||
| 99 | + this.formData = this.active; | ||
| 100 | + } else if (this.type == "menuChange") { | ||
| 101 | + this.formData = this.active; | ||
| 102 | + this.searchTreeData(); | ||
| 103 | + this.loadCheckedKeys();//加载已绑定的菜单 | ||
| 104 | + } | ||
| 105 | + } | ||
| 106 | + }, | ||
| 107 | + }, | ||
| 108 | + data() { | ||
| 109 | + return { | ||
| 110 | + formData: { | ||
| 111 | + roleName: "", | ||
| 112 | + }, | ||
| 113 | + treeData: [], | ||
| 114 | + treeCheckData: [], | ||
| 115 | + expandedKeys: [], | ||
| 116 | + checkedKeys: [], | ||
| 117 | + rules: { | ||
| 118 | + roleName: [ | ||
| 119 | + { | ||
| 120 | + required: true, | ||
| 121 | + trigger: "blur", | ||
| 122 | + message: "角色名称不能为空!", | ||
| 123 | + }, | ||
| 124 | + ], | ||
| 125 | + }, | ||
| 126 | + defaultProps: { | ||
| 127 | + children: "children", | ||
| 128 | + label: "label", | ||
| 129 | + }, | ||
| 130 | + searchForm: {}, | ||
| 131 | + loadings: { | ||
| 132 | + dialogLoading: false, | ||
| 133 | + uploadLoading: false, | ||
| 134 | + submitLoading: false, | ||
| 135 | + }, | ||
| 136 | + loadingText: "", | ||
| 137 | + }; | ||
| 138 | + }, | ||
| 139 | + methods: { | ||
| 140 | + //查询菜单数据 | ||
| 141 | + searchTreeData() { | ||
| 142 | + this.loadings.dialogLoading = true; | ||
| 143 | + getRouters() | ||
| 144 | + .then((res) => { | ||
| 145 | + if (res.code === "200") { | ||
| 146 | + let arr = []; | ||
| 147 | + res.data.forEach((item) => { | ||
| 148 | + let status = true; | ||
| 149 | + if (item.parentMenuId == 0) { | ||
| 150 | + let obj = { | ||
| 151 | + id: item.menuId, | ||
| 152 | + label: item.menuName, | ||
| 153 | + children: [], | ||
| 154 | + }; | ||
| 155 | + arr.forEach((menuItem) => { | ||
| 156 | + if (menuItem.id == item.menuId) { | ||
| 157 | + status = false; | ||
| 158 | + menuItem.label = item.menuName; | ||
| 159 | + } | ||
| 160 | + }); | ||
| 161 | + if (status) { | ||
| 162 | + arr.push(obj); | ||
| 163 | + } | ||
| 164 | + } else { | ||
| 165 | + let obj = { | ||
| 166 | + id: item.menuId, | ||
| 167 | + label: item.menuName, | ||
| 168 | + }; | ||
| 169 | + arr.forEach((menuItem) => { | ||
| 170 | + if (menuItem.id == item.parentMenuId) { | ||
| 171 | + status = false; | ||
| 172 | + menuItem.children.push(obj); | ||
| 173 | + } | ||
| 174 | + }); | ||
| 175 | + if (status) { | ||
| 176 | + arr.push({ | ||
| 177 | + id: item.parentMenuId, | ||
| 178 | + label: "", | ||
| 179 | + children: [obj], | ||
| 180 | + }); | ||
| 181 | + } | ||
| 182 | + } | ||
| 183 | + }); | ||
| 184 | + this.treeData = arr; | ||
| 185 | + } else { | ||
| 186 | + this.alertWarningMsg(res.message); | ||
| 187 | + } | ||
| 188 | + this.loadings.dialogLoading = false; | ||
| 189 | + }) | ||
| 190 | + .catch((err) => { | ||
| 191 | + console.log(err); | ||
| 192 | + this.loadings.dialogLoading = false; | ||
| 193 | + }); | ||
| 194 | + }, | ||
| 195 | + //数据保存 | ||
| 196 | + submit() { | ||
| 197 | + this.loadings.dialogLoading = true; | ||
| 198 | + let obj = {}; | ||
| 199 | + if (this.type == "add") { | ||
| 200 | + this.$refs.formData.validate((valid) => { | ||
| 201 | + if (valid) { | ||
| 202 | + obj.roleName = this.formData.roleName; | ||
| 203 | + this.addapi(obj); | ||
| 204 | + } else { | ||
| 205 | + this.loadings.dialogLoading = false; | ||
| 206 | + } | ||
| 207 | + }); | ||
| 208 | + } else if (this.type == "update") { | ||
| 209 | + this.$refs.formData.validate((valid) => { | ||
| 210 | + if (valid) { | ||
| 211 | + obj.roleId = this.formData.roleId; | ||
| 212 | + obj.roleName = this.formData.roleName; | ||
| 213 | + this.updateapi(obj); | ||
| 214 | + } else { | ||
| 215 | + this.loadings.dialogLoading = false; | ||
| 216 | + } | ||
| 217 | + }); | ||
| 218 | + } else if (this.type == "menuChange") { | ||
| 219 | + obj.menuId = this.treeCheckData; // 使用合并后的选中节点 | ||
| 220 | + obj.roleId = this.formData.roleId; | ||
| 221 | + this.menuChangeapi(obj); | ||
| 222 | + } | ||
| 223 | + }, | ||
| 224 | + //新增 | ||
| 225 | + addapi(val) { | ||
| 226 | + addRoleData(val) | ||
| 227 | + .then((res) => { | ||
| 228 | + if (res.code === "200") { | ||
| 229 | + this.msgSuccess(res.message); | ||
| 230 | + this.close(); | ||
| 231 | + } else { | ||
| 232 | + this.alertWarningMsg(res.message); | ||
| 233 | + this.loadings.dialogLoading = false; | ||
| 234 | + } | ||
| 235 | + }) | ||
| 236 | + .catch((err) => { | ||
| 237 | + console.log(err); | ||
| 238 | + this.loadings.dialogLoading = false; | ||
| 239 | + }); | ||
| 240 | + }, | ||
| 241 | + //修改 | ||
| 242 | + updateapi(val) { | ||
| 243 | + updateRoleData(val) | ||
| 244 | + .then((res) => { | ||
| 245 | + if (res.code === "200") { | ||
| 246 | + this.msgSuccess(res.message); | ||
| 247 | + this.close(); | ||
| 248 | + } else { | ||
| 249 | + this.alertWarningMsg(res.message); | ||
| 250 | + this.loadings.dialogLoading = false; | ||
| 251 | + } | ||
| 252 | + }) | ||
| 253 | + .catch((err) => { | ||
| 254 | + console.log(err); | ||
| 255 | + this.loadings.dialogLoading = false; | ||
| 256 | + }); | ||
| 257 | + }, | ||
| 258 | + //菜单权限修改 | ||
| 259 | + menuChangeapi(val) { | ||
| 260 | + updateRoleMenuData(val) | ||
| 261 | + .then((res) => { | ||
| 262 | + if (res.code === "200") { | ||
| 263 | + this.msgSuccess(res.message); | ||
| 264 | + this.close(); | ||
| 265 | + this.$store.dispatch('GenerateRoutes') | ||
| 266 | + } else { | ||
| 267 | + this.alertWarningMsg(res.message); | ||
| 268 | + this.loadings.dialogLoading = false; | ||
| 269 | + } | ||
| 270 | + }) | ||
| 271 | + .catch((err) => { | ||
| 272 | + console.log(err); | ||
| 273 | + this.loadings.dialogLoading = false; | ||
| 274 | + }); | ||
| 275 | + }, | ||
| 276 | + treeCheckChange(data, checked) { | ||
| 277 | + console.log(data, checked); | ||
| 278 | + let arr = []; | ||
| 279 | + arr = checked.checkedKeys.concat(checked.halfCheckedKeys); | ||
| 280 | + this.treeCheckData = arr; | ||
| 281 | + }, | ||
| 282 | + close() { | ||
| 283 | + this.formData = { | ||
| 284 | + roleName: "", | ||
| 285 | + }; | ||
| 286 | + this.checkedKeys = [] | ||
| 287 | + this.$emit("close"); | ||
| 288 | + }, | ||
| 289 | + // 加载已绑定的菜单 | ||
| 290 | + loadCheckedKeys() { | ||
| 291 | + if (this.formData.roleId) { | ||
| 292 | + getMenuByRoleId(this.formData.roleId) | ||
| 293 | + .then((res) => { | ||
| 294 | + if (res.code === "200") { | ||
| 295 | + this.checkedKeys = res.data.filter(item => item.isBinding && (item.parentMenuId!=0 ) ).map(item => item.menuId); | ||
| 296 | + //console.log('初始 checkedKeys:', this.checkedKeys); | ||
| 297 | + this.$nextTick(() => { | ||
| 298 | + this.$refs.tree.setCheckedKeys(this.checkedKeys); | ||
| 299 | + this.updateTreeCheckData(); | ||
| 300 | + }); | ||
| 301 | + } else { | ||
| 302 | + this.alertWarningMsg(res.message); | ||
| 303 | + } | ||
| 304 | + }) | ||
| 305 | + .catch((err) => { | ||
| 306 | + console.log(err); | ||
| 307 | + }); | ||
| 308 | + } | ||
| 309 | + }, | ||
| 310 | + //加载选中的节点及半选中的父节点 | ||
| 311 | + updateTreeCheckData() { | ||
| 312 | + const checkedKeys = this.$refs.tree.getCheckedKeys(); | ||
| 313 | + const halfCheckedKeys = this.$refs.tree.getHalfCheckedKeys(); | ||
| 314 | + this.treeCheckData = checkedKeys.concat(halfCheckedKeys); | ||
| 315 | + //console.log('合并后的 treeCheckData:', this.treeCheckData); | ||
| 316 | + }, | ||
| 317 | + | ||
| 318 | + }, | ||
| 319 | +}; | ||
| 320 | +</script> | ||
| 321 | + | ||
| 322 | +<style lang="scss" scoped> | ||
| 323 | +@import "@/assets/styles/variables.scss"; | ||
| 324 | + | ||
| 325 | +.menuTree { | ||
| 326 | + max-width: 350px; | ||
| 327 | + max-height: 300px; | ||
| 328 | + overflow: auto; | ||
| 329 | + margin: 0 auto; | ||
| 330 | + border: 1px solid #999; | ||
| 331 | + padding: 10px; | ||
| 332 | +} | ||
| 333 | +</style> |
src/views/supervise-place-manage/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div class="entrySreach"> | ||
| 3 | + <el-form | ||
| 4 | + class="fedexFormStyle fedexformSreach fedexformSreachBottomBorder" | ||
| 5 | + ref="sreachForm" | ||
| 6 | + :model="sreachFormData" | ||
| 7 | + label-position="top" | ||
| 8 | + size="small" | ||
| 9 | + > | ||
| 10 | + <el-row class="row-border"> | ||
| 11 | + <!-- 角色名称 --> | ||
| 12 | + <el-col :span="5"> | ||
| 13 | + <Formitem label="角色名称" prop="roleName"> | ||
| 14 | + <el-input | ||
| 15 | + type="text" | ||
| 16 | + class="inputShadow" | ||
| 17 | + id="inputInner--roleName" | ||
| 18 | + resize="none" | ||
| 19 | + v-model="sreachFormData.roleName" | ||
| 20 | + clearable | ||
| 21 | + placeholder="" | ||
| 22 | + ></el-input> | ||
| 23 | + </Formitem> | ||
| 24 | + </el-col> | ||
| 25 | + <el-col :span="5"> | ||
| 26 | + <Formitem label="角色名称" prop="roleName"> | ||
| 27 | + <el-input | ||
| 28 | + type="text" | ||
| 29 | + class="inputShadow" | ||
| 30 | + id="inputInner--roleName" | ||
| 31 | + resize="none" | ||
| 32 | + v-model="sreachFormData.roleName" | ||
| 33 | + clearable | ||
| 34 | + placeholder="" | ||
| 35 | + ></el-input> | ||
| 36 | + </Formitem> | ||
| 37 | + </el-col> | ||
| 38 | + <el-col :span="5"> | ||
| 39 | + <Formitem label="角色名称" prop="roleName"> | ||
| 40 | + <el-input | ||
| 41 | + type="text" | ||
| 42 | + class="inputShadow" | ||
| 43 | + id="inputInner--roleName" | ||
| 44 | + resize="none" | ||
| 45 | + v-model="sreachFormData.roleName" | ||
| 46 | + clearable | ||
| 47 | + placeholder="" | ||
| 48 | + ></el-input> | ||
| 49 | + </Formitem> | ||
| 50 | + </el-col> | ||
| 51 | + <el-col :span="2"> | ||
| 52 | + <el-form-item class="textCenter"> | ||
| 53 | + <el-button | ||
| 54 | + class="entrySreachButton" | ||
| 55 | + type="text" | ||
| 56 | + icon="el-icon-search" | ||
| 57 | + :loading="loadings.searchLoading" | ||
| 58 | + @click="search(0)" | ||
| 59 | + ></el-button> | ||
| 60 | + </el-form-item> | ||
| 61 | + </el-col> | ||
| 62 | + <el-col :span="2"> | ||
| 63 | + <!-- 清空查询条件--> | ||
| 64 | + <el-form-item class="textLeft textCenter"> | ||
| 65 | + <el-button | ||
| 66 | + type="text" | ||
| 67 | + size="small" | ||
| 68 | + icon="el-icon-refresh" | ||
| 69 | + @click="clear" | ||
| 70 | + > | ||
| 71 | + 重置 | ||
| 72 | + </el-button> | ||
| 73 | + </el-form-item> | ||
| 74 | + </el-col> | ||
| 75 | + </el-row> | ||
| 76 | + </el-form> | ||
| 77 | + <div class="optionButton"> | ||
| 78 | + <el-button | ||
| 79 | + class="entrySaveButton" | ||
| 80 | + icon="el-icon-plus" | ||
| 81 | + size="small" | ||
| 82 | + @click="addRole" | ||
| 83 | + > | ||
| 84 | + 新增 | ||
| 85 | + </el-button> | ||
| 86 | + </div> | ||
| 87 | + <Table | ||
| 88 | + class="fedexDetialTable fedexSreachTable" | ||
| 89 | + ref="entryTable" | ||
| 90 | + :data="tableData" | ||
| 91 | + :headerData="headerData" | ||
| 92 | + :maxHeight="tableMaxheight" | ||
| 93 | + :border="true" | ||
| 94 | + :pagination="true" | ||
| 95 | + :order="false" | ||
| 96 | + :loading="loadings.searchLoading" | ||
| 97 | + :page="page.pageIndex" | ||
| 98 | + :pageSizes="[20, 30, 50, 100]" | ||
| 99 | + :totalCount="page.total" | ||
| 100 | + @sizeChange="sizeChange" | ||
| 101 | + @currentChange="currentChange" | ||
| 102 | + :selection="false" | ||
| 103 | + :selectFixed="false" | ||
| 104 | + :rowSelectDataType="false" | ||
| 105 | + > | ||
| 106 | + <template slot="optionColumn"> | ||
| 107 | + <el-table-column align="left" label="操作"> | ||
| 108 | + <template slot-scope="scope"> | ||
| 109 | + <el-button type="text" @click="update(scope.row)"> | ||
| 110 | + 角色修改 | ||
| 111 | + </el-button> | ||
| 112 | + <el-button type="text" @click="muenChange(scope.row)"> | ||
| 113 | + 权限绑定 | ||
| 114 | + </el-button> | ||
| 115 | + </template> | ||
| 116 | + </el-table-column> | ||
| 117 | + </template> | ||
| 118 | + </Table> | ||
| 119 | + <DialogVue | ||
| 120 | + :outerVisible="outerVisible" | ||
| 121 | + :title="dialogTitle" | ||
| 122 | + :type="editType" | ||
| 123 | + :active="activeData" | ||
| 124 | + @close="dialogClose" | ||
| 125 | + /> | ||
| 126 | + </div> | ||
| 127 | +</template> | ||
| 128 | + | ||
| 129 | +<script> | ||
| 130 | +import { getRoleList } from "@/api/system/user.js"; | ||
| 131 | +import DialogVue from "./dialog.vue"; | ||
| 132 | +export default { | ||
| 133 | + name: "SupervisePlaceManage", | ||
| 134 | + components: { | ||
| 135 | + DialogVue, | ||
| 136 | + }, | ||
| 137 | + data() { | ||
| 138 | + return { | ||
| 139 | + sreachFormData: { | ||
| 140 | + roleName: "", | ||
| 141 | + }, | ||
| 142 | + page: { | ||
| 143 | + pageIndex: 1, | ||
| 144 | + pageSize: 20, | ||
| 145 | + total: 0, | ||
| 146 | + }, | ||
| 147 | + activeData: null, | ||
| 148 | + tableData: [], | ||
| 149 | + headerData: [ | ||
| 150 | + { | ||
| 151 | + name: "角色名", | ||
| 152 | + value: "roleName", | ||
| 153 | + width: "", | ||
| 154 | + align: "left", | ||
| 155 | + }, | ||
| 156 | + ], | ||
| 157 | + loadings: { | ||
| 158 | + searchLoading: false, | ||
| 159 | + }, | ||
| 160 | + tableMaxheight: null, | ||
| 161 | + outerVisible: false, | ||
| 162 | + dialogTitle: "", | ||
| 163 | + editType: "", | ||
| 164 | + }; | ||
| 165 | + }, | ||
| 166 | + created() { | ||
| 167 | + this.search(0); | ||
| 168 | + }, | ||
| 169 | + mounted() { | ||
| 170 | + this.tableMaxheight = window.innerHeight - 300; | ||
| 171 | + }, | ||
| 172 | + methods: { | ||
| 173 | + clear() { | ||
| 174 | + this.$refs.sreachForm.resetFields(); | ||
| 175 | + }, | ||
| 176 | + //查询 | ||
| 177 | + search(val) { | ||
| 178 | + this.loadings.searchLoading = true; | ||
| 179 | + if (val == 0) { | ||
| 180 | + this.page.pageIndex = 1; | ||
| 181 | + } | ||
| 182 | + let obj = this.sreachFormData; | ||
| 183 | + obj.pageIndex = this.page.pageIndex; | ||
| 184 | + obj.pageSize = this.page.pageSize; | ||
| 185 | + getRoleList(obj) | ||
| 186 | + .then((res) => { | ||
| 187 | + if (res.code === "200") { | ||
| 188 | + this.tableData = res.data.value; | ||
| 189 | + this.page.total = res.data.totalItems; | ||
| 190 | + this.tableData.forEach((item, idx) => { | ||
| 191 | + item.index = idx; | ||
| 192 | + }); | ||
| 193 | + } else { | ||
| 194 | + this.alertWarningMsg(res.message); | ||
| 195 | + } | ||
| 196 | + this.loadings.searchLoading = false; | ||
| 197 | + }) | ||
| 198 | + .catch((err) => { | ||
| 199 | + console.log(err); | ||
| 200 | + this.loadings.searchLoading = false; | ||
| 201 | + }); | ||
| 202 | + }, | ||
| 203 | + addRole() { | ||
| 204 | + this.dialogTitle = "新增角色"; | ||
| 205 | + this.editType = "add"; | ||
| 206 | + this.outerVisible = true; | ||
| 207 | + }, | ||
| 208 | + update(val) { | ||
| 209 | + this.dialogTitle = "修改角色"; | ||
| 210 | + this.editType = "update"; | ||
| 211 | + this.outerVisible = true; | ||
| 212 | + this.activeData = val; | ||
| 213 | + }, | ||
| 214 | + muenChange(val) { | ||
| 215 | + this.dialogTitle = "绑定权限"; | ||
| 216 | + this.editType = "menuChange"; | ||
| 217 | + this.outerVisible = true; | ||
| 218 | + this.activeData = val; | ||
| 219 | + }, | ||
| 220 | + dialogClose() { | ||
| 221 | + this.outerVisible = false; | ||
| 222 | + this.activeData = null; | ||
| 223 | + this.search(1); | ||
| 224 | + }, | ||
| 225 | + //分页 | ||
| 226 | + currentChange(val) { | ||
| 227 | + this.page.pageIndex = val.page; | ||
| 228 | + this.search(1); | ||
| 229 | + }, | ||
| 230 | + sizeChange(val) { | ||
| 231 | + this.page.pageSize = val; | ||
| 232 | + this.search(1); | ||
| 233 | + }, | ||
| 234 | + input() { | ||
| 235 | + this.$forceUpdate(); | ||
| 236 | + }, | ||
| 237 | + }, | ||
| 238 | +}; | ||
| 239 | +</script> | ||
| 240 | + | ||
| 241 | +<style scoped lang="scss"> | ||
| 242 | +@import "@/assets/styles/variables.scss"; | ||
| 243 | +.entrySreach { | ||
| 244 | + height: 100%; | ||
| 245 | + background-color: $menuLightBg; | ||
| 246 | + | ||
| 247 | + .entrySreachButton { | ||
| 248 | + display: inline-block; | ||
| 249 | + font-size: 20px; | ||
| 250 | + color: $fedexButton !important; | ||
| 251 | + } | ||
| 252 | + | ||
| 253 | + .optionButton { | ||
| 254 | + padding: 10px; | ||
| 255 | + text-align: left; | ||
| 256 | + | ||
| 257 | + .el-button { | ||
| 258 | + color: $fedexButton; | ||
| 259 | + border-color: $fedexButton !important; | ||
| 260 | + | ||
| 261 | + svg { | ||
| 262 | + display: inline-block; | ||
| 263 | + margin-right: 5px; | ||
| 264 | + fill: $fedexButton; | ||
| 265 | + } | ||
| 266 | + } | ||
| 267 | + | ||
| 268 | + .entrySaveButton:hover, | ||
| 269 | + .entrySaveButton:focus { | ||
| 270 | + color: $menuLightBg !important; | ||
| 271 | + background-color: $fedexButton !important; | ||
| 272 | + } | ||
| 273 | + } | ||
| 274 | +} | ||
| 275 | + | ||
| 276 | +.texttareaTip { | ||
| 277 | + position: absolute; | ||
| 278 | + top: 52%; | ||
| 279 | + right: 20px; | ||
| 280 | + transform: translate(0, -50%); | ||
| 281 | + z-index: 10; | ||
| 282 | +} | ||
| 283 | +</style> |
-
Please register or login to post a comment