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
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
28 deletions
+41
-28
amos.config.js
amos.config.js
+1
-1
preControlService.js
src/services/preControlService.js
+9
-1
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
+0
-1
No files found.
amos.config.js
View file @
4eef7786
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
convertorURI
:
'http://172.16.3.63:8083/'
,
convertorURI
:
'http://172.16.3.63:8083/'
,
patrolURI
:
'http://172.16.3.122:8082/'
,
patrolURI
:
'http://172.16.3.122:8082/'
,
securityBaseURI
:
'http://172.16.10.72:10005/'
,
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/'
,
pluginURI
:
'http://172.16.10.91:8091/'
,
studioURI
:
'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
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'
;
import
{
commonGet
,
commonPost
,
commonDelete
,
commonPut
}
from
'./../utils/request'
;
export
const
queryRiskLevelAction
=
(
filter
,
page
,
size
)
=>
{
export
const
queryRiskLevelAction
=
(
filter
,
page
,
size
)
=>
{
...
@@ -161,6 +161,14 @@ export const queryFmeaControlObjAction = (ids) => {
...
@@ -161,6 +161,14 @@ export const queryFmeaControlObjAction = (ids) => {
};
};
/**
/**
* 获取预案下拉框
*/
export
const
queryLoadPackagesAction
=
(
project
)
=>
{
let
url
=
formatUrl
(
FscSerUrl
.
loadPackagesUrl
,
{
project
});
return
commonGet
(
url
);
};
/**
* 获取预案树
* 获取预案树
*/
*/
export
const
getPlanTreeAction
=
()
=>
{
export
const
getPlanTreeAction
=
()
=>
{
...
...
src/view/bizview/common/tableComponent/table/AmosGridTable.js
View file @
4eef7786
...
@@ -125,10 +125,7 @@ class AmosGridTable extends Component {
...
@@ -125,10 +125,7 @@ class AmosGridTable extends Component {
* 获取表格数据(刷新)
* 获取表格数据(刷新)
*/
*/
reload
=
()
=>
{
reload
=
()
=>
{
debugger
let
{
current
,
pageSize
,
filter
,
otherFilter
}
=
this
.
state
;
let
{
current
,
pageSize
,
filter
,
otherFilter
}
=
this
.
state
;
this
.
props
.
getTableDataAction
({
current
:
current
-
1
,
pageSize
},
JSON
.
stringify
(
filter
),
otherFilter
);
this
.
props
.
getTableDataAction
({
current
:
current
-
1
,
pageSize
},
JSON
.
stringify
(
filter
),
otherFilter
);
this
.
getHeightOffset
();
this
.
getHeightOffset
();
}
}
...
@@ -184,7 +181,6 @@ class AmosGridTable extends Component {
...
@@ -184,7 +181,6 @@ class AmosGridTable extends Component {
if
(
operateCol
){
if
(
operateCol
){
columns
[
columns
.
length
-
1
].
render
=
(
text
,
record
)
=>
this
.
addOperateCol
(
text
,
record
);
columns
[
columns
.
length
-
1
].
render
=
(
text
,
record
)
=>
this
.
addOperateCol
(
text
,
record
);
}
}
debugger
let
tepmPage
=
Object
.
assign
({
let
tepmPage
=
Object
.
assign
({
size
:
'small'
,
size
:
'small'
,
total
:
totals
,
total
:
totals
,
...
...
src/view/bizview/equipmentLedger/Equipment/EquipmentModel.js
View file @
4eef7786
...
@@ -7,7 +7,7 @@ import { FasSerUrl } from '../../../../consts/urlConsts';
...
@@ -7,7 +7,7 @@ import { FasSerUrl } from '../../../../consts/urlConsts';
import
{
Form
,
Upload
,
Input
,
Select
,
Radio
,
Modal
,
AmosAlert
,
Icon
}
from
'amos-framework'
;
import
{
Form
,
Upload
,
Input
,
Select
,
Radio
,
Modal
,
AmosAlert
,
Icon
}
from
'amos-framework'
;
import
PropTypes
from
'amos-react-router/lib/PropTypes'
;
import
PropTypes
from
'amos-react-router/lib/PropTypes'
;
import
{
getEquipmentDataAction
,
getFireStationDataAction
,
getPrePlanPictureAction
}
from
'../../../../services/ledgerService'
;
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
{
convertImgUrlToFile
,
getBase64
}
from
'./../../../../utils/FileUtils'
;
import
{
baseURI
,
FscSerUrl
}
from
'../../../../consts/urlConsts'
;
import
{
baseURI
,
FscSerUrl
}
from
'../../../../consts/urlConsts'
;
...
@@ -63,7 +63,8 @@ class EquipmentModel extends Component {
...
@@ -63,7 +63,8 @@ class EquipmentModel extends Component {
previewVisible
:
false
,
previewVisible
:
false
,
previewImage
:
''
,
previewImage
:
''
,
project
:
[],
project
:
[],
riskSourceData
:
[]
riskSourceData
:
[],
prefix
:
''
};
};
}
}
...
@@ -94,8 +95,9 @@ class EquipmentModel extends Component {
...
@@ -94,8 +95,9 @@ class EquipmentModel extends Component {
};
};
onPeservePlanChange
=
(
key
,
item
)
=>
{
onPeservePlanChange
=
(
key
,
item
)
=>
{
const
{
form
}
=
this
.
state
;
const
{
form
,
prefix
}
=
this
.
state
;
let
value
=
item
.
project
?
item
.
project
.
substring
(
0
)
+
'/'
+
item
.
id
:
''
;
//let value = item.project ? item.project.substring(0) + '/' + item.packageId : '' ;
let
value
=
prefix
?
prefix
+
'/'
+
item
.
packageId
:
''
;
form
[
key
]
=
value
;
form
[
key
]
=
value
;
this
.
setState
({
form
});
this
.
setState
({
form
});
};
};
...
@@ -286,24 +288,32 @@ class EquipmentModel extends Component {
...
@@ -286,24 +288,32 @@ class EquipmentModel extends Component {
};
};
queryLoadPackages =(project)=> {
queryLoadPackages =(project)=> {
fetch(formatUrl(url, { project }), {
queryLoadPackagesAction(project).then(data => {
method: '
post
',
if (data){
headers: {
let prefix = data[0].project.replace('
/
', '');
'
Accept
': '
application
/
json
;
charset
=
UTF
-
8
',
this.setState({ prefix, project: data[0].resourceItems });
'
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 => {
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() {
render() {
...
@@ -491,7 +501,7 @@ class EquipmentModel extends Component {
...
@@ -491,7 +501,7 @@ class EquipmentModel extends Component {
className="fire-equip-select"
className="fire-equip-select"
data={project}
data={project}
value={form.reservePlan ? form.reservePlan.split('
/
')[1] : ''}
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)}
onChange={(e,item) => this.onPeservePlanChange('
reservePlan
', item)}
/>
/>
</FormItem>
</FormItem>
...
...
src/view/bizview/equipmentLedger/FireResources/FireEquipment/MonitorPointConfig.js
View file @
4eef7786
...
@@ -171,7 +171,6 @@ class MonitorPointConfig extends Component {
...
@@ -171,7 +171,6 @@ class MonitorPointConfig extends Component {
}
}
getMonitorPointListData
=
(
param
)
=>
{
getMonitorPointListData
=
(
param
)
=>
{
debugger
if
(
!
param
)
{
if
(
!
param
)
{
return
;
return
;
}
}
...
...
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