@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.umd.js
CHANGED
|
@@ -9987,10 +9987,19 @@ var project_comment = __webpack_require__("65e5");
|
|
|
9987
9987
|
var dist = __webpack_require__("7af4");
|
|
9988
9988
|
var dist_default = /*#__PURE__*/__webpack_require__.n(dist);
|
|
9989
9989
|
|
|
9990
|
+
// EXTERNAL MODULE: ./node_modules/.pnpm/core-js@3.35.0/node_modules/core-js/modules/es.error.cause.js
|
|
9991
|
+
var es_error_cause = __webpack_require__("0ddb");
|
|
9992
|
+
|
|
9990
9993
|
// CONCATENATED MODULE: ./src/views/project-detail/service.ts
|
|
9991
9994
|
|
|
9992
9995
|
|
|
9993
9996
|
|
|
9997
|
+
|
|
9998
|
+
|
|
9999
|
+
|
|
10000
|
+
|
|
10001
|
+
|
|
10002
|
+
|
|
9994
10003
|
var service_ApiService = /** @class */function (_super) {
|
|
9995
10004
|
__extends(ApiService, _super);
|
|
9996
10005
|
function ApiService() {
|
|
@@ -10042,6 +10051,90 @@ var service_ApiService = /** @class */function (_super) {
|
|
|
10042
10051
|
ApiService.prototype.runWithFile = function (apiId, data) {
|
|
10043
10052
|
return this._post("/unity/api/run/".concat(apiId, "/exec"), data);
|
|
10044
10053
|
};
|
|
10054
|
+
ApiService.prototype.runStream = function (apiId, apiInfo, handlers) {
|
|
10055
|
+
var _a, _b;
|
|
10056
|
+
if (handlers === void 0) {
|
|
10057
|
+
handlers = {};
|
|
10058
|
+
}
|
|
10059
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
10060
|
+
var config, queryString, requestUrl, response, responseHeaders, reader, decoder, originalContent, size, _c, done, value, chunk;
|
|
10061
|
+
return __generator(this, function (_d) {
|
|
10062
|
+
switch (_d.label) {
|
|
10063
|
+
case 0:
|
|
10064
|
+
config = {
|
|
10065
|
+
method: "POST",
|
|
10066
|
+
baseURL: window.location.origin,
|
|
10067
|
+
url: this.url("/unity/api/run/".concat(apiId, "/web")),
|
|
10068
|
+
data: apiInfo,
|
|
10069
|
+
headers: __assign({
|
|
10070
|
+
"Content-Type": "application/json"
|
|
10071
|
+
}, getToken().headers),
|
|
10072
|
+
params: {}
|
|
10073
|
+
};
|
|
10074
|
+
signature.signatureConfig(config);
|
|
10075
|
+
queryString = new URLSearchParams(config.params).toString();
|
|
10076
|
+
requestUrl = queryString ? "".concat(config.url, "?").concat(queryString) : "".concat(config.url);
|
|
10077
|
+
return [4 /*yield*/, fetch(requestUrl, {
|
|
10078
|
+
method: "POST",
|
|
10079
|
+
headers: config.headers,
|
|
10080
|
+
body: JSON.stringify(apiInfo)
|
|
10081
|
+
})];
|
|
10082
|
+
case 1:
|
|
10083
|
+
response = _d.sent();
|
|
10084
|
+
responseHeaders = {};
|
|
10085
|
+
response.headers.forEach(function (value, key) {
|
|
10086
|
+
responseHeaders[key] = value;
|
|
10087
|
+
});
|
|
10088
|
+
(_a = handlers.onHeaders) === null || _a === void 0 ? void 0 : _a.call(handlers, {
|
|
10089
|
+
code: response.status,
|
|
10090
|
+
responseHeaders: responseHeaders
|
|
10091
|
+
});
|
|
10092
|
+
if (!response.ok) {
|
|
10093
|
+
throw new Error("\u8BF7\u6C42\u5931\u8D25(".concat(response.status, ")"));
|
|
10094
|
+
}
|
|
10095
|
+
if (!response.body) {
|
|
10096
|
+
return [2 /*return*/, {
|
|
10097
|
+
code: response.status,
|
|
10098
|
+
responseHeaders: responseHeaders,
|
|
10099
|
+
originalContent: "",
|
|
10100
|
+
size: 0
|
|
10101
|
+
}];
|
|
10102
|
+
}
|
|
10103
|
+
reader = response.body.getReader();
|
|
10104
|
+
decoder = new TextDecoder("utf-8");
|
|
10105
|
+
originalContent = "";
|
|
10106
|
+
size = 0;
|
|
10107
|
+
_d.label = 2;
|
|
10108
|
+
case 2:
|
|
10109
|
+
if (false) {}
|
|
10110
|
+
return [4 /*yield*/, reader.read()];
|
|
10111
|
+
case 3:
|
|
10112
|
+
_c = _d.sent(), done = _c.done, value = _c.value;
|
|
10113
|
+
if (done) {
|
|
10114
|
+
originalContent += decoder.decode();
|
|
10115
|
+
return [3 /*break*/, 4];
|
|
10116
|
+
}
|
|
10117
|
+
chunk = decoder.decode(value, {
|
|
10118
|
+
stream: true
|
|
10119
|
+
});
|
|
10120
|
+
originalContent += chunk;
|
|
10121
|
+
size += (value === null || value === void 0 ? void 0 : value.length) || 0;
|
|
10122
|
+
(_b = handlers.onChunk) === null || _b === void 0 ? void 0 : _b.call(handlers, {
|
|
10123
|
+
chunk: chunk,
|
|
10124
|
+
size: size
|
|
10125
|
+
});
|
|
10126
|
+
return [3 /*break*/, 2];
|
|
10127
|
+
case 4:
|
|
10128
|
+
return [2 /*return*/, {
|
|
10129
|
+
code: response.status,
|
|
10130
|
+
responseHeaders: responseHeaders,
|
|
10131
|
+
originalContent: originalContent,
|
|
10132
|
+
size: size
|
|
10133
|
+
}];
|
|
10134
|
+
}
|
|
10135
|
+
});
|
|
10136
|
+
});
|
|
10137
|
+
};
|
|
10045
10138
|
ApiService.prototype.saveApiInfo = function (apiInfo) {
|
|
10046
10139
|
return this._post("/unity/api/info/save/whole", apiInfo);
|
|
10047
10140
|
};
|
|
@@ -10791,8 +10884,8 @@ var environment_variable_modal_EnvironmentVariableModal = /** @class */function
|
|
|
10791
10884
|
// EXTERNAL MODULE: ./src/views/project-detail/index.scss
|
|
10792
10885
|
var project_detail = __webpack_require__("fe54");
|
|
10793
10886
|
|
|
10794
|
-
// EXTERNAL MODULE: ./node_modules/.pnpm/core-js@3.35.0/node_modules/core-js/modules/es.
|
|
10795
|
-
var
|
|
10887
|
+
// EXTERNAL MODULE: ./node_modules/.pnpm/core-js@3.35.0/node_modules/core-js/modules/es.array.reduce.js
|
|
10888
|
+
var es_array_reduce = __webpack_require__("8b65");
|
|
10796
10889
|
|
|
10797
10890
|
// CONCATENATED MODULE: ./src/views/project-detail/interface-settings/model.ts
|
|
10798
10891
|
|
|
@@ -11201,7 +11294,7 @@ var code_editor_CodeEditor = /** @class */function (_super) {
|
|
|
11201
11294
|
}(flagwind_web_umd_js_["Component"]);
|
|
11202
11295
|
/* harmony default export */ var components_code_editor = (code_editor_CodeEditor);
|
|
11203
11296
|
// EXTERNAL MODULE: ./src/views/project-detail/response/index.scss
|
|
11204
|
-
var
|
|
11297
|
+
var project_detail_response = __webpack_require__("aba0");
|
|
11205
11298
|
|
|
11206
11299
|
// CONCATENATED MODULE: ./src/views/project-detail/response/index.ts
|
|
11207
11300
|
|
|
@@ -11393,7 +11486,7 @@ var response_ResponsePanel = /** @class */function (_super) {
|
|
|
11393
11486
|
})], ResponsePanel);
|
|
11394
11487
|
return ResponsePanel;
|
|
11395
11488
|
}(base_editor_setting);
|
|
11396
|
-
/* harmony default export */ var
|
|
11489
|
+
/* harmony default export */ var views_project_detail_response = (response_ResponsePanel);
|
|
11397
11490
|
// EXTERNAL MODULE: ./src/views/project-detail/after-execution-transfer/index.scss
|
|
11398
11491
|
var after_execution_transfer = __webpack_require__("8a77");
|
|
11399
11492
|
|
|
@@ -12741,9 +12834,6 @@ var security_setting_v2_SecuritySettingV2 = /** @class */function (_super) {
|
|
|
12741
12834
|
return SecuritySettingV2;
|
|
12742
12835
|
}(flagwind_web_["Component"]);
|
|
12743
12836
|
/* harmony default export */ var project_detail_security_setting_v2 = (security_setting_v2_SecuritySettingV2);
|
|
12744
|
-
// EXTERNAL MODULE: ./node_modules/.pnpm/core-js@3.35.0/node_modules/core-js/modules/es.array.reduce.js
|
|
12745
|
-
var es_array_reduce = __webpack_require__("8b65");
|
|
12746
|
-
|
|
12747
12837
|
// EXTERNAL MODULE: ./src/views/project-detail/interface-settings/tips-table-label/index.scss
|
|
12748
12838
|
var tips_table_label = __webpack_require__("0a2e");
|
|
12749
12839
|
|
|
@@ -13561,6 +13651,7 @@ var process_drawer_InterfaceModal = /** @class */function (_super) {
|
|
|
13561
13651
|
|
|
13562
13652
|
|
|
13563
13653
|
|
|
13654
|
+
|
|
13564
13655
|
// import SecuritySetting from "../security-setting";
|
|
13565
13656
|
|
|
13566
13657
|
|
|
@@ -13575,6 +13666,7 @@ var interface_settings_InterfaceSettings = /** @class */function (_super) {
|
|
|
13575
13666
|
_this.response = new Response();
|
|
13576
13667
|
_this.responseCache = new Map();
|
|
13577
13668
|
_this.loading = false;
|
|
13669
|
+
_this.runLoading = false;
|
|
13578
13670
|
_this.showEnvironmentModal = false;
|
|
13579
13671
|
_this.currentId = "";
|
|
13580
13672
|
_this.paramList = [];
|
|
@@ -13653,14 +13745,14 @@ var interface_settings_InterfaceSettings = /** @class */function (_super) {
|
|
|
13653
13745
|
});
|
|
13654
13746
|
};
|
|
13655
13747
|
InterfaceSettings.prototype.onRun = function () {
|
|
13656
|
-
var _a, _b, _c, _d, _e, _f;
|
|
13748
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
13657
13749
|
return __awaiter(this, void 0, void 0, function () {
|
|
13658
|
-
var formParams, requestHeaders, index, result, fileFormParams, _model, tmpFormData_1;
|
|
13750
|
+
var formParams, requestHeaders, index, result, fileFormParams, isStreamResponse, response, start_1, streamResult, error_1, _model, tmpFormData_1;
|
|
13659
13751
|
var _this = this;
|
|
13660
|
-
return __generator(this, function (
|
|
13661
|
-
switch (
|
|
13752
|
+
return __generator(this, function (_h) {
|
|
13753
|
+
switch (_h.label) {
|
|
13662
13754
|
case 0:
|
|
13663
|
-
this.
|
|
13755
|
+
this.runLoading = true;
|
|
13664
13756
|
formParams = [];
|
|
13665
13757
|
requestHeaders = [];
|
|
13666
13758
|
if (((_a = this.interfaceModel.formParams) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
@@ -13683,7 +13775,70 @@ var interface_settings_InterfaceSettings = /** @class */function (_super) {
|
|
|
13683
13775
|
fileFormParams = formParams.filter(function (item) {
|
|
13684
13776
|
return item.valueType === "FILE";
|
|
13685
13777
|
});
|
|
13686
|
-
|
|
13778
|
+
isStreamResponse = ((_d = this.interfaceModel.info) === null || _d === void 0 ? void 0 : _d.streamResponseFlag) === 1;
|
|
13779
|
+
this.loading = !isStreamResponse || !!fileFormParams.length;
|
|
13780
|
+
_h.label = 1;
|
|
13781
|
+
case 1:
|
|
13782
|
+
_h.trys.push([1,, 11, 12]);
|
|
13783
|
+
if (!(isStreamResponse && !fileFormParams.length)) return [3 /*break*/, 6];
|
|
13784
|
+
response = new Response();
|
|
13785
|
+
response.streaming = true;
|
|
13786
|
+
response.requestHeaders = requestHeaders.reduce(function (headers, item) {
|
|
13787
|
+
if (item === null || item === void 0 ? void 0 : item.name) {
|
|
13788
|
+
headers[item.name] = item.value;
|
|
13789
|
+
}
|
|
13790
|
+
return headers;
|
|
13791
|
+
}, {});
|
|
13792
|
+
this.response = response;
|
|
13793
|
+
start_1 = Date.now();
|
|
13794
|
+
_h.label = 2;
|
|
13795
|
+
case 2:
|
|
13796
|
+
_h.trys.push([2, 4,, 5]);
|
|
13797
|
+
return [4 /*yield*/, this.service.runStream(this.interfaceModel.info.id, __assign(__assign({}, this.interfaceModel), {
|
|
13798
|
+
formParams: formParams,
|
|
13799
|
+
requestHeaders: requestHeaders
|
|
13800
|
+
}), {
|
|
13801
|
+
onHeaders: function (_a) {
|
|
13802
|
+
var code = _a.code,
|
|
13803
|
+
responseHeaders = _a.responseHeaders;
|
|
13804
|
+
_this.response = __assign(__assign({}, _this.response), {
|
|
13805
|
+
code: code,
|
|
13806
|
+
responseHeaders: responseHeaders,
|
|
13807
|
+
time: Date.now() - start_1
|
|
13808
|
+
});
|
|
13809
|
+
},
|
|
13810
|
+
onChunk: function (_a) {
|
|
13811
|
+
var chunk = _a.chunk,
|
|
13812
|
+
size = _a.size;
|
|
13813
|
+
_this.response = __assign(__assign({}, _this.response), {
|
|
13814
|
+
originalContent: (_this.response.originalContent || "") + chunk,
|
|
13815
|
+
size: size,
|
|
13816
|
+
time: Date.now() - start_1
|
|
13817
|
+
});
|
|
13818
|
+
}
|
|
13819
|
+
})];
|
|
13820
|
+
case 3:
|
|
13821
|
+
streamResult = _h.sent();
|
|
13822
|
+
this.response = __assign(__assign({}, this.response), {
|
|
13823
|
+
code: streamResult.code,
|
|
13824
|
+
responseHeaders: streamResult.responseHeaders,
|
|
13825
|
+
originalContent: streamResult.originalContent,
|
|
13826
|
+
size: streamResult.size,
|
|
13827
|
+
time: Date.now() - start_1
|
|
13828
|
+
});
|
|
13829
|
+
return [3 /*break*/, 5];
|
|
13830
|
+
case 4:
|
|
13831
|
+
error_1 = _h.sent();
|
|
13832
|
+
this.response = __assign(__assign({}, this.response), {
|
|
13833
|
+
code: this.response.code || 500,
|
|
13834
|
+
errorMessage: (error_1 === null || error_1 === void 0 ? void 0 : error_1.message) || "流式请求失败",
|
|
13835
|
+
time: Date.now() - start_1
|
|
13836
|
+
});
|
|
13837
|
+
return [3 /*break*/, 5];
|
|
13838
|
+
case 5:
|
|
13839
|
+
return [3 /*break*/, 10];
|
|
13840
|
+
case 6:
|
|
13841
|
+
if (!fileFormParams.length) return [3 /*break*/, 8];
|
|
13687
13842
|
_model = __assign(__assign({}, this.interfaceModel), {
|
|
13688
13843
|
formParams: formParams,
|
|
13689
13844
|
requestHeaders: requestHeaders
|
|
@@ -13694,31 +13849,41 @@ var interface_settings_InterfaceSettings = /** @class */function (_super) {
|
|
|
13694
13849
|
});
|
|
13695
13850
|
tmpFormData_1.append("_model", JSON.stringify(_model));
|
|
13696
13851
|
return [4 /*yield*/, this.service.runWithFile(this.interfaceModel.info.id, tmpFormData_1)];
|
|
13697
|
-
case
|
|
13698
|
-
result =
|
|
13699
|
-
|
|
13700
|
-
|
|
13852
|
+
case 7:
|
|
13853
|
+
result = _h.sent();
|
|
13854
|
+
this.response = (result === null || result === void 0 ? void 0 : result.result) || new Response();
|
|
13855
|
+
if (result.hasError) {
|
|
13856
|
+
this.response.code = 400;
|
|
13857
|
+
this.response.errorMessage = result.message;
|
|
13858
|
+
}
|
|
13859
|
+
return [3 /*break*/, 10];
|
|
13860
|
+
case 8:
|
|
13701
13861
|
return [4 /*yield*/, this.service.run(this.interfaceModel.info.id, __assign(__assign({}, this.interfaceModel), {
|
|
13702
13862
|
formParams: formParams,
|
|
13703
13863
|
requestHeaders: requestHeaders
|
|
13704
13864
|
}))];
|
|
13705
|
-
case
|
|
13706
|
-
result =
|
|
13707
|
-
_g.label = 4;
|
|
13708
|
-
case 4:
|
|
13709
|
-
this.loading = false;
|
|
13865
|
+
case 9:
|
|
13866
|
+
result = _h.sent();
|
|
13710
13867
|
this.response = (result === null || result === void 0 ? void 0 : result.result) || new Response();
|
|
13711
13868
|
if (result.hasError) {
|
|
13712
13869
|
this.response.code = 400;
|
|
13713
13870
|
this.response.errorMessage = result.message;
|
|
13714
13871
|
}
|
|
13872
|
+
_h.label = 10;
|
|
13873
|
+
case 10:
|
|
13715
13874
|
this.responseCache.set(this.interfaceModel.info.id, this.response);
|
|
13716
|
-
if ((
|
|
13875
|
+
if ((_e = this.response.errorLineNumbers) === null || _e === void 0 ? void 0 : _e.length) {
|
|
13717
13876
|
this.errorLine = this.response.errorLineNumbers;
|
|
13718
13877
|
} else {
|
|
13719
13878
|
this.errorLine = null;
|
|
13720
13879
|
}
|
|
13721
|
-
this.originId = ((
|
|
13880
|
+
this.originId = ((_g = (_f = this.interfaceModel) === null || _f === void 0 ? void 0 : _f.info) === null || _g === void 0 ? void 0 : _g.id) || "";
|
|
13881
|
+
return [3 /*break*/, 12];
|
|
13882
|
+
case 11:
|
|
13883
|
+
this.loading = false;
|
|
13884
|
+
this.runLoading = false;
|
|
13885
|
+
return [7 /*endfinally*/];
|
|
13886
|
+
case 12:
|
|
13722
13887
|
return [2 /*return*/];
|
|
13723
13888
|
}
|
|
13724
13889
|
});
|
|
@@ -13763,6 +13928,10 @@ var interface_settings_InterfaceSettings = /** @class */function (_super) {
|
|
|
13763
13928
|
});
|
|
13764
13929
|
};
|
|
13765
13930
|
InterfaceSettings.prototype.interfaceModelChange = function () {
|
|
13931
|
+
var _a, _b;
|
|
13932
|
+
if (((_b = (_a = this.interfaceModel) === null || _a === void 0 ? void 0 : _a.info) === null || _b === void 0 ? void 0 : _b.streamResponseFlag) !== 1) {
|
|
13933
|
+
this.interfaceModel.info.streamResponseFlag = 0;
|
|
13934
|
+
}
|
|
13766
13935
|
this.response = this.responseCache.get(this.interfaceModel.info.id) || new Response();
|
|
13767
13936
|
};
|
|
13768
13937
|
InterfaceSettings.prototype.showImportModalChange = function (value) {
|
|
@@ -14006,7 +14175,7 @@ var interface_settings_InterfaceSettings = /** @class */function (_super) {
|
|
|
14006
14175
|
InterfaceSettings = __decorate([Object(flagwind_web_["component"])({
|
|
14007
14176
|
template: __webpack_require__("f40e"),
|
|
14008
14177
|
components: {
|
|
14009
|
-
response:
|
|
14178
|
+
response: views_project_detail_response,
|
|
14010
14179
|
params: project_detail_params_setting,
|
|
14011
14180
|
headers: project_detail_headers_setting,
|
|
14012
14181
|
// security: SecuritySetting,
|
|
@@ -15224,6 +15393,9 @@ var project_detail_ProjectDetail = /** @class */function (_super) {
|
|
|
15224
15393
|
this.showEnvironmentModal = true;
|
|
15225
15394
|
};
|
|
15226
15395
|
ProjectDetail.prototype.onRouteChange = function (route) {
|
|
15396
|
+
if (route.name !== "project-detail") {
|
|
15397
|
+
return;
|
|
15398
|
+
}
|
|
15227
15399
|
this.syncProjectFromRoute(route);
|
|
15228
15400
|
var _a = route.query,
|
|
15229
15401
|
apiId = _a.apiId,
|
|
@@ -15608,7 +15780,7 @@ module.exports = function (METHOD_NAME, argument) {
|
|
|
15608
15780
|
/***/ "d63e":
|
|
15609
15781
|
/***/ (function(module, exports) {
|
|
15610
15782
|
|
|
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"
|
|
15783
|
+
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"
|
|
15612
15784
|
|
|
15613
15785
|
/***/ }),
|
|
15614
15786
|
|
|
@@ -16534,7 +16706,7 @@ module.exports = function (bitmap, value) {
|
|
|
16534
16706
|
/***/ "f40e":
|
|
16535
16707
|
/***/ (function(module, exports) {
|
|
16536
16708
|
|
|
16537
|
-
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"
|
|
16709
|
+
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"
|
|
16538
16710
|
|
|
16539
16711
|
/***/ }),
|
|
16540
16712
|
|