Commit af394f34 authored by shilei's avatar shilei

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

parents 32956b64 69467cdf
......@@ -7,15 +7,18 @@
white-space: nowrap;
overflow: hidden;
}
/* 两行文字溢出虚点显 示*/
.ell2 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
@for $i from 2 through 5 {
.ell#{$i} {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: $i;
-webkit-box-orient: vertical;
}
}
@layer components {
// 列表页,招商方向标签
.investment-direction {
......
......@@ -32,7 +32,7 @@
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { ref, watchEffect } from 'vue';
import { useSearchParamsStore } from '@/stores/searchParams.ts';
withDefaults(
......@@ -50,9 +50,14 @@ const emit = defineEmits(['search']);
const searchParamsStore = useSearchParamsStore();
const parkName = ref(searchParamsStore.urlSearchParams?.name || '');
const parkName = ref('');
watchEffect(() => {
parkName.value = searchParamsStore.searchName || '';
});
const handleSearch = () => {
searchParamsStore.changeSearchName(parkName.value);
emit('search', { name: parkName.value });
};
</script>
......
......@@ -3,16 +3,15 @@
<div v-for="(line, index) of infos" :key="index" class="min-h-10 inline-flex w-full">
<div v-for="col in line" :key="col.name" class="flex flex-1 text-xs text-[#1A1A1A]">
<div
class="flex w-[160px] bg-[#FAFAFC] px-[30px] py-[10px] leading-5"
class="flex w-[160px] flex-none bg-[#FAFAFC] px-[30px] py-[10px] leading-5"
:class="{ '!w-[130px] !px-5': col.smallMode }"
>
{{ col.name }}
</div>
<div
class="flex items-center px-[30px] py-[10px] leading-5 outline outline-1 outline-[#FAFAFC]"
:class="getValueClass(col, line)"
>
{{ handleValue(col) }}
<div class="flex px-[30px] py-[10px] leading-5 outline outline-1 outline-[#FAFAFC]">
<div class="info-value" :class="getValueClass(col, line)">
{{ handleValue(col) }}
</div>
</div>
</div>
</div>
......
......@@ -2,6 +2,7 @@
<template>
<section
v-if="isInfoExist"
ref="rootRef"
class="relative bg-white"
:class="{ 'outline outline-1 outline-[#C0322B]/[.45]': needLock }"
>
......@@ -32,12 +33,7 @@
更多
</div>
</div>
<div
ref="test"
class="mt-5"
:class="{ 'content-hidden': !isContentExpand }"
:style="contentStyle"
>
<div ref="test" class="mt-5" :class="{ 'content-show': isContentExpand }">
<slot></slot>
</div>
<div
......@@ -68,7 +64,7 @@
</template>
<script lang="ts" setup>
import { ref, computed, watchEffect } from 'vue';
import { ref, computed, onMounted, watch, nextTick } from 'vue';
import { DetailType, type ExampleType } from '@/types/enum.ts';
import SecretInfo from '@/components/detail/SecretInfo.vue';
import { useAppStore } from '@/stores/app.ts';
......@@ -99,6 +95,8 @@ export interface DetailInfoCellProps {
detailType?: DetailType;
/** 是否已解锁 */
isUnlocked?: boolean;
/** 标签索引 */
tabIndex?: number;
}
const props = withDefaults(defineProps<DetailInfoCellProps>(), {
title: '',
......@@ -113,6 +111,7 @@ const props = withDefaults(defineProps<DetailInfoCellProps>(), {
detailId: -1,
detailType: DetailType.industrial,
isUnlocked: false,
tabIndex: -1,
});
const emit = defineEmits(['to-list', 'init-detail']);
......@@ -120,11 +119,15 @@ const emit = defineEmits(['to-list', 'init-detail']);
const appStore = useAppStore();
/** 当前内容是否展开 */
const isContentExpand = ref(true);
const isContentExpand = ref(false);
/** 存在溢出的信息文本元素 */
const existTextOverflow = ref(false);
const rootRef = ref<HTMLElement | null>(null);
/** 展示内容展示按钮 */
const showContentExpand = computed(() => {
return props.maxLines > -1;
return props.maxLines > -1 || existTextOverflow.value;
});
/** 是否存在不为空的信息 */
......@@ -147,29 +150,40 @@ const isLogin = computed(() => {
return appStore.isLogin;
});
const contentStyle = computed(() => {
if (showContentExpand.value) {
return {
'-webkit-line-clamp': props.maxLines,
};
} else {
return {};
}
});
watchEffect(() => {
if (showContentExpand.value) {
isContentExpand.value = false;
} else {
isContentExpand.value = true;
}
});
const changeTextOverflow = (b: boolean) => {
existTextOverflow.value = b;
};
/** 改变展开状态 */
const changeContentExpand = (b: boolean) => {
isContentExpand.value = b;
};
const calcOverflow = () => {
const infoValueEl = rootRef.value?.querySelectorAll('.info-value');
if (infoValueEl?.length) {
const result = Array.from(infoValueEl).some((el) => {
return el.clientHeight !== el.scrollHeight;
});
changeContentExpand(!result);
changeTextOverflow(result);
}
};
onMounted(() => {
calcOverflow();
});
watch(
() => props.tabIndex,
() => {
changeContentExpand(false);
changeTextOverflow(false);
nextTick(() => {
calcOverflow();
});
},
);
const handleToList = () => {
emit('to-list');
};
......@@ -187,10 +201,7 @@ const handleInitDetail = () => {
rgba(192, 50, 43, 0) 100%
);
}
.content-hidden {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
.content-show .info-value {
display: block;
}
</style>
......@@ -4,7 +4,12 @@
<div v-if="isLogin" class="">
<div v-if="isNoCount" class="flex items-center justify-center">
解锁额度已用完,可通过
<span class="mx-1 cursor-pointer font-bold text-[#C0322B]">提交选址需求</span>
<span
class="mx-1 cursor-pointer font-bold text-[#C0322B]"
@click="changeShowSelect(true)"
>
提交选址需求
</span>
<span class="mx-1 cursor-pointer font-bold text-[#C0322B]" @click="handleContactUs">
联系我们
......@@ -35,6 +40,16 @@
<div v-if="!isLogin" class="mt-10 px-5">
<img :src="currentExampleImg" />
</div>
<ElDialog
v-model="isShowSelectAddress"
width="318px"
append-to-body
class="select-address-dialog"
>
<div class="flex items-center justify-center">
<FormModal class="w-full border-none px-5" @confirm="changeShowSelect(false)"></FormModal>
</div>
</ElDialog>
</div>
</template>
......@@ -43,7 +58,7 @@ import { DetailType, ExampleType, UnlockType } from '@/types/enum.ts';
import exampleCarrierDetailImg from '@/assets/images/example__carrier-detail.png';
import examplePolicyImg from '@/assets/images/example__policy.png';
import exampleElementImg from '@/assets/images/example_element.png';
import { computed, watch } from 'vue';
import { computed, ref, watch } from 'vue';
import { useAppStore } from '@/stores/app.ts';
import { useRequest } from '@/composable/useRequest.ts';
import { RequestUrl } from '@/types/api.ts';
......@@ -51,6 +66,7 @@ import { useMessage } from '@/composable/useMessage.ts';
import { useJump } from '@/composable/useJump.ts';
import { RouteName } from '@/router/router.ts';
import { useLoginModal } from '../login/login.ts';
import FormModal from '../form-modal/FormModal.vue';
const props = withDefaults(
defineProps<{
......@@ -80,6 +96,8 @@ const { message } = useMessage();
const { open: showLogin } = useLoginModal();
const isShowSelectAddress = ref(false);
const { open: openPage } = useJump();
/** 额度用光 */
......@@ -139,4 +157,21 @@ const handleUnlock = async () => {
const handleContactUs = () => {
openPage(RouteName.contactUs);
};
const changeShowSelect = (b: boolean) => {
isShowSelectAddress.value = b;
};
</script>
<style lang="scss">
.select-address-dialog {
.el-dialog__header {
padding: 0;
}
.el-dialog__body {
padding: 0;
}
.el-select {
width: 100%;
}
}
</style>
......@@ -25,19 +25,25 @@
<!-- icon -->
<div class="flex items-center justify-between px-10 py-[30px]">
<StarIconCell
class="cursor-pointer"
type-name="产业园"
:count="detail.developmentCountVo!.parkCount"
icon="industrial"
@click="toList(RouteName.industrialParkList)"
></StarIconCell>
<StarIconCell
class="cursor-pointer"
type-name="载体"
:count="detail.developmentCountVo!.carrierCount"
icon="carrier"
@click="toList(RouteName.carrierList)"
></StarIconCell>
<StarIconCell
class="cursor-pointer"
type-name="土地"
:count="detail.developmentCountVo!.landCount"
icon="land"
@click="toList(RouteName.landList)"
></StarIconCell>
</div>
<DetailInfoCell
......@@ -85,6 +91,8 @@
import type { DevelopZoneDetailResp, StarInfo } from '@/types/api/developZoneDetail';
import { computed, ref } from 'vue';
// import CommonImage from '../common/CommonImage.vue';
import { RouteName } from '@/router/router.ts';
import { useJump } from '@/composable/useJump.ts';
import VideoList from './VideoList.vue';
import StarIconCell from './StarIconCell.vue';
import DetailInfoCell from './DetailInfoCell.vue';
......@@ -97,6 +105,8 @@ const props = withDefaults(
{},
);
const { open } = useJump();
/** 当前点击信息 */
const currentInfo = ref<null | StarInfo>(null);
/** 显示内容弹窗 */
......@@ -130,6 +140,17 @@ const handlePreviewInfo = (info: StarInfo) => {
currentInfo.value = info;
changeShowContent(true);
};
const toList = (name: RouteName) => {
open({
name,
query: {
searchParams: JSON.stringify({
developmentId: props.detail.id,
}),
},
});
};
</script>
<style lang="scss">
.star-content-dialog {
......
......@@ -21,8 +21,8 @@
/>
</span>
<span
v-else-if="item.key !== 'cityName' && item.key !== 'regionName'"
:key="item.key"
v-else-if="item.key === 'provinceName'"
:key="item.key!"
class="selected-item mb-1 mr-2.5 flex items-center px-2 py-1 leading-none"
>
区域:{{
......@@ -48,7 +48,11 @@
</div>
</div>
<template v-for="(filter, index) in filterList">
<div v-if="!filter.isAddress || filter.list.length" :key="index" class="flex flex-wrap">
<div
v-if="!filter.isAddress || getFilterList(filter).length"
:key="index"
class="flex flex-wrap"
>
<div
class="w-[100px] shrink-0 text-xs leading-9 text-black/[.65]"
:class="{ w80: isSmallView }"
......@@ -74,7 +78,7 @@
'spread-view': filter.isAddress && filter.showAll,
}"
>
<div v-for="(item, idx) in filter.list" :key="idx">
<div v-for="(item, idx) in getFilterList(filter)" :key="idx">
<div
class="filter-item cursor-pointer px-2 py-1 text-black/[.45]"
:class="{ selected: filter.value === item.dictValue }"
......@@ -128,7 +132,7 @@
</div>
<div
class="flex cursor-pointer items-center justify-center text-xs leading-9 text-[#4d4d4d]"
@click="changeIsSpread"
@click="changeIsSpread(!isSpread)"
>
<span>{{ isSpread ? '收起全部' : '展开全部' }}</span>
<img
......@@ -141,12 +145,13 @@
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, computed, watch } from 'vue';
import { ref, onMounted, computed, watch, watchEffect } from 'vue';
// import type { FilterListItem } from '@/types/common.ts';
import { filterStore } from '@/stores/filterEnum.ts';
import { defaultFiltersConfig } from '@/components/filter/config.ts';
import { isEmpty } from 'lodash-es';
import { useAddress } from '@/composable/useCity.ts';
import { useCity, type CityData } from '@/composable/useCity.ts';
import { useSearchParamsStore } from '@/stores/searchParams.ts';
const props = withDefaults(
defineProps<{
......@@ -159,43 +164,62 @@ const props = withDefaults(
},
);
const searchParamsStore = useSearchParamsStore();
// 展开收起状态
const isSpread = ref<boolean>(false);
function changeIsSpread() {
isSpread.value = !isSpread.value;
function changeIsSpread(b: boolean) {
isSpread.value = b;
}
const {
getProvinces,
getCity,
getRegion,
currentProvince,
currentCity,
// currentRegion,
currentRegion,
provinceList,
currentCityList,
currentRegionList,
} = useAddress();
findByName,
} = useCity();
// 筛选列表
const filterList = ref<FilterListItem[]>([]);
const filterList = ref<any[]>([]);
function handleFilterClick<T>(select: Ref<T>, filters: Ref<T>) {
/**
* 选中的条件修改时,更新当前选中的城市数据
*/
watchEffect(() => {
const provice = filterList.value.find(({ key }) => key === 'provinceName');
const city = filterList.value.find(({ key }) => key === 'cityName');
const region = filterList.value.find(({ key }) => key === 'regionName');
currentProvince.value = findByName(provice?.value, provinceList);
currentCity.value = findByName(city?.value, currentCityList.value);
currentRegion.value = findByName(region?.value, currentRegionList.value);
});
/**
* 存在条件值不为空时,展开全部条件
*/
watchEffect(() => {
const result = filterList.value.some(({ value }) => {
return !!value;
});
if (result) {
changeIsSpread(result);
}
});
function handleFilterClick(select: any, filters: any) {
console.log(select, filters);
filters.value = select.dictValue;
filters.valueLabel = select.dictLabel;
// 省市区选择
if (filters.key === 'provinceName') {
currentProvince.value = select;
// 获取当前市列表
currentCityList.value = getCity(select.index);
// 当前区列表置空
currentRegionList.value = [];
// 重置当前市区已选
filterList.value[1].value = '';
filterList.value[2].value = '';
}
if (filters.key === 'cityName') {
currentCity.value = select;
currentRegionList.value = getRegion(currentProvince.value.index, select.index);
// 重置当前区已选
filterList.value[2].value = '';
}
......@@ -203,28 +227,62 @@ function handleFilterClick<T>(select: Ref<T>, filters: Ref<T>) {
const store = filterStore();
let filterEnum: any = null;
onMounted(async () => {
filterList.value.push(
...[
{
...defaultFiltersConfig.province,
list: getProvinces(),
},
{
...defaultFiltersConfig.city,
list: currentCityList,
},
{
...defaultFiltersConfig.region,
list: currentRegionList,
},
],
);
/**
* 根所url参数,初始化值
*/
const handleInitValue = () => {
const { urlSearchParams } = searchParamsStore;
filterList.value.forEach((item) => {
Object.entries(urlSearchParams).forEach(([key, value]) => {
if (item.key === key && value) {
item.value = value;
item.valueLabel = value;
item.showAll = true;
}
});
});
};
/** 使城市数据对齐格式 */
const formatCityList = (list: CityData[]) => {
return list.map((item) => {
return {
...item,
dictLabel: item.name,
dictValue: item.name,
};
});
};
/**
* 初始化
*/
const init = async () => {
filterList.value = [
{
...defaultFiltersConfig.province,
list: formatCityList(provinceList),
},
{
...defaultFiltersConfig.city,
list: [],
},
{
...defaultFiltersConfig.region,
list: [],
},
];
filterEnum = await store.getFilterEnum();
props.filterKeyList.forEach((item) => {
const list = filterEnum[item];
filterList.value.push({ ...(defaultFiltersConfig as any)[item], list });
const current = { ...(defaultFiltersConfig as any)[item], list };
filterList.value.push(current);
});
handleInitValue();
};
onMounted(() => {
init();
});
// 处理输入
......@@ -265,11 +323,6 @@ function removeSelected(select: any, deleteAll = false) {
item.plugins.value2 = '';
}
}
if (select.isAddress) {
// 当前市区列表置空
currentCityList.value = [];
currentRegionList.value = [];
}
});
}
// 已选项
......@@ -302,54 +355,42 @@ function removeAll() {
for (const i of selected.value) {
removeSelected(i, true);
}
searchParamsStore.changeSearchName('');
}
// 点击【全部】
function selectAll(filter) {
function selectAll(filter: any) {
filter.value = '';
filter.valueLabel = '';
// 处理省市区
if (filter.key === 'provinceName') {
// 当前市区列表置空
currentCityList.value = [];
currentRegionList.value = [];
// 重置当前市区已选
filterList.value[1].value = '';
filterList.value[2].value = '';
}
if (filter.key === 'cityName') {
currentRegionList.value = [];
filterList.value[2].value = '';
}
}
/**
* 获取列表,城市数据需要单独提供
*/
const getFilterList = (filter: any) => {
if (filter.key === 'regionName') {
return formatCityList(currentRegionList.value);
}
if (filter.key === 'cityName') {
return formatCityList(currentCityList.value);
} else {
return filter.list;
}
};
// 监听筛选列表变化
watch(
() => props.filterKeyList,
() => {
// 当前市区列表置空
currentCityList.value = [];
currentRegionList.value = [];
filterList.value = [];
filterList.value.push(
...[
{
...defaultFiltersConfig.province,
list: getProvinces(),
},
{
...defaultFiltersConfig.city,
list: currentCityList,
},
{
...defaultFiltersConfig.region,
list: currentRegionList,
},
],
);
props.filterKeyList.forEach((item) => {
const list = filterEnum[item];
filterList.value.push({ ...(defaultFiltersConfig as any)[item], list });
});
init();
},
);
......
......@@ -21,6 +21,8 @@ import { isEmpty, debounce } from 'lodash-es';
import { useRequest } from '@/composable/useRequest.ts';
import { RequestUrl } from '@/types/api.ts';
const emit = defineEmits(['confirm']);
const { message } = useMessage();
const options = [
......@@ -80,6 +82,7 @@ const commit = debounce(
dataSource: 1,
};
message.success('提交成功');
emit('confirm');
} else {
message.error(msg as string);
}
......
......@@ -4,8 +4,12 @@
<div class="flex space-x-[10px]">
<div>
<ElSelect v-model="params.isSystem" placeholder="请选择来源方式">
<ElOption label="录入" :value="SourceType.input"></ElOption>
<ElOption label="完善" :value="SourceType.repair"></ElOption>
<ElOption
v-for="source of sourceList"
:key="source.dictCode"
:label="source.dictLabel"
:value="source.dictCode"
></ElOption>
</ElSelect>
</div>
<div>
......@@ -23,9 +27,12 @@
</div>
<div>
<ElSelect v-model="params.status" placeholder="请选择审批状态">
<ElOption label="审核通过" :value="AuthStatus.authed"></ElOption>
<ElOption label="审核拒绝" :value="AuthStatus.reject"></ElOption>
<ElOption label="待审核" :value="AuthStatus.waitAuth"></ElOption>
<ElOption
v-for="status of statusList"
:key="status.dictCode"
:label="status.dictLabel"
:value="status.dictCode"
></ElOption>
</ElSelect>
</div>
</div>
......@@ -80,10 +87,12 @@
import { useListView } from '@/composable/useListView.ts';
import { RouteName } from '@/router/router.ts';
import { RequestUrl } from '@/types/api.ts';
import { SourceType, type MyParkCondition, type MyParkItem } from '@/types/api/myParkList.ts';
import { AuthStatus, ParkItemType } from '@/types/enum.ts';
import { type MyParkCondition, type MyParkItem } from '@/types/api/myParkList.ts';
import { DictType, ParkItemType } from '@/types/enum.ts';
import { computed, ref } from 'vue';
import ListPagination from '@/components/list/ListPagination.vue';
import { useDict } from '@/composable/useDict.ts';
import type { Dict } from '@/types/common';
const props = withDefaults(
defineProps<{
......@@ -92,6 +101,8 @@ const props = withDefaults(
{},
);
const { dictResult } = useDict([DictType.myParkSource, DictType.myParkStatus]);
const params = ref({
time: '',
isSystem: '',
......@@ -99,6 +110,15 @@ const params = ref({
status: '',
});
/** 来源列表 */
const sourceList = computed<Dict[]>(() => {
return dictResult.value?.[DictType.myParkSource] || [];
});
/** 审批状态列表 */
const statusList = computed<Dict[]>(() => {
return dictResult.value?.[DictType.myParkStatus] || [];
});
const isDevelop = computed(() => {
return props.type === ParkItemType.develop;
});
......
import cityData from '@/utils/cities.json';
import { ref } from 'vue';
import { computed, ref } from 'vue';
export interface CityData {
value: string;
......@@ -11,67 +11,41 @@ export interface CityData {
/**
* 省市区数据
*/
export function useAddress() {
const cityList: CityData[] = cityData;
export function useCity() {
const provinceList: CityData[] = cityData;
const currentProvince = ref<CityData | null>(null);
const currentCity = ref<CityData | null>(null);
const currentRegion = ref<CityData | null>(null);
// 省列表
const AreaJson = cityData;
function getProvinces() {
const provinces = [];
for (let i = 0; i < AreaJson.length; i++) {
provinces.push({
dictLabel: AreaJson[i].name,
dictValue: AreaJson[i].name,
index: i,
});
}
return provinces;
}
function getCity(i: any) {
const cities: any[] = [];
const idx = i;
for (let index = 0; index < AreaJson[i].children.length; index++) {
cities.push({
dictLabel: AreaJson[idx].children[index].name,
dictValue: AreaJson[idx].children[index].name,
index,
});
}
return cities;
}
function getRegion(provinceIdx: number, cityIdx: number) {
const regions: any[] = [];
for (const item of AreaJson[provinceIdx].children[cityIdx].children) {
regions.push({
dictLabel: item.name,
dictValue: item.name,
});
}
return regions;
}
/**
* 当前省的市列表
*/
const currentCityList = ref<CityData[]>([]);
const currentCityList = computed(() => {
return currentProvince.value?.children || [];
});
/**
* 当前市的区列表
*/
const currentRegionList = ref<CityData[]>([]);
const currentRegionList = computed(() => {
return currentCity.value?.children || [];
});
const findByName = (name: string, list: CityData[]) => {
if (name) {
return list.find((item) => name === item.name) || null;
} else {
return null;
}
};
return {
cityList,
provinceList,
currentProvince,
currentCity,
currentRegion,
currentCityList,
currentRegionList,
getProvinces,
getCity,
getRegion,
findByName,
};
}
import type { DictType } from '@/types/enum.ts';
import { RequestUrl } from '@/types/api.ts';
import type { DictResp } from '@/types/common';
import { ref } from 'vue';
import { useRequest } from './useRequest.ts';
/** 字典请求 */
export function useDict(codes: DictType[]) {
const { request } = useRequest<DictResp>(RequestUrl.getListByCode, {
method: 'POST',
});
const dictResult = ref<DictResp | null>(null);
const init = async () => {
try {
const formData = new FormData();
formData.append('code', codes.join(','));
const { data } = await request(formData);
dictResult.value = data;
} catch (error) {
console.log(error);
}
};
init();
return {
dictResult,
};
}
......@@ -6,7 +6,7 @@ import { computed, ref, type ComputedRef } from 'vue';
/**
* 带tab的详情信息块
*/
export function useInfoTab<T>(getInfo: (item: T) => Info[], list: ComputedRef<ListInfo<T>[]>) {
export function useInfoTab<T>(getInfo: (item: T) => Info[][], list: ComputedRef<ListInfo<T>[]>) {
const index = ref(0);
const tabs = computed<InfoTab[]>(() => {
const result =
......@@ -20,9 +20,11 @@ export function useInfoTab<T>(getInfo: (item: T) => Info[], list: ComputedRef<Li
});
const infos = computed<Infos[]>(() => {
const result =
list.value.map(({ info }) => {
return info.map(getInfo);
}) || [];
list.value
.map(({ info }) => {
return info.map(getInfo);
})
.flat() || [];
return result;
});
......
......@@ -38,7 +38,7 @@ export function useListView<
const route = useRoute();
const datas = ref([]) as Ref<T[]>;
const searchParams = ref<C>(cloneDeep(urlSearchParams) || '');
const searchParams = ref<C>(cloneDeep(urlSearchParams) || {});
/** 名称 */
const currentName = ref(searchParams.value?.name || '');
......
......@@ -38,8 +38,7 @@ export const useAppStore = defineStore('user', () => {
};
const logout = () => {
userInfo.value = null;
cookie.remove('token');
changeToken('');
};
watch(token, (val) => {
......
import { defineStore } from 'pinia';
import { computed, readonly } from 'vue';
import { computed, readonly, ref } from 'vue';
import { useRoute } from 'vue-router';
/**
......@@ -13,8 +13,15 @@ export const useSearchParamsStore = defineStore('searchParams', () => {
});
/** url传递的搜索参数 */
const urlSearchParams = readonly(routeSearchParams.value);
const searchName = ref(urlSearchParams.name || '');
const changeSearchName = (name: string) => {
searchName.value = name;
};
return {
urlSearchParams,
searchName,
changeSearchName,
};
});
......@@ -51,4 +51,6 @@ export enum RequestUrl {
threadInfo = '/lyy/api/threadInfo/v1.0/save',
/** 产业分类查询 */
getCategory = '/lyy/treeInfo/tree',
/** 查询字典列表 */
getListByCode = '/lyy/api/sysDictData/listByCodes',
}
......@@ -185,4 +185,6 @@ export interface DevelopZoneDetailResp {
/** */
videourl: string;
}[];
/** 供电类型 */
powerSupplyType: string;
}
......@@ -107,4 +107,8 @@ export interface IndustrialParkDetailResp {
id: number;
/** 是否已解锁 */
isView: boolean;
/** 供电类型 */
powerSupplyType: string;
/** 污水处理类型 */
sewageWaterType: string;
}
......@@ -38,6 +38,8 @@ export interface IndustrialParkListCondition {
regionName?: string;
/** 认证状态 */
status?: AuthStatus;
/** 关联的开发区id */
developmentId?: string;
}
/**
......
......@@ -22,6 +22,8 @@ export interface LandListCondition {
regionCode: string;
/** */
regionName: string;
/** 关联的开发区id */
developmentId?: string;
}
/**
......
......@@ -150,4 +150,6 @@ export interface MyParkIndustrialDetailResp {
videourl: string;
}[];
type: string;
/** 污水处理类型 */
sewageWaterType: string;
}
......@@ -24,6 +24,8 @@ export interface MyParkCondition {
startCreateTime?: string;
/** 审批状态 */
status?: AuthStatus;
/** 关联的产业园id */
parkId?: string;
}
/**
......
import type { ListOrder } from './enum.ts';
import type { DictType, ListOrder } from './enum.ts';
/**
* 头部菜单项
......@@ -111,3 +111,26 @@ export interface UserInfo {
token: string;
userId: string;
}
/**
* 字典对象
*/
export interface Dict {
dictCode: string;
dictSort: string;
dictLabel: string;
dictValue: string;
dictType: string;
isDefault: string;
status: string;
createBy: string;
createTime: string;
updateBy: string;
}
/**
* 字典请求返回值
*/
export type DictResp = {
[index in DictType]?: Dict[];
};
......@@ -87,3 +87,10 @@ export enum UnlockType {
/** 载体 */
carrier = 4,
}
export enum DictType {
/** 我的园区,来源方式 */
myParkSource = 'lyy_info_source',
/** 我的园区,审批状态 */
myParkStatus = 'lyy_developmentinfo_status',
}
......@@ -77,6 +77,7 @@ const { joinRequired } = useJoinRequired(
return null;
}
}),
true,
);
const { open } = useJump();
......
......@@ -30,12 +30,20 @@
<DetailInfoCell :infos="elementCost" title="要素成本">
<DetailInfo :infos="elementCost"></DetailInfo>
</DetailInfoCell>
<DetailInfoCell :infos="importantEnterprise[importantEnterpriseIndex]" title="重点企业">
<DetailInfoCell
:infos="importantEnterprise[importantEnterpriseIndex]"
:tab-index="importantEnterpriseIndex"
title="重点企业"
>
<DetailInfoTab v-model="importantEnterpriseIndex" :tabs="importantEnterpriseTabs">
<DetailInfo :infos="importantEnterprise[importantEnterpriseIndex]"></DetailInfo>
</DetailInfoTab>
</DetailInfoCell>
<DetailInfoCell :infos="industryPolicy[industryPolicyIndex]" title="产业政策">
<DetailInfoCell
:infos="industryPolicy[industryPolicyIndex]"
:tab-index="industryPolicyIndex"
title="产业政策"
>
<DetailInfoTab v-model="industryPolicyIndex" :tabs="industryPolicyTabs">
<DetailInfo :infos="industryPolicy[industryPolicyIndex]"></DetailInfo>
</DetailInfoTab>
......@@ -120,14 +128,16 @@ const [importantEnterpriseIndex, importantEnterpriseTabs, importantEnterprise] =
useInfoTab<Enterprise>(
({ enterpriseName, track }) => {
return [
{
name: '企业名称',
value: enterpriseName,
},
{
name: '所属赛道',
value: track,
},
[
{
name: '企业名称',
value: enterpriseName,
},
{
name: '所属赛道',
value: track,
},
],
];
},
computed(() => detail.value?.enterpriseList || []),
......@@ -137,14 +147,22 @@ const [importantEnterpriseIndex, importantEnterpriseTabs, importantEnterprise] =
const [industryPolicyIndex, industryPolicyTabs, industryPolicy] = useInfoTab<Policy>(
({ name, content }) => {
return [
{
name: '政策名称',
value: name,
},
{
name: '政策内容',
value: content,
},
[
{
name: '政策名称',
value: name,
customClass: 'ell3',
oneline: true,
},
],
[
{
name: '政策内容',
value: content,
customClass: 'ell3',
oneline: true,
},
],
];
},
computed(() => detail.value?.policyList || []),
......@@ -167,6 +185,8 @@ const elementCost = computed(() => {
substationLevel,
sewageWaterPrice,
heatingPrice,
powerSupplyType,
sewageWaterType,
} = detail.value;
const result: Infos = [
[
......@@ -185,7 +205,7 @@ const elementCost = computed(() => {
{
name: '工业用电',
value: industrialElectricity,
unit: '元/㎡/天',
unit: `元/㎡/天${powerSupplyType ? `(${powerSupplyType})` : ''}`,
},
{
name: '变电站级别',
......@@ -199,7 +219,7 @@ const elementCost = computed(() => {
unit: '元/吨',
},
{
name: '污水处理价格',
name: `污水处理价格${sewageWaterType ? `(${sewageWaterType})` : ''}`,
value: sewageWaterPrice,
unit: '元/吨',
},
......@@ -303,11 +323,25 @@ const isStar = computed(() => {
});
const toIndustrialList = () => {
open(RouteName.industrialParkList);
open({
name: RouteName.industrialParkList,
query: {
searchParams: JSON.stringify({
developmentId: detail.value!.id,
}),
},
});
};
const toLandList = () => {
open(RouteName.landList);
open({
name: RouteName.landList,
query: {
searchParams: JSON.stringify({
developmentId: detail.value!.id,
}),
},
});
};
const toIndustrialDetail = ({ id }: { id: string | number }) => {
......
......@@ -54,7 +54,11 @@
</div>
</div>
</DetailInfoCell>
<DetailInfoCell :infos="industryPolicy[industryPolicyIndex]" title="产业政策">
<DetailInfoCell
:infos="industryPolicy[industryPolicyIndex]"
:tab-index="industryPolicyIndex"
title="产业政策"
>
<DetailInfoTab v-model="industryPolicyIndex" :tabs="industryPolicyTabs">
<DetailInfo :infos="industryPolicy[industryPolicyIndex]"></DetailInfo>
</DetailInfoTab>
......@@ -132,14 +136,22 @@ const { joinRequired } = useJoinRequired<IndustrialParkDetailResp>(computed(() =
const [industryPolicyIndex, industryPolicyTabs, industryPolicy] = useInfoTab<Policy>(
({ name, content }) => {
return [
{
name: '政策名称',
value: name,
},
{
name: '政策内容',
value: content,
},
[
{
name: '政策名称',
value: name,
customClass: 'ell3',
oneline: true,
},
],
[
{
name: '政策内容',
value: content,
customClass: 'ell3',
oneline: true,
},
],
];
},
computed(() => detail.value?.parkPolicy || []),
......@@ -161,6 +173,8 @@ const elementCost = computed(() => {
lifeSewagePrice,
nresidentsHeating,
steam,
powerSupplyType,
sewageWaterType,
} = detail.value;
const result: Infos = [
[
......@@ -184,7 +198,7 @@ const elementCost = computed(() => {
{
name: '工业用电',
value: electricityPrice,
unit: '元/度',
unit: `元/度${powerSupplyType ? `(${powerSupplyType})` : ''}`,
},
],
[
......@@ -200,7 +214,7 @@ const elementCost = computed(() => {
],
[
{
name: '污水处理价格',
name: `污水处理价格${sewageWaterType ? `(${sewageWaterType})` : ''}`,
value: lifeSewagePrice,
unit: '元/吨',
},
......@@ -257,7 +271,14 @@ const carriers = computed<MiniDetail[]>(() => {
});
const toCarrierList = () => {
open(RouteName.carrierList);
open({
name: RouteName.carrierList,
query: {
searchParams: JSON.stringify({
parkId: detail.value!.id,
}),
},
});
};
/**
......
......@@ -47,7 +47,11 @@
<DetailInfo :infos="handleInfos(industryBase)"></DetailInfo>
</DetailInfoCell>
<DetailInfoCell title="重点企业" :show-title-icon="false">
<DetailInfoCell
title="重点企业"
:show-title-icon="false"
:tab-index="importantEnterpriseIndex"
>
<DetailInfoTab v-model="importantEnterpriseIndex" :tabs="importantEnterpriseTabs">
<DetailInfo
:infos="handleInfos(importantEnterprise[importantEnterpriseIndex])"
......@@ -333,7 +337,7 @@ const elementCost = computed(() => {
{
name: '工业用电',
value: industrialElectricity,
unit: '元/度',
unit: `元/度${powerSupplyType ? `(${powerSupplyType})` : ''}`,
},
],
[
......@@ -359,7 +363,7 @@ const elementCost = computed(() => {
],
[
{
name: '污水处理价格',
name: `污水处理价格${sewageWaterType ? `(${sewageWaterType})` : ''}`,
value: sewageWaterPrice,
unit: '元/吨',
},
......@@ -483,14 +487,16 @@ const [importantEnterpriseIndex, importantEnterpriseTabs, importantEnterprise] =
useInfoTab<Enterprise>(
({ enterpriseName, track }) => {
return [
{
name: '企业名称',
value: enterpriseName,
},
{
name: '所属赛道',
value: track,
},
[
{
name: '企业名称',
value: enterpriseName,
},
{
name: '所属赛道',
value: track,
},
],
];
},
computed(() => detail.value?.enterpriseList || []),
......
......@@ -317,6 +317,7 @@ const elementCost = computed(() => {
sewagePrice,
powerSupplyType,
sewageLevel,
sewageWaterType,
} = detail.value;
const result: Infos = [
[
......@@ -342,7 +343,7 @@ const elementCost = computed(() => {
{
name: '工业用电单价',
value: electricityPrice,
unit: '元/度',
unit: `元/度${powerSupplyType ? `(${powerSupplyType})` : ''}`,
},
{
name: '供电类型',
......@@ -362,7 +363,7 @@ const elementCost = computed(() => {
],
[
{
name: '污水处理价格',
name: `污水处理价格${sewageWaterType ? `(${sewageWaterType})` : ''}`,
value: sewagePrice,
unit: '元/吨',
},
......
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