Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
a24b229e
提交
a24b229e
authored
11月 28, 2022
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FormList组件修改
上级
9fa780bd
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
155 行增加
和
100 行删除
+155
-100
ActiveMenuComponent.js
FormInsertDiy/ExportComponent/ActiveMenuComponent.js
+0
-1
TableList.js
one_stop_public/libs/TableList.js
+5
-3
SplitButton.js
one_stop_public/libs/formList/SplitButton.js
+33
-0
SplitIndex.js
one_stop_public/libs/formList/SplitIndex.js
+90
-81
index.js
one_stop_public/libs/formList/index.js
+3
-0
index.jsx
one_stop_public/tableCompon/index.jsx
+24
-15
没有找到文件。
FormInsertDiy/ExportComponent/ActiveMenuComponent.js
浏览文件 @
a24b229e
...
@@ -116,7 +116,6 @@ function ActiveMenuComponent({ routerConfig, ...otherProps }) {
...
@@ -116,7 +116,6 @@ function ActiveMenuComponent({ routerConfig, ...otherProps }) {
default
:
default
:
break
;
break
;
}
}
console
.
log
(
'112233'
);
return
(
return
(
<
CreateC
.
Provider
<
CreateC
.
Provider
value
=
{{
value
=
{{
...
...
one_stop_public/libs/TableList.js
浏览文件 @
a24b229e
...
@@ -68,9 +68,9 @@ export default class TableList extends React.Component {
...
@@ -68,9 +68,9 @@ export default class TableList extends React.Component {
}
}
render
()
{
render
()
{
const
{
isTree
,
json
,
uuid
}
=
this
.
props
;
const
{
isTree
,
json
,
uuid
,
obj
}
=
this
.
props
;
const
{
showNo
}
=
this
.
state
;
const
{
showNo
}
=
this
.
state
;
// console.log(
showNo
);
// console.log(
obj
);
if
(
showNo
)
{
if
(
showNo
)
{
return
null
;
return
null
;
}
}
...
@@ -91,7 +91,8 @@ export default class TableList extends React.Component {
...
@@ -91,7 +91,8 @@ export default class TableList extends React.Component {
objCode
=
{
this
.
props
.
objCode
}
objCode
=
{
this
.
props
.
objCode
}
isFormCom
=
{
true
}
isFormCom
=
{
true
}
uuid
=
{
uuid
}
uuid
=
{
uuid
}
sql
=
{
this
.
props
.
sql
}
obj
=
{
obj
}
sql
=
{
this
.
props
.
sql
}
/
>
/
>
)
:
(
)
:
(
<
FormList
<
FormList
...
@@ -108,6 +109,7 @@ export default class TableList extends React.Component {
...
@@ -108,6 +109,7 @@ export default class TableList extends React.Component {
notShowBack
=
{
true
}
notShowBack
=
{
true
}
rights
=
{
this
.
props
.
rights
||
[]}
rights
=
{
this
.
props
.
rights
||
[]}
objCode
=
{
this
.
props
.
objCode
}
objCode
=
{
this
.
props
.
objCode
}
obj
=
{
obj
}
isFormCom
=
{
true
}
isFormCom
=
{
true
}
uuid
=
{
uuid
}
uuid
=
{
uuid
}
sql
=
{
this
.
props
.
sql
}
sql
=
{
this
.
props
.
sql
}
...
...
one_stop_public/libs/formList/SplitButton.js
0 → 100644
浏览文件 @
a24b229e
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Button
}
from
'antd'
;
export
default
function
SplitButton
(
props
)
{
const
[
stateProps
,
setProps
]
=
useState
({
...
props
});
// useEffect(() => {
// setProps({
// ...stateProps,
// onClick: props.onClick && typeof props.onClick === 'function' && props.onClick.bind(this, props.selectedRows, props.obj),
// });
// }, [props.selectedRows, props.obj]);
useEffect
(()
=>
{
if
(
props
.
changeButtonProps
&&
typeof
props
.
changeButtonProps
===
'function'
){
props
.
changeButtonProps
({
selectedRows
:
props
.
selectedRows
,
setProps
,
stateProps
,
});
}
},
[
props
.
selectedRows
]);
const
handleClick
=
(
e
)
=>
{
if
(
props
.
onClick
&&
typeof
props
.
onClick
===
'function'
){
props
.
onClick
(
e
,
props
.
selectedRows
,
props
.
obj
);
}
};
return
<
Button
{...
stateProps
}
onClick
=
{
handleClick
}
/>
;
}
one_stop_public/libs/formList/SplitIndex.js
浏览文件 @
a24b229e
...
@@ -3,90 +3,99 @@ import { Button } from 'antd';
...
@@ -3,90 +3,99 @@ import { Button } from 'antd';
import
ImportUtil
from
'@/webPublic/one_stop_public/App/ImportUtil'
;
import
ImportUtil
from
'@/webPublic/one_stop_public/App/ImportUtil'
;
import
ExportCurrentInfo
from
'@/webPublic/one_stop_public/App/ExportCurrentInfo'
;
import
ExportCurrentInfo
from
'@/webPublic/one_stop_public/App/ExportCurrentInfo'
;
import
{
Base16Encode
}
from
'@/webPublic/one_stop_public/Base16'
;
import
{
Base16Encode
}
from
'@/webPublic/one_stop_public/Base16'
;
import
SplitButton
from
'@/webPublic/one_stop_public/libs/formList/SplitButton'
;
export
function
FormListButtons
(
props
)
{
export
function
FormListButtons
(
props
)
{
const
[
ConcatButtons
,
setConCatButtons
]
=
useState
([]);
const
[
ConcatButtons
,
setConCatButtons
]
=
useState
([]);
const
{
const
{
btns
,
btns
,
loading
,
loading
,
importConfig
,
importConfig
,
getPage
,
getPage
,
objId
,
objId
,
query
,
query
,
custom
,
custom
,
sql
,
sql
,
exportConfig
exportConfig
,
}
=
props
;
selectedRows
,
const
Before
=
btns
&&
btns
.
before
||
[];
obj
,
useEffect
(()
=>
{
}
=
props
;
let
buttons
=
[];
const
Before
=
(
btns
&&
btns
.
before
)
||
[];
buttons
=
Before
.
map
((
g
)
=>
{
useEffect
(
g
.
ButtonType
=
'Normal'
;
()
=>
{
return
g
;
let
buttons
=
[];
});
buttons
=
Before
.
map
((
g
)
=>
{
for
(
let
item
of
importConfig
)
{
g
.
ButtonType
=
'Normal'
;
buttons
.
push
({
return
g
;
...
item
,
});
ButtonType
:
'import'
,
for
(
let
item
of
importConfig
)
{
});
buttons
.
push
({
}
...
item
,
let
i
=
0
;
ButtonType
:
'import'
,
for
(
let
item
of
exportConfig
)
{
});
buttons
.
push
({
}
...
item
,
let
i
=
0
;
ButtonType
:
'export'
,
for
(
let
item
of
exportConfig
)
{
index
:
i
++
,
buttons
.
push
({
});
...
item
,
}
ButtonType
:
'export'
,
buttons
.
sort
((
a
,
b
)
=>
{
index
:
i
++
,
let
priorityA
=
a
.
priority
||
0
;
});
let
priorityB
=
b
.
priority
||
0
;
}
return
priorityA
-
priorityB
;
buttons
.
sort
((
a
,
b
)
=>
{
});
let
priorityA
=
a
.
priority
||
0
;
setConCatButtons
(
buttons
);
let
priorityB
=
b
.
priority
||
0
;
},
[
exportConfig
,
importConfig
,
btns
]);
return
priorityA
-
priorityB
;
if
(
!
ConcatButtons
||
!
ConcatButtons
.
length
)
{
});
return
null
;
setConCatButtons
(
buttons
);
}
},
[
exportConfig
,
importConfig
,
btns
],
);
return
ConcatButtons
.
map
((
r
,
i
)
=>
{
if
(
!
ConcatButtons
||
!
ConcatButtons
.
length
)
{
if
(
r
.
ButtonType
===
'Normal'
)
{
return
null
;
const
propsR
=
{
...
r
};
}
delete
propsR
.
ButtonType
;
return
<
Button
{...
propsR
}
loading
=
{
loading
}
key
=
{
r
.
children
}
/>
;
}
else
if
(
r
.
ButtonType
===
'import'
)
{
return
(
<
ImportUtil
btn
=
{
r
.
btn
}
key
=
{
r
.
btn
?.
name
||
'导入'
}
ext
=
{
r
.
ext
?
r
.
ext
:
'xlsx'
}
importConfig
=
{
r
}
objId
=
{
objId
}
callback
=
{()
=>
{
getPage
();
if
(
r
.
callback
&&
typeof
r
.
callback
===
'function'
)
{
r
.
callback
();
}
}}
/>
)
;
}
else
if
(
r
.
ButtonType
===
'export'
)
{
return
<
ExportCurrentInfo
{...
r
}
objId
=
{
objId
}
key
=
{
r
.
children
||
'到处'
}
query
=
{
query
}
custom
=
{
custom
}
index
=
{
r
.
index
}
btn
=
{
r
.
btn
}
ext
=
{
r
.
ext
?
r
.
ext
:
'xlsx'
}
openSelectFieldsModal
=
{
r
.
openSelectFieldsModal
||
false
}
sql
=
{
Base16Encode
(
sql
)}
/>
;
}
});
return
ConcatButtons
.
map
((
r
,
i
)
=>
{
if
(
r
.
ButtonType
===
'Normal'
)
{
const
propsR
=
{
...
r
};
delete
propsR
.
ButtonType
;
return
(
<
SplitButton
{...
propsR
}
loading
=
{
loading
}
key
=
{
r
.
children
}
selectedRows
=
{
selectedRows
}
obj
=
{
obj
}
/
>
);
}
else
if
(
r
.
ButtonType
===
'import'
)
{
return
(
<
ImportUtil
btn
=
{
r
.
btn
}
key
=
{
r
.
btn
?.
name
||
'导入'
}
ext
=
{
r
.
ext
?
r
.
ext
:
'xlsx'
}
importConfig
=
{
r
}
objId
=
{
objId
}
callback
=
{()
=>
{
getPage
();
if
(
r
.
callback
&&
typeof
r
.
callback
===
'function'
)
{
r
.
callback
();
}
}}
/
>
);
}
else
if
(
r
.
ButtonType
===
'export'
)
{
return
(
<
ExportCurrentInfo
{...
r
}
objId
=
{
objId
}
key
=
{
r
.
children
||
'到处'
}
query
=
{
query
}
custom
=
{
custom
}
index
=
{
r
.
index
}
btn
=
{
r
.
btn
}
ext
=
{
r
.
ext
?
r
.
ext
:
'xlsx'
}
openSelectFieldsModal
=
{
r
.
openSelectFieldsModal
||
false
}
sql
=
{
Base16Encode
(
sql
)}
/
>
);
}
});
// return Before.map((r) => <Button {...r} loading={loading} key={r.children} />);
// return Before.map((r) => <Button {...r} loading={loading} key={r.children} />);
}
}
one_stop_public/libs/formList/index.js
浏览文件 @
a24b229e
...
@@ -1181,6 +1181,7 @@ class FormList extends React.Component {
...
@@ -1181,6 +1181,7 @@ class FormList extends React.Component {
istableCom
,
// 是否有模板设计器调用
istableCom
,
// 是否有模板设计器调用
value
:
{
btns
},
value
:
{
btns
},
uuid
,
uuid
,
obj
,
}
=
this
.
props
;
}
=
this
.
props
;
const
{
showMobileDiv
,
isView
,
loading
}
=
this
.
state
;
const
{
showMobileDiv
,
isView
,
loading
}
=
this
.
state
;
...
@@ -1351,6 +1352,8 @@ class FormList extends React.Component {
...
@@ -1351,6 +1352,8 @@ class FormList extends React.Component {
query
=
{
JSON
.
stringify
(
this
.
state
.
formValues
)}
query
=
{
JSON
.
stringify
(
this
.
state
.
formValues
)}
custom
=
{
this
.
props
.
value
?
Base16Encode
(
JSON
.
stringify
(
this
.
props
.
value
))
:
null
}
custom
=
{
this
.
props
.
value
?
Base16Encode
(
JSON
.
stringify
(
this
.
props
.
value
))
:
null
}
sql
=
{
Base16Encode
(
this
.
props
.
sql
)}
sql
=
{
Base16Encode
(
this
.
props
.
sql
)}
selectedRows
=
{
selectedRows
}
obj
=
{
obj
}
/
>
/
>
{
rights
&&
!
rights
.
includes
(
'add'
)
?
(
{
rights
&&
!
rights
.
includes
(
'add'
)
?
(
''
''
...
...
one_stop_public/tableCompon/index.jsx
浏览文件 @
a24b229e
...
@@ -1045,6 +1045,27 @@ export default class TableCom extends Component {
...
@@ -1045,6 +1045,27 @@ export default class TableCom extends Component {
return
'norefeshxxxxxxxxxxxxxxxxxxxx'
;
return
'norefeshxxxxxxxxxxxxxxxxxxxx'
;
};
};
getObjValues
=
()
=>
{
const
{
isEdit
,
fatherObj
,
defaultValues
,
formKey
,
form
,
fatherCode
}
=
this
.
props
;
let
obj
=
{};
if
(
!
isEdit
&&
fatherCode
)
{
obj
=
{
...
fatherObj
,
...
form
.
getFieldsValue
(),
...
defaultValues
[
formKey
],
};
}
else
{
obj
=
{
...(
fatherObj
?
fatherObj
:
{}),
...
this
.
props
.
obj
,
...
form
.
getFieldsValue
(),
...
defaultValues
[
formKey
],
};
}
return
obj
;
}
functionArguments
=
(
column
,
callback
)
=>
{
functionArguments
=
(
column
,
callback
)
=>
{
const
base52
=
column
.
base52
;
const
base52
=
column
.
base52
;
const
{
const
{
...
@@ -1078,21 +1099,7 @@ export default class TableCom extends Component {
...
@@ -1078,21 +1099,7 @@ export default class TableCom extends Component {
};
};
}
}
let
obj
=
{};
let
obj
=
this
.
getObjValues
();
if
(
!
isEdit
&&
fatherCode
)
{
obj
=
{
...
fatherObj
,
...
form
.
getFieldsValue
(),
...
defaultValues
[
formKey
],
};
}
else
{
obj
=
{
...(
fatherObj
?
fatherObj
:
{}),
...
this
.
props
.
obj
,
...
form
.
getFieldsValue
(),
...
defaultValues
[
this
.
props
.
formKey
],
};
}
/**
/**
* 中台函数库注入
* 中台函数库注入
...
@@ -2692,6 +2699,7 @@ ${obj[dataColumn.base52]}
...
@@ -2692,6 +2699,7 @@ ${obj[dataColumn.base52]}
objCode=
{
json
.
objCode
}
objCode=
{
json
.
objCode
}
sql=
{
json
.
filterSql
}
sql=
{
json
.
filterSql
}
rights=
{
json
.
rights
}
rights=
{
json
.
rights
}
obj=
{
this
.
getObjValues
()
}
/>
/>
);
);
break
;
break
;
...
@@ -3963,6 +3971,7 @@ ${obj[dataColumn.base52]}
...
@@ -3963,6 +3971,7 @@ ${obj[dataColumn.base52]}
sql=
{
json
.
filterSql
}
sql=
{
json
.
filterSql
}
rights=
{
json
.
rights
}
rights=
{
json
.
rights
}
get=
{
get
}
get=
{
get
}
obj=
{
this
.
getObjValues
()
}
/>,
/>,
)
}
)
}
</>
</>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论