|
@@ -24,7 +24,7 @@ import {
|
|
|
mapGetters,
|
|
|
mapActions
|
|
|
} from "vuex";
|
|
|
-import { getAllbusiness, getFamilyList, getSpaceName } from "@/api/scan/request"
|
|
|
+import { countGeneralSys, getSpaceName } from "@/api/scan/request"
|
|
|
import Handsontable from "handsontable-pro"
|
|
|
import 'handsontable-pro/dist/handsontable.full.css'
|
|
|
import zhCN from 'handsontable-pro/languages/zh-CN';
|
|
@@ -63,7 +63,7 @@ export default {
|
|
|
created() {
|
|
|
this.param.ProjId = this.projectId
|
|
|
this.param.secret = this.secret
|
|
|
- this.getProjName()
|
|
|
+ this.countGeneralSys()
|
|
|
|
|
|
let deviceId = this.$route.query.deviceId;
|
|
|
if (deviceId) {
|
|
@@ -76,73 +76,27 @@ export default {
|
|
|
projectId() {
|
|
|
this.param.ProjId = this.projectId
|
|
|
this.param.secret = this.secret
|
|
|
- this.getProjName()
|
|
|
+ this.countGeneralSys()
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- getProjName() {
|
|
|
- let param = {
|
|
|
- list: [{ id: this.param.ProjId }],
|
|
|
- perjectId: this.param.ProjId,
|
|
|
- secret: this.param.secret,
|
|
|
- }
|
|
|
- getSpaceName(param).then(res => {
|
|
|
- if (res.data.Result == "success") {
|
|
|
- this.mess.perjectName = res.data.Content[0].infos.ProjLocalName
|
|
|
- this.getAllbusiness()
|
|
|
- } else {
|
|
|
- this.$message.error("请求失败:" + res.data.ResultMsg)
|
|
|
- }
|
|
|
- }).catch(_ => {
|
|
|
- this.$message.error("请求失败")
|
|
|
- })
|
|
|
- },
|
|
|
- getFamilyList() {
|
|
|
- let param = {
|
|
|
- ProjId: this.param.ProjId,
|
|
|
- secret: this.param.secret,
|
|
|
- data: { type: "Sy" }
|
|
|
- }
|
|
|
- getFamilyList(param, res => {
|
|
|
- if (this.$refs.cascader) {
|
|
|
- this.$refs.cascader.pushData(res.Content)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
close(val) {
|
|
|
- this.getProjName()
|
|
|
- console.log(val)
|
|
|
- if (!!val && !!val.code) {
|
|
|
+ this.countGeneralSys()
|
|
|
+ if (!!val && !!val.Category) {
|
|
|
if (this.$refs.cascader)
|
|
|
- this.$refs.cascader.changeVal([val.code])
|
|
|
+ this.$refs.cascader.changeVal([val.Category])
|
|
|
}
|
|
|
+ this.$refs.cascader.getData()
|
|
|
},
|
|
|
-
|
|
|
- //获取header的list
|
|
|
- getAllbusiness() {
|
|
|
- let param = {
|
|
|
- ProjId: this.param.ProjId,
|
|
|
- secret: this.param.secret,
|
|
|
- data: {
|
|
|
- criteria: {
|
|
|
- type: ["Sy"]
|
|
|
- },
|
|
|
- returnInfos: ["SystemID"]
|
|
|
- }
|
|
|
- }
|
|
|
- getAllbusiness(param).then(res => {
|
|
|
- if (res.data.Result == "success") {
|
|
|
- this.mess.name[0].num = res.data.Count
|
|
|
- this.getFamilyList()
|
|
|
- } else {
|
|
|
- this.$message.error("请求失败" + res.data.resultMsg)
|
|
|
- }
|
|
|
- }).catch(res => { this.$message.error("请求失败") })
|
|
|
+ //获取系统统计信息
|
|
|
+ countGeneralSys(){
|
|
|
+ let param = {}
|
|
|
+ countGeneralSys(param, res => {
|
|
|
+ this.mess.name[0].num = res.Count
|
|
|
+ })
|
|
|
},
|
|
|
-
|
|
|
//修改楼层
|
|
|
changeFloor(value) {
|
|
|
- console.log(this.param);
|
|
|
if (value[0]) {
|
|
|
this.param.buildId = value[0]
|
|
|
}
|
|
@@ -154,22 +108,15 @@ export default {
|
|
|
if (!!this.param.deviceId) {
|
|
|
if (this.$refs.tableMain)
|
|
|
this.$refs.tableMain.getHeaderData(this.param);
|
|
|
- } else {
|
|
|
- return;
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
//修改设备族
|
|
|
changeDevice(value) {
|
|
|
- console.log(value)
|
|
|
- this.param.deviceId = value.code
|
|
|
- if (!!value) {
|
|
|
+ this.param.deviceId = value.Category
|
|
|
+ if (value) {
|
|
|
if (this.$refs.tableMain)
|
|
|
this.$refs.tableMain.getHeaderData(this.param);
|
|
|
- } else {
|
|
|
- return;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
};
|