File tree Expand file tree Collapse file tree 3 files changed +51
-11
lines changed
src/views/scrm/wecom/organization/user/components Expand file tree Collapse file tree 3 files changed +51
-11
lines changed Original file line number Diff line number Diff line change 6
6
listWeComUsersPage ,
7
7
listWeComUsersPageRequest ,
8
8
} from ' @/api/scrm/wecom/user' ;
9
+ import { consola } from ' consola' ;
9
10
import styles from ' ./index.module.less' ;
10
11
11
12
const useWeComUser = useWeComUserStore ();
12
13
13
14
const handleSelectTag = async (tagId : number ) => {
15
+ if (tagId == null || tagId <= 0 || tagId === useWeComUser .selectedTag ) {
16
+ return ;
17
+ }
18
+ // consola.log(tagId);
14
19
// 这里可以添加其他业务逻辑
15
20
const res = await listWeComUsersPage ({
16
21
weComTagId: tagId ,
17
22
} as listWeComUsersPageRequest );
18
23
if (res ) {
19
24
useWeComUser .tagUserList = res .data .list || [];
25
+ useWeComUser .selectedTag = tagId ;
20
26
}
21
27
};
22
28
36
42
:key =" item.tagId"
37
43
:class =" [
38
44
styles.row,
39
- { [styles.selected]: useWeComUser.selectedTag === item.tagId },
45
+ { [styles.selected]: useWeComUser.selectedTag === item.id },
40
46
]"
41
47
@click =" handleSelectTag(item.id!)"
42
48
>
Original file line number Diff line number Diff line change 14
14
}
15
15
16
16
.action {
17
- @apply flex flex- row w- full items- center justify- start w- full;
17
+ display : flex ;
18
+ flex-direction : row ;
19
+ justify-content : space-between ;
20
+ align-items : center ;
21
+ width : 100% ;
18
22
background-color : #E0E9F5 ;
19
23
gap : 10px ;
20
24
padding : 10px 20px ;
25
+ // border:1px solid red;
26
+
27
+ .left {
28
+ @apply flex flex- row w- full items- center justify- start w- full;
29
+ // border:1px solid yellow;
30
+ width : 100% ;
31
+ }
32
+
33
+ .right {
34
+ @apply flex flex- row w- full items- center justify- end w- full;
35
+ // border:1px solid yellow;
36
+ width : 100% ;
37
+ }
21
38
22
39
.actionBtn {
23
40
font-size : 12px !important ;
30
47
border-left : 1px solid #d9d9d9 ;
31
48
}
32
49
}
33
- }
50
+ }
Original file line number Diff line number Diff line change 55
55
const onRemoveUser = () => {
56
56
consola .log (' remove' );
57
57
};
58
+ const onTagDetail = () => {
59
+ consola .log (' tag detail' );
60
+ };
58
61
59
62
onMounted (() => {
60
63
queryChange ();
67
70
<span >Tag名称(0人)</span >
68
71
</div >
69
72
<div :class =" styles.action" >
70
- <a-button :class =" styles.actionBtn" @click =" onAddUser"
71
- >添加部门/成员</a-button
72
- >
73
- <a-button :class =" styles.actionBtn" @click =" onBatchExportOrImport"
74
- >批量导入/导出</a-button
75
- >
76
- <a-button :class =" styles.actionBtn" @click =" onRemoveUser" >移除</a-button >
73
+ <div :class =" styles.left" >
74
+ <a-button :class =" styles.actionBtn" @click =" onAddUser"
75
+ >添加部门/成员</a-button
76
+ >
77
+ <a-button :class =" styles.actionBtn" @click =" onBatchExportOrImport"
78
+ >批量导入/导出</a-button
79
+ >
80
+ <a-button :class =" styles.actionBtn" @click =" onRemoveUser"
81
+ >移除</a-button
82
+ >
83
+ </div >
84
+ <div :class =" styles.right" >
85
+ <a-button :class =" styles.actionBtn" @click =" onTagDetail"
86
+ >标签详情</a-button
87
+ >
88
+ </div >
77
89
</div >
90
+
78
91
<a-table
79
92
:data =" useWeComUser.tagUserList"
80
93
:loading =" state.tableLoading"
89
102
{{ record.name }}
90
103
</template >
91
104
</a-table-column >
92
- <a-table-column title =" 部门" data-index =" department" ellipsis />
105
+ <a-table-column title =" 部门" data-index =" department" ellipsis >
106
+ <template #cell =" { record } " >
107
+ {{ record.departments }}
108
+ </template >
109
+ </a-table-column >
93
110
</template >
94
111
</a-table >
95
112
</div >
You can’t perform that action at this time.
0 commit comments