Commit b426ac7a authored by shilei's avatar shilei

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

parents 265ca02c a8f5d558
......@@ -255,7 +255,6 @@ const handleCityClick = (cityName: string) => {
return item.name.replace(/\s+/g, '').indexOf(cityName) > -1;
});
const jump = (params: RouteLocationRaw) => {
openPage(params);
router.replace(params);
};
if (cityInFilter.length) {
......
......@@ -45,6 +45,7 @@ export interface Info {
isFile?: boolean;
/** 文件名 */
fileName?: string;
format?: (value: any) => string;
}
export type Infos = Info[][] | [];
withDefaults(
......@@ -57,8 +58,8 @@ withDefaults(
);
const handleValue = (col: Info) => {
const { value, unit = '' } = col;
return haveValue(value) ? formatNumber(value) + unit : '--';
const { value, unit = '', format = formatNumber } = col;
return haveValue(value) ? format(value) + unit : '--';
};
const getValueClass = (col: Info, line: Info[]) => {
......
......@@ -55,13 +55,17 @@
</div>
</div>
<div v-if="area" class="mt-[13px] flex items-center">
<div class="flex h-[38px] items-center font-yahei text-xs leading-5 text-[#4D4D4D]">
<div
class="flex h-[38px] flex-none items-center font-yahei text-xs leading-5 text-[#4D4D4D]"
>
所属地区
</div>
<div class="ml-[30px] font-yahei text-xs leading-5 text-[#1A1A1A]">{{ area }}</div>
</div>
<div v-if="detail.address" class="mt-2 flex items-center">
<div class="flex h-[38px] items-center font-yahei text-xs leading-5 text-[#4D4D4D]">
<div
class="flex h-[38px] flex-none items-center font-yahei text-xs leading-5 text-[#4D4D4D]"
>
详细地址
</div>
<div class="ml-[30px] font-yahei text-xs leading-5 text-[#1A1A1A]">
......
<template>
<div class="login-panel text-sm">
<div class="login-panel text-sm" tabindex="0">
<div class="mb-2.5 mr-[-13px] flex justify-end">
<img
class="h-4 w-4 cursor-pointer"
......@@ -18,7 +18,6 @@
v-model="phoneNum"
class="phone-input"
type="number"
maxlength="11"
placeholder="请输入手机号"
@blur="verify('phone')"
></ElInput>
......@@ -63,7 +62,6 @@
v-model="phoneNum"
class="phone-input"
type="number"
maxlength="11"
placeholder="请输入手机号"
@blur="verify('phone')"
/>
......@@ -107,7 +105,6 @@
v-model="phoneNum"
class="phone-input"
type="number"
maxlength="11"
placeholder="请输入手机号"
@blur="verify('phone')"
></ElInput>
......@@ -158,7 +155,6 @@
<ElInput
v-model="phoneNum"
class="phone-input"
maxlength="11"
type="number"
placeholder="请输入手机号"
@blur="verify('phone')"
......@@ -214,7 +210,7 @@ import { useLoginModal } from './login.ts';
const appStore = useAppStore();
// const emit = defineEmits(['close']);
const phoneNum = ref<number | null>();
const phoneNum = ref<string | null>('');
const verifyCode = ref<number | null>();
const errorMsg = ref<string | null>();
const password = ref<string | null>(null);
......@@ -252,6 +248,17 @@ watch(
},
);
/** type number的maxlength无效,在此限制位数 */
watch(phoneNum, (val, oldVal) => {
if (val && val?.length > 11) {
if (oldVal?.length === 11) {
phoneNum.value = oldVal;
} else {
phoneNum.value = val.substring(0, 11);
}
}
});
let requestFn: any = null;
const request = (url: any) => {
......
import type { Infos } from '@/components/detail/DetailInfo.vue';
import { computed, type ComputedRef } from 'vue';
import { identity } from 'lodash-es';
export interface JoinRequiredParams {
[index: string]: any;
......@@ -81,6 +82,7 @@ export function useJoinRequired<T extends JoinRequiredParams>(
name: '建设周期',
value: buildingPeriod,
unit: '月',
format: identity,
},
{
name: '能评要求',
......
import { useQueryList } from '@/composable/useQueryList.ts';
import { ref, type Ref, watchEffect, nextTick, type ShallowRef, computed } from 'vue';
import { ref, type Ref, watchEffect, type ShallowRef, computed } from 'vue';
import { RequestUrl } from '@/types/api.ts';
import type { CommonListResp, CommonListParams } from '@/types/common';
import { RouteName } from '@/router/router.ts';
......@@ -78,13 +78,7 @@ export function useListView<
const callQuery = async () => {
try {
changeIsRequesting(true);
const { data, code } = await queryList(
{
...searchParams.value,
...otherParams.value,
} || {},
getCurrentUrl(),
);
const { data, code } = await queryList(currentParams.value, getCurrentUrl());
handleUrlClear();
datas.value = data.records;
handleNoAuth(code);
......@@ -128,11 +122,8 @@ export function useListView<
* 名称搜索
*/
const handleNameSearch = (params: { name: string }) => {
nextTick(() => {
if (searchParamsStore.searchName !== params.name) {
initPagination();
}
});
searchParams.value.name = params.name;
initPagination();
};
onBeforeRouteLeave(() => {
......
......@@ -2,8 +2,6 @@ import { createRouter, createWebHashHistory } from 'vue-router';
import type { RouteRecordRaw } from 'vue-router';
/** 首页 */
import HomeView from '@/views/home/HomeView.vue';
/** 登录页 */
import LoginView from '@/views/user/LoginView.vue';
/** 产业园 */
const IndustrialParkList = () => import('@/views/industrial-park/IndustrialParkList.vue');
......@@ -108,10 +106,6 @@ const routes: readonly RouteRecordRaw[] = [
menuName: '首页',
},
},
{
...gen(RouteName.login),
component: LoginView,
},
{
...gen(RouteName.userCenter),
component: UserCenter,
......
......@@ -55,14 +55,23 @@
>
找产业分类
</span>
<span style="cursor: default">找产业政策</span>
<span
:class="{ active: searchType === 'policy' }"
@click="changeSearchType('policy', '356px', '产业政策')"
>
找产业政策
</span>
<i class="absolute" :style="{ left: searchArrowLeft }"></i>
</div>
<!-- 搜索框 -->
<div
class="search-box mt-5 flex w-[400px] items-center justify-between overflow-hidden rounded bg-white"
>
<ElInput v-model="searchKey" :placeholder="placeholderText"></ElInput>
<ElInput
v-model="searchKey"
:placeholder="placeholderText"
@keyup.enter="toList"
></ElInput>
<div
class="flex h-[48px] w-[70px] cursor-pointer items-center justify-center bg-[#c0322b]"
@click="toList"
......@@ -250,6 +259,9 @@ const toList = () => {
case 'category':
name = RouteName.industryCategory;
break;
case 'policy':
name = RouteName.industryPolicy;
break;
default:
break;
}
......@@ -259,11 +271,20 @@ const toList = () => {
['provinceName', selectedCity.value],
].filter(([, v]) => !!v),
);
const query: any = {};
// 产业分类
if (name === RouteName.industryCategory) {
if (searchParams.name) {
query.category = searchParams.name;
}
Reflect.deleteProperty(searchParams, 'name');
}
query.searchParams = !isEmpty(searchParams) ? JSON.stringify(searchParams) : undefined;
open({
name,
query: {
searchParams: !isEmpty(searchParams) ? JSON.stringify(searchParams) : undefined,
},
query,
});
};
......
......@@ -114,6 +114,7 @@ import CarrierListItemView from '@/components/list/list-carrier-item.vue';
import LandListItemView from '@/components/list/list-land-item.vue';
import ParkItem from '@/components/list/ParkItem.vue';
import FilterView from '@/components/filter/filter-view.vue';
import { useRoute } from 'vue-router';
type tabItem = {
name: string;
......@@ -122,8 +123,15 @@ type tabItem = {
apiURL: RequestUrl;
};
const searchKey = ref<string>('');
const keyWords = ref<string>('');
const route = useRoute();
/** 初始的分类值 */
const getInitCategory = () => {
return (route.query.category as string) || '';
};
const searchKey = ref<string>(getInitCategory());
const keyWords = ref<string>(searchKey.value);
/** 更改target 不会触发响应式更新 */
const currentUrl = shallowRef({ target: RequestUrl.developZoneList });
const directionList = ref<any[]>([]);
......
<!-- 登录页 -->
<template>
<div>登录页</div>
</template>
<script lang="ts" setup></script>
......@@ -137,6 +137,7 @@ import { useJump } from '@/composable/useJump.ts';
import { RouteName } from '@/router/router.ts';
import { useIndustryBase } from '@/composable/useIndustryBase.ts';
import { handleNoAuth } from '@/utils/tools.ts';
import { identity } from 'lodash-es';
const { detail, initDetail } = useDetail<MyParkDevelopDetailResp>(RequestUrl.myParkDevelopDetail);
const { router } = useJump();
......@@ -271,6 +272,7 @@ const joinRequired = computed(() => {
name: '建设周期',
value: buildingPeriod,
unit: '月',
format: identity,
},
{
name: '能评要求',
......
......@@ -139,6 +139,7 @@ import { useJump } from '@/composable/useJump.ts';
import { RouteName } from '@/router/router.ts';
import { useIndustryBase } from '@/composable/useIndustryBase.ts';
import { handleNoAuth } from '@/utils/tools.ts';
import { identity } from 'lodash-es';
const { detail, initDetail } = useDetail<MyParkIndustrialDetailResp>(
RequestUrl.myParkIndustrialDetail,
......@@ -296,6 +297,7 @@ const joinRequired = computed(() => {
name: '建设周期',
value: buildingPeriod,
unit: '月',
format: identity,
},
{
name: '其他入驻要求',
......
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