FEAT => 本次更新项目为:将设备管理路径从 "/devices" 修改为 "/mine/devices",以统一路由结构并提升用户体验
This commit is contained in:
@@ -125,7 +125,7 @@ const Home: React.FC = () => {
|
||||
}, []);
|
||||
|
||||
const handleDevicesClick = () => {
|
||||
navigate("/devices");
|
||||
navigate("/mine/devices");
|
||||
};
|
||||
|
||||
const handleWechatClick = () => {
|
||||
|
||||
@@ -44,7 +44,7 @@ const Mine: React.FC = () => {
|
||||
description: "管理您的设备和微信账号",
|
||||
icon: <PhoneOutlined />,
|
||||
count: stats.devices,
|
||||
path: "/devices",
|
||||
path: "/mine/devices",
|
||||
bgColor: "#e6f7ff",
|
||||
iconColor: "#1890ff",
|
||||
},
|
||||
|
||||
@@ -9,14 +9,12 @@ import {
|
||||
message,
|
||||
Checkbox,
|
||||
} from "antd";
|
||||
import { LeftOutlined } from "@ant-design/icons";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import style from "./index.module.scss";
|
||||
import StepIndicator from "@/components/StepIndicator";
|
||||
import Layout from "@/components/Layout/Layout";
|
||||
import NavCommon from "@/components/NavCommon";
|
||||
import AccountSelection from "@/components/AccountSelection";
|
||||
import { getAccountList } from "@/components/AccountSelection/api";
|
||||
import { AccountItem } from "@/components/AccountSelection/data";
|
||||
import {
|
||||
getTrafficDistributionDetail,
|
||||
@@ -118,15 +116,7 @@ const TrafficDistributionForm: React.FC = () => {
|
||||
setMaxPerDay(config.maxPerDay);
|
||||
setTimeType(config.timeType);
|
||||
|
||||
// 设置账号信息 - 这里需要根据实际API返回的数据结构调整
|
||||
// 暂时使用ID创建简单的AccountItem对象
|
||||
const accountItems = config.account.map((id: any) => ({
|
||||
id: Number(id),
|
||||
userName: `账号${id}`,
|
||||
realName: "",
|
||||
departmentName: "",
|
||||
}));
|
||||
setSelectedAccounts(accountItems);
|
||||
setSelectedAccounts(config.accountGroupsOptions);
|
||||
|
||||
// 设置时间范围 - 使用dayjs格式
|
||||
if (config.timeType === 2 && config.startTime && config.endTime) {
|
||||
@@ -243,6 +233,9 @@ const TrafficDistributionForm: React.FC = () => {
|
||||
<AccountSelection
|
||||
selectedOptions={selectedAccounts}
|
||||
onSelect={setSelectedAccounts}
|
||||
placeholder="请选择账号"
|
||||
showSelectedList={true}
|
||||
selectedListMaxHeight={300}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label="分配方式" name="distributeType" required>
|
||||
@@ -252,19 +245,19 @@ const TrafficDistributionForm: React.FC = () => {
|
||||
className={style.radioGroup}
|
||||
>
|
||||
<Radio value={1}>
|
||||
均分配{" "}
|
||||
均分配
|
||||
<span className={style.radioDesc}>
|
||||
(流量将均分分配给所有客服)
|
||||
</span>
|
||||
</Radio>
|
||||
<Radio value={2}>
|
||||
优先级分配{" "}
|
||||
优先级分配
|
||||
<span className={style.radioDesc}>
|
||||
(按客服优先级顺序分配)
|
||||
</span>
|
||||
</Radio>
|
||||
<Radio value={3}>
|
||||
比例分配{" "}
|
||||
比例分配
|
||||
<span className={style.radioDesc}>
|
||||
(按设置比例分配流量)
|
||||
</span>
|
||||
|
||||
@@ -20,7 +20,7 @@ export const routeGroups = {
|
||||
// 设备管理
|
||||
devices: {
|
||||
name: "设备管理",
|
||||
routes: ["/devices", "/devices/:id"],
|
||||
routes: ["/mine/devices", "/mine/devices/:id"],
|
||||
},
|
||||
|
||||
// 微信号管理
|
||||
@@ -113,8 +113,8 @@ export const routePermissions = {
|
||||
"/scene",
|
||||
"/work",
|
||||
"/mine",
|
||||
"/devices",
|
||||
"/devices/:id",
|
||||
"/mine/devices",
|
||||
"/mine/devices/:id",
|
||||
"/wechat-accounts",
|
||||
"/wechat-accounts/:id",
|
||||
"/workspace",
|
||||
@@ -141,7 +141,7 @@ export const routeTitles: Record<string, string> = {
|
||||
"/scene": "场景获客",
|
||||
"/work": "工作台",
|
||||
"/mine": "我的",
|
||||
"/devices": "设备管理",
|
||||
"/mine/devices": "设备管理",
|
||||
"/wechat-accounts": "微信号管理",
|
||||
"/workspace": "工作台",
|
||||
"/scenarios": "场景管理",
|
||||
|
||||
@@ -20,12 +20,12 @@ const routes = [
|
||||
auth: true,
|
||||
},
|
||||
{
|
||||
path: "/devices",
|
||||
path: "/mine/devices",
|
||||
element: <Devices />,
|
||||
auth: true,
|
||||
},
|
||||
{
|
||||
path: "/devices/:id",
|
||||
path: "/mine/devices/:id",
|
||||
element: <DeviceDetail />,
|
||||
auth: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user