Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pptist
Project
Project
Details
Activity
Releases
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
viitto
pptist
Commits
aab9e5c0
Commit
aab9e5c0
authored
Aug 16, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
系统资料查询接口
parent
4a55fc75
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
10 deletions
+52
-10
SpiderService.ts
src/services/SpiderService.ts
+8
-0
SourceListIsp.vue
src/views/components/source/SourceListIsp.vue
+44
-10
No files found.
src/services/SpiderService.ts
View file @
aab9e5c0
...
...
@@ -2,6 +2,14 @@ import Api,{ HttpResponse, Result } from './../utils/request';
class
SpiderService
{
static
async
GetDmcSourcePage
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"hotel_post_GetDmcSourcePage"
,
params
)
}
static
async
GetDiningUseType
():
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"dining_get_GetDiningUseType"
,{})
}
static
async
GetDiningPriceType
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"dining_get_GetDiningPriceType"
,
params
)
}
...
...
src/views/components/source/SourceListIsp.vue
View file @
aab9e5c0
...
...
@@ -30,8 +30,8 @@
</
template
>
</el-dropdown>
<el-dropdown
style=
"margin-left: -1px;"
trigger=
"click"
>
<el-button
type=
"default"
class=
"ppt-button text-white"
style=
"background: #000;border-radius: 0;padding: 8px;
width:81px;
"
>
<el-button
type=
"default"
class=
"ppt-button text-white
selectWidth
"
style=
"background: #000;border-radius: 0;padding: 8px;"
>
<div
class=
"row items-center"
>
<span
class=
"col"
style=
"margin-top: 2px; text-align: left;"
>
{{ currentMatchType }}
</span>
<IconDown
class=
"q-ml-sm"
:size=
"16"
/>
...
...
@@ -46,9 +46,9 @@
</el-dropdown-menu>
</
template
>
</el-dropdown>
<el-select
style=
"margin-left: -1px;"
<el-select
class=
"selectWidth"
style=
"margin-left: -1px;"
:style=
"{'max-width':searchParmeters.type==2?'':''}"
:class=
"[searchParmeters.type==2?'':'
col
']"
:class=
"[searchParmeters.type==2?'':'']"
@
change=
"handleChangeTypeOrPlatform(searchParmeters.Province,2)"
v-model=
"searchParmeters.Province"
filterable
...
...
@@ -61,10 +61,24 @@
:value=
"item.ID"
/>
</el-select>
<el-select
class=
"selectWidth"
style=
"margin-left: -1px;"
@
change=
"handleChangeTypeOrPlatform(searchParmeters.Province,5)"
v-model=
"searchParmeters.UseType"
multiple
filterable
placeholder=
"适用类型"
clearable
>
<el-option
v-for=
"item in ApplicableTypeList"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
/>
</el-select>
<
template
v-if=
"searchParmeters.type==2"
>
<el-dropdown
style=
"margin-left: -1px;"
trigger=
"click"
>
<el-button
type=
"default"
class=
"ppt-button text-white"
style=
"background: #000;border-radius: 0;padding: 8px;
width:81px;
"
>
<el-button
type=
"default"
class=
"ppt-button text-white
selectWidth
"
style=
"background: #000;border-radius: 0;padding: 8px;"
>
<div
class=
"row items-center"
>
<span
class=
"col"
style=
"margin-top: 2px; text-align: left;"
>
{{
currentDiningType
}}
</span>
<IconDown
class=
"q-ml-sm"
:size=
"16"
/>
...
...
@@ -80,8 +94,8 @@
</
template
>
</el-dropdown>
<el-dropdown
style=
"margin-left: -1px;"
trigger=
"click"
>
<el-button
type=
"default"
class=
"ppt-button text-white"
style=
"background: #000;border-radius: 0;padding: 8px;
width:81px;
"
>
<el-button
type=
"default"
class=
"ppt-button text-white
selectWidth
"
style=
"background: #000;border-radius: 0;padding: 8px;"
>
<div
class=
"row items-center"
>
<span
class=
"col"
style=
"margin-top: 2px; text-align: left;"
>
{{ currentDiningPriceType }}
</span>
<IconDown
class=
"q-ml-sm"
:size=
"16"
/>
...
...
@@ -154,6 +168,7 @@ const searchParmeters = reactive({
Province
:
0
,
DiningType
:
0
,
DiningPriceType
:
0
,
UseType
:
null
})
const
platforms
=
ref
<
{
id
:
number
,
name
:
string
}[]
>
([
...
...
@@ -169,6 +184,7 @@ const allTypes = ref<{ id: number, name: string }[]>([
const
CityList
=
ref
([])
const
DiningTypeList
=
ref
([])
const
DiningPriceTypeList
=
ref
([])
const
ApplicableTypeList
=
ref
([])
if
(
!
userInfo
.
isp
){
platforms
.
value
.
splice
(
0
,
1
)
searchParmeters
.
platform
=
1
...
...
@@ -248,7 +264,19 @@ const getDiningPricesType = async () =>{
DiningPriceTypeList
.
value
.
unshift
(
obj
)
}
}
const
handleChangeTypeOrPlatform
=
(
id
:
number
,
t
:
0
|
1
|
2
|
3
|
4
)
=>
{
const
getDiningUseType
=
async
()
=>
{
const
response
=
await
SpiderService
.
GetDiningUseType
({})
if
(
response
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
DiningPriceTypeList
.
value
=
response
.
data
.
data
let
obj
=
{
ID
:
0
,
Name
:
'不限'
}
ApplicableTypeList
.
value
.
unshift
(
obj
)
}
}
const
handleChangeTypeOrPlatform
=
(
id
:
number
,
t
:
0
|
1
|
2
|
3
|
4
|
5
)
=>
{
if
(
t
==
0
)
searchParmeters
.
platform
=
id
else
if
(
t
==
2
){
searchParmeters
.
Province
=
id
...
...
@@ -256,6 +284,8 @@ const handleChangeTypeOrPlatform = (id: number, t: 0 | 1 | 2 | 3 | 4) => {
searchParmeters
.
DiningType
=
id
}
else
if
(
t
==
4
){
searchParmeters
.
DiningPriceType
=
id
}
else
if
(
t
==
5
){
}
else
searchParmeters
.
type
=
id
searchParmeters
.
pageIndex
=
1
handleSearch
()
...
...
@@ -269,7 +299,7 @@ const handleSearch = async () => {
loading
.
value
=
true
total
.
value
=
0
data
.
value
=
[]
const
response
=
await
SpiderService
.
Get
SourcesAsync
(
searchParmeters
)
const
response
=
await
SpiderService
.
Get
DmcSourcePage
(
searchParmeters
)
if
(
response
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
data
.
value
=
response
.
data
.
data
.
pageData
total
.
value
=
response
.
data
.
data
.
count
...
...
@@ -285,6 +315,7 @@ handleSearch()
getProvince
()
getDiningsType
()
getDiningPricesType
()
getDiningUseType
()
</
script
>
<
style
scoped
>
...
...
@@ -355,4 +386,7 @@ getDiningPricesType()
padding
:
8px
;
background
:
linear-gradient
(
rgba
(
0
,
0
,
0
,
0
),
rgba
(
0
,
0
,
0
,
0.5
));
}
.selectWidth
{
min-width
:
70px
;
}
</
style
>
\ No newline at end of file
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