Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
web
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
web
Commits
24ab6406
提交
24ab6406
authored
5月 30, 2023
作者:
翁进城
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into feature/chuck
上级
4372450a
00daecb9
显示空白字符变更
内嵌
并排
正在显示
38 个修改的文件
包含
416 行增加
和
137 行删除
+416
-137
index.tsx
components/NavHeader/index.tsx
+5
-4
index.tsx
components/filter/index.tsx
+94
-6
index.tsx
components/loginModal/index.tsx
+1
-1
userProvider.tsx
lib/userProvider.tsx
+8
-6
[id].page.tsx
pages/equipmentLeasing/detail/[id].page.tsx
+15
-3
index.page.tsx
pages/equipmentLeasing/index.page.tsx
+22
-12
styled.tsx
pages/equipmentLeasing/styled.tsx
+1
-0
xt.png
...ce/examination/components/brushQuestionZone/assets/xt.png
+0
-0
index.tsx
...ervice/examination/components/brushQuestionZone/index.tsx
+3
-2
styled.tsx
...rvice/examination/components/brushQuestionZone/styled.tsx
+1
-1
kh.jpg
...HandService/examination/components/mockExam/assets/kh.jpg
+0
-0
index.tsx
...yingHandService/examination/components/mockExam/index.tsx
+3
-2
styled.tsx
...ingHandService/examination/components/mockExam/styled.tsx
+1
-0
index.page.tsx
pages/flyingHandService/index.page.tsx
+22
-4
styled.tsx
pages/flyingHandService/styled.tsx
+1
-0
index.tsx
pages/forum/api/index.tsx
+15
-4
index.page.tsx
pages/forum/index.page.tsx
+97
-29
index.page.tsx
...lFlowBody/components/map/moreServicePoints/index.page.tsx
+2
-2
index.tsx
...home/waterfallFlowBody/components/rotationChart/index.tsx
+1
-1
styled.tsx
...ome/waterfallFlowBody/components/rotationChart/styled.tsx
+1
-0
index.tsx
pages/home/waterfallFlowBody/index.tsx
+37
-25
index.tsx
pages/jobServices/detail/api/index.tsx
+3
-1
1.webp
pages/jobServices/detail/components/evaluate/assets/1.webp
+0
-0
2.webp
pages/jobServices/detail/components/evaluate/assets/2.webp
+0
-0
3.webp
pages/jobServices/detail/components/evaluate/assets/3.webp
+0
-0
4.webp
pages/jobServices/detail/components/evaluate/assets/4.webp
+0
-0
5.webp
pages/jobServices/detail/components/evaluate/assets/5.webp
+0
-0
6.webp
pages/jobServices/detail/components/evaluate/assets/6.webp
+0
-0
7.webp
pages/jobServices/detail/components/evaluate/assets/7.webp
+0
-0
8.webp
pages/jobServices/detail/components/evaluate/assets/8.webp
+0
-0
9.webp
pages/jobServices/detail/components/evaluate/assets/9.webp
+0
-0
index.tsx
pages/jobServices/detail/components/evaluate/index.tsx
+52
-9
styled.tsx
pages/jobServices/detail/components/evaluate/styled.tsx
+1
-2
index.page.tsx
pages/jobServices/index.page.tsx
+14
-8
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
+10
-12
没有找到文件。
components/NavHeader/index.tsx
浏览文件 @
24ab6406
...
...
@@ -46,7 +46,12 @@ export default function NavHeader() {
useContext
(
UserContext
);
useEffect
(()
=>
{
const
routerTo
=
items
?.
filter
(
item
=>
router
.
route
.
includes
(
item
.
key
))[
0
]
if
(
routerTo
)
{
setCurrentPath
(
routerTo
?.
key
!
);
}
else
{
setCurrentPath
(
router
.
route
);
}
console
.
log
(
"currentHash"
,
currentPath
);
},
[
router
.
route
]);
...
...
@@ -70,11 +75,7 @@ export default function NavHeader() {
if
(
!
userInfo
)
{
setOpenLoginModal
(
true
);
}
else
{
if
(
userInfo
.
companyAuthStatus
)
{
setOpenPublishModal
(
true
);
}
else
{
router
.
push
(
"/certification"
);
}
}
}
...
...
components/filter/index.tsx
浏览文件 @
24ab6406
...
...
@@ -3,7 +3,8 @@ import { FilterOptionResp, RegionResp } from "./api";
import
ResultItem
from
"./compoents/resultItem"
;
import
RegionItem
from
"./compoents/regionItem"
;
import
styles
from
"./index.module.scss"
;
import
{
useEffect
,
useState
}
from
"react"
;
import
React
,
{
useEffect
,
useState
,
forwardRef
,
useImperativeHandle
,
Ref
}
from
"react"
;
import
{
useRouter
}
from
"next/router"
;
import
BrandItem
from
"./compoents/brandItem"
;
import
ModelItem
from
"./compoents/modelItem"
;
import
PartItem
from
"./compoents/partItem"
;
...
...
@@ -58,14 +59,77 @@ type Props = {
adapterFilterResult
:
AdapterResult
//适配器,直接用于接口请求
)
=>
void
;
//筛选条件更改事件
};
export
default
function
Filter
(
props
:
Props
)
{
const
idArr
=
[
"brandId"
,
"categoryId"
,
"modelId"
,
"partsId"
,
"productCategoryId"
,
"qualityId"
,
"industryId"
,
"appTypeId"
,
];
const
nameArr
:
any
=
{
brandId
:
{
type
:
"brandId"
,
typeObj
:
"brand"
,
typeName
:
"品牌:"
,
},
// districtId: {
// type:"districtId",
// typeObj:"region",
// typeName:"地域:",
// },
modelId
:
{
type
:
"modelId"
,
typeObj
:
"model"
,
typeName
:
"型号:"
,
},
partsId
:
{
type
:
"partsId"
,
typeObj
:
"part"
,
typeName
:
"部件:"
,
},
productCategoryId
:
{
type
:
"productCategoryId"
,
typeObj
:
"category"
,
typeName
:
"类目:"
,
},
qualityId
:
{
type
:
"qualityId"
,
typeObj
:
"quality"
,
typeName
:
"成色:"
,
},
industryId
:
{
type
:
"industryId"
,
typeObj
:
"industryId"
,
typeName
:
"行业:"
,
},
appTypeId
:
{
type
:
"appTypeId"
,
typeObj
:
"appTypeId"
,
typeName
:
"应用:"
,
},
categoryId
:
{
type
:
"categoryId"
,
typeObj
:
"categoryId"
,
typeName
:
"类目:"
,
},
};
const
Filter
=
(
props
:
Props
,
ref
:
Ref
<
any
>
)
=>
{
const
router
=
useRouter
();
useImperativeHandle
(
ref
,
()
=>
({
idArr
:
idArr
,
clearRouter
:
clearRouter
,
}));
const
[
result
,
setResult
]
=
useState
<
FilterResult
>
({});
const
onChange
=
(
item
:
FilterOptionResp
,
type
:
string
)
=>
{
console
.
log
(
item
,
type
);
const
onChange
=
(
item
:
FilterOptionResp
,
type
:
string
)
=>
{
clearRouter
();
let
data
:
{
[
key
:
string
]:
FilterOptionResp
}
=
{};
data
[
type
]
=
item
;
console
.
log
(
data
);
setResult
({
...
result
,
...
data
});
};
...
...
@@ -83,7 +147,29 @@ export default function Filter(props: Props) {
categoryId
:
result
.
categoryId
?.
id
,
});
},
[
result
]);
useEffect
(()
=>
{
let
queryVal
=
JSON
.
parse
(
JSON
.
stringify
(
router
.
query
));
if
(
Object
.
keys
(
router
.
query
).
length
)
{
for
(
const
key
in
queryVal
)
{
if
(
idArr
.
includes
(
key
))
{
onChange
(
{
id
:
queryVal
[
key
],
name
:
nameArr
[
key
].
typeName
+
queryVal
.
name
},
nameArr
[
key
].
typeObj
);
}
}
}
},
[
router
]);
const
clearRouter
=
()
=>
{
if
(
Object
.
keys
(
router
.
query
).
length
)
{
router
.
query
=
{};
router
.
replace
(
router
.
pathname
);
}
};
const
onDel
=
(
key
:
string
)
=>
{
clearRouter
();
//@ts-ignore
delete
result
[
key
];
setResult
({
...
...
@@ -162,4 +248,6 @@ export default function Filter(props: Props) {
</
div
>
</>
);
}
};
export
default
forwardRef
(
Filter
);
components/loginModal/index.tsx
浏览文件 @
24ab6406
...
...
@@ -67,7 +67,7 @@ export default function LoginModal(props: Props) {
window
.
localStorage
.
setItem
(
"token"
,
res
.
result
.
token
);
api
.
userInfo
().
then
((
res
)
=>
{
setUserInfo
(
res
.
result
||
""
);
setUserInfo
(
res
.
result
);
window
.
messageApi
.
success
(
"登录成功"
);
props
.
onCancel
();
});
...
...
lib/userProvider.tsx
浏览文件 @
24ab6406
...
...
@@ -10,8 +10,8 @@ import api, { UserInfoResp } from "~/api";
export
const
UserContext
=
createContext
<
{
testLogin
:
()
=>
void
;
logout
:
()
=>
void
;
userInfo
:
UserInfoResp
|
null
|
""
;
setUserInfo
:
Dispatch
<
SetStateAction
<
UserInfoResp
|
null
|
""
>>
;
userInfo
:
UserInfoResp
|
null
|
undefined
;
setUserInfo
:
Dispatch
<
SetStateAction
<
UserInfoResp
|
null
|
undefined
>>
;
needLogin
:
Boolean
;
setNeedLogin
:
Dispatch
<
SetStateAction
<
Boolean
>>
;
}
>
({
...
...
@@ -27,12 +27,14 @@ type Props = {
children
:
React
.
ReactNode
;
};
const
UserProvider
=
({
children
}:
Props
)
=>
{
const
[
userInfo
,
setUserInfo
]
=
useState
<
UserInfoResp
|
null
|
''
>
(
null
);
const
[
userInfo
,
setUserInfo
]
=
useState
<
UserInfoResp
|
null
|
undefined
>
(
null
);
const
[
needLogin
,
setNeedLogin
]
=
useState
<
Boolean
>
(
false
);
//用于通知登录modal需要打开
useEffect
(()
=>
{
try
{
setUserInfo
(
JSON
.
parse
(
window
.
localStorage
.
getItem
(
"userInfo"
)
||
""
));
setUserInfo
(
JSON
.
parse
(
window
.
localStorage
.
getItem
(
"userInfo"
)
||
""
)
||
undefined
);
}
catch
(
e
)
{}
},
[]);
...
...
@@ -48,7 +50,7 @@ const UserProvider = ({ children }: Props) => {
if
(
res
.
code
==
"200"
)
{
window
.
localStorage
.
setItem
(
"token"
,
res
.
result
?.
token
||
""
);
api
.
userInfo
().
then
((
res
)
=>
{
setUserInfo
(
res
.
result
||
''
);
setUserInfo
(
res
.
result
||
undefined
);
});
}
});
...
...
@@ -57,7 +59,7 @@ const UserProvider = ({ children }: Props) => {
//登出
function
logout
()
{
localStorage
.
setItem
(
"token"
,
""
);
setUserInfo
(
''
);
setUserInfo
(
undefined
);
}
return
(
...
...
pages/equipmentLeasing/detail/[id].page.tsx
浏览文件 @
24ab6406
import
React
,
{
useEffect
,
useState
}
from
'react'
import
React
,
{
use
Context
,
use
Effect
,
useState
}
from
'react'
import
{
useRouter
}
from
'next/router'
;
import
Layout
from
"~/components/layout"
;
import
{
Box
}
from
'./styled'
;
...
...
@@ -7,11 +7,15 @@ import { Button , Image as AImage , Divider , Select,Modal ,Tag,Space,Form,messa
import
Image
from
'next/image'
;
import
errImg
from
"~/assets/errImg"
;
import
api
,{
GetWebDeviceDetailResult
,
GetWebDeviceWareSkuById
}
from
'./api'
;
const
{
CheckableTag
}
=
Tag
import
LoginModal
from
"~/components/loginModal"
;
import
{
UserContext
}
from
'~/lib/userProvider'
;
const
{
CheckableTag
}
=
Tag
export
default
function
EquipmentLeasingDetail
()
{
const
router
=
useRouter
();
const
{
userInfo
}
=
useContext
(
UserContext
);
const
[
openLoginModal
,
setOpenLoginModal
]
=
useState
(
false
);
//登录modal
const
[
id
,
setId
]
=
useState
<
number
|
null
>
(
null
);
const
[
detail
,
setDetail
]
=
useState
<
GetWebDeviceDetailResult
|
null
>
()
...
...
@@ -52,6 +56,7 @@ export default function EquipmentLeasingDetail() {
const
[
selectedTagsData
,
setSelectedTagsData
]
=
useState
<
string
>
();
const
showModal
=
()
=>
{
if
(
userInfo
?.
id
)
{
setIsModalOpen
(
true
);
if
(
wareSkuList
?.
length
)
{
setSelectedTags
(
wareSkuList
[
0
].
id
);
...
...
@@ -59,6 +64,9 @@ export default function EquipmentLeasingDetail() {
setSelectedTagsData
(
"3-7天"
)
form
.
setFieldValue
(
"date"
,
"3-7天"
)
}
}
else
{
setOpenLoginModal
(
true
)
}
};
const
handleOk
=
()
=>
{
...
...
@@ -245,6 +253,10 @@ export default function EquipmentLeasingDetail() {
</
Form
.
Item
>
</
Form
>
</
Modal
>
<
LoginModal
open=
{
openLoginModal
}
onCancel=
{
()
=>
setOpenLoginModal
(
false
)
}
></
LoginModal
>
</
Box
>
</
Layout
>
)
...
...
pages/equipmentLeasing/index.page.tsx
浏览文件 @
24ab6406
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
React
,
{
useEffect
,
useState
,
useRef
}
from
"react"
;
import
{
useRouter
}
from
"next/router"
;
import
{
Pagination
}
from
"antd"
;
import
{
Box
}
from
"./styled"
;
...
...
@@ -19,6 +19,7 @@ type Props = {};
export
default
function
EquipmentLeasing
(
props
:
Props
)
{
const
router
=
useRouter
();
const
filter
=
useRef
<
any
>
()
const
[
productList
,
setProductList
]
=
useState
(
Array
<
{
element
:
JSX
.
Element
}
>
);
...
...
@@ -38,8 +39,7 @@ export default function EquipmentLeasing(props: Props) {
<
Image
src=
{
item
.
wareImgs
[
0
].
imgUrl
}
alt=
"error"
width=
{
116
}
height=
{
116
}
fill
/>
</
div
>
</
div
>
...
...
@@ -87,12 +87,20 @@ export default function EquipmentLeasing(props: Props) {
//端口列表请求
useEffect
(()
=>
{
let
queryVal
=
JSON
.
parse
(
JSON
.
stringify
(
router
.
query
));
const
idArr
=
filter
.
current
.
idArr
let
rs
for
(
const
key
in
queryVal
)
{
if
(
idArr
.
includes
(
key
))
{
rs
=
{[
key
]:
router
.
query
[
key
]}
}
}
api
.
listPageDeviceInfo
(
{
...
filterResult
,
...
pageParams
,
...
r
outer
.
query
,
...
r
s
,
},
{
signal
:
abort
?.
signal
,
...
...
@@ -127,17 +135,18 @@ export default function EquipmentLeasing(props: Props) {
},
[]);
useEffect
(()
=>
{
let
queryVal
=
JSON
.
parse
(
JSON
.
stringify
(
router
.
query
));
if
(
router
.
query
)
{
setFilterResult
({
...
router
.
query
});
console
.
log
(
router
.
query
,{
brandId
:
1
});
onFilterChange
({
categoryId
:
{
id
:
2
,
name
:
"类目:航测"
const
idArr
=
filter
.
current
.
idArr
for
(
const
key
in
queryVal
)
{
if
(
idArr
.
includes
(
key
))
{
setFilterResult
({
[
key
]:
router
.
query
[
key
]
});
}
}
},{
categoryId
:
2
});
}
},
[
router
]);
return
(
<
Layout
>
<
Box
>
...
...
@@ -145,12 +154,13 @@ export default function EquipmentLeasing(props: Props) {
types=
{
[
"地域"
,
"设备类目"
,
"设备品牌"
,
"设备型号"
]
}
showResultItem
onChange=
{
onFilterChange
}
ref=
{
filter
}
></
Filter
>
<
div
style=
{
{
paddingTop
:
13
}
}
>
<
ContentBox
boxIndex=
{
5
}
leftcontentstyle=
{
{
width
:
"10
2
0px"
,
width
:
"10
1
0px"
,
margin
:
{
top
:
0
,
right
:
"12px"
,
bottom
:
"12px"
,
left
:
0
},
}
}
leftRenderDom=
{
{
...
...
pages/equipmentLeasing/styled.tsx
浏览文件 @
24ab6406
...
...
@@ -25,6 +25,7 @@ export const Box = styled.div`
width: 116px;
height: 116px;
background: #efefef;
position: relative;
}
}
&-bottom {
...
...
pages/flyingHandService/examination/components/brushQuestionZone/assets/xt.png
0 → 100644
浏览文件 @
24ab6406
69.6 KB
pages/flyingHandService/examination/components/brushQuestionZone/index.tsx
浏览文件 @
24ab6406
...
...
@@ -2,7 +2,8 @@ import React,{ useEffect ,useState} from 'react'
import
{
Box
}
from
'./styled'
import
{
Cascader
,
Select
}
from
'antd'
import
api
,
{
Flying
,
SkillsType
,
RegionResp
}
from
"../../../api"
;
import
Image
from
'next/image'
import
xt
from
'./assets/xt.png'
interface
BrushQuestionZoneType
{
}
...
...
@@ -95,7 +96,7 @@ export default function BrushQuestionZone() {
<
div
className=
"content"
>
{
list
?.
map
((
item
,
i
)
=>
(
<
div
key=
{
i
}
className=
"item"
>
<
div
className=
"img-box"
></
div
>
<
div
className=
"img-box"
><
Image
src=
{
xt
.
src
}
fill
alt=
'#'
></
Image
>
<
/
div
>
<
div
className=
"item-content"
>
第一章 第1节 习题练习习题练习习题练习
</
div
>
...
...
pages/flyingHandService/examination/components/brushQuestionZone/styled.tsx
浏览文件 @
24ab6406
...
...
@@ -54,13 +54,13 @@ export const Box = styled.div`
width: 120px;
height: 100px;
background: #E6E6E6;
position: relative;
}
.item-content{
display: flex;
align-items: center;
flex: 1;
padding: 12px 14px 11px 16px;
}
}
}
...
...
pages/flyingHandService/examination/components/mockExam/assets/kh.jpg
0 → 100644
浏览文件 @
24ab6406
138.3 KB
pages/flyingHandService/examination/components/mockExam/index.tsx
浏览文件 @
24ab6406
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
Box
}
from
'./styled'
import
Image
from
'next/image'
import
kh
from
'./assets/kh.jpg'
interface
MockExamType
{
}
...
...
@@ -16,7 +17,7 @@ export default function MockExam() {
<
div
className=
"content"
>
{
list
?.
map
((
item
,
i
)
=>
(
<
div
key=
{
i
}
className=
"item"
>
<
div
className=
"img-box"
></
div
>
<
div
className=
"img-box"
><
Image
src=
{
kh
.
src
}
fill
alt=
'#'
></
Image
><
/
div
>
<
div
className=
"item-content"
>
<
div
className=
"top"
>
云飞手行业认证考核
</
div
>
<
div
className=
"bottom"
>
...
...
pages/flyingHandService/examination/components/mockExam/styled.tsx
浏览文件 @
24ab6406
...
...
@@ -27,6 +27,7 @@ export const Box = styled.div`
width: 120px;
height: 100px;
background: #E6E6E6;
position: relative;
}
.item-content{
display: flex;
...
...
pages/flyingHandService/index.page.tsx
浏览文件 @
24ab6406
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
React
,
{
use
Context
,
use
Effect
,
useState
}
from
"react"
;
import
{
Box
}
from
"./styled"
;
import
Image
from
"next/image"
;
import
{
Button
,
Select
,
Space
,
Pagination
,
Cascader
,
Modal
,
Form
,
Input
,
Checkbox
,
message
}
from
"antd"
;
...
...
@@ -7,6 +7,8 @@ import Layout from "~/components/layout";
import
ContentBox
from
"~/components/contentBox"
;
import
api
,
{
Flying
,
SkillsType
,
RegionResp
}
from
"./api"
;
import
{
useRouter
}
from
"next/router"
;
import
LoginModal
from
"~/components/loginModal"
;
import
{
UserContext
}
from
"~/lib/userProvider"
;
interface
FilterInfoParams
{
regionId
?:
number
;
flightSkillsId
?:
number
;
...
...
@@ -16,6 +18,8 @@ interface FilterInfoParams {
export
default
function
FlyingHandService
()
{
const
{
Option
}
=
Select
const
router
=
useRouter
();
const
{
userInfo
}
=
useContext
(
UserContext
);
const
[
openLoginModal
,
setOpenLoginModal
]
=
useState
(
false
);
//登录modal
const
[
list
,
setList
]
=
useState
([
"https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/540X844-1(1).jpg"
,
"https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/540X844(1).jpg"
,
...
...
@@ -54,8 +58,7 @@ export default function FlyingHandService() {
<
Image
src=
{
`${item.videoUrl}?x-oss-process=video/snapshot,t_1000,m_fast`
}
alt=
"#"
width=
{
220
}
height=
{
160
}
fill
/>
</
div
>
<
div
className=
"item-bottom"
>
...
...
@@ -133,10 +136,19 @@ export default function FlyingHandService() {
})
||
[]
);
setCount
(
res
.
result
?.
totalCount
||
0
);
clearRouter
()
});
},
[
abort
]);
const
clearRouter
=
()
=>
{
if
(
Object
.
keys
(
router
.
query
).
length
)
{
router
.
query
=
{}
router
.
replace
(
router
.
pathname
)
}
}
const
onProvinceChange
=
(
value
:
number
)
=>
{
clearRouter
()
if
(
value
)
{
setFlightDefault
(
value
)
}
else
{
...
...
@@ -151,6 +163,7 @@ export default function FlyingHandService() {
};
const
onChange
=
(
value
:
any
)
=>
{
clearRouter
()
if
(
value
)
{
setSkillsDefault
([
value
])
}
else
{
...
...
@@ -165,6 +178,7 @@ export default function FlyingHandService() {
};
const
onChangeRegion
=
(
value
:
any
)
=>
{
clearRouter
()
setFilterParams
((
props
)
=>
{
return
{
...
props
,
...
...
@@ -314,7 +328,7 @@ export default function FlyingHandService() {
<
Button
type=
"primary"
className=
"btn"
onClick=
{
()
=>
setIsModalOpen
(
true
)
}
onClick=
{
()
=>
userInfo
?.
id
?
setIsModalOpen
(
true
)
:
setOpenLoginModal
(
true
)
}
>
报名学习课程
</
Button
>
...
...
@@ -433,6 +447,10 @@ export default function FlyingHandService() {
}
}
rightRenderDom=
{
{
columns
:
rightDomList
}
}
/>
<
LoginModal
open=
{
openLoginModal
}
onCancel=
{
()
=>
setOpenLoginModal
(
false
)
}
></
LoginModal
>
</
Box
>
</
Layout
>
);
...
...
pages/flyingHandService/styled.tsx
浏览文件 @
24ab6406
...
...
@@ -51,6 +51,7 @@ export const Box = styled.div`
background-color: #e6e6e6;
border-radius: 6px 6px 0px 0px;
overflow: hidden;
position: relative;
}
&-bottom {
padding: 9px 12px 12px;
...
...
pages/forum/api/index.tsx
浏览文件 @
24ab6406
...
...
@@ -40,10 +40,9 @@ export interface CommentParams {
content
:
string
;
//评论内容
dynamicId
:
number
;
//动态id
parentId
?:
number
;
//父级评论
userId
:
number
;
//用户id
}
export
interface
ByDynamic
Params
{
export
interface
ByDynamic
Resp
{
id
:
number
;
dynamicId
:
number
;
parentId
:
number
;
...
...
@@ -51,7 +50,12 @@ export interface ByDynamicParams {
content
:
string
;
likesCount
:
number
;
createTime
:
string
;
children
:
ByDynamicParams
[];
children
:
ByDynamicResp
[];
userBaseInfoVO
:
{
id
:
number
,
nickName
:
string
,
userImg
:
string
}
}
export
default
{
...
...
@@ -70,7 +74,14 @@ export default {
},
//根据动态查看评论
byDynamic
(
params
:
{
dynamicId
:
number
}):
Promise
<
Response
<
Array
<
ByDynamicParams
>>>
{
byDynamic
(
params
:
{
dynamicId
:
number
;
}):
Promise
<
Response
<
Array
<
ByDynamicResp
>>>
{
return
request
(
"/release/dynamic/byDynamic"
,
"get"
,
params
);
},
//点赞或取消点赞
likeOrCancel
(
params
:
{
dynamicId
:
number
})
{
return
request
(
"/release/dynamic/likeOrCancel"
,
"get"
,
params
);
},
};
pages/forum/index.page.tsx
浏览文件 @
24ab6406
...
...
@@ -15,14 +15,15 @@ import errImg from "~/assets/errImg";
import
{
RightOutlined
}
from
"@ant-design/icons"
;
import
{
useContext
,
useEffect
,
useState
}
from
"react"
;
import
PublishMessage
from
"./components/publishMessage"
;
import
api
,
{
ByDynamic
Params
,
Dynamic
}
from
"./api"
;
import
api
,
{
ByDynamic
Resp
,
Dynamic
}
from
"./api"
;
import
InfiniteScroll
from
"react-infinite-scroll-component"
;
import
{
UserContext
}
from
"~/lib/userProvider"
;
import
moment
from
"moment"
;
interface
Item
extends
Dynamic
{
openComment
?:
boolean
;
//是否开启评论
showCommentAll
?:
boolean
;
//是否展示全部评论
commentList
?:
Array
<
ByDynamic
Params
>
;
commentList
?:
Array
<
ByDynamic
Resp
>
;
//评论列表
}
export
default
function
Forum
()
{
...
...
@@ -34,6 +35,7 @@ export default function Forum() {
});
const
[
count
,
setCount
]
=
useState
(
0
);
//动态总数
const
{
userInfo
,
setNeedLogin
}
=
useContext
(
UserContext
);
const
[
form
]
=
Form
.
useForm
();
//评论区的form
useEffect
(()
=>
{
api
...
...
@@ -78,27 +80,74 @@ export default function Forum() {
item
.
openComment
=
!
item
.
openComment
;
const
temp
=
[...
list
];
setList
(
temp
);
getCommentList
(
item
);
};
//评论内容
const
onComment
=
(
values
:
any
,
id
:
number
,
i
:
number
)
=>
{
//获取评论列表
const
getCommentList
=
(
item
:
Item
)
=>
{
api
.
byDynamic
({
dynamicId
:
item
.
id
,
})
.
then
((
res
)
=>
{
if
(
res
?.
code
===
"200"
)
{
item
.
commentList
=
res
.
result
||
[];
}
const
temp
=
[...
list
];
setList
(
temp
);
});
};
//展示所有评论
const
showCommentAll
=
(
item
:
Item
)
=>
{
item
.
showCommentAll
=
true
;
const
temp
=
[...
list
];
setList
(
temp
);
};
//评论内容
const
onComment
=
(
values
:
any
,
item
:
Item
)
=>
{
if
(
userInfo
)
{
api
.
comment
({
content
:
values
.
content
,
dynamicId
:
id
,
userId
:
userInfo
.
id
,
dynamicId
:
item
.
id
,
})
.
then
((
res
)
=>
{
if
(
res
.
code
===
"200"
)
{
window
.
messageApi
.
success
(
"评论成功"
);
form
.
resetFields
([
"content"
]);
item
.
commentCount
+=
1
;
getCommentList
(
item
);
}
});
}
else
{
setNeedLogin
(
true
);
}
};
//点赞或取消
const
onLike
=
(
item
:
Item
)
=>
{
if
(
userInfo
)
{
api
.
likeOrCancel
({
dynamicId
:
item
.
id
,
})
.
then
((
res
)
=>
{
if
(
res
.
code
===
"200"
)
{
item
.
likes
=
!
item
.
likes
;
if
(
item
.
likes
)
{
item
.
likesCount
++
;
}
else
{
item
.
likesCount
--
;
}
const
temp
=
[...
list
];
setList
(
temp
);
}
});
}
};
return
(
<
Layout
>
<
div
className=
{
styles
.
forum
}
>
...
...
@@ -169,7 +218,10 @@ export default function Forum() {
></
div
>
{
item
.
commentCount
}
评论
</
div
>
<
div
className=
{
styles
.
ctrlsItem
}
>
<
div
className=
{
styles
.
ctrlsItem
}
onClick=
{
()
=>
onLike
(
item
)
}
>
<
div
className=
{
`${styles.ctrlsItemIcon} ${
styles.iconPraise
...
...
@@ -183,8 +235,9 @@ export default function Forum() {
{
item
.
openComment
&&
(
<
div
className=
{
styles
.
commentWrap
}
>
<
Form
form=
{
form
}
onFinish=
{
(
values
)
=>
{
onComment
(
values
,
item
.
id
,
i
);
onComment
(
values
,
item
);
}
}
>
<
Form
.
Item
...
...
@@ -213,38 +266,53 @@ export default function Forum() {
</
Form
>
<
div
className=
{
styles
.
comments
}
>
<
div
className=
{
styles
.
commentItem
}
>
<
div
className=
{
styles
.
commentHeadImg
}
></
div
>
<
div
className=
{
styles
.
info
}
>
<
div
className=
{
styles
.
nameWrap
}
>
<
div
className=
{
styles
.
commentName
}
>
无人机爱好者111:
<
div
className=
{
styles
.
date
}
>
05-16
</
div
>
</
div
>
<
div
className=
{
styles
.
commentContent
}
>
无人机记录生活
</
div
>
</
div
>
</
div
>
{
/* 判断是否展示所有评论 */
}
{
item
.
commentList
?.
filter
((
comment
,
i
)
=>
{
if
(
item
.
showCommentAll
)
{
return
true
;
}
else
{
if
(
i
<
2
)
{
return
true
;
}
}
})
.
map
((
comment
)
=>
{
return
(
<
div
key=
{
comment
.
id
}
className=
{
styles
.
commentItem
}
>
<
div
className=
{
styles
.
commentHeadImg
}
>
<
Image
src=
{
comment
.
userBaseInfoVO
?.
userImg
}
></
Image
>
</
div
>
<
div
className=
{
styles
.
commentItem
}
>
<
div
className=
{
styles
.
commentHeadImg
}
></
div
>
<
div
className=
{
styles
.
info
}
>
<
div
className=
{
styles
.
nameWrap
}
>
<
div
className=
{
styles
.
commentName
}
>
无人机爱好者111:
<
div
className=
{
styles
.
date
}
>
05-16
</
div
>
{
comment
.
userBaseInfoVO
?.
nickName
}
:
<
div
className=
{
styles
.
date
}
>
{
moment
(
comment
.
createTime
).
format
(
"YYYY-MM-DD"
)
}
</
div
>
</
div
>
<
div
className=
{
styles
.
commentContent
}
>
无人机记录生活
{
comment
.
content
}
</
div
>
</
div
>
</
div
>
</
div
>
);
})
}
</
div
>
{
!
item
.
showCommentAll
&&
(
<
div
className=
{
styles
.
showAll
}
>
查看全部15条评论
{
!
item
.
showCommentAll
&&
item
.
commentCount
>
2
&&
(
<
div
className=
{
styles
.
showAll
}
onClick=
{
()
=>
showCommentAll
(
item
)
}
>
查看全部
{
item
.
commentCount
}
条评论
<
RightOutlined
size=
{
14
}
/>
</
div
>
)
}
...
...
pages/home/waterfallFlowBody/components/map/moreServicePoints/index.page.tsx
浏览文件 @
24ab6406
...
...
@@ -213,13 +213,13 @@ export default function MoreServicePoints() {
onClick=
{
()
=>
mapEntiy
(
1
)
}
className=
{
`item ${mapItem === 1 ? "active" : ""}`
}
>
租赁
网点
培训
网点
</
div
>
<
div
onClick=
{
()
=>
mapEntiy
(
2
)
}
className=
{
`item ${mapItem === 2 ? "active" : ""}`
}
>
培训
网点
租赁
网点
</
div
>
<
div
onClick=
{
()
=>
mapEntiy
(
3
)
}
...
...
pages/home/waterfallFlowBody/components/rotationChart/index.tsx
浏览文件 @
24ab6406
...
...
@@ -21,7 +21,7 @@ export default function RotationChart() {
{
list
.
map
((
item
)
=>
(
<
div
key=
{
item
}
>
<
h3
className=
"contentStyle"
>
<
Image
src=
{
item
}
alt=
"error"
width=
{
806
}
height=
{
200
}
/>
<
Image
src=
{
item
}
alt=
"error"
fill
/>
</
h3
>
</
div
>
))
}
...
...
pages/home/waterfallFlowBody/components/rotationChart/styled.tsx
浏览文件 @
24ab6406
...
...
@@ -39,5 +39,6 @@ export const Box = styled.div`
line-height: 100px;
text-align: center;
background: #364d79;
position: relative;
}
`
;
pages/home/waterfallFlowBody/index.tsx
浏览文件 @
24ab6406
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
React
,
{
use
Context
,
use
Effect
,
useState
}
from
"react"
;
import
{
Space
,
Select
,
Button
,
message
}
from
"antd"
;
import
Image
from
"next/image"
;
import
{
useRouter
}
from
"next/router"
;
...
...
@@ -23,7 +23,8 @@ import {
listNewsApi
,
}
from
"./api"
;
import
{
BaseOptionType
,
DefaultOptionType
}
from
"antd/es/select"
;
import
LoginModal
from
"~/components/loginModal"
;
import
{
UserContext
}
from
"~/lib/userProvider"
;
interface
ColumnsType
{
title
:
string
;
router
:
string
;
...
...
@@ -31,7 +32,8 @@ interface ColumnsType {
export
default
function
WaterfallFlowBody
()
{
const
router
=
useRouter
();
const
{
userInfo
}
=
useContext
(
UserContext
);
//获取信息
const
[
openLoginModal
,
setOpenLoginModal
]
=
useState
(
false
);
//登录modal
const
[
list
,
setList
]
=
useState
([
"中国人寿"
,
"中国平安"
,
...
...
@@ -254,37 +256,43 @@ export default function WaterfallFlowBody() {
},
[]);
const
routerPath
=
(
index
:
number
,
item
?:
AllType
)
=>
{
if
(
index
===
0
||
index
===
1
||
index
===
3
||
index
===
4
)
{
if
(
item
&&
(
index
===
0
||
index
===
1
||
index
===
3
||
index
===
4
)
)
{
router
.
push
({
pathname
:
columns
[
index
].
router
,
query
:
{
[
item
?.
type
!
]:
item
?.
id
!
,
name
:
item
?.
name
||
item
?.
appName
||
item
?.
skillsName
},
});
}
else
{
router
.
push
({
pathname
:
columns
[
index
].
router
,
query
:
{
[
item
?.
type
!
]:
item
?.
id
!
},
});
}
};
const
handleTenderApply
=
async
(
item
:
NewsTenderType
)
=>
{
if
(
item
.
apply
)
return
;
if
(
userInfo
?.
id
)
{
let
res
=
await
listNewsApi
.
tenderApply
({
tenderInfoId
:
item
.
id
,
tenderNewsId
:
item
.
tenderNewsId
,
userAccountId
:
userInfo
?.
id
,
})
try
{
if
(
res
.
code
===
"200"
)
{
message
.
success
(
"申请成功"
)
item
.
apply
=
1
// let res = await listNewsApi.tenderApply({
// tenderInfoId: item.id,
// tenderNewsId: item.tenderNewsId,
// userAccountId: 0,
// })
// try{
// if (res.code==="200") {
// message.success("申请成功")
// let res8 = await listNewsApi.listNewTenderInfo({
// pageNo: 1,
// pageSize: 6,
// });
// setRightBottomDomList(rightDom2(res8.result?.list!));
// }else{
// message.error(res.message)
// }
// }catch(e){
// console.log(e);
// }
let
res8
=
await
listNewsApi
.
listNewTenderInfo
({
pageNo
:
1
,
pageSize
:
6
,
});
setRightBottomDomList
(
rightDom2
(
res8
.
result
?.
list
!
));
}
else
{
message
.
error
(
res
.
message
)
}
}
catch
(
e
){
console
.
log
(
e
);
}
}
else
{
setOpenLoginModal
(
true
)
}
}
const
leftDom
=
(
...
...
@@ -451,6 +459,10 @@ export default function WaterfallFlowBody() {
],
}
}
/>
<
LoginModal
open=
{
openLoginModal
}
onCancel=
{
()
=>
setOpenLoginModal
(
false
)
}
></
LoginModal
>
</
Box
>
);
}
pages/jobServices/detail/api/index.tsx
浏览文件 @
24ab6406
...
...
@@ -17,7 +17,9 @@ export interface JobDetail {
contentVideo
?:
string
|
null
,
star
?:
number
,
img
?:
string
|
null
,
type
?:
number
type
?:
number
,
name
?:
string
,
time
?:
number
|
string
}
export
interface
ListPageJobInfoResp
{
...
...
pages/jobServices/detail/components/evaluate/assets/1.webp
0 → 100644
浏览文件 @
24ab6406
File added
pages/jobServices/detail/components/evaluate/assets/2.webp
0 → 100644
浏览文件 @
24ab6406
File added
pages/jobServices/detail/components/evaluate/assets/3.webp
0 → 100644
浏览文件 @
24ab6406
File added
pages/jobServices/detail/components/evaluate/assets/4.webp
0 → 100644
浏览文件 @
24ab6406
File added
pages/jobServices/detail/components/evaluate/assets/5.webp
0 → 100644
浏览文件 @
24ab6406
File added
pages/jobServices/detail/components/evaluate/assets/6.webp
0 → 100644
浏览文件 @
24ab6406
File added
pages/jobServices/detail/components/evaluate/assets/7.webp
0 → 100644
浏览文件 @
24ab6406
File added
pages/jobServices/detail/components/evaluate/assets/8.webp
0 → 100644
浏览文件 @
24ab6406
File added
pages/jobServices/detail/components/evaluate/assets/9.webp
0 → 100644
浏览文件 @
24ab6406
File added
pages/jobServices/detail/components/evaluate/index.tsx
浏览文件 @
24ab6406
import
React
from
"react"
;
import
React
,
{
useEffect
}
from
"react"
;
import
{
Box
}
from
"./styled"
;
import
{
Rate
}
from
"antd"
;
import
Image
from
"next/image"
;
import
{
JobDetail
}
from
"../../api"
;
import
pic1
from
'./assets/1.webp'
import
pic2
from
'./assets/2.webp'
import
pic3
from
'./assets/3.webp'
import
pic4
from
'./assets/4.webp'
import
pic5
from
'./assets/5.webp'
import
pic6
from
'./assets/6.webp'
import
pic7
from
'./assets/7.webp'
import
pic8
from
'./assets/8.webp'
import
pic9
from
'./assets/9.webp'
import
Moment
from
'moment'
;
const
imgList
=
[
pic1
,
pic2
,
pic3
,
pic4
,
pic5
,
pic6
,
pic7
,
pic8
,
pic9
]
const
name
=
[
"浮生若梦"
,
"惜君嫣云"
,
"抹茶味儿的菇凉"
,
"清歌缈缦"
,
"清新雅致"
,
"呆到深处自然萌"
,
"各不打扰"
,
"无声飞雪"
,
"我一生下来就是个无齿的人"
,
"浅笑小倔强"
,
"乱了夏末蓝了海"
,
"初夏知鸣"
]
interface
EvaluateType
{
evaluateInfo
:
Array
<
JobDetail
>
;
}
export
default
function
Evaluate
(
props
:
EvaluateType
)
{
const
list
=
[{},
{},
{},
{}];
const
{
evaluateInfo
}
=
props
;
console
.
log
(
evaluateInfo
);
let
listVal
:
Array
<
JobDetail
>
=
JSON
.
parse
(
JSON
.
stringify
(
evaluateInfo
))
listVal
.
map
((
item
,
index
)
=>
{
item
.
img
=
imgList
[
Math
.
floor
(
Math
.
random
()
*
9
)]?.
src
item
.
name
=
name
[
Math
.
floor
(
Math
.
random
()
*
12
)]
console
.
log
(
Date
.
now
()
-
(
index
*
100000
));
item
.
time
=
Date
.
now
()
-
(
index
*
8
e7
)
})
return
(
<
Box
>
{
evaluateInfo
?.
map
((
item
,
i
)
=>
(
{
listVal
?.
map
((
item
,
i
)
=>
(
<
div
key=
{
item
.
id
}
className=
"item"
>
<
div
className=
"item-user"
>
<
div
className=
"item-user-image"
>
...
...
@@ -22,25 +65,25 @@ export default function Evaluate(props: EvaluateType) {
className=
"image"
height=
{
42
}
width=
{
42
}
src=
{
item
.
img
?
item
.
img
:
""
}
src=
{
item
.
img
?
item
.
img
:
''
}
alt=
"#"
/>
</
div
>
<
div
className=
"item-user-info"
>
<
div
className=
"item-user-info-name"
>
{
item
.
star
}
</
div
>
<
div
className=
"item-user-info-name"
>
{
item
.
name
}
</
div
>
<
Rate
style=
{
{
height
:
30
}
}
disabled
defaultValue=
{
item
.
star
}
/>
</
div
>
</
div
>
<
div
className=
"item-content"
>
<
div
className=
"item-content-label"
>
{
item
.
content
}
</
div
>
<
div
className=
"item-content-image"
>
{
item
.
contentImgs
?.
map
((
item
)
=>
(
{
item
.
contentImgs
?.
length
?
item
.
contentImgs
?.
map
((
item
)
=>
(
<
div
key=
{
item
}
className=
"image-item"
>
<
Image
width=
{
80
}
height=
{
80
}
src=
{
item
}
alt=
"error"
/>
</
div
>
))
}
))
:
null
}
</
div
>
<
div
className=
"item-content-time"
>
3月4日
</
div
>
<
div
className=
"item-content-time"
>
{
Moment
(
item
.
time
).
format
(
'YYYY-MM-DD'
)
}
</
div
>
</
div
>
</
div
>
))
}
...
...
pages/jobServices/detail/components/evaluate/styled.tsx
浏览文件 @
24ab6406
...
...
@@ -9,7 +9,7 @@ export const Box = styled.div`
overflow-y: auto;
height: 800px;
.item{
height: 1
8
0px;
height: 1
2
0px;
&-user{
display: flex;
align-items: center;
...
...
@@ -57,7 +57,6 @@ export const Box = styled.div`
}
}
&-time{
width: 45px;
height: 20px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
...
...
pages/jobServices/index.page.tsx
浏览文件 @
24ab6406
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
React
,
{
useEffect
,
useState
,
useRef
}
from
"react"
;
import
{
Box
}
from
"./styled"
;
import
{
Pagination
}
from
"antd"
;
import
Layout
from
"~/components/layout"
;
...
...
@@ -18,6 +18,7 @@ interface ImageListType {}
export
default
function
JobServices
()
{
const
router
=
useRouter
();
const
filter
=
useRef
<
any
>
()
const
[
list
,
setList
]
=
useState
([
"https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/540X844-2(1).jpg"
,
// "https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/665512fd-12e6-49a9-93c1-f9dcd0e82083.jpg",
...
...
@@ -92,15 +93,19 @@ export default function JobServices() {
//端口列表请求
useEffect
(()
=>
{
let
queryVal
=
JSON
.
parse
(
JSON
.
stringify
(
router
.
query
));
const
idArr
=
filter
.
current
.
idArr
let
rs
for
(
const
key
in
queryVal
)
{
queryVal
[
key
]
=
Number
(
queryVal
[
key
]);
if
(
idArr
.
includes
(
key
))
{
rs
=
{[
key
]:
router
.
query
[
key
]}
}
}
api
.
listPageJobServicesInfo
(
{
...
filterResult
,
...
pageParams
,
...
queryVal
,
...
rs
,
},
{
signal
:
abort
?.
signal
,
...
...
@@ -124,8 +129,6 @@ export default function JobServices() {
setFilterResult
(
adapterFilterResult
);
};
const
[
query
,
setQuery
]
=
useState
<
string
|
string
[]
>
();
useEffect
(()
=>
{
setRightDomList
(
list
.
map
((
item
)
=>
{
...
...
@@ -135,12 +138,14 @@ export default function JobServices() {
},
[]);
useEffect
(()
=>
{
if
(
router
.
query
&&
Object
.
keys
(
router
.
query
).
length
)
{
let
queryVal
=
JSON
.
parse
(
JSON
.
stringify
(
router
.
query
));
if
(
router
.
query
)
{
const
idArr
=
filter
.
current
.
idArr
for
(
const
key
in
queryVal
)
{
queryVal
[
key
]
=
Number
(
queryVal
[
key
]);
if
(
idArr
.
includes
(
key
))
{
setFilterResult
({
[
key
]:
router
.
query
[
key
]
});
}
}
setFilterResult
({
...
queryVal
});
}
},
[
router
]);
...
...
@@ -151,6 +156,7 @@ export default function JobServices() {
types=
{
[
"地域"
,
"行业"
,
"应用"
]
}
showResultItem
onChange=
{
onFilterChange
}
ref=
{
filter
}
></
Filter
>
<
div
style=
{
{
marginTop
:
10
}
}
>
<
ContentBox
...
...
pages/projectInfo/components/bids/index.tsx
浏览文件 @
24ab6406
...
...
@@ -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
浏览文件 @
24ab6406
...
...
@@ -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
浏览文件 @
24ab6406
...
...
@@ -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
浏览文件 @
24ab6406
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
>
{
/*
<
Tooltip
placement=
"top"
title=
{
item
.
requireDescription
}
>
<
div
className=
{
styles
.
desc
}
>
具体需求:
{
item
.
requireDescription
}
</div> */
}
</
div
>
{
item
.
userAccountId
===
userId
?
(
</
Tooltip
>
</
div
>
{
userInfo
&&
item
.
userAccountId
===
userInfo
.
id
?
(
<
Popconfirm
title=
"提示"
description=
"确认该需求已经解决了吗?"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论