@egova/egova-api 1.0.218 → 1.0.221
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 +128 -10
- package/dist/index.umd.js +128 -10
- package/dist/index.umd.min.js +2 -2
- package/package.json +2 -2
package/dist/index.common.js
CHANGED
|
@@ -22670,7 +22670,7 @@ module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
|
|
|
22670
22670
|
/***/ "193e":
|
|
22671
22671
|
/***/ (function(module, exports) {
|
|
22672
22672
|
|
|
22673
|
-
module.exports = "<article class=\"project-tree\">\n <header>\n <div class=\"tree-api\">\n <div class=\"title-g\">API列表</div>\n <div class=\"add\" @click=\"onAddGroup\">\n <i class=\"iconfont icon-xinjianwenjianjia\"></i>\n </div>\n </div>\n <div class=\"tree-search\">\n <i-select class=\"diy-select\" transfer v-model=\"type\" @on-change=\"onFilter\">\n <i-option v-for=\"item in typeList\" :key=\"item.value\" :value=\"item.value\">{{item.text}}</i-option>\n </i-select>\n <i-input class=\"diy-input\" v-model=\"keyword\" @on-search=\"onFilter\" placeholder=\"输入关键字查询\">\n <i class=\"iconfont icon-chaxun\" slot=\"prefix\"></i>\n </i-input>\n </div>\n </header>\n <i-tree :data=\"renderData\" :render=\"renderContent\"></i-tree>\n <i-modal\n draggable\n sticky\n reset-drag-position\n v-model=\"showGroupModal\"\n class=\"diy-modal\"\n :mask-closable=\"false\"\n transfer\n :title=\"group.id ? '修改分组': '添加分组'\"\n >\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\n <i-form-item label=\"分组名称\">\n <i-input class=\"diy-input\" v-model=\"group.name\"></i-input>\n </i-form-item>\n <i-form-item label=\"分组位置\">\n <u-group-select :data=\"groupTree\" :current=\"parent\" @on-select=\"onSelectParent\"></u-group-select>\n </i-form-item>\n </i-form>\n <footer slot=\"footer\">\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click.stop=\"onSaveGroup\">确定</i-button>\n <i-button class=\"diy-btn-default\" @click.stop=\"onGourpCancel\">取消</i-button>\n </footer>\n </i-modal>\n <i-modal draggable sticky reset-drag-position v-model=\"showInterfaceModal\" class=\"diy-modal\" :mask-closable=\"false\" :title=\"interfaceModel.id ? '修改接口': '添加接口'\">\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\n <i-form-item label=\"接口名称\" required>\n <i-input class=\"diy-input\" v-model=\"interfaceModel.name\"></i-input>\n </i-form-item>\n <i-form-item label=\"接口位置\" required>\n <u-group-select :data=\"groupTree\" :current=\"parent\" @on-select=\"onSelectParent\"></u-group-select>\n </i-form-item>\n <i-form-item label=\"接口类型\" required>\n <i-select v-model=\"interfaceModel.method\" class=\"diy-select\" transfer>\n <i-option v-for=\"item in typeList\" v-if=\"item.value\" :key=\"item.value\" :value=\"item.value\">{{item.text}}</i-option>\n </i-select>\n </i-form-item>\n </i-form>\n <footer slot=\"footer\">\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click=\"onSaveInterface\">确定</i-button>\n <i-button class=\"diy-btn-default\" @click=\"onInterfaceCancel\">取消</i-button>\n </footer>\n </i-modal>\n <i-modal draggable sticky reset-drag-position v-model=\"showCopyModal\" class=\"diy-modal\" :mask-closable=\"false\" title=\"复制接口\">\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\n <i-form-item label=\"接口名称\" required>\n <i-input class=\"diy-input\" v-model=\"copyName\"></i-input>\n </i-form-item>\n <i-form-item label=\"选择分组\" required>\n <u-group-select :isSelector=\"true\" :data=\"groupTree\" :current=\"parent\" @on-select=\"onSelectParent\"></u-group-select>\n </i-form-item>\n </i-form>\n <footer slot=\"footer\">\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click=\"onCopy\">确定</i-button>\n <i-button class=\"diy-btn-default\" @click=\"onCopyCancel\">取消</i-button>\n </footer>\n </i-modal>\n <u-batch-modal :visiable.sync=\"showBatchModal\" :data=\"categoryApiList\" :projectId=\"projectId\" @on-success=\"onBatchSuccess\"></u-batch-modal>\n</article>\n"
|
|
22673
|
+
module.exports = "<article class=\"project-tree\">\r\n <header>\r\n <div class=\"tree-api\">\r\n <div class=\"title-g\">API列表</div>\r\n <div class=\"add\" @click=\"onAddGroup\">\r\n <i class=\"iconfont icon-xinjianwenjianjia\"></i>\r\n </div>\r\n </div>\r\n <div class=\"tree-search\">\r\n <i-select class=\"diy-select\" transfer v-model=\"type\" @on-change=\"onFilter\">\r\n <i-option v-for=\"item in typeList\" :key=\"item.value\" :value=\"item.value\">{{item.text}}</i-option>\r\n </i-select>\r\n <i-input class=\"diy-input\" v-model=\"keyword\" @on-search=\"onFilter\" placeholder=\"输入关键字查询\">\r\n <i class=\"iconfont icon-chaxun\" slot=\"prefix\"></i>\r\n </i-input>\r\n </div>\r\n </header>\r\n <i-tree :data=\"renderData\" :render=\"renderContent\"></i-tree>\r\n <i-modal\r\n draggable\r\n sticky\r\n reset-drag-position\r\n v-model=\"showGroupModal\"\r\n class=\"diy-modal\"\r\n :mask-closable=\"false\"\r\n transfer\r\n :title=\"group.id ? '修改分组': '添加分组'\"\r\n >\r\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\r\n <i-form-item label=\"分组名称\" required>\r\n <i-input class=\"diy-input\" v-model=\"group.name\"></i-input>\r\n </i-form-item>\r\n <i-form-item label=\"分组位置\">\r\n <u-group-select :data=\"groupTree\" :current=\"parent\" @on-select=\"onSelectParent\"></u-group-select>\r\n </i-form-item>\r\n </i-form>\r\n <footer slot=\"footer\">\r\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click.stop=\"onSaveGroup\">确定</i-button>\r\n <i-button class=\"diy-btn-default\" @click.stop=\"onGourpCancel\">取消</i-button>\r\n </footer>\r\n </i-modal>\r\n <i-modal draggable sticky reset-drag-position v-model=\"showInterfaceModal\" class=\"diy-modal\" :mask-closable=\"false\" :title=\"interfaceModel.id ? '修改接口': '添加接口'\">\r\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\r\n <i-form-item label=\"接口名称\" required>\r\n <i-input class=\"diy-input\" v-model=\"interfaceModel.name\"></i-input>\r\n </i-form-item>\r\n <i-form-item label=\"接口位置\" required>\r\n <u-group-select :data=\"groupTree\" :current=\"parent\" @on-select=\"onSelectParent\"></u-group-select>\r\n </i-form-item>\r\n <i-form-item label=\"接口类型\" required>\r\n <i-select v-model=\"interfaceModel.method\" class=\"diy-select\" transfer>\r\n <i-option v-for=\"item in typeList\" v-if=\"item.value\" :key=\"item.value\" :value=\"item.value\">{{item.text}}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n </i-form>\r\n <footer slot=\"footer\">\r\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click=\"onSaveInterface\">确定</i-button>\r\n <i-button class=\"diy-btn-default\" @click=\"onInterfaceCancel\">取消</i-button>\r\n </footer>\r\n </i-modal>\r\n <i-modal draggable sticky reset-drag-position v-model=\"showCopyModal\" class=\"diy-modal\" :mask-closable=\"false\" title=\"复制接口\">\r\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\r\n <i-form-item label=\"接口名称\" required>\r\n <i-input class=\"diy-input\" v-model=\"copyName\"></i-input>\r\n </i-form-item>\r\n <i-form-item label=\"选择分组\" required>\r\n <u-group-select :isSelector=\"true\" :data=\"groupTree\" :current=\"parent\" @on-select=\"onSelectParent\"></u-group-select>\r\n </i-form-item>\r\n </i-form>\r\n <footer slot=\"footer\">\r\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click=\"onCopy\">确定</i-button>\r\n <i-button class=\"diy-btn-default\" @click=\"onCopyCancel\">取消</i-button>\r\n </footer>\r\n </i-modal>\r\n <u-batch-modal :visiable.sync=\"showBatchModal\" :data=\"categoryApiList\" :projectId=\"projectId\" @on-success=\"onBatchSuccess\"></u-batch-modal>\r\n</article>\r\n"
|
|
22674
22674
|
|
|
22675
22675
|
/***/ }),
|
|
22676
22676
|
|
|
@@ -63744,21 +63744,24 @@ function (_super) {
|
|
|
63744
63744
|
case 1:
|
|
63745
63745
|
result = _a.sent();
|
|
63746
63746
|
this.grantTypeList = (result === null || result === void 0 ? void 0 : result.result) || [];
|
|
63747
|
-
this.$subscribe("api://security-list-refresh", function () {
|
|
63747
|
+
this.$subscribe("api://security-list-refresh", function (data) {
|
|
63748
63748
|
return security_setting_v2_awaiter(_this, void 0, void 0, function () {
|
|
63749
|
+
var isBatchRefresh;
|
|
63750
|
+
|
|
63749
63751
|
var _this = this;
|
|
63750
63752
|
|
|
63751
|
-
var _a;
|
|
63753
|
+
var _a, _b;
|
|
63752
63754
|
|
|
63753
|
-
return security_setting_v2_generator(this, function (
|
|
63754
|
-
switch (
|
|
63755
|
+
return security_setting_v2_generator(this, function (_c) {
|
|
63756
|
+
switch (_c.label) {
|
|
63755
63757
|
case 0:
|
|
63758
|
+
isBatchRefresh = data.get("isBatchRefresh") || false;
|
|
63756
63759
|
return [4
|
|
63757
63760
|
/*yield*/
|
|
63758
63761
|
, this.getSecurityList()];
|
|
63759
63762
|
|
|
63760
63763
|
case 1:
|
|
63761
|
-
|
|
63764
|
+
_c.sent();
|
|
63762
63765
|
|
|
63763
63766
|
if (this.currentSecurityID) {
|
|
63764
63767
|
this.currentSecurityItemId = this.currentSecurityID;
|
|
@@ -63766,6 +63769,10 @@ function (_super) {
|
|
|
63766
63769
|
this.currentSecurityItemId = this.interfaceModel.authentication.id;
|
|
63767
63770
|
}
|
|
63768
63771
|
|
|
63772
|
+
if (((_b = this.interfaceModel.authentication) === null || _b === void 0 ? void 0 : _b.id) && isBatchRefresh) {
|
|
63773
|
+
this.currentSecurityItemId = this.interfaceModel.authentication.id;
|
|
63774
|
+
}
|
|
63775
|
+
|
|
63769
63776
|
this.currentSecurityItem = this.securityList.find(function (item) {
|
|
63770
63777
|
return item.id === _this.currentSecurityItemId;
|
|
63771
63778
|
}) || {};
|
|
@@ -65072,6 +65079,7 @@ function (_super) {
|
|
|
65072
65079
|
if (res && !res.hasError) {
|
|
65073
65080
|
this.$message.success("保存成功!");
|
|
65074
65081
|
this.$emit("on-success", true);
|
|
65082
|
+
this.$publish("api://batch-api-refresh", data);
|
|
65075
65083
|
this.onCancel();
|
|
65076
65084
|
}
|
|
65077
65085
|
|
|
@@ -65093,8 +65101,10 @@ function (_super) {
|
|
|
65093
65101
|
|
|
65094
65102
|
if (res && !res.hasError) {
|
|
65095
65103
|
this.$message.success("保存成功!"); // this.$publish("api://batch-api-refresh");
|
|
65096
|
-
// this.$publish("api://security-list-refresh");
|
|
65097
65104
|
|
|
65105
|
+
this.$publish("api://batch-api-refresh", batch_api_modal_assign(batch_api_modal_assign({}, data), {
|
|
65106
|
+
isEnvAndAuth: true
|
|
65107
|
+
}));
|
|
65098
65108
|
this.onCancel();
|
|
65099
65109
|
}
|
|
65100
65110
|
|
|
@@ -65123,6 +65133,9 @@ function (_super) {
|
|
|
65123
65133
|
if (!(res === null || res === void 0 ? void 0 : res.hasError) && !(result === null || result === void 0 ? void 0 : result.hasError)) {
|
|
65124
65134
|
this.$message.success("保存成功!");
|
|
65125
65135
|
this.$emit("on-success", true);
|
|
65136
|
+
this.$publish("api://batch-api-refresh", batch_api_modal_assign(batch_api_modal_assign({}, data), {
|
|
65137
|
+
isEnvAndAuth: true
|
|
65138
|
+
}));
|
|
65126
65139
|
this.onCancel();
|
|
65127
65140
|
}
|
|
65128
65141
|
|
|
@@ -65886,6 +65899,13 @@ function (_super) {
|
|
|
65886
65899
|
this.group.parentId = this.parent.id;
|
|
65887
65900
|
this.group.type = "api";
|
|
65888
65901
|
|
|
65902
|
+
if (!this.group.name) {
|
|
65903
|
+
this.$message.warning("请填写分组名称");
|
|
65904
|
+
return [2
|
|
65905
|
+
/*return*/
|
|
65906
|
+
];
|
|
65907
|
+
}
|
|
65908
|
+
|
|
65889
65909
|
if (this.group.id && this.group.id === this.group.parentId) {
|
|
65890
65910
|
this.$message.warning("所属分组不能选中自身");
|
|
65891
65911
|
return [2
|
|
@@ -66005,6 +66025,9 @@ var vue_awesome_swiper = __webpack_require__("7212");
|
|
|
66005
66025
|
|
|
66006
66026
|
|
|
66007
66027
|
|
|
66028
|
+
|
|
66029
|
+
|
|
66030
|
+
|
|
66008
66031
|
|
|
66009
66032
|
|
|
66010
66033
|
|
|
@@ -66430,6 +66453,8 @@ function (_super) {
|
|
|
66430
66453
|
|
|
66431
66454
|
|
|
66432
66455
|
ProjectDetail.prototype.mounted = function () {
|
|
66456
|
+
var _this = this;
|
|
66457
|
+
|
|
66433
66458
|
this.getProjectInfo();
|
|
66434
66459
|
var _a = this.$route.query,
|
|
66435
66460
|
apiId = _a.apiId,
|
|
@@ -66441,10 +66466,103 @@ function (_super) {
|
|
|
66441
66466
|
id: apiId,
|
|
66442
66467
|
name: apiName
|
|
66443
66468
|
}, resume === "true");
|
|
66444
|
-
}
|
|
66445
|
-
|
|
66446
|
-
|
|
66469
|
+
}
|
|
66470
|
+
|
|
66471
|
+
this.$subscribe("api://batch-api-refresh", function (data) {
|
|
66472
|
+
return project_detail_awaiter(_this, void 0, void 0, function () {
|
|
66473
|
+
var ids, isEnvAndAuth, cross, _loop_1, this_1, _i, cross_1, value;
|
|
66474
|
+
|
|
66475
|
+
var _this = this;
|
|
66476
|
+
|
|
66477
|
+
return project_detail_generator(this, function (_a) {
|
|
66478
|
+
switch (_a.label) {
|
|
66479
|
+
case 0:
|
|
66480
|
+
ids = data.get("ids");
|
|
66481
|
+
isEnvAndAuth = data.get("isEnvAndAuth") || false;
|
|
66482
|
+
cross = [];
|
|
66483
|
+
this.openInterfaceList.forEach(function (item) {
|
|
66484
|
+
if (ids.includes(item.id)) {
|
|
66485
|
+
cross.push({
|
|
66486
|
+
id: item.id,
|
|
66487
|
+
name: item.name
|
|
66488
|
+
});
|
|
66489
|
+
}
|
|
66490
|
+
});
|
|
66491
|
+
if (!cross.length) return [3
|
|
66492
|
+
/*break*/
|
|
66493
|
+
, 5];
|
|
66494
|
+
|
|
66495
|
+
_loop_1 = function _loop_1(value) {
|
|
66496
|
+
var res, result, index;
|
|
66497
|
+
return project_detail_generator(this, function (_b) {
|
|
66498
|
+
switch (_b.label) {
|
|
66499
|
+
case 0:
|
|
66500
|
+
return [4
|
|
66501
|
+
/*yield*/
|
|
66502
|
+
, this_1.service.apiInfo(value.id)];
|
|
66447
66503
|
|
|
66504
|
+
case 1:
|
|
66505
|
+
res = _b.sent();
|
|
66506
|
+
result = project_detail_assign(project_detail_assign({}, res.result || {}), {
|
|
66507
|
+
name: value.name,
|
|
66508
|
+
id: value.id
|
|
66509
|
+
});
|
|
66510
|
+
index = this_1.openInterfaceList.findIndex(function (i) {
|
|
66511
|
+
return i.id === value.id;
|
|
66512
|
+
});
|
|
66513
|
+
this_1.openInterfaceList.splice(index, 1, result);
|
|
66514
|
+
return [2
|
|
66515
|
+
/*return*/
|
|
66516
|
+
];
|
|
66517
|
+
}
|
|
66518
|
+
});
|
|
66519
|
+
};
|
|
66520
|
+
|
|
66521
|
+
this_1 = this;
|
|
66522
|
+
_i = 0, cross_1 = cross;
|
|
66523
|
+
_a.label = 1;
|
|
66524
|
+
|
|
66525
|
+
case 1:
|
|
66526
|
+
if (!(_i < cross_1.length)) return [3
|
|
66527
|
+
/*break*/
|
|
66528
|
+
, 4];
|
|
66529
|
+
value = cross_1[_i];
|
|
66530
|
+
return [5
|
|
66531
|
+
/*yield**/
|
|
66532
|
+
, _loop_1(value)];
|
|
66533
|
+
|
|
66534
|
+
case 2:
|
|
66535
|
+
_a.sent();
|
|
66536
|
+
|
|
66537
|
+
_a.label = 3;
|
|
66538
|
+
|
|
66539
|
+
case 3:
|
|
66540
|
+
_i++;
|
|
66541
|
+
return [3
|
|
66542
|
+
/*break*/
|
|
66543
|
+
, 1];
|
|
66544
|
+
|
|
66545
|
+
case 4:
|
|
66546
|
+
this.active = this.openInterfaceList[this.openInterfaceList.findIndex(function (i) {
|
|
66547
|
+
return i.id === _this.current.id;
|
|
66548
|
+
})];
|
|
66549
|
+
|
|
66550
|
+
if (isEnvAndAuth) {
|
|
66551
|
+
this.$publish("api://security-list-refresh", {
|
|
66552
|
+
isBatchRefresh: true
|
|
66553
|
+
});
|
|
66554
|
+
}
|
|
66555
|
+
|
|
66556
|
+
_a.label = 5;
|
|
66557
|
+
|
|
66558
|
+
case 5:
|
|
66559
|
+
return [2
|
|
66560
|
+
/*return*/
|
|
66561
|
+
];
|
|
66562
|
+
}
|
|
66563
|
+
});
|
|
66564
|
+
});
|
|
66565
|
+
});
|
|
66448
66566
|
};
|
|
66449
66567
|
|
|
66450
66568
|
ProjectDetail.prototype.activated = function () {
|
package/dist/index.umd.js
CHANGED
|
@@ -22679,7 +22679,7 @@ module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
|
|
|
22679
22679
|
/***/ "193e":
|
|
22680
22680
|
/***/ (function(module, exports) {
|
|
22681
22681
|
|
|
22682
|
-
module.exports = "<article class=\"project-tree\">\n <header>\n <div class=\"tree-api\">\n <div class=\"title-g\">API列表</div>\n <div class=\"add\" @click=\"onAddGroup\">\n <i class=\"iconfont icon-xinjianwenjianjia\"></i>\n </div>\n </div>\n <div class=\"tree-search\">\n <i-select class=\"diy-select\" transfer v-model=\"type\" @on-change=\"onFilter\">\n <i-option v-for=\"item in typeList\" :key=\"item.value\" :value=\"item.value\">{{item.text}}</i-option>\n </i-select>\n <i-input class=\"diy-input\" v-model=\"keyword\" @on-search=\"onFilter\" placeholder=\"输入关键字查询\">\n <i class=\"iconfont icon-chaxun\" slot=\"prefix\"></i>\n </i-input>\n </div>\n </header>\n <i-tree :data=\"renderData\" :render=\"renderContent\"></i-tree>\n <i-modal\n draggable\n sticky\n reset-drag-position\n v-model=\"showGroupModal\"\n class=\"diy-modal\"\n :mask-closable=\"false\"\n transfer\n :title=\"group.id ? '修改分组': '添加分组'\"\n >\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\n <i-form-item label=\"分组名称\">\n <i-input class=\"diy-input\" v-model=\"group.name\"></i-input>\n </i-form-item>\n <i-form-item label=\"分组位置\">\n <u-group-select :data=\"groupTree\" :current=\"parent\" @on-select=\"onSelectParent\"></u-group-select>\n </i-form-item>\n </i-form>\n <footer slot=\"footer\">\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click.stop=\"onSaveGroup\">确定</i-button>\n <i-button class=\"diy-btn-default\" @click.stop=\"onGourpCancel\">取消</i-button>\n </footer>\n </i-modal>\n <i-modal draggable sticky reset-drag-position v-model=\"showInterfaceModal\" class=\"diy-modal\" :mask-closable=\"false\" :title=\"interfaceModel.id ? '修改接口': '添加接口'\">\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\n <i-form-item label=\"接口名称\" required>\n <i-input class=\"diy-input\" v-model=\"interfaceModel.name\"></i-input>\n </i-form-item>\n <i-form-item label=\"接口位置\" required>\n <u-group-select :data=\"groupTree\" :current=\"parent\" @on-select=\"onSelectParent\"></u-group-select>\n </i-form-item>\n <i-form-item label=\"接口类型\" required>\n <i-select v-model=\"interfaceModel.method\" class=\"diy-select\" transfer>\n <i-option v-for=\"item in typeList\" v-if=\"item.value\" :key=\"item.value\" :value=\"item.value\">{{item.text}}</i-option>\n </i-select>\n </i-form-item>\n </i-form>\n <footer slot=\"footer\">\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click=\"onSaveInterface\">确定</i-button>\n <i-button class=\"diy-btn-default\" @click=\"onInterfaceCancel\">取消</i-button>\n </footer>\n </i-modal>\n <i-modal draggable sticky reset-drag-position v-model=\"showCopyModal\" class=\"diy-modal\" :mask-closable=\"false\" title=\"复制接口\">\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\n <i-form-item label=\"接口名称\" required>\n <i-input class=\"diy-input\" v-model=\"copyName\"></i-input>\n </i-form-item>\n <i-form-item label=\"选择分组\" required>\n <u-group-select :isSelector=\"true\" :data=\"groupTree\" :current=\"parent\" @on-select=\"onSelectParent\"></u-group-select>\n </i-form-item>\n </i-form>\n <footer slot=\"footer\">\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click=\"onCopy\">确定</i-button>\n <i-button class=\"diy-btn-default\" @click=\"onCopyCancel\">取消</i-button>\n </footer>\n </i-modal>\n <u-batch-modal :visiable.sync=\"showBatchModal\" :data=\"categoryApiList\" :projectId=\"projectId\" @on-success=\"onBatchSuccess\"></u-batch-modal>\n</article>\n"
|
|
22682
|
+
module.exports = "<article class=\"project-tree\">\r\n <header>\r\n <div class=\"tree-api\">\r\n <div class=\"title-g\">API列表</div>\r\n <div class=\"add\" @click=\"onAddGroup\">\r\n <i class=\"iconfont icon-xinjianwenjianjia\"></i>\r\n </div>\r\n </div>\r\n <div class=\"tree-search\">\r\n <i-select class=\"diy-select\" transfer v-model=\"type\" @on-change=\"onFilter\">\r\n <i-option v-for=\"item in typeList\" :key=\"item.value\" :value=\"item.value\">{{item.text}}</i-option>\r\n </i-select>\r\n <i-input class=\"diy-input\" v-model=\"keyword\" @on-search=\"onFilter\" placeholder=\"输入关键字查询\">\r\n <i class=\"iconfont icon-chaxun\" slot=\"prefix\"></i>\r\n </i-input>\r\n </div>\r\n </header>\r\n <i-tree :data=\"renderData\" :render=\"renderContent\"></i-tree>\r\n <i-modal\r\n draggable\r\n sticky\r\n reset-drag-position\r\n v-model=\"showGroupModal\"\r\n class=\"diy-modal\"\r\n :mask-closable=\"false\"\r\n transfer\r\n :title=\"group.id ? '修改分组': '添加分组'\"\r\n >\r\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\r\n <i-form-item label=\"分组名称\" required>\r\n <i-input class=\"diy-input\" v-model=\"group.name\"></i-input>\r\n </i-form-item>\r\n <i-form-item label=\"分组位置\">\r\n <u-group-select :data=\"groupTree\" :current=\"parent\" @on-select=\"onSelectParent\"></u-group-select>\r\n </i-form-item>\r\n </i-form>\r\n <footer slot=\"footer\">\r\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click.stop=\"onSaveGroup\">确定</i-button>\r\n <i-button class=\"diy-btn-default\" @click.stop=\"onGourpCancel\">取消</i-button>\r\n </footer>\r\n </i-modal>\r\n <i-modal draggable sticky reset-drag-position v-model=\"showInterfaceModal\" class=\"diy-modal\" :mask-closable=\"false\" :title=\"interfaceModel.id ? '修改接口': '添加接口'\">\r\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\r\n <i-form-item label=\"接口名称\" required>\r\n <i-input class=\"diy-input\" v-model=\"interfaceModel.name\"></i-input>\r\n </i-form-item>\r\n <i-form-item label=\"接口位置\" required>\r\n <u-group-select :data=\"groupTree\" :current=\"parent\" @on-select=\"onSelectParent\"></u-group-select>\r\n </i-form-item>\r\n <i-form-item label=\"接口类型\" required>\r\n <i-select v-model=\"interfaceModel.method\" class=\"diy-select\" transfer>\r\n <i-option v-for=\"item in typeList\" v-if=\"item.value\" :key=\"item.value\" :value=\"item.value\">{{item.text}}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n </i-form>\r\n <footer slot=\"footer\">\r\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click=\"onSaveInterface\">确定</i-button>\r\n <i-button class=\"diy-btn-default\" @click=\"onInterfaceCancel\">取消</i-button>\r\n </footer>\r\n </i-modal>\r\n <i-modal draggable sticky reset-drag-position v-model=\"showCopyModal\" class=\"diy-modal\" :mask-closable=\"false\" title=\"复制接口\">\r\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\r\n <i-form-item label=\"接口名称\" required>\r\n <i-input class=\"diy-input\" v-model=\"copyName\"></i-input>\r\n </i-form-item>\r\n <i-form-item label=\"选择分组\" required>\r\n <u-group-select :isSelector=\"true\" :data=\"groupTree\" :current=\"parent\" @on-select=\"onSelectParent\"></u-group-select>\r\n </i-form-item>\r\n </i-form>\r\n <footer slot=\"footer\">\r\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click=\"onCopy\">确定</i-button>\r\n <i-button class=\"diy-btn-default\" @click=\"onCopyCancel\">取消</i-button>\r\n </footer>\r\n </i-modal>\r\n <u-batch-modal :visiable.sync=\"showBatchModal\" :data=\"categoryApiList\" :projectId=\"projectId\" @on-success=\"onBatchSuccess\"></u-batch-modal>\r\n</article>\r\n"
|
|
22683
22683
|
|
|
22684
22684
|
/***/ }),
|
|
22685
22685
|
|
|
@@ -63753,21 +63753,24 @@ function (_super) {
|
|
|
63753
63753
|
case 1:
|
|
63754
63754
|
result = _a.sent();
|
|
63755
63755
|
this.grantTypeList = (result === null || result === void 0 ? void 0 : result.result) || [];
|
|
63756
|
-
this.$subscribe("api://security-list-refresh", function () {
|
|
63756
|
+
this.$subscribe("api://security-list-refresh", function (data) {
|
|
63757
63757
|
return security_setting_v2_awaiter(_this, void 0, void 0, function () {
|
|
63758
|
+
var isBatchRefresh;
|
|
63759
|
+
|
|
63758
63760
|
var _this = this;
|
|
63759
63761
|
|
|
63760
|
-
var _a;
|
|
63762
|
+
var _a, _b;
|
|
63761
63763
|
|
|
63762
|
-
return security_setting_v2_generator(this, function (
|
|
63763
|
-
switch (
|
|
63764
|
+
return security_setting_v2_generator(this, function (_c) {
|
|
63765
|
+
switch (_c.label) {
|
|
63764
63766
|
case 0:
|
|
63767
|
+
isBatchRefresh = data.get("isBatchRefresh") || false;
|
|
63765
63768
|
return [4
|
|
63766
63769
|
/*yield*/
|
|
63767
63770
|
, this.getSecurityList()];
|
|
63768
63771
|
|
|
63769
63772
|
case 1:
|
|
63770
|
-
|
|
63773
|
+
_c.sent();
|
|
63771
63774
|
|
|
63772
63775
|
if (this.currentSecurityID) {
|
|
63773
63776
|
this.currentSecurityItemId = this.currentSecurityID;
|
|
@@ -63775,6 +63778,10 @@ function (_super) {
|
|
|
63775
63778
|
this.currentSecurityItemId = this.interfaceModel.authentication.id;
|
|
63776
63779
|
}
|
|
63777
63780
|
|
|
63781
|
+
if (((_b = this.interfaceModel.authentication) === null || _b === void 0 ? void 0 : _b.id) && isBatchRefresh) {
|
|
63782
|
+
this.currentSecurityItemId = this.interfaceModel.authentication.id;
|
|
63783
|
+
}
|
|
63784
|
+
|
|
63778
63785
|
this.currentSecurityItem = this.securityList.find(function (item) {
|
|
63779
63786
|
return item.id === _this.currentSecurityItemId;
|
|
63780
63787
|
}) || {};
|
|
@@ -65081,6 +65088,7 @@ function (_super) {
|
|
|
65081
65088
|
if (res && !res.hasError) {
|
|
65082
65089
|
this.$message.success("保存成功!");
|
|
65083
65090
|
this.$emit("on-success", true);
|
|
65091
|
+
this.$publish("api://batch-api-refresh", data);
|
|
65084
65092
|
this.onCancel();
|
|
65085
65093
|
}
|
|
65086
65094
|
|
|
@@ -65102,8 +65110,10 @@ function (_super) {
|
|
|
65102
65110
|
|
|
65103
65111
|
if (res && !res.hasError) {
|
|
65104
65112
|
this.$message.success("保存成功!"); // this.$publish("api://batch-api-refresh");
|
|
65105
|
-
// this.$publish("api://security-list-refresh");
|
|
65106
65113
|
|
|
65114
|
+
this.$publish("api://batch-api-refresh", batch_api_modal_assign(batch_api_modal_assign({}, data), {
|
|
65115
|
+
isEnvAndAuth: true
|
|
65116
|
+
}));
|
|
65107
65117
|
this.onCancel();
|
|
65108
65118
|
}
|
|
65109
65119
|
|
|
@@ -65132,6 +65142,9 @@ function (_super) {
|
|
|
65132
65142
|
if (!(res === null || res === void 0 ? void 0 : res.hasError) && !(result === null || result === void 0 ? void 0 : result.hasError)) {
|
|
65133
65143
|
this.$message.success("保存成功!");
|
|
65134
65144
|
this.$emit("on-success", true);
|
|
65145
|
+
this.$publish("api://batch-api-refresh", batch_api_modal_assign(batch_api_modal_assign({}, data), {
|
|
65146
|
+
isEnvAndAuth: true
|
|
65147
|
+
}));
|
|
65135
65148
|
this.onCancel();
|
|
65136
65149
|
}
|
|
65137
65150
|
|
|
@@ -65895,6 +65908,13 @@ function (_super) {
|
|
|
65895
65908
|
this.group.parentId = this.parent.id;
|
|
65896
65909
|
this.group.type = "api";
|
|
65897
65910
|
|
|
65911
|
+
if (!this.group.name) {
|
|
65912
|
+
this.$message.warning("请填写分组名称");
|
|
65913
|
+
return [2
|
|
65914
|
+
/*return*/
|
|
65915
|
+
];
|
|
65916
|
+
}
|
|
65917
|
+
|
|
65898
65918
|
if (this.group.id && this.group.id === this.group.parentId) {
|
|
65899
65919
|
this.$message.warning("所属分组不能选中自身");
|
|
65900
65920
|
return [2
|
|
@@ -66014,6 +66034,9 @@ var vue_awesome_swiper = __webpack_require__("7212");
|
|
|
66014
66034
|
|
|
66015
66035
|
|
|
66016
66036
|
|
|
66037
|
+
|
|
66038
|
+
|
|
66039
|
+
|
|
66017
66040
|
|
|
66018
66041
|
|
|
66019
66042
|
|
|
@@ -66439,6 +66462,8 @@ function (_super) {
|
|
|
66439
66462
|
|
|
66440
66463
|
|
|
66441
66464
|
ProjectDetail.prototype.mounted = function () {
|
|
66465
|
+
var _this = this;
|
|
66466
|
+
|
|
66442
66467
|
this.getProjectInfo();
|
|
66443
66468
|
var _a = this.$route.query,
|
|
66444
66469
|
apiId = _a.apiId,
|
|
@@ -66450,10 +66475,103 @@ function (_super) {
|
|
|
66450
66475
|
id: apiId,
|
|
66451
66476
|
name: apiName
|
|
66452
66477
|
}, resume === "true");
|
|
66453
|
-
}
|
|
66454
|
-
|
|
66455
|
-
|
|
66478
|
+
}
|
|
66479
|
+
|
|
66480
|
+
this.$subscribe("api://batch-api-refresh", function (data) {
|
|
66481
|
+
return project_detail_awaiter(_this, void 0, void 0, function () {
|
|
66482
|
+
var ids, isEnvAndAuth, cross, _loop_1, this_1, _i, cross_1, value;
|
|
66483
|
+
|
|
66484
|
+
var _this = this;
|
|
66485
|
+
|
|
66486
|
+
return project_detail_generator(this, function (_a) {
|
|
66487
|
+
switch (_a.label) {
|
|
66488
|
+
case 0:
|
|
66489
|
+
ids = data.get("ids");
|
|
66490
|
+
isEnvAndAuth = data.get("isEnvAndAuth") || false;
|
|
66491
|
+
cross = [];
|
|
66492
|
+
this.openInterfaceList.forEach(function (item) {
|
|
66493
|
+
if (ids.includes(item.id)) {
|
|
66494
|
+
cross.push({
|
|
66495
|
+
id: item.id,
|
|
66496
|
+
name: item.name
|
|
66497
|
+
});
|
|
66498
|
+
}
|
|
66499
|
+
});
|
|
66500
|
+
if (!cross.length) return [3
|
|
66501
|
+
/*break*/
|
|
66502
|
+
, 5];
|
|
66503
|
+
|
|
66504
|
+
_loop_1 = function _loop_1(value) {
|
|
66505
|
+
var res, result, index;
|
|
66506
|
+
return project_detail_generator(this, function (_b) {
|
|
66507
|
+
switch (_b.label) {
|
|
66508
|
+
case 0:
|
|
66509
|
+
return [4
|
|
66510
|
+
/*yield*/
|
|
66511
|
+
, this_1.service.apiInfo(value.id)];
|
|
66456
66512
|
|
|
66513
|
+
case 1:
|
|
66514
|
+
res = _b.sent();
|
|
66515
|
+
result = project_detail_assign(project_detail_assign({}, res.result || {}), {
|
|
66516
|
+
name: value.name,
|
|
66517
|
+
id: value.id
|
|
66518
|
+
});
|
|
66519
|
+
index = this_1.openInterfaceList.findIndex(function (i) {
|
|
66520
|
+
return i.id === value.id;
|
|
66521
|
+
});
|
|
66522
|
+
this_1.openInterfaceList.splice(index, 1, result);
|
|
66523
|
+
return [2
|
|
66524
|
+
/*return*/
|
|
66525
|
+
];
|
|
66526
|
+
}
|
|
66527
|
+
});
|
|
66528
|
+
};
|
|
66529
|
+
|
|
66530
|
+
this_1 = this;
|
|
66531
|
+
_i = 0, cross_1 = cross;
|
|
66532
|
+
_a.label = 1;
|
|
66533
|
+
|
|
66534
|
+
case 1:
|
|
66535
|
+
if (!(_i < cross_1.length)) return [3
|
|
66536
|
+
/*break*/
|
|
66537
|
+
, 4];
|
|
66538
|
+
value = cross_1[_i];
|
|
66539
|
+
return [5
|
|
66540
|
+
/*yield**/
|
|
66541
|
+
, _loop_1(value)];
|
|
66542
|
+
|
|
66543
|
+
case 2:
|
|
66544
|
+
_a.sent();
|
|
66545
|
+
|
|
66546
|
+
_a.label = 3;
|
|
66547
|
+
|
|
66548
|
+
case 3:
|
|
66549
|
+
_i++;
|
|
66550
|
+
return [3
|
|
66551
|
+
/*break*/
|
|
66552
|
+
, 1];
|
|
66553
|
+
|
|
66554
|
+
case 4:
|
|
66555
|
+
this.active = this.openInterfaceList[this.openInterfaceList.findIndex(function (i) {
|
|
66556
|
+
return i.id === _this.current.id;
|
|
66557
|
+
})];
|
|
66558
|
+
|
|
66559
|
+
if (isEnvAndAuth) {
|
|
66560
|
+
this.$publish("api://security-list-refresh", {
|
|
66561
|
+
isBatchRefresh: true
|
|
66562
|
+
});
|
|
66563
|
+
}
|
|
66564
|
+
|
|
66565
|
+
_a.label = 5;
|
|
66566
|
+
|
|
66567
|
+
case 5:
|
|
66568
|
+
return [2
|
|
66569
|
+
/*return*/
|
|
66570
|
+
];
|
|
66571
|
+
}
|
|
66572
|
+
});
|
|
66573
|
+
});
|
|
66574
|
+
});
|
|
66457
66575
|
};
|
|
66458
66576
|
|
|
66459
66577
|
ProjectDetail.prototype.activated = function () {
|