车辆管理界面搭建
This commit is contained in:
@@ -1,27 +1,30 @@
|
||||
<template>
|
||||
<div class="p-2">
|
||||
<div class="h-full p-2 flex flex-col">
|
||||
<Pageheader title="房屋租赁"></Pageheader>
|
||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||
<div v-show="showSearch" class="mb-[10px]">
|
||||
<el-card shadow="hover">
|
||||
<el-form label-width="120px" ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="房屋用途" prop="houseUse">
|
||||
<el-select v-model="queryParams.houseUse" placeholder="选择房屋用途" style="width: 240px">
|
||||
<el-option v-for="item in com_house_use" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布人" prop="houseId">
|
||||
<el-input v-model="queryParams.rentalName" placeholder="请输入" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-card>
|
||||
<div class="h-full flex flex-align-center">
|
||||
<el-form label-width="120px" ref="queryFormRef" :model="queryParams" :inline="true">
|
||||
<el-form-item label="房屋用途" prop="houseUse">
|
||||
<el-select v-model="queryParams.houseUse" placeholder="选择房屋用途" style="width: 240px">
|
||||
<el-option v-for="item in com_house_use" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布人" prop="houseId">
|
||||
<el-input v-model="queryParams.rentalName" placeholder="请输入" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<el-card shadow="never">
|
||||
<el-card class="flex-1" shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
@@ -41,7 +44,7 @@
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-table v-loading="loading" border :data="houseRentalList" @selection-change="handleSelectionChange">
|
||||
<el-table class="h-full" v-loading="loading" border :data="houseRentalList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="房屋信息" align="center" prop="rentalName" />
|
||||
<el-table-column label="租赁状态" align="center" prop="rent" />
|
||||
@@ -86,6 +89,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="HouseRental" lang="ts">
|
||||
import Pageheader from '@/components/Pageheader/index.vue';
|
||||
import { listHouseRental, delHouseRental, addHouseRental, updateHouseRental } from '@/api/system/houseRental/index';
|
||||
import { HouseRentalVO, HouseRentalQuery, HouseRentalForm } from '@/api/system/houseRental/type';
|
||||
import { getDictLabel } from '@/utils/house';
|
||||
@@ -213,23 +217,6 @@ const handleUpdate = async (row?: HouseRentalVO) => {
|
||||
});
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
houseRentalFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
if (form.value.id) {
|
||||
await updateHouseRental(form.value).finally(() => (buttonLoading.value = false));
|
||||
} else {
|
||||
await addHouseRental(form.value).finally(() => (buttonLoading.value = false));
|
||||
}
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
await getList();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (row?: HouseRentalVO) => {
|
||||
const _ids = row?.id || ids.value;
|
||||
@@ -243,3 +230,5 @@ onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
Reference in New Issue
Block a user