Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
liyeyun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cfld-frontend
liyeyun
Commits
9fa31461
Commit
9fa31461
authored
Nov 28, 2023
by
王玉鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 开发区列表item
parent
82170c7c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
17 deletions
+22
-17
components.d.ts
components.d.ts
+1
-0
CommonHeader.vue
src/components/common/CommonHeader.vue
+2
-2
ParkItem.vue
src/components/list/ParkItem.vue
+7
-2
useItemStatus.ts
src/composable/useItemStatus.ts
+3
-3
api.ts
src/types/api.ts
+1
-1
DevelopZoneList.vue
src/views/develop/DevelopZoneList.vue
+5
-6
IndustrialParkList.vue
src/views/industrial-park/IndustrialParkList.vue
+3
-3
No files found.
components.d.ts
View file @
9fa31461
...
...
@@ -38,6 +38,7 @@ declare module 'vue' {
ListInfo
:
typeof
import
(
'./src/components/list/ListInfo.vue'
)[
'default'
]
ListLand
:
typeof
import
(
'./src/components/list/list-land.vue'
)[
'default'
]
ListPagination
:
typeof
import
(
'./src/components/list/ListPagination.vue'
)[
'default'
]
ParkItem
:
typeof
import
(
'./src/components/list/ParkItem.vue'
)[
'default'
]
RouterLink
:
typeof
import
(
'vue-router'
)[
'RouterLink'
]
RouterView
:
typeof
import
(
'vue-router'
)[
'RouterView'
]
}
...
...
src/components/common/CommonHeader.vue
View file @
9fa31461
<
template
>
<div
class=
"
flex items-center justify-between pt-[12px] pl-[40px] header-view
"
>
<div
class=
"
header-view flex items-center justify-between pl-[40px] pt-[12px]
"
>
<!--
<div>
logo
</div>
-->
<div
class=
"flex flex-1 justify-start"
>
<ElMenu
...
...
@@ -59,6 +59,6 @@ const handleMenuChange = () => {};
</
script
>
<
style
scoped
>
.header-view
{
box-shadow
:
0
px
2px
8px
0px
rgba
(
90
,
0
,
0
,
0.1
);
box-shadow
:
0
2px
8px
0
rgba
(
90
0
0
0.1
);
}
</
style
>
src/components/list/
Industrial
ParkItem.vue
→
src/components/list/ParkItem.vue
View file @
9fa31461
...
...
@@ -12,6 +12,11 @@
{{
currentStatusTag
.
name
}}
</div>
</div>
<div
v-if=
"superTag"
class=
"ml-2"
>
<div
:class=
"['status-tag', superTag.className]"
>
{{
superTag
.
name
}}
</div>
</div>
</div>
<div
class=
"mt-[17px] font-yahei text-xs leading-5 text-[#4d4d4d]"
>
{{
filterAddress
(
item
)
}}
...
...
@@ -33,7 +38,7 @@
<
script
setup
lang=
"ts"
>
import
{
useItemStatus
}
from
'@/composable/useItemStatus.ts'
;
import
type
{
IndustrialParkItem
}
from
'@/types/api/industrialParkList'
;
import
type
{
IndustrialParkItem
}
from
'@/types/api/industrialParkList
.ts
'
;
import
{
filterAddress
}
from
'@/utils/filters.ts'
;
import
{
computed
}
from
'vue'
;
import
ListInfo
from
'./ListInfo.vue'
;
...
...
@@ -45,7 +50,7 @@ const props = withDefaults(
{},
);
const
{
currentStatusTag
}
=
useItemStatus
(
props
.
item
);
const
{
currentStatusTag
,
superTag
}
=
useItemStatus
(
props
.
item
);
/** 最大展示招商方向数量 */
const
MAX_DIRECTION_COUNT
=
3
;
...
...
src/composable/useItemStatus.ts
View file @
9fa31461
import
type
{
DevelopZoneItem
}
from
'@/types/api/developZoneList'
;
import
type
{
IndustrialParkItem
}
from
'@/types/api/industrialParkList'
;
import
type
{
DevelopZoneItem
}
from
'@/types/api/developZoneList
.ts
'
;
import
type
{
IndustrialParkItem
}
from
'@/types/api/industrialParkList
.ts
'
;
import
{
computed
}
from
'vue'
;
export
interface
StatusConfig
{
...
...
@@ -31,7 +31,7 @@ export function useItemStatus(item: Partial<IndustrialParkItem & DevelopZoneItem
return
item
.
isSuper
===
1
?
{
...
superStarConfig
,
name
:
item
.
isSuperName
,
name
:
item
.
isSuperName
||
'星级开发区'
,
}
:
null
;
});
...
...
src/types/api.ts
View file @
9fa31461
...
...
@@ -4,7 +4,7 @@
export
enum
RequestUrl
{
login
=
'/login'
,
/** 产业园列表 */
industrialParkList
=
'/lyy/parkInfo/v1.0/page'
,
industrialParkList
=
'/lyy/
api/
parkInfo/v1.0/page'
,
/** 产业园详情 */
industrialParkDetal
=
'/lyy/api/parkInfo/v1.0/detail'
,
/** 开发区列表 */
...
...
src/views/develop/DevelopZoneList.vue
View file @
9fa31461
<!-- 开发区列表 -->
<
template
>
<div>
<div>
<
div
<div
class=
"space-y-5"
>
<
ParkItem
v-for=
"item in datas"
:key=
"item.id"
@
click=
"handleDetail(RouteName.developZoneDetail, item)"
>
<div>
{{
item
.
name
}}
</div>
</div>
:item=
"item"
@
click=
"handleDetail(RouteName.industrialParkDetail, item)"
></ParkItem>
<ListPagination
v-model:current-page=
"pageNum"
...
...
src/views/industrial-park/IndustrialParkList.vue
View file @
9fa31461
...
...
@@ -26,14 +26,14 @@ import { useListView } from '@/composable/useListView.ts';
import
{
RouteName
}
from
'@/router/router.ts'
;
import
{
RequestUrl
}
from
'@/types/api.ts'
;
import
ListPagination
from
'@/components/list/ListPagination.vue'
;
import
ParkItem
from
'@/components/list/
Industrial
ParkItem.vue'
;
import
ParkItem
from
'@/components/list/ParkItem.vue'
;
import
type
{
IndustrialParkItem
,
IndustrialParkListCondition
,
}
from
'@/types/api/industrialParkList'
;
}
from
'@/types/api/industrialParkList
.ts
'
;
const
{
pageNum
,
pageSize
,
totalCount
,
datas
,
handleDetail
}
=
useListView
<
IndustrialParkItem
,
IndustrialParkListCondition
>
(
RequestUrl
.
developZone
List
);
>
(
RequestUrl
.
industrialPark
List
);
</
script
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment