@egova/egova-api 1.3.34 → 1.3.35
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 +55 -13
- package/dist/index.umd.js +55 -13
- package/dist/index.umd.min.js +2 -2
- package/package.json +1 -1
package/dist/index.common.js
CHANGED
|
@@ -14449,9 +14449,16 @@ var tree_ProjectTree = /** @class */function (_super) {
|
|
|
14449
14449
|
var _this = this;
|
|
14450
14450
|
this.loadProjectList();
|
|
14451
14451
|
this.$subscribe("api://project-detail-save", function () {
|
|
14452
|
+
if (!_this.isCurrentProjectRoute()) {
|
|
14453
|
+
return;
|
|
14454
|
+
}
|
|
14452
14455
|
_this.init();
|
|
14453
14456
|
});
|
|
14454
14457
|
};
|
|
14458
|
+
ProjectTree.prototype.isCurrentProjectRoute = function () {
|
|
14459
|
+
var _a;
|
|
14460
|
+
return ((_a = this.$route.params) === null || _a === void 0 ? void 0 : _a.id) === this.projectId;
|
|
14461
|
+
};
|
|
14455
14462
|
ProjectTree.prototype.renderContent = function (h, _a) {
|
|
14456
14463
|
var root = _a.root,
|
|
14457
14464
|
node = _a.node,
|
|
@@ -15039,26 +15046,54 @@ var project_detail_ProjectDetail = /** @class */function (_super) {
|
|
|
15039
15046
|
ProjectDetail.prototype.onSwiperReadied = function (swiper) {
|
|
15040
15047
|
this.swiper = swiper;
|
|
15041
15048
|
};
|
|
15042
|
-
ProjectDetail.prototype.getProjectInfo = function () {
|
|
15049
|
+
ProjectDetail.prototype.getProjectInfo = function (projectId) {
|
|
15043
15050
|
var _a, _b;
|
|
15051
|
+
if (projectId === void 0) {
|
|
15052
|
+
projectId = ((_a = this.$route.params) === null || _a === void 0 ? void 0 : _a.id) || "";
|
|
15053
|
+
}
|
|
15044
15054
|
return __awaiter(this, void 0, void 0, function () {
|
|
15045
15055
|
var res;
|
|
15046
15056
|
return __generator(this, function (_c) {
|
|
15047
15057
|
switch (_c.label) {
|
|
15048
15058
|
case 0:
|
|
15049
|
-
this.projectId =
|
|
15050
|
-
if (!
|
|
15051
|
-
|
|
15059
|
+
this.projectId = projectId;
|
|
15060
|
+
if (!projectId) {
|
|
15061
|
+
this.projectName = "";
|
|
15062
|
+
return [2 /*return*/];
|
|
15063
|
+
}
|
|
15064
|
+
return [4 /*yield*/, this.service.projectInfo(projectId)];
|
|
15052
15065
|
case 1:
|
|
15053
15066
|
res = _c.sent();
|
|
15067
|
+
if (this.projectId !== projectId) {
|
|
15068
|
+
return [2 /*return*/];
|
|
15069
|
+
}
|
|
15054
15070
|
this.projectName = ((_b = res === null || res === void 0 ? void 0 : res.result) === null || _b === void 0 ? void 0 : _b.name) || "";
|
|
15055
|
-
_c.label = 2;
|
|
15056
|
-
case 2:
|
|
15057
15071
|
return [2 /*return*/];
|
|
15058
15072
|
}
|
|
15059
15073
|
});
|
|
15060
15074
|
});
|
|
15061
15075
|
};
|
|
15076
|
+
ProjectDetail.prototype.resetProjectState = function () {
|
|
15077
|
+
this.openInterfaceList.splice(0);
|
|
15078
|
+
this.active = {};
|
|
15079
|
+
this.current = {};
|
|
15080
|
+
this.projectTree = [];
|
|
15081
|
+
this.loading = false;
|
|
15082
|
+
};
|
|
15083
|
+
ProjectDetail.prototype.syncProjectFromRoute = function (route) {
|
|
15084
|
+
var _a;
|
|
15085
|
+
if (route === void 0) {
|
|
15086
|
+
route = this.$route;
|
|
15087
|
+
}
|
|
15088
|
+
var projectId = ((_a = route.params) === null || _a === void 0 ? void 0 : _a.id) || "";
|
|
15089
|
+
var prevProjectId = this.projectId;
|
|
15090
|
+
this.projectId = projectId;
|
|
15091
|
+
if (prevProjectId !== projectId) {
|
|
15092
|
+
this.projectName = "";
|
|
15093
|
+
this.resetProjectState();
|
|
15094
|
+
}
|
|
15095
|
+
this.getProjectInfo(projectId);
|
|
15096
|
+
};
|
|
15062
15097
|
ProjectDetail.prototype.onCheckInterface = function (data, isResume) {
|
|
15063
15098
|
return __awaiter(this, void 0, void 0, function () {
|
|
15064
15099
|
var resumeData, text, set, result, res, index;
|
|
@@ -15179,11 +15214,9 @@ var project_detail_ProjectDetail = /** @class */function (_super) {
|
|
|
15179
15214
|
ProjectDetail.prototype.onOpenEnvModal = function () {
|
|
15180
15215
|
this.showEnvironmentModal = true;
|
|
15181
15216
|
};
|
|
15182
|
-
|
|
15183
|
-
|
|
15184
|
-
var
|
|
15185
|
-
this.getProjectInfo();
|
|
15186
|
-
var _a = this.$route.query,
|
|
15217
|
+
ProjectDetail.prototype.onRouteChange = function (route) {
|
|
15218
|
+
this.syncProjectFromRoute(route);
|
|
15219
|
+
var _a = route.query,
|
|
15187
15220
|
apiId = _a.apiId,
|
|
15188
15221
|
apiName = _a.apiName,
|
|
15189
15222
|
resume = _a.resume;
|
|
@@ -15193,6 +15226,12 @@ var project_detail_ProjectDetail = /** @class */function (_super) {
|
|
|
15193
15226
|
name: apiName
|
|
15194
15227
|
}, resume === "true");
|
|
15195
15228
|
}
|
|
15229
|
+
};
|
|
15230
|
+
ProjectDetail.prototype.mounted = function () {
|
|
15231
|
+
var _this = this;
|
|
15232
|
+
if (!this.projectId) {
|
|
15233
|
+
this.syncProjectFromRoute();
|
|
15234
|
+
}
|
|
15196
15235
|
this.$subscribe("api://project-detail-save-import", function () {
|
|
15197
15236
|
return __awaiter(_this, void 0, void 0, function () {
|
|
15198
15237
|
var res, result;
|
|
@@ -15304,7 +15343,7 @@ var project_detail_ProjectDetail = /** @class */function (_super) {
|
|
|
15304
15343
|
};
|
|
15305
15344
|
ProjectDetail.prototype.onBatchSuccess = function (data) {
|
|
15306
15345
|
if (data) {
|
|
15307
|
-
this.getProjectInfo();
|
|
15346
|
+
this.getProjectInfo(this.projectId);
|
|
15308
15347
|
}
|
|
15309
15348
|
};
|
|
15310
15349
|
ProjectDetail.prototype.onEnvironmentRefresh = function () {
|
|
@@ -15314,6 +15353,9 @@ var project_detail_ProjectDetail = /** @class */function (_super) {
|
|
|
15314
15353
|
this.projectTree = data;
|
|
15315
15354
|
};
|
|
15316
15355
|
__decorate([autowired(project_detail_service)], ProjectDetail.prototype, "service", void 0);
|
|
15356
|
+
__decorate([Object(flagwind_web_["watch"])("$route", {
|
|
15357
|
+
immediate: true
|
|
15358
|
+
})], ProjectDetail.prototype, "onRouteChange", null);
|
|
15317
15359
|
ProjectDetail = __decorate([Object(flagwind_web_["component"])({
|
|
15318
15360
|
name: "ApiProjectDetail",
|
|
15319
15361
|
template: __webpack_require__("d63e"),
|
|
@@ -15557,7 +15599,7 @@ module.exports = function (METHOD_NAME, argument) {
|
|
|
15557
15599
|
/***/ "d63e":
|
|
15558
15600
|
/***/ (function(module, exports) {
|
|
15559
15601
|
|
|
15560
|
-
module.exports = "<article class=\"project-detail\">\
|
|
15602
|
+
module.exports = "<article class=\"project-detail\">\n <header>\n <div class=\"environment\">\n <i class=\"iconfont icon-zhankai\" @click=\"onBack\"></i>\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 v-if=\"projectId && projectName\" type=\"primary\" class=\"diy-btn-primary security-btn\" ghost @click=\"onSecurity\"><i class=\"iconfont icon-xinzengzhibiao\"></i>授权认证</i-button>\n <i-button v-if=\"projectId && projectName\" type=\"primary\" class=\"diy-btn-primary\" ghost @click=\"onOpenEnvModal\"><i class=\"iconfont icon-bianliang\"></i>环境变量</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\" @on-edit-interface-success=\"onEditInterfaceSuccess\" :project-id=\"projectId\" @on-success=\"onBatchSuccess\" @on-delete-interface=\"onDeleteInterface\" @on-reset=\"onReset\" @tree-data=\"getTreeData\"></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 ref=\"interface-settings\" :interface-model.sync=\"active\" :project-id=\"projectId\" v-if=\"active.id\" :lengthwise=\"lengthwise\" :projectTree=\"projectTree\"></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 <u-security-modal v-model=\"showSecurity\" :projectID=\"projectId\"></u-security-modal>\n <u-environment-modal :visiable.sync=\"showEnvironmentModal\" :projectId=\"projectId\" @on-refresh=\"onEnvironmentRefresh\"></u-environment-modal>\n</article>\n"
|
|
15561
15603
|
|
|
15562
15604
|
/***/ }),
|
|
15563
15605
|
|
package/dist/index.umd.js
CHANGED
|
@@ -14458,9 +14458,16 @@ var tree_ProjectTree = /** @class */function (_super) {
|
|
|
14458
14458
|
var _this = this;
|
|
14459
14459
|
this.loadProjectList();
|
|
14460
14460
|
this.$subscribe("api://project-detail-save", function () {
|
|
14461
|
+
if (!_this.isCurrentProjectRoute()) {
|
|
14462
|
+
return;
|
|
14463
|
+
}
|
|
14461
14464
|
_this.init();
|
|
14462
14465
|
});
|
|
14463
14466
|
};
|
|
14467
|
+
ProjectTree.prototype.isCurrentProjectRoute = function () {
|
|
14468
|
+
var _a;
|
|
14469
|
+
return ((_a = this.$route.params) === null || _a === void 0 ? void 0 : _a.id) === this.projectId;
|
|
14470
|
+
};
|
|
14464
14471
|
ProjectTree.prototype.renderContent = function (h, _a) {
|
|
14465
14472
|
var root = _a.root,
|
|
14466
14473
|
node = _a.node,
|
|
@@ -15048,26 +15055,54 @@ var project_detail_ProjectDetail = /** @class */function (_super) {
|
|
|
15048
15055
|
ProjectDetail.prototype.onSwiperReadied = function (swiper) {
|
|
15049
15056
|
this.swiper = swiper;
|
|
15050
15057
|
};
|
|
15051
|
-
ProjectDetail.prototype.getProjectInfo = function () {
|
|
15058
|
+
ProjectDetail.prototype.getProjectInfo = function (projectId) {
|
|
15052
15059
|
var _a, _b;
|
|
15060
|
+
if (projectId === void 0) {
|
|
15061
|
+
projectId = ((_a = this.$route.params) === null || _a === void 0 ? void 0 : _a.id) || "";
|
|
15062
|
+
}
|
|
15053
15063
|
return __awaiter(this, void 0, void 0, function () {
|
|
15054
15064
|
var res;
|
|
15055
15065
|
return __generator(this, function (_c) {
|
|
15056
15066
|
switch (_c.label) {
|
|
15057
15067
|
case 0:
|
|
15058
|
-
this.projectId =
|
|
15059
|
-
if (!
|
|
15060
|
-
|
|
15068
|
+
this.projectId = projectId;
|
|
15069
|
+
if (!projectId) {
|
|
15070
|
+
this.projectName = "";
|
|
15071
|
+
return [2 /*return*/];
|
|
15072
|
+
}
|
|
15073
|
+
return [4 /*yield*/, this.service.projectInfo(projectId)];
|
|
15061
15074
|
case 1:
|
|
15062
15075
|
res = _c.sent();
|
|
15076
|
+
if (this.projectId !== projectId) {
|
|
15077
|
+
return [2 /*return*/];
|
|
15078
|
+
}
|
|
15063
15079
|
this.projectName = ((_b = res === null || res === void 0 ? void 0 : res.result) === null || _b === void 0 ? void 0 : _b.name) || "";
|
|
15064
|
-
_c.label = 2;
|
|
15065
|
-
case 2:
|
|
15066
15080
|
return [2 /*return*/];
|
|
15067
15081
|
}
|
|
15068
15082
|
});
|
|
15069
15083
|
});
|
|
15070
15084
|
};
|
|
15085
|
+
ProjectDetail.prototype.resetProjectState = function () {
|
|
15086
|
+
this.openInterfaceList.splice(0);
|
|
15087
|
+
this.active = {};
|
|
15088
|
+
this.current = {};
|
|
15089
|
+
this.projectTree = [];
|
|
15090
|
+
this.loading = false;
|
|
15091
|
+
};
|
|
15092
|
+
ProjectDetail.prototype.syncProjectFromRoute = function (route) {
|
|
15093
|
+
var _a;
|
|
15094
|
+
if (route === void 0) {
|
|
15095
|
+
route = this.$route;
|
|
15096
|
+
}
|
|
15097
|
+
var projectId = ((_a = route.params) === null || _a === void 0 ? void 0 : _a.id) || "";
|
|
15098
|
+
var prevProjectId = this.projectId;
|
|
15099
|
+
this.projectId = projectId;
|
|
15100
|
+
if (prevProjectId !== projectId) {
|
|
15101
|
+
this.projectName = "";
|
|
15102
|
+
this.resetProjectState();
|
|
15103
|
+
}
|
|
15104
|
+
this.getProjectInfo(projectId);
|
|
15105
|
+
};
|
|
15071
15106
|
ProjectDetail.prototype.onCheckInterface = function (data, isResume) {
|
|
15072
15107
|
return __awaiter(this, void 0, void 0, function () {
|
|
15073
15108
|
var resumeData, text, set, result, res, index;
|
|
@@ -15188,11 +15223,9 @@ var project_detail_ProjectDetail = /** @class */function (_super) {
|
|
|
15188
15223
|
ProjectDetail.prototype.onOpenEnvModal = function () {
|
|
15189
15224
|
this.showEnvironmentModal = true;
|
|
15190
15225
|
};
|
|
15191
|
-
|
|
15192
|
-
|
|
15193
|
-
var
|
|
15194
|
-
this.getProjectInfo();
|
|
15195
|
-
var _a = this.$route.query,
|
|
15226
|
+
ProjectDetail.prototype.onRouteChange = function (route) {
|
|
15227
|
+
this.syncProjectFromRoute(route);
|
|
15228
|
+
var _a = route.query,
|
|
15196
15229
|
apiId = _a.apiId,
|
|
15197
15230
|
apiName = _a.apiName,
|
|
15198
15231
|
resume = _a.resume;
|
|
@@ -15202,6 +15235,12 @@ var project_detail_ProjectDetail = /** @class */function (_super) {
|
|
|
15202
15235
|
name: apiName
|
|
15203
15236
|
}, resume === "true");
|
|
15204
15237
|
}
|
|
15238
|
+
};
|
|
15239
|
+
ProjectDetail.prototype.mounted = function () {
|
|
15240
|
+
var _this = this;
|
|
15241
|
+
if (!this.projectId) {
|
|
15242
|
+
this.syncProjectFromRoute();
|
|
15243
|
+
}
|
|
15205
15244
|
this.$subscribe("api://project-detail-save-import", function () {
|
|
15206
15245
|
return __awaiter(_this, void 0, void 0, function () {
|
|
15207
15246
|
var res, result;
|
|
@@ -15313,7 +15352,7 @@ var project_detail_ProjectDetail = /** @class */function (_super) {
|
|
|
15313
15352
|
};
|
|
15314
15353
|
ProjectDetail.prototype.onBatchSuccess = function (data) {
|
|
15315
15354
|
if (data) {
|
|
15316
|
-
this.getProjectInfo();
|
|
15355
|
+
this.getProjectInfo(this.projectId);
|
|
15317
15356
|
}
|
|
15318
15357
|
};
|
|
15319
15358
|
ProjectDetail.prototype.onEnvironmentRefresh = function () {
|
|
@@ -15323,6 +15362,9 @@ var project_detail_ProjectDetail = /** @class */function (_super) {
|
|
|
15323
15362
|
this.projectTree = data;
|
|
15324
15363
|
};
|
|
15325
15364
|
__decorate([autowired(project_detail_service)], ProjectDetail.prototype, "service", void 0);
|
|
15365
|
+
__decorate([Object(flagwind_web_["watch"])("$route", {
|
|
15366
|
+
immediate: true
|
|
15367
|
+
})], ProjectDetail.prototype, "onRouteChange", null);
|
|
15326
15368
|
ProjectDetail = __decorate([Object(flagwind_web_["component"])({
|
|
15327
15369
|
name: "ApiProjectDetail",
|
|
15328
15370
|
template: __webpack_require__("d63e"),
|
|
@@ -15566,7 +15608,7 @@ module.exports = function (METHOD_NAME, argument) {
|
|
|
15566
15608
|
/***/ "d63e":
|
|
15567
15609
|
/***/ (function(module, exports) {
|
|
15568
15610
|
|
|
15569
|
-
module.exports = "<article class=\"project-detail\">\
|
|
15611
|
+
module.exports = "<article class=\"project-detail\">\n <header>\n <div class=\"environment\">\n <i class=\"iconfont icon-zhankai\" @click=\"onBack\"></i>\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 v-if=\"projectId && projectName\" type=\"primary\" class=\"diy-btn-primary security-btn\" ghost @click=\"onSecurity\"><i class=\"iconfont icon-xinzengzhibiao\"></i>授权认证</i-button>\n <i-button v-if=\"projectId && projectName\" type=\"primary\" class=\"diy-btn-primary\" ghost @click=\"onOpenEnvModal\"><i class=\"iconfont icon-bianliang\"></i>环境变量</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\" @on-edit-interface-success=\"onEditInterfaceSuccess\" :project-id=\"projectId\" @on-success=\"onBatchSuccess\" @on-delete-interface=\"onDeleteInterface\" @on-reset=\"onReset\" @tree-data=\"getTreeData\"></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 ref=\"interface-settings\" :interface-model.sync=\"active\" :project-id=\"projectId\" v-if=\"active.id\" :lengthwise=\"lengthwise\" :projectTree=\"projectTree\"></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 <u-security-modal v-model=\"showSecurity\" :projectID=\"projectId\"></u-security-modal>\n <u-environment-modal :visiable.sync=\"showEnvironmentModal\" :projectId=\"projectId\" @on-refresh=\"onEnvironmentRefresh\"></u-environment-modal>\n</article>\n"
|
|
15570
15612
|
|
|
15571
15613
|
/***/ }),
|
|
15572
15614
|
|