Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
95fca4a3
提交
95fca4a3
authored
7月 24, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into develop
上级
4faf0cdf
794a651d
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
41 行增加
和
18 行删除
+41
-18
index.tsx
...nation/addOrEditInstitution/components/baseInfo/index.tsx
+35
-16
index.tsx
...ination/addOrEditInstitution/components/skuInfo/index.tsx
+0
-1
index.tsx
...ning/ licensureExamination/addOrEditInstitution/index.tsx
+6
-1
没有找到文件。
src/pages/pilotTraining/ licensureExamination/addOrEditInstitution/components/baseInfo/index.tsx
浏览文件 @
95fca4a3
import
{
Button
,
Form
,
Input
,
Radio
,
Select
}
from
'antd'
;
import
{
Button
,
Col
,
Form
,
Input
,
Radio
,
Row
,
Select
}
from
'antd'
;
import
{
Uploader
}
from
'~/components/uploader'
;
import
{
EnvironmentOutlined
,
UploadOutlined
}
from
'@ant-design/icons'
;
import
'./index.scss'
;
...
...
@@ -19,6 +19,7 @@ type insertOrgParametersType = Omit<InterReqType<insertOrgType>, 'trainingProgra
const
BaseInfo
:
FC
<
selfProps
>
=
forwardRef
((
_props
,
ref
)
=>
{
const
[
baseInfoForm
]
=
Form
.
useForm
<
insertOrgParametersType
>
();
const
[
isEditAddress
,
setIsEditAddress
]
=
useState
<
boolean
>
(
false
);
//地图地点选择
const
[
selectMapShow
,
setSelectMapShow
]
=
useState
<
boolean
>
(
false
);
// 位置信息
...
...
@@ -62,6 +63,7 @@ const BaseInfo: FC<selfProps> = forwardRef((_props, ref) => {
setMainImgList
,
setSubImgList
,
setVideoList
,
setIsEditAddress
,
}),
getPosition
:
()
=>
position
,
}));
...
...
@@ -101,21 +103,19 @@ const BaseInfo: FC<selfProps> = forwardRef((_props, ref) => {
baseInfoForm
.
setFieldValue
(
'video'
,
undefined
);
};
//地图选点
const
showSelectMap
=
()
=>
[
setSelectMapShow
(
true
)];
const
showSelectMap
=
()
=>
{
setSelectMapShow
(
true
);
};
const
selectMapSubmit
=
(
value
:
{
lat
:
number
;
lon
:
number
;
address
:
string
;
adCode
:
number
;
})
=>
{
baseInfoForm
.
setFieldsValue
({
region
:
[
value
.
adCode
.
toString
().
substring
(
0
,
2
)
+
'0000'
,
value
.
adCode
.
toString
().
substring
(
0
,
4
)
+
'00'
,
].
join
(
','
),
});
setPosition
(
value
);
baseInfoForm
.
setFieldValue
(
'region'
,
value
.
address
||
undefined
);
setSelectMapShow
(
false
);
setIsEditAddress
(
true
);
};
const
selectMapClose
=
()
=>
{
setSelectMapShow
(
false
);
...
...
@@ -126,6 +126,13 @@ const BaseInfo: FC<selfProps> = forwardRef((_props, ref) => {
setScaleList
(
result
||
[]);
});
};
//地址输入监听
const
inputChangeEvent
=
(
e
:
any
)
=>
{
if
(
position
)
{
position
.
address
=
e
.
target
.
value
;
setPosition
({
...
position
});
}
};
useEffect
(()
=>
{
getLicenceScaleList
();
...
...
@@ -209,14 +216,26 @@ const BaseInfo: FC<selfProps> = forwardRef((_props, ref) => {
name=
'region'
rules=
{
[{
required
:
true
,
message
:
'请选择机构地区'
}]
}
>
<
div
className=
'region-info'
>
{
position
?.
address
?
<
div
>
{
position
?.
address
}
</
div
>
:
''
}
<
Button
icon=
{
<
EnvironmentOutlined
/>
}
type=
'primary'
onClick=
{
showSelectMap
}
></
Button
>
</
div
>
<
Row
justify=
'space-between'
>
{
isEditAddress
?
(
<
Col
span=
{
22
}
>
<
Input
placeholder=
'请输入机构地区'
value=
{
position
?.
address
||
''
}
onChange=
{
inputChangeEvent
}
/>
</
Col
>
)
:
(
''
)
}
<
Col
span=
{
1
}
>
<
Button
icon=
{
<
EnvironmentOutlined
/>
}
type=
'primary'
onClick=
{
showSelectMap
}
></
Button
>
</
Col
>
</
Row
>
</
Form
.
Item
>
<
Form
.
Item
label=
'考点机构'
name=
'testCenter'
>
<
Radio
.
Group
>
...
...
src/pages/pilotTraining/ licensureExamination/addOrEditInstitution/components/skuInfo/index.tsx
浏览文件 @
95fca4a3
...
...
@@ -155,7 +155,6 @@ const SkuInfo: FC<selfProps> = forwardRef((_props, ref) => {
...
col
,
onCell
:
(
record
:
any
)
=>
({
record
,
editable
:
col
.
editable
,
dataIndex
:
col
.
dataIndex
,
title
:
col
.
title
,
editing
:
true
,
...
...
src/pages/pilotTraining/ licensureExamination/addOrEditInstitution/index.tsx
浏览文件 @
95fca4a3
...
...
@@ -65,6 +65,10 @@ const AddOrEditInstitution = () => {
},
[]);
PilotTrainAPI
[
institutionId
?
'updateOrg'
:
'insertOrg'
]({
...
value
[
0
],
region
:
[
baseRef
.
current
.
getPosition
().
adCode
.
toString
().
substring
(
0
,
2
)
+
'0000'
,
baseRef
.
current
.
getPosition
().
adCode
.
toString
().
substring
(
0
,
4
)
+
'00'
,
].
join
(
','
),
trainingProgramsVOS
:
skuReqData
,
detail
:
introduceInfo
,
longitude
:
baseRef
.
current
.
getPosition
().
lon
,
...
...
@@ -109,7 +113,7 @@ const AddOrEditInstitution = () => {
auxiliaryPicture
:
institutionDetail
.
auxiliaryPicture
||
undefined
,
video
:
institutionDetail
.
video
,
name
:
institutionDetail
.
name
,
region
:
institutionDetail
.
region
,
region
:
institutionDetail
.
detailedAddress
,
testCenter
:
institutionDetail
.
testCenter
,
scaleId
:
institutionDetail
.
scaleId
||
undefined
,
description
:
institutionDetail
.
description
||
undefined
,
...
...
@@ -120,6 +124,7 @@ const AddOrEditInstitution = () => {
address
:
institutionDetail
.
detailedAddress
,
adCode
:
institutionDetail
.
region
.
split
(
','
)[
1
],
});
baseRef
.
current
.
getDefaultDataEvent
().
setIsEditAddress
(
true
);
baseRef
.
current
.
getDefaultDataEvent
().
setMainImgList
([
{
id
:
Math
.
random
(),
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论