|
@@ -17,7 +17,7 @@
|
|
|
<template v-for="(item,index) in tableList">
|
|
|
<el-tab-pane :name="item.Code" :key="index" :label="item.Name">
|
|
|
<span slot="label">
|
|
|
- <i :class="floorIconType?'msg-icon el-icon-error error-color':'msg-icon el-icon-success success-color'" style="font-size:14px;"></i>
|
|
|
+ <i :class="item.flag?'msg-icon el-icon-success success-color':'msg-icon el-icon-error error-color'" style="font-size:14px;"></i>
|
|
|
<span>{{ item.Name }}</span>
|
|
|
</span>
|
|
|
</el-tab-pane>
|
|
@@ -27,10 +27,10 @@
|
|
|
<div class="content-box">
|
|
|
<div class="button">
|
|
|
<el-link :underline="false" @click="del">需从模型中删除的设备</el-link>
|
|
|
- <el-link href="" @click="supplement" :underline="false" type="info">模型待补充的设备</el-link>
|
|
|
- <el-link href="" download="" :underline="false" type="info">导出模型问题报告</el-link>
|
|
|
+ <el-link @click="supplement" :underline="false">模型待补充的设备</el-link>
|
|
|
+ <el-link @click='getExportReport' :underline="false">导出模型问题报告</el-link>
|
|
|
</div>
|
|
|
- <div class="table" style="width: 100%;height: calc(100% - 47px)">
|
|
|
+ <div class="table" :style="tableList&&tableList.length?'width: 100%;height: calc(100% - 47px)':'width: 100%;height: calc(100% - 10px)'">
|
|
|
<el-table ref="multipleTable" :data="tableData" stripe height="100%" :header-cell-style="headerStyle" v-loading='loading'>
|
|
|
<el-table-column prop="FloorName" label="模型楼层" fixed width="150"></el-table-column>
|
|
|
<el-table-column prop="functionNo" label="待删除设备数量" fixed width="150">
|
|
@@ -39,7 +39,7 @@
|
|
|
</el-badge>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="" label="待补充设备数量" fixed width="150">
|
|
|
+ <el-table-column prop="toBeSupplement" label="待补充设备数量" fixed width="150">
|
|
|
<template slot-scope="scope">
|
|
|
<el-badge :value="scope.row.toBeSupplement" class="item" :type='scope.row.toBeSupplement?"danger":"success"'>
|
|
|
</el-badge>
|
|
@@ -53,8 +53,9 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="ElementRangeCheck" label='构件范围检查' width="200">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-badge :value="scope.row.ElementRangeCheck" class="item" :type='scope.row.ElementRangeCheck?"danger":"success"'>
|
|
|
+ <el-badge :value="scope.row.ElementRangeCheck" class="item" type='danger' v-if="scope.row.ElementRangeCheck">
|
|
|
</el-badge>
|
|
|
+ <i class="icon el-icon-check" v-if="!scope.row.ElementRangeCheck"></i>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="FamilyNameCheck" label='设备族编码检查' width="200">
|
|
@@ -80,51 +81,56 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="ConnectorCheck" label='连接件检查' width="200">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-badge :value="scope.row.ConnectorCheck" class="item" :type='danger' v-if="ConnectorCheck">
|
|
|
+ <el-badge :value="scope.row.ConnectorCheck" class="item" type='danger' v-if="scope.row.ConnectorCheck">
|
|
|
</el-badge>
|
|
|
<i class="icon el-icon-check" v-if="!scope.row.ConnectorCheck"></i>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="SystemNameCheck" label='系统类型名称检查' width="200">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-badge :value="scope.row.SystemNameCheck" class="item" :type='scope.row.SystemNameCheck?"danger":"success"'>
|
|
|
+ <el-badge :value="scope.row.SystemNameCheck" class="item" type='danger' v-if="scope.row.SystemNameCheck">
|
|
|
</el-badge>
|
|
|
+ <i class="icon el-icon-check" v-if="!scope.row.SystemNameCheck"></i>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="EquipInSpaceCheck" label='未在空间中的设备' width="200">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-badge :value="scope.row.EquipInSpaceCheck" class="item" :type='scope.row.EquipInSpaceCheck?"danger":"success"'>
|
|
|
+ <el-badge :value="scope.row.EquipInSpaceCheck" class="item" type='danger' v-if="scope.row.EquipInSpaceCheck">
|
|
|
</el-badge>
|
|
|
+ <i class="icon el-icon-check" v-if="!scope.row.EquipInSpaceCheck"></i>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="PipeCheck" label='管段检查' width="200">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-badge :value="scope.row.PipeCheck" class="item" :type='scope.row.PipeCheck?"danger":"success"'>
|
|
|
+ <el-badge :value="scope.row.PipeCheck" class="item" type='danger' v-if="scope.row.PipeCheck">
|
|
|
</el-badge>
|
|
|
+ <i class="icon el-icon-check" v-if="!scope.row.PipeCheck"></i>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="SystemReferEquipCheck" label='管网及相关设备检查' width="200">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-badge :value="scope.row.SystemReferEquipCheck" class="item" :type='scope.row.SystemReferEquipCheck?"danger":"success"'>
|
|
|
+ <el-badge :value="scope.row.SystemReferEquipCheck" class="item" :type='scope.row.SystemReferEquipCheck?"danger":"success"'
|
|
|
+ v-if="scope.row.SystemReferEquipCheck">
|
|
|
</el-badge>
|
|
|
+ <i class="icon el-icon-check" v-if="!scope.row.SystemReferEquipCheck"></i>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="ParameterIntegrityCheck" label='Revit族参数完整性检查' width="200">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-badge :value="scope.row.ParameterIntegrityCheck" class="item" type='danger' v-if="ParameterIntegrityCheck">
|
|
|
+ <el-badge :value="scope.row.ParameterIntegrityCheck" class="item" type='danger' v-if="scope.row.ParameterIntegrityCheck">
|
|
|
</el-badge>
|
|
|
<i class="icon el-icon-check" v-if="!scope.row.ParameterIntegrityCheck"></i>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="XyzOverlapCheck" label='xyz坐标重叠检查' width="200">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-badge :value="scope.row.XyzOverlapCheck" class="item" type='danger' v-if="XyzOverlapCheck">
|
|
|
+ <el-badge :value="scope.row.XyzOverlapCheck" class="item" type='danger' v-if="scope.row.XyzOverlapCheck">
|
|
|
</el-badge>
|
|
|
<i class="icon el-icon-check" v-if="!scope.row.XyzOverlapCheck"></i>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<template slot="empty">
|
|
|
- <div style="height: 60%;transform: translate(-22%,50%);">
|
|
|
+ <div style="height: 60%;transform: translate(-40%,50%);">
|
|
|
<i class="icon-wushuju iconfont"></i>
|
|
|
数据暂无
|
|
|
</div>
|
|
@@ -144,6 +150,8 @@ import { mapGetters } from "vuex";
|
|
|
import dasBoard from "@/views/dasboard/index";
|
|
|
import request from "@/api/model/file.js";
|
|
|
import { exportReport, queryFloorList, queryModel, queryReportList, queryLostReportList } from "@/api/model/report.js";
|
|
|
+import { getToBeDelEquip, getSupplement } from "@/api/scan/request.js";
|
|
|
+import axios from 'axios'
|
|
|
export default {
|
|
|
components: {
|
|
|
dasBoard
|
|
@@ -169,13 +177,7 @@ export default {
|
|
|
total: 0
|
|
|
},
|
|
|
loading: false,
|
|
|
- lostFloort: {
|
|
|
- ary: [],
|
|
|
- Bary: [],
|
|
|
- Fary: [],
|
|
|
- regex: /^(B||F)(\d)/
|
|
|
- },
|
|
|
- floorIconType: null
|
|
|
+ floorIconType: null,
|
|
|
}
|
|
|
},
|
|
|
mounted() { },
|
|
@@ -191,41 +193,49 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
getModelFileCount() {// 获取项目下所有模型文件夹
|
|
|
- let params = {
|
|
|
- ProjectId: this.projectId,
|
|
|
- }
|
|
|
queryModel(this.params, res => {
|
|
|
this.ModelFileCount = res.Content.length;
|
|
|
this.tableList = res.Content;
|
|
|
- this.tableList.forEach((item, index) => {
|
|
|
- item.Code = item.Id;
|
|
|
- })
|
|
|
- this.activeTab = this.tableList[0].Code;// 默认选中第一个模型文件夹
|
|
|
- this.getExportReport();
|
|
|
+ if (this.tableList.length) {
|
|
|
+ this.tableList.forEach((item, index) => {
|
|
|
+ item.Code = item.Id;
|
|
|
+ })
|
|
|
+ this.activeTab = this.tableList[0].Code;// 默认选中第一个模型文件夹
|
|
|
+ }
|
|
|
this.getModelFloor();
|
|
|
});
|
|
|
},
|
|
|
getModelFloorCount() {// 获取楼层模型文件数量,计算出检查出问题的模型文件
|
|
|
- queryFloorList(this.params, res => {
|
|
|
+ let promise1 = new Promise(resolve => {
|
|
|
+ queryFloorList(this.params, res => {
|
|
|
+ resolve(res);
|
|
|
+ })
|
|
|
+ })
|
|
|
+ Promise.all([promise1]).then(response => {
|
|
|
+ this.problemCount = 0;
|
|
|
+ let res = response[0];
|
|
|
this.modelFloorCount = res.Total;
|
|
|
- res.Content.forEach(item => {
|
|
|
+ this.modelFloor = res.Content;
|
|
|
+ this.getModelFileIcon();
|
|
|
+ this.modelFloor.forEach(item => {
|
|
|
if (!item.DataCheckResult) {
|
|
|
- this.problemCount += 1;
|
|
|
+ this.problemCount++;
|
|
|
}
|
|
|
})
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
- getExportReport() {
|
|
|
- let params = {
|
|
|
- ProjectId: this.projectId,
|
|
|
- Id: this.activeTab
|
|
|
- }
|
|
|
- // exportReport(params,res => {
|
|
|
- // console.log(res,3958)
|
|
|
- // });
|
|
|
+ getModelFileIcon() {// 计算文件夹的图标
|
|
|
+ this.tableList.forEach(item => {
|
|
|
+ this.modelFloor.forEach(it => {
|
|
|
+ if (item.Code === it.FolderId) {
|
|
|
+ if (!item.DataCheckResult) {
|
|
|
+ item.flag = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
getData(tab) {// 切换tab时执行
|
|
|
- this.getExportReport();
|
|
|
this.getModelFloor();
|
|
|
},
|
|
|
getModelFloor() {// 获取当前楼层下的模型楼层
|
|
@@ -237,52 +247,131 @@ export default {
|
|
|
}
|
|
|
queryReportList(params, res => {
|
|
|
this.FloorName = res.Content;
|
|
|
- this.getLostModelFloor();
|
|
|
+ if (this.FloorName && this.FloorName.length) {
|
|
|
+ let i = 0;
|
|
|
+ this.FloorName.forEach(item => {
|
|
|
+ item.questionItem = 0;
|
|
|
+ for (let key in item) {
|
|
|
+ if (item[key] > 0 && key !== "toBeDel" && key !== 'toBeSupplement' && key !== "FloorName" && key !== "questionItem") {
|
|
|
+ i += 1;
|
|
|
+ item.questionItem += 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.floorIconType = i;
|
|
|
+ this.getLostModelFloor();
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
- getLostModelFloor() {
|
|
|
- let param = {
|
|
|
+ getLostModelFloor() {// 获取缺失楼层
|
|
|
+ let params = {
|
|
|
ProjectId: this.projectId,
|
|
|
Filters: `FolderId='${this.activeTab}';Status=4`,
|
|
|
PageNumber: this.page.pageNumber,
|
|
|
PageSize: this.page.pageSize
|
|
|
}
|
|
|
- queryLostReportList(param, res => {
|
|
|
+ queryLostReportList(params, res => {
|
|
|
let that = this;
|
|
|
this.LostFloorName = res.Content;
|
|
|
- // RFM1
|
|
|
- this.LostFloorName.forEach((item, index) => {
|
|
|
- if (!item.FolderId) {
|
|
|
- item.FloorName = `${item.Note + item.FloorName}`
|
|
|
- this.FloorName.splice(index, 0, item);
|
|
|
- }
|
|
|
+ if (this.FloorName && this.LostFloorName) {
|
|
|
+ this.LostFloorName.forEach((item, index) => {
|
|
|
+ if (!item.FolderId) {
|
|
|
+ item.FloorName = `${item.Note + item.FloorName}`
|
|
|
+ that.FloorName.splice(index, 0, item);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.getToBeCount();
|
|
|
+ this.tableData = this.FloorName;
|
|
|
+ } else {
|
|
|
+ this.tableData = [];
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getToBeCount() {// 根据模型ID获取待删除数量和待补充数量
|
|
|
+ let that = this;
|
|
|
+ let ary = [];
|
|
|
+ this.LostFloorName.forEach((item, index) => {
|
|
|
+ if (item.CurrentModelId) {
|
|
|
+ ary.push({
|
|
|
+ ModelId: item.CurrentModelId
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ let params = {
|
|
|
+ ProjectId: this.projectId,
|
|
|
+ data: ary
|
|
|
+ }
|
|
|
+ getToBeDelEquip(params, res => {// 获取待删除储量
|
|
|
+ res.Content.forEach((item, index) => {
|
|
|
+ this.LostFloorName.forEach(it => {
|
|
|
+ if (item.ModelId === it.CurrentModelId) {
|
|
|
+ it.toBeDel = item.Count;
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
- let i = 0;
|
|
|
- this.FloorName.forEach(item => {
|
|
|
- item.questionItem = 0;
|
|
|
- item.toBeDel = 10;
|
|
|
- item.toBeSupplement = 6;
|
|
|
- for (let key in item) {
|
|
|
- if (item[key] > 0) {
|
|
|
- i += 1;
|
|
|
- item.questionItem += 1;
|
|
|
+ })
|
|
|
+ getSupplement(params, res => {// 获取待补充数量
|
|
|
+ res.Content.forEach((item, index) => {
|
|
|
+ this.LostFloorName.forEach(it => {
|
|
|
+ if (item.ModelId === it.CurrentModelId) {
|
|
|
+ it.toBeSupplement = item.Count;
|
|
|
}
|
|
|
- }
|
|
|
+ })
|
|
|
})
|
|
|
- this.floorIconType = i;
|
|
|
- this.tableData = this.FloorName;
|
|
|
})
|
|
|
},
|
|
|
- del() {
|
|
|
- // 点击需从模型中删除的设备
|
|
|
+ del() {// 点击需从模型中删除的设备
|
|
|
let jumpRouter = this.$router.resolve({ path: '/model/report/deleted' })
|
|
|
window.open(jumpRouter.href, '_blank')
|
|
|
},
|
|
|
- supplement() {
|
|
|
- // 点击模型待补充的设备
|
|
|
+ supplement() {// 点击模型待补充的设备
|
|
|
let jumpRouter = this.$router.resolve({ path: '/model/report/supplement' })
|
|
|
window.open(jumpRouter.href, '_blank')
|
|
|
},
|
|
|
+ getExportReport() {// 导出模型问题报告
|
|
|
+ let that = this;
|
|
|
+ axios({
|
|
|
+ method: 'post',
|
|
|
+ url: `/modelapi/report/non-blocking`,
|
|
|
+ data: {
|
|
|
+ Id: this.activeTab,
|
|
|
+ ProjectId: this.projectId
|
|
|
+ },
|
|
|
+ headers: {
|
|
|
+ ProjectId: this.projectId
|
|
|
+ },
|
|
|
+ responseType: 'blob'
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.type == 'application/vnd.ms-excel') {
|
|
|
+ let blob = new Blob([res.data], { type: 'application/vnd.ms-excel;charset=utf-8' });
|
|
|
+ let fileName = res.headers['content-disposition'];
|
|
|
+ if (fileName)
|
|
|
+ fileName = fileName.substring(fileName.indexOf('=') + 1);
|
|
|
+ if ('download' in document.createElement('a')) { // 非IE下载
|
|
|
+ const elink = document.createElement('a')
|
|
|
+ elink.download = fileName
|
|
|
+ elink.style.display = 'none'
|
|
|
+ elink.href = URL.createObjectURL(blob)
|
|
|
+ document.body.appendChild(elink)
|
|
|
+ elink.click()
|
|
|
+ URL.revokeObjectURL(elink.href) // 释放URL 对象
|
|
|
+ document.body.removeChild(elink)
|
|
|
+ } else { // IE10+下载
|
|
|
+ navigator.msSaveBlob(blob, fileName)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ let reader = new FileReader()
|
|
|
+ reader.onload = e => {
|
|
|
+ if (e.target.readyState === 2) {
|
|
|
+ let res = {}
|
|
|
+ res = JSON.parse(e.target.result)
|
|
|
+ that.$message.error(res.Message);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ reader.readAsText(res.data)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 切换每页显示数量
|
|
|
handleSizeChange(val) {
|
|
|
this.page.pageSize = val;
|