|
@@ -23,7 +23,7 @@
|
|
|
<el-scrollbar style="height: 100%">
|
|
|
<li
|
|
|
@click="openFolder(index, item)"
|
|
|
- v-for="(item, index) in navigationModel"
|
|
|
+ v-for="(item, index) in navigationBuild"
|
|
|
:key="index"
|
|
|
:class="[choiceIndex === index + 1 ? 'li-active' : '']"
|
|
|
>
|
|
@@ -32,7 +32,7 @@
|
|
|
width="40"
|
|
|
height="40"
|
|
|
></i>
|
|
|
- <span :title="item.Name">{{ item.Name }}</span>
|
|
|
+ <span :title="item.localName">{{ item.localName }}</span>
|
|
|
</li>
|
|
|
</el-scrollbar>
|
|
|
</ul>
|
|
@@ -114,6 +114,7 @@
|
|
|
import { Vue, Component, Watch } from "vue-property-decorator";
|
|
|
import { UserModule } from "@/store/modules/user";
|
|
|
import { queryFloorList, queryModel } from "@/api/modelapi";
|
|
|
+import { buildingQuery, floorQuery } from "@/api/datacenter";
|
|
|
import Bus from "@/utils/bus";
|
|
|
import FloorTable from "./components/FloorTable/index.vue"; //右侧list表
|
|
|
import AddFloorDialog from "./components/AddFloorDialog/index.vue"; //新增楼层弹窗
|
|
@@ -134,7 +135,7 @@ export default class extends Vue {
|
|
|
private modelLogVisible = false; // 是否显示模型日志弹窗
|
|
|
private changeFolderNameVisible = false; // 是否显示编辑文件夹弹窗
|
|
|
|
|
|
- private navigationModel: any[] = []; // 文件夹模型list
|
|
|
+ private navigationBuild: any[] = []; // 文件夹模型list
|
|
|
private choiceIndex = 0; // 当前文件夹index
|
|
|
private currentFolderId = ""; // 当前选择的文件夹id
|
|
|
private currentFolderName = ""; // 当前选择文件夹的Name
|
|
@@ -160,8 +161,8 @@ export default class extends Vue {
|
|
|
*/
|
|
|
private openFolder(index: number, item: any): void {
|
|
|
this.choiceIndex = index + 1;
|
|
|
- this.currentFolderId = item.Id;
|
|
|
- this.currentFolderName = item.Name;
|
|
|
+ this.currentFolderId = item.id;
|
|
|
+ this.currentFolderName = item.localName;
|
|
|
// 获取模型文件夹对应得楼层文件
|
|
|
this.queryFloorFile(this.currentFolderId);
|
|
|
}
|
|
@@ -191,16 +192,17 @@ export default class extends Vue {
|
|
|
* 查询所有文件夹模型
|
|
|
*/
|
|
|
private async queryModel(): Promise<void> {
|
|
|
- this.navigationModel = [];
|
|
|
+ this.navigationBuild = [];
|
|
|
this.loading = true;
|
|
|
- const res = await queryModel({ Orders: "Name asc" });
|
|
|
- this.navigationModel = res.Content;
|
|
|
+ const res = await buildingQuery({ Orders: "Name asc" });
|
|
|
+ // const res = await queryModel({ Orders: "Name asc" });
|
|
|
+ this.navigationBuild = res.content;
|
|
|
this.loading = false;
|
|
|
- if (this.navigationModel.length) {
|
|
|
+ if (this.navigationBuild.length) {
|
|
|
//默认选择第一个文件夹
|
|
|
this.choiceIndex = 1;
|
|
|
- this.currentFolderName = this.navigationModel[0].Name;
|
|
|
- this.currentFolderId = this.navigationModel[0].Id;
|
|
|
+ this.currentFolderName = this.navigationBuild[0].localName;
|
|
|
+ this.currentFolderId = this.navigationBuild[0].id;
|
|
|
this.queryFloorFile(this.currentFolderId);
|
|
|
} else {
|
|
|
this.tableData = [];
|
|
@@ -225,12 +227,14 @@ export default class extends Vue {
|
|
|
this.tableData = [];
|
|
|
this.tableLoading = true;
|
|
|
let params = {
|
|
|
- Filters: `FolderId='${currentFolderId}'`,
|
|
|
- PageNumber: 1,
|
|
|
- PageSize: 1000,
|
|
|
+ filters: `buildingId='${currentFolderId}'`,
|
|
|
+ pageNumber: 1,
|
|
|
+ pageSize: 1000,
|
|
|
};
|
|
|
- const res = await queryFloorList(params);
|
|
|
- this.tableData = res.Content;
|
|
|
+ const res = await floorQuery(params);
|
|
|
+ debugger
|
|
|
+ // const res = await queryFloorList(params);
|
|
|
+ this.tableData = res.content;
|
|
|
this.tableLoading = false;
|
|
|
}
|
|
|
}
|