Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
7f49d813
提交
7f49d813
authored
2 年前
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
辅导员备注修改
上级
6a4933ed
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
95 行增加
和
87 行删除
+95
-87
index.js
FormInsertDiy/AuditButton/index.js
+0
-3
Index.js
FormInsertDiy/ExportComponent/SelectPerson/Index.js
+0
-3
ZdyTable.jsx
one_stop_public/Table/ZdyTable.jsx
+2
-0
TableList.js
one_stop_public/libs/TableList.js
+0
-1
index.js
one_stop_public/libs/formList/NormalTable/index.js
+1
-1
countWidth.js
one_stop_public/libs/formList/countWidth.js
+0
-1
index.js
one_stop_public/libs/formList/index.js
+0
-0
StepDiy.js
one_stop_public/tableCompon/Split_Index/StepDiy.js
+90
-69
index.jsx
one_stop_public/tableCompon/index.jsx
+2
-9
没有找到文件。
FormInsertDiy/AuditButton/index.js
浏览文件 @
7f49d813
...
...
@@ -100,9 +100,6 @@ function AuditButton(props) {
token
:
getToken
()
};
payload
=
callbackSubmitData
(
payload
);
console
.
log
(
payload
);
setVisible
(
false
);
setShowProcessModal
(
payload
);
return
false
;
...
...
This diff is collapsed.
Click to expand it.
FormInsertDiy/ExportComponent/SelectPerson/Index.js
浏览文件 @
7f49d813
...
...
@@ -131,10 +131,7 @@ export default function SelectPerson(props) {
const
deleteSg
=
(
x
,
index
,
e
)
=>
{
// 阻止事件冒泡
e
.
stopPropagation
();
console
.
log
(
sgUsers
);
let
sgNew
=
[...
sgUsers
];
console
.
log
(
x
);
debugger
;
sgNew
=
sgNew
.
filter
(
g
=>
{
return
x
.
businessKey
!==
g
.
businessKey
;
});
...
...
This diff is collapsed.
Click to expand it.
one_stop_public/Table/ZdyTable.jsx
浏览文件 @
7f49d813
...
...
@@ -872,6 +872,7 @@ export default class ZdyTable extends Component {
}
let
styles
=
{};
// console.log(cell.content);
if
(
cell
.
content
&&
cell
.
content
.
styles
)
{
try
{
styles
=
JSON
.
parse
(
cell
.
content
.
styles
);
...
...
@@ -895,6 +896,7 @@ export default class ZdyTable extends Component {
key=
{
j
}
data
-
cell
-
id=
{
cell
.
uuid
||
'no_uuid_'
+
Math
.
random
()
.
slice
(
0
,
6
)
}
data
-
com
-
name=
{
cell
.
content
?.
comName
||
'empty'
}
style=
{
{
overflow
:
'auto'
,
textAlign
:
...
...
This diff is collapsed.
Click to expand it.
one_stop_public/libs/TableList.js
浏览文件 @
7f49d813
...
...
@@ -96,7 +96,6 @@ export default class TableList extends React.Component {
showHeader
=
{
this
.
props
.
showHeader
}
get
=
{
this
.
props
.
get
}
isHiddenPage
=
{
this
.
props
.
isHiddenPage
!=
null
?
this
.
props
.
isHiddenPage
:
false
}
loading
=
{
this
.
props
.
loading
}
pageSize
=
{
this
.
props
.
pageSize
||
10
}
value
=
{{...
this
.
state
}}
notShowBack
=
{
true
}
...
...
This diff is collapsed.
Click to expand it.
one_stop_public/libs/formList/NormalTable/index.js
浏览文件 @
7f49d813
...
...
@@ -116,7 +116,7 @@ export default class NormalTable extends Component {
if
(
pagination
&&
pagination
.
total
)
{
pagination
.
showTotal
=
(
total
,
range
)
=>
`共
${
total
}
条 `
;
}
// console.log(rowKey);
return
(
<
Table
dataSource
=
{
dataSource
}
...
...
This diff is collapsed.
Click to expand it.
one_stop_public/libs/formList/countWidth.js
浏览文件 @
7f49d813
...
...
@@ -6,7 +6,6 @@ export default function countWidth({
if
(
json
.
twidth
)
{
// 列表宽度配置项 在 组件的 扩展的配置里面
showDiv
=
json
.
twidth
;
console
.
log
(
showDiv
);
return
showDiv
;
}
if
(
document
.
getElementsByClassName
(
'ant-layout-content'
)?.
length
)
{
...
...
This diff is collapsed.
Click to expand it.
one_stop_public/libs/formList/index.js
浏览文件 @
7f49d813
差异被折叠。
点击展开。
one_stop_public/tableCompon/Split_Index/StepDiy.js
浏览文件 @
7f49d813
import
React
,
{
useState
,
useEffect
,
useMemo
,
useCallback
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useMemo
,
useCallback
,
memo
,
useRef
}
from
'react'
;
import
{
Steps
}
from
'antd'
;
import
ZdyTable
from
'@/webPublic/one_stop_public/Table'
;
const
{
Step
}
=
Steps
;
export
default
function
StepDiy
(
props
)
{
const
{
value
,
json
,
partFormProps
}
=
props
;
const
diyProps
=
useMemo
(()
=>
{
let
b
=
{};
if
(
value
&&
typeof
value
===
'object'
)
{
b
=
{
...
value
,
};
}
if
(
json
.
otherProps
&&
typeof
json
.
otherProps
===
'string'
)
{
try
{
let
a
=
new
Function
(
json
.
otherProps
)();
if
(
a
)
{
return
{
...
a
,
...
b
,
};
}
return
b
;
}
catch
(
e
)
{
console
.
error
(
'Step组件 otherProps错误'
);
}
}
else
{
return
b
;
}
},
[
json
.
otherProps
,
value
]);
const
Child
=
memo
((
props
)
=>
{
const
{
value
,
json
,
partFormProps
}
=
props
;
const
diyProps
=
useMemo
(
()
=>
{
let
b
=
{};
if
(
value
&&
typeof
value
===
'object'
)
{
b
=
{
...
value
,
};
}
if
(
json
.
otherProps
&&
typeof
json
.
otherProps
===
'string'
)
{
try
{
let
a
=
new
Function
(
json
.
otherProps
)();
if
(
a
)
{
return
{
...
a
,
...
b
,
};
}
return
b
;
}
catch
(
e
)
{
console
.
error
(
'Step组件 otherProps错误'
);
}
}
else
{
return
b
;
}
},
[
json
.
otherProps
,
value
],
);
const
[
current
,
setCurrent
]
=
useState
(
diyProps
?.
StepsProps
?.
current
||
0
);
const
[
current
,
setCurrent
]
=
useState
(
diyProps
?.
StepsProps
?.
current
||
0
);
const
partFormKey
=
useMemo
(()
=>
{
if
(
typeof
current
!==
'undefined'
)
{
let
item
=
diyProps
.
Step
.
find
((
g
,
index
)
=>
{
return
index
===
current
;
});
if
(
item
)
{
return
item
.
formKey
;
}
}
return
undefined
;
},
[
current
]);
const
partFormKey
=
useMemo
(
()
=>
{
if
(
typeof
current
!==
'undefined'
)
{
let
item
=
diyProps
.
Step
.
find
((
g
,
index
)
=>
{
return
index
===
current
;
});
if
(
item
)
{
return
item
.
formKey
;
}
}
return
undefined
;
},
[
current
],
);
useEffect
(()
=>
{
if
(
diyProps
?.
StepsProps
?.
current
!==
current
)
{
setCurrent
(
diyProps
?.
StepsProps
?.
current
);
}
},
[
diyProps
?.
StepsProps
?.
current
]);
useEffect
(
()
=>
{
if
(
diyProps
?.
StepsProps
?.
current
!==
current
)
{
setCurrent
(
diyProps
?.
StepsProps
?.
current
);
}
},
[
diyProps
?.
StepsProps
?.
current
],
);
// console.log(partFormProps.form.getFieldsValue());
return
(
<
div
style
=
{
diyProps
.
outSideDivStyle
}
>
<
Steps
{...
diyProps
.
StepsProps
}
current
=
{
current
}
>
{
Array
.
isArray
(
diyProps
.
Step
)
&&
diyProps
.
Step
.
map
((
g
)
=>
{
return
<
Step
{...
g
}
key
=
{
g
.
title
}
/>
;
})}
<
/Steps
>
return
(
<
div
style
=
{
diyProps
.
outSideDivStyle
}
>
<
Steps
{...
diyProps
.
StepsProps
}
current
=
{
current
}
>
{
Array
.
isArray
(
diyProps
.
Step
)
&&
diyProps
.
Step
.
map
(
g
=>
{
return
<
Step
{...
g
}
key
=
{
g
.
title
}
/>
;
})}
<
/Steps
>
{
Array
.
isArray
(
diyProps
.
Step
)
&&
diyProps
.
Step
.
filter
(
g
=>
!!
g
.
formKey
).
map
((
g
,
index
)
=>
{
return
(
<
div
key
=
{
g
.
formKey
}
style
=
{{
display
:
partFormKey
===
g
.
formKey
?
'block'
:
'none'
}}
>
<
ZdyTable
{...
partFormProps
}
currentFormTitle
=
{
'Steps组件的子表单'
+
g
.
formKey
}
key
=
{
g
.
formKey
}
currentFormKey
=
{
g
.
formKey
}
{...
partFormProps
?.
datas
[
g
.
formKey
]}
/
>
<
/div
>
);
})}
<
/div
>
);
{
Array
.
isArray
(
diyProps
.
Step
)
&&
diyProps
.
Step
.
filter
((
g
)
=>
!!
g
.
formKey
).
map
((
g
,
index
)
=>
{
return
(
<
div
key
=
{
g
.
formKey
}
style
=
{{
display
:
partFormKey
===
g
.
formKey
?
'block'
:
'none'
}}
>
<
ZdyTable
{...
partFormProps
}
currentFormTitle
=
{
'Steps组件的子表单'
+
g
.
formKey
}
key
=
{
g
.
formKey
}
currentFormKey
=
{
g
.
formKey
}
form
=
{
props
.
form
}
{...
partFormProps
?.
datas
[
g
.
formKey
]}
/
>
<
/div
>
);
})}
<
/div
>
);
});
export
default
function
StepDiy
(
props
){
const
{
value
,
json
,
partFormProps
,
form
}
=
props
;
const
js
=
useRef
();
useEffect
(()
=>
{
js
.
current
=
json
;
},
[]);
if
(
!
js
.
current
)
{
return
null
;
}
return
<
Child
json
=
{
js
.
current
}
value
=
{
value
}
partFormProps
=
{
partFormProps
}
form
=
{
form
}
/>
;
}
This diff is collapsed.
Click to expand it.
one_stop_public/tableCompon/index.jsx
浏览文件 @
7f49d813
...
...
@@ -90,8 +90,6 @@ const { MonthPicker, WeekPicker } = DatePicker;
*/
const
{
TextArea
}
=
Input
;
const
{
Option
}
=
Select
;
const
{
RangePicker
}
=
DatePicker
;
const
{
TabPane
}
=
Tabs
;
const
giveRender
=
(
column
=
{})
=>
{
if
(
!
column
?.
render
)
{
...
...
@@ -1648,16 +1646,9 @@ export default class TableCom extends Component {
init
:
init
,
formCode
:
this
.
props
.
formCode
,
formId
:
this
.
props
.
formId
,
form
:
this
.
props
.
form
,
mapData
:
mapData
,
sqlData
:
sqlData
,
defaultValues
:
defaultValues
,
// currentFormTitle={
// this.props.getCurrentFormTitle ? this.props.getCurrentFormTitle(fk) : null
// }
// key={fk}
// currentFormKey={fk}
// {...datas[fk]}
};
}
...
...
@@ -1682,6 +1673,7 @@ export default class TableCom extends Component {
key=
{
fk
}
currentFormKey=
{
fk
}
{
...
datas
[
fk
]}
form=
{
this
.
props
.
form
}
/>
</>
);
...
...
@@ -3671,6 +3663,7 @@ ${obj[dataColumn.base52]}
disabled=
{
disabled
}
uuid=
{
uuid
}
partFormProps=
{
this
.
partFormProps
}
form=
{
this
.
props
.
form
}
/>,
);
break
;
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论