<template>
    <el-cascader v-model="value" :options="options" :props="props" clearable></el-cascader>
</template>
<script>
// import { buildingQuery } from "@/api/scan/request";
import { buildingQuery } from "@/api/object/build";

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,
            };
            buildingQuery(param, (res) => {
                this.options = res.content.filter((build) => build.floor);
            });
        },
    },
};
</script>
<style lang="less" scoped>
.el-cascader {
    width: 100%;
}
</style>
