1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <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" }
- {name: "floor", orders: "floorSequenceId desc"}
- ],
- // Orders: "BuildLocalName asc",
- pageNumber: 1,
- pageSize: 50
- }
- buildingQuery(param, res => {
- // res.content.map(t => {
- // if (t.floor && t.floor.length) {
- // t.floor = t.floor.map(item => {
- // if (item.floorID == this.floorID) return
- // item.buildID = item.floorID
- // item.buildLocalName = item.floorLocalName || item.floorName
- // return item
- // }).filter(it => it)
- // }
- // })
- // this.options = res.content
- this.options = res.content
- console.log(this.options,'options')
- })
- },
- }
- }
- </script>
- <style lang="less" scoped>
- .el-cascader {
- width: 100%;
- }
- </style>
|