|
@@ -15,7 +15,9 @@
|
|
</el-tabs>
|
|
</el-tabs>
|
|
<div class="table" v-loading="loading">
|
|
<div class="table" v-loading="loading">
|
|
<template v-if="deviceType.length > 0">
|
|
<template v-if="deviceType.length > 0">
|
|
- <admMultiTable :currentHeader="currentHeader" @handleCurrentEdit="handleCurrentEdit"
|
|
|
|
|
|
+ <admMultiTable :currentHeader="currentHeader"
|
|
|
|
+ @handleCurrentEdit="handleCurrentEdit"
|
|
|
|
+
|
|
:tableData="tableData" :headersStage="headersStage"/>
|
|
:tableData="tableData" :headersStage="headersStage"/>
|
|
<Pagination v-if="tableData.length > 0" :paginationList="paginationList"
|
|
<Pagination v-if="tableData.length > 0" :paginationList="paginationList"
|
|
@handleCurrentChange="handleCurrentChange"
|
|
@handleCurrentChange="handleCurrentChange"
|
|
@@ -78,7 +80,7 @@
|
|
</span>
|
|
</span>
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
- <dataForm :deviceHeaders="deviceHeaders" ref="dataForm" :currRowContent="currRowContent"/>
|
|
|
|
|
|
+ <dataForm :deviceHeaders="deviceHeaders" ref="dataForm" :currRowContent="currRowContent"/>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button type="primary" @click="handleDataForm">确 定</el-button>
|
|
<el-button type="primary" @click="handleDataForm">确 定</el-button>
|
|
<el-button @click="handlePosition">维护位置</el-button>
|
|
<el-button @click="handlePosition">维护位置</el-button>
|
|
@@ -97,7 +99,7 @@ import { AdmMultiTable, AdmSearch, dataForm, Pagination, Statistics } from '../c
|
|
import { allDevice, BeatchQueryParam, dictInfo } from "@/api/equipComponent";
|
|
import { allDevice, BeatchQueryParam, dictInfo } from "@/api/equipComponent";
|
|
import { createEquip, queryCount, queryEquip, updateEquip } from "@/api/datacenter";
|
|
import { createEquip, queryCount, queryEquip, updateEquip } from "@/api/datacenter";
|
|
import { UserModule } from "@/store/modules/user";
|
|
import { UserModule } from "@/store/modules/user";
|
|
-import deviceGraph from "./components/deviceGraph"
|
|
|
|
|
|
+import deviceGraph from "./components/deviceGraph.vue"
|
|
import tools from "@/utils/maintain"
|
|
import tools from "@/utils/maintain"
|
|
|
|
|
|
|
|
|
|
@@ -142,7 +144,7 @@ export default class extends Vue {
|
|
// tabs数据
|
|
// tabs数据
|
|
paneMsg = []
|
|
paneMsg = []
|
|
// 当前tabs值
|
|
// 当前tabs值
|
|
- activeName = ""
|
|
|
|
|
|
+ activeName = 0
|
|
// 分页
|
|
// 分页
|
|
paginationList = {
|
|
paginationList = {
|
|
page: 1,
|
|
page: 1,
|
|
@@ -211,12 +213,12 @@ export default class extends Vue {
|
|
param2.filters += `;codeName contain '${ this.inputSearch }' or systemCategory contain '${ this.inputSearch }' or bimTypeId contain '${ this.inputSearch }' or localId contain '${ this.inputSearch }'`
|
|
param2.filters += `;codeName contain '${ this.inputSearch }' or systemCategory contain '${ this.inputSearch }' or bimTypeId contain '${ this.inputSearch }' or localId contain '${ this.inputSearch }'`
|
|
}
|
|
}
|
|
let promise = new Promise(resolve => {
|
|
let promise = new Promise(resolve => {
|
|
- dictInfo(param).then(res => {
|
|
|
|
|
|
+ dictInfo(param).then((res: []) => {
|
|
resolve(res)
|
|
resolve(res)
|
|
})
|
|
})
|
|
})
|
|
})
|
|
let promise2 = new Promise(resolve => {
|
|
let promise2 = new Promise(resolve => {
|
|
- queryEquip(param2).then(res => {
|
|
|
|
|
|
+ queryEquip(param2).then((res: []) => {
|
|
resolve(res)
|
|
resolve(res)
|
|
})
|
|
})
|
|
})
|
|
})
|
|
@@ -226,7 +228,7 @@ export default class extends Vue {
|
|
this.headerInformation = res[0] // 获取表头
|
|
this.headerInformation = res[0] // 获取表头
|
|
this.tableData = res[1].content // 主体数据
|
|
this.tableData = res[1].content // 主体数据
|
|
this.paneMsg = res[0].dictStages.map(i => i.name)
|
|
this.paneMsg = res[0].dictStages.map(i => i.name)
|
|
- this.currentHeader = this.paneMsg[0]
|
|
|
|
|
|
+ this.currentHeader = this.paneMsg[this.activeName]
|
|
this.headerStage()
|
|
this.headerStage()
|
|
this.paginationList.total = res[1].total
|
|
this.paginationList.total = res[1].total
|
|
})
|
|
})
|
|
@@ -412,7 +414,7 @@ export default class extends Vue {
|
|
}
|
|
}
|
|
|
|
|
|
// 编辑当前行
|
|
// 编辑当前行
|
|
- handleCurrentEdit(val) {
|
|
|
|
|
|
+ handleCurrentEdit(val: object) {
|
|
this.status = '编辑'
|
|
this.status = '编辑'
|
|
this.currRowContent = val
|
|
this.currRowContent = val
|
|
this.handleNext()
|
|
this.handleNext()
|
|
@@ -435,10 +437,9 @@ export default class extends Vue {
|
|
// @ts-ignore
|
|
// @ts-ignore
|
|
this.$refs.deviceGraph.cancelLocation()
|
|
this.$refs.deviceGraph.cancelLocation()
|
|
}
|
|
}
|
|
|
|
+
|
|
// 保存
|
|
// 保存
|
|
saveLocation() {
|
|
saveLocation() {
|
|
- alert(1)
|
|
|
|
- return
|
|
|
|
// @ts-ignore
|
|
// @ts-ignore
|
|
const data = this.$refs.deviceGraph.getLocation()
|
|
const data = this.$refs.deviceGraph.getLocation()
|
|
if (data) {
|
|
if (data) {
|
|
@@ -455,6 +456,7 @@ export default class extends Vue {
|
|
this.handleCreateEquip(this.curEquip);
|
|
this.handleCreateEquip(this.curEquip);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
// 更新设备
|
|
// 更新设备
|
|
handleUpdateEquip(obj) {
|
|
handleUpdateEquip(obj) {
|
|
let pa;
|
|
let pa;
|
|
@@ -471,6 +473,7 @@ export default class extends Vue {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+
|
|
// 创建设备
|
|
// 创建设备
|
|
handleCreateEquip(obj: any) {
|
|
handleCreateEquip(obj: any) {
|
|
let pa;
|
|
let pa;
|
|
@@ -487,11 +490,13 @@ export default class extends Vue {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+
|
|
// 重置
|
|
// 重置
|
|
resetLocation() {
|
|
resetLocation() {
|
|
// @ts-ignore
|
|
// @ts-ignore
|
|
this.$refs.deviceGraph.resetLocation()
|
|
this.$refs.deviceGraph.resetLocation()
|
|
}
|
|
}
|
|
|
|
+
|
|
// 返回
|
|
// 返回
|
|
goBack() {
|
|
goBack() {
|
|
this.displayLocation = false
|
|
this.displayLocation = false
|
|
@@ -639,7 +644,8 @@ $border: 1px solid #E1E7EA;
|
|
|
|
|
|
.el-dialog {
|
|
.el-dialog {
|
|
.el-dialog__body {
|
|
.el-dialog__body {
|
|
- max-height: 500px !important;
|
|
|
|
|
|
+ padding: 20px;
|
|
|
|
+ max-height: 643px !important;
|
|
min-height: 100px;
|
|
min-height: 100px;
|
|
overflow-y: auto;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
overflow-x: hidden;
|