Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
41230de1
提交
41230de1
authored
6月 26, 2022
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
27867 就业市场/线上招聘管理/职位信息审核,胡林那 hulinnaAdmin 马上审核通过的职位直接发布 发布不了
上级
7a83785f
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
89 行增加
和
68 行删除
+89
-68
prepareShow.js
one_stop_public/Table/prepareShow.js
+1
-1
TableList.js
one_stop_public/libs/TableList.js
+2
-2
index.js
one_stop_public/libs/formList/index.js
+86
-65
没有找到文件。
one_stop_public/Table/prepareShow.js
浏览文件 @
41230de1
...
...
@@ -25,7 +25,7 @@ export default function prepareShow(postData = {}, content = '') {
window
.
moment
=
moment
;
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
agg
?.
unifiedServicePatternModel
?.
id
);
// 表单id;
if
(
agg
?.
unifiedServicePatternModel
?.
id
&&
(
window
.
location
.
href
.
indexOf
(
'localhost'
)
>
-
1
||
test
===
'true'
))
{
if
(
agg
?.
unifiedServicePatternModel
?.
id
&&
(
window
.
location
.
href
.
indexOf
(
'localhost'
)
>
-
1
||
test
))
{
const
SystemConfig
=
window
.
specialImportantSystemConfig
||
{};
console
.
log
(
'%c'
+
`
${
SystemConfig
?.
gateWayPort
}
/onestop/
#
/
admin
/
processServices
/
modelConfig
/
templateDetail
/
designById
?
id
=
$
{
agg
.
unifiedServicePatternModel
.
id
}
&
token
=
$
{
getToken
()}
`, 'color: green;background: white;font-size: 14px');
console.log('%c' + `
$
{
SystemConfig
?.
gateWayPort
}
/wisdomSchool/
#
/
designFormByUrl
?
id
=
$
{
agg
.
unifiedServicePatternModel
.
id
}
&
token
=
$
{
getToken
()}
`, 'color: green;background: white;font-size: 14px');
...
...
one_stop_public/libs/TableList.js
浏览文件 @
41230de1
...
...
@@ -43,9 +43,9 @@ export default class TableList extends React.Component {
static
getDerivedStateFromProps
(
nextProps
,
prevState
)
{
// ...
if
(
'value'
in
nextProps
){
return
{...
nextProps
.
value
};
return
{...
nextProps
.
value
};
// 更新state
}
return
null
;
return
null
;
//不需要更新任何state
}
componentDidUpdate
(
prevProps
,
prevState
)
{
...
...
one_stop_public/libs/formList/index.js
浏览文件 @
41230de1
...
...
@@ -70,8 +70,7 @@ const CreateForm = Form.create()((props) => {
//处理日期何时入库问题
try
{
fieldsValue
[
d
]
=
fieldsValue
[
d
].
format
(
'YYYY-MM-DD HH:mm:ss'
);
}
catch
(
e
)
{
}
}
catch
(
e
)
{}
break
;
}
}
...
...
@@ -92,7 +91,7 @@ const CreateForm = Form.create()((props) => {
//需要获取动态表单
return
(
<
Modal
width
=
'700px'
width
=
"700px"
maskClosable
=
{
false
}
destroyOnClose
title
=
{
isView
?
'查看详情'
:
isAdd
?
'新增'
:
'编辑'
}
...
...
@@ -101,10 +100,10 @@ const CreateForm = Form.create()((props) => {
isView
?
null
:
[
<
Button
key
=
'back'
onClick
=
{()
=>
handleModalVisible
()}
>
<
Button
key
=
"back"
onClick
=
{()
=>
handleModalVisible
()}
>
取消
<
/Button>
,
<
Button
key
=
'submit'
type
=
'primary'
onClick
=
{
okHandle
}
>
<
Button
key
=
"submit"
type
=
"primary"
onClick
=
{
okHandle
}
>
确定
<
/Button>
,
]
...
...
@@ -279,7 +278,6 @@ class FormList extends React.Component {
}
};
//渲染值
componentDidMount
()
{
const
{
dispatch
,
isFormCom
,
isSelect
,
callback
,
valueName
}
=
this
.
props
;
...
...
@@ -295,7 +293,12 @@ class FormList extends React.Component {
type
:
'DataObj/findByCode'
,
payload
:
{
objCode
:
this
.
props
.
objCode
},
callback
:
(
dataObj
)
=>
{
this
.
setState
({
objId
:
dataObj
.
id
,
isTable
:
dataObj
.
isTable
},
()
=>
{
this
.
setState
(
{
objId
:
dataObj
.
id
,
isTable
:
dataObj
.
isTable
,
},
()
=>
{
dispatch
({
type
:
'DataRight/getUserRight'
,
payload
:
{
objId
:
this
.
state
.
objId
},
...
...
@@ -313,7 +316,8 @@ class FormList extends React.Component {
});
},
});
});
},
);
},
});
}
...
...
@@ -356,9 +360,7 @@ class FormList extends React.Component {
componentWillReceiveProps
(
nextProps
)
{
const
b
=
nextProps
.
value
||
{};
const
a
=
this
.
props
.
value
||
{};
const
jsonb
=
JSON
.
stringify
(
b
);
const
jsona
=
JSON
.
stringify
(
a
);
...
...
@@ -373,6 +375,12 @@ class FormList extends React.Component {
if
(
nextProps
.
value
.
columns
!=
null
&&
nextProps
.
value
.
columns
.
length
>
0
)
{
this
.
columns
=
nextProps
.
value
.
columns
;
}
if
(
nextProps
.
value
.
selectedRows
&&
Array
.
isArray
(
nextProps
.
value
.
selectedRows
)){
// 27867 就业市场/线上招聘管理/职位信息审核,胡林那 hulinnaAdmin 马上审核通过的职位直接发布 发布不了
this
.
setState
({
selectedRows
:
nextProps
.
value
.
selectedRows
,
});
}
if
(
nextProps
.
value
.
getPage
)
{
this
.
getPage
(
params
,
null
,
nextProps
.
value
.
getPage
);
...
...
@@ -602,7 +610,6 @@ class FormList extends React.Component {
};
sqlBs16
=
this
.
props
.
sql
;
getPage
=
(
params
,
values
,
callPage
,
pageNo
)
=>
{
const
{
objCode
}
=
this
.
props
;
if
(
this
.
columns
==
null
||
this
.
columns
.
length
==
0
)
{
...
...
@@ -625,7 +632,10 @@ class FormList extends React.Component {
if
(
callPage
)
{
callPage
(
params
,
(
data
)
=>
{
if
(
!
this
.
state
.
isReady
)
{
this
.
setState
({
data
,
isReady
:
true
});
this
.
setState
({
data
,
isReady
:
true
,
});
}
else
{
this
.
setState
({
data
});
}
...
...
@@ -633,7 +643,10 @@ class FormList extends React.Component {
}
else
if
(
this
.
props
.
value
&&
this
.
props
.
value
.
getPage
)
{
this
.
props
.
value
.
getPage
(
params
,
(
data
)
=>
{
if
(
!
this
.
state
.
isReady
)
{
this
.
setState
({
data
,
isReady
:
true
});
this
.
setState
({
data
,
isReady
:
true
,
});
}
else
{
this
.
setState
({
data
});
}
...
...
@@ -651,7 +664,10 @@ class FormList extends React.Component {
},
callback
:
(
data
)
=>
{
if
(
!
this
.
state
.
isReady
)
{
this
.
setState
({
data
,
isReady
:
true
});
this
.
setState
({
data
,
isReady
:
true
,
});
}
else
{
this
.
setState
({
data
});
}
...
...
@@ -843,7 +859,7 @@ class FormList extends React.Component {
<
FormItem
className
=
{
styles
.
hidden
}
key
=
{
item
.
id
}
>
{
form
.
getFieldDecorator
(
item
.
name
,
{
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
})(
<
Input
type
=
'hidden'
placeholder
=
'请输入'
/>
)}
})(
<
Input
type
=
"hidden"
placeholder
=
"请输入"
/>
)}
<
/FormItem
>
);
}
...
...
@@ -857,7 +873,7 @@ class FormList extends React.Component {
{
form
.
getFieldDecorator
(
item
.
name
,
{
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
rules
:
[{
required
:
!
item
.
isNull
}],
})(
<
Input
style
=
{{
width
:
'70%'
}}
readOnly
=
{
!
isAdd
}
placeholder
=
'请输入'
/>
)}
})(
<
Input
style
=
{{
width
:
'70%'
}}
readOnly
=
{
!
isAdd
}
placeholder
=
"请输入"
/>
)}
<
/FormItem
>
);
}
...
...
@@ -873,14 +889,14 @@ class FormList extends React.Component {
<
Select
disabled
=
{
isView
}
style
=
{{
width
:
'70%'
}}
optionFilterProp
=
'children'
optionFilterProp
=
"children"
showSearch
filterOption
=
{(
input
,
option
)
=>
option
?
option
.
props
.
children
.
toLowerCase
().
indexOf
(
input
.
toLowerCase
())
>=
0
:
false
}
placeholder
=
'请选择'
placeholder
=
"请选择"
allowClear
>
{
ops
.
map
((
r
)
=>
(
<
Option
value
=
{
r
[
item
.
referenceCodeName
]}
key
=
{
r
[
item
.
referenceCodeName
]}
>
...
...
@@ -898,7 +914,7 @@ class FormList extends React.Component {
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
rules
:
[{
required
:
!
item
.
isNull
}],
})(
<
Select
disabled
=
{
isView
}
style
=
{{
width
:
'70%'
}}
placeholder
=
'请选择'
allowClear
>
<
Select
disabled
=
{
isView
}
style
=
{{
width
:
'70%'
}}
placeholder
=
"请选择"
allowClear
>
<
Option
value
=
{
'0'
}
key
=
{
'0'
}
>
审核通过
<
/Option
>
...
...
@@ -938,8 +954,8 @@ class FormList extends React.Component {
<
Select
disabled
=
{
isView
}
style
=
{{
width
:
200
}}
placeholder
=
'请选择'
optionFilterProp
=
'children'
placeholder
=
"请选择"
optionFilterProp
=
"children"
showSearch
filterOption
=
{(
input
,
option
)
=>
option
...
...
@@ -962,7 +978,7 @@ class FormList extends React.Component {
{
form
.
getFieldDecorator
(
item
.
name
,
{
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
rules
:
[{
required
:
!
item
.
isNull
}],
})(
<
Input
disabled
=
{
isView
}
style
=
{{
width
:
'70%'
}}
placeholder
=
'请输入'
/>
)}
})(
<
Input
disabled
=
{
isView
}
style
=
{{
width
:
'70%'
}}
placeholder
=
"请输入"
/>
)}
<
/FormItem
>
);
}
else
if
(
number
.
indexOf
(
item
.
type
)
>
-
1
)
{
...
...
@@ -981,7 +997,7 @@ class FormList extends React.Component {
callback
(
errors
);
},
],
})(
<
Input
disabled
=
{
isView
}
placeholder
=
'请输入'
/>
)}
})(
<
Input
disabled
=
{
isView
}
placeholder
=
"请输入"
/>
)}
<
/FormItem
>
);
}
else
if
(
isQuery
&&
date
.
indexOf
(
item
.
type
)
>
-
1
)
{
...
...
@@ -1014,7 +1030,7 @@ class FormList extends React.Component {
<
DatePicker
format
=
{
item
.
dataFormatStrWeb
==
null
?
'YYYY-MM-DD HH:mm:ss'
:
item
.
dataFormatStrWeb
}
style
=
{{
width
:
'100%'
}}
placeholder
=
'请输入'
placeholder
=
"请输入"
disabled
=
{
isView
}
/>
,
)}
...
...
@@ -1026,7 +1042,7 @@ class FormList extends React.Component {
{
form
.
getFieldDecorator
(
item
.
name
,
{
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
rules
:
[{
required
:
!
item
.
isNull
}],
})(
<
Input
disabled
=
{
isView
}
style
=
{{
width
:
'70%'
}}
placeholder
=
'请输入'
/>
)}
})(
<
Input
disabled
=
{
isView
}
style
=
{{
width
:
'70%'
}}
placeholder
=
"请输入"
/>
)}
<
/FormItem
>
);
}
...
...
@@ -1041,7 +1057,7 @@ class FormList extends React.Component {
}
return
(
<
Form
layout
=
'inline'
>
<
Form
layout
=
"inline"
>
<
Row
style
=
{{
padding
:
'15px'
}}
>
{
querys
.
map
((
item
)
=>
(
<
Col
style
=
{{
height
:
58
}}
span
=
{
get
===
'mobile'
?
24
:
8
}
key
=
{
item
.
id
}
>
...
...
@@ -1064,7 +1080,7 @@ class FormList extends React.Component {
paddingRight
:
get
===
'mobile'
?
12
:
''
,
}}
>
<
span
className
=
{
styles
.
submitButtons
}
>
<
Button
type
=
'primary'
loading
=
{
this
.
props
.
loading
}
onClick
=
{
this
.
handleSearch
}
>
<
Button
type
=
"primary"
loading
=
{
this
.
props
.
loading
}
onClick
=
{
this
.
handleSearch
}
>
查询
<
/Button
>
<
Button
style
=
{{
marginLeft
:
8
}}
onClick
=
{
this
.
handleFormReset
}
>
...
...
@@ -1105,14 +1121,16 @@ class FormList extends React.Component {
});
};
render
()
{
const
{
modalVisible
,
selectedRows
,
rights
,
data
,
isReady
}
=
this
.
state
;
if
(
!
isReady
)
{
return
(
<
div
style
=
{{
width
:
20
,
margin
:
'auto'
}}
>
<
div
style
=
{{
width
:
20
,
margin
:
'auto'
,
}}
>
<
Spin
/>
<
/div
>
);
...
...
@@ -1138,19 +1156,21 @@ class FormList extends React.Component {
}
// console.log(json);
let
showDiv
=
500
;
if
(
document
.
getElementsByClassName
(
'ant-layout-content'
)?.
length
)
{
// 这是大学工项目 容器元素的宽度
if
(
document
.
getElementsByClassName
(
'ant-layout-content'
)?.
length
)
{
// 这是大学工项目 容器元素的宽度
showDiv
=
document
.
getElementsByClassName
(
'ant-layout-content'
)[
0
].
clientWidth
-
100
;
}
if
(
document
.
querySelector
(
'#mobelDiv'
))
{
// 这个是一站式的元素的宽度
if
(
document
.
querySelector
(
'#mobelDiv'
))
{
// 这个是一站式的元素的宽度
showDiv
=
document
.
querySelector
(
'#mobelDiv'
)?.
parentNode
.
clientWidth
;
}
if
(
json
.
twidth
)
{
// 列表宽度配置项 在 组件的 扩展的配置里面
if
(
json
.
twidth
)
{
// 列表宽度配置项 在 组件的 扩展的配置里面
showDiv
=
json
.
twidth
;
}
// console.log(showDiv);
const
parentMethods
=
{
handleAdd
:
this
.
handleAdd
,
handleModalVisible
:
this
.
handleModalVisible
,
...
...
@@ -1208,10 +1228,10 @@ class FormList extends React.Component {
if
(
rights
.
includes
(
'delete'
))
{
Dom
.
push
(
<
Popconfirm
title
=
'确定删除该数据?'
title
=
"确定删除该数据?"
onConfirm
=
{
this
.
delete
.
bind
(
this
,
record
)}
okText
=
'确定'
cancelText
=
'取消'
>
okText
=
"确定"
cancelText
=
"取消"
>
<
a
>
删除
<
/a
>
<
/Popconfirm>
,
);
...
...
@@ -1219,13 +1239,18 @@ class FormList extends React.Component {
}
return
(
<
Fragment
>
<
div
style
=
{{
textAlign
:
'center'
,
paddingLeft
:
'0px'
,
paddingRight
:
'0px'
}}
>
<
div
style
=
{{
textAlign
:
'center'
,
paddingLeft
:
'0px'
,
paddingRight
:
'0px'
,
}}
>
{
Dom
&&
Dom
.
length
&&
Dom
.
map
((
x
,
index
)
=>
(
<
Fragment
key
=
{
Math
.
random
()}
>
{
x
}
{
index
>
0
&&
index
!==
Dom
.
length
-
1
&&
<
Divider
type
=
'vertical'
/>
}
{
index
>
0
&&
index
!==
Dom
.
length
-
1
&&
<
Divider
type
=
"vertical"
/>
}
<
/Fragment
>
))}
<
/div
>
...
...
@@ -1279,32 +1304,31 @@ class FormList extends React.Component {
<>
<
Card
bordered
=
{
false
}
bodyStyle
=
{{
padding
:
0
,
width
:
json
.
twidth
?
json
.
twidth
:
'100%'
}}
>
bodyStyle
=
{{
padding
:
0
,
width
:
json
.
twidth
?
json
.
twidth
:
'100%'
,
}}
>
<
div
className
=
{
styles
.
tableList
}
>
<
div
className
=
{
styles
.
tableListForm
}
>
{
this
.
renderForm
()}
<
/div
>
<
div
className
=
{
styles
.
tableListOperator
}
>
{
notShowBack
?
(
notShowBack
)
:
(
<
Button
icon
=
'rollback'
type
=
'primary'
onClick
=
{
this
.
goBack
}
>
<
Button
icon
=
"rollback"
type
=
"primary"
onClick
=
{
this
.
goBack
}
>
返回
<
/Button
>
)}
<
FormListButtons
btns
=
{
btns
}
<
FormListButtons
btns
=
{
btns
}
loading
=
{
loading
}
importConfig
=
{(
this
.
props
.
value
&&
this
.
props
.
value
.
importConfig
)
||
[]}
exportConfig
=
{(
this
.
props
.
value
&&
this
.
props
.
value
.
exportConfig
)
||
[]}
getPage
=
{
this
.
getPage
}
objId
=
{
this
.
state
.
objId
}
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
)}
/
>
{
/* {this.props.value && this.props.value.importConfig // 导入配置项
? this.props.value.importConfig.map((r, i) => (
...
...
@@ -1340,7 +1364,7 @@ class FormList extends React.Component {
{
rights
&&
!
rights
.
includes
(
'add'
)
?
(
''
)
:
(
<
Button
icon
=
'plus'
type
=
'primary'
onClick
=
{
this
.
add
}
>
<
Button
icon
=
"plus"
type
=
"primary"
onClick
=
{
this
.
add
}
>
新建
<
/Button
>
)}
...
...
@@ -1367,7 +1391,6 @@ class FormList extends React.Component {
/
>
)}
{
rights
&&
!
rights
.
includes
(
'exportData'
)
?
(
''
)
:
(
...
...
@@ -1383,10 +1406,10 @@ class FormList extends React.Component {
:
selectedRows
.
length
>
0
&&
(
<
span
>
<
Popconfirm
title
=
'确定删除该数据?'
title
=
"确定删除该数据?"
onConfirm
=
{
this
.
batchDelete
}
okText
=
'确定'
cancelText
=
'取消'
>
okText
=
"确定"
cancelText
=
"取消"
>
<
Button
>
批量删除
<
/Button
>
<
/Popconfirm
>
<
/span
>
...
...
@@ -1407,12 +1430,12 @@ class FormList extends React.Component {
/
>
<
/div
>
}
title
=
'请选择表头展示'
trigger
=
'click'
placement
=
'bottom'
>
title
=
"请选择表头展示"
trigger
=
"click"
placement
=
"bottom"
>
<
Button
// 表头筛选控件
className
=
{
styles
.
filter_btn
}
icon
=
'filter'
>
icon
=
"filter"
>
表头筛选
<
/Button
>
<
/Popover
>
...
...
@@ -1421,15 +1444,13 @@ class FormList extends React.Component {
?
btns
.
after
.
map
((
r
)
=>
<
Button
{...
r
}
loading
=
{
loading
}
/>
)
:
''
}
{
!!
this
.
props
.
otherProps
&&
!!
this
.
props
.
otherProps
.
showRightTips
&&
this
.
props
.
otherProps
.
RightTipsComponent
}
{
!!
this
.
props
.
otherProps
&&
!!
this
.
props
.
otherProps
.
showRightTips
&&
this
.
props
.
otherProps
.
RightTipsComponent
}
<
/div
>
{
!
istableCom
||
(
this
.
props
.
value
&&
this
.
props
.
value
.
columns
)
?
(
<
div
id
=
'mobelDiv'
id
=
"mobelDiv"
className
=
{
'mobelDivClassName'
}
style
=
{{
overflow
:
'hidden'
,
...
...
@@ -1457,7 +1478,7 @@ class FormList extends React.Component {
<
/div
>
)
:
(
<
div
id
=
'mobelDiv'
id
=
"mobelDiv"
style
=
{{
overflow
:
'hidden'
,
width
:
isMobile
?
showMobileDiv
:
showDiv
,
...
...
@@ -1496,7 +1517,7 @@ class FormList extends React.Component {
if
(
isFormCom
)
{
return
xxxx
;
}
return
<
PageHeaderWrapper
title
=
''
>
{
xxxx
}
<
/PageHeaderWrapper>
;
return
<
PageHeaderWrapper
title
=
""
>
{
xxxx
}
<
/PageHeaderWrapper>
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论