|
@@ -206,6 +206,18 @@ export default {
|
|
|
},
|
|
|
// 新建画布成功回调
|
|
|
createPlanarCallback(folder) {
|
|
|
+
|
|
|
+ /* this.$router.push({
|
|
|
+ name: "Editer",
|
|
|
+ query: {
|
|
|
+ graphId: folder.graphId,
|
|
|
+ id: folder.id,
|
|
|
+ // categoryName: encodeURI(this.categoryName),
|
|
|
+ isPub: 0, //新建的是未发布的
|
|
|
+ },
|
|
|
+ });
|
|
|
+ // 不进行文件夹的定位
|
|
|
+ return true; */
|
|
|
if (folder.folderId) {
|
|
|
// 是否新建文件夹
|
|
|
if (folder.folderName) {
|
|
@@ -214,6 +226,9 @@ export default {
|
|
|
} else {
|
|
|
this.$refs.leftFolder.handleCheckFolder(folder.folderId);
|
|
|
}
|
|
|
+ // 选中未发布,查询列表
|
|
|
+ this.isPub = 0;
|
|
|
+ this.queryGraph();
|
|
|
}
|
|
|
},
|
|
|
// 批量新建画布
|
|
@@ -244,8 +259,8 @@ export default {
|
|
|
console.log(val);
|
|
|
let cardTree = [];
|
|
|
cardTree = this.cardTree.map((building) => {
|
|
|
- building.floorList.map((_floor) => {
|
|
|
- _floor.floor.map((card) => {
|
|
|
+ building?.floorList?.map((_floor) => {
|
|
|
+ _floor?.planarGraphLis?.map((card) => {
|
|
|
card.checked = val;
|
|
|
});
|
|
|
return _floor;
|
|
@@ -314,36 +329,15 @@ export default {
|
|
|
* 更改选中的文件夹
|
|
|
*/
|
|
|
changeFolder(data) {
|
|
|
- console.log("changeFolder");
|
|
|
- console.log(data);
|
|
|
+ // 如果没有文件夹数据,清空页面数据
|
|
|
+ if (!data) {
|
|
|
+ this.cardTree = [];
|
|
|
+ this.cardList = [];
|
|
|
+ this.folderId = "";
|
|
|
+ return true;
|
|
|
+ }
|
|
|
this.folderId = data.id;
|
|
|
this.queryGraph();
|
|
|
- return true;
|
|
|
- // TODO:
|
|
|
- let { yfbMocKdata } = require("./mockData");
|
|
|
- // console.log(yfbMocKdata);
|
|
|
- let cardTree = [],
|
|
|
- cardList = [];
|
|
|
- cardTree = yfbMocKdata.content.map((building) => {
|
|
|
- building.floorList.map((_floor) => {
|
|
|
- _floor.floor.map((card) => {
|
|
|
- card.checked = false;
|
|
|
- cardList.push({
|
|
|
- buildingId: building.buildingId,
|
|
|
- buildingName: building.buildingName,
|
|
|
- floorId: _floor.floorId,
|
|
|
- floorName: _floor.floorName,
|
|
|
- ...card,
|
|
|
- });
|
|
|
- return card;
|
|
|
- });
|
|
|
- return _floor;
|
|
|
- });
|
|
|
- return building;
|
|
|
- });
|
|
|
- this.cardTree = cardTree;
|
|
|
- this.cardList = cardList;
|
|
|
- this.cardLoading = false;
|
|
|
},
|
|
|
// 发布修改
|
|
|
changePub() {
|
|
@@ -368,6 +362,8 @@ export default {
|
|
|
},
|
|
|
// 新建拓扑图成功
|
|
|
toEdit(data) {
|
|
|
+ this.$message.warning("功能开发中");
|
|
|
+ return true;
|
|
|
this.$router.push({
|
|
|
name: "Editer",
|
|
|
query: {
|
|
@@ -421,7 +417,7 @@ export default {
|
|
|
cardTree = res?.content?.map((building) => {
|
|
|
building?.floorList?.map((_floor) => {
|
|
|
// TODO: 1111
|
|
|
- _floor?.floor?.map((card) => {
|
|
|
+ _floor?.planarGraphLis?.map((card) => {
|
|
|
card.checked = false;
|
|
|
// 保存建筑,楼层,卡片信息
|
|
|
cardList.push({
|