Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
admin-ci-test
Commits
1d080448
提交
1d080448
authored
6月 26, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
功能:论坛列表
上级
4c3d7a85
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
155 行增加
和
13 行删除
+155
-13
index.ts
src/api/index.ts
+2
-0
forumManageType.ts
src/api/interface/forumManageType.ts
+15
-0
resourceManageType.ts
src/api/interface/resourceManageType.ts
+3
-1
forumManageAPI.ts
src/api/modules/forumManageAPI.ts
+7
-0
resourceManageAPI.ts
src/api/modules/resourceManageAPI.ts
+8
-0
index.scss
src/pages/forumManage/dynamicList/index.scss
+6
-0
index.tsx
src/pages/forumManage/dynamicList/index.tsx
+77
-7
index.tsx
src/pages/resourceManage/industryNews/index.tsx
+12
-2
index.tsx
src/pages/resourceManage/requirementsGathering/index.tsx
+25
-3
没有找到文件。
src/api/index.ts
浏览文件 @
1d080448
...
@@ -11,6 +11,7 @@ import { SystemManageAPI } from './modules/systemManage';
...
@@ -11,6 +11,7 @@ import { SystemManageAPI } from './modules/systemManage';
import
{
CustomManageAPI
}
from
'./modules/customManage'
;
import
{
CustomManageAPI
}
from
'./modules/customManage'
;
import
{
MallManageAPI
}
from
'./modules/mallManage'
;
import
{
MallManageAPI
}
from
'./modules/mallManage'
;
import
{
ResourceManageAPI
}
from
'./modules/resourceManageAPI'
;
import
{
ResourceManageAPI
}
from
'./modules/resourceManageAPI'
;
import
{
ForumManageAPI
}
from
'./modules/forumManageAPI'
;
export
{
export
{
CommonAPI
,
CommonAPI
,
...
@@ -26,4 +27,5 @@ export {
...
@@ -26,4 +27,5 @@ export {
CustomManageAPI
,
CustomManageAPI
,
MallManageAPI
,
MallManageAPI
,
ResourceManageAPI
,
ResourceManageAPI
,
ForumManageAPI
,
};
};
src/api/interface/forumManageType.ts
0 → 100644
浏览文件 @
1d080448
import
{
InterItemFunction
}
from
'~/api/interface'
;
export
type
forumListType
=
InterItemFunction
<
{
keyword
?:
string
},
{
description
:
string
;
userBaseInfo
:
{
nickName
:
string
;
phone
:
string
;
uid
:
string
;
userImg
:
string
;
userName
:
string
;
};
}[]
>
;
src/api/interface/resourceManageType.ts
浏览文件 @
1d080448
...
@@ -14,6 +14,8 @@ export type listPublishPageType = InterItemFunction<
...
@@ -14,6 +14,8 @@ export type listPublishPageType = InterItemFunction<
>
;
>
;
//需求类型列表
//需求类型列表
export
type
requirementsListType
=
InterFunction
<
any
,
{
id
:
number
;
typeName
:
string
}[]
>
;
export
type
requirementsListType
=
InterFunction
<
any
,
{
id
:
number
;
typeName
:
string
}[]
>
;
//需求-强制删除
export
type
deleteRequirementsType
=
InterFunction
<
{
requirementsInfoId
:
number
},
any
>
;
// 查询招标快讯列表-分页
// 查询招标快讯列表-分页
export
type
releaseTenderNews
=
InterListFunction
<
export
type
releaseTenderNews
=
InterListFunction
<
...
@@ -75,7 +77,7 @@ export type editIndustryNews = InterFunction<
...
@@ -75,7 +77,7 @@ export type editIndustryNews = InterFunction<
any
any
>
;
>
;
//行业新闻-删除
//行业新闻-删除
// export type deleteIndustryNewsType = InterFunction<
>;
export
type
deleteIndustryNewsType
=
InterFunction
<
{
id
:
number
},
any
>
;
//行业新闻-详情
//行业新闻-详情
export
type
industryNewsDetailType
=
InterFunction
<
export
type
industryNewsDetailType
=
InterFunction
<
{
id
:
number
},
{
id
:
number
},
...
...
src/api/modules/forumManageAPI.ts
0 → 100644
浏览文件 @
1d080448
import
{
forumListType
}
from
'~/api/interface/forumManageType'
;
import
axios
from
'~/api/request'
;
export
class
ForumManageAPI
{
static
getForumList
:
forumListType
=
(
data
)
=>
axios
.
post
(
'/release/backstage/forum/listDynamic'
,
data
);
}
src/api/modules/resourceManageAPI.ts
浏览文件 @
1d080448
...
@@ -9,6 +9,8 @@ import {
...
@@ -9,6 +9,8 @@ import {
industryNewsListType
,
industryNewsListType
,
editIndustryNews
,
editIndustryNews
,
industryNewsDetailType
,
industryNewsDetailType
,
deleteIndustryNewsType
,
deleteRequirementsType
,
}
from
'~/api/interface/resourceManageType'
;
}
from
'~/api/interface/resourceManageType'
;
import
axios
from
'../request'
;
import
axios
from
'../request'
;
...
@@ -19,6 +21,9 @@ export class ResourceManageAPI {
...
@@ -19,6 +21,9 @@ export class ResourceManageAPI {
// 需求类型列表
// 需求类型列表
static
getRequirementTypeList
:
requirementsListType
=
()
=>
static
getRequirementTypeList
:
requirementsListType
=
()
=>
axios
.
get
(
'/release/requirements/listType'
);
axios
.
get
(
'/release/requirements/listType'
);
//需求-强制删除
static
deleteRequirement
:
deleteRequirementsType
=
(
params
)
=>
axios
.
get
(
'/release/requirements/deleteRequire'
,
{
params
});
// 查询招标快讯列表-分页
// 查询招标快讯列表-分页
static
releaseTenderNews
:
releaseTenderNews
=
(
params
)
=>
static
releaseTenderNews
:
releaseTenderNews
=
(
params
)
=>
...
@@ -47,4 +52,7 @@ export class ResourceManageAPI {
...
@@ -47,4 +52,7 @@ export class ResourceManageAPI {
// 行业新闻-详情
// 行业新闻-详情
static getIndustryNewsDetail: industryNewsDetailType = (params) =>
static getIndustryNewsDetail: industryNewsDetailType = (params) =>
axios.get('/release/industry-news/details', { params });
axios.get('/release/industry-news/details', { params });
// 行业新闻-删除
static removeIndustryNews: deleteIndustryNewsType = (params) =>
axios.get('/release/industry-news/deleteIndustryNews', { params });
}
}
src/pages/forumManage/dynamicList/index.scss
0 → 100644
浏览文件 @
1d080448
.forum-description
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
cursor
:
pointer
;
}
src/pages/forumManage/dynamicList/index.tsx
浏览文件 @
1d080448
import
SearchBox
,
{
searchColumns
}
from
'~/components/search-box'
;
import
SearchBox
,
{
searchColumns
}
from
'~/components/search-box'
;
import
{
Button
,
Table
}
from
'antd'
;
import
{
Button
,
Table
,
Tooltip
}
from
'antd'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
useState
}
from
'react'
;
import
{
use
Effect
,
use
State
}
from
'react'
;
import
DynamicDetailModal
from
'./components/dynamicDetailModal'
;
import
DynamicDetailModal
from
'./components/dynamicDetailModal'
;
import
{
ForumManageAPI
}
from
'../../../api'
;
import
{
InterDataType
,
InterReqListType
,
PaginationProps
}
from
'../../../api/interface'
;
import
{
forumListType
}
from
'../../../api/interface/forumManageType'
;
import
'./index.scss'
;
//论坛列表返回类型
type
forumType
=
InterDataType
<
forumListType
>
[
'list'
];
//论坛列表参数类型
type
forumParameters
=
InterReqListType
<
forumListType
>
;
const
DynamicList
=
()
=>
{
const
DynamicList
=
()
=>
{
const
searchColumnsData
:
searchColumns
[]
=
[
const
searchColumnsData
:
searchColumns
[]
=
[
{
{
label
:
'作者'
,
label
:
'作者'
,
type
:
'input'
,
type
:
'input'
,
name
:
''
,
name
:
'
keyword
'
,
placeholder
:
'用户名称/用户UID/用户手机号码'
,
placeholder
:
'用户名称/用户UID/用户手机号码'
,
},
},
];
];
const
tableColumns
:
ColumnsType
<
any
>
=
[
const
tableColumns
:
ColumnsType
<
forumType
[
0
]
>
=
[
{
{
title
:
'动态描述信息'
,
title
:
'动态描述信息'
,
align
:
'center'
,
align
:
'center'
,
dataIndex
:
'description'
,
width
:
'20%'
,
ellipsis
:
true
,
render
:
(
text
:
string
)
=>
(
<
Tooltip
title=
{
text
}
>
<
div
className=
'forum-description'
>
{
text
}
</
div
>
</
Tooltip
>
),
},
},
{
{
title
:
'作者(用户名称)'
,
title
:
'作者(用户名称)'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_text
:
string
,
record
)
=>
(
<
div
>
{
record
.
userBaseInfo
?.
userName
||
record
.
userBaseInfo
?.
nickName
||
''
}
</
div
>
),
},
},
{
{
title
:
'用户UID'
,
title
:
'用户UID'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_text
:
string
,
record
)
=>
<
div
>
{
record
.
userBaseInfo
?.
uid
||
''
}
</
div
>,
},
},
{
{
title
:
'用户手机号'
,
title
:
'用户手机号'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
_text
:
string
,
record
)
=>
<
div
>
{
record
.
userBaseInfo
?.
phone
||
''
}
</
div
>,
},
},
{
{
title
:
'操作'
,
title
:
'操作'
,
...
@@ -44,8 +65,40 @@ const DynamicList = () => {
...
@@ -44,8 +65,40 @@ const DynamicList = () => {
),
),
},
},
];
];
const
[
tableData
,
setTableData
]
=
useState
<
any
>
([{
id
:
1
}]);
const
[
tableData
,
setTableData
]
=
useState
<
forumType
>
([]);
const
[
pagination
,
setPagination
]
=
useState
<
PaginationProps
&
{
totalCount
:
number
}
>
({
pageNo
:
1
,
pageSize
:
10
,
totalCount
:
0
,
});
const
[
query
,
setQuery
]
=
useState
<
forumParameters
>
();
const
[
dynamicDetailModalShow
,
setDynamicDetailModalShow
]
=
useState
<
boolean
>
(
false
);
const
[
dynamicDetailModalShow
,
setDynamicDetailModalShow
]
=
useState
<
boolean
>
(
false
);
//动态列表
const
getDynamicList
=
(
query
?:
forumParameters
)
=>
{
ForumManageAPI
.
getForumList
({
pageNo
:
pagination
.
pageNo
,
pageSize
:
pagination
.
pageSize
,
...
query
,
}).
then
(({
result
})
=>
{
setTableData
(
result
.
list
||
[]);
pagination
.
totalCount
=
result
.
totalCount
;
setPagination
(
pagination
);
});
};
//筛选
const
searchSuccess
=
(
data
:
any
)
=>
{
pagination
.
pageNo
=
1
;
pagination
.
pageSize
=
10
;
setQuery
(
data
);
getDynamicList
(
data
);
};
//分页
const
paginationChange
=
(
pageNo
:
number
,
pageSize
:
number
)
=>
{
pagination
.
pageNo
=
pageNo
;
pagination
.
pageSize
=
pageSize
;
getDynamicList
(
query
);
};
const
dynamicDetailModalOnCancel
=
()
=>
{
const
dynamicDetailModalOnCancel
=
()
=>
{
setDynamicDetailModalShow
(
false
);
setDynamicDetailModalShow
(
false
);
};
};
...
@@ -53,10 +106,27 @@ const DynamicList = () => {
...
@@ -53,10 +106,27 @@ const DynamicList = () => {
const
lookDynamicDetail
=
()
=>
{
const
lookDynamicDetail
=
()
=>
{
setDynamicDetailModalShow
(
true
);
setDynamicDetailModalShow
(
true
);
};
};
useEffect
(()
=>
{
getDynamicList
();
},
[]);
return
(
return
(
<
div
className=
'dynamic-list'
>
<
div
className=
'dynamic-list'
>
<
SearchBox
search=
{
searchColumnsData
}
/>
<
SearchBox
search=
{
searchColumnsData
}
searchData=
{
searchSuccess
}
/>
<
Table
bordered
columns=
{
tableColumns
}
dataSource=
{
tableData
}
rowKey=
'id'
/>
<
Table
bordered
columns=
{
tableColumns
}
dataSource=
{
tableData
}
rowKey=
'id'
pagination=
{
{
total
:
pagination
.
totalCount
,
pageSize
:
pagination
.
pageSize
,
current
:
pagination
.
pageNo
,
showSizeChanger
:
true
,
showQuickJumper
:
true
,
onChange
:
(
page
:
number
,
pageSize
:
number
)
=>
paginationChange
(
page
,
pageSize
),
showTotal
:
(
total
,
range
)
=>
`当前 ${range[0]}-${range[1]} 条记录 / 共 ${total} 条数据`
,
}
}
/>
<
DynamicDetailModal
open=
{
dynamicDetailModalShow
}
onCancel=
{
dynamicDetailModalOnCancel
}
/>
<
DynamicDetailModal
open=
{
dynamicDetailModalShow
}
onCancel=
{
dynamicDetailModalOnCancel
}
/>
</
div
>
</
div
>
);
);
...
...
src/pages/resourceManage/industryNews/index.tsx
浏览文件 @
1d080448
import
SearchBox
,
{
searchColumns
}
from
'~/components/search-box'
;
import
SearchBox
,
{
searchColumns
}
from
'~/components/search-box'
;
import
{
Button
,
Image
,
Modal
,
Table
}
from
'antd'
;
import
{
Button
,
Image
,
message
,
Modal
,
Table
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
AddOrEditNewsModal
from
'./components/addOrEditNewsModal'
;
import
AddOrEditNewsModal
from
'./components/addOrEditNewsModal'
;
...
@@ -138,7 +138,17 @@ const IndustryNews = () => {
...
@@ -138,7 +138,17 @@ const IndustryNews = () => {
Modal
.
confirm
({
Modal
.
confirm
({
title
:
'行业新闻删除'
,
title
:
'行业新闻删除'
,
content
:
'确认删除该行业新闻?'
,
content
:
'确认删除该行业新闻?'
,
onOk
:
()
=>
{},
onOk
:
()
=>
{
ResourceManageAPI
.
removeIndustryNews
({
id
:
record
.
id
}).
then
(({
code
})
=>
{
if
(
code
===
'200'
)
{
message
.
success
(
'删除成功'
);
if
(
pagination
.
pageNo
!==
1
&&
tableData
.
length
===
1
)
{
pagination
.
pageNo
-=
1
;
}
getIndustryNewsList
(
query
);
}
});
},
});
});
};
};
useEffect
(()
=>
{
useEffect
(()
=>
{
...
...
src/pages/resourceManage/requirementsGathering/index.tsx
浏览文件 @
1d080448
import
SearchBox
,
{
searchColumns
}
from
'~/components/search-box'
;
import
SearchBox
,
{
searchColumns
}
from
'~/components/search-box'
;
import
{
useEffect
,
useState
}
from
'react'
;
import
{
useEffect
,
useState
}
from
'react'
;
import
{
Button
,
Table
,
Tooltip
}
from
'antd'
;
import
{
Button
,
message
,
Modal
,
Table
,
Tooltip
}
from
'antd'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
ResourceManageAPI
}
from
'~/api'
;
import
{
ResourceManageAPI
}
from
'~/api'
;
import
{
InterDataType
,
InterReqType
,
PaginationProps
}
from
'~/api/interface'
;
import
{
InterDataType
,
InterReqType
,
PaginationProps
}
from
'~/api/interface'
;
...
@@ -58,9 +58,9 @@ const RequirementsGathering = () => {
...
@@ -58,9 +58,9 @@ const RequirementsGathering = () => {
{
{
title
:
'操作'
,
title
:
'操作'
,
align
:
'center'
,
align
:
'center'
,
render
:
()
=>
(
render
:
(
_text
:
string
,
record
)
=>
(
<>
<>
<
Button
type=
'link'
danger
>
<
Button
type=
'link'
danger
onClick=
{
()
=>
deleteRequirements
(
record
)
}
>
强制删除
强制删除
</
Button
>
</
Button
>
<
Button
type=
'link'
>
联系客户
</
Button
>
<
Button
type=
'link'
>
联系客户
</
Button
>
...
@@ -69,6 +69,7 @@ const RequirementsGathering = () => {
...
@@ -69,6 +69,7 @@ const RequirementsGathering = () => {
},
},
];
];
const
[
tableData
,
setTableData
]
=
useState
<
requirementsType
>
([]);
const
[
tableData
,
setTableData
]
=
useState
<
requirementsType
>
([]);
const
[
loading
,
setLoading
]
=
useState
<
boolean
>
(
false
);
const
[
pagination
,
setPagination
]
=
useState
<
PaginationProps
&
{
totalCount
:
number
}
>
({
const
[
pagination
,
setPagination
]
=
useState
<
PaginationProps
&
{
totalCount
:
number
}
>
({
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
10
,
pageSize
:
10
,
...
@@ -91,11 +92,13 @@ const RequirementsGathering = () => {
...
@@ -91,11 +92,13 @@ const RequirementsGathering = () => {
};
};
//需求列表
//需求列表
const
getRequirementsList
=
(
query
?:
requirementsParameter
)
=>
{
const
getRequirementsList
=
(
query
?:
requirementsParameter
)
=>
{
setLoading
(
true
);
ResourceManageAPI
.
getListPublishPage
({
ResourceManageAPI
.
getListPublishPage
({
pageSize
:
pagination
.
pageSize
,
pageSize
:
pagination
.
pageSize
,
pageNo
:
pagination
.
pageNo
,
pageNo
:
pagination
.
pageNo
,
...
query
,
...
query
,
}).
then
(({
result
})
=>
{
}).
then
(({
result
})
=>
{
setLoading
(
false
);
setTableData
(
result
.
list
||
[]);
setTableData
(
result
.
list
||
[]);
pagination
.
totalCount
=
result
.
totalCount
;
pagination
.
totalCount
=
result
.
totalCount
;
setPagination
(
pagination
);
setPagination
(
pagination
);
...
@@ -108,6 +111,24 @@ const RequirementsGathering = () => {
...
@@ -108,6 +111,24 @@ const RequirementsGathering = () => {
setSearchColumnsData
([...
searchColumnsData
]);
setSearchColumnsData
([...
searchColumnsData
]);
});
});
};
};
//需求删除
const
deleteRequirements
=
(
record
:
requirementsType
[
0
])
=>
{
Modal
.
confirm
({
title
:
'需求删除'
,
content
:
'确认删除该需求?'
,
onOk
:
()
=>
{
ResourceManageAPI
.
deleteRequirement
({
requirementsInfoId
:
record
.
id
}).
then
(({
code
})
=>
{
if
(
code
===
'200'
)
{
message
.
success
(
'删除成功'
);
if
(
pagination
.
pageNo
!==
1
&&
tableData
.
length
===
1
)
{
pagination
.
pageNo
-=
1
;
}
getRequirementsList
(
query
);
}
});
},
});
};
useEffect
(()
=>
{
useEffect
(()
=>
{
getRequirementsList
();
getRequirementsList
();
getRequirementsTypeList
();
getRequirementsTypeList
();
...
@@ -120,6 +141,7 @@ const RequirementsGathering = () => {
...
@@ -120,6 +141,7 @@ const RequirementsGathering = () => {
columns=
{
tableColumn
}
columns=
{
tableColumn
}
dataSource=
{
tableData
}
dataSource=
{
tableData
}
rowKey=
'id'
rowKey=
'id'
loading=
{
loading
}
pagination=
{
{
pagination=
{
{
total
:
pagination
.
totalCount
,
total
:
pagination
.
totalCount
,
pageSize
:
pagination
.
pageSize
,
pageSize
:
pagination
.
pageSize
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论