Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
4faf0cdf
提交
4faf0cdf
authored
7月 24, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into develop
上级
27a5c3fe
f0dfbf16
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
102 行增加
和
93 行删除
+102
-93
.env.production
env/.env.production
+2
-2
kustomization.yaml
kustomization/overlays/prod/kustomization.yaml
+1
-1
index.tsx
src/components/select-map/index.tsx
+7
-3
index.tsx
...categoryManage/category/components/EditableCell/index.tsx
+1
-1
index.tsx
...s/customManage/customIdentity/comp/addEditModal/index.tsx
+22
-25
index.scss
...nation/addOrEditInstitution/components/skuInfo/index.scss
+4
-4
index.tsx
...ination/addOrEditInstitution/components/skuInfo/index.tsx
+24
-27
index.tsx
...ning/ licensureExamination/addOrEditInstitution/index.tsx
+28
-24
index.tsx
...Training/ licensureExamination/institutionsList/index.tsx
+13
-6
没有找到文件。
env/.env.production
浏览文件 @
4faf0cdf
#请求接口地址
#
VITE_REQUEST_BASE_URL='https://www.iuav.shop'
VITE_REQUEST_BASE_URL='https://test.iuav.shop'
VITE_REQUEST_BASE_URL='https://www.iuav.shop'
#
VITE_REQUEST_BASE_URL='https://test.iuav.shop'
#VITE_REQUEST_BASE_URL='/api'
#旧版接口地址
#VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn'
...
...
kustomization/overlays/prod/kustomization.yaml
浏览文件 @
4faf0cdf
...
...
@@ -14,4 +14,4 @@ patches:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly/admin
newTag
:
657c23a46ef6de5cb873894e258f4783b330cd59
newTag
:
db08d3f7fa32fb28ac7ffbea891921f8fc26c780
src/components/select-map/index.tsx
浏览文件 @
4faf0cdf
...
...
@@ -55,7 +55,7 @@ const SelectMapModal: FC<propType> = (props) => {
}
};
// 防抖
const
handleSearchDebounced
=
debounce
(
handleSearch
,
5
00
);
const
handleSearchDebounced
=
debounce
(
handleSearch
,
10
00
);
// 选择了地址
const
handleSearchAddress
=
(
e
:
number
)
=>
{
if
(
!
isNaN
(
e
))
{
...
...
@@ -118,8 +118,12 @@ const SelectMapModal: FC<propType> = (props) => {
});
}}
onSearchAddress={(e) => {
console.log('筛选e--->', e);
setAddressList(e.map((i, j) => ({ label: i.name, value: j, data: i, searchKey })));
// console.log('筛选e--->', e);
setAddressList(
e
.filter((i) => (i.location as any) !== '')
.map((i, j) => ({ label: i.name, value: j, data: i, searchKey })),
);
}}
></MapComponent>
<div
...
...
src/pages/categoryManage/category/components/EditableCell/index.tsx
浏览文件 @
4faf0cdf
import
{
Form
,
Input
,
InputNumber
}
from
'antd'
;
import
{
Form
,
Input
}
from
'antd'
;
interface
Item
{
key
:
string
;
...
...
src/pages/customManage/customIdentity/comp/addEditModal/index.tsx
浏览文件 @
4faf0cdf
...
...
@@ -5,7 +5,7 @@ import {
listUserApplyTag
,
}
from
'~/api/interface/customManageType'
;
import
{
InterDataType
,
InterListType
,
InterReqType
}
from
'~/api/interface'
;
import
{
Button
,
Form
,
Input
,
message
,
Modal
,
Rate
,
Select
,
Space
}
from
'antd'
;
import
{
Button
,
Form
,
Input
,
message
,
Modal
,
Rate
,
Select
}
from
'antd'
;
import
{
CustomManageAPI
}
from
'~/api'
;
import
SelectMapModal
from
'~/components/select-map'
;
...
...
@@ -50,6 +50,7 @@ const AddEditModal: FC<propType> = (props) => {
form
.
setFieldsValue
({
...
res
.
result
,
name
:
res
.
result
.
name
||
data
?.
companyName
,
address
:
res
.
result
.
address
||
detail
?.
address
,
});
setDetail
(
res
.
result
);
// console.log('获取审批详情 -->', res.result);
...
...
@@ -83,8 +84,8 @@ const AddEditModal: FC<propType> = (props) => {
const
res
=
await
CustomManageAPI
.
editUserApplyTag
({
id
:
Number
(
data
?.
id
),
...
detail
,
...
values
,
...
address
,
...
values
,
});
if
(
res
&&
res
.
code
===
'200'
)
{
message
.
success
(
'操作成功'
);
...
...
@@ -117,29 +118,25 @@ const AddEditModal: FC<propType> = (props) => {
>
<
Select
placeholder=
'请选择加盟类型'
allowClear
options=
{
cooperationList
}
disabled
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'网点地址'
name=
'address'
rules=
{
[{
required
:
true
,
message
:
'请选择网点地址'
}]
}
>
<
Space
.
Compact
style=
{
{
width
:
'100%'
}
}
>
<
Input
placeholder=
'请选择网点地址'
maxLength=
{
50
}
allowClear
disabled
value=
{
form
.
getFieldValue
(
'address'
)
||
detail
?.
address
}
/>
<
Button
type=
'primary'
onClick=
{
()
=>
{
setOpenAddress
(
true
);
}
}
>
选择位置
</
Button
>
</
Space
.
Compact
>
</
Form
.
Item
>
<
div
style=
{
{
display
:
'flex'
}
}
>
<
Form
.
Item
label=
'网点地址'
name=
'address'
rules=
{
[{
required
:
true
,
message
:
'请选择网点地址'
}]
}
style=
{
{
width
:
'80%'
,
marginLeft
:
'5%'
}
}
>
<
Input
placeholder=
'请选择网点地址'
maxLength=
{
50
}
allowClear
/>
</
Form
.
Item
>
<
Button
type=
'primary'
onClick=
{
()
=>
{
setOpenAddress
(
true
);
}
}
style=
{
{
transform
:
'translateX(-50px)'
}
}
>
选择位置
</
Button
>
</
div
>
<
Form
.
Item
label=
'服务资质'
name=
'content'
...
...
src/pages/pilotTraining/ licensureExamination/addOrEditInstitution/components/skuInfo/index.scss
浏览文件 @
4faf0cdf
...
...
@@ -4,10 +4,10 @@
font-weight
:
bold
;
margin-bottom
:
10px
;
line-height
:
20px
;
&
:before
{
content
:
'*'
;
color
:
red
;
}
//
&:before{
//
content: '*';
//
color: red;
//
}
}
&
-table
{
...
...
src/pages/pilotTraining/ licensureExamination/addOrEditInstitution/components/skuInfo/index.tsx
浏览文件 @
4faf0cdf
...
...
@@ -15,11 +15,9 @@ type ColumnTypes = Exclude<EditableTableProps['columns'], undefined>;
type
tableDataType
=
{
gradeId
:
number
;
id
:
number
;
mainImage
:
string
;
modelsId
:
number
;
price
:
number
;
typeId
:
number
;
fileList
:
any
[];
};
//机型下拉返回类型
type
modelsListType
=
InterDataType
<
licenceModelsListType
>
;
...
...
@@ -49,6 +47,9 @@ const SkuInfo: FC<selfProps> = forwardRef((_props, ref) => {
return
Promise
.
reject
(
new
Error
(
'价格大于0且小于10万'
));
}
}
else
{
if
(
value
===
undefined
||
value
===
''
||
value
===
null
)
{
return
Promise
.
resolve
();
}
return
Promise
.
reject
(
new
Error
(
'价格为数字且保留小数点后两位'
));
}
return
Promise
.
resolve
();
...
...
@@ -67,15 +68,15 @@ const SkuInfo: FC<selfProps> = forwardRef((_props, ref) => {
render
:
(
_text
:
string
,
_record
,
index
:
number
)
=>
index
+
1
,
width
:
'10%'
,
},
{
title
:
'培训主图'
,
align
:
'center'
,
dataIndex
:
'mainImage'
,
width
:
'10%'
,
inputType
:
'uploader'
,
editable
:
true
,
rules
:
[{
required
:
true
,
message
:
'请上传培训主图'
}],
},
//
{
//
title: '培训主图',
//
align: 'center',
//
dataIndex: 'mainImage',
//
width: '10%',
//
inputType: 'uploader',
//
editable: true,
//
rules: [{ required: true, message: '请上传培训主图' }],
//
},
{
title
:
'培训机型'
,
align
:
'center'
,
...
...
@@ -84,7 +85,7 @@ const SkuInfo: FC<selfProps> = forwardRef((_props, ref) => {
inputType
:
'select'
,
width
:
'15%'
,
selectOption
:
modelsList
,
rules
:
[{
required
:
true
,
message
:
'请选择培训机型'
}],
//
rules: [{ required: true, message: '请选择培训机型' }],
},
{
title
:
'培训等级'
,
...
...
@@ -94,7 +95,7 @@ const SkuInfo: FC<selfProps> = forwardRef((_props, ref) => {
inputType
:
'select'
,
width
:
'15%'
,
selectOption
:
gradeList
,
rules
:
[{
required
:
true
,
message
:
'请选择培训等级'
}],
//
rules: [{ required: true, message: '请选择培训等级' }],
},
{
title
:
'培训类型'
,
...
...
@@ -104,7 +105,7 @@ const SkuInfo: FC<selfProps> = forwardRef((_props, ref) => {
inputType
:
'select'
,
width
:
'15%'
,
selectOption
:
typeList
,
rules
:
[{
required
:
true
,
message
:
'请选择培训类型'
}],
//
rules: [{ required: true, message: '请选择培训类型' }],
},
{
title
:
'培训价格'
,
...
...
@@ -112,7 +113,7 @@ const SkuInfo: FC<selfProps> = forwardRef((_props, ref) => {
editable
:
true
,
dataIndex
:
'price'
,
width
:
'12%'
,
rules
:
[{
required
:
tru
e
,
validator
:
priceValidator
}],
rules
:
[{
required
:
fals
e
,
validator
:
priceValidator
}],
},
{
title
:
'操作'
,
...
...
@@ -160,7 +161,7 @@ const SkuInfo: FC<selfProps> = forwardRef((_props, ref) => {
editing
:
true
,
selectOption
:
col
.
selectOption
,
inputType
:
col
.
inputType
,
uploadSuccess
:
col
.
inputType
===
'uploader'
?
uploadSuccess
:
undefined
,
//
uploadSuccess: col.inputType === 'uploader' ? uploadSuccess : undefined,
rules
:
col
.
rules
,
}),
};
...
...
@@ -169,11 +170,9 @@ const SkuInfo: FC<selfProps> = forwardRef((_props, ref) => {
{
id
:
Math
.
random
(),
gradeId
:
-
1
,
mainImage
:
''
,
modelsId
:
-
1
,
price
:
-
1
,
typeId
:
-
1
,
fileList
:
[],
},
]);
useImperativeHandle
(
ref
,
()
=>
({
...
...
@@ -191,11 +190,9 @@ const SkuInfo: FC<selfProps> = forwardRef((_props, ref) => {
{
id
:
Math
.
random
(),
gradeId
:
-
1
,
mainImage
:
''
,
modelsId
:
-
1
,
price
:
-
1
,
typeId
:
-
1
,
fileList
:
[],
},
]);
};
...
...
@@ -206,13 +203,13 @@ const SkuInfo: FC<selfProps> = forwardRef((_props, ref) => {
setTableData
([...
tableData
]);
};
//主图上传
const
uploadSuccess
=
(
record
:
tableDataType
,
result
:
any
)
=>
{
const
index
:
number
=
tableData
.
findIndex
((
v
)
=>
v
.
id
===
record
.
id
);
skuForm
.
setFieldValue
(
'mainImage'
+
record
.
id
,
result
[
0
].
url
);
tableData
[
index
].
mainImage
=
result
[
0
].
url
;
tableData
[
index
].
fileList
=
result
;
setTableData
([...
tableData
]);
};
//
const uploadSuccess = (record: tableDataType, result: any) => {
//
const index: number = tableData.findIndex((v) => v.id === record.id);
//
skuForm.setFieldValue('mainImage' + record.id, result[0].url);
//
tableData[index].mainImage = result[0].url;
//
tableData[index].fileList = result;
//
setTableData([...tableData]);
//
};
//培训机型下拉
const
getLicenceModelsList
=
()
=>
{
PilotTrainAPI
.
getLicenceModelsList
().
then
(({
result
})
=>
{
...
...
src/pages/pilotTraining/ licensureExamination/addOrEditInstitution/index.tsx
浏览文件 @
4faf0cdf
...
...
@@ -46,14 +46,23 @@ const AddOrEditInstitution = () => {
if
(
!
introduceInfo
)
{
return
message
.
warning
(
'机构介绍不能为空'
);
}
const
skuReqData
=
skuRef
.
current
.
getTableData
().
map
((
v
:
tableDataType
)
=>
{
return
Object
.
getOwnPropertyNames
(
v
).
reduce
((
pre
:
any
,
cur
:
string
)
=>
{
const
skuReqData
=
skuRef
.
current
.
getTableData
().
reduce
((
list
:
any
,
v
:
tableDataType
)
=>
{
const
Obj
=
Object
.
getOwnPropertyNames
(
v
).
reduce
((
pre
:
any
,
cur
:
string
)
=>
{
if
(
Object
.
getOwnPropertyNames
(
value
[
1
]).
includes
(
cur
+
v
.
id
))
{
pre
[
cur
]
=
value
[
1
][
cur
+
v
.
id
];
}
return
pre
;
},
{});
});
if
(
Object
.
getOwnPropertyNames
(
Obj
).
length
&&
!
Object
.
getOwnPropertyNames
(
Obj
).
every
(
(
key
:
string
)
=>
Obj
[
key
]
===
''
||
Obj
[
key
]
===
undefined
||
Obj
[
key
]
===
null
,
)
)
{
list
.
push
(
Obj
);
}
return
list
;
},
[]);
PilotTrainAPI
[
institutionId
?
'updateOrg'
:
'insertOrg'
]({
...
value
[
0
],
trainingProgramsVOS
:
skuReqData
,
...
...
@@ -139,27 +148,22 @@ const AddOrEditInstitution = () => {
]
:
[],
);
const
programsList
=
institutionDetail
.
programsDOList
.
map
((
v
)
=>
({
...
v
,
fileList
:
[
{
id
:
Math
.
random
(),
uid
:
Math
.
random
(),
name
:
'img'
,
url
:
v
.
mainImage
,
},
],
}));
skuRef
.
current
.
setDefaultDataEvent
().
setDefaultTableData
(
programsList
);
const
skuObj
=
institutionDetail
.
programsDOList
.
reduce
((
pre
:
any
,
cur
:
any
)
=>
{
Object
.
getOwnPropertyNames
(
cur
)
.
filter
((
key
:
string
)
=>
key
!==
'id'
)
.
forEach
((
v
:
string
)
=>
{
pre
[
v
+
cur
.
id
]
=
cur
[
v
];
});
return
pre
;
},
{});
skuRef
.
current
.
getForm
().
setFieldsValue
(
skuObj
);
if
(
institutionDetail
.
programsDOList
)
{
const
programsList
=
institutionDetail
.
programsDOList
.
map
((
v
)
=>
({
...
v
,
}));
skuRef
.
current
.
setDefaultDataEvent
().
setDefaultTableData
(
programsList
);
const
skuObj
=
institutionDetail
.
programsDOList
.
reduce
((
pre
:
any
,
cur
:
any
)
=>
{
Object
.
getOwnPropertyNames
(
cur
)
.
filter
((
key
:
string
)
=>
key
!==
'id'
)
.
forEach
((
v
:
string
)
=>
{
pre
[
v
+
cur
.
id
]
=
cur
[
v
];
});
return
pre
;
},
{});
skuRef
.
current
.
getForm
().
setFieldsValue
(
skuObj
);
}
setIntroduceInfo
(
institutionDetail
.
detail
);
}
},
[
institutionDetail
]);
...
...
src/pages/pilotTraining/ licensureExamination/institutionsList/index.tsx
浏览文件 @
4faf0cdf
...
...
@@ -79,12 +79,19 @@ const InstitutionsList = () => {
{
title
:
'培训类型'
,
align
:
'center'
,
render
:
(
_text
:
string
,
record
)
=>
record
.
programsDOList
[
0
].
gradeName
+
'/'
+
record
.
programsDOList
[
0
].
modelsName
+
'/'
+
record
.
programsDOList
[
0
].
typeName
,
render
:
(
_text
:
string
,
record
:
any
)
=>
record
.
programsDOList
?
Object
.
getOwnPropertyNames
(
record
.
programsDOList
[
0
])
.
filter
(
(
key
:
string
)
=>
[
'gradeName'
,
'modelsName'
,
'typeName'
].
includes
(
key
)
&&
record
.
programsDOList
[
0
][
key
]
!==
undefined
&&
record
.
programsDOList
[
0
][
key
]
!==
''
&&
record
.
programsDOList
[
0
][
key
]
!==
null
,
)
.
map
((
key
:
string
)
=>
record
.
programsDOList
[
0
][
key
])
.
join
(
'/'
)
:
''
,
width
:
'20%'
,
},
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论