|
@@ -1,72 +1,4 @@
|
|
|
<template>
|
|
|
- <!-- <div>
|
|
|
- <div class="search" style="margin-bottom:10px;">
|
|
|
- <div>
|
|
|
- <el-input placeholder="输入设备名称或设备本地编码查询进行查询" style="width:300px;float:left;margin-right:10px;" v-model="search.filter" clearable></el-input>
|
|
|
- <el-button @click="filterBox" plain>查 找</el-button>
|
|
|
- </div>
|
|
|
- <div style="margin-top:10px;">
|
|
|
- <span>所属楼层</span>
|
|
|
- <el-cascader @change="filterBox" v-model="search.floor" :options="optionsWithDisabled"></el-cascader>
|
|
|
- <el-checkbox style="margin-left:20px;" @change="filterBox" :checked="search.checkbox" label="只显示在当前业务空间中的设备"></el-checkbox>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <el-table ref="multipleTable" :data="tableData" v-loading="isLoading" tooltip-effect="dark" class="data-table border" height="300"
|
|
|
- style="width: 100%" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="55"></el-table-column>
|
|
|
- <el-table-column width="180" label="设备名称">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>
|
|
|
- <el-tooltip :content="scope.row.infos.EquipLocalName ||scope.row.infos.EquipName" placement="top">
|
|
|
- <span>{{scope.row.infos.EquipLocalName || scope.row.infos.EquipName | cutString(15)}}</span>
|
|
|
- </el-tooltip>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column width="180" label="设备本地编码">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>
|
|
|
- <el-tooltip :content="scope.row.infos.EquipLocalID || '--'" placement="top">
|
|
|
- <span>{{scope.row.infos.EquipLocalID || "--" | cutString(15)}}</span>
|
|
|
- </el-tooltip>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column width="160" label="设备类">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>
|
|
|
- <span>{{getName(scope.row.category)}}</span>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column width="160" label="已关联其他业务空间">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>
|
|
|
- <el-tooltip :content="changeArray(scope.row.spaceName)" placement="top">
|
|
|
- <span>{{changeArray(scope.row.spaceName) | cutString(6)}}</span>
|
|
|
- </el-tooltip>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button plain @click="lockDetails(scope.row)">设备详情</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <el-dialog width="40%" title="设备详情" :visible.sync="innerVisible" append-to-body>
|
|
|
- <iframe height="400px" width="100%" :src="iframeSrc"></iframe>
|
|
|
- </el-dialog>
|
|
|
- <div class="right" v-if="tableData.length">
|
|
|
- <my-pagination :page="page" @change="pageChange"></my-pagination>
|
|
|
- </div>
|
|
|
- <div class="el-dialog__footer">
|
|
|
- <span class="dialog-footer">
|
|
|
- <el-button@click="clearBox">取 消</el-button>
|
|
|
- <el-button type="primary" @click="addReal">确 定</el-button>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </div> -->
|
|
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="900px" id="addEqDialog">
|
|
|
<el-row class="filters">
|
|
|
<el-col :span="9">
|
|
@@ -115,6 +47,10 @@
|
|
|
import {
|
|
|
getSpaceEquip,
|
|
|
buildingQuery, //数据中心-建筑查询
|
|
|
+ notEqInSpaceQuery, //没有和当前空间绑定的设备
|
|
|
+ notEqForSpaceQuery, //未服务当前空间的设备
|
|
|
+ eqInSpaceCreate, //设备所在业务空间--创建关系
|
|
|
+ eqForSpaceCreate, //设备服务业务空间--创建关系
|
|
|
} from "@/api/scan/request";
|
|
|
import { mapGetters } from "vuex";
|
|
|
export default {
|
|
@@ -154,8 +90,13 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
},
|
|
|
+ props: {
|
|
|
+ type: {}, //equipment--equipmentFor
|
|
|
+ spaceId: {},
|
|
|
+ zone: {}, //分区类型
|
|
|
+ },
|
|
|
created() {
|
|
|
- this.getBuilding()
|
|
|
+ this.getBuilding();
|
|
|
},
|
|
|
methods: {
|
|
|
// 获取项目下建筑
|
|
@@ -182,11 +123,37 @@ export default {
|
|
|
},
|
|
|
// 显示弹窗
|
|
|
showDialog() {
|
|
|
- this.dialogVisible = true
|
|
|
+ this.dialogVisible = true;
|
|
|
+ this.getTableData();
|
|
|
},
|
|
|
- getTableData() { },
|
|
|
+ getTableData() {
|
|
|
+ let pa = {
|
|
|
+ data: {
|
|
|
+ Filters:`BuildingId="${this.floor[0]}";FloorId="${this.floor[1]}"`,
|
|
|
+ PageNumber: this.page.pageNumber,
|
|
|
+ PageSize: this.page.pageSize,
|
|
|
+ },
|
|
|
+ type: this.zone,
|
|
|
+ spaceId: this.spaceId
|
|
|
+ }
|
|
|
+ if(this.keycode!=''){
|
|
|
+ pa.data.Filters += `;EquipName contain "${this.keycode}" or EquipLocalName contain "${this.keycode}" or EquipLocalID contain "${this.keycode}"`
|
|
|
+ }
|
|
|
+ if (this.type == "equipment") {
|
|
|
+ notEqInSpaceQuery(pa, res => {
|
|
|
+ this.tableData = res.Content;
|
|
|
+ this.page.total = res.Total;
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ notEqForSpaceQuery(pa, res => {
|
|
|
+ this.tableData = res.Content;
|
|
|
+ this.page.total = res.Total;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //选中项修改
|
|
|
handleSelectionChange(val) {
|
|
|
- thi.selections = val;
|
|
|
+ this.selections = val;
|
|
|
},
|
|
|
savaRelation() { },
|
|
|
//改变pagesize
|
|
@@ -199,6 +166,10 @@ export default {
|
|
|
this.page.pageNumber = pageNo;
|
|
|
this.getTableData();
|
|
|
},
|
|
|
+ // 查看详情
|
|
|
+ toDetail() {
|
|
|
+ this.$message('开发中')
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|