Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-bi
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-bi
Commits
f694faae
提交
f694faae
authored
5月 23, 2025
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
6d25d440
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
17 行增加
和
10 行删除
+17
-10
ButtonModal.tsx
src/modules/data/preprocess/type/components/ButtonModal.tsx
+14
-4
types.ts
src/modules/data/preprocess/type/types.ts
+2
-5
query.ts
src/modules/data/process/binning/query.ts
+1
-1
没有找到文件。
src/modules/data/preprocess/type/components/ButtonModal.tsx
浏览文件 @
f694faae
...
...
@@ -13,11 +13,21 @@ export default function ButtonModal() {
const
[
form
]
=
Form
.
useForm
()
const
[
dataSource
,
setDataSource
]
=
useState
<
{
key
:
number
;
raw_value
:
string
;
new_value
:
string
}[]
>
([])
const
{
mutate
,
isPending
,
progress
,
message
,
remove
}
=
useProcessData
()
const
[
selectedRowKey
,
setSelectedRowKey
]
=
useState
()
const
handleRowSelection
=
(
row
:
any
)
=>
{
setSelectedRowKey
(
row
.
key
)
}
// 开始处理
const
handleStart
=
()
=>
{
form
.
validateFields
().
then
((
values
)
=>
{
mutate
(
values
)
})
const
field
:
any
=
dataSource
.
find
((
item
)
=>
item
.
key
===
selectedRowKey
)
if
(
field
)
{
mutate
({
field
:
field
.
english_name
,
type
:
field
.
new_value
})
}
else
{
message
.
error
(
'请选择要转换的字段'
)
}
}
// 关闭并重置
...
...
@@ -57,7 +67,7 @@ export default function ButtonModal() {
<
Table
bordered
pagination=
{
false
}
rowSelection=
{
{
type
:
'radio'
}
}
rowSelection=
{
{
type
:
'radio'
,
onSelect
:
handleRowSelection
}
}
columns=
{
[
{
title
:
'序号'
,
dataIndex
:
'key'
,
align
:
'center'
,
width
:
80
},
{
title
:
'字段名称'
,
dataIndex
:
'name'
,
align
:
'center'
},
...
...
src/modules/data/preprocess/type/types.ts
浏览文件 @
f694faae
export
interface
ProcessDataParams
{
fields
:
string
action
:
string
rules
:
string
rule
:
string
specify
:
string
field
:
string
type
:
string
}
src/modules/data/process/binning/query.ts
浏览文件 @
f694faae
...
...
@@ -5,7 +5,7 @@ import { useProcessProgressQuery } from '@/hooks/useQuery'
// 处理数据
export
function
useProcessData
()
{
const
{
data
,
start
,
remove
}
=
useProcessProgressQuery
({
function_name
:
'
mapp
ing'
})
const
{
data
,
start
,
remove
}
=
useProcessProgressQuery
({
function_name
:
'
binn
ing'
})
const
query
=
useMutation
({
mutationFn
:
(
data
:
ProcessDataParams
)
=>
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论