Commit aab9e5c0 authored by zhengke's avatar zhengke

系统资料查询接口

parent 4a55fc75
......@@ -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)
}
......
......@@ -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.GetSourcesAsync(searchParmeters)
const response = await SpiderService.GetDmcSourcePage(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
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