|
@@ -14,28 +14,32 @@
|
|
<p style="margin-top:30px;">建议使用的Revit族:{{item.Res}}</p>
|
|
<p style="margin-top:30px;">建议使用的Revit族:{{item.Res}}</p>
|
|
<p>设计图纸中编码:{{item.CADID}}</p>
|
|
<p>设计图纸中编码:{{item.CADID}}</p>
|
|
<!-- <p><span>设备类型:{{'XXXXXXX'}}</span><span>设备ID:{{'XXXXXXX'}}</span></p> -->
|
|
<!-- <p><span>设备类型:{{'XXXXXXX'}}</span><span>设备ID:{{'XXXXXXX'}}</span></p> -->
|
|
- <p><span>资产族:{{'XXXXXXX'}}</span></p>
|
|
|
|
|
|
+ <p><span>资产族:{{item.FamilyName.Name}}</span></p>
|
|
<p><span style="width:500px;">资产ID:{{item.EquipID}}</span></p>
|
|
<p><span style="width:500px;">资产ID:{{item.EquipID}}</span></p>
|
|
<p>现场发现人:{{item.FindPeople}}</p>
|
|
<p>现场发现人:{{item.FindPeople}}</p>
|
|
</div>
|
|
</div>
|
|
<div class="plan">
|
|
<div class="plan">
|
|
- <p>平面图上的位置:<span>{{`${'('+'X:'+'329'+','+'Y:'+'398'+')'}`}}</span></p>
|
|
|
|
|
|
+ <p>平面图上的位置:<span>{{item.local | localTransformation}}</span></p>
|
|
<div class="img-box">
|
|
<div class="img-box">
|
|
- <canvas id="floorCanvas" :width="canvasWidth" :height="canvasHeight" ref="canvas" tabindex="0"></canvas>
|
|
|
|
|
|
+ <canvas :id="'canvas'+index" :width="canvasWidth" :height="canvasHeight" ref="canvas" tabindex="0"
|
|
|
|
+ :data-modelid="item.ModelId"></canvas>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="content-bottom">
|
|
<div class="content-bottom">
|
|
<div class="photo" v-for="(it,ind) in item.LedgerParam.PhotoDoc.Nameplate" :key="ind">
|
|
<div class="photo" v-for="(it,ind) in item.LedgerParam.PhotoDoc.Nameplate" :key="ind">
|
|
- <p>{{it.name}}<span>拍摄时间:{{it.createTime}}</span></p>
|
|
|
|
|
|
+ <p>{{it.name}}<span>拍摄时间:{{it.createTime | timeTransformation}}</span></p>
|
|
<div class="img-box">
|
|
<div class="img-box">
|
|
<img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${it.key}`" alt="铭牌图片">
|
|
<img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${it.key}`" alt="铭牌图片">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="photo" v-for="(photo,num) in item.LedgerParam.PhotoDoc.Pic" :key="num+photo">
|
|
<div class="photo" v-for="(photo,num) in item.LedgerParam.PhotoDoc.Pic" :key="num+photo">
|
|
- <p v-if="item.LedgerParam.PhotoDoc.Pic">{{photo.name}}<span>拍摄时间:{{photo.createTime}}</span></p>
|
|
|
|
|
|
+ <p v-if="item.LedgerParam.PhotoDoc.Pic">{{photo.name}}<span>拍摄时间:{{photo.createTime | timeTransformation}}</span></p>
|
|
<div class="img-box" v-if="item.LedgerParam.PhotoDoc.Pic">
|
|
<div class="img-box" v-if="item.LedgerParam.PhotoDoc.Pic">
|
|
- <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${photo.key}`" alt="设备图片">
|
|
|
|
|
|
+ <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${photo.key}`" alt="设备图片" v-if="photo.type !=='video'">
|
|
|
|
+ <video :src="'/image-service/common/image_get?systemId=dataPlatform&key='+photo.key" controls
|
|
|
|
+ :poster="'/image-service/common/image_get?systemId=dataPlatform&key='+ photo.key" v-if="photo.type === 'video'" width="400px"
|
|
|
|
+ height="300px"></video>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -48,6 +52,7 @@
|
|
<script>
|
|
<script>
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
import { toBeSupplementEquip } from "@/api/scan/request.js";
|
|
import { toBeSupplementEquip } from "@/api/scan/request.js";
|
|
|
|
+import { LocationPointScene, FloorView } from "@saga-web/cad-engine/lib";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
@@ -66,18 +71,46 @@ export default {
|
|
},
|
|
},
|
|
canvasWidth: 400,
|
|
canvasWidth: 400,
|
|
canvasHeight: 300,
|
|
canvasHeight: 300,
|
|
|
|
+ scene: '',
|
|
|
|
+ view: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
filters: {
|
|
filters: {
|
|
numTransformation(num, length) {// 序列号转换为4位
|
|
numTransformation(num, length) {// 序列号转换为4位
|
|
num = Number(num + 1)
|
|
num = Number(num + 1)
|
|
return (Array(length).join('0') + num).slice(-length);
|
|
return (Array(length).join('0') + num).slice(-length);
|
|
|
|
+ },
|
|
|
|
+ localTransformation(local) {
|
|
|
|
+ let str = "";
|
|
|
|
+ for (let key in local) {
|
|
|
|
+ if (key !== "Z") {
|
|
|
|
+ str += key + ':' + local[key] + ',';
|
|
|
|
+ } else {
|
|
|
|
+ str += key + ':' + local[key];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return str;
|
|
|
|
+ },
|
|
|
|
+ timeTransformation(time) {
|
|
|
|
+ time = time.replace(/(\d+)\-(\d+)\-(\d+)\ (\d+)\:(\d+)\:(\d+)/, function () {
|
|
|
|
+ let str = '';
|
|
|
|
+ let ary = ['年', '月', '日', '时', '分'];
|
|
|
|
+ let time = Array.prototype.concat.apply([], arguments);
|
|
|
|
+ time = time.splice(1, 5);
|
|
|
|
+ time.forEach((item, index) => {
|
|
|
|
+ str += item + ary[index];
|
|
|
|
+ })
|
|
|
|
+ return str;
|
|
|
|
+ })
|
|
|
|
+ return time;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- mounted() { },
|
|
|
|
|
|
+ mounted() {
|
|
|
|
+ // this.getGraphy();
|
|
|
|
+ this.getToBeSuppement();
|
|
|
|
+ },
|
|
created() {
|
|
created() {
|
|
this.equipComDelList = decodeURIComponent(this.$route.query.equipComDelList);
|
|
this.equipComDelList = decodeURIComponent(this.$route.query.equipComDelList);
|
|
- this.getToBeSuppement();
|
|
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapGetters('layout', ['projectId'])
|
|
...mapGetters('layout', ['projectId'])
|
|
@@ -129,9 +162,18 @@ export default {
|
|
PageSize: this.page.pageSize
|
|
PageSize: this.page.pageSize
|
|
}
|
|
}
|
|
toBeSupplementEquip(params, res => {
|
|
toBeSupplementEquip(params, res => {
|
|
|
|
+ console.log(res, 39)
|
|
this.pageData = res.Content;
|
|
this.pageData = res.Content;
|
|
- console.log(this.pageData, 12)
|
|
|
|
this.pageData.forEach(item => {
|
|
this.pageData.forEach(item => {
|
|
|
|
+ if (item.BIMLocation) {
|
|
|
|
+ let local = {};
|
|
|
|
+ let ary = item.BIMLocation.split(',');
|
|
|
|
+ let localAry = ['X', 'Y', 'Z'];
|
|
|
|
+ ary.forEach((item, index) => {
|
|
|
|
+ local[localAry[index]] = ary[index];
|
|
|
|
+ })
|
|
|
|
+ item.local = local;
|
|
|
|
+ }
|
|
if (item.ScanTaskBase && item.ScanTaskBase.length > 1) {
|
|
if (item.ScanTaskBase && item.ScanTaskBase.length > 1) {
|
|
item.ScanTaskBase = item.ScanTaskBase.shift();
|
|
item.ScanTaskBase = item.ScanTaskBase.shift();
|
|
}
|
|
}
|
|
@@ -146,30 +188,34 @@ export default {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.getGraphy();
|
|
|
|
+ })
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getGraphy() {// 绘制空间位置图片
|
|
getGraphy() {// 绘制空间位置图片
|
|
- let that = this;
|
|
|
|
- that.clearGraphy()
|
|
|
|
- that.scene = new DivideFloorScene();
|
|
|
|
- this.canvasLoading = true;
|
|
|
|
- that.scene.loadUrl(`/image-service/common/file_get?systemId=revit&key=${this.FloorMap}`).then(res => {
|
|
|
|
- that.canvasLoading = false;
|
|
|
|
- if (res == 'error') {
|
|
|
|
- this.FloorMap = '';
|
|
|
|
- this.$message.warning('数据解析异常');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- that.view.scene = that.scene;
|
|
|
|
- that.view.fitSceneToView();
|
|
|
|
- let tempArr = {
|
|
|
|
- RoomLocalName: this.spaceDetails.RoomLocalName,
|
|
|
|
- OutLine: this.spaceDetails.Outline,
|
|
|
|
- RoomID: this.spaceDetails.RoomID,
|
|
|
|
- Color: "#a384fc",
|
|
|
|
- }
|
|
|
|
- that.scene.addZoneList([tempArr]);
|
|
|
|
- this.scene.isSpaceSelectable = false;
|
|
|
|
|
|
+ this.pageData.forEach((item, index) => {
|
|
|
|
+ let that = this;
|
|
|
|
+ that.clearGraphy()
|
|
|
|
+ that.scene = new LocationPointScene();
|
|
|
|
+ this.canvasLoading = true;
|
|
|
|
+ that.scene.getFloorData('/modelapi/base-graph/query', { ModelId: item.ModelId }).then(res => {
|
|
|
|
+ that.canvasLoading = false;
|
|
|
|
+ console.log(res, 2847)
|
|
|
|
+ if (res == 'error') {
|
|
|
|
+ this.FloorMap = '';
|
|
|
|
+ this.$message.warning('数据解析异常');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ that.view.scene = that.scene;
|
|
|
|
+ this.scene.addMarker({
|
|
|
|
+ Id: 'Eq420105000136d2753ce7b94f5b98496e51fa89379a',
|
|
|
|
+ X: -35559.48,
|
|
|
|
+ Y: 16647.19
|
|
|
|
+ })
|
|
|
|
+ that.view.fitSceneToView();
|
|
|
|
+ this.scene.isSpaceSelectable = false;
|
|
|
|
+ })
|
|
})
|
|
})
|
|
},
|
|
},
|
|
clearGraphy() {
|
|
clearGraphy() {
|
|
@@ -177,8 +223,9 @@ export default {
|
|
this.view.scene = null;
|
|
this.view.scene = null;
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- this.view = new FloorView('floorCanvas')
|
|
|
|
- },
|
|
|
|
|
|
+ console.log(document.getElementById('canvas0'))
|
|
|
|
+ this.view = new FloorView('canvas0')
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|