|
@@ -2,45 +2,82 @@
|
|
<div id="eqInSp">
|
|
<div id="eqInSp">
|
|
<el-row>
|
|
<el-row>
|
|
<el-button type="primary" @click="add">添加{{ inSpaceType }}</el-button>
|
|
<el-button type="primary" @click="add">添加{{ inSpaceType }}</el-button>
|
|
- <el-tooltip class="item" effect="dark" content="可前往“全部关系总览”中,按系统内包含的设备与空间关系计算" placement="right">
|
|
|
|
|
|
+ <el-tooltip
|
|
|
|
+ class="item"
|
|
|
|
+ effect="dark"
|
|
|
|
+ content="可前往“全部关系总览”中,按系统内包含的设备与空间关系计算"
|
|
|
|
+ placement="right"
|
|
|
|
+ >
|
|
<el-button>按系统内设备与业务空间关系计算</el-button>
|
|
<el-button>按系统内设备与业务空间关系计算</el-button>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</el-row>
|
|
</el-row>
|
|
<div class="table-box">
|
|
<div class="table-box">
|
|
- <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading"
|
|
|
|
- :header-cell-style="headerStyle">
|
|
|
|
- <el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
|
|
|
|
|
|
+ <el-table
|
|
|
|
+ :data="tableData"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ height="100%"
|
|
|
|
+ v-loading="loading"
|
|
|
|
+ :header-cell-style="headerStyle"
|
|
|
|
+ >
|
|
|
|
+ <el-table-column
|
|
|
|
+ :label="`${inSpaceType}名称`"
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
+ min-width="100"
|
|
|
|
+ >
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <div>{{ scope.row.localName || scope.row.name || '' }}</div>
|
|
|
|
|
|
+ <div>{{ scope.row.localName || scope.row.name || "" }}</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="localId" :label="`${inSpaceType}本地编码`" show-overflow-tooltip
|
|
|
|
- min-width="100"></el-table-column>
|
|
|
|
- <el-table-column :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="100">
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="localId"
|
|
|
|
+ :label="`${inSpaceType}本地编码`"
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
+ min-width="100"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ :label="`${inSpaceType}类型`"
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
+ min-width="100"
|
|
|
|
+ >
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<div>{{ spaceType[scope.row.classCode] }}</div>
|
|
<div>{{ spaceType[scope.row.classCode] }}</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="action" label="操作" min-width="100">
|
|
<el-table-column prop="action" label="操作" min-width="100">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-tooltip class="item" effect="dark" content="删除关系" placement="left">
|
|
|
|
- <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain
|
|
|
|
- icon="el-icon-delete"></el-button>
|
|
|
|
|
|
+ <el-tooltip
|
|
|
|
+ class="item"
|
|
|
|
+ effect="dark"
|
|
|
|
+ content="删除关系"
|
|
|
|
+ placement="left"
|
|
|
|
+ >
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="handleDelete(scope.$index, scope.row)"
|
|
|
|
+ type="danger"
|
|
|
|
+ plain
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
+ ></el-button>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<template slot="empty">
|
|
<template slot="empty">
|
|
- <div style="height: 60%;transform: translateY(50%);">
|
|
|
|
|
|
+ <div style="height: 60%; transform: translateY(50%)">
|
|
<i class="icon-wushuju iconfont"></i>
|
|
<i class="icon-wushuju iconfont"></i>
|
|
- 可前往“全部关系总览”中计算竖井内系统
|
|
|
|
|
|
+ 可前往“全部关系总览”中按系统内包含的设备和业务空间关系计算
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
<!-- 添加空间弹窗 -->
|
|
<!-- 添加空间弹窗 -->
|
|
- <addSpaceDialog :dialogVisible.sync="dialogVisible" ref="addSpaceDialog" @refresh="refresh" :params="params"
|
|
|
|
- :spaceType="spaceType"
|
|
|
|
- :floorType="floorType"></addSpaceDialog>
|
|
|
|
|
|
+ <addSpaceDialog
|
|
|
|
+ :dialogVisible.sync="dialogVisible"
|
|
|
|
+ ref="addSpaceDialog"
|
|
|
|
+ @refresh="refresh"
|
|
|
|
+ :params="params"
|
|
|
|
+ :spaceType="spaceType"
|
|
|
|
+ :floorType="floorType"
|
|
|
|
+ ></addSpaceDialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -51,10 +88,10 @@ import addSpaceDialog from "@/components/ledger/system/dialog/addSpaceDialog";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
- addSpaceDialog
|
|
|
|
|
|
+ addSpaceDialog,
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- ...mapGetters("layout", ["projectId"])
|
|
|
|
|
|
+ ...mapGetters("layout", ["projectId"]),
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -63,17 +100,17 @@ export default {
|
|
headerStyle: {
|
|
headerStyle: {
|
|
backgroundColor: "#e1e4e5",
|
|
backgroundColor: "#e1e4e5",
|
|
color: "#2b2b2b",
|
|
color: "#2b2b2b",
|
|
- lineHeight: "30px"
|
|
|
|
|
|
+ lineHeight: "30px",
|
|
}, // 列表样式
|
|
}, // 列表样式
|
|
loading: false, // loading
|
|
loading: false, // loading
|
|
- tableData: [] //列表数据
|
|
|
|
|
|
+ tableData: [], //列表数据
|
|
};
|
|
};
|
|
},
|
|
},
|
|
props: {
|
|
props: {
|
|
params: Object,
|
|
params: Object,
|
|
type: String,
|
|
type: String,
|
|
spaceType: Object,
|
|
spaceType: Object,
|
|
- floorType: {}
|
|
|
|
|
|
+ floorType: {},
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getTableData();
|
|
this.getTableData();
|
|
@@ -85,11 +122,11 @@ export default {
|
|
filters: `id='${this.params.SysID}'`,
|
|
filters: `id='${this.params.SysID}'`,
|
|
cascade: [
|
|
cascade: [
|
|
{
|
|
{
|
|
- name: "zoneSpaceBaseTableList"
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
|
|
+ name: "zoneSpaceBaseTableList",
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
};
|
|
};
|
|
- queryLinkSys(params, res => {
|
|
|
|
|
|
+ queryLinkSys(params, (res) => {
|
|
this.tableData = res.content[0].zoneSpaceBaseTableList || [];
|
|
this.tableData = res.content[0].zoneSpaceBaseTableList || [];
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -98,17 +135,17 @@ export default {
|
|
this.$confirm("确认删除该关系?", "提示", {
|
|
this.$confirm("确认删除该关系?", "提示", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
- type: "warning"
|
|
|
|
|
|
+ type: "warning",
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
let params = {
|
|
let params = {
|
|
data: [
|
|
data: [
|
|
{
|
|
{
|
|
sysId: this.params.SysID,
|
|
sysId: this.params.SysID,
|
|
- spaceId: row.id
|
|
|
|
- }
|
|
|
|
|
|
+ spaceId: row.id,
|
|
|
|
+ },
|
|
],
|
|
],
|
|
- type: row.classCode
|
|
|
|
|
|
+ type: row.classCode,
|
|
};
|
|
};
|
|
this.deleteSyInSh(params);
|
|
this.deleteSyInSh(params);
|
|
})
|
|
})
|
|
@@ -118,7 +155,7 @@ export default {
|
|
},
|
|
},
|
|
// 删除系统所在竖井关系
|
|
// 删除系统所在竖井关系
|
|
deleteSyInSh(params) {
|
|
deleteSyInSh(params) {
|
|
- spaceInSysUnlink(params, res => {
|
|
|
|
|
|
+ spaceInSysUnlink(params, (res) => {
|
|
this.$message.success("删除成功");
|
|
this.$message.success("删除成功");
|
|
this.getTableData();
|
|
this.getTableData();
|
|
});
|
|
});
|
|
@@ -140,14 +177,14 @@ export default {
|
|
//刷新
|
|
//刷新
|
|
refresh() {
|
|
refresh() {
|
|
this.dialogVisible = false;
|
|
this.dialogVisible = false;
|
|
- this.getTableData()
|
|
|
|
- }
|
|
|
|
|
|
+ this.getTableData();
|
|
|
|
+ },
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
type() {
|
|
type() {
|
|
// this.getTableData()
|
|
// this.getTableData()
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ },
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|