Commit aab9e5c0 authored by zhengke's avatar zhengke

系统资料查询接口

parent 4a55fc75
...@@ -2,6 +2,14 @@ import Api,{ HttpResponse, Result } from './../utils/request'; ...@@ -2,6 +2,14 @@ import Api,{ HttpResponse, Result } from './../utils/request';
class SpiderService{ 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>{ static async GetDiningPriceType(params : any):Promise<HttpResponse>{
return Api.Post("dining_get_GetDiningPriceType",params) return Api.Post("dining_get_GetDiningPriceType",params)
} }
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
</template> </template>
</el-dropdown> </el-dropdown>
<el-dropdown style="margin-left: -1px;" trigger="click"> <el-dropdown style="margin-left: -1px;" trigger="click">
<el-button type="default" class="ppt-button text-white" <el-button type="default" class="ppt-button text-white selectWidth"
style="background: #000;border-radius: 0;padding: 8px;width:81px;"> style="background: #000;border-radius: 0;padding: 8px;">
<div class="row items-center"> <div class="row items-center">
<span class="col" style="margin-top: 2px; text-align: left;">{{ currentMatchType }}</span> <span class="col" style="margin-top: 2px; text-align: left;">{{ currentMatchType }}</span>
<IconDown class="q-ml-sm" :size="16" /> <IconDown class="q-ml-sm" :size="16" />
...@@ -46,9 +46,9 @@ ...@@ -46,9 +46,9 @@
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
<el-select style="margin-left: -1px;" <el-select class="selectWidth" style="margin-left: -1px;"
:style="{'max-width':searchParmeters.type==2?'':''}" :style="{'max-width':searchParmeters.type==2?'':''}"
:class="[searchParmeters.type==2?'':'col']" :class="[searchParmeters.type==2?'':'']"
@change="handleChangeTypeOrPlatform(searchParmeters.Province,2)" @change="handleChangeTypeOrPlatform(searchParmeters.Province,2)"
v-model="searchParmeters.Province" v-model="searchParmeters.Province"
filterable filterable
...@@ -61,10 +61,24 @@ ...@@ -61,10 +61,24 @@
:value="item.ID" :value="item.ID"
/> />
</el-select> </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"> <template v-if="searchParmeters.type==2">
<el-dropdown style="margin-left: -1px;" trigger="click"> <el-dropdown style="margin-left: -1px;" trigger="click">
<el-button type="default" class="ppt-button text-white" <el-button type="default" class="ppt-button text-white selectWidth"
style="background: #000;border-radius: 0;padding: 8px;width:81px;"> style="background: #000;border-radius: 0;padding: 8px;">
<div class="row items-center"> <div class="row items-center">
<span class="col" style="margin-top: 2px; text-align: left;">{{ currentDiningType }}</span> <span class="col" style="margin-top: 2px; text-align: left;">{{ currentDiningType }}</span>
<IconDown class="q-ml-sm" :size="16" /> <IconDown class="q-ml-sm" :size="16" />
...@@ -80,8 +94,8 @@ ...@@ -80,8 +94,8 @@
</template> </template>
</el-dropdown> </el-dropdown>
<el-dropdown style="margin-left: -1px;" trigger="click"> <el-dropdown style="margin-left: -1px;" trigger="click">
<el-button type="default" class="ppt-button text-white" <el-button type="default" class="ppt-button text-white selectWidth"
style="background: #000;border-radius: 0;padding: 8px;width:81px;"> style="background: #000;border-radius: 0;padding: 8px;">
<div class="row items-center"> <div class="row items-center">
<span class="col" style="margin-top: 2px; text-align: left;">{{ currentDiningPriceType }}</span> <span class="col" style="margin-top: 2px; text-align: left;">{{ currentDiningPriceType }}</span>
<IconDown class="q-ml-sm" :size="16" /> <IconDown class="q-ml-sm" :size="16" />
...@@ -154,6 +168,7 @@ const searchParmeters = reactive({ ...@@ -154,6 +168,7 @@ const searchParmeters = reactive({
Province: 0, Province: 0,
DiningType: 0, DiningType: 0,
DiningPriceType: 0, DiningPriceType: 0,
UseType: null
}) })
const platforms = ref<{ id: number, name: string }[]>([ const platforms = ref<{ id: number, name: string }[]>([
...@@ -169,6 +184,7 @@ const allTypes = ref<{ id: number, name: string }[]>([ ...@@ -169,6 +184,7 @@ const allTypes = ref<{ id: number, name: string }[]>([
const CityList = ref([]) const CityList = ref([])
const DiningTypeList = ref([]) const DiningTypeList = ref([])
const DiningPriceTypeList = ref([]) const DiningPriceTypeList = ref([])
const ApplicableTypeList = ref([])
if(!userInfo.isp){ if(!userInfo.isp){
platforms.value.splice(0,1) platforms.value.splice(0,1)
searchParmeters.platform=1 searchParmeters.platform=1
...@@ -248,7 +264,19 @@ const getDiningPricesType = async () =>{ ...@@ -248,7 +264,19 @@ const getDiningPricesType = async () =>{
DiningPriceTypeList.value.unshift(obj) 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 if (t == 0) searchParmeters.platform = id
else if(t == 2){ else if(t == 2){
searchParmeters.Province = id searchParmeters.Province = id
...@@ -256,6 +284,8 @@ const handleChangeTypeOrPlatform = (id: number, t: 0 | 1 | 2 | 3 | 4) => { ...@@ -256,6 +284,8 @@ const handleChangeTypeOrPlatform = (id: number, t: 0 | 1 | 2 | 3 | 4) => {
searchParmeters.DiningType = id searchParmeters.DiningType = id
}else if(t == 4){ }else if(t == 4){
searchParmeters.DiningPriceType = id searchParmeters.DiningPriceType = id
}else if(t == 5){
}else searchParmeters.type = id }else searchParmeters.type = id
searchParmeters.pageIndex = 1 searchParmeters.pageIndex = 1
handleSearch() handleSearch()
...@@ -269,7 +299,7 @@ const handleSearch = async () => { ...@@ -269,7 +299,7 @@ const handleSearch = async () => {
loading.value = true loading.value = true
total.value = 0 total.value = 0
data.value = [] data.value = []
const response = await SpiderService.GetSourcesAsync(searchParmeters) const response = await SpiderService.GetDmcSourcePage(searchParmeters)
if (response.data.resultCode == ApiResult.SUCCESS) { if (response.data.resultCode == ApiResult.SUCCESS) {
data.value = response.data.data.pageData data.value = response.data.data.pageData
total.value = response.data.data.count total.value = response.data.data.count
...@@ -285,6 +315,7 @@ handleSearch() ...@@ -285,6 +315,7 @@ handleSearch()
getProvince() getProvince()
getDiningsType() getDiningsType()
getDiningPricesType() getDiningPricesType()
getDiningUseType()
</script> </script>
<style scoped> <style scoped>
...@@ -355,4 +386,7 @@ getDiningPricesType() ...@@ -355,4 +386,7 @@ getDiningPricesType()
padding: 8px; padding: 8px;
background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5)); background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5));
} }
.selectWidth{
min-width: 70px;
}
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment