@egova/egova-api 1.0.224 → 1.0.227
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
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=\"!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"
|
|
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 <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</article>\r\n"
|
|
48847
48847
|
|
|
48848
48848
|
/***/ }),
|
|
48849
48849
|
|
|
@@ -53026,7 +53026,7 @@ function (_super) {
|
|
|
53026
53026
|
title: "接口文档",
|
|
53027
53027
|
align: "left",
|
|
53028
53028
|
slot: "doc",
|
|
53029
|
-
width:
|
|
53029
|
+
width: 110
|
|
53030
53030
|
}, {
|
|
53031
53031
|
title: "操作",
|
|
53032
53032
|
align: "left",
|
|
@@ -54066,7 +54066,7 @@ function (_super) {
|
|
|
54066
54066
|
title: "接口文档",
|
|
54067
54067
|
align: "left",
|
|
54068
54068
|
slot: "doc",
|
|
54069
|
-
width:
|
|
54069
|
+
width: 110
|
|
54070
54070
|
}]; // 查看文档
|
|
54071
54071
|
|
|
54072
54072
|
_this.doc = "";
|
|
@@ -56293,7 +56293,6 @@ var request_parameter_list = __webpack_require__("9e10");
|
|
|
56293
56293
|
|
|
56294
56294
|
|
|
56295
56295
|
|
|
56296
|
-
|
|
56297
56296
|
|
|
56298
56297
|
var request_parameter_list_extends = undefined && undefined.__extends || function () {
|
|
56299
56298
|
var _extendStatics = function extendStatics(d, b) {
|
|
@@ -56323,22 +56322,6 @@ var request_parameter_list_extends = undefined && undefined.__extends || functio
|
|
|
56323
56322
|
};
|
|
56324
56323
|
}();
|
|
56325
56324
|
|
|
56326
|
-
var request_parameter_list_assign = undefined && undefined.__assign || function () {
|
|
56327
|
-
request_parameter_list_assign = Object.assign || function (t) {
|
|
56328
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
56329
|
-
s = arguments[i];
|
|
56330
|
-
|
|
56331
|
-
for (var p in s) {
|
|
56332
|
-
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
56333
|
-
}
|
|
56334
|
-
}
|
|
56335
|
-
|
|
56336
|
-
return t;
|
|
56337
|
-
};
|
|
56338
|
-
|
|
56339
|
-
return request_parameter_list_assign.apply(this, arguments);
|
|
56340
|
-
};
|
|
56341
|
-
|
|
56342
56325
|
var request_parameter_list_decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
56343
56326
|
var c = arguments.length,
|
|
56344
56327
|
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
@@ -56571,9 +56554,8 @@ function (_super) {
|
|
|
56571
56554
|
};
|
|
56572
56555
|
|
|
56573
56556
|
RequestParameterList.prototype.onCancel = function (index) {
|
|
56574
|
-
this.data.splice(index, 1,
|
|
56575
|
-
|
|
56576
|
-
}));
|
|
56557
|
+
// this.data.splice(index, 1, { ...this.data[index], isEdit: false });
|
|
56558
|
+
this.data.splice(index, 1);
|
|
56577
56559
|
};
|
|
56578
56560
|
|
|
56579
56561
|
RequestParameterList.prototype.onDelete = function (row, index) {
|
|
@@ -58988,7 +58970,11 @@ function (_super) {
|
|
|
58988
58970
|
};
|
|
58989
58971
|
|
|
58990
58972
|
ApiService.prototype.onImportAvr = function (data) {
|
|
58991
|
-
return this._post("/unity/api/info/import-
|
|
58973
|
+
return this._post("/unity/api/info/import-model", data);
|
|
58974
|
+
};
|
|
58975
|
+
|
|
58976
|
+
ApiService.prototype.onValidateImport = function (data) {
|
|
58977
|
+
return this._post("/unity/api/info/check-name", data);
|
|
58992
58978
|
};
|
|
58993
58979
|
|
|
58994
58980
|
var _a, _b;
|
|
@@ -59109,6 +59095,11 @@ function (_super) {
|
|
|
59109
59095
|
showErrorMsg: true
|
|
59110
59096
|
}), project_detail_service_metadata("design:type", Function), project_detail_service_metadata("design:paramtypes", [Object]), project_detail_service_metadata("design:returntype", void 0)], ApiService.prototype, "onImportAvr", null);
|
|
59111
59097
|
|
|
59098
|
+
project_detail_service_decorate([serviceHandler("query", {
|
|
59099
|
+
title: "单接口详情导入",
|
|
59100
|
+
showErrorMsg: true
|
|
59101
|
+
}), project_detail_service_metadata("design:type", Function), project_detail_service_metadata("design:paramtypes", [Object]), project_detail_service_metadata("design:returntype", void 0)], ApiService.prototype, "onValidateImport", null);
|
|
59102
|
+
|
|
59112
59103
|
return ApiService;
|
|
59113
59104
|
}(common_service);
|
|
59114
59105
|
|
|
@@ -64243,6 +64234,14 @@ function (_super) {
|
|
|
64243
64234
|
_this.errorLine = null;
|
|
64244
64235
|
_this.originId = "";
|
|
64245
64236
|
_this.scriptView = false;
|
|
64237
|
+
_this.apiForm = {
|
|
64238
|
+
envName: null,
|
|
64239
|
+
authName: null
|
|
64240
|
+
};
|
|
64241
|
+
_this.showImportModal = false; // 导入校验名称弹窗
|
|
64242
|
+
|
|
64243
|
+
_this.importObj = {}; // 解析的导入文件数据
|
|
64244
|
+
|
|
64246
64245
|
_this.typeList = [{
|
|
64247
64246
|
value: "GET",
|
|
64248
64247
|
text: "GET"
|
|
@@ -64279,6 +64278,18 @@ function (_super) {
|
|
|
64279
64278
|
title: "后置脚本",
|
|
64280
64279
|
name: "after-execution-script"
|
|
64281
64280
|
}];
|
|
64281
|
+
_this.rules = {
|
|
64282
|
+
envName: [{
|
|
64283
|
+
required: false,
|
|
64284
|
+
validator: _this.validateEnvName,
|
|
64285
|
+
trigger: "blur"
|
|
64286
|
+
}],
|
|
64287
|
+
authName: [{
|
|
64288
|
+
required: false,
|
|
64289
|
+
validator: _this.validateAuthName,
|
|
64290
|
+
trigger: "blur"
|
|
64291
|
+
}]
|
|
64292
|
+
};
|
|
64282
64293
|
_this.currentRequestSettingType = _this.requertSettingTypeList[0];
|
|
64283
64294
|
return _this;
|
|
64284
64295
|
}
|
|
@@ -64393,6 +64404,12 @@ function (_super) {
|
|
|
64393
64404
|
this.response = this.responseCache.get(this.interfaceModel.info.id) || new Response();
|
|
64394
64405
|
};
|
|
64395
64406
|
|
|
64407
|
+
InterfaceSettings.prototype.showImportModalChange = function (value) {
|
|
64408
|
+
if (!value) {
|
|
64409
|
+
this.$refs.import.resetFields();
|
|
64410
|
+
}
|
|
64411
|
+
};
|
|
64412
|
+
|
|
64396
64413
|
InterfaceSettings.prototype.onImport = function (file) {
|
|
64397
64414
|
return interface_settings_awaiter(this, void 0, void 0, function () {
|
|
64398
64415
|
var reader;
|
|
@@ -64405,69 +64422,37 @@ function (_super) {
|
|
|
64405
64422
|
|
|
64406
64423
|
reader.onload = function (evt) {
|
|
64407
64424
|
return interface_settings_awaiter(_this, void 0, void 0, function () {
|
|
64408
|
-
var fileString, obj
|
|
64425
|
+
var fileString, obj;
|
|
64409
64426
|
|
|
64410
64427
|
var _a, _b, _c, _d, _e, _f;
|
|
64411
64428
|
|
|
64412
64429
|
return interface_settings_generator(this, function (_g) {
|
|
64413
|
-
|
|
64414
|
-
|
|
64415
|
-
fileString = evt.target.result;
|
|
64416
|
-
obj = null;
|
|
64417
|
-
|
|
64418
|
-
try {
|
|
64419
|
-
obj = JSON.parse(fileString);
|
|
64420
|
-
} catch (error) {
|
|
64421
|
-
this.$message.error("JSON格式有误");
|
|
64422
|
-
return [2
|
|
64423
|
-
/*return*/
|
|
64424
|
-
, false];
|
|
64425
|
-
}
|
|
64430
|
+
fileString = evt.target.result;
|
|
64431
|
+
obj = null;
|
|
64426
64432
|
|
|
64427
|
-
|
|
64428
|
-
|
|
64429
|
-
|
|
64430
|
-
|
|
64431
|
-
|
|
64432
|
-
|
|
64433
|
-
|
|
64434
|
-
|
|
64435
|
-
|
|
64436
|
-
case 1:
|
|
64437
|
-
res = _g.sent();
|
|
64438
|
-
|
|
64439
|
-
if (!(res === null || res === void 0 ? void 0 : res.hasError)) {
|
|
64440
|
-
this.getEnvironmentParamList();
|
|
64441
|
-
obj.environmentParam = ((_a = res === null || res === void 0 ? void 0 : res.result) === null || _a === void 0 ? void 0 : _a.environmentParam) || null;
|
|
64442
|
-
obj.authentication = ((_b = res === null || res === void 0 ? void 0 : res.result) === null || _b === void 0 ? void 0 : _b.authentication) || null;
|
|
64443
|
-
obj.info.envId = ((_d = (_c = res === null || res === void 0 ? void 0 : res.result) === null || _c === void 0 ? void 0 : _c.environmentParam) === null || _d === void 0 ? void 0 : _d.id) || null;
|
|
64444
|
-
obj.info.authId = ((_f = (_e = res === null || res === void 0 ? void 0 : res.result) === null || _e === void 0 ? void 0 : _e.authentication) === null || _f === void 0 ? void 0 : _f.id) || null;
|
|
64445
|
-
} else {
|
|
64446
|
-
return [2
|
|
64447
|
-
/*return*/
|
|
64448
|
-
];
|
|
64449
|
-
}
|
|
64433
|
+
try {
|
|
64434
|
+
obj = JSON.parse(fileString);
|
|
64435
|
+
this.importObj = obj;
|
|
64436
|
+
} catch (error) {
|
|
64437
|
+
this.$message.error("JSON格式有误");
|
|
64438
|
+
return [2
|
|
64439
|
+
/*return*/
|
|
64440
|
+
, false];
|
|
64441
|
+
} // 当授权或环境变量都不存在时则直接执行保存事件
|
|
64450
64442
|
|
|
64451
|
-
|
|
64452
|
-
|
|
64453
|
-
|
|
64454
|
-
|
|
64455
|
-
|
|
64456
|
-
|
|
64457
|
-
|
|
64458
|
-
|
|
64459
|
-
obj === null || obj === void 0 ? void 0 : obj[key].forEach(function (f) {
|
|
64460
|
-
f.apiId = apiId;
|
|
64461
|
-
});
|
|
64462
|
-
});
|
|
64463
|
-
obj === null || obj === void 0 ? void 0 : obj.requestHeaders.forEach(function (f) {
|
|
64464
|
-
f.belongId = apiId;
|
|
64465
|
-
});
|
|
64466
|
-
this.$emit("update:interfaceModel", obj);
|
|
64467
|
-
return [2
|
|
64468
|
-
/*return*/
|
|
64469
|
-
];
|
|
64443
|
+
|
|
64444
|
+
if (!((_a = obj === null || obj === void 0 ? void 0 : obj.authentication) === null || _a === void 0 ? void 0 : _a.name) && !((_b = obj === null || obj === void 0 ? void 0 : obj.environmentParam) === null || _b === void 0 ? void 0 : _b.name)) {
|
|
64445
|
+
this.saveImportData(obj);
|
|
64446
|
+
} else {
|
|
64447
|
+
// 当授权或环境变量只要一个不为空则回显值且打开名称修改弹窗
|
|
64448
|
+
this.apiForm.envName = ((_c = obj === null || obj === void 0 ? void 0 : obj.environmentParam) === null || _c === void 0 ? void 0 : _c.name) ? (_d = obj === null || obj === void 0 ? void 0 : obj.environmentParam) === null || _d === void 0 ? void 0 : _d.name : null;
|
|
64449
|
+
this.apiForm.authName = ((_e = obj === null || obj === void 0 ? void 0 : obj.authentication) === null || _e === void 0 ? void 0 : _e.name) ? (_f = obj === null || obj === void 0 ? void 0 : obj.authentication) === null || _f === void 0 ? void 0 : _f.name : null;
|
|
64450
|
+
this.showImportModal = true;
|
|
64470
64451
|
}
|
|
64452
|
+
|
|
64453
|
+
return [2
|
|
64454
|
+
/*return*/
|
|
64455
|
+
];
|
|
64471
64456
|
});
|
|
64472
64457
|
});
|
|
64473
64458
|
};
|
|
@@ -64478,6 +64463,84 @@ function (_super) {
|
|
|
64478
64463
|
});
|
|
64479
64464
|
});
|
|
64480
64465
|
};
|
|
64466
|
+
/**
|
|
64467
|
+
* 选择导入文件且名称校验弹窗通过之后的保存事件
|
|
64468
|
+
* @param obj 导入文件解析之后的数据
|
|
64469
|
+
* @returns
|
|
64470
|
+
*/
|
|
64471
|
+
|
|
64472
|
+
|
|
64473
|
+
InterfaceSettings.prototype.saveImportData = function (obj) {
|
|
64474
|
+
var _a, _b;
|
|
64475
|
+
|
|
64476
|
+
return interface_settings_awaiter(this, void 0, void 0, function () {
|
|
64477
|
+
var valid, apiId, res;
|
|
64478
|
+
return interface_settings_generator(this, function (_c) {
|
|
64479
|
+
switch (_c.label) {
|
|
64480
|
+
case 0:
|
|
64481
|
+
if (!(((_a = obj === null || obj === void 0 ? void 0 : obj.authentication) === null || _a === void 0 ? void 0 : _a.name) || ((_b = obj === null || obj === void 0 ? void 0 : obj.environmentParam) === null || _b === void 0 ? void 0 : _b.name))) return [3
|
|
64482
|
+
/*break*/
|
|
64483
|
+
, 2];
|
|
64484
|
+
return [4
|
|
64485
|
+
/*yield*/
|
|
64486
|
+
, this.$refs.import.validate()];
|
|
64487
|
+
|
|
64488
|
+
case 1:
|
|
64489
|
+
valid = _c.sent();
|
|
64490
|
+
|
|
64491
|
+
if (!valid) {
|
|
64492
|
+
this.$message.warning("验证不通过");
|
|
64493
|
+
return [2
|
|
64494
|
+
/*return*/
|
|
64495
|
+
];
|
|
64496
|
+
}
|
|
64497
|
+
|
|
64498
|
+
_c.label = 2;
|
|
64499
|
+
|
|
64500
|
+
case 2:
|
|
64501
|
+
apiId = this.interfaceModel.info.id;
|
|
64502
|
+
obj.id = apiId;
|
|
64503
|
+
obj.info.id = apiId;
|
|
64504
|
+
obj.info.name = this.interfaceModel.info.name;
|
|
64505
|
+
obj.info.projectId = this.projectId;
|
|
64506
|
+
obj.info.categoryId = this.interfaceModel.info.categoryId;
|
|
64507
|
+
obj.authentication && (obj.authentication.projectId = this.projectId);
|
|
64508
|
+
obj.authentication && (obj.authentication.name = this.apiForm.authName);
|
|
64509
|
+
obj.environmentParam && (obj.environmentParam.projectId = this.projectId);
|
|
64510
|
+
obj.environmentParam && (obj.environmentParam.name = this.apiForm.envName);
|
|
64511
|
+
obj.convertConfig && (obj.convertConfig.apiId = apiId);
|
|
64512
|
+
["fieldMappings", "postScripts", "preScripts", "queryParams", "formParams"].forEach(function (key) {
|
|
64513
|
+
obj === null || obj === void 0 ? void 0 : obj[key].forEach(function (f) {
|
|
64514
|
+
f.apiId = apiId;
|
|
64515
|
+
});
|
|
64516
|
+
});
|
|
64517
|
+
obj === null || obj === void 0 ? void 0 : obj.requestHeaders.forEach(function (f) {
|
|
64518
|
+
f.belongId = apiId;
|
|
64519
|
+
});
|
|
64520
|
+
return [4
|
|
64521
|
+
/*yield*/
|
|
64522
|
+
, this.service.onImportAvr(obj)];
|
|
64523
|
+
|
|
64524
|
+
case 3:
|
|
64525
|
+
res = _c.sent();
|
|
64526
|
+
|
|
64527
|
+
if (!(res === null || res === void 0 ? void 0 : res.hasError)) {
|
|
64528
|
+
this.showImportModal = false;
|
|
64529
|
+
this.getEnvironmentParamList();
|
|
64530
|
+
this.$publish("api://project-detail-save");
|
|
64531
|
+
} else {
|
|
64532
|
+
return [2
|
|
64533
|
+
/*return*/
|
|
64534
|
+
];
|
|
64535
|
+
}
|
|
64536
|
+
|
|
64537
|
+
return [2
|
|
64538
|
+
/*return*/
|
|
64539
|
+
];
|
|
64540
|
+
}
|
|
64541
|
+
});
|
|
64542
|
+
});
|
|
64543
|
+
};
|
|
64481
64544
|
|
|
64482
64545
|
InterfaceSettings.prototype.onExport = function () {
|
|
64483
64546
|
var str = JSON.stringify(this.interfaceModel, null, 4);
|
|
@@ -64489,6 +64552,77 @@ function (_super) {
|
|
|
64489
64552
|
link.click();
|
|
64490
64553
|
};
|
|
64491
64554
|
|
|
64555
|
+
InterfaceSettings.prototype.validateEnvName = function (rule, value, callback) {
|
|
64556
|
+
var _a, _b, _c, _d, _e;
|
|
64557
|
+
|
|
64558
|
+
return interface_settings_awaiter(this, void 0, void 0, function () {
|
|
64559
|
+
var res;
|
|
64560
|
+
return interface_settings_generator(this, function (_f) {
|
|
64561
|
+
switch (_f.label) {
|
|
64562
|
+
case 0:
|
|
64563
|
+
return [4
|
|
64564
|
+
/*yield*/
|
|
64565
|
+
, this.service.onValidateImport({
|
|
64566
|
+
projectId: this.projectId,
|
|
64567
|
+
envName: ((_a = this.apiForm) === null || _a === void 0 ? void 0 : _a.envName) ? (_b = this.apiForm) === null || _b === void 0 ? void 0 : _b.envName : null,
|
|
64568
|
+
authName: ((_c = this.apiForm) === null || _c === void 0 ? void 0 : _c.authName) ? (_d = this.apiForm) === null || _d === void 0 ? void 0 : _d.authName : null
|
|
64569
|
+
})];
|
|
64570
|
+
|
|
64571
|
+
case 1:
|
|
64572
|
+
res = _f.sent();
|
|
64573
|
+
|
|
64574
|
+
if (!(res === null || res === void 0 ? void 0 : res.hasError) && !((_e = res === null || res === void 0 ? void 0 : res.result) === null || _e === void 0 ? void 0 : _e.envNameRepeat)) {
|
|
64575
|
+
callback();
|
|
64576
|
+
} else {
|
|
64577
|
+
callback(new Error("环境变量名重复"));
|
|
64578
|
+
}
|
|
64579
|
+
|
|
64580
|
+
return [2
|
|
64581
|
+
/*return*/
|
|
64582
|
+
];
|
|
64583
|
+
}
|
|
64584
|
+
});
|
|
64585
|
+
});
|
|
64586
|
+
};
|
|
64587
|
+
|
|
64588
|
+
InterfaceSettings.prototype.validateAuthName = function (rule, value, callback) {
|
|
64589
|
+
var _a, _b, _c, _d, _e;
|
|
64590
|
+
|
|
64591
|
+
return interface_settings_awaiter(this, void 0, void 0, function () {
|
|
64592
|
+
var res;
|
|
64593
|
+
return interface_settings_generator(this, function (_f) {
|
|
64594
|
+
switch (_f.label) {
|
|
64595
|
+
case 0:
|
|
64596
|
+
return [4
|
|
64597
|
+
/*yield*/
|
|
64598
|
+
, this.service.onValidateImport({
|
|
64599
|
+
projectId: this.projectId,
|
|
64600
|
+
envName: ((_a = this.apiForm) === null || _a === void 0 ? void 0 : _a.envName) ? (_b = this.apiForm) === null || _b === void 0 ? void 0 : _b.envName : null,
|
|
64601
|
+
authName: ((_c = this.apiForm) === null || _c === void 0 ? void 0 : _c.authName) ? (_d = this.apiForm) === null || _d === void 0 ? void 0 : _d.authName : null
|
|
64602
|
+
})];
|
|
64603
|
+
|
|
64604
|
+
case 1:
|
|
64605
|
+
res = _f.sent();
|
|
64606
|
+
|
|
64607
|
+
if (!(res === null || res === void 0 ? void 0 : res.hasError) && !((_e = res === null || res === void 0 ? void 0 : res.result) === null || _e === void 0 ? void 0 : _e.authNameRepeat)) {
|
|
64608
|
+
callback();
|
|
64609
|
+
} else {
|
|
64610
|
+
callback(new Error("授权名重复"));
|
|
64611
|
+
}
|
|
64612
|
+
|
|
64613
|
+
return [2
|
|
64614
|
+
/*return*/
|
|
64615
|
+
];
|
|
64616
|
+
}
|
|
64617
|
+
});
|
|
64618
|
+
});
|
|
64619
|
+
};
|
|
64620
|
+
|
|
64621
|
+
InterfaceSettings.prototype.cancleModify = function () {
|
|
64622
|
+
this.$refs.import.resetFields();
|
|
64623
|
+
this.showImportModal = false;
|
|
64624
|
+
};
|
|
64625
|
+
|
|
64492
64626
|
InterfaceSettings.prototype.onVersion = function () {
|
|
64493
64627
|
var id = (this.interfaceModel.info || {}).id;
|
|
64494
64628
|
|
|
@@ -64587,6 +64721,8 @@ function (_super) {
|
|
|
64587
64721
|
immediate: true
|
|
64588
64722
|
}), interface_settings_metadata("design:type", Function), interface_settings_metadata("design:paramtypes", []), interface_settings_metadata("design:returntype", void 0)], InterfaceSettings.prototype, "interfaceModelChange", null);
|
|
64589
64723
|
|
|
64724
|
+
interface_settings_decorate([Object(flagwind_web_["watch"])("showImportModal"), interface_settings_metadata("design:type", Function), interface_settings_metadata("design:paramtypes", [Boolean]), interface_settings_metadata("design:returntype", void 0)], InterfaceSettings.prototype, "showImportModalChange", null);
|
|
64725
|
+
|
|
64590
64726
|
InterfaceSettings = interface_settings_decorate([Object(flagwind_web_["component"])({
|
|
64591
64727
|
template: __webpack_require__("f40e"),
|
|
64592
64728
|
components: {
|
|
@@ -66588,6 +66724,9 @@ function (_super) {
|
|
|
66588
66724
|
this.$subscribe("api://project-detail-save", function () {
|
|
66589
66725
|
return project_detail_awaiter(_this, void 0, void 0, function () {
|
|
66590
66726
|
var res, result;
|
|
66727
|
+
|
|
66728
|
+
var _this = this;
|
|
66729
|
+
|
|
66591
66730
|
return project_detail_generator(this, function (_a) {
|
|
66592
66731
|
switch (_a.label) {
|
|
66593
66732
|
case 0:
|
|
@@ -66602,6 +66741,9 @@ function (_super) {
|
|
|
66602
66741
|
id: this.current.id
|
|
66603
66742
|
});
|
|
66604
66743
|
this.active = result;
|
|
66744
|
+
this.openInterfaceList[this.openInterfaceList.findIndex(function (i) {
|
|
66745
|
+
return i.id === _this.current.id;
|
|
66746
|
+
})] = result;
|
|
66605
66747
|
return [2
|
|
66606
66748
|
/*return*/
|
|
66607
66749
|
];
|