Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
43229f0a
提交
43229f0a
authored
6月 19, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
98da0811
935be86b
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
66 行增加
和
5 行删除
+66
-5
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
index.tsx
...ages/mallManage/rentGoods/rentAddOrEditOrDetail/index.tsx
+5
-1
index.tsx
src/pages/mallManage/serviceManage/serviceList/index.tsx
+60
-3
没有找到文件。
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
43229f0a
...
...
@@ -14,4 +14,4 @@ patches:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/admin
newTag
:
01d77ad63c0e5a29390b7748dd9d32cbf85d15d5
newTag
:
c533f36fd07802ddc4791dbaaf1a0b66e0a38222
src/pages/mallManage/rentGoods/rentAddOrEditOrDetail/index.tsx
浏览文件 @
43229f0a
...
...
@@ -186,7 +186,11 @@ const GoodsAddOrEditOrDetail = () => {
...
values
.
subImg
.
map
((
v
:
any
)
=>
({
imgType
:
1
,
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
浏览文件 @
43229f0a
import
React
,
{
FC
,
useEffect
,
useState
}
from
'react'
;
import
{
useNavigate
}
from
'react-router-dom'
;
import
React
,
{
FC
,
useEffect
,
use
Ref
,
use
State
}
from
'react'
;
import
{
useNavigate
,
useSearchParams
}
from
'react-router-dom'
;
import
{
searchColumns
}
from
'~/components/search-box'
;
import
SearchBox
from
'~/components/search-box'
;
import
AddOrEditServiceModal
from
'./components/addOrEditServiceModal'
;
...
...
@@ -16,6 +16,7 @@ import { CategoryManageAPI, MallManageAPI } from '~/api';
import
{
InterDataType
,
InterReqType
,
PaginationProps
}
from
'~/api/interface'
;
import
{
categoryListType
}
from
'~/api/interface/categoryManage'
;
import
{
serviceType
}
from
'~/api/interface/mallManageType'
;
import
qs
from
'query-string'
;
//分类返回类型
type
categoryType
=
InterDataType
<
categoryListType
>
[
'list'
];
...
...
@@ -25,7 +26,9 @@ type serviceListType = InterDataType<serviceType>['list'];
type
serviceParametersType
=
Omit
<
InterReqType
<
serviceType
>
,
'pageSize'
|
'pageNo'
>
;
const
ServiceList
:
FC
<
any
>
=
()
=>
{
const
searchRef
=
useRef
<
any
>
();
const
navigate
=
useNavigate
();
const
[
searchParams
,
setSearchParams
]
=
useSearchParams
();
const
tabList
=
[
{
key
:
'1'
,
...
...
@@ -156,7 +159,11 @@ const ServiceList: FC<any> = () => {
const
onTabChange
=
(
key
:
string
)
=>
{
pagination
.
pageNo
=
1
;
pagination
.
pageSize
=
10
;
setQuery
({
...
query
,
displayState
:
key
===
'1'
?
undefined
:
key
===
'2'
?
0
:
1
});
setSearchParams
(
qs
.
stringify
({
...
query
,
displayState
:
key
===
'1'
?
'all'
:
key
===
'2'
?
0
:
1
}),
);
setActiveTabKey
(
key
);
getServiceList
({
...
query
,
displayState
:
key
===
'1'
?
undefined
:
key
===
'2'
?
0
:
1
});
};
...
...
@@ -267,6 +274,14 @@ const ServiceList: FC<any> = () => {
const
paginationChange
=
(
pageNo
:
number
,
pageSize
:
number
)
=>
{
pagination
.
pageNo
=
pageNo
;
pagination
.
pageSize
=
pageSize
;
setSearchParams
(
qs
.
stringify
({
...
query
,
pageNo
,
pageSize
,
displayState
:
query
.
displayState
===
undefined
?
'all'
:
query
.
displayState
,
}),
);
getServiceList
(
query
);
};
// 表格多选事件
...
...
@@ -276,6 +291,15 @@ const ServiceList: FC<any> = () => {
//筛选
const
searchSuccess
=
(
data
:
any
)
=>
{
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
);
getServiceList
(
data
);
};
...
...
@@ -288,7 +312,39 @@ const ServiceList: FC<any> = () => {
setPreviewShow
(
false
);
};
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
();
getApplicationCategoryList
();
},
[]);
...
...
@@ -307,6 +363,7 @@ const ServiceList: FC<any> = () => {
</
Button
>
}
searchData=
{
searchSuccess
}
baseRef=
{
searchRef
}
/>
<
Card
tabList=
{
tabList
}
activeTabKey=
{
activeTabKey
}
onTabChange=
{
onTabChange
}
>
<
div
className=
'header-operate'
style=
{
{
marginBottom
:
'10px'
}
}
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论