|
@@ -32,22 +32,35 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
- <div class="progress" v-loading="loading">
|
|
|
+ <div class="progress">
|
|
|
<p class="basic-statistics">基本统计</p>
|
|
|
<div class="data equipment">
|
|
|
<!-- 设备:本期只做前三个 -->
|
|
|
- <span class="contain-title">设备{{}}</span>
|
|
|
- <div class="data-show">
|
|
|
- <div v-for="(item,index) in list" :key="index" class="show-content">
|
|
|
+ <span class="contain-title">设备<i>{{equipCount}}</i></span>
|
|
|
+ <div class="data-show" v-loading="isLoading" v-if="equipment.length">
|
|
|
+ <div class="show-content" v-for="(item,index) in equipment" :key="index">
|
|
|
<data-origin :id="'origin' + index" :renderData="item"></data-origin>
|
|
|
</div>
|
|
|
+ <div v-if="!equipment.length" class="center" style="margin-top: 260px;">
|
|
|
+ <i class="icon-wushuju iconfont"></i>
|
|
|
+ 暂无数据
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="data assets">
|
|
|
- <span class="contain-title">资产{{}}</span>
|
|
|
+ <span class="contain-title">资产<i>{{assetsCount}}</i></span>
|
|
|
+ <div class="data-show" v-loading="isLoading" v-if="assets.length">
|
|
|
+ <div class="show-content" v-for="(item,index) in assets" :key="index">
|
|
|
+ <data-origin :id="'origin' + index" :renderData="item"></data-origin>
|
|
|
+ </div>
|
|
|
+ <div v-if="!assets.length" class="center" style="margin-top: 260px;">
|
|
|
+ <i class="icon-wushuju iconfont"></i>
|
|
|
+ 暂无数据
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="data parts">
|
|
|
- <span class="contain-title">部件{{}}</span>
|
|
|
+ <span class="contain-title">部件<i>{{partsCount}}</i></span>
|
|
|
</div>
|
|
|
<div class="data business-space">
|
|
|
<span class="contain-title">业务空间{{}}</span>
|
|
@@ -72,23 +85,21 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import dataOrigin from "@/components/ledger/report/dataorigin"
|
|
|
-import datafan from "@/components/ledger/report/datafan"
|
|
|
-import { queryDataSourceCount, synchronizeProj } from "@/fetch/point_http"
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+import { countEquip, countProperty, queryPart } from "@/api/scan/request";
|
|
|
+import dataOrigin from "@/components/ledger/report/dataorigin";
|
|
|
+import datafan from "@/components/ledger/report/datafan";
|
|
|
+import { queryDataSourceCount, synchronizeProj } from "@/fetch/point_http";
|
|
|
+
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
list: [],
|
|
|
- equipment: [
|
|
|
- { title: '未关联资产', tips: '' },
|
|
|
- { title: '现场验证状态占比', tips: '' },
|
|
|
- { title: '与模型对应占比', tips: '' }
|
|
|
- ],
|
|
|
- assets: [
|
|
|
- { title: '未关联资产', tips: '' },
|
|
|
- { title: '现场验证状态占比', tips: '' },
|
|
|
- { title: '有无坐标占比', tips: '' }
|
|
|
- ],
|
|
|
+ equipCount: '',
|
|
|
+ equipment: [],
|
|
|
+ assetsCount: '',
|
|
|
+ assets: [],
|
|
|
+ partsCount: '',
|
|
|
business: [
|
|
|
{ title: '各分区占比', tips: '' },
|
|
|
{ title: '默认分区功能类型占比', tips: '' }
|
|
@@ -100,7 +111,7 @@ export default {
|
|
|
{ title: '按功能类型占比', tips: '' },
|
|
|
{ title: '关联业务空间完成度', tips: '' }
|
|
|
],
|
|
|
- loading: false
|
|
|
+ isLoading: false
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
@@ -109,15 +120,159 @@ export default {
|
|
|
},
|
|
|
mounted() { },
|
|
|
created() {
|
|
|
- this.getList()
|
|
|
+ this.getEquipCount();
|
|
|
+ this.getAssetsCount();
|
|
|
+ this.getPartsCount();
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters('layout', ['userInfo', 'projectId', 'projects', 'userId'])
|
|
|
},
|
|
|
methods: {
|
|
|
- getList() {
|
|
|
- queryDataSourceCount({}, res => {
|
|
|
- this.list = res.Content
|
|
|
+ getEquipCount() {
|
|
|
+ this.isLoading = true;
|
|
|
+ let params = {
|
|
|
+ ProjectId: this.projectId
|
|
|
+ }
|
|
|
+ // 获取设备总数
|
|
|
+ countEquip(params, res => {
|
|
|
+ this.equipCount = res.Count;
|
|
|
+ this.getEquipOtherCount();
|
|
|
})
|
|
|
},
|
|
|
- }
|
|
|
+ getEquipOtherCount() {
|
|
|
+ // 获取设备数据
|
|
|
+ let param = {
|
|
|
+ ProjectId: this.projectId,
|
|
|
+ Filters: "PropertyId isNull"
|
|
|
+ }
|
|
|
+ countEquip(param, res => {
|
|
|
+ this.equipment.push({
|
|
|
+ title: '未关联资产',
|
|
|
+ tips: '',
|
|
|
+ contentValueO: '未关联',
|
|
|
+ contentValueT: '已关联',
|
|
|
+ text: '',
|
|
|
+ needCountO: res.Count,
|
|
|
+ needCountT: this.equipCount - res.Count,
|
|
|
+ text: `总数${this.equipCount}`
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ let par = {
|
|
|
+ ProjectId: this.projectId,
|
|
|
+ Filters: "taskState = 0 or taskState = 1"
|
|
|
+ }
|
|
|
+ countEquip(par, res => {
|
|
|
+ this.equipment.push({
|
|
|
+ title: '与模型对应占比',
|
|
|
+ tips: '',
|
|
|
+ contentValueO: '未验证',
|
|
|
+ contentValueT: '已验证',
|
|
|
+ text: '',
|
|
|
+ needCountO: res.Count,
|
|
|
+ needCountT: this.equipCount - res.Count,
|
|
|
+ text: `${res.Count}/${this.equipCount}`
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ let pa = {
|
|
|
+ ProjectId: this.projectId,
|
|
|
+ Filters: "not BimID isNull"
|
|
|
+ }
|
|
|
+ countEquip(pa, res => {
|
|
|
+ this.equipment.push({
|
|
|
+ title: '现场验证状态占比',
|
|
|
+ tips: '',
|
|
|
+ contentValueO: '已验证',
|
|
|
+ contentValueT: '未验证',
|
|
|
+ text: '',
|
|
|
+ needCountO: res.Count,
|
|
|
+ needCountT: this.equipCount - res.Count,
|
|
|
+ text: `${res.Count}/${this.equipCount}`
|
|
|
+ })
|
|
|
+ this.isLoading = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getAssetsCount() {
|
|
|
+ // 获取资产数据
|
|
|
+ let params = {
|
|
|
+ ProjectId: this.projectId
|
|
|
+ }
|
|
|
+ countProperty(params, res => {
|
|
|
+ // 获取资产总数
|
|
|
+ this.assetsCount = res.Count;
|
|
|
+ })
|
|
|
+
|
|
|
+ let param = {
|
|
|
+ ProjectId: this.projectId,
|
|
|
+ Filters: " EquipmentId isnull"
|
|
|
+ }
|
|
|
+ countProperty(param, res => {
|
|
|
+ this.assets.push({
|
|
|
+ title: '未关联资产',
|
|
|
+ tips: '',
|
|
|
+ contentValueO: '未关联',
|
|
|
+ contentValueT: '已关联',
|
|
|
+ text: `总数${this.assetsCount}`,
|
|
|
+ needCountO: res.Count,
|
|
|
+ needCountT: this.assetsCount - res.Count
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ let par = {
|
|
|
+ ProjectId: this.projectId,
|
|
|
+ Filters: " taskState = 0 or taskState = 1"
|
|
|
+ }
|
|
|
+ countProperty(par, res => {
|
|
|
+ let text = res.Count / this.assetsCount;
|
|
|
+ text = this.toPercent(text);
|
|
|
+ this.assets.push({
|
|
|
+ title: '现场验证状态占比',
|
|
|
+ tips: '',
|
|
|
+ contentValueO: '已验证',
|
|
|
+ contentValueT: '未验证',
|
|
|
+ text: `已验证${text}`,
|
|
|
+ needCountO: res.Count,
|
|
|
+ needCountT: this.assetsCount - res.Count
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ let pa = {
|
|
|
+ ProjectId: this.projectId,
|
|
|
+ Filters: " not BIMLocation isnull"
|
|
|
+ }
|
|
|
+ countProperty(pa, res => {
|
|
|
+ let text = res.Count / this.assetsCount;
|
|
|
+ text = this.toPercent(text);
|
|
|
+ this.assets.push({
|
|
|
+ title: '有无坐标占比',
|
|
|
+ tips: '',
|
|
|
+ contentValueO: '有坐标',
|
|
|
+ contentValueT: '无坐标',
|
|
|
+ text: `有坐标${text}`,
|
|
|
+ needCountO: res.Count,
|
|
|
+ needCountT: this.assetsCount - res.Count
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getPartsCount() {
|
|
|
+ let params = {
|
|
|
+ ProjectId: this.projectId
|
|
|
+ }
|
|
|
+ queryPart(params, res => {
|
|
|
+ this.partsCount = res.Count;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ toPercent(point) {
|
|
|
+ // 小数转换成百分比
|
|
|
+ if (point == 0) {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ var str = Number(point * 100).toFixed(2);
|
|
|
+ str += "%";
|
|
|
+ return str;
|
|
|
+ }
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -166,6 +321,9 @@ export default {
|
|
|
font-weight: 600;
|
|
|
padding-left: 8px;
|
|
|
cursor: default;
|
|
|
+ i {
|
|
|
+ margin-left: 12px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|