新增数据,开始安全巡检模块

This commit is contained in:
Zy
2026-04-17 19:39:21 +08:00
parent 4184f1c55d
commit 9a95e2b7e3
74 changed files with 1942 additions and 403 deletions

View File

@@ -2,9 +2,12 @@
<div class="AddBuildingBox">
<PageHeader title="房屋租赁管理"></PageHeader>
<div class="AddBuildingBody">
<div class="title">
<span>基础资料 </span>
<span class="ml-20px color-blue cursor-pointer" @click="hanlededit">编辑</span>
<div class="title flex flex-items-center flex-justify-between">
<div>
<span>基础资料 </span>
<span class="ml-20px color-blue cursor-pointer" @click="hanlededit">编辑</span>
</div>
<el-button @click="handlBack" class="mr-10px">返回</el-button>
</div>
<div class="addBuildingFormBody">
<div class="descriptionsbox">
@@ -46,6 +49,7 @@
<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>
</div>
</div>
<el-row>
@@ -86,6 +90,7 @@ import PageHeader from '@/components/Pageheader/index.vue';
import { getHouseRental } from '@/api/system/houseRental';
import { useHouseStore } from '@/store/modules/house';
import { getHousePathById } from '@/utils/house';
import { listHouseFacilities } from '@/api/system/HouseFacilities';
const houseStore = useHouseStore();
const { treedata } = storeToRefs(houseStore);
@@ -97,8 +102,7 @@ const route = useRoute();
const router = useRouter();
const houseRentalid = ref(null);
const HouseInfo = ref({
'id': '',
house: '',
'house': '',
'name': null,
'rentalStatus': null,
'rentalName': '',
@@ -118,14 +122,21 @@ const HouseInfo = ref({
'houseUse': '',
'pubBy': null,
'pubTime': '',
houseImageUrls: []
'facilitieslist': [],
'houseImageUrls': []
});
function init() {
const housefacilities = ref([]);
async function init() {
if (route.query.id) {
houseRentalid.value = route.query.id;
}
const reslist = await listHouseFacilities();
housefacilities.value = reslist.rows;
getHouseRental(houseRentalid.value).then((res) => {
HouseInfo.value = res.data;
HouseInfo.value.facilitieslist = res.data.facilities.split(',').filter((item) => item);
HouseInfo.value.houseImageUrls = HouseInfo.value.houseImageUrl.split(',').filter((item) => item);
const arr = getHousePathById(treedata.value, HouseInfo.value.houseId, 'label');
HouseInfo.value.house = arr.join(' - ');
@@ -133,6 +144,10 @@ function init() {
}
init();
function handlefacilities(id: string) {
const find = housefacilities.value.find((item) => item.id === id);
}
function hanlededit() {
router.push({
path: '/house/addhouseRental',
@@ -141,6 +156,12 @@ function hanlededit() {
}
});
}
function handlBack() {
router.push({
path: '/house/houseRental'
});
}
</script>
<style scoped lang="scss">