|
@@ -101,11 +101,9 @@
|
|
|
<div class="data shaft">
|
|
|
<span class="contain-title">竖井<i>{{`(${shaftCount?shaftCount:'0'})`}}</i></span>
|
|
|
<div class="data-show" v-loading="isLoading" v-if="shaft.length">
|
|
|
- <div class="show-content">
|
|
|
- <datafan :id="'origin' + shaft" :renderData="shaft[0]"></datafan>
|
|
|
- </div>
|
|
|
- <div class="show-content">
|
|
|
- <data-origin :id="'origin' + shaft" :renderData="shaft[1]"></data-origin>
|
|
|
+ <div class="show-content" v-for="(item,index) in shaft" :key="index">
|
|
|
+ <datafan :id="'origin' + shaft" :renderData="item" v-if="!item.needCountT"></datafan>
|
|
|
+ <data-origin :id="'origin' + item + index" :renderData="item" v-else></data-origin>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-if="!shaft.length" class="center" style="height: 60%;transform: translateY(30%);">
|
|
@@ -120,6 +118,7 @@
|
|
|
<script>
|
|
|
import { mapGetters } from "vuex";
|
|
|
import {
|
|
|
+ getCenoteType,
|
|
|
queryLederDelObject,
|
|
|
notSyncRelationData,
|
|
|
postRelationInforAtpism,
|
|
@@ -144,17 +143,17 @@ import { queryDataSourceCount, synchronizeProj } from "@/fetch/point_http";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- lederDelObjectCount: null,
|
|
|
- notSyncDataCount: null,
|
|
|
- postRelationInforCount: null,
|
|
|
- equipCount: null,
|
|
|
- equipment: [],
|
|
|
- assetsCount: null,
|
|
|
- assets: [],
|
|
|
- parts: [],
|
|
|
- partsCount: null,
|
|
|
- zoneSpaceCount: null,
|
|
|
- zoneType: [
|
|
|
+ lederDelObjectCount: null,// 台账中待删除的对象
|
|
|
+ notSyncDataCount: null,// 不能同步到物理世界的关系数据
|
|
|
+ postRelationInforCount: null,// 岗位和关联的资产信息点值不一致
|
|
|
+ equipCount: null,// 设备总数
|
|
|
+ equipment: [],// 设备数据
|
|
|
+ assetsCount: null,// 资产总数
|
|
|
+ assets: [],// 资产数据
|
|
|
+ parts: [],// 部件数据
|
|
|
+ partsCount: null,// 部件总数
|
|
|
+ zoneSpaceCount: null,// 业务空间总数
|
|
|
+ zoneType: [// 分区类型
|
|
|
{
|
|
|
"Code": "GeneralZone",
|
|
|
"Name": "默认分区",
|
|
@@ -216,19 +215,20 @@ export default {
|
|
|
"Code": 'FunctionZone'
|
|
|
}
|
|
|
],
|
|
|
- partProtion: [],
|
|
|
- defaultPart: [],
|
|
|
- funtionType: [],
|
|
|
- business: [],
|
|
|
- systemCount: null,
|
|
|
- system: [],
|
|
|
- rentantCount: null,
|
|
|
- shaftCount: null,
|
|
|
- tenant: [],
|
|
|
- shaft: [],
|
|
|
- shaftPartProtion: [],
|
|
|
+ partProtion: [],// 业务空间-各分区占比数据
|
|
|
+ defaultPart: [],// 业务空间-默认分区功能类型占比数据
|
|
|
+ business: [],// 业务空间数据
|
|
|
+ systemCount: null,// 系统总数
|
|
|
+ system: [],// 系统数据
|
|
|
+ rentantCount: null,// 租户总数
|
|
|
+ tenant: [],// 租户数据
|
|
|
+ shaftCount: null,// 竖井总数
|
|
|
+ shaft: [],// 竖井数据
|
|
|
+ ShaftFunType: null,// 竖井功能类型
|
|
|
+ shaftPartProtion: [],// 竖井-按功能类型占比数据
|
|
|
params: null,
|
|
|
- isLoading: false
|
|
|
+ isLoading: false,
|
|
|
+ color: ["#3485d6", "#a384fc", "#4caf50", "#ff6316", "#fd8bbe", "#03a9f3", "#ea615b"]
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
@@ -247,38 +247,104 @@ export default {
|
|
|
this.getPartsCount();
|
|
|
this.getSystemCount();
|
|
|
this.getTenantCount();
|
|
|
- this.getShaftCount();
|
|
|
+ // this.getShaftCount();
|
|
|
+ this.getShaftFunType();
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters('layout', ['projectId'])
|
|
|
},
|
|
|
methods: {
|
|
|
- getStatisticsCount() {
|
|
|
- // 获取顶部四个统计的数据
|
|
|
+ zoneTypeConversion(item) {// 分区类型转换
|
|
|
+ this.zoneType.map(it => {
|
|
|
+ if (item.Name === it.Code) {
|
|
|
+ item.Name = it.Name;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ functionTypeTranstion(item, type) {// 默认分区功能类型转换
|
|
|
+ type.map(it => {
|
|
|
+ if (item.Name === it.Code) {
|
|
|
+ item.Name = it.Name;
|
|
|
+ this.defaultPart.push({
|
|
|
+ name: item.Name,
|
|
|
+ value: item.Count
|
|
|
+ });
|
|
|
+ // this.defaultPart.map((item, index) => {
|
|
|
+ // item.itemStyle = {color:this.color}
|
|
|
+ // })
|
|
|
+ }
|
|
|
+ if (it.Content) {
|
|
|
+ this.functionTypeTranstion(item, it.Content)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getFunctionType() {// 获取默认分区功能类型
|
|
|
+ let params = {
|
|
|
+ ProjectId: this.projectId,
|
|
|
+ type: "GeneralZone",
|
|
|
+ data: {
|
|
|
+ Filters: "InfoPointCode='RoomFuncType'",
|
|
|
+ Projection: ["DataSource", "InfoPointCode"]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ getDataDictionary(params, res => {
|
|
|
+ this.functionType = JSON.parse(res.Content[0].DataSource)
|
|
|
+ this.getZoneSpaceCount();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ toPercent(point) {// 小数转换成百分比
|
|
|
+ if (point == 0) {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ var str = Number(point * 100).toFixed(2);
|
|
|
+ str += "%";
|
|
|
+ return str;
|
|
|
+ },
|
|
|
+ getShaftFunType() {// 获取数据功能类型
|
|
|
+ getCenoteType(this.param, res => {
|
|
|
+ this.ShaftFunType = res.Content;
|
|
|
+ this.getShaftCount();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ shaftFunTypeTranstion(item) {// 竖井功能类型转换
|
|
|
+ this.ShaftFunType.map((it, index) => {
|
|
|
+ if (item.Name === it.Id) {
|
|
|
+ item.Name = it.Name;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ getStatisticsCount() {// 获取顶部统计数据
|
|
|
let params = {
|
|
|
ProjectId: this.projectId,
|
|
|
Filters: "taskState = -1"
|
|
|
}
|
|
|
+
|
|
|
+ // 台账中待删除的对象
|
|
|
queryLederDelObject(params, res => {
|
|
|
this.lederDelObjectCount = res.Count;
|
|
|
})
|
|
|
|
|
|
+ // 不能同步到物理世界的对象
|
|
|
+
|
|
|
+ // 不能同步到物理世界的关系数据
|
|
|
notSyncRelationData(this.params, res => {
|
|
|
this.notSyncDataCount = res.Count;
|
|
|
})
|
|
|
|
|
|
+ // 岗位和关联的资产信息点值不一致
|
|
|
postRelationInforAtpism(this.params, res => {
|
|
|
this.postRelationInforCount = res.Count;
|
|
|
})
|
|
|
},
|
|
|
- getEquipCount() {
|
|
|
- // 获取设备总数
|
|
|
+ getEquipCount() {// 获取设备总数
|
|
|
countEquip(this.params, res => {
|
|
|
this.equipCount = res.Count;
|
|
|
this.getEquipOtherCount();
|
|
|
})
|
|
|
},
|
|
|
- getEquipOtherCount() {
|
|
|
+ getEquipOtherCount() {// 获取设备数据
|
|
|
+ // 未关联资产
|
|
|
let param = {
|
|
|
ProjectId: this.projectId,
|
|
|
Filters: "PropertyId isNull"
|
|
@@ -286,7 +352,7 @@ export default {
|
|
|
countEquip(param, res => {
|
|
|
this.equipment.push({
|
|
|
title: '未关联资产',
|
|
|
- tips: '',
|
|
|
+ tips: '设备未关联资产数量',
|
|
|
contentValueO: '未关联',
|
|
|
contentValueT: '已关联',
|
|
|
text: '',
|
|
@@ -296,48 +362,53 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
|
|
|
+ // 现场验证状态占比
|
|
|
let par = {
|
|
|
ProjectId: this.projectId,
|
|
|
Filters: "taskState = 0 or taskState = 1"
|
|
|
}
|
|
|
countEquip(par, res => {
|
|
|
+ let text = this.toPercent(res.Count / this.equipCount)
|
|
|
this.equipment.push({
|
|
|
- title: '与模型对应占比',
|
|
|
- tips: '',
|
|
|
- contentValueO: '未验证',
|
|
|
- contentValueT: '已验证',
|
|
|
+ title: '现场验证状态占比',
|
|
|
+ tips: '设备状态为未找到、已找到的数量与设备总数占比',
|
|
|
+ contentValueO: '已验证',
|
|
|
+ contentValueT: '未验证',
|
|
|
text: '',
|
|
|
needCountO: res.Count,
|
|
|
needCountT: this.equipCount - res.Count,
|
|
|
- text: `${res.Count}/${this.equipCount}`
|
|
|
+ text: text
|
|
|
})
|
|
|
+ this.getEquipBIMIDCount();
|
|
|
})
|
|
|
-
|
|
|
+ },
|
|
|
+ getEquipBIMIDCount() {// 设备-与模型对应占比
|
|
|
let pa = {
|
|
|
ProjectId: this.projectId,
|
|
|
Filters: "not BimID isNull"
|
|
|
}
|
|
|
countEquip(pa, res => {
|
|
|
+ let text = this.toPercent(res.Count / this.equipCount)
|
|
|
this.equipment.push({
|
|
|
- title: '现场验证状态占比',
|
|
|
- tips: '',
|
|
|
- contentValueO: '已验证',
|
|
|
- contentValueT: '未验证',
|
|
|
+ title: '与模型对应占比',
|
|
|
+ tips: '"BIM模型中编码"有值的设备数量与设备总数占比',
|
|
|
+ contentValueO: '有BIMID',
|
|
|
+ contentValueT: '无BIMID',
|
|
|
text: '',
|
|
|
needCountO: res.Count,
|
|
|
needCountT: this.equipCount - res.Count,
|
|
|
- text: `${res.Count}/${this.equipCount}`
|
|
|
+ text: text
|
|
|
})
|
|
|
this.isLoading = false;
|
|
|
})
|
|
|
},
|
|
|
- getAssetsCount() {
|
|
|
- // 获取资产数据
|
|
|
+ getAssetsCount() {// 获取资产数据
|
|
|
countProperty(this.params, res => {
|
|
|
// 获取资产总数
|
|
|
this.assetsCount = res.Count;
|
|
|
})
|
|
|
|
|
|
+ // 未关联资产
|
|
|
let param = {
|
|
|
ProjectId: this.projectId,
|
|
|
Filters: " EquipmentId isnull"
|
|
@@ -345,7 +416,7 @@ export default {
|
|
|
countProperty(param, res => {
|
|
|
this.assets.push({
|
|
|
title: '未关联资产',
|
|
|
- tips: '',
|
|
|
+ tips: '资产未关联设备数量',
|
|
|
contentValueO: '未关联',
|
|
|
contentValueT: '已关联',
|
|
|
text: `总数${this.assetsCount}`,
|
|
@@ -354,6 +425,7 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
|
|
|
+ // 现场验证状态占比
|
|
|
let par = {
|
|
|
ProjectId: this.projectId,
|
|
|
Filters: " taskState = 0 or taskState = 1"
|
|
@@ -363,7 +435,7 @@ export default {
|
|
|
text = this.toPercent(text);
|
|
|
this.assets.push({
|
|
|
title: '现场验证状态占比',
|
|
|
- tips: '',
|
|
|
+ tips: '资产状态为未找到、已找到的数量与资产总数占比',
|
|
|
contentValueO: '已验证',
|
|
|
contentValueT: '未验证',
|
|
|
text: text,
|
|
@@ -372,6 +444,7 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
|
|
|
+ // 有无坐标占比
|
|
|
let pa = {
|
|
|
ProjectId: this.projectId,
|
|
|
Filters: " not BIMLocation isnull"
|
|
@@ -381,7 +454,7 @@ export default {
|
|
|
text = this.toPercent(text);
|
|
|
this.assets.push({
|
|
|
title: '有无坐标占比',
|
|
|
- tips: '',
|
|
|
+ tips: '有坐标的资产数量百分比',
|
|
|
contentValueO: '有坐标',
|
|
|
contentValueT: '无坐标',
|
|
|
text: text,
|
|
@@ -390,41 +463,22 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- getPartsCount() {
|
|
|
+ getPartsCount() {// 获取部件数据
|
|
|
queryPart(this.params, res => {
|
|
|
this.partsCount = res.Count;
|
|
|
})
|
|
|
},
|
|
|
- PartsTypeConversion(item) {
|
|
|
- this.zoneType.map(it => {
|
|
|
- if (item.Name === it.Code) {
|
|
|
- item.Name = it.Name;
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- getFunctionType() {
|
|
|
- // 获取默认功能分区类型
|
|
|
- let params = {
|
|
|
- ProjectId: this.projectId,
|
|
|
- type: "GeneralZone",
|
|
|
- data: {
|
|
|
- Filters: "InfoPointCode='RoomFuncType'",
|
|
|
- Projection: ["DataSource", "InfoPointCode"]
|
|
|
- }
|
|
|
- }
|
|
|
- getDataDictionary(params, res => {
|
|
|
- this.functionType = JSON.parse(res.Content[0].DataSource)
|
|
|
- this.getZoneSpaceCount();
|
|
|
- })
|
|
|
- },
|
|
|
- getZoneSpaceCount() {
|
|
|
+ getZoneSpaceCount() {// 获取业务空间数据
|
|
|
+
|
|
|
+ // 获取业务空间总数
|
|
|
queryZoneCount(this.params, res => {
|
|
|
this.zoneSpaceCount = res.Count;
|
|
|
})
|
|
|
|
|
|
+ // 获取业务空间的各分区占比
|
|
|
queryPartitionRatio(this.params, res => {
|
|
|
res.Content.map(item => {
|
|
|
- this.PartsTypeConversion(item);
|
|
|
+ this.zoneTypeConversion(item);
|
|
|
this.partProtion.push({
|
|
|
name: item.Name,
|
|
|
value: item.Count
|
|
@@ -432,42 +486,31 @@ export default {
|
|
|
})
|
|
|
this.business.push({
|
|
|
title: '各分区占比',
|
|
|
- tips: '',
|
|
|
+ tips: '各类型分区实例数量与实例总数占比',
|
|
|
needCountO: this.partProtion,
|
|
|
})
|
|
|
})
|
|
|
|
|
|
+ // 获取业务空间默认分区功能类型占比
|
|
|
queryDefaultFunTypes(this.params, res => {
|
|
|
res.Content.map(item => {
|
|
|
this.functionTypeTranstion(item, this.functionType);
|
|
|
})
|
|
|
this.business.push({
|
|
|
title: '默认分区功能类型占比',
|
|
|
- tips: '',
|
|
|
- needCountO: this.funtionType,
|
|
|
+ tips: '默认分区实例的功能区类型占比',
|
|
|
+ needCountO: this.defaultPart,
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- functionTypeTranstion(item, type) {
|
|
|
- type.map(it => {
|
|
|
- if (item.Name === it.Code) {
|
|
|
- item.Name = it.Name;
|
|
|
- this.defaultPart.push({
|
|
|
- name: item.Name,
|
|
|
- value: item.Count
|
|
|
- });
|
|
|
- }
|
|
|
- if (it.Content) {
|
|
|
- this.functionTypeTranstion(item, it.Content)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- getSystemCount() {
|
|
|
+ getSystemCount() {// 获取系统数据
|
|
|
countGeneralSys(this.params, res => {
|
|
|
this.systemCount = res.Count;
|
|
|
})
|
|
|
},
|
|
|
- getTenantCount() {
|
|
|
+ getTenantCount() {// 获取租户数据
|
|
|
+
|
|
|
+ // 获取租户总数
|
|
|
queryRentCount(this.params, res => {
|
|
|
this.rentantCount = res.Count;
|
|
|
})
|
|
@@ -478,7 +521,7 @@ export default {
|
|
|
text = this.toPercent(text);
|
|
|
this.tenant.push({
|
|
|
title: '关联业务空间完成度',
|
|
|
- tips: '',
|
|
|
+ tips: '已关联业务空间的租户数量百分比',
|
|
|
contentValueO: '已关联',
|
|
|
contentValueT: '未关联',
|
|
|
text: '',
|
|
@@ -488,14 +531,17 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- getShaftCount() {
|
|
|
+ getShaftCount() {// 获取竖井数据
|
|
|
+
|
|
|
+ // 获取竖井总数
|
|
|
queryCenoteCount(this.params, res => {
|
|
|
this.shaftCount = res.Count;
|
|
|
})
|
|
|
|
|
|
+ // 获取竖井按功能类型占比
|
|
|
queryShaftFunctionType(this.params, res => {
|
|
|
res.Content.map(item => {
|
|
|
- this.PartsTypeConversion(item);
|
|
|
+ this.shaftFunTypeTranstion(item);
|
|
|
this.shaftPartProtion.push({
|
|
|
name: item.Name,
|
|
|
value: item.Count
|
|
@@ -503,33 +549,24 @@ export default {
|
|
|
})
|
|
|
this.shaft.push({
|
|
|
title: '按功能类型占比',
|
|
|
- tips: '',
|
|
|
+ tips: '竖井实例的竖井功能占比',
|
|
|
needCountO: this.shaftPartProtion,
|
|
|
})
|
|
|
})
|
|
|
|
|
|
+ // 获取竖井关联业务空间完成度
|
|
|
ShaftRelationBusinessSpace(this.params, res => {
|
|
|
let text = this.toPercent(res.Count / this.shaftCount);
|
|
|
this.shaft.push({
|
|
|
title: '关联业务空间完成度',
|
|
|
- tips: '',
|
|
|
+ tips: '已关联业务空间的竖井数量百分比',
|
|
|
contentValueO: '已关联',
|
|
|
contentValueT: '未关联',
|
|
|
- text: '',
|
|
|
needCountO: res.Count,
|
|
|
needCountT: this.shaftCount - res.Count,
|
|
|
text: text
|
|
|
})
|
|
|
})
|
|
|
- },
|
|
|
- toPercent(point) {
|
|
|
- // 小数转换成百分比
|
|
|
- if (point == 0) {
|
|
|
- return 0;
|
|
|
- }
|
|
|
- var str = Number(point * 100).toFixed(2);
|
|
|
- str += "%";
|
|
|
- return str;
|
|
|
}
|
|
|
},
|
|
|
}
|