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
967aafbf
Commit
967aafbf
authored
Dec 15, 2023
by
王玉鑫
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 首页产业政策查询跳转
parent
e6468ea8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
useListView.ts
src/composable/useListView.ts
+2
-2
HomeView.vue
src/views/home/HomeView.vue
+9
-1
IndustryPolicy.vue
src/views/industry/IndustryPolicy.vue
+2
-1
No files found.
src/composable/useListView.ts
View file @
967aafbf
...
...
@@ -14,7 +14,7 @@ type CurrentUrl = RequestUrl | ShallowRef<{ target: RequestUrl }>;
export
function
useListView
<
T
extends
{
id
:
number
;
[
index
:
string
]:
any
},
C
extends
Record
<
any
,
any
>
&
{
name
?:
string
},
>
(
url
:
CurrentUrl
,
specialParams
:
Ref
<
Record
<
string
,
any
>>
=
{}
as
any
)
{
>
(
url
:
CurrentUrl
,
specialParams
:
Ref
<
Record
<
string
,
any
>>
=
{}
as
any
,
nameField
=
'name'
)
{
const
{
open
,
router
}
=
useJump
();
const
getCurrentUrl
=
()
=>
{
if
(
typeof
url
===
'string'
)
{
...
...
@@ -46,7 +46,7 @@ export function useListView<
const
{
searchName
}
=
searchParamsStore
;
return
{
...
specialParams
.
value
,
...(
searchName
?
{
name
:
searchName
}
:
{}),
...(
searchName
?
{
[
nameField
]
:
searchName
}
:
{}),
};
});
...
...
src/views/home/HomeView.vue
View file @
967aafbf
...
...
@@ -55,7 +55,12 @@
>
找产业分类
</span>
<span
style=
"cursor: default"
>
找产业政策
</span>
<span
:class=
"
{ active: searchType === 'policy' }"
@click="changeSearchType('policy', '356px', '产业政策')"
>
找产业政策
</span>
<i
class=
"absolute"
:style=
"
{ left: searchArrowLeft }">
</i>
</div>
<!-- 搜索框 -->
...
...
@@ -250,6 +255,9 @@ const toList = () => {
case
'category'
:
name
=
RouteName
.
industryCategory
;
break
;
case
'policy'
:
name
=
RouteName
.
industryPolicy
;
break
;
default
:
break
;
}
...
...
src/views/industry/IndustryPolicy.vue
View file @
967aafbf
...
...
@@ -36,11 +36,12 @@ 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
{
ref
}
from
'vue'
;
const
{
pageNum
,
pageSize
,
totalCount
,
datas
,
handleDetail
,
handleNameSearch
}
=
useListView
<
PolicyListItem
,
PolicyListCondition
>
(
RequestUrl
.
policyList
);
>
(
RequestUrl
.
policyList
,
ref
({}),
'title'
);
</
script
>
<
style
lang=
"scss"
scoped
>
.title-bottom-bg
{
...
...
王玉鑫
@wangyuxin
mentioned in commit
1c3709a7
·
Dec 15, 2023
mentioned in commit
1c3709a7
mentioned in commit 1c3709a7a641d0bd70015fabf42b215eeaa46eeb
Toggle commit list
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