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