@egova/egova-api 1.3.35 → 1.3.37
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 +199 -27
- package/dist/index.css +1 -1
- package/dist/index.umd.js +199 -27
- package/dist/index.umd.min.js +3 -3
- package/package.json +97 -97
package/dist/index.common.js
CHANGED
|
@@ -9978,10 +9978,19 @@ var project_comment = __webpack_require__("65e5");
|
|
|
9978
9978
|
var dist = __webpack_require__("7af4");
|
|
9979
9979
|
var dist_default = /*#__PURE__*/__webpack_require__.n(dist);
|
|
9980
9980
|
|
|
9981
|
+
// EXTERNAL MODULE: ./node_modules/.pnpm/core-js@3.35.0/node_modules/core-js/modules/es.error.cause.js
|
|
9982
|
+
var es_error_cause = __webpack_require__("0ddb");
|
|
9983
|
+
|
|
9981
9984
|
// CONCATENATED MODULE: ./src/views/project-detail/service.ts
|
|
9982
9985
|
|
|
9983
9986
|
|
|
9984
9987
|
|
|
9988
|
+
|
|
9989
|
+
|
|
9990
|
+
|
|
9991
|
+
|
|
9992
|
+
|
|
9993
|
+
|
|
9985
9994
|
var service_ApiService = /** @class */function (_super) {
|
|
9986
9995
|
__extends(ApiService, _super);
|
|
9987
9996
|
function ApiService() {
|
|
@@ -10033,6 +10042,90 @@ var service_ApiService = /** @class */function (_super) {
|
|
|
10033
10042
|
ApiService.prototype.runWithFile = function (apiId, data) {
|
|
10034
10043
|
return this._post("/unity/api/run/".concat(apiId, "/exec"), data);
|
|
10035
10044
|
};
|
|
10045
|
+
ApiService.prototype.runStream = function (apiId, apiInfo, handlers) {
|
|
10046
|
+
var _a, _b;
|
|
10047
|
+
if (handlers === void 0) {
|
|
10048
|
+
handlers = {};
|
|
10049
|
+
}
|
|
10050
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
10051
|
+
var config, queryString, requestUrl, response, responseHeaders, reader, decoder, originalContent, size, _c, done, value, chunk;
|
|
10052
|
+
return __generator(this, function (_d) {
|
|
10053
|
+
switch (_d.label) {
|
|
10054
|
+
case 0:
|
|
10055
|
+
config = {
|
|
10056
|
+
method: "POST",
|
|
10057
|
+
baseURL: window.location.origin,
|
|
10058
|
+
url: this.url("/unity/api/run/".concat(apiId, "/web")),
|
|
10059
|
+
data: apiInfo,
|
|
10060
|
+
headers: __assign({
|
|
10061
|
+
"Content-Type": "application/json"
|
|
10062
|
+
}, getToken().headers),
|
|
10063
|
+
params: {}
|
|
10064
|
+
};
|
|
10065
|
+
signature.signatureConfig(config);
|
|
10066
|
+
queryString = new URLSearchParams(config.params).toString();
|
|
10067
|
+
requestUrl = queryString ? "".concat(config.url, "?").concat(queryString) : "".concat(config.url);
|
|
10068
|
+
return [4 /*yield*/, fetch(requestUrl, {
|
|
10069
|
+
method: "POST",
|
|
10070
|
+
headers: config.headers,
|
|
10071
|
+
body: JSON.stringify(apiInfo)
|
|
10072
|
+
})];
|
|
10073
|
+
case 1:
|
|
10074
|
+
response = _d.sent();
|
|
10075
|
+
responseHeaders = {};
|
|
10076
|
+
response.headers.forEach(function (value, key) {
|
|
10077
|
+
responseHeaders[key] = value;
|
|
10078
|
+
});
|
|
10079
|
+
(_a = handlers.onHeaders) === null || _a === void 0 ? void 0 : _a.call(handlers, {
|
|
10080
|
+
code: response.status,
|
|
10081
|
+
responseHeaders: responseHeaders
|
|
10082
|
+
});
|
|
10083
|
+
if (!response.ok) {
|
|
10084
|
+
throw new Error("\u8BF7\u6C42\u5931\u8D25(".concat(response.status, ")"));
|
|
10085
|
+
}
|
|
10086
|
+
if (!response.body) {
|
|
10087
|
+
return [2 /*return*/, {
|
|
10088
|
+
code: response.status,
|
|
10089
|
+
responseHeaders: responseHeaders,
|
|
10090
|
+
originalContent: "",
|
|
10091
|
+
size: 0
|
|
10092
|
+
}];
|
|
10093
|
+
}
|
|
10094
|
+
reader = response.body.getReader();
|
|
10095
|
+
decoder = new TextDecoder("utf-8");
|
|
10096
|
+
originalContent = "";
|
|
10097
|
+
size = 0;
|
|
10098
|
+
_d.label = 2;
|
|
10099
|
+
case 2:
|
|
10100
|
+
if (false) {}
|
|
10101
|
+
return [4 /*yield*/, reader.read()];
|
|
10102
|
+
case 3:
|
|
10103
|
+
_c = _d.sent(), done = _c.done, value = _c.value;
|
|
10104
|
+
if (done) {
|
|
10105
|
+
originalContent += decoder.decode();
|
|
10106
|
+
return [3 /*break*/, 4];
|
|
10107
|
+
}
|
|
10108
|
+
chunk = decoder.decode(value, {
|
|
10109
|
+
stream: true
|
|
10110
|
+
});
|
|
10111
|
+
originalContent += chunk;
|
|
10112
|
+
size += (value === null || value === void 0 ? void 0 : value.length) || 0;
|
|
10113
|
+
(_b = handlers.onChunk) === null || _b === void 0 ? void 0 : _b.call(handlers, {
|
|
10114
|
+
chunk: chunk,
|
|
10115
|
+
size: size
|
|
10116
|
+
});
|
|
10117
|
+
return [3 /*break*/, 2];
|
|
10118
|
+
case 4:
|
|
10119
|
+
return [2 /*return*/, {
|
|
10120
|
+
code: response.status,
|
|
10121
|
+
responseHeaders: responseHeaders,
|
|
10122
|
+
originalContent: originalContent,
|
|
10123
|
+
size: size
|
|
10124
|
+
}];
|
|
10125
|
+
}
|
|
10126
|
+
});
|
|
10127
|
+
});
|
|
10128
|
+
};
|
|
10036
10129
|
ApiService.prototype.saveApiInfo = function (apiInfo) {
|
|
10037
10130
|
return this._post("/unity/api/info/save/whole", apiInfo);
|
|
10038
10131
|
};
|
|
@@ -10782,8 +10875,8 @@ var environment_variable_modal_EnvironmentVariableModal = /** @class */function
|
|
|
10782
10875
|
// EXTERNAL MODULE: ./src/views/project-detail/index.scss
|
|
10783
10876
|
var project_detail = __webpack_require__("fe54");
|
|
10784
10877
|
|
|
10785
|
-
// EXTERNAL MODULE: ./node_modules/.pnpm/core-js@3.35.0/node_modules/core-js/modules/es.
|
|
10786
|
-
var
|
|
10878
|
+
// EXTERNAL MODULE: ./node_modules/.pnpm/core-js@3.35.0/node_modules/core-js/modules/es.array.reduce.js
|
|
10879
|
+
var es_array_reduce = __webpack_require__("8b65");
|
|
10787
10880
|
|
|
10788
10881
|
// CONCATENATED MODULE: ./src/views/project-detail/interface-settings/model.ts
|
|
10789
10882
|
|
|
@@ -11192,7 +11285,7 @@ var code_editor_CodeEditor = /** @class */function (_super) {
|
|
|
11192
11285
|
}(flagwind_web_umd_js_["Component"]);
|
|
11193
11286
|
/* harmony default export */ var components_code_editor = (code_editor_CodeEditor);
|
|
11194
11287
|
// EXTERNAL MODULE: ./src/views/project-detail/response/index.scss
|
|
11195
|
-
var
|
|
11288
|
+
var project_detail_response = __webpack_require__("aba0");
|
|
11196
11289
|
|
|
11197
11290
|
// CONCATENATED MODULE: ./src/views/project-detail/response/index.ts
|
|
11198
11291
|
|
|
@@ -11384,7 +11477,7 @@ var response_ResponsePanel = /** @class */function (_super) {
|
|
|
11384
11477
|
})], ResponsePanel);
|
|
11385
11478
|
return ResponsePanel;
|
|
11386
11479
|
}(base_editor_setting);
|
|
11387
|
-
/* harmony default export */ var
|
|
11480
|
+
/* harmony default export */ var views_project_detail_response = (response_ResponsePanel);
|
|
11388
11481
|
// EXTERNAL MODULE: ./src/views/project-detail/after-execution-transfer/index.scss
|
|
11389
11482
|
var after_execution_transfer = __webpack_require__("8a77");
|
|
11390
11483
|
|
|
@@ -12732,9 +12825,6 @@ var security_setting_v2_SecuritySettingV2 = /** @class */function (_super) {
|
|
|
12732
12825
|
return SecuritySettingV2;
|
|
12733
12826
|
}(flagwind_web_["Component"]);
|
|
12734
12827
|
/* harmony default export */ var project_detail_security_setting_v2 = (security_setting_v2_SecuritySettingV2);
|
|
12735
|
-
// EXTERNAL MODULE: ./node_modules/.pnpm/core-js@3.35.0/node_modules/core-js/modules/es.array.reduce.js
|
|
12736
|
-
var es_array_reduce = __webpack_require__("8b65");
|
|
12737
|
-
|
|
12738
12828
|
// EXTERNAL MODULE: ./src/views/project-detail/interface-settings/tips-table-label/index.scss
|
|
12739
12829
|
var tips_table_label = __webpack_require__("0a2e");
|
|
12740
12830
|
|
|
@@ -13552,6 +13642,7 @@ var process_drawer_InterfaceModal = /** @class */function (_super) {
|
|
|
13552
13642
|
|
|
13553
13643
|
|
|
13554
13644
|
|
|
13645
|
+
|
|
13555
13646
|
// import SecuritySetting from "../security-setting";
|
|
13556
13647
|
|
|
13557
13648
|
|
|
@@ -13566,6 +13657,7 @@ var interface_settings_InterfaceSettings = /** @class */function (_super) {
|
|
|
13566
13657
|
_this.response = new Response();
|
|
13567
13658
|
_this.responseCache = new Map();
|
|
13568
13659
|
_this.loading = false;
|
|
13660
|
+
_this.runLoading = false;
|
|
13569
13661
|
_this.showEnvironmentModal = false;
|
|
13570
13662
|
_this.currentId = "";
|
|
13571
13663
|
_this.paramList = [];
|
|
@@ -13644,14 +13736,14 @@ var interface_settings_InterfaceSettings = /** @class */function (_super) {
|
|
|
13644
13736
|
});
|
|
13645
13737
|
};
|
|
13646
13738
|
InterfaceSettings.prototype.onRun = function () {
|
|
13647
|
-
var _a, _b, _c, _d, _e, _f;
|
|
13739
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
13648
13740
|
return __awaiter(this, void 0, void 0, function () {
|
|
13649
|
-
var formParams, requestHeaders, index, result, fileFormParams, _model, tmpFormData_1;
|
|
13741
|
+
var formParams, requestHeaders, index, result, fileFormParams, isStreamResponse, response, start_1, streamResult, error_1, _model, tmpFormData_1;
|
|
13650
13742
|
var _this = this;
|
|
13651
|
-
return __generator(this, function (
|
|
13652
|
-
switch (
|
|
13743
|
+
return __generator(this, function (_h) {
|
|
13744
|
+
switch (_h.label) {
|
|
13653
13745
|
case 0:
|
|
13654
|
-
this.
|
|
13746
|
+
this.runLoading = true;
|
|
13655
13747
|
formParams = [];
|
|
13656
13748
|
requestHeaders = [];
|
|
13657
13749
|
if (((_a = this.interfaceModel.formParams) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
@@ -13674,7 +13766,70 @@ var interface_settings_InterfaceSettings = /** @class */function (_super) {
|
|
|
13674
13766
|
fileFormParams = formParams.filter(function (item) {
|
|
13675
13767
|
return item.valueType === "FILE";
|
|
13676
13768
|
});
|
|
13677
|
-
|
|
13769
|
+
isStreamResponse = ((_d = this.interfaceModel.info) === null || _d === void 0 ? void 0 : _d.streamResponseFlag) === 1;
|
|
13770
|
+
this.loading = !isStreamResponse || !!fileFormParams.length;
|
|
13771
|
+
_h.label = 1;
|
|
13772
|
+
case 1:
|
|
13773
|
+
_h.trys.push([1,, 11, 12]);
|
|
13774
|
+
if (!(isStreamResponse && !fileFormParams.length)) return [3 /*break*/, 6];
|
|
13775
|
+
response = new Response();
|
|
13776
|
+
response.streaming = true;
|
|
13777
|
+
response.requestHeaders = requestHeaders.reduce(function (headers, item) {
|
|
13778
|
+
if (item === null || item === void 0 ? void 0 : item.name) {
|
|
13779
|
+
headers[item.name] = item.value;
|
|
13780
|
+
}
|
|
13781
|
+
return headers;
|
|
13782
|
+
}, {});
|
|
13783
|
+
this.response = response;
|
|
13784
|
+
start_1 = Date.now();
|
|
13785
|
+
_h.label = 2;
|
|
13786
|
+
case 2:
|
|
13787
|
+
_h.trys.push([2, 4,, 5]);
|
|
13788
|
+
return [4 /*yield*/, this.service.runStream(this.interfaceModel.info.id, __assign(__assign({}, this.interfaceModel), {
|
|
13789
|
+
formParams: formParams,
|
|
13790
|
+
requestHeaders: requestHeaders
|
|
13791
|
+
}), {
|
|
13792
|
+
onHeaders: function (_a) {
|
|
13793
|
+
var code = _a.code,
|
|
13794
|
+
responseHeaders = _a.responseHeaders;
|
|
13795
|
+
_this.response = __assign(__assign({}, _this.response), {
|
|
13796
|
+
code: code,
|
|
13797
|
+
responseHeaders: responseHeaders,
|
|
13798
|
+
time: Date.now() - start_1
|
|
13799
|
+
});
|
|
13800
|
+
},
|
|
13801
|
+
onChunk: function (_a) {
|
|
13802
|
+
var chunk = _a.chunk,
|
|
13803
|
+
size = _a.size;
|
|
13804
|
+
_this.response = __assign(__assign({}, _this.response), {
|
|
13805
|
+
originalContent: (_this.response.originalContent || "") + chunk,
|
|
13806
|
+
size: size,
|
|
13807
|
+
time: Date.now() - start_1
|
|
13808
|
+
});
|
|
13809
|
+
}
|
|
13810
|
+
})];
|
|
13811
|
+
case 3:
|
|
13812
|
+
streamResult = _h.sent();
|
|
13813
|
+
this.response = __assign(__assign({}, this.response), {
|
|
13814
|
+
code: streamResult.code,
|
|
13815
|
+
responseHeaders: streamResult.responseHeaders,
|
|
13816
|
+
originalContent: streamResult.originalContent,
|
|
13817
|
+
size: streamResult.size,
|
|
13818
|
+
time: Date.now() - start_1
|
|
13819
|
+
});
|
|
13820
|
+
return [3 /*break*/, 5];
|
|
13821
|
+
case 4:
|
|
13822
|
+
error_1 = _h.sent();
|
|
13823
|
+
this.response = __assign(__assign({}, this.response), {
|
|
13824
|
+
code: this.response.code || 500,
|
|
13825
|
+
errorMessage: (error_1 === null || error_1 === void 0 ? void 0 : error_1.message) || "流式请求失败",
|
|
13826
|
+
time: Date.now() - start_1
|
|
13827
|
+
});
|
|
13828
|
+
return [3 /*break*/, 5];
|
|
13829
|
+
case 5:
|
|
13830
|
+
return [3 /*break*/, 10];
|
|
13831
|
+
case 6:
|
|
13832
|
+
if (!fileFormParams.length) return [3 /*break*/, 8];
|
|
13678
13833
|
_model = __assign(__assign({}, this.interfaceModel), {
|
|
13679
13834
|
formParams: formParams,
|
|
13680
13835
|
requestHeaders: requestHeaders
|
|
@@ -13685,31 +13840,41 @@ var interface_settings_InterfaceSettings = /** @class */function (_super) {
|
|
|
13685
13840
|
});
|
|
13686
13841
|
tmpFormData_1.append("_model", JSON.stringify(_model));
|
|
13687
13842
|
return [4 /*yield*/, this.service.runWithFile(this.interfaceModel.info.id, tmpFormData_1)];
|
|
13688
|
-
case
|
|
13689
|
-
result =
|
|
13690
|
-
|
|
13691
|
-
|
|
13843
|
+
case 7:
|
|
13844
|
+
result = _h.sent();
|
|
13845
|
+
this.response = (result === null || result === void 0 ? void 0 : result.result) || new Response();
|
|
13846
|
+
if (result.hasError) {
|
|
13847
|
+
this.response.code = 400;
|
|
13848
|
+
this.response.errorMessage = result.message;
|
|
13849
|
+
}
|
|
13850
|
+
return [3 /*break*/, 10];
|
|
13851
|
+
case 8:
|
|
13692
13852
|
return [4 /*yield*/, this.service.run(this.interfaceModel.info.id, __assign(__assign({}, this.interfaceModel), {
|
|
13693
13853
|
formParams: formParams,
|
|
13694
13854
|
requestHeaders: requestHeaders
|
|
13695
13855
|
}))];
|
|
13696
|
-
case
|
|
13697
|
-
result =
|
|
13698
|
-
_g.label = 4;
|
|
13699
|
-
case 4:
|
|
13700
|
-
this.loading = false;
|
|
13856
|
+
case 9:
|
|
13857
|
+
result = _h.sent();
|
|
13701
13858
|
this.response = (result === null || result === void 0 ? void 0 : result.result) || new Response();
|
|
13702
13859
|
if (result.hasError) {
|
|
13703
13860
|
this.response.code = 400;
|
|
13704
13861
|
this.response.errorMessage = result.message;
|
|
13705
13862
|
}
|
|
13863
|
+
_h.label = 10;
|
|
13864
|
+
case 10:
|
|
13706
13865
|
this.responseCache.set(this.interfaceModel.info.id, this.response);
|
|
13707
|
-
if ((
|
|
13866
|
+
if ((_e = this.response.errorLineNumbers) === null || _e === void 0 ? void 0 : _e.length) {
|
|
13708
13867
|
this.errorLine = this.response.errorLineNumbers;
|
|
13709
13868
|
} else {
|
|
13710
13869
|
this.errorLine = null;
|
|
13711
13870
|
}
|
|
13712
|
-
this.originId = ((
|
|
13871
|
+
this.originId = ((_g = (_f = this.interfaceModel) === null || _f === void 0 ? void 0 : _f.info) === null || _g === void 0 ? void 0 : _g.id) || "";
|
|
13872
|
+
return [3 /*break*/, 12];
|
|
13873
|
+
case 11:
|
|
13874
|
+
this.loading = false;
|
|
13875
|
+
this.runLoading = false;
|
|
13876
|
+
return [7 /*endfinally*/];
|
|
13877
|
+
case 12:
|
|
13713
13878
|
return [2 /*return*/];
|
|
13714
13879
|
}
|
|
13715
13880
|
});
|
|
@@ -13754,6 +13919,10 @@ var interface_settings_InterfaceSettings = /** @class */function (_super) {
|
|
|
13754
13919
|
});
|
|
13755
13920
|
};
|
|
13756
13921
|
InterfaceSettings.prototype.interfaceModelChange = function () {
|
|
13922
|
+
var _a, _b;
|
|
13923
|
+
if (((_b = (_a = this.interfaceModel) === null || _a === void 0 ? void 0 : _a.info) === null || _b === void 0 ? void 0 : _b.streamResponseFlag) !== 1) {
|
|
13924
|
+
this.interfaceModel.info.streamResponseFlag = 0;
|
|
13925
|
+
}
|
|
13757
13926
|
this.response = this.responseCache.get(this.interfaceModel.info.id) || new Response();
|
|
13758
13927
|
};
|
|
13759
13928
|
InterfaceSettings.prototype.showImportModalChange = function (value) {
|
|
@@ -13997,7 +14166,7 @@ var interface_settings_InterfaceSettings = /** @class */function (_super) {
|
|
|
13997
14166
|
InterfaceSettings = __decorate([Object(flagwind_web_["component"])({
|
|
13998
14167
|
template: __webpack_require__("f40e"),
|
|
13999
14168
|
components: {
|
|
14000
|
-
response:
|
|
14169
|
+
response: views_project_detail_response,
|
|
14001
14170
|
params: project_detail_params_setting,
|
|
14002
14171
|
headers: project_detail_headers_setting,
|
|
14003
14172
|
// security: SecuritySetting,
|
|
@@ -15215,6 +15384,9 @@ var project_detail_ProjectDetail = /** @class */function (_super) {
|
|
|
15215
15384
|
this.showEnvironmentModal = true;
|
|
15216
15385
|
};
|
|
15217
15386
|
ProjectDetail.prototype.onRouteChange = function (route) {
|
|
15387
|
+
if (route.name !== "project-detail") {
|
|
15388
|
+
return;
|
|
15389
|
+
}
|
|
15218
15390
|
this.syncProjectFromRoute(route);
|
|
15219
15391
|
var _a = route.query,
|
|
15220
15392
|
apiId = _a.apiId,
|
|
@@ -15599,7 +15771,7 @@ module.exports = function (METHOD_NAME, argument) {
|
|
|
15599
15771
|
/***/ "d63e":
|
|
15600
15772
|
/***/ (function(module, exports) {
|
|
15601
15773
|
|
|
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"
|
|
15774
|
+
module.exports = "<article class=\"project-detail\">\r\n <header>\r\n <div class=\"environment\">\r\n <i class=\"iconfont icon-zhankai\" @click=\"onBack\"></i>\r\n <p>{{projectName}}</p>\r\n <!-- <span>环境变量:</span> -->\r\n <!-- <i-select class=\"diy-select\"></i-select> -->\r\n </div>\r\n <div class=\"btns\">\r\n <!-- <i-button type=\"primary\" ghost class=\"diy-btn-primary\" @click=\"onOpenGlobalModal\"> <i class=\"api-icon icon-setting\"></i>全局参数设置</i-button> -->\r\n <!-- <i-button type=\"success\" ghost class=\"diy-btn-success\" @click=\"onOpenCurrentModal\"><i class=\"api-icon icon-view\"></i>查看当前变量</i-button> -->\r\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>\r\n <i-button v-if=\"projectId && projectName\" type=\"primary\" class=\"diy-btn-primary\" ghost @click=\"onOpenEnvModal\"><i class=\"iconfont icon-bianliang\"></i>环境变量</i-button>\r\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>\r\n </div>\r\n </header>\r\n <!-- <main> -->\r\n <i-split v-model=\"split\" min=\"200px\" max=\"900px\">\r\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>\r\n <section slot=\"right\" class=\"interface-box\">\r\n <header class=\"interface-bar\">\r\n <swiper class=\"swiper\" :options=\"swiperOption\" @click-slide=\"onClickSlide\" @ready=\"onSwiperReadied\">\r\n <swiper-slide class=\"tag\" @click=\"onClickTag(item)\" :class=\"{'active': item.id === active.id}\" v-for=\"(item,index) in openInterfaceList\" :key=\"item.id\"\r\n ><span>{{item.name}}</span> <i-icon type=\"md-close\" @click.stop=\"onClose(index)\"></i-icon\r\n ></swiper-slide>\r\n </swiper>\r\n <!-- <div class=\"tag\" @click=\"onClickTag(item)\" :class=\"{'active': item.id === active.id}\" v-for=\"(item,index) in openInterfaceList\" :key=\"item.id\">\r\n <span>{{item.name}}</span>\r\n <i-icon type=\"md-close\" @click.stop=\"onClose(index)\"></i-icon>\r\n </div> -->\r\n </header>\r\n <u-settings ref=\"interface-settings\" :interface-model.sync=\"active\" :project-id=\"projectId\" v-if=\"active.id\" :lengthwise=\"lengthwise\" :projectTree=\"projectTree\"></u-settings>\r\n </section>\r\n </i-split>\r\n <i-spin fix v-show=\"loading\">\r\n <i class=\"spin-icon-load ivu-icon\"></i>\r\n </i-spin>\r\n <!-- </main> -->\r\n <u-global-modal :visiable.sync=\"showGlobalModal\">\r\n <footer slot=\"footer\">\r\n <i-button @click=\"showGlobalModal = false\">取消</i-button>\r\n <i-button type=\"primary\" class=\"diy-btn-primary\">确定</i-button>\r\n </footer>\r\n </u-global-modal>\r\n <u-current-modal :visiable.sync=\"showCurrentModal\"> </u-current-modal>\r\n <u-security-modal v-model=\"showSecurity\" :projectID=\"projectId\"></u-security-modal>\r\n <u-environment-modal :visiable.sync=\"showEnvironmentModal\" :projectId=\"projectId\" @on-refresh=\"onEnvironmentRefresh\"></u-environment-modal>\r\n</article>\r\n"
|
|
15603
15775
|
|
|
15604
15776
|
/***/ }),
|
|
15605
15777
|
|
|
@@ -16525,7 +16697,7 @@ module.exports = function (bitmap, value) {
|
|
|
16525
16697
|
/***/ "f40e":
|
|
16526
16698
|
/***/ (function(module, exports) {
|
|
16527
16699
|
|
|
16528
|
-
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-poptip class=\"url-poptip\" v-if=\"interfaceModel.info.url\" trigger=\"hover\" :content=\"interfaceModel.info.url\" transfer>\r\n <i-input class=\"diy-input url-input\" v-model=\"interfaceModel.info.url\"></i-input>\r\n </i-poptip>\r\n <i-input v-else 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 process-btn\" @click=\"onProcess\" 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 </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 :formData=\"formData\"\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 <i-modal class=\"diy-modal edit-import-name\" v-model=\"showImportModal\" :mask-closable=\"false\">\r\n <p slot=\"header\">编辑名称</p>\r\n <i-form ref=\"import\" :model=\"apiForm\" :rules=\"rules\">\r\n <i-form-item label=\"环境变量:\" prop=\"envName\">\r\n <i-input v-model=\"apiForm.envName\"></i-input>\r\n </i-form-item>\r\n\r\n <i-form-item label=\"授权:\" prop=\"authName\">\r\n <i-input v-model=\"apiForm.authName\"></i-input>\r\n </i-form-item>\r\n </i-form>\r\n <div class=\"handle-btn\" slot=\"footer\">\r\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click.stop=\"saveImportData(importObj)\">确定</i-button>\r\n <i-button class=\"diy-btn-text\" @click.stop=\"cancleModify\">取消</i-button>\r\n </div>\r\n </i-modal>\r\n <u-process-drawer v-model=\"showDrawer\" :projectTree=\"projectTree\" :info=\"interfaceModel.info\" @on-save=\"onProcessSave\"></u-process-drawer>\r\n</article>\r\n"
|
|
16700
|
+
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-poptip class=\"url-poptip\" v-if=\"interfaceModel.info.url\" trigger=\"hover\" :content=\"interfaceModel.info.url\" transfer>\r\n <i-input class=\"diy-input url-input\" v-model=\"interfaceModel.info.url\"></i-input>\r\n </i-poptip>\r\n <i-input v-else class=\"diy-input url-input\" v-model=\"interfaceModel.info.url\"></i-input>\r\n <div class=\"stream-switch\">\r\n <span>流式响应</span>\r\n <i-switch v-model=\"interfaceModel.info.streamResponseFlag\" :true-value=\"1\" :false-value=\"0\"></i-switch>\r\n </div>\r\n\r\n <i-button type=\"primary\" class=\"diy-btn-primary submit-btn\" :loading=\"runLoading\" @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 process-btn\" @click=\"onProcess\" 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 </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 :formData=\"formData\"\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 <i-modal class=\"diy-modal edit-import-name\" v-model=\"showImportModal\" :mask-closable=\"false\">\r\n <p slot=\"header\">编辑名称</p>\r\n <i-form ref=\"import\" :model=\"apiForm\" :rules=\"rules\">\r\n <i-form-item label=\"环境变量:\" prop=\"envName\">\r\n <i-input v-model=\"apiForm.envName\"></i-input>\r\n </i-form-item>\r\n\r\n <i-form-item label=\"授权:\" prop=\"authName\">\r\n <i-input v-model=\"apiForm.authName\"></i-input>\r\n </i-form-item>\r\n </i-form>\r\n <div class=\"handle-btn\" slot=\"footer\">\r\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click.stop=\"saveImportData(importObj)\">确定</i-button>\r\n <i-button class=\"diy-btn-text\" @click.stop=\"cancleModify\">取消</i-button>\r\n </div>\r\n </i-modal>\r\n <u-process-drawer v-model=\"showDrawer\" :projectTree=\"projectTree\" :info=\"interfaceModel.info\" @on-save=\"onProcessSave\"></u-process-drawer>\r\n</article>\r\n"
|
|
16529
16701
|
|
|
16530
16702
|
/***/ }),
|
|
16531
16703
|
|