页面路径完善
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="AddBuildingBox">
|
||||
<PageHeader :title="userid ? '编辑房屋租赁' : '添加房屋租赁'"></PageHeader>
|
||||
<PageHeader></PageHeader>
|
||||
<div class="AddBuildingBody">
|
||||
<div class="title">基本信息</div>
|
||||
<div class="addBuildingFormBody">
|
||||
|
||||
@@ -48,8 +48,7 @@
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">房屋设施:</div>
|
||||
<div class="value">
|
||||
<DictTag :options="com_house_rental_facilities" :value="HouseInfo.facilities"></DictTag>
|
||||
<span v-for="item in HouseInfo.facilitieslist" :key="item">{{ handlefacilities(item.name) }}</span>
|
||||
<span style="margin-right: 10px" v-for="item in HouseInfo.facilitieslist" :key="item">{{ handlefacilities(item) }} </span>
|
||||
</div>
|
||||
</div>
|
||||
<el-row>
|
||||
@@ -138,6 +137,7 @@ async function init() {
|
||||
getHouseRental(houseRentalid.value).then((res) => {
|
||||
HouseInfo.value = res.data;
|
||||
HouseInfo.value.facilitieslist = res.data.facilities.split(',').filter((item) => item);
|
||||
console.log(HouseInfo.value.facilitieslist);
|
||||
HouseInfo.value.houseImageUrls = HouseInfo.value.houseImageUrl.split(',').filter((item) => item);
|
||||
const arr = getHousePathById(treedata.value, HouseInfo.value.houseId, 'label');
|
||||
HouseInfo.value.house = arr.join(' - ');
|
||||
@@ -147,11 +147,13 @@ init();
|
||||
|
||||
function handlefacilities(id: string) {
|
||||
const find = housefacilities.value.find((item) => item.id === id);
|
||||
console.log(find, id);
|
||||
return find ? find.name : '';
|
||||
}
|
||||
|
||||
function hanlededit() {
|
||||
router.push({
|
||||
path: '/house/addhouseRental',
|
||||
path: '/house/edithouseRental',
|
||||
query: {
|
||||
id: HouseInfo.value.id
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ const handleAdd = () => {
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: HouseRentalVO) => {
|
||||
router.push({
|
||||
path: '/house/addhouseRental',
|
||||
path: '/house/edithouseRental',
|
||||
query: {
|
||||
id: row.id
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user