@egova/egova-api 1.0.208 → 1.0.211
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 +47 -65
- package/dist/index.umd.js +47 -65
- package/dist/index.umd.min.js +1 -1
- package/dist/types/src/views/project-combine/data-model/service.d.ts +1 -0
- package/dist/types/src/views/project-detail/interface-settings/index.d.ts +1 -0
- package/dist/types/src/views/project-detail/pre-execution-setting/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.common.js
CHANGED
|
@@ -48843,7 +48843,7 @@ module.exports = uncurryThis([].slice);
|
|
|
48843
48843
|
/***/ "f40e":
|
|
48844
48844
|
/***/ (function(module, exports) {
|
|
48845
48845
|
|
|
48846
|
-
module.exports = "<article class=\"interface-settings\" :class=\"{'script-max': scriptView}\">\r\n <header v-show=\"!scriptView\">\r\n<!-- <i-input class=\"diy-input\" v-model=\"interfaceModel.info.url\">-->\r\n<!-- <i-select transfer slot=\"prepend\" class=\"diy-select\" v-model=\"interfaceModel.info.method\">-->\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>-->\r\n <i-select class=\"diy-select method-select\" v-model=\"interfaceModel.info.method\">\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-select ref=\"addEnvParamSelect\" class=\"diy-select env-select\" v-model=\"interfaceModel.info.envId\" placeholder=\"请选择环境变量\" clearable>\r\n <i-option v-for=\"item in paramList\" :key=\"item.id\" :value=\"item.id\">{{item.name + \":\" + item.value}}</i-option>\r\n <i-option class=\"add-security-item\" value=\"''\">\r\n <div class=\"add-security-item-content\" @click.stop=\"onAddEnvParam\">\r\n <i class=\"api-icon icon-add\"></i>\r\n <span>新增环境变量</span>\r\n </div>\r\n </i-option>\r\n </i-select>\r\n <i-input class=\"diy-input url-input\" v-model=\"interfaceModel.info.url\"></i-input>\r\n\r\n <i-button type=\"primary\" class=\"diy-btn-primary submit-btn\" @click=\"onRun\">发送</i-button>\r\n <i-button type=\"primary\" class=\"diy-btn-primary\" @click=\"onSave\" ghost>保存</i-button>\r\n <i-button type=\"primary\" class=\"diy-btn-primary his-btn\" @click=\"onVersion\" ghost>查看历史版本</i-button>\r\n <i class=\"export iconfont icon-xiazai\" title=\"导出\" type=\"md-download\" @click=\"onExport\"></i>\r\n <i-upload action=\"\" :before-upload=\"onImport\" :show-upload-list=\"false\">\r\n <i class=\"import iconfont icon-shangchuan\" title=\"导入\" type=\"md-cloud-upload\"></i>\r\n </i-upload>\r\n\r\n </header>\r\n <main :class=\"{'transverse': !lengthwise}\">\r\n <section class=\"request\">\r\n <div v-show=\"!scriptView\" class=\"request-bar\">\r\n <div\r\n class=\"tag\"\r\n :class=\"{'active': currentRequestSettingType.name.indexOf(item.name) === 0}\"\r\n v-for=\"(item,index) in requertSettingTypeList\"\r\n :key=\"item.name\"\r\n @click=\"onClickRequertSettingTpye(item)\"\r\n >\r\n <span>{{item.title}}</span>\r\n </div>\r\n </div>\r\n <div class=\"request-content\">\r\n <component\r\n :is=\"currentRequestSettingType.name\"\r\n :lengthwise=\"lengthwise\"\r\n :interface-model=\"interfaceModel\"\r\n :response=\"response\"\r\n :key=\"interfaceModel.info.id + currentRequestSettingType.name\"\r\n :projectID=\"projectId\"\r\n :currentSecurityID=\"currentId\"\r\n :errorLine=\"errorLine\"\r\n @on-current-id=\"onCurrentId\"\r\n @on-script-run=\"onScriptRun\"\r\n @on-script-save=\"onSave\"\r\n @on-script-max=\"onScriptMax\"\r\n ></component>\r\n </div>\r\n </section>\r\n <response :key=\"interfaceModel.info.id + 'response'\" :lengthwise=\"lengthwise\" :response=\"response\"></response>\r\n </main>\r\n <i-spin fix v-show=\"loading\">\r\n <i class=\"spin-icon-load ivu-icon\"></i>\r\n </i-spin>\r\n <u-environment-modal :visiable.sync=\"showEnvironmentModal\" :projectId=\"projectId\" @on-refresh=\"getEnvironmentParamList\" :isAdd=\"true\"></u-environment-modal>\r\n</article>\r\n"
|
|
48846
|
+
module.exports = "<article class=\"interface-settings\" :class=\"{'script-max': scriptView}\">\r\n <header v-show=\"!scriptView\">\r\n<!-- <i-input class=\"diy-input\" v-model=\"interfaceModel.info.url\">-->\r\n<!-- <i-select transfer slot=\"prepend\" class=\"diy-select\" v-model=\"interfaceModel.info.method\">-->\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>-->\r\n <i-select class=\"diy-select method-select\" v-model=\"interfaceModel.info.method\">\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-select ref=\"addEnvParamSelect\" class=\"diy-select env-select\" v-model=\"interfaceModel.info.envId\" placeholder=\"请选择环境变量\" clearable>\r\n <i-option v-for=\"item in paramList\" :key=\"item.id\" :value=\"item.id\">{{item.name + \":\" + item.value}}</i-option>\r\n <i-option class=\"add-security-item\" value=\"''\">\r\n <div class=\"add-security-item-content\" @click.stop=\"onAddEnvParam\">\r\n <i class=\"api-icon icon-add\"></i>\r\n <span>新增环境变量</span>\r\n </div>\r\n </i-option>\r\n </i-select>\r\n <i-input class=\"diy-input url-input\" v-model=\"interfaceModel.info.url\"></i-input>\r\n\r\n <i-button type=\"primary\" class=\"diy-btn-primary submit-btn\" @click=\"onRun\">发送</i-button>\r\n <i-button type=\"primary\" class=\"diy-btn-primary\" @click=\"onSave\" ghost>保存</i-button>\r\n <i-button type=\"primary\" class=\"diy-btn-primary his-btn\" @click=\"onVersion\" ghost>查看历史版本</i-button>\r\n <i class=\"export iconfont icon-xiazai\" title=\"导出\" type=\"md-download\" @click=\"onExport\"></i>\r\n <i-upload action=\"\" :before-upload=\"onImport\" :show-upload-list=\"false\">\r\n <i class=\"import iconfont icon-shangchuan\" title=\"导入\" type=\"md-cloud-upload\"></i>\r\n </i-upload>\r\n\r\n </header>\r\n <main :class=\"{'transverse': !lengthwise}\">\r\n <section class=\"request\">\r\n <div v-show=\"!scriptView\" class=\"request-bar\">\r\n <div\r\n class=\"tag\"\r\n :class=\"{'active': currentRequestSettingType.name.indexOf(item.name) === 0}\"\r\n v-for=\"(item,index) in requertSettingTypeList\"\r\n :key=\"item.name\"\r\n @click=\"onClickRequertSettingTpye(item)\"\r\n >\r\n <span>{{item.title}}</span>\r\n </div>\r\n </div>\r\n <div class=\"request-content\">\r\n <component\r\n :is=\"currentRequestSettingType.name\"\r\n :lengthwise=\"lengthwise\"\r\n :interface-model=\"interfaceModel\"\r\n :response=\"response\"\r\n :key=\"interfaceModel.info.id + currentRequestSettingType.name\"\r\n :projectID=\"projectId\"\r\n :currentSecurityID=\"currentId\"\r\n :errorLine=\"!originId || originId === interfaceModel.info.id ? errorLine : []\"\r\n @on-current-id=\"onCurrentId\"\r\n @on-script-run=\"onScriptRun\"\r\n @on-script-save=\"onSave\"\r\n @on-script-max=\"onScriptMax\"\r\n ></component>\r\n </div>\r\n </section>\r\n <response :key=\"interfaceModel.info.id + 'response'\" :lengthwise=\"lengthwise\" :response=\"response\"></response>\r\n </main>\r\n <i-spin fix v-show=\"loading\">\r\n <i class=\"spin-icon-load ivu-icon\"></i>\r\n </i-spin>\r\n <u-environment-modal :visiable.sync=\"showEnvironmentModal\" :projectId=\"projectId\" @on-refresh=\"getEnvironmentParamList\" :isAdd=\"true\"></u-environment-modal>\r\n</article>\r\n"
|
|
48847
48847
|
|
|
48848
48848
|
/***/ }),
|
|
48849
48849
|
|
|
@@ -53783,6 +53783,10 @@ function (_super) {
|
|
|
53783
53783
|
return this._get("/unity/data-model/".concat(id, "/render"));
|
|
53784
53784
|
};
|
|
53785
53785
|
|
|
53786
|
+
DataModelService.prototype.getDataModelTree = function () {
|
|
53787
|
+
return this._get("/unity/data-model/tree");
|
|
53788
|
+
};
|
|
53789
|
+
|
|
53786
53790
|
data_model_service_decorate([serviceHandler("post", {
|
|
53787
53791
|
title: "分页查询数据模型"
|
|
53788
53792
|
}), data_model_service_metadata("design:type", Function), data_model_service_metadata("design:paramtypes", [Object]), data_model_service_metadata("design:returntype", void 0)], DataModelService.prototype, "dataModel", null);
|
|
@@ -53791,6 +53795,10 @@ function (_super) {
|
|
|
53791
53795
|
title: "获取文档"
|
|
53792
53796
|
}), data_model_service_metadata("design:type", Function), data_model_service_metadata("design:paramtypes", [Object]), data_model_service_metadata("design:returntype", void 0)], DataModelService.prototype, "getMavonDoc", null);
|
|
53793
53797
|
|
|
53798
|
+
data_model_service_decorate([serviceHandler("query", {
|
|
53799
|
+
title: "查询分类树"
|
|
53800
|
+
}), data_model_service_metadata("design:type", Function), data_model_service_metadata("design:paramtypes", []), data_model_service_metadata("design:returntype", void 0)], DataModelService.prototype, "getDataModelTree", null);
|
|
53801
|
+
|
|
53794
53802
|
return DataModelService;
|
|
53795
53803
|
}(common_service);
|
|
53796
53804
|
|
|
@@ -54519,7 +54527,7 @@ function (_super) {
|
|
|
54519
54527
|
this.isLoading = true;
|
|
54520
54528
|
return [4
|
|
54521
54529
|
/*yield*/
|
|
54522
|
-
, this.service.
|
|
54530
|
+
, this.service.getDataModelTree()];
|
|
54523
54531
|
|
|
54524
54532
|
case 1:
|
|
54525
54533
|
res = _a.sent();
|
|
@@ -60601,7 +60609,6 @@ var pre_execution_setting = __webpack_require__("d928");
|
|
|
60601
60609
|
|
|
60602
60610
|
|
|
60603
60611
|
|
|
60604
|
-
|
|
60605
60612
|
var pre_execution_setting_extends = undefined && undefined.__extends || function () {
|
|
60606
60613
|
var _extendStatics = function extendStatics(d, b) {
|
|
60607
60614
|
_extendStatics = Object.setPrototypeOf || {
|
|
@@ -60828,6 +60835,7 @@ function (_super) {
|
|
|
60828
60835
|
_this.diyKeywordList = [];
|
|
60829
60836
|
_this.refreshEditor = true;
|
|
60830
60837
|
_this.keyword = "";
|
|
60838
|
+
_this.errorMap = new Map();
|
|
60831
60839
|
_this.onFilter = lodash_debounce_default()(function () {
|
|
60832
60840
|
_this.filterTypeList();
|
|
60833
60841
|
}, 300);
|
|
@@ -60854,23 +60862,7 @@ function (_super) {
|
|
|
60854
60862
|
var scrollWrap = document.getElementsByClassName("ace_scrollbar")[0]; // 监听代码编辑器内容区滚动事件
|
|
60855
60863
|
|
|
60856
60864
|
scrollWrap.addEventListener("scroll", function () {
|
|
60857
|
-
|
|
60858
|
-
lineAll.forEach(function (h) {
|
|
60859
|
-
// 如果滚动的时候错误行代码在可视区,则实时将错误图标添加到该行号前
|
|
60860
|
-
if (_this.errorLine && (h === null || h === void 0 ? void 0 : h.innerHTML.includes(_this.errorLine))) {
|
|
60861
|
-
// 添加之前首先清除上一次的图标
|
|
60862
|
-
var lastText = document.getElementsByClassName("icon-a-cuowutishi1");
|
|
60863
|
-
|
|
60864
|
-
if (lastText === null || lastText === void 0 ? void 0 : lastText.length) {
|
|
60865
|
-
var parent = lastText[0].parentNode;
|
|
60866
|
-
parent.removeChild(lastText[0]);
|
|
60867
|
-
}
|
|
60868
|
-
|
|
60869
|
-
var errIcon = document.createElement("i");
|
|
60870
|
-
errIcon.className = "iconfont icon-a-cuowutishi1";
|
|
60871
|
-
h.insertBefore(errIcon, h.firstChild);
|
|
60872
|
-
}
|
|
60873
|
-
});
|
|
60865
|
+
_this.displayError(_this.errorLine);
|
|
60874
60866
|
});
|
|
60875
60867
|
};
|
|
60876
60868
|
|
|
@@ -60891,36 +60883,34 @@ function (_super) {
|
|
|
60891
60883
|
|
|
60892
60884
|
|
|
60893
60885
|
PreExecutionSetting.prototype.displayError = function (value) {
|
|
60894
|
-
var _this = this;
|
|
60895
|
-
|
|
60896
|
-
|
|
60897
|
-
var lastText = document.getElementsByClassName("icon-a-cuowutishi1");
|
|
60898
|
-
|
|
60899
|
-
if (lastText === null || lastText === void 0 ? void 0 : lastText.length) {
|
|
60900
|
-
var parent = lastText[0].parentNode;
|
|
60901
|
-
parent.removeChild(lastText[0]);
|
|
60902
|
-
}
|
|
60886
|
+
var _this = this;
|
|
60903
60887
|
|
|
60904
|
-
if (value) {
|
|
60888
|
+
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
60905
60889
|
// 检查错误行是否在当前代码编辑器可视区
|
|
60906
|
-
var
|
|
60907
|
-
var isView_1 = false;
|
|
60908
|
-
textAll === null || textAll === void 0 ? void 0 : textAll.forEach(function (h) {
|
|
60909
|
-
if (h === null || h === void 0 ? void 0 : h.innerHTML.includes(_this.errorLine)) {
|
|
60910
|
-
isView_1 = true;
|
|
60911
|
-
}
|
|
60912
|
-
}); // 如果当前错误行不在可视区则交由监听滚动去处理
|
|
60890
|
+
var textAll_1 = document.getElementsByClassName("ace_gutter-cell"); // 清楚上一次所有的错误图标
|
|
60913
60891
|
|
|
60914
|
-
|
|
60915
|
-
|
|
60916
|
-
|
|
60892
|
+
this.errorMap.forEach(function (value, key) {
|
|
60893
|
+
var _a;
|
|
60894
|
+
|
|
60895
|
+
var son = (_a = textAll_1[value]) === null || _a === void 0 ? void 0 : _a.firstElementChild;
|
|
60896
|
+
son && textAll_1[value].removeChild(son);
|
|
60897
|
+
}); // 清楚保存错误信息的容器
|
|
60917
60898
|
|
|
60899
|
+
this.errorMap.clear();
|
|
60900
|
+
value.forEach(function (h) {
|
|
60901
|
+
textAll_1 === null || textAll_1 === void 0 ? void 0 : textAll_1.forEach(function (v, index) {
|
|
60902
|
+
// 如果当前错误行在可视区内
|
|
60903
|
+
if ((v === null || v === void 0 ? void 0 : v.innerHTML) === h + "") {
|
|
60904
|
+
var text = v;
|
|
60905
|
+
var errIcon = document.createElement("i");
|
|
60906
|
+
errIcon.className = "iconfont icon-a-cuowutishi1"; // 将节点插入到子节点的首位
|
|
60918
60907
|
|
|
60919
|
-
|
|
60920
|
-
var errIcon = document.createElement("i");
|
|
60921
|
-
errIcon.className = "iconfont icon-a-cuowutishi1"; // 将节点插入到子节点的首位
|
|
60908
|
+
text.insertBefore(errIcon, text.firstChild); // 将错误行的行号作为键名,固定的代码编辑器行作为键值,因为代码编辑器的行数不变,实时更新的行的节点内容
|
|
60922
60909
|
|
|
60923
|
-
|
|
60910
|
+
_this.errorMap.set(h, index);
|
|
60911
|
+
}
|
|
60912
|
+
});
|
|
60913
|
+
});
|
|
60924
60914
|
}
|
|
60925
60915
|
};
|
|
60926
60916
|
|
|
@@ -61048,7 +61038,8 @@ function (_super) {
|
|
|
61048
61038
|
}), pre_execution_setting_metadata("design:type", Object)], PreExecutionSetting.prototype, "errorLine", void 0);
|
|
61049
61039
|
|
|
61050
61040
|
pre_execution_setting_decorate([Object(flagwind_web_["watch"])("errorLine", {
|
|
61051
|
-
immediate: true
|
|
61041
|
+
immediate: true,
|
|
61042
|
+
deep: true
|
|
61052
61043
|
}), pre_execution_setting_metadata("design:type", Function), pre_execution_setting_metadata("design:paramtypes", [Object]), pre_execution_setting_metadata("design:returntype", void 0)], PreExecutionSetting.prototype, "handleError", null);
|
|
61053
61044
|
|
|
61054
61045
|
PreExecutionSetting = pre_execution_setting_decorate([Object(flagwind_web_["component"])({
|
|
@@ -63904,8 +63895,6 @@ function (_super) {
|
|
|
63904
63895
|
|
|
63905
63896
|
|
|
63906
63897
|
|
|
63907
|
-
|
|
63908
|
-
|
|
63909
63898
|
|
|
63910
63899
|
|
|
63911
63900
|
|
|
@@ -64140,6 +64129,7 @@ function (_super) {
|
|
|
64140
64129
|
_this.currentId = "";
|
|
64141
64130
|
_this.paramList = [];
|
|
64142
64131
|
_this.errorLine = null;
|
|
64132
|
+
_this.originId = "";
|
|
64143
64133
|
_this.scriptView = false;
|
|
64144
64134
|
_this.typeList = [{
|
|
64145
64135
|
value: "GET",
|
|
@@ -64196,33 +64186,34 @@ function (_super) {
|
|
|
64196
64186
|
};
|
|
64197
64187
|
|
|
64198
64188
|
InterfaceSettings.prototype.onRun = function () {
|
|
64199
|
-
var _a, _b, _c;
|
|
64189
|
+
var _a, _b, _c, _d, _e, _f;
|
|
64200
64190
|
|
|
64201
64191
|
return interface_settings_awaiter(this, void 0, void 0, function () {
|
|
64202
|
-
var formParams, requestHeaders, index, result
|
|
64192
|
+
var formParams, requestHeaders, index, result;
|
|
64203
64193
|
|
|
64204
64194
|
var _this = this;
|
|
64205
64195
|
|
|
64206
|
-
return interface_settings_generator(this, function (
|
|
64207
|
-
switch (
|
|
64196
|
+
return interface_settings_generator(this, function (_g) {
|
|
64197
|
+
switch (_g.label) {
|
|
64208
64198
|
case 0:
|
|
64209
64199
|
this.loading = true;
|
|
64200
|
+
this.originId = ((_b = (_a = this.interfaceModel) === null || _a === void 0 ? void 0 : _a.info) === null || _b === void 0 ? void 0 : _b.id) || "";
|
|
64210
64201
|
formParams = [];
|
|
64211
64202
|
requestHeaders = [];
|
|
64212
64203
|
|
|
64213
|
-
if (((
|
|
64204
|
+
if (((_c = this.interfaceModel.formParams) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
|
64214
64205
|
formParams = this.interfaceModel.formParams.filter(function (param) {
|
|
64215
64206
|
return !param.disabled;
|
|
64216
64207
|
});
|
|
64217
64208
|
}
|
|
64218
64209
|
|
|
64219
|
-
if (((
|
|
64210
|
+
if (((_d = this.interfaceModel.requestHeaders) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
|
64220
64211
|
requestHeaders = this.interfaceModel.requestHeaders.filter(function (param) {
|
|
64221
64212
|
return !param.disabled;
|
|
64222
64213
|
});
|
|
64223
64214
|
}
|
|
64224
64215
|
|
|
64225
|
-
if (!((
|
|
64216
|
+
if (!((_e = this.interfaceModel.environmentParam) === null || _e === void 0 ? void 0 : _e.length)) {
|
|
64226
64217
|
index = this.paramList.findIndex(function (v) {
|
|
64227
64218
|
return v.id === _this.interfaceModel.info.envId;
|
|
64228
64219
|
});
|
|
@@ -64237,7 +64228,7 @@ function (_super) {
|
|
|
64237
64228
|
}))];
|
|
64238
64229
|
|
|
64239
64230
|
case 1:
|
|
64240
|
-
result =
|
|
64231
|
+
result = _g.sent();
|
|
64241
64232
|
this.loading = false;
|
|
64242
64233
|
this.response = (result === null || result === void 0 ? void 0 : result.result) || new Response();
|
|
64243
64234
|
|
|
@@ -64247,16 +64238,7 @@ function (_super) {
|
|
|
64247
64238
|
}
|
|
64248
64239
|
|
|
64249
64240
|
this.responseCache.set(this.interfaceModel.info.id, this.response);
|
|
64250
|
-
|
|
64251
|
-
isError = this.response.output.match(reg);
|
|
64252
|
-
|
|
64253
|
-
if (isError) {
|
|
64254
|
-
line = isError[0].match(/([0-9]+)/g);
|
|
64255
|
-
line.length && (this.errorLine = line[0]);
|
|
64256
|
-
} else {
|
|
64257
|
-
this.errorLine = null;
|
|
64258
|
-
}
|
|
64259
|
-
|
|
64241
|
+
((_f = this.response.errorLineNumbers) === null || _f === void 0 ? void 0 : _f.length) && (this.errorLine = this.response.errorLineNumbers);
|
|
64260
64242
|
return [2
|
|
64261
64243
|
/*return*/
|
|
64262
64244
|
];
|
package/dist/index.umd.js
CHANGED
|
@@ -48852,7 +48852,7 @@ module.exports = uncurryThis([].slice);
|
|
|
48852
48852
|
/***/ "f40e":
|
|
48853
48853
|
/***/ (function(module, exports) {
|
|
48854
48854
|
|
|
48855
|
-
module.exports = "<article class=\"interface-settings\" :class=\"{'script-max': scriptView}\">\r\n <header v-show=\"!scriptView\">\r\n<!-- <i-input class=\"diy-input\" v-model=\"interfaceModel.info.url\">-->\r\n<!-- <i-select transfer slot=\"prepend\" class=\"diy-select\" v-model=\"interfaceModel.info.method\">-->\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>-->\r\n <i-select class=\"diy-select method-select\" v-model=\"interfaceModel.info.method\">\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-select ref=\"addEnvParamSelect\" class=\"diy-select env-select\" v-model=\"interfaceModel.info.envId\" placeholder=\"请选择环境变量\" clearable>\r\n <i-option v-for=\"item in paramList\" :key=\"item.id\" :value=\"item.id\">{{item.name + \":\" + item.value}}</i-option>\r\n <i-option class=\"add-security-item\" value=\"''\">\r\n <div class=\"add-security-item-content\" @click.stop=\"onAddEnvParam\">\r\n <i class=\"api-icon icon-add\"></i>\r\n <span>新增环境变量</span>\r\n </div>\r\n </i-option>\r\n </i-select>\r\n <i-input class=\"diy-input url-input\" v-model=\"interfaceModel.info.url\"></i-input>\r\n\r\n <i-button type=\"primary\" class=\"diy-btn-primary submit-btn\" @click=\"onRun\">发送</i-button>\r\n <i-button type=\"primary\" class=\"diy-btn-primary\" @click=\"onSave\" ghost>保存</i-button>\r\n <i-button type=\"primary\" class=\"diy-btn-primary his-btn\" @click=\"onVersion\" ghost>查看历史版本</i-button>\r\n <i class=\"export iconfont icon-xiazai\" title=\"导出\" type=\"md-download\" @click=\"onExport\"></i>\r\n <i-upload action=\"\" :before-upload=\"onImport\" :show-upload-list=\"false\">\r\n <i class=\"import iconfont icon-shangchuan\" title=\"导入\" type=\"md-cloud-upload\"></i>\r\n </i-upload>\r\n\r\n </header>\r\n <main :class=\"{'transverse': !lengthwise}\">\r\n <section class=\"request\">\r\n <div v-show=\"!scriptView\" class=\"request-bar\">\r\n <div\r\n class=\"tag\"\r\n :class=\"{'active': currentRequestSettingType.name.indexOf(item.name) === 0}\"\r\n v-for=\"(item,index) in requertSettingTypeList\"\r\n :key=\"item.name\"\r\n @click=\"onClickRequertSettingTpye(item)\"\r\n >\r\n <span>{{item.title}}</span>\r\n </div>\r\n </div>\r\n <div class=\"request-content\">\r\n <component\r\n :is=\"currentRequestSettingType.name\"\r\n :lengthwise=\"lengthwise\"\r\n :interface-model=\"interfaceModel\"\r\n :response=\"response\"\r\n :key=\"interfaceModel.info.id + currentRequestSettingType.name\"\r\n :projectID=\"projectId\"\r\n :currentSecurityID=\"currentId\"\r\n :errorLine=\"errorLine\"\r\n @on-current-id=\"onCurrentId\"\r\n @on-script-run=\"onScriptRun\"\r\n @on-script-save=\"onSave\"\r\n @on-script-max=\"onScriptMax\"\r\n ></component>\r\n </div>\r\n </section>\r\n <response :key=\"interfaceModel.info.id + 'response'\" :lengthwise=\"lengthwise\" :response=\"response\"></response>\r\n </main>\r\n <i-spin fix v-show=\"loading\">\r\n <i class=\"spin-icon-load ivu-icon\"></i>\r\n </i-spin>\r\n <u-environment-modal :visiable.sync=\"showEnvironmentModal\" :projectId=\"projectId\" @on-refresh=\"getEnvironmentParamList\" :isAdd=\"true\"></u-environment-modal>\r\n</article>\r\n"
|
|
48855
|
+
module.exports = "<article class=\"interface-settings\" :class=\"{'script-max': scriptView}\">\r\n <header v-show=\"!scriptView\">\r\n<!-- <i-input class=\"diy-input\" v-model=\"interfaceModel.info.url\">-->\r\n<!-- <i-select transfer slot=\"prepend\" class=\"diy-select\" v-model=\"interfaceModel.info.method\">-->\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>-->\r\n <i-select class=\"diy-select method-select\" v-model=\"interfaceModel.info.method\">\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-select ref=\"addEnvParamSelect\" class=\"diy-select env-select\" v-model=\"interfaceModel.info.envId\" placeholder=\"请选择环境变量\" clearable>\r\n <i-option v-for=\"item in paramList\" :key=\"item.id\" :value=\"item.id\">{{item.name + \":\" + item.value}}</i-option>\r\n <i-option class=\"add-security-item\" value=\"''\">\r\n <div class=\"add-security-item-content\" @click.stop=\"onAddEnvParam\">\r\n <i class=\"api-icon icon-add\"></i>\r\n <span>新增环境变量</span>\r\n </div>\r\n </i-option>\r\n </i-select>\r\n <i-input class=\"diy-input url-input\" v-model=\"interfaceModel.info.url\"></i-input>\r\n\r\n <i-button type=\"primary\" class=\"diy-btn-primary submit-btn\" @click=\"onRun\">发送</i-button>\r\n <i-button type=\"primary\" class=\"diy-btn-primary\" @click=\"onSave\" ghost>保存</i-button>\r\n <i-button type=\"primary\" class=\"diy-btn-primary his-btn\" @click=\"onVersion\" ghost>查看历史版本</i-button>\r\n <i class=\"export iconfont icon-xiazai\" title=\"导出\" type=\"md-download\" @click=\"onExport\"></i>\r\n <i-upload action=\"\" :before-upload=\"onImport\" :show-upload-list=\"false\">\r\n <i class=\"import iconfont icon-shangchuan\" title=\"导入\" type=\"md-cloud-upload\"></i>\r\n </i-upload>\r\n\r\n </header>\r\n <main :class=\"{'transverse': !lengthwise}\">\r\n <section class=\"request\">\r\n <div v-show=\"!scriptView\" class=\"request-bar\">\r\n <div\r\n class=\"tag\"\r\n :class=\"{'active': currentRequestSettingType.name.indexOf(item.name) === 0}\"\r\n v-for=\"(item,index) in requertSettingTypeList\"\r\n :key=\"item.name\"\r\n @click=\"onClickRequertSettingTpye(item)\"\r\n >\r\n <span>{{item.title}}</span>\r\n </div>\r\n </div>\r\n <div class=\"request-content\">\r\n <component\r\n :is=\"currentRequestSettingType.name\"\r\n :lengthwise=\"lengthwise\"\r\n :interface-model=\"interfaceModel\"\r\n :response=\"response\"\r\n :key=\"interfaceModel.info.id + currentRequestSettingType.name\"\r\n :projectID=\"projectId\"\r\n :currentSecurityID=\"currentId\"\r\n :errorLine=\"!originId || originId === interfaceModel.info.id ? errorLine : []\"\r\n @on-current-id=\"onCurrentId\"\r\n @on-script-run=\"onScriptRun\"\r\n @on-script-save=\"onSave\"\r\n @on-script-max=\"onScriptMax\"\r\n ></component>\r\n </div>\r\n </section>\r\n <response :key=\"interfaceModel.info.id + 'response'\" :lengthwise=\"lengthwise\" :response=\"response\"></response>\r\n </main>\r\n <i-spin fix v-show=\"loading\">\r\n <i class=\"spin-icon-load ivu-icon\"></i>\r\n </i-spin>\r\n <u-environment-modal :visiable.sync=\"showEnvironmentModal\" :projectId=\"projectId\" @on-refresh=\"getEnvironmentParamList\" :isAdd=\"true\"></u-environment-modal>\r\n</article>\r\n"
|
|
48856
48856
|
|
|
48857
48857
|
/***/ }),
|
|
48858
48858
|
|
|
@@ -53792,6 +53792,10 @@ function (_super) {
|
|
|
53792
53792
|
return this._get("/unity/data-model/".concat(id, "/render"));
|
|
53793
53793
|
};
|
|
53794
53794
|
|
|
53795
|
+
DataModelService.prototype.getDataModelTree = function () {
|
|
53796
|
+
return this._get("/unity/data-model/tree");
|
|
53797
|
+
};
|
|
53798
|
+
|
|
53795
53799
|
data_model_service_decorate([serviceHandler("post", {
|
|
53796
53800
|
title: "分页查询数据模型"
|
|
53797
53801
|
}), data_model_service_metadata("design:type", Function), data_model_service_metadata("design:paramtypes", [Object]), data_model_service_metadata("design:returntype", void 0)], DataModelService.prototype, "dataModel", null);
|
|
@@ -53800,6 +53804,10 @@ function (_super) {
|
|
|
53800
53804
|
title: "获取文档"
|
|
53801
53805
|
}), data_model_service_metadata("design:type", Function), data_model_service_metadata("design:paramtypes", [Object]), data_model_service_metadata("design:returntype", void 0)], DataModelService.prototype, "getMavonDoc", null);
|
|
53802
53806
|
|
|
53807
|
+
data_model_service_decorate([serviceHandler("query", {
|
|
53808
|
+
title: "查询分类树"
|
|
53809
|
+
}), data_model_service_metadata("design:type", Function), data_model_service_metadata("design:paramtypes", []), data_model_service_metadata("design:returntype", void 0)], DataModelService.prototype, "getDataModelTree", null);
|
|
53810
|
+
|
|
53803
53811
|
return DataModelService;
|
|
53804
53812
|
}(common_service);
|
|
53805
53813
|
|
|
@@ -54528,7 +54536,7 @@ function (_super) {
|
|
|
54528
54536
|
this.isLoading = true;
|
|
54529
54537
|
return [4
|
|
54530
54538
|
/*yield*/
|
|
54531
|
-
, this.service.
|
|
54539
|
+
, this.service.getDataModelTree()];
|
|
54532
54540
|
|
|
54533
54541
|
case 1:
|
|
54534
54542
|
res = _a.sent();
|
|
@@ -60610,7 +60618,6 @@ var pre_execution_setting = __webpack_require__("d928");
|
|
|
60610
60618
|
|
|
60611
60619
|
|
|
60612
60620
|
|
|
60613
|
-
|
|
60614
60621
|
var pre_execution_setting_extends = undefined && undefined.__extends || function () {
|
|
60615
60622
|
var _extendStatics = function extendStatics(d, b) {
|
|
60616
60623
|
_extendStatics = Object.setPrototypeOf || {
|
|
@@ -60837,6 +60844,7 @@ function (_super) {
|
|
|
60837
60844
|
_this.diyKeywordList = [];
|
|
60838
60845
|
_this.refreshEditor = true;
|
|
60839
60846
|
_this.keyword = "";
|
|
60847
|
+
_this.errorMap = new Map();
|
|
60840
60848
|
_this.onFilter = lodash_debounce_default()(function () {
|
|
60841
60849
|
_this.filterTypeList();
|
|
60842
60850
|
}, 300);
|
|
@@ -60863,23 +60871,7 @@ function (_super) {
|
|
|
60863
60871
|
var scrollWrap = document.getElementsByClassName("ace_scrollbar")[0]; // 监听代码编辑器内容区滚动事件
|
|
60864
60872
|
|
|
60865
60873
|
scrollWrap.addEventListener("scroll", function () {
|
|
60866
|
-
|
|
60867
|
-
lineAll.forEach(function (h) {
|
|
60868
|
-
// 如果滚动的时候错误行代码在可视区,则实时将错误图标添加到该行号前
|
|
60869
|
-
if (_this.errorLine && (h === null || h === void 0 ? void 0 : h.innerHTML.includes(_this.errorLine))) {
|
|
60870
|
-
// 添加之前首先清除上一次的图标
|
|
60871
|
-
var lastText = document.getElementsByClassName("icon-a-cuowutishi1");
|
|
60872
|
-
|
|
60873
|
-
if (lastText === null || lastText === void 0 ? void 0 : lastText.length) {
|
|
60874
|
-
var parent = lastText[0].parentNode;
|
|
60875
|
-
parent.removeChild(lastText[0]);
|
|
60876
|
-
}
|
|
60877
|
-
|
|
60878
|
-
var errIcon = document.createElement("i");
|
|
60879
|
-
errIcon.className = "iconfont icon-a-cuowutishi1";
|
|
60880
|
-
h.insertBefore(errIcon, h.firstChild);
|
|
60881
|
-
}
|
|
60882
|
-
});
|
|
60874
|
+
_this.displayError(_this.errorLine);
|
|
60883
60875
|
});
|
|
60884
60876
|
};
|
|
60885
60877
|
|
|
@@ -60900,36 +60892,34 @@ function (_super) {
|
|
|
60900
60892
|
|
|
60901
60893
|
|
|
60902
60894
|
PreExecutionSetting.prototype.displayError = function (value) {
|
|
60903
|
-
var _this = this;
|
|
60904
|
-
|
|
60905
|
-
|
|
60906
|
-
var lastText = document.getElementsByClassName("icon-a-cuowutishi1");
|
|
60907
|
-
|
|
60908
|
-
if (lastText === null || lastText === void 0 ? void 0 : lastText.length) {
|
|
60909
|
-
var parent = lastText[0].parentNode;
|
|
60910
|
-
parent.removeChild(lastText[0]);
|
|
60911
|
-
}
|
|
60895
|
+
var _this = this;
|
|
60912
60896
|
|
|
60913
|
-
if (value) {
|
|
60897
|
+
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
60914
60898
|
// 检查错误行是否在当前代码编辑器可视区
|
|
60915
|
-
var
|
|
60916
|
-
var isView_1 = false;
|
|
60917
|
-
textAll === null || textAll === void 0 ? void 0 : textAll.forEach(function (h) {
|
|
60918
|
-
if (h === null || h === void 0 ? void 0 : h.innerHTML.includes(_this.errorLine)) {
|
|
60919
|
-
isView_1 = true;
|
|
60920
|
-
}
|
|
60921
|
-
}); // 如果当前错误行不在可视区则交由监听滚动去处理
|
|
60899
|
+
var textAll_1 = document.getElementsByClassName("ace_gutter-cell"); // 清楚上一次所有的错误图标
|
|
60922
60900
|
|
|
60923
|
-
|
|
60924
|
-
|
|
60925
|
-
|
|
60901
|
+
this.errorMap.forEach(function (value, key) {
|
|
60902
|
+
var _a;
|
|
60903
|
+
|
|
60904
|
+
var son = (_a = textAll_1[value]) === null || _a === void 0 ? void 0 : _a.firstElementChild;
|
|
60905
|
+
son && textAll_1[value].removeChild(son);
|
|
60906
|
+
}); // 清楚保存错误信息的容器
|
|
60926
60907
|
|
|
60908
|
+
this.errorMap.clear();
|
|
60909
|
+
value.forEach(function (h) {
|
|
60910
|
+
textAll_1 === null || textAll_1 === void 0 ? void 0 : textAll_1.forEach(function (v, index) {
|
|
60911
|
+
// 如果当前错误行在可视区内
|
|
60912
|
+
if ((v === null || v === void 0 ? void 0 : v.innerHTML) === h + "") {
|
|
60913
|
+
var text = v;
|
|
60914
|
+
var errIcon = document.createElement("i");
|
|
60915
|
+
errIcon.className = "iconfont icon-a-cuowutishi1"; // 将节点插入到子节点的首位
|
|
60927
60916
|
|
|
60928
|
-
|
|
60929
|
-
var errIcon = document.createElement("i");
|
|
60930
|
-
errIcon.className = "iconfont icon-a-cuowutishi1"; // 将节点插入到子节点的首位
|
|
60917
|
+
text.insertBefore(errIcon, text.firstChild); // 将错误行的行号作为键名,固定的代码编辑器行作为键值,因为代码编辑器的行数不变,实时更新的行的节点内容
|
|
60931
60918
|
|
|
60932
|
-
|
|
60919
|
+
_this.errorMap.set(h, index);
|
|
60920
|
+
}
|
|
60921
|
+
});
|
|
60922
|
+
});
|
|
60933
60923
|
}
|
|
60934
60924
|
};
|
|
60935
60925
|
|
|
@@ -61057,7 +61047,8 @@ function (_super) {
|
|
|
61057
61047
|
}), pre_execution_setting_metadata("design:type", Object)], PreExecutionSetting.prototype, "errorLine", void 0);
|
|
61058
61048
|
|
|
61059
61049
|
pre_execution_setting_decorate([Object(flagwind_web_["watch"])("errorLine", {
|
|
61060
|
-
immediate: true
|
|
61050
|
+
immediate: true,
|
|
61051
|
+
deep: true
|
|
61061
61052
|
}), pre_execution_setting_metadata("design:type", Function), pre_execution_setting_metadata("design:paramtypes", [Object]), pre_execution_setting_metadata("design:returntype", void 0)], PreExecutionSetting.prototype, "handleError", null);
|
|
61062
61053
|
|
|
61063
61054
|
PreExecutionSetting = pre_execution_setting_decorate([Object(flagwind_web_["component"])({
|
|
@@ -63913,8 +63904,6 @@ function (_super) {
|
|
|
63913
63904
|
|
|
63914
63905
|
|
|
63915
63906
|
|
|
63916
|
-
|
|
63917
|
-
|
|
63918
63907
|
|
|
63919
63908
|
|
|
63920
63909
|
|
|
@@ -64149,6 +64138,7 @@ function (_super) {
|
|
|
64149
64138
|
_this.currentId = "";
|
|
64150
64139
|
_this.paramList = [];
|
|
64151
64140
|
_this.errorLine = null;
|
|
64141
|
+
_this.originId = "";
|
|
64152
64142
|
_this.scriptView = false;
|
|
64153
64143
|
_this.typeList = [{
|
|
64154
64144
|
value: "GET",
|
|
@@ -64205,33 +64195,34 @@ function (_super) {
|
|
|
64205
64195
|
};
|
|
64206
64196
|
|
|
64207
64197
|
InterfaceSettings.prototype.onRun = function () {
|
|
64208
|
-
var _a, _b, _c;
|
|
64198
|
+
var _a, _b, _c, _d, _e, _f;
|
|
64209
64199
|
|
|
64210
64200
|
return interface_settings_awaiter(this, void 0, void 0, function () {
|
|
64211
|
-
var formParams, requestHeaders, index, result
|
|
64201
|
+
var formParams, requestHeaders, index, result;
|
|
64212
64202
|
|
|
64213
64203
|
var _this = this;
|
|
64214
64204
|
|
|
64215
|
-
return interface_settings_generator(this, function (
|
|
64216
|
-
switch (
|
|
64205
|
+
return interface_settings_generator(this, function (_g) {
|
|
64206
|
+
switch (_g.label) {
|
|
64217
64207
|
case 0:
|
|
64218
64208
|
this.loading = true;
|
|
64209
|
+
this.originId = ((_b = (_a = this.interfaceModel) === null || _a === void 0 ? void 0 : _a.info) === null || _b === void 0 ? void 0 : _b.id) || "";
|
|
64219
64210
|
formParams = [];
|
|
64220
64211
|
requestHeaders = [];
|
|
64221
64212
|
|
|
64222
|
-
if (((
|
|
64213
|
+
if (((_c = this.interfaceModel.formParams) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
|
64223
64214
|
formParams = this.interfaceModel.formParams.filter(function (param) {
|
|
64224
64215
|
return !param.disabled;
|
|
64225
64216
|
});
|
|
64226
64217
|
}
|
|
64227
64218
|
|
|
64228
|
-
if (((
|
|
64219
|
+
if (((_d = this.interfaceModel.requestHeaders) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
|
64229
64220
|
requestHeaders = this.interfaceModel.requestHeaders.filter(function (param) {
|
|
64230
64221
|
return !param.disabled;
|
|
64231
64222
|
});
|
|
64232
64223
|
}
|
|
64233
64224
|
|
|
64234
|
-
if (!((
|
|
64225
|
+
if (!((_e = this.interfaceModel.environmentParam) === null || _e === void 0 ? void 0 : _e.length)) {
|
|
64235
64226
|
index = this.paramList.findIndex(function (v) {
|
|
64236
64227
|
return v.id === _this.interfaceModel.info.envId;
|
|
64237
64228
|
});
|
|
@@ -64246,7 +64237,7 @@ function (_super) {
|
|
|
64246
64237
|
}))];
|
|
64247
64238
|
|
|
64248
64239
|
case 1:
|
|
64249
|
-
result =
|
|
64240
|
+
result = _g.sent();
|
|
64250
64241
|
this.loading = false;
|
|
64251
64242
|
this.response = (result === null || result === void 0 ? void 0 : result.result) || new Response();
|
|
64252
64243
|
|
|
@@ -64256,16 +64247,7 @@ function (_super) {
|
|
|
64256
64247
|
}
|
|
64257
64248
|
|
|
64258
64249
|
this.responseCache.set(this.interfaceModel.info.id, this.response);
|
|
64259
|
-
|
|
64260
|
-
isError = this.response.output.match(reg);
|
|
64261
|
-
|
|
64262
|
-
if (isError) {
|
|
64263
|
-
line = isError[0].match(/([0-9]+)/g);
|
|
64264
|
-
line.length && (this.errorLine = line[0]);
|
|
64265
|
-
} else {
|
|
64266
|
-
this.errorLine = null;
|
|
64267
|
-
}
|
|
64268
|
-
|
|
64250
|
+
((_f = this.response.errorLineNumbers) === null || _f === void 0 ? void 0 : _f.length) && (this.errorLine = this.response.errorLineNumbers);
|
|
64269
64251
|
return [2
|
|
64270
64252
|
/*return*/
|
|
64271
64253
|
];
|