Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
118fa6c0
提交
118fa6c0
authored
4月 27, 2022
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
定位组件修改
上级
f977297f
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
64 行增加
和
120 行删除
+64
-120
index.jsx
one_stop_public/location/index.jsx
+6
-22
index.jsx
one_stop_public/tableCompon/index.jsx
+58
-98
没有找到文件。
one_stop_public/location/index.jsx
浏览文件 @
118fa6c0
...
@@ -27,7 +27,7 @@ export default class location extends Component {
...
@@ -27,7 +27,7 @@ export default class location extends Component {
componentDidMount
=
()
=>
{};
componentDidMount
=
()
=>
{};
//在组件从 DOM 中移除的时候立刻被调用。
//在组件从 DOM 中移除的时候立刻被调用。
componentWillUnmount
=
()
=>
{};
componentWillUnmount
=
()
=>
{};
getLocationMsg
=
(
locationMsg
)
=>
{
getLocationMsg
=
locationMsg
=>
{
console
.
log
(
locationMsg
);
console
.
log
(
locationMsg
);
//如果不为空的话显示提示
//如果不为空的话显示提示
this
.
setState
({
loading
:
true
},
()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
...
@@ -75,7 +75,7 @@ export default class location extends Component {
...
@@ -75,7 +75,7 @@ export default class location extends Component {
}
}
};
};
// 点击确定提交定位
// 点击确定提交定位
confirm
=
(
e
)
=>
{
confirm
=
e
=>
{
console
.
log
(
e
);
console
.
log
(
e
);
if
(
this
.
state
.
btn
)
{
if
(
this
.
state
.
btn
)
{
if
(
this
.
props
.
get
===
'web'
)
{
if
(
this
.
props
.
get
===
'web'
)
{
...
@@ -107,36 +107,20 @@ export default class location extends Component {
...
@@ -107,36 +107,20 @@ export default class location extends Component {
title=
{
btn
?
'正在定位中'
:
locationMsg
.
address
}
title=
{
btn
?
'正在定位中'
:
locationMsg
.
address
}
onConfirm=
{
this
.
confirm
}
onConfirm=
{
this
.
confirm
}
okText=
"提交"
okText=
"提交"
cancelText=
"取消"
>
cancelText=
"取消"
>
<
Button
<
Button
disabled=
{
btn
}
disabled=
{
btn
}
style=
{
{
margin
:
'auto'
,
width
:
this
.
props
.
width
}
}
style=
{
{
margin
:
'auto'
,
width
:
this
.
props
.
width
}
}
loading=
{
this
.
state
.
loading
}
loading=
{
this
.
state
.
loading
}
className=
{
styles
.
btn
}
className=
{
styles
.
btn
}
type=
"primary"
>
type=
"primary"
>
{
this
.
props
.
btnName
}
{
this
.
props
.
btnName
}
</
Button
>
</
Button
>
</
Popconfirm
>
</
Popconfirm
>
</
div
>
</
div
>
</
div
>
</
div
>
);
);
// return (
// <div style={{ paddingBottom: 49, paddingTop: 44 }}>
// <Nav name="签到" link/>
// <div id="EditAddress" className={styles.EditAddress}>
// <Location getLocationMsg={this.getLocationMsg.bind(this)}/>
// <Button onClick={this.submitLocation} className={styles.btn} type='primary'>签到</Button>
// <div style={this.state.style} className={styles.div}>
// <p><i>经纬度:</i><span>{this.state.locationMsg.lng},{this.state.locationMsg.lat}</span></p>
// <p><i>详细地址:</i><span>{this.state.locationMsg.address}</span></p>
// <p><i>最近的路口:</i><span>{this.state.locationMsg.nearestJunction}</span></p>
// <p><i>最近的路:</i><span>{this.state.locationMsg.nearestRoad}</span></p>
// <p><i>最近的POI:</i><span>{this.state.locationMsg.nearestPOI}</span></p>
// <Button onClick={this.submitLocation} className={styles.btn} type='primary'>签到</Button>
// </div>
// </div>
// </div>
// )
}
}
}
}
one_stop_public/tableCompon/index.jsx
浏览文件 @
118fa6c0
...
@@ -81,12 +81,7 @@ const giveRender = (column = {}) => {
...
@@ -81,12 +81,7 @@ const giveRender = (column = {}) => {
return
column
;
return
column
;
};
};
@
connect
(({
@
connect
(({
DataColumn
,
SqlManageEntity
,
formList
,
loading
})
=>
({
DataColumn
,
SqlManageEntity
,
formList
,
loading
,
})
=>
({
DataColumn
,
DataColumn
,
SqlManageEntity
,
SqlManageEntity
,
formList
,
formList
,
...
@@ -191,12 +186,7 @@ export default class tableCom extends Component {
...
@@ -191,12 +186,7 @@ export default class tableCom extends Component {
};
};
getColumnSearchProps
=
(
dataIndex
,
title
)
=>
({
getColumnSearchProps
=
(
dataIndex
,
title
)
=>
({
filterDropdown
:
({
filterDropdown
:
({
setSelectedKeys
,
selectedKeys
,
confirm
,
clearFilters
})
=>
(
setSelectedKeys
,
selectedKeys
,
confirm
,
clearFilters
,
})
=>
(
<
div
style=
{
{
padding
:
8
}
}
>
<
div
style=
{
{
padding
:
8
}
}
>
<
Input
<
Input
ref=
{
node
=>
{
ref=
{
node
=>
{
...
@@ -213,11 +203,11 @@ export default class tableCom extends Component {
...
@@ -213,11 +203,11 @@ export default class tableCom extends Component {
}
}
}
}
/>
/>
<
Button
<
Button
type=
'primary'
type=
"primary"
onClick=
{
()
=>
this
.
handleSearch
(
selectedKeys
,
confirm
)
}
onClick=
{
()
=>
this
.
handleSearch
(
selectedKeys
,
confirm
)
}
icon=
'search'
icon=
"search"
loading=
{
this
.
props
.
loading
}
loading=
{
this
.
props
.
loading
}
size=
'small'
size=
"small"
style=
{
{
style=
{
{
width
:
90
,
width
:
90
,
marginRight
:
8
,
marginRight
:
8
,
...
@@ -228,14 +218,14 @@ export default class tableCom extends Component {
...
@@ -228,14 +218,14 @@ export default class tableCom extends Component {
<
Button
<
Button
loading=
{
this
.
props
.
loading
}
loading=
{
this
.
props
.
loading
}
onClick=
{
()
=>
this
.
handleReset
(
clearFilters
)
}
onClick=
{
()
=>
this
.
handleReset
(
clearFilters
)
}
size=
'small'
size=
"small"
style=
{
{
width
:
90
}
}
style=
{
{
width
:
90
}
}
>
>
重置
重置
</
Button
>
</
Button
>
</
div
>
</
div
>
),
),
filterIcon
:
filtered
=>
<
Icon
type=
'search'
style=
{
{
color
:
filtered
?
'#1890ff'
:
'red'
}
}
/>,
filterIcon
:
filtered
=>
<
Icon
type=
"search"
style=
{
{
color
:
filtered
?
'#1890ff'
:
'red'
}
}
/>,
onFilter
:
(
value
,
record
)
=>
onFilter
:
(
value
,
record
)
=>
record
[
dataIndex
]
record
[
dataIndex
]
?
record
[
dataIndex
]
?
record
[
dataIndex
]
...
@@ -283,11 +273,7 @@ export default class tableCom extends Component {
...
@@ -283,11 +273,7 @@ export default class tableCom extends Component {
};
};
componentWillReceiveProps
(
props
)
{
componentWillReceiveProps
(
props
)
{
const
{
const
{
json
,
mapData
,
obj
}
=
props
;
json
,
mapData
,
obj
,
}
=
props
;
if
(
json
==
null
||
this
.
props
.
safe
)
{
if
(
json
==
null
||
this
.
props
.
safe
)
{
return
;
return
;
}
}
...
@@ -405,10 +391,7 @@ export default class tableCom extends Component {
...
@@ -405,10 +391,7 @@ export default class tableCom extends Component {
allValues
=
JSON
.
stringify
(
allValues
);
allValues
=
JSON
.
stringify
(
allValues
);
if
(
json
.
comName
===
'TableSelect'
)
{
if
(
json
.
comName
===
'TableSelect'
)
{
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
}
=
this
.
props
;
const
{
const
{
sqlKey
,
optionType
}
=
json
;
sqlKey
,
optionType
,
}
=
json
;
if
(
optionType
===
'sql'
)
{
if
(
optionType
===
'sql'
)
{
dispatch
({
dispatch
({
type
:
'SqlManageEntity/find'
,
type
:
'SqlManageEntity/find'
,
...
@@ -430,8 +413,7 @@ export default class tableCom extends Component {
...
@@ -430,8 +413,7 @@ export default class tableCom extends Component {
if
(
if
(
[
'DATE'
,
'DATETIME'
,
'TIME'
,
'TIMESTAMP'
,
'YEAR'
].
includes
(
datas
[
i
].
type
)
[
'DATE'
,
'DATETIME'
,
'TIME'
,
'TIMESTAMP'
,
'YEAR'
].
includes
(
datas
[
i
].
type
)
)
{
)
{
column
.
render
=
val
=>
moment
(
val
)
column
.
render
=
val
=>
moment
(
val
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
.
format
(
'YYYY-MM-DD HH:mm:ss'
);
}
}
column
=
giveRender
(
column
);
column
=
giveRender
(
column
);
...
@@ -468,8 +450,7 @@ export default class tableCom extends Component {
...
@@ -468,8 +450,7 @@ export default class tableCom extends Component {
break
;
break
;
}
}
column
.
render
=
val
=>
moment
(
parseInt
(
val
))
column
.
render
=
val
=>
moment
(
parseInt
(
val
)).
format
(
ff
);
.
format
(
ff
);
}
}
if
(
cll
[
k
].
isQuery
)
{
if
(
cll
[
k
].
isQuery
)
{
column
=
{
column
=
{
...
@@ -516,8 +497,7 @@ export default class tableCom extends Component {
...
@@ -516,8 +497,7 @@ export default class tableCom extends Component {
column
.
title
=
datas
[
i
].
title
;
column
.
title
=
datas
[
i
].
title
;
column
.
dataIndex
=
datas
[
i
].
name
;
column
.
dataIndex
=
datas
[
i
].
name
;
if
([
'DATE'
,
'DATETIME'
,
'TIME'
,
'TIMESTAMP'
,
'YEAR'
].
includes
(
datas
[
i
].
type
))
{
if
([
'DATE'
,
'DATETIME'
,
'TIME'
,
'TIMESTAMP'
,
'YEAR'
].
includes
(
datas
[
i
].
type
))
{
column
.
render
=
val
=>
moment
(
val
)
column
.
render
=
val
=>
moment
(
val
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
.
format
(
'YYYY-MM-DD HH:mm:ss'
);
}
}
column
=
giveRender
(
column
);
column
=
giveRender
(
column
);
columns
.
push
(
column
);
columns
.
push
(
column
);
...
@@ -784,8 +764,7 @@ export default class tableCom extends Component {
...
@@ -784,8 +764,7 @@ export default class tableCom extends Component {
data
:
requestParams
,
data
:
requestParams
,
method
:
method
,
method
:
method
,
requestType
:
'form'
,
requestType
:
'form'
,
})
}).
then
(
data
=>
{
.
then
(
data
=>
{
// if (!data || !Array.isArray(data)) {
// if (!data || !Array.isArray(data)) {
// data = [];
// data = [];
// }
// }
...
@@ -976,8 +955,7 @@ export default class tableCom extends Component {
...
@@ -976,8 +955,7 @@ export default class tableCom extends Component {
if
(
getToken
()
!=
null
)
{
if
(
getToken
()
!=
null
)
{
pp
.
token
=
getToken
();
pp
.
token
=
getToken
();
}
}
uaaRequest
(
url
,
pp
)
uaaRequest
(
url
,
pp
).
then
(
data
=>
{
.
then
(
data
=>
{
const
{
sqlKeys
}
=
this
.
state
;
const
{
sqlKeys
}
=
this
.
state
;
sqlKeys
[
sqlKey
].
data
=
data
;
sqlKeys
[
sqlKey
].
data
=
data
;
this
.
setState
({
sqlKeys
});
this
.
setState
({
sqlKeys
});
...
@@ -1180,12 +1158,7 @@ export default class tableCom extends Component {
...
@@ -1180,12 +1158,7 @@ export default class tableCom extends Component {
};
};
componentDidMount
()
{
componentDidMount
()
{
const
{
const
{
json
,
mapData
,
obj
,
init
}
=
this
.
props
;
json
,
mapData
,
obj
,
init
,
}
=
this
.
props
;
if
(
json
==
null
)
{
if
(
json
==
null
)
{
return
;
return
;
}
}
...
@@ -1433,10 +1406,7 @@ export default class tableCom extends Component {
...
@@ -1433,10 +1406,7 @@ export default class tableCom extends Component {
}
}
};
};
getColumn
=
key
=>
{
getColumn
=
key
=>
{
let
{
let
{
mapData
,
json
}
=
this
.
props
;
mapData
,
json
,
}
=
this
.
props
;
const
columnIds
=
json
.
columnIds
;
const
columnIds
=
json
.
columnIds
;
...
@@ -1479,20 +1449,8 @@ export default class tableCom extends Component {
...
@@ -1479,20 +1449,8 @@ export default class tableCom extends Component {
getCellValue
,
getCellValue
,
}
=
this
.
props
;
}
=
this
.
props
;
// console.log(this.props.datas);
// console.log(this.props.datas);
const
{
const
{
options
,
labels
,
selectDis
,
modalCode
,
modalTitle
,
modalInit
,
modalProps
}
=
this
.
state
;
options
,
const
{
getFieldDecorator
,
getFieldError
,
getFieldProps
}
=
this
.
props
.
form
;
labels
,
selectDis
,
modalCode
,
modalTitle
,
modalInit
,
modalProps
,
}
=
this
.
state
;
const
{
getFieldDecorator
,
getFieldError
,
getFieldProps
,
}
=
this
.
props
.
form
;
const
disabled
=
json
!=
null
?
json
.
disabled
:
false
;
const
disabled
=
json
!=
null
?
json
.
disabled
:
false
;
const
permRank
=
json
!=
null
?
(
json
.
permRank
!=
null
?
json
.
permRank
:
0
)
:
0
;
const
permRank
=
json
!=
null
?
(
json
.
permRank
!=
null
?
json
.
permRank
:
0
)
:
0
;
if
(
json
?.
label
===
'账号'
)
{
if
(
json
?.
label
===
'账号'
)
{
...
@@ -1546,7 +1504,7 @@ export default class tableCom extends Component {
...
@@ -1546,7 +1504,7 @@ export default class tableCom extends Component {
<>
<>
{
this
.
props
.
form
.
getFieldDecorator
(
this
.
props
.
uuid
,
{
{
this
.
props
.
form
.
getFieldDecorator
(
this
.
props
.
uuid
,
{
initialValue
:
fk
,
initialValue
:
fk
,
})(<
Input
type=
'hidden'
/>)
}{
' '
}
})(<
Input
type=
"hidden"
/>)
}{
' '
}
<
ZdyTable
<
ZdyTable
taskId=
{
this
.
props
.
taskId
}
taskId=
{
this
.
props
.
taskId
}
importExcel=
{
this
.
props
.
importExcel
}
importExcel=
{
this
.
props
.
importExcel
}
...
@@ -1622,7 +1580,7 @@ export default class tableCom extends Component {
...
@@ -1622,7 +1580,7 @@ export default class tableCom extends Component {
<>
<>
{
this
.
props
.
form
.
getFieldDecorator
(
uid
,
{
{
this
.
props
.
form
.
getFieldDecorator
(
uid
,
{
initialValue
:
obj
[
this
.
props
.
uuid
]
||
json
.
initialValue
,
initialValue
:
obj
[
this
.
props
.
uuid
]
||
json
.
initialValue
,
})(<
Input
type=
'hidden'
/>)
}
})(<
Input
type=
"hidden"
/>)
}
<
span
<
span
style=
{
{
style=
{
{
fontWeight
:
get
===
'mobile'
?
'bold'
:
''
,
fontWeight
:
get
===
'mobile'
?
'bold'
:
''
,
...
@@ -1639,7 +1597,7 @@ export default class tableCom extends Component {
...
@@ -1639,7 +1597,7 @@ export default class tableCom extends Component {
<>
<>
{
this
.
props
.
form
.
getFieldDecorator
(
uid
,
{
{
this
.
props
.
form
.
getFieldDecorator
(
uid
,
{
initialValue
:
this
.
props
.
form
.
getFieldsValue
()[
uid
]
||
json
.
initialValue
,
initialValue
:
this
.
props
.
form
.
getFieldsValue
()[
uid
]
||
json
.
initialValue
,
})(<
Input
type=
'hidden'
/>)
}
})(<
Input
type=
"hidden"
/>)
}
<
span
<
span
style=
{
{
style=
{
{
fontWeight
:
get
===
'mobile'
?
'bold'
:
''
,
fontWeight
:
get
===
'mobile'
?
'bold'
:
''
,
...
@@ -1732,8 +1690,7 @@ export default class tableCom extends Component {
...
@@ -1732,8 +1690,7 @@ export default class tableCom extends Component {
case
'DatePicker'
:
case
'DatePicker'
:
cm
=
value
?
(
cm
=
value
?
(
<
span
>
<
span
>
{
moment
(
parseInt
(
value
))
{
moment
(
parseInt
(
value
)).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
.
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
{
get
===
'mobile'
?
<
br
/>
:
''
}
{
get
===
'mobile'
?
<
br
/>
:
''
}
</
span
>
</
span
>
)
:
(
)
:
(
...
@@ -1749,7 +1706,7 @@ export default class tableCom extends Component {
...
@@ -1749,7 +1706,7 @@ export default class tableCom extends Component {
{
filesX
.
map
((
f
,
index2
)
=>
{
{
filesX
.
map
((
f
,
index2
)
=>
{
return
(
return
(
<
li
key=
{
index2
}
>
<
li
key=
{
index2
}
>
<
a
target=
'_blank'
key=
{
f
.
path
}
href=
{
queryApiActionPath
()
+
f
.
path
}
>
<
a
target=
"_blank"
key=
{
f
.
path
}
href=
{
queryApiActionPath
()
+
f
.
path
}
>
{
f
.
name
}
{
f
.
name
}
</
a
>
</
a
>
</
li
>
</
li
>
...
@@ -1769,7 +1726,7 @@ export default class tableCom extends Component {
...
@@ -1769,7 +1726,7 @@ export default class tableCom extends Component {
{
files
.
map
((
f
,
index2
)
=>
{
{
files
.
map
((
f
,
index2
)
=>
{
return
(
return
(
<
li
key=
{
index2
}
>
<
li
key=
{
index2
}
>
<
a
target=
'_blank'
key=
{
f
.
path
}
href=
{
queryApiActionPath
()
+
f
.
path
}
>
<
a
target=
"_blank"
key=
{
f
.
path
}
href=
{
queryApiActionPath
()
+
f
.
path
}
>
{
f
.
name
}
{
f
.
name
}
</
a
>
</
a
>
</
li
>
</
li
>
...
@@ -1862,7 +1819,7 @@ export default class tableCom extends Component {
...
@@ -1862,7 +1819,7 @@ export default class tableCom extends Component {
</
MobileItem
>
</
MobileItem
>
{
this
.
props
.
form
.
getFieldDecorator
(
`defaultValues.${formKey}.${key}`
,
{
{
this
.
props
.
form
.
getFieldDecorator
(
`defaultValues.${formKey}.${key}`
,
{
initialValue
:
value
,
initialValue
:
value
,
})(<
Input
type=
'hidden'
/>)
}
})(<
Input
type=
"hidden"
/>)
}
</>
</>
);
);
}
}
...
@@ -1875,7 +1832,7 @@ export default class tableCom extends Component {
...
@@ -1875,7 +1832,7 @@ export default class tableCom extends Component {
{
cm
}
{
cm
}
{
this
.
props
.
form
.
getFieldDecorator
(
`defaultValues.${formKey}.${key}`
,
{
{
this
.
props
.
form
.
getFieldDecorator
(
`defaultValues.${formKey}.${key}`
,
{
initialValue
:
value
,
initialValue
:
value
,
})(<
Input
type=
'hidden'
/>)
}
})(<
Input
type=
"hidden"
/>)
}
</>
</>
);
);
}
}
...
@@ -1969,7 +1926,7 @@ export default class tableCom extends Component {
...
@@ -1969,7 +1926,7 @@ export default class tableCom extends Component {
</
Form
.
Item
>
</
Form
.
Item
>
{
this
.
props
.
form
.
getFieldDecorator
(
`defaultValues.${formKey}.${key}`
,
{
{
this
.
props
.
form
.
getFieldDecorator
(
`defaultValues.${formKey}.${key}`
,
{
initialValue
:
value
,
initialValue
:
value
,
})(<
Input
type=
'hidden'
/>)
}
})(<
Input
type=
"hidden"
/>)
}
</>
</>
);
);
}
}
...
@@ -1982,7 +1939,7 @@ export default class tableCom extends Component {
...
@@ -1982,7 +1939,7 @@ export default class tableCom extends Component {
{
cm
}
{
cm
}
{
this
.
props
.
form
.
getFieldDecorator
(
`defaultValues.${formKey}.${key}`
,
{
{
this
.
props
.
form
.
getFieldDecorator
(
`defaultValues.${formKey}.${key}`
,
{
initialValue
:
value
,
initialValue
:
value
,
})(<
Input
type=
'hidden'
/>)
}
})(<
Input
type=
"hidden"
/>)
}
</>
</>
);
);
}
}
...
@@ -2166,7 +2123,7 @@ export default class tableCom extends Component {
...
@@ -2166,7 +2123,7 @@ export default class tableCom extends Component {
<
Table
<
Table
get=
{
get
}
get=
{
get
}
columns=
{
this
.
state
.
columns
}
columns=
{
this
.
state
.
columns
}
size=
'small'
size=
"small"
dataSource=
{
ds
}
dataSource=
{
ds
}
pagination=
{
false
}
pagination=
{
false
}
/>
/>
...
@@ -2199,13 +2156,11 @@ export default class tableCom extends Component {
...
@@ -2199,13 +2156,11 @@ export default class tableCom extends Component {
}
else
{
}
else
{
cm
=
(
cm
=
(
<
span
>
<
span
>
{
moment
(
parseInt
(
obj
[
begin
.
base52
]))
{
moment
(
parseInt
(
obj
[
begin
.
base52
])).
format
(
.
format
(
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
,
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
,
)
}{
' '
}
)
}{
' '
}
至
{
' '
}
至
{
' '
}
{
moment
(
parseInt
(
obj
[
end
.
base52
]))
{
moment
(
parseInt
(
obj
[
end
.
base52
])).
format
(
.
format
(
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
,
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
,
)
}
)
}
</
span
>
</
span
>
...
@@ -2220,8 +2175,7 @@ export default class tableCom extends Component {
...
@@ -2220,8 +2175,7 @@ export default class tableCom extends Component {
if
(
obj
[
dataColumn
.
base52
]
&&
obj
[
dataColumn
.
base52
].
indexOf
(
'-'
)
===
-
1
)
{
if
(
obj
[
dataColumn
.
base52
]
&&
obj
[
dataColumn
.
base52
].
indexOf
(
'-'
)
===
-
1
)
{
cm
=
(
cm
=
(
<
span
>
<
span
>
{
moment
(
parseInt
(
obj
[
dataColumn
.
base52
]))
{
moment
(
parseInt
(
obj
[
dataColumn
.
base52
])).
format
(
.
format
(
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
,
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
,
)
}
)
}
</
span
>
</
span
>
...
@@ -2230,8 +2184,7 @@ export default class tableCom extends Component {
...
@@ -2230,8 +2184,7 @@ export default class tableCom extends Component {
cm
=
(
cm
=
(
<
span
>
<
span
>
{
obj
[
dataColumn
.
base52
]
{
obj
[
dataColumn
.
base52
]
?
moment
(
+
new
Date
(
obj
[
dataColumn
.
base52
]))
?
moment
(
+
new
Date
(
obj
[
dataColumn
.
base52
])).
format
(
.
format
(
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
,
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
,
)
)
:
''
}
:
''
}
...
@@ -2339,7 +2292,7 @@ export default class tableCom extends Component {
...
@@ -2339,7 +2292,7 @@ export default class tableCom extends Component {
}
}
return
(
return
(
<
li
key=
{
index2
}
>
<
li
key=
{
index2
}
>
<
a
target=
'_blank'
key=
{
f
.
path
}
href=
{
queryApiActionPath
()
+
f
.
path
}
>
<
a
target=
"_blank"
key=
{
f
.
path
}
href=
{
queryApiActionPath
()
+
f
.
path
}
>
{
f
.
name
}
{
f
.
name
}
</
a
>
</
a
>
</
li
>
</
li
>
...
@@ -2376,7 +2329,7 @@ export default class tableCom extends Component {
...
@@ -2376,7 +2329,7 @@ export default class tableCom extends Component {
return
(
return
(
<
li
key=
{
index2
}
>
<
li
key=
{
index2
}
>
<
a
<
a
target=
'_blank'
target=
"_blank"
key=
{
f
.
filePath
}
key=
{
f
.
filePath
}
href=
{
queryApiActionPath
()
+
f
.
filePath
}
href=
{
queryApiActionPath
()
+
f
.
filePath
}
>
>
...
@@ -2536,12 +2489,24 @@ export default class tableCom extends Component {
...
@@ -2536,12 +2489,24 @@ export default class tableCom extends Component {
if
(
json
.
isLink
)
{
if
(
json
.
isLink
)
{
cm
=
<
a
{
...
ev
}
/>;
cm
=
<
a
{
...
ev
}
/>;
}
else
{
}
else
{
cm
=
<
Button
loading=
{
this
.
props
.
loading
}
type=
'primary'
{
...
ev
}
/>;
cm
=
<
Button
loading=
{
this
.
props
.
loading
}
type=
"primary"
{
...
ev
}
/>;
}
}
}
}
break
;
break
;
case
'LocationCom'
:
case
'LocationCom'
:
// cm = '';
// break;
// console.log(obj, obj[dataColumn.base52], json);
let
v
=
obj
[
dataColumn
.
base52
];
if
(
typeof
v
!==
'object'
)
{
console
.
log
(
'定位组件未获取到对象'
,
'进行了数据转换'
,
v
,
typeof
v
,
isJSON
(
v
));
if
(
isJSON
(
v
))
{
v
=
JSON
.
parse
(
v
);
}
else
{
v
=
{};
}
}
cm
=
(
cm
=
(
<
span
>
<
span
>
<
LocationCom
<
LocationCom
...
@@ -2551,7 +2516,7 @@ export default class tableCom extends Component {
...
@@ -2551,7 +2516,7 @@ export default class tableCom extends Component {
width=
{
json
.
width
}
width=
{
json
.
width
}
json=
{
json
}
json=
{
json
}
showMap=
{
json
.
showMap
}
showMap=
{
json
.
showMap
}
value=
{
obj
[
dataColumn
.
base52
]
}
value=
{
v
}
/>
/>
</
span
>
</
span
>
);
);
...
@@ -2618,7 +2583,7 @@ export default class tableCom extends Component {
...
@@ -2618,7 +2583,7 @@ export default class tableCom extends Component {
if
(
json
.
isLink
)
{
if
(
json
.
isLink
)
{
cm
=
<
a
{
...
ev
}
/>;
cm
=
<
a
{
...
ev
}
/>;
}
else
{
}
else
{
cm
=
<
Button
loading=
{
this
.
props
.
loading
}
type=
'primary'
{
...
ev
}
/>;
cm
=
<
Button
loading=
{
this
.
props
.
loading
}
type=
"primary"
{
...
ev
}
/>;
}
}
}
}
...
@@ -2803,7 +2768,7 @@ export default class tableCom extends Component {
...
@@ -2803,7 +2768,7 @@ export default class tableCom extends Component {
case
'InputHidden'
:
case
'InputHidden'
:
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
initialValue
:
initValue
,
initialValue
:
initValue
,
})(<
Input
type=
'hidden'
/>);
})(<
Input
type=
"hidden"
/>);
break
;
break
;
case
'InputNumber'
:
case
'InputNumber'
:
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
...
@@ -2891,7 +2856,7 @@ export default class tableCom extends Component {
...
@@ -2891,7 +2856,7 @@ export default class tableCom extends Component {
case
'Checkbox'
:
case
'Checkbox'
:
if
(
get
===
'mobile'
)
{
if
(
get
===
'mobile'
)
{
cm
=
(
cm
=
(
<
Flex
direction=
'column'
align=
'start'
>
<
Flex
direction=
"column"
align=
"start"
>
{
getFieldDecorator
(
dataColumn
.
base52
,
{
{
getFieldDecorator
(
dataColumn
.
base52
,
{
initialValue
:
initValue
,
// 默认值
initialValue
:
initValue
,
// 默认值
rules
:
rules
:
...
@@ -2974,7 +2939,7 @@ export default class tableCom extends Component {
...
@@ -2974,7 +2939,7 @@ export default class tableCom extends Component {
disabled=
{
selectDis
||
disabled
}
disabled=
{
selectDis
||
disabled
}
placeholder=
{
json
.
placeholder
}
placeholder=
{
json
.
placeholder
}
style=
{
{
width
:
json
.
width
}
}
style=
{
{
width
:
json
.
width
}
}
optionFilterProp=
'children'
optionFilterProp=
"children"
getPopupContainer=
{
getPopupContainer=
{
this
.
props
.
isDynamic
&&
document
.
querySelector
(
'#dynamic_div'
)
this
.
props
.
isDynamic
&&
document
.
querySelector
(
'#dynamic_div'
)
?
()
=>
{
?
()
=>
{
...
@@ -3001,8 +2966,7 @@ export default class tableCom extends Component {
...
@@ -3001,8 +2966,7 @@ export default class tableCom extends Component {
}
}
}
}
filterOption=
{
(
input
,
option
)
=>
filterOption=
{
(
input
,
option
)
=>
option
option
?
option
.
props
.
children
.
toLowerCase
()
?
option
.
props
.
children
.
toLowerCase
().
indexOf
(
input
.
toLowerCase
())
>=
0
.
indexOf
(
input
.
toLowerCase
())
>=
0
:
false
:
false
}
}
{
...
otherProps
}
{
...
otherProps
}
...
@@ -3051,8 +3015,7 @@ export default class tableCom extends Component {
...
@@ -3051,8 +3015,7 @@ export default class tableCom extends Component {
}
}
const
filterF
=
function
filter
(
inputValue
,
path
)
{
const
filterF
=
function
filter
(
inputValue
,
path
)
{
return
path
.
some
(
return
path
.
some
(
option
=>
option
?.
label
?.
toLowerCase
()
option
=>
option
?.
label
?.
toLowerCase
()?.
indexOf
(
inputValue
.
toLowerCase
())
>
-
1
,
?.
indexOf
(
inputValue
.
toLowerCase
())
>
-
1
,
);
);
};
};
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
cm
=
getFieldDecorator
(
dataColumn
.
base52
,
{
...
@@ -3201,13 +3164,11 @@ export default class tableCom extends Component {
...
@@ -3201,13 +3164,11 @@ export default class tableCom extends Component {
if
(
!
isEdit
)
{
if
(
!
isEdit
)
{
cm
=
(
cm
=
(
<
span
>
<
span
>
{
moment
(
parseInt
(
obj
[
begin
.
base52
]))
{
moment
(
parseInt
(
obj
[
begin
.
base52
])).
format
(
.
format
(
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
,
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
,
)
}{
' '
}
)
}{
' '
}
至
{
' '
}
至
{
' '
}
{
moment
(
parseInt
(
obj
[
end
.
base52
]))
{
moment
(
parseInt
(
obj
[
end
.
base52
])).
format
(
.
format
(
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
,
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
,
)
}
)
}
</
span
>
</
span
>
...
@@ -3311,8 +3272,7 @@ export default class tableCom extends Component {
...
@@ -3311,8 +3272,7 @@ export default class tableCom extends Component {
}
}
});
});
}
}
:
()
=>
{
:
()
=>
{}
}
}
}
format=
{
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
}
format=
{
json
.
format
?
json
.
format
:
'YYYY-MM-DD HH:mm:ss'
}
/>,
/>,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论