Commit 9fa31461 authored by 王玉鑫's avatar 王玉鑫

feat: 开发区列表item

parent 82170c7c
......@@ -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']
}
......
<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: 0px 2px 8px 0px rgba(90, 0, 0, 0.1);
box-shadow: 0 2px 8px 0 rgba(90 0 0 0.1);
}
</style>
......@@ -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;
......
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;
});
......
......@@ -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',
/** 开发区列表 */
......
<!-- 开发区列表 -->
<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"
......
......@@ -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/IndustrialParkItem.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.developZoneList);
>(RequestUrl.industrialParkList);
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment