Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
admin
Commits
7076c110
提交
7076c110
authored
6月 21, 2023
作者:
龚洪江
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
功能:需求手机对接
上级
66b14781
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
421 行增加
和
0 行删除
+421
-0
index.ts
src/api/index.ts
+2
-0
resourceManageType.ts
src/api/interface/resourceManageType.ts
+9
-0
resourceManageAPI.ts
src/api/modules/resourceManageAPI.ts
+11
-0
index.tsx
...nage/industryNews/components/addOrEditNewsModal/index.tsx
+34
-0
index.tsx
...Manage/industryNews/components/previewNewsModal/index.tsx
+7
-0
index.tsx
src/pages/resourceManage/industryNews/index.tsx
+91
-0
index.scss
src/pages/resourceManage/requirementsGathering/index.scss
+6
-0
index.tsx
src/pages/resourceManage/requirementsGathering/index.tsx
+132
-0
index.tsx
...ceManage/tagManage/components/addOrEditTagModal/index.tsx
+28
-0
index.tsx
src/pages/resourceManage/tagManage/index.tsx
+69
-0
router.tsx
src/router/router.tsx
+32
-0
没有找到文件。
src/api/index.ts
浏览文件 @
7076c110
...
...
@@ -10,6 +10,7 @@ import { CategoryManageAPI } from './modules/categoryManage';
import
{
SystemManageAPI
}
from
'./modules/systemManage'
;
import
{
CustomManageAPI
}
from
'./modules/customManage'
;
import
{
MallManageAPI
}
from
'./modules/mallManage'
;
import
{
ResourceManageAPI
}
from
'./modules/resourceManageAPI'
;
export
{
CommonAPI
,
...
...
@@ -24,4 +25,5 @@ export {
SystemManageAPI
,
CustomManageAPI
,
MallManageAPI
,
ResourceManageAPI
,
};
src/api/interface/resourceManageType.ts
0 → 100644
浏览文件 @
7076c110
import
{
InterFunction
,
InterItemFunction
}
from
'~/api/interface'
;
//需求列表
export
type
listPublishPageType
=
InterItemFunction
<
{
requirementTypeId
?:
number
;
keyword
?:
string
},
any
>
;
//需求类型列表
export
type
requirementsListType
=
InterFunction
<
any
,
{
id
:
number
;
typeName
:
string
}[]
>
;
src/api/modules/resourceManageAPI.ts
0 → 100644
浏览文件 @
7076c110
import
{
listPublishPageType
,
requirementsListType
}
from
'~/api/interface/resourceManageType'
;
import
axios
from
'../request'
;
export
class
ResourceManageAPI
{
//需求列表
static
getListPublishPage
:
listPublishPageType
=
(
data
)
=>
axios
.
post
(
'/release/requirements/listPublishPage'
,
data
);
// 需求类型列表
static
getRequirementTypeList
:
requirementsListType
=
()
=>
axios
.
get
(
'/release/requirements/listType'
);
}
src/pages/resourceManage/industryNews/components/addOrEditNewsModal/index.tsx
0 → 100644
浏览文件 @
7076c110
import
{
FC
,
useState
}
from
'react'
;
import
{
Form
,
Input
,
Modal
,
ModalProps
}
from
'antd'
;
import
{
Uploader
}
from
'~/components/uploader'
;
import
{
UploadOutlined
}
from
'@ant-design/icons'
;
import
RichText
from
'~/components/richText'
;
const
AddOrEditNewsModal
:
FC
<
ModalProps
>
=
({
open
,
onCancel
})
=>
{
const
[
richTextValue
,
setRichTextValue
]
=
useState
<
string
>
(
''
);
const
richTextChange
=
()
=>
{};
return
(
<
Modal
open=
{
open
}
onCancel=
{
onCancel
}
title=
'新建'
width=
{
800
}
>
<
Form
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
{
span
:
16
}
}
>
<
Form
.
Item
label=
'文章标题'
>
<
Input
placeholder=
'请输入文章标题'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'文章来源'
>
<
Input
placeholder=
'请输入文章来源'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'作者'
>
<
Input
placeholder=
'请输入文章作者'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'封面图'
>
<
Uploader
fileUpload
listType=
'picture-card'
>
<
UploadOutlined
/>
</
Uploader
>
</
Form
.
Item
>
<
Form
.
Item
label=
'主题内容'
>
<
RichText
onChange=
{
richTextChange
}
value=
{
richTextValue
}
/>
</
Form
.
Item
>
</
Form
>
</
Modal
>
);
};
export
default
AddOrEditNewsModal
;
src/pages/resourceManage/industryNews/components/previewNewsModal/index.tsx
0 → 100644
浏览文件 @
7076c110
import
{
FC
}
from
'react'
;
import
{
Modal
,
ModalProps
}
from
'antd'
;
const
PreviewNewsModal
:
FC
<
ModalProps
>
=
({
open
,
onCancel
})
=>
{
return
<
Modal
open=
{
open
}
onCancel=
{
onCancel
}
title=
'预览'
></
Modal
>;
};
export
default
PreviewNewsModal
;
src/pages/resourceManage/industryNews/index.tsx
0 → 100644
浏览文件 @
7076c110
import
SearchBox
,
{
searchColumns
}
from
'~/components/search-box'
;
import
{
Button
,
Table
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
AddOrEditNewsModal
from
'./components/addOrEditNewsModal'
;
import
PreviewNewsModal
from
'./components/previewNewsModal'
;
import
{
useState
}
from
'react'
;
const
IndustryNews
=
()
=>
{
const
searchColumnsData
:
searchColumns
[]
=
[
{
label
:
'文章名称'
,
type
:
'input'
,
name
:
''
,
placeholder
:
'请输入文章名称'
,
},
];
const
tableColumns
:
ColumnsType
<
any
>
=
[
{
title
:
'序号'
,
align
:
'center'
,
},
{
title
:
'文章名称'
,
align
:
'center'
,
},
{
title
:
'发布时间'
,
align
:
'center'
,
},
{
title
:
'来源'
,
align
:
'center'
,
},
{
title
:
'作者'
,
align
:
'center'
,
},
{
title
:
'封图片'
,
align
:
'center'
,
},
{
title
:
'操作'
,
align
:
'center'
,
render
:
()
=>
(
<>
<
Button
type=
'link'
>
编辑
</
Button
>
<
Button
type=
'link'
onClick=
{
previewClick
}
>
预览
</
Button
>
<
Button
type=
'link'
danger
>
删除
</
Button
>
</>
),
},
];
const
[
tableData
,
setTableData
]
=
useState
<
any
>
([{
id
:
1
}]);
const
[
addOrEditNewsModalShow
,
setAddOrEditNewsModalShow
]
=
useState
<
boolean
>
(
false
);
const
[
previewNewsModalShow
,
setPreviewNewsModalShow
]
=
useState
<
boolean
>
(
false
);
const
addOrEditIndustryNewsClick
=
()
=>
{
setAddOrEditNewsModalShow
(
true
);
};
const
addOrEditNewsModalCancel
=
()
=>
{
setAddOrEditNewsModalShow
(
false
);
};
const
previewClick
=
()
=>
{
setPreviewNewsModalShow
(
true
);
};
const
previewNewsModalCancel
=
()
=>
{
setPreviewNewsModalShow
(
false
);
};
return
(
<
div
className=
'industry-news'
>
<
SearchBox
search=
{
searchColumnsData
}
child=
{
<
Button
type=
'primary'
icon=
{
<
PlusOutlined
/>
}
onClick=
{
addOrEditIndustryNewsClick
}
>
新建
</
Button
>
}
/>
<
Table
bordered
columns=
{
tableColumns
}
dataSource=
{
tableData
}
/>
<
AddOrEditNewsModal
open=
{
addOrEditNewsModalShow
}
onCancel=
{
addOrEditNewsModalCancel
}
/>
<
PreviewNewsModal
open=
{
previewNewsModalShow
}
onCancel=
{
previewNewsModalCancel
}
/>
</
div
>
);
};
export
default
IndustryNews
;
src/pages/resourceManage/requirementsGathering/index.scss
0 → 100644
浏览文件 @
7076c110
.require-description
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
cursor
:
pointer
;
}
src/pages/resourceManage/requirementsGathering/index.tsx
浏览文件 @
7076c110
import
SearchBox
,
{
searchColumns
}
from
'~/components/search-box'
;
import
{
useEffect
,
useState
}
from
'react'
;
import
{
Button
,
Table
,
Tooltip
}
from
'antd'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
ResourceManageAPI
}
from
'~/api'
;
import
{
InterReqType
,
PaginationProps
}
from
'~/api/interface'
;
import
'./index.scss'
;
import
{
listPublishPageType
}
from
'~/api/interface/resourceManageType'
;
type
requirementsParameter
=
Omit
<
InterReqType
<
listPublishPageType
>
,
'pageSize'
|
'pageNo'
>
;
const
RequirementsGathering
=
()
=>
{
const
[
searchColumnsData
,
setSearchColumnsData
]
=
useState
<
searchColumns
[]
>
([
{
label
:
'需求类型'
,
type
:
'select'
,
placeholder
:
'请选择需求类型'
,
name
:
'requirementTypeId'
,
options
:
[],
},
{
label
:
'需求发起人'
,
type
:
'input'
,
placeholder
:
'输入姓名/手机号搜索'
,
name
:
'keyword'
,
},
]);
const
tableColumn
:
ColumnsType
<
any
>
=
[
{
title
:
'需求类型'
,
align
:
'center'
,
dataIndex
:
'requirementTypeName'
,
},
{
title
:
'姓名'
,
align
:
'center'
,
dataIndex
:
'publishName'
,
},
{
title
:
'手机号'
,
align
:
'center'
,
dataIndex
:
'publishPhone'
,
},
{
title
:
'需求描述'
,
align
:
'center'
,
dataIndex
:
'requireDescription'
,
width
:
'20%'
,
ellipsis
:
true
,
render
:
(
text
:
string
)
=>
(
<
Tooltip
placement=
'top'
title=
{
text
}
>
<
div
className=
'require-description'
>
{
text
}
</
div
>
</
Tooltip
>
),
},
{
title
:
'操作'
,
align
:
'center'
,
render
:
()
=>
(
<>
<
Button
type=
'link'
>
强制删除
</
Button
>
<
Button
type=
'link'
>
联系客户
</
Button
>
</>
),
},
];
const
[
tableData
,
setTableData
]
=
useState
<
any
>
([{
id
:
1
}]);
const
[
pagination
,
setPagination
]
=
useState
<
PaginationProps
&
{
totalCount
:
number
}
>
({
pageNo
:
1
,
pageSize
:
10
,
totalCount
:
0
,
});
const
[
query
,
setQuery
]
=
useState
<
requirementsParameter
>
();
//筛选
const
searchSuccessEvent
=
(
value
:
any
)
=>
{
pagination
.
pageSize
=
10
;
pagination
.
pageNo
=
1
;
setQuery
(
value
);
getRequirementsList
(
value
);
};
//分页
const
paginationChange
=
(
pageNo
:
number
,
pageSize
:
number
)
=>
{
pagination
.
pageNo
=
pageNo
;
pagination
.
pageSize
=
pageSize
;
getRequirementsList
(
query
);
};
//需求列表
const
getRequirementsList
=
(
query
?:
requirementsParameter
)
=>
{
ResourceManageAPI
.
getListPublishPage
({
pageSize
:
pagination
.
pageSize
,
pageNo
:
pagination
.
pageNo
,
...
query
,
}).
then
(({
result
})
=>
{
setTableData
(
result
.
list
||
[]);
pagination
.
totalCount
=
result
.
totalCount
;
setPagination
(
pagination
);
});
};
//需求类型列表
const
getRequirementsTypeList
=
()
=>
{
ResourceManageAPI
.
getRequirementTypeList
().
then
(({
result
})
=>
{
searchColumnsData
[
0
].
options
=
result
.
map
((
v
)
=>
({
id
:
v
.
id
,
name
:
v
.
typeName
}));
setSearchColumnsData
([...
searchColumnsData
]);
});
};
useEffect
(()
=>
{
getRequirementsList
();
getRequirementsTypeList
();
},
[]);
return
(
<
div
className=
'requirements-gathering'
>
<
SearchBox
search=
{
searchColumnsData
}
searchData=
{
searchSuccessEvent
}
/>
<
Table
bordered
columns=
{
tableColumn
}
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} 条数据`
,
}
}
/>
</
div
>
);
};
export
default
RequirementsGathering
;
src/pages/resourceManage/tagManage/components/addOrEditTagModal/index.tsx
0 → 100644
浏览文件 @
7076c110
import
{
FC
}
from
'react'
;
import
{
Form
,
Input
,
Modal
,
ModalProps
,
Select
}
from
'antd'
;
import
{
Uploader
}
from
'~/components/uploader'
;
import
{
UploadOutlined
}
from
'@ant-design/icons'
;
interface
selfProps
{}
const
AddOrEditTagModal
:
FC
<
ModalProps
&
selfProps
>
=
({
open
,
onCancel
})
=>
{
return
(
<
Modal
open=
{
open
}
onCancel=
{
onCancel
}
title=
'新建标签'
>
<
Form
labelCol=
{
{
span
:
4
}
}
wrapperCol=
{
{
span
:
16
}
}
>
<
Form
.
Item
label=
'标签名称'
>
<
Input
placeholder=
'请输入标签名称'
/>
</
Form
.
Item
>
<
Form
.
Item
label=
'标签类型'
>
<
Select
placeholder=
'请选择标签类型'
>
<
Select
.
Option
>
1111
</
Select
.
Option
>
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
label=
'标签等级图标'
>
<
Uploader
fileUpload
listType=
'picture-card'
>
<
UploadOutlined
/>
</
Uploader
>
</
Form
.
Item
>
</
Form
>
</
Modal
>
);
};
export
default
AddOrEditTagModal
;
src/pages/resourceManage/tagManage/index.tsx
0 → 100644
浏览文件 @
7076c110
import
SearchBox
,
{
searchColumns
}
from
'~/components/search-box'
;
import
{
Button
,
Table
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
useState
}
from
'react'
;
import
AddOrEditTagModal
from
'./components/addOrEditTagModal'
;
//行业新闻
const
TagManage
=
()
=>
{
const
searchColumnsData
:
searchColumns
[]
=
[
{
label
:
'标签名称'
,
placeholder
:
'请输入标签名称'
,
name
:
''
,
type
:
'input'
,
},
];
const
tableColumns
:
ColumnsType
<
any
>
=
[
{
title
:
'序号'
,
align
:
'center'
,
},
{
title
:
'标签名称'
,
align
:
'center'
,
},
{
title
:
'标签类型'
,
align
:
'center'
,
},
{
title
:
'标签等级图标'
,
align
:
'center'
,
},
{
title
:
'操作'
,
align
:
'center'
,
render
:
()
=>
(
<>
<
Button
type=
'link'
>
编辑
</
Button
>
<
Button
type=
'link'
>
删除
</
Button
>
</>
),
},
];
const
[
tableData
,
setTableData
]
=
useState
<
any
>
([{
id
:
1
}]);
const
[
addOrEditTagModalShow
,
setAddOrEditTagModalShow
]
=
useState
<
boolean
>
(
false
);
const
addOrEditTagClick
=
()
=>
{
setAddOrEditTagModalShow
(
true
);
};
const
addOrEditTagModalCancel
=
()
=>
{
setAddOrEditTagModalShow
(
false
);
};
return
(
<
div
className=
'tag-manage'
>
<
SearchBox
search=
{
searchColumnsData
}
child=
{
<
Button
type=
'primary'
icon=
{
<
PlusOutlined
/>
}
onClick=
{
addOrEditTagClick
}
>
新建
</
Button
>
}
/>
<
Table
bordered
columns=
{
tableColumns
}
dataSource=
{
tableData
}
rowKey=
'id'
></
Table
>
<
AddOrEditTagModal
open=
{
addOrEditTagModalShow
}
onCancel=
{
addOrEditTagModalCancel
}
/>
</
div
>
);
};
export
default
TagManage
;
src/router/router.tsx
浏览文件 @
7076c110
...
...
@@ -53,6 +53,11 @@ import CustomMoneyDetail from '~/pages/customManage/customMoney/detail';
//资源管理
import
MaterielManageView
from
'~/pages/resourceManage/materielManage'
;
import
MaterielManageDetail
from
'~/pages/resourceManage/materielManage/detail'
;
const
RequirementsGatheringView
=
React
.
lazy
(
()
=>
import
(
'~/pages/resourceManage/requirementsGathering'
),
);
//需求收集
const
TagManageView
=
React
.
lazy
(()
=>
import
(
'~/pages/resourceManage/tagManage'
));
//标签管理
const
IndustryNewsView
=
React
.
lazy
(()
=>
import
(
'~/pages/resourceManage/industryNews'
));
//论坛管理
const
DynamicListView
=
React
.
lazy
(()
=>
import
(
'~/pages/forumManage/dynamicList'
));
// 订单
...
...
@@ -211,6 +216,15 @@ export const routerList: Array<RouteObjectType> = [
},
children
:
[
{
path
:
'/resourceManage/requirementsGathering'
,
element
:
withLoadingComponent
(<
RequirementsGatheringView
/>),
meta
:
{
id
:
30200
,
title
:
'需求收集'
,
icon
:
<
SketchOutlined
/>,
},
},
{
path
:
'/resourceManage/materielManage'
,
element
:
withLoadingComponent
(<
MaterielManageView
/>),
meta
:
{
...
...
@@ -229,6 +243,24 @@ export const routerList: Array<RouteObjectType> = [
hidden
:
true
,
},
},
{
path
:
'/resourceManage/tagManage'
,
element
:
withLoadingComponent
(<
TagManageView
/>),
meta
:
{
id
:
30300
,
title
:
'标签管理'
,
icon
:
<
SketchOutlined
/>,
},
},
{
path
:
'/resourceManage/industryNews'
,
element
:
withLoadingComponent
(<
IndustryNewsView
/>),
meta
:
{
id
:
30400
,
title
:
'行业新闻'
,
icon
:
<
SketchOutlined
/>,
},
},
],
},
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论