Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-bi
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-bi
Commits
a9b8569d
提交
a9b8569d
authored
4月 08, 2025
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
e32f5936
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
26 行增加
和
8 行删除
+26
-8
ChartButtonModal.tsx
src/components/chart/ChartButtonModal.tsx
+21
-2
ButtonModal.tsx
...modules/data/preprocess/repeat/components/ButtonModal.tsx
+5
-6
没有找到文件。
src/components/chart/ChartButtonModal.tsx
浏览文件 @
a9b8569d
...
...
@@ -11,6 +11,25 @@ interface Props {
setOpen
:
(
open
:
boolean
)
=>
void
}
const
ruleOptions
=
[
{
label
:
'无计算'
,
value
:
'无计算'
},
{
label
:
'求和'
,
value
:
'求和'
},
{
label
:
'求平均值'
,
value
:
'求平均值'
},
{
label
:
'计数'
,
value
:
'计数'
},
{
label
:
'求最大值'
,
value
:
'求最大值'
},
{
label
:
'求最小值'
,
value
:
'求最小值'
},
{
label
:
'求中位数'
,
value
:
'求中位数'
},
{
label
:
'求方差'
,
value
:
'求方差'
},
]
const
sortOptions
=
[
{
label
:
'无排序'
,
value
:
'无排序'
},
{
label
:
'数值顺序'
,
value
:
'数值顺序'
},
{
label
:
'数值倒序'
,
value
:
'数值倒序'
},
{
label
:
'数值顺序Top N'
,
value
:
'数值顺序Top N'
},
{
label
:
'数值倒序Top N'
,
value
:
'数值倒序Top N'
},
]
const
ModalContent
=
({
setOpen
,
type
,
id
=
''
}:
Props
)
=>
{
const
{
fieldOptions
}
=
useDataFieldQuery
()
const
{
data
:
chartData
}
=
useViewChartQuery
(
id
)
...
...
@@ -122,12 +141,12 @@ const ModalContent = ({ setOpen, type, id = '' }: Props) => {
</
Col
>
<
Col
span=
{
8
}
>
<
Form
.
Item
label=
"计算规则"
name=
"y_rule"
>
<
Select
options=
{
[{
label
:
'无计算'
,
value
:
'无计算'
}]
}
placeholder=
"请选择"
></
Select
>
<
Select
options=
{
ruleOptions
}
placeholder=
"请选择"
></
Select
>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
8
}
>
<
Form
.
Item
label=
"排序规则"
name=
"y_sort"
>
<
Select
options=
{
[{
label
:
'无排序'
,
value
:
'无排序'
}]
}
placeholder=
"请选择"
></
Select
>
<
Select
options=
{
sortOptions
}
placeholder=
"请选择"
></
Select
>
</
Form
.
Item
>
</
Col
>
</
Row
>
...
...
src/modules/data/preprocess/repeat/components/ButtonModal.tsx
浏览文件 @
a9b8569d
...
...
@@ -18,13 +18,10 @@ export default function ButtonModal() {
const
{
isLoading
,
post
}
=
useAI
({
onComplete
:
(
message
)
=>
{
try
{
if
(
!
message
.
content
)
return
const
parse
=
JSON
.
parse
(
message
.
content
)
console
.
log
(
parse
)
if
(
parse
.
results
.
length
)
form
.
setFieldValue
(
'checkedList'
,
parse
.
results
.
map
((
item
:
any
)
=>
item
.
name
)
||
[])
}
catch
(
error
)
{
console
.
error
(
error
)
}
setResults
(
parse
.
results
||
[])
},
})
...
...
@@ -65,6 +62,7 @@ export default function ButtonModal() {
{
title
:
'请选择重复值数据'
,
content
:
(
<>
<
Form
.
Item
name=
"checkedList"
>
<
Checkbox
.
Group
>
<
Row
gutter=
{
[
10
,
10
]
}
>
...
...
@@ -75,8 +73,9 @@ export default function ButtonModal() {
))
}
</
Row
>
</
Checkbox
.
Group
>
{
!
results
.
length
&&
<
Empty
></
Empty
>
}
</
Form
.
Item
>
{
!
results
.
length
&&
<
Empty
></
Empty
>
}
</>
),
},
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论