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
47914e1f
Commit
47914e1f
authored
Aug 14, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
系统资料 和平资料
parent
792f126e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
385 additions
and
3 deletions
+385
-3
SpiderService.ts
src/services/SpiderService.ts
+13
-0
index.vue
src/views/Editor/Toolbar/index.vue
+1
-1
SourceDetail.vue
src/views/components/source/SourceDetail.vue
+4
-0
SourceListIsp.vue
src/views/components/source/SourceListIsp.vue
+358
-0
index.vue
src/views/components/source/index.vue
+9
-2
No files found.
src/services/SpiderService.ts
View file @
47914e1f
import
Api
,{
HttpResponse
,
Result
}
from
'./../utils/request'
;
class
SpiderService
{
static
async
GetDiningPriceType
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"dining_get_GetDiningPriceType"
,
params
)
}
static
async
GetDiningType
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"dining_get_GetDiningType"
,
params
)
}
static
async
GetChildList
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"dict_post_Destination_GetChildList"
,
params
)
}
static
async
GetThirdPartyResourceAsync
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"mongoscenic_GetMongoScenicPage"
,
params
)
}
...
...
src/views/Editor/Toolbar/index.vue
View file @
47914e1f
...
...
@@ -51,7 +51,7 @@ const elementTabs = computed<ElementTabs[]>(() => {
{
label
:
'符号'
,
key
:
ToolbarStates
.
SYMBOL
},
{
label
:
'位置'
,
key
:
ToolbarStates
.
EL_POSITION
},
// { label: '动画', key: ToolbarStates.EL_ANIMATION }
{
label
:
'匹配数据'
,
key
:
ToolbarStates
.
EL_NORMALDATA
}
//
{ label: '匹配数据', key: ToolbarStates.EL_NORMALDATA }
]
}
else
{
return
[
...
...
src/views/components/source/SourceDetail.vue
View file @
47914e1f
...
...
@@ -56,6 +56,10 @@
<div
class=
"text-small text-info col q-mt-md"
>
联系电话
</div>
<text-opera><span
class=
"text-small q-mt-sm"
>
{{
data
.
Tel
}}
</span></text-opera>
</
template
>
<
template
v-if=
"data.Url && data.Url != ''"
>
<div
class=
"text-small text-info col q-mt-md"
>
网址
</div>
<text-opera><a
:href=
"data.Url"
target=
"_blank"
class=
"text-small q-mt-sm"
>
{{
data
.
Url
}}
</a></text-opera>
</
template
>
<
template
v-if=
"data.PlayTimeHour && data.PlayTimeHour != ''"
>
<div
class=
"text-small text-info col q-mt-md"
>
推荐时长
</div>
<text-opera><span
class=
"text-small q-mt-sm"
>
{{
data
.
PlayTimeHour
}}
</span></text-opera>
...
...
src/views/components/source/SourceListIsp.vue
0 → 100644
View file @
47914e1f
<
template
>
<div>
<div
class=
"row items-center reactive"
>
<img
src=
"../../../assets/img/resource.png"
style=
"width: 30px; height: 30px"
/>
<div
class=
"sub-title1 q-ml-md"
>
搜索
</div>
<div
class=
"tools-bar col q-ml-lg"
>
<input
type=
"text"
style=
"margin-left: -1px;outline: none;"
@
keyup
.
enter=
"handleSearch"
v-model=
"searchParmeters.keywords"
maxlength=
"12"
placeholder=
"关键字城市/酒店/景点/餐厅..."
class=
"col full-width full-height no-border q-px-md"
/>
</div>
<el-button
round
type=
"primary"
size=
"small"
@
click=
"handleClose"
style=
"position: absolute;right: -17px;top: -18px;background: --el-color-primary;height: 36px;"
>
<IconClose
size=
"14px"
></IconClose>
</el-button>
</div>
<div
class=
"q-mt-md"
style=
"user-drag: none;"
>
<div
class=
"row items-center tools-bar"
>
<el-dropdown
v-if=
"false"
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;"
>
<div
class=
"row items-center"
>
<span
class=
"col"
style=
"margin-top: 2px; text-align: left;"
>
{{
currentPlatform
}}
</span>
<IconDown
class=
"q-ml-sm"
:size=
"16"
/>
</div>
</el-button>
<template
#
dropdown
>
<el-dropdown-menu>
<el-dropdown-item
v-for=
"(x, i) in platforms"
@
click=
"handleChangeTypeOrPlatform(x.id, 0)"
:key=
"i"
>
{{
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"
style=
"background: #000;border-radius: 0;padding: 8px;width:81px;"
>
<div
class=
"row items-center"
>
<span
class=
"col"
style=
"margin-top: 2px; text-align: left;"
>
{{ currentMatchType }}
</span>
<IconDown
class=
"q-ml-sm"
:size=
"16"
/>
</div>
</el-button>
<
template
#
dropdown
>
<el-dropdown-menu>
<el-dropdown-item
v-for=
"(x, i) in allTypes"
@
click=
"handleChangeTypeOrPlatform(x.id, 1)"
:style=
"
{'font-weight':x.id===searchParmeters.type?'600':'',
'color':x.id===searchParmeters.type?'#564bec':'',}"
:key="i">
{{
x
.
name
}}
</el-dropdown-item>
</el-dropdown-menu>
</
template
>
</el-dropdown>
<el-select
style=
"margin-left: -1px;"
:style=
"{'max-width':searchParmeters.type==2?'':''}"
:class=
"[searchParmeters.type==2?'':'col']"
@
change=
"handleChangeTypeOrPlatform(searchParmeters.Province,2)"
v-model=
"searchParmeters.Province"
filterable
placeholder=
"地区"
clearable
>
<el-option
v-for=
"item in CityList"
: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;"
>
<div
class=
"row items-center"
>
<span
class=
"col"
style=
"margin-top: 2px; text-align: left;"
>
{{
currentDiningType
}}
</span>
<IconDown
class=
"q-ml-sm"
:size=
"16"
/>
</div>
</el-button>
<template
#
dropdown
>
<el-dropdown-menu>
<el-dropdown-item
v-for=
"(x, i) in DiningTypeList"
@
click=
"handleChangeTypeOrPlatform(x.ID, 3)"
:key=
"i"
:style=
"
{'font-weight':x.ID===searchParmeters.DiningType?'600':'',
'color':x.ID===searchParmeters.DiningType?'#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"
style=
"background: #000;border-radius: 0;padding: 8px;width:81px;"
>
<div
class=
"row items-center"
>
<span
class=
"col"
style=
"margin-top: 2px; text-align: left;"
>
{{ currentDiningPriceType }}
</span>
<IconDown
class=
"q-ml-sm"
:size=
"16"
/>
</div>
</el-button>
<
template
#
dropdown
>
<el-dropdown-menu>
<el-dropdown-item
v-for=
"(x, i) in DiningPriceTypeList"
@
click=
"handleChangeTypeOrPlatform(x.ID, 4)"
:style=
"
{'font-weight':x.ID===searchParmeters.DiningPriceType?'600':'',
'color':x.ID===searchParmeters.DiningPriceType?'#564bec':'',}"
:key="i">
{{
x
.
Name
}}
</el-dropdown-item>
</el-dropdown-menu>
</
template
>
</el-dropdown>
</template>
<!-- <input v-else type="text" style="margin-left: -1px;outline: none;" @keyup.enter="handleSearch" v-model="searchParmeters.keywords"
maxlength="12" placeholder="关键字城市/酒店/景点/餐厅..." class="col full-width full-height no-border q-px-md" /> -->
</div>
<el-row
:gutter=
"12"
class=
"q-mt-lg"
v-if=
"!loading"
>
<el-col
:span=
"12"
v-for=
"(x, i) in data"
:key=
"i"
>
<div
class=
"item-poi"
@
click=
"setSelectedPoiItem(x)"
:style=
"{ 'background-image': `url('${x.PicPath.split('?')[0]}')` }"
>
<div
class=
"container column"
>
<div
class=
"row items-center"
>
<el-tag
type=
"success"
size=
"small"
class=
"text-bold"
>
{{ getTypeName(x.Platform, 0)
}}
</el-tag>
<el-tag
type=
"info"
size=
"small"
class=
"text-bold q-ml-md"
>
{{ getTypeName(x.Type, 1)
}}
</el-tag>
</div>
<div
class=
"col"
></div>
<el-text
class=
"text-white full-width"
style=
"text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5); font-size: 12px;"
line-clamp=
"1"
>
{{ x.Name }}
</el-text>
</div>
</div>
</el-col>
</el-row>
<div
style=
"height: 323px;"
v-loading=
"loading"
v-if=
"loading"
></div>
<div
class=
"row"
>
<div
class=
"col"
></div>
<el-pagination
layout=
"prev, pager, next"
class=
"no-bg "
hide-on-single-page
:page-size=
"searchParmeters.pageSize"
@
current-change=
"handleSearch"
v-model:current-page=
"searchParmeters.pageIndex"
:total=
"total"
small
/>
</div>
</div>
</div>
</template>
<
script
lang=
"ts"
setup
>
import
{
computed
,
reactive
,
ref
}
from
"vue"
import
{
ApiResult
}
from
"@/configs/axios"
;
import
SpiderService
from
"@/services/SpiderService"
;
import
{
useUserStore
}
from
"@/store"
;
const
emit
=
defineEmits
<
{
(
event
:
'close'
):
void
,
(
event
:
'change'
,
payload
:
any
):
void
}
>
()
const
userStore
=
useUserStore
()
const
{
userInfo
}
=
userStore
const
loading
=
ref
(
false
)
const
data
=
ref
<
any
[]
>
()
const
total
=
ref
(
0
)
const
searchParmeters
=
reactive
({
keywords
:
''
,
platform
:
2
,
type
:
0
,
pageIndex
:
1
,
pageSize
:
6
,
Province
:
0
,
DiningType
:
0
,
DiningPriceType
:
0
,
})
const
platforms
=
ref
<
{
id
:
number
,
name
:
string
}[]
>
([
{
id
:
2
,
name
:
"ERP"
},
{
id
:
1
,
name
:
"第三方"
}
])
const
allTypes
=
ref
<
{
id
:
number
,
name
:
string
}[]
>
([
{
id
:
0
,
name
:
"不限类型"
},
{
id
:
1
,
name
:
"酒店"
},
{
id
:
2
,
name
:
"餐厅"
},
{
id
:
3
,
name
:
"景点"
}
])
const
CityList
=
ref
([])
const
DiningTypeList
=
ref
([])
const
DiningPriceTypeList
=
ref
([])
if
(
!
userInfo
.
isp
){
platforms
.
value
.
splice
(
0
,
1
)
searchParmeters
.
platform
=
1
}
const
currentPlatform
=
computed
(()
=>
{
return
getTypeName
(
searchParmeters
.
platform
,
0
)
})
const
currentMatchType
=
computed
(()
=>
{
return
getTypeName
(
searchParmeters
.
type
,
1
)
})
const
currentProvince
=
computed
(()
=>
{
return
getTypeName
(
searchParmeters
.
Province
,
2
)
})
const
currentDiningType
=
computed
(()
=>
{
return
getTypeName
(
searchParmeters
.
DiningType
,
3
)
})
const
currentDiningPriceType
=
computed
(()
=>
{
return
getTypeName
(
searchParmeters
.
DiningPriceType
,
4
)
})
const
getTypeName
=
(
t
:
number
,
st
:
0
|
1
)
=>
{
if
(
st
==
1
)
{
const
p
=
allTypes
.
value
.
find
(
x
=>
x
.
id
==
t
)
return
(
p
?.
name
??
""
).
replace
(
'不限'
,
""
)
}
else
if
(
st
==
2
)
{
const
p
=
CityList
.
value
.
find
(
x
=>
x
.
ID
==
t
)
return
(
p
?.
Name
??
""
).
replace
(
'不限'
,
""
)
}
else
if
(
st
==
3
)
{
const
p
=
DiningTypeList
.
value
.
find
(
x
=>
x
.
ID
==
t
)
return
(
p
?.
Name
??
""
).
replace
(
'不限'
,
""
)
}
else
if
(
st
==
4
)
{
const
p
=
DiningPriceTypeList
.
value
.
find
(
x
=>
x
.
ID
==
t
)
return
(
p
?.
Name
??
""
).
replace
(
'不限'
,
""
)
}
else
{
const
p
=
platforms
.
value
.
find
(
x
=>
x
.
id
==
t
)
return
(
p
?.
name
??
""
).
replace
(
'不限'
,
""
)
}
}
// const getNation = () =>{
// const response = await SpiderService.GetChildList({Id:0})
// if (response.data.resultCode == ApiResult.SUCCESS) {
// data.value = response.data.data.pageData
// total.value = response.data.data.count
// searchParmeters.pageIndex = response.data.data.pageIndex
// }
// }
const
getProvince
=
async
()
=>
{
const
response
=
await
SpiderService
.
GetChildList
({
Id
:
651
})
if
(
response
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
CityList
.
value
=
response
.
data
.
data
let
obj
=
{
ID
:
0
,
Name
:
'不限地区'
}
CityList
.
value
.
unshift
(
obj
)
}
}
const
getDiningsType
=
async
()
=>
{
const
response
=
await
SpiderService
.
GetDiningType
({})
if
(
response
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
DiningTypeList
.
value
=
response
.
data
.
data
let
obj
=
{
ID
:
0
,
Name
:
'不限餐'
}
DiningTypeList
.
value
.
unshift
(
obj
)
}
}
const
getDiningPricesType
=
async
()
=>
{
const
response
=
await
SpiderService
.
GetDiningPriceType
({})
if
(
response
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
DiningPriceTypeList
.
value
=
response
.
data
.
data
let
obj
=
{
ID
:
0
,
Name
:
'不限餐标'
}
DiningPriceTypeList
.
value
.
unshift
(
obj
)
}
}
const
handleChangeTypeOrPlatform
=
(
id
:
number
,
t
:
0
|
1
|
2
|
3
|
4
)
=>
{
if
(
t
==
0
)
searchParmeters
.
platform
=
id
else
if
(
t
==
2
){
searchParmeters
.
Province
=
id
}
else
if
(
t
==
3
){
searchParmeters
.
DiningType
=
id
}
else
if
(
t
==
4
){
searchParmeters
.
DiningPriceType
=
id
}
else
searchParmeters
.
type
=
id
searchParmeters
.
pageIndex
=
1
handleSearch
()
}
const
handleSearch
=
async
()
=>
{
console
.
log
(
'handleSearch'
,
searchParmeters
.
keywords
)
if
(
loading
.
value
)
return
loading
.
value
=
true
total
.
value
=
0
data
.
value
=
[]
const
response
=
await
SpiderService
.
GetSourcesAsync
(
searchParmeters
)
if
(
response
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
data
.
value
=
response
.
data
.
data
.
pageData
total
.
value
=
response
.
data
.
data
.
count
searchParmeters
.
pageIndex
=
response
.
data
.
data
.
pageIndex
}
loading
.
value
=
false
}
const
handleClose
=
()
=>
emit
(
'close'
)
const
setSelectedPoiItem
=
(
data
:
any
)
=>
emit
(
'change'
,
data
)
handleSearch
()
getProvince
()
getDiningsType
()
getDiningPricesType
()
</
script
>
<
style
scoped
>
.tools-bar
::v-deep
(
.el-select
:hover:not
(
.el-select--disabled
)
.el-input__wrapper
)
{
box-shadow
:
0
0
0
0px
var
(
--el-input-border-color
,
var
(
--el-border-color
))
inset
;
border-left
:
1px
solid
#fff
;
}
.tools-bar
::v-deep
(
.el-select
.el-input.isfocus
.el-input__wrapper
)
{
box-shadow
:
0
0
0
0px
var
(
--el-input-border-color
,
var
(
--el-border-color
))
inset
;
border-left
:
1px
solid
#fff
;
}
.tools-bar
::v-deep
(
.el-select
.el-input__wrapper
)
{
box-shadow
:
0
0
0
0px
var
(
--el-input-border-color
,
var
(
--el-border-color
))
inset
;
background
:
black
;
border-radius
:
0
;
border-left
:
1px
solid
#fff
;
}
.tools-bar
::v-deep
(
.el-input__inner
)
{
color
:
#fff
;
}
.tools-bar
::v-deep
(
.el-button
)
{
border-right
:
0
;
}
.tools-bar
::v-deep
(
.el-button
:hover
)
{
border-color
:
#fff
;
}
.tools-bar
::v-deep
(
.el-button
span
)
{
color
:
#fff
;
}
.tools-bar
::v-deep
(
.el-button
span
.col
)
{
max-width
:
50px
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.search-card-box
.tools-bar
{
border-radius
:
8px
;
height
:
32px
;
overflow
:
hidden
;
border
:
1px
solid
#000
;
}
.search-card-box
.item-poi
{
position
:
relative
;
width
:
100%
;
height
:
0
;
padding-top
:
56.25%
;
background-size
:
cover
;
background-position
:
center
;
background-color
:
#000
;
border-radius
:
12px
;
overflow
:
hidden
;
margin-bottom
:
12px
;
cursor
:
pointer
;
}
.search-card-box
.item-poi
:hover
{
box-shadow
:
0px
0px
20px
0px
rgba
(
76
,
87
,
125
,
0.2
)
!important
;
}
.search-card-box
.item-poi
.container
{
position
:
absolute
;
left
:
0
;
right
:
0
;
top
:
0
;
bottom
:
0
;
padding
:
8px
;
background
:
linear-gradient
(
rgba
(
0
,
0
,
0
,
0
),
rgba
(
0
,
0
,
0
,
0.5
));
}
</
style
>
\ No newline at end of file
src/views/components/source/index.vue
View file @
47914e1f
...
...
@@ -8,22 +8,29 @@
</div>
<Vue3DraggableResizable
v-model:x=
"localtion.x"
v-model:y=
"localtion.y"
:draggable=
"true"
:resizable=
"false"
v-if=
"showSearchStatus!=0"
class=
"search-card-box"
:class=
"
{ vertical: isVertical }">
<source-list
v-show=
"showSearchStatus==1"
@
close=
"()=>showSearchStatus=0"
@
change=
"handleShowDetail"
></source-list>
<template
v-if=
"userInfo.isp"
>
<source-list-isp
v-show=
"showSearchStatus==1"
@
close=
"()=>showSearchStatus=0"
@
change=
"handleShowDetail"
></source-list-isp>
</
template
>
<
template
v-else
>
<source-list
v-show=
"showSearchStatus==1"
@
close=
"()=>showSearchStatus=0"
@
change=
"handleShowDetail"
></source-list>
</
template
>
<source-detail
v-if=
"showSearchStatus==2"
:item-info=
"recentPoi"
@
close=
"()=>showSearchStatus=0"
@
refound=
"()=>showSearchStatus=1"
></source-detail>
</Vue3DraggableResizable>
</template>
<
script
lang=
"ts"
setup
>
import
{
useMainStore
}
from
"@/store"
;
import
{
useMainStore
,
useUserStore
}
from
"@/store"
;
import
{
calculateCardPosition
,
isElementVisibleInParent
}
from
"@/utils/common"
;
import
{
storeToRefs
}
from
"pinia"
;
import
{
onBeforeUnmount
,
onMounted
,
ref
,
watch
}
from
"vue"
;
import
SourceList
from
'./SourceList.vue'
import
SourceListIsp
from
'./SourceListIsp.vue'
import
SourceDetail
from
'./SourceDetail.vue'
import
Vue3DraggableResizable
from
"vue3-draggable-resizable"
;
const
mainStore
=
useMainStore
();
const
{
handleElementId
,
handleElement
,
canvasScale
}
=
storeToRefs
(
mainStore
);
const
{
userInfo
}
=
storeToRefs
(
useUserStore
())
const
semiHorStyle
=
ref
<
{
left
:
string
;
top
:
string
}
>
({
left
:
""
,
top
:
""
,
...
...
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