Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
3a3a1579
提交
3a3a1579
authored
6月 13, 2022
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
27539 高职升本科管理--详情页面优化
上级
d208debd
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
134 行增加
和
59 行删除
+134
-59
index.jsx
one_stop_public/tableCompon/index.jsx
+134
-59
没有找到文件。
one_stop_public/tableCompon/index.jsx
浏览文件 @
3a3a1579
...
...
@@ -70,7 +70,11 @@ import PictureSignature, {
import
WangEditor
from
'@/webPublic/zyd_public/WangEditor/OnstopWang'
;
import
{
noPrefixRequest
,
uaaRequest
}
from
'@/webPublic/one_stop_public/utils/request'
;
import
RangePickerDiy
,
{
getMomentArr
}
from
'@/webPublic/one_stop_public/tableCompon/Split_Index/RangePickerDiy'
;
const
{
MonthPicker
,
WeekPicker
}
=
DatePicker
;
const
{
MonthPicker
,
WeekPicker
}
=
DatePicker
;
/**
* 日期组件antd3.x有bug 详情见禅道 27152 毕业跟踪调查管理 毕业时间改为年级筛选
*/
...
...
@@ -92,9 +96,12 @@ const giveRender = (column = {}) => {
};
@
connect
(({
DataColumn
,
SqlManageEntity
,
formList
,
loading
})
=>
({
@
connect
(({
DataColumn
,
SqlManageEntity
,
formList
,
loading
})
=>
({
DataColumn
,
SqlManageEntity
,
formList
,
...
...
@@ -199,7 +206,12 @@ export default class tableCom extends Component {
};
getColumnSearchProps
=
(
dataIndex
,
title
)
=>
({
filterDropdown
:
({
setSelectedKeys
,
selectedKeys
,
confirm
,
clearFilters
})
=>
(
filterDropdown
:
({
setSelectedKeys
,
selectedKeys
,
confirm
,
clearFilters
})
=>
(
<
div
style=
{
{
padding
:
8
}
}
>
<
Input
ref=
{
(
node
)
=>
{
...
...
@@ -237,7 +249,7 @@ export default class tableCom extends Component {
</
div
>
),
filterIcon
:
(
filtered
)
=>
(
<
Icon
type=
"search"
style=
{
{
color
:
filtered
?
'#1890ff'
:
'red'
}
}
/>
<
Icon
type=
"search"
style=
{
{
color
:
filtered
?
'#1890ff'
:
'red'
}
}
/>
),
onFilter
:
(
value
,
record
)
=>
record
[
dataIndex
]
...
...
@@ -286,7 +298,11 @@ export default class tableCom extends Component {
};
componentWillReceiveProps
(
props
)
{
const
{
json
,
mapData
,
obj
}
=
props
;
const
{
json
,
mapData
,
obj
}
=
props
;
if
(
json
==
null
||
this
.
props
.
safe
)
{
return
;
}
...
...
@@ -404,7 +420,10 @@ export default class tableCom extends Component {
allValues
=
JSON
.
stringify
(
allValues
);
if
(
json
.
comName
===
'TableSelect'
)
{
const
{
dispatch
}
=
this
.
props
;
const
{
sqlKey
,
optionType
}
=
json
;
const
{
sqlKey
,
optionType
}
=
json
;
if
(
optionType
===
'sql'
)
{
dispatch
({
type
:
'SqlManageEntity/find'
,
...
...
@@ -426,7 +445,8 @@ export default class tableCom extends Component {
if
(
[
'DATE'
,
'DATETIME'
,
'TIME'
,
'TIMESTAMP'
,
'YEAR'
].
includes
(
datas
[
i
].
type
)
)
{
column
.
render
=
(
val
)
=>
moment
(
val
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
column
.
render
=
(
val
)
=>
moment
(
val
)
.
format
(
'YYYY-MM-DD HH:mm:ss'
);
}
column
=
giveRender
(
column
);
...
...
@@ -463,7 +483,8 @@ export default class tableCom extends Component {
break
;
}
column
.
render
=
(
val
)
=>
moment
(
parseInt
(
val
)).
format
(
ff
);
column
.
render
=
(
val
)
=>
moment
(
parseInt
(
val
))
.
format
(
ff
);
}
if
(
cll
[
k
].
isQuery
)
{
column
=
{
...
...
@@ -510,7 +531,8 @@ export default class tableCom extends Component {
column
.
title
=
datas
[
i
].
title
;
column
.
dataIndex
=
datas
[
i
].
name
;
if
([
'DATE'
,
'DATETIME'
,
'TIME'
,
'TIMESTAMP'
,
'YEAR'
].
includes
(
datas
[
i
].
type
))
{
column
.
render
=
(
val
)
=>
moment
(
val
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
column
.
render
=
(
val
)
=>
moment
(
val
)
.
format
(
'YYYY-MM-DD HH:mm:ss'
);
}
column
=
giveRender
(
column
);
columns
.
push
(
column
);
...
...
@@ -760,7 +782,8 @@ export default class tableCom extends Component {
}
// const newData = giveFilePostDataInfoForTrue(params,url);
noPrefixRequest
(
url
,
params
).
then
((
data
)
=>
{
noPrefixRequest
(
url
,
params
)
.
then
((
data
)
=>
{
// if (!data || !Array.isArray(data)) {
// data = [];
// }
...
...
@@ -951,7 +974,8 @@ export default class tableCom extends Component {
if
(
getToken
()
!=
null
)
{
pp
.
token
=
getToken
();
}
uaaRequest
(
url
,
pp
).
then
((
data
)
=>
{
uaaRequest
(
url
,
pp
)
.
then
((
data
)
=>
{
const
{
sqlKeys
}
=
this
.
state
;
sqlKeys
[
sqlKey
].
data
=
data
;
this
.
setState
({
sqlKeys
});
...
...
@@ -1154,7 +1178,12 @@ export default class tableCom extends Component {
};
componentDidMount
()
{
const
{
json
,
mapData
,
obj
,
init
}
=
this
.
props
;
const
{
json
,
mapData
,
obj
,
init
}
=
this
.
props
;
if
(
json
==
null
)
{
return
;
}
...
...
@@ -1406,7 +1435,10 @@ export default class tableCom extends Component {
}
};
getColumn
=
(
key
)
=>
{
let
{
mapData
,
json
}
=
this
.
props
;
let
{
mapData
,
json
}
=
this
.
props
;
const
columnIds
=
json
.
columnIds
;
...
...
@@ -1449,8 +1481,20 @@ export default class tableCom extends Component {
getCellValue
,
}
=
this
.
props
;
// console.log(this.props.datas);
const
{
options
,
labels
,
selectDis
,
modalCode
,
modalTitle
,
modalInit
,
modalProps
}
=
this
.
state
;
const
{
getFieldDecorator
,
getFieldError
,
getFieldProps
}
=
this
.
props
.
form
;
const
{
options
,
labels
,
selectDis
,
modalCode
,
modalTitle
,
modalInit
,
modalProps
}
=
this
.
state
;
const
{
getFieldDecorator
,
getFieldError
,
getFieldProps
}
=
this
.
props
.
form
;
const
disabled
=
json
!=
null
?
json
.
disabled
:
false
;
const
permRank
=
json
!=
null
?
(
json
.
permRank
!=
null
?
json
.
permRank
:
0
)
:
0
;
if
(
json
?.
label
===
'账号'
)
{
...
...
@@ -1473,7 +1517,7 @@ export default class tableCom extends Component {
)
{
return
<></>;
}
return
<
QRCode
{
...
this
.
state
.
option
}
key=
{
this
.
props
.
uuid
}
/>;
return
<
QRCode
{
...
this
.
state
.
option
}
key=
{
this
.
props
.
uuid
}
/>;
}
if
(
json
.
comName
==
'Echart'
)
{
return
(
...
...
@@ -1489,7 +1533,7 @@ export default class tableCom extends Component {
);
}
if
(
json
.
comName
==
'Graph'
)
{
return
<
Neo4jD3Com
key=
{
this
.
props
.
uuid
}
json=
{
json
}
option=
{
this
.
state
.
option
||
[]
}
/>;
return
<
Neo4jD3Com
key=
{
this
.
props
.
uuid
}
json=
{
json
}
option=
{
this
.
state
.
option
||
[]
}
/>;
}
if
(
json
.
comName
==
'PartForm'
)
{
...
...
@@ -1504,7 +1548,7 @@ export default class tableCom extends Component {
<>
{
this
.
props
.
form
.
getFieldDecorator
(
this
.
props
.
uuid
,
{
initialValue
:
fk
,
})(<
Input
type=
"hidden"
/>)
}
})(<
Input
type=
"hidden"
/>)
}
{
' '
}
<
ZdyTable
taskId=
{
this
.
props
.
taskId
}
...
...
@@ -1580,7 +1624,7 @@ export default class tableCom extends Component {
<>
{
this
.
props
.
form
.
getFieldDecorator
(
uid
,
{
initialValue
:
obj
[
this
.
props
.
uuid
]
||
json
.
initialValue
,
})(<
Input
type=
"hidden"
/>)
}
})(<
Input
type=
"hidden"
/>)
}
<
span
style=
{
{
fontWeight
:
get
===
'mobile'
?
'bold'
:
''
,
...
...
@@ -1596,7 +1640,7 @@ export default class tableCom extends Component {
<>
{
this
.
props
.
form
.
getFieldDecorator
(
uid
,
{
initialValue
:
this
.
props
.
form
.
getFieldsValue
()[
uid
]
||
json
.
initialValue
,
})(<
Input
type=
"hidden"
/>)
}
})(<
Input
type=
"hidden"
/>)
}
<
span
style=
{
{
fontWeight
:
get
===
'mobile'
?
'bold'
:
''
,
...
...
@@ -1644,7 +1688,7 @@ export default class tableCom extends Component {
cm
=
(
<
span
style=
{
{
paddingRight
:
get
===
'mobile'
?
8
:
''
}
}
>
{
value
}
{
get
===
'mobile'
?
<
br
/>
:
''
}
{
get
===
'mobile'
?
<
br
/>
:
''
}
</
span
>
);
break
;
...
...
@@ -1652,7 +1696,7 @@ export default class tableCom extends Component {
cm
=
(
<
span
>
{
value
}
{
get
===
'mobile'
?
<
br
/>
:
''
}
{
get
===
'mobile'
?
<
br
/>
:
''
}
</
span
>
);
...
...
@@ -1670,7 +1714,7 @@ export default class tableCom extends Component {
cm
=
(
<
span
style=
{
{
paddingRight
:
get
==
'mobile'
?
8
:
''
}
}
>
{
value
}
{
get
===
'mobile'
?
<
br
/>
:
''
}
{
get
===
'mobile'
?
<
br
/>
:
''
}
</
span
>
);
...
...
@@ -1679,7 +1723,7 @@ export default class tableCom extends Component {
cm
=
(
<
span
>
{
value
}
{
get
===
'mobile'
?
<
br
/>
:
''
}
{
get
===
'mobile'
?
<
br
/>
:
''
}
</
span
>
);
...
...
@@ -1687,8 +1731,9 @@ export default class tableCom extends Component {
case
'DatePicker'
:
cm
=
value
?
(
<
span
>
{
moment
(
parseInt
(
value
)).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
{
get
===
'mobile'
?
<
br
/>
:
''
}
{
moment
(
parseInt
(
value
))
.
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
{
get
===
'mobile'
?
<
br
/>
:
''
}
</
span
>
)
:
(
''
...
...
@@ -1710,7 +1755,7 @@ export default class tableCom extends Component {
);
})
}
</
ul
>
{
get
===
'mobile'
?
<
br
/>
:
''
}
{
get
===
'mobile'
?
<
br
/>
:
''
}
</>
);
...
...
@@ -1730,7 +1775,7 @@ export default class tableCom extends Component {
);
})
}
</
ul
>
{
get
===
'mobile'
?
<
br
/>
:
''
}
{
get
===
'mobile'
?
<
br
/>
:
''
}
</>
);
...
...
@@ -1755,7 +1800,7 @@ export default class tableCom extends Component {
height
:
json
.
height
,
}
}
/>
{
get
===
'mobile'
?
<
br
/>
:
''
}
{
get
===
'mobile'
?
<
br
/>
:
''
}
</>
);
}
...
...
@@ -1781,7 +1826,7 @@ export default class tableCom extends Component {
height
:
json
.
height
,
}
}
/>
{
get
===
'mobile'
?
<
br
/>
:
''
}
{
get
===
'mobile'
?
<
br
/>
:
''
}
</>
);
}
...
...
@@ -1814,7 +1859,7 @@ export default class tableCom extends Component {
</
MobileItem
>
{
this
.
props
.
form
.
getFieldDecorator
(
`defaultValues.${formKey}.${key}`
,
{
initialValue
:
value
,
})(<
Input
type=
"hidden"
/>)
}
})(<
Input
type=
"hidden"
/>)
}
</>
);
}
...
...
@@ -1827,7 +1872,7 @@ export default class tableCom extends Component {
{
cm
}
{
this
.
props
.
form
.
getFieldDecorator
(
`defaultValues.${formKey}.${key}`
,
{
initialValue
:
value
,
})(<
Input
type=
"hidden"
/>)
}
})(<
Input
type=
"hidden"
/>)
}
</>
);
}
...
...
@@ -1914,7 +1959,7 @@ export default class tableCom extends Component {
</
Form
.
Item
>
{
this
.
props
.
form
.
getFieldDecorator
(
`defaultValues.${formKey}.${key}`
,
{
initialValue
:
value
,
})(<
Input
type=
"hidden"
/>)
}
})(<
Input
type=
"hidden"
/>)
}
</>
);
}
...
...
@@ -1927,7 +1972,7 @@ export default class tableCom extends Component {
{
cm
}
{
this
.
props
.
form
.
getFieldDecorator
(
`defaultValues.${formKey}.${key}`
,
{
initialValue
:
value
,
})(<
Input
type=
"hidden"
/>)
}
})(<
Input
type=
"hidden"
/>)
}
</>
);
}
...
...
@@ -2017,7 +2062,7 @@ export default class tableCom extends Component {
case
'WangEditor'
:
let
textV
=
obj
[
dataColumn
.
base52
];
if
(
!
textV
||
textV
===
'null'
)
{
return
<
div
/>;
return
<
div
/>;
}
cm
=
(
<
div
...
...
@@ -2152,11 +2197,13 @@ ${obj[dataColumn.base52]}
}
else
{
cm
=
(
<
span
>
{
moment
(
parseInt
(
obj
[
begin
.
base52
])).
format
(
{
moment
(
parseInt
(
obj
[
begin
.
base52
]))
.
format
(
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
,
)
}{
' '
}
至
{
' '
}
{
moment
(
parseInt
(
obj
[
end
.
base52
])).
format
(
{
moment
(
parseInt
(
obj
[
end
.
base52
]))
.
format
(
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
,
)
}
</
span
>
...
...
@@ -2173,14 +2220,16 @@ ${obj[dataColumn.base52]}
if
(
vTime
&&
typeof
vTime
===
'string'
&&
vTime
.
indexOf
(
'-'
)
<=
-
1
)
{
cm
=
(
<
span
>
{
moment
(
parseInt
(
vTime
)).
format
(
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
)
}
{
moment
(
parseInt
(
vTime
))
.
format
(
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
)
}
</
span
>
);
}
else
{
cm
=
(
<
span
>
{
vTime
?
moment
(
+
new
Date
(
vTime
)).
format
(
?
moment
(
+
new
Date
(
vTime
))
.
format
(
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
,
)
:
''
}
...
...
@@ -2707,6 +2756,25 @@ ${obj[dataColumn.base52]}
}
break
;
case
'Input'
:
if
(
json
?.
otherProps
)
{
otherProps
=
json
?.
otherProps
;
try
{
// mode = multiple 就支持下拉多选了
otherProps
=
new
Function
(
otherProps
)();
}
catch
(
e
)
{
otherProps
=
{};
}
}
const
{
disabledInputStyle
=
{}
}
=
otherProps
;
let
inputStyle
=
{
width
:
json
.
width
,
};
if
(
disabled
){
inputStyle
=
{
...
inputStyle
,
...
disabledInputStyle
,
}
}
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
initialValue
:
initValue
,
rules
:
...
...
@@ -2721,10 +2789,11 @@ ${obj[dataColumn.base52]}
})(
<
Input
disabled=
{
disabled
}
style=
{
{
width
:
json
.
width
}
}
style=
{
inputStyle
}
placeholder=
{
json
.
placeholder
}
/>,
/>
);
if
(
get
===
'mobile'
)
{
cm
=
<
div
>
{
cm
}
</
div
>;
if
(
...
...
@@ -2747,7 +2816,7 @@ ${obj[dataColumn.base52]}
case
'InputHidden'
:
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
initialValue
:
initValue
,
})(<
Input
type=
"hidden"
/>);
})(<
Input
type=
"hidden"
/>);
break
;
case
'InputNumber'
:
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
...
...
@@ -2806,7 +2875,7 @@ ${obj[dataColumn.base52]}
message
:
'请选择'
+
dataColumn
.
title
,
},
],
})(<
Radio
.
Group
options=
{
options
}
disabled=
{
disabled
}
/>);
})(<
Radio
.
Group
options=
{
options
}
disabled=
{
disabled
}
/>);
if
(
get
==
'mobile'
)
{
cm
=
<
div
>
{
cm
}
</
div
>;
if
(
...
...
@@ -2845,7 +2914,7 @@ ${obj[dataColumn.base52]}
message
:
'请选择'
+
dataColumn
.
title
,
},
],
})(<
Checkbox
.
Group
options=
{
options
}
disabled=
{
disabled
}
/>)
}
})(<
Checkbox
.
Group
options=
{
options
}
disabled=
{
disabled
}
/>)
}
</
Flex
>
);
...
...
@@ -2942,7 +3011,8 @@ ${obj[dataColumn.base52]}
}
}
filterOption=
{
(
input
,
option
)
=>
option
?
option
.
props
.
children
.
toLowerCase
().
indexOf
(
input
.
toLowerCase
())
>=
0
?
option
.
props
.
children
.
toLowerCase
()
.
indexOf
(
input
.
toLowerCase
())
>=
0
:
false
}
{
...
otherProps
}
>
...
...
@@ -2989,7 +3059,8 @@ ${obj[dataColumn.base52]}
}
const
filterF
=
function
filter
(
inputValue
,
path
)
{
return
path
.
some
(
(
option
)
=>
option
?.
label
?.
toLowerCase
()?.
indexOf
(
inputValue
.
toLowerCase
())
>
-
1
,
(
option
)
=>
option
?.
label
?.
toLowerCase
()
?.
indexOf
(
inputValue
.
toLowerCase
())
>
-
1
,
);
};
// if(this.props.uuid === 'id_32691685234912400529714267d34dc585a2'){
...
...
@@ -3043,7 +3114,7 @@ ${obj[dataColumn.base52]}
message
:
'请选择'
+
dataColumn
.
title
,
},
],
})(<
MobileCascader
options=
{
options
}
label=
{
title
}
disabled=
{
disabled
}
json=
{
json
}
/>);
})(<
MobileCascader
options=
{
options
}
label=
{
title
}
disabled=
{
disabled
}
json=
{
json
}
/>);
}
if
(
...
...
@@ -3132,16 +3203,18 @@ ${obj[dataColumn.base52]}
initValue
,
init
,
obj
,
})
})
;
if
(
!
isEdit
)
{
cm
=
(
<
span
>
{
moment
(
parseInt
(
obj
[
begin
.
base52
])).
format
(
{
moment
(
parseInt
(
obj
[
begin
.
base52
]))
.
format
(
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
,
)
}{
' '
}
至
{
' '
}
{
moment
(
parseInt
(
obj
[
end
.
base52
])).
format
(
{
moment
(
parseInt
(
obj
[
end
.
base52
]))
.
format
(
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
,
)
}
</
span
>
...
...
@@ -3259,7 +3332,8 @@ ${obj[dataColumn.base52]}
}
});
}
:
()
=>
{}
:
()
=>
{
}
}
format=
{
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
}
{
...
otherProps
}
...
...
@@ -3408,7 +3482,7 @@ ${obj[dataColumn.base52]}
message
:
'请输入'
,
},
],
})(<
DraftEditorCom
placeholder=
{
json
.
placeholder
}
disabled=
{
json
.
disabled
}
/>);
})(<
DraftEditorCom
placeholder=
{
json
.
placeholder
}
disabled=
{
json
.
disabled
}
/>);
if
(
get
===
'mobile'
&&
((
json
.
isMobileLabel
!=
null
&&
json
.
isMobileLabel
)
||
...
...
@@ -3439,7 +3513,7 @@ ${obj[dataColumn.base52]}
message
:
'请输入'
+
title
,
},
],
})(<
CronEditor
style=
{
{
width
:
600
}
}
/>);
})(<
CronEditor
style=
{
{
width
:
600
}
}
/>);
break
;
case
'LocationCom'
:
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
...
...
@@ -3455,7 +3529,8 @@ ${obj[dataColumn.base52]}
let
errors
=
[];
console
.
log
(
valueThis
);
if
(
(
!
valueThis
||
!
JSON
.
stringify
(
valueThis
).
includes
(
'address'
))
&&
(
!
valueThis
||
!
JSON
.
stringify
(
valueThis
)
.
includes
(
'address'
))
&&
required
)
{
errors
.
push
(
new
Error
(
'请获取定位信息'
,
rule
.
field
));
...
...
@@ -3552,7 +3627,7 @@ ${obj[dataColumn.base52]}
message
:
'请上传图片'
,
},
],
})(<
ImgUploadCom
json=
{
json
}
disabled=
{
disabled
}
/>);
})(<
ImgUploadCom
json=
{
json
}
disabled=
{
disabled
}
/>);
if
(
get
===
'mobile'
&&
((
json
.
isMobileLabel
!=
null
&&
json
.
isMobileLabel
)
||
...
...
@@ -3582,7 +3657,7 @@ ${obj[dataColumn.base52]}
message
:
'请上传视频'
,
},
],
})(<
VideoUploadCom
json=
{
json
}
disabled=
{
disabled
}
/>);
})(<
VideoUploadCom
json=
{
json
}
disabled=
{
disabled
}
/>);
if
(
get
===
'mobile'
&&
((
json
.
isMobileLabel
!=
null
&&
json
.
isMobileLabel
)
||
...
...
@@ -3927,7 +4002,7 @@ ${obj[dataColumn.base52]}
</
Form
.
Item
>
)
:
(
<
Form
.
Item
>
<
ShowComName
json=
{
json
}
/>
<
ShowComName
json=
{
json
}
/>
{
cm
}
</
Form
.
Item
>
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论