Commit 251c9154 authored by shilei's avatar shilei

Merge branch 'dev' of http://101.201.78.203/cfld-front/liyeyun into dev

parents 6a0faf2f e6508226
...@@ -12,7 +12,17 @@ ...@@ -12,7 +12,17 @@
:class="getValueClass(col, line)" :class="getValueClass(col, line)"
class="flex flex-1 !px-[30px] py-[10px] leading-5 outline outline-1 outline-[#FAFAFC]" class="flex flex-1 !px-[30px] py-[10px] leading-5 outline outline-1 outline-[#FAFAFC]"
> >
<div class="info-value" :class="getValueClass(col, line)"> <div v-if="col.isFile" class="flex cursor-pointer items-center">
<img class="mr-1 h-4 w-4" src="@/assets/images/icon-file.png" />
<a
:download="col.fileName"
:href="col.value as string"
class="font-yahei text-xs leading-5 text-[#2C68FF]"
>
{{ col.fileName }}
</a>
</div>
<div v-else class="info-value" :class="getValueClass(col, line)">
{{ handleValue(col) }} {{ handleValue(col) }}
</div> </div>
</div> </div>
...@@ -21,7 +31,7 @@ ...@@ -21,7 +31,7 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { haveValue } from '@/utils/filters.ts'; import { haveValue, formatNumber } from '@/utils/filters.ts';
export interface Info { export interface Info {
name: string; name: string;
...@@ -31,6 +41,10 @@ export interface Info { ...@@ -31,6 +41,10 @@ export interface Info {
oneline?: boolean; oneline?: boolean;
smallMode?: boolean; smallMode?: boolean;
customClass?: string; customClass?: string;
/** 是否是文件 */
isFile?: boolean;
/** 文件名 */
fileName?: string;
} }
export type Infos = Info[][] | []; export type Infos = Info[][] | [];
withDefaults( withDefaults(
...@@ -44,7 +58,7 @@ withDefaults( ...@@ -44,7 +58,7 @@ withDefaults(
const handleValue = (col: Info) => { const handleValue = (col: Info) => {
const { value, unit = '' } = col; const { value, unit = '' } = col;
return haveValue(value) ? value.toString() + unit : '--'; return haveValue(value) ? formatNumber(value) + unit : '--';
}; };
const getValueClass = (col: Info, line: Info[]) => { const getValueClass = (col: Info, line: Info[]) => {
......
<template> <template>
<div class="content w-[258px] px-[29px] py-[30px]"> <div class="form-modal content w-[258px] px-[29px] py-[30px]">
<p class="mb-5 text-base font-bold text-[#1A1A1A]">选址需求</p> <p class="mb-5 text-base font-bold text-[#1A1A1A]">选址需求</p>
<ElInput v-model="formData.address" class="w-[200px]" placeholder="*输入选址区域"></ElInput> <ElInput v-model="formData.address" class="w-[200px]" placeholder="*输入选址区域"></ElInput>
<ElSelect <ElSelect
clearable
v-model="formData.needType" v-model="formData.needType"
clearable
class="mt-3 w-[200px]" class="mt-3 w-[200px]"
placeholder="*请选择您的需求类型" placeholder="*请选择您的需求类型"
> >
<ElOption v-for="item in options" :key="item.label" :label="item.label" :value="item.value" /> <ElOption v-for="item in options" :key="item.label" :label="item.label" :value="item.value" />
</ElSelect> </ElSelect>
<ElInput <ElInputNumber
v-model="formData.phone" v-model="formData.phone"
class="mt-3 w-[200px]" :controls="false"
class="form-modal__input-number mt-3 !w-[200px] !px-0"
placeholder="*请填写您的联系方式" placeholder="*请填写您的联系方式"
></ElInput> ></ElInputNumber>
<ElInput <ElInput
v-model="formData.remark" v-model="formData.remark"
class="mt-3 w-[200px]" class="mt-3 w-[200px]"
...@@ -104,19 +105,30 @@ const commit = debounce( ...@@ -104,19 +105,30 @@ const commit = debounce(
}, },
); );
</script> </script>
<style lang="scss" scoped> <style lang="scss">
.content { .form-modal {
border: 1px solid rgba(0, 0, 0, 0.08); .content {
background: #ffffff; border: 1px solid rgba(0, 0, 0, 0.08);
} background: #ffffff;
.btn-default { }
background: #c0322b; .btn-default {
color: #fff; background: #c0322b;
line-height: 30px; color: #fff;
text-align: center; line-height: 30px;
border-radius: 2px 2px 2px 2px; text-align: center;
font-size: 12px; border-radius: 2px 2px 2px 2px;
font-weight: 500; font-size: 12px;
cursor: pointer; font-weight: 500;
cursor: pointer;
}
&__input-number {
.el-input__wrapper {
padding-left: 11px !important;
padding-right: 11px !important;
input {
text-align: left;
}
}
}
} }
</style> </style>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { useItemStatus } from '@/composable/useItemStatus.ts'; import { useItemStatus } from '@/composable/useItemStatus.ts';
import type { IndustrialParkItem } from '@/types/api/industrialParkList.ts'; import type { IndustrialParkItem } from '@/types/api/industrialParkList.ts';
import { filterAddress } from '@/utils/filters.ts'; import { filterAddress, formatNumber } from '@/utils/filters.ts';
import { computed } from 'vue'; import { computed } from 'vue';
import type { DevelopZoneItem } from '@/types/api/developZoneList'; import type { DevelopZoneItem } from '@/types/api/developZoneList';
import { ParkItemType } from '@/types/enum.ts'; import { ParkItemType } from '@/types/enum.ts';
...@@ -80,7 +80,8 @@ const isDevelop = computed(() => { ...@@ -80,7 +80,8 @@ const isDevelop = computed(() => {
const infos = computed(() => { const infos = computed(() => {
const unit = props.type === ParkItemType.develop ? '平方公里' : '亩'; const unit = props.type === ParkItemType.develop ? '平方公里' : '亩';
const { levelName, planArea, type, coverArea } = props.item || {}; const { levelName, planArea, type, coverArea } = props.item || {};
return [levelName, type, planArea || coverArea ? `${planArea || coverArea}${unit}` : '']; const area = formatNumber(planArea || coverArea);
return [levelName, type, area ? `${area}${unit}` : ''];
}); });
const directions = computed(() => { const directions = computed(() => {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</div> </div>
<div class="mb-[8px] flex items-center"> <div class="mb-[8px] flex items-center">
<img class="info-icon" src="@/assets/images/icon-map.png" alt="" /> <img class="info-icon" src="@/assets/images/icon-map.png" alt="" />
<p>建筑面积:{{ detail.area || '--' }}</p> <p>建筑面积:{{ formatNumber(detail.area) || '--' }}</p>
</div> </div>
<div class="mb-[8px] flex items-center"> <div class="mb-[8px] flex items-center">
<img class="info-icon" src="@/assets/images/icon-draw.png" alt="" /> <img class="info-icon" src="@/assets/images/icon-draw.png" alt="" />
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { CarrierListItem } from '@/types/api/carrierList'; import type { CarrierListItem } from '@/types/api/carrierList';
import CommonImage from '@/components/common/CommonImage.vue'; import CommonImage from '@/components/common/CommonImage.vue';
import { formatNumber } from '@/utils/filters.ts';
withDefaults( withDefaults(
defineProps<{ defineProps<{
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</div> </div>
<div class="mb-[8px] flex items-center"> <div class="mb-[8px] flex items-center">
<img class="info-icon" src="@/assets/images/icon-map.png" alt="" /> <img class="info-icon" src="@/assets/images/icon-map.png" alt="" />
<p>占地面积:{{ detail.area || '--' }}</p> <p>占地面积:{{ formatNumber(detail.area) || '--' }}</p>
</div> </div>
<div class="mb-[8px] flex items-center"> <div class="mb-[8px] flex items-center">
<img class="info-icon" src="@/assets/images/icon-draw.png" alt="" /> <img class="info-icon" src="@/assets/images/icon-draw.png" alt="" />
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { LandListItem } from '@/types/api/landList'; import type { LandListItem } from '@/types/api/landList';
import CommonImage from '@/components/common/CommonImage.vue'; import CommonImage from '@/components/common/CommonImage.vue';
import { formatNumber } from '@/utils/filters.ts';
withDefaults( withDefaults(
defineProps<{ defineProps<{
......
...@@ -21,14 +21,17 @@ export function useDetail<T>(url: RequestUrl) { ...@@ -21,14 +21,17 @@ export function useDetail<T>(url: RequestUrl) {
const initDetail = async () => { const initDetail = async () => {
try { try {
const { success, msg, data } = await requestDetail(); const result = await requestDetail();
const { success, msg, data } = result;
if (success) { if (success) {
detail.value = data; detail.value = data;
} else { } else {
message.error(msg || '请求失败'); message.error(msg || '请求失败');
} }
return result;
} catch (error) { } catch (error) {
console.log(error); console.log(error);
return Promise.reject(error);
} }
}; };
......
...@@ -2,10 +2,11 @@ import { useQueryList } from '@/composable/useQueryList.ts'; ...@@ -2,10 +2,11 @@ import { useQueryList } from '@/composable/useQueryList.ts';
import { ref, type Ref, watchEffect, nextTick, type ShallowRef, computed } from 'vue'; import { ref, type Ref, watchEffect, nextTick, type ShallowRef, computed } from 'vue';
import { RequestUrl } from '@/types/api.ts'; import { RequestUrl } from '@/types/api.ts';
import type { CommonListResp, CommonListParams } from '@/types/common'; import type { CommonListResp, CommonListParams } from '@/types/common';
import type { RouteName } from '@/router/router.ts'; import { RouteName } from '@/router/router.ts';
import { useRoute, onBeforeRouteLeave } from 'vue-router'; import { useRoute, onBeforeRouteLeave } from 'vue-router';
import { useSearchParamsStore } from '@/stores/searchParams.ts'; import { useSearchParamsStore } from '@/stores/searchParams.ts';
import { cloneDeep, isEmpty } from 'lodash-es'; import { cloneDeep, isEmpty } from 'lodash-es';
import { handleNoAuth } from '@/utils/tools.ts';
import { useRequest } from './useRequest.ts'; import { useRequest } from './useRequest.ts';
import { useJump } from './useJump.ts'; import { useJump } from './useJump.ts';
...@@ -74,10 +75,10 @@ export function useListView< ...@@ -74,10 +75,10 @@ export function useListView<
isRequesting.value = b; isRequesting.value = b;
}; };
watchEffect(async () => { const callQuery = async () => {
try { try {
changeIsRequesting(true); changeIsRequesting(true);
const { data } = await queryList( const { data, code } = await queryList(
{ {
...searchParams.value, ...searchParams.value,
...otherParams.value, ...otherParams.value,
...@@ -86,11 +87,16 @@ export function useListView< ...@@ -86,11 +87,16 @@ export function useListView<
); );
handleUrlClear(); handleUrlClear();
datas.value = data.records; datas.value = data.records;
handleNoAuth(code);
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} finally { } finally {
changeIsRequesting(false); changeIsRequesting(false);
} }
};
watchEffect(() => {
callQuery();
}); });
/** /**
...@@ -142,6 +148,7 @@ export function useListView< ...@@ -142,6 +148,7 @@ export function useListView<
isRequesting, isRequesting,
haveSearchParams, haveSearchParams,
queryList, queryList,
callQuery,
handleDetail, handleDetail,
initPagination, initPagination,
handleFilterChange, handleFilterChange,
......
...@@ -43,3 +43,14 @@ export function filterAddress(item: AddressItem) { ...@@ -43,3 +43,14 @@ export function filterAddress(item: AddressItem) {
.filter(haveValue) .filter(haveValue)
.join('-'); .join('-');
} }
/**
* 处理数字保留小数
*/
export function formatNumber(v: unknown, n = 2): string {
if (typeof v === 'number') {
return v.toFixed(n);
} else {
return v!.toString();
}
}
import router, { RouteName } from '@/router/router.ts';
export const heightLight = (str: string, key: string) => { export const heightLight = (str: string, key: string) => {
const reg = new RegExp(key, 'ig'); const reg = new RegExp(key, 'ig');
return str.replace(reg, (val) => { return str.replace(reg, (val) => {
return `<span style="color: #C0322B;line-height: 25px;background: rgba(192,50,43,0.06);display: inline-block;">${val}</span>`; return `<span style="color: #C0322B;line-height: 25px;background: rgba(192,50,43,0.06);display: inline-block;">${val}</span>`;
}); });
}; };
export const handleNoAuth = (code: number) => {
if (code === 401) {
router.replace({
name: RouteName.home,
});
}
};
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<DetailMainInfo :value="detail.levelName" name="开发区级别"></DetailMainInfo> <DetailMainInfo :value="detail.levelName" name="开发区级别"></DetailMainInfo>
<DetailMainInfo :value="detail.type" name="开发区类型"></DetailMainInfo> <DetailMainInfo :value="detail.type" name="开发区类型"></DetailMainInfo>
<DetailMainInfo <DetailMainInfo
:value="detail.planArea" :value="formatNumber(detail.planArea)"
unit="平方公里" unit="平方公里"
name="开发区面积" name="开发区面积"
></DetailMainInfo> ></DetailMainInfo>
...@@ -113,7 +113,7 @@ import DetailInfoTab from '@/components/detail/DetailInfoTab.vue'; ...@@ -113,7 +113,7 @@ import DetailInfoTab from '@/components/detail/DetailInfoTab.vue';
import { useInfoTab } from '@/composable/useInfoTab.ts'; import { useInfoTab } from '@/composable/useInfoTab.ts';
import type { Enterprise, Policy } from '@/types/common'; import type { Enterprise, Policy } from '@/types/common';
import { useJoinRequired } from '@/composable/useJoinRequired.ts'; import { useJoinRequired } from '@/composable/useJoinRequired.ts';
import { haveValue } from '@/utils/filters.ts'; import { haveValue, formatNumber } from '@/utils/filters.ts';
import MiniListItem from '@/components/detail/MiniListItem.vue'; import MiniListItem from '@/components/detail/MiniListItem.vue';
import { useJump } from '@/composable/useJump.ts'; import { useJump } from '@/composable/useJump.ts';
import { RouteName } from '@/router/router.ts'; import { RouteName } from '@/router/router.ts';
......
...@@ -5,7 +5,11 @@ ...@@ -5,7 +5,11 @@
<DetailInfoCell> <DetailInfoCell>
<DetailMain :type="DetailType.industrial" :detail="detail"> <DetailMain :type="DetailType.industrial" :detail="detail">
<DetailMainInfo :value="detail.levelName" name="产业园级别"></DetailMainInfo> <DetailMainInfo :value="detail.levelName" name="产业园级别"></DetailMainInfo>
<DetailMainInfo :value="detail.coverArea" unit="亩" name="占地面积"></DetailMainInfo> <DetailMainInfo
:value="formatNumber(detail.coverArea)"
unit="亩"
name="占地面积"
></DetailMainInfo>
</DetailMain> </DetailMain>
</DetailInfoCell> </DetailInfoCell>
<DetailInfoCell v-if="detail.description" title="产业园简介"> <DetailInfoCell v-if="detail.description" title="产业园简介">
...@@ -124,7 +128,7 @@ import type { Policy } from '@/types/common'; ...@@ -124,7 +128,7 @@ import type { Policy } from '@/types/common';
import { computed } from 'vue'; import { computed } from 'vue';
import DetailInfoTab from '@/components/detail/DetailInfoTab.vue'; import DetailInfoTab from '@/components/detail/DetailInfoTab.vue';
import MiniListItem, { type MiniDetail } from '@/components/detail/MiniListItem.vue'; import MiniListItem, { type MiniDetail } from '@/components/detail/MiniListItem.vue';
import { haveValue } from '@/utils/filters.ts'; import { haveValue, formatNumber } from '@/utils/filters.ts';
import { useJump } from '@/composable/useJump.ts'; import { useJump } from '@/composable/useJump.ts';
import { RouteName } from '@/router/router.ts'; import { RouteName } from '@/router/router.ts';
import { DetailType, ExampleType } from '@/types/enum.ts'; import { DetailType, ExampleType } from '@/types/enum.ts';
......
...@@ -16,7 +16,11 @@ ...@@ -16,7 +16,11 @@
> >
<DetailMainInfo :value="detail.price" unit="万/亩" name="土地价格"></DetailMainInfo> <DetailMainInfo :value="detail.price" unit="万/亩" name="土地价格"></DetailMainInfo>
<DetailMainInfo :value="detail.type" name="土地类型"></DetailMainInfo> <DetailMainInfo :value="detail.type" name="土地类型"></DetailMainInfo>
<DetailMainInfo :value="detail.area" unit="亩" name="占地面积"></DetailMainInfo> <DetailMainInfo
:value="formatNumber(detail.area)"
unit="亩"
name="占地面积"
></DetailMainInfo>
</DetailMain> </DetailMain>
</DetailInfoCell> </DetailInfoCell>
<DetailInfoCell v-if="detail.landStatus" title="土地现状"> <DetailInfoCell v-if="detail.landStatus" title="土地现状">
...@@ -61,6 +65,7 @@ import { DetailType, ParkItemType } from '@/types/enum.ts'; ...@@ -61,6 +65,7 @@ import { DetailType, ParkItemType } from '@/types/enum.ts';
import { useJump } from '@/composable/useJump.ts'; import { useJump } from '@/composable/useJump.ts';
import { RouteName } from '@/router/router.ts'; import { RouteName } from '@/router/router.ts';
import DetailMainInfo from '@/components/detail/DetailMainInfo.vue'; import DetailMainInfo from '@/components/detail/DetailMainInfo.vue';
import { formatNumber } from '@/utils/filters.ts';
const { detail, initDetail } = useDetail<LandDetailResp>(RequestUrl.landDetail); const { detail, initDetail } = useDetail<LandDetailResp>(RequestUrl.landDetail);
......
...@@ -76,20 +76,34 @@ ...@@ -76,20 +76,34 @@
</div> </div>
</ElTabPane> </ElTabPane>
<ElTabPane label="土地信息" :name="DetailType.carrier"> <ElTabPane label="土地信息" :name="DetailType.carrier">
<div class="bg-[#F8F8F8]"> <div class="overflow-x-auto bg-[#F8F8F8]">
<ElTable :data="landList"> <ElTable
<ElTableColumn prop="name" label="土地名称"></ElTableColumn> scrollbar-always-on
<ElTableColumn prop="address" label="地块位置"></ElTableColumn> :data="landList"
<ElTableColumn prop="area" label="地块面积"> header-cell-class-name="bg-[#000000] text-[#000000]/[.85] text-sm"
cell-class-name="text-[#4D4D4D] text-sm leading-[22px]"
>
<ElTableColumn width="64" label="编号">
<template #default="{ $index }">
<div>{{ $index }}</div>
</template>
</ElTableColumn>
<ElTableColumn min-width="240" prop="name" label="土地名称"></ElTableColumn>
<ElTableColumn min-width="150" prop="address" label="地块位置"></ElTableColumn>
<ElTableColumn min-width="100" prop="area" label="地块面积">
<template #default="{ row }"> <template #default="{ row }">
<div v-if="row.area">{{ row.area }}平方公里</div> <div v-if="row.area">{{ formatNumber(row.area) }}平方公里</div>
</template> </template>
</ElTableColumn> </ElTableColumn>
<ElTableColumn prop="type" label="土地类型"></ElTableColumn> <ElTableColumn width="100" prop="type" label="土地类型"></ElTableColumn>
<ElTableColumn prop="landStatus" label="土地现状"></ElTableColumn> <ElTableColumn width="100" prop="landStatus" label="土地现状"></ElTableColumn>
<ElTableColumn prop="industryDirection" label="产业方向"></ElTableColumn> <ElTableColumn
<ElTableColumn prop="contacterName" label="招商联系人"></ElTableColumn> min-width="200"
<ElTableColumn prop="contacterPhone" label="联系方式"></ElTableColumn> prop="industryDirection"
label="产业方向"
></ElTableColumn>
<ElTableColumn width="100" prop="contacterName" label="招商联系人"></ElTableColumn>
<ElTableColumn width="120" prop="contacterPhone" label="联系方式"></ElTableColumn>
</ElTable> </ElTable>
<ListPagination <ListPagination
...@@ -118,10 +132,11 @@ import type { MyParkDevelopDetailResp } from '@/types/api/myParkDevelopDetail'; ...@@ -118,10 +132,11 @@ import type { MyParkDevelopDetailResp } from '@/types/api/myParkDevelopDetail';
import { useInfoTab } from '@/composable/useInfoTab.ts'; import { useInfoTab } from '@/composable/useInfoTab.ts';
import DetailInfoTab from '@/components/detail/DetailInfoTab.vue'; import DetailInfoTab from '@/components/detail/DetailInfoTab.vue';
import type { Enterprise } from '@/types/common'; import type { Enterprise } from '@/types/common';
import { filterAddress } from '@/utils/filters.ts'; import { filterAddress, formatNumber } from '@/utils/filters.ts';
import { useJump } from '@/composable/useJump.ts'; import { useJump } from '@/composable/useJump.ts';
import { RouteName } from '@/router/router.ts'; import { RouteName } from '@/router/router.ts';
import { useIndustryBase } from '@/composable/useIndustryBase.ts'; import { useIndustryBase } from '@/composable/useIndustryBase.ts';
import { handleNoAuth } from '@/utils/tools.ts';
const { detail, initDetail } = useDetail<MyParkDevelopDetailResp>(RequestUrl.myParkDevelopDetail); const { detail, initDetail } = useDetail<MyParkDevelopDetailResp>(RequestUrl.myParkDevelopDetail);
const { router } = useJump(); const { router } = useJump();
...@@ -223,7 +238,7 @@ const joinRequired = computed(() => { ...@@ -223,7 +238,7 @@ const joinRequired = computed(() => {
valueAddedEnergy, valueAddedEnergy,
environmentalEquirements, environmentalEquirements,
prohibitedDirectory, prohibitedDirectory,
prohibitedDirectoryUrlList, prohibitedDirectoryUrlList = [],
accessOther, accessOther,
} = detail.value; } = detail.value;
const result: Infos = [ const result: Infos = [
...@@ -279,16 +294,16 @@ const joinRequired = computed(() => { ...@@ -279,16 +294,16 @@ const joinRequired = computed(() => {
value: prohibitedDirectory, value: prohibitedDirectory,
}, },
], ],
...(prohibitedDirectoryUrlList ...prohibitedDirectoryUrlList.map((i, index) => {
? prohibitedDirectoryUrlList.map((i) => { return [
return [ {
{ name: index === 0 ? '禁限目录附件' : '',
name: '禁限目录附件', value: i,
value: i, isFile: true,
}, fileName: i.split('/')?.pop(),
]; },
}) ];
: []), }),
]; ];
return result; return result;
...@@ -401,7 +416,7 @@ const otherElement = computed(() => { ...@@ -401,7 +416,7 @@ const otherElement = computed(() => {
/** 产业支持 */ /** 产业支持 */
const industrySupports = computed(() => { const industrySupports = computed(() => {
if (detail.value) { if (detail.value) {
const { policyList, policyUrlList } = detail.value; const { policyList, policyUrlList = [] } = detail.value;
return [ return [
...(policyList ...(policyList
?.map(({ name, type, content }) => { ?.map(({ name, type, content }) => {
...@@ -426,12 +441,16 @@ const industrySupports = computed(() => { ...@@ -426,12 +441,16 @@ const industrySupports = computed(() => {
]; ];
}) })
.flat() || []), .flat() || []),
[ ...policyUrlList.map((url: string, index) => {
{ return [
name: '政策文件', {
value: policyUrlList?.join(',') || '', name: index === 0 ? '政策文件' : '',
}, value: url,
], fileName: url.split('/')?.pop(),
isFile: true,
},
];
}),
]; ];
} else { } else {
return []; return [];
...@@ -518,5 +537,7 @@ const handleBack = () => { ...@@ -518,5 +537,7 @@ const handleBack = () => {
}); });
}; };
initDetail(); initDetail().then(({ code }) => {
handleNoAuth(code);
});
</script> </script>
...@@ -73,33 +73,42 @@ ...@@ -73,33 +73,42 @@
</ElTabPane> </ElTabPane>
<ElTabPane label="载体信息" :name="DetailType.carrier"> <ElTabPane label="载体信息" :name="DetailType.carrier">
<div class="bg-[#F8F8F8]"> <div class="bg-[#F8F8F8]">
<ElTable :data="carrierList"> <ElTable
<ElTableColumn prop="buildingNumber" label="楼号"></ElTableColumn> scrollbar-always-on
<ElTableColumn prop="structure" label="建筑结构"></ElTableColumn> :data="carrierList"
<ElTableColumn prop="area" label="建筑面积"> header-cell-class-name="bg-[#000000] text-[#000000]/[.85] text-sm"
cell-class-name="text-[#4D4D4D] text-sm leading-[22px]"
>
<ElTableColumn width="64" prop="buildingNumber" label="楼号"></ElTableColumn>
<ElTableColumn min-width="150" prop="structure" label="建筑结构"></ElTableColumn>
<ElTableColumn width="120" prop="area" label="建筑面积">
<template #default="{ row }"> <template #default="{ row }">
<div v-if="row.area">{{ row.area }}</div> <div v-if="row.area">{{ formatNumber(row.area) }}</div>
</template> </template>
</ElTableColumn> </ElTableColumn>
<ElTableColumn prop="floorNumber" label="层数"></ElTableColumn> <ElTableColumn width="100" prop="floorNumber" label="层数"></ElTableColumn>
<ElTableColumn prop="floorHigh" label="层高"> <ElTableColumn prop="floorHigh" label="层高">
<template #default="{ row }"> <template #default="{ row }">
<div v-if="row.floorHigh">{{ row.floorHigh }}m</div> <div v-if="row.floorHigh">{{ row.floorHigh }}m</div>
</template> </template>
</ElTableColumn> </ElTableColumn>
<ElTableColumn prop="singleArea" label="单层面积"> <ElTableColumn width="120" prop="singleArea" label="单层面积">
<template #default="{ row }"> <template #default="{ row }">
<div v-if="row.area">{{ row.singleArea }}</div> <div v-if="row.area">{{ formatNumber(row.singleArea) }}</div>
</template> </template>
</ElTableColumn> </ElTableColumn>
<ElTableColumn prop="distance" label="柱距"> <ElTableColumn width="100" prop="distance" label="柱距">
<template #default="{ row }"> <template #default="{ row }">
<div v-if="row.distance">{{ row.distance }}m</div> <div v-if="row.distance">{{ row.distance }}m</div>
</template> </template>
</ElTableColumn> </ElTableColumn>
<ElTableColumn prop="elevatorType" label="电梯类型"></ElTableColumn> <ElTableColumn width="120" prop="elevatorType" label="电梯类型"></ElTableColumn>
<ElTableColumn prop="fireProtectionLevel" label="消防等级"></ElTableColumn> <ElTableColumn
<ElTableColumn prop="fireResistant" label="耐火等级"></ElTableColumn> width="120"
prop="fireProtectionLevel"
label="消防等级"
></ElTableColumn>
<ElTableColumn width="120" prop="fireResistant" label="耐火等级"></ElTableColumn>
</ElTable> </ElTable>
<ListPagination <ListPagination
...@@ -125,10 +134,11 @@ import { computed, ref } from 'vue'; ...@@ -125,10 +134,11 @@ import { computed, ref } from 'vue';
import DetailInfoCell from '@/components/detail/DetailInfoCell.vue'; import DetailInfoCell from '@/components/detail/DetailInfoCell.vue';
import type { Infos } from '@/components/detail/DetailInfo.vue'; import type { Infos } from '@/components/detail/DetailInfo.vue';
import ListPagination from '@/components/list/ListPagination.vue'; import ListPagination from '@/components/list/ListPagination.vue';
import { filterAddress } from '@/utils/filters.ts'; import { filterAddress, formatNumber } from '@/utils/filters.ts';
import { useJump } from '@/composable/useJump.ts'; import { useJump } from '@/composable/useJump.ts';
import { RouteName } from '@/router/router.ts'; import { RouteName } from '@/router/router.ts';
import { useIndustryBase } from '@/composable/useIndustryBase.ts'; import { useIndustryBase } from '@/composable/useIndustryBase.ts';
import { handleNoAuth } from '@/utils/tools.ts';
const { detail, initDetail } = useDetail<MyParkIndustrialDetailResp>( const { detail, initDetail } = useDetail<MyParkIndustrialDetailResp>(
RequestUrl.myParkIndustrialDetail, RequestUrl.myParkIndustrialDetail,
...@@ -452,12 +462,16 @@ const industrySupports = computed(() => { ...@@ -452,12 +462,16 @@ const industrySupports = computed(() => {
]; ];
}) })
.flat() || []), .flat() || []),
[ ...policyUrlList.map((url: string, index) => {
{ return [
name: '政策文件', {
value: policyUrlList?.join(',') || '', name: index === 0 ? '政策文件' : '',
}, value: url,
], fileName: url.split('/')?.pop(),
isFile: true,
},
];
}),
]; ];
return result; return result;
...@@ -491,5 +505,7 @@ const handleBack = () => { ...@@ -491,5 +505,7 @@ const handleBack = () => {
}); });
}; };
initDetail(); initDetail().then(({ code }) => {
handleNoAuth(code);
});
</script> </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