|
@@ -22,7 +22,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { LocationPointScene, FloorView } from "@saga-web/cad-engine";
|
|
|
-import { getFileNameById } from "@/api/model/file";
|
|
|
+import { getFileNameById, queryFileByModelId } from "@/api/model/file";
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
@@ -48,7 +48,11 @@ export default {
|
|
|
if (this.equip.ModelId && this.equip.BIMLocation) {
|
|
|
this.showCanvas = true;
|
|
|
this.getGraphy();
|
|
|
- this.getFileName();
|
|
|
+ queryFileByModelId({ Filters: `Id='${this.equip.ModelId}'` }, res => {
|
|
|
+ if (res.Content.length) {
|
|
|
+ this.getFileName(res.Content[0].FloorModelId);
|
|
|
+ }
|
|
|
+ });
|
|
|
} else {
|
|
|
this.showCanvas = false;
|
|
|
}
|
|
@@ -77,8 +81,8 @@ export default {
|
|
|
return new Date().getTime();
|
|
|
},
|
|
|
// 获取文件夹及文件名称
|
|
|
- getFileName() {
|
|
|
- let pa = { Id: this.equip.ModelId }
|
|
|
+ getFileName(id) {
|
|
|
+ let pa = { Id: id }
|
|
|
getFileNameById(pa, res => {
|
|
|
this.file = res
|
|
|
})
|