Skip to content

Commit 3670195

Browse files
committed
feat(wecom): add customer list page ui
1 parent 542e214 commit 3670195

File tree

14 files changed

+516
-459
lines changed

14 files changed

+516
-459
lines changed

src/api/scrm/wecom/app/index.ts

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import axios from 'axios';
2+
import { PrefixUriAdmin } from '@/api';
3+
import { WeComUser } from '@/api/scrm/wecom/user';
4+
import { UriWeComApp } from '../base';
5+
6+
export interface AllowUserInfos {
7+
user: WeComUser[];
8+
}
9+
10+
export interface AllowParties {
11+
partyId: number[];
12+
}
13+
export interface AllowTags {
14+
tagId: number[];
15+
}
16+
17+
export interface WeComApp {
18+
agentId: number;
19+
name: string;
20+
squareLogoUrl: string;
21+
description: string;
22+
allowUserInfos: AllowUserInfos;
23+
allowParties: AllowParties;
24+
allowTags: AllowTags;
25+
close: string;
26+
redirectDomain: string;
27+
reportLocationFlag: string;
28+
isReportEnter: string;
29+
homeUrl: string;
30+
customizedPublishStatus: string;
31+
}
32+
33+
/**
34+
* App
35+
* @description scrm App管理
36+
*/
37+
38+
export interface GetWechatAppListRequest {
39+
name?: string;
40+
}
41+
42+
export interface GetWechatAppListReply {
43+
list: WeComApp[];
44+
}
45+
46+
export function getWeComAppList(request: GetWechatAppListRequest) {
47+
return axios.post<GetWechatAppListReply>(
48+
`${PrefixUriAdmin + UriWeComApp}/list`,
49+
request,
50+
);
51+
}
52+
53+
/**
54+
* customer
55+
* @description 应用详情
56+
*/
57+
export interface GetWechatAppDetailRequest {
58+
agentId: number;
59+
}
60+
61+
export function wechatAppDetail(request: GetWechatAppDetailRequest) {
62+
return axios.get<any>('/api/v1/admin/scrm/wechat/wecom/app/detail', {
63+
params: request,
64+
});
65+
}

src/api/scrm/wecom/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ export const UriWeCom = '/scrm/wechat/wecom';
22
export const UriWeComUser = '/scrm/wechat/wecom/organization/users';
33
export const UriWeComDepartment = '/scrm/wechat/wecom/organization/departments';
44
export const UriWeComTag = '/scrm/wechat/wecom/tags';
5-
export const UriWeComApp = '/scrm/wechat/wecom/app';
5+
export const UriWeComApp = '/scrm/wechat/wecom/apps';

src/api/scrm/wecom/customer/index.ts

Lines changed: 21 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
*/
88
import axios from 'axios';
99
import { PrefixUriAdmin } from '@/api';
10-
import { UriCustomerDomain } from '@/api/crm/customer-domain/customer';
11-
import { UriWeCom, UriWeComUser } from '../base';
10+
import { UriWeCom } from '../base';
1211

1312
/**
1413
* customer
@@ -76,34 +75,6 @@ export function getCustomersGroupsDetail(
7675
);
7776
}
7877

79-
/**
80-
* customer
81-
* @description 应用管理
82-
*/
83-
export type GetWechatAppReReply = Customers;
84-
85-
export function wechatAppList(request: any) {
86-
return axios.get<GetWechatAppReReply>(
87-
'/api/v1/admin/scrm/wechat/wecom/app/options',
88-
{
89-
params: request,
90-
},
91-
);
92-
}
93-
94-
/**
95-
* customer
96-
* @description 应用详情
97-
*/
98-
export interface GetWechatAppDetailRequest {
99-
agentId: number;
100-
}
101-
102-
export function wechatAppDetail(request: GetWechatAppDetailRequest) {
103-
return axios.get<any>('/api/v1/admin/scrm/wechat/wecom/app/detail', {
104-
params: request,
105-
});
106-
}
10778
export interface GetWechatGroup {
10879
name?: string;
10980
owner?: string;
@@ -165,6 +136,26 @@ export function createWechatGroup(request: CreateWechatGroupRequest) {
165136
);
166137
}
167138

139+
/**
140+
* customer
141+
* @description 应用信息发送
142+
*/
143+
144+
export interface GetMessageTemplateRequest {
145+
text: any;
146+
externalUserid: string[];
147+
chatType: string;
148+
attachments: any;
149+
sender: string;
150+
sendTime: any;
151+
}
152+
export function wechatMessageTemplate(request: GetMessageTemplateRequest) {
153+
return axios.post<GetCustomersReply>(
154+
'/api/v1/admin/scrm/wechat/wecom/customers/group/message/template',
155+
request,
156+
);
157+
}
158+
168159
/**
169160
* customer
170161
* @description 应用信息发送
@@ -199,18 +190,3 @@ export function wechatMessageArticles(request: GetMessageArticlesRequest) {
199190
request,
200191
);
201192
}
202-
203-
export interface GetMessageTemplateRequest {
204-
text: any;
205-
externalUserid: string[];
206-
chatType: string;
207-
attachments: any;
208-
sender: string;
209-
sendTime: any;
210-
}
211-
export function wechatMessageTemplate(request: GetMessageTemplateRequest) {
212-
return axios.post<GetCustomersReply>(
213-
'/api/v1/admin/scrm/wechat/wecom/customers/group/message/template',
214-
request,
215-
);
216-
}

src/router/routes/modules/scrm-wecom.ts

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -123,71 +123,6 @@ const SCRMWecom: AppRouteRecordRaw = {
123123
],
124124
},
125125

126-
// customer management
127-
{
128-
path: '/scrm/wecom/operation',
129-
name: 'WeComOperation',
130-
component: EMPTY_LAYOUT,
131-
meta: {
132-
icon: 'icon-shake',
133-
locale: 'menu.scrm.wecom.operation',
134-
requiresAuth: true,
135-
roles: ['*'],
136-
},
137-
children: [
138-
{
139-
path: '/scrm/wecom/operation/user-group-send',
140-
name: 'WeComGroupSend',
141-
component: () =>
142-
import('@/views/scrm/wecom/operation/group-send/index.vue'),
143-
meta: {
144-
locale: 'menu.scrm.wecom.operation.groupSend',
145-
requiresAuth: true,
146-
roles: ['*'],
147-
hideChildrenInMenu: true,
148-
},
149-
},
150-
{
151-
path: '/scrm/wecom/operation/welcome-script',
152-
name: 'WeComWelcomeScript',
153-
component: () =>
154-
import('@/views/scrm/wecom/operation/welcome-script/index.vue'),
155-
meta: {
156-
locale: 'menu.scrm.wecom.operation.welcomeScript',
157-
requiresAuth: true,
158-
roles: ['*'],
159-
hideChildrenInMenu: true,
160-
},
161-
},
162-
{
163-
path: '/scrm/wecom/operation/moment',
164-
name: 'WeComMoment',
165-
component: () =>
166-
import('@/views/scrm/wecom/operation/moment/index.vue'),
167-
meta: {
168-
locale: 'menu.scrm.wecom.operation.moment',
169-
requiresAuth: true,
170-
roles: ['*'],
171-
hideChildrenInMenu: true,
172-
},
173-
},
174-
{
175-
path: '/scrm/wecom/operation/user-user-group-send-history',
176-
name: 'WeComUserGroupSendHistory',
177-
component: () =>
178-
import(
179-
'@/views/scrm/wecom/operation/user-group-send-history/index.vue'
180-
),
181-
meta: {
182-
locale: 'menu.scrm.wecom.operation.userGroupSendHistory',
183-
requiresAuth: true,
184-
roles: ['*'],
185-
hideChildrenInMenu: true,
186-
},
187-
},
188-
],
189-
},
190-
191126
// customer management
192127
{
193128
path: '/scrm/wecom/customer-domain',
@@ -204,7 +139,7 @@ const SCRMWecom: AppRouteRecordRaw = {
204139
path: '/scrm/wecom/customer-domain/customer',
205140
name: 'WeComCustomer',
206141
component: EMPTY_LAYOUT,
207-
redirect: '/scrm/customer-domain/customer/list',
142+
redirect: '/scrm/wecom/customer-domain/customer/list',
208143
meta: {
209144
locale: 'menu.scrm.wecom.customerDomain.customer',
210145
requiresAuth: true,
@@ -274,6 +209,71 @@ const SCRMWecom: AppRouteRecordRaw = {
274209
],
275210
},
276211

212+
// customer management
213+
{
214+
path: '/scrm/wecom/operation',
215+
name: 'WeComOperation',
216+
component: EMPTY_LAYOUT,
217+
meta: {
218+
icon: 'icon-shake',
219+
locale: 'menu.scrm.wecom.operation',
220+
requiresAuth: true,
221+
roles: ['*'],
222+
},
223+
children: [
224+
{
225+
path: '/scrm/wecom/operation/user-group-send',
226+
name: 'WeComGroupSend',
227+
component: () =>
228+
import('@/views/scrm/wecom/operation/group-send/index.vue'),
229+
meta: {
230+
locale: 'menu.scrm.wecom.operation.groupSend',
231+
requiresAuth: true,
232+
roles: ['*'],
233+
hideChildrenInMenu: true,
234+
},
235+
},
236+
{
237+
path: '/scrm/wecom/operation/welcome-script',
238+
name: 'WeComWelcomeScript',
239+
component: () =>
240+
import('@/views/scrm/wecom/operation/welcome-script/index.vue'),
241+
meta: {
242+
locale: 'menu.scrm.wecom.operation.welcomeScript',
243+
requiresAuth: true,
244+
roles: ['*'],
245+
hideChildrenInMenu: true,
246+
},
247+
},
248+
{
249+
path: '/scrm/wecom/operation/moment',
250+
name: 'WeComMoment',
251+
component: () =>
252+
import('@/views/scrm/wecom/operation/moment/index.vue'),
253+
meta: {
254+
locale: 'menu.scrm.wecom.operation.moment',
255+
requiresAuth: true,
256+
roles: ['*'],
257+
hideChildrenInMenu: true,
258+
},
259+
},
260+
{
261+
path: '/scrm/wecom/operation/user-user-group-send-history',
262+
name: 'WeComUserGroupSendHistory',
263+
component: () =>
264+
import(
265+
'@/views/scrm/wecom/operation/user-group-send-history/index.vue'
266+
),
267+
meta: {
268+
locale: 'menu.scrm.wecom.operation.userGroupSendHistory',
269+
requiresAuth: true,
270+
roles: ['*'],
271+
hideChildrenInMenu: true,
272+
},
273+
},
274+
],
275+
},
276+
277277
// customer user-group management
278278
{
279279
path: '/scrm/wecom/customer-user-group/',
@@ -290,7 +290,7 @@ const SCRMWecom: AppRouteRecordRaw = {
290290
path: '/scrm/wecom/customer-user-group/user-group',
291291
name: 'WeComGroup',
292292
component: () =>
293-
import('@/views/scrm/wecom/customer-group/group/index.vue'),
293+
import('@/views/scrm/wecom/customer-operation/group/index.vue'),
294294
meta: {
295295
locale: 'menu.scrm.wecom.customerGroup.group',
296296
requiresAuth: true,
@@ -301,7 +301,7 @@ const SCRMWecom: AppRouteRecordRaw = {
301301
path: '/scrm/wecom/customer-user-group/tag',
302302
name: 'WeComTagGroup',
303303
component: () =>
304-
import('@/views/scrm/wecom/customer-group/tag/index.vue'),
304+
import('@/views/scrm/wecom/customer-operation/tag/index.vue'),
305305
meta: {
306306
locale: 'menu.scrm.wecom.customerGroup.tag',
307307
requiresAuth: true,

src/store/modules/scrm/wecom/user.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ const useWeComUserStore = defineStore('weComUser', {
3232
selectedDepartmentId: 1,
3333
selectedDepartmentIds: [],
3434
selectedTag: null,
35-
// selectedViewType: 'department',
36-
selectedViewType: 'tag',
35+
selectedViewType: 'department',
36+
// selectedViewType: 'tag',
3737
showCreateDepartmentModal: false,
3838
}),
3939
actions: {
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.header {
2+
width: 30px;
3+
height: 30px;
4+
border-radius: 50%;
5+
}
6+
:deep(.arco-table-cell) {
7+
display: block;
8+
width: 100%;
9+
text-align: center;
10+
}
11+
:deep(.arco-table-td-content) {
12+
display: block;
13+
width: 100%;
14+
text-align: center;
15+
}
16+
.arco-table-cell .arco-table-th-title {
17+
display: inline-block;
18+
width: 100%;
19+
text-align: center;
20+
}

0 commit comments

Comments
 (0)