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
4eef7786
Commit
4eef7786
authored
Jun 05, 2020
by
xinglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改重点设备页面访问预案报错问题
parent
a0e2c69e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
35 deletions
+47
-35
amos.config.js
amos.config.js
+1
-1
preControlService.js
src/services/preControlService.js
+10
-3
AmosGridTable.js
...view/bizview/common/tableComponent/table/AmosGridTable.js
+0
-4
EquipmentModel.js
src/view/bizview/equipmentLedger/Equipment/EquipmentModel.js
+31
-21
MonitorPointConfig.js
...tLedger/FireResources/FireEquipment/MonitorPointConfig.js
+5
-6
No files found.
amos.config.js
View file @
4eef7786
...
...
@@ -11,7 +11,7 @@
convertorURI
:
'http://172.16.3.63:8083/'
,
patrolURI
:
'http://172.16.3.122:8082/'
,
securityBaseURI
:
'http://172.16.10.72:10005/'
,
rulesConfigURI
:
'http://172.16.1
0.91:8080
/'
,
rulesConfigURI
:
'http://172.16.1
1.36:10005
/'
,
pluginURI
:
'http://172.16.10.91:8091/'
,
studioURI
:
'http://172.16.10.91:8091/'
,
//设计器数据绑定
...
...
src/services/preControlService.js
View file @
4eef7786
import
formatUrl
from
'amos-processor/lib/utils/urlFormat'
;
import
{
FasSerUrl
,
secExtUrl
}
from
'./../consts/urlConsts'
;
import
{
FasSerUrl
,
FscSerUrl
,
secExtUrl
}
from
'./../consts/urlConsts'
;
import
{
commonGet
,
commonPost
,
commonDelete
,
commonPut
}
from
'./../utils/request'
;
export
const
queryRiskLevelAction
=
(
filter
,
page
,
size
)
=>
{
...
...
@@ -161,6 +161,14 @@ export const queryFmeaControlObjAction = (ids) => {
};
/**
* 获取预案下拉框
*/
export
const
queryLoadPackagesAction
=
(
project
)
=>
{
let
url
=
formatUrl
(
FscSerUrl
.
loadPackagesUrl
,
{
project
});
return
commonGet
(
url
);
};
/**
* 获取预案树
*/
export
const
getPlanTreeAction
=
()
=>
{
...
...
@@ -252,4 +260,4 @@ export const deleteTextPlanAction = (id) => {
*/
export
const
getManageLevelEumListAction
=
()
=>
{
return
commonGet
(
FasSerUrl
.
manageLevelEumListUrl
);
};
\ No newline at end of file
};
src/view/bizview/common/tableComponent/table/AmosGridTable.js
View file @
4eef7786
...
...
@@ -125,10 +125,7 @@ class AmosGridTable extends Component {
* 获取表格数据(刷新)
*/
reload
=
()
=>
{
debugger
let
{
current
,
pageSize
,
filter
,
otherFilter
}
=
this
.
state
;
this
.
props
.
getTableDataAction
({
current
:
current
-
1
,
pageSize
},
JSON
.
stringify
(
filter
),
otherFilter
);
this
.
getHeightOffset
();
}
...
...
@@ -184,7 +181,6 @@ class AmosGridTable extends Component {
if
(
operateCol
){
columns
[
columns
.
length
-
1
].
render
=
(
text
,
record
)
=>
this
.
addOperateCol
(
text
,
record
);
}
debugger
let
tepmPage
=
Object
.
assign
({
size
:
'small'
,
total
:
totals
,
...
...
src/view/bizview/equipmentLedger/Equipment/EquipmentModel.js
View file @
4eef7786
...
...
@@ -7,7 +7,7 @@ import { FasSerUrl } from '../../../../consts/urlConsts';
import
{
Form
,
Upload
,
Input
,
Select
,
Radio
,
Modal
,
AmosAlert
,
Icon
}
from
'amos-framework'
;
import
PropTypes
from
'amos-react-router/lib/PropTypes'
;
import
{
getEquipmentDataAction
,
getFireStationDataAction
,
getPrePlanPictureAction
}
from
'../../../../services/ledgerService'
;
import
{
queryDeptByOrgCodeAction
,
getUsersByDepartmentIdAction
,
getRiskSourceSecondLevelAction
}
from
'../../../../services/preControlService'
;
import
{
queryDeptByOrgCodeAction
,
getUsersByDepartmentIdAction
,
getRiskSourceSecondLevelAction
,
queryLoadPackagesAction
}
from
'../../../../services/preControlService'
;
import
{
convertImgUrlToFile
,
getBase64
}
from
'./../../../../utils/FileUtils'
;
import
{
baseURI
,
FscSerUrl
}
from
'../../../../consts/urlConsts'
;
...
...
@@ -63,7 +63,8 @@ class EquipmentModel extends Component {
previewVisible
:
false
,
previewImage
:
''
,
project
:
[],
riskSourceData
:
[]
riskSourceData
:
[],
prefix
:
''
};
}
...
...
@@ -94,8 +95,9 @@ class EquipmentModel extends Component {
};
onPeservePlanChange
=
(
key
,
item
)
=>
{
const
{
form
}
=
this
.
state
;
let
value
=
item
.
project
?
item
.
project
.
substring
(
0
)
+
'/'
+
item
.
id
:
''
;
const
{
form
,
prefix
}
=
this
.
state
;
//let value = item.project ? item.project.substring(0) + '/' + item.packageId : '' ;
let
value
=
prefix
?
prefix
+
'/'
+
item
.
packageId
:
''
;
form
[
key
]
=
value
;
this
.
setState
({
form
});
};
...
...
@@ -286,24 +288,32 @@ class EquipmentModel extends Component {
};
queryLoadPackages =(project)=> {
fetch(formatUrl(url, { project }), {
method: '
post
',
headers: {
'
Accept
': '
application
/
json
;
charset
=
UTF
-
8
',
'
X
-
Api
-
Key
': _amosTool.Store.getCookieByName(apiKey),
'
Content
-
Type
': '
application
/
json
;
charset
=
utf
-
8
',
'
X
-
Access
-
Token
': ls.read(token),
'
appKey
': '
CONVERTER_STATION
',
'
product
': '
CONVERTER_STATION_WEB
',
'
token
':ls.read(token)
queryLoadPackagesAction(project).then(data => {
if (data){
let prefix = data[0].project.replace('
/
', '');
this.setState({ prefix, project: data[0].resourceItems });
}
}).then(res => {
return res.json();
}).then(data => {
this.setState({ project: data });
}).catch(e => {
AmosAlert.error('
错误
', e);
});
// fetch(formatUrl(url, { project }), {
// method: '
get
',
// headers: {
// '
Accept
': '
application
/
json
;
charset
=
UTF
-
8
',
// '
X
-
Api
-
Key
': _amosTool.Store.getCookieByName(apiKey),
// '
Content
-
Type
': '
application
/
json
;
charset
=
utf
-
8
',
// '
X
-
Access
-
Token
': ls.read(token),
// '
appKey
': '
CONVERTER_STATION
',
// '
product
': '
CONVERTER_STATION_WEB
',
// '
token
':ls.read(token)
// }
// }).then(res => {
// return res.json();
// }).then(data => {
// console.log(data);
// this.setState({ project: data.result });
// }).catch(e => {
// AmosAlert.error('
错误
', e);
// });
}
render() {
...
...
@@ -491,7 +501,7 @@ class EquipmentModel extends Component {
className="fire-equip-select"
data={project}
value={form.reservePlan ? form.reservePlan.split('
/
')[1] : ''}
renderOption={item => <Option value={item.
i
d}>{item.name}</Option>}
renderOption={item => <Option value={item.
packageI
d}>{item.name}</Option>}
onChange={(e,item) => this.onPeservePlanChange('
reservePlan
', item)}
/>
</FormItem>
...
...
src/view/bizview/equipmentLedger/FireResources/FireEquipment/MonitorPointConfig.js
View file @
4eef7786
...
...
@@ -116,8 +116,8 @@ class MonitorPointConfig extends Component {
{
required
:
true
,
message
:
'请输入单位'
}
// { pattern: new RegExp(/^(-?\d+)(\.\d+)?$/), message: '请输入正确参数' }
],
},
data
:
[],
selectedRowKeys
:
[],
...
...
@@ -171,7 +171,6 @@ class MonitorPointConfig extends Component {
}
getMonitorPointListData
=
(
param
)
=>
{
debugger
if
(
!
param
)
{
return
;
}
...
...
@@ -255,7 +254,7 @@ class MonitorPointConfig extends Component {
};
getSelectedRows
=
(
selectedRows
,
selectedRowKeys
)
=>
{
this
.
setState
({
selectedRows
,
selectedRowKeys
});
};
...
...
@@ -408,7 +407,7 @@ debugger
data
=>
{
AmosAlert
.
success
(
'提示'
,
'删除成功'
);
this
.
reloadPage
();
},
err
=>
{
AmosAlert
.
error
(
'错误'
,
err
);
...
...
@@ -459,7 +458,7 @@ debugger
let
monitorPointId
=
selectedRowKeys
[
0
];
let
fireEquipmentIdh
=
selectedRows
[
0
].
fireEquipmentId
;
form
[
'fireEquipmentId'
]
=
fireEquipmentIdh
;
this
.
setState
({
show
:
true
,
showAdd
:
false
,
...
...
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