|
@@ -1,19 +1,22 @@
|
|
|
<template>
|
|
|
- <el-dialog title="批量关联资产" :visible.sync="dialog.linkAssets" width="900px">
|
|
|
+ <el-dialog title="批量关联资产" :visible.sync="dialog.linkAssets" width="700px">
|
|
|
<el-row>
|
|
|
- <device-parts></device-parts>
|
|
|
+ <span class="condition-title">设备类型:</span>
|
|
|
+ <el-select v-model="deviceType" filterable size="small" @change="handleChangeDevice" style="width:250px;">
|
|
|
+ <el-option v-for="item in deviceTypeList" :key="item.code" :label="item.facility" :value="item.code"></el-option>
|
|
|
+ </el-select>
|
|
|
</el-row>
|
|
|
<el-row style="margin-top:30px;">
|
|
|
- <!-- <build-floor></build-floor> -->
|
|
|
<span class="condition-title">建筑楼层:</span>
|
|
|
- <el-cascader placeholder="请选择建筑楼层" :options="bfoptions" v-model="buildFloor" filterable size="small" @change="handleChangeBf"></el-cascader>
|
|
|
+ <el-cascader :options="bfoptions" v-model="buildFloor" filterable size="small" @change="handleChangeBf" style="width:250px;"></el-cascader>
|
|
|
</el-row>
|
|
|
<el-row style="margin-top:30px;">
|
|
|
- <zone-space :isWidth="false"></zone-space>
|
|
|
+ <span class="condition-title">分区类型空间实例:</span>
|
|
|
+ <el-cascader v-model="space" filterable clearable collapse-tags size="small" :options="spaceList" :props="props" @change="handleChangeSpace" style="width:250px;"></el-cascader>
|
|
|
</el-row>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="handleClickClose">取 消</el-button>
|
|
|
- <el-button type="primary" @click="toAddDevice">确 认</el-button>
|
|
|
+ <el-button type="primary" @click="toLinkAssets">确 认</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</template>
|
|
@@ -22,15 +25,7 @@
|
|
|
import { floorQuery, buildingQuery } from '@/api/scan/request'
|
|
|
|
|
|
import { mapGetters } from "vuex"
|
|
|
-import buildFloor from "@/components/ledger/lib/buildFloor"
|
|
|
-import zoneSpace from "@/components/ledger/lib/zoneSpace"
|
|
|
-import deviceParts from "@/components/ledger/lib/deviceParts"
|
|
|
export default {
|
|
|
- components: {
|
|
|
- buildFloor,
|
|
|
- zoneSpace,
|
|
|
- deviceParts
|
|
|
- },
|
|
|
props: {
|
|
|
dialog: {
|
|
|
type: Object,
|
|
@@ -48,18 +43,24 @@ export default {
|
|
|
return {
|
|
|
bfoptions: [], //建筑楼层列表
|
|
|
buildFloor: ['all'], //选择的建筑楼层
|
|
|
+ deviceTypeList: [], //未关联资产的设备或部件列表
|
|
|
+ deviceType: '', //选择的设备类型
|
|
|
+ spaceList: [], //空间实例列表
|
|
|
+ space: [], //选择的空间实例
|
|
|
+ props: { multiple: true }, //多选级联配置
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.getData()
|
|
|
+ this.getData() //获取建筑楼层数据
|
|
|
},
|
|
|
mounted() { },
|
|
|
methods: {
|
|
|
- //获取数据
|
|
|
+ //获取建筑楼层数据
|
|
|
getData() {
|
|
|
let data, buildParams = {
|
|
|
PageNumber: 1,
|
|
|
- PageSize: 500,
|
|
|
+ PageSize: 1000,
|
|
|
Projection: [
|
|
|
"BuildID",
|
|
|
"BuildLocalName"
|
|
@@ -67,7 +68,7 @@ export default {
|
|
|
}, floorParams = {
|
|
|
Orders: "FloorSequenceID desc",
|
|
|
PageNumber: 1,
|
|
|
- PageSize: 500,
|
|
|
+ PageSize: 1000,
|
|
|
Projection: [
|
|
|
"BuildID",
|
|
|
"FloorID",
|
|
@@ -102,7 +103,7 @@ export default {
|
|
|
})
|
|
|
data.forEach(build => {
|
|
|
floorData.forEach(floor => {
|
|
|
- if (build.value == floor.BuildID && floor.FloorID && floor.FloorLocalName && this.type == "yes") {
|
|
|
+ if (build.value == floor.BuildID && floor.FloorID && floor.FloorLocalName) {
|
|
|
if (build.children) {
|
|
|
build.children.push({
|
|
|
value: floor.FloorID,
|
|
@@ -129,12 +130,25 @@ export default {
|
|
|
this.bfoptions = data
|
|
|
})
|
|
|
},
|
|
|
+ // 修改设备类型
|
|
|
+ handleChangeDevice() {
|
|
|
+
|
|
|
+ },
|
|
|
// 修改建筑楼层
|
|
|
handleChangeBf() {
|
|
|
|
|
|
},
|
|
|
+ // 修改空间实例
|
|
|
+ handleChangeSpace() {
|
|
|
+
|
|
|
+ },
|
|
|
+ // 点击取消关闭弹窗
|
|
|
handleClickClose() {
|
|
|
this.dialog.linkAssets = false
|
|
|
+ },
|
|
|
+ // 批量关联资产详情页
|
|
|
+ toLinkAssets() {
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -145,9 +159,16 @@ export default {
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
.condition-title{
|
|
|
+ width: 200px;
|
|
|
+ display: inline-block;
|
|
|
+ text-align: right;
|
|
|
margin-left: 10px;
|
|
|
margin-right: 12px;
|
|
|
color: #999999;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
+ /deep/ .el-dialog__body {
|
|
|
+ max-height: 420px;
|
|
|
+ overflow-y: auto;
|
|
|
+ }
|
|
|
</style>
|