二级页面完善

This commit is contained in:
BianLzhaoMin 2025-03-18 14:05:50 +08:00
parent 83b85909bb
commit bf3d4b7c1f
3 changed files with 148 additions and 40 deletions

View File

@ -42,23 +42,23 @@ watch(
]
} else if (newValue == 2) {
navMenuList.value = [
{ name: '首页', routerName: 'home' },
{ name: '数据大屏', routerName: 'big-screen' },
{ name: '装备共享大厅', routerName: 'equipList' },
{ name: '租赁需求大厅', routerName: 'parity' },
{ name: '首页', routerName: 'home', permissions: 'home' },
{ name: '数据大屏', routerName: 'big-screen', permissions: 'home' },
{ name: '装备共享大厅', routerName: 'equipList', permissions: 'home' },
{ name: '租赁需求大厅', routerName: 'parity', permissions: 'home' },
// { name: '', routerName: 'zoneEquipment' },
{ name: '订单管理', routerName: 'orderManagement' },
{ name: '需求管理', routerName: 'sourcingNeed' },
{ name: '通知公告', routerName: 'enterpriseZone' },
{ name: '订单管理', routerName: 'orderManagement', permissions: 'home' },
{ name: '需求管理', routerName: 'sourcingNeed', permissions: 'home' },
{ name: '通知公告', routerName: 'enterpriseZone', permissions: 'home' },
]
} else if (newValue == 3) {
navMenuList.value = [
{ name: '首页', routerName: 'home' },
{ name: '数据大屏', routerName: 'big-screen' },
{ name: '装备共享大厅', routerName: 'equipList' },
{ name: '首页', routerName: 'home', permissions: 'home' },
{ name: '数据大屏', routerName: 'big-screen', permissions: 'home' },
{ name: '装备共享大厅', routerName: 'equipList', permissions: 'home' },
// { name: '', routerName: 'zoneEquipment' },
{ name: '租赁需求大厅', routerName: 'parity' },
{ name: '通知公告', routerName: 'enterpriseZone' },
{ name: '租赁需求大厅', routerName: 'parity', permissions: 'home' },
{ name: '通知公告', routerName: 'enterpriseZone', permissions: 'home' },
]
} else {
navMenuList.value = []

View File

@ -0,0 +1,30 @@
import { get, post } from '../../index'
// 入驻装备数详情
export const getDevNumApi = (data: any = {}) => {
return get('/material-mall/largeScreen/getDevNum', data)
}
// 上架装备数详情
export const getDevUpNumApi = (data: any = {}) => {
return get('/material-mall/largeScreen/getDevUpNum', data)
}
// 装备类型总数详情
export const getDevTypeNumApi = (data: any = {}) => {
return get('/material-mall/largeScreen/getDevTypeNum', data)
}
// 保养告警数详情
export const getDevQcWarningNumApi = (data: any = {}) => {
return get('/material-mall/largeScreen/getDevQcWarningNum', data)
}
// 在租装备种类详情
export const getMaTypeLeasingNumApi = (data: any = {}) => {
return get('/material-mall/largeScreen/getMaTypeLeasingNum', data)
}
// 在租装备数详情
export const getDevLeasingNumApi = (data: any = {}) => {
return get('/material-mall/largeScreen/getDevLeasingNum', data)
}

View File

@ -14,13 +14,23 @@
:index="indexContinuation"
/>
<el-table-column
v-for="(item, index) in columns"
v-for="(item, index) in column"
:key="index"
:label="item.label"
:prop="item.prop"
align="center"
show-overflow-tooltip
/>
>
<template v-if="!item.slot_c" #default="{ row }">
{{ row[item.prop] }}
</template>
<template v-else #default="{ row }">
<el-tag v-if="row.maStatus == 0" size="small" type="info">草稿状态</el-tag>
<el-tag v-if="row.maStatus == 1" size="small" type="warning">待上架</el-tag>
<el-tag v-if="row.maStatus == 2" size="small" type="success">上架</el-tag>
<el-tag v-if="row.maStatus == 3" size="small" type="danger">在租</el-tag>
</template>
</el-table-column>
</el-table>
<PagingComponent
@ -37,19 +47,62 @@
import { ref, onMounted } from 'vue'
import PagingComponent from 'components/PagingComponent/index.vue'
import {
getDevNumApi,
getDevUpNumApi,
getDevTypeNumApi,
getDevQcWarningNumApi,
getMaTypeLeasingNumApi,
getDevLeasingNumApi,
} from '@/http/api/screen-f/index.ts'
const router = useRouter()
console.log('🚀 ~ router:', router.currentRoute.value.query)
const currentType = ref(router.currentRoute.value.query.type)
const title = ref(router.currentRoute.value.query.title)
const columns = ref([
{ label: '序号', prop: 'index' },
{ label: '装备名称', prop: 'name' },
{ label: '装备型号', prop: 'typeName' },
{ label: '发布单位', prop: 'publishCompany' },
{ label: '发布人', prop: 'publishUser' },
{ label: '租赁价格', prop: 'price' },
{ label: '租赁单位', prop: 'timeUnit' },
const column = ref([])
const columns1 = ref([
{ label: '机具类型', prop: 'typeName' },
{ label: '机具名称', prop: 'deviceName' },
{ label: '规格型号', prop: 'modelName' },
{ label: '唯一标识符', prop: 'identifyCode' },
{ label: '装备状态', prop: 'maStatus', slot_c: true },
{ label: '上架时间', prop: 'createTime' },
{ label: '所属公司', prop: 'comName' },
])
const columns2 = ref([
{ label: '机具类型', prop: 'typeName' },
{ label: '机具名称', prop: 'deviceName' },
{ label: '规格型号', prop: 'modelName' },
{ label: '数量', prop: 'deviceCount' },
])
const columns3 = ref([
{ label: '机具类型', prop: 'typeName' },
{ label: '机具名称', prop: 'deviceName' },
{ label: '规格型号', prop: 'modelName' },
{ label: '唯一标识符', prop: 'identifyCode' },
// { label: '', prop: 'identifyCode' },
{ label: '告警时间', prop: 'createTime' },
])
const columns4 = ref([
{ label: '机具名称', prop: 'deviceName' },
{ label: '规格型号', prop: 'modelName' },
{ label: '租赁单价', prop: 'dayLeasePrice' },
{ label: '租赁次数', prop: 'rentNum' },
])
const columns5 = ref([
{ label: '机具名称', prop: 'deviceName' },
{ label: '规格型号', prop: 'modelName' },
{ label: '唯一标识符', prop: 'identifyCode' },
{ label: '订单号', prop: 'orderId' },
{ label: '出租方', prop: 'comName' },
{ label: '出租方联系人', prop: 'person' },
{ label: '承租方', prop: 'lessee' },
{ label: '承租方联系人', prop: 'lesseePerson' },
{ label: '订单开始时间', prop: 'startTime' },
{ label: '订单结束时间', prop: 'endTime' },
{ label: '租赁金额', prop: 'cost' },
])
const total = ref(0)
@ -58,31 +111,56 @@ const queryParams = ref({
pageSize: 10,
})
const tableData = ref([
{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄',
},
{
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄',
},
{
date: '2016-05-01',
},
])
const tableData = ref([])
const indexContinuation = (index) => {
return index + (queryParams.value.pageNum - 1) * queryParams.value.pageSize + 1
}
const getList = () => {
console.log('getList')
const SEND_API = ref(null)
const getList = async () => {
const res = await SEND_API.value(queryParams.value)
if (res.code === 200) {
tableData.value = res.data.rows
total.value = res.data.total
}
console.log(res, '9996')
}
onMounted(() => {})
switch (currentType.value) {
case '1':
SEND_API.value = getDevNumApi
column.value = [...columns1.value]
break
case '2':
SEND_API.value = getDevUpNumApi
column.value = [...columns1.value]
break
case '3':
SEND_API.value = getDevTypeNumApi
column.value = [...columns2.value]
break
case '4':
SEND_API.value = getDevQcWarningNumApi
column.value = [...columns3.value]
break
case '5':
SEND_API.value = getMaTypeLeasingNumApi
column.value = [...columns4.value]
break
case '6':
SEND_API.value = getDevLeasingNumApi
column.value = [...columns5.value]
break
}
// console.log(column.value, ' column.value')
getList()
onMounted(async () => {
console.log(currentType.value, 'currentType.value')
})
</script>
<style lang="scss" scoped>