@egova/egova-api 1.0.42 → 1.0.48
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
CHANGED
|
@@ -22586,7 +22586,7 @@ module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
|
|
|
22586
22586
|
/***/ "193e":
|
|
22587
22587
|
/***/ (function(module, exports) {
|
|
22588
22588
|
|
|
22589
|
-
module.exports = "<article class=\"project-tree\">\
|
|
22589
|
+
module.exports = "<article class=\"project-tree\">\n <header>\n <i-input\n class=\"diy-input\"\n search\n v-model=\"keyword\"\n @on-search=\"onFilter\"\n placeholder=\"输入关键字搜索\"\n >\n <i-select\n transfer\n slot=\"prepend\"\n v-model=\"type\"\n @on-change=\"onFilter\"\n class=\"diy-select\"\n >\n <i-option\n v-for=\"item in typeList\"\n :key=\"item.value\"\n :value=\"item.value\"\n >{{item.text}}</i-option\n >\n </i-select>\n </i-input>\n <div class=\"add\" @click=\"onAddGroup\">\n <i class=\"api-icon icon-add\"></i>\n <span>新建分组</span>\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 @on-ok=\"onSaveGroup\"\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\n :data=\"groupTree\"\n :current=\"parent\"\n @on-select=\"onSelectParent\"\n ></u-group-select>\n </i-form-item>\n </i-form>\n </i-modal>\n <i-modal\n draggable\n sticky\n reset-drag-position\n v-model=\"showInterfaceModal\"\n class=\"diy-modal\"\n :mask-closable=\"false\"\n @on-ok=\"onSaveInterface\"\n :title=\"interfaceModel.id ? '修改接口': '添加接口'\"\n >\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\n <i-form-item label=\"接口名称\">\n <i-input\n class=\"diy-input\"\n v-model=\"interfaceModel.name\"\n ></i-input>\n </i-form-item>\n <i-form-item label=\"接口位置\">\n <u-group-select\n :data=\"groupTree\"\n :current=\"parent\"\n @on-select=\"onSelectParent\"\n ></u-group-select>\n </i-form-item>\n <i-form-item label=\"接口类型\">\n <i-select v-model=\"interfaceModel.method\" class=\"diy-select\" transfer>\n <i-option\n v-for=\"item in typeList\"\n v-if=\"item.value\"\n :key=\"item.value\"\n :value=\"item.value\"\n >{{item.text}}</i-option\n >\n </i-select>\n </i-form-item>\n </i-form>\n </i-modal>\n <i-modal\n draggable\n sticky\n reset-drag-position\n v-model=\"showCopyModal\"\n class=\"diy-modal\"\n :mask-closable=\"false\"\n title=\"复制接口\"\n >\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\n <i-form-item label=\"接口名称\" required>\n <i-input\n class=\"diy-input\"\n v-model=\"copyName\"\n ></i-input>\n </i-form-item>\n <i-form-item label=\"选择分组\" required>\n <u-group-select\n :data=\"groupTree\"\n :current=\"parent\"\n @on-select=\"onSelectParent\"\n ></u-group-select>\n </i-form-item>\n </i-form>\n <footer slot=\"footer\">\n <i-button\n class=\"diy-btn-primary\"\n type=\"primary\"\n @click=\"onCopy\"\n >确定</i-button>\n <i-button class=\"diy-btn-default\" @click=\"onCopyCancel\">取消</i-button>\n </footer>\n </i-modal>\n</article>\n"
|
|
22590
22590
|
|
|
22591
22591
|
/***/ }),
|
|
22592
22592
|
|
|
@@ -49403,8 +49403,8 @@ function (_super) {
|
|
|
49403
49403
|
return this._post("/unity/api/info", api);
|
|
49404
49404
|
};
|
|
49405
49405
|
|
|
49406
|
-
ApiService.prototype.copyApi = function (id, name) {
|
|
49407
|
-
return this._post("/unity/api/info/copy?id=".concat(id, "&name=").concat(name));
|
|
49406
|
+
ApiService.prototype.copyApi = function (id, name, projectId, categoryId) {
|
|
49407
|
+
return this._post("/unity/api/info/copy?id=".concat(id, "&name=").concat(name, "&projectId=").concat(projectId, "&categoryId=").concat(categoryId));
|
|
49408
49408
|
};
|
|
49409
49409
|
|
|
49410
49410
|
ApiService.prototype.apiInfo = function (id) {
|
|
@@ -49465,7 +49465,7 @@ function (_super) {
|
|
|
49465
49465
|
title: "复制接口",
|
|
49466
49466
|
showErrorMsg: true,
|
|
49467
49467
|
showTip: true
|
|
49468
|
-
}), project_detail_service_metadata("design:type", Function), project_detail_service_metadata("design:paramtypes", [String, String]), project_detail_service_metadata("design:returntype", void 0)], ApiService.prototype, "copyApi", null);
|
|
49468
|
+
}), project_detail_service_metadata("design:type", Function), project_detail_service_metadata("design:paramtypes", [String, String, String, String]), project_detail_service_metadata("design:returntype", void 0)], ApiService.prototype, "copyApi", null);
|
|
49469
49469
|
|
|
49470
49470
|
project_detail_service_decorate([serviceHandler("query", {
|
|
49471
49471
|
title: "接口详情"
|
|
@@ -50430,6 +50430,9 @@ var project_detail = __webpack_require__("fe54");
|
|
|
50430
50430
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.find.js
|
|
50431
50431
|
var es_array_find = __webpack_require__("7db0");
|
|
50432
50432
|
|
|
50433
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
|
|
50434
|
+
var es_array_filter = __webpack_require__("4de4");
|
|
50435
|
+
|
|
50433
50436
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.json.stringify.js
|
|
50434
50437
|
var es_json_stringify = __webpack_require__("e9c4");
|
|
50435
50438
|
|
|
@@ -51173,9 +51176,6 @@ function (_super) {
|
|
|
51173
51176
|
}(project_detail_pre_execution_setting);
|
|
51174
51177
|
|
|
51175
51178
|
/* harmony default export */ var after_execution_script = (after_execution_script_AfterExecutionScript);
|
|
51176
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
|
|
51177
|
-
var es_array_filter = __webpack_require__("4de4");
|
|
51178
|
-
|
|
51179
51179
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
|
|
51180
51180
|
var es_object_keys = __webpack_require__("b64b");
|
|
51181
51181
|
|
|
@@ -52842,6 +52842,8 @@ var interface_settings = __webpack_require__("2a79");
|
|
|
52842
52842
|
|
|
52843
52843
|
|
|
52844
52844
|
|
|
52845
|
+
|
|
52846
|
+
|
|
52845
52847
|
|
|
52846
52848
|
|
|
52847
52849
|
var interface_settings_extends = undefined && undefined.__extends || function () {
|
|
@@ -52872,6 +52874,22 @@ var interface_settings_extends = undefined && undefined.__extends || function ()
|
|
|
52872
52874
|
};
|
|
52873
52875
|
}();
|
|
52874
52876
|
|
|
52877
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
52878
|
+
__assign = Object.assign || function (t) {
|
|
52879
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
52880
|
+
s = arguments[i];
|
|
52881
|
+
|
|
52882
|
+
for (var p in s) {
|
|
52883
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
52884
|
+
}
|
|
52885
|
+
}
|
|
52886
|
+
|
|
52887
|
+
return t;
|
|
52888
|
+
};
|
|
52889
|
+
|
|
52890
|
+
return __assign.apply(this, arguments);
|
|
52891
|
+
};
|
|
52892
|
+
|
|
52875
52893
|
var interface_settings_decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
52876
52894
|
var c = arguments.length,
|
|
52877
52895
|
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
@@ -53104,18 +53122,38 @@ function (_super) {
|
|
|
53104
53122
|
};
|
|
53105
53123
|
|
|
53106
53124
|
InterfaceSettings.prototype.onRun = function () {
|
|
53125
|
+
var _a, _b;
|
|
53126
|
+
|
|
53107
53127
|
return interface_settings_awaiter(this, void 0, void 0, function () {
|
|
53108
|
-
var result;
|
|
53109
|
-
return interface_settings_generator(this, function (
|
|
53110
|
-
switch (
|
|
53128
|
+
var formParams, requestHeaders, result;
|
|
53129
|
+
return interface_settings_generator(this, function (_c) {
|
|
53130
|
+
switch (_c.label) {
|
|
53111
53131
|
case 0:
|
|
53112
53132
|
this.loading = true;
|
|
53133
|
+
formParams = [];
|
|
53134
|
+
requestHeaders = [];
|
|
53135
|
+
|
|
53136
|
+
if (((_a = this.interfaceModel.formParams) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
53137
|
+
formParams = this.interfaceModel.formParams.filter(function (param) {
|
|
53138
|
+
return !param.disabled;
|
|
53139
|
+
});
|
|
53140
|
+
}
|
|
53141
|
+
|
|
53142
|
+
if (((_b = this.interfaceModel.requestHeaders) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
53143
|
+
requestHeaders = this.interfaceModel.requestHeaders.filter(function (param) {
|
|
53144
|
+
return !param.disabled;
|
|
53145
|
+
});
|
|
53146
|
+
}
|
|
53147
|
+
|
|
53113
53148
|
return [4
|
|
53114
53149
|
/*yield*/
|
|
53115
|
-
, this.service.run(this.interfaceModel.info.id, this.interfaceModel)
|
|
53150
|
+
, this.service.run(this.interfaceModel.info.id, __assign(__assign({}, this.interfaceModel), {
|
|
53151
|
+
formParams: formParams,
|
|
53152
|
+
requestHeaders: requestHeaders
|
|
53153
|
+
}))];
|
|
53116
53154
|
|
|
53117
53155
|
case 1:
|
|
53118
|
-
result =
|
|
53156
|
+
result = _c.sent();
|
|
53119
53157
|
this.loading = false;
|
|
53120
53158
|
this.response = (result === null || result === void 0 ? void 0 : result.result) || new Response();
|
|
53121
53159
|
|
|
@@ -53791,6 +53829,7 @@ function (_super) {
|
|
|
53791
53829
|
|
|
53792
53830
|
ProjectTree.prototype.onCopyInterface = function (data) {
|
|
53793
53831
|
this.interfaceModel = data;
|
|
53832
|
+
this.copyName = this.interfaceModel.name + "_copy";
|
|
53794
53833
|
this.showCopyModal = true;
|
|
53795
53834
|
};
|
|
53796
53835
|
|
|
@@ -53800,9 +53839,21 @@ function (_super) {
|
|
|
53800
53839
|
return tree_generator(this, function (_a) {
|
|
53801
53840
|
switch (_a.label) {
|
|
53802
53841
|
case 0:
|
|
53842
|
+
if (!this.copyName) {
|
|
53843
|
+
return [2
|
|
53844
|
+
/*return*/
|
|
53845
|
+
, this.$message.warning("请填写接口名称")];
|
|
53846
|
+
}
|
|
53847
|
+
|
|
53848
|
+
if (!this.parent.name) {
|
|
53849
|
+
return [2
|
|
53850
|
+
/*return*/
|
|
53851
|
+
, this.$message.warning("请选择分组")];
|
|
53852
|
+
}
|
|
53853
|
+
|
|
53803
53854
|
return [4
|
|
53804
53855
|
/*yield*/
|
|
53805
|
-
, this.service.copyApi(this.interfaceModel.id, this.copyName)];
|
|
53856
|
+
, this.service.copyApi(this.interfaceModel.id, this.copyName, this.interfaceModel.projectId, this.parent.id)];
|
|
53806
53857
|
|
|
53807
53858
|
case 1:
|
|
53808
53859
|
result = _a.sent();
|
|
@@ -53810,8 +53861,15 @@ function (_super) {
|
|
|
53810
53861
|
if (result && !result.hasError) {
|
|
53811
53862
|
this.showCopyModal = false;
|
|
53812
53863
|
this.init();
|
|
53864
|
+
} else if (result && result.hasError && result.message) {
|
|
53865
|
+
return [2
|
|
53866
|
+
/*return*/
|
|
53867
|
+
, this.$message.error(result.message)];
|
|
53813
53868
|
}
|
|
53814
53869
|
|
|
53870
|
+
this.interfaceModel = {};
|
|
53871
|
+
this.copyName = "";
|
|
53872
|
+
this.parent = {};
|
|
53815
53873
|
return [2
|
|
53816
53874
|
/*return*/
|
|
53817
53875
|
];
|
|
@@ -53820,6 +53878,13 @@ function (_super) {
|
|
|
53820
53878
|
});
|
|
53821
53879
|
};
|
|
53822
53880
|
|
|
53881
|
+
ProjectTree.prototype.onCopyCancel = function () {
|
|
53882
|
+
this.interfaceModel = {};
|
|
53883
|
+
this.copyName = "";
|
|
53884
|
+
this.parent = {};
|
|
53885
|
+
this.showCopyModal = false;
|
|
53886
|
+
};
|
|
53887
|
+
|
|
53823
53888
|
ProjectTree.prototype.onAddInterface = function (group) {
|
|
53824
53889
|
this.interfaceModel = {
|
|
53825
53890
|
method: "GET"
|
|
@@ -54089,8 +54154,8 @@ var project_detail_extends = undefined && undefined.__extends || function () {
|
|
|
54089
54154
|
};
|
|
54090
54155
|
}();
|
|
54091
54156
|
|
|
54092
|
-
var
|
|
54093
|
-
|
|
54157
|
+
var project_detail_assign = undefined && undefined.__assign || function () {
|
|
54158
|
+
project_detail_assign = Object.assign || function (t) {
|
|
54094
54159
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
54095
54160
|
s = arguments[i];
|
|
54096
54161
|
|
|
@@ -54102,7 +54167,7 @@ var __assign = undefined && undefined.__assign || function () {
|
|
|
54102
54167
|
return t;
|
|
54103
54168
|
};
|
|
54104
54169
|
|
|
54105
|
-
return
|
|
54170
|
+
return project_detail_assign.apply(this, arguments);
|
|
54106
54171
|
};
|
|
54107
54172
|
|
|
54108
54173
|
var project_detail_decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
@@ -54328,7 +54393,7 @@ function (_super) {
|
|
|
54328
54393
|
case 1:
|
|
54329
54394
|
result = _a.sent();
|
|
54330
54395
|
this.loading = false;
|
|
54331
|
-
obj =
|
|
54396
|
+
obj = project_detail_assign(project_detail_assign({}, result.result), {
|
|
54332
54397
|
name: data.name,
|
|
54333
54398
|
id: data.id
|
|
54334
54399
|
});
|
|
@@ -54401,7 +54466,9 @@ function (_super) {
|
|
|
54401
54466
|
};
|
|
54402
54467
|
|
|
54403
54468
|
ProjectDetail.prototype.onBack = function () {
|
|
54404
|
-
this.$router.
|
|
54469
|
+
this.$router.push({
|
|
54470
|
+
name: "project-list"
|
|
54471
|
+
});
|
|
54405
54472
|
};
|
|
54406
54473
|
|
|
54407
54474
|
var _a;
|
package/dist/index.umd.js
CHANGED
|
@@ -22595,7 +22595,7 @@ module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
|
|
|
22595
22595
|
/***/ "193e":
|
|
22596
22596
|
/***/ (function(module, exports) {
|
|
22597
22597
|
|
|
22598
|
-
module.exports = "<article class=\"project-tree\">\
|
|
22598
|
+
module.exports = "<article class=\"project-tree\">\n <header>\n <i-input\n class=\"diy-input\"\n search\n v-model=\"keyword\"\n @on-search=\"onFilter\"\n placeholder=\"输入关键字搜索\"\n >\n <i-select\n transfer\n slot=\"prepend\"\n v-model=\"type\"\n @on-change=\"onFilter\"\n class=\"diy-select\"\n >\n <i-option\n v-for=\"item in typeList\"\n :key=\"item.value\"\n :value=\"item.value\"\n >{{item.text}}</i-option\n >\n </i-select>\n </i-input>\n <div class=\"add\" @click=\"onAddGroup\">\n <i class=\"api-icon icon-add\"></i>\n <span>新建分组</span>\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 @on-ok=\"onSaveGroup\"\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\n :data=\"groupTree\"\n :current=\"parent\"\n @on-select=\"onSelectParent\"\n ></u-group-select>\n </i-form-item>\n </i-form>\n </i-modal>\n <i-modal\n draggable\n sticky\n reset-drag-position\n v-model=\"showInterfaceModal\"\n class=\"diy-modal\"\n :mask-closable=\"false\"\n @on-ok=\"onSaveInterface\"\n :title=\"interfaceModel.id ? '修改接口': '添加接口'\"\n >\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\n <i-form-item label=\"接口名称\">\n <i-input\n class=\"diy-input\"\n v-model=\"interfaceModel.name\"\n ></i-input>\n </i-form-item>\n <i-form-item label=\"接口位置\">\n <u-group-select\n :data=\"groupTree\"\n :current=\"parent\"\n @on-select=\"onSelectParent\"\n ></u-group-select>\n </i-form-item>\n <i-form-item label=\"接口类型\">\n <i-select v-model=\"interfaceModel.method\" class=\"diy-select\" transfer>\n <i-option\n v-for=\"item in typeList\"\n v-if=\"item.value\"\n :key=\"item.value\"\n :value=\"item.value\"\n >{{item.text}}</i-option\n >\n </i-select>\n </i-form-item>\n </i-form>\n </i-modal>\n <i-modal\n draggable\n sticky\n reset-drag-position\n v-model=\"showCopyModal\"\n class=\"diy-modal\"\n :mask-closable=\"false\"\n title=\"复制接口\"\n >\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\n <i-form-item label=\"接口名称\" required>\n <i-input\n class=\"diy-input\"\n v-model=\"copyName\"\n ></i-input>\n </i-form-item>\n <i-form-item label=\"选择分组\" required>\n <u-group-select\n :data=\"groupTree\"\n :current=\"parent\"\n @on-select=\"onSelectParent\"\n ></u-group-select>\n </i-form-item>\n </i-form>\n <footer slot=\"footer\">\n <i-button\n class=\"diy-btn-primary\"\n type=\"primary\"\n @click=\"onCopy\"\n >确定</i-button>\n <i-button class=\"diy-btn-default\" @click=\"onCopyCancel\">取消</i-button>\n </footer>\n </i-modal>\n</article>\n"
|
|
22599
22599
|
|
|
22600
22600
|
/***/ }),
|
|
22601
22601
|
|
|
@@ -49412,8 +49412,8 @@ function (_super) {
|
|
|
49412
49412
|
return this._post("/unity/api/info", api);
|
|
49413
49413
|
};
|
|
49414
49414
|
|
|
49415
|
-
ApiService.prototype.copyApi = function (id, name) {
|
|
49416
|
-
return this._post("/unity/api/info/copy?id=".concat(id, "&name=").concat(name));
|
|
49415
|
+
ApiService.prototype.copyApi = function (id, name, projectId, categoryId) {
|
|
49416
|
+
return this._post("/unity/api/info/copy?id=".concat(id, "&name=").concat(name, "&projectId=").concat(projectId, "&categoryId=").concat(categoryId));
|
|
49417
49417
|
};
|
|
49418
49418
|
|
|
49419
49419
|
ApiService.prototype.apiInfo = function (id) {
|
|
@@ -49474,7 +49474,7 @@ function (_super) {
|
|
|
49474
49474
|
title: "复制接口",
|
|
49475
49475
|
showErrorMsg: true,
|
|
49476
49476
|
showTip: true
|
|
49477
|
-
}), project_detail_service_metadata("design:type", Function), project_detail_service_metadata("design:paramtypes", [String, String]), project_detail_service_metadata("design:returntype", void 0)], ApiService.prototype, "copyApi", null);
|
|
49477
|
+
}), project_detail_service_metadata("design:type", Function), project_detail_service_metadata("design:paramtypes", [String, String, String, String]), project_detail_service_metadata("design:returntype", void 0)], ApiService.prototype, "copyApi", null);
|
|
49478
49478
|
|
|
49479
49479
|
project_detail_service_decorate([serviceHandler("query", {
|
|
49480
49480
|
title: "接口详情"
|
|
@@ -50439,6 +50439,9 @@ var project_detail = __webpack_require__("fe54");
|
|
|
50439
50439
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.find.js
|
|
50440
50440
|
var es_array_find = __webpack_require__("7db0");
|
|
50441
50441
|
|
|
50442
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
|
|
50443
|
+
var es_array_filter = __webpack_require__("4de4");
|
|
50444
|
+
|
|
50442
50445
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.json.stringify.js
|
|
50443
50446
|
var es_json_stringify = __webpack_require__("e9c4");
|
|
50444
50447
|
|
|
@@ -51182,9 +51185,6 @@ function (_super) {
|
|
|
51182
51185
|
}(project_detail_pre_execution_setting);
|
|
51183
51186
|
|
|
51184
51187
|
/* harmony default export */ var after_execution_script = (after_execution_script_AfterExecutionScript);
|
|
51185
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
|
|
51186
|
-
var es_array_filter = __webpack_require__("4de4");
|
|
51187
|
-
|
|
51188
51188
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
|
|
51189
51189
|
var es_object_keys = __webpack_require__("b64b");
|
|
51190
51190
|
|
|
@@ -52851,6 +52851,8 @@ var interface_settings = __webpack_require__("2a79");
|
|
|
52851
52851
|
|
|
52852
52852
|
|
|
52853
52853
|
|
|
52854
|
+
|
|
52855
|
+
|
|
52854
52856
|
|
|
52855
52857
|
|
|
52856
52858
|
var interface_settings_extends = undefined && undefined.__extends || function () {
|
|
@@ -52881,6 +52883,22 @@ var interface_settings_extends = undefined && undefined.__extends || function ()
|
|
|
52881
52883
|
};
|
|
52882
52884
|
}();
|
|
52883
52885
|
|
|
52886
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
52887
|
+
__assign = Object.assign || function (t) {
|
|
52888
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
52889
|
+
s = arguments[i];
|
|
52890
|
+
|
|
52891
|
+
for (var p in s) {
|
|
52892
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
52893
|
+
}
|
|
52894
|
+
}
|
|
52895
|
+
|
|
52896
|
+
return t;
|
|
52897
|
+
};
|
|
52898
|
+
|
|
52899
|
+
return __assign.apply(this, arguments);
|
|
52900
|
+
};
|
|
52901
|
+
|
|
52884
52902
|
var interface_settings_decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
52885
52903
|
var c = arguments.length,
|
|
52886
52904
|
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
@@ -53113,18 +53131,38 @@ function (_super) {
|
|
|
53113
53131
|
};
|
|
53114
53132
|
|
|
53115
53133
|
InterfaceSettings.prototype.onRun = function () {
|
|
53134
|
+
var _a, _b;
|
|
53135
|
+
|
|
53116
53136
|
return interface_settings_awaiter(this, void 0, void 0, function () {
|
|
53117
|
-
var result;
|
|
53118
|
-
return interface_settings_generator(this, function (
|
|
53119
|
-
switch (
|
|
53137
|
+
var formParams, requestHeaders, result;
|
|
53138
|
+
return interface_settings_generator(this, function (_c) {
|
|
53139
|
+
switch (_c.label) {
|
|
53120
53140
|
case 0:
|
|
53121
53141
|
this.loading = true;
|
|
53142
|
+
formParams = [];
|
|
53143
|
+
requestHeaders = [];
|
|
53144
|
+
|
|
53145
|
+
if (((_a = this.interfaceModel.formParams) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
53146
|
+
formParams = this.interfaceModel.formParams.filter(function (param) {
|
|
53147
|
+
return !param.disabled;
|
|
53148
|
+
});
|
|
53149
|
+
}
|
|
53150
|
+
|
|
53151
|
+
if (((_b = this.interfaceModel.requestHeaders) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
53152
|
+
requestHeaders = this.interfaceModel.requestHeaders.filter(function (param) {
|
|
53153
|
+
return !param.disabled;
|
|
53154
|
+
});
|
|
53155
|
+
}
|
|
53156
|
+
|
|
53122
53157
|
return [4
|
|
53123
53158
|
/*yield*/
|
|
53124
|
-
, this.service.run(this.interfaceModel.info.id, this.interfaceModel)
|
|
53159
|
+
, this.service.run(this.interfaceModel.info.id, __assign(__assign({}, this.interfaceModel), {
|
|
53160
|
+
formParams: formParams,
|
|
53161
|
+
requestHeaders: requestHeaders
|
|
53162
|
+
}))];
|
|
53125
53163
|
|
|
53126
53164
|
case 1:
|
|
53127
|
-
result =
|
|
53165
|
+
result = _c.sent();
|
|
53128
53166
|
this.loading = false;
|
|
53129
53167
|
this.response = (result === null || result === void 0 ? void 0 : result.result) || new Response();
|
|
53130
53168
|
|
|
@@ -53800,6 +53838,7 @@ function (_super) {
|
|
|
53800
53838
|
|
|
53801
53839
|
ProjectTree.prototype.onCopyInterface = function (data) {
|
|
53802
53840
|
this.interfaceModel = data;
|
|
53841
|
+
this.copyName = this.interfaceModel.name + "_copy";
|
|
53803
53842
|
this.showCopyModal = true;
|
|
53804
53843
|
};
|
|
53805
53844
|
|
|
@@ -53809,9 +53848,21 @@ function (_super) {
|
|
|
53809
53848
|
return tree_generator(this, function (_a) {
|
|
53810
53849
|
switch (_a.label) {
|
|
53811
53850
|
case 0:
|
|
53851
|
+
if (!this.copyName) {
|
|
53852
|
+
return [2
|
|
53853
|
+
/*return*/
|
|
53854
|
+
, this.$message.warning("请填写接口名称")];
|
|
53855
|
+
}
|
|
53856
|
+
|
|
53857
|
+
if (!this.parent.name) {
|
|
53858
|
+
return [2
|
|
53859
|
+
/*return*/
|
|
53860
|
+
, this.$message.warning("请选择分组")];
|
|
53861
|
+
}
|
|
53862
|
+
|
|
53812
53863
|
return [4
|
|
53813
53864
|
/*yield*/
|
|
53814
|
-
, this.service.copyApi(this.interfaceModel.id, this.copyName)];
|
|
53865
|
+
, this.service.copyApi(this.interfaceModel.id, this.copyName, this.interfaceModel.projectId, this.parent.id)];
|
|
53815
53866
|
|
|
53816
53867
|
case 1:
|
|
53817
53868
|
result = _a.sent();
|
|
@@ -53819,8 +53870,15 @@ function (_super) {
|
|
|
53819
53870
|
if (result && !result.hasError) {
|
|
53820
53871
|
this.showCopyModal = false;
|
|
53821
53872
|
this.init();
|
|
53873
|
+
} else if (result && result.hasError && result.message) {
|
|
53874
|
+
return [2
|
|
53875
|
+
/*return*/
|
|
53876
|
+
, this.$message.error(result.message)];
|
|
53822
53877
|
}
|
|
53823
53878
|
|
|
53879
|
+
this.interfaceModel = {};
|
|
53880
|
+
this.copyName = "";
|
|
53881
|
+
this.parent = {};
|
|
53824
53882
|
return [2
|
|
53825
53883
|
/*return*/
|
|
53826
53884
|
];
|
|
@@ -53829,6 +53887,13 @@ function (_super) {
|
|
|
53829
53887
|
});
|
|
53830
53888
|
};
|
|
53831
53889
|
|
|
53890
|
+
ProjectTree.prototype.onCopyCancel = function () {
|
|
53891
|
+
this.interfaceModel = {};
|
|
53892
|
+
this.copyName = "";
|
|
53893
|
+
this.parent = {};
|
|
53894
|
+
this.showCopyModal = false;
|
|
53895
|
+
};
|
|
53896
|
+
|
|
53832
53897
|
ProjectTree.prototype.onAddInterface = function (group) {
|
|
53833
53898
|
this.interfaceModel = {
|
|
53834
53899
|
method: "GET"
|
|
@@ -54098,8 +54163,8 @@ var project_detail_extends = undefined && undefined.__extends || function () {
|
|
|
54098
54163
|
};
|
|
54099
54164
|
}();
|
|
54100
54165
|
|
|
54101
|
-
var
|
|
54102
|
-
|
|
54166
|
+
var project_detail_assign = undefined && undefined.__assign || function () {
|
|
54167
|
+
project_detail_assign = Object.assign || function (t) {
|
|
54103
54168
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
54104
54169
|
s = arguments[i];
|
|
54105
54170
|
|
|
@@ -54111,7 +54176,7 @@ var __assign = undefined && undefined.__assign || function () {
|
|
|
54111
54176
|
return t;
|
|
54112
54177
|
};
|
|
54113
54178
|
|
|
54114
|
-
return
|
|
54179
|
+
return project_detail_assign.apply(this, arguments);
|
|
54115
54180
|
};
|
|
54116
54181
|
|
|
54117
54182
|
var project_detail_decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
@@ -54337,7 +54402,7 @@ function (_super) {
|
|
|
54337
54402
|
case 1:
|
|
54338
54403
|
result = _a.sent();
|
|
54339
54404
|
this.loading = false;
|
|
54340
|
-
obj =
|
|
54405
|
+
obj = project_detail_assign(project_detail_assign({}, result.result), {
|
|
54341
54406
|
name: data.name,
|
|
54342
54407
|
id: data.id
|
|
54343
54408
|
});
|
|
@@ -54410,7 +54475,9 @@ function (_super) {
|
|
|
54410
54475
|
};
|
|
54411
54476
|
|
|
54412
54477
|
ProjectDetail.prototype.onBack = function () {
|
|
54413
|
-
this.$router.
|
|
54478
|
+
this.$router.push({
|
|
54479
|
+
name: "project-list"
|
|
54480
|
+
});
|
|
54414
54481
|
};
|
|
54415
54482
|
|
|
54416
54483
|
var _a;
|