接口调试

This commit is contained in:
BianLzhaoMin 2025-07-03 16:32:41 +08:00
parent 6556e86017
commit 91c3f1dc97
4 changed files with 40 additions and 9 deletions

View File

@ -81,3 +81,11 @@ export const getLeaseAnswerRateApi = (data: any = {}) => {
export const getTotalLeaseAnswerRateApi = (data: any = {}) => { export const getTotalLeaseAnswerRateApi = (data: any = {}) => {
return get('/material-mall/largeScreen/getTotalLeaseAnswerRate', data) return get('/material-mall/largeScreen/getTotalLeaseAnswerRate', data)
} }
// 累计数
export const getTotalCountApi = (data: any = {}) => {
return get('/material-mall/largeScreen/getMaTypeLeasingDetail', data)
}
// 需求单位
export const getDemandUnitApi = (data: any = {}) => {
return get('/material-mall/largeScreen/getDemandUnit', data)
}

View File

@ -46,7 +46,7 @@
<div <div
class="info-box info-box_1" class="info-box info-box_1"
style="transform: translateY(-9vh)" style="transform: translateY(-9vh)"
@click="handleDetail(3)" @click="handleDetail(1)"
> >
<div class="yyyy" style="margin-bottom: -6px">入驻数</div> <div class="yyyy" style="margin-bottom: -6px">入驻数</div>
<div style="transform: translateY(12vh)"> <div style="transform: translateY(12vh)">
@ -96,7 +96,7 @@
<div <div
class="info-box info-box_2" class="info-box info-box_2"
style="transform: translateY(-14vh)" style="transform: translateY(-14vh)"
@click="handleDetail(6)" @click="handleDetail(20)"
> >
<div> <div>
<span class="xxxx"> <span class="xxxx">
@ -110,7 +110,7 @@
<div <div
class="info-box info-box_2" class="info-box info-box_2"
style="transform: translateY(-8.5vh)" style="transform: translateY(-8.5vh)"
@click="handleDetail(7)" @click="handleDetail(6)"
> >
<div style="transform: translateY(7.6vh)"> <div style="transform: translateY(7.6vh)">
<span class="xxxx" style="font-size: 26px"> <span class="xxxx" style="font-size: 26px">
@ -124,7 +124,7 @@
<div <div
class="info-box info-box_2" class="info-box info-box_2"
style="transform: translateY(-14vh)" style="transform: translateY(-14vh)"
@click="handleDetail(8)" @click="handleDetail(7)"
> >
<div> <div>
<span class="xxxx">{{ devRepairingNum || 0 }}</span> <span class="xxxx">{{ devRepairingNum || 0 }}</span>
@ -159,7 +159,7 @@
<div <div
class="info-box info-box_3" class="info-box info-box_3"
style="transform: translateY(-14vh)" style="transform: translateY(-14vh)"
@click="handleDetail(10)" @click="handleDetail(9)"
> >
<div> <div>
<span class="xxxx"> <span class="xxxx">
@ -173,7 +173,7 @@
<div <div
class="info-box info-box_3" class="info-box info-box_3"
style="transform: translateY(-7.5vh)" style="transform: translateY(-7.5vh)"
@click="handleDetail(11)" @click="handleDetail(21)"
> >
<!-- <div>第一</div> --> <!-- <div>第一</div> -->
<div style="transform: translateY(3.6vh)"> <div style="transform: translateY(3.6vh)">
@ -188,7 +188,7 @@
<div <div
class="info-box info-box_3" class="info-box info-box_3"
style="transform: translateY(-12.5vh)" style="transform: translateY(-12.5vh)"
@click="handleDetail(12)" @click="handleDetail(10)"
> >
<div> <div>
<span class="xxxx"> <span class="xxxx">
@ -319,6 +319,14 @@ const handleDetail = (type: any) => {
params.title = '需求应答率' params.title = '需求应答率'
params.type = 12 params.type = 12
path = '/detail-list' path = '/detail-list'
} else if (type == 20) {
params.title = '累计数'
params.type = 20
path = '/detail-list-new'
} else if (type == 21) {
params.title = '需求单位'
params.type = 21
path = '/detail-list-new'
} }
router.push({ router.push({
path, path,

View File

@ -43,7 +43,9 @@
<span v-else-if="item.prop === 'leaseTotal'" <span v-else-if="item.prop === 'leaseTotal'"
>{{ row.leaseTotal || 0 }} </span >{{ row.leaseTotal || 0 }} </span
> >
<span v-else-if="item.prop === 'rate'">{{ row.rate ? (Number(row.rate) * 100).toFixed(0) : 0 }}%</span> <span v-else-if="item.prop === 'rate'"
>{{ row.rate ? (Number(row.rate) * 100).toFixed(0) : 0 }}%</span
>
<span v-else-if="item.prop === 'estimateDays'" <span v-else-if="item.prop === 'estimateDays'"
>{{ row.estimateDays || 0 }} </span >{{ row.estimateDays || 0 }} </span
> >

View File

@ -58,6 +58,8 @@ import {
getDevLeasingNumApi, getDevLeasingNumApi,
} from '@/http/api/screen-f/index.ts' } from '@/http/api/screen-f/index.ts'
import { getTotalCountApi, getDemandUnitApi } from '@/http/api/screen/index.ts'
const router = useRouter() const router = useRouter()
const currentType = ref(router.currentRoute.value.query.type) const currentType = ref(router.currentRoute.value.query.type)
const title = ref(router.currentRoute.value.query.title) const title = ref(router.currentRoute.value.query.title)
@ -74,6 +76,7 @@ const orderCount = ref(0)
// //
const answerRate = ref(0) const answerRate = ref(0)
const columns = ref([]) const columns = ref([])
if (currentType.value == 1 || currentType.value == 2) { if (currentType.value == 1 || currentType.value == 2) {
columns.value = [ columns.value = [
{ label: '机具类型', prop: 'typeName' }, { label: '机具类型', prop: 'typeName' },
@ -106,7 +109,7 @@ if (currentType.value == 1 || currentType.value == 2) {
{ label: '租赁单价', prop: 'dayLeasePrice' }, { label: '租赁单价', prop: 'dayLeasePrice' },
{ label: '租赁次数', prop: 'rentNum' }, { label: '租赁次数', prop: 'rentNum' },
] ]
} else if (currentType.value == 6) { } else if (currentType.value == 6 || currentType.value == 20) {
columns.value = [ columns.value = [
{ label: '机具名称', prop: 'deviceName' }, { label: '机具名称', prop: 'deviceName' },
{ label: '规格型号', prop: 'modelName' }, { label: '规格型号', prop: 'modelName' },
@ -120,6 +123,11 @@ if (currentType.value == 1 || currentType.value == 2) {
{ label: '订单结束时间', prop: 'endTime' }, { label: '订单结束时间', prop: 'endTime' },
{ label: '租赁金额', prop: 'cost' }, { label: '租赁金额', prop: 'cost' },
] ]
} else if (currentType.value == 21) {
columns.value = [
{ label: '单位名称', prop: 'deptName' },
{ label: '创建时间', prop: 'createTime' },
]
} }
const total = ref(0) const total = ref(0)
@ -136,6 +144,7 @@ const indexContinuation = (index) => {
} }
const getList = async () => { const getList = async () => {
console.log('currentType.value ', currentType.value)
try { try {
const params = { const params = {
pageNum: queryParams.value.pageNum, pageNum: queryParams.value.pageNum,
@ -161,6 +170,10 @@ const getList = async () => {
} else if (currentType.value == 6) { } else if (currentType.value == 6) {
// //
res = await getDevLeasingNumApi(params) res = await getDevLeasingNumApi(params)
} else if (currentType.value == 20) {
res = await getTotalCountApi(params)
} else if (currentType.value == 21) {
res = await getDemandUnitApi(params)
} }
// console.log('🚀 ~ getList ~ res:', res) // console.log('🚀 ~ getList ~ res:', res)