Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
admin-ci-test
Commits
43cd8d88
提交
43cd8d88
authored
6月 19, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
功能:服务分页,修复租赁商品修改400问题
上级
ef83c6bc
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
67 行增加
和
6 行删除
+67
-6
.env.production
env/.env.production
+2
-2
index.tsx
...ages/mallManage/rentGoods/rentAddOrEditOrDetail/index.tsx
+5
-1
index.tsx
src/pages/mallManage/serviceManage/serviceList/index.tsx
+60
-3
没有找到文件。
env/.env.production
浏览文件 @
43cd8d88
#请求接口地址
#请求接口地址
#
VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn'
VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn'
VITE_REQUEST_BASE_URL='https://test.iuav.shop'
#
VITE_REQUEST_BASE_URL='https://test.iuav.shop'
#VITE_REQUEST_BASE_URL='/api'
#VITE_REQUEST_BASE_URL='/api'
#旧版接口地址
#旧版接口地址
#VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn'
#VITE_REQUEST_BASE_URL='https://iuav.mmcuav.cn'
...
...
src/pages/mallManage/rentGoods/rentAddOrEditOrDetail/index.tsx
浏览文件 @
43cd8d88
...
@@ -186,7 +186,11 @@ const GoodsAddOrEditOrDetail = () => {
...
@@ -186,7 +186,11 @@ const GoodsAddOrEditOrDetail = () => {
...
values
.
subImg
.
map
((
v
:
any
)
=>
({
...
values
.
subImg
.
map
((
v
:
any
)
=>
({
imgType
:
1
,
imgType
:
1
,
imgUrl
:
v
.
url
,
imgUrl
:
v
.
url
,
id
:
goodsDetail
?
goodsDetail
.
images
.
some
((
i
)
=>
i
.
id
===
v
.
id
)
:
undefined
,
id
:
goodsDetail
?
goodsDetail
.
images
.
some
((
i
)
=>
i
.
id
===
v
.
id
)
?
v
.
id
:
undefined
:
undefined
,
})),
})),
);
);
}
}
...
...
src/pages/mallManage/serviceManage/serviceList/index.tsx
浏览文件 @
43cd8d88
import
React
,
{
FC
,
useEffect
,
useState
}
from
'react'
;
import
React
,
{
FC
,
useEffect
,
use
Ref
,
use
State
}
from
'react'
;
import
{
useNavigate
}
from
'react-router-dom'
;
import
{
useNavigate
,
useSearchParams
}
from
'react-router-dom'
;
import
{
searchColumns
}
from
'~/components/search-box'
;
import
{
searchColumns
}
from
'~/components/search-box'
;
import
SearchBox
from
'~/components/search-box'
;
import
SearchBox
from
'~/components/search-box'
;
import
AddOrEditServiceModal
from
'./components/addOrEditServiceModal'
;
import
AddOrEditServiceModal
from
'./components/addOrEditServiceModal'
;
...
@@ -16,6 +16,7 @@ import { CategoryManageAPI, MallManageAPI } from '~/api';
...
@@ -16,6 +16,7 @@ import { CategoryManageAPI, MallManageAPI } from '~/api';
import
{
InterDataType
,
InterReqType
,
PaginationProps
}
from
'~/api/interface'
;
import
{
InterDataType
,
InterReqType
,
PaginationProps
}
from
'~/api/interface'
;
import
{
categoryListType
}
from
'~/api/interface/categoryManage'
;
import
{
categoryListType
}
from
'~/api/interface/categoryManage'
;
import
{
serviceType
}
from
'~/api/interface/mallManageType'
;
import
{
serviceType
}
from
'~/api/interface/mallManageType'
;
import
qs
from
'query-string'
;
//分类返回类型
//分类返回类型
type
categoryType
=
InterDataType
<
categoryListType
>
[
'list'
];
type
categoryType
=
InterDataType
<
categoryListType
>
[
'list'
];
...
@@ -25,7 +26,9 @@ type serviceListType = InterDataType<serviceType>['list'];
...
@@ -25,7 +26,9 @@ type serviceListType = InterDataType<serviceType>['list'];
type
serviceParametersType
=
Omit
<
InterReqType
<
serviceType
>
,
'pageSize'
|
'pageNo'
>
;
type
serviceParametersType
=
Omit
<
InterReqType
<
serviceType
>
,
'pageSize'
|
'pageNo'
>
;
const
ServiceList
:
FC
<
any
>
=
()
=>
{
const
ServiceList
:
FC
<
any
>
=
()
=>
{
const
searchRef
=
useRef
<
any
>
();
const
navigate
=
useNavigate
();
const
navigate
=
useNavigate
();
const
[
searchParams
,
setSearchParams
]
=
useSearchParams
();
const
tabList
=
[
const
tabList
=
[
{
{
key
:
'1'
,
key
:
'1'
,
...
@@ -156,7 +159,11 @@ const ServiceList: FC<any> = () => {
...
@@ -156,7 +159,11 @@ const ServiceList: FC<any> = () => {
const
onTabChange
=
(
key
:
string
)
=>
{
const
onTabChange
=
(
key
:
string
)
=>
{
pagination
.
pageNo
=
1
;
pagination
.
pageNo
=
1
;
pagination
.
pageSize
=
10
;
setQuery
({
...
query
,
displayState
:
key
===
'1'
?
undefined
:
key
===
'2'
?
0
:
1
});
setQuery
({
...
query
,
displayState
:
key
===
'1'
?
undefined
:
key
===
'2'
?
0
:
1
});
setSearchParams
(
qs
.
stringify
({
...
query
,
displayState
:
key
===
'1'
?
'all'
:
key
===
'2'
?
0
:
1
}),
);
setActiveTabKey
(
key
);
setActiveTabKey
(
key
);
getServiceList
({
...
query
,
displayState
:
key
===
'1'
?
undefined
:
key
===
'2'
?
0
:
1
});
getServiceList
({
...
query
,
displayState
:
key
===
'1'
?
undefined
:
key
===
'2'
?
0
:
1
});
};
};
...
@@ -267,6 +274,14 @@ const ServiceList: FC<any> = () => {
...
@@ -267,6 +274,14 @@ const ServiceList: FC<any> = () => {
const
paginationChange
=
(
pageNo
:
number
,
pageSize
:
number
)
=>
{
const
paginationChange
=
(
pageNo
:
number
,
pageSize
:
number
)
=>
{
pagination
.
pageNo
=
pageNo
;
pagination
.
pageNo
=
pageNo
;
pagination
.
pageSize
=
pageSize
;
pagination
.
pageSize
=
pageSize
;
setSearchParams
(
qs
.
stringify
({
...
query
,
pageNo
,
pageSize
,
displayState
:
query
.
displayState
===
undefined
?
'all'
:
query
.
displayState
,
}),
);
getServiceList
(
query
);
getServiceList
(
query
);
};
};
// 表格多选事件
// 表格多选事件
...
@@ -276,6 +291,15 @@ const ServiceList: FC<any> = () => {
...
@@ -276,6 +291,15 @@ const ServiceList: FC<any> = () => {
//筛选
//筛选
const
searchSuccess
=
(
data
:
any
)
=>
{
const
searchSuccess
=
(
data
:
any
)
=>
{
pagination
.
pageNo
=
1
;
pagination
.
pageNo
=
1
;
pagination
.
pageSize
=
10
;
setSearchParams
(
qs
.
stringify
({
...
data
,
pageNo
:
pagination
.
pageNo
,
pageSize
:
pagination
.
pageSize
,
displayState
:
query
.
displayState
===
undefined
?
'all'
:
query
.
displayState
,
}),
);
setQuery
(
data
);
setQuery
(
data
);
getServiceList
(
data
);
getServiceList
(
data
);
};
};
...
@@ -288,7 +312,39 @@ const ServiceList: FC<any> = () => {
...
@@ -288,7 +312,39 @@ const ServiceList: FC<any> = () => {
setPreviewShow
(
false
);
setPreviewShow
(
false
);
};
};
useEffect
(()
=>
{
useEffect
(()
=>
{
getServiceList
();
pagination
.
pageNo
=
Number
(
searchParams
.
get
(
'pageNo'
)
||
1
);
pagination
.
pageSize
=
Number
(
searchParams
.
get
(
'pageSize'
)
||
10
);
searchRef
.
current
.
getForm
().
setFieldsValue
({
serviceName
:
searchParams
.
get
(
'serviceName'
)
||
undefined
,
applicationId
:
searchParams
.
get
(
'applicationId'
)
?
Number
(
searchParams
.
get
(
'applicationId'
))
:
undefined
,
industryId
:
searchParams
.
get
(
'industryId'
)
?
Number
(
searchParams
.
get
(
'industryId'
))
:
undefined
,
});
const
queryObj
=
{
serviceName
:
searchParams
.
get
(
'serviceName'
)
||
undefined
,
applicationId
:
searchParams
.
get
(
'applicationId'
)
?
Number
(
searchParams
.
get
(
'applicationId'
))
:
undefined
,
industryId
:
searchParams
.
get
(
'industryId'
)
?
Number
(
searchParams
.
get
(
'industryId'
))
:
undefined
,
displayState
:
searchParams
.
get
(
'displayState'
)
===
'all'
||
searchParams
.
get
(
'displayState'
)
===
null
?
undefined
:
Number
(
searchParams
.
get
(
'displayState'
)),
};
setQuery
(
queryObj
);
setActiveTabKey
(
searchParams
.
get
(
'displayState'
)
===
'all'
||
searchParams
.
get
(
'displayState'
)
===
null
?
'1'
:
Number
(
searchParams
.
get
(
'displayState'
))
===
0
?
'2'
:
'3'
,
);
getServiceList
(
queryObj
);
getIndustryCategoryList
();
getIndustryCategoryList
();
getApplicationCategoryList
();
getApplicationCategoryList
();
},
[]);
},
[]);
...
@@ -307,6 +363,7 @@ const ServiceList: FC<any> = () => {
...
@@ -307,6 +363,7 @@ const ServiceList: FC<any> = () => {
</
Button
>
</
Button
>
}
}
searchData=
{
searchSuccess
}
searchData=
{
searchSuccess
}
baseRef=
{
searchRef
}
/>
/>
<
Card
tabList=
{
tabList
}
activeTabKey=
{
activeTabKey
}
onTabChange=
{
onTabChange
}
>
<
Card
tabList=
{
tabList
}
activeTabKey=
{
activeTabKey
}
onTabChange=
{
onTabChange
}
>
<
div
className=
'header-operate'
style=
{
{
marginBottom
:
'10px'
}
}
>
<
div
className=
'header-operate'
style=
{
{
marginBottom
:
'10px'
}
}
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论