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
b426ac7a
Commit
b426ac7a
authored
Dec 15, 2023
by
shilei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://101.201.78.203/cfld-front/liyeyun
into dev
parents
265ca02c
a8f5d558
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
68 additions
and
43 deletions
+68
-43
CommonHeader.vue
src/components/common/CommonHeader.vue
+0
-1
DetailInfo.vue
src/components/detail/DetailInfo.vue
+3
-2
DetailMain.vue
src/components/detail/DetailMain.vue
+6
-2
LoginView.vue
src/components/login/LoginView.vue
+13
-6
useJoinRequired.ts
src/composable/useJoinRequired.ts
+2
-0
useListView.ts
src/composable/useListView.ts
+4
-13
router.ts
src/router/router.ts
+0
-6
HomeView.vue
src/views/home/HomeView.vue
+26
-5
IndustryCategory.vue
src/views/industry/IndustryCategory.vue
+10
-2
LoginView.vue
src/views/user/LoginView.vue
+0
-6
MyDevelopDetail.vue
src/views/user/MyDevelopDetail.vue
+2
-0
MyIndustrialDetail.vue
src/views/user/MyIndustrialDetail.vue
+2
-0
No files found.
src/components/common/CommonHeader.vue
View file @
b426ac7a
...
...
@@ -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
)
{
...
...
src/components/detail/DetailInfo.vue
View file @
b426ac7a
...
...
@@ -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
)
?
format
Number
(
value
)
+
unit
:
'--'
;
const
{
value
,
unit
=
''
,
format
=
formatNumber
}
=
col
;
return
haveValue
(
value
)
?
format
(
value
)
+
unit
:
'--'
;
};
const
getValueClass
=
(
col
:
Info
,
line
:
Info
[])
=>
{
...
...
src/components/detail/DetailMain.vue
View file @
b426ac7a
...
...
@@ -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]"
>
...
...
src/components/login/LoginView.vue
View file @
b426ac7a
<
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
)
=>
{
...
...
src/composable/useJoinRequired.ts
View file @
b426ac7a
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
:
'能评要求'
,
...
...
src/composable/useListView.ts
View file @
b426ac7a
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
(()
=>
{
...
...
src/router/router.ts
View file @
b426ac7a
...
...
@@ -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
,
...
...
src/views/home/HomeView.vue
View file @
b426ac7a
...
...
@@ -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
,
});
};
...
...
src/views/industry/IndustryCategory.vue
View file @
b426ac7a
...
...
@@ -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
[]
>
([]);
...
...
src/views/user/LoginView.vue
deleted
100644 → 0
View file @
265ca02c
<!-- 登录页 -->
<
template
>
<div>
登录页
</div>
</
template
>
<
script
lang=
"ts"
setup
></
script
>
src/views/user/MyDevelopDetail.vue
View file @
b426ac7a
...
...
@@ -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
:
'能评要求'
,
...
...
src/views/user/MyIndustrialDetail.vue
View file @
b426ac7a
...
...
@@ -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
:
'其他入驻要求'
,
...
...
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