@@ -3,7 +3,7 @@ import { roleApi, roleMappingsApi, usersApi } from '@tap/api'
33import { TablePage } from ' @tap/business'
44
55import PageContainer from ' @tap/business/src/components/PageContainer.vue'
6- import { FilterBar } from ' @tap/component'
6+ import { DownBoldOutlined , FilterBar } from ' @tap/component'
77import dayjs from ' dayjs'
88import { escapeRegExp } from ' lodash-es'
99
@@ -12,6 +12,7 @@ export default {
1212 PageContainer,
1313 TablePage,
1414 FilterBar,
15+ DownBoldOutlined,
1516 },
1617 data () {
1718 return {
@@ -344,14 +345,18 @@ export default {
344345
345346 // 选择分类
346347 handleSelectTag () {
347- const tagList = {}
348+ const tagList = []
349+ const tagMap = {}
350+
348351 this .multipleSelection .forEach ((row ) => {
349- if (row .listtags && row .listtags .length > 0 ) {
350- tagList[row .listtags [0 ].id ] = {
351- value: row .listtags [0 ].value ,
352+ row .listtags .forEach ((item ) => {
353+ if (! tagMap[item .id ]) {
354+ tagList .push (item)
355+ tagMap[item .id ] = true
352356 }
353- }
357+ })
354358 })
359+
355360 return tagList
356361 },
357362 // 分类设置保存
@@ -655,40 +660,6 @@ export default {
655660< template>
656661 < PageContainer>
657662 < template #actions>
658- < el- button
659- v- show= " multipleSelection.length > 0"
660- v- readonlybtn= " 'user_category_application'"
661- class = " btn"
662- @click= " $refs.table.showClassify(handleSelectTag())"
663- >
664- < span> {{ $t (' public_button_bulk_tag' ) }}< / span>
665- < / el- button>
666- < el- dropdown
667- v- show= " multipleSelection.length > 0"
668- v- readonlybtn= " 'user_edition'"
669- @command= " handleCommand($event)"
670- >
671- < el- button class = " btn btn-dropdowm" >
672- < i class = " iconfont icon-piliang back-btn-icon" / >
673- < span> {{ $t (' public_button_bulk_operation' ) }}< / span>
674- < / el- button>
675- < template #dropdown>
676- < el- dropdown- menu>
677- < el- dropdown- item v- if = " $has('user_edition')" command= " activated" >
678- {{ $t (' user_list_bulk_activation' ) }}
679- < / el- dropdown- item>
680- < el- dropdown- item v- if = " $has('user_edition')" command= " rejected" > {{
681- $t (' user_list_bulk_freeze' )
682- }}< / el- dropdown- item>
683- < el- dropdown- item
684- v- if = " $has('user_edition')"
685- command= " notActivated"
686- >
687- {{ $t (' user_list_bulk_check' ) }}
688- < / el- dropdown- item>
689- < / el- dropdown- menu>
690- < / template>
691- < / el- dropdown>
692663 < el- button
693664 v- readonlybtn= " 'new_model_creation'"
694665 class = " btn btn-create"
@@ -702,16 +673,35 @@ export default {
702673 < TablePage
703674 ref= " table"
704675 row- key= " id"
705- class = " user-list"
706- : classify= " { authority: 'user_category_management', types: ['user'] }"
676+ class = " user-table-page"
677+ : classify= " {
678+ authority: 'user_category_management',
679+ types: ['user'],
680+ hideIcon: true,
681+ }"
707682 : remote- method= " getData"
708683 @selection- change= " handleSelectionChange"
709684 @classify- submit= " handleOperationClassify"
710685 @sort- change= " handleSortTable"
711686 >
712- < template #nav>
713- < div class = " tapNav" >
714- < ElTabs v- model= " activePanel" @tab- change= " handleTapClick" >
687+ < template #nav= " { openClassify }" >
688+ < div class = " tapNav position-relative" >
689+ < el- button
690+ class = " position-absolute z-10 start-0"
691+ text
692+ style= " top: 4px"
693+ @click= " openClassify"
694+ >
695+ < template #icon>
696+ < VIcon> expand- list< / VIcon>
697+ < / template>
698+ < / el- button>
699+
700+ < ElTabs
701+ v- model= " activePanel"
702+ style= " --el-tabs-padding-left: 36px; --el-tabs-header-height: 36px"
703+ @tab- change= " handleTapClick"
704+ >
715705 < ElTabPane
716706 v- for = " item in muneList"
717707 : key= " item.icon"
@@ -757,6 +747,45 @@ export default {
757747 < / div>
758748 < / template>
759749
750+ < template #multipleSelectionActions>
751+ < el- button
752+ v- readonlybtn= " 'user_category_application'"
753+ class = " btn"
754+ @click= " $refs.table.showClassify(handleSelectTag())"
755+ >
756+ < span> {{ $t (' public_button_bulk_tag' ) }}< / span>
757+ < / el- button>
758+ < el- dropdown
759+ v- readonlybtn= " 'user_edition'"
760+ @command= " handleCommand($event)"
761+ >
762+ < el- button class = " btn btn-dropdowm" >
763+ < span> {{ $t (' public_button_bulk_operation' ) }}< / span>
764+ < el- icon class = " ml-1" >
765+ < DownBoldOutlined / >
766+ < / el- icon>
767+ < / el- button>
768+ < template #dropdown>
769+ < el- dropdown- menu>
770+ < el- dropdown- item v- if = " $has('user_edition')" command= " activated" >
771+ {{ $t (' user_list_bulk_activation' ) }}
772+ < / el- dropdown- item>
773+ < el- dropdown- item
774+ v- if = " $has('user_edition')"
775+ command= " rejected"
776+ > {{ $t (' user_list_bulk_freeze' ) }}< / el- dropdown- item
777+ >
778+ < el- dropdown- item
779+ v- if = " $has('user_edition')"
780+ command= " notActivated"
781+ >
782+ {{ $t (' user_list_bulk_check' ) }}
783+ < / el- dropdown- item>
784+ < / el- dropdown- menu>
785+ < / template>
786+ < / el- dropdown>
787+ < / template>
788+
760789 < el- table- column type= " selection" width= " 45" : reserve- selection= " true" / >
761790 < el- table- column
762791 : label= " $t('user_list_user_name')"
@@ -1039,6 +1068,12 @@ export default {
10391068< / template>
10401069
10411070< style lang= " scss" scoped>
1071+ .user - table- page {
1072+ : deep (.classification ) {
1073+ margin- top: - 6px ! important;
1074+ }
1075+ }
1076+
10421077.user - list- wrap {
10431078 .tapNav {
10441079 : deep (.el - tabs__header ) {
@@ -1078,35 +1113,3 @@ export default {
10781113 }
10791114}
10801115< / style>
1081-
1082- < style lang= " scss" >
1083- .user - list- wrap {
1084- .table - page- container {
1085- .table - page- body {
1086- .table - page- topbar {
1087- padding- inline: 16px ;
1088- background- color: map .get ($bgColor, white);
1089- }
1090- .el - table,
1091- .el - pagination {
1092- padding- inline: 16px ;
1093- box- sizing: border- box;
1094- overflow: hidden;
1095- }
1096- .table - page- pagination {
1097- margin- top: 0 ;
1098- // padding: 5px 20px;
1099- background- color: map .get ($bgColor, white);
1100- box- sizing: border- box;
1101- }
1102- .status {
1103- padding: 5px 10px ;
1104- border- radius: 4px ;
1105- }
1106- }
1107- }
1108- .classification {
1109- margin- left: 16px ;
1110- }
1111- }
1112- < / style>
0 commit comments