|
@@ -19,7 +19,12 @@ import floorCascader from "@/components/ledger/lib/floorCascader";
|
|
|
import myCascader from "@/components/ledger/lib/cascader";
|
|
|
import hansonTable from "@/components/ledger/handsontables/device";
|
|
|
import tableTransfers from "@/components/ledger/tableTransfers";
|
|
|
-import { getNumber, getFamilyList, getSpaceName, getGraphyId, getEquipmentFamily } from "@/api/scan/request"
|
|
|
+import {
|
|
|
+ getSpaceName,
|
|
|
+ getGraphyId,
|
|
|
+ getEquipmentFamily,
|
|
|
+ countEquip
|
|
|
+} from "@/api/scan/request"
|
|
|
import {
|
|
|
mapGetters,
|
|
|
mapActions
|
|
@@ -69,7 +74,7 @@ export default {
|
|
|
this.param.ProjId = this.projectId
|
|
|
this.param.secret = this.secret
|
|
|
this.getProjName()
|
|
|
-
|
|
|
+ this.getCount()
|
|
|
let deviceId = this.$route.query.deviceId;
|
|
|
if (deviceId) {
|
|
|
this.$nextTick(() => {
|
|
@@ -82,6 +87,7 @@ export default {
|
|
|
this.param.ProjId = this.projectId
|
|
|
this.param.secret = this.secret
|
|
|
this.getProjName()
|
|
|
+ this.getCount()
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -103,9 +109,12 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
close(val) {
|
|
|
- this.getEqCode()
|
|
|
- if (val && this.$refs.cascader)
|
|
|
+ // this.getEqCode()
|
|
|
+ this.getCount()
|
|
|
+ if (val && this.$refs.cascader){
|
|
|
this.$refs.cascader.changeVal([val.code])
|
|
|
+ }
|
|
|
+ this.$refs.cascader.getData()
|
|
|
// this.$refs.tableMain.getHeaderData(this.param);
|
|
|
},
|
|
|
getEqCode() {
|
|
@@ -114,33 +123,13 @@ export default {
|
|
|
this.getGraphyId()
|
|
|
})
|
|
|
},
|
|
|
- getFamilyList() {
|
|
|
- let param = {
|
|
|
- ProjId: this.param.ProjId,
|
|
|
- secret: this.param.secret,
|
|
|
- data: { type: "Eq" }
|
|
|
- }
|
|
|
- getFamilyList(param, res => {
|
|
|
- if (this.$refs.cascader) {
|
|
|
- this.$refs.cascader.pushData(res.Content)
|
|
|
- }
|
|
|
-
|
|
|
+ //获取统计数量
|
|
|
+ getCount() {
|
|
|
+ let param = {}
|
|
|
+ countEquip(param, res => {
|
|
|
+ this.mess.name[0].num = res.Count
|
|
|
})
|
|
|
},
|
|
|
- //获取header的list
|
|
|
- getNumber() {
|
|
|
- let param = {
|
|
|
- ProjId: this.param.ProjId,
|
|
|
- secret: this.param.secret,
|
|
|
- data: { type: "Eq" }
|
|
|
- }
|
|
|
- getNumber(param, res => {
|
|
|
- this.mess.name[0].num = res.content.count
|
|
|
- this.mess.name[1].num = res.content.bindingCount
|
|
|
- this.getFamilyList()
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
getGraphyId() {
|
|
|
let param = {
|
|
|
ProjId: this.param.ProjId,
|
|
@@ -152,7 +141,6 @@ export default {
|
|
|
this.graphyId = res.data.graph_id
|
|
|
if (this.$refs.tableMain)
|
|
|
this.$refs.tableMain.setGraphyId(this.graphyId, this.assetGroupList);
|
|
|
- this.getNumber()
|
|
|
} else {
|
|
|
this.$message.error("请求错误:" + res.data.ResultMsg)
|
|
|
}
|
|
@@ -173,8 +161,6 @@ export default {
|
|
|
if (!!this.param.deviceId) {
|
|
|
if (this.$refs.tableMain)
|
|
|
this.$refs.tableMain.getHeaderData(this.param);
|
|
|
- } else {
|
|
|
- return;
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -185,10 +171,7 @@ export default {
|
|
|
if (!!value) {
|
|
|
if (this.$refs.tableMain)
|
|
|
this.$refs.tableMain.getHeaderData(this.param);
|
|
|
- } else {
|
|
|
- return;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
};
|