同步6/16
This commit is contained in:
@@ -13,8 +13,8 @@
|
||||
</el-col>
|
||||
<el-col :span="2"></el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="租户姓名" prop="rentalName">
|
||||
<el-input v-model="form.rentalName" placeholder="请输入住户姓名" />
|
||||
<el-form-item label="业主姓名" prop="rentalName">
|
||||
<el-input disabled v-model="form.rentalName" placeholder="请输入业主姓名" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -94,7 +94,7 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="房屋设施" prop="type">
|
||||
<div class="housedevicesbox">
|
||||
<div class="housedevicesbox" v-if="housefacilities.length > 0">
|
||||
<div
|
||||
v-for="item in housefacilities"
|
||||
:key="item.id"
|
||||
@@ -108,6 +108,7 @@
|
||||
<span class="ml-2">{{ item.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<span v-else style="color: gray"> 无</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -181,7 +182,7 @@ import { HouseRentalVO } from '@/api/system/houseRental/type';
|
||||
import { CascaderValue, UploadInstance, UploadProps, UploadUserFile } from 'element-plus';
|
||||
|
||||
import { getHousePathById, hasFormData, splitStringUrl } from '@/utils/house';
|
||||
import { addHouseRental, getHouseRental, updateHouseRental, uploadHouseImage } from '@/api/system/houseRental';
|
||||
import { addHouseRental, getHouseOwnUser, getHouseRental, updateHouseRental, uploadHouseImage } from '@/api/system/houseRental';
|
||||
import { validator } from '@/utils/Reg';
|
||||
import { useHouseStore } from '@/store/modules/house';
|
||||
import { listHouseFacilities } from '@/api/system/HouseFacilities';
|
||||
@@ -241,7 +242,12 @@ const housefacilities = ref([]);
|
||||
// !== 楼栋房屋 =============================================================================
|
||||
async function gettreedata() {
|
||||
const reslist = await listHouseFacilities();
|
||||
housefacilities.value = reslist.rows;
|
||||
housefacilities.value = reslist.rows
|
||||
.map((item) => {
|
||||
if (item.status !== '1') return item;
|
||||
return false;
|
||||
})
|
||||
.filter((item) => item !== false);
|
||||
|
||||
treedata.value = await houseStore.getCurrentVilageTreeHouse();
|
||||
if (route.query.id) {
|
||||
@@ -265,6 +271,10 @@ gettreedata();
|
||||
function handleChange(val: CascaderValue) {
|
||||
userHousepath.value = val;
|
||||
form.value.houseId = val[2];
|
||||
|
||||
getHouseOwnUser(val[2]).then((res) => {
|
||||
form.value.rentalName = res.msg;
|
||||
});
|
||||
}
|
||||
// !== 上传文件 =============================================================================
|
||||
const fileList = ref<UploadUserFile[]>([]);
|
||||
|
||||
@@ -51,12 +51,23 @@
|
||||
<span style="margin-right: 10px" v-for="item in HouseInfo.facilitieslist" :key="item">{{ handlefacilities(item) }} </span>
|
||||
</div>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-row :span="24">
|
||||
<el-col :span="24">
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">房屋照片:</div>
|
||||
<div class="value grid grid-cols-4 gap-4">
|
||||
<el-image v-for="(item, index) in HouseInfo.houseImageUrls" :key="index" :src="splitImages(item)" class="houseImage"></el-image>
|
||||
<div class="value">
|
||||
<el-image
|
||||
v-for="(item, index) in HouseInfo.houseImageUrls"
|
||||
:key="index"
|
||||
:zoom-rate="1.2"
|
||||
:max-scale="7"
|
||||
:min-scale="0.2"
|
||||
:src="item"
|
||||
:preview-src-list="HouseInfo.houseImageUrls"
|
||||
show-progress
|
||||
:initial-index="0"
|
||||
class="houseImage"
|
||||
></el-image>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
@@ -199,6 +210,8 @@ function handlBack() {
|
||||
.houseImage {
|
||||
width: 200px;
|
||||
height: 100px;
|
||||
margin: 10px 5px;
|
||||
object-fit: cover;
|
||||
}
|
||||
.descriptionsbox {
|
||||
display: flex;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<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-form-item label="发布人" prop="rentalName">
|
||||
<el-input v-model="queryParams.rentalName" placeholder="请输入" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -163,10 +163,14 @@ const { queryParams, form } = toRefs(data);
|
||||
/** 查询房屋租赁管理列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listHouseRental(queryParams.value);
|
||||
houseRentalList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
listHouseRental(queryParams.value)
|
||||
.then((res) => {
|
||||
houseRentalList.value = res.rows;
|
||||
total.value = res.total;
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
@@ -190,6 +194,8 @@ const handleQuery = () => {
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value?.resetFields();
|
||||
queryParams.value.houseUse = '';
|
||||
queryParams.value.rentalName = '';
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
@@ -209,7 +215,7 @@ const handleAdd = () => {
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: HouseRentalVO) => {
|
||||
const id = row.id || ids.value[0];
|
||||
const id = row?.id || ids.value[0];
|
||||
router.push({
|
||||
path: '/house/edithouseRental',
|
||||
query: {
|
||||
|
||||
Reference in New Issue
Block a user