Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
55567b83
提交
55567b83
authored
3 年前
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
20187 国家助学金、奖学金、励志奖学金、贫困生认定--添加查询条件
上级
cd08b037
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
45 行增加
和
16 行删除
+45
-16
publicApiService.js
FormInsertDiy/AffairPage/publicApiService.js
+6
-0
index.js
FormInsertDiy/config/index.js
+39
-16
没有找到文件。
FormInsertDiy/AffairPage/publicApiService.js
浏览文件 @
55567b83
...
@@ -65,6 +65,11 @@ const getHead = (dataObjId) => {
...
@@ -65,6 +65,11 @@ const getHead = (dataObjId) => {
return
apiRequest
(
'/DataColumnApi/getHeaderList'
,
{
dataObjId
});
return
apiRequest
(
'/DataColumnApi/getHeaderList'
,
{
dataObjId
});
};
};
const
getGroupList
=
(
columnId
)
=>
{
// 获取表头 workId
return
apiRequest
(
'/DataColumnApi/getGroupList'
,
{
columnId
});
};
/**
/**
* 获取下拉枚举值
* 获取下拉枚举值
* */
* */
...
@@ -244,4 +249,5 @@ export {
...
@@ -244,4 +249,5 @@ export {
handleSqlfind
,
handleSqlfind
,
getSqlOptions
,
getSqlOptions
,
getHead
,
getHead
,
getGroupList
,
};
};
This diff is collapsed.
Click to expand it.
FormInsertDiy/config/index.js
浏览文件 @
55567b83
...
@@ -74,6 +74,15 @@ const getFormArrayConfig = (header) => {
...
@@ -74,6 +74,15 @@ const getFormArrayConfig = (header) => {
required: !item.isNull,
required: !item.isNull,
}
}
);*/
);*/
}
else
if
(
item
.
options
&&
Array
.
isArray
(
item
.
options
)
&&
item
.
options
.
length
)
{
config
.
push
({
key
:
item
.
name
,
name
:
item
.
title
,
type
:
'select'
,
required
:
!
item
.
isNull
,
base52
:
item
.
base52
,
options
:
item
.
options
,
});
}
else
if
(
text
.
indexOf
(
item
.
type
)
>
-
1
)
{
}
else
if
(
text
.
indexOf
(
item
.
type
)
>
-
1
)
{
config
.
push
({
config
.
push
({
key
:
item
.
name
,
key
:
item
.
name
,
...
@@ -81,7 +90,7 @@ const getFormArrayConfig = (header) => {
...
@@ -81,7 +90,7 @@ const getFormArrayConfig = (header) => {
type
:
'input'
,
type
:
'input'
,
placeHolder
:
`请输入
${
item
.
name
}
`
,
placeHolder
:
`请输入
${
item
.
name
}
`
,
required
:
!
item
.
isNull
,
required
:
!
item
.
isNull
,
base52
:
item
.
base52
,
base52
:
item
.
base52
,
});
});
}
else
if
(
number
.
indexOf
(
item
.
type
)
>
-
1
)
{
}
else
if
(
number
.
indexOf
(
item
.
type
)
>
-
1
)
{
config
.
push
({
config
.
push
({
...
@@ -91,8 +100,8 @@ const getFormArrayConfig = (header) => {
...
@@ -91,8 +100,8 @@ const getFormArrayConfig = (header) => {
placeHolder
:
`请输入
${
item
.
name
}
`
,
placeHolder
:
`请输入
${
item
.
name
}
`
,
required
:
!
item
.
isNull
,
required
:
!
item
.
isNull
,
min
:
0
,
min
:
0
,
base52
:
item
.
base52
,
base52
:
item
.
base52
,
});
});
}
else
if
(
date
.
indexOf
(
item
.
type
)
>
-
1
)
{
}
else
if
(
date
.
indexOf
(
item
.
type
)
>
-
1
)
{
config
.
push
({
config
.
push
({
key
:
item
.
name
,
key
:
item
.
name
,
...
@@ -101,8 +110,8 @@ const getFormArrayConfig = (header) => {
...
@@ -101,8 +110,8 @@ const getFormArrayConfig = (header) => {
placeHolder
:
`请输入
${
item
.
name
}
`
,
placeHolder
:
`请输入
${
item
.
name
}
`
,
required
:
!
item
.
isNull
,
required
:
!
item
.
isNull
,
format
:
format
[
item
.
type
],
format
:
format
[
item
.
type
],
base52
:
item
.
base52
,
base52
:
item
.
base52
,
});
});
}
else
{
}
else
{
config
.
push
({
config
.
push
({
key
:
item
.
name
,
key
:
item
.
name
,
...
@@ -110,8 +119,8 @@ const getFormArrayConfig = (header) => {
...
@@ -110,8 +119,8 @@ const getFormArrayConfig = (header) => {
type
:
'input'
,
type
:
'input'
,
placeHolder
:
`请输入
${
item
.
name
}
`
,
placeHolder
:
`请输入
${
item
.
name
}
`
,
required
:
!
item
.
isNull
,
required
:
!
item
.
isNull
,
base52
:
item
.
base52
,
base52
:
item
.
base52
,
});
});
}
}
}
}
return
config
;
return
config
;
...
@@ -164,17 +173,31 @@ const getSearchCondition = async (id) => {
...
@@ -164,17 +173,31 @@ const getSearchCondition = async (id) => {
});
});
}
}
});
});
const
refIds
=
[];
for
(
let
item
of
searchHeaders
)
{
searchHeaders
.
forEach
((
x
)
=>
{
if
(
item
.
isGroupQuery
&&
item
.
id
)
{
// 获取下拉搜索条件的枚举项
if
(
!!
x
.
referenceObjId
)
{
item
.
options
=
await
service
.
getGroupList
(
item
.
id
).
then
((
res
)
=>
{
refIds
.
push
(
x
.
referenceObjId
);
if
(
res
&&
Array
.
isArray
(
res
))
{
return
res
.
filter
((
x
)
=>
{
return
x
.
value
!==
item
.
title
;
}).
map
((
x
)
=>
{
return
{
key
:
x
.
value
,
name
:
x
.
value
,
};
});
}
else
{
return
[];
}
});
}
}
});
const
condition
=
getFormArrayConfig
(
searchHeaders
);
if
(
refIds
&&
refIds
.
length
)
{
// TODO 暂时不处理下拉的搜索条件 要考虑 getOpts 里面提及的各种问题
const
options
=
await
service
.
getBatchOptions
(
refIds
);
console
.
log
(
options
);
}
}
const
condition
=
getFormArrayConfig
(
searchHeaders
);
console
.
log
(
condition
);
condition
.
forEach
((
x
)
=>
{
x
.
required
=
false
;
});
return
condition
;
return
condition
;
};
};
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论