This commit is contained in:
parent
0976efbce2
commit
6e2e4592dd
|
|
@ -1,52 +1,51 @@
|
|||
<script setup lang="ts">
|
||||
const router = useRouter()
|
||||
|
||||
const router = useRouter()
|
||||
const navMenuList = [
|
||||
{ name: '首页', routerName: 'home' },
|
||||
{ name: '自选直租', routerName: 'equipList' },
|
||||
{ name: '寻源比价', routerName: '/home' },
|
||||
{ name: '二手交易', routerName: '/home' },
|
||||
{ name: '保险业务', routerName: '/home' },
|
||||
{ name: '检验业务', routerName: '/home' },
|
||||
{ name: '企业专区', routerName: '/home' }
|
||||
]
|
||||
|
||||
|
||||
|
||||
const navMenuList = [
|
||||
{ name: '首页', routerName: 'home' },
|
||||
{ name: '自选直租', routerName: 'equipList' },
|
||||
{ name: '寻源比价', routerName: '/home' },
|
||||
{ name: '二手交易', routerName: '/home' },
|
||||
{ name: '保险业务', routerName: '/home' },
|
||||
{ name: '检验业务', routerName: '/home' },
|
||||
{ name: '企业专区', routerName: '/home' },
|
||||
]
|
||||
|
||||
const navMenuClick = (name) => {
|
||||
router.push({ name })
|
||||
}
|
||||
const navMenuClick = (name) => {
|
||||
router.push({ name })
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ul class="nav-menu">
|
||||
<li v-for="item in navMenuList" :key="item.name" @click="navMenuClick(item.routerName)">{{ item.name }}</li>
|
||||
<li v-for="item in navMenuList" :key="item.name" @click="navMenuClick(item.routerName)">
|
||||
{{ item.name }}
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.nav-menu {
|
||||
height: 43px;
|
||||
background-color: #f7f9fa;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.nav-menu {
|
||||
height: 43px;
|
||||
background-color: #f7f9fa;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
li {
|
||||
color: #7D7D7D;
|
||||
padding: 0 20px;
|
||||
border-right: 1px solid #7D7D7D;
|
||||
li {
|
||||
color: #7d7d7d;
|
||||
padding: 0 20px;
|
||||
border-right: 1px solid #7d7d7d;
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
}
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
color: #333333;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border: none;
|
||||
&:last-child {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -3,12 +3,18 @@
|
|||
<template>
|
||||
<!-- 分页 -->
|
||||
|
||||
<el-pagination current-page="1" page-size="20" :page-sizes="[100, 200, 300, 400]" small="small" background="background"
|
||||
layout="total, sizes, prev, pager, next, jumper" :total="50" />
|
||||
<el-pagination
|
||||
current-page="1"
|
||||
page-size="20"
|
||||
:page-sizes="[100, 200, 300, 400]"
|
||||
small="small"
|
||||
background="background"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="50" />
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.el-pagination {
|
||||
margin-top: 15px;
|
||||
}
|
||||
.el-pagination {
|
||||
margin-top: 15px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,106 +1,100 @@
|
|||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
const queryParams = ref({})
|
||||
import { ref } from 'vue'
|
||||
const queryParams = ref({})
|
||||
|
||||
import TableComponent from '@/compontents/TableComponent/index.vue'
|
||||
import FormComponent from '@/compontents/FormComponent/index.vue'
|
||||
import PagingComponent from '../../../compontents/PagingComponent/index.vue'
|
||||
import TableComponent from '@/compontents/TableComponent/index.vue'
|
||||
import FormComponent from '@/compontents/FormComponent/index.vue'
|
||||
import PagingComponent from '../../../compontents/PagingComponent/index.vue'
|
||||
|
||||
// 选择复选框时获取需要删除的数据源
|
||||
const getRowId = (val: any) => {
|
||||
console.log(val, '需要删除的数据源**');
|
||||
}
|
||||
// 选择复选框时获取需要删除的数据源
|
||||
const getRowId = (val: any) => {
|
||||
console.log(val, '需要删除的数据源**')
|
||||
}
|
||||
|
||||
// 上架按钮
|
||||
const handleGrounding = () => {
|
||||
console.log('上架设备');
|
||||
// 上架按钮
|
||||
const handleGrounding = () => {
|
||||
console.log('上架设备')
|
||||
}
|
||||
|
||||
}
|
||||
// 下架按钮
|
||||
const handleOffshelf = () => {
|
||||
console.log('下架设备')
|
||||
}
|
||||
// 编辑按钮
|
||||
const editRowInfo = (row: any) => {
|
||||
console.log(row, '编辑当前数据')
|
||||
}
|
||||
// 删除按钮
|
||||
const deleteRowInfo = (row: any) => {
|
||||
console.log(row, '删除当前数据')
|
||||
}
|
||||
|
||||
// 下架按钮
|
||||
const handleOffshelf = () => {
|
||||
console.log('下架设备');
|
||||
const tableProps = ref([
|
||||
{ v_label: '编码', v_props: 'v_code', v_slot: '', width: '' },
|
||||
{ v_label: '租赁范围', v_props: 'v_lease_scope', v_slot: '', width: '' },
|
||||
{ v_label: '装备类型', v_props: 'v_equipment_type', v_slot: '', width: '' },
|
||||
{ v_label: '装备名称', v_props: 'v_equipment_name', v_slot: '', width: '' },
|
||||
{ v_label: '租金', v_props: 'v_rent', v_slot: '', width: '' },
|
||||
{ v_label: '状态', v_props: 'v_type', v_slot: 'v_type', width: '' },
|
||||
{ v_label: '操作', v_props: 'v_operate', v_slot: 'operate', width: '140px' }
|
||||
])
|
||||
|
||||
const tableData = [
|
||||
{
|
||||
v_code: '123456',
|
||||
v_lease_scope: '2023/12/12',
|
||||
v_equipment_type: '挖掘机',
|
||||
v_equipment_name: '2023新版挖掘机',
|
||||
v_rent: '123/月',
|
||||
v_type: 1,
|
||||
v_operate: ''
|
||||
},
|
||||
{
|
||||
v_code: '123456',
|
||||
v_lease_scope: '2023/12/12',
|
||||
v_equipment_type: '挖掘机',
|
||||
v_equipment_name: '2023新版挖掘机',
|
||||
v_rent: '123/月',
|
||||
v_type: 2,
|
||||
v_operate: ''
|
||||
},
|
||||
{
|
||||
v_code: '123456',
|
||||
v_lease_scope: '2023/12/12',
|
||||
v_equipment_type: '挖掘机',
|
||||
v_equipment_name: '2023新版挖掘机',
|
||||
v_rent: '123/月',
|
||||
v_type: 3,
|
||||
v_operate: ''
|
||||
},
|
||||
{
|
||||
v_code: '123456',
|
||||
v_lease_scope: '2023/12/12',
|
||||
v_equipment_type: '挖掘机',
|
||||
v_equipment_name: '2023新版挖掘机',
|
||||
v_rent: '123/月',
|
||||
v_type: 3,
|
||||
v_operate: ''
|
||||
},
|
||||
{
|
||||
v_code: '123456',
|
||||
v_lease_scope: '2023/12/12',
|
||||
v_equipment_type: '挖掘机',
|
||||
v_equipment_name: '2023新版挖掘机',
|
||||
v_rent: '123/月',
|
||||
v_type: 3,
|
||||
v_operate: ''
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
// 编辑按钮
|
||||
const editRowInfo = (row: any) => {
|
||||
console.log(row, '编辑当前数据');
|
||||
|
||||
}
|
||||
// 删除按钮
|
||||
const deleteRowInfo = (row: any) => {
|
||||
console.log(row, '删除当前数据');
|
||||
|
||||
}
|
||||
|
||||
const tableProps = ref([
|
||||
{ v_label: '编码', v_props: 'v_code', v_slot: '', width: '' },
|
||||
{ v_label: '租赁范围', v_props: 'v_lease_scope', v_slot: '', width: '' },
|
||||
{ v_label: '装备类型', v_props: 'v_equipment_type', v_slot: '', width: '' },
|
||||
{ v_label: '装备名称', v_props: 'v_equipment_name', v_slot: '', width: '' },
|
||||
{ v_label: '租金', v_props: 'v_rent', v_slot: '', width: '' },
|
||||
{ v_label: '状态', v_props: 'v_type', v_slot: 'v_type', width: '' },
|
||||
{ v_label: '操作', v_props: 'v_operate', v_slot: 'operate', width: '140px' },
|
||||
])
|
||||
|
||||
const tableData = [
|
||||
{
|
||||
v_code: '123456',
|
||||
v_lease_scope: '2023/12/12',
|
||||
v_equipment_type: '挖掘机',
|
||||
v_equipment_name: '2023新版挖掘机',
|
||||
v_rent: '123/月',
|
||||
v_type: 1,
|
||||
v_operate: ''
|
||||
},
|
||||
{
|
||||
v_code: '123456',
|
||||
v_lease_scope: '2023/12/12',
|
||||
v_equipment_type: '挖掘机',
|
||||
v_equipment_name: '2023新版挖掘机',
|
||||
v_rent: '123/月',
|
||||
v_type: 2,
|
||||
v_operate: ''
|
||||
},
|
||||
{
|
||||
v_code: '123456',
|
||||
v_lease_scope: '2023/12/12',
|
||||
v_equipment_type: '挖掘机',
|
||||
v_equipment_name: '2023新版挖掘机',
|
||||
v_rent: '123/月',
|
||||
v_type: 3,
|
||||
v_operate: ''
|
||||
},
|
||||
{
|
||||
v_code: '123456',
|
||||
v_lease_scope: '2023/12/12',
|
||||
v_equipment_type: '挖掘机',
|
||||
v_equipment_name: '2023新版挖掘机',
|
||||
v_rent: '123/月',
|
||||
v_type: 3,
|
||||
v_operate: ''
|
||||
},
|
||||
{
|
||||
v_code: '123456',
|
||||
v_lease_scope: '2023/12/12',
|
||||
v_equipment_type: '挖掘机',
|
||||
v_equipment_name: '2023新版挖掘机',
|
||||
v_rent: '123/月',
|
||||
v_type: 3,
|
||||
v_operate: ''
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
// 表单 lable 数据
|
||||
const formItemList = ref([
|
||||
{ v_label: '编码', v_typ: 'ipt' },
|
||||
{ v_label: '状态', v_typ: 'ipt' },
|
||||
{ v_label: '租赁范围', v_typ: 'sel' },
|
||||
{ v_label: '装备类型', v_typ: 'sel' },
|
||||
{ v_label: '装备名称', v_typ: 'ipt' },
|
||||
])
|
||||
// 表单 lable 数据
|
||||
const formItemList = ref([
|
||||
{ v_label: '编码', v_typ: 'ipt' },
|
||||
{ v_label: '状态', v_typ: 'ipt' },
|
||||
{ v_label: '租赁范围', v_typ: 'sel' },
|
||||
{ v_label: '装备类型', v_typ: 'sel' },
|
||||
{ v_label: '装备名称', v_typ: 'ipt' }
|
||||
])
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -116,7 +110,6 @@ const formItemList = ref([
|
|||
<!-- 表格 -->
|
||||
|
||||
<TableComponent :tableProps="tableProps" :tableData="tableData" @getRowId="getRowId">
|
||||
|
||||
<template v-slot:v_type="{ row }">
|
||||
<el-tag v-if="row.v_type === 1" size="small" type="success">租赁中</el-tag>
|
||||
<el-tag v-if="row.v_type === 2" size="small" type="warning">已上架</el-tag>
|
||||
|
|
@ -126,14 +119,13 @@ const formItemList = ref([
|
|||
<el-button size="small" type="primary" @click="editRowInfo(row)">编辑</el-button>
|
||||
<el-button size="small" type="danger" @click="deleteRowInfo(row)">删除</el-button>
|
||||
</template>
|
||||
|
||||
</TableComponent>
|
||||
|
||||
<PagingComponent />
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.el-form {
|
||||
margin: 15px 0;
|
||||
}
|
||||
</style>
|
||||
.el-form {
|
||||
margin: 15px 0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue