@egova/egova-api 1.0.53 → 1.0.57
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.umd.js
CHANGED
|
@@ -26307,7 +26307,7 @@ module.exports = function (it) {
|
|
|
26307
26307
|
/***/ "35e3":
|
|
26308
26308
|
/***/ (function(module, exports) {
|
|
26309
26309
|
|
|
26310
|
-
module.exports = "<editor
|
|
26310
|
+
module.exports = "<editor class=\"code-edit\" v-model=\"code\" :options=\"option\" @init=\"editorInit\" :lang=\"lang\" width=\"100%\" height=\"100%\"></editor>\n"
|
|
26311
26311
|
|
|
26312
26312
|
/***/ }),
|
|
26313
26313
|
|
|
@@ -45914,7 +45914,7 @@ module.exports = /ipad|iphone|ipod/i.test(userAgent) && global.Pebble !== undefi
|
|
|
45914
45914
|
/***/ "d63e":
|
|
45915
45915
|
/***/ (function(module, exports) {
|
|
45916
45916
|
|
|
45917
|
-
module.exports = "<article class=\"project-detail\">\n <header>\n <div class=\"environment\">\n <p>{{projectName}}</p>\n <!-- <span>环境变量:</span> -->\n <!-- <i-select class=\"diy-select\"></i-select> -->\n </div>\n <div class=\"btns\">\n <!-- <i-button
|
|
45917
|
+
module.exports = "<article class=\"project-detail\">\n <header>\n <div class=\"environment\">\n <p>{{projectName}}</p>\n <!-- <span>环境变量:</span> -->\n <!-- <i-select class=\"diy-select\"></i-select> -->\n </div>\n <div class=\"btns\">\n <!-- <i-button type=\"primary\" ghost class=\"diy-btn-primary\" @click=\"onOpenGlobalModal\"> <i class=\"api-icon icon-setting\"></i>全局参数设置</i-button>\n <i-button type=\"success\" ghost class=\"diy-btn-success\" @click=\"onOpenCurrentModal\"><i class=\"api-icon icon-view\"></i>查看当前变量</i-button> -->\n <i-button type=\"primary\" class=\"diy-btn-primary button-back\" ghost icon=\"md-return-left\" @click=\"onBack\">返回列表</i-button>\n <i-button v-show=\"active.id\" type=\"primary\" class=\"diy-btn-primary\" ghost @click=\"onToggleLayout\"><i class=\"api-icon icon-switch\"></i>切换布局</i-button>\n </div>\n </header>\n <!-- <main> -->\n <i-split v-model=\"split\" min=\"200px\" max=\"900px\">\n <u-tree slot=\"left\" @on-check-interface=\"onCheckInterface\" :project-id=\"projectId\"></u-tree>\n <section slot=\"right\" class=\"interface-box\">\n <header class=\"interface-bar\">\n <swiper class=\"swiper\" :options=\"swiperOption\" @click-slide=\"onClickSlide\" @ready=\"onSwiperReadied\">\n <swiper-slide class=\"tag\" @click=\"onClickTag(item)\" :class=\"{'active': item.id === active.id}\" v-for=\"(item,index) in openInterfaceList\" :key=\"item.id\"\n ><span>{{item.name}}</span> <i-icon type=\"md-close\" @click.stop=\"onClose(index)\"></i-icon\n ></swiper-slide>\n </swiper>\n <!-- <div class=\"tag\" @click=\"onClickTag(item)\" :class=\"{'active': item.id === active.id}\" v-for=\"(item,index) in openInterfaceList\" :key=\"item.id\">\n <span>{{item.name}}</span>\n <i-icon type=\"md-close\" @click.stop=\"onClose(index)\"></i-icon>\n </div> -->\n </header>\n <u-settings :interface-model.sync=\"active\" :project-id=\"projectId\" v-if=\"active.id\" :lengthwise=\"lengthwise\"></u-settings>\n </section>\n </i-split>\n <i-spin fix v-show=\"loading\">\n <i class=\"spin-icon-load ivu-icon\"></i>\n </i-spin>\n <!-- </main> -->\n <u-global-modal :visiable.sync=\"showGlobalModal\">\n <footer slot=\"footer\">\n <i-button @click=\"showGlobalModal = false\">取消</i-button>\n <i-button type=\"primary\" class=\"diy-btn-primary\">确定</i-button>\n </footer>\n </u-global-modal>\n <u-current-modal :visiable.sync=\"showCurrentModal\"> </u-current-modal>\n</article>\n"
|
|
45918
45918
|
|
|
45919
45919
|
/***/ }),
|
|
45920
45920
|
|
|
@@ -49625,6 +49625,10 @@ function (_super) {
|
|
|
49625
49625
|
return this._get("/api-help/postScript.json");
|
|
49626
49626
|
};
|
|
49627
49627
|
|
|
49628
|
+
ApiService.prototype.projectInfo = function (id) {
|
|
49629
|
+
return this._get("/unity/api/project/".concat(id));
|
|
49630
|
+
};
|
|
49631
|
+
|
|
49628
49632
|
var _a, _b;
|
|
49629
49633
|
|
|
49630
49634
|
project_detail_service_decorate([serviceHandler("query", {
|
|
@@ -49675,6 +49679,10 @@ function (_super) {
|
|
|
49675
49679
|
title: "后置脚本"
|
|
49676
49680
|
}), project_detail_service_metadata("design:type", Function), project_detail_service_metadata("design:paramtypes", []), project_detail_service_metadata("design:returntype", void 0)], ApiService.prototype, "postScript", null);
|
|
49677
49681
|
|
|
49682
|
+
project_detail_service_decorate([serviceHandler("query", {
|
|
49683
|
+
title: "项目详情"
|
|
49684
|
+
}), project_detail_service_metadata("design:type", Function), project_detail_service_metadata("design:paramtypes", [String]), project_detail_service_metadata("design:returntype", void 0)], ApiService.prototype, "projectInfo", null);
|
|
49685
|
+
|
|
49678
49686
|
return ApiService;
|
|
49679
49687
|
}(common_service);
|
|
49680
49688
|
|
|
@@ -53430,7 +53438,7 @@ function (_super) {
|
|
|
53430
53438
|
};
|
|
53431
53439
|
|
|
53432
53440
|
InterfaceSettings.prototype.onVersion = function () {
|
|
53433
|
-
var id = this.interfaceModel.info.id
|
|
53441
|
+
var id = (this.interfaceModel.info || {}).id;
|
|
53434
53442
|
|
|
53435
53443
|
if (!id) {
|
|
53436
53444
|
this.$message.info("尚未保存,无历史版本");
|
|
@@ -54559,40 +54567,114 @@ function (_super) {
|
|
|
54559
54567
|
this.swiper = swiper;
|
|
54560
54568
|
};
|
|
54561
54569
|
|
|
54562
|
-
ProjectDetail.prototype.
|
|
54570
|
+
ProjectDetail.prototype.getProjectInfo = function () {
|
|
54571
|
+
var _a, _b;
|
|
54572
|
+
|
|
54563
54573
|
return project_detail_awaiter(this, void 0, void 0, function () {
|
|
54564
|
-
var
|
|
54574
|
+
var res;
|
|
54575
|
+
return project_detail_generator(this, function (_c) {
|
|
54576
|
+
switch (_c.label) {
|
|
54577
|
+
case 0:
|
|
54578
|
+
this.projectId = (_a = this.$route.params) === null || _a === void 0 ? void 0 : _a.id;
|
|
54579
|
+
if (!this.projectId) return [3
|
|
54580
|
+
/*break*/
|
|
54581
|
+
, 2];
|
|
54582
|
+
return [4
|
|
54583
|
+
/*yield*/
|
|
54584
|
+
, this.service.projectInfo(this.projectId)];
|
|
54585
|
+
|
|
54586
|
+
case 1:
|
|
54587
|
+
res = _c.sent();
|
|
54588
|
+
this.projectName = ((_b = res === null || res === void 0 ? void 0 : res.result) === null || _b === void 0 ? void 0 : _b.name) || "";
|
|
54589
|
+
_c.label = 2;
|
|
54590
|
+
|
|
54591
|
+
case 2:
|
|
54592
|
+
return [2
|
|
54593
|
+
/*return*/
|
|
54594
|
+
];
|
|
54595
|
+
}
|
|
54596
|
+
});
|
|
54597
|
+
});
|
|
54598
|
+
};
|
|
54599
|
+
|
|
54600
|
+
ProjectDetail.prototype.onCheckInterface = function (data, isResume) {
|
|
54601
|
+
return project_detail_awaiter(this, void 0, void 0, function () {
|
|
54602
|
+
var resumeData, text, set, result, res, index;
|
|
54565
54603
|
|
|
54566
54604
|
var _this = this;
|
|
54567
54605
|
|
|
54568
54606
|
return project_detail_generator(this, function (_a) {
|
|
54569
54607
|
switch (_a.label) {
|
|
54570
54608
|
case 0:
|
|
54609
|
+
resumeData = {};
|
|
54610
|
+
|
|
54611
|
+
if (isResume) {
|
|
54612
|
+
try {
|
|
54613
|
+
text = window.sessionStorage.getItem("api_project_".concat(data.id));
|
|
54614
|
+
|
|
54615
|
+
if (text) {
|
|
54616
|
+
resumeData = JSON.parse(text);
|
|
54617
|
+
}
|
|
54618
|
+
} catch (_b) {}
|
|
54619
|
+
|
|
54620
|
+
resumeData = project_detail_assign(project_detail_assign({}, resumeData), {
|
|
54621
|
+
name: data.name,
|
|
54622
|
+
id: data.id
|
|
54623
|
+
}); // 获取默认值
|
|
54624
|
+
|
|
54625
|
+
!resumeData.fieldMappings && (resumeData.fieldMappings = []);
|
|
54626
|
+
!resumeData.pathParams && (resumeData.pathParams = []);
|
|
54627
|
+
!resumeData.queryParams && (resumeData.queryParams = []);
|
|
54628
|
+
!resumeData.formParams && (resumeData.formParams = []);
|
|
54629
|
+
!resumeData.preScripts && (resumeData.preScripts = []);
|
|
54630
|
+
!resumeData.postScripts && (resumeData.postScripts = []);
|
|
54631
|
+
!resumeData.requestHeaders && (resumeData.requestHeaders = []);
|
|
54632
|
+
!resumeData.responseParams && (resumeData.responseParams = []);
|
|
54633
|
+
}
|
|
54634
|
+
|
|
54571
54635
|
set = new Set(this.openInterfaceList.map(function (i) {
|
|
54572
54636
|
return i.id;
|
|
54573
54637
|
}));
|
|
54574
54638
|
if (!!set.has(data.id)) return [3
|
|
54575
54639
|
/*break*/
|
|
54576
|
-
,
|
|
54640
|
+
, 4];
|
|
54577
54641
|
this.loading = true;
|
|
54642
|
+
result = void 0;
|
|
54643
|
+
if (!isResume) return [3
|
|
54644
|
+
/*break*/
|
|
54645
|
+
, 1];
|
|
54646
|
+
result = resumeData;
|
|
54647
|
+
return [3
|
|
54648
|
+
/*break*/
|
|
54649
|
+
, 3];
|
|
54650
|
+
|
|
54651
|
+
case 1:
|
|
54578
54652
|
return [4
|
|
54579
54653
|
/*yield*/
|
|
54580
54654
|
, this.service.apiInfo(data.id)];
|
|
54581
54655
|
|
|
54582
|
-
case
|
|
54583
|
-
|
|
54584
|
-
|
|
54585
|
-
obj = project_detail_assign(project_detail_assign({}, result.result), {
|
|
54656
|
+
case 2:
|
|
54657
|
+
res = _a.sent();
|
|
54658
|
+
result = project_detail_assign(project_detail_assign({}, res.result || {}), {
|
|
54586
54659
|
name: data.name,
|
|
54587
54660
|
id: data.id
|
|
54588
54661
|
});
|
|
54589
|
-
|
|
54590
|
-
_a.label = 2;
|
|
54662
|
+
_a.label = 3;
|
|
54591
54663
|
|
|
54592
|
-
case
|
|
54664
|
+
case 3:
|
|
54665
|
+
this.openInterfaceList.push(result);
|
|
54666
|
+
this.loading = false;
|
|
54667
|
+
_a.label = 4;
|
|
54668
|
+
|
|
54669
|
+
case 4:
|
|
54593
54670
|
index = this.openInterfaceList.findIndex(function (i) {
|
|
54594
54671
|
return i.id === data.id;
|
|
54595
54672
|
});
|
|
54673
|
+
|
|
54674
|
+
if (isResume) {
|
|
54675
|
+
this.openInterfaceList.splice(index, 1, resumeData);
|
|
54676
|
+
}
|
|
54677
|
+
|
|
54596
54678
|
this.active = this.openInterfaceList[index];
|
|
54597
54679
|
this.$nextTick(function () {
|
|
54598
54680
|
_this.swiper.slideTo(index, 1000, false);
|
|
@@ -54637,20 +54719,31 @@ function (_super) {
|
|
|
54637
54719
|
|
|
54638
54720
|
|
|
54639
54721
|
ProjectDetail.prototype.mounted = function () {
|
|
54640
|
-
|
|
54641
|
-
|
|
54642
|
-
|
|
54643
|
-
|
|
54644
|
-
|
|
54645
|
-
apiName = _b.apiName,
|
|
54646
|
-
name = _b.name;
|
|
54647
|
-
this.projectName = name;
|
|
54722
|
+
this.getProjectInfo();
|
|
54723
|
+
var _a = this.$route.query,
|
|
54724
|
+
apiId = _a.apiId,
|
|
54725
|
+
apiName = _a.apiName,
|
|
54726
|
+
resume = _a.resume;
|
|
54648
54727
|
|
|
54649
54728
|
if (apiId) {
|
|
54650
54729
|
this.onCheckInterface({
|
|
54651
54730
|
id: apiId,
|
|
54652
54731
|
name: apiName
|
|
54653
|
-
});
|
|
54732
|
+
}, resume === "true");
|
|
54733
|
+
}
|
|
54734
|
+
};
|
|
54735
|
+
|
|
54736
|
+
ProjectDetail.prototype.activated = function () {
|
|
54737
|
+
var _a = this.$route.query,
|
|
54738
|
+
apiId = _a.apiId,
|
|
54739
|
+
apiName = _a.apiName,
|
|
54740
|
+
resume = _a.resume;
|
|
54741
|
+
|
|
54742
|
+
if (resume === "true") {
|
|
54743
|
+
this.onCheckInterface({
|
|
54744
|
+
id: apiId,
|
|
54745
|
+
name: apiName
|
|
54746
|
+
}, resume === "true");
|
|
54654
54747
|
}
|
|
54655
54748
|
};
|
|
54656
54749
|
|