Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
web-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
web-ci-test
Commits
44063ec7
提交
44063ec7
authored
5月 30, 2023
作者:
翁进城
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
项目资讯,项目需求按钮显示判断,招投标项目申请合作后刷新列表
上级
b30fcef2
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
18 行增加
和
17 行删除
+18
-17
index.tsx
pages/projectInfo/components/bids/index.tsx
+4
-2
index.ts
pages/projectInfo/components/requirements/api/index.ts
+1
-1
index.module.scss
pages/projectInfo/components/requirements/index.module.scss
+1
-0
index.tsx
pages/projectInfo/components/requirements/index.tsx
+12
-14
没有找到文件。
pages/projectInfo/components/bids/index.tsx
浏览文件 @
44063ec7
...
...
@@ -22,13 +22,14 @@ export default function Bids(props: Props) {
const
[
count
,
setCount
]
=
useState
(
0
);
const
[
abort
,
setAbort
]
=
useState
<
AbortController
|
null
>
(
null
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
{
userInfo
,
setNeedLogin
}
=
useContext
(
UserContext
);
const
{
userInfo
,
setNeedLogin
}
=
useContext
(
UserContext
);
const
[
reload
,
setReload
]
=
useState
(
false
);
useEffect
(()
=>
{
//中断前一次请求
abort
?.
abort
();
setAbort
(
new
AbortController
());
},
[
pageParams
,
props
.
params
]);
},
[
pageParams
,
props
.
params
,
reload
]);
useEffect
(()
=>
{
if
(
!
abort
)
{
...
...
@@ -70,6 +71,7 @@ export default function Bids(props: Props) {
.
then
((
res
)
=>
{
if
(
res
.
code
===
"200"
)
{
window
.
messageApi
.
success
(
"申请成功"
);
setReload
(
!
reload
);
}
});
}
else
{
...
...
pages/projectInfo/components/requirements/api/index.ts
浏览文件 @
44063ec7
...
...
@@ -24,6 +24,7 @@ export interface Item {
publishName
:
string
;
publishPhone
:
string
;
requireDescription
:
string
;
requirementTypeName
:
string
;
solved
?:
0
|
1
;
createTime
:
string
;
updateTime
?:
string
;
...
...
@@ -31,7 +32,6 @@ export interface Item {
export
interface
SolveRequireParams
{
requirementsInfoId
:
number
,
//需求id
userAccountId
:
number
//用户id
}
...
...
pages/projectInfo/components/requirements/index.module.scss
浏览文件 @
44063ec7
...
...
@@ -32,6 +32,7 @@
}
.desc
{
width
:
fit-content
;
font-size
:
14px
;
font-family
:
MicrosoftYaHei
;
color
:
RGBA
(
135
,
135
,
135
,
0
.4
);
...
...
pages/projectInfo/components/requirements/index.tsx
浏览文件 @
44063ec7
import
{
Button
,
Empty
,
Pagination
,
Popconfirm
,
Spin
}
from
"antd"
;
import
{
Button
,
Empty
,
Pagination
,
Popconfirm
,
Spin
,
Tooltip
}
from
"antd"
;
import
router
from
"next/router"
;
import
React
,
{
useState
,
useEffect
}
from
"react"
;
import
React
,
{
useState
,
useEffect
,
useContext
}
from
"react"
;
import
{
UserContext
}
from
"~/lib/userProvider"
;
import
api
,
{
Item
}
from
"./api"
;
import
styles
from
"./index.module.scss"
;
...
...
@@ -22,12 +23,8 @@ export default function Requirements(props: Props) {
});
const
[
count
,
setCount
]
=
useState
(
0
);
const
[
abort
,
setAbort
]
=
useState
<
AbortController
|
null
>
(
null
);
const
[
userId
,
setUserId
]
=
useState
(
-
1
);
const
[
reload
,
setReload
]
=
useState
(
false
);
useEffect
(()
=>
{
setUserId
(
Number
(
window
.
localStorage
.
getItem
(
"userId"
)
||
-
1
));
},
[]);
const
{
userInfo
}
=
useContext
(
UserContext
);
useEffect
(()
=>
{
//中断前一次请求
...
...
@@ -72,7 +69,6 @@ export default function Requirements(props: Props) {
api
.
solveRequire
({
requirementsInfoId
:
item
.
id
,
userAccountId
:
userId
,
})
.
then
((
res
)
=>
{
if
(
res
.
code
===
"200"
)
{
...
...
@@ -94,14 +90,16 @@ export default function Requirements(props: Props) {
<
div
className=
{
styles
.
logo
}
></
div
>
<
div
className=
{
styles
.
info
}
>
<
div
className=
{
styles
.
title
}
>
项目需求:
{
item
.
require
Description
}
项目需求:
{
item
.
require
mentTypeName
}
</
div
>
{
/*
<div className={styles.desc}>
具体需求:{item.requireDescription}
</div> */
}
<
Tooltip
placement=
"top"
title=
{
item
.
requireDescription
}
>
<
div
className=
{
styles
.
desc
}
>
具体需求:
{
item
.
requireDescription
}
</
div
>
</
Tooltip
>
</
div
>
{
item
.
userAccountId
===
userI
d
?
(
{
userInfo
&&
item
.
userAccountId
===
userInfo
.
i
d
?
(
<
Popconfirm
title=
"提示"
description=
"确认该需求已经解决了吗?"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论