Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-convertor-view
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
station
amos-convertor-view
Commits
20abeadc
Commit
20abeadc
authored
Jun 23, 2020
by
shanqiyun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
dab4a4e6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
27 deletions
+47
-27
ledgerService.js
src/services/ledgerService.js
+3
-2
index.js
src/view/bizview/equipmentLedger/Equipment/index.js
+5
-4
MonitorPointConfig.js
...tLedger/FireResources/FireEquipment/MonitorPointConfig.js
+4
-0
FireDetectorModel.js
...entLedger/FireResources/fireDetector/FireDetectorModel.js
+7
-16
FireWaterToolBar.js
...w/equipmentLedger/FireResources/water/FireWaterToolBar.js
+8
-3
water.js
...view/bizview/equipmentLedger/FireResources/water/water.js
+20
-2
No files found.
src/services/ledgerService.js
View file @
20abeadc
...
@@ -519,11 +519,12 @@ export const startTestPrecontrol = (data) => {
...
@@ -519,11 +519,12 @@ export const startTestPrecontrol = (data) => {
* @param {*} size
* @param {*} size
*/
*/
export
const
getFireDetectorListAction
=
(
filter
,
page
,
size
)
=>
{
export
const
getFireDetectorListAction
=
(
filter
,
page
,
size
)
=>
{
let
{
name
,
code
,
equipClassify
}
=
filter
;
let
{
name
,
code
,
equipClassify
,
bindStation
}
=
filter
;
name
=
name
===
undefined
?
''
:
name
;
name
=
name
===
undefined
?
''
:
name
;
code
=
code
===
undefined
?
''
:
code
;
code
=
code
===
undefined
?
''
:
code
;
bindStation
=
bindStation
===
undefined
?
''
:
bindStation
;
equipClassify
=
'4'
;
equipClassify
=
'4'
;
let
url
=
formatUrl
(
FasSerUrl
.
fireEquipmentListUrl
,
{
name
,
code
,
equipClassify
,
page
,
size
});
let
url
=
formatUrl
(
FasSerUrl
.
fireEquipmentListUrl
,
{
name
,
code
,
equipClassify
,
page
,
size
,
bindStation
});
return
commonGet
(
url
);
return
commonGet
(
url
);
};
};
...
...
src/view/bizview/equipmentLedger/Equipment/index.js
View file @
20abeadc
...
@@ -110,6 +110,7 @@ class Equipment extends Component {
...
@@ -110,6 +110,7 @@ class Equipment extends Component {
this
.
setState
({
equipClassify
:
value
});
this
.
setState
({
equipClassify
:
value
});
}
}
let
searchParam
=
[{
name
:
type
,
value
,
type
:
'LIKE'
}];
let
searchParam
=
[{
name
:
type
,
value
,
type
:
'LIKE'
}];
searchParam
.
current
=
0
;
this
.
getEquipmentListData
(
searchParam
);
this
.
getEquipmentListData
(
searchParam
);
}
}
...
@@ -268,12 +269,12 @@ class Equipment extends Component {
...
@@ -268,12 +269,12 @@ class Equipment extends Component {
if
(
valid
)
{
if
(
valid
)
{
delete
dataValues
.
createDate
;
delete
dataValues
.
createDate
;
let
formData
=
new
FormData
();
let
formData
=
new
FormData
();
dataValues
.
imageUrl1
&&
formData
.
append
(
'img1'
,
dataValues
.
imageUrl1
[
0
]);
dataValues
.
imageUrl1
&&
formData
.
append
(
'img1'
,
dataValues
.
imageUrl1
[
0
]);
dataValues
.
imageUrl2
&&
formData
.
append
(
'img2'
,
dataValues
.
imageUrl2
[
0
]);
dataValues
.
imageUrl2
&&
formData
.
append
(
'img2'
,
dataValues
.
imageUrl2
[
0
]);
dataValues
.
imageUrl3
&&
formData
.
append
(
'img3'
,
dataValues
.
imageUrl3
[
0
]);
dataValues
.
imageUrl3
&&
formData
.
append
(
'img3'
,
dataValues
.
imageUrl3
[
0
]);
dataValues
.
imageUrl4
&&
formData
.
append
(
'img4'
,
dataValues
.
imageUrl4
[
0
]);
dataValues
.
imageUrl4
&&
formData
.
append
(
'img4'
,
dataValues
.
imageUrl4
[
0
]);
Object
.
keys
(
dataValues
).
map
(
item
=>
{
Object
.
keys
(
dataValues
).
map
(
item
=>
{
if
(
item
===
'chargeDeptId'
&&
dataValues
[
item
]
===
null
)
{
if
(
item
===
'chargeDeptId'
&&
dataValues
[
item
]
===
null
)
{
formData
.
append
(
item
,
-
1
);
formData
.
append
(
item
,
-
1
);
...
@@ -285,7 +286,7 @@ class Equipment extends Component {
...
@@ -285,7 +286,7 @@ class Equipment extends Component {
formData
.
append
(
item
,
dataValues
[
item
]);
formData
.
append
(
item
,
dataValues
[
item
]);
}
}
});
});
fetch
(
updateEquipmentUrl
,
{
fetch
(
updateEquipmentUrl
,
{
method
:
'post'
,
method
:
'post'
,
headers
:
{
headers
:
{
...
@@ -317,7 +318,7 @@ class Equipment extends Component {
...
@@ -317,7 +318,7 @@ class Equipment extends Component {
that
.
setState
({
isClick
:
true
});
// 将isClick设置为true
that
.
setState
({
isClick
:
true
});
// 将isClick设置为true
},
5000
);
},
5000
);
}
}
}
}
render
()
{
render
()
{
...
...
src/view/bizview/equipmentLedger/FireResources/FireEquipment/MonitorPointConfig.js
View file @
20abeadc
...
@@ -300,6 +300,10 @@ debugger
...
@@ -300,6 +300,10 @@ debugger
);
);
}
else
{
// 新增时
}
else
{
// 新增时
if
(
shwoConfig
)
{
if
(
shwoConfig
)
{
if
(
form
.
fireEquipmentId
===
null
)
{
AmosAlert
.
error
(
'错误'
,
'请选择设备'
);
return
;
}
configPointEquipment
(
selectedRowKeys
.
toString
(),
form
.
fireEquipmentId
).
then
(
configPointEquipment
(
selectedRowKeys
.
toString
(),
form
.
fireEquipmentId
).
then
(
data
=>
{
data
=>
{
AmosAlert
.
success
(
'提示'
,
'配置成功'
);
AmosAlert
.
success
(
'提示'
,
'配置成功'
);
...
...
src/view/bizview/equipmentLedger/FireResources/fireDetector/FireDetectorModel.js
View file @
20abeadc
...
@@ -47,7 +47,7 @@ class FireDetectorModel extends Component {
...
@@ -47,7 +47,7 @@ class FireDetectorModel extends Component {
name
:
[{
required
:
true
,
message
:
'名称不能为空'
}],
name
:
[{
required
:
true
,
message
:
'名称不能为空'
}],
position3d
:
[{
validator
:
this
.
validPositon3d
}],
position3d
:
[{
validator
:
this
.
validPositon3d
}],
weight
:
[{
validator
:
this
.
isNumberh
}],
weight
:
[{
validator
:
this
.
isNumberh
}],
}
}
};
};
}
}
...
@@ -123,21 +123,12 @@ class FireDetectorModel extends Component {
...
@@ -123,21 +123,12 @@ class FireDetectorModel extends Component {
/**
/**
* 数字验证
* 数字验证
*/
*/
isNumberh
=
(
rule
,
value
,
callback
)
=>
{
isNumberh
=
(
rule
,
value
,
callback
)
=>
{
debugger
if
(
value
&&
!
AmosValidate
.
isNum
(
value
)
||
Number
(
value
)
<
0
)
{
if
(
value
&&
!
AmosValidate
.
isNum
(
value
))
{
callback
(
'只能输入大于0的数字'
);
callback
(
'只能输入数字'
);
}
}
callback
();
callback
();
};
};
render
()
{
render
()
{
let
{
form
,
rules
,
_disabled
}
=
this
.
state
;
let
{
form
,
rules
,
_disabled
}
=
this
.
state
;
...
...
src/view/bizview/equipmentLedger/FireResources/water/FireWaterToolBar.js
View file @
20abeadc
...
@@ -3,7 +3,7 @@ import formatUrl from 'amos-processor/lib/utils/urlFormat';
...
@@ -3,7 +3,7 @@ import formatUrl from 'amos-processor/lib/utils/urlFormat';
import
PropTypes
from
'prop-types'
;
import
PropTypes
from
'prop-types'
;
import
{
Store
}
from
'amos-tool'
;
import
{
Store
}
from
'amos-tool'
;
import
SysConsts
from
'amos-processor/lib/config/consts'
;
import
SysConsts
from
'amos-processor/lib/config/consts'
;
import
{
Button
,
Input
,
Upload
,
message
}
from
'amos-framework'
;
import
{
Button
,
Input
,
Upload
,
message
,
Icon
}
from
'amos-framework'
;
import
BizIcon
from
'./../../../../common/icon/BizIcon'
;
import
BizIcon
from
'./../../../../common/icon/BizIcon'
;
import
{
FasSerUrl
}
from
'./../../../../../consts/urlConsts'
;
import
{
FasSerUrl
}
from
'./../../../../../consts/urlConsts'
;
...
@@ -59,8 +59,12 @@ class FireWaterToolBar extends Component {
...
@@ -59,8 +59,12 @@ class FireWaterToolBar extends Component {
console
.
log
(
info
.
file
,
info
.
fileList
);
console
.
log
(
info
.
file
,
info
.
fileList
);
}
}
if
(
info
.
file
.
status
===
'done'
)
{
if
(
info
.
file
.
status
===
'done'
)
{
message
.
success
(
`
${
info
.
file
.
name
}
上传成功`
);
if
(
info
.
file
.
response
.
result
===
'FAILURE'
)
{
this
.
props
.
reload
();
message
.
danger
(
info
.
file
.
response
.
message
);
}
else
{
message
.
success
(
`
${
info
.
file
.
name
}
上传成功`
);
this
.
props
.
reload
();
}
}
else
if
(
info
.
file
.
status
===
'error'
)
{
}
else
if
(
info
.
file
.
status
===
'error'
)
{
message
.
danger
(
`
${
info
.
file
.
name
}
失败.`
);
message
.
danger
(
`
${
info
.
file
.
name
}
失败.`
);
}
}
...
@@ -77,6 +81,7 @@ class FireWaterToolBar extends Component {
...
@@ -77,6 +81,7 @@ class FireWaterToolBar extends Component {
enableEdit
&&
enableEdit
&&
(
(
<
div
className
=
"fire-truck-buttons"
>
<
div
className
=
"fire-truck-buttons"
>
<
Button
title
=
"导出模板"
icon
=
{
<
Icon
icon
=
"ccgl-chukucaozuo-13"
prefix
=
"amosicon"
color
=
"rgb(52, 95, 166)"
/>
}
transparent
onClick
=
{()
=>
this
.
props
.
downloadTemp
(
'model'
)}
/
>
<
Upload
{...
uploadProps
}
>
<
Upload
{...
uploadProps
}
>
<
Button
icon
=
{
<
BizIcon
icon
=
"daoru"
/>
}
transparent
/>
<
Button
icon
=
{
<
BizIcon
icon
=
"daoru"
/>
}
transparent
/>
<
/Upload
>
<
/Upload
>
...
...
src/view/bizview/equipmentLedger/FireResources/water/water.js
View file @
20abeadc
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
PropTypes
from
'prop-types'
;
import
{
Modal
,
Button
,
AmosAlert
}
from
'amos-framework'
;
import
{
Modal
,
Button
,
AmosAlert
}
from
'amos-framework'
;
import
formatUrl
from
'amos-processor/lib/utils/urlFormat'
;
import
AmosGridTable
from
'./../../../common/tableComponent/table/AmosGridTable'
;
import
AmosGridTable
from
'./../../../common/tableComponent/table/AmosGridTable'
;
import
FireWaterDetail
from
'./FireWaterDetail'
;
import
FireWaterDetail
from
'./FireWaterDetail'
;
import
FireWaterEdit
from
'./FireWaterEdit'
;
import
FireWaterEdit
from
'./FireWaterEdit'
;
...
@@ -10,6 +11,9 @@ import { pathMapping } from './../../../../../routes/customRoutes';
...
@@ -10,6 +11,9 @@ import { pathMapping } from './../../../../../routes/customRoutes';
import
{
browserHistory
}
from
'amos-react-router'
;
import
{
browserHistory
}
from
'amos-react-router'
;
import
{
deleteFireWaterDataAction
,
newFireWaterDataAction
,
editFireWaterDataAction
,
getFireWaterAction
}
from
'../../../../../services/ledgerService'
;
import
{
deleteFireWaterDataAction
,
newFireWaterDataAction
,
editFireWaterDataAction
,
getFireWaterAction
}
from
'../../../../../services/ledgerService'
;
import
{
getRiskSourceSecondLevelAction
}
from
'../../../../../services/preControlService'
;
import
{
getRiskSourceSecondLevelAction
}
from
'../../../../../services/preControlService'
;
import
{
downLoadFilePost
}
from
'./../../../../../utils/FileUtils'
;
import
{
FasSerUrl
}
from
'./../../../../../consts/urlConsts'
;
const
fireStationPath
=
pathMapping
.
stationMatches
;
const
fireStationPath
=
pathMapping
.
stationMatches
;
...
@@ -74,7 +78,7 @@ const fireWaterTableColumns = self => {
...
@@ -74,7 +78,7 @@ const fireWaterTableColumns = self => {
const
defaultHeight
=
580
;
const
defaultHeight
=
580
;
/**
/**
*
消防车
列表
*
灭火栓/水池
列表
*/
*/
class
WaterView
extends
Component
{
class
WaterView
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -384,6 +388,12 @@ class WaterView extends Component {
...
@@ -384,6 +388,12 @@ class WaterView extends Component {
);
);
};
};
downLoadExeclFile
=
(
exportType
)
=>
{
let
modelName
=
'water'
;
let
url
=
formatUrl
(
FasSerUrl
.
exportExcelFireEquipmentPointUrl
,
{
exportType
,
modelName
});
downLoadFilePost
(
url
,
{});
}
render
()
{
render
()
{
let
{
show
,
selectedRowKeys
,
dataList
,
totalCount
}
=
this
.
state
;
let
{
show
,
selectedRowKeys
,
dataList
,
totalCount
}
=
this
.
state
;
let
_true_
=
true
;
let
_true_
=
true
;
...
@@ -400,7 +410,15 @@ class WaterView extends Component {
...
@@ -400,7 +410,15 @@ class WaterView extends Component {
content
=
{
this
.
getContext
()}
content
=
{
this
.
getContext
()}
outterClosable
=
{
false
}
outterClosable
=
{
false
}
/
>
/
>
<
FireWaterToolBar
add
=
{()
=>
this
.
add
()}
delete
=
{()
=>
this
.
delete
()}
edit
=
{()
=>
this
.
edit
()}
getTableListData
=
{
this
.
getFireWaterData
}
pageConfig
=
{
this
.
pageConfig
}
enableEdit
=
{
_true_
}
/
>
<
FireWaterToolBar
add
=
{()
=>
this
.
add
()}
delete
=
{()
=>
this
.
delete
()}
edit
=
{()
=>
this
.
edit
()}
getTableListData
=
{
this
.
getFireWaterData
}
pageConfig
=
{
this
.
pageConfig
}
enableEdit
=
{
_true_
}
downloadTemp
=
{
this
.
downLoadExeclFile
}
/
>
<
AmosGridTable
<
AmosGridTable
rowKey
=
"id"
rowKey
=
"id"
columns
=
{
fireWaterTableColumns
(
this
)}
columns
=
{
fireWaterTableColumns
(
this
)}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment