|
@@ -12,11 +12,11 @@ import {
|
12
|
12
|
|
13
|
13
|
import POI from '@/components/POI/POI';
|
14
|
14
|
import { CloseOutlined } from '@ant-design/icons';
|
|
15
|
+import './index.less';
|
15
|
16
|
|
16
|
17
|
const FormItem = Form.Item;
|
17
|
18
|
const { TextArea } = Input;
|
18
|
19
|
const { Option } = Select;
|
19
|
|
-const { TreeNode } = Tree;
|
20
|
20
|
const formItemLayout = { labelCol: { span: 6 }, wrapperCol: { span: 14 } };
|
21
|
21
|
|
22
|
22
|
export default (props) => {
|
|
@@ -66,15 +66,19 @@ export default (props) => {
|
66
|
66
|
|
67
|
67
|
const handelNode = (item) => {
|
68
|
68
|
let node = (
|
69
|
|
- <div key={item.orgId} style={{ position: 'relative' }}>
|
70
|
|
- <span onClick={() => handleslect(item.key)}>{item.title}</span>
|
|
69
|
+ <div
|
|
70
|
+ key={item.orgId}
|
|
71
|
+ style={{ justifyContent: 'space-between', display: 'flex', width: '100%' }}
|
|
72
|
+ onClick={() => handleslect(item.key)}
|
|
73
|
+ >
|
|
74
|
+ <span>{item.title}</span>
|
71
|
75
|
<Popconfirm
|
72
|
76
|
title="您是否确认删除 ?"
|
73
|
77
|
onConfirm={() => handleDelete(item.key)}
|
74
|
78
|
okText="确定"
|
75
|
79
|
cancelText="取消"
|
76
|
80
|
>
|
77
|
|
- <CloseOutlined style={{ color: 'red' }} />
|
|
81
|
+ <CloseOutlined style={{ color: 'red', marginTop: '6px' }} />
|
78
|
82
|
</Popconfirm>
|
79
|
83
|
</div>
|
80
|
84
|
);
|
|
@@ -124,7 +128,9 @@ export default (props) => {
|
124
|
128
|
.then((res) => {
|
125
|
129
|
setRegionList(res.records || []);
|
126
|
130
|
})
|
127
|
|
- .catch((err) => {});
|
|
131
|
+ .catch((err) => {
|
|
132
|
+ message.error(err.message || err);
|
|
133
|
+ });
|
128
|
134
|
}, []);
|
129
|
135
|
useEffect(() => {
|
130
|
136
|
if (orgId) {
|
|
@@ -153,7 +159,7 @@ export default (props) => {
|
153
|
159
|
</a>
|
154
|
160
|
}
|
155
|
161
|
>
|
156
|
|
- <Tree titleRender={(data) => handelNode(data)} treeData={data} />
|
|
162
|
+ <Tree className="treeClass" titleRender={(data) => handelNode(data)} treeData={data} />
|
157
|
163
|
</Card>
|
158
|
164
|
</Col>
|
159
|
165
|
<Col span={16}>
|