接口调试

This commit is contained in:
13218645326 2023-12-02 18:12:58 +08:00
parent 033230b2fe
commit 8c648a3707
4 changed files with 80 additions and 57 deletions

View File

@ -15,16 +15,16 @@
<div class="provider_content" v-if="subActive == 'provider'"> <div class="provider_content" v-if="subActive == 'provider'">
<div class="provider_item" v-for="(item, index) in providerInfo.list" :key="index"> <div class="provider_item" v-for="(item, index) in providerInfo.list" :key="index">
<div class="provider_item_left"> <div class="provider_item_left">
<div class="pro_item_icon" :class="{ 'inThree': item.v_index <= 3, 'afterThree': item.v_index > 3 }"> <div class="pro_item_icon" :class="{ 'inThree': index + 1 <= 3, 'afterThree': index + 1 > 3 }">
<img :src="`/src/assets/img/index${item.v_index <= 3 ? item.v_index : 4}.png`" alt="" <img :src="`/src/assets/img/index${index + 1 <= 3 ? index + 1 : 4}.png`" alt=""
class="pro_item_icon_img"> class="pro_item_icon_img">
</div> </div>
<div class="pro_item_title overflow"> <div class="pro_item_title overflow">
{{ item.v_name }} {{ item.ownCo }}
</div> </div>
</div> </div>
<div class="device_count"> <div class="device_count">
设备数:{{ item.v_device_count }} 设备数:{{ item.count }}
</div> </div>
</div> </div>
</div> </div>
@ -35,50 +35,12 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import CloudWords from "components/echartsCom/CloudWords.vue" import CloudWords from "components/echartsCom/CloudWords.vue"
const providerInfo = reactive({ import { apiMaDevInfoHotList } from "http/api/echartApi"
list: [
{
v_index: 1,
v_name: "xxxx公司1",
v_device_count: '123456'
},
{
v_index: 2,
v_name: "xxxx公司xxxx公司2xxxx公司2xxxx公司22",
v_device_count: '123456'
},
{
v_index: 3,
v_name: "xxxx公司3",
v_device_count: '123456'
},
{
v_index: 4,
v_name: "xxxx公司4",
v_device_count: '123456'
},
{
v_index: 4,
v_name: "xxxx公司5",
v_device_count: '123456'
},
{
v_index: 5,
v_name: "xxxx公司1",
v_device_count: '123456'
},
{
v_index: 6,
v_name: "xxxx公司xxxx公司2xxxx公司2xxxx公司22",
v_device_count: '123456'
},
{
v_index: 7,
v_name: "xxxx公司3",
v_device_count: '123456'
},
]
const providerInfo: any = reactive({
list: []
}) })
const subActive = ref("provider") const subActive = ref("provider")
@ -87,6 +49,21 @@ const subTab = (type: any) => {
subActive.value = type subActive.value = type
} }
const InitApiMaDevInfoHotList = async () => {
// :
try {
const res: any = await apiMaDevInfoHotList()
console.log("apiMaDevInfoHotList", res)
providerInfo.list = res
} catch (error) {
console.log(error)
}
}
onBeforeMount(() => {
InitApiMaDevInfoHotList()
})
</script> </script>
@ -122,9 +99,11 @@ const subTab = (type: any) => {
.provider_content { .provider_content {
padding-top: 12px; padding-top: 12px;
overflow-y: auto;
height: 396px;
.provider_item { .provider_item {
width: 303px; width: 280px;
height: 40px; height: 40px;
padding: 0 12px; padding: 0 12px;
box-sizing: border-box; box-sizing: border-box;
@ -164,6 +143,10 @@ const subTab = (type: any) => {
} }
} }
&::-webkit-scrollbar {
display: none;
}
} }
.cloud_words_out { .cloud_words_out {
@ -171,5 +154,4 @@ const subTab = (type: any) => {
height: 340px; height: 340px;
margin-top: 12px; margin-top: 12px;
background-color: rgba($color: #011B37, $alpha: 0.6); background-color: rgba($color: #011B37, $alpha: 0.6);
} }</style>
</style>

View File

@ -28,4 +28,12 @@ http://10.40.92.64:9501/bmCompanyInfo/coltd-list
http://10.40.92.64:9501/maDevInfo/ma-list http://10.40.92.64:9501/maDevInfo/ma-list
--
根据求出租信息查询对应的数量:
http://10.40.92.64:9501/maLeaseInfo/type-list
查询公司对应的热门设备数量:
http://10.40.92.64:9501/maDevInfo/hot-list

View File

@ -41,3 +41,14 @@ export function apibmCompanyInfoColtdList() {
export function apiMaDevInfoMaList() { export function apiMaDevInfoMaList() {
return get('maDevInfo/ma-list', {}) return get('maDevInfo/ma-list', {})
} }
// ======
// 根据求出租信息查询对应的数量:
export function apiMaLeaseInfoInfoTypeList() {
return get('maLeaseInfo/type-list', {})
}
// 查询公司对应的热门设备数量:
export function apiMaDevInfoHotList() {
return get('maDevInfo/hot-list', {})
}

View File

@ -50,19 +50,19 @@
<div class="middle_rent"> <div class="middle_rent">
<div class="rent_title sub_title">出租信息</div> <div class="rent_title sub_title">出租信息</div>
<div class="rent_list"> <div class="rent_list">
<div class="count_item" v-for="(item, index) in equipmentCountInfo.listCount" :key="index"> <div class="count_item" v-for="(item, index) in rentWantRent.rent.slice(0,4)" :key="index">
{{ item }} {{ item }}
</div> </div>
<div class="count_item"> <div class="count_item" v-if="rentWantRent.rent.length>4">
+ +
</div> </div>
</div> </div>
<div class="rent_title sub_title">租信息</div> <div class="rent_title sub_title">租信息</div>
<div class="rent_list"> <div class="rent_list">
<div class="count_item" v-for="(item, index) in equipmentCountInfo.listCount" :key="index"> <div class="count_item" v-for="(item, index) in rentWantRent.wantRent.slice(0,4)" :key="index">
{{ item }} {{ item }}
</div> </div>
<div class="count_item"> <div class="count_item" v-if="rentWantRent.wantRent.length>4">
+ +
</div> </div>
</div> </div>
@ -163,7 +163,8 @@ import { getImg } from "utils/index"
import { import {
apiMaDevInfoList, apiMaDevInfoTypeList, apiMaDevInfoList, apiMaDevInfoTypeList,
apiMaDevInfoCompanyList, apiMaDevInfoMatypeList, apiMaDevInfoCompanyList, apiMaDevInfoMatypeList,
apiMaOrderInfoTodayList, apiMaOrderInfoList, apiBmMachinistInfoList, apiBmCompanyInfoTypeList, apiMaDevInfoMaList apiMaOrderInfoTodayList, apiMaOrderInfoList, apiBmMachinistInfoList, apiBmCompanyInfoTypeList, apiMaDevInfoMaList,
apiMaLeaseInfoInfoTypeList
} from "http/api/echartApi" } from "http/api/echartApi"
const equipmentCountInfo: any = reactive({ const equipmentCountInfo: any = reactive({
listCount: [], listCount: [],
@ -195,7 +196,10 @@ const middleCountList = reactive({
} }
] ]
}) })
const rentWantRent:any=reactive({
rent:[],
wantRent:[]
})
const platFormInfo: any = reactive({ const platFormInfo: any = reactive({
listCount: [], listCount: [],
socailCount: "", socailCount: "",
@ -495,6 +499,24 @@ const iniTapiMaDevInfoMaList = async () => {
} }
} }
const InitApiMaLeaseInfoInfoTypeList= async()=>{
// :
try {
const res: any = await apiMaLeaseInfoInfoTypeList()
console.log("apiMaLeaseInfoInfoTypeList", res)
rentWantRent.rent = (res.rent.count + '').split("")
rentWantRent.wantRent = (res.wantRent.count + '').split("")
} catch (error) {
console.log(error)
}
}
onMounted(()=>{
InitApiMaLeaseInfoInfoTypeList()
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>