房屋详情待完善
This commit is contained in:
@@ -9,9 +9,9 @@ VITE_APP_ENV = 'development'
|
||||
# 开发环境
|
||||
VITE_APP_BASE_API = '/dev-api'
|
||||
# # 开发环境 接口代理地址
|
||||
# VITE_APP_PROXY_API = 'http://192.168.1.222:8080'
|
||||
VITE_APP_PROXY_API = 'http://192.168.1.222:8080'
|
||||
# 开发环境 接口代理地址
|
||||
VITE_APP_PROXY_API = 'http://192.168.0.239:8080'
|
||||
# VITE_APP_PROXY_API = 'http://192.168.0.239:8080'
|
||||
# 图片基础地址
|
||||
VITE_IMG_URL = 'http://192.168.1.222:8080'
|
||||
|
||||
|
||||
@@ -100,3 +100,69 @@ export function getVillageTree(id: string) {
|
||||
method: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
/** 根据小区id,获取当前小区的树状结构 */
|
||||
export function getHouseMain(id: string): Promise<Response> {
|
||||
return request({
|
||||
url: `/house/ByIdList?houseId=` + id,
|
||||
method: 'GET'
|
||||
});
|
||||
}
|
||||
|
||||
export interface Response {
|
||||
code: number;
|
||||
data: Data;
|
||||
msg: string;
|
||||
}
|
||||
|
||||
export interface Data {
|
||||
billResidentList: BillResidentList[];
|
||||
chargeItemList: string[];
|
||||
house: House;
|
||||
parking: null;
|
||||
residentList: ResidentList[];
|
||||
storeroom: Storeroom;
|
||||
}
|
||||
|
||||
export interface BillResidentList {
|
||||
billCode: string;
|
||||
billName: string;
|
||||
chargeItemId: string;
|
||||
chargeTypeName: string;
|
||||
money: string;
|
||||
payStatus: string;
|
||||
useCount: string;
|
||||
}
|
||||
|
||||
export interface House {
|
||||
buildingName: string;
|
||||
floorNo: number;
|
||||
houseArea: string;
|
||||
houseId: number;
|
||||
houseNo: string;
|
||||
houseType: string;
|
||||
internalArea: string;
|
||||
shareArea: string;
|
||||
unitNo: number;
|
||||
villageName: string;
|
||||
}
|
||||
|
||||
export interface ResidentList {
|
||||
gender: string;
|
||||
ownerRelationship: string;
|
||||
phone: string;
|
||||
residentId: string;
|
||||
residentName: string;
|
||||
residentStatus: string;
|
||||
residentType: string;
|
||||
}
|
||||
|
||||
export interface Storeroom {
|
||||
buildingName: string;
|
||||
houseArea: string;
|
||||
internalArea: string;
|
||||
shareArea: string;
|
||||
storeroomId: number;
|
||||
storeroomNo: string;
|
||||
unitNo: number;
|
||||
}
|
||||
|
||||
@@ -87,4 +87,6 @@ export interface addHouseType {
|
||||
'internalArea': string;
|
||||
'shareArea': string;
|
||||
'houseType': string;
|
||||
'storeroomId': string;
|
||||
'parkingId': string;
|
||||
}
|
||||
|
||||
@@ -65,10 +65,11 @@ export const delParking = (id: string | number | Array<string | number>) => {
|
||||
* 改变车位审核装填
|
||||
* @param id
|
||||
*/
|
||||
export const getParkingReview = (id: string) => {
|
||||
export const getParkingReview = (data: { id: string; propertyReviewFeedback: string; propertyStatus: number }) => {
|
||||
return request({
|
||||
url: '/parkingReview/checkStatus',
|
||||
method: 'POST'
|
||||
method: 'POST',
|
||||
data
|
||||
});
|
||||
};
|
||||
/**
|
||||
@@ -84,3 +85,15 @@ export const getParkingReviewInfo = (id: string) => {
|
||||
}
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 查询小区内车位列表
|
||||
* @param { string } villageid
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const GetVillageListParking = (villageid?: string): AxiosPromise<ParkingVO[]> => {
|
||||
return request({
|
||||
url: `/parking/getList/${villageid}`,
|
||||
method: 'GET'
|
||||
});
|
||||
};
|
||||
|
||||
@@ -61,3 +61,26 @@ export const delStoreroom = (id: string | number | Array<string | number>) => {
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
/**
|
||||
* 查询小区内储藏室管理列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const GetVillagelistStoreroom = (
|
||||
data: { villageid: string; unitNo: string; buildingId: string } = {
|
||||
villageid: null,
|
||||
buildingId: null,
|
||||
unitNo: null
|
||||
}
|
||||
): AxiosPromise<StoreroomVO[]> => {
|
||||
return request({
|
||||
url: `/storeroom/getList`,
|
||||
method: 'POST',
|
||||
data: {
|
||||
villageId: data.villageid,
|
||||
buildingId: data.buildingId,
|
||||
unitNo: data.unitNo
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 错误提示(和 Element Plus 原生完全一致) -->
|
||||
<div v-if="errorMessage" class="plate-error">{{ errorMessage }}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ const whiteVillageId = [
|
||||
'/payRecordList/payRecordList/list',
|
||||
|
||||
'/warehouse/*'
|
||||
// '/storeroom/getList/*'
|
||||
// 以后直接在这里加新地址,支持 /xxx/*、/xxx/xxx 写法
|
||||
];
|
||||
|
||||
|
||||
@@ -194,5 +194,5 @@ const weatherIcons: Record<number, string> = {
|
||||
};
|
||||
|
||||
export const getWeatherIcon = (weatherCode: string): string => {
|
||||
return weatherIcons[weatherCode] || weatherIcons[999];
|
||||
return weatherIcons[weatherCode] || weatherIcons[100];
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="AddBuildingBox">
|
||||
<PageHeader :title="houseid ? '编辑房屋' : '添加房屋'"></PageHeader>
|
||||
<PageHeader></PageHeader>
|
||||
<div class="AddBuildingBody">
|
||||
<div class="title">基本信息</div>
|
||||
<div class="addBuildingFormBody">
|
||||
@@ -11,7 +11,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单元" prop="unit">
|
||||
<el-select v-model.number="form.unitNo" placeholder="请选择">
|
||||
<el-select @change="changeUnitNo" v-model.number="form.unitNo" placeholder="请选择">
|
||||
<el-option v-for="item in units" :key="item.no" :label="item.name" :value="item.no" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -43,24 +43,24 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="房屋户型">
|
||||
<div class="houseTypebox">
|
||||
<el-input v-model="housetype[0]" placeholder="室" />
|
||||
<el-input v-model="housetype[0]" placeholder="房间" />
|
||||
<span>室</span>
|
||||
<el-input v-model="housetype[1]" placeholder="厅" />
|
||||
<el-input v-model="housetype[1]" placeholder="客厅" />
|
||||
<span>厅</span>
|
||||
<el-input v-model="housetype[2]" placeholder="卫" />
|
||||
<el-input v-model="housetype[2]" placeholder="卫生间" />
|
||||
<span>卫</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="车位号" prop="buildingAddress">
|
||||
<el-select v-model="form.ParkingSpaceNumber" class="m-2" placeholder="请选择车位号">
|
||||
<el-option v-for="item in building" :key="item.id" :label="item.name" :value="item.id" />
|
||||
<el-form-item label="车位号" prop="parkingId">
|
||||
<el-select v-model="form.parkingId" class="m-2" placeholder="请选择车位号">
|
||||
<el-option v-for="item in parkinglist" :key="item.id" :label="item.parkingName" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="储藏室" prop="buildingDescription">
|
||||
<el-select v-model="form.storeroom" class="m-2" placeholder="请选择储藏室">
|
||||
<el-option v-for="item in building" :key="item.id" :label="item.name" :value="item.id" />
|
||||
<el-form-item label="储藏室" prop="storeroomId">
|
||||
<el-select v-model="form.storeroomId" class="m-2" placeholder="请选择储藏室">
|
||||
<el-option v-for="item in storeRoomlist" :key="item.id" :label="item.storeroomName" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-top: 30px">
|
||||
<el-button type="primary" @click="submitForm">确定</el-button>
|
||||
<el-button @click="cancelForm">取消</el-button>
|
||||
@@ -77,6 +77,8 @@ import PageHeader from '@/components/Pageheader/index.vue';
|
||||
import { useHouseStore } from '@/store/modules/house';
|
||||
import { addHouseAPI, EditHouseApi, getBuildingOnly, getHouseApi, getHouselistAPI } from '@/api/system/house';
|
||||
import { addHouseType } from '@/api/system/house/type';
|
||||
import { GetVillageListParking, listParking } from '@/api/system/parking';
|
||||
import { GetVillagelistStoreroom, listStoreroom } from '@/api/system/storeroom';
|
||||
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
@@ -90,7 +92,9 @@ const form = ref<addHouseType>({
|
||||
houseArea: '', //建筑面积
|
||||
internalArea: '', //套内面积
|
||||
shareArea: '', // 公摊面积
|
||||
houseType: '' // 房屋户型
|
||||
houseType: '', // 房屋户型
|
||||
storeroomId: '', // 储藏室
|
||||
parkingId: '' // 车位
|
||||
});
|
||||
const rules = ref({
|
||||
buildingId: [{ required: true, message: '请输入楼栋', trigger: 'blur' }],
|
||||
@@ -107,27 +111,60 @@ const units = ref([]);
|
||||
const floors = ref([]);
|
||||
|
||||
const houseid = ref(null);
|
||||
if (route.query.id) {
|
||||
houseid.value = route.query.id;
|
||||
getHouseApi(houseid.value).then((res) => {
|
||||
form.value = {
|
||||
...form.value,
|
||||
buildingId: res.data.buildingId, // 楼栋id
|
||||
houseId: res.data.houseId, // 房屋id
|
||||
unitNo: res.data.unitNo,
|
||||
floorNo: res.data.floorNo,
|
||||
houseNo: res.data.houseNo, // 房间号
|
||||
houseArea: res.data.houseArea, //建筑面积
|
||||
internalArea: res.data.internalArea, //套内面积
|
||||
shareArea: res.data.shareArea // 公摊面积
|
||||
};
|
||||
housetype.value = res.data.houseType.split('');
|
||||
handlechangeBuild(form.value.buildingId);
|
||||
});
|
||||
}
|
||||
|
||||
// 车位列表
|
||||
const parkinglist = ref([]);
|
||||
// 储藏室列表
|
||||
const storeRoomlist = ref([]);
|
||||
|
||||
const queryChangestore = ref({
|
||||
// buildingId
|
||||
buildingId: null,
|
||||
// unitno,
|
||||
unitNo: null
|
||||
});
|
||||
// TODO 回显 车位,储藏, 以为后端筛选完出没人的房屋
|
||||
const villageid = localStorage.getItem('villageid');
|
||||
async function init() {
|
||||
const res = await GetVillageListParking(villageid);
|
||||
parkinglist.value = res.data;
|
||||
const res1 = await GetVillagelistStoreroom({
|
||||
...queryChangestore.value,
|
||||
villageid: villageid
|
||||
});
|
||||
storeRoomlist.value = res1.data;
|
||||
nextTick(() => geteditinfo());
|
||||
}
|
||||
init();
|
||||
|
||||
function geteditinfo() {
|
||||
if (route.query.id) {
|
||||
houseid.value = route.query.id;
|
||||
getHouseApi(houseid.value).then((res) => {
|
||||
form.value = {
|
||||
...form.value,
|
||||
buildingId: res.data.buildingId, // 楼栋id
|
||||
houseId: res.data.houseId, // 房屋id
|
||||
unitNo: res.data.unitNo,
|
||||
floorNo: res.data.floorNo,
|
||||
houseNo: res.data.houseNo, // 房间号
|
||||
houseArea: res.data.houseArea, //建筑面积
|
||||
internalArea: res.data.internalArea, //套内面积
|
||||
storeroomId: res.data.storeroomId, //储藏室
|
||||
parkingId: res.data.parkingId, //车位
|
||||
shareArea: res.data.shareArea // 公摊面积
|
||||
};
|
||||
housetype.value = res.data.houseType.split('');
|
||||
// handlechangeBuild(form.value.buildingId);
|
||||
console.log(housetype.value);
|
||||
});
|
||||
}
|
||||
}
|
||||
// 选择楼栋
|
||||
function handlechangeBuild(id: string) {
|
||||
queryChangestore.value.buildingId = id;
|
||||
form.value.unitNo = '';
|
||||
form.value.floorNo = '';
|
||||
getBuildingOnly(id).then((res) => {
|
||||
units.value = Array.from({ length: res.data.unitCount }).map((_, index) => {
|
||||
return {
|
||||
@@ -142,7 +179,28 @@ function handlechangeBuild(id: string) {
|
||||
};
|
||||
});
|
||||
});
|
||||
getStoreRoomlist();
|
||||
}
|
||||
|
||||
// change unit
|
||||
function changeUnitNo(id: number) {
|
||||
queryChangestore.value.unitNo = id;
|
||||
form.value.floorNo = '';
|
||||
getStoreRoomlist();
|
||||
}
|
||||
|
||||
// 查询储藏室列表
|
||||
function getStoreRoomlist() {
|
||||
GetVillagelistStoreroom({
|
||||
...queryChangestore.value,
|
||||
villageid: villageid
|
||||
}).then((res) => {
|
||||
form.value.storeroom = '';
|
||||
storeRoomlist.value = [];
|
||||
storeRoomlist.value = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
const submitForm = () => {
|
||||
formRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
|
||||
@@ -4,80 +4,81 @@
|
||||
<div class="AddBuildingBody">
|
||||
<div class="title">
|
||||
<span>基本信息</span>
|
||||
<el-button type="primary" text>编辑</el-button>
|
||||
<el-button type="primary" text @click="editHouse">编辑</el-button>
|
||||
</div>
|
||||
<div class="addBuildingFormBody">
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">房号:</div>
|
||||
<div class="value">娜美</div>
|
||||
<div class="value">{{ HouseInfo.house?.houseNo ?? '--' }}</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">所属小区:</div>
|
||||
<div class="value">18100000000</div>
|
||||
<div class="value">{{ HouseInfo.house?.villageName ?? '--' }}</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">楼栋:</div>
|
||||
<div class="value">2栋</div>
|
||||
<div class="value">{{ HouseInfo.house?.buildingName ?? '--' }}</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">单元:</div>
|
||||
<div class="value">2单元</div>
|
||||
<div class="value">{{ HouseInfo.house?.unitNo ?? '--' }} 单元</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">楼层:</div>
|
||||
<div class="value">3楼</div>
|
||||
<div class="value">{{ HouseInfo.house?.floorNo ?? '--' }} 层</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">建筑面积:</div>
|
||||
<div class="value">112㎡</div>
|
||||
<div class="value">{{ HouseInfo.house?.houseArea ?? '--' }}㎡</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">公摊面积:</div>
|
||||
<div class="value">12㎡</div>
|
||||
<div class="value">{{ HouseInfo.house?.shareArea ?? '--' }}㎡</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">户型:</div>
|
||||
<div class="value">3室2厅2卫</div>
|
||||
<div class="value">
|
||||
{{ HouseInfo.house?.houseType ? HouseInfo.house?.houseType.split('')[0] : '--' }}室
|
||||
{{ HouseInfo.house?.houseType ? HouseInfo.house?.houseType.split('')[1] : '--' }}厅
|
||||
{{ HouseInfo.house?.houseType ? HouseInfo.house?.houseType.split('')[2] : '--' }}卫
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 储藏室信息 -->
|
||||
<div class="AddBuildingBody">
|
||||
<div class="title">
|
||||
<span>储藏室信息 </span>
|
||||
<el-button type="primary" text>编辑</el-button>
|
||||
<el-button type="primary" text @click="editStoreRoom">编辑</el-button>
|
||||
</div>
|
||||
<div class="addBuildingFormBody">
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">房号:</div>
|
||||
<div class="value">娜美</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">所属小区:</div>
|
||||
<div class="value">18100000000</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">楼栋:</div>
|
||||
<div class="value">2栋</div>
|
||||
<div class="value">{{ HouseInfo.storeroom?.buildingName ?? '--' }}</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">单元:</div>
|
||||
<div class="value">2单元</div>
|
||||
<div class="value">{{ HouseInfo.storeroom?.unitNo ?? '--' }} 单元</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">楼层:</div>
|
||||
<div class="value">3楼</div>
|
||||
<div class="label">储藏室号:</div>
|
||||
<div class="value">{{ HouseInfo.storeroom?.unitNo ?? '--' }} 楼</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">建筑面积:</div>
|
||||
<div class="value">112㎡</div>
|
||||
<div class="value">{{ HouseInfo.storeroom?.houseArea ?? '--' }}㎡</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">公摊面积:</div>
|
||||
<div class="value">12㎡</div>
|
||||
<div class="value">{{ HouseInfo.storeroom?.shareArea ?? '--' }}㎡</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">户型:</div>
|
||||
<div class="value">3室2厅2卫</div>
|
||||
<div class="label">实用面积:</div>
|
||||
<div class="value">{{ HouseInfo.storeroom?.internalArea ?? '--' }}㎡</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">备注:</div>
|
||||
<div class="value"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -85,41 +86,52 @@
|
||||
<div class="AddBuildingBody">
|
||||
<div class="title">
|
||||
<span>车位信息</span>
|
||||
<el-button type="primary" text>编辑</el-button>
|
||||
<el-button type="primary" text @click="handleEditParking" v-if="HouseInfo.parking">编辑</el-button>
|
||||
</div>
|
||||
<div class="addBuildingFormBody">
|
||||
<div class="addBuildingFormBody" v-if="HouseInfo.parking">
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">房号:</div>
|
||||
<div class="value">娜美</div>
|
||||
<div class="label">区域:</div>
|
||||
<div class="value">{{ HouseInfo.storeroom?.shareArea ?? '--' }}</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">所属小区:</div>
|
||||
<div class="label">车位编号:</div>
|
||||
<div class="value">18100000000</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">楼栋:</div>
|
||||
<div class="label">车位面积:</div>
|
||||
<div class="value">2栋</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">单元:</div>
|
||||
<div class="label">楼层:</div>
|
||||
<div class="value">2单元</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">楼层:</div>
|
||||
<div class="label">车位类型:</div>
|
||||
<div class="value">3楼</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">建筑面积:</div>
|
||||
<div class="label">车位状态:</div>
|
||||
<div class="value">112㎡</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">公摊面积:</div>
|
||||
<div class="label">持有人:</div>
|
||||
<div class="value">12㎡</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">户型:</div>
|
||||
<div class="label">添加时间:</div>
|
||||
<div class="value">3室2厅2卫</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">添加人:</div>
|
||||
<div class="value">3室2厅2卫</div>
|
||||
</div>
|
||||
<div class="descriptionsbox">
|
||||
<div class="label">备注:</div>
|
||||
<div class="value"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="w-full h-full flex flex-center min-h-4rem">
|
||||
<span style="color: #999; font-weight: 500; font-size: 1.1rem; letter-spacing: 10px">暂无信息</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 收费项目 -->
|
||||
@@ -128,7 +140,7 @@
|
||||
<span>收费项目</span>
|
||||
</div>
|
||||
<div>
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table :data="HouseInfo.chargeItemList" style="width: 100%">
|
||||
<el-table-column prop="date" label="收费项目" />
|
||||
<el-table-column prop="name" label="收费标准" />
|
||||
<el-table-column prop="name" label="开始时间" />
|
||||
@@ -144,13 +156,20 @@
|
||||
<span>相关住户</span>
|
||||
</div>
|
||||
<div>
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column prop="date" label="姓名" />
|
||||
<el-table-column prop="name" label="性别" />
|
||||
<el-table-column prop="name" label="联系电话" />
|
||||
<el-table-column prop="name" label="身份" />
|
||||
<el-table :data="HouseInfo.residentList" style="width: 100%">
|
||||
<el-table-column prop="residentName" label="姓名" />
|
||||
<el-table-column prop="gender" label="性别">
|
||||
<template #default="scope">
|
||||
<DictTag :options="sys_user_sex" :value="scope.row.gender"></DictTag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="phone" label="联系电话" />
|
||||
<el-table-column prop="ownerRelationship" label="身份">
|
||||
<template #default="scope">
|
||||
<DictTag :options="com_resident_relationship" :value="scope.row.ownerRelationship"></DictTag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="备注" />
|
||||
<el-table-column prop="address" label="操作" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -160,13 +179,22 @@
|
||||
<span>缴费账单</span>
|
||||
</div>
|
||||
<div>
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column prop="date" label="姓名" />
|
||||
<el-table-column prop="name" label="性别" />
|
||||
<el-table-column prop="name" label="联系电话" />
|
||||
<el-table-column prop="name" label="身份" />
|
||||
<el-table-column prop="name" label="备注" />
|
||||
<el-table-column prop="address" label="操作" />
|
||||
<el-table :data="HouseInfo.billResidentList" align="center" style="width: 100%">
|
||||
<el-table-column prop="billCode" label="账单编号" />
|
||||
<el-table-column prop="billName" label="账单名称" />
|
||||
<el-table-column prop="chargeTypeName" label="账单项目" />
|
||||
<el-table-column prop="money" label="金额">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.chargeTypeName === '水费' || scope.row.chargeTypeName === '电费'">--</span>
|
||||
<span v-else>{{ scope.row.money }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="payStatus" label="支付状态">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.chargeTypeName === '水费' || scope.row.chargeTypeName === '电费'">--</span>
|
||||
<DictTag :options="com_pay_status" :value="scope.row.payStatus"></DictTag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -176,6 +204,12 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import PageHeader from '@/components/Pageheader/index.vue';
|
||||
import { Data, getHouseMain } from '@/api/system/house';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_resident_relationship } = toRefs<any>(proxy?.useDict('com_resident_relationship'));
|
||||
const { sys_user_sex } = toRefs<any>(proxy?.useDict('sys_user_sex'));
|
||||
const { com_pay_status } = toRefs<any>(proxy?.useDict('com_pay_status'));
|
||||
const tableData = [
|
||||
{
|
||||
date: '2016-05-03',
|
||||
@@ -198,6 +232,52 @@ const tableData = [
|
||||
address: 'No. 189, Grove St, Los Angeles'
|
||||
}
|
||||
];
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const routeid = ref('');
|
||||
|
||||
const HouseInfo = ref<Data>({
|
||||
billResidentList: [],
|
||||
chargeItemList: [],
|
||||
house: null,
|
||||
parking: null,
|
||||
residentList: [],
|
||||
storeroom: null
|
||||
});
|
||||
function editHouse() {
|
||||
router.push({
|
||||
path: '/house/editHouse',
|
||||
query: {
|
||||
id: HouseInfo.value.house.houseId
|
||||
}
|
||||
});
|
||||
}
|
||||
function editStoreRoom() {
|
||||
router.push({
|
||||
path: '/house/EditStoreRoom',
|
||||
query: {
|
||||
id: HouseInfo.value.storeroom.storeroomId
|
||||
}
|
||||
});
|
||||
}
|
||||
function handleEditParking() {
|
||||
router.push({
|
||||
path: '/house/editParking',
|
||||
query: {
|
||||
id: HouseInfo.value.parking.parkingId
|
||||
}
|
||||
});
|
||||
}
|
||||
function init() {
|
||||
if (route.query.id) {
|
||||
routeid.value = route.query.id as string;
|
||||
getHouseMain(routeid.value).then((res) => {
|
||||
console.log(res);
|
||||
HouseInfo.value = res.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
init();
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -39,15 +39,15 @@ const menutlist = [
|
||||
// { label: '详情', value: 'main' }
|
||||
];
|
||||
|
||||
if (checkPermi(['system:house:remove'])) {
|
||||
menutlist.push({ label: '删除', value: 'delete' });
|
||||
}
|
||||
if (checkPermi(['system:house:edit'])) {
|
||||
menutlist.push({ label: '编辑', value: 'edit' });
|
||||
}
|
||||
if (checkPermi(['system:house:query'])) {
|
||||
if (checkPermi(['system:house:ByIdList'])) {
|
||||
menutlist.push({ label: '详情', value: 'main' });
|
||||
}
|
||||
if (checkPermi(['system:house:remove'])) {
|
||||
menutlist.push({ label: '删除', value: 'delete' });
|
||||
}
|
||||
function handleChangeCheckhouses(val: string[]) {
|
||||
houseStore.checkoutHousesFun([]);
|
||||
houseStore.checkoutHousesFun(val);
|
||||
@@ -76,7 +76,6 @@ function contextMenuFun(val: { type: string; value: string }) {
|
||||
if (!checkPermi(['house:delete:house'])) {
|
||||
break;
|
||||
}
|
||||
|
||||
proxy?.$modal.confirm('该信息删除后无法恢复,确定要删除吗?').then(() => {
|
||||
deleteHouseApi(val.value).then(() => {
|
||||
houseStore.switchBuilding(houseStore.currentBuildingInfo.id);
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
export interface Response {
|
||||
code: number;
|
||||
data: Data;
|
||||
msg: string;
|
||||
}
|
||||
|
||||
export interface Data {
|
||||
billResidentList: BillResidentList[];
|
||||
chargeItemList: string[];
|
||||
house: House;
|
||||
parking: null;
|
||||
residentList: ResidentList[];
|
||||
storeroom: Storeroom;
|
||||
}
|
||||
|
||||
export interface BillResidentList {
|
||||
billCode: string;
|
||||
billName: string;
|
||||
chargeItemId: string;
|
||||
chargeTypeName: string;
|
||||
money: string;
|
||||
payStatus: string;
|
||||
useCount: string;
|
||||
}
|
||||
|
||||
export interface House {
|
||||
buildingName: string;
|
||||
floorNo: number;
|
||||
houseArea: string;
|
||||
houseId: number;
|
||||
houseNo: string;
|
||||
houseType: string;
|
||||
internalArea: string;
|
||||
shareArea: string;
|
||||
unitNo: number;
|
||||
villageName: string;
|
||||
}
|
||||
|
||||
export interface ResidentList {
|
||||
gender: string;
|
||||
ownerRelationship: string;
|
||||
phone: string;
|
||||
residentId: string;
|
||||
residentName: string;
|
||||
residentStatus: string;
|
||||
residentType: string;
|
||||
}
|
||||
|
||||
export interface Storeroom {
|
||||
buildingName: string;
|
||||
houseArea: string;
|
||||
internalArea: string;
|
||||
shareArea: string;
|
||||
storeroomId: number;
|
||||
storeroomNo: string;
|
||||
unitNo: number;
|
||||
}
|
||||
|
||||
@@ -70,15 +70,9 @@
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" width="180">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button v-hasPermi="['system:menu:edit']" link type="primary" icon="Edit" @click="handleUpdate(scope.row)" />
|
||||
</el-tooltip>
|
||||
<el-tooltip content="新增" placement="top">
|
||||
<el-button v-hasPermi="['system:menu:add']" link type="primary" icon="Plus" @click="handleAdd(scope.row)" />
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button v-hasPermi="['system:menu:remove']" link type="primary" icon="Delete" @click="handleDelete(scope.row)" />
|
||||
</el-tooltip>
|
||||
<el-button v-hasPermi="['system:menu:edit']" link type="primary" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button v-hasPermi="['system:menu:add']" link type="primary" @click="handleAdd(scope.row)">新增</el-button>
|
||||
<el-button v-hasPermi="['system:menu:remove']" link type="primary" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
<el-table-column label="车位面积" align="center" prop="parkingArea">
|
||||
<template #default="scope"> {{ scope.row.parkingArea }}㎡ </template>
|
||||
</el-table-column>
|
||||
<el-table-column label="楼层" align="center" prop="parkingFloor" />
|
||||
<el-table-column label="车位状态" align="center" prop="parkingStatus">
|
||||
<el-table-column label="楼层" width="80" align="center" prop="parkingFloor" />
|
||||
<el-table-column label="车位状态" width="80" align="center" prop="parkingStatus">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="com_parking_status" :value="scope.row.parkingStatus" />
|
||||
</template>
|
||||
@@ -80,8 +80,8 @@
|
||||
<dict-tag :options="com_review" :value="scope.row.checkStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="180" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" v-if="scope.row.checkStatus === '0'" @click="handleMain(scope.row)" v-hasPermi="['parking:parking:query']"
|
||||
>审核</el-button
|
||||
|
||||
@@ -133,10 +133,14 @@
|
||||
<div class="w-full h-full flex mt-2">
|
||||
<div class="title">审批意见</div>
|
||||
<div class="preivewBodybox flex-1 ml-5">
|
||||
<el-input type="textarea" :rows="5"></el-input>
|
||||
<el-input v-model="form.propertyReviewFeedback" type="textarea" :rows="5"></el-input>
|
||||
<div class="actions mt-5">
|
||||
<el-button type="primary">审核通过</el-button>
|
||||
<el-button type="danger">审核不通过</el-button>
|
||||
<el-button :disabled="!Boolean(parkingReviewinfo.car && parkingReviewinfo.parking.id)" type="primary" @click="handlePreivew(1)"
|
||||
>审核通过</el-button
|
||||
>
|
||||
<el-button :disabled="!Boolean(parkingReviewinfo.car && parkingReviewinfo.parking.id)" type="danger" @click="handlePreivew(0)"
|
||||
>审核不通过</el-button
|
||||
>
|
||||
<el-button @click="handlBacK">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -177,7 +181,8 @@
|
||||
</el-step>
|
||||
<el-step>
|
||||
<template #title>
|
||||
<span>审核完成</span>
|
||||
<span v-if="active <= 5">审核未完成</span>
|
||||
<span v-else>审核完成</span>
|
||||
</template>
|
||||
</el-step>
|
||||
</el-steps>
|
||||
@@ -191,7 +196,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import PageHeader from '@/components/Pageheader/index.vue';
|
||||
import { getParkingReviewInfo } from '@/api/system/parking';
|
||||
import { getParkingReview, getParkingReviewInfo } from '@/api/system/parking';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_parking_status } = toRefs<any>(proxy?.useDict('com_parking_status'));
|
||||
@@ -222,7 +227,38 @@ const router = useRouter();
|
||||
const route = useRoute();
|
||||
const id = ref('');
|
||||
|
||||
const parkingReviewinfo = ref({
|
||||
type parkingReviewType = {
|
||||
parking: {
|
||||
id: string;
|
||||
areaId: string;
|
||||
areaName: string;
|
||||
villageId: string;
|
||||
villageName: string;
|
||||
parkingCode: string;
|
||||
parkingArea: any;
|
||||
parkingStatus: string;
|
||||
type: string;
|
||||
residentId: any;
|
||||
residentName: any;
|
||||
parkingFloor: string;
|
||||
createName: string;
|
||||
checkStatus: string;
|
||||
remark: string;
|
||||
createTime: string;
|
||||
delFlag: any;
|
||||
};
|
||||
car: any;
|
||||
parkingReviewProcess: {
|
||||
submitStatus: null;
|
||||
propertyStatus: null;
|
||||
certificationStatus: null;
|
||||
submitTime: string;
|
||||
propertyTime: string;
|
||||
certificationTime: string;
|
||||
};
|
||||
};
|
||||
|
||||
const parkingReviewinfo = ref<parkingReviewType>({
|
||||
parking: {
|
||||
'id': '',
|
||||
'areaId': '',
|
||||
@@ -253,6 +289,10 @@ const parkingReviewinfo = ref({
|
||||
}
|
||||
});
|
||||
|
||||
const form = ref({
|
||||
propertyReviewFeedback: '',
|
||||
propertyStatus: '0'
|
||||
});
|
||||
function getInfo() {
|
||||
if (route.query.id) {
|
||||
id.value = route.query.id as string;
|
||||
@@ -270,6 +310,7 @@ function handleActivestaus(rews) {
|
||||
active.value = 0;
|
||||
return;
|
||||
}
|
||||
// 提交
|
||||
if (rews.submitStatus === reviewStatus.unSubmit) {
|
||||
activeStop.value = 0;
|
||||
active.value = 0;
|
||||
@@ -285,6 +326,7 @@ function handleActivestaus(rews) {
|
||||
active.value = reviewStatus.ReviewPass;
|
||||
activeStop.value = 2;
|
||||
|
||||
// 审核
|
||||
if (rews.certificationStatus === 0) {
|
||||
active.value = reviewStatus.uncertification;
|
||||
} else if (rews.certificationStatus === 1) {
|
||||
@@ -295,6 +337,17 @@ function handleActivestaus(rews) {
|
||||
}
|
||||
}
|
||||
|
||||
// 审核状态
|
||||
// 物业审核状态 0 待审核 1审核通过 2审核未通过
|
||||
function handlePreivew(status: number) {
|
||||
getParkingReview({
|
||||
...form.value,
|
||||
propertyStatus: status,
|
||||
id: id.value
|
||||
}).then((res) => {
|
||||
console.log(res);
|
||||
});
|
||||
}
|
||||
function handlBacK() {
|
||||
router.back();
|
||||
}
|
||||
|
||||
@@ -66,17 +66,11 @@
|
||||
<div :title="`${weather_icon.title} ${weather_icon.wind_direction} ${weather_icon.wind_power} 温度${weather_icon.temperature}°C`">
|
||||
{{ getWeatherIcon(weather_icon.iconvalue) }}
|
||||
</div>
|
||||
<!-- <el-image :src="summicon"></el-image> -->
|
||||
<!-- <svg xmlns="http://www.w3.org/2000/svg" color="white" width="70" height="70" fill="currentColor" class="qi-100" viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M7.655 2.357a.5.5 0 0 0 .854-.353v-1.5a.5.5 0 0 0-1 0v1.5a.5.5 0 0 0 .146.353Zm-4.08 1.861c.06.026.126.039.191.039l.001-.001a.5.5 0 0 0 .355-.855l-1.064-1.06a.5.5 0 0 0-.707.708l1.062 1.06a.498.498 0 0 0 .162.11ZM.503 8.496h1.5a.5.5 0 1 0 0-1h-1.5a.5.5 0 0 0 0 1Zm1.914 5.221a.501.501 0 0 0 .631-.063l1.063-1.06a.5.5 0 0 0-.708-.707l-1.062 1.06a.5.5 0 0 0 .076.77Zm5.225 2.14a.5.5 0 0 0 .854-.354v-1.5a.5.5 0 0 0-1 0v1.5a.5.5 0 0 0 .146.354Zm5.467-2.084a.5.5 0 0 0 .544-.816l-1.06-1.06a.498.498 0 0 0-.832.152.5.5 0 0 0 .126.555l1.06 1.06a.496.496 0 0 0 .162.109Zm.893-5.263h1.5a.5.5 0 1 0 0-1h-1.5a.5.5 0 0 0 0 1Zm-2.031-4.327a.5.5 0 0 0 .633-.063l1.06-1.06a.5.5 0 1 0-.708-.708l-1.06 1.06a.5.5 0 0 0 .075.77Zm-6.466.075a4.5 4.5 0 1 1 5 7.484 4.5 4.5 0 0 1-5-7.484Zm4.445.832a3.5 3.5 0 1 0-3.89 5.82 3.5 3.5 0 0 0 3.89-5.82Z"
|
||||
/>
|
||||
</svg> -->
|
||||
</div>
|
||||
<div class="villageinfo">
|
||||
<div class="villagename">{{ villageinfo.villageName }}</div>
|
||||
<div class="week">
|
||||
<span>{{ new Date().toLocaleDateString().replaceAll('/', '-') }}</span>
|
||||
<span style="padding-right: 10px">{{ new Date().toLocaleDateString().replaceAll('/', '-') }}</span>
|
||||
<span>{{ numToWeek2(new Date().getDay()) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -115,9 +109,13 @@
|
||||
<div class="body flex-1">
|
||||
<div class="quicly_box" v-if="Sideactive === 1">
|
||||
<div class="quickly_item" v-for="(item, index) in quickBox" :key="index" @click="handleRouter(item.url)">
|
||||
<div class="quickly_item_icon">
|
||||
<div class="quickly_item_icon" v-if="item.img">
|
||||
<el-image :src="item.img"></el-image>
|
||||
</div>
|
||||
<div class="quickly_item_icon" v-else-if="item.svg">
|
||||
<svg-icon :icon-class="item.svg" />
|
||||
</div>
|
||||
|
||||
<div class="quickly_item_content">{{ item.name }}</div>
|
||||
</div>
|
||||
<div @click="addQuieckDialog" class="quickly_item add">
|
||||
@@ -232,31 +230,27 @@
|
||||
<!-- 添加快捷入口 -->
|
||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="repairProjectFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<!-- <el-form-item label="名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="图标" prop="icon">
|
||||
<el-input v-model="form.icon" placeholder="请输入" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="页面" prop="path">
|
||||
<el-input v-model="form.path" placeholder="请输入" />
|
||||
<el-tree
|
||||
ref="menuRef"
|
||||
class="tree-border"
|
||||
:data="menuOptions"
|
||||
show-checkbox
|
||||
node-key="id"
|
||||
:check-strictly="false"
|
||||
empty-text="加载中,请稍候"
|
||||
:props="{ label: 'label', children: 'children' }"
|
||||
>
|
||||
</el-tree>
|
||||
<el-form-item label="展示页面" prop="path">
|
||||
<!-- <el-input v-model="form.path" placeholder="请输入" /> -->
|
||||
<el-cascader
|
||||
@change="handleCascader"
|
||||
clearable
|
||||
:props="{ value: 'path', label: 'name', children: 'children' }"
|
||||
v-model="form.path"
|
||||
:options="quicklylist"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<!-- <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button> -->
|
||||
<el-button type="primary">确 定</el-button>
|
||||
<el-button>取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -264,7 +258,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import summicon from '@/assets/images/index/summer.png';
|
||||
import repairEcharts from './components/repairEcharts.vue';
|
||||
import { delResident, listResident } from '@/api/system/resident';
|
||||
import { useHouseStore } from '@/store/modules/house';
|
||||
@@ -291,14 +284,13 @@ import info from './assets/info.png';
|
||||
import profile from './assets/profile.png';
|
||||
import star from './assets/star.png';
|
||||
|
||||
import { roleMenuTreeselect, treeselect as menuTreeselect } from '@/api/system/menu/index';
|
||||
import { UploadUserFile } from 'element-plus';
|
||||
import { getVillageByIdAPI } from '@/api/system/community';
|
||||
import { getLast7Days, numToWeek2 } from '@/utils/time';
|
||||
import { EChartsOption } from 'echarts';
|
||||
import { workSpaceIncomeTrendListApi, workSpaceTotalListApi, workSpaceWeatherApi } from '@/api/workflow';
|
||||
import { getWeatherIcon } from '@/utils/weather';
|
||||
import { MenuTreeOption, RoleMenuTree } from '@/api/system/menu/types';
|
||||
import { MenuTreeOption } from '@/api/system/menu/types';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_resident_type } = toRefs<any>(proxy?.useDict('com_resident_type'));
|
||||
@@ -501,7 +493,14 @@ function handleSelect(val: number) {
|
||||
}
|
||||
// ! 侧边栏
|
||||
// ! 快捷入口
|
||||
const quickBox = ref([
|
||||
const quickBox = ref<
|
||||
{
|
||||
name: string;
|
||||
url: string;
|
||||
img: string;
|
||||
svg?: string;
|
||||
}[]
|
||||
>([
|
||||
{
|
||||
name: '新建用户',
|
||||
url: '/house/resident',
|
||||
@@ -554,6 +553,7 @@ const rules = {
|
||||
name: [{ required: true, trigger: 'blur', message: '请输入快捷入口名称' }],
|
||||
path: [{ required: true, trigger: 'blur', message: '请选择快捷入口页面' }]
|
||||
};
|
||||
const quicklylist = ref([]);
|
||||
function addQuieckDialog() {
|
||||
form.value = {
|
||||
name: '',
|
||||
@@ -562,54 +562,76 @@ function addQuieckDialog() {
|
||||
};
|
||||
const permissionStore = usePermissionStore();
|
||||
const routes = permissionStore.getDefaultRoutes();
|
||||
console.log(routes);
|
||||
handleroutestoshowlist(routes);
|
||||
dialog.visible = true;
|
||||
}
|
||||
function handleroutestoshowlist(rotues) {
|
||||
function _hanle(parentRoute, currentroute, level) {
|
||||
console.log(currentroute, level);
|
||||
let obj: {
|
||||
name: string;
|
||||
icon: string;
|
||||
path: string;
|
||||
level: number;
|
||||
children: unknown[];
|
||||
} = {};
|
||||
// 非页面路由和 二级路由
|
||||
if (currentroute.hidden || level === 2) {
|
||||
// 1. 输入校验:确保 routes 是数组
|
||||
if (!Array.isArray(rotues)) {
|
||||
return [];
|
||||
}
|
||||
const arr = rotues.map((ele) => _hanle(null, ele, 1)).filter((item) => item);
|
||||
console.log(arr);
|
||||
quicklylist.value = arr;
|
||||
}
|
||||
function _hanle(parentRoute, currentRoute, level) {
|
||||
// 非页面路由
|
||||
if (currentRoute.hidden && level === 1) {
|
||||
return null;
|
||||
}
|
||||
// 2. 辅助判断:排除常见的非列表/首页关键词(根据业务需求调整)
|
||||
// 使用正则边界匹配,避免误伤 (如 'main' 不匹配 'domain')
|
||||
const excludeKeywords = /(edit|main|Main|view)/i;
|
||||
if (excludeKeywords.test(currentRoute.path)) {
|
||||
return null;
|
||||
}
|
||||
if (!currentRoute.meta) {
|
||||
if (currentRoute.children && currentRoute.children.length > 0) {
|
||||
return null;
|
||||
}
|
||||
if (currentroute.meta) {
|
||||
obj = {
|
||||
name: currentroute.meta.title,
|
||||
icon: currentroute.meta.icon,
|
||||
path: currentroute.path,
|
||||
level: level,
|
||||
children: []
|
||||
};
|
||||
} else if (currentroute.path === '/') {
|
||||
obj = {
|
||||
name: '',
|
||||
icon: currentroute.meta.icon,
|
||||
path: currentroute.path,
|
||||
level: level,
|
||||
children: []
|
||||
};
|
||||
}
|
||||
// 传过来父级path 拼接
|
||||
if (parentRoute) {
|
||||
obj.path = parentRoute.path + '/' + currentroute.path;
|
||||
}
|
||||
// 没有按钮第三级 普遍是 删除按钮操作
|
||||
if (level < 2) {
|
||||
obj.children = currentroute.children.map((item) => _hanle(obj, item, level + 1)).filter((item) => item);
|
||||
}
|
||||
|
||||
return obj;
|
||||
return null;
|
||||
}
|
||||
const obj = {
|
||||
name: currentRoute.meta.title || '',
|
||||
icon: currentRoute.meta.icon || '',
|
||||
path: currentRoute.path,
|
||||
level: level,
|
||||
children: []
|
||||
};
|
||||
|
||||
// 3. 路径拼接
|
||||
if (parentRoute) {
|
||||
if (currentRoute.path.startsWith('/')) {
|
||||
obj.path = currentRoute.path;
|
||||
} else {
|
||||
const parentPath = parentRoute.path.endsWith('/') ? parentRoute.path.slice(0, -1) : parentRoute.path;
|
||||
const childPath = currentRoute.path.startsWith('/') ? currentRoute.path : '/' + currentRoute.path;
|
||||
obj.path = parentPath + childPath;
|
||||
}
|
||||
}
|
||||
// 4. 递归处理子节点
|
||||
if (level < 2 && currentRoute.children && Array.isArray(currentRoute.children)) {
|
||||
obj.children = currentRoute.children.map((item) => _hanle(obj, item, level + 1)).filter((item) => item !== null); // 过滤掉 null 值
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
function handleCascader(val) {
|
||||
const parentpath = val[0];
|
||||
const childrenpath = val[1];
|
||||
const find = quicklylist.value.find((item) => item.path === parentpath);
|
||||
if (find) {
|
||||
const find2 = find.children.find((item) => item.path === childrenpath);
|
||||
if (find2) {
|
||||
console.log('>>> find2 <<<', find2);
|
||||
quickBox.value.push({
|
||||
name: find2.name,
|
||||
img: null,
|
||||
svg: find2.icon,
|
||||
url: find2.path
|
||||
});
|
||||
}
|
||||
}
|
||||
// const arr = rotues.map((ele) => _hanle(null, ele, 1)).filter((item) => item);
|
||||
// console.log(arr);
|
||||
}
|
||||
// ! 快捷入口
|
||||
|
||||
@@ -866,11 +888,13 @@ async function deleteFun(row) {
|
||||
.iconbox {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
font-size: 70px;
|
||||
text-align: center;
|
||||
margin-right: 20px;
|
||||
font-size: 60px;
|
||||
line-height: 70px;
|
||||
position: relative;
|
||||
cursor: default;
|
||||
z-index: 2;
|
||||
cursor: default;
|
||||
}
|
||||
.villageinfo {
|
||||
margin-left: 20px;
|
||||
@@ -982,12 +1006,20 @@ async function deleteFun(row) {
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
.quicly_box {
|
||||
max-height: 410px;
|
||||
overflow-y: auto;
|
||||
padding-top: 20px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
@media (max-width: 1750px) {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
@media (max-width: 1600px) {
|
||||
max-height: 550px;
|
||||
}
|
||||
@media (max-width: 1200px) {
|
||||
max-height: 550px;
|
||||
}
|
||||
gap: 10px;
|
||||
|
||||
.quickly_item {
|
||||
@@ -1009,9 +1041,9 @@ async function deleteFun(row) {
|
||||
.quickly_item_icon {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
.quickly_item_content {
|
||||
margin-left: 8px;
|
||||
font-weight: 500;
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user