二级页面完善
This commit is contained in:
parent
83b85909bb
commit
bf3d4b7c1f
|
|
@ -42,23 +42,23 @@ watch(
|
||||||
]
|
]
|
||||||
} else if (newValue == 2) {
|
} else if (newValue == 2) {
|
||||||
navMenuList.value = [
|
navMenuList.value = [
|
||||||
{ name: '首页', routerName: 'home' },
|
{ name: '首页', routerName: 'home', permissions: 'home' },
|
||||||
{ name: '数据大屏', routerName: 'big-screen' },
|
{ name: '数据大屏', routerName: 'big-screen', permissions: 'home' },
|
||||||
{ name: '装备共享大厅', routerName: 'equipList' },
|
{ name: '装备共享大厅', routerName: 'equipList', permissions: 'home' },
|
||||||
{ name: '租赁需求大厅', routerName: 'parity' },
|
{ name: '租赁需求大厅', routerName: 'parity', permissions: 'home' },
|
||||||
// { name: '专区设备', routerName: 'zoneEquipment' },
|
// { name: '专区设备', routerName: 'zoneEquipment' },
|
||||||
{ name: '订单管理', routerName: 'orderManagement' },
|
{ name: '订单管理', routerName: 'orderManagement', permissions: 'home' },
|
||||||
{ name: '需求管理', routerName: 'sourcingNeed' },
|
{ name: '需求管理', routerName: 'sourcingNeed', permissions: 'home' },
|
||||||
{ name: '通知公告', routerName: 'enterpriseZone' },
|
{ name: '通知公告', routerName: 'enterpriseZone', permissions: 'home' },
|
||||||
]
|
]
|
||||||
} else if (newValue == 3) {
|
} else if (newValue == 3) {
|
||||||
navMenuList.value = [
|
navMenuList.value = [
|
||||||
{ name: '首页', routerName: 'home' },
|
{ name: '首页', routerName: 'home', permissions: 'home' },
|
||||||
{ name: '数据大屏', routerName: 'big-screen' },
|
{ name: '数据大屏', routerName: 'big-screen', permissions: 'home' },
|
||||||
{ name: '装备共享大厅', routerName: 'equipList' },
|
{ name: '装备共享大厅', routerName: 'equipList', permissions: 'home' },
|
||||||
// { name: '专区设备', routerName: 'zoneEquipment' },
|
// { name: '专区设备', routerName: 'zoneEquipment' },
|
||||||
{ name: '租赁需求大厅', routerName: 'parity' },
|
{ name: '租赁需求大厅', routerName: 'parity', permissions: 'home' },
|
||||||
{ name: '通知公告', routerName: 'enterpriseZone' },
|
{ name: '通知公告', routerName: 'enterpriseZone', permissions: 'home' },
|
||||||
]
|
]
|
||||||
} else {
|
} else {
|
||||||
navMenuList.value = []
|
navMenuList.value = []
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -14,13 +14,23 @@
|
||||||
:index="indexContinuation"
|
:index="indexContinuation"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-for="(item, index) in columns"
|
v-for="(item, index) in column"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:prop="item.prop"
|
:prop="item.prop"
|
||||||
align="center"
|
align="center"
|
||||||
show-overflow-tooltip
|
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>
|
</el-table>
|
||||||
|
|
||||||
<PagingComponent
|
<PagingComponent
|
||||||
|
|
@ -37,19 +47,62 @@
|
||||||
import { ref, onMounted } from 'vue'
|
import { ref, onMounted } from 'vue'
|
||||||
import PagingComponent from 'components/PagingComponent/index.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()
|
const router = useRouter()
|
||||||
console.log('🚀 ~ router:', router.currentRoute.value.query)
|
console.log('🚀 ~ router:', router.currentRoute.value.query)
|
||||||
|
|
||||||
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)
|
||||||
const columns = ref([
|
const column = ref([])
|
||||||
{ label: '序号', prop: 'index' },
|
const columns1 = ref([
|
||||||
{ label: '装备名称', prop: 'name' },
|
{ label: '机具类型', prop: 'typeName' },
|
||||||
{ label: '装备型号', prop: 'typeName' },
|
{ label: '机具名称', prop: 'deviceName' },
|
||||||
{ label: '发布单位', prop: 'publishCompany' },
|
{ label: '规格型号', prop: 'modelName' },
|
||||||
{ label: '发布人', prop: 'publishUser' },
|
{ label: '唯一标识符', prop: 'identifyCode' },
|
||||||
{ label: '租赁价格', prop: 'price' },
|
{ label: '装备状态', prop: 'maStatus', slot_c: true },
|
||||||
{ label: '租赁单位', prop: 'timeUnit' },
|
{ 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)
|
const total = ref(0)
|
||||||
|
|
@ -58,31 +111,56 @@ const queryParams = ref({
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
})
|
})
|
||||||
|
|
||||||
const tableData = ref([
|
const tableData = ref([])
|
||||||
{
|
|
||||||
date: '2016-05-02',
|
|
||||||
name: '王小虎',
|
|
||||||
address: '上海市普陀区金沙江路 1518 弄',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: '2016-05-04',
|
|
||||||
name: '王小虎',
|
|
||||||
address: '上海市普陀区金沙江路 1517 弄',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: '2016-05-01',
|
|
||||||
},
|
|
||||||
])
|
|
||||||
|
|
||||||
const indexContinuation = (index) => {
|
const indexContinuation = (index) => {
|
||||||
return index + (queryParams.value.pageNum - 1) * queryParams.value.pageSize + 1
|
return index + (queryParams.value.pageNum - 1) * queryParams.value.pageSize + 1
|
||||||
}
|
}
|
||||||
|
|
||||||
const getList = () => {
|
const SEND_API = ref(null)
|
||||||
console.log('getList')
|
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>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue