|
@@ -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>
|
|
@@ -26,12 +26,14 @@
|
|
|
</div>
|
|
|
<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 :underline="false" @click="del" v-if="toBeDelCount">需从模型中删除的设备</el-link>
|
|
|
+ <el-link @click="supplement" :underline="false" v-if="toBeSuppCount">模型待补充的设备</el-link>
|
|
|
+ <el-button type="info" :loading="load" @click='getExportReport' style="border:1px solid #dcdfe6;color:#606266;background:white;">导出模型问题报告
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
- <div class="table" style="width: 100%;height: calc(100% - 47px)">
|
|
|
- <el-table ref="multipleTable" :data="tableData" stripe height="100%" :header-cell-style="headerStyle" v-loading='loading'>
|
|
|
+ <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'
|
|
|
+ :row-class-name="tableRowClassName">
|
|
|
<el-table-column prop="FloorName" label="模型楼层" fixed width="150"></el-table-column>
|
|
|
<el-table-column prop="functionNo" label="待删除设备数量" fixed width="150">
|
|
|
<template slot-scope="scope">
|
|
@@ -39,86 +41,98 @@
|
|
|
</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>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="itemsProblemsCheck" label="有问题的检查项" fixed width="150">
|
|
|
+ <el-table-column prop="questionItem" label="有问题的检查项" fixed width="150">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-badge :value="scope.row.itemsProblemsCheck" class="item" :type='scope.row.itemsProblemsCheck?"warning":"success"'>
|
|
|
+ <el-badge :value="scope.row.questionItem" class="item" :type='scope.row.questionItem?"warning":"success"'>
|
|
|
</el-badge>
|
|
|
</template>
|
|
|
</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="msg-icon el-icon-success success-color" style="font-size:20px;" v-if="scope.row.ElementRangeCheck<=0"></i>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="FamilyNameCheck" label='设备族编码检查' width="200">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-badge :value="scope.row.FamilyNameCheck" class="item" :type='scope.row.FamilyNameCheck?"danger":"success"'>
|
|
|
+ <el-badge :value="scope.row.FamilyNameCheck" class="item" type='danger' v-if="scope.row.FamilyNameCheck">
|
|
|
</el-badge>
|
|
|
+ <i class="msg-icon el-icon-success success-color" style="font-size:20px;" v-if="scope.row.FamilyNameCheck<=0"></i>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="EquipPartLocationCheck" label='部件所在位置检查' width="200">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-badge :value="scope.row.EquipPartLocationCheck" class="item" :type='scope.row.EquipPartLocationCheck?"danger":"success"'>
|
|
|
+ <el-badge :value="scope.row.EquipPartLocationCheck" class="item" type='danger' v-if="scope.row.EquipPartLocationCheck">
|
|
|
</el-badge>
|
|
|
+ <i class="msg-icon el-icon-success success-color" style="font-size:20px;" v-if="scope.row.EquipPartLocationCheck<=0"></i>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="ColumnCheck" label='柱边界检查' width="200">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-badge :value="scope.row.ColumnCheck" class="item" :type='scope.row.ColumnCheck?"danger":"success"'>
|
|
|
+ <el-badge :value="scope.row.ColumnCheck" class="item" type='danger' v-if="scope.row.ColumnCheck">
|
|
|
</el-badge>
|
|
|
+ <i class="msg-icon el-icon-success success-color" style="font-size:20px;" v-if="scope.row.ColumnCheck<=0"></i>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="ConnectorCheck" label='连接件检查' width="200">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-badge :value="scope.row.ConnectorCheck" class="item" :type='scope.row.ConnectorCheck?"danger":"success"'>
|
|
|
+ <el-badge :value="scope.row.ConnectorCheck" class="item" type='danger' v-if="scope.row.ConnectorCheck">
|
|
|
</el-badge>
|
|
|
+ <i class="msg-icon el-icon-success success-color" style="font-size:20px;" v-if="scope.row.ConnectorCheck<=0"></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="msg-icon el-icon-success success-color" style="font-size:20px;" v-if="scope.row.SystemNameCheck<=0"></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="msg-icon el-icon-success success-color" style="font-size:20px;" v-if="scope.row.EquipInSpaceCheck<=0"></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="msg-icon el-icon-success success-color" style="font-size:20px;" v-if="scope.row.PipeCheck<=0"></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="msg-icon el-icon-success success-color" style="font-size:20px;" v-if="scope.row.SystemReferEquipCheck<=0"></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='scope.row.ParameterIntegrityCheck?"danger":"success"'>
|
|
|
+ <el-badge :value="scope.row.ParameterIntegrityCheck" class="item" type='danger' v-if="scope.row.ParameterIntegrityCheck">
|
|
|
</el-badge>
|
|
|
+ <i class="msg-icon el-icon-success success-color" style="font-size:20px;" v-if="scope.row.ParameterIntegrityCheck<=0"></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='scope.row.XyzOverlapCheck?"danger":"success"'>
|
|
|
+ <el-badge :value="scope.row.XyzOverlapCheck" class="item" type='danger' v-if="scope.row.XyzOverlapCheck">
|
|
|
</el-badge>
|
|
|
+ <i class="msg-icon el-icon-success success-color" style="font-size:20px;" v-if="scope.row.XyzOverlapCheck<=0"></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>
|
|
@@ -138,6 +152,9 @@ 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'
|
|
|
+import { resolve } from 'q';
|
|
|
export default {
|
|
|
components: {
|
|
|
dasBoard
|
|
@@ -163,13 +180,10 @@ export default {
|
|
|
total: 0
|
|
|
},
|
|
|
loading: false,
|
|
|
- lostFloort: {
|
|
|
- ary: [],
|
|
|
- Bary: [],
|
|
|
- Fary: [],
|
|
|
- regex: /^(B||F)(\d)/
|
|
|
- },
|
|
|
- floorIconType: null
|
|
|
+ load: false,
|
|
|
+ floorIconType: null,
|
|
|
+ toBeSuppCount: 0,
|
|
|
+ toBeDelCount: 0
|
|
|
}
|
|
|
},
|
|
|
mounted() { },
|
|
@@ -184,77 +198,53 @@ export default {
|
|
|
...mapGetters('layout', ['projectId'])
|
|
|
},
|
|
|
methods: {
|
|
|
- getlostFloors(ary, eng, FloorName) {// 获取缺失楼层
|
|
|
- let newAry = ary[0];
|
|
|
- if (newAry.FloorName !== '1') {
|
|
|
- ary.unshift({ FloorName: `${1}` })
|
|
|
- }
|
|
|
- for (let i = 0; i < ary.length; i++) {
|
|
|
- if (i === ary.length - 1) {
|
|
|
- break;
|
|
|
- }
|
|
|
- let x = ary[i].FloorName;
|
|
|
- let y = ary[i + 1].FloorName;
|
|
|
- let z = { FloorName: `${Number(x) + 1}` };
|
|
|
- if (Number(x) + 1 !== Number(y)) {
|
|
|
- ary.splice(i + 1, 0, z)
|
|
|
- i++;
|
|
|
- }
|
|
|
- }
|
|
|
- for (let i = 0; i < ary.length; i++) {
|
|
|
- ary[i].FloorName = `${eng + ary[i].FloorName}`;
|
|
|
- }
|
|
|
- for (let i = 0; i < ary.length; i++) {
|
|
|
- for (let j = 0; j < FloorName.length; j++) {
|
|
|
- if (ary[i].FloorName === FloorName[j].FloorName) {
|
|
|
- break;
|
|
|
- } else {
|
|
|
- if (j === FloorName.length - 1) {
|
|
|
- ary[i].FloorName = `${'丢失' + ary[i].FloorName}`
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- getModelFileCount() {// 获取项目下所有模型文件夹
|
|
|
- let params = {
|
|
|
- ProjectId: this.projectId,
|
|
|
- }
|
|
|
- queryModel(this.params, res => {
|
|
|
- this.ModelFileCount = res.Content.length;
|
|
|
- this.tableList = res.Content;
|
|
|
- this.tableList.map((item, index) => {
|
|
|
- item.Code = item.Id;
|
|
|
- })
|
|
|
- this.activeTab = this.tableList[0].Code;// 默认选中第一个模型文件夹
|
|
|
- this.getExportReport();
|
|
|
- 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.map(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() {// 获取当前楼层下的模型楼层
|
|
|
+ getModelFileCount() {// 获取项目下所有模型文件夹
|
|
|
+ queryModel(this.params, res => {
|
|
|
+ this.ModelFileCount = res.Content.length;
|
|
|
+ this.tableList = res.Content;
|
|
|
+ if (this.tableList && this.tableList.length) {
|
|
|
+ this.tableList.forEach((item, index) => {
|
|
|
+ item.Code = item.Id;
|
|
|
+ })
|
|
|
+ this.activeTab = this.tableList[0].Code;// 默认选中第一个模型文件夹
|
|
|
+ }
|
|
|
+ this.getModelFloor();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getModelFloor() {// 获取当前楼层下的模型楼层和各个检查项的数据
|
|
|
let params = {
|
|
|
ProjectId: this.projectId,
|
|
|
Id: `${this.activeTab}`,
|
|
@@ -262,106 +252,186 @@ export default {
|
|
|
PageSize: this.page.pageSize
|
|
|
}
|
|
|
queryReportList(params, res => {
|
|
|
- if (res.Content) {
|
|
|
- let that = this;
|
|
|
- this.FloorName = res.Content;
|
|
|
- this.lostFloort.ary = [];
|
|
|
- this.lostFloort.Bary = [];
|
|
|
- this.lostFloort.Fary = [];
|
|
|
- for (let i = 0; i < this.FloorName.length; i++) {
|
|
|
- let it = this.FloorName[i];
|
|
|
- if (this.lostFloort.regex.test(it.FloorName)) {
|
|
|
- it.FloorName.replace(/^(B||F)(\d)/g, function (a, b, c) {
|
|
|
- if (b === "B") {
|
|
|
- it.FloorName = c;
|
|
|
- that.lostFloort.Bary.push(it);
|
|
|
- } else if (b === "F") {
|
|
|
- it.FloorName = c;
|
|
|
- that.lostFloort.Fary.push(it);
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.lostFloort.ary.push(it)
|
|
|
- }
|
|
|
- }
|
|
|
- if (this.lostFloort.Bary.length > 0) {
|
|
|
- this.getlostFloors(this.lostFloort.Bary, "B", this.FloorName)
|
|
|
- }
|
|
|
- if (this.lostFloort.Fary.length > 0) {
|
|
|
- this.getlostFloors(this.lostFloort.Fary, "F", this.FloorName)
|
|
|
- }
|
|
|
- if (this.lostFloort.Bary.length < 0 && this.lostFloort.Fary.length < 0) {
|
|
|
- this.tableData = res.Content;
|
|
|
- } else {
|
|
|
- this.tableData = [...this.lostFloort.ary, ...this.lostFloort.Bary, ...this.lostFloort.Fary]
|
|
|
- }
|
|
|
- let i;
|
|
|
- let j = 0;
|
|
|
- this.tableData.map(item => {
|
|
|
- i = 0;
|
|
|
+ this.FloorName = res.Content;
|
|
|
+ this.tableData = [];
|
|
|
+ if (this.FloorName && this.FloorName.length) {
|
|
|
+ this.loading = true;
|
|
|
+ let i = 0;
|
|
|
+ this.FloorName.forEach(item => {
|
|
|
+ item.questionItem = 0;
|
|
|
for (let key in item) {
|
|
|
- if (item[key] > 0) {
|
|
|
+ if (item[key] > 0 && key !== "FloorName" && key !== "questionItem") {
|
|
|
i += 1;
|
|
|
+ item.questionItem += 1;
|
|
|
}
|
|
|
}
|
|
|
- if (item.ColumnCheck !== undefined) {
|
|
|
- item.itemsProblemsCheck = i;
|
|
|
- item.toBeDel = 10;
|
|
|
- item.toBeSupplement = 6;
|
|
|
- }
|
|
|
- if (item.itemsProblemsCheck) {
|
|
|
- j += 1;
|
|
|
- this.floorIconType = j;
|
|
|
- }
|
|
|
})
|
|
|
- } else {
|
|
|
- this.tableData = [];
|
|
|
+ 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
|
|
|
+ Filters: `FolderId='${this.activeTab}';Status=4`
|
|
|
+ }
|
|
|
+ queryLostReportList(params, res => {
|
|
|
+ this.LostFloorName = res.Content;
|
|
|
+ this.getToBeCount();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getToBeCount() {// 根据模型ID获取待删除数量和待补充数量
|
|
|
+ let equipComDelList = [];
|
|
|
+ this.equipComDelList = [];
|
|
|
+ this.LostFloorName.forEach(item => {
|
|
|
+ if (item.CurrentModelId) {
|
|
|
+ equipComDelList.push({
|
|
|
+ ModelId: item.CurrentModelId
|
|
|
+ });
|
|
|
+ this.equipComDelList.push(item.CurrentModelId)
|
|
|
+ } else {
|
|
|
+ item.flag = 'lost';
|
|
|
+ item.FloorName = `${item.Note + item.FloorName}`
|
|
|
+ }
|
|
|
+ })
|
|
|
+ let params = {
|
|
|
+ ProjectId: this.projectId,
|
|
|
+ data: equipComDelList
|
|
|
}
|
|
|
- // queryLostReportList(param, res => {
|
|
|
- // console.log(res, 'lost');
|
|
|
- // this.LostFloorName = res.Content;
|
|
|
- // for (let i = 0; i < this.LostFloorName.length; i++) {
|
|
|
- // for (let j = 0; j < this.FloorName.length; j++) {
|
|
|
- // if (this.LostFloorName[i].FloorName == this.FloorName.FloorName) {
|
|
|
- // continue;
|
|
|
- // } else {
|
|
|
- // this.FloorName.splice(i, 0, this.LostFloorName[i])
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // this.tableData = this.FloorName;
|
|
|
- // })
|
|
|
+ let promise1 = new Promise(resolve => {
|
|
|
+ getToBeDelEquip(params, res => {
|
|
|
+ resolve(res);
|
|
|
+ })
|
|
|
+ })
|
|
|
+ let promise2 = new Promise(resolve => {
|
|
|
+ getSupplement(params, res => {
|
|
|
+ resolve(res);
|
|
|
+ })
|
|
|
+ })
|
|
|
+ Promise.all([promise1, promise2]).then(response => {
|
|
|
+ let res = response[0];
|
|
|
+ let res1 = response[1];
|
|
|
+ this.toBeDelCount = 0;
|
|
|
+ this.toBeSuppCount = 0;
|
|
|
+ res.Content.forEach(item => {
|
|
|
+ if (item.Count > 0) {
|
|
|
+ this.toBeDelCount += 1;
|
|
|
+ }
|
|
|
+ this.LostFloorName.forEach(it => {
|
|
|
+ if (item.ModelId === it.CurrentModelId) {
|
|
|
+ it.toBeDel = item.Count;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ res1.Content.forEach(item => {
|
|
|
+ if (item.Count > 0) {
|
|
|
+ this.toBeSuppCount += 1;
|
|
|
+ }
|
|
|
+ this.LostFloorName.forEach(it => {
|
|
|
+ if (item.ModelId === it.CurrentModelId) {
|
|
|
+ it.toBeSupplement = item.Count;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ if (this.LostFloorName && this.LostFloorName.length) {
|
|
|
+ this.LostFloorName.forEach(item => {
|
|
|
+ this.FloorName.forEach(it => {
|
|
|
+ if (item.FloorName === it.FloorName) {
|
|
|
+ for (let key in it) {
|
|
|
+ item[key] = it[key];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.tableData = this.LostFloorName;
|
|
|
+ } else {
|
|
|
+ this.tableData = [];
|
|
|
+ }
|
|
|
+ this.page.total = this.tableData.length;
|
|
|
+ this.loading = false;
|
|
|
+ })
|
|
|
},
|
|
|
- del() {
|
|
|
- // 点击需从模型中删除的设备
|
|
|
- let jumpRouter = this.$router.resolve({ path: '/model/report/deleted' })
|
|
|
+ del() {// 点击需从模型中删除的设备
|
|
|
+ let equipComDelList = encodeURIComponent(JSON.stringify(this.equipComDelList));
|
|
|
+ let jumpRouter = this.$router.resolve({ path: '/model/report/deleted', query: { equipComDelList: equipComDelList } })
|
|
|
window.open(jumpRouter.href, '_blank')
|
|
|
},
|
|
|
- supplement() {
|
|
|
- // 点击模型待补充的设备
|
|
|
- let jumpRouter = this.$router.resolve({ path: '/model/report/supplement' })
|
|
|
+ supplement() {// 点击模型待补充的设备
|
|
|
+ let equipComDelList = encodeURIComponent(JSON.stringify(this.equipComDelList));
|
|
|
+ let jumpRouter = this.$router.resolve({ path: '/model/report/supplement', query: { equipComDelList: equipComDelList } })
|
|
|
window.open(jumpRouter.href, '_blank')
|
|
|
},
|
|
|
- // 切换每页显示数量
|
|
|
- handleSizeChange(val) {
|
|
|
+ getExportReport() {// 导出模型问题报告
|
|
|
+ let that = this;
|
|
|
+ this.load = true;
|
|
|
+ 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 = decodeURI(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)
|
|
|
+ that.load = false;
|
|
|
+ } else { // IE10+下载
|
|
|
+ navigator.msSaveBlob(blob, fileName)
|
|
|
+ that.load = false;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ let reader = new FileReader()
|
|
|
+ reader.onload = e => {
|
|
|
+ if (e.target.readyState === 2) {
|
|
|
+ let res = {}
|
|
|
+ that.load = false;
|
|
|
+ res = JSON.parse(e.target.result)
|
|
|
+ that.$message.error(res.Message);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ reader.readAsText(res.data)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ tableRowClassName({ row, rowIndex }) {// 设置缺失楼层所在行的背景色
|
|
|
+ if (row.flag && row.flag === 'lost') {
|
|
|
+ return 'warning-row';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleSizeChange(val) {// 切换每页显示数量
|
|
|
this.page.pageSize = val;
|
|
|
this.getModelFloor();
|
|
|
},
|
|
|
- // 切换页码
|
|
|
- handleCurrentChange(val) {
|
|
|
+ handleCurrentChange(val) {// 切换页码
|
|
|
this.page.pageNumber = val;
|
|
|
this.getModelFloor();
|
|
|
},
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ projectId() {
|
|
|
+ this.params = {
|
|
|
+ ProjectId: this.projectId
|
|
|
+ }
|
|
|
+ this.getModelFileCount();
|
|
|
+ this.getModelFloorCount();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -413,4 +483,11 @@ export default {
|
|
|
.error-color {
|
|
|
color: #f56c6c;
|
|
|
}
|
|
|
+</style>
|
|
|
+<style lang="less">
|
|
|
+.el-table__row.warning-row {
|
|
|
+ td {
|
|
|
+ background: #f3f3f3 !important;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|