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
dd208a67
Commit
dd208a67
authored
May 08, 2020
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改设备点位配置页面
parent
748478ae
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
37 deletions
+30
-37
MonitorPointConfig.js
...tLedger/FireResources/FireEquipment/MonitorPointConfig.js
+11
-19
PointConfigModel.js
...entLedger/FireResources/FireEquipment/PointConfigModel.js
+7
-7
index.js
...view/equipmentLedger/FireResources/FireEquipment/index.js
+6
-6
index.js
src/view/bizview/equipmentLedger/FireResources/index.js
+6
-5
No files found.
src/view/bizview/equipmentLedger/FireResources/FireEquipment/MonitorPointConfig.js
View file @
dd208a67
...
...
@@ -44,13 +44,19 @@ const monitorPointTableColumns = self => {
width
:
'25%'
},
{
title
:
'类型'
,
title
:
'
数据
类型'
,
dataIndex
:
'type'
,
key
:
'type'
,
width
:
'10%'
,
render
:
text
=>
typeEnum
[
text
]
?
typeEnum
[
text
]
:
text
},
{
title
:
'指标类型'
,
dataIndex
:
'alarmTypeName'
,
key
:
'alarmTypeName'
,
width
:
'10%'
},
{
title
:
'状态'
,
dataIndex
:
'value'
,
key
:
'value'
,
...
...
@@ -94,21 +100,7 @@ class MonitorPointConfig extends Component {
code
:
[
{
required
:
true
,
message
:
'请输入点位编号'
},
{
pattern
:
new
RegExp
(
/
[^\u
4e00-
\u
9fa5
]
+$/
),
message
:
'编号不能包含中文'
},
{
pattern
:
new
RegExp
(
/^
[^
]
+$/
),
message
:
'编号不能为空或含有空格'
},
// { pattern: new RegExp(/^(-?\d+)(\.\d+)?$/), message: '编号只能是数字' },
{
// validator: (rule, value, callback) => {
// const { pointId } = this.props;
// this.queryAllPointNo(pointId);
// const { pointNoData } = this.state;
// if (!pointNoData.includes(value)) {
// callback();
// } else {
// callback(new Error('该编号已存在!'));
// }
// }
}
{
pattern
:
new
RegExp
(
/^
[^
]
+$/
),
message
:
'编号不能为空或含有空格'
}
],
name
:
[
{
required
:
true
,
message
:
'请输入名称'
}
...
...
@@ -296,7 +288,7 @@ class MonitorPointConfig extends Component {
this
.
editCancel
();
},
error
=>
{
AmosAlert
.
error
(
'错误'
,
'配置失败'
);
AmosAlert
.
error
(
'错误'
,
error
);
}
);
}
else
{
// 新增时
...
...
@@ -308,7 +300,7 @@ class MonitorPointConfig extends Component {
this
.
editCancel
();
},
error
=>
{
AmosAlert
.
error
(
'错误'
,
'配置失败'
);
AmosAlert
.
error
(
'错误'
,
error
);
}
);
}
else
{
...
...
@@ -319,7 +311,7 @@ class MonitorPointConfig extends Component {
this
.
editCancel
();
},
error
=>
{
AmosAlert
.
error
(
'错误'
,
'配置失败'
);
AmosAlert
.
error
(
'错误'
,
error
);
}
);
}
...
...
src/view/bizview/equipmentLedger/FireResources/FireEquipment/PointConfigModel.js
View file @
dd208a67
...
...
@@ -42,12 +42,12 @@ class PointConfigModel extends Component {
};
componentWillReceiveProps
(
nextProps
)
{
let
{
pointId
,
operateFlag
,
recordId
}
=
nextProps
||
{};
if
(
operateFlag
===
1
)
{
//编辑
pointId
=
pointId
?
pointId
:
recordId
;
this
.
getFireEquipmentData
(
pointId
);
}
this
.
loadFireEquipment
();
//
let { pointId, operateFlag, recordId } = nextProps || {};
//
if (operateFlag === 1) { //编辑
//
pointId = pointId ? pointId : recordId;
//
this.getFireEquipmentData(pointId);
//
}
//
this.loadFireEquipment();
}
loadFireEquipment
=
()
=>
{
...
...
@@ -152,7 +152,7 @@ class PointConfigModel extends Component {
<
/Select
>
<
/FormItem
>
<
div
>
{
this
.
renderParamValueView
(
formItemLayout
)}
<
/div
>
<
FormItem
label
=
{
<
span
>
设备
类型
<
/span>} field="alarmType" {...formItemLayout}
>
<
FormItem
label
=
{
<
span
>
指标
类型
<
/span>} field="alarmType" {...formItemLayout}
>
<
Select
data
=
{
alarmTypeData
}
value
=
{
form
.
alarmType
}
...
...
src/view/bizview/equipmentLedger/FireResources/FireEquipment/index.js
View file @
dd208a67
...
...
@@ -183,12 +183,12 @@ class FireEquipmentView extends Component {
};
onDetailClick
=
record
=>
{
//
this.setState({
//
showDetail: true,
//
show: true,
//
fireEquipmentId: record.id,
//
operateFlag: 1
//
});
this
.
setState
({
showDetail
:
true
,
show
:
true
,
fireEquipmentId
:
record
.
id
,
operateFlag
:
1
});
};
onRowClick
=
record
=>
{
...
...
src/view/bizview/equipmentLedger/FireResources/index.js
View file @
dd208a67
...
...
@@ -13,7 +13,8 @@ import { getFireEquipmentListAction, getFireTruckListAction } from './../../../.
const
loginUserName
=
Store
.
lsTool
.
read
(
'userName'
);
const
filterUser
=
[
'opera1'
,
'opera2'
];
const
filterPointUser
=
[
'admin'
,
'superadmin'
];
// const filterPointUser = ['admin', 'superadmin'];
const
filterPointUser
=
[];
const
{
TabList
,
Tab
,
TabPanel
}
=
Tabs
;
const
tabs
=
[
{
id
:
'1'
,
closable
:
false
,
title
:
'消防车'
},
...
...
@@ -116,10 +117,10 @@ class FireResourceView extends Component {
filter
=
true
;
_tabs
=
tabs
.
filter
(
item
=>
item
.
title
!==
'火探'
);
}
if
(
!
filterPointUser
.
includes
(
loginUserName
))
{
filterPoint
=
true
;
_tabs
=
_tabs
.
filter
(
item
=>
item
.
title
!==
'消防点位'
);
}
//
if (!filterPointUser.includes(loginUserName)) {
//
filterPoint = true;
//
_tabs = _tabs.filter(item => item.title !== '消防点位');
//
}
return
(
<
div
className
=
"convertor-fire-resource"
style
=
{{
background
:
'#33333'
,
height
:
'100%'
}}
>
...
...
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