<template>
    <el-cascader v-model="value" :options="options" :props="props" clearable></el-cascader>
</template>
<script>
import BuildController from "@/controller/old-adm/buildController";

export default {
    data() {
        return {
            value: [],
            props: {
                multiple: true,
                value: "id",
                label: "localName",
                children: "floor",
            },
            options: [],
        };
    },
    props: {
        floorId: {
            default: "",
        },
    },
    created() {},
    methods: {
        getCascader() {
            let param = {
                cascade: [{ name: "floor", orders: "floorSequenceID desc", filters: `id != '${this.floorId}'` }],
                pageNumber: 1,
                pageSize: 50,
            };
            BuildController.buildingQuery(param).then((res) => {
                this.options = res.content.filter((build) => build.floor);
            });
        },
    },
};
</script>
<style lang="less" scoped>
.el-cascader {
    width: 100%;
}
</style>
