@egova/egova-api 1.1.9 → 1.2.1
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 +72 -17
- package/dist/index.umd.js +72 -17
- package/dist/index.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/index.common.js
CHANGED
|
@@ -3989,7 +3989,7 @@ module.exports = DESCRIPTORS && fails(function () {
|
|
|
3989
3989
|
/***/ "ccf6":
|
|
3990
3990
|
/***/ (function(module, exports) {
|
|
3991
3991
|
|
|
3992
|
-
module.exports = "<!DOCTYPE html>\
|
|
3992
|
+
module.exports = "<!DOCTYPE html>\n<article class=\"v-api-combine-wrapper\">\n <i-split v-model=\"split\" min=\"200px\" max=\"1100px\">\n <!-- 左侧内容 -->\n <section slot=\"left\" class=\"left-split-pane\">\n <u-type-tree :taskCategoryID=\"taskCategoryID\" :initSelectItem=\"initNode\" @on-import-success=\"onQuery\" @on-select=\"onNodeSelect\" @on-tree-data=\"onTreeData\">\n </u-type-tree>\n </section>\n <!-- 分割线 -->\n <section class=\"trigger\" slot=\"trigger\"></section>\n <!-- 右侧内容 -->\n <section slot=\"right\" class=\"right-split-pane\">\n <section class=\"search-wrapper\">\n <i-form class=\"diy-search-form\" ref=\"searchForm\" :model=\"formData\" label-position=\"left\" label-colon>\n <i-form-item label=\"名称\" prop=\"name\">\n <i-input class=\"diy-input\" v-model=\"formData.name\"></i-input>\n </i-form-item>\n <i-form-item label=\"编码\" prop=\"code\">\n <i-input class=\"diy-input\" v-model=\"formData.code\"></i-input>\n </i-form-item>\n </i-form>\n <div class=\"btns\">\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click=\"onQuery\">查询</i-button>\n <i-button class=\"diy-btn-default\" @click=\"onReset\">重置</i-button>\n </div>\n </section>\n <section class=\"actions-wrapper\">\n <div class=\"action-item action-text\" @click=\"onAdd()\" :class=\"currentNode.id === 'virtual_root_directory' ? 'icon-button-disabled' : ''\">\n <i class=\"iconfont icon-add\"></i>\n <div>新增</div>\n </div>\n <div class=\"action-item action-text\" :class=\"(selection.length && !isContainsPublished) ? '' : 'icon-button-disabled'\" @click=\"onBatchDelete\">\n <i class=\"iconfont icon-delete\"></i>\n <span>批量删除</span>\n </div>\n </section>\n <section class=\"main-wrapper\">\n <template v-if=\"list&&list.length\">\n <i-table class=\"diy-table diy-table-scorll\" :columns=\"columns\" :data=\"list\" @on-selection-change=\"onSelectChange\" @on-row-click=\"onRowClick\">\n <template slot=\"status\" slot-scope=\"{row,index}\">\n <i-switch class=\"diy-switch\" :value=\"row.status==='PUBLISHED'\" @on-change=\"onStatusChange($event, row, index)\"></i-switch>\n <span>{{row.status===\"PUBLISHED\" ? \"已发布\" : \"未发布\"}}</span>\n </template>\n <template slot=\"requireAuth\" slot-scope=\"{row,index}\">\n <i-switch class=\"diy-switch\" :value=\"row.requireAuth\" :true-value=\"1\" :false-value=\"0\" @on-change=\"onRequireAuthChange($event, row, index)\">\n <span slot=\"open\">是</span>\n <span slot=\"close\">否</span>\n </i-switch>\n </template>\n <template slot=\"doc\" slot-scope=\"{row}\">\n <a @click=\"onOpenDoc(row)\">查看</a>\n </template>\n <template #operates=\"{row,index}\">\n <div class=\"row-actions\">\n <i @click=\"onDetail(row)\" title=\"查看\" class=\"iconfont icon-a-xinzengzhibiaobeifen9\"></i>\n <i @click=\"onCopy(row)\" title=\"复制\" class=\"iconfont icon-fuzhi1\"> </i>\n <template v-if=\"row.status!=='PUBLISHED'\">\n <i @click=\"onEdit(row)\" title=\"编辑\" class=\"iconfont icon-Edit\"></i>\n <i-poptip confirm transfer title=\"确认要删除这条数据吗?\" @on-ok=\"onDelete(row)\">\n <i title=\"删除\" class=\"iconfont icon-delete\"></i>\n </i-poptip>\n </template>\n </div>\n </template>\n </i-table>\n <i-page\n class=\"diy-page\"\n show-total\n show-sizer\n show-elevator\n :total=\"paging.totalCount\"\n :current=\"paging.pageIndex\"\n :page-size=\"paging.pageSize\"\n @on-change=\"onPageIndexChange\"\n @on-page-size-change=\"onPageSizeChange\"\n ></i-page>\n </template>\n <template v-else>\n <div class=\"table-no-data\">\n <div class=\"table-no-data-bg\"></div>\n <div class=\"table-no-data-text\">暂无数据</div>\n </div>\n </template>\n </section>\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 <u-data-model-doc v-model=\"docShow\" :doc=\"doc\"></u-data-model-doc>\n <i-modal draggable sticky reset-drag-position v-model=\"showCopyModal\" class=\"diy-modal combine-copy-modal\" :mask-closable=\"false\" title=\"复制接口\">\n <i-form :label-width=\"100\" class=\"diy-form\" v-model=\"copyData\" label-colon>\n <i-form-item label=\"接口名称\" required>\n <i-input class=\"diy-input\" v-model=\"copyData.name\"></i-input>\n </i-form-item>\n <i-form-item label=\"接口编码\" required>\n <i-input class=\"diy-input\" v-model=\"copyData.code\"></i-input>\n </i-form-item>\n <i-form-item label=\"选择分组\" required>\n <u-tree-selector :treeData=\"treeData\" leaf-name=\"copy\" :canChooseFolder=\"true\" v-model=\"categoryData.id\" @on-select=\"selectCategory\"> </u-tree-selector>\n </i-form-item>\n </i-form>\n <footer slot=\"footer\">\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click=\"onCopyConfirm\">确定</i-button>\n <i-button class=\"diy-btn-default\" @click=\"onCopyCancel\">取消</i-button>\n </footer>\n </i-modal>\n</article>\n"
|
|
3993
3993
|
|
|
3994
3994
|
/***/ }),
|
|
3995
3995
|
|
|
@@ -4528,8 +4528,18 @@ var flagwind_web_ = __webpack_require__("6397");
|
|
|
4528
4528
|
var external_js_cookie_ = __webpack_require__("be65");
|
|
4529
4529
|
var external_js_cookie_default = /*#__PURE__*/__webpack_require__.n(external_js_cookie_);
|
|
4530
4530
|
|
|
4531
|
+
// CONCATENATED MODULE: ./src/common/utils/setting-util.ts
|
|
4532
|
+
|
|
4533
|
+
function getToken() {
|
|
4534
|
+
var accessToken = external_js_cookie_default.a.get("dex-web:access_token") || external_js_cookie_default.a.get("bigdata-web:access_token") || external_js_cookie_default.a.get("access_token");
|
|
4535
|
+
if (!accessToken) {
|
|
4536
|
+
accessToken = localStorage.getItem("dex-web:access_token") || localStorage.getItem("bigdata-web:access_token") || localStorage.getItem("access_token") || "";
|
|
4537
|
+
}
|
|
4538
|
+
return accessToken;
|
|
4539
|
+
}
|
|
4531
4540
|
// CONCATENATED MODULE: ./src/common/utils/login-util.ts
|
|
4532
4541
|
|
|
4542
|
+
|
|
4533
4543
|
/**
|
|
4534
4544
|
* 标签工具类
|
|
4535
4545
|
*
|
|
@@ -4542,7 +4552,7 @@ var login_util_LoginUtil = /** @class */function () {
|
|
|
4542
4552
|
* 是否登录
|
|
4543
4553
|
*/
|
|
4544
4554
|
LoginUtil.isLogin = function () {
|
|
4545
|
-
return
|
|
4555
|
+
return getToken() !== undefined;
|
|
4546
4556
|
};
|
|
4547
4557
|
LoginUtil.getRemeberLoginName = function () {
|
|
4548
4558
|
var userName = external_js_cookie_default.a.get("remember_login_name");
|
|
@@ -5058,6 +5068,13 @@ var service_Service = /** @class */function (_super) {
|
|
|
5058
5068
|
Service.prototype.getDoc = function (id) {
|
|
5059
5069
|
return this._get("/unity/combine-info/".concat(id, "/doc"));
|
|
5060
5070
|
};
|
|
5071
|
+
Service.prototype.changeRequireAuth = function (id, requireAuth) {
|
|
5072
|
+
return __awaiter(this, void 0, Promise, function () {
|
|
5073
|
+
return __generator(this, function (_a) {
|
|
5074
|
+
return [2 /*return*/, this._post("/unity/combine-info/requireauth/changestatus?id=".concat(id, "&requireAuth=").concat(requireAuth))];
|
|
5075
|
+
});
|
|
5076
|
+
});
|
|
5077
|
+
};
|
|
5061
5078
|
Service.prototype.changeStatus = function (id, status) {
|
|
5062
5079
|
return __awaiter(this, void 0, Promise, function () {
|
|
5063
5080
|
return __generator(this, function (_a) {
|
|
@@ -5096,6 +5113,9 @@ var service_Service = /** @class */function (_super) {
|
|
|
5096
5113
|
__decorate([serviceHandler("get", {
|
|
5097
5114
|
title: "获取文档"
|
|
5098
5115
|
})], Service.prototype, "getDoc", null);
|
|
5116
|
+
__decorate([serviceHandler("save", {
|
|
5117
|
+
title: "保存数据"
|
|
5118
|
+
})], Service.prototype, "changeRequireAuth", null);
|
|
5099
5119
|
__decorate([serviceHandler("save", {
|
|
5100
5120
|
title: "保存数据"
|
|
5101
5121
|
})], Service.prototype, "changeStatus", null);
|
|
@@ -5824,7 +5844,7 @@ var node_TreeNode = /** @class */function (_super) {
|
|
|
5824
5844
|
});
|
|
5825
5845
|
Object.defineProperty(TreeNode.prototype, "headers", {
|
|
5826
5846
|
get: function () {
|
|
5827
|
-
var token =
|
|
5847
|
+
var token = getToken();
|
|
5828
5848
|
return {
|
|
5829
5849
|
Authorization: "Bearer " + token
|
|
5830
5850
|
};
|
|
@@ -5933,7 +5953,7 @@ var tree_Tree = /** @class */function (_super) {
|
|
|
5933
5953
|
});
|
|
5934
5954
|
Object.defineProperty(Tree.prototype, "headers", {
|
|
5935
5955
|
get: function () {
|
|
5936
|
-
var token =
|
|
5956
|
+
var token = getToken();
|
|
5937
5957
|
return {
|
|
5938
5958
|
Authorization: "Bearer " + token
|
|
5939
5959
|
};
|
|
@@ -6436,43 +6456,57 @@ var project_combine_ProjectCombineManage = /** @class */function (_super) {
|
|
|
6436
6456
|
_this.columns = [{
|
|
6437
6457
|
type: "selection",
|
|
6438
6458
|
align: "center",
|
|
6439
|
-
width:
|
|
6459
|
+
width: window.pageRatio * 80
|
|
6440
6460
|
}, {
|
|
6441
6461
|
title: "名称",
|
|
6442
6462
|
key: "name",
|
|
6443
6463
|
align: "left",
|
|
6444
6464
|
class: "STRING",
|
|
6445
6465
|
ellipsis: true,
|
|
6446
|
-
tooltip: true
|
|
6466
|
+
tooltip: true,
|
|
6467
|
+
width: window.pageRatio * 225,
|
|
6468
|
+
resizable: true
|
|
6447
6469
|
}, {
|
|
6448
6470
|
title: "编码",
|
|
6449
6471
|
key: "code",
|
|
6450
6472
|
align: "left",
|
|
6451
6473
|
class: "STRING",
|
|
6452
6474
|
ellipsis: true,
|
|
6453
|
-
tooltip: true
|
|
6475
|
+
tooltip: true,
|
|
6476
|
+
width: window.pageRatio * 225,
|
|
6477
|
+
resizable: true
|
|
6454
6478
|
}, {
|
|
6455
6479
|
title: "描述",
|
|
6456
6480
|
key: "description",
|
|
6457
6481
|
align: "left",
|
|
6458
6482
|
class: "STRING",
|
|
6459
6483
|
ellipsis: true,
|
|
6460
|
-
tooltip: true
|
|
6484
|
+
tooltip: true,
|
|
6485
|
+
width: window.pageRatio * 225,
|
|
6486
|
+
resizable: true
|
|
6487
|
+
}, {
|
|
6488
|
+
title: "是否需要认证",
|
|
6489
|
+
align: "left",
|
|
6490
|
+
slot: "requireAuth",
|
|
6491
|
+
width: window.pageRatio * 160,
|
|
6492
|
+
resizable: true
|
|
6461
6493
|
}, {
|
|
6462
6494
|
title: "发布状态",
|
|
6463
6495
|
align: "left",
|
|
6464
6496
|
slot: "status",
|
|
6465
|
-
width:
|
|
6497
|
+
width: window.pageRatio * 180,
|
|
6498
|
+
resizable: true
|
|
6466
6499
|
}, {
|
|
6467
6500
|
title: "接口文档",
|
|
6468
6501
|
align: "left",
|
|
6469
6502
|
slot: "doc",
|
|
6470
|
-
width:
|
|
6503
|
+
width: window.pageRatio * 120,
|
|
6504
|
+
resizable: true
|
|
6471
6505
|
}, {
|
|
6472
6506
|
title: "操作",
|
|
6473
6507
|
align: "left",
|
|
6474
6508
|
slot: "operates",
|
|
6475
|
-
width:
|
|
6509
|
+
width: window.pageRatio * 180
|
|
6476
6510
|
}];
|
|
6477
6511
|
_this.paging = {
|
|
6478
6512
|
pageIndex: 1,
|
|
@@ -6706,6 +6740,27 @@ var project_combine_ProjectCombineManage = /** @class */function (_super) {
|
|
|
6706
6740
|
this.categoryData = node;
|
|
6707
6741
|
this.copyData.categoryId = node.id;
|
|
6708
6742
|
};
|
|
6743
|
+
ProjectCombineManage.prototype.onRequireAuthChange = function (value, row, index) {
|
|
6744
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6745
|
+
var id, res;
|
|
6746
|
+
return __generator(this, function (_a) {
|
|
6747
|
+
switch (_a.label) {
|
|
6748
|
+
case 0:
|
|
6749
|
+
id = row.id;
|
|
6750
|
+
if (!id) {
|
|
6751
|
+
return [2 /*return*/];
|
|
6752
|
+
}
|
|
6753
|
+
return [4 /*yield*/, this.service.changeRequireAuth(id, value ? 1 : 0)];
|
|
6754
|
+
case 1:
|
|
6755
|
+
res = _a.sent();
|
|
6756
|
+
if (!(res === null || res === void 0 ? void 0 : res.hasError)) {
|
|
6757
|
+
row.requireAuth = value ? 1 : 0;
|
|
6758
|
+
}
|
|
6759
|
+
return [2 /*return*/];
|
|
6760
|
+
}
|
|
6761
|
+
});
|
|
6762
|
+
});
|
|
6763
|
+
};
|
|
6709
6764
|
ProjectCombineManage.prototype.onStatusChange = function (value, row, index) {
|
|
6710
6765
|
return __awaiter(this, void 0, void 0, function () {
|
|
6711
6766
|
var id, res;
|
|
@@ -6720,10 +6775,6 @@ var project_combine_ProjectCombineManage = /** @class */function (_super) {
|
|
|
6720
6775
|
case 1:
|
|
6721
6776
|
res = _a.sent();
|
|
6722
6777
|
if (!(res === null || res === void 0 ? void 0 : res.hasError)) {
|
|
6723
|
-
// const res = await this.service.getById(id);
|
|
6724
|
-
// if (!res?.result) {
|
|
6725
|
-
// this.list.splice(index, 1, res.result);
|
|
6726
|
-
// }
|
|
6727
6778
|
row.status = value ? "PUBLISHED" : "NOT_PUBLISHED";
|
|
6728
6779
|
}
|
|
6729
6780
|
return [2 /*return*/];
|
|
@@ -8460,6 +8511,7 @@ var combine_model_ProjectCombineModel = /** @class */function (_super) {
|
|
|
8460
8511
|
function ProjectCombineModel() {
|
|
8461
8512
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
8462
8513
|
_this.model = {
|
|
8514
|
+
requireAuth: 1,
|
|
8463
8515
|
type: "SCRIPT",
|
|
8464
8516
|
status: "NOT_PUBLISHED",
|
|
8465
8517
|
relations: [],
|
|
@@ -8584,6 +8636,9 @@ var combine_model_ProjectCombineModel = /** @class */function (_super) {
|
|
|
8584
8636
|
res = _a.sent();
|
|
8585
8637
|
if (!(res === null || res === void 0 ? void 0 : res.hasError)) {
|
|
8586
8638
|
this.model = res.result;
|
|
8639
|
+
if (!this.model.requireAuth) {
|
|
8640
|
+
this.model.requireAuth = 0;
|
|
8641
|
+
}
|
|
8587
8642
|
}
|
|
8588
8643
|
_a.label = 2;
|
|
8589
8644
|
case 2:
|
|
@@ -9218,7 +9273,7 @@ var project_list_ProjectList = /** @class */function (_super) {
|
|
|
9218
9273
|
};
|
|
9219
9274
|
Object.defineProperty(ProjectList.prototype, "headers", {
|
|
9220
9275
|
get: function () {
|
|
9221
|
-
var token =
|
|
9276
|
+
var token = getToken();
|
|
9222
9277
|
return {
|
|
9223
9278
|
Authorization: "Bearer " + token
|
|
9224
9279
|
};
|
|
@@ -13620,7 +13675,7 @@ module.exports = "<div class=\"v-parameter-list-container\">\r\n <main>\r\n
|
|
|
13620
13675
|
/***/ "d8e7":
|
|
13621
13676
|
/***/ (function(module, exports) {
|
|
13622
13677
|
|
|
13623
|
-
module.exports = "<!DOCTYPE html>\
|
|
13678
|
+
module.exports = "<!DOCTYPE html>\n<article class=\"v-api-combine-info-wrapper\">\n <header class=\"header\">\n {{title}}\n </header>\n <main>\n <i-form ref=\"form\" class=\"info-form\" :model=\"model\" :rules=\"rules\">\n <i-row>\n <section class=\"title-g\">基本信息</section>\n <i-form-item label=\"名称:\" prop=\"name\">\n <i-input class=\"diy-input\" placeholder=\"请输入名称\" v-model=\"model.name\" :disabled=\"!isEdit\"></i-input>\n </i-form-item>\n <i-form-item label=\"编码:\" prop=\"code\">\n <i-input class=\"diy-input\" placeholder=\"请输入编码\" v-model=\"model.code\" :disabled=\"!isEdit\"></i-input>\n </i-form-item>\n <i-form-item label=\"是否需要认证:\" prop=\"requireAuth\">\n <i-switch class=\"diy-switch\" :disabled=\"!isEdit\" :true-value=\"1\" :false-value=\"0\" v-model=\"model.requireAuth\">\n <span slot=\"open\">是</span>\n <span slot=\"close\">否</span>\n </i-switch>\n </i-form-item>\n <i-form-item class=\"full-width\" label=\"描述:\">\n <i-input type=\"textarea\" class=\"diy-input-textarea\" :rows=\"1\" placeholder=\"请输入描述\" v-model=\"model.description\" :disabled=\"!isEdit\"></i-input>\n </i-form-item>\n </i-row>\n <i-row>\n <section class=\"title-g\">待合并列表</section>\n <section class=\"to-combine-list\">\n <template v-if=\"isEdit\">\n <i-button class=\"diy-btn-default\" @click=\"onAddDataModel\">添加数据模型</i-button>\n <i-button class=\"diy-btn-default\" @click=\"onAddApiProject\">添加 API</i-button>\n </template>\n <template v-if=\"model.relations&&model.relations.length\">\n <i-table class=\"diy-table\" :columns=\"relationColumns\" :data=\"model.relations\">\n <template #type=\"{row}\">\n <span>{{row.type==='MODEL'?'数据模型':row.type==='API'?'API':''}}</span>\n </template>\n <template #operates=\"{row,index}\">\n <div class=\"row-actions\">\n <i title=\"查看\" class=\"iconfont icon-rizhichakan\" @click=\"onDetail(row)\"></i>\n <i-poptip v-if=\"isEdit\" confirm transfer title=\"确认删除这条数据吗?\" @on-ok=\"onRelationDelete(row)\">\n <i title=\"删除\" class=\"iconfont icon-delete\"></i>\n </i-poptip>\n </div>\n </template>\n </i-table>\n </template>\n <template v-else>\n <div class=\"table-no-data\">\n <div class=\"table-no-data-bg\"></div>\n <div class=\"table-no-data-text\">暂无数据</div>\n </div>\n </template>\n </section>\n </i-row>\n <i-row>\n <section class=\"title-g\">参数详情</section>\n <section class=\"parameter-detail\">\n <section class=\"card-panel card-panel-no-right-border\">\n <i-tabs>\n <i-tab-pane label=\"请求参数\" name=\"request\">\n <u-request-parameter-list :data=\"model.reqParams\" :isEdit=\"isEdit\"></u-request-parameter-list>\n </i-tab-pane>\n <i-tab-pane label=\"响应参数\" name=\"response\">\n <u-response-parameter-list :data=\"model.respParams\" :isEdit=\"isEdit\"></u-response-parameter-list>\n </i-tab-pane>\n </i-tabs>\n </section>\n <section class=\"card-panel\">\n <div class=\"card-panel-header\">\n <div>\n <span>执行脚本</span>\n <i-icon class=\"help-icon\" type=\"md-alert\" @click=\"onOpenDoc\" title=\"帮助文档\"> </i-icon>\n </div>\n <span class=\"action-text\" @click.stop=\"onOpenTest\">\n <i class=\"iconfont icon-run\"></i>\n <span>试运行</span>\n </span>\n </div>\n <div class=\"card-panel-main\">\n <u-base-editor class=\"editor\" :data.sync=\"model.content\" :readOnly=\"!isEdit\"></u-base-editor>\n </div>\n </section>\n </section>\n </i-row>\n </i-form>\n </main>\n <footer>\n <template v-if=\"isEdit\">\n <i-button type=\"primary\" class=\"diy-btn-primary\" @click.stop=\"onSave\">确定</i-button>\n <i-button type=\"text\" class=\"diy-btn-text\" @click.stop=\"onBack\">取消</i-button>\n </template>\n <template v-else>\n <i-button type=\"primary\" class=\"diy-btn-primary\" @click.stop=\"onBack\">关闭</i-button>\n </template>\n </footer>\n <u-data-model-modal v-model=\"dataModelShow\" :data=\"dataModelRelations\" @save=\"onRelationsSave\"></u-data-model-modal>\n <u-api-project-modal v-model=\"apiProjectShow\" :data=\"apiProjectRelations\" @save=\"onRelationsSave\"></u-api-project-modal>\n <u-data-model-doc-modal v-model=\"dataModelDocShow\" :doc=\"dataModelDoc\"></u-data-model-doc-modal>\n <u-api-project-detail-modal :visiable.sync=\"apiProjectDetailShow\" :model=\"apiProjectDetail\"></u-api-project-detail-modal>\n <u-test-run-modal :visible.sync=\"testShow\" :params=\"model.reqParams\" :data=\"testResult\" @on-run=\"onTestRun\"></u-test-run-modal>\n <u-data-model-doc v-model=\"docShow\" :doc=\"doc\"></u-data-model-doc>\n</article>\n"
|
|
13624
13679
|
|
|
13625
13680
|
/***/ }),
|
|
13626
13681
|
|
package/dist/index.umd.js
CHANGED
|
@@ -3998,7 +3998,7 @@ module.exports = DESCRIPTORS && fails(function () {
|
|
|
3998
3998
|
/***/ "ccf6":
|
|
3999
3999
|
/***/ (function(module, exports) {
|
|
4000
4000
|
|
|
4001
|
-
module.exports = "<!DOCTYPE html>\
|
|
4001
|
+
module.exports = "<!DOCTYPE html>\n<article class=\"v-api-combine-wrapper\">\n <i-split v-model=\"split\" min=\"200px\" max=\"1100px\">\n <!-- 左侧内容 -->\n <section slot=\"left\" class=\"left-split-pane\">\n <u-type-tree :taskCategoryID=\"taskCategoryID\" :initSelectItem=\"initNode\" @on-import-success=\"onQuery\" @on-select=\"onNodeSelect\" @on-tree-data=\"onTreeData\">\n </u-type-tree>\n </section>\n <!-- 分割线 -->\n <section class=\"trigger\" slot=\"trigger\"></section>\n <!-- 右侧内容 -->\n <section slot=\"right\" class=\"right-split-pane\">\n <section class=\"search-wrapper\">\n <i-form class=\"diy-search-form\" ref=\"searchForm\" :model=\"formData\" label-position=\"left\" label-colon>\n <i-form-item label=\"名称\" prop=\"name\">\n <i-input class=\"diy-input\" v-model=\"formData.name\"></i-input>\n </i-form-item>\n <i-form-item label=\"编码\" prop=\"code\">\n <i-input class=\"diy-input\" v-model=\"formData.code\"></i-input>\n </i-form-item>\n </i-form>\n <div class=\"btns\">\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click=\"onQuery\">查询</i-button>\n <i-button class=\"diy-btn-default\" @click=\"onReset\">重置</i-button>\n </div>\n </section>\n <section class=\"actions-wrapper\">\n <div class=\"action-item action-text\" @click=\"onAdd()\" :class=\"currentNode.id === 'virtual_root_directory' ? 'icon-button-disabled' : ''\">\n <i class=\"iconfont icon-add\"></i>\n <div>新增</div>\n </div>\n <div class=\"action-item action-text\" :class=\"(selection.length && !isContainsPublished) ? '' : 'icon-button-disabled'\" @click=\"onBatchDelete\">\n <i class=\"iconfont icon-delete\"></i>\n <span>批量删除</span>\n </div>\n </section>\n <section class=\"main-wrapper\">\n <template v-if=\"list&&list.length\">\n <i-table class=\"diy-table diy-table-scorll\" :columns=\"columns\" :data=\"list\" @on-selection-change=\"onSelectChange\" @on-row-click=\"onRowClick\">\n <template slot=\"status\" slot-scope=\"{row,index}\">\n <i-switch class=\"diy-switch\" :value=\"row.status==='PUBLISHED'\" @on-change=\"onStatusChange($event, row, index)\"></i-switch>\n <span>{{row.status===\"PUBLISHED\" ? \"已发布\" : \"未发布\"}}</span>\n </template>\n <template slot=\"requireAuth\" slot-scope=\"{row,index}\">\n <i-switch class=\"diy-switch\" :value=\"row.requireAuth\" :true-value=\"1\" :false-value=\"0\" @on-change=\"onRequireAuthChange($event, row, index)\">\n <span slot=\"open\">是</span>\n <span slot=\"close\">否</span>\n </i-switch>\n </template>\n <template slot=\"doc\" slot-scope=\"{row}\">\n <a @click=\"onOpenDoc(row)\">查看</a>\n </template>\n <template #operates=\"{row,index}\">\n <div class=\"row-actions\">\n <i @click=\"onDetail(row)\" title=\"查看\" class=\"iconfont icon-a-xinzengzhibiaobeifen9\"></i>\n <i @click=\"onCopy(row)\" title=\"复制\" class=\"iconfont icon-fuzhi1\"> </i>\n <template v-if=\"row.status!=='PUBLISHED'\">\n <i @click=\"onEdit(row)\" title=\"编辑\" class=\"iconfont icon-Edit\"></i>\n <i-poptip confirm transfer title=\"确认要删除这条数据吗?\" @on-ok=\"onDelete(row)\">\n <i title=\"删除\" class=\"iconfont icon-delete\"></i>\n </i-poptip>\n </template>\n </div>\n </template>\n </i-table>\n <i-page\n class=\"diy-page\"\n show-total\n show-sizer\n show-elevator\n :total=\"paging.totalCount\"\n :current=\"paging.pageIndex\"\n :page-size=\"paging.pageSize\"\n @on-change=\"onPageIndexChange\"\n @on-page-size-change=\"onPageSizeChange\"\n ></i-page>\n </template>\n <template v-else>\n <div class=\"table-no-data\">\n <div class=\"table-no-data-bg\"></div>\n <div class=\"table-no-data-text\">暂无数据</div>\n </div>\n </template>\n </section>\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 <u-data-model-doc v-model=\"docShow\" :doc=\"doc\"></u-data-model-doc>\n <i-modal draggable sticky reset-drag-position v-model=\"showCopyModal\" class=\"diy-modal combine-copy-modal\" :mask-closable=\"false\" title=\"复制接口\">\n <i-form :label-width=\"100\" class=\"diy-form\" v-model=\"copyData\" label-colon>\n <i-form-item label=\"接口名称\" required>\n <i-input class=\"diy-input\" v-model=\"copyData.name\"></i-input>\n </i-form-item>\n <i-form-item label=\"接口编码\" required>\n <i-input class=\"diy-input\" v-model=\"copyData.code\"></i-input>\n </i-form-item>\n <i-form-item label=\"选择分组\" required>\n <u-tree-selector :treeData=\"treeData\" leaf-name=\"copy\" :canChooseFolder=\"true\" v-model=\"categoryData.id\" @on-select=\"selectCategory\"> </u-tree-selector>\n </i-form-item>\n </i-form>\n <footer slot=\"footer\">\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click=\"onCopyConfirm\">确定</i-button>\n <i-button class=\"diy-btn-default\" @click=\"onCopyCancel\">取消</i-button>\n </footer>\n </i-modal>\n</article>\n"
|
|
4002
4002
|
|
|
4003
4003
|
/***/ }),
|
|
4004
4004
|
|
|
@@ -4537,8 +4537,18 @@ var flagwind_web_ = __webpack_require__("6397");
|
|
|
4537
4537
|
var external_js_cookie_ = __webpack_require__("be65");
|
|
4538
4538
|
var external_js_cookie_default = /*#__PURE__*/__webpack_require__.n(external_js_cookie_);
|
|
4539
4539
|
|
|
4540
|
+
// CONCATENATED MODULE: ./src/common/utils/setting-util.ts
|
|
4541
|
+
|
|
4542
|
+
function getToken() {
|
|
4543
|
+
var accessToken = external_js_cookie_default.a.get("dex-web:access_token") || external_js_cookie_default.a.get("bigdata-web:access_token") || external_js_cookie_default.a.get("access_token");
|
|
4544
|
+
if (!accessToken) {
|
|
4545
|
+
accessToken = localStorage.getItem("dex-web:access_token") || localStorage.getItem("bigdata-web:access_token") || localStorage.getItem("access_token") || "";
|
|
4546
|
+
}
|
|
4547
|
+
return accessToken;
|
|
4548
|
+
}
|
|
4540
4549
|
// CONCATENATED MODULE: ./src/common/utils/login-util.ts
|
|
4541
4550
|
|
|
4551
|
+
|
|
4542
4552
|
/**
|
|
4543
4553
|
* 标签工具类
|
|
4544
4554
|
*
|
|
@@ -4551,7 +4561,7 @@ var login_util_LoginUtil = /** @class */function () {
|
|
|
4551
4561
|
* 是否登录
|
|
4552
4562
|
*/
|
|
4553
4563
|
LoginUtil.isLogin = function () {
|
|
4554
|
-
return
|
|
4564
|
+
return getToken() !== undefined;
|
|
4555
4565
|
};
|
|
4556
4566
|
LoginUtil.getRemeberLoginName = function () {
|
|
4557
4567
|
var userName = external_js_cookie_default.a.get("remember_login_name");
|
|
@@ -5067,6 +5077,13 @@ var service_Service = /** @class */function (_super) {
|
|
|
5067
5077
|
Service.prototype.getDoc = function (id) {
|
|
5068
5078
|
return this._get("/unity/combine-info/".concat(id, "/doc"));
|
|
5069
5079
|
};
|
|
5080
|
+
Service.prototype.changeRequireAuth = function (id, requireAuth) {
|
|
5081
|
+
return __awaiter(this, void 0, Promise, function () {
|
|
5082
|
+
return __generator(this, function (_a) {
|
|
5083
|
+
return [2 /*return*/, this._post("/unity/combine-info/requireauth/changestatus?id=".concat(id, "&requireAuth=").concat(requireAuth))];
|
|
5084
|
+
});
|
|
5085
|
+
});
|
|
5086
|
+
};
|
|
5070
5087
|
Service.prototype.changeStatus = function (id, status) {
|
|
5071
5088
|
return __awaiter(this, void 0, Promise, function () {
|
|
5072
5089
|
return __generator(this, function (_a) {
|
|
@@ -5105,6 +5122,9 @@ var service_Service = /** @class */function (_super) {
|
|
|
5105
5122
|
__decorate([serviceHandler("get", {
|
|
5106
5123
|
title: "获取文档"
|
|
5107
5124
|
})], Service.prototype, "getDoc", null);
|
|
5125
|
+
__decorate([serviceHandler("save", {
|
|
5126
|
+
title: "保存数据"
|
|
5127
|
+
})], Service.prototype, "changeRequireAuth", null);
|
|
5108
5128
|
__decorate([serviceHandler("save", {
|
|
5109
5129
|
title: "保存数据"
|
|
5110
5130
|
})], Service.prototype, "changeStatus", null);
|
|
@@ -5833,7 +5853,7 @@ var node_TreeNode = /** @class */function (_super) {
|
|
|
5833
5853
|
});
|
|
5834
5854
|
Object.defineProperty(TreeNode.prototype, "headers", {
|
|
5835
5855
|
get: function () {
|
|
5836
|
-
var token =
|
|
5856
|
+
var token = getToken();
|
|
5837
5857
|
return {
|
|
5838
5858
|
Authorization: "Bearer " + token
|
|
5839
5859
|
};
|
|
@@ -5942,7 +5962,7 @@ var tree_Tree = /** @class */function (_super) {
|
|
|
5942
5962
|
});
|
|
5943
5963
|
Object.defineProperty(Tree.prototype, "headers", {
|
|
5944
5964
|
get: function () {
|
|
5945
|
-
var token =
|
|
5965
|
+
var token = getToken();
|
|
5946
5966
|
return {
|
|
5947
5967
|
Authorization: "Bearer " + token
|
|
5948
5968
|
};
|
|
@@ -6445,43 +6465,57 @@ var project_combine_ProjectCombineManage = /** @class */function (_super) {
|
|
|
6445
6465
|
_this.columns = [{
|
|
6446
6466
|
type: "selection",
|
|
6447
6467
|
align: "center",
|
|
6448
|
-
width:
|
|
6468
|
+
width: window.pageRatio * 80
|
|
6449
6469
|
}, {
|
|
6450
6470
|
title: "名称",
|
|
6451
6471
|
key: "name",
|
|
6452
6472
|
align: "left",
|
|
6453
6473
|
class: "STRING",
|
|
6454
6474
|
ellipsis: true,
|
|
6455
|
-
tooltip: true
|
|
6475
|
+
tooltip: true,
|
|
6476
|
+
width: window.pageRatio * 225,
|
|
6477
|
+
resizable: true
|
|
6456
6478
|
}, {
|
|
6457
6479
|
title: "编码",
|
|
6458
6480
|
key: "code",
|
|
6459
6481
|
align: "left",
|
|
6460
6482
|
class: "STRING",
|
|
6461
6483
|
ellipsis: true,
|
|
6462
|
-
tooltip: true
|
|
6484
|
+
tooltip: true,
|
|
6485
|
+
width: window.pageRatio * 225,
|
|
6486
|
+
resizable: true
|
|
6463
6487
|
}, {
|
|
6464
6488
|
title: "描述",
|
|
6465
6489
|
key: "description",
|
|
6466
6490
|
align: "left",
|
|
6467
6491
|
class: "STRING",
|
|
6468
6492
|
ellipsis: true,
|
|
6469
|
-
tooltip: true
|
|
6493
|
+
tooltip: true,
|
|
6494
|
+
width: window.pageRatio * 225,
|
|
6495
|
+
resizable: true
|
|
6496
|
+
}, {
|
|
6497
|
+
title: "是否需要认证",
|
|
6498
|
+
align: "left",
|
|
6499
|
+
slot: "requireAuth",
|
|
6500
|
+
width: window.pageRatio * 160,
|
|
6501
|
+
resizable: true
|
|
6470
6502
|
}, {
|
|
6471
6503
|
title: "发布状态",
|
|
6472
6504
|
align: "left",
|
|
6473
6505
|
slot: "status",
|
|
6474
|
-
width:
|
|
6506
|
+
width: window.pageRatio * 180,
|
|
6507
|
+
resizable: true
|
|
6475
6508
|
}, {
|
|
6476
6509
|
title: "接口文档",
|
|
6477
6510
|
align: "left",
|
|
6478
6511
|
slot: "doc",
|
|
6479
|
-
width:
|
|
6512
|
+
width: window.pageRatio * 120,
|
|
6513
|
+
resizable: true
|
|
6480
6514
|
}, {
|
|
6481
6515
|
title: "操作",
|
|
6482
6516
|
align: "left",
|
|
6483
6517
|
slot: "operates",
|
|
6484
|
-
width:
|
|
6518
|
+
width: window.pageRatio * 180
|
|
6485
6519
|
}];
|
|
6486
6520
|
_this.paging = {
|
|
6487
6521
|
pageIndex: 1,
|
|
@@ -6715,6 +6749,27 @@ var project_combine_ProjectCombineManage = /** @class */function (_super) {
|
|
|
6715
6749
|
this.categoryData = node;
|
|
6716
6750
|
this.copyData.categoryId = node.id;
|
|
6717
6751
|
};
|
|
6752
|
+
ProjectCombineManage.prototype.onRequireAuthChange = function (value, row, index) {
|
|
6753
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6754
|
+
var id, res;
|
|
6755
|
+
return __generator(this, function (_a) {
|
|
6756
|
+
switch (_a.label) {
|
|
6757
|
+
case 0:
|
|
6758
|
+
id = row.id;
|
|
6759
|
+
if (!id) {
|
|
6760
|
+
return [2 /*return*/];
|
|
6761
|
+
}
|
|
6762
|
+
return [4 /*yield*/, this.service.changeRequireAuth(id, value ? 1 : 0)];
|
|
6763
|
+
case 1:
|
|
6764
|
+
res = _a.sent();
|
|
6765
|
+
if (!(res === null || res === void 0 ? void 0 : res.hasError)) {
|
|
6766
|
+
row.requireAuth = value ? 1 : 0;
|
|
6767
|
+
}
|
|
6768
|
+
return [2 /*return*/];
|
|
6769
|
+
}
|
|
6770
|
+
});
|
|
6771
|
+
});
|
|
6772
|
+
};
|
|
6718
6773
|
ProjectCombineManage.prototype.onStatusChange = function (value, row, index) {
|
|
6719
6774
|
return __awaiter(this, void 0, void 0, function () {
|
|
6720
6775
|
var id, res;
|
|
@@ -6729,10 +6784,6 @@ var project_combine_ProjectCombineManage = /** @class */function (_super) {
|
|
|
6729
6784
|
case 1:
|
|
6730
6785
|
res = _a.sent();
|
|
6731
6786
|
if (!(res === null || res === void 0 ? void 0 : res.hasError)) {
|
|
6732
|
-
// const res = await this.service.getById(id);
|
|
6733
|
-
// if (!res?.result) {
|
|
6734
|
-
// this.list.splice(index, 1, res.result);
|
|
6735
|
-
// }
|
|
6736
6787
|
row.status = value ? "PUBLISHED" : "NOT_PUBLISHED";
|
|
6737
6788
|
}
|
|
6738
6789
|
return [2 /*return*/];
|
|
@@ -8469,6 +8520,7 @@ var combine_model_ProjectCombineModel = /** @class */function (_super) {
|
|
|
8469
8520
|
function ProjectCombineModel() {
|
|
8470
8521
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
8471
8522
|
_this.model = {
|
|
8523
|
+
requireAuth: 1,
|
|
8472
8524
|
type: "SCRIPT",
|
|
8473
8525
|
status: "NOT_PUBLISHED",
|
|
8474
8526
|
relations: [],
|
|
@@ -8593,6 +8645,9 @@ var combine_model_ProjectCombineModel = /** @class */function (_super) {
|
|
|
8593
8645
|
res = _a.sent();
|
|
8594
8646
|
if (!(res === null || res === void 0 ? void 0 : res.hasError)) {
|
|
8595
8647
|
this.model = res.result;
|
|
8648
|
+
if (!this.model.requireAuth) {
|
|
8649
|
+
this.model.requireAuth = 0;
|
|
8650
|
+
}
|
|
8596
8651
|
}
|
|
8597
8652
|
_a.label = 2;
|
|
8598
8653
|
case 2:
|
|
@@ -9227,7 +9282,7 @@ var project_list_ProjectList = /** @class */function (_super) {
|
|
|
9227
9282
|
};
|
|
9228
9283
|
Object.defineProperty(ProjectList.prototype, "headers", {
|
|
9229
9284
|
get: function () {
|
|
9230
|
-
var token =
|
|
9285
|
+
var token = getToken();
|
|
9231
9286
|
return {
|
|
9232
9287
|
Authorization: "Bearer " + token
|
|
9233
9288
|
};
|
|
@@ -13629,7 +13684,7 @@ module.exports = "<div class=\"v-parameter-list-container\">\r\n <main>\r\n
|
|
|
13629
13684
|
/***/ "d8e7":
|
|
13630
13685
|
/***/ (function(module, exports) {
|
|
13631
13686
|
|
|
13632
|
-
module.exports = "<!DOCTYPE html>\
|
|
13687
|
+
module.exports = "<!DOCTYPE html>\n<article class=\"v-api-combine-info-wrapper\">\n <header class=\"header\">\n {{title}}\n </header>\n <main>\n <i-form ref=\"form\" class=\"info-form\" :model=\"model\" :rules=\"rules\">\n <i-row>\n <section class=\"title-g\">基本信息</section>\n <i-form-item label=\"名称:\" prop=\"name\">\n <i-input class=\"diy-input\" placeholder=\"请输入名称\" v-model=\"model.name\" :disabled=\"!isEdit\"></i-input>\n </i-form-item>\n <i-form-item label=\"编码:\" prop=\"code\">\n <i-input class=\"diy-input\" placeholder=\"请输入编码\" v-model=\"model.code\" :disabled=\"!isEdit\"></i-input>\n </i-form-item>\n <i-form-item label=\"是否需要认证:\" prop=\"requireAuth\">\n <i-switch class=\"diy-switch\" :disabled=\"!isEdit\" :true-value=\"1\" :false-value=\"0\" v-model=\"model.requireAuth\">\n <span slot=\"open\">是</span>\n <span slot=\"close\">否</span>\n </i-switch>\n </i-form-item>\n <i-form-item class=\"full-width\" label=\"描述:\">\n <i-input type=\"textarea\" class=\"diy-input-textarea\" :rows=\"1\" placeholder=\"请输入描述\" v-model=\"model.description\" :disabled=\"!isEdit\"></i-input>\n </i-form-item>\n </i-row>\n <i-row>\n <section class=\"title-g\">待合并列表</section>\n <section class=\"to-combine-list\">\n <template v-if=\"isEdit\">\n <i-button class=\"diy-btn-default\" @click=\"onAddDataModel\">添加数据模型</i-button>\n <i-button class=\"diy-btn-default\" @click=\"onAddApiProject\">添加 API</i-button>\n </template>\n <template v-if=\"model.relations&&model.relations.length\">\n <i-table class=\"diy-table\" :columns=\"relationColumns\" :data=\"model.relations\">\n <template #type=\"{row}\">\n <span>{{row.type==='MODEL'?'数据模型':row.type==='API'?'API':''}}</span>\n </template>\n <template #operates=\"{row,index}\">\n <div class=\"row-actions\">\n <i title=\"查看\" class=\"iconfont icon-rizhichakan\" @click=\"onDetail(row)\"></i>\n <i-poptip v-if=\"isEdit\" confirm transfer title=\"确认删除这条数据吗?\" @on-ok=\"onRelationDelete(row)\">\n <i title=\"删除\" class=\"iconfont icon-delete\"></i>\n </i-poptip>\n </div>\n </template>\n </i-table>\n </template>\n <template v-else>\n <div class=\"table-no-data\">\n <div class=\"table-no-data-bg\"></div>\n <div class=\"table-no-data-text\">暂无数据</div>\n </div>\n </template>\n </section>\n </i-row>\n <i-row>\n <section class=\"title-g\">参数详情</section>\n <section class=\"parameter-detail\">\n <section class=\"card-panel card-panel-no-right-border\">\n <i-tabs>\n <i-tab-pane label=\"请求参数\" name=\"request\">\n <u-request-parameter-list :data=\"model.reqParams\" :isEdit=\"isEdit\"></u-request-parameter-list>\n </i-tab-pane>\n <i-tab-pane label=\"响应参数\" name=\"response\">\n <u-response-parameter-list :data=\"model.respParams\" :isEdit=\"isEdit\"></u-response-parameter-list>\n </i-tab-pane>\n </i-tabs>\n </section>\n <section class=\"card-panel\">\n <div class=\"card-panel-header\">\n <div>\n <span>执行脚本</span>\n <i-icon class=\"help-icon\" type=\"md-alert\" @click=\"onOpenDoc\" title=\"帮助文档\"> </i-icon>\n </div>\n <span class=\"action-text\" @click.stop=\"onOpenTest\">\n <i class=\"iconfont icon-run\"></i>\n <span>试运行</span>\n </span>\n </div>\n <div class=\"card-panel-main\">\n <u-base-editor class=\"editor\" :data.sync=\"model.content\" :readOnly=\"!isEdit\"></u-base-editor>\n </div>\n </section>\n </section>\n </i-row>\n </i-form>\n </main>\n <footer>\n <template v-if=\"isEdit\">\n <i-button type=\"primary\" class=\"diy-btn-primary\" @click.stop=\"onSave\">确定</i-button>\n <i-button type=\"text\" class=\"diy-btn-text\" @click.stop=\"onBack\">取消</i-button>\n </template>\n <template v-else>\n <i-button type=\"primary\" class=\"diy-btn-primary\" @click.stop=\"onBack\">关闭</i-button>\n </template>\n </footer>\n <u-data-model-modal v-model=\"dataModelShow\" :data=\"dataModelRelations\" @save=\"onRelationsSave\"></u-data-model-modal>\n <u-api-project-modal v-model=\"apiProjectShow\" :data=\"apiProjectRelations\" @save=\"onRelationsSave\"></u-api-project-modal>\n <u-data-model-doc-modal v-model=\"dataModelDocShow\" :doc=\"dataModelDoc\"></u-data-model-doc-modal>\n <u-api-project-detail-modal :visiable.sync=\"apiProjectDetailShow\" :model=\"apiProjectDetail\"></u-api-project-detail-modal>\n <u-test-run-modal :visible.sync=\"testShow\" :params=\"model.reqParams\" :data=\"testResult\" @on-run=\"onTestRun\"></u-test-run-modal>\n <u-data-model-doc v-model=\"docShow\" :doc=\"doc\"></u-data-model-doc>\n</article>\n"
|
|
13633
13688
|
|
|
13634
13689
|
/***/ }),
|
|
13635
13690
|
|