@egova/egova-api 1.0.216 → 1.0.219
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 +136 -11
- package/dist/index.css +1 -1
- package/dist/index.umd.js +136 -11
- package/dist/index.umd.min.js +3 -3
- package/package.json +2 -2
package/dist/index.common.js
CHANGED
|
@@ -22670,7 +22670,7 @@ module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
|
|
|
22670
22670
|
/***/ "193e":
|
|
22671
22671
|
/***/ (function(module, exports) {
|
|
22672
22672
|
|
|
22673
|
-
module.exports = "<article class=\"project-tree\">\
|
|
22673
|
+
module.exports = "<article class=\"project-tree\">\n <header>\n <div class=\"tree-api\">\n <div class=\"title-g\">API列表</div>\n <div class=\"add\" @click=\"onAddGroup\">\n <i class=\"iconfont icon-xinjianwenjianjia\"></i>\n </div>\n </div>\n <div class=\"tree-search\">\n <i-select class=\"diy-select\" transfer v-model=\"type\" @on-change=\"onFilter\">\n <i-option v-for=\"item in typeList\" :key=\"item.value\" :value=\"item.value\">{{item.text}}</i-option>\n </i-select>\n <i-input class=\"diy-input\" v-model=\"keyword\" @on-search=\"onFilter\" placeholder=\"输入关键字查询\">\n <i class=\"iconfont icon-chaxun\" slot=\"prefix\"></i>\n </i-input>\n </div>\n </header>\n <i-tree :data=\"renderData\" :render=\"renderContent\"></i-tree>\n <i-modal\n draggable\n sticky\n reset-drag-position\n v-model=\"showGroupModal\"\n class=\"diy-modal\"\n :mask-closable=\"false\"\n transfer\n :title=\"group.id ? '修改分组': '添加分组'\"\n >\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\n <i-form-item label=\"分组名称\">\n <i-input class=\"diy-input\" v-model=\"group.name\"></i-input>\n </i-form-item>\n <i-form-item label=\"分组位置\">\n <u-group-select :data=\"groupTree\" :current=\"parent\" @on-select=\"onSelectParent\"></u-group-select>\n </i-form-item>\n </i-form>\n <footer slot=\"footer\">\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click.stop=\"onSaveGroup\">确定</i-button>\n <i-button class=\"diy-btn-default\" @click.stop=\"onGourpCancel\">取消</i-button>\n </footer>\n </i-modal>\n <i-modal draggable sticky reset-drag-position v-model=\"showInterfaceModal\" class=\"diy-modal\" :mask-closable=\"false\" :title=\"interfaceModel.id ? '修改接口': '添加接口'\">\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\n <i-form-item label=\"接口名称\" required>\n <i-input class=\"diy-input\" v-model=\"interfaceModel.name\"></i-input>\n </i-form-item>\n <i-form-item label=\"接口位置\" required>\n <u-group-select :data=\"groupTree\" :current=\"parent\" @on-select=\"onSelectParent\"></u-group-select>\n </i-form-item>\n <i-form-item label=\"接口类型\" required>\n <i-select v-model=\"interfaceModel.method\" class=\"diy-select\" transfer>\n <i-option v-for=\"item in typeList\" v-if=\"item.value\" :key=\"item.value\" :value=\"item.value\">{{item.text}}</i-option>\n </i-select>\n </i-form-item>\n </i-form>\n <footer slot=\"footer\">\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click=\"onSaveInterface\">确定</i-button>\n <i-button class=\"diy-btn-default\" @click=\"onInterfaceCancel\">取消</i-button>\n </footer>\n </i-modal>\n <i-modal draggable sticky reset-drag-position v-model=\"showCopyModal\" class=\"diy-modal\" :mask-closable=\"false\" title=\"复制接口\">\n <i-form :label-width=\"100\" class=\"diy-form\" label-colon>\n <i-form-item label=\"接口名称\" required>\n <i-input class=\"diy-input\" v-model=\"copyName\"></i-input>\n </i-form-item>\n <i-form-item label=\"选择分组\" required>\n <u-group-select :isSelector=\"true\" :data=\"groupTree\" :current=\"parent\" @on-select=\"onSelectParent\"></u-group-select>\n </i-form-item>\n </i-form>\n <footer slot=\"footer\">\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click=\"onCopy\">确定</i-button>\n <i-button class=\"diy-btn-default\" @click=\"onCopyCancel\">取消</i-button>\n </footer>\n </i-modal>\n <u-batch-modal :visiable.sync=\"showBatchModal\" :data=\"categoryApiList\" :projectId=\"projectId\" @on-success=\"onBatchSuccess\"></u-batch-modal>\n</article>\n"
|
|
22674
22674
|
|
|
22675
22675
|
/***/ }),
|
|
22676
22676
|
|
|
@@ -40809,7 +40809,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
40809
40809
|
/***/ "88af":
|
|
40810
40810
|
/***/ (function(module, exports) {
|
|
40811
40811
|
|
|
40812
|
-
module.exports = "<i-modal draggable sticky reset-drag-position :mask-closable=\"false\" v-model=\"value\" width=\"800\" class=\"u-variable-modal diy-modal\" transfer>\n <header slot=\"header\">批量修改环境变量与授权</header>\n <main class=\"variable-content\">\n <div class=\"left\">\n <div class=\"left-title\">\n <div class=\"left-title-text\">选择API</div>\n </div>\n <div class=\"left-content\">\n <i-input class=\"diy-input search-input\" v-model=\"keyword\" placeholder=\"输入关键字查询\" @on-change=\"onFilter\">\n <template #prefix>\n <i-icon type=\"ios-search\"/>\n </template>\n </i-input>\n <div class=\"security-list\">\n <i-checkbox class=\"security-list-item-checkbox\" v-model=\"allSelect\" @on-change=\"onAllSelect\">全选</i-checkbox>\n <div class=\"security-list-item\"\n v-for=\"(item,index) in apiList\"\n :key=\"item.id || index\"\n >\n <div class=\"security-list-item-name\">\n <i-checkbox v-model=\"item.selected\" @on-change=\"onSelect($event,item)\"></i-checkbox>\n <i class=\"iconfont icon-API\"></i>\n <div class=\"security-list-item-text\" :title=\"item.name\">{{ item.name }}</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"right\">\n <div class=\"right-title\">环境与授权</div>\n <div class=\"right-content\">\n <i-form ref=\"batch-api-form\" class=\"variable-content-form\" label-colon label-position=\"left\" v-if=\"isEmpty\" :rules=\"rules\" :label-width=\"100\" :model=\"formData\">\n <i-form-item class=\"content-form-item un-required-item\" label=\"选择属性\">\n <i-select class=\"diy-select\" placeholder=\"请输入\" clearable v-model=\"type\">\n <i-option value=\"env\">环境变量</i-option>\n <i-option value=\"auth\">授权设置</i-option>\n <i-option value=\"both\">环境变量和授权设置</i-option>\n </i-select>\n </i-form-item>\n <i-form-item class=\"content-form-item\" v-if=\"type !== 'auth'\" label=\"环境变量\" prop=\"envId\">\n <i-select class=\"diy-select diy-batch-select\" placeholder=\"请选择\" clearable v-model=\"formData.envId\">\n <i-option value=\"empty\">清空所有已设置环境变量</i-option>\n <i-option v-for=\"item in variableList\" :key=\"item.name\" :value=\"item.id\">{{item.name}}
|
|
40812
|
+
module.exports = "<i-modal draggable sticky reset-drag-position :mask-closable=\"false\" v-model=\"value\" width=\"800\" class=\"u-variable-modal diy-modal\" transfer>\n <header slot=\"header\">批量修改环境变量与授权</header>\n <main class=\"variable-content\">\n <div class=\"left\">\n <div class=\"left-title\">\n <div class=\"left-title-text\">选择API</div>\n </div>\n <div class=\"left-content\">\n <i-input class=\"diy-input search-input\" v-model=\"keyword\" placeholder=\"输入关键字查询\" @on-change=\"onFilter\">\n <template #prefix>\n <i-icon type=\"ios-search\"/>\n </template>\n </i-input>\n <div class=\"security-list\">\n <i-checkbox class=\"security-list-item-checkbox\" v-model=\"allSelect\" @on-change=\"onAllSelect\">全选</i-checkbox>\n <div class=\"security-list-item\"\n v-for=\"(item,index) in apiList\"\n :key=\"item.id || index\"\n >\n <div class=\"security-list-item-name\">\n <i-checkbox v-model=\"item.selected\" @on-change=\"onSelect($event,item)\"></i-checkbox>\n <i class=\"iconfont icon-API\"></i>\n <div class=\"security-list-item-text\" :title=\"item.name\">{{ item.name }}</div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"right\">\n <div class=\"right-title\">环境与授权</div>\n <div class=\"right-content\">\n <i-form ref=\"batch-api-form\" class=\"variable-content-form\" label-colon label-position=\"left\" v-if=\"isEmpty\" :rules=\"rules\" :label-width=\"100\" :model=\"formData\">\n <i-form-item class=\"content-form-item un-required-item\" label=\"选择属性\">\n <i-select class=\"diy-select\" placeholder=\"请输入\" clearable v-model=\"type\">\n <i-option value=\"env\">环境变量</i-option>\n <i-option value=\"auth\">授权设置</i-option>\n <i-option value=\"both\">环境变量和授权设置</i-option>\n </i-select>\n </i-form-item>\n <i-form-item class=\"content-form-item\" v-if=\"type !== 'auth'\" label=\"环境变量\" prop=\"envId\">\n <i-select class=\"diy-select diy-batch-select diy-batch-variable-select\" placeholder=\"请选择\" clearable v-model=\"formData.envId\">\n <i-option value=\"empty\">清空所有已设置环境变量</i-option>\n <i-option v-for=\"item in variableList\" :key=\"item.name\" :value=\"item.id\" :title=\"item.name + ':' + item.value\">{{item.name + \":\" + item.value}}</i-option>\n </i-select>\n </i-form-item>\n <i-form-item class=\"content-form-item\" label=\"授权设置\" v-if=\"type !== 'env'\" prop=\"authId\">\n <i-select class=\"diy-select diy-batch-select\" placeholder=\"请选择\" clearable v-model=\"formData.authId\">\n <i-option value=\"empty\">清空所有已设置授权</i-option>\n <i-option v-for=\"item in securityList\" :key=\"item.name\" :value=\"item.id\">{{item.name}} </i-option>\n </i-select>\n </i-form-item>\n </i-form>\n </div>\n </div>\n </main>\n\n <footer slot=\"footer\">\n <template>\n <i-button class=\"diy-btn-default\" @click=\"onCancel\">取消</i-button>\n <i-button type=\"primary\" class=\"diy-btn-primary\" @click=\"onSave\">保存</i-button>\n </template>\n </footer>\n</i-modal>\n"
|
|
40813
40813
|
|
|
40814
40814
|
/***/ }),
|
|
40815
40815
|
|
|
@@ -63744,21 +63744,24 @@ function (_super) {
|
|
|
63744
63744
|
case 1:
|
|
63745
63745
|
result = _a.sent();
|
|
63746
63746
|
this.grantTypeList = (result === null || result === void 0 ? void 0 : result.result) || [];
|
|
63747
|
-
this.$subscribe("api://security-list-refresh", function () {
|
|
63747
|
+
this.$subscribe("api://security-list-refresh", function (data) {
|
|
63748
63748
|
return security_setting_v2_awaiter(_this, void 0, void 0, function () {
|
|
63749
|
+
var isBatchRefresh;
|
|
63750
|
+
|
|
63749
63751
|
var _this = this;
|
|
63750
63752
|
|
|
63751
|
-
var _a;
|
|
63753
|
+
var _a, _b;
|
|
63752
63754
|
|
|
63753
|
-
return security_setting_v2_generator(this, function (
|
|
63754
|
-
switch (
|
|
63755
|
+
return security_setting_v2_generator(this, function (_c) {
|
|
63756
|
+
switch (_c.label) {
|
|
63755
63757
|
case 0:
|
|
63758
|
+
isBatchRefresh = data.get("isBatchRefresh") || false;
|
|
63756
63759
|
return [4
|
|
63757
63760
|
/*yield*/
|
|
63758
63761
|
, this.getSecurityList()];
|
|
63759
63762
|
|
|
63760
63763
|
case 1:
|
|
63761
|
-
|
|
63764
|
+
_c.sent();
|
|
63762
63765
|
|
|
63763
63766
|
if (this.currentSecurityID) {
|
|
63764
63767
|
this.currentSecurityItemId = this.currentSecurityID;
|
|
@@ -63766,6 +63769,10 @@ function (_super) {
|
|
|
63766
63769
|
this.currentSecurityItemId = this.interfaceModel.authentication.id;
|
|
63767
63770
|
}
|
|
63768
63771
|
|
|
63772
|
+
if (((_b = this.interfaceModel.authentication) === null || _b === void 0 ? void 0 : _b.id) && isBatchRefresh) {
|
|
63773
|
+
this.currentSecurityItemId = this.interfaceModel.authentication.id;
|
|
63774
|
+
}
|
|
63775
|
+
|
|
63769
63776
|
this.currentSecurityItem = this.securityList.find(function (item) {
|
|
63770
63777
|
return item.id === _this.currentSecurityItemId;
|
|
63771
63778
|
}) || {};
|
|
@@ -65072,6 +65079,7 @@ function (_super) {
|
|
|
65072
65079
|
if (res && !res.hasError) {
|
|
65073
65080
|
this.$message.success("保存成功!");
|
|
65074
65081
|
this.$emit("on-success", true);
|
|
65082
|
+
this.$publish("api://batch-api-refresh", data);
|
|
65075
65083
|
this.onCancel();
|
|
65076
65084
|
}
|
|
65077
65085
|
|
|
@@ -65093,8 +65101,10 @@ function (_super) {
|
|
|
65093
65101
|
|
|
65094
65102
|
if (res && !res.hasError) {
|
|
65095
65103
|
this.$message.success("保存成功!"); // this.$publish("api://batch-api-refresh");
|
|
65096
|
-
// this.$publish("api://security-list-refresh");
|
|
65097
65104
|
|
|
65105
|
+
this.$publish("api://batch-api-refresh", batch_api_modal_assign(batch_api_modal_assign({}, data), {
|
|
65106
|
+
isEnvAndAuth: true
|
|
65107
|
+
}));
|
|
65098
65108
|
this.onCancel();
|
|
65099
65109
|
}
|
|
65100
65110
|
|
|
@@ -65123,6 +65133,9 @@ function (_super) {
|
|
|
65123
65133
|
if (!(res === null || res === void 0 ? void 0 : res.hasError) && !(result === null || result === void 0 ? void 0 : result.hasError)) {
|
|
65124
65134
|
this.$message.success("保存成功!");
|
|
65125
65135
|
this.$emit("on-success", true);
|
|
65136
|
+
this.$publish("api://batch-api-refresh", batch_api_modal_assign(batch_api_modal_assign({}, data), {
|
|
65137
|
+
isEnvAndAuth: true
|
|
65138
|
+
}));
|
|
65126
65139
|
this.onCancel();
|
|
65127
65140
|
}
|
|
65128
65141
|
|
|
@@ -65726,6 +65739,20 @@ function (_super) {
|
|
|
65726
65739
|
this.interfaceModel.categoryId = this.parent.id;
|
|
65727
65740
|
this.interfaceModel.projectId = this.projectId;
|
|
65728
65741
|
|
|
65742
|
+
if (!this.interfaceModel.name) {
|
|
65743
|
+
this.$message.error("接口名称不能为空");
|
|
65744
|
+
return [2
|
|
65745
|
+
/*return*/
|
|
65746
|
+
];
|
|
65747
|
+
}
|
|
65748
|
+
|
|
65749
|
+
if (!this.interfaceModel.categoryId) {
|
|
65750
|
+
this.$message.error("接口位置不能为空");
|
|
65751
|
+
return [2
|
|
65752
|
+
/*return*/
|
|
65753
|
+
];
|
|
65754
|
+
}
|
|
65755
|
+
|
|
65729
65756
|
if (this.interfaceModel.name && this.interfaceModel.name.length > 50) {
|
|
65730
65757
|
this.$message.error("接口名称长度不能超过50");
|
|
65731
65758
|
this.showInterfaceModal = true;
|
|
@@ -65991,6 +66018,9 @@ var vue_awesome_swiper = __webpack_require__("7212");
|
|
|
65991
66018
|
|
|
65992
66019
|
|
|
65993
66020
|
|
|
66021
|
+
|
|
66022
|
+
|
|
66023
|
+
|
|
65994
66024
|
|
|
65995
66025
|
|
|
65996
66026
|
|
|
@@ -66416,6 +66446,8 @@ function (_super) {
|
|
|
66416
66446
|
|
|
66417
66447
|
|
|
66418
66448
|
ProjectDetail.prototype.mounted = function () {
|
|
66449
|
+
var _this = this;
|
|
66450
|
+
|
|
66419
66451
|
this.getProjectInfo();
|
|
66420
66452
|
var _a = this.$route.query,
|
|
66421
66453
|
apiId = _a.apiId,
|
|
@@ -66427,10 +66459,103 @@ function (_super) {
|
|
|
66427
66459
|
id: apiId,
|
|
66428
66460
|
name: apiName
|
|
66429
66461
|
}, resume === "true");
|
|
66430
|
-
}
|
|
66431
|
-
|
|
66432
|
-
|
|
66462
|
+
}
|
|
66463
|
+
|
|
66464
|
+
this.$subscribe("api://batch-api-refresh", function (data) {
|
|
66465
|
+
return project_detail_awaiter(_this, void 0, void 0, function () {
|
|
66466
|
+
var ids, isEnvAndAuth, cross, _loop_1, this_1, _i, cross_1, value;
|
|
66467
|
+
|
|
66468
|
+
var _this = this;
|
|
66469
|
+
|
|
66470
|
+
return project_detail_generator(this, function (_a) {
|
|
66471
|
+
switch (_a.label) {
|
|
66472
|
+
case 0:
|
|
66473
|
+
ids = data.get("ids");
|
|
66474
|
+
isEnvAndAuth = data.get("isEnvAndAuth") || false;
|
|
66475
|
+
cross = [];
|
|
66476
|
+
this.openInterfaceList.forEach(function (item) {
|
|
66477
|
+
if (ids.includes(item.id)) {
|
|
66478
|
+
cross.push({
|
|
66479
|
+
id: item.id,
|
|
66480
|
+
name: item.name
|
|
66481
|
+
});
|
|
66482
|
+
}
|
|
66483
|
+
});
|
|
66484
|
+
if (!cross.length) return [3
|
|
66485
|
+
/*break*/
|
|
66486
|
+
, 5];
|
|
66433
66487
|
|
|
66488
|
+
_loop_1 = function _loop_1(value) {
|
|
66489
|
+
var res, result, index;
|
|
66490
|
+
return project_detail_generator(this, function (_b) {
|
|
66491
|
+
switch (_b.label) {
|
|
66492
|
+
case 0:
|
|
66493
|
+
return [4
|
|
66494
|
+
/*yield*/
|
|
66495
|
+
, this_1.service.apiInfo(value.id)];
|
|
66496
|
+
|
|
66497
|
+
case 1:
|
|
66498
|
+
res = _b.sent();
|
|
66499
|
+
result = project_detail_assign(project_detail_assign({}, res.result || {}), {
|
|
66500
|
+
name: value.name,
|
|
66501
|
+
id: value.id
|
|
66502
|
+
});
|
|
66503
|
+
index = this_1.openInterfaceList.findIndex(function (i) {
|
|
66504
|
+
return i.id === value.id;
|
|
66505
|
+
});
|
|
66506
|
+
this_1.openInterfaceList.splice(index, 1, result);
|
|
66507
|
+
return [2
|
|
66508
|
+
/*return*/
|
|
66509
|
+
];
|
|
66510
|
+
}
|
|
66511
|
+
});
|
|
66512
|
+
};
|
|
66513
|
+
|
|
66514
|
+
this_1 = this;
|
|
66515
|
+
_i = 0, cross_1 = cross;
|
|
66516
|
+
_a.label = 1;
|
|
66517
|
+
|
|
66518
|
+
case 1:
|
|
66519
|
+
if (!(_i < cross_1.length)) return [3
|
|
66520
|
+
/*break*/
|
|
66521
|
+
, 4];
|
|
66522
|
+
value = cross_1[_i];
|
|
66523
|
+
return [5
|
|
66524
|
+
/*yield**/
|
|
66525
|
+
, _loop_1(value)];
|
|
66526
|
+
|
|
66527
|
+
case 2:
|
|
66528
|
+
_a.sent();
|
|
66529
|
+
|
|
66530
|
+
_a.label = 3;
|
|
66531
|
+
|
|
66532
|
+
case 3:
|
|
66533
|
+
_i++;
|
|
66534
|
+
return [3
|
|
66535
|
+
/*break*/
|
|
66536
|
+
, 1];
|
|
66537
|
+
|
|
66538
|
+
case 4:
|
|
66539
|
+
this.active = this.openInterfaceList[this.openInterfaceList.findIndex(function (i) {
|
|
66540
|
+
return i.id === _this.current.id;
|
|
66541
|
+
})];
|
|
66542
|
+
|
|
66543
|
+
if (isEnvAndAuth) {
|
|
66544
|
+
this.$publish("api://security-list-refresh", {
|
|
66545
|
+
isBatchRefresh: true
|
|
66546
|
+
});
|
|
66547
|
+
}
|
|
66548
|
+
|
|
66549
|
+
_a.label = 5;
|
|
66550
|
+
|
|
66551
|
+
case 5:
|
|
66552
|
+
return [2
|
|
66553
|
+
/*return*/
|
|
66554
|
+
];
|
|
66555
|
+
}
|
|
66556
|
+
});
|
|
66557
|
+
});
|
|
66558
|
+
});
|
|
66434
66559
|
};
|
|
66435
66560
|
|
|
66436
66561
|
ProjectDetail.prototype.activated = function () {
|