|
@@ -206,8 +206,8 @@ export default {
|
|
|
},
|
|
|
// 新建画布成功回调
|
|
|
createPlanarCallback(folder) {
|
|
|
-
|
|
|
- /* this.$router.push({
|
|
|
+ // TODO: 编辑器开发完后后解开注释
|
|
|
+ /* this.$router.push({
|
|
|
name: "Editer",
|
|
|
query: {
|
|
|
graphId: folder.graphId,
|
|
@@ -241,8 +241,6 @@ export default {
|
|
|
},
|
|
|
// 选项改变
|
|
|
changeCheck(v) {
|
|
|
- console.log("%c选项更改:", "color:blue;");
|
|
|
- console.log(JSON.stringify(v, null, 2));
|
|
|
// 获取该对象在选中数组中的下标(按照id匹配)
|
|
|
let index = this._.findIndex(this.selectCard, ["id", v.id]);
|
|
|
if (index !== -1) {
|
|
@@ -250,17 +248,15 @@ export default {
|
|
|
} else {
|
|
|
this.selectCard.push(v);
|
|
|
}
|
|
|
- console.log(index);
|
|
|
this.isIndeterminate = Boolean(this.selectCard.length) && this.selectCard.length < this.cardList.length;
|
|
|
this.checkAll = this.selectCard.length === this.cardList.length;
|
|
|
},
|
|
|
// 全选按钮
|
|
|
handleCheckAllChange(val) {
|
|
|
- console.log(val);
|
|
|
let cardTree = [];
|
|
|
cardTree = this.cardTree.map((building) => {
|
|
|
building?.floorList?.map((_floor) => {
|
|
|
- _floor?.planarGraphLis?.map((card) => {
|
|
|
+ _floor?.planarGraphList?.map((card) => {
|
|
|
card.checked = val;
|
|
|
});
|
|
|
return _floor;
|
|
@@ -329,6 +325,8 @@ export default {
|
|
|
* 更改选中的文件夹
|
|
|
*/
|
|
|
changeFolder(data) {
|
|
|
+ // 清空搜索值
|
|
|
+ this.queryText = "";
|
|
|
// 如果没有文件夹数据,清空页面数据
|
|
|
if (!data) {
|
|
|
this.cardTree = [];
|
|
@@ -377,6 +375,7 @@ export default {
|
|
|
/**
|
|
|
* 查询图形信息
|
|
|
* @param { string } floderId 传入的文件ID,新建画布成功之后,会调用该接口
|
|
|
+ * 如果传入floderId,使用该id,不传的话,使用全局的this.folderId
|
|
|
*/
|
|
|
async queryGraph(floderId) {
|
|
|
if (!(floderId || this.folderId)) {
|
|
@@ -396,7 +395,7 @@ export default {
|
|
|
PageSize: 1000,
|
|
|
};
|
|
|
if (this.queryText) {
|
|
|
- postParams.filters += `;name contain "${this.queryText}"`;
|
|
|
+ postParams.filters += `;name contain '${this.queryText}'`;
|
|
|
}
|
|
|
/**
|
|
|
* 已发布,未发布 1:已发布 0:未发布
|
|
@@ -416,8 +415,7 @@ export default {
|
|
|
cardList = [];
|
|
|
cardTree = res?.content?.map((building) => {
|
|
|
building?.floorList?.map((_floor) => {
|
|
|
- // TODO: 1111
|
|
|
- _floor?.planarGraphLis?.map((card) => {
|
|
|
+ _floor?.planarGraphList?.map((card) => {
|
|
|
card.checked = false;
|
|
|
// 保存建筑,楼层,卡片信息
|
|
|
cardList.push({
|
|
@@ -439,8 +437,6 @@ export default {
|
|
|
});
|
|
|
this.cardTree = cardTree;
|
|
|
this.cardList = cardList;
|
|
|
- console.log(this.cardList);
|
|
|
- console.log(this.cardTree);
|
|
|
this.cardLoading = false;
|
|
|
},
|
|
|
},
|