Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ujia
/
uj-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f588052c
authored
Nov 18, 2026
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增群活码编辑页面及相关功能,优化群组配置管理
1 parent
9af59b70
Pipeline
#527
for
f588052c
failed
in 0 seconds
Changes
7
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
459 additions
and
16 deletions
apps/web/subapps/usedcar/src/App.tsx
apps/web/subapps/usedcar/src/pages/CustomerGroup/GroupCodeEditor.tsx
apps/web/subapps/usedcar/src/pages/CustomerGroup/LiveCodesTab.tsx
apps/web/subapps/usedcar/src/pages/CustomerGroup/StoreConfigTab.tsx
apps/web/subapps/usedcar/src/pages/CustomerGroup/customerGroup.css
apps/web/subapps/usedcar/src/pages/CustomerGroup/index.tsx
packages/ui/src/styles/feedback.css
apps/web/subapps/usedcar/src/App.tsx
View file @
f588052
...
@@ -28,6 +28,7 @@ import Reports from './pages/Reports';
...
@@ -28,6 +28,7 @@ import Reports from './pages/Reports';
import Condition from './pages/Condition';
import Condition from './pages/Condition';
import ConditionDetail from './pages/Condition/ConditionDetail';
import ConditionDetail from './pages/Condition/ConditionDetail';
import CustomerGroup from './pages/CustomerGroup';
import CustomerGroup from './pages/CustomerGroup';
import GroupCodeEditor from './pages/CustomerGroup/GroupCodeEditor';
import type { PageParams, RouteDef } from './routes';
import type { PageParams, RouteDef } from './routes';
import { matchRoute } from './routes';
import { matchRoute } from './routes';
...
@@ -58,10 +59,18 @@ const ROUTES: RouteDef[] = [
...
@@ -58,10 +59,18 @@ const ROUTES: RouteDef[] = [
{ path: 'condition', Page: Condition },
{ path: 'condition', Page: Condition },
{ path: 'condition/:id', Page: ConditionDetail },
{ path: 'condition/:id', Page: ConditionDetail },
{ path: 'customer-group', Page: CustomerGroup },
{ path: 'customer-group', Page: CustomerGroup },
{ path: 'customer-group/live-code/create', Page: GroupCodeEditor },
{ path: 'customer-group/live-code/:mode/:id', Page: GroupCodeEditor },
];
];
function renderPage(subPath: string) {
function renderPage(subPath: string) {
const matched = matchRoute(ROUTES, subPath);
const matched = matchRoute(ROUTES, subPath);
// 创建/修改群活码是从一客一群页内跳转的二级页面。保留兜底识别,避免主壳在热更新
// 菜单页面时短暂持有旧路由表,导致用户落到“没有匹配页面”。
if (!matched && subPath.startsWith('customer-group/live-code/')) {
const [, , mode, id] = subPath.split('/');
return <GroupCodeEditor params={{ mode, ...(id ? { id } : {}) }} />;
}
if (!matched) {
if (!matched) {
return <UEmpty description={`没有匹配「${subPath}」的页面,请从菜单进入`} />;
return <UEmpty description={`没有匹配「${subPath}」的页面,请从菜单进入`} />;
}
}
...
...
apps/web/subapps/usedcar/src/pages/CustomerGroup/GroupCodeEditor.tsx
0 → 100644
View file @
f588052
import { useEffect, useMemo, useState } from 'react';
import { useQuery } from '@tanstack/react-query';
import { UAlert, UButton, UCard, UForm, UInput, UModal, UResult, useUMessage } from '@uj/ui';
import { CombiForm, DataTable, PageShell, type FieldSchema } from '@/components';
import { liveCodeApi } from '@/api';
import { useAccess } from '@/access';
import { UC } from '@/permissions/codes';
import { errorDetail } from '@/utils/error';
import { goTo } from '../Leads/navigate';
type Group = Record<string, unknown> & {
groupChatId: string;
groupChatName: string;
disabled?: boolean;
free?: boolean;
};
type Detail = Record<string, unknown> & { groupList?: Group[]; id?: string | number };
type Values = { liveName: string; storeId: string; remark?: string; lockTime: string };
type Props = { params?: { id?: string; mode?: string } };
const text = (value: unknown) =>
value === undefined || value === null || value === '' ? '-' : String(value);
function GroupPicker({
open,
liveCodeId,
selected,
onCancel,
onConfirm,
}: {
open: boolean;
liveCodeId?: string;
selected: Group[];
onCancel: () => void;
onConfirm: (groups: Group[]) => void;
}) {
const [name, setName] = useState('');
const [keys, setKeys] = useState<React.Key[]>(selected.map((item) => item.groupChatId));
const [picked, setPicked] = useState<Group[]>(selected);
useEffect(() => {
if (open) {
setKeys(selected.map((item) => item.groupChatId));
setPicked(selected);
}
}, [open, selected]);
const query = useQuery({
queryKey: ['live-code-groups', name, liveCodeId],
enabled: open,
queryFn: () =>
liveCodeApi.getGroupChatList<Group[]>({
groupChatName: name,
...(liveCodeId ? { id: liveCodeId } : {}),
}),
});
const data = query.data ?? [];
return (
<UModal
open={open}
title="选择企微群聊"
width={1080}
onCancel={onCancel}
onOk={() => onConfirm(picked)}
>
<div className="uj-combo-search">
<UInput
value={name}
placeholder="请输入群聊名称"
maxLength={100}
onChange={(event) => {
setName(event.target.value);
}}
/>
<UButton type="primary" onClick={() => void query.refetch()}>
查询
</UButton>
</div>
{query.isError ? (
<UAlert
type="error"
showIcon
title="企微群聊加载失败"
description={errorDetail(query.error)}
/>
) : null}
<DataTable<Group>
rowKey="groupChatId"
columns={[
{ title: '群聊名称', dataIndex: 'groupChatName', render: text },
{
title: '群状态',
dataIndex: 'groupStatus',
width: 140,
render: (_, item) => (item.free ? '空闲' : '占用'),
},
]}
dataSource={data}
loading={query.isPending || query.isFetching}
rowSelection={{
selectedRowKeys: keys,
onChange: (nextKeys) => {
setKeys(nextKeys);
setPicked((old) => {
const current = new Map(data.map((item) => [item.groupChatId, item]));
return [
...old.filter(
(item) => !current.has(item.groupChatId) && nextKeys.includes(item.groupChatId),
),
...data.filter((item) => nextKeys.includes(item.groupChatId)),
];
});
},
getCheckboxProps: (item) => ({
disabled: Boolean(item.disabled),
}),
}}
pagination={false}
/>
</UModal>
);
}
export default function GroupCodeEditor({ params }: Props) {
const editing = params?.mode === 'edit';
const { canPoint } = useAccess();
const message = useUMessage();
const [form] = UForm.useForm<Values>();
const [groups, setGroups] = useState<Group[]>([]);
const [pickerOpen, setPickerOpen] = useState(false);
const [saving, setSaving] = useState(false);
const stores = useQuery({
queryKey: ['live-code-dealers'],
queryFn: () => liveCodeApi.getCarDealerList<Record<string, unknown>[]>(),
});
const detail = useQuery({
queryKey: ['live-code-detail', params?.id],
enabled: editing && Boolean(params?.id),
queryFn: () => liveCodeApi.getLiveCodeDetail<Detail>({ id: params?.id }),
});
useEffect(() => {
if (!detail.data) return;
const { groupList, ...values } = detail.data;
form.setFieldsValue({
liveName: text(values.liveName),
storeId: text(values.storeId),
remark: values.remark ? String(values.remark) : '',
lockTime: text(values.lockTime),
});
setGroups(groupList ?? []);
}, [detail.data, form]);
const fields: FieldSchema<Values>[] = useMemo(
() => [
{
name: 'liveName',
label: '活码名称',
type: 'input',
inputProps: { maxLength: 20 },
rules: [{ required: true, message: '请输入活码名称' }],
},
{
name: 'storeId',
label: '4S店',
type: 'select',
options: (stores.data ?? []).map((item) => ({
value: String(item.mainMerchantId ?? ''),
label: String(item.mainMerchantName ?? ''),
})),
selectProps: { showSearch: true, optionFilterProp: 'label' },
rules: [{ required: true, message: '请选择4S店' }],
},
{
name: 'remark',
label: '备注',
type: 'textarea',
textareaProps: { maxLength: 200, showCount: true, rows: 4 },
itemStyle: { gridColumn: 'span 2' },
},
{
name: 'lockTime',
label: '锁定时长(分钟)',
type: 'input',
inputProps: { inputMode: 'numeric', maxLength: 3 },
rules: [
{ required: true, message: '请输入锁定时长' },
{ pattern: /^(?:[1-9]|[1-9]\d|1[01]\d|120)$/, message: '请输入1至120的整数' },
],
},
],
[stores.data],
);
const save = async (values: Values) => {
if (!groups.length) {
message.warning('请至少关联一个企微群聊');
return;
}
const store = (stores.data ?? []).find((item) => String(item.mainMerchantId ?? '') === values.storeId);
setSaving(true);
try {
const payload = {
...values,
lockTime: Number(values.lockTime),
storeName: String(store?.mainMerchantName ?? ''),
groupChatIds: groups.map((item) => ({
groupChatId: item.groupChatId,
groupChatName: item.groupChatName,
})),
};
if (editing) await liveCodeApi.updateLiveCode({ ...payload, id: params?.id });
else await liveCodeApi.addLiveCode(payload);
message.success('保存成功');
goTo('customer-group');
} catch (error) {
message.error(errorDetail(error));
} finally {
setSaving(false);
}
};
if (!(editing ? canPoint(UC.GROUP_UPDATE) : canPoint(UC.GROUP_CREATE)))
return <UResult status="403" title="无操作群活码的权限" subTitle="请联系管理员开通权限。" />;
return (
<PageShell
title={editing ? '修改群活码' : '创建群活码'}
extra={<UButton onClick={() => goTo('customer-group')}>返回</UButton>}
>
<UCard title="基础信息" size="small">
<CombiForm
mode="form"
form={form}
fields={fields}
layout="horizontal"
labelWidth={140}
sectionContentStyle={{ display: 'grid', gridTemplateColumns: 'repeat(2, minmax(0, 1fr))', gap: '0 24px' }}
onSubmit={(values) => void save(values)}
/>
</UCard>
<UCard
title="群池配置"
size="small"
style={{ marginTop: 16 }}
extra={
<UButton type="primary" onClick={() => setPickerOpen(true)}>
从企微后台添加群聊
</UButton>
}
>
<p>已关联 {groups.length} 个群</p>
<p className="uj-page-tip">
支持最多选择1000个群聊,系统将按列表顺序自动分配状态为“空闲”的群。
</p>
<div className="uj-group-tags">
{groups.map((item) => (
<span key={item.groupChatId} className="uj-group-tag">
{item.groupChatName}
{!item.disabled ? (
<button
type="button"
onClick={() =>
setGroups((old) => old.filter((row) => row.groupChatId !== item.groupChatId))
}
>
×
</button>
) : null}
</span>
))}
</div>
</UCard>
<div className="uj-page-footer-actions">
<UButton onClick={() => goTo('customer-group')}>取消</UButton>
<UButton type="primary" loading={saving} onClick={() => form.submit()}>
保存
</UButton>
</div>
<GroupPicker
open={pickerOpen}
liveCodeId={params?.id}
selected={groups}
onCancel={() => setPickerOpen(false)}
onConfirm={(items) => {
setGroups(items.slice(0, 1000));
setPickerOpen(false);
}}
/>
</PageShell>
);
}
apps/web/subapps/usedcar/src/pages/CustomerGroup/LiveCodesTab.tsx
0 → 100644
View file @
f588052
import { useState } from 'react';
import { useQuery } from '@tanstack/react-query';
import { UAlert, UButton, UCard, useUMessage } from '@uj/ui';
import { downloadCenter } from '@uj/platform-sdk';
import { DataTable, SearchForm, type FieldSchema, type RowActionSchema } from '@/components';
import { liveCodeApi } from '@/api';
import { useAccess } from '@/access';
import { UC } from '@/permissions/codes';
import { errorDetail } from '@/utils/error';
import { goTo } from '../Leads/navigate';
type Filters = { liveName?: string; remark?: string; createdBy?: string };
type Row = Record<string, unknown> & { id: string | number; defaultQrCodeUrl?: string };
type Result = { records: Row[]; total: number };
const text = (value: unknown) => (value === undefined || value === null || value === '' ? '-' : String(value));
const fields: FieldSchema<Filters>[] = [
{ name: 'liveName', label: '活码名称', type: 'input', essential: true, inputProps: { maxLength: 50 } },
{ name: 'remark', label: '备注', type: 'input', essential: true, inputProps: { maxLength: 50 } },
{ name: 'createdBy', label: '创建人', type: 'input', essential: true, inputProps: { maxLength: 50 } },
];
export default function LiveCodesTab() {
const { canPoint } = useAccess();
const message = useUMessage();
const [filters, setFilters] = useState<Filters>({});
const [page, setPage] = useState({ current: 1, size: 10 });
const [selected, setSelected] = useState<React.Key[]>([]);
const query = useQuery({ queryKey: ['live-code-page', filters, page], queryFn: () => liveCodeApi.getLiveCodePage<Result>({ currentPage: page.current, pageSize: page.size, t: filters }) });
const remove = async (ids: React.Key[]) => { try { await liveCodeApi.deleteLiveCode({ ids }); message.success('删除成功'); setSelected((old) => old.filter((id) => !ids.includes(id))); void query.refetch(); } catch (error) { message.error(errorDetail(error)); } };
const rows: RowActionSchema<Row>[] = [
{ label: '下载', permission: UC.GROUP_DOWNLOAD, visible: (row) => Boolean(row.defaultQrCodeUrl), onClick: (row) => row.defaultQrCodeUrl && downloadCenter.url({ source: 'usedcar', sourceLabel: '二手车管理 / 一客一群', label: `${text(row.liveName)}二维码`, url: row.defaultQrCodeUrl, silent: true }) },
{ label: '修改', permission: UC.GROUP_UPDATE, onClick: (row) => goTo(`customer-group/live-code/edit/${row.id}`) },
{ label: '删除', permission: UC.GROUP_DELETE, danger: true, onClick: (row) => { if (window.confirm('确认删除该群活码吗?')) void remove([row.id]); } },
];
const columns = [
{ title: '活码名称', dataIndex: 'liveName', width: 160, line: 1, render: text }, { title: '备注', dataIndex: 'remark', width: 180, line: 2, render: text }, { title: '群总数', dataIndex: 'groupCount', width: 100, render: text }, { title: '已占用群数', dataIndex: 'occupiedGroupCount', width: 120, render: text }, { title: '空闲群数', dataIndex: 'idleGroupCount', width: 120, render: text }, { title: '创建时间', dataIndex: 'createdDate', width: 170, line: 1, render: text }, { title: '创建人', dataIndex: 'createdBy', width: 130, line: 1, render: text },
];
return <><p className="uj-page-tip">可将多个群二维码组合生成一个活码,当客户扫码进群后即与该群产生绑定,不会再接待新的客户入群。</p><UCard className="uj-filter-card" size="small"><SearchForm fields={fields} onSearch={(value) => { setFilters(value); setPage((old) => ({ ...old, current: 1 })); }} onReset={() => setFilters({})} /></UCard>{query.isError ? <UAlert type="error" showIcon title="群列表加载失败" description={errorDetail(query.error)} action={<UButton type="link" onClick={() => void query.refetch()}>重试</UButton>} /> : null}<UCard size="small" fill><DataTable<Row> rowKey="id" fillHeight columns={columns} dataSource={query.data?.records ?? []} loading={query.isPending || query.isFetching} rowSelection={{ selectedRowKeys: selected, onChange: setSelected }} rowActions={rows} actions={[...(canPoint(UC.GROUP_CREATE) ? [{ label: '创建群活码', tone: 'primary' as const, onClick: () => goTo('customer-group/live-code/create') }] : []), ...(canPoint(UC.GROUP_BATCH_DELETE) ? [{ label: '批量删除', disabled: !selected.length, onClick: () => void remove(selected) }] : [])]} pagination={{ current: page.current, pageSize: page.size, total: query.data?.total ?? 0, onChange: (current, size) => setPage({ current, size }) }} /></UCard></>;
}
apps/web/subapps/usedcar/src/pages/CustomerGroup/StoreConfigTab.tsx
0 → 100644
View file @
f588052
import { useEffect, useMemo, useState } from 'react';
import { useQuery } from '@tanstack/react-query';
import { UAlert, UButton, UCard, UForm, UModal, useUMessage } from '@uj/ui';
import { CombiForm, DataTable, SearchForm, type FieldSchema, type RowActionSchema } from '@/components';
import { liveCodeApi, storeConfigApi } from '@/api';
import { useAccess } from '@/access';
import { UC } from '@/permissions/codes';
import { errorDetail } from '@/utils/error';
type Filters = { storeName?: string; pricingSpecialistName?: string };
type Row = Record<string, unknown> & { id: string | number };
type Result = { records: Row[]; total: number };
type FormValues = { storeId: string; pricingSpecialistId: string };
const text = (value: unknown) => (value === undefined || value === null || value === '' ? '-' : String(value));
const searchFields: FieldSchema<Filters>[] = [
{ name: 'storeName', label: '4S店名称', type: 'input', essential: true, inputProps: { maxLength: 50 } },
{ name: 'pricingSpecialistName', label: '定价师', type: 'input', essential: true, inputProps: { maxLength: 50 } },
];
function StoreConfigModal({ record, onClose, onSaved }: { record: Row | null; onClose: () => void; onSaved: () => void }) {
const [form] = UForm.useForm<FormValues>();
const message = useUMessage();
const [saving, setSaving] = useState(false);
const stores = useQuery({ queryKey: ['live-code-car-dealers'], queryFn: () => liveCodeApi.getCarDealerList<Row[]>() });
const staff = useQuery({ queryKey: ['live-code-pricing-staff'], queryFn: () => storeConfigApi.getPricingStaffList<Row[]>() });
useEffect(() => { if (record) form.setFieldsValue({ storeId: text(record.storeId), pricingSpecialistId: text(record.pricingSpecialistId) }); else form.resetFields(); }, [form, record]);
const fields: FieldSchema<FormValues>[] = useMemo(() => [
{ name: 'storeId', label: '4S店', type: 'select', options: (stores.data ?? []).map((item) => ({ value: text(item.mainMerchantId), label: text(item.mainMerchantName) })), selectProps: { showSearch: true, optionFilterProp: 'label', disabled: Boolean(record?.id) }, rules: [{ required: true, message: '请选择4S店' }] },
{ name: 'pricingSpecialistId', label: '总部定价师', type: 'select', options: (staff.data ?? []).map((item) => ({ value: text(item.staffId ?? item.id), label: `${text(item.staffName)}(${text(item.staffPhone)})` })), selectProps: { showSearch: true, optionFilterProp: 'label' }, rules: [{ required: true, message: '请选择总部定价师' }] },
], [record, staff.data, stores.data]);
const save = async (values: FormValues) => {
const store = (stores.data ?? []).find((item) => text(item.mainMerchantId) === values.storeId);
const person = (staff.data ?? []).find((item) => text(item.staffId ?? item.id) === values.pricingSpecialistId);
setSaving(true);
try {
const payload = { ...values, storeName: text(store?.mainMerchantName), pricingSpecialistName: text(person?.staffName), staffPhone: text(person?.staffPhone) };
if (record?.id) await storeConfigApi.updateStoreConfig({ ...payload, id: record.id }); else await storeConfigApi.addStoreConfig(payload);
message.success('保存成功'); onSaved(); onClose();
} catch (error) { message.error(errorDetail(error)); } finally { setSaving(false); }
};
return <UModal open={Boolean(record)} title={record?.id ? '修改配置' : '新增配置'} confirmLoading={saving} onCancel={onClose} onOk={() => form.submit()}><p className="uj-page-tip">此配置用于决定该4S店收取的线索默认分配给哪位总部定价师。</p><CombiForm mode="form" form={form} layout="vertical" fields={fields} onSubmit={(values) => void save(values)} /></UModal>;
}
export default function StoreConfigTab() {
const { canPoint } = useAccess(); const message = useUMessage();
const [filters, setFilters] = useState<Filters>({}); const [page, setPage] = useState({ current: 1, size: 10 }); const [editing, setEditing] = useState<Row | null>(null); const [creating, setCreating] = useState(false);
const query = useQuery({ queryKey: ['store-config-page', filters, page], queryFn: () => storeConfigApi.getStoreConfigPage<Result>({ currentPage: page.current, pageSize: page.size, t: filters }) });
const remove = async (id: string | number) => { try { await storeConfigApi.deleteStoreConfig({ id }); message.success('删除成功'); void query.refetch(); } catch (error) { message.error(errorDetail(error)); } };
const rows: RowActionSchema<Row>[] = [{ label: '修改', permission: UC.DEALER_UPDATE, onClick: setEditing }, { label: '删除', permission: UC.DEALER_DELETE, danger: true, onClick: (row) => void remove(row.id) }];
return <><p className="uj-page-tip">管理并配置各4S店与其对应的总部定价师关联关系,以便线索精确分配。</p><UCard className="uj-filter-card" size="small"><SearchForm fields={searchFields} onSearch={(value) => { setFilters(value); setPage((old) => ({ ...old, current: 1 })); }} onReset={() => setFilters({})} /></UCard>{query.isError ? <UAlert type="error" showIcon title="4S店配置加载失败" description={errorDetail(query.error)} action={<UButton type="link" onClick={() => void query.refetch()}>重试</UButton>} /> : null}<UCard size="small" fill><DataTable<Row> rowKey="id" fillHeight columns={[{ title: '4S店名称', dataIndex: 'storeName', width: 260, line: 1, render: text }, { title: '总部定价师', dataIndex: 'pricingSpecialistName', width: 200, line: 1, render: text }, { title: '操作人', dataIndex: 'updatedBy', width: 160, line: 1, render: text }, { title: '操作时间', dataIndex: 'updatedDate', width: 180, line: 1, render: text }]} dataSource={query.data?.records ?? []} loading={query.isPending || query.isFetching} rowActions={rows} actions={canPoint(UC.DEALER_CREATE) ? [{ label: '新增配置', tone: 'primary', onClick: () => setCreating(true) }] : []} pagination={{ current: page.current, pageSize: page.size, total: query.data?.total ?? 0, onChange: (current, size) => setPage({ current, size }) }} /></UCard><StoreConfigModal record={creating ? {} as Row : editing} onClose={() => { setCreating(false); setEditing(null); }} onSaved={() => void query.refetch()} /></>;
}
apps/web/subapps/usedcar/src/pages/CustomerGroup/customerGroup.css
0 → 100644
View file @
f588052
.uj-combo-search
{
display
:
flex
;
gap
:
12px
;
margin-bottom
:
16px
;
}
.uj-combo-search
.ant-input-affix-wrapper
,
.uj-combo-search
.ant-input
{
max-width
:
360px
;
}
.uj-group-tags
{
display
:
flex
;
flex-wrap
:
wrap
;
gap
:
8px
;
min-height
:
32px
;
}
.uj-group-tag
{
display
:
inline-flex
;
align-items
:
center
;
gap
:
8px
;
max-width
:
320px
;
padding
:
4px
8px
;
overflow
:
hidden
;
border
:
1px
solid
var
(
--ant-color-border
);
border-radius
:
4px
;
color
:
var
(
--ant-color-text
);
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.uj-group-tag
button
{
flex
:
none
;
padding
:
0
;
border
:
0
;
background
:
transparent
;
color
:
inherit
;
cursor
:
pointer
;
font-size
:
18px
;
line-height
:
1
;
}
.uj-page-footer-actions
{
display
:
flex
;
justify-content
:
flex-end
;
gap
:
12px
;
margin-top
:
16px
;
}
apps/web/subapps/usedcar/src/pages/CustomerGroup/index.tsx
View file @
f588052
import { RoutePlaceholder } from '@/features/shared/RoutePlaceholder';
import { useState } from 'react';
import { UResult, UTabs } from '@uj/ui';
import { PageShell } from '@/components';
import { useAccess } from '@/access';
import { UC } from '@/permissions/codes';
import LiveCodesTab from './LiveCodesTab';
import StoreConfigTab from './StoreConfigTab';
import './customerGroup.css';
/** menu_code 1002611 · 一客一群(预生成) · usedcar:group:view */
export default function CustomerGroup() {
export default function CustomerGroup() {
return <RoutePlaceholder title="一客一群(预生成)" route="/usedcar/customer-group" />;
const { canPoint } = useAccess();
const [tab, setTab] = useState('group');
if (!canPoint(UC.GROUP_VIEW))
return <UResult status="403" title="无访问一客一群的权限" subTitle="请联系管理员开通访问权限。" />;
return (
<PageShell title="一客一群">
<UTabs activeKey={tab} onChange={setTab} items={[
{ key: 'group', label: '一客一群', children: <LiveCodesTab /> },
{ key: 'dealer', label: '4S店配置', children: <StoreConfigTab /> },
]} />
</PageShell>
);
}
}
packages/ui/src/styles/feedback.css
View file @
f588052
...
@@ -57,31 +57,25 @@
...
@@ -57,31 +57,25 @@
font-weight
:
600
;
font-weight
:
600
;
}
}
/* 图标
芯片(hero):语义色填满的圆角方块 + 白色字形,替换 antd 默认彩色透明图标
。 */
/* 图标
保持语义色字形。不要再包成实心方块,否则图标字形在部分浏览器中不可见
。 */
.ant-message
.ant-message-notice-icon
{
.ant-message
.ant-message-notice-icon
{
display
:
inline-flex
;
display
:
inline-flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
margin-inline-end
:
8px
;
width
:
22px
;
font-size
:
18px
;
height
:
22px
;
border-radius
:
var
(
--uj-radius-md
);
font-size
:
13px
;
color
:
#fff
;
box-shadow
:
0
1px
2px
rgba
(
16
,
24
,
40
,
0.18
);
animation
:
uj-feedback-chip-in
0.28s
cubic-bezier
(
0.34
,
1.56
,
0.64
,
1
)
both
;
}
}
.ant-message
.ant-message-notice-icon-success
{
.ant-message
.ant-message-notice-icon-success
{
background
:
var
(
--uj-success
);
color
:
var
(
--uj-success
);
}
}
.ant-message
.ant-message-notice-icon-error
{
.ant-message
.ant-message-notice-icon-error
{
background
:
var
(
--uj-error
);
color
:
var
(
--uj-error
);
}
}
.ant-message
.ant-message-notice-icon-warning
{
.ant-message
.ant-message-notice-icon-warning
{
background
:
var
(
--uj-warning
);
color
:
var
(
--uj-warning
);
}
}
.ant-message
.ant-message-notice-icon-info
,
.ant-message
.ant-message-notice-icon-info
,
.ant-message
.ant-message-notice-icon-loading
{
.ant-message
.ant-message-notice-icon-loading
{
background
:
var
(
--uj-primary
);
color
:
var
(
--uj-primary
);
}
}
/* ============================ NOTIFICATION ============================ */
/* ============================ NOTIFICATION ============================ */
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment