Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
7f49d813
提交
7f49d813
authored
10月 20, 2022
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
辅导员备注修改
上级
6a4933ed
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
1550 行增加
和
1548 行删除
+1550
-1548
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
+1455
-1461
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) {
...
@@ -100,9 +100,6 @@ function AuditButton(props) {
token
:
getToken
()
token
:
getToken
()
};
};
payload
=
callbackSubmitData
(
payload
);
payload
=
callbackSubmitData
(
payload
);
console
.
log
(
payload
);
setVisible
(
false
);
setVisible
(
false
);
setShowProcessModal
(
payload
);
setShowProcessModal
(
payload
);
return
false
;
return
false
;
...
...
FormInsertDiy/ExportComponent/SelectPerson/Index.js
浏览文件 @
7f49d813
...
@@ -131,10 +131,7 @@ export default function SelectPerson(props) {
...
@@ -131,10 +131,7 @@ export default function SelectPerson(props) {
const
deleteSg
=
(
x
,
index
,
e
)
=>
{
const
deleteSg
=
(
x
,
index
,
e
)
=>
{
// 阻止事件冒泡
// 阻止事件冒泡
e
.
stopPropagation
();
e
.
stopPropagation
();
console
.
log
(
sgUsers
);
let
sgNew
=
[...
sgUsers
];
let
sgNew
=
[...
sgUsers
];
console
.
log
(
x
);
debugger
;
sgNew
=
sgNew
.
filter
(
g
=>
{
sgNew
=
sgNew
.
filter
(
g
=>
{
return
x
.
businessKey
!==
g
.
businessKey
;
return
x
.
businessKey
!==
g
.
businessKey
;
});
});
...
...
one_stop_public/Table/ZdyTable.jsx
浏览文件 @
7f49d813
...
@@ -872,6 +872,7 @@ export default class ZdyTable extends Component {
...
@@ -872,6 +872,7 @@ export default class ZdyTable extends Component {
}
}
let
styles
=
{};
let
styles
=
{};
// console.log(cell.content);
if
(
cell
.
content
&&
cell
.
content
.
styles
)
{
if
(
cell
.
content
&&
cell
.
content
.
styles
)
{
try
{
try
{
styles
=
JSON
.
parse
(
cell
.
content
.
styles
);
styles
=
JSON
.
parse
(
cell
.
content
.
styles
);
...
@@ -895,6 +896,7 @@ export default class ZdyTable extends Component {
...
@@ -895,6 +896,7 @@ export default class ZdyTable extends Component {
key=
{
j
}
key=
{
j
}
data
-
cell
-
id=
{
cell
.
uuid
||
'no_uuid_'
+
Math
.
random
()
data
-
cell
-
id=
{
cell
.
uuid
||
'no_uuid_'
+
Math
.
random
()
.
slice
(
0
,
6
)
}
.
slice
(
0
,
6
)
}
data
-
com
-
name=
{
cell
.
content
?.
comName
||
'empty'
}
style=
{
{
style=
{
{
overflow
:
'auto'
,
overflow
:
'auto'
,
textAlign
:
textAlign
:
...
...
one_stop_public/libs/TableList.js
浏览文件 @
7f49d813
...
@@ -96,7 +96,6 @@ export default class TableList extends React.Component {
...
@@ -96,7 +96,6 @@ export default class TableList extends React.Component {
showHeader
=
{
this
.
props
.
showHeader
}
showHeader
=
{
this
.
props
.
showHeader
}
get
=
{
this
.
props
.
get
}
get
=
{
this
.
props
.
get
}
isHiddenPage
=
{
this
.
props
.
isHiddenPage
!=
null
?
this
.
props
.
isHiddenPage
:
false
}
isHiddenPage
=
{
this
.
props
.
isHiddenPage
!=
null
?
this
.
props
.
isHiddenPage
:
false
}
loading
=
{
this
.
props
.
loading
}
pageSize
=
{
this
.
props
.
pageSize
||
10
}
pageSize
=
{
this
.
props
.
pageSize
||
10
}
value
=
{{...
this
.
state
}}
value
=
{{...
this
.
state
}}
notShowBack
=
{
true
}
notShowBack
=
{
true
}
...
...
one_stop_public/libs/formList/NormalTable/index.js
浏览文件 @
7f49d813
...
@@ -116,7 +116,7 @@ export default class NormalTable extends Component {
...
@@ -116,7 +116,7 @@ export default class NormalTable extends Component {
if
(
pagination
&&
pagination
.
total
)
{
if
(
pagination
&&
pagination
.
total
)
{
pagination
.
showTotal
=
(
total
,
range
)
=>
`共
${
total
}
条 `
;
pagination
.
showTotal
=
(
total
,
range
)
=>
`共
${
total
}
条 `
;
}
}
// console.log(rowKey);
return
(
return
(
<
Table
<
Table
dataSource
=
{
dataSource
}
dataSource
=
{
dataSource
}
...
...
one_stop_public/libs/formList/countWidth.js
浏览文件 @
7f49d813
...
@@ -6,7 +6,6 @@ export default function countWidth({
...
@@ -6,7 +6,6 @@ export default function countWidth({
if
(
json
.
twidth
)
{
if
(
json
.
twidth
)
{
// 列表宽度配置项 在 组件的 扩展的配置里面
// 列表宽度配置项 在 组件的 扩展的配置里面
showDiv
=
json
.
twidth
;
showDiv
=
json
.
twidth
;
console
.
log
(
showDiv
);
return
showDiv
;
return
showDiv
;
}
}
if
(
document
.
getElementsByClassName
(
'ant-layout-content'
)?.
length
)
{
if
(
document
.
getElementsByClassName
(
'ant-layout-content'
)?.
length
)
{
...
...
one_stop_public/libs/formList/index.js
浏览文件 @
7f49d813
import
React
,
{
Fragment
}
from
'react'
;
import
React
,
{
Fragment
}
from
'react'
;
import
{
import
{
Button
,
Button
,
Card
,
Card
,
DatePicker
,
DatePicker
,
Divider
,
Divider
,
Form
,
Form
,
Row
,
Row
,
Col
,
Col
,
Input
,
Input
,
message
,
message
,
Select
,
Select
,
Tooltip
,
Tooltip
,
Spin
,
Spin
,
Popover
,
Popover
,
Checkbox
,
Checkbox
,
}
from
'antd'
;
}
from
'antd'
;
import
{
connect
}
from
'dva'
;
import
{
connect
}
from
'dva'
;
import
PageHeaderWrapper
from
'./PageHeaderWrapper'
;
import
PageHeaderWrapper
from
'./PageHeaderWrapper'
;
...
@@ -43,1463 +43,1457 @@ const Modal = getModal();
...
@@ -43,1463 +43,1457 @@ const Modal = getModal();
let
AllWidth
=
0
;
// 表格总长度
let
AllWidth
=
0
;
// 表格总长度
const
{
RangePicker
}
=
DatePicker
;
const
{
RangePicker
}
=
DatePicker
;
const
CreateForm
=
Form
.
create
()(
props
=>
{
const
CreateForm
=
Form
.
create
()((
props
)
=>
{
const
{
const
{
modalVisible
,
modalVisible
,
form
,
form
,
handleAdd
,
handleAdd
,
formData
,
formData
,
isAdd
,
isAdd
,
handleModalVisible
,
handleModalVisible
,
formItem
,
formItem
,
getItem
,
getItem
,
isView
,
isView
,
}
=
props
;
}
=
props
;
//通过回调
//通过回调
const
okHandle
=
()
=>
{
const
okHandle
=
()
=>
{
form
.
validateFields
((
err
,
fieldsValue
)
=>
{
form
.
validateFields
((
err
,
fieldsValue
)
=>
{
if
(
err
)
return
;
if
(
err
)
return
;
if
(
isView
)
{
if
(
isView
)
{
handleModalVisible
();
handleModalVisible
();
return
;
return
;
}
}
formItem
.
map
((
item
,
index
)
=>
{
formItem
.
map
((
item
,
index
)
=>
{
if
(
item
.
type
.
indexOf
(
'DATE'
)
>
-
1
)
{
if
(
item
.
type
.
indexOf
(
'DATE'
)
>
-
1
)
{
for
(
let
d
in
fieldsValue
)
{
for
(
let
d
in
fieldsValue
)
{
if
(
item
.
name
===
d
&&
fieldsValue
[
d
])
{
if
(
item
.
name
===
d
&&
fieldsValue
[
d
])
{
//处理日期何时入库问题
//处理日期何时入库问题
try
{
try
{
fieldsValue
[
d
]
=
fieldsValue
[
d
].
format
(
'YYYY-MM-DD HH:mm:ss'
);
fieldsValue
[
d
]
=
fieldsValue
[
d
].
format
(
'YYYY-MM-DD HH:mm:ss'
);
}
catch
(
e
)
{}
}
catch
(
e
)
{}
break
;
break
;
}
}
}
}
}
else
if
(
number
.
includes
(
item
.
type
))
{
}
else
if
(
number
.
includes
(
item
.
type
))
{
for
(
let
d
in
fieldsValue
)
{
for
(
let
d
in
fieldsValue
)
{
if
(
item
.
name
===
d
&&
fieldsValue
[
d
]
==
''
)
{
if
(
item
.
name
===
d
&&
fieldsValue
[
d
]
==
''
)
{
fieldsValue
[
d
]
=
null
;
fieldsValue
[
d
]
=
null
;
break
;
break
;
}
}
}
}
}
}
});
});
let
params
=
{
...
fieldsValue
};
let
params
=
{
...
fieldsValue
};
handleAdd
(
params
,
isAdd
);
handleAdd
(
params
,
isAdd
);
});
});
};
};
//需要获取动态表单
//需要获取动态表单
return
(
return
(
<
Modal
<
Modal
width
=
"700px"
width
=
"700px"
maskClosable
=
{
false
}
maskClosable
=
{
false
}
destroyOnClose
destroyOnClose
title
=
{
isView
?
'查看详情'
:
isAdd
?
'新增'
:
'编辑'
}
title
=
{
isView
?
'查看详情'
:
isAdd
?
'新增'
:
'编辑'
}
visible
=
{
modalVisible
}
visible
=
{
modalVisible
}
footer
=
{
footer
=
{
isView
isView
?
null
?
null
:
[
:
[
<
Button
key
=
"back"
onClick
=
{()
=>
handleModalVisible
()}
>
<
Button
key
=
"back"
onClick
=
{()
=>
handleModalVisible
()}
>
取消
取消
<
/Button>
,
<
/Button>
,
<
Button
key
=
"submit"
type
=
"primary"
onClick
=
{
okHandle
}
>
<
Button
key
=
"submit"
type
=
"primary"
onClick
=
{
okHandle
}
>
确定
确定
<
/Button>
,
<
/Button>
,
]
]
}
}
onOk
=
{
okHandle
}
onOk
=
{
okHandle
}
onCancel
=
{()
=>
handleModalVisible
()}
onCancel
=
{()
=>
handleModalVisible
()}
>
>
{
formItem
.
map
((
item
,
index
)
=>
{
formItem
.
map
((
item
,
index
)
=>
getItem
(
false
,
form
,
item
,
isAdd
,
formData
,
{
span
:
5
},
{
span
:
15
}),
getItem
(
false
,
form
,
item
,
isAdd
,
formData
,
{
span
:
5
},
{
span
:
15
}),
)}
)}
<
/Modal
>
<
/Modal
>
);
);
});
});
@
connect
(({
formList
,
DataColumn
,
DataObj
,
loading
})
=>
({
@
connect
(({
formList
,
DataColumn
,
DataObj
})
=>
({
formList
,
formList
,
DataColumn
,
DataColumn
,
DataObj
,
DataObj
,
// loading: loading.models.formList || loading.models.DataColumn || loading.models.DataObj,
// loading: loading.models.formList || loading.models.DataColumn || loading.models.DataObj,
loading
:
loading
.
models
.
formList
,
//
loading: loading.models.formList,
// 解决 禅道 28100 查询下拉选择后界面会刷新一次
// 解决 禅道 28100 查询下拉选择后界面会刷新一次
// https://blog.csdn.net/m0_37148591/article/details/103685339 dva-loading
// https://blog.csdn.net/m0_37148591/article/details/103685339 dva-loading
}))
}))
@
Form
.
create
()
@
Form
.
create
()
class
FormList
extends
React
.
Component
{
class
FormList
extends
React
.
Component
{
state
=
{
state
=
{
data
:
{
data
:
{
list
:
[],
list
:
[],
pagination
:
{},
pagination
:
{},
},
},
selects
:
[],
selects
:
[],
modalVisible
:
false
,
modalVisible
:
false
,
formData
:
null
,
formData
:
null
,
formValues
:
{},
formValues
:
{},
formItem
:
[],
formItem
:
[],
objId
:
this
.
props
.
objId
||
(
this
.
props
.
location
?
this
.
props
.
location
.
state
.
id
:
null
),
objId
:
this
.
props
.
objId
||
(
this
.
props
.
location
?
this
.
props
.
location
.
state
.
id
:
null
),
isAdd
:
false
,
isAdd
:
false
,
querys
:
[],
querys
:
[],
selectedRows
:
[],
selectedRows
:
[],
primaryKey
:
null
,
primaryKey
:
null
,
options
:
{},
options
:
{},
isTable
:
true
,
isTable
:
true
,
tableWidth
:
500
,
tableWidth
:
500
,
rights
:
this
.
props
.
rights
||
[],
rights
:
this
.
props
.
rights
||
[],
columnRights
:
[],
columnRights
:
[],
isReady
:
false
,
isReady
:
false
,
groups
:
{},
groups
:
{},
showMobileDiv
:
''
,
showMobileDiv
:
''
,
isView
:
false
,
isView
:
false
,
checkedList
:
[],
// 复选框默认选中
checkedList
:
[],
// 复选框默认选中
cacheColumns
:
''
,
// 初始表头缓存数据 后续不做增删改查
cacheColumns
:
''
,
// 初始表头缓存数据 后续不做增删改查
};
loading
:
false
,
};
columns
=
[];
checkList
=
[];
// 复选框内容
columns
=
[];
getOptions
=
()
=>
{
checkList
=
[];
// 复选框内容
const
refIds
=
[];
getOptions
=
()
=>
{
for
(
var
i
=
0
;
i
<
this
.
state
.
formItem
.
length
;
i
++
)
{
const
refIds
=
[];
if
(
for
(
var
i
=
0
;
i
<
this
.
state
.
formItem
.
length
;
i
++
)
{
this
.
state
.
formItem
[
i
].
referenceObjId
!=
null
&&
if
(
this
.
state
.
options
[
this
.
state
.
formItem
[
i
].
id
+
''
]
==
null
this
.
state
.
formItem
[
i
].
referenceObjId
!=
null
&&
)
{
this
.
state
.
options
[
this
.
state
.
formItem
[
i
].
id
+
''
]
==
null
refIds
.
push
(
this
.
state
.
formItem
[
i
].
id
);
)
{
}
refIds
.
push
(
this
.
state
.
formItem
[
i
].
id
);
}
}
}
if
(
refIds
.
length
>
0
)
{
this
.
props
.
dispatch
({
if
(
refIds
.
length
>
0
)
{
type
:
'formList/getBatchOptions'
,
this
.
props
.
dispatch
({
payload
:
{
ids
:
refIds
},
type
:
'formList/getBatchOptions'
,
callback
:
options
=>
{
payload
:
{
ids
:
refIds
},
this
.
setState
({
options
:
{
...
this
.
state
.
options
,
...
options
}
});
callback
:
(
options
)
=>
{
},
this
.
setState
({
options
:
{
...
this
.
state
.
options
,
...
options
}
});
});
},
}
});
};
}
modify
=
record
=>
{
};
// if (this.state.formItem.length < 10) {
modify
=
(
record
)
=>
{
this
.
getOptions
();
// if (this.state.formItem.length < 10) {
this
.
props
.
dispatch
({
this
.
getOptions
();
type
:
'formList/getDetail'
,
this
.
props
.
dispatch
({
payload
:
{
type
:
'formList/getDetail'
,
dataObjId
:
this
.
state
.
objId
,
payload
:
{
key
:
this
.
state
.
primaryKey
,
dataObjId
:
this
.
state
.
objId
,
value
:
record
[
this
.
state
.
primaryKey
],
key
:
this
.
state
.
primaryKey
,
isBase
:
false
,
value
:
record
[
this
.
state
.
primaryKey
],
},
isBase
:
false
,
callback
:
record2
=>
{
},
this
.
setState
({
callback
:
(
record2
)
=>
{
formData
:
record2
,
this
.
setState
({
modalVisible
:
true
,
formData
:
record2
,
isAdd
:
false
,
modalVisible
:
true
,
isView
:
false
,
isAdd
:
false
,
});
isView
:
false
,
},
});
});
},
};
});
};
view
=
record
=>
{
this
.
getOptions
();
view
=
(
record
)
=>
{
this
.
setState
({
this
.
getOptions
();
formData
:
record
,
this
.
setState
({
modalVisible
:
true
,
formData
:
record
,
isAdd
:
false
,
modalVisible
:
true
,
isView
:
true
,
isAdd
:
false
,
});
isView
:
true
,
};
});
};
isJSON
=
str
=>
{
if
(
typeof
str
==
'string'
)
{
isJSON
=
(
str
)
=>
{
try
{
if
(
typeof
str
==
'string'
)
{
var
obj
=
JSON
.
parse
(
str
);
try
{
if
(
typeof
obj
==
'object'
&&
obj
)
{
var
obj
=
JSON
.
parse
(
str
);
return
true
;
if
(
typeof
obj
==
'object'
&&
obj
)
{
}
else
{
return
true
;
return
false
;
}
else
{
return
false
;
}
}
catch
(
e
)
{
console
.
log
(
'error:'
+
str
+
'!!!'
+
e
);
return
false
;
}
}
console
.
log
(
'这不是个字符串'
);
};
delete
=
(
record
)
=>
{
//找出主键
let
Keys
=
{};
Keys
[
this
.
state
.
primaryKey
]
=
record
[
this
.
state
.
primaryKey
];
this
.
props
.
dispatch
({
type
:
'formList/delete'
,
payload
:
{
keys
:
JSON
.
stringify
(
Keys
),
objId
:
this
.
state
.
objId
,
},
callback
:
()
=>
{
this
.
getPage
();
},
});
};
viewProcess
=
(
record
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'formList/getAppId'
,
payload
:
{
code
:
record
.
process_biz_key
,
},
callback
:
(
data
)
=>
{
const
domainName
=
sessionStorage
.
getItem
(
'domainName'
)
?
sessionStorage
.
getItem
(
'domainName'
)
:
''
;
window
.
open
(
domainName
+
'/portal/serviceCentre/getdetail?id='
+
data
.
id
,
'_blank'
);
//router.push({ pathname: '/portal/serviceCentre/getdetail', state: { id: data.id } });
},
});
};
/**
* 宽度自适应函数
*/
resize
=
(
e
)
=>
{
let
scrollWidth
=
document
.
documentElement
.
clientWidth
||
document
.
body
.
clientWidth
;
//可使宽度
let
showMobileDiv
=
scrollWidth
-
77
;
if
(
document
.
querySelector
(
'#previewDiv'
))
{
// 预览模式
this
.
setState
({
showMobileDiv
:
document
.
querySelector
(
'#previewDiv'
).
clientWidth
-
77
,
});
}
else
{
this
.
setState
({
showMobileDiv
,
});
}
};
//渲染值
componentDidMount
()
{
const
{
dispatch
}
=
this
.
props
;
window
.
addEventListener
(
'resize'
,
this
.
resize
);
// console.log('componentDidMount');
if
(
this
.
props
.
objCode
)
{
const
{
dispatch
,
objCode
,
sql
}
=
this
.
props
;
if
(
Number
(
objCode
)
===
1
)
{
this
.
initColumn
();
}
else
{
dispatch
({
type
:
'DataObj/findByCode'
,
payload
:
{
objCode
:
this
.
props
.
objCode
},
callback
:
(
dataObj
)
=>
{
this
.
setState
(
{
objId
:
dataObj
.
id
,
isTable
:
dataObj
.
isTable
,
},
()
=>
{
dispatch
({
type
:
'DataRight/getUserRight'
,
payload
:
{
objId
:
this
.
state
.
objId
},
callback
:
(
data
)
=>
{
if
(
!
this
.
props
.
rights
)
{
this
.
setState
({
rights
:
data
});
}
dispatch
({
type
:
'DataRight/getUserColumnRight'
,
payload
:
{
objId
:
this
.
state
.
objId
},
callback
:
(
data
)
=>
{
this
.
setState
({
columnRights
:
data
});
this
.
initColumn
();
},
});
},
});
},
);
},
});
}
}
else
{
dispatch
({
type
:
'formList/getObjDetail'
,
payload
:
{
id
:
this
.
state
.
objId
},
callback
:
(
data
)
=>
{
this
.
setState
({
isTable
:
data
.
isTable
});
},
});
dispatch
({
type
:
'DataRight/getUserRight'
,
payload
:
{
objId
:
this
.
state
.
objId
},
callback
:
(
data
)
=>
{
if
(
!
this
.
props
.
rights
)
{
this
.
setState
({
rights
:
data
});
}
dispatch
({
type
:
'DataRight/getUserColumnRight'
,
payload
:
{
objId
:
this
.
state
.
objId
},
callback
:
(
data
)
=>
{
this
.
setState
({
columnRights
:
data
});
this
.
initColumn
();
},
});
},
});
}
}
/**
* 移除监听器
*/
componentWillUnmount
()
{
window
.
removeEventListener
(
'resize'
,
this
.
resize
);
}
custom
=
this
.
props
.
value
?
JSON
.
stringify
(
this
.
props
.
value
)
:
null
;
componentWillReceiveProps
(
nextProps
)
{
const
b
=
nextProps
.
value
||
{};
const
a
=
this
.
props
.
value
||
{};
const
jsonb
=
JSON
.
stringify
(
b
);
const
jsona
=
JSON
.
stringify
(
a
);
this
.
custom
=
jsonb
;
if
(
jsona
!=
jsonb
)
{
let
params
=
{
pageNo
:
b
.
pageNo
?
b
.
pageNo
:
1
,
pageSize
:
b
.
pageSize
?
b
.
pageSize
:
this
.
state
.
data
.
pagination
.
pageSize
,
query
:
JSON
.
stringify
(
this
.
state
.
formValues
),
};
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
)
{
console
.
log
(
'390'
);
this
.
getPage
(
params
,
null
,
nextProps
.
value
.
getPage
);
}
else
{
if
(
this
.
state
.
objId
)
{
console
.
log
(
'394'
);
this
.
getPage
(
params
);
}
}
}
catch
(
e
)
{
}
console
.
log
(
'error:'
+
str
+
'!!!'
+
e
);
}
return
false
;
const
x
=
nextProps
.
selects
;
}
const
y
=
this
.
props
.
selects
;
}
if
(
JSON
.
stringify
(
x
)
!=
JSON
.
stringify
(
y
))
{
console
.
log
(
'这不是个字符串'
);
this
.
setState
({
selects
:
x
});
};
}
}
delete
=
record
=>
{
//找出主键
initColumn
=
()
=>
{
let
Keys
=
{};
const
{
dispatch
,
value
,
objCode
}
=
this
.
props
;
Keys
[
this
.
state
.
primaryKey
]
=
record
[
this
.
state
.
primaryKey
];
const
{
rights
,
columnRights
}
=
this
.
state
;
this
.
props
.
dispatch
({
if
(
value
&&
value
.
columns
)
{
type
:
'formList/delete'
,
this
.
columns
=
value
.
columns
;
payload
:
{
let
cacheList
=
[];
keys
:
JSON
.
stringify
(
Keys
),
let
cacheChecked
=
[];
objId
:
this
.
state
.
objId
,
// 表头筛选逻辑
},
Array
.
isArray
(
value
.
columns
)
&&
callback
:
()
=>
{
value
.
columns
.
map
((
item
)
=>
{
this
.
getPage
();
if
(
item
.
dataIndex
!=
null
)
{
},
cacheList
.
push
({
});
label
:
item
.
title
,
};
value
:
item
.
dataIndex
,
});
viewProcess
=
record
=>
{
cacheChecked
.
push
(
item
.
dataIndex
);
const
{
dispatch
}
=
this
.
props
;
}
dispatch
({
});
type
:
'formList/getAppId'
,
this
.
checkList
=
cacheList
;
payload
:
{
code
:
record
.
process_biz_key
,
this
.
setState
({
},
checkedList
:
cacheChecked
,
callback
:
data
=>
{
cacheColumns
:
cloneDeep
(
value
.
columns
),
const
domainName
=
sessionStorage
.
getItem
(
'domainName'
)
});
?
sessionStorage
.
getItem
(
'domainName'
)
if
(
Number
(
objCode
)
===
1
)
{
:
''
;
this
.
getPage
();
}
else
{
window
.
open
(
domainName
+
'/portal/serviceCentre/getdetail?id='
+
data
.
id
,
'_blank'
);
dispatch
({
//router.push({ pathname: '/portal/serviceCentre/getdetail', state: { id: data.id } });
type
:
'formList/getHead'
,
},
payload
:
{
dataObjId
:
this
.
state
.
objId
},
});
callback
:
(
datas
)
=>
{
};
this
.
state
.
formItem
=
datas
;
const
querys
=
[];
/**
const
groups
=
{};
* 宽度自适应函数
const
refIds
=
[];
*/
for
(
let
t
in
datas
)
{
resize
=
e
=>
{
if
(
datas
[
t
].
isPrimaryKey
)
this
.
state
.
primaryKey
=
datas
[
t
].
name
;
let
scrollWidth
=
document
.
documentElement
.
clientWidth
||
document
.
body
.
clientWidth
;
//可使宽度
if
(
datas
[
t
].
isShowQuery
)
{
let
showMobileDiv
=
scrollWidth
-
77
;
querys
.
push
(
datas
[
t
]);
if
(
document
.
querySelector
(
'#previewDiv'
))
{
if
(
datas
[
t
].
referenceObjId
!=
null
)
{
// 预览模式
refIds
.
push
(
datas
[
t
].
id
);
this
.
setState
({
}
showMobileDiv
:
document
.
querySelector
(
'#previewDiv'
).
clientWidth
-
77
,
if
(
datas
[
t
].
isGroupQuery
!=
null
)
{
});
dispatch
({
}
else
{
type
:
'formList/getGroupList'
,
this
.
setState
({
payload
:
{
columnId
:
datas
[
t
].
id
},
showMobileDiv
,
callback
:
(
gourp
)
=>
{
});
groups
[
datas
[
t
].
id
]
=
gourp
;
}
this
.
setState
({
groups
});
};
},
});
//渲染值
}
componentDidMount
()
{
}
const
{
dispatch
}
=
this
.
props
;
}
window
.
addEventListener
(
'resize'
,
this
.
resize
);
if
(
querys
.
length
>
0
)
{
this
.
setState
({
querys
});
// console.log('componentDidMount');
if
(
refIds
.
length
>
0
)
{
if
(
this
.
props
.
objCode
)
{
dispatch
({
const
{
dispatch
,
objCode
,
sql
}
=
this
.
props
;
type
:
'formList/getBatchOptions'
,
payload
:
{
ids
:
refIds
},
if
(
Number
(
objCode
)
===
1
)
{
callback
:
(
options
)
=>
{
this
.
initColumn
();
this
.
setState
({
options
});
}
else
{
},
dispatch
({
});
type
:
'DataObj/findByCode'
,
}
payload
:
{
objCode
:
this
.
props
.
objCode
},
}
callback
:
dataObj
=>
{
this
.
getPage
();
this
.
setState
(
},
{
});
objId
:
dataObj
.
id
,
}
isTable
:
dataObj
.
isTable
,
return
;
},
}
()
=>
{
dispatch
({
if
(
Number
(
objCode
)
===
1
)
{
type
:
'DataRight/getUserRight'
,
}
else
{
payload
:
{
objId
:
this
.
state
.
objId
},
dispatch
({
callback
:
data
=>
{
type
:
'formList/getHead'
,
if
(
!
this
.
props
.
rights
)
{
payload
:
{
dataObjId
:
this
.
state
.
objId
},
this
.
setState
({
rights
:
data
});
callback
:
(
datas
)
=>
{
}
const
querys
=
[];
dispatch
({
const
refIds
=
[];
type
:
'DataRight/getUserColumnRight'
,
const
groups
=
{};
payload
:
{
objId
:
this
.
state
.
objId
},
if
(
datas
)
{
callback
:
data
=>
{
this
.
state
.
formItem
=
datas
;
this
.
setState
({
columnRights
:
data
});
let
i
=
0
;
this
.
initColumn
();
let
cacheList
=
[];
},
let
cacheChecked
=
[];
});
// 表头筛选逻辑
},
datas
.
map
((
item
)
=>
{
});
if
(
item
.
name
!=
null
)
{
},
cacheList
.
push
({
);
label
:
item
.
title
,
},
value
:
item
.
name
,
});
});
}
cacheChecked
.
push
(
item
.
name
);
}
else
{
}
dispatch
({
});
type
:
'formList/getObjDetail'
,
this
.
checkList
=
cacheList
;
payload
:
{
id
:
this
.
state
.
objId
},
this
.
setState
({
callback
:
data
=>
{
checkedList
:
cacheChecked
,
this
.
setState
({
isTable
:
data
.
isTable
});
});
},
for
(
let
t
in
datas
)
{
if
(
datas
[
t
].
isPrimaryKey
)
this
.
state
.
primaryKey
=
datas
[
t
].
name
;
if
(
datas
[
t
].
isHidden
)
{
continue
;
}
let
column
=
{};
column
.
title
=
datas
[
t
].
title
;
column
.
dataIndex
=
datas
[
t
].
name
;
column
.
width
=
datas
[
t
].
width
;
if
(
i
==
0
)
column
.
fixed
=
'left'
;
if
(
columnRights
.
length
>
0
&&
!
columnRights
.
includes
(
datas
[
t
].
id
))
{
continue
;
}
if
(
date
.
includes
(
datas
[
t
].
type
))
{
column
.
render
=
(
val
)
=>
{
if
(
val
==
null
)
{
return
val
;
}
if
(
datas
[
t
].
dataFormatStrWeb
!=
null
)
{
return
moment
(
val
).
format
(
datas
[
t
].
dataFormatStrWeb
);
}
else
{
return
moment
(
val
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
}
};
}
else
if
(
datas
[
t
].
name
.
indexOf
(
'process_status'
)
>
-
1
)
{
column
.
render
=
(
val
)
=>
(
val
?
(
val
===
'0'
?
'审核通过'
:
'审核未通过'
)
:
null
);
}
else
if
(
datas
[
t
].
extendTypeId
&&
datas
[
t
].
extendTypeId
.
indexOf
(
'file'
)
>
-
1
)
{
//特殊处理附件
column
.
render
=
(
val
)
=>
{
if
(
this
.
isJSON
(
val
))
{
val
=
JSON
.
parse
(
val
);
let
files
=
val
.
files
;
let
xx
=
(
<
ul
>
{
files
.
map
((
f
,
index2
)
=>
{
return
(
<
li
key
=
{
index2
}
>
<
FilePreview
path
=
{
queryFileUrl
(
f
.
path
)}
pathName
=
{
f
.
name
}
/
>
<
/li
>
);
})}
<
/ul
>
);
return
xx
;
}
else
{
return
val
;
}
};
}
else
{
column
.
render
=
(
val
)
=>
val
&&
val
.
length
>
100
?
(
<
Tooltip
title
=
{
val
}
overlayStyle
=
{{
width
:
1000
}}
>
<
span
style
=
{{
width
:
column
.
width
||
200
,
display
:
'block'
,
wordBreak
:
'keep-all'
,
whiteSpace
:
'nowrap'
,
overflow
:
'hidden'
,
textOverflow
:
'ellipsis'
,
}}
>
{
val
}
<
/span
>
<
/Tooltip
>
)
:
(
val
);
}
this
.
setState
({
tableWidth
:
(
datas
.
length
-
1
)
*
200
});
this
.
columns
.
push
(
column
);
this
.
setState
({
cacheColumns
:
cloneDeep
(
this
.
columns
),
});
if
(
datas
[
t
].
isShowQuery
)
{
querys
.
push
(
datas
[
t
]);
if
(
datas
[
t
].
referenceObjId
!=
null
)
{
refIds
.
push
(
datas
[
t
].
id
);
}
if
(
datas
[
t
].
isGroupQuery
!=
null
)
{
dispatch
({
type
:
'formList/getGroupList'
,
payload
:
{
columnId
:
datas
[
t
].
id
},
callback
:
(
gourp
)
=>
{
groups
[
datas
[
t
].
id
]
=
gourp
;
this
.
setState
({
groups
});
},
});
}
}
i
++
;
}
if
(
querys
.
length
>
0
)
{
this
.
setState
({
querys
});
if
(
refIds
.
length
>
0
)
{
dispatch
({
type
:
'formList/getBatchOptions'
,
payload
:
{
ids
:
refIds
},
callback
:
(
options
)
=>
{
this
.
setState
({
options
});
},
});
}
}
this
.
getPage
();
}
},
});
}
};
sqlBs16
=
this
.
props
.
sql
;
getPage
=
(
params
,
values
,
callPage
,
pageNo
)
=>
{
const
{
objCode
}
=
this
.
props
;
if
(
this
.
columns
==
null
||
this
.
columns
.
length
==
0
)
{
return
;
}
const
{
dispatch
}
=
this
.
props
;
const
pagination
=
this
.
state
.
data
.
pagination
;
if
(
params
==
null
)
{
params
=
{
pageNo
:
pageNo
!=
null
?
pageNo
:
pagination
.
current
?
pagination
.
current
:
1
,
pageSize
:
pagination
.
pageSize
?
pagination
.
pageSize
:
this
.
props
.
pageSize
||
10
,
query
:
JSON
.
stringify
(
values
!=
null
?
values
:
this
.
state
.
formValues
),
};
}
else
{
if
(
params
.
pageNo
==
null
&&
callPage
==
null
&&
this
.
props
.
value
.
getPage
==
null
)
return
;
}
if
(
Number
(
objCode
)
===
1
)
{
if
(
callPage
)
{
callPage
(
params
,
(
data
)
=>
{
if
(
!
this
.
state
.
isReady
)
{
this
.
setState
({
data
,
isReady
:
true
,
});
}
else
{
this
.
setState
({
data
});
}
});
}
else
if
(
this
.
props
.
value
&&
this
.
props
.
value
.
getPage
)
{
this
.
props
.
value
.
getPage
(
params
,
(
data
)
=>
{
if
(
!
this
.
state
.
isReady
)
{
this
.
setState
({
data
,
isReady
:
true
,
});
}
else
{
this
.
setState
({
data
});
}
});
}
}
else
{
this
.
setState
({
loading
:
true
,
});
});
dispatch
({
dispatch
({
type
:
'DataRight/getUserRight'
,
type
:
'formList/fetch'
,
payload
:
{
objId
:
this
.
state
.
objId
},
payload
:
{
callback
:
data
=>
{
custom
:
this
.
custom
,
if
(
!
this
.
props
.
rights
)
{
...
params
,
this
.
setState
({
rights
:
data
});
}
sql
:
this
.
sqlBs16
,
dispatch
({
dataObjId
:
this
.
state
.
objId
,
type
:
'DataRight/getUserColumnRight'
,
},
payload
:
{
objId
:
this
.
state
.
objId
},
callback
:
(
data
)
=>
{
callback
:
data
=>
{
this
.
setState
({
this
.
setState
({
columnRights
:
data
});
loading
:
false
,
this
.
initColumn
();
},
});
});
},
if
(
!
this
.
state
.
isReady
)
{
});
this
.
setState
({
}
data
,
}
isReady
:
true
,
selectedRows
:
[],
// 姚鑫国说的 调了分页接口以后需要 把这个选择的行数据 清空
/**
});
* 移除监听器
}
else
{
*/
this
.
setState
({
componentWillUnmount
()
{
data
,
window
.
removeEventListener
(
'resize'
,
this
.
resize
);
selectedRows
:
[],
// 姚鑫国说的 调了分页接口以后需要 把这个选择的行数据 清空
}
});
}
custom
=
this
.
props
.
value
?
JSON
.
stringify
(
this
.
props
.
value
)
:
null
;
},
});
componentWillReceiveProps
(
nextProps
)
{
}
const
b
=
nextProps
.
value
||
{};
};
const
a
=
this
.
props
.
value
||
{};
const
jsonb
=
JSON
.
stringify
(
b
);
handleStandardTableChange
=
(
pagination
,
filtersArg
,
sorter
)
=>
{
const
jsona
=
JSON
.
stringify
(
a
);
const
filters
=
Object
.
keys
(
filtersArg
).
reduce
((
obj
,
key
)
=>
{
const
newObj
=
{
...
obj
};
this
.
custom
=
jsonb
;
newObj
[
key
]
=
getValue
(
filtersArg
[
key
]);
if
(
jsona
!=
jsonb
)
{
return
newObj
;
let
params
=
{
},
{});
pageNo
:
b
.
pageNo
?
b
.
pageNo
:
1
,
pageSize
:
b
.
pageSize
?
b
.
pageSize
:
this
.
state
.
data
.
pagination
.
pageSize
,
const
params
=
{
query
:
JSON
.
stringify
(
this
.
state
.
formValues
),
pageNo
:
pagination
.
current
,
};
pageSize
:
pagination
.
pageSize
,
...
filters
,
if
(
nextProps
.
value
.
columns
!=
null
&&
nextProps
.
value
.
columns
.
length
>
0
)
{
query
:
JSON
.
stringify
(
this
.
state
.
formValues
),
this
.
columns
=
nextProps
.
value
.
columns
;
};
}
if
(
sorter
.
field
)
{
if
(
nextProps
.
value
.
selectedRows
&&
Array
.
isArray
(
nextProps
.
value
.
selectedRows
))
{
params
.
sorter
=
`
${
sorter
.
field
}
_
${
sorter
.
order
}
`
;
// 27867 就业市场/线上招聘管理/职位信息审核,胡林那 hulinnaAdmin 马上审核通过的职位直接发布 发布不了
}
this
.
setState
({
this
.
getPage
(
params
);
selectedRows
:
nextProps
.
value
.
selectedRows
,
};
});
}
handleAdd
=
(
fields
,
isAdd
)
=>
{
let
params
=
{
if
(
nextProps
.
value
.
getPage
)
{
...
fields
,
this
.
getPage
(
params
,
null
,
nextProps
.
value
.
getPage
);
};
}
else
{
this
.
props
.
dispatch
({
if
(
this
.
state
.
objId
)
this
.
getPage
(
params
);
type
:
'formList/add'
,
}
payload
:
{
}
params
:
params
,
const
x
=
nextProps
.
selects
;
objId
:
this
.
state
.
objId
,
const
y
=
this
.
props
.
selects
;
isAdd
:
isAdd
,
if
(
JSON
.
stringify
(
x
)
!=
JSON
.
stringify
(
y
))
{
isSelf
:
true
,
this
.
setState
({
selects
:
x
});
isView
:
false
,
}
},
}
callback
:
()
=>
{
message
.
success
(
'操作成功'
);
initColumn
=
()
=>
{
this
.
setState
({
const
{
dispatch
,
value
,
objCode
}
=
this
.
props
;
modalVisible
:
false
,
const
{
rights
,
columnRights
}
=
this
.
state
;
});
if
(
value
&&
value
.
columns
)
{
this
.
getPage
();
this
.
columns
=
value
.
columns
;
},
let
cacheList
=
[];
});
let
cacheChecked
=
[];
};
// 表头筛选逻辑
Array
.
isArray
(
value
.
columns
)
&&
handleModalVisible
=
()
=>
{
value
.
columns
.
map
(
item
=>
{
this
.
setState
({
if
(
item
.
dataIndex
!=
null
)
{
modalVisible
:
this
.
state
.
modalVisible
?
false
:
true
,
cacheList
.
push
({
formData
:
{},
label
:
item
.
title
,
isView
:
false
,
value
:
item
.
dataIndex
,
});
});
};
cacheChecked
.
push
(
item
.
dataIndex
);
}
add
=
()
=>
{
});
// if (this.state.formItem.length < 10) {
this
.
checkList
=
cacheList
;
this
.
getOptions
();
this
.
setState
({
this
.
setState
({
modalVisible
:
true
,
checkedList
:
cacheChecked
,
formData
:
{},
cacheColumns
:
cloneDeep
(
value
.
columns
),
isAdd
:
true
,
});
isView
:
false
,
if
(
Number
(
objCode
)
===
1
)
{
});
this
.
getPage
();
// } else {
}
else
{
// router.push({
dispatch
({
// pathname: '/admin/ddl/dataObj/formEdit',
type
:
'formList/getHead'
,
// state: { id: this.state.objId,isAdd: true,isView:false }
payload
:
{
dataObjId
:
this
.
state
.
objId
},
// });
callback
:
datas
=>
{
// }
this
.
state
.
formItem
=
datas
;
};
const
querys
=
[];
const
groups
=
{};
handleSelectRows
=
(
rows
)
=>
{
const
refIds
=
[];
if
(
this
.
props
.
onSelectRow
)
{
for
(
let
t
in
datas
)
{
this
.
props
.
onSelectRow
(
rows
);
if
(
datas
[
t
].
isPrimaryKey
)
this
.
state
.
primaryKey
=
datas
[
t
].
name
;
}
if
(
datas
[
t
].
isShowQuery
)
{
this
.
setState
({
querys
.
push
(
datas
[
t
]);
selectedRows
:
rows
,
if
(
datas
[
t
].
referenceObjId
!=
null
)
{
});
refIds
.
push
(
datas
[
t
].
id
);
};
}
if
(
datas
[
t
].
isGroupQuery
!=
null
)
{
batchDelete
=
(
e
)
=>
{
dispatch
({
const
{
dispatch
}
=
this
.
props
;
type
:
'formList/getGroupList'
,
const
{
selectedRows
}
=
this
.
state
;
payload
:
{
columnId
:
datas
[
t
].
id
},
callback
:
gourp
=>
{
if
(
!
selectedRows
)
return
;
groups
[
datas
[
t
].
id
]
=
gourp
;
this
.
setState
({
groups
});
let
columns
=
this
.
state
.
formItem
;
},
let
Keys
=
{};
});
}
for
(
let
i
in
columns
)
{
}
if
(
columns
[
i
].
isPrimaryKey
)
{
}
//key
if
(
querys
.
length
>
0
)
{
Keys
[
columns
[
i
].
name
]
=
selectedRows
.
map
((
row
)
=>
row
[
columns
[
i
].
name
]).
join
(
','
);
this
.
setState
({
querys
});
}
if
(
refIds
.
length
>
0
)
{
}
dispatch
({
this
.
props
.
dispatch
({
type
:
'formList/getBatchOptions'
,
type
:
'formList/delete'
,
payload
:
{
ids
:
refIds
},
payload
:
{
callback
:
options
=>
{
keys
:
JSON
.
stringify
(
Keys
),
this
.
setState
({
options
});
objId
:
this
.
state
.
objId
,
},
// isSelf: true,
});
},
}
callback
:
()
=>
{
}
this
.
setState
({
this
.
getPage
();
selectedRows
:
[],
},
});
});
this
.
getPage
();
}
},
return
;
});
}
};
if
(
Number
(
objCode
)
===
1
)
{
goBack
=
()
=>
{
}
else
{
router
.
goBack
();
dispatch
({
};
type
:
'formList/getHead'
,
handleSearch
=
(
e
)
=>
{
payload
:
{
dataObjId
:
this
.
state
.
objId
},
e
.
preventDefault
();
callback
:
datas
=>
{
const
querys
=
[];
const
{
dispatch
,
form
}
=
this
.
props
;
const
refIds
=
[];
const
groups
=
{};
const
{
formValues
}
=
this
.
state
;
if
(
datas
)
{
this
.
state
.
formItem
=
datas
;
form
.
validateFields
((
err
,
fieldsValue
)
=>
{
let
i
=
0
;
if
(
err
)
return
;
let
cacheList
=
[];
let
cacheChecked
=
[];
const
formItem
=
this
.
state
.
formItem
;
// 表头筛选逻辑
formItem
.
map
((
item
,
index
)
=>
{
datas
.
map
(
item
=>
{
if
(
item
.
type
.
indexOf
(
'DATE'
)
>
-
1
)
{
if
(
item
.
name
!=
null
)
{
for
(
let
d
in
fieldsValue
)
{
cacheList
.
push
({
if
(
item
.
name
===
d
&&
fieldsValue
[
d
])
{
label
:
item
.
title
,
if
(
fieldsValue
[
d
]
!=
null
&&
fieldsValue
[
d
].
length
>
0
)
{
value
:
item
.
name
,
fieldsValue
[
d
]
=
[
});
fieldsValue
[
d
][
0
].
format
(
'YYYY-MM-DD HH:mm:ss'
),
cacheChecked
.
push
(
item
.
name
);
fieldsValue
[
d
][
1
].
format
(
'YYYY-MM-DD HH:mm:ss'
),
}
];
});
}
else
{
this
.
checkList
=
cacheList
;
fieldsValue
[
d
]
=
''
;
this
.
setState
({
}
checkedList
:
cacheChecked
,
}
});
}
for
(
let
t
in
datas
)
{
}
if
(
datas
[
t
].
isPrimaryKey
)
this
.
state
.
primaryKey
=
datas
[
t
].
name
;
});
if
(
datas
[
t
].
isHidden
)
{
const
values
=
{
continue
;
...
this
.
state
.
formValues
,
}
...
fieldsValue
,
let
column
=
{};
};
column
.
title
=
datas
[
t
].
title
;
this
.
setState
({
column
.
dataIndex
=
datas
[
t
].
name
;
formValues
:
fieldsValue
,
column
.
width
=
datas
[
t
].
width
;
});
if
(
i
==
0
)
column
.
fixed
=
'left'
;
const
params
=
{
pageNo
:
1
,
if
(
columnRights
.
length
>
0
&&
!
columnRights
.
includes
(
datas
[
t
].
id
))
{
pageSize
:
this
.
props
.
pageSize
||
10
,
continue
;
query
:
JSON
.
stringify
(
values
),
}
};
if
(
date
.
includes
(
datas
[
t
].
type
))
{
this
.
getPage
(
params
,
values
,
null
,
1
);
column
.
render
=
val
=>
{
});
if
(
val
==
null
)
{
};
return
val
;
}
hanldeHighSearch
=
(
e
)
=>
{
if
(
datas
[
t
].
dataFormatStrWeb
!=
null
)
{
const
pagination
=
this
.
props
.
formList
.
data
.
pagination
;
return
moment
(
val
).
format
(
datas
[
t
].
dataFormatStrWeb
);
let
params
=
{
}
else
{
pageNo
:
pagination
.
current
?
pagination
.
current
:
1
,
return
moment
(
val
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
pageSize
:
pagination
.
pageSize
?
pagination
.
pageSize
:
this
.
props
.
pageSize
||
10
,
}
...
e
,
};
};
}
else
if
(
datas
[
t
].
name
.
indexOf
(
'process_status'
)
>
-
1
)
{
this
.
setState
({
formValues
:
{
...
e
,
...
this
.
state
.
formValues
}
});
column
.
render
=
val
=>
(
val
?
(
val
===
'0'
?
'审核通过'
:
'审核未通过'
)
:
null
);
this
.
getPage
(
params
);
}
else
if
(
datas
[
t
].
extendTypeId
&&
datas
[
t
].
extendTypeId
.
indexOf
(
'file'
)
>
-
1
)
{
};
//特殊处理附件
handleFormReset
=
()
=>
{
column
.
render
=
val
=>
{
const
{
form
,
dispatch
}
=
this
.
props
;
if
(
this
.
isJSON
(
val
))
{
form
.
resetFields
();
val
=
JSON
.
parse
(
val
);
this
.
setState
(
let
files
=
val
.
files
;
{
let
xx
=
(
formValues
:
{},
<
ul
>
},
{
files
.
map
((
f
,
index2
)
=>
{
()
=>
{
return
(
this
.
getPage
();
<
li
key
=
{
index2
}
>
},
<
FilePreview
path
=
{
queryFileUrl
(
f
.
path
)}
pathName
=
{
f
.
name
}
/
>
);
<
/li
>
};
);
getItem
=
(
isQuery
,
form
,
item
,
isAdd
,
formData
,
labelCol
,
wrapperCol
)
=>
{
})}
const
{
groups
,
isView
}
=
this
.
state
;
<
/ul
>
//如果隐藏的话 就用隐藏域放置
);
if
(
item
.
isHidden
)
{
return
xx
;
return
(
}
else
{
<
FormItem
className
=
{
styles
.
hidden
}
key
=
{
item
.
id
}
>
return
val
;
{
form
.
getFieldDecorator
(
item
.
name
,
{
}
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
};
})(
<
Input
type
=
"hidden"
placeholder
=
"请输入"
/>
)}
}
else
{
<
/FormItem
>
column
.
render
=
val
=>
);
val
&&
val
.
length
>
100
?
(
}
<
Tooltip
title
=
{
val
}
overlayStyle
=
{{
width
:
1000
}}
>
<
span
if
(
item
.
isPrimaryKey
)
{
style
=
{{
if
(
isAdd
)
{
width
:
column
.
width
||
200
,
return
<><
/>
;
display
:
'block'
,
}
else
{
wordBreak
:
'keep-all'
,
return
(
whiteSpace
:
'nowrap'
,
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
overflow
:
'hidden'
,
{
form
.
getFieldDecorator
(
item
.
name
,
{
textOverflow
:
'ellipsis'
,
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
}}
rules
:
[{
required
:
!
item
.
isNull
}],
>
})(
<
Input
style
=
{{
width
:
'70%'
}}
readOnly
=
{
!
isAdd
}
placeholder
=
"请输入"
/>
)}
{
val
}
<
/FormItem
>
<
/span
>
);
<
/Tooltip
>
}
)
:
(
}
else
if
(
item
.
referenceObjId
!=
null
)
{
val
const
{
options
}
=
this
.
state
;
);
const
ops
=
options
[
item
.
id
+
''
]
||
[];
}
return
(
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
this
.
setState
({
tableWidth
:
(
datas
.
length
-
1
)
*
200
});
{
form
.
getFieldDecorator
(
item
.
name
,
{
this
.
columns
.
push
(
column
);
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
this
.
setState
({
rules
:
[{
required
:
!
item
.
isNull
}],
cacheColumns
:
cloneDeep
(
this
.
columns
),
})(
});
<
Select
if
(
datas
[
t
].
isShowQuery
)
{
disabled
=
{
isView
}
querys
.
push
(
datas
[
t
]);
style
=
{{
width
:
'70%'
}}
if
(
datas
[
t
].
referenceObjId
!=
null
)
{
optionFilterProp
=
"children"
refIds
.
push
(
datas
[
t
].
id
);
showSearch
}
filterOption
=
{(
input
,
option
)
=>
if
(
datas
[
t
].
isGroupQuery
!=
null
)
{
option
dispatch
({
?
option
.
props
.
children
.
toLowerCase
().
indexOf
(
input
.
toLowerCase
())
>=
0
type
:
'formList/getGroupList'
,
:
false
payload
:
{
columnId
:
datas
[
t
].
id
},
}
callback
:
gourp
=>
{
placeholder
=
"请选择"
groups
[
datas
[
t
].
id
]
=
gourp
;
allowClear
>
this
.
setState
({
groups
});
{
ops
.
map
((
r
)
=>
(
},
<
Option
value
=
{
r
[
item
.
referenceCodeName
]}
key
=
{
r
[
item
.
referenceCodeName
]}
>
});
{
r
[
item
.
referenceNameName
]}
}
<
/Option
>
}
))}
i
++
;
<
/Select>
,
}
)}
if
(
querys
.
length
>
0
)
{
<
/FormItem
>
this
.
setState
({
querys
});
);
if
(
refIds
.
length
>
0
)
{
}
else
if
(
item
.
name
.
indexOf
(
'process_status'
)
>
-
1
)
{
dispatch
({
return
(
type
:
'formList/getBatchOptions'
,
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
payload
:
{
ids
:
refIds
},
{
form
.
getFieldDecorator
(
item
.
name
,
{
callback
:
options
=>
{
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
this
.
setState
({
options
});
rules
:
[{
required
:
!
item
.
isNull
}],
},
})(
});
<
Select
disabled
=
{
isView
}
style
=
{{
width
:
'70%'
}}
placeholder
=
"请选择"
allowClear
>
}
<
Option
value
=
{
'0'
}
key
=
{
'0'
}
>
}
审核通过
<
/Option
>
this
.
getPage
();
<
Option
value
=
{
'2'
}
key
=
{
'2'
}
>
}
审核未通过
},
<
/Option
>
});
<
/Select>
,
}
)}
};
<
/FormItem
>
sqlBs16
=
this
.
props
.
sql
;
);
}
else
if
(
item
.
extendTypeId
&&
item
.
extendTypeId
.
indexOf
(
'file'
)
>
-
1
)
{
getPage
=
(
params
,
values
,
callPage
,
pageNo
)
=>
{
//特殊处理附件 如果是查询就 跳过
const
{
objCode
}
=
this
.
props
;
if
(
isQuery
)
return
;
if
(
this
.
columns
==
null
||
this
.
columns
.
length
==
0
)
{
return
(
return
;
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
}
{
form
.
getFieldDecorator
(
item
.
name
,
{
const
{
dispatch
}
=
this
.
props
;
initialValue
:
const
pagination
=
this
.
state
.
data
.
pagination
;
formData
==
null
?
''
if
(
params
==
null
)
{
:
formData
[
item
.
name
]
&&
this
.
isJSON
(
formData
[
item
.
name
])
params
=
{
?
JSON
.
parse
(
formData
[
item
.
name
])
pageNo
:
pageNo
!=
null
?
pageNo
:
pagination
.
current
?
pagination
.
current
:
1
,
:
null
,
pageSize
:
pagination
.
pageSize
?
pagination
.
pageSize
:
this
.
props
.
pageSize
||
10
,
rules
:
[{
required
:
!
item
.
isNull
}],
query
:
JSON
.
stringify
(
values
!=
null
?
values
:
this
.
state
.
formValues
),
})(
<
UploadCom
disabled
=
{
isView
}
/>
)
}
};
<
/FormItem
>
}
else
{
);
if
(
params
.
pageNo
==
null
&&
callPage
==
null
&&
this
.
props
.
value
.
getPage
==
null
)
return
;
}
else
if
(
isQuery
&&
item
.
isGroupQuery
!=
null
&&
item
.
isGroupQuery
)
{
}
//如果是查询 并且是组合查询
if
(
Number
(
objCode
)
===
1
)
{
const
ops
=
groups
[
item
.
id
+
''
]
||
[];
if
(
callPage
)
{
return
(
callPage
(
params
,
data
=>
{
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
if
(
!
this
.
state
.
isReady
)
{
{
form
.
getFieldDecorator
(
item
.
name
,
{
this
.
setState
({
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
data
,
rules
:
[{
required
:
!
item
.
isNull
}],
isReady
:
true
,
})(
});
<
Select
}
else
{
disabled
=
{
isView
}
this
.
setState
({
data
});
style
=
{{
width
:
200
}}
}
placeholder
=
"请选择"
});
optionFilterProp
=
"children"
}
else
if
(
this
.
props
.
value
&&
this
.
props
.
value
.
getPage
)
{
showSearch
this
.
props
.
value
.
getPage
(
params
,
data
=>
{
filterOption
=
{(
input
,
option
)
=>
if
(
!
this
.
state
.
isReady
)
{
option
this
.
setState
({
?
option
.
props
.
children
.
toLowerCase
().
indexOf
(
input
.
toLowerCase
())
>=
0
data
,
:
false
isReady
:
true
,
}
});
allowClear
>
}
else
{
{
ops
.
map
((
r
)
=>
(
this
.
setState
({
data
});
<
Option
value
=
{
r
.
value
}
key
=
{
r
.
value
}
>
}
{
r
.
value
}
});
<
/Option
>
}
))}
}
else
{
<
/Select>
,
dispatch
({
)}
type
:
'formList/fetch'
,
<
/FormItem
>
payload
:
{
);
custom
:
this
.
custom
,
}
else
if
(
text
.
indexOf
(
item
.
type
)
>
-
1
)
{
...
params
,
return
(
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
sql
:
this
.
sqlBs16
,
{
form
.
getFieldDecorator
(
item
.
name
,
{
dataObjId
:
this
.
state
.
objId
,
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
},
rules
:
[{
required
:
!
item
.
isNull
}],
callback
:
data
=>
{
})(
<
Input
disabled
=
{
isView
}
style
=
{{
width
:
'70%'
}}
placeholder
=
"请输入"
/>
)}
if
(
!
this
.
state
.
isReady
)
{
<
/FormItem
>
this
.
setState
({
);
data
,
}
else
if
(
number
.
indexOf
(
item
.
type
)
>
-
1
)
{
isReady
:
true
,
return
(
selectedRows
:
[],
// 姚鑫国说的 调了分页接口以后需要 把这个选择的行数据 清空
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
});
{
form
.
getFieldDecorator
(
item
.
name
,
{
}
else
{
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
this
.
setState
({
rules
:
[
data
,
{
required
:
!
item
.
isNull
},
selectedRows
:
[],
// 姚鑫国说的 调了分页接口以后需要 把这个选择的行数据 清空
(
rule
,
value
,
callback
)
=>
{
});
var
errors
=
[];
}
var
reg
=
new
RegExp
(
/
(
^-
?[
0-9
][
0-9
]
*
(
.
[
0-9
]
+
)?)
$/
);
},
if
(
value
!=
null
&&
value
!=
''
&&
!
reg
.
test
(
value
))
{
});
errors
.
push
(
new
Error
(
'请输入'
),
rule
.
field
);
}
}
};
callback
(
errors
);
},
handleStandardTableChange
=
(
pagination
,
filtersArg
,
sorter
)
=>
{
],
const
filters
=
Object
.
keys
(
filtersArg
).
reduce
((
obj
,
key
)
=>
{
})(
<
Input
disabled
=
{
isView
}
placeholder
=
"请输入"
/>
)}
const
newObj
=
{
...
obj
};
<
/FormItem
>
newObj
[
key
]
=
getValue
(
filtersArg
[
key
]);
);
return
newObj
;
}
else
if
(
isQuery
&&
date
.
indexOf
(
item
.
type
)
>
-
1
)
{
},
{});
return
(
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
const
params
=
{
{
form
.
getFieldDecorator
(
item
.
name
,
{
pageNo
:
pagination
.
current
,
initialValue
:
formData
==
null
?
null
:
moment
(
formData
[
item
.
name
]),
pageSize
:
pagination
.
pageSize
,
rules
:
[{
required
:
!
item
.
isNull
}],
...
filters
,
})(
query
:
JSON
.
stringify
(
this
.
state
.
formValues
),
<
RangePicker
};
disabled
=
{
isView
}
if
(
sorter
.
field
)
{
format
=
{
item
.
dataFormatStrWeb
==
null
?
'YYYY-MM-DD HH:mm:ss'
:
item
.
dataFormatStrWeb
}
params
.
sorter
=
`
${
sorter
.
field
}
_
${
sorter
.
order
}
`
;
style
=
{{
width
:
'95%'
}}
}
/>
,
this
.
getPage
(
params
);
)}
};
<
/FormItem
>
);
handleAdd
=
(
fields
,
isAdd
)
=>
{
}
else
if
(
date
.
indexOf
(
item
.
type
)
>
-
1
)
{
let
params
=
{
return
(
...
fields
,
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
};
{
form
.
getFieldDecorator
(
item
.
name
,
{
this
.
props
.
dispatch
({
initialValue
:
type
:
'formList/add'
,
formData
==
null
payload
:
{
?
moment
()
params
:
params
,
:
formData
[
item
.
name
]
objId
:
this
.
state
.
objId
,
?
moment
(
formData
[
item
.
name
])
isAdd
:
isAdd
,
:
null
,
isSelf
:
true
,
rules
:
[{
required
:
!
item
.
isNull
}],
isView
:
false
,
})(
},
<
DatePicker
callback
:
()
=>
{
format
=
{
item
.
dataFormatStrWeb
==
null
?
'YYYY-MM-DD HH:mm:ss'
:
item
.
dataFormatStrWeb
}
message
.
success
(
'操作成功'
);
style
=
{{
width
:
'100%'
}}
this
.
setState
({
placeholder
=
"请输入"
modalVisible
:
false
,
disabled
=
{
isView
}
});
/>
,
this
.
getPage
();
)}
},
<
/FormItem
>
});
);
};
}
else
{
return
(
handleModalVisible
=
()
=>
{
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
this
.
setState
({
{
form
.
getFieldDecorator
(
item
.
name
,
{
modalVisible
:
this
.
state
.
modalVisible
?
false
:
true
,
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
formData
:
{},
rules
:
[{
required
:
!
item
.
isNull
}],
isView
:
false
,
})(
<
Input
disabled
=
{
isView
}
style
=
{{
width
:
'70%'
}}
placeholder
=
"请输入"
/>
)}
});
<
/FormItem
>
};
);
}
add
=
()
=>
{
};
// if (this.state.formItem.length < 10) {
this
.
getOptions
();
renderForm
()
{
this
.
setState
({
const
{
form
,
get
,
json
}
=
this
.
props
;
modalVisible
:
true
,
formData
:
{},
const
{
querys
}
=
this
.
state
;
isAdd
:
true
,
if
(
querys
.
length
===
0
||
json
?.
isHiddenSearch
===
true
)
{
isView
:
false
,
return
''
;
});
}
// } else {
// router.push({
return
(
// pathname: '/admin/ddl/dataObj/formEdit',
<
Form
layout
=
"inline"
>
// state: { id: this.state.objId,isAdd: true,isView:false }
<
Row
style
=
{{
padding
:
'15px'
}}
>
// });
{
querys
.
map
((
item
)
=>
(
// }
<
Col
style
=
{{
height
:
58
}}
span
=
{
get
===
'mobile'
?
24
:
8
}
key
=
{
item
.
id
}
>
};
{
this
.
getItem
(
true
,
handleSelectRows
=
rows
=>
{
form
,
if
(
this
.
props
.
onSelectRow
)
{
{
this
.
props
.
onSelectRow
(
rows
);
...
item
,
}
isNull
:
true
,
this
.
setState
({
},
selectedRows
:
rows
,
true
,
});
)}
};
<
/Col
>
))}
batchDelete
=
e
=>
{
const
{
dispatch
}
=
this
.
props
;
<
Col
const
{
selectedRows
}
=
this
.
state
;
span
=
{
get
===
'mobile'
?
24
:
8
}
style
=
{{
if
(
!
selectedRows
)
return
;
textAlign
:
get
===
'mobile'
?
'right'
:
''
,
paddingRight
:
get
===
'mobile'
?
12
:
''
,
let
columns
=
this
.
state
.
formItem
;
}}
>
let
Keys
=
{};
<
span
className
=
{
styles
.
submitButtons
}
>
<
Button
type
=
"primary"
loading
=
{
this
.
state
.
loading
}
onClick
=
{
this
.
handleSearch
}
>
for
(
let
i
in
columns
)
{
查询
if
(
columns
[
i
].
isPrimaryKey
)
{
<
/Button
>
//key
<
Button
style
=
{{
marginLeft
:
8
}}
onClick
=
{
this
.
handleFormReset
}
>
Keys
[
columns
[
i
].
name
]
=
selectedRows
.
map
(
row
=>
row
[
columns
[
i
].
name
]).
join
(
','
);
重置
}
<
/Button
>
}
{
/* <a style={{ marginLeft: 8 }} onClick={this.toggleForm}>
this
.
props
.
dispatch
({
type
:
'formList/delete'
,
payload
:
{
keys
:
JSON
.
stringify
(
Keys
),
objId
:
this
.
state
.
objId
,
// isSelf: true,
},
callback
:
()
=>
{
this
.
setState
({
selectedRows
:
[],
});
this
.
getPage
();
},
});
};
goBack
=
()
=>
{
router
.
goBack
();
};
handleSearch
=
e
=>
{
e
.
preventDefault
();
const
{
dispatch
,
form
}
=
this
.
props
;
const
{
formValues
}
=
this
.
state
;
form
.
validateFields
((
err
,
fieldsValue
)
=>
{
if
(
err
)
return
;
const
formItem
=
this
.
state
.
formItem
;
formItem
.
map
((
item
,
index
)
=>
{
if
(
item
.
type
.
indexOf
(
'DATE'
)
>
-
1
)
{
for
(
let
d
in
fieldsValue
)
{
if
(
item
.
name
===
d
&&
fieldsValue
[
d
])
{
if
(
fieldsValue
[
d
]
!=
null
&&
fieldsValue
[
d
].
length
>
0
)
{
fieldsValue
[
d
]
=
[
fieldsValue
[
d
][
0
].
format
(
'YYYY-MM-DD HH:mm:ss'
),
fieldsValue
[
d
][
1
].
format
(
'YYYY-MM-DD HH:mm:ss'
),
];
}
else
{
fieldsValue
[
d
]
=
''
;
}
}
}
}
});
const
values
=
{
...
this
.
state
.
formValues
,
...
fieldsValue
,
};
this
.
setState
({
formValues
:
fieldsValue
,
});
const
params
=
{
pageNo
:
1
,
pageSize
:
this
.
props
.
pageSize
||
10
,
query
:
JSON
.
stringify
(
values
),
};
this
.
getPage
(
params
,
values
,
null
,
1
);
});
};
hanldeHighSearch
=
e
=>
{
const
pagination
=
this
.
props
.
formList
.
data
.
pagination
;
let
params
=
{
pageNo
:
pagination
.
current
?
pagination
.
current
:
1
,
pageSize
:
pagination
.
pageSize
?
pagination
.
pageSize
:
this
.
props
.
pageSize
||
10
,
...
e
,
};
this
.
setState
({
formValues
:
{
...
e
,
...
this
.
state
.
formValues
}
});
this
.
getPage
(
params
);
};
handleFormReset
=
()
=>
{
const
{
form
,
dispatch
}
=
this
.
props
;
form
.
resetFields
();
this
.
setState
(
{
formValues
:
{},
},
()
=>
{
this
.
getPage
();
},
);
};
getItem
=
(
isQuery
,
form
,
item
,
isAdd
,
formData
,
labelCol
,
wrapperCol
)
=>
{
const
{
groups
,
isView
}
=
this
.
state
;
//如果隐藏的话 就用隐藏域放置
if
(
item
.
isHidden
)
{
return
(
<
FormItem
className
=
{
styles
.
hidden
}
key
=
{
item
.
id
}
>
{
form
.
getFieldDecorator
(
item
.
name
,
{
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
})(
<
Input
type
=
"hidden"
placeholder
=
"请输入"
/>
)}
<
/FormItem
>
);
}
if
(
item
.
isPrimaryKey
)
{
if
(
isAdd
)
{
return
<><
/>
;
}
else
{
return
(
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
{
form
.
getFieldDecorator
(
item
.
name
,
{
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
rules
:
[{
required
:
!
item
.
isNull
}],
})(
<
Input
style
=
{{
width
:
'70%'
}}
readOnly
=
{
!
isAdd
}
placeholder
=
"请输入"
/>
)}
<
/FormItem
>
);
}
}
else
if
(
item
.
referenceObjId
!=
null
)
{
const
{
options
}
=
this
.
state
;
const
ops
=
options
[
item
.
id
+
''
]
||
[];
return
(
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
{
form
.
getFieldDecorator
(
item
.
name
,
{
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
rules
:
[{
required
:
!
item
.
isNull
}],
})(
<
Select
disabled
=
{
isView
}
style
=
{{
width
:
'70%'
}}
optionFilterProp
=
"children"
showSearch
filterOption
=
{(
input
,
option
)
=>
option
?
option
.
props
.
children
.
toLowerCase
().
indexOf
(
input
.
toLowerCase
())
>=
0
:
false
}
placeholder
=
"请选择"
allowClear
>
{
ops
.
map
(
r
=>
(
<
Option
value
=
{
r
[
item
.
referenceCodeName
]}
key
=
{
r
[
item
.
referenceCodeName
]}
>
{
r
[
item
.
referenceNameName
]}
<
/Option
>
))}
<
/Select>
,
)}
<
/FormItem
>
);
}
else
if
(
item
.
name
.
indexOf
(
'process_status'
)
>
-
1
)
{
return
(
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
{
form
.
getFieldDecorator
(
item
.
name
,
{
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
rules
:
[{
required
:
!
item
.
isNull
}],
})(
<
Select
disabled
=
{
isView
}
style
=
{{
width
:
'70%'
}}
placeholder
=
"请选择"
allowClear
>
<
Option
value
=
{
'0'
}
key
=
{
'0'
}
>
审核通过
<
/Option
>
<
Option
value
=
{
'2'
}
key
=
{
'2'
}
>
审核未通过
<
/Option
>
<
/Select>
,
)}
<
/FormItem
>
);
}
else
if
(
item
.
extendTypeId
&&
item
.
extendTypeId
.
indexOf
(
'file'
)
>
-
1
)
{
//特殊处理附件 如果是查询就 跳过
if
(
isQuery
)
return
;
return
(
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
{
form
.
getFieldDecorator
(
item
.
name
,
{
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
]
&&
this
.
isJSON
(
formData
[
item
.
name
])
?
JSON
.
parse
(
formData
[
item
.
name
])
:
null
,
rules
:
[{
required
:
!
item
.
isNull
}],
})(
<
UploadCom
disabled
=
{
isView
}
/>
)
}
<
/FormItem
>
);
}
else
if
(
isQuery
&&
item
.
isGroupQuery
!=
null
&&
item
.
isGroupQuery
)
{
//如果是查询 并且是组合查询
const
ops
=
groups
[
item
.
id
+
''
]
||
[];
return
(
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
{
form
.
getFieldDecorator
(
item
.
name
,
{
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
rules
:
[{
required
:
!
item
.
isNull
}],
})(
<
Select
disabled
=
{
isView
}
style
=
{{
width
:
200
}}
placeholder
=
"请选择"
optionFilterProp
=
"children"
showSearch
filterOption
=
{(
input
,
option
)
=>
option
?
option
.
props
.
children
.
toLowerCase
().
indexOf
(
input
.
toLowerCase
())
>=
0
:
false
}
allowClear
>
{
ops
.
map
(
r
=>
(
<
Option
value
=
{
r
.
value
}
key
=
{
r
.
value
}
>
{
r
.
value
}
<
/Option
>
))}
<
/Select>
,
)}
<
/FormItem
>
);
}
else
if
(
text
.
indexOf
(
item
.
type
)
>
-
1
)
{
return
(
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
{
form
.
getFieldDecorator
(
item
.
name
,
{
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
rules
:
[{
required
:
!
item
.
isNull
}],
})(
<
Input
disabled
=
{
isView
}
style
=
{{
width
:
'70%'
}}
placeholder
=
"请输入"
/>
)}
<
/FormItem
>
);
}
else
if
(
number
.
indexOf
(
item
.
type
)
>
-
1
)
{
return
(
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
{
form
.
getFieldDecorator
(
item
.
name
,
{
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
rules
:
[
{
required
:
!
item
.
isNull
},
(
rule
,
value
,
callback
)
=>
{
var
errors
=
[];
var
reg
=
new
RegExp
(
/
(
^-
?[
0-9
][
0-9
]
*
(
.
[
0-9
]
+
)?)
$/
);
if
(
value
!=
null
&&
value
!=
''
&&
!
reg
.
test
(
value
))
{
errors
.
push
(
new
Error
(
'请输入'
),
rule
.
field
);
}
callback
(
errors
);
},
],
})(
<
Input
disabled
=
{
isView
}
placeholder
=
"请输入"
/>
)}
<
/FormItem
>
);
}
else
if
(
isQuery
&&
date
.
indexOf
(
item
.
type
)
>
-
1
)
{
return
(
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
{
form
.
getFieldDecorator
(
item
.
name
,
{
initialValue
:
formData
==
null
?
null
:
moment
(
formData
[
item
.
name
]),
rules
:
[{
required
:
!
item
.
isNull
}],
})(
<
RangePicker
disabled
=
{
isView
}
format
=
{
item
.
dataFormatStrWeb
==
null
?
'YYYY-MM-DD HH:mm:ss'
:
item
.
dataFormatStrWeb
}
style
=
{{
width
:
'95%'
}}
/>
,
)}
<
/FormItem
>
);
}
else
if
(
date
.
indexOf
(
item
.
type
)
>
-
1
)
{
return
(
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
{
form
.
getFieldDecorator
(
item
.
name
,
{
initialValue
:
formData
==
null
?
moment
()
:
formData
[
item
.
name
]
?
moment
(
formData
[
item
.
name
])
:
null
,
rules
:
[{
required
:
!
item
.
isNull
}],
})(
<
DatePicker
format
=
{
item
.
dataFormatStrWeb
==
null
?
'YYYY-MM-DD HH:mm:ss'
:
item
.
dataFormatStrWeb
}
style
=
{{
width
:
'100%'
}}
placeholder
=
"请输入"
disabled
=
{
isView
}
/>
,
)}
<
/FormItem
>
);
}
else
{
return
(
<
FormItem
labelCol
=
{
labelCol
}
wrapperCol
=
{
wrapperCol
}
label
=
{
item
.
title
}
key
=
{
item
.
id
}
>
{
form
.
getFieldDecorator
(
item
.
name
,
{
initialValue
:
formData
==
null
?
''
:
formData
[
item
.
name
],
rules
:
[{
required
:
!
item
.
isNull
}],
})(
<
Input
disabled
=
{
isView
}
style
=
{{
width
:
'70%'
}}
placeholder
=
"请输入"
/>
)}
<
/FormItem
>
);
}
};
renderForm
()
{
const
{
form
,
get
,
json
}
=
this
.
props
;
const
{
querys
}
=
this
.
state
;
if
(
querys
.
length
===
0
||
json
?.
isHiddenSearch
===
true
)
{
return
''
;
}
return
(
<
Form
layout
=
"inline"
>
<
Row
style
=
{{
padding
:
'15px'
}}
>
{
querys
.
map
(
item
=>
(
<
Col
style
=
{{
height
:
58
}}
span
=
{
get
===
'mobile'
?
24
:
8
}
key
=
{
item
.
id
}
>
{
this
.
getItem
(
true
,
form
,
{
...
item
,
isNull
:
true
,
},
true
,
)}
<
/Col
>
))}
<
Col
span
=
{
get
===
'mobile'
?
24
:
8
}
style
=
{{
textAlign
:
get
===
'mobile'
?
'right'
:
''
,
paddingRight
:
get
===
'mobile'
?
12
:
''
,
}}
>
<
span
className
=
{
styles
.
submitButtons
}
>
<
Button
type
=
"primary"
loading
=
{
this
.
props
.
loading
}
onClick
=
{
this
.
handleSearch
}
>
查询
<
/Button
>
<
Button
style
=
{{
marginLeft
:
8
}}
onClick
=
{
this
.
handleFormReset
}
>
重置
<
/Button
>
{
/* <a style={{ marginLeft: 8 }} onClick={this.toggleForm}>
展开 <Icon type="down" />
展开 <Icon type="down" />
</a> */
}
</a> */
}
<
/span
>
<
/span
>
<
/Col
>
<
/Col
>
<
/Row
>
<
/Row
>
<
/Form
>
<
/Form
>
);
);
}
}
/**
/**
* @description: 表头筛选复选框 根据用户筛选将表头内容重置
* @description: 表头筛选复选框 根据用户筛选将表头内容重置
* @param { Array<string> } 用户选择参数
* @param { Array<string> } 用户选择参数
* @return:
* @return:
*/
*/
CheckboxChange
=
checkedValues
=>
{
CheckboxChange
=
(
checkedValues
)
=>
{
if
(
checkedValues
.
length
===
0
)
{
if
(
checkedValues
.
length
===
0
)
{
message
.
error
(
'至少选择一项'
);
message
.
error
(
'至少选择一项'
);
return
;
return
;
}
}
const
{
cacheColumns
}
=
this
.
state
;
const
{
cacheColumns
}
=
this
.
state
;
let
initList
=
[];
let
initList
=
[];
checkedValues
.
map
(
item
=>
{
checkedValues
.
map
((
item
)
=>
{
let
ary
=
cacheColumns
.
filter
(
data
=>
data
.
dataIndex
===
item
);
let
ary
=
cacheColumns
.
filter
((
data
)
=>
data
.
dataIndex
===
item
);
if
(
ary
.
length
!==
0
)
{
if
(
ary
.
length
!==
0
)
{
initList
.
push
(
ary
[
0
]);
initList
.
push
(
ary
[
0
]);
}
}
});
});
this
.
columns
=
initList
;
this
.
columns
=
initList
;
this
.
setState
({
this
.
setState
({
checkedList
:
checkedValues
,
checkedList
:
checkedValues
,
});
});
};
};
render
()
{
render
()
{
const
{
modalVisible
,
selectedRows
,
rights
,
data
,
isReady
}
=
this
.
state
;
const
{
modalVisible
,
selectedRows
,
rights
,
data
,
isReady
}
=
this
.
state
;
if
(
!
isReady
)
{
if
(
!
isReady
)
{
return
(
return
(
<
div
<
div
style
=
{{
style
=
{{
width
:
20
,
width
:
20
,
margin
:
'auto'
,
margin
:
'auto'
,
}}
}}
>
>
<
Spin
/>
<
Spin
/>
<
/div
>
<
/div
>
);
);
}
}
const
{
const
{
isFormCom
,
isFormCom
,
isSelect
,
isSelect
,
get
,
get
,
callback
,
callback
,
valueName
,
valueName
,
notShowBack
,
notShowBack
,
json
,
json
,
istableCom
,
// 是否有模板设计器调用
istableCom
,
// 是否有模板设计器调用
value
:
{
btns
},
value
:
{
btns
},
uuid
,
loading
,
}
=
this
.
props
;
uuid
,
const
{
showMobileDiv
,
isView
,
loading
}
=
this
.
state
;
}
=
this
.
props
;
const
{
showMobileDiv
,
isView
}
=
this
.
state
;
let
scrollWidth
=
document
.
documentElement
.
clientWidth
||
document
.
body
.
clientWidth
;
//可使宽度
let
isMobile
=
scrollWidth
<
1000
;
let
scrollWidth
=
document
.
documentElement
.
clientWidth
||
document
.
body
.
clientWidth
;
//可使宽度
if
(
document
.
querySelector
(
'#previewDiv'
))
{
let
isMobile
=
scrollWidth
<
1000
;
isMobile
=
true
;
if
(
document
.
querySelector
(
'#previewDiv'
))
{
}
isMobile
=
true
;
}
const
showDiv
=
countWidth
({
json
,
const
showDiv
=
countWidth
({
uuid
,
json
,
});
uuid
,
const
parentMethods
=
{
});
handleAdd
:
this
.
handleAdd
,
const
parentMethods
=
{
handleModalVisible
:
this
.
handleModalVisible
,
handleAdd
:
this
.
handleAdd
,
formData
:
this
.
state
.
formData
,
handleModalVisible
:
this
.
handleModalVisible
,
formItem
:
this
.
state
.
formItem
,
formData
:
this
.
state
.
formData
,
isAdd
:
this
.
state
.
isAdd
,
formItem
:
this
.
state
.
formItem
,
getItem
:
this
.
getItem
,
isAdd
:
this
.
state
.
isAdd
,
isView
:
isView
,
getItem
:
this
.
getItem
,
};
isView
:
isView
,
};
if
(
!
isSelect
&&
if
(
!
rights
.
includes
(
'edit'
)
&&
!
isSelect
&&
!
rights
.
includes
(
'delete'
)
&&
!
rights
.
includes
(
'edit'
)
&&
!
rights
.
includes
(
'view'
)
&&
!
rights
.
includes
(
'delete'
)
&&
!
rights
.
includes
(
'viewProcess'
)
!
rights
.
includes
(
'view'
)
&&
)
{
!
rights
.
includes
(
'viewProcess'
)
}
else
{
)
{
let
width
=
0
;
}
else
{
if
(
rights
&&
rights
.
includes
(
'viewProcess'
))
{
let
width
=
0
;
width
=
width
+
120
;
if
(
rights
&&
rights
.
includes
(
'viewProcess'
))
{
}
width
=
width
+
120
;
if
(
rights
&&
rights
.
includes
(
'view'
))
{
}
width
=
width
+
120
;
if
(
rights
&&
rights
.
includes
(
'view'
))
{
}
width
=
width
+
120
;
if
(
rights
&&
rights
.
includes
(
'edit'
))
{
}
width
=
width
+
70
;
if
(
rights
&&
rights
.
includes
(
'edit'
))
{
}
width
=
width
+
70
;
if
(
rights
&&
rights
.
includes
(
'delete'
))
{
}
width
=
width
+
70
;
if
(
rights
&&
rights
.
includes
(
'delete'
))
{
}
width
=
width
+
70
;
const
column
=
{
}
title
:
'操作'
,
const
column
=
{
fixed
:
'right'
,
title
:
'操作'
,
width
:
width
,
fixed
:
'right'
,
render
:
(
text
,
record
)
=>
{
width
:
width
,
let
Dom
=
[];
render
:
(
text
,
record
)
=>
{
if
(
isSelect
)
{
let
Dom
=
[];
if
(
this
.
state
.
selects
.
includes
(
record
[
valueName
]))
{
if
(
isSelect
)
{
Dom
.
push
(
<
span
>
已选择
<
/span>
)
;
if
(
this
.
state
.
selects
.
includes
(
record
[
valueName
]))
{
}
else
{
Dom
.
push
(
<
span
>
已选择
<
/span>
)
;
Dom
.
push
(
<
a
onClick
=
{
callback
.
bind
(
this
,
record
,
this
.
columns
)}
>
选择
<
/a>
)
;
}
else
{
}
Dom
.
push
(
<
a
onClick
=
{
callback
.
bind
(
this
,
record
,
this
.
columns
)}
>
选择
<
/a>
)
;
}
}
if
(
rights
)
{
}
if
(
rights
.
includes
(
'view'
))
{
if
(
rights
)
{
Dom
.
push
(
<
a
onClick
=
{
this
.
view
.
bind
(
this
,
record
)}
>
查看详情
<
/a>
)
;
if
(
rights
.
includes
(
'view'
))
{
}
Dom
.
push
(
<
a
onClick
=
{
this
.
view
.
bind
(
this
,
record
)}
>
查看详情
<
/a>
)
;
if
(
rights
.
includes
(
'edit'
))
{
}
Dom
.
push
(
<
a
onClick
=
{
this
.
modify
.
bind
(
this
,
record
)}
>
编辑
<
/a>
)
;
if
(
rights
.
includes
(
'edit'
))
{
}
Dom
.
push
(
<
a
onClick
=
{
this
.
modify
.
bind
(
this
,
record
)}
>
编辑
<
/a>
)
;
if
(
rights
.
includes
(
'viewProcess'
)
&&
record
.
process_biz_key
)
{
}
Dom
.
push
(
<
a
onClick
=
{
this
.
viewProcess
.
bind
(
this
,
record
)}
>
流程详情
<
/a>
)
;
if
(
rights
.
includes
(
'viewProcess'
)
&&
record
.
process_biz_key
)
{
}
Dom
.
push
(
<
a
onClick
=
{
this
.
viewProcess
.
bind
(
this
,
record
)}
>
流程详情
<
/a>
)
;
if
(
rights
.
includes
(
'delete'
))
{
}
Dom
.
push
(
if
(
rights
.
includes
(
'delete'
))
{
<
Popconfirm
Dom
.
push
(
title
=
"确定删除该数据?"
<
Popconfirm
onConfirm
=
{
this
.
delete
.
bind
(
this
,
record
)}
title
=
"确定删除该数据?"
okText
=
"确定"
onConfirm
=
{
this
.
delete
.
bind
(
this
,
record
)}
cancelText
=
"取消"
>
okText
=
"确定"
<
a
>
删除
<
/a
>
cancelText
=
"取消"
<
/Popconfirm>
,
>
);
<
a
>
删除
<
/a
>
}
<
/Popconfirm>
,
}
);
return
(
}
<
Fragment
>
}
<
div
return
(
style
=
{{
<
Fragment
>
textAlign
:
'center'
,
<
div
paddingLeft
:
'0px'
,
style
=
{{
paddingRight
:
'0px'
,
textAlign
:
'center'
,
}}
>
paddingLeft
:
'0px'
,
{
Dom
&&
paddingRight
:
'0px'
,
Dom
.
length
&&
}}
Dom
.
map
((
x
,
index
)
=>
(
>
<
Fragment
key
=
{
Math
.
random
()}
>
{
Dom
&&
{
x
}
Dom
.
length
&&
{
index
>
0
&&
index
!==
Dom
.
length
-
1
&&
<
Divider
type
=
"vertical"
/>
}
Dom
.
map
((
x
,
index
)
=>
(
<
/Fragment
>
<
Fragment
key
=
{
Math
.
random
()}
>
))}
{
x
}
<
/div
>
{
index
>
0
&&
index
!==
Dom
.
length
-
1
&&
<
Divider
type
=
"vertical"
/>
}
<
/Fragment
>
<
/Fragment
>
);
))}
},
<
/div
>
};
<
/Fragment
>
if
(
this
.
columns
.
length
>
0
&&
this
.
columns
[
this
.
columns
.
length
-
1
].
title
==
'操作'
)
{
);
this
.
columns
[
this
.
columns
.
length
-
1
]
=
column
;
},
}
else
{
};
this
.
columns
.
push
(
column
);
if
(
this
.
columns
.
length
>
0
&&
this
.
columns
[
this
.
columns
.
length
-
1
].
title
==
'操作'
)
{
}
this
.
columns
[
this
.
columns
.
length
-
1
]
=
column
;
}
}
else
{
// console.log(this.columns);
this
.
columns
.
push
(
column
);
if
(
this
.
columns
)
{
}
/**
}
* 计算总长度
// console.log(this.columns);
*/
if
(
this
.
columns
)
{
AllWidth
=
0
;
/**
this
.
columns
=
this
.
columns
.
map
((
item
,
index
)
=>
{
* 计算总长度
if
(
isEmpty
(
item
))
{
*/
return
item
;
AllWidth
=
0
;
}
this
.
columns
=
this
.
columns
.
map
((
item
,
index
)
=>
{
if
(
if
(
isEmpty
(
item
))
{
index
===
this
.
columns
.
length
-
1
&&
return
item
;
this
.
columns
[
this
.
columns
.
length
-
1
].
title
!==
'操作'
}
)
{
if
(
AllWidth
+=
150
;
index
===
this
.
columns
.
length
-
1
&&
item
.
width
=
''
;
this
.
columns
[
this
.
columns
.
length
-
1
].
title
!==
'操作'
return
item
;
)
{
}
AllWidth
+=
150
;
let
width
=
item
.
width
?
item
.
width
:
150
;
item
.
width
=
''
;
if
(
!
item
.
width
)
{
return
item
;
item
.
width
=
150
;
}
}
let
width
=
item
.
width
?
item
.
width
:
150
;
AllWidth
+=
width
;
if
(
!
item
.
width
)
{
return
item
;
item
.
width
=
150
;
});
}
if
(
AllWidth
+=
width
;
!
isEmpty
(
this
.
columns
[
this
.
columns
.
length
-
1
])
&&
return
item
;
this
.
columns
[
this
.
columns
.
length
-
1
].
title
===
'操作'
});
)
{
if
(
if
(
this
.
columns
[
this
.
columns
.
length
-
2
])
{
!
isEmpty
(
this
.
columns
[
this
.
columns
.
length
-
1
])
&&
this
.
columns
[
this
.
columns
.
length
-
2
].
width
=
''
;
this
.
columns
[
this
.
columns
.
length
-
1
].
title
===
'操作'
AllWidth
+=
100
;
)
{
}
if
(
this
.
columns
[
this
.
columns
.
length
-
2
])
{
}
this
.
columns
[
this
.
columns
.
length
-
2
].
width
=
''
;
}
AllWidth
+=
100
;
}
const
xxxx
=
(
}
<>
}
<
Card
bordered
=
{
false
}
const
xxxx
=
(
bodyStyle
=
{{
<>
padding
:
0
,
<
Card
width
:
json
.
twidth
?
json
.
twidth
:
'100%'
,
bordered
=
{
false
}
}}
>
bodyStyle
=
{{
<
div
className
=
{
styles
.
tableList
}
>
padding
:
0
,
<
div
className
=
{
styles
.
tableListForm
}
>
{
this
.
renderForm
()}
<
/div
>
width
:
json
.
twidth
?
json
.
twidth
:
'100%'
,
<
div
className
=
{
styles
.
tableListOperator
}
>
}}
{
notShowBack
?
(
>
notShowBack
<
div
className
=
{
styles
.
tableList
}
>
)
:
(
<
div
className
=
{
styles
.
tableListForm
}
>
{
this
.
renderForm
()}
<
/div
>
<
Button
icon
=
"rollback"
type
=
"primary"
onClick
=
{
this
.
goBack
}
>
<
div
className
=
{
styles
.
tableListOperator
}
>
返回
{
notShowBack
?
(
<
/Button
>
notShowBack
)}
)
:
(
<
Button
icon
=
"rollback"
type
=
"primary"
onClick
=
{
this
.
goBack
}
>
<
FormListButtons
返回
btns
=
{
btns
}
<
/Button
>
loading
=
{
loading
}
)}
importConfig
=
{(
this
.
props
.
value
&&
this
.
props
.
value
.
importConfig
)
||
[]}
exportConfig
=
{(
this
.
props
.
value
&&
this
.
props
.
value
.
exportConfig
)
||
[]}
<
FormListButtons
getPage
=
{
this
.
getPage
}
btns
=
{
btns
}
objId
=
{
this
.
state
.
objId
}
loading
=
{
loading
}
query
=
{
JSON
.
stringify
(
this
.
state
.
formValues
)}
importConfig
=
{(
this
.
props
.
value
&&
this
.
props
.
value
.
importConfig
)
||
[]}
custom
=
{
this
.
props
.
value
?
Base16Encode
(
JSON
.
stringify
(
this
.
props
.
value
))
:
null
}
exportConfig
=
{(
this
.
props
.
value
&&
this
.
props
.
value
.
exportConfig
)
||
[]}
sql
=
{
Base16Encode
(
this
.
props
.
sql
)}
getPage
=
{
this
.
getPage
}
/
>
objId
=
{
this
.
state
.
objId
}
{
rights
&&
!
rights
.
includes
(
'add'
)
?
(
query
=
{
JSON
.
stringify
(
this
.
state
.
formValues
)}
''
custom
=
{
this
.
props
.
value
?
Base16Encode
(
JSON
.
stringify
(
this
.
props
.
value
))
:
null
}
)
:
(
sql
=
{
Base16Encode
(
this
.
props
.
sql
)}
<
Button
icon
=
"plus"
type
=
"primary"
onClick
=
{
this
.
add
}
>
/
>
新建
{
rights
&&
!
rights
.
includes
(
'add'
)
?
(
<
/Button
>
''
)}
)
:
(
{
rights
&&
!
rights
.
includes
(
'searchData'
)
?
(
<
Button
icon
=
"plus"
type
=
"primary"
onClick
=
{
this
.
add
}
>
''
新建
)
:
(
<
/Button
>
<
SearchInfo
hanldeHighSearch
=
{
this
.
hanldeHighSearch
}
objId
=
{
this
.
state
.
objId
}
/
>
)}
)}
{
rights
&&
!
rights
.
includes
(
'searchData'
)
?
(
''
{
rights
&&
!
rights
.
includes
(
'importData'
)
?
(
)
:
(
''
<
SearchInfo
hanldeHighSearch
=
{
this
.
hanldeHighSearch
}
objId
=
{
this
.
state
.
objId
}
/
>
)
:
(
)}
<
ImportUtil
objId
=
{
this
.
state
.
objId
}
callback
=
{()
=>
this
.
getPage
()}
/
>
)}
{
rights
&&
!
rights
.
includes
(
'importData'
)
?
(
''
{
rights
&&
!
rights
.
includes
(
'exportCurrent'
)
?
(
)
:
(
''
<
ImportUtil
objId
=
{
this
.
state
.
objId
}
callback
=
{()
=>
this
.
getPage
()}
/
>
)
:
(
)}
<
ExportCurrentInfo
objId
=
{
this
.
state
.
objId
}
{
rights
&&
!
rights
.
includes
(
'exportCurrent'
)
?
(
query
=
{
JSON
.
stringify
(
this
.
state
.
formValues
)}
''
custom
=
{
this
.
props
.
value
?
Base16Encode
(
JSON
.
stringify
(
this
.
props
.
value
))
:
null
}
)
:
(
sql
=
{
Base16Encode
(
this
.
props
.
sql
)}
<
ExportCurrentInfo
/
>
objId
=
{
this
.
state
.
objId
}
)}
query
=
{
JSON
.
stringify
(
this
.
state
.
formValues
)}
custom
=
{
this
.
props
.
value
?
Base16Encode
(
JSON
.
stringify
(
this
.
props
.
value
))
:
null
}
{
rights
&&
!
rights
.
includes
(
'exportData'
)
?
(
sql
=
{
Base16Encode
(
this
.
props
.
sql
)}
''
/
>
)
:
(
)}
<
ExportInfo
objId
=
{
this
.
state
.
objId
}
/
>
)}
{
rights
&&
!
rights
.
includes
(
'exportData'
)
?
(
{
rights
&&
!
rights
.
includes
(
'statistics'
)
?
(
''
''
)
:
(
)
:
(
<
ExportInfo
objId
=
{
this
.
state
.
objId
}
/
>
<
StatisticsInfo
objId
=
{
this
.
state
.
objId
}
/
>
)}
)}
{
rights
&&
!
rights
.
includes
(
'statistics'
)
?
(
{
rights
&&
!
rights
.
includes
(
'delete'
)
''
?
''
)
:
(
:
selectedRows
.
length
>
0
&&
(
<
StatisticsInfo
objId
=
{
this
.
state
.
objId
}
/
>
<
span
>
)}
<
Popconfirm
{
rights
&&
!
rights
.
includes
(
'delete'
)
title
=
"确定删除该数据?"
?
''
onConfirm
=
{
this
.
batchDelete
}
:
selectedRows
.
length
>
0
&&
(
okText
=
"确定"
<
span
>
cancelText
=
"取消"
>
<
Popconfirm
<
Button
>
批量删除
<
/Button
>
title
=
"确定删除该数据?"
<
/Popconfirm
>
onConfirm
=
{
this
.
batchDelete
}
<
/span
>
okText
=
"确定"
)}
cancelText
=
"取消"
{
rights
&&
!
rights
.
includes
(
'headerFilter'
)
?
(
>
''
<
Button
>
批量删除
<
/Button
>
)
:
(
<
/Popconfirm
>
<
Popover
// 划入选择栏
<
/span
>
content
=
{
)}
<
div
{
rights
&&
!
rights
.
includes
(
'headerFilter'
)
?
(
style
=
{{
''
width
:
150
,
)
:
(
}}
>
<
Popover
// 划入选择栏
<
Checkbox
.
Group
content
=
{
onChange
=
{
this
.
CheckboxChange
}
<
div
value
=
{
this
.
state
.
checkedList
}
style
=
{{
options
=
{
this
.
checkList
}
width
:
150
,
/
>
}}
<
/div
>
>
}
<
Checkbox
.
Group
title
=
"请选择表头展示"
onChange
=
{
this
.
CheckboxChange
}
trigger
=
"click"
value
=
{
this
.
state
.
checkedList
}
placement
=
"bottom"
>
options
=
{
this
.
checkList
}
<
Button
// 表头筛选控件
/
>
className
=
{
styles
.
filter_btn
}
<
/div
>
icon
=
"filter"
>
}
表头筛选
title
=
"请选择表头展示"
<
/Button
>
trigger
=
"click"
<
/Popover
>
placement
=
"bottom"
)}
>
{
btns
&&
btns
.
after
&&
btns
.
after
.
length
>
0
<
Button
// 表头筛选控件
?
btns
.
after
.
map
((
r
)
=>
<
Button
{...
r
}
loading
=
{
loading
}
/>
)
className
=
{
styles
.
filter_btn
}
:
''
}
icon
=
"filter"
>
{
!!
this
.
props
.
otherProps
&&
表头筛选
!!
this
.
props
.
otherProps
.
showRightTips
&&
<
/Button
>
this
.
props
.
otherProps
.
RightTipsComponent
}
<
/Popover
>
<
/div
>
)}
{
!
istableCom
||
(
this
.
props
.
value
&&
this
.
props
.
value
.
columns
)
?
(
{
btns
&&
btns
.
after
&&
btns
.
after
.
length
>
0
<
div
?
btns
.
after
.
map
(
r
=>
<
Button
{...
r
}
loading
=
{
loading
}
/>
)
id
=
"mobelDiv"
:
''
}
className
=
{
'mobelDivClassName'
}
style
=
{{
{
!!
this
.
props
.
otherProps
&&
overflow
:
'hidden'
,
!!
this
.
props
.
otherProps
.
showRightTips
&&
width
:
isMobile
?
showMobileDiv
:
showDiv
,
this
.
props
.
otherProps
.
RightTipsComponent
}
height
:
'100%'
,
<
/div
>
}}
>
{
!
istableCom
||
(
this
.
props
.
value
&&
this
.
props
.
value
.
columns
)
?
(
{
showDiv
&&
(
<
div
<
StandardTable
id
=
"mobelDiv"
showHeader
=
{
this
.
props
.
showHeader
!=
null
?
this
.
props
.
showHeader
:
true
}
className
=
{
'mobelDivClassName'
}
noSelectRow
=
{
style
=
{{
this
.
props
.
onSelectRow
==
null
&&
overflow
:
'hidden'
,
(
rights
==
null
||
!
rights
.
includes
(
'delete'
))
width
:
isMobile
?
showMobileDiv
:
showDiv
,
}
height
:
'100%'
,
rowKey
=
{
this
.
props
.
value
?.
rowKey
?
this
.
props
.
value
.
rowKey
:
'row_id'
}
}}
data
=
{
data
}
>
isHiddenPage
=
{
this
.
props
.
isHiddenPage
!=
null
?
this
.
props
.
isHiddenPage
:
false
}
{
showDiv
&&
(
columns
=
{
this
.
columns
}
<
StandardTable
scroll
=
{{
x
:
AllWidth
}}
showHeader
=
{
this
.
props
.
showHeader
!=
null
?
this
.
props
.
showHeader
:
true
}
selectedRows
=
{
selectedRows
}
noSelectRow
=
{
onSelectRow
=
{
this
.
handleSelectRows
}
this
.
props
.
onSelectRow
==
null
&&
onChange
=
{
this
.
handleStandardTableChange
}
(
rights
==
null
||
!
rights
.
includes
(
'delete'
))
loading
=
{
loading
}
}
/
>
rowKey
=
{
this
.
props
.
value
?.
rowKey
?
this
.
props
.
value
.
rowKey
:
'row_id'
}
)}
data
=
{
data
}
<
/div
>
isHiddenPage
=
{
this
.
props
.
isHiddenPage
!=
null
?
this
.
props
.
isHiddenPage
:
false
}
)
:
(
columns
=
{
this
.
columns
}
<
div
scroll
=
{{
x
:
AllWidth
}}
id
=
"mobelDiv"
selectedRows
=
{
selectedRows
}
style
=
{{
onSelectRow
=
{
this
.
handleSelectRows
}
overflow
:
'hidden'
,
onChange
=
{
this
.
handleStandardTableChange
}
width
:
isMobile
?
showMobileDiv
:
showDiv
,
loading
=
{
this
.
props
.
loading
}
height
:
'100%'
,
/
>
}}
>
)}
<
div
>
<
/div
>
{
get
===
'mobile'
?
<
div
>
手机端
,
请使用浏览器将手机横屏查看
<
/div> : null
}
)
:
(
{
showDiv
&&
(
<
div
<
StandardTable
id
=
"mobelDiv"
showHeader
=
{
this
.
props
.
showHeader
!=
null
?
this
.
props
.
showHeader
:
true
}
style
=
{{
noSelectRow
=
{
overflow
:
'hidden'
,
this
.
props
.
onSelectRow
==
null
&&
width
:
isMobile
?
showMobileDiv
:
showDiv
,
(
rights
==
null
||
!
rights
.
includes
(
'delete'
))
height
:
'100%'
,
}
}}
rowKey
=
{
this
.
props
.
value
?.
rowKey
?
this
.
props
.
value
.
rowKey
:
'row_id'
}
>
data
=
{
data
}
<
div
>
columns
=
{
this
.
columns
}
{
get
===
'mobile'
?
<
div
>
手机端
,
请使用浏览器将手机横屏查看
<
/div> : null
}
scroll
=
{
this
.
props
.
value
&&
this
.
props
.
value
.
columns
?
{}
:
{
x
:
AllWidth
}}
{
showDiv
&&
(
selectedRows
=
{
selectedRows
}
<
StandardTable
isHiddenPage
=
{
showHeader
=
{
this
.
props
.
showHeader
!=
null
?
this
.
props
.
showHeader
:
true
}
this
.
props
.
isHiddenPage
!=
null
?
this
.
props
.
isHiddenPage
:
false
noSelectRow
=
{
}
this
.
props
.
onSelectRow
==
null
&&
onSelectRow
=
{
this
.
handleSelectRows
}
(
rights
==
null
||
!
rights
.
includes
(
'delete'
))
onChange
=
{
this
.
handleStandardTableChange
}
}
loading
=
{
loading
}
rowKey
=
{
this
.
props
.
value
?.
rowKey
?
this
.
props
.
value
.
rowKey
:
'row_id'
}
/
>
data
=
{
data
}
)}
columns
=
{
this
.
columns
}
<
/div
>
scroll
=
{
this
.
props
.
value
&&
this
.
props
.
value
.
columns
?
{}
:
{
x
:
AllWidth
}}
<
/div
>
selectedRows
=
{
selectedRows
}
)}
isHiddenPage
=
{
<
/div
>
this
.
props
.
isHiddenPage
!=
null
?
this
.
props
.
isHiddenPage
:
false
<
/Card
>
}
<
CreateForm
{...
parentMethods
}
modalVisible
=
{
modalVisible
}
/
>
onSelectRow
=
{
this
.
handleSelectRows
}
<
/
>
onChange
=
{
this
.
handleStandardTableChange
}
);
loading
=
{
this
.
props
.
loading
}
if
(
isFormCom
)
{
/
>
return
xxxx
;
)}
}
<
/div
>
return
<
PageHeaderWrapper
title
=
""
>
{
xxxx
}
<
/PageHeaderWrapper>
;
<
/div
>
}
)}
<
/div
>
<
/Card
>
<
CreateForm
{...
parentMethods
}
modalVisible
=
{
modalVisible
}
/
>
<
/
>
);
if
(
isFormCom
)
{
return
xxxx
;
}
return
<
PageHeaderWrapper
title
=
""
>
{
xxxx
}
<
/PageHeaderWrapper>
;
}
}
}
export
default
FormList
;
export
default
FormList
;
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
{
Steps
}
from
'antd'
;
import
ZdyTable
from
'@/webPublic/one_stop_public/Table'
;
import
ZdyTable
from
'@/webPublic/one_stop_public/Table'
;
const
{
Step
}
=
Steps
;
const
{
Step
}
=
Steps
;
export
default
function
StepDiy
(
props
)
{
const
Child
=
memo
((
props
)
=>
{
const
{
value
,
json
,
partFormProps
}
=
props
;
const
{
value
,
json
,
partFormProps
}
=
props
;
const
diyProps
=
useMemo
(()
=>
{
const
diyProps
=
useMemo
(
let
b
=
{};
()
=>
{
if
(
value
&&
typeof
value
===
'object'
)
{
let
b
=
{};
b
=
{
if
(
value
&&
typeof
value
===
'object'
)
{
...
value
,
b
=
{
};
...
value
,
}
};
if
(
json
.
otherProps
&&
typeof
json
.
otherProps
===
'string'
)
{
}
try
{
if
(
json
.
otherProps
&&
typeof
json
.
otherProps
===
'string'
)
{
let
a
=
new
Function
(
json
.
otherProps
)();
try
{
if
(
a
)
{
let
a
=
new
Function
(
json
.
otherProps
)();
return
{
if
(
a
)
{
...
a
,
return
{
...
b
,
...
a
,
};
...
b
,
}
};
return
b
;
}
}
catch
(
e
)
{
return
b
;
console
.
error
(
'Step组件 otherProps错误'
);
}
catch
(
e
)
{
}
console
.
error
(
'Step组件 otherProps错误'
);
}
else
{
}
return
b
;
}
else
{
}
return
b
;
},
[
json
.
otherProps
,
value
]);
}
},
[
json
.
otherProps
,
value
],
);
const
[
current
,
setCurrent
]
=
useState
(
diyProps
?.
StepsProps
?.
current
||
0
);
const
[
current
,
setCurrent
]
=
useState
(
diyProps
?.
StepsProps
?.
current
||
0
);
const
partFormKey
=
useMemo
(()
=>
{
const
partFormKey
=
useMemo
(
if
(
typeof
current
!==
'undefined'
)
{
()
=>
{
let
item
=
diyProps
.
Step
.
find
((
g
,
index
)
=>
{
if
(
typeof
current
!==
'undefined'
)
{
return
index
===
current
;
let
item
=
diyProps
.
Step
.
find
((
g
,
index
)
=>
{
});
return
index
===
current
;
if
(
item
)
{
});
return
item
.
formKey
;
if
(
item
)
{
}
return
item
.
formKey
;
}
}
return
undefined
;
}
},
[
current
]);
return
undefined
;
},
[
current
],
);
useEffect
(()
=>
{
useEffect
(
if
(
diyProps
?.
StepsProps
?.
current
!==
current
)
{
()
=>
{
setCurrent
(
diyProps
?.
StepsProps
?.
current
);
if
(
diyProps
?.
StepsProps
?.
current
!==
current
)
{
}
setCurrent
(
diyProps
?.
StepsProps
?.
current
);
},
[
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
(
{
Array
.
isArray
(
diyProps
.
Step
)
&&
<
div
style
=
{
diyProps
.
outSideDivStyle
}
>
diyProps
.
Step
.
filter
((
g
)
=>
!!
g
.
formKey
).
map
((
g
,
index
)
=>
{
<
Steps
{...
diyProps
.
StepsProps
}
current
=
{
current
}
>
return
(
{
Array
.
isArray
(
diyProps
.
Step
)
&&
<
div
key
=
{
g
.
formKey
}
style
=
{{
display
:
partFormKey
===
g
.
formKey
?
'block'
:
'none'
}}
>
diyProps
.
Step
.
map
(
g
=>
{
<
ZdyTable
return
<
Step
{...
g
}
key
=
{
g
.
title
}
/>
;
{...
partFormProps
}
})}
currentFormTitle
=
{
'Steps组件的子表单'
+
g
.
formKey
}
<
/Steps
>
key
=
{
g
.
formKey
}
{
Array
.
isArray
(
diyProps
.
Step
)
&&
currentFormKey
=
{
g
.
formKey
}
diyProps
.
Step
.
filter
(
g
=>
!!
g
.
formKey
).
map
((
g
,
index
)
=>
{
form
=
{
props
.
form
}
return
(
{...
partFormProps
?.
datas
[
g
.
formKey
]}
<
div
key
=
{
g
.
formKey
}
style
=
{{
display
:
partFormKey
===
g
.
formKey
?
'block'
:
'none'
}}
>
/
>
<
ZdyTable
<
/div
>
{...
partFormProps
}
);
currentFormTitle
=
{
'Steps组件的子表单'
+
g
.
formKey
}
})}
key
=
{
g
.
formKey
}
<
/div
>
currentFormKey
=
{
g
.
formKey
}
);
{...
partFormProps
?.
datas
[
g
.
formKey
]}
});
/
>
<
/div
>
export
default
function
StepDiy
(
props
){
);
const
{
value
,
json
,
partFormProps
,
form
}
=
props
;
})}
const
js
=
useRef
();
<
/div
>
useEffect
(()
=>
{
);
js
.
current
=
json
;
},
[]);
if
(
!
js
.
current
)
{
return
null
;
}
return
<
Child
json
=
{
js
.
current
}
value
=
{
value
}
partFormProps
=
{
partFormProps
}
form
=
{
form
}
/>
;
}
}
one_stop_public/tableCompon/index.jsx
浏览文件 @
7f49d813
...
@@ -90,8 +90,6 @@ const { MonthPicker, WeekPicker } = DatePicker;
...
@@ -90,8 +90,6 @@ const { MonthPicker, WeekPicker } = DatePicker;
*/
*/
const
{
TextArea
}
=
Input
;
const
{
TextArea
}
=
Input
;
const
{
Option
}
=
Select
;
const
{
Option
}
=
Select
;
const
{
RangePicker
}
=
DatePicker
;
const
{
TabPane
}
=
Tabs
;
const
giveRender
=
(
column
=
{})
=>
{
const
giveRender
=
(
column
=
{})
=>
{
if
(
!
column
?.
render
)
{
if
(
!
column
?.
render
)
{
...
@@ -1648,16 +1646,9 @@ export default class TableCom extends Component {
...
@@ -1648,16 +1646,9 @@ export default class TableCom extends Component {
init
:
init
,
init
:
init
,
formCode
:
this
.
props
.
formCode
,
formCode
:
this
.
props
.
formCode
,
formId
:
this
.
props
.
formId
,
formId
:
this
.
props
.
formId
,
form
:
this
.
props
.
form
,
mapData
:
mapData
,
mapData
:
mapData
,
sqlData
:
sqlData
,
sqlData
:
sqlData
,
defaultValues
:
defaultValues
,
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 {
...
@@ -1682,6 +1673,7 @@ export default class TableCom extends Component {
key=
{
fk
}
key=
{
fk
}
currentFormKey=
{
fk
}
currentFormKey=
{
fk
}
{
...
datas
[
fk
]}
{
...
datas
[
fk
]}
form=
{
this
.
props
.
form
}
/>
/>
</>
</>
);
);
...
@@ -3671,6 +3663,7 @@ ${obj[dataColumn.base52]}
...
@@ -3671,6 +3663,7 @@ ${obj[dataColumn.base52]}
disabled=
{
disabled
}
disabled=
{
disabled
}
uuid=
{
uuid
}
uuid=
{
uuid
}
partFormProps=
{
this
.
partFormProps
}
partFormProps=
{
this
.
partFormProps
}
form=
{
this
.
props
.
form
}
/>,
/>,
);
);
break
;
break
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论