@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.umd.js CHANGED
@@ -48852,7 +48852,7 @@ module.exports = uncurryThis([].slice);
48852
48852
  /***/ "f40e":
48853
48853
  /***/ (function(module, exports) {
48854
48854
 
48855
- module.exports = "<article class=\"interface-settings\" :class=\"{'script-max': scriptView}\">\r\n <header v-show=\"!scriptView\">\r\n<!-- <i-input class=\"diy-input\" v-model=\"interfaceModel.info.url\">-->\r\n<!-- <i-select transfer slot=\"prepend\" class=\"diy-select\" v-model=\"interfaceModel.info.method\">-->\r\n<!-- <i-option v-for=\"item in typeList\" :key=\"item.value\" :value=\"item.value\">{{item.text}}</i-option>-->\r\n<!-- </i-select>-->\r\n<!-- </i-input>-->\r\n <i-select class=\"diy-select method-select\" v-model=\"interfaceModel.info.method\">\r\n <i-option v-for=\"item in typeList\" :key=\"item.value\" :value=\"item.value\">{{item.text}}</i-option>\r\n </i-select>\r\n <i-select ref=\"addEnvParamSelect\" class=\"diy-select env-select\" v-model=\"interfaceModel.info.envId\" placeholder=\"请选择环境变量\" clearable>\r\n <i-option v-for=\"item in paramList\" :key=\"item.id\" :value=\"item.id\">{{item.name + \":\" + item.value}}</i-option>\r\n <i-option class=\"add-security-item\" value=\"''\">\r\n <div class=\"add-security-item-content\" @click.stop=\"onAddEnvParam\">\r\n <i class=\"api-icon icon-add\"></i>\r\n <span>新增环境变量</span>\r\n </div>\r\n </i-option>\r\n </i-select>\r\n <i-input class=\"diy-input url-input\" v-model=\"interfaceModel.info.url\"></i-input>\r\n\r\n <i-button type=\"primary\" class=\"diy-btn-primary submit-btn\" @click=\"onRun\">发送</i-button>\r\n <i-button type=\"primary\" class=\"diy-btn-primary\" @click=\"onSave\" ghost>保存</i-button>\r\n <i-button type=\"primary\" class=\"diy-btn-primary his-btn\" @click=\"onVersion\" ghost>查看历史版本</i-button>\r\n <i class=\"export iconfont icon-xiazai\" title=\"导出\" type=\"md-download\" @click=\"onExport\"></i>\r\n <i-upload action=\"\" :before-upload=\"onImport\" :show-upload-list=\"false\">\r\n <i class=\"import iconfont icon-shangchuan\" title=\"导入\" type=\"md-cloud-upload\"></i>\r\n </i-upload>\r\n\r\n </header>\r\n <main :class=\"{'transverse': !lengthwise}\">\r\n <section class=\"request\">\r\n <div v-show=\"!scriptView\" class=\"request-bar\">\r\n <div\r\n class=\"tag\"\r\n :class=\"{'active': currentRequestSettingType.name.indexOf(item.name) === 0}\"\r\n v-for=\"(item,index) in requertSettingTypeList\"\r\n :key=\"item.name\"\r\n @click=\"onClickRequertSettingTpye(item)\"\r\n >\r\n <span>{{item.title}}</span>\r\n </div>\r\n </div>\r\n <div class=\"request-content\">\r\n <component\r\n :is=\"currentRequestSettingType.name\"\r\n :lengthwise=\"lengthwise\"\r\n :interface-model=\"interfaceModel\"\r\n :response=\"response\"\r\n :key=\"interfaceModel.info.id + currentRequestSettingType.name\"\r\n :projectID=\"projectId\"\r\n :currentSecurityID=\"currentId\"\r\n :errorLine=\"!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"
48855
+ module.exports = "<article class=\"interface-settings\" :class=\"{'script-max': scriptView}\">\r\n <header v-show=\"!scriptView\">\r\n<!-- <i-input class=\"diy-input\" v-model=\"interfaceModel.info.url\">-->\r\n<!-- <i-select transfer slot=\"prepend\" class=\"diy-select\" v-model=\"interfaceModel.info.method\">-->\r\n<!-- <i-option v-for=\"item in typeList\" :key=\"item.value\" :value=\"item.value\">{{item.text}}</i-option>-->\r\n<!-- </i-select>-->\r\n<!-- </i-input>-->\r\n <i-select class=\"diy-select method-select\" v-model=\"interfaceModel.info.method\">\r\n <i-option v-for=\"item in typeList\" :key=\"item.value\" :value=\"item.value\">{{item.text}}</i-option>\r\n </i-select>\r\n <i-select ref=\"addEnvParamSelect\" class=\"diy-select env-select\" v-model=\"interfaceModel.info.envId\" placeholder=\"请选择环境变量\" clearable>\r\n <i-option v-for=\"item in paramList\" :key=\"item.id\" :value=\"item.id\">{{item.name + \":\" + item.value}}</i-option>\r\n <i-option class=\"add-security-item\" value=\"''\">\r\n <div class=\"add-security-item-content\" @click.stop=\"onAddEnvParam\">\r\n <i class=\"api-icon icon-add\"></i>\r\n <span>新增环境变量</span>\r\n </div>\r\n </i-option>\r\n </i-select>\r\n <i-input class=\"diy-input url-input\" v-model=\"interfaceModel.info.url\"></i-input>\r\n\r\n <i-button type=\"primary\" class=\"diy-btn-primary submit-btn\" @click=\"onRun\">发送</i-button>\r\n <i-button type=\"primary\" class=\"diy-btn-primary\" @click=\"onSave\" ghost>保存</i-button>\r\n <i-button type=\"primary\" class=\"diy-btn-primary his-btn\" @click=\"onVersion\" ghost>查看历史版本</i-button>\r\n <i class=\"export iconfont icon-xiazai\" title=\"导出\" type=\"md-download\" @click=\"onExport\"></i>\r\n <i-upload action=\"\" :before-upload=\"onImport\" :show-upload-list=\"false\">\r\n <i class=\"import iconfont icon-shangchuan\" title=\"导入\" type=\"md-cloud-upload\"></i>\r\n </i-upload>\r\n\r\n </header>\r\n <main :class=\"{'transverse': !lengthwise}\">\r\n <section class=\"request\">\r\n <div v-show=\"!scriptView\" class=\"request-bar\">\r\n <div\r\n class=\"tag\"\r\n :class=\"{'active': currentRequestSettingType.name.indexOf(item.name) === 0}\"\r\n v-for=\"(item,index) in requertSettingTypeList\"\r\n :key=\"item.name\"\r\n @click=\"onClickRequertSettingTpye(item)\"\r\n >\r\n <span>{{item.title}}</span>\r\n </div>\r\n </div>\r\n <div class=\"request-content\">\r\n <component\r\n :is=\"currentRequestSettingType.name\"\r\n :lengthwise=\"lengthwise\"\r\n :interface-model=\"interfaceModel\"\r\n :response=\"response\"\r\n :key=\"interfaceModel.info.id + currentRequestSettingType.name\"\r\n :projectID=\"projectId\"\r\n :currentSecurityID=\"currentId\"\r\n :errorLine=\"!originId || originId === interfaceModel.info.id ? errorLine : []\"\r\n @on-current-id=\"onCurrentId\"\r\n @on-script-run=\"onScriptRun\"\r\n @on-script-save=\"onSave\"\r\n @on-script-max=\"onScriptMax\"\r\n ></component>\r\n </div>\r\n </section>\r\n <response :key=\"interfaceModel.info.id + 'response'\" :lengthwise=\"lengthwise\" :response=\"response\"></response>\r\n </main>\r\n <i-spin fix v-show=\"loading\">\r\n <i class=\"spin-icon-load ivu-icon\"></i>\r\n </i-spin>\r\n <u-environment-modal :visiable.sync=\"showEnvironmentModal\" :projectId=\"projectId\" @on-refresh=\"getEnvironmentParamList\" :isAdd=\"true\"></u-environment-modal>\r\n <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"
48856
48856
 
48857
48857
  /***/ }),
48858
48858
 
@@ -53035,7 +53035,7 @@ function (_super) {
53035
53035
  title: "接口文档",
53036
53036
  align: "left",
53037
53037
  slot: "doc",
53038
- width: 100
53038
+ width: 110
53039
53039
  }, {
53040
53040
  title: "操作",
53041
53041
  align: "left",
@@ -54075,7 +54075,7 @@ function (_super) {
54075
54075
  title: "接口文档",
54076
54076
  align: "left",
54077
54077
  slot: "doc",
54078
- width: 100
54078
+ width: 110
54079
54079
  }]; // 查看文档
54080
54080
 
54081
54081
  _this.doc = "";
@@ -56302,7 +56302,6 @@ var request_parameter_list = __webpack_require__("9e10");
56302
56302
 
56303
56303
 
56304
56304
 
56305
-
56306
56305
 
56307
56306
  var request_parameter_list_extends = undefined && undefined.__extends || function () {
56308
56307
  var _extendStatics = function extendStatics(d, b) {
@@ -56332,22 +56331,6 @@ var request_parameter_list_extends = undefined && undefined.__extends || functio
56332
56331
  };
56333
56332
  }();
56334
56333
 
56335
- var request_parameter_list_assign = undefined && undefined.__assign || function () {
56336
- request_parameter_list_assign = Object.assign || function (t) {
56337
- for (var s, i = 1, n = arguments.length; i < n; i++) {
56338
- s = arguments[i];
56339
-
56340
- for (var p in s) {
56341
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
56342
- }
56343
- }
56344
-
56345
- return t;
56346
- };
56347
-
56348
- return request_parameter_list_assign.apply(this, arguments);
56349
- };
56350
-
56351
56334
  var request_parameter_list_decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
56352
56335
  var c = arguments.length,
56353
56336
  r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
@@ -56580,9 +56563,8 @@ function (_super) {
56580
56563
  };
56581
56564
 
56582
56565
  RequestParameterList.prototype.onCancel = function (index) {
56583
- this.data.splice(index, 1, request_parameter_list_assign(request_parameter_list_assign({}, this.data[index]), {
56584
- isEdit: false
56585
- }));
56566
+ // this.data.splice(index, 1, { ...this.data[index], isEdit: false });
56567
+ this.data.splice(index, 1);
56586
56568
  };
56587
56569
 
56588
56570
  RequestParameterList.prototype.onDelete = function (row, index) {
@@ -58997,7 +58979,11 @@ function (_super) {
58997
58979
  };
58998
58980
 
58999
58981
  ApiService.prototype.onImportAvr = function (data) {
59000
- return this._post("/unity/api/info/import-var", data);
58982
+ return this._post("/unity/api/info/import-model", data);
58983
+ };
58984
+
58985
+ ApiService.prototype.onValidateImport = function (data) {
58986
+ return this._post("/unity/api/info/check-name", data);
59001
58987
  };
59002
58988
 
59003
58989
  var _a, _b;
@@ -59118,6 +59104,11 @@ function (_super) {
59118
59104
  showErrorMsg: true
59119
59105
  }), 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);
59120
59106
 
59107
+ project_detail_service_decorate([serviceHandler("query", {
59108
+ title: "单接口详情导入",
59109
+ showErrorMsg: true
59110
+ }), 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);
59111
+
59121
59112
  return ApiService;
59122
59113
  }(common_service);
59123
59114
 
@@ -64252,6 +64243,14 @@ function (_super) {
64252
64243
  _this.errorLine = null;
64253
64244
  _this.originId = "";
64254
64245
  _this.scriptView = false;
64246
+ _this.apiForm = {
64247
+ envName: null,
64248
+ authName: null
64249
+ };
64250
+ _this.showImportModal = false; // 导入校验名称弹窗
64251
+
64252
+ _this.importObj = {}; // 解析的导入文件数据
64253
+
64255
64254
  _this.typeList = [{
64256
64255
  value: "GET",
64257
64256
  text: "GET"
@@ -64288,6 +64287,18 @@ function (_super) {
64288
64287
  title: "后置脚本",
64289
64288
  name: "after-execution-script"
64290
64289
  }];
64290
+ _this.rules = {
64291
+ envName: [{
64292
+ required: false,
64293
+ validator: _this.validateEnvName,
64294
+ trigger: "blur"
64295
+ }],
64296
+ authName: [{
64297
+ required: false,
64298
+ validator: _this.validateAuthName,
64299
+ trigger: "blur"
64300
+ }]
64301
+ };
64291
64302
  _this.currentRequestSettingType = _this.requertSettingTypeList[0];
64292
64303
  return _this;
64293
64304
  }
@@ -64402,6 +64413,12 @@ function (_super) {
64402
64413
  this.response = this.responseCache.get(this.interfaceModel.info.id) || new Response();
64403
64414
  };
64404
64415
 
64416
+ InterfaceSettings.prototype.showImportModalChange = function (value) {
64417
+ if (!value) {
64418
+ this.$refs.import.resetFields();
64419
+ }
64420
+ };
64421
+
64405
64422
  InterfaceSettings.prototype.onImport = function (file) {
64406
64423
  return interface_settings_awaiter(this, void 0, void 0, function () {
64407
64424
  var reader;
@@ -64414,69 +64431,37 @@ function (_super) {
64414
64431
 
64415
64432
  reader.onload = function (evt) {
64416
64433
  return interface_settings_awaiter(_this, void 0, void 0, function () {
64417
- var fileString, obj, params, res, apiId;
64434
+ var fileString, obj;
64418
64435
 
64419
64436
  var _a, _b, _c, _d, _e, _f;
64420
64437
 
64421
64438
  return interface_settings_generator(this, function (_g) {
64422
- switch (_g.label) {
64423
- case 0:
64424
- fileString = evt.target.result;
64425
- obj = null;
64426
-
64427
- try {
64428
- obj = JSON.parse(fileString);
64429
- } catch (error) {
64430
- this.$message.error("JSON格式有误");
64431
- return [2
64432
- /*return*/
64433
- , false];
64434
- }
64439
+ fileString = evt.target.result;
64440
+ obj = null;
64435
64441
 
64436
- params = {
64437
- projectId: this.projectId,
64438
- authentication: (obj === null || obj === void 0 ? void 0 : obj.authentication) || null,
64439
- environmentParam: (obj === null || obj === void 0 ? void 0 : obj.environmentParam) || null
64440
- };
64441
- return [4
64442
- /*yield*/
64443
- , this.service.onImportAvr(params)];
64444
-
64445
- case 1:
64446
- res = _g.sent();
64447
-
64448
- if (!(res === null || res === void 0 ? void 0 : res.hasError)) {
64449
- this.getEnvironmentParamList();
64450
- obj.environmentParam = ((_a = res === null || res === void 0 ? void 0 : res.result) === null || _a === void 0 ? void 0 : _a.environmentParam) || null;
64451
- obj.authentication = ((_b = res === null || res === void 0 ? void 0 : res.result) === null || _b === void 0 ? void 0 : _b.authentication) || null;
64452
- 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;
64453
- 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;
64454
- } else {
64455
- return [2
64456
- /*return*/
64457
- ];
64458
- }
64442
+ try {
64443
+ obj = JSON.parse(fileString);
64444
+ this.importObj = obj;
64445
+ } catch (error) {
64446
+ this.$message.error("JSON格式有误");
64447
+ return [2
64448
+ /*return*/
64449
+ , false];
64450
+ } // 当授权或环境变量都不存在时则直接执行保存事件
64459
64451
 
64460
- apiId = this.interfaceModel.info.id;
64461
- obj.id = apiId;
64462
- obj.info.id = apiId;
64463
- obj.info.name = this.interfaceModel.info.name;
64464
- obj.info.projectId = this.projectId;
64465
- obj.info.categoryId = this.interfaceModel.info.categoryId;
64466
- obj.convertConfig && (obj.convertConfig.apiId = apiId);
64467
- ["fieldMappings", "postScripts", "preScripts", "queryParams", "formParams"].forEach(function (key) {
64468
- obj === null || obj === void 0 ? void 0 : obj[key].forEach(function (f) {
64469
- f.apiId = apiId;
64470
- });
64471
- });
64472
- obj === null || obj === void 0 ? void 0 : obj.requestHeaders.forEach(function (f) {
64473
- f.belongId = apiId;
64474
- });
64475
- this.$emit("update:interfaceModel", obj);
64476
- return [2
64477
- /*return*/
64478
- ];
64452
+
64453
+ 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)) {
64454
+ this.saveImportData(obj);
64455
+ } else {
64456
+ // 当授权或环境变量只要一个不为空则回显值且打开名称修改弹窗
64457
+ 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;
64458
+ 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;
64459
+ this.showImportModal = true;
64479
64460
  }
64461
+
64462
+ return [2
64463
+ /*return*/
64464
+ ];
64480
64465
  });
64481
64466
  });
64482
64467
  };
@@ -64487,6 +64472,84 @@ function (_super) {
64487
64472
  });
64488
64473
  });
64489
64474
  };
64475
+ /**
64476
+ * 选择导入文件且名称校验弹窗通过之后的保存事件
64477
+ * @param obj 导入文件解析之后的数据
64478
+ * @returns
64479
+ */
64480
+
64481
+
64482
+ InterfaceSettings.prototype.saveImportData = function (obj) {
64483
+ var _a, _b;
64484
+
64485
+ return interface_settings_awaiter(this, void 0, void 0, function () {
64486
+ var valid, apiId, res;
64487
+ return interface_settings_generator(this, function (_c) {
64488
+ switch (_c.label) {
64489
+ case 0:
64490
+ 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
64491
+ /*break*/
64492
+ , 2];
64493
+ return [4
64494
+ /*yield*/
64495
+ , this.$refs.import.validate()];
64496
+
64497
+ case 1:
64498
+ valid = _c.sent();
64499
+
64500
+ if (!valid) {
64501
+ this.$message.warning("验证不通过");
64502
+ return [2
64503
+ /*return*/
64504
+ ];
64505
+ }
64506
+
64507
+ _c.label = 2;
64508
+
64509
+ case 2:
64510
+ apiId = this.interfaceModel.info.id;
64511
+ obj.id = apiId;
64512
+ obj.info.id = apiId;
64513
+ obj.info.name = this.interfaceModel.info.name;
64514
+ obj.info.projectId = this.projectId;
64515
+ obj.info.categoryId = this.interfaceModel.info.categoryId;
64516
+ obj.authentication && (obj.authentication.projectId = this.projectId);
64517
+ obj.authentication && (obj.authentication.name = this.apiForm.authName);
64518
+ obj.environmentParam && (obj.environmentParam.projectId = this.projectId);
64519
+ obj.environmentParam && (obj.environmentParam.name = this.apiForm.envName);
64520
+ obj.convertConfig && (obj.convertConfig.apiId = apiId);
64521
+ ["fieldMappings", "postScripts", "preScripts", "queryParams", "formParams"].forEach(function (key) {
64522
+ obj === null || obj === void 0 ? void 0 : obj[key].forEach(function (f) {
64523
+ f.apiId = apiId;
64524
+ });
64525
+ });
64526
+ obj === null || obj === void 0 ? void 0 : obj.requestHeaders.forEach(function (f) {
64527
+ f.belongId = apiId;
64528
+ });
64529
+ return [4
64530
+ /*yield*/
64531
+ , this.service.onImportAvr(obj)];
64532
+
64533
+ case 3:
64534
+ res = _c.sent();
64535
+
64536
+ if (!(res === null || res === void 0 ? void 0 : res.hasError)) {
64537
+ this.showImportModal = false;
64538
+ this.getEnvironmentParamList();
64539
+ this.$publish("api://project-detail-save");
64540
+ } else {
64541
+ return [2
64542
+ /*return*/
64543
+ ];
64544
+ }
64545
+
64546
+ return [2
64547
+ /*return*/
64548
+ ];
64549
+ }
64550
+ });
64551
+ });
64552
+ };
64490
64553
 
64491
64554
  InterfaceSettings.prototype.onExport = function () {
64492
64555
  var str = JSON.stringify(this.interfaceModel, null, 4);
@@ -64498,6 +64561,77 @@ function (_super) {
64498
64561
  link.click();
64499
64562
  };
64500
64563
 
64564
+ InterfaceSettings.prototype.validateEnvName = function (rule, value, callback) {
64565
+ var _a, _b, _c, _d, _e;
64566
+
64567
+ return interface_settings_awaiter(this, void 0, void 0, function () {
64568
+ var res;
64569
+ return interface_settings_generator(this, function (_f) {
64570
+ switch (_f.label) {
64571
+ case 0:
64572
+ return [4
64573
+ /*yield*/
64574
+ , this.service.onValidateImport({
64575
+ projectId: this.projectId,
64576
+ envName: ((_a = this.apiForm) === null || _a === void 0 ? void 0 : _a.envName) ? (_b = this.apiForm) === null || _b === void 0 ? void 0 : _b.envName : null,
64577
+ authName: ((_c = this.apiForm) === null || _c === void 0 ? void 0 : _c.authName) ? (_d = this.apiForm) === null || _d === void 0 ? void 0 : _d.authName : null
64578
+ })];
64579
+
64580
+ case 1:
64581
+ res = _f.sent();
64582
+
64583
+ 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)) {
64584
+ callback();
64585
+ } else {
64586
+ callback(new Error("环境变量名重复"));
64587
+ }
64588
+
64589
+ return [2
64590
+ /*return*/
64591
+ ];
64592
+ }
64593
+ });
64594
+ });
64595
+ };
64596
+
64597
+ InterfaceSettings.prototype.validateAuthName = function (rule, value, callback) {
64598
+ var _a, _b, _c, _d, _e;
64599
+
64600
+ return interface_settings_awaiter(this, void 0, void 0, function () {
64601
+ var res;
64602
+ return interface_settings_generator(this, function (_f) {
64603
+ switch (_f.label) {
64604
+ case 0:
64605
+ return [4
64606
+ /*yield*/
64607
+ , this.service.onValidateImport({
64608
+ projectId: this.projectId,
64609
+ envName: ((_a = this.apiForm) === null || _a === void 0 ? void 0 : _a.envName) ? (_b = this.apiForm) === null || _b === void 0 ? void 0 : _b.envName : null,
64610
+ authName: ((_c = this.apiForm) === null || _c === void 0 ? void 0 : _c.authName) ? (_d = this.apiForm) === null || _d === void 0 ? void 0 : _d.authName : null
64611
+ })];
64612
+
64613
+ case 1:
64614
+ res = _f.sent();
64615
+
64616
+ 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)) {
64617
+ callback();
64618
+ } else {
64619
+ callback(new Error("授权名重复"));
64620
+ }
64621
+
64622
+ return [2
64623
+ /*return*/
64624
+ ];
64625
+ }
64626
+ });
64627
+ });
64628
+ };
64629
+
64630
+ InterfaceSettings.prototype.cancleModify = function () {
64631
+ this.$refs.import.resetFields();
64632
+ this.showImportModal = false;
64633
+ };
64634
+
64501
64635
  InterfaceSettings.prototype.onVersion = function () {
64502
64636
  var id = (this.interfaceModel.info || {}).id;
64503
64637
 
@@ -64596,6 +64730,8 @@ function (_super) {
64596
64730
  immediate: true
64597
64731
  }), interface_settings_metadata("design:type", Function), interface_settings_metadata("design:paramtypes", []), interface_settings_metadata("design:returntype", void 0)], InterfaceSettings.prototype, "interfaceModelChange", null);
64598
64732
 
64733
+ 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);
64734
+
64599
64735
  InterfaceSettings = interface_settings_decorate([Object(flagwind_web_["component"])({
64600
64736
  template: __webpack_require__("f40e"),
64601
64737
  components: {
@@ -66597,6 +66733,9 @@ function (_super) {
66597
66733
  this.$subscribe("api://project-detail-save", function () {
66598
66734
  return project_detail_awaiter(_this, void 0, void 0, function () {
66599
66735
  var res, result;
66736
+
66737
+ var _this = this;
66738
+
66600
66739
  return project_detail_generator(this, function (_a) {
66601
66740
  switch (_a.label) {
66602
66741
  case 0:
@@ -66611,6 +66750,9 @@ function (_super) {
66611
66750
  id: this.current.id
66612
66751
  });
66613
66752
  this.active = result;
66753
+ this.openInterfaceList[this.openInterfaceList.findIndex(function (i) {
66754
+ return i.id === _this.current.id;
66755
+ })] = result;
66614
66756
  return [2
66615
66757
  /*return*/
66616
66758
  ];