@egova/egova-api 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.common.js +53 -3
- package/dist/index.umd.js +53 -3
- package/dist/index.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/index.common.js
CHANGED
|
@@ -5173,6 +5173,55 @@ var TreeDataUtil = /** @class */function () {
|
|
|
5173
5173
|
});
|
|
5174
5174
|
return arr;
|
|
5175
5175
|
};
|
|
5176
|
+
// 处理公共树结构
|
|
5177
|
+
TreeDataUtil.handlerTreeData2 = function (list, titleName, detailName, detailTitleName, filterEmpty, parentId, parentName) {
|
|
5178
|
+
if (list === void 0) {
|
|
5179
|
+
list = [];
|
|
5180
|
+
}
|
|
5181
|
+
if (detailName === void 0) {
|
|
5182
|
+
detailName = "";
|
|
5183
|
+
}
|
|
5184
|
+
if (detailTitleName === void 0) {
|
|
5185
|
+
detailTitleName = titleName;
|
|
5186
|
+
}
|
|
5187
|
+
if (filterEmpty === void 0) {
|
|
5188
|
+
filterEmpty = false;
|
|
5189
|
+
}
|
|
5190
|
+
if (parentId === void 0) {
|
|
5191
|
+
parentId = "";
|
|
5192
|
+
}
|
|
5193
|
+
if (parentName === void 0) {
|
|
5194
|
+
parentName = "";
|
|
5195
|
+
}
|
|
5196
|
+
var arr = [];
|
|
5197
|
+
list && list.forEach(function (v) {
|
|
5198
|
+
v.title = v[titleName];
|
|
5199
|
+
v.checked = false;
|
|
5200
|
+
v.selected = false;
|
|
5201
|
+
v.indeterminate = false;
|
|
5202
|
+
v.expand = false;
|
|
5203
|
+
v.parentId = v.parentId || parentId;
|
|
5204
|
+
v.parentName = v.parentName || parentName;
|
|
5205
|
+
v.children = TreeDataUtil.handlerTreeData2(v.children, titleName, detailName, detailTitleName, false, v.id, v.title);
|
|
5206
|
+
if (detailName) {
|
|
5207
|
+
var tmp = v[detailName];
|
|
5208
|
+
if (tmp) {
|
|
5209
|
+
tmp = tmp.map(function (item) {
|
|
5210
|
+
item.title = item[detailTitleName];
|
|
5211
|
+
item.checked = false;
|
|
5212
|
+
item.selected = false;
|
|
5213
|
+
item.indeterminate = false;
|
|
5214
|
+
item.parentId = v.id;
|
|
5215
|
+
item.parentName = v.title;
|
|
5216
|
+
return item;
|
|
5217
|
+
});
|
|
5218
|
+
v.children = (v.children || []).concat(tmp);
|
|
5219
|
+
}
|
|
5220
|
+
}
|
|
5221
|
+
if (!filterEmpty || v.children.length) arr.push(v);
|
|
5222
|
+
});
|
|
5223
|
+
return arr;
|
|
5224
|
+
};
|
|
5176
5225
|
// 查找当前目录节点的完整路径
|
|
5177
5226
|
TreeDataUtil.treeNodeDirectory = function (treeList, id) {
|
|
5178
5227
|
if (treeList === void 0) {
|
|
@@ -13208,6 +13257,7 @@ var tree_ProjectTree = /** @class */function (_super) {
|
|
|
13208
13257
|
switch (_a.label) {
|
|
13209
13258
|
case 0:
|
|
13210
13259
|
this.group.parentId = this.parent.id;
|
|
13260
|
+
this.group.parentName = this.parent.name;
|
|
13211
13261
|
this.group.type = "api";
|
|
13212
13262
|
if (!this.group.name) {
|
|
13213
13263
|
this.$message.warning("请填写分组名称");
|
|
@@ -13269,11 +13319,11 @@ var tree_ProjectTree = /** @class */function (_super) {
|
|
|
13269
13319
|
result = _a.sent();
|
|
13270
13320
|
this.data = (result === null || result === void 0 ? void 0 : result.result) || [];
|
|
13271
13321
|
data = this.data.$clone();
|
|
13272
|
-
TreeDataUtil.
|
|
13322
|
+
TreeDataUtil.handlerTreeData2(data, "name");
|
|
13273
13323
|
this.groupTree = data;
|
|
13274
13324
|
data = this.data.$clone();
|
|
13275
13325
|
lastRenderData = this.renderData;
|
|
13276
|
-
TreeDataUtil.
|
|
13326
|
+
TreeDataUtil.handlerTreeData2(this.data, "name", "apis");
|
|
13277
13327
|
if (lastRenderData && lastRenderData.length > 0) {
|
|
13278
13328
|
this.data.forEach(function (dataItem) {
|
|
13279
13329
|
lastRenderData.forEach(function (lastDataItem) {
|
|
@@ -13354,7 +13404,7 @@ var tree_ProjectTree = /** @class */function (_super) {
|
|
|
13354
13404
|
_a.label = 4;
|
|
13355
13405
|
case 4:
|
|
13356
13406
|
data = (result === null || result === void 0 ? void 0 : result.result) || [];
|
|
13357
|
-
TreeDataUtil.
|
|
13407
|
+
TreeDataUtil.handlerTreeData2(data, "name");
|
|
13358
13408
|
this.groupTree = data;
|
|
13359
13409
|
return [2 /*return*/];
|
|
13360
13410
|
}
|
package/dist/index.umd.js
CHANGED
|
@@ -5182,6 +5182,55 @@ var TreeDataUtil = /** @class */function () {
|
|
|
5182
5182
|
});
|
|
5183
5183
|
return arr;
|
|
5184
5184
|
};
|
|
5185
|
+
// 处理公共树结构
|
|
5186
|
+
TreeDataUtil.handlerTreeData2 = function (list, titleName, detailName, detailTitleName, filterEmpty, parentId, parentName) {
|
|
5187
|
+
if (list === void 0) {
|
|
5188
|
+
list = [];
|
|
5189
|
+
}
|
|
5190
|
+
if (detailName === void 0) {
|
|
5191
|
+
detailName = "";
|
|
5192
|
+
}
|
|
5193
|
+
if (detailTitleName === void 0) {
|
|
5194
|
+
detailTitleName = titleName;
|
|
5195
|
+
}
|
|
5196
|
+
if (filterEmpty === void 0) {
|
|
5197
|
+
filterEmpty = false;
|
|
5198
|
+
}
|
|
5199
|
+
if (parentId === void 0) {
|
|
5200
|
+
parentId = "";
|
|
5201
|
+
}
|
|
5202
|
+
if (parentName === void 0) {
|
|
5203
|
+
parentName = "";
|
|
5204
|
+
}
|
|
5205
|
+
var arr = [];
|
|
5206
|
+
list && list.forEach(function (v) {
|
|
5207
|
+
v.title = v[titleName];
|
|
5208
|
+
v.checked = false;
|
|
5209
|
+
v.selected = false;
|
|
5210
|
+
v.indeterminate = false;
|
|
5211
|
+
v.expand = false;
|
|
5212
|
+
v.parentId = v.parentId || parentId;
|
|
5213
|
+
v.parentName = v.parentName || parentName;
|
|
5214
|
+
v.children = TreeDataUtil.handlerTreeData2(v.children, titleName, detailName, detailTitleName, false, v.id, v.title);
|
|
5215
|
+
if (detailName) {
|
|
5216
|
+
var tmp = v[detailName];
|
|
5217
|
+
if (tmp) {
|
|
5218
|
+
tmp = tmp.map(function (item) {
|
|
5219
|
+
item.title = item[detailTitleName];
|
|
5220
|
+
item.checked = false;
|
|
5221
|
+
item.selected = false;
|
|
5222
|
+
item.indeterminate = false;
|
|
5223
|
+
item.parentId = v.id;
|
|
5224
|
+
item.parentName = v.title;
|
|
5225
|
+
return item;
|
|
5226
|
+
});
|
|
5227
|
+
v.children = (v.children || []).concat(tmp);
|
|
5228
|
+
}
|
|
5229
|
+
}
|
|
5230
|
+
if (!filterEmpty || v.children.length) arr.push(v);
|
|
5231
|
+
});
|
|
5232
|
+
return arr;
|
|
5233
|
+
};
|
|
5185
5234
|
// 查找当前目录节点的完整路径
|
|
5186
5235
|
TreeDataUtil.treeNodeDirectory = function (treeList, id) {
|
|
5187
5236
|
if (treeList === void 0) {
|
|
@@ -13217,6 +13266,7 @@ var tree_ProjectTree = /** @class */function (_super) {
|
|
|
13217
13266
|
switch (_a.label) {
|
|
13218
13267
|
case 0:
|
|
13219
13268
|
this.group.parentId = this.parent.id;
|
|
13269
|
+
this.group.parentName = this.parent.name;
|
|
13220
13270
|
this.group.type = "api";
|
|
13221
13271
|
if (!this.group.name) {
|
|
13222
13272
|
this.$message.warning("请填写分组名称");
|
|
@@ -13278,11 +13328,11 @@ var tree_ProjectTree = /** @class */function (_super) {
|
|
|
13278
13328
|
result = _a.sent();
|
|
13279
13329
|
this.data = (result === null || result === void 0 ? void 0 : result.result) || [];
|
|
13280
13330
|
data = this.data.$clone();
|
|
13281
|
-
TreeDataUtil.
|
|
13331
|
+
TreeDataUtil.handlerTreeData2(data, "name");
|
|
13282
13332
|
this.groupTree = data;
|
|
13283
13333
|
data = this.data.$clone();
|
|
13284
13334
|
lastRenderData = this.renderData;
|
|
13285
|
-
TreeDataUtil.
|
|
13335
|
+
TreeDataUtil.handlerTreeData2(this.data, "name", "apis");
|
|
13286
13336
|
if (lastRenderData && lastRenderData.length > 0) {
|
|
13287
13337
|
this.data.forEach(function (dataItem) {
|
|
13288
13338
|
lastRenderData.forEach(function (lastDataItem) {
|
|
@@ -13363,7 +13413,7 @@ var tree_ProjectTree = /** @class */function (_super) {
|
|
|
13363
13413
|
_a.label = 4;
|
|
13364
13414
|
case 4:
|
|
13365
13415
|
data = (result === null || result === void 0 ? void 0 : result.result) || [];
|
|
13366
|
-
TreeDataUtil.
|
|
13416
|
+
TreeDataUtil.handlerTreeData2(data, "name");
|
|
13367
13417
|
this.groupTree = data;
|
|
13368
13418
|
return [2 /*return*/];
|
|
13369
13419
|
}
|