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
9f37fb84
Commit
9f37fb84
authored
Aug 16, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
适用类型
parent
c1ffd23e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
23 deletions
+51
-23
SourceListIsp.vue
src/views/components/source/SourceListIsp.vue
+51
-23
No files found.
src/views/components/source/SourceListIsp.vue
View file @
9f37fb84
...
...
@@ -46,9 +46,9 @@
</el-dropdown-menu>
</
template
>
</el-dropdown>
<el-select
class=
"
selectWidth
"
style=
"margin-left: -1px;"
<el-select
class=
""
style=
"margin-left: -1px;"
:style=
"{'max-width':searchParmeters.type==2?'':''}"
:class=
"[searchParmeters.type==2?'
':'
']"
:class=
"[searchParmeters.type==2?'
selectWidth':'col
']"
@
change=
"handleChangeTypeOrPlatform(searchParmeters.Province,2)"
v-model=
"searchParmeters.Province"
filterable
...
...
@@ -61,21 +61,25 @@
: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 selectWidth"
style=
"background: #000;border-radius: 0;padding: 8px;"
>
<div
class=
"row items-center"
>
<span
class=
"col"
style=
"margin-top: 2px; text-align: left;"
>
{{
currentUseType
}}
</span>
<IconDown
class=
"q-ml-sm"
:size=
"16"
/>
</div>
</el-button>
<template
#
dropdown
>
<el-dropdown-menu>
<el-dropdown-item
v-for=
"(x, i) in ApplicableTypeList"
@
click=
"handleChangeTypeOrPlatform(x.ID, 5)"
:key=
"i"
:style=
"
{'font-weight':searchParmeters.UseType.indexOf(x.ID)!=-1?'600':'',
'color':searchParmeters.UseType.indexOf(x.ID)!=-1?'#564bec':'',}">
{{
x
.
Name
}}
</el-dropdown-item>
</el-dropdown-menu>
</
template
>
</el-dropdown>
<el-dropdown
style=
"margin-left: -1px;"
trigger=
"click"
>
<el-button
type=
"default"
class=
"ppt-button text-white selectWidth"
style=
"background: #000;border-radius: 0;padding: 8px;"
>
...
...
@@ -125,7 +129,7 @@
size=
"mini"
class=
"text-bold UseTypeTitle"
>
{{ getTypeName(x.Type, 1)
}}
</el-tag>
<
template
v-if=
"x.UseTypeList&&x.UseTypeList.length>0"
>
<el-tag
type=
"info
"
size=
"mini"
class=
"text-bold UseTypeTitle"
v-for=
"(item,index) in x.UseTypeList"
>
<el-tag
:type=
"index==0?'danger':index==1?'warning':index==2?'':'info'
"
size=
"mini"
class=
"text-bold UseTypeTitle"
v-for=
"(item,index) in x.UseTypeList"
>
<template
v-if=
"item.indexOf('团')!=-1"
>
{{
item
.
replace
(
'团'
,
""
)
}}
</
template
>
<
template
v-else
>
{{
item
.
replace
(
'常用'
,
""
)
}}
</
template
>
</el-tag>
</template>
...
...
@@ -174,7 +178,7 @@ const searchParmeters = reactive({
Province
:
0
,
DiningType
:
0
,
DiningPriceType
:
0
,
UseType
:
[]
UseType
:
[
0
]
})
const
platforms
=
ref
<
{
id
:
number
,
name
:
string
}[]
>
([
...
...
@@ -211,7 +215,11 @@ const currentDiningPriceType = computed(() => {
return
getTypeName
(
searchParmeters
.
DiningPriceType
,
4
)
})
const
getTypeName
=
(
t
:
number
,
st
:
0
|
1
)
=>
{
const
currentUseType
=
computed
(()
=>
{
return
getTypeName
(
searchParmeters
.
UseType
,
5
)
})
const
getTypeName
=
(
t
:
number
|
array
,
st
:
number
)
=>
{
if
(
st
==
1
)
{
const
p
=
allTypes
.
value
.
find
(
x
=>
x
.
id
==
t
)
return
(
p
?.
name
??
""
).
replace
(
'不限'
,
""
)
...
...
@@ -224,6 +232,13 @@ const getTypeName = (t: number, st: 0 | 1) => {
}
else
if
(
st
==
4
)
{
const
p
=
DiningPriceTypeList
.
value
.
find
(
x
=>
x
.
ID
==
t
)
return
(
p
?.
Name
??
""
).
replace
(
'不限'
,
""
)
}
else
if
(
st
==
5
)
{
let
p
=
''
t
.
forEach
(
z
=>
{
let
find
=
ApplicableTypeList
.
value
.
find
(
x
=>
x
.
ID
==
z
)
p
+=
(
find
?.
Name
??
""
).
replace
(
'不限'
,
""
)
});
return
p
}
else
{
const
p
=
platforms
.
value
.
find
(
x
=>
x
.
id
==
t
)
return
(
p
?.
name
??
""
).
replace
(
'不限'
,
""
)
...
...
@@ -277,12 +292,12 @@ const getDiningUseType = async () => {
ApplicableTypeList
.
value
=
response
.
data
.
data
let
obj
=
{
ID
:
0
,
Name
:
'不限'
Name
:
'不限
适用类型
'
}
ApplicableTypeList
.
value
.
unshift
(
obj
)
}
}
const
handleChangeTypeOrPlatform
=
(
id
:
number
,
t
:
0
|
1
|
2
|
3
|
4
|
5
)
=>
{
const
handleChangeTypeOrPlatform
=
(
id
:
number
,
t
:
number
)
=>
{
if
(
t
==
0
)
searchParmeters
.
platform
=
id
else
if
(
t
==
2
){
searchParmeters
.
Province
=
id
...
...
@@ -291,7 +306,20 @@ const handleChangeTypeOrPlatform = (id: number, t: 0 | 1 | 2 | 3 | 4 | 5) => {
}
else
if
(
t
==
4
){
searchParmeters
.
DiningPriceType
=
id
}
else
if
(
t
==
5
){
let
findIndex
=
searchParmeters
.
UseType
.
findIndex
(
x
=>
{
return
x
==
id
})
if
(
findIndex
==-
1
)
{
if
(
id
>
0
){
searchParmeters
.
UseType
.
push
(
id
)
searchParmeters
.
UseType
=
searchParmeters
.
UseType
.
filter
(
x
=>
{
return
x
!=
0
})
}
else
{
searchParmeters
.
UseType
=
[
0
]
}
}
else
{
searchParmeters
.
UseType
=
searchParmeters
.
UseType
.
filter
(
x
=>
{
return
x
!=
id
})
if
(
searchParmeters
.
UseType
.
length
==
0
)
searchParmeters
.
UseType
=
[
0
]
}
}
else
searchParmeters
.
type
=
id
searchParmeters
.
pageIndex
=
1
handleSearch
()
...
...
@@ -353,7 +381,7 @@ getDiningUseType()
color
:
#fff
;
}
.tools-bar
::v-deep
(
.el-button
span
.col
)
{
max-width
:
50
px
;
max-width
:
35
px
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
...
...
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