Skip to content

Commit 3e443b3

Browse files
committed
refact(menu): change menus apply with wecom
1 parent 3220bec commit 3e443b3

File tree

11 files changed

+100
-60
lines changed

11 files changed

+100
-60
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export interface GetCustomersGroupsReReply {
6666
}
6767
/**
6868
* customer
69-
* @description 客户群列表
69+
* @description 客户群
7070
*/
7171
export function getCustomersGroups(request: GetCustomersGroupsRequest) {
7272
return axios.post<GetCustomersGroupsReReply>(

src/locale/en-US.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export default {
7171
'menu.scrm.wecom.marketingAcquisition': 'Marketing Acquisition',
7272
'menu.scrm.wecom.marketingAcquisition.enterpriseQR': 'Enterprise QR Code',
7373
'menu.scrm.wecom.marketingAcquisition.groupQR': 'Group QR Code',
74+
'menu.scrm.wecom.marketingAcquisition.assistant': 'Acquisition Assistant',
7475
'menu.scrm.wecom.cms': 'Content Management',
7576
'menu.scrm.wecom.cms.scriptLib': 'Script Library',
7677
'menu.scrm.wecom.cms.media': 'Media Library',
@@ -95,6 +96,7 @@ export default {
9596
'menu.scrm.wecom.app': 'Application Management',
9697
'menu.scrm.wecom.sessionArchive': 'Session Archive',
9798
'menu.scrm.wecom.smartCS': 'Smart Customer Service',
99+
'menu.scrm.wecom.smartCS.chatReply': 'Chat Reply',
98100

99101
'menu.scrm.official': 'Wechat Official Account',
100102
'menu.scrm.official.menu': 'Menu',

src/locale/zh-CN.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,29 +71,31 @@ export default {
7171
'menu.scrm.wecom.marketingAcquisition': '营销获客',
7272
'menu.scrm.wecom.marketingAcquisition.enterpriseQR': '企微活码',
7373
'menu.scrm.wecom.marketingAcquisition.groupQR': '群活码',
74+
'menu.scrm.wecom.marketingAcquisition.assistant': '获客助手',
7475
'menu.scrm.wecom.cms': '内容管理',
7576
'menu.scrm.wecom.cms.scriptLib': '话术库',
7677
'menu.scrm.wecom.cms.media': '媒体库',
7778
'menu.scrm.wecom.operation': '客户运营',
78-
'menu.scrm.wecom.operation.groupSend': '客户群发',
79+
'menu.scrm.wecom.operation.groupSend': '群发工具',
7980
'menu.scrm.wecom.operation.welcomeScript': '入群欢迎语',
80-
'menu.scrm.wecom.operation.moment': '企微朋友圈',
81+
'menu.scrm.wecom.operation.moment': '客户朋友圈',
8182
'menu.scrm.wecom.operation.userGroupSendHistory': '员工群发记录',
8283
'menu.scrm.wecom.customerDomain': '客域管理',
8384
'menu.scrm.wecom.customerDomain.customer': '客户管理',
8485
'menu.scrm.wecom.customerDomain.customer.detail': '客户详情',
8586
'menu.scrm.wecom.customerDomain.tag': '客户标签',
86-
'menu.scrm.wecom.customerDomain.migrate': '客户迁移',
87+
'menu.scrm.wecom.customerDomain.migrate': '客户继承',
8788
'menu.scrm.wecom.customerDomain.blackList': '黑名单',
8889
'menu.scrm.wecom.customerGroup': '客户群管理',
89-
'menu.scrm.wecom.customerGroup.group': '客户群列表',
90+
'menu.scrm.wecom.customerGroup.group': '客户群',
9091
'menu.scrm.wecom.customerGroup.tag': '客户群标签',
9192
'menu.scrm.wecom.organization': '通讯录',
9293
'menu.scrm.wecom.users': '员工管理',
9394
'menu.scrm.wecom.group': '员工群管理',
9495
'menu.scrm.wecom.app': '应用管理',
9596
'menu.scrm.wecom.sessionArchive': '会话存档',
9697
'menu.scrm.wecom.smartCS': '智能客服',
98+
'menu.scrm.wecom.smartCS.chatReply': '聊天工具',
9799

98100
'menu.scrm.official': '微信公众号',
99101
'menu.scrm.official.menu': '菜单配置',

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

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const SCRMWecom: AppRouteRecordRaw = {
6060
children: [
6161
{
6262
path: '/scrm/wecom/marketing-acquisition/enterprise-qr',
63-
name: 'WeComEnterpriseQR',
63+
name: 'WeComMarketingAcquisitionEnterpriseQR',
6464
component: () =>
6565
import(
6666
'@/views/scrm/wecom/marketing-acquisition/enterprise-qr/index.vue'
@@ -73,7 +73,7 @@ const SCRMWecom: AppRouteRecordRaw = {
7373
},
7474
{
7575
path: '/scrm/wecom/marketing-acquisition/user-group-qr',
76-
name: 'WeComGroupQR',
76+
name: 'WeComMarketingAcquisitionGroupQR',
7777
component: () =>
7878
import(
7979
'@/views/scrm/wecom/marketing-acquisition/group-qr/index.vue'
@@ -84,6 +84,19 @@ const SCRMWecom: AppRouteRecordRaw = {
8484
roles: ['*'],
8585
},
8686
},
87+
{
88+
path: '/scrm/wecom/marketing-acquisition/assistant',
89+
name: 'WeComMarketingAcquisitionAssistant',
90+
component: () =>
91+
import(
92+
'@/views/scrm/wecom/marketing-acquisition/assistant/index.vue'
93+
),
94+
meta: {
95+
locale: 'menu.scrm.wecom.marketingAcquisition.assistant',
96+
requiresAuth: true,
97+
roles: ['*'],
98+
},
99+
},
87100
],
88101
},
89102

@@ -221,6 +234,17 @@ const SCRMWecom: AppRouteRecordRaw = {
221234
roles: ['*'],
222235
},
223236
children: [
237+
{
238+
path: '/scrm/wecom/operation/user-group',
239+
name: 'WeComGroup',
240+
component: () =>
241+
import('@/views/scrm/wecom/customer-operation/group/index.vue'),
242+
meta: {
243+
locale: 'menu.scrm.wecom.customerGroup.group',
244+
requiresAuth: true,
245+
roles: ['*'],
246+
},
247+
},
224248
{
225249
path: '/scrm/wecom/operation/user-group-send',
226250
name: 'WeComGroupSend',
@@ -274,43 +298,6 @@ const SCRMWecom: AppRouteRecordRaw = {
274298
],
275299
},
276300

277-
// customer user-group management
278-
{
279-
path: '/scrm/wecom/customer-user-group/',
280-
name: 'WeComCustomerGroup',
281-
component: EMPTY_LAYOUT,
282-
meta: {
283-
icon: 'icon-user-group',
284-
locale: 'menu.scrm.wecom.customerGroup',
285-
requiresAuth: true,
286-
roles: ['*'],
287-
},
288-
children: [
289-
{
290-
path: '/scrm/wecom/customer-user-group/user-group',
291-
name: 'WeComGroup',
292-
component: () =>
293-
import('@/views/scrm/wecom/customer-operation/group/index.vue'),
294-
meta: {
295-
locale: 'menu.scrm.wecom.customerGroup.group',
296-
requiresAuth: true,
297-
roles: ['*'],
298-
},
299-
},
300-
{
301-
path: '/scrm/wecom/customer-user-group/tag',
302-
name: 'WeComTagGroup',
303-
component: () =>
304-
import('@/views/scrm/wecom/customer-operation/tag/index.vue'),
305-
meta: {
306-
locale: 'menu.scrm.wecom.customerGroup.tag',
307-
requiresAuth: true,
308-
roles: ['*'],
309-
},
310-
},
311-
],
312-
},
313-
314301
// app management
315302
{
316303
path: '/scrm/wecom/app',
@@ -341,13 +328,26 @@ const SCRMWecom: AppRouteRecordRaw = {
341328
{
342329
path: '/scrm/wecom/smart-cs',
343330
name: 'WeComSmartCS',
344-
component: () => import('@/views/scrm/wecom/smart-cs/index.vue'),
331+
component: EMPTY_LAYOUT,
345332
meta: {
346333
icon: 'icon-robot',
347334
locale: 'menu.scrm.wecom.smartCS',
348335
requiresAuth: true,
349336
roles: ['*'],
350337
},
338+
children: [
339+
{
340+
path: '/scrm/wecom/smart-cs',
341+
name: 'WeComCustomerServiceChatReply',
342+
component: () =>
343+
import('@/views/scrm/wecom/smart-cs/chat-reply/index.vue'),
344+
meta: {
345+
locale: 'menu.scrm.wecom.smartCS.chatReply',
346+
requiresAuth: true,
347+
roles: ['*'],
348+
},
349+
},
350+
],
351351
},
352352
],
353353
};

src/views/scrm/wecom/customer-domain/migrate/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="container"> TODO: 客户迁移 </div>
2+
<div class="container"> TODO: 客户继承 </div>
33
</template>
44

55
<script lang="ts" setup></script>

src/views/scrm/wecom/customer-operation/group/index.vue

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@
77
GetCustomersGroupsRequest,
88
} from '@/api/scrm/wecom/customer';
99
import { pullSyncWeComDepartmentsAndUsers } from '@/api/scrm/wecom/user';
10+
import useLoadingStore from '@/store/modules/loading';
1011
import styles from './index.module.less';
1112
1213
const sender = ref('');
1314
const chatIds = ref([] as string[]);
1415
1516
const state = reactive({
16-
loading: false,
1717
visible: false,
1818
});
19+
20+
const loadingStore = useLoadingStore();
1921
const customersParams = ref({
2022
status_filter: 0,
2123
limit: 100,
@@ -31,30 +33,30 @@
3133
...customersParams.value,
3234
});
3335
async function fetchCustomers() {
34-
state.loading = true;
35-
const res = await getCustomersGroups({
36-
...customersParams.value,
37-
});
36+
loadingStore.setLoading(true);
3837
try {
38+
const res = await getCustomersGroups({
39+
...customersParams.value,
40+
});
3941
customersList.list = res.data?.list;
4042
} finally {
41-
state.loading = false;
43+
loadingStore.setLoading(false);
4244
}
4345
}
4446
async function fetchPullSyncWeComDepartmentsAndUsers() {
45-
state.loading = true;
46-
const res = await pullSyncWeComDepartmentsAndUsers({
47-
sync: 1,
48-
});
47+
loadingStore.setLoading(true);
4948
try {
49+
const res = await pullSyncWeComDepartmentsAndUsers({
50+
sync: 1,
51+
});
5052
if (res) {
5153
Message.success('同步成功');
5254
fetchCustomers();
5355
}
54-
} catch (err) {
55-
state.loading = false;
56+
} catch (err: any) {
57+
Message.error(err.message);
5658
} finally {
57-
state.loading = false;
59+
loadingStore.setLoading(false);
5860
}
5961
}
6062
const handleSubmit = () => {
@@ -68,6 +70,16 @@
6870
state.visible = false;
6971
};
7072
73+
const onChangeFilterDateRange = () => {
74+
console.log('onChangeFilterDateRange');
75+
};
76+
const onSelectFilterDateRange = () => {
77+
console.log('onSelectFilterDateRange');
78+
};
79+
const onOkFilterDateRange = () => {
80+
console.log('onOkFilterDateRange');
81+
};
82+
7183
const handleSendMsgAll = () => {
7284
if (customersList.list.length === 0) {
7385
Message.error('暂无客户群信息');
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.container{
2+
3+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<script setup lang="ts">
2+
import styles from './index.module.less';
3+
</script>
4+
5+
<template>
6+
<div :class="styles.container">获客助手</div>
7+
</template>
8+
9+
<style scoped></style>

src/views/scrm/wecom/operation/moment/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="container"> TODO: 企微朋友圈 </div>
2+
<div class="container"> TODO: 客户朋友圈 </div>
33
</template>
44

55
<script lang="ts" setup></script>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.container{
2+
3+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<script setup lang="ts">
2+
import styles from './index.module.less';
3+
</script>
4+
5+
<template>
6+
<div :class="styles.container"></div>
7+
</template>
8+
9+
<style scoped></style>

0 commit comments

Comments
 (0)