|
@@ -2,72 +2,49 @@
|
|
|
<el-cascader v-model="value" :options="options" :props="props" clearable></el-cascader>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import { buildingQuery } from "@/api/scan/request";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
value: [],
|
|
|
- props: { multiple: true },
|
|
|
+ props: {
|
|
|
+ multiple: true,
|
|
|
+ value: 'BuildID',
|
|
|
+ label: 'BuildLocalName',
|
|
|
+ children: 'Floor'
|
|
|
+ },
|
|
|
options: []
|
|
|
}
|
|
|
},
|
|
|
props: {
|
|
|
- floorName: {
|
|
|
- default: ""
|
|
|
+ FloorID: {
|
|
|
+ default: ''
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
- setTimeout(() => {
|
|
|
- this.options = [{
|
|
|
- value: 1,
|
|
|
- label: '东南',
|
|
|
- children: [{
|
|
|
- value: 2,
|
|
|
- label: '上海',
|
|
|
- children: [
|
|
|
- { value: 3, label: '普陀' },
|
|
|
- { value: 4, label: '黄埔' },
|
|
|
- { value: 5, label: '徐汇' }
|
|
|
- ]
|
|
|
- }, {
|
|
|
- value: 7,
|
|
|
- label: '江苏',
|
|
|
- children: [
|
|
|
- { value: 8, label: '南京' },
|
|
|
- { value: 9, label: '苏州' },
|
|
|
- { value: 10, label: '无锡' }
|
|
|
- ]
|
|
|
- }, {
|
|
|
- value: 12,
|
|
|
- label: '浙江',
|
|
|
- children: [
|
|
|
- { value: 13, label: '杭州' },
|
|
|
- { value: 14, label: '宁波' },
|
|
|
- { value: 15, label: '嘉兴' }
|
|
|
- ]
|
|
|
- }]
|
|
|
- }, {
|
|
|
- value: 17,
|
|
|
- label: '西北',
|
|
|
- children: [{
|
|
|
- value: 18,
|
|
|
- label: '陕西',
|
|
|
- children: [
|
|
|
- { value: 19, label: '西安' },
|
|
|
- { value: 20, label: '延安' }
|
|
|
- ]
|
|
|
- }, {
|
|
|
- value: 21,
|
|
|
- label: '新疆维吾尔族自治区',
|
|
|
- children: [
|
|
|
- { value: 22, label: '乌鲁木齐' },
|
|
|
- { value: 23, label: '克拉玛依' }
|
|
|
- ]
|
|
|
- }]
|
|
|
- }]
|
|
|
- },600)
|
|
|
- },
|
|
|
+ created() { },
|
|
|
methods: {
|
|
|
-
|
|
|
+ getCascader() {
|
|
|
+ let param = {
|
|
|
+ Cascade: [
|
|
|
+ { Name: "floor" }
|
|
|
+ ],
|
|
|
+ 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
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|