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
8a9ee1f4
Commit
8a9ee1f4
authored
Mar 10, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增TOPO节点添加及删除功能
parent
1407f9c8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
22 deletions
+38
-22
urlConsts.js
src/consts/urlConsts.js
+1
-0
preControlService.js
src/services/preControlService.js
+8
-0
leaderStruct.scss
src/styles/view/planMgmt/leaderStruct.scss
+9
-0
conf.js
src/view/planMgmt/common/conf.js
+1
-1
LeaderStructModel.js
src/view/planMgmt/view/leaderStruct/LeaderStructModel.js
+19
-21
index.js
src/view/planMgmt/view/leaderStruct/index.js
+0
-0
No files found.
src/consts/urlConsts.js
View file @
8a9ee1f4
...
...
@@ -224,6 +224,7 @@ export const FasSerUrl = {
updateTopographyUrl
:
completePrefix
(
baseURI
,
'api/Topography/updateTopo'
),
//更新Topo图数据
queryNodeDetailUrl
:
completePrefix
(
baseURI
,
'api/Topography/detail/{id}'
),
//获取node节点详情
saveNodeDetailUrl
:
completePrefix
(
baseURI
,
'api/Topography/detail'
),
//保存nodeDetail详情
deleteTopoUrl
:
completePrefix
(
baseURI
,
'api/Topography/{type}/{id}'
),
//删除点/线
};
...
...
src/services/preControlService.js
View file @
8a9ee1f4
...
...
@@ -221,3 +221,10 @@ export const nodeDetailTopoAction = (id) => {
export
const
nodeDetailTopoSaveAction
=
(
nodeDatil
)
=>
{
return
commonPost
(
FasSerUrl
.
saveNodeDetailUrl
,
nodeDatil
);
};
/**
* 删除节点/线
*/
export
const
deleteTopoAction
=
(
id
,
type
)
=>
{
return
commonDelete
(
formatUrl
(
FasSerUrl
.
deleteTopoUrl
,
{
id
,
type
}));
};
\ No newline at end of file
src/styles/view/planMgmt/leaderStruct.scss
View file @
8a9ee1f4
...
...
@@ -44,6 +44,15 @@
border-right-style
:
solid
;
border-width
:
1px
;
.leader-struct-palette
{
border
:
1px
solid
rgb
(
201
,
201
,
201
);
height
:
10%
;
}
.leader-struct-diagram
{
height
:
90%
;
}
.tooltip-content
{
width
:
251px
;
background
:
#345fa6
;
...
...
src/view/planMgmt/common/conf.js
View file @
8a9ee1f4
...
...
@@ -17,5 +17,5 @@ export const leaderStructButton = [
// { key: 'add', text: '添加', icon: 'tianjia' },
{
key
:
'edit'
,
text
:
'编辑'
,
icon
:
'xiugai'
},
{
key
:
'save'
,
text
:
'保存'
,
icon
:
'baocun'
},
//
{ key: 'delete', text: '删除', icon: 'shanchu' }
{
key
:
'delete'
,
text
:
'删除'
,
icon
:
'shanchu'
}
];
src/view/planMgmt/view/leaderStruct/LeaderStructModel.js
View file @
8a9ee1f4
...
...
@@ -66,7 +66,6 @@ class LeaderStructModel extends Component {
componentWillMount
=
()
=>
{
const
{
selectNode
}
=
this
.
props
||
{};
debugger
;
this
.
getNodeDetail
(
selectNode
);
};
...
...
@@ -116,35 +115,34 @@ class LeaderStructModel extends Component {
this
.
setState
({
form
});
}
handleSubmit
=
nodeid
=>
{
debugger
;
handleSubmit
=
node
=>
{
this
.
form
.
validate
((
valid
,
dataValues
)
=>
{
debugger
;
if
(
valid
)
{
let
{
form
}
=
this
.
state
;
form
.
nodeid
=
nodeid
;
this
.
nodeDetailEdit
(
form
);
form
.
nodeid
=
node
.
nodeid
;
form
.
nodekey
=
node
.
key
;
// this.nodeDetailEdit(form);
form
.
nodeDetail
=
JSON
.
stringify
(
form
.
nodeDetail
);
this
.
props
.
saveTopography
(
form
);
}
else
{
return
false
;
}
});
};
nodeDetailEdit
=
body
=>
{
debugger
;
body
.
nodeDetail
=
JSON
.
stringify
(
body
.
nodeDetail
);
nodeDetailTopoSaveAction
(
body
).
then
(
data
=>
{
AmosAlert
.
success
(
'提示'
,
'操作成功'
);
// this.props.reloadPage();
this
.
props
.
cancel
();
this
.
props
.
reloadSelectNode
(
this
.
props
.
selectNode
.
id
);
},
err
=>
{
AmosAlert
.
error
(
'提示'
,
err
);
}
);
};
// nodeDetailEdit = body => {
// body.nodeDetail = JSON.stringify(body.nodeDetail);
// nodeDetailTopoSaveAction(body).then(
// data => {
// AmosAlert.success('提示', '操作成功');
// this.props.cancel();
// this.props.reloadSelectNode(this.props.selectNode.id);
// },
// err => {
// AmosAlert.error('提示', err);
// }
// );
// };
/**
* 获取表格刷新方法
...
...
src/view/planMgmt/view/leaderStruct/index.js
View file @
8a9ee1f4
This diff is collapsed.
Click to expand it.
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