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() {
...
@@ -46,7 +46,12 @@ export default function NavHeader() {
useContext
(
UserContext
);
useContext
(
UserContext
);
useEffect
(()
=>
{
useEffect
(()
=>
{
const
routerTo
=
items
?.
filter
(
item
=>
router
.
route
.
includes
(
item
.
key
))[
0
]
if
(
routerTo
)
{
setCurrentPath
(
routerTo
?.
key
!
);
}
else
{
setCurrentPath
(
router
.
route
);
setCurrentPath
(
router
.
route
);
}
console
.
log
(
"currentHash"
,
currentPath
);
console
.
log
(
"currentHash"
,
currentPath
);
},
[
router
.
route
]);
},
[
router
.
route
]);
...
@@ -70,11 +75,7 @@ export default function NavHeader() {
...
@@ -70,11 +75,7 @@ export default function NavHeader() {
if
(
!
userInfo
)
{
if
(
!
userInfo
)
{
setOpenLoginModal
(
true
);
setOpenLoginModal
(
true
);
}
else
{
}
else
{
if
(
userInfo
.
companyAuthStatus
)
{
setOpenPublishModal
(
true
);
setOpenPublishModal
(
true
);
}
else
{
router
.
push
(
"/certification"
);
}
}
}
}
}
...
...
components/filter/index.tsx
浏览文件 @
24ab6406
...
@@ -3,7 +3,8 @@ import { FilterOptionResp, RegionResp } from "./api";
...
@@ -3,7 +3,8 @@ import { FilterOptionResp, RegionResp } from "./api";
import
ResultItem
from
"./compoents/resultItem"
;
import
ResultItem
from
"./compoents/resultItem"
;
import
RegionItem
from
"./compoents/regionItem"
;
import
RegionItem
from
"./compoents/regionItem"
;
import
styles
from
"./index.module.scss"
;
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
BrandItem
from
"./compoents/brandItem"
;
import
ModelItem
from
"./compoents/modelItem"
;
import
ModelItem
from
"./compoents/modelItem"
;
import
PartItem
from
"./compoents/partItem"
;
import
PartItem
from
"./compoents/partItem"
;
...
@@ -58,14 +59,77 @@ type Props = {
...
@@ -58,14 +59,77 @@ type Props = {
adapterFilterResult
:
AdapterResult
//适配器,直接用于接口请求
adapterFilterResult
:
AdapterResult
//适配器,直接用于接口请求
)
=>
void
;
//筛选条件更改事件
)
=>
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
[
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
}
=
{};
let
data
:
{
[
key
:
string
]:
FilterOptionResp
}
=
{};
data
[
type
]
=
item
;
data
[
type
]
=
item
;
console
.
log
(
data
);
setResult
({
...
result
,
...
data
});
setResult
({
...
result
,
...
data
});
};
};
...
@@ -83,7 +147,29 @@ export default function Filter(props: Props) {
...
@@ -83,7 +147,29 @@ export default function Filter(props: Props) {
categoryId
:
result
.
categoryId
?.
id
,
categoryId
:
result
.
categoryId
?.
id
,
});
});
},
[
result
]);
},
[
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
)
=>
{
const
onDel
=
(
key
:
string
)
=>
{
clearRouter
();
//@ts-ignore
//@ts-ignore
delete
result
[
key
];
delete
result
[
key
];
setResult
({
setResult
({
...
@@ -162,4 +248,6 @@ export default function Filter(props: Props) {
...
@@ -162,4 +248,6 @@ export default function Filter(props: Props) {
</
div
>
</
div
>
</>
</>
);
);
}
};
export
default
forwardRef
(
Filter
);
components/loginModal/index.tsx
浏览文件 @
24ab6406
...
@@ -67,7 +67,7 @@ export default function LoginModal(props: Props) {
...
@@ -67,7 +67,7 @@ export default function LoginModal(props: Props) {
window
.
localStorage
.
setItem
(
"token"
,
res
.
result
.
token
);
window
.
localStorage
.
setItem
(
"token"
,
res
.
result
.
token
);
api
.
userInfo
().
then
((
res
)
=>
{
api
.
userInfo
().
then
((
res
)
=>
{
setUserInfo
(
res
.
result
||
""
);
setUserInfo
(
res
.
result
);
window
.
messageApi
.
success
(
"登录成功"
);
window
.
messageApi
.
success
(
"登录成功"
);
props
.
onCancel
();
props
.
onCancel
();
});
});
...
...
lib/userProvider.tsx
浏览文件 @
24ab6406
...
@@ -10,8 +10,8 @@ import api, { UserInfoResp } from "~/api";
...
@@ -10,8 +10,8 @@ import api, { UserInfoResp } from "~/api";
export
const
UserContext
=
createContext
<
{
export
const
UserContext
=
createContext
<
{
testLogin
:
()
=>
void
;
testLogin
:
()
=>
void
;
logout
:
()
=>
void
;
logout
:
()
=>
void
;
userInfo
:
UserInfoResp
|
null
|
""
;
userInfo
:
UserInfoResp
|
null
|
undefined
;
setUserInfo
:
Dispatch
<
SetStateAction
<
UserInfoResp
|
null
|
""
>>
;
setUserInfo
:
Dispatch
<
SetStateAction
<
UserInfoResp
|
null
|
undefined
>>
;
needLogin
:
Boolean
;
needLogin
:
Boolean
;
setNeedLogin
:
Dispatch
<
SetStateAction
<
Boolean
>>
;
setNeedLogin
:
Dispatch
<
SetStateAction
<
Boolean
>>
;
}
>
({
}
>
({
...
@@ -27,12 +27,14 @@ type Props = {
...
@@ -27,12 +27,14 @@ type Props = {
children
:
React
.
ReactNode
;
children
:
React
.
ReactNode
;
};
};
const
UserProvider
=
({
children
}:
Props
)
=>
{
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需要打开
const
[
needLogin
,
setNeedLogin
]
=
useState
<
Boolean
>
(
false
);
//用于通知登录modal需要打开
useEffect
(()
=>
{
useEffect
(()
=>
{
try
{
try
{
setUserInfo
(
JSON
.
parse
(
window
.
localStorage
.
getItem
(
"userInfo"
)
||
""
));
setUserInfo
(
JSON
.
parse
(
window
.
localStorage
.
getItem
(
"userInfo"
)
||
""
)
||
undefined
);
}
catch
(
e
)
{}
}
catch
(
e
)
{}
},
[]);
},
[]);
...
@@ -48,7 +50,7 @@ const UserProvider = ({ children }: Props) => {
...
@@ -48,7 +50,7 @@ const UserProvider = ({ children }: Props) => {
if
(
res
.
code
==
"200"
)
{
if
(
res
.
code
==
"200"
)
{
window
.
localStorage
.
setItem
(
"token"
,
res
.
result
?.
token
||
""
);
window
.
localStorage
.
setItem
(
"token"
,
res
.
result
?.
token
||
""
);
api
.
userInfo
().
then
((
res
)
=>
{
api
.
userInfo
().
then
((
res
)
=>
{
setUserInfo
(
res
.
result
||
''
);
setUserInfo
(
res
.
result
||
undefined
);
});
});
}
}
});
});
...
@@ -57,7 +59,7 @@ const UserProvider = ({ children }: Props) => {
...
@@ -57,7 +59,7 @@ const UserProvider = ({ children }: Props) => {
//登出
//登出
function
logout
()
{
function
logout
()
{
localStorage
.
setItem
(
"token"
,
""
);
localStorage
.
setItem
(
"token"
,
""
);
setUserInfo
(
''
);
setUserInfo
(
undefined
);
}
}
return
(
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
{
useRouter
}
from
'next/router'
;
import
Layout
from
"~/components/layout"
;
import
Layout
from
"~/components/layout"
;
import
{
Box
}
from
'./styled'
;
import
{
Box
}
from
'./styled'
;
...
@@ -7,11 +7,15 @@ import { Button , Image as AImage , Divider , Select,Modal ,Tag,Space,Form,messa
...
@@ -7,11 +7,15 @@ import { Button , Image as AImage , Divider , Select,Modal ,Tag,Space,Form,messa
import
Image
from
'next/image'
;
import
Image
from
'next/image'
;
import
errImg
from
"~/assets/errImg"
;
import
errImg
from
"~/assets/errImg"
;
import
api
,{
GetWebDeviceDetailResult
,
GetWebDeviceWareSkuById
}
from
'./api'
;
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
()
{
export
default
function
EquipmentLeasingDetail
()
{
const
router
=
useRouter
();
const
router
=
useRouter
();
const
{
userInfo
}
=
useContext
(
UserContext
);
const
[
openLoginModal
,
setOpenLoginModal
]
=
useState
(
false
);
//登录modal
const
[
id
,
setId
]
=
useState
<
number
|
null
>
(
null
);
const
[
id
,
setId
]
=
useState
<
number
|
null
>
(
null
);
const
[
detail
,
setDetail
]
=
useState
<
GetWebDeviceDetailResult
|
null
>
()
const
[
detail
,
setDetail
]
=
useState
<
GetWebDeviceDetailResult
|
null
>
()
...
@@ -52,6 +56,7 @@ export default function EquipmentLeasingDetail() {
...
@@ -52,6 +56,7 @@ export default function EquipmentLeasingDetail() {
const
[
selectedTagsData
,
setSelectedTagsData
]
=
useState
<
string
>
();
const
[
selectedTagsData
,
setSelectedTagsData
]
=
useState
<
string
>
();
const
showModal
=
()
=>
{
const
showModal
=
()
=>
{
if
(
userInfo
?.
id
)
{
setIsModalOpen
(
true
);
setIsModalOpen
(
true
);
if
(
wareSkuList
?.
length
)
{
if
(
wareSkuList
?.
length
)
{
setSelectedTags
(
wareSkuList
[
0
].
id
);
setSelectedTags
(
wareSkuList
[
0
].
id
);
...
@@ -59,6 +64,9 @@ export default function EquipmentLeasingDetail() {
...
@@ -59,6 +64,9 @@ export default function EquipmentLeasingDetail() {
setSelectedTagsData
(
"3-7天"
)
setSelectedTagsData
(
"3-7天"
)
form
.
setFieldValue
(
"date"
,
"3-7天"
)
form
.
setFieldValue
(
"date"
,
"3-7天"
)
}
}
}
else
{
setOpenLoginModal
(
true
)
}
};
};
const
handleOk
=
()
=>
{
const
handleOk
=
()
=>
{
...
@@ -245,6 +253,10 @@ export default function EquipmentLeasingDetail() {
...
@@ -245,6 +253,10 @@ export default function EquipmentLeasingDetail() {
</
Form
.
Item
>
</
Form
.
Item
>
</
Form
>
</
Form
>
</
Modal
>
</
Modal
>
<
LoginModal
open=
{
openLoginModal
}
onCancel=
{
()
=>
setOpenLoginModal
(
false
)
}
></
LoginModal
>
</
Box
>
</
Box
>
</
Layout
>
</
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
{
useRouter
}
from
"next/router"
;
import
{
Pagination
}
from
"antd"
;
import
{
Pagination
}
from
"antd"
;
import
{
Box
}
from
"./styled"
;
import
{
Box
}
from
"./styled"
;
...
@@ -19,6 +19,7 @@ type Props = {};
...
@@ -19,6 +19,7 @@ type Props = {};
export
default
function
EquipmentLeasing
(
props
:
Props
)
{
export
default
function
EquipmentLeasing
(
props
:
Props
)
{
const
router
=
useRouter
();
const
router
=
useRouter
();
const
filter
=
useRef
<
any
>
()
const
[
productList
,
setProductList
]
=
useState
(
const
[
productList
,
setProductList
]
=
useState
(
Array
<
{
element
:
JSX
.
Element
}
>
Array
<
{
element
:
JSX
.
Element
}
>
);
);
...
@@ -38,8 +39,7 @@ export default function EquipmentLeasing(props: Props) {
...
@@ -38,8 +39,7 @@ export default function EquipmentLeasing(props: Props) {
<
Image
<
Image
src=
{
item
.
wareImgs
[
0
].
imgUrl
}
src=
{
item
.
wareImgs
[
0
].
imgUrl
}
alt=
"error"
alt=
"error"
width=
{
116
}
fill
height=
{
116
}
/>
/>
</
div
>
</
div
>
</
div
>
</
div
>
...
@@ -87,12 +87,20 @@ export default function EquipmentLeasing(props: Props) {
...
@@ -87,12 +87,20 @@ export default function EquipmentLeasing(props: Props) {
//端口列表请求
//端口列表请求
useEffect
(()
=>
{
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
api
.
listPageDeviceInfo
(
.
listPageDeviceInfo
(
{
{
...
filterResult
,
...
filterResult
,
...
pageParams
,
...
pageParams
,
...
r
outer
.
query
,
...
r
s
,
},
},
{
{
signal
:
abort
?.
signal
,
signal
:
abort
?.
signal
,
...
@@ -127,17 +135,18 @@ export default function EquipmentLeasing(props: Props) {
...
@@ -127,17 +135,18 @@ export default function EquipmentLeasing(props: Props) {
},
[]);
},
[]);
useEffect
(()
=>
{
useEffect
(()
=>
{
let
queryVal
=
JSON
.
parse
(
JSON
.
stringify
(
router
.
query
));
if
(
router
.
query
)
{
if
(
router
.
query
)
{
setFilterResult
({
...
router
.
query
});
const
idArr
=
filter
.
current
.
idArr
console
.
log
(
router
.
query
,{
brandId
:
1
});
for
(
const
key
in
queryVal
)
{
onFilterChange
({
if
(
idArr
.
includes
(
key
))
{
categoryId
:
{
setFilterResult
({
[
key
]:
router
.
query
[
key
]
});
id
:
2
,
}
name
:
"类目:航测"
}
}
},{
categoryId
:
2
});
}
}
},
[
router
]);
},
[
router
]);
return
(
return
(
<
Layout
>
<
Layout
>
<
Box
>
<
Box
>
...
@@ -145,12 +154,13 @@ export default function EquipmentLeasing(props: Props) {
...
@@ -145,12 +154,13 @@ export default function EquipmentLeasing(props: Props) {
types=
{
[
"地域"
,
"设备类目"
,
"设备品牌"
,
"设备型号"
]
}
types=
{
[
"地域"
,
"设备类目"
,
"设备品牌"
,
"设备型号"
]
}
showResultItem
showResultItem
onChange=
{
onFilterChange
}
onChange=
{
onFilterChange
}
ref=
{
filter
}
></
Filter
>
></
Filter
>
<
div
style=
{
{
paddingTop
:
13
}
}
>
<
div
style=
{
{
paddingTop
:
13
}
}
>
<
ContentBox
<
ContentBox
boxIndex=
{
5
}
boxIndex=
{
5
}
leftcontentstyle=
{
{
leftcontentstyle=
{
{
width
:
"10
2
0px"
,
width
:
"10
1
0px"
,
margin
:
{
top
:
0
,
right
:
"12px"
,
bottom
:
"12px"
,
left
:
0
},
margin
:
{
top
:
0
,
right
:
"12px"
,
bottom
:
"12px"
,
left
:
0
},
}
}
}
}
leftRenderDom=
{
{
leftRenderDom=
{
{
...
...
pages/equipmentLeasing/styled.tsx
浏览文件 @
24ab6406
...
@@ -25,6 +25,7 @@ export const Box = styled.div`
...
@@ -25,6 +25,7 @@ export const Box = styled.div`
width: 116px;
width: 116px;
height: 116px;
height: 116px;
background: #efefef;
background: #efefef;
position: relative;
}
}
}
}
&-bottom {
&-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'
...
@@ -2,7 +2,8 @@ import React,{ useEffect ,useState} from 'react'
import
{
Box
}
from
'./styled'
import
{
Box
}
from
'./styled'
import
{
Cascader
,
Select
}
from
'antd'
import
{
Cascader
,
Select
}
from
'antd'
import
api
,
{
Flying
,
SkillsType
,
RegionResp
}
from
"../../../api"
;
import
api
,
{
Flying
,
SkillsType
,
RegionResp
}
from
"../../../api"
;
import
Image
from
'next/image'
import
xt
from
'./assets/xt.png'
interface
BrushQuestionZoneType
{
interface
BrushQuestionZoneType
{
}
}
...
@@ -95,7 +96,7 @@ export default function BrushQuestionZone() {
...
@@ -95,7 +96,7 @@ export default function BrushQuestionZone() {
<
div
className=
"content"
>
<
div
className=
"content"
>
{
list
?.
map
((
item
,
i
)
=>
(
{
list
?.
map
((
item
,
i
)
=>
(
<
div
key=
{
i
}
className=
"item"
>
<
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"
>
<
div
className=
"item-content"
>
第一章 第1节 习题练习习题练习习题练习
第一章 第1节 习题练习习题练习习题练习
</
div
>
</
div
>
...
...
pages/flyingHandService/examination/components/brushQuestionZone/styled.tsx
浏览文件 @
24ab6406
...
@@ -54,13 +54,13 @@ export const Box = styled.div`
...
@@ -54,13 +54,13 @@ export const Box = styled.div`
width: 120px;
width: 120px;
height: 100px;
height: 100px;
background: #E6E6E6;
background: #E6E6E6;
position: relative;
}
}
.item-content{
.item-content{
display: flex;
display: flex;
align-items: center;
align-items: center;
flex: 1;
flex: 1;
padding: 12px 14px 11px 16px;
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
React
,
{
useEffect
,
useState
}
from
'react'
import
{
Box
}
from
'./styled'
import
{
Box
}
from
'./styled'
import
Image
from
'next/image'
import
kh
from
'./assets/kh.jpg'
interface
MockExamType
{
interface
MockExamType
{
}
}
...
@@ -16,7 +17,7 @@ export default function MockExam() {
...
@@ -16,7 +17,7 @@ export default function MockExam() {
<
div
className=
"content"
>
<
div
className=
"content"
>
{
list
?.
map
((
item
,
i
)
=>
(
{
list
?.
map
((
item
,
i
)
=>
(
<
div
key=
{
i
}
className=
"item"
>
<
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=
"item-content"
>
<
div
className=
"top"
>
云飞手行业认证考核
</
div
>
<
div
className=
"top"
>
云飞手行业认证考核
</
div
>
<
div
className=
"bottom"
>
<
div
className=
"bottom"
>
...
...
pages/flyingHandService/examination/components/mockExam/styled.tsx
浏览文件 @
24ab6406
...
@@ -27,6 +27,7 @@ export const Box = styled.div`
...
@@ -27,6 +27,7 @@ export const Box = styled.div`
width: 120px;
width: 120px;
height: 100px;
height: 100px;
background: #E6E6E6;
background: #E6E6E6;
position: relative;
}
}
.item-content{
.item-content{
display: flex;
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
{
Box
}
from
"./styled"
;
import
Image
from
"next/image"
;
import
Image
from
"next/image"
;
import
{
Button
,
Select
,
Space
,
Pagination
,
Cascader
,
Modal
,
Form
,
Input
,
Checkbox
,
message
}
from
"antd"
;
import
{
Button
,
Select
,
Space
,
Pagination
,
Cascader
,
Modal
,
Form
,
Input
,
Checkbox
,
message
}
from
"antd"
;
...
@@ -7,6 +7,8 @@ import Layout from "~/components/layout";
...
@@ -7,6 +7,8 @@ import Layout from "~/components/layout";
import
ContentBox
from
"~/components/contentBox"
;
import
ContentBox
from
"~/components/contentBox"
;
import
api
,
{
Flying
,
SkillsType
,
RegionResp
}
from
"./api"
;
import
api
,
{
Flying
,
SkillsType
,
RegionResp
}
from
"./api"
;
import
{
useRouter
}
from
"next/router"
;
import
{
useRouter
}
from
"next/router"
;
import
LoginModal
from
"~/components/loginModal"
;
import
{
UserContext
}
from
"~/lib/userProvider"
;
interface
FilterInfoParams
{
interface
FilterInfoParams
{
regionId
?:
number
;
regionId
?:
number
;
flightSkillsId
?:
number
;
flightSkillsId
?:
number
;
...
@@ -16,6 +18,8 @@ interface FilterInfoParams {
...
@@ -16,6 +18,8 @@ interface FilterInfoParams {
export
default
function
FlyingHandService
()
{
export
default
function
FlyingHandService
()
{
const
{
Option
}
=
Select
const
{
Option
}
=
Select
const
router
=
useRouter
();
const
router
=
useRouter
();
const
{
userInfo
}
=
useContext
(
UserContext
);
const
[
openLoginModal
,
setOpenLoginModal
]
=
useState
(
false
);
//登录modal
const
[
list
,
setList
]
=
useState
([
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(1).jpg"
,
"https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/540X844(1).jpg"
,
"https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/540X844(1).jpg"
,
...
@@ -54,8 +58,7 @@ export default function FlyingHandService() {
...
@@ -54,8 +58,7 @@ export default function FlyingHandService() {
<
Image
<
Image
src=
{
`${item.videoUrl}?x-oss-process=video/snapshot,t_1000,m_fast`
}
src=
{
`${item.videoUrl}?x-oss-process=video/snapshot,t_1000,m_fast`
}
alt=
"#"
alt=
"#"
width=
{
220
}
fill
height=
{
160
}
/>
/>
</
div
>
</
div
>
<
div
className=
"item-bottom"
>
<
div
className=
"item-bottom"
>
...
@@ -133,10 +136,19 @@ export default function FlyingHandService() {
...
@@ -133,10 +136,19 @@ export default function FlyingHandService() {
})
||
[]
})
||
[]
);
);
setCount
(
res
.
result
?.
totalCount
||
0
);
setCount
(
res
.
result
?.
totalCount
||
0
);
clearRouter
()
});
});
},
[
abort
]);
},
[
abort
]);
const
clearRouter
=
()
=>
{
if
(
Object
.
keys
(
router
.
query
).
length
)
{
router
.
query
=
{}
router
.
replace
(
router
.
pathname
)
}
}
const
onProvinceChange
=
(
value
:
number
)
=>
{
const
onProvinceChange
=
(
value
:
number
)
=>
{
clearRouter
()
if
(
value
)
{
if
(
value
)
{
setFlightDefault
(
value
)
setFlightDefault
(
value
)
}
else
{
}
else
{
...
@@ -151,6 +163,7 @@ export default function FlyingHandService() {
...
@@ -151,6 +163,7 @@ export default function FlyingHandService() {
};
};
const
onChange
=
(
value
:
any
)
=>
{
const
onChange
=
(
value
:
any
)
=>
{
clearRouter
()
if
(
value
)
{
if
(
value
)
{
setSkillsDefault
([
value
])
setSkillsDefault
([
value
])
}
else
{
}
else
{
...
@@ -165,6 +178,7 @@ export default function FlyingHandService() {
...
@@ -165,6 +178,7 @@ export default function FlyingHandService() {
};
};
const
onChangeRegion
=
(
value
:
any
)
=>
{
const
onChangeRegion
=
(
value
:
any
)
=>
{
clearRouter
()
setFilterParams
((
props
)
=>
{
setFilterParams
((
props
)
=>
{
return
{
return
{
...
props
,
...
props
,
...
@@ -314,7 +328,7 @@ export default function FlyingHandService() {
...
@@ -314,7 +328,7 @@ export default function FlyingHandService() {
<
Button
<
Button
type=
"primary"
type=
"primary"
className=
"btn"
className=
"btn"
onClick=
{
()
=>
setIsModalOpen
(
true
)
}
onClick=
{
()
=>
userInfo
?.
id
?
setIsModalOpen
(
true
)
:
setOpenLoginModal
(
true
)
}
>
>
报名学习课程
报名学习课程
</
Button
>
</
Button
>
...
@@ -433,6 +447,10 @@ export default function FlyingHandService() {
...
@@ -433,6 +447,10 @@ export default function FlyingHandService() {
}
}
}
}
rightRenderDom=
{
{
columns
:
rightDomList
}
}
rightRenderDom=
{
{
columns
:
rightDomList
}
}
/>
/>
<
LoginModal
open=
{
openLoginModal
}
onCancel=
{
()
=>
setOpenLoginModal
(
false
)
}
></
LoginModal
>
</
Box
>
</
Box
>
</
Layout
>
</
Layout
>
);
);
...
...
pages/flyingHandService/styled.tsx
浏览文件 @
24ab6406
...
@@ -51,6 +51,7 @@ export const Box = styled.div`
...
@@ -51,6 +51,7 @@ export const Box = styled.div`
background-color: #e6e6e6;
background-color: #e6e6e6;
border-radius: 6px 6px 0px 0px;
border-radius: 6px 6px 0px 0px;
overflow: hidden;
overflow: hidden;
position: relative;
}
}
&-bottom {
&-bottom {
padding: 9px 12px 12px;
padding: 9px 12px 12px;
...
...
pages/forum/api/index.tsx
浏览文件 @
24ab6406
...
@@ -40,10 +40,9 @@ export interface CommentParams {
...
@@ -40,10 +40,9 @@ export interface CommentParams {
content
:
string
;
//评论内容
content
:
string
;
//评论内容
dynamicId
:
number
;
//动态id
dynamicId
:
number
;
//动态id
parentId
?:
number
;
//父级评论
parentId
?:
number
;
//父级评论
userId
:
number
;
//用户id
}
}
export
interface
ByDynamic
Params
{
export
interface
ByDynamic
Resp
{
id
:
number
;
id
:
number
;
dynamicId
:
number
;
dynamicId
:
number
;
parentId
:
number
;
parentId
:
number
;
...
@@ -51,7 +50,12 @@ export interface ByDynamicParams {
...
@@ -51,7 +50,12 @@ export interface ByDynamicParams {
content
:
string
;
content
:
string
;
likesCount
:
number
;
likesCount
:
number
;
createTime
:
string
;
createTime
:
string
;
children
:
ByDynamicParams
[];
children
:
ByDynamicResp
[];
userBaseInfoVO
:
{
id
:
number
,
nickName
:
string
,
userImg
:
string
}
}
}
export
default
{
export
default
{
...
@@ -70,7 +74,14 @@ 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
);
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";
...
@@ -15,14 +15,15 @@ import errImg from "~/assets/errImg";
import
{
RightOutlined
}
from
"@ant-design/icons"
;
import
{
RightOutlined
}
from
"@ant-design/icons"
;
import
{
useContext
,
useEffect
,
useState
}
from
"react"
;
import
{
useContext
,
useEffect
,
useState
}
from
"react"
;
import
PublishMessage
from
"./components/publishMessage"
;
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
InfiniteScroll
from
"react-infinite-scroll-component"
;
import
{
UserContext
}
from
"~/lib/userProvider"
;
import
{
UserContext
}
from
"~/lib/userProvider"
;
import
moment
from
"moment"
;
interface
Item
extends
Dynamic
{
interface
Item
extends
Dynamic
{
openComment
?:
boolean
;
//是否开启评论
openComment
?:
boolean
;
//是否开启评论
showCommentAll
?:
boolean
;
//是否展示全部评论
showCommentAll
?:
boolean
;
//是否展示全部评论
commentList
?:
Array
<
ByDynamic
Params
>
;
commentList
?:
Array
<
ByDynamic
Resp
>
;
//评论列表
}
}
export
default
function
Forum
()
{
export
default
function
Forum
()
{
...
@@ -34,6 +35,7 @@ export default function Forum() {
...
@@ -34,6 +35,7 @@ export default function Forum() {
});
});
const
[
count
,
setCount
]
=
useState
(
0
);
//动态总数
const
[
count
,
setCount
]
=
useState
(
0
);
//动态总数
const
{
userInfo
,
setNeedLogin
}
=
useContext
(
UserContext
);
const
{
userInfo
,
setNeedLogin
}
=
useContext
(
UserContext
);
const
[
form
]
=
Form
.
useForm
();
//评论区的form
useEffect
(()
=>
{
useEffect
(()
=>
{
api
api
...
@@ -78,27 +80,74 @@ export default function Forum() {
...
@@ -78,27 +80,74 @@ export default function Forum() {
item
.
openComment
=
!
item
.
openComment
;
item
.
openComment
=
!
item
.
openComment
;
const
temp
=
[...
list
];
const
temp
=
[...
list
];
setList
(
temp
);
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
)
{
if
(
userInfo
)
{
api
api
.
comment
({
.
comment
({
content
:
values
.
content
,
content
:
values
.
content
,
dynamicId
:
id
,
dynamicId
:
item
.
id
,
userId
:
userInfo
.
id
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
===
"200"
)
{
if
(
res
.
code
===
"200"
)
{
window
.
messageApi
.
success
(
"评论成功"
);
window
.
messageApi
.
success
(
"评论成功"
);
form
.
resetFields
([
"content"
]);
item
.
commentCount
+=
1
;
getCommentList
(
item
);
}
}
});
});
}
else
{
}
else
{
setNeedLogin
(
true
);
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
(
return
(
<
Layout
>
<
Layout
>
<
div
className=
{
styles
.
forum
}
>
<
div
className=
{
styles
.
forum
}
>
...
@@ -169,7 +218,10 @@ export default function Forum() {
...
@@ -169,7 +218,10 @@ export default function Forum() {
></
div
>
></
div
>
{
item
.
commentCount
}
评论
{
item
.
commentCount
}
评论
</
div
>
</
div
>
<
div
className=
{
styles
.
ctrlsItem
}
>
<
div
className=
{
styles
.
ctrlsItem
}
onClick=
{
()
=>
onLike
(
item
)
}
>
<
div
<
div
className=
{
`${styles.ctrlsItemIcon} ${
className=
{
`${styles.ctrlsItemIcon} ${
styles.iconPraise
styles.iconPraise
...
@@ -183,8 +235,9 @@ export default function Forum() {
...
@@ -183,8 +235,9 @@ export default function Forum() {
{
item
.
openComment
&&
(
{
item
.
openComment
&&
(
<
div
className=
{
styles
.
commentWrap
}
>
<
div
className=
{
styles
.
commentWrap
}
>
<
Form
<
Form
form=
{
form
}
onFinish=
{
(
values
)
=>
{
onFinish=
{
(
values
)
=>
{
onComment
(
values
,
item
.
id
,
i
);
onComment
(
values
,
item
);
}
}
}
}
>
>
<
Form
.
Item
<
Form
.
Item
...
@@ -213,38 +266,53 @@ export default function Forum() {
...
@@ -213,38 +266,53 @@ export default function Forum() {
</
Form
>
</
Form
>
<
div
className=
{
styles
.
comments
}
>
<
div
className=
{
styles
.
comments
}
>
<
div
className=
{
styles
.
commentItem
}
>
{
/* 判断是否展示所有评论 */
}
<
div
className=
{
styles
.
commentHeadImg
}
></
div
>
{
item
.
commentList
<
div
className=
{
styles
.
info
}
>
?.
filter
((
comment
,
i
)
=>
{
<
div
className=
{
styles
.
nameWrap
}
>
if
(
item
.
showCommentAll
)
{
<
div
className=
{
styles
.
commentName
}
>
return
true
;
无人机爱好者111:
}
else
{
<
div
className=
{
styles
.
date
}
>
05-16
</
div
>
if
(
i
<
2
)
{
</
div
>
return
true
;
<
div
className=
{
styles
.
commentContent
}
>
}
无人机记录生活
}
</
div
>
})
</
div
>
.
map
((
comment
)
=>
{
</
div
>
return
(
<
div
key=
{
comment
.
id
}
className=
{
styles
.
commentItem
}
>
<
div
className=
{
styles
.
commentHeadImg
}
>
<
Image
src=
{
comment
.
userBaseInfoVO
?.
userImg
}
></
Image
>
</
div
>
</
div
>
<
div
className=
{
styles
.
commentItem
}
>
<
div
className=
{
styles
.
commentHeadImg
}
></
div
>
<
div
className=
{
styles
.
info
}
>
<
div
className=
{
styles
.
info
}
>
<
div
className=
{
styles
.
nameWrap
}
>
<
div
className=
{
styles
.
nameWrap
}
>
<
div
className=
{
styles
.
commentName
}
>
<
div
className=
{
styles
.
commentName
}
>
无人机爱好者111:
{
comment
.
userBaseInfoVO
?.
nickName
}
:
<
div
className=
{
styles
.
date
}
>
05-16
</
div
>
<
div
className=
{
styles
.
date
}
>
{
moment
(
comment
.
createTime
).
format
(
"YYYY-MM-DD"
)
}
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
commentContent
}
>
<
div
className=
{
styles
.
commentContent
}
>
无人机记录生活
{
comment
.
content
}
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
);
})
}
</
div
>
</
div
>
{
!
item
.
showCommentAll
&&
(
{
!
item
.
showCommentAll
&&
item
.
commentCount
>
2
&&
(
<
div
className=
{
styles
.
showAll
}
>
<
div
查看全部15条评论
className=
{
styles
.
showAll
}
onClick=
{
()
=>
showCommentAll
(
item
)
}
>
查看全部
{
item
.
commentCount
}
条评论
<
RightOutlined
size=
{
14
}
/>
<
RightOutlined
size=
{
14
}
/>
</
div
>
</
div
>
)
}
)
}
...
...
pages/home/waterfallFlowBody/components/map/moreServicePoints/index.page.tsx
浏览文件 @
24ab6406
...
@@ -213,13 +213,13 @@ export default function MoreServicePoints() {
...
@@ -213,13 +213,13 @@ export default function MoreServicePoints() {
onClick=
{
()
=>
mapEntiy
(
1
)
}
onClick=
{
()
=>
mapEntiy
(
1
)
}
className=
{
`item ${mapItem === 1 ? "active" : ""}`
}
className=
{
`item ${mapItem === 1 ? "active" : ""}`
}
>
>
租赁
网点
培训
网点
</
div
>
</
div
>
<
div
<
div
onClick=
{
()
=>
mapEntiy
(
2
)
}
onClick=
{
()
=>
mapEntiy
(
2
)
}
className=
{
`item ${mapItem === 2 ? "active" : ""}`
}
className=
{
`item ${mapItem === 2 ? "active" : ""}`
}
>
>
培训
网点
租赁
网点
</
div
>
</
div
>
<
div
<
div
onClick=
{
()
=>
mapEntiy
(
3
)
}
onClick=
{
()
=>
mapEntiy
(
3
)
}
...
...
pages/home/waterfallFlowBody/components/rotationChart/index.tsx
浏览文件 @
24ab6406
...
@@ -21,7 +21,7 @@ export default function RotationChart() {
...
@@ -21,7 +21,7 @@ export default function RotationChart() {
{
list
.
map
((
item
)
=>
(
{
list
.
map
((
item
)
=>
(
<
div
key=
{
item
}
>
<
div
key=
{
item
}
>
<
h3
className=
"contentStyle"
>
<
h3
className=
"contentStyle"
>
<
Image
src=
{
item
}
alt=
"error"
width=
{
806
}
height=
{
200
}
/>
<
Image
src=
{
item
}
alt=
"error"
fill
/>
</
h3
>
</
h3
>
</
div
>
</
div
>
))
}
))
}
...
...
pages/home/waterfallFlowBody/components/rotationChart/styled.tsx
浏览文件 @
24ab6406
...
@@ -39,5 +39,6 @@ export const Box = styled.div`
...
@@ -39,5 +39,6 @@ export const Box = styled.div`
line-height: 100px;
line-height: 100px;
text-align: center;
text-align: center;
background: #364d79;
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
{
Space
,
Select
,
Button
,
message
}
from
"antd"
;
import
Image
from
"next/image"
;
import
Image
from
"next/image"
;
import
{
useRouter
}
from
"next/router"
;
import
{
useRouter
}
from
"next/router"
;
...
@@ -23,7 +23,8 @@ import {
...
@@ -23,7 +23,8 @@ import {
listNewsApi
,
listNewsApi
,
}
from
"./api"
;
}
from
"./api"
;
import
{
BaseOptionType
,
DefaultOptionType
}
from
"antd/es/select"
;
import
{
BaseOptionType
,
DefaultOptionType
}
from
"antd/es/select"
;
import
LoginModal
from
"~/components/loginModal"
;
import
{
UserContext
}
from
"~/lib/userProvider"
;
interface
ColumnsType
{
interface
ColumnsType
{
title
:
string
;
title
:
string
;
router
:
string
;
router
:
string
;
...
@@ -31,7 +32,8 @@ interface ColumnsType {
...
@@ -31,7 +32,8 @@ interface ColumnsType {
export
default
function
WaterfallFlowBody
()
{
export
default
function
WaterfallFlowBody
()
{
const
router
=
useRouter
();
const
router
=
useRouter
();
const
{
userInfo
}
=
useContext
(
UserContext
);
//获取信息
const
[
openLoginModal
,
setOpenLoginModal
]
=
useState
(
false
);
//登录modal
const
[
list
,
setList
]
=
useState
([
const
[
list
,
setList
]
=
useState
([
"中国人寿"
,
"中国人寿"
,
"中国平安"
,
"中国平安"
,
...
@@ -254,37 +256,43 @@ export default function WaterfallFlowBody() {
...
@@ -254,37 +256,43 @@ export default function WaterfallFlowBody() {
},
[]);
},
[]);
const
routerPath
=
(
index
:
number
,
item
?:
AllType
)
=>
{
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
({
router
.
push
({
pathname
:
columns
[
index
].
router
,
pathname
:
columns
[
index
].
router
,
query
:
{
[
item
?.
type
!
]:
item
?.
id
!
},
});
});
}
}
};
};
const
handleTenderApply
=
async
(
item
:
NewsTenderType
)
=>
{
const
handleTenderApply
=
async
(
item
:
NewsTenderType
)
=>
{
if
(
item
.
apply
)
return
;
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
(
"申请成功"
)
message
.
success
(
"申请成功"
)
item
.
apply
=
1
let
res8
=
await
listNewsApi
.
listNewTenderInfo
({
// let res = await listNewsApi.tenderApply({
pageNo
:
1
,
// tenderInfoId: item.id,
pageSize
:
6
,
// tenderNewsId: item.tenderNewsId,
});
// userAccountId: 0,
setRightBottomDomList
(
rightDom2
(
res8
.
result
?.
list
!
));
// })
}
else
{
// try{
message
.
error
(
res
.
message
)
// if (res.code==="200") {
}
// message.success("申请成功")
}
catch
(
e
){
// let res8 = await listNewsApi.listNewTenderInfo({
console
.
log
(
e
);
// pageNo: 1,
}
// pageSize: 6,
}
else
{
// });
setOpenLoginModal
(
true
)
// setRightBottomDomList(rightDom2(res8.result?.list!));
}
// }else{
// message.error(res.message)
// }
// }catch(e){
// console.log(e);
// }
}
}
const
leftDom
=
(
const
leftDom
=
(
...
@@ -451,6 +459,10 @@ export default function WaterfallFlowBody() {
...
@@ -451,6 +459,10 @@ export default function WaterfallFlowBody() {
],
],
}
}
}
}
/>
/>
<
LoginModal
open=
{
openLoginModal
}
onCancel=
{
()
=>
setOpenLoginModal
(
false
)
}
></
LoginModal
>
</
Box
>
</
Box
>
);
);
}
}
pages/jobServices/detail/api/index.tsx
浏览文件 @
24ab6406
...
@@ -17,7 +17,9 @@ export interface JobDetail {
...
@@ -17,7 +17,9 @@ export interface JobDetail {
contentVideo
?:
string
|
null
,
contentVideo
?:
string
|
null
,
star
?:
number
,
star
?:
number
,
img
?:
string
|
null
,
img
?:
string
|
null
,
type
?:
number
type
?:
number
,
name
?:
string
,
time
?:
number
|
string
}
}
export
interface
ListPageJobInfoResp
{
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
{
Box
}
from
"./styled"
;
import
{
Rate
}
from
"antd"
;
import
{
Rate
}
from
"antd"
;
import
Image
from
"next/image"
;
import
Image
from
"next/image"
;
import
{
JobDetail
}
from
"../../api"
;
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
{
interface
EvaluateType
{
evaluateInfo
:
Array
<
JobDetail
>
;
evaluateInfo
:
Array
<
JobDetail
>
;
}
}
export
default
function
Evaluate
(
props
:
EvaluateType
)
{
export
default
function
Evaluate
(
props
:
EvaluateType
)
{
const
list
=
[{},
{},
{},
{}];
const
{
evaluateInfo
}
=
props
;
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
(
return
(
<
Box
>
<
Box
>
{
evaluateInfo
?.
map
((
item
,
i
)
=>
(
{
listVal
?.
map
((
item
,
i
)
=>
(
<
div
key=
{
item
.
id
}
className=
"item"
>
<
div
key=
{
item
.
id
}
className=
"item"
>
<
div
className=
"item-user"
>
<
div
className=
"item-user"
>
<
div
className=
"item-user-image"
>
<
div
className=
"item-user-image"
>
...
@@ -22,25 +65,25 @@ export default function Evaluate(props: EvaluateType) {
...
@@ -22,25 +65,25 @@ export default function Evaluate(props: EvaluateType) {
className=
"image"
className=
"image"
height=
{
42
}
height=
{
42
}
width=
{
42
}
width=
{
42
}
src=
{
item
.
img
?
item
.
img
:
""
}
src=
{
item
.
img
?
item
.
img
:
''
}
alt=
"#"
alt=
"#"
/>
/>
</
div
>
</
div
>
<
div
className=
"item-user-info"
>
<
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
}
/>
<
Rate
style=
{
{
height
:
30
}
}
disabled
defaultValue=
{
item
.
star
}
/>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
"item-content"
>
<
div
className=
"item-content"
>
<
div
className=
"item-content-label"
>
{
item
.
content
}
</
div
>
<
div
className=
"item-content-label"
>
{
item
.
content
}
</
div
>
<
div
className=
"item-content-image"
>
<
div
className=
"item-content-image"
>
{
item
.
contentImgs
?.
map
((
item
)
=>
(
{
item
.
contentImgs
?.
length
?
item
.
contentImgs
?.
map
((
item
)
=>
(
<
div
key=
{
item
}
className=
"image-item"
>
<
div
key=
{
item
}
className=
"image-item"
>
<
Image
width=
{
80
}
height=
{
80
}
src=
{
item
}
alt=
"error"
/>
<
Image
width=
{
80
}
height=
{
80
}
src=
{
item
}
alt=
"error"
/>
</
div
>
</
div
>
))
}
))
:
null
}
</
div
>
</
div
>
<
div
className=
"item-content-time"
>
3月4日
</
div
>
<
div
className=
"item-content-time"
>
{
Moment
(
item
.
time
).
format
(
'YYYY-MM-DD'
)
}
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
))
}
))
}
...
...
pages/jobServices/detail/components/evaluate/styled.tsx
浏览文件 @
24ab6406
...
@@ -9,7 +9,7 @@ export const Box = styled.div`
...
@@ -9,7 +9,7 @@ export const Box = styled.div`
overflow-y: auto;
overflow-y: auto;
height: 800px;
height: 800px;
.item{
.item{
height: 1
8
0px;
height: 1
2
0px;
&-user{
&-user{
display: flex;
display: flex;
align-items: center;
align-items: center;
...
@@ -57,7 +57,6 @@ export const Box = styled.div`
...
@@ -57,7 +57,6 @@ export const Box = styled.div`
}
}
}
}
&-time{
&-time{
width: 45px;
height: 20px;
height: 20px;
font-size: 14px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
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
{
Box
}
from
"./styled"
;
import
{
Pagination
}
from
"antd"
;
import
{
Pagination
}
from
"antd"
;
import
Layout
from
"~/components/layout"
;
import
Layout
from
"~/components/layout"
;
...
@@ -18,6 +18,7 @@ interface ImageListType {}
...
@@ -18,6 +18,7 @@ interface ImageListType {}
export
default
function
JobServices
()
{
export
default
function
JobServices
()
{
const
router
=
useRouter
();
const
router
=
useRouter
();
const
filter
=
useRef
<
any
>
()
const
[
list
,
setList
]
=
useState
([
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/540X844-2(1).jpg"
,
// "https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/665512fd-12e6-49a9-93c1-f9dcd0e82083.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() {
...
@@ -92,15 +93,19 @@ export default function JobServices() {
//端口列表请求
//端口列表请求
useEffect
(()
=>
{
useEffect
(()
=>
{
let
queryVal
=
JSON
.
parse
(
JSON
.
stringify
(
router
.
query
));
let
queryVal
=
JSON
.
parse
(
JSON
.
stringify
(
router
.
query
));
const
idArr
=
filter
.
current
.
idArr
let
rs
for
(
const
key
in
queryVal
)
{
for
(
const
key
in
queryVal
)
{
queryVal
[
key
]
=
Number
(
queryVal
[
key
]);
if
(
idArr
.
includes
(
key
))
{
rs
=
{[
key
]:
router
.
query
[
key
]}
}
}
}
api
api
.
listPageJobServicesInfo
(
.
listPageJobServicesInfo
(
{
{
...
filterResult
,
...
filterResult
,
...
pageParams
,
...
pageParams
,
...
queryVal
,
...
rs
,
},
},
{
{
signal
:
abort
?.
signal
,
signal
:
abort
?.
signal
,
...
@@ -124,8 +129,6 @@ export default function JobServices() {
...
@@ -124,8 +129,6 @@ export default function JobServices() {
setFilterResult
(
adapterFilterResult
);
setFilterResult
(
adapterFilterResult
);
};
};
const
[
query
,
setQuery
]
=
useState
<
string
|
string
[]
>
();
useEffect
(()
=>
{
useEffect
(()
=>
{
setRightDomList
(
setRightDomList
(
list
.
map
((
item
)
=>
{
list
.
map
((
item
)
=>
{
...
@@ -135,12 +138,14 @@ export default function JobServices() {
...
@@ -135,12 +138,14 @@ export default function JobServices() {
},
[]);
},
[]);
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
router
.
query
&&
Object
.
keys
(
router
.
query
).
length
)
{
let
queryVal
=
JSON
.
parse
(
JSON
.
stringify
(
router
.
query
));
let
queryVal
=
JSON
.
parse
(
JSON
.
stringify
(
router
.
query
));
if
(
router
.
query
)
{
const
idArr
=
filter
.
current
.
idArr
for
(
const
key
in
queryVal
)
{
for
(
const
key
in
queryVal
)
{
queryVal
[
key
]
=
Number
(
queryVal
[
key
]);
if
(
idArr
.
includes
(
key
))
{
setFilterResult
({
[
key
]:
router
.
query
[
key
]
});
}
}
}
setFilterResult
({
...
queryVal
});
}
}
},
[
router
]);
},
[
router
]);
...
@@ -151,6 +156,7 @@ export default function JobServices() {
...
@@ -151,6 +156,7 @@ export default function JobServices() {
types=
{
[
"地域"
,
"行业"
,
"应用"
]
}
types=
{
[
"地域"
,
"行业"
,
"应用"
]
}
showResultItem
showResultItem
onChange=
{
onFilterChange
}
onChange=
{
onFilterChange
}
ref=
{
filter
}
></
Filter
>
></
Filter
>
<
div
style=
{
{
marginTop
:
10
}
}
>
<
div
style=
{
{
marginTop
:
10
}
}
>
<
ContentBox
<
ContentBox
...
...
pages/projectInfo/components/bids/index.tsx
浏览文件 @
24ab6406
...
@@ -22,13 +22,14 @@ export default function Bids(props: Props) {
...
@@ -22,13 +22,14 @@ export default function Bids(props: Props) {
const
[
count
,
setCount
]
=
useState
(
0
);
const
[
count
,
setCount
]
=
useState
(
0
);
const
[
abort
,
setAbort
]
=
useState
<
AbortController
|
null
>
(
null
);
const
[
abort
,
setAbort
]
=
useState
<
AbortController
|
null
>
(
null
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
{
userInfo
,
setNeedLogin
}
=
useContext
(
UserContext
);
const
{
userInfo
,
setNeedLogin
}
=
useContext
(
UserContext
);
const
[
reload
,
setReload
]
=
useState
(
false
);
useEffect
(()
=>
{
useEffect
(()
=>
{
//中断前一次请求
//中断前一次请求
abort
?.
abort
();
abort
?.
abort
();
setAbort
(
new
AbortController
());
setAbort
(
new
AbortController
());
},
[
pageParams
,
props
.
params
]);
},
[
pageParams
,
props
.
params
,
reload
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
!
abort
)
{
if
(
!
abort
)
{
...
@@ -70,6 +71,7 @@ export default function Bids(props: Props) {
...
@@ -70,6 +71,7 @@ export default function Bids(props: Props) {
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
===
"200"
)
{
if
(
res
.
code
===
"200"
)
{
window
.
messageApi
.
success
(
"申请成功"
);
window
.
messageApi
.
success
(
"申请成功"
);
setReload
(
!
reload
);
}
}
});
});
}
else
{
}
else
{
...
...
pages/projectInfo/components/requirements/api/index.ts
浏览文件 @
24ab6406
...
@@ -24,6 +24,7 @@ export interface Item {
...
@@ -24,6 +24,7 @@ export interface Item {
publishName
:
string
;
publishName
:
string
;
publishPhone
:
string
;
publishPhone
:
string
;
requireDescription
:
string
;
requireDescription
:
string
;
requirementTypeName
:
string
;
solved
?:
0
|
1
;
solved
?:
0
|
1
;
createTime
:
string
;
createTime
:
string
;
updateTime
?:
string
;
updateTime
?:
string
;
...
@@ -31,7 +32,6 @@ export interface Item {
...
@@ -31,7 +32,6 @@ export interface Item {
export
interface
SolveRequireParams
{
export
interface
SolveRequireParams
{
requirementsInfoId
:
number
,
//需求id
requirementsInfoId
:
number
,
//需求id
userAccountId
:
number
//用户id
}
}
...
...
pages/projectInfo/components/requirements/index.module.scss
浏览文件 @
24ab6406
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
}
}
.desc
{
.desc
{
width
:
fit-content
;
font-size
:
14px
;
font-size
:
14px
;
font-family
:
MicrosoftYaHei
;
font-family
:
MicrosoftYaHei
;
color
:
RGBA
(
135
,
135
,
135
,
0
.4
);
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
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
api
,
{
Item
}
from
"./api"
;
import
styles
from
"./index.module.scss"
;
import
styles
from
"./index.module.scss"
;
...
@@ -22,12 +23,8 @@ export default function Requirements(props: Props) {
...
@@ -22,12 +23,8 @@ export default function Requirements(props: Props) {
});
});
const
[
count
,
setCount
]
=
useState
(
0
);
const
[
count
,
setCount
]
=
useState
(
0
);
const
[
abort
,
setAbort
]
=
useState
<
AbortController
|
null
>
(
null
);
const
[
abort
,
setAbort
]
=
useState
<
AbortController
|
null
>
(
null
);
const
[
userId
,
setUserId
]
=
useState
(
-
1
);
const
[
reload
,
setReload
]
=
useState
(
false
);
const
[
reload
,
setReload
]
=
useState
(
false
);
const
{
userInfo
}
=
useContext
(
UserContext
);
useEffect
(()
=>
{
setUserId
(
Number
(
window
.
localStorage
.
getItem
(
"userId"
)
||
-
1
));
},
[]);
useEffect
(()
=>
{
useEffect
(()
=>
{
//中断前一次请求
//中断前一次请求
...
@@ -72,7 +69,6 @@ export default function Requirements(props: Props) {
...
@@ -72,7 +69,6 @@ export default function Requirements(props: Props) {
api
api
.
solveRequire
({
.
solveRequire
({
requirementsInfoId
:
item
.
id
,
requirementsInfoId
:
item
.
id
,
userAccountId
:
userId
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
===
"200"
)
{
if
(
res
.
code
===
"200"
)
{
...
@@ -94,14 +90,16 @@ export default function Requirements(props: Props) {
...
@@ -94,14 +90,16 @@ export default function Requirements(props: Props) {
<
div
className=
{
styles
.
logo
}
></
div
>
<
div
className=
{
styles
.
logo
}
></
div
>
<
div
className=
{
styles
.
info
}
>
<
div
className=
{
styles
.
info
}
>
<
div
className=
{
styles
.
title
}
>
<
div
className=
{
styles
.
title
}
>
项目需求:
{
item
.
require
Description
}
项目需求:
{
item
.
require
mentTypeName
}
</
div
>
</
div
>
{
/*
<
Tooltip
placement=
"top"
title=
{
item
.
requireDescription
}
>
<
div
className=
{
styles
.
desc
}
>
<
div
className=
{
styles
.
desc
}
>
具体需求:
{
item
.
requireDescription
}
具体需求:
{
item
.
requireDescription
}
</div> */
}
</
div
>
</
div
>
{
item
.
userAccountId
===
userId
?
(
</
Tooltip
>
</
div
>
{
userInfo
&&
item
.
userAccountId
===
userInfo
.
id
?
(
<
Popconfirm
<
Popconfirm
title=
"提示"
title=
"提示"
description=
"确认该需求已经解决了吗?"
description=
"确认该需求已经解决了吗?"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论