Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-bi
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-bi
Commits
449ef2db
提交
449ef2db
authored
3月 27, 2025
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
d2e4e5c7
隐藏空白字符变更
内嵌
并排
正在显示
21 个修改的文件
包含
179 行增加
和
168 行删除
+179
-168
ChartButtonModal.tsx
src/components/chart/ChartButtonModal.tsx
+128
-124
useQuery.ts
src/hooks/useQuery.ts
+13
-5
ButtonModal.tsx
src/modules/data/preprocess/null/components/ButtonModal.tsx
+3
-5
query.ts
src/modules/data/preprocess/null/query.ts
+3
-2
ButtonModal.tsx
...modules/data/preprocess/splice/components/ButtonModal.tsx
+0
-1
ButtonModal.tsx
src/modules/data/process/binning/components/ButtonModal.tsx
+2
-2
query.ts
src/modules/data/process/binning/query.ts
+2
-2
ButtonModal.tsx
src/modules/data/process/date/components/ButtonModal.tsx
+2
-2
query.ts
src/modules/data/process/date/query.ts
+2
-2
ButtonModal.tsx
...s/data/process/desensitization/components/ButtonModal.tsx
+2
-2
query.ts
src/modules/data/process/desensitization/query.ts
+2
-2
ButtonModal.tsx
src/modules/data/process/group/components/ButtonModal.tsx
+2
-2
query.ts
src/modules/data/process/group/query.ts
+2
-2
ButtonModal.tsx
src/modules/data/process/logic/components/ButtonModal.tsx
+2
-2
query.ts
src/modules/data/process/logic/query.ts
+2
-2
ButtonModal.tsx
src/modules/data/process/mapping/components/ButtonModal.tsx
+2
-2
query.ts
src/modules/data/process/mapping/query.ts
+2
-2
ButtonModal.tsx
src/modules/data/process/number/components/ButtonModal.tsx
+2
-2
query.ts
src/modules/data/process/number/query.ts
+2
-2
ButtonModal.tsx
src/modules/data/process/string/components/ButtonModal.tsx
+2
-1
query.ts
src/modules/data/process/string/query.ts
+2
-2
没有找到文件。
src/components/chart/ChartButtonModal.tsx
浏览文件 @
449ef2db
...
...
@@ -5,11 +5,15 @@ import { useCreateChart } from '@/hooks/useChartQuery'
import
{
useAI
}
from
'@/hooks/useAI'
import
{
Column
}
from
'@ant-design/plots'
export
default
function
ButtonModal
({
title
=
'新建柱状图'
,
type
=
'1'
})
{
interface
Props
{
type
:
string
setOpen
:
(
open
:
boolean
)
=>
void
}
const
ModalContent
=
({
setOpen
,
type
}:
Props
)
=>
{
const
{
data
}
=
useDataQuery
()
const
{
fieldOptions
}
=
useDataFieldQuery
()
const
[
open
,
setOpen
]
=
useState
(
false
)
const
[
form
]
=
Form
.
useForm
()
const
[
results
,
setResults
]
=
useState
({})
...
...
@@ -63,134 +67,134 @@ export default function ButtonModal({ title = '新建柱状图', type = '1' }) {
})
})
}
return
(
<>
<
Form
form=
{
form
}
preserve=
{
false
}
initialValues=
{
{
hidden_axis_x
:
'隐藏'
,
hidden_axis_y
:
'隐藏'
,
fill_color
:
'自动颜色'
,
radius
:
'不做圆滑处理'
,
legend
:
'隐藏'
,
has_title
:
'无'
,
fill_image
:
'纯色'
,
}
}
>
<
Form
.
Item
label=
"组件名称"
name=
"name"
>
<
Input
placeholder=
"请输入"
/>
</
Form
.
Item
>
<
Divider
orientation=
"left"
orientationMargin=
"0"
>
步骤1:数字字段设置
</
Divider
>
<
Row
gutter=
{
20
}
>
<
Col
span=
{
8
}
>
<
Form
.
Item
label=
"请选择“度量”字段"
name=
"y"
>
<
Select
options=
{
fieldOptions
}
placeholder=
"请选择"
></
Select
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
8
}
>
<
Form
.
Item
label=
"计算规则"
name=
"y_rule"
>
<
Select
options=
{
[{
label
:
'无计算'
,
value
:
'无计算'
}]
}
placeholder=
"请选择"
></
Select
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
8
}
>
<
Form
.
Item
label=
"排序规则"
name=
"y_sort"
>
<
Select
options=
{
[{
label
:
'无排序'
,
value
:
'无排序'
}]
}
placeholder=
"请选择"
></
Select
>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Row
gutter=
{
20
}
>
<
Col
span=
{
8
}
>
<
Form
.
Item
label=
"请选择“维度”字段"
name=
"x"
>
<
Select
options=
{
fieldOptions
}
placeholder=
"请选择"
></
Select
>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Row
gutter=
{
20
}
>
<
Col
span=
{
8
}
>
<
Form
.
Item
label=
"是否隐藏行轴"
name=
"hidden_axis_x"
>
<
Radio
.
Group
options=
{
hiddenOptions
}
></
Radio
.
Group
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
8
}
>
<
Form
.
Item
label=
"是否隐藏列轴"
name=
"hidden_axis_y"
>
<
Radio
.
Group
options=
{
hiddenOptions
}
></
Radio
.
Group
>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Divider
orientation=
"left"
orientationMargin=
"0"
>
步骤2:辅助可视化设置
</
Divider
>
<
Row
gutter=
{
20
}
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
"请选择“标签”字段"
name=
"label"
>
<
Select
options=
{
fieldOptions
}
placeholder=
"请选择"
></
Select
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
"请选择颜色规则"
name=
"fill_color"
>
<
Radio
.
Group
options=
{
[
'自动颜色'
,
'不同柱子颜色不同'
]
}
></
Radio
.
Group
>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Row
gutter=
{
20
}
>
<
Col
span=
{
12
}
>
<
Flex
>
<
Form
.
Item
label=
"是否有标题"
name=
"has_title"
>
<
Radio
.
Group
options=
{
[
'无'
,
'有'
]
}
></
Radio
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
name=
"title"
>
<
Input
placeholder=
"请输入"
/>
</
Form
.
Item
>
</
Flex
>
</
Col
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
"请选择填充图案"
name=
"fill_image"
>
<
Radio
.
Group
options=
{
[
'纯色'
,
'斜线'
,
'横线'
,
'竖线'
]
}
></
Radio
.
Group
>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Row
gutter=
{
20
}
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
"是否隐藏图例"
name=
"legend"
>
<
Radio
.
Group
options=
{
hiddenOptions
}
></
Radio
.
Group
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
"是否四个角圆滑"
name=
"radius"
>
<
Radio
.
Group
options=
{
[
'不做圆滑处理'
,
'四个角圆滑处理'
,
'两个角圆滑处理'
]
}
></
Radio
.
Group
>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Divider
orientation=
"left"
orientationMargin=
"0"
>
步骤3:预览组件效果
</
Divider
>
{
!!
Object
.
keys
(
results
).
length
&&
<
Column
{
...
config
}
/>
}
</
Form
>
<
Flex
justify=
"center"
gap=
{
20
}
>
<
Button
type=
"primary"
onClick=
{
handlePreview
}
>
预览组件效果
</
Button
>
<
Button
type=
"primary"
>
AI对话调整
</
Button
>
<
Button
type=
"primary"
autoInsertSpace
onClick=
{
handleSubmit
}
>
保存
</
Button
>
</
Flex
>
</>
)
}
export
default
function
ButtonModal
({
title
=
'新建柱状图'
,
type
=
'1'
})
{
const
[
open
,
setOpen
]
=
useState
(
false
)
return
(
<>
<
Button
type=
"primary"
onClick=
{
()
=>
setOpen
(
true
)
}
>
{
title
}
</
Button
>
<
Modal
title=
{
title
}
open=
{
open
}
footer=
{
<
Flex
justify=
"center"
gap=
{
20
}
>
<
Button
type=
"primary"
onClick=
{
handlePreview
}
>
预览组件效果
</
Button
>
<
Button
type=
"primary"
>
AI对话调整
</
Button
>
<
Button
type=
"primary"
autoInsertSpace
onClick=
{
handleSubmit
}
>
保存
</
Button
>
</
Flex
>
}
destroyOnClose
width=
{
1000
}
onCancel=
{
()
=>
setOpen
(
false
)
}
>
<
div
style=
{
{
minHeight
:
300
,
padding
:
'20px 0'
}
}
>
<
Form
form=
{
form
}
preserve=
{
false
}
initialValues=
{
{
hidden_axis_x
:
'隐藏'
,
hidden_axis_y
:
'隐藏'
,
fill_color
:
'自动颜色'
,
radius
:
'不做圆滑处理'
,
legend
:
'隐藏'
,
has_title
:
'无'
,
fill_image
:
'纯色'
,
}
}
>
<
Form
.
Item
label=
"组件名称"
name=
"name"
>
<
Input
placeholder=
"请输入"
/>
</
Form
.
Item
>
<
Divider
orientation=
"left"
orientationMargin=
"0"
>
步骤1:数字字段设置
</
Divider
>
<
Row
gutter=
{
20
}
>
<
Col
span=
{
8
}
>
<
Form
.
Item
label=
"请选择“度量”字段"
name=
"y"
>
<
Select
options=
{
fieldOptions
}
placeholder=
"请选择"
></
Select
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
8
}
>
<
Form
.
Item
label=
"计算规则"
name=
"y_rule"
>
<
Select
options=
{
[{
label
:
'无计算'
,
value
:
'无计算'
}]
}
placeholder=
"请选择"
></
Select
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
8
}
>
<
Form
.
Item
label=
"排序规则"
name=
"y_sort"
>
<
Select
options=
{
[{
label
:
'无排序'
,
value
:
'无排序'
}]
}
placeholder=
"请选择"
></
Select
>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Row
gutter=
{
20
}
>
<
Col
span=
{
8
}
>
<
Form
.
Item
label=
"请选择“维度”字段"
name=
"x"
>
<
Select
options=
{
fieldOptions
}
placeholder=
"请选择"
></
Select
>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Row
gutter=
{
20
}
>
<
Col
span=
{
8
}
>
<
Form
.
Item
label=
"是否隐藏行轴"
name=
"hidden_axis_x"
>
<
Radio
.
Group
options=
{
hiddenOptions
}
></
Radio
.
Group
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
8
}
>
<
Form
.
Item
label=
"是否隐藏列轴"
name=
"hidden_axis_y"
>
<
Radio
.
Group
options=
{
hiddenOptions
}
></
Radio
.
Group
>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Divider
orientation=
"left"
orientationMargin=
"0"
>
步骤2:辅助可视化设置
</
Divider
>
<
Row
gutter=
{
20
}
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
"请选择“标签”字段"
name=
"label"
>
<
Select
options=
{
fieldOptions
}
placeholder=
"请选择"
></
Select
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
"请选择颜色规则"
name=
"fill_color"
>
<
Radio
.
Group
options=
{
[
'自动颜色'
,
'不同柱子颜色不同'
]
}
></
Radio
.
Group
>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Row
gutter=
{
20
}
>
<
Col
span=
{
12
}
>
<
Flex
>
<
Form
.
Item
label=
"是否有标题"
name=
"has_title"
>
<
Radio
.
Group
options=
{
[
'无'
,
'有'
]
}
></
Radio
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
name=
"title"
>
<
Input
placeholder=
"请输入"
/>
</
Form
.
Item
>
</
Flex
>
</
Col
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
"请选择填充图案"
name=
"fill_image"
>
<
Radio
.
Group
options=
{
[
'纯色'
,
'斜线'
,
'横线'
,
'竖线'
]
}
></
Radio
.
Group
>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Row
gutter=
{
20
}
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
"是否隐藏图例"
name=
"legend"
>
<
Radio
.
Group
options=
{
hiddenOptions
}
></
Radio
.
Group
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
12
}
>
<
Form
.
Item
label=
"是否四个角圆滑"
name=
"radius"
>
<
Radio
.
Group
options=
{
[
'不做圆滑处理'
,
'四个角圆滑处理'
,
'两个角圆滑处理'
]
}
></
Radio
.
Group
>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Divider
orientation=
"left"
orientationMargin=
"0"
>
步骤3:预览组件效果
</
Divider
>
{
!!
Object
.
keys
(
results
).
length
&&
<
Column
{
...
config
}
/>
}
</
Form
>
</
div
>
<
Modal
title=
{
title
}
open=
{
open
}
footer=
{
null
}
destroyOnClose
width=
{
1000
}
onCancel=
{
()
=>
setOpen
(
false
)
}
>
<
ModalContent
type=
{
type
}
setOpen=
{
(
open
)
=>
setOpen
(
open
)
}
/>
</
Modal
>
</>
)
...
...
src/hooks/useQuery.ts
浏览文件 @
449ef2db
import
{
useEffect
,
useState
}
from
'react'
import
{
useQuery
}
from
'@tanstack/react-query'
import
{
useQuery
,
useQueryClient
}
from
'@tanstack/react-query'
import
{
getUser
,
getMapList
,
getMyList
,
getMyField
,
getProcessProgress
}
from
'@/api/base'
import
{
useUserStore
}
from
'@/stores/user'
import
{
useMapStore
}
from
'@/stores/map'
...
...
@@ -111,7 +111,9 @@ export function useDataFieldQuery() {
// 进度查询
export
function
useProcessProgressQuery
(
params
:
{
function_name
:
string
})
{
const
queryClient
=
useQueryClient
()
const
[
enabled
,
setEnabled
]
=
useState
(
false
)
const
query
=
useQuery
({
queryKey
:
[
'processProgress'
,
params
],
queryFn
:
()
=>
{
...
...
@@ -119,11 +121,18 @@ export function useProcessProgressQuery(params: { function_name: string }) {
},
select
:
(
res
)
=>
res
.
data
,
enabled
,
refetchInterval
:
enabled
?
1000
0
:
false
,
refetchInterval
:
enabled
?
1000
:
false
,
staleTime
:
0
,
gcTime
:
0
,
placeholderData
:
():
any
=>
{
return
{
data
:
{
progress
:
-
1
,
message
:
{}
}
}
},
})
const
remove
=
()
=>
{
queryClient
.
removeQueries
({
queryKey
:
[
'processProgress'
,
params
]
})
}
// 开始轮询的方法
const
start
=
()
=>
{
setEnabled
(
true
)
...
...
@@ -133,7 +142,6 @@ export function useProcessProgressQuery(params: { function_name: string }) {
const
stop
=
()
=>
{
setEnabled
(
false
)
}
console
.
log
(
query
.
data
)
// 组件卸载时清理
useEffect
(()
=>
{
if
(
query
.
data
?.
result
===
'SUCCESS'
||
query
.
data
?.
result
===
'FAIL'
||
query
.
data
?.
result
===
null
)
{
...
...
@@ -142,7 +150,7 @@ export function useProcessProgressQuery(params: { function_name: string }) {
return
()
=>
{
stop
()
}
},
[
query
.
data
])
},
[
query
.
data
,
enabled
])
return
{
...
query
,
start
,
stop
}
return
{
...
query
,
start
,
stop
,
remove
}
}
src/modules/data/preprocess/null/components/ButtonModal.tsx
浏览文件 @
449ef2db
...
...
@@ -65,14 +65,12 @@ export default function ButtonModal() {
const
rule
=
Form
.
useWatch
(
'rule'
,
form
)
const
rules
=
Form
.
useWatch
(
'rules'
,
form
)
||
{}
const
{
mutate
,
isPending
,
progress
,
message
}
=
useProcessData
()
const
{
mutate
,
isPending
,
progress
,
message
,
remove
}
=
useProcessData
()
// 开始处理
const
handleStart
=
()
=>
{
form
.
validateFields
().
then
((
values
)
=>
{
const
params
=
{
...
values
,
fields
:
values
.
fields
.
join
(
','
),
rules
:
JSON
.
stringify
(
values
.
rules
)
}
mutate
(
params
,
{
onSuccess
:
handleClose
,
})
mutate
(
params
)
})
}
...
...
@@ -80,7 +78,7 @@ export default function ButtonModal() {
const
handleClose
=
()
=>
{
setOpen
(
false
)
setCurrent
(
0
)
form
.
resetFields
()
remove
()
}
const
steps
=
[
...
...
src/modules/data/preprocess/null/query.ts
浏览文件 @
449ef2db
...
...
@@ -7,7 +7,7 @@ import { useProcessProgressQuery } from '@/hooks/useQuery'
// 处理数据
export
function
useProcessData
()
{
const
queryClient
=
useQueryClient
()
const
{
data
,
start
}
=
useProcessProgressQuery
({
function_name
:
'missing'
})
const
{
data
,
start
,
remove
}
=
useProcessProgressQuery
({
function_name
:
'missing'
})
const
query
=
useMutation
({
mutationFn
:
(
data
:
ProcessDataParams
)
=>
{
...
...
@@ -19,5 +19,6 @@ export function useProcessData() {
queryClient
.
invalidateQueries
({
queryKey
:
[
'data'
]
})
},
})
return
{
...
query
,
progress
:
data
?.
progress
??
-
1
,
message
:
data
?.
message
??
{}
}
return
{
...
query
,
progress
:
data
.
progress
,
message
:
data
.
message
,
remove
}
}
src/modules/data/preprocess/splice/components/ButtonModal.tsx
浏览文件 @
449ef2db
...
...
@@ -220,7 +220,6 @@ export default function ButtonModal() {
setCurrent
(
0
)
setStep
(
-
1
)
setConcatenatedFields
([])
form
.
resetFields
()
}
return
(
...
...
src/modules/data/process/binning/components/ButtonModal.tsx
浏览文件 @
449ef2db
...
...
@@ -31,7 +31,7 @@ export default function ButtonModal() {
setCurrent
(
current
+
1
)
}
const
{
mutate
,
isPending
,
progress
,
message
}
=
useProcessData
()
const
{
mutate
,
isPending
,
progress
,
message
,
remove
}
=
useProcessData
()
// 开始处理
const
handleStart
=
()
=>
{
...
...
@@ -46,8 +46,8 @@ export default function ButtonModal() {
const
handleClose
=
()
=>
{
setOpen
(
false
)
setCurrent
(
0
)
remove
()
}
const
[
groupName
,
setGroupName
]
=
useState
(
''
)
// 步骤定义
...
...
src/modules/data/process/binning/query.ts
浏览文件 @
449ef2db
...
...
@@ -7,7 +7,7 @@ import { useProcessProgressQuery } from '@/hooks/useQuery'
// 处理数据
export
function
useProcessData
()
{
const
queryClient
=
useQueryClient
()
const
{
data
,
start
}
=
useProcessProgressQuery
({
function_name
:
'mapping'
})
const
{
data
,
start
,
remove
}
=
useProcessProgressQuery
({
function_name
:
'mapping'
})
const
query
=
useMutation
({
mutationFn
:
(
data
:
ProcessDataParams
)
=>
{
...
...
@@ -19,5 +19,5 @@ export function useProcessData() {
queryClient
.
invalidateQueries
({
queryKey
:
[
'data'
]
})
},
})
return
{
...
query
,
progress
:
data
?.
progress
??
-
1
,
message
:
data
?.
message
??
{}
}
return
{
...
query
,
progress
:
data
.
progress
,
message
:
data
.
message
,
remove
}
}
src/modules/data/process/date/components/ButtonModal.tsx
浏览文件 @
449ef2db
...
...
@@ -103,7 +103,7 @@ export default function ButtonModal() {
setCurrent
(
current
+
1
)
}
const
{
mutate
,
isPending
,
progress
,
message
}
=
useProcessData
()
const
{
mutate
,
isPending
,
progress
,
message
,
remove
}
=
useProcessData
()
// 开始处理
const
handleStart
=
()
=>
{
...
...
@@ -126,8 +126,8 @@ export default function ButtonModal() {
const
handleClose
=
()
=>
{
setOpen
(
false
)
setCurrent
(
0
)
remove
()
}
const
handleFunctionChange
=
(
value
:
string
)
=>
{
form
.
setFieldsValue
({
content
:
`
${
value
}
()`
})
}
...
...
src/modules/data/process/date/query.ts
浏览文件 @
449ef2db
...
...
@@ -7,7 +7,7 @@ import { useProcessProgressQuery } from '@/hooks/useQuery'
// 处理数据
export
function
useProcessData
()
{
const
queryClient
=
useQueryClient
()
const
{
data
,
start
}
=
useProcessProgressQuery
({
function_name
:
'date'
})
const
{
data
,
start
,
remove
}
=
useProcessProgressQuery
({
function_name
:
'date'
})
const
query
=
useMutation
({
mutationFn
:
(
data
:
ProcessDataParams
)
=>
{
...
...
@@ -19,5 +19,5 @@ export function useProcessData() {
queryClient
.
invalidateQueries
({
queryKey
:
[
'data'
]
})
},
})
return
{
...
query
,
progress
:
data
?.
progress
??
-
1
,
message
:
data
?.
message
??
{}
}
return
{
...
query
,
progress
:
data
.
progress
,
message
:
data
.
message
,
remove
}
}
src/modules/data/process/desensitization/components/ButtonModal.tsx
浏览文件 @
449ef2db
...
...
@@ -27,7 +27,7 @@ export default function ButtonModal() {
setCurrent
(
current
+
1
)
}
const
{
mutate
,
isPending
,
progress
,
message
}
=
useProcessData
()
const
{
mutate
,
isPending
,
progress
,
message
,
remove
}
=
useProcessData
()
// 开始处理
const
handleStart
=
()
=>
{
...
...
@@ -42,8 +42,8 @@ export default function ButtonModal() {
const
handleClose
=
()
=>
{
setOpen
(
false
)
setCurrent
(
0
)
remove
()
}
// 步骤定义
const
steps
=
[
{
...
...
src/modules/data/process/desensitization/query.ts
浏览文件 @
449ef2db
...
...
@@ -7,7 +7,7 @@ import { useProcessProgressQuery } from '@/hooks/useQuery'
// 处理数据
export
function
useProcessData
()
{
const
queryClient
=
useQueryClient
()
const
{
data
,
start
}
=
useProcessProgressQuery
({
function_name
:
'anonymization'
})
const
{
data
,
start
,
remove
}
=
useProcessProgressQuery
({
function_name
:
'anonymization'
})
const
query
=
useMutation
({
mutationFn
:
(
data
:
ProcessDataParams
)
=>
{
...
...
@@ -19,5 +19,5 @@ export function useProcessData() {
queryClient
.
invalidateQueries
({
queryKey
:
[
'data'
]
})
},
})
return
{
...
query
,
progress
:
data
?.
progress
??
-
1
,
message
:
data
?.
message
??
{}
}
return
{
...
query
,
progress
:
data
.
progress
,
message
:
data
.
message
,
remove
}
}
src/modules/data/process/group/components/ButtonModal.tsx
浏览文件 @
449ef2db
...
...
@@ -44,7 +44,7 @@ export default function ButtonModal() {
setCurrent
(
current
+
1
)
}
const
{
mutate
,
isPending
,
progress
,
message
}
=
useProcessData
()
const
{
mutate
,
isPending
,
progress
,
message
,
remove
}
=
useProcessData
()
// 开始处理
const
handleStart
=
()
=>
{
...
...
@@ -69,8 +69,8 @@ export default function ButtonModal() {
const
handleClose
=
()
=>
{
setOpen
(
false
)
setCurrent
(
0
)
remove
()
}
const
[
groupName
,
setGroupName
]
=
useState
(
''
)
// 步骤定义
const
steps
=
[
...
...
src/modules/data/process/group/query.ts
浏览文件 @
449ef2db
...
...
@@ -7,7 +7,7 @@ import { useProcessProgressQuery } from '@/hooks/useQuery'
// 处理数据
export
function
useProcessData
()
{
const
queryClient
=
useQueryClient
()
const
{
data
,
start
}
=
useProcessProgressQuery
({
function_name
:
'grouping'
})
const
{
data
,
start
,
remove
}
=
useProcessProgressQuery
({
function_name
:
'grouping'
})
const
query
=
useMutation
({
mutationFn
:
(
data
:
ProcessDataParams
)
=>
{
...
...
@@ -19,5 +19,5 @@ export function useProcessData() {
queryClient
.
invalidateQueries
({
queryKey
:
[
'data'
]
})
},
})
return
{
...
query
,
progress
:
data
?.
progress
??
-
1
,
message
:
data
?.
message
??
{}
}
return
{
...
query
,
progress
:
data
.
progress
,
message
:
data
.
message
,
remove
}
}
src/modules/data/process/logic/components/ButtonModal.tsx
浏览文件 @
449ef2db
...
...
@@ -43,7 +43,7 @@ export default function ButtonModal() {
setCurrent
(
current
+
1
)
}
const
{
mutate
,
isPending
,
progress
,
message
}
=
useProcessData
()
const
{
mutate
,
isPending
,
progress
,
message
,
remove
}
=
useProcessData
()
// 开始处理
const
handleStart
=
()
=>
{
...
...
@@ -63,8 +63,8 @@ export default function ButtonModal() {
const
handleClose
=
()
=>
{
setOpen
(
false
)
setCurrent
(
0
)
remove
()
}
const
handleFunctionChange
=
(
value
:
string
)
=>
{
form
.
setFieldsValue
({
content
:
`
${
value
}
()`
})
}
...
...
src/modules/data/process/logic/query.ts
浏览文件 @
449ef2db
...
...
@@ -7,7 +7,7 @@ import { useProcessProgressQuery } from '@/hooks/useQuery'
// 处理数据
export
function
useProcessData
()
{
const
queryClient
=
useQueryClient
()
const
{
data
,
start
}
=
useProcessProgressQuery
({
function_name
:
'logic'
})
const
{
data
,
start
,
remove
}
=
useProcessProgressQuery
({
function_name
:
'logic'
})
const
query
=
useMutation
({
mutationFn
:
(
data
:
ProcessDataParams
)
=>
{
...
...
@@ -19,5 +19,5 @@ export function useProcessData() {
queryClient
.
invalidateQueries
({
queryKey
:
[
'data'
]
})
},
})
return
{
...
query
,
progress
:
data
?.
progress
??
-
1
,
message
:
data
?.
message
??
{}
}
return
{
...
query
,
progress
:
data
.
progress
,
message
:
data
.
message
,
remove
}
}
src/modules/data/process/mapping/components/ButtonModal.tsx
浏览文件 @
449ef2db
...
...
@@ -45,7 +45,7 @@ export default function ButtonModal() {
setCurrent
(
current
+
1
)
}
const
{
mutate
,
isPending
,
progress
,
message
}
=
useProcessData
()
const
{
mutate
,
isPending
,
progress
,
message
,
remove
}
=
useProcessData
()
// 开始处理
const
handleStart
=
()
=>
{
...
...
@@ -63,8 +63,8 @@ export default function ButtonModal() {
const
handleClose
=
()
=>
{
setOpen
(
false
)
setCurrent
(
0
)
remove
()
}
// 步骤定义
const
steps
=
[
{
...
...
src/modules/data/process/mapping/query.ts
浏览文件 @
449ef2db
...
...
@@ -7,7 +7,7 @@ import { useProcessProgressQuery } from '@/hooks/useQuery'
// 处理数据
export
function
useProcessData
()
{
const
queryClient
=
useQueryClient
()
const
{
data
,
start
}
=
useProcessProgressQuery
({
function_name
:
'mapping'
})
const
{
data
,
start
,
remove
}
=
useProcessProgressQuery
({
function_name
:
'mapping'
})
const
query
=
useMutation
({
mutationFn
:
(
data
:
ProcessDataParams
)
=>
{
...
...
@@ -19,5 +19,5 @@ export function useProcessData() {
queryClient
.
invalidateQueries
({
queryKey
:
[
'data'
]
})
},
})
return
{
...
query
,
progress
:
data
?.
progress
??
-
1
,
message
:
data
?.
message
??
{}
}
return
{
...
query
,
progress
:
data
.
progress
,
message
:
data
.
message
,
remove
}
}
src/modules/data/process/number/components/ButtonModal.tsx
浏览文件 @
449ef2db
...
...
@@ -43,7 +43,7 @@ export default function ButtonModal() {
setCurrent
(
current
+
1
)
}
const
{
mutate
,
isPending
,
progress
,
message
}
=
useProcessData
()
const
{
mutate
,
isPending
,
progress
,
message
,
remove
}
=
useProcessData
()
// 开始处理
const
handleStart
=
()
=>
{
...
...
@@ -63,8 +63,8 @@ export default function ButtonModal() {
const
handleClose
=
()
=>
{
setOpen
(
false
)
setCurrent
(
0
)
remove
()
}
const
handleFunctionChange
=
(
value
:
string
)
=>
{
form
.
setFieldsValue
({
content
:
`
${
value
}
()`
})
}
...
...
src/modules/data/process/number/query.ts
浏览文件 @
449ef2db
...
...
@@ -7,7 +7,7 @@ import { useProcessProgressQuery } from '@/hooks/useQuery'
// 处理数据
export
function
useProcessData
()
{
const
queryClient
=
useQueryClient
()
const
{
data
,
start
}
=
useProcessProgressQuery
({
function_name
:
'numeric'
})
const
{
data
,
start
,
remove
}
=
useProcessProgressQuery
({
function_name
:
'numeric'
})
const
query
=
useMutation
({
mutationFn
:
(
data
:
ProcessDataParams
)
=>
{
...
...
@@ -19,5 +19,5 @@ export function useProcessData() {
queryClient
.
invalidateQueries
({
queryKey
:
[
'data'
]
})
},
})
return
{
...
query
,
progress
:
data
?.
progress
??
-
1
,
message
:
data
?.
message
??
{}
}
return
{
...
query
,
progress
:
data
.
progress
,
message
:
data
.
message
,
remove
}
}
src/modules/data/process/string/components/ButtonModal.tsx
浏览文件 @
449ef2db
...
...
@@ -44,7 +44,7 @@ export default function ButtonModal() {
setCurrent
(
current
+
1
)
}
const
{
mutate
,
isPending
,
progress
,
message
}
=
useProcessData
()
const
{
mutate
,
isPending
,
progress
,
message
,
remove
}
=
useProcessData
()
// 开始处理
const
handleStart
=
()
=>
{
...
...
@@ -64,6 +64,7 @@ export default function ButtonModal() {
const
handleClose
=
()
=>
{
setOpen
(
false
)
setCurrent
(
0
)
remove
()
}
const
handleFunctionChange
=
(
value
:
string
)
=>
{
...
...
src/modules/data/process/string/query.ts
浏览文件 @
449ef2db
...
...
@@ -7,7 +7,7 @@ import { useProcessProgressQuery } from '@/hooks/useQuery'
// 处理数据
export
function
useProcessData
()
{
const
queryClient
=
useQueryClient
()
const
{
data
,
start
}
=
useProcessProgressQuery
({
function_name
:
'text'
})
const
{
data
,
start
,
remove
}
=
useProcessProgressQuery
({
function_name
:
'text'
})
const
query
=
useMutation
({
mutationFn
:
(
data
:
ProcessDataParams
)
=>
{
...
...
@@ -19,5 +19,5 @@ export function useProcessData() {
queryClient
.
invalidateQueries
({
queryKey
:
[
'data'
]
})
},
})
return
{
...
query
,
progress
:
data
?.
progress
??
-
1
,
message
:
data
?.
message
??
{}
}
return
{
...
query
,
progress
:
data
.
progress
,
message
:
data
.
message
,
remove
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论