@egova/egova-api 1.2.0 → 1.2.2
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 +58 -13
- package/dist/index.umd.js +58 -13
- 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=\"authFlag\" slot-scope=\"{row,index}\">\n <i-switch class=\"diy-switch\" :value=\"row.authFlag\" :true-value=\"1\" :false-value=\"0\" @on-change=\"onAuthFlagChange($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
|
|
|
@@ -5068,6 +5068,13 @@ var service_Service = /** @class */function (_super) {
|
|
|
5068
5068
|
Service.prototype.getDoc = function (id) {
|
|
5069
5069
|
return this._get("/unity/combine-info/".concat(id, "/doc"));
|
|
5070
5070
|
};
|
|
5071
|
+
Service.prototype.changeAuthFlag = function (id, authFlag) {
|
|
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, "&authFlag=").concat(authFlag))];
|
|
5075
|
+
});
|
|
5076
|
+
});
|
|
5077
|
+
};
|
|
5071
5078
|
Service.prototype.changeStatus = function (id, status) {
|
|
5072
5079
|
return __awaiter(this, void 0, Promise, function () {
|
|
5073
5080
|
return __generator(this, function (_a) {
|
|
@@ -5106,6 +5113,9 @@ var service_Service = /** @class */function (_super) {
|
|
|
5106
5113
|
__decorate([serviceHandler("get", {
|
|
5107
5114
|
title: "获取文档"
|
|
5108
5115
|
})], Service.prototype, "getDoc", null);
|
|
5116
|
+
__decorate([serviceHandler("save", {
|
|
5117
|
+
title: "保存数据"
|
|
5118
|
+
})], Service.prototype, "changeAuthFlag", null);
|
|
5109
5119
|
__decorate([serviceHandler("save", {
|
|
5110
5120
|
title: "保存数据"
|
|
5111
5121
|
})], Service.prototype, "changeStatus", null);
|
|
@@ -6446,43 +6456,57 @@ var project_combine_ProjectCombineManage = /** @class */function (_super) {
|
|
|
6446
6456
|
_this.columns = [{
|
|
6447
6457
|
type: "selection",
|
|
6448
6458
|
align: "center",
|
|
6449
|
-
width:
|
|
6459
|
+
width: window.pageRatio * 80
|
|
6450
6460
|
}, {
|
|
6451
6461
|
title: "名称",
|
|
6452
6462
|
key: "name",
|
|
6453
6463
|
align: "left",
|
|
6454
6464
|
class: "STRING",
|
|
6455
6465
|
ellipsis: true,
|
|
6456
|
-
tooltip: true
|
|
6466
|
+
tooltip: true,
|
|
6467
|
+
width: window.pageRatio * 225,
|
|
6468
|
+
resizable: true
|
|
6457
6469
|
}, {
|
|
6458
6470
|
title: "编码",
|
|
6459
6471
|
key: "code",
|
|
6460
6472
|
align: "left",
|
|
6461
6473
|
class: "STRING",
|
|
6462
6474
|
ellipsis: true,
|
|
6463
|
-
tooltip: true
|
|
6475
|
+
tooltip: true,
|
|
6476
|
+
width: window.pageRatio * 225,
|
|
6477
|
+
resizable: true
|
|
6464
6478
|
}, {
|
|
6465
6479
|
title: "描述",
|
|
6466
6480
|
key: "description",
|
|
6467
6481
|
align: "left",
|
|
6468
6482
|
class: "STRING",
|
|
6469
6483
|
ellipsis: true,
|
|
6470
|
-
tooltip: true
|
|
6484
|
+
tooltip: true,
|
|
6485
|
+
width: window.pageRatio * 225,
|
|
6486
|
+
resizable: true
|
|
6487
|
+
}, {
|
|
6488
|
+
title: "是否需要认证",
|
|
6489
|
+
align: "left",
|
|
6490
|
+
slot: "authFlag",
|
|
6491
|
+
width: window.pageRatio * 160,
|
|
6492
|
+
resizable: true
|
|
6471
6493
|
}, {
|
|
6472
6494
|
title: "发布状态",
|
|
6473
6495
|
align: "left",
|
|
6474
6496
|
slot: "status",
|
|
6475
|
-
width:
|
|
6497
|
+
width: window.pageRatio * 180,
|
|
6498
|
+
resizable: true
|
|
6476
6499
|
}, {
|
|
6477
6500
|
title: "接口文档",
|
|
6478
6501
|
align: "left",
|
|
6479
6502
|
slot: "doc",
|
|
6480
|
-
width:
|
|
6503
|
+
width: window.pageRatio * 120,
|
|
6504
|
+
resizable: true
|
|
6481
6505
|
}, {
|
|
6482
6506
|
title: "操作",
|
|
6483
6507
|
align: "left",
|
|
6484
6508
|
slot: "operates",
|
|
6485
|
-
width:
|
|
6509
|
+
width: window.pageRatio * 180
|
|
6486
6510
|
}];
|
|
6487
6511
|
_this.paging = {
|
|
6488
6512
|
pageIndex: 1,
|
|
@@ -6716,6 +6740,27 @@ var project_combine_ProjectCombineManage = /** @class */function (_super) {
|
|
|
6716
6740
|
this.categoryData = node;
|
|
6717
6741
|
this.copyData.categoryId = node.id;
|
|
6718
6742
|
};
|
|
6743
|
+
ProjectCombineManage.prototype.onAuthFlagChange = 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.changeAuthFlag(id, value ? 1 : 0)];
|
|
6754
|
+
case 1:
|
|
6755
|
+
res = _a.sent();
|
|
6756
|
+
if (!(res === null || res === void 0 ? void 0 : res.hasError)) {
|
|
6757
|
+
row.authFlag = value ? 1 : 0;
|
|
6758
|
+
}
|
|
6759
|
+
return [2 /*return*/];
|
|
6760
|
+
}
|
|
6761
|
+
});
|
|
6762
|
+
});
|
|
6763
|
+
};
|
|
6719
6764
|
ProjectCombineManage.prototype.onStatusChange = function (value, row, index) {
|
|
6720
6765
|
return __awaiter(this, void 0, void 0, function () {
|
|
6721
6766
|
var id, res;
|
|
@@ -6730,10 +6775,6 @@ var project_combine_ProjectCombineManage = /** @class */function (_super) {
|
|
|
6730
6775
|
case 1:
|
|
6731
6776
|
res = _a.sent();
|
|
6732
6777
|
if (!(res === null || res === void 0 ? void 0 : res.hasError)) {
|
|
6733
|
-
// const res = await this.service.getById(id);
|
|
6734
|
-
// if (!res?.result) {
|
|
6735
|
-
// this.list.splice(index, 1, res.result);
|
|
6736
|
-
// }
|
|
6737
6778
|
row.status = value ? "PUBLISHED" : "NOT_PUBLISHED";
|
|
6738
6779
|
}
|
|
6739
6780
|
return [2 /*return*/];
|
|
@@ -8470,6 +8511,7 @@ var combine_model_ProjectCombineModel = /** @class */function (_super) {
|
|
|
8470
8511
|
function ProjectCombineModel() {
|
|
8471
8512
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
8472
8513
|
_this.model = {
|
|
8514
|
+
authFlag: 1,
|
|
8473
8515
|
type: "SCRIPT",
|
|
8474
8516
|
status: "NOT_PUBLISHED",
|
|
8475
8517
|
relations: [],
|
|
@@ -8594,6 +8636,9 @@ var combine_model_ProjectCombineModel = /** @class */function (_super) {
|
|
|
8594
8636
|
res = _a.sent();
|
|
8595
8637
|
if (!(res === null || res === void 0 ? void 0 : res.hasError)) {
|
|
8596
8638
|
this.model = res.result;
|
|
8639
|
+
if (!this.model.authFlag) {
|
|
8640
|
+
this.model.authFlag = 0;
|
|
8641
|
+
}
|
|
8597
8642
|
}
|
|
8598
8643
|
_a.label = 2;
|
|
8599
8644
|
case 2:
|
|
@@ -13630,7 +13675,7 @@ module.exports = "<div class=\"v-parameter-list-container\">\r\n <main>\r\n
|
|
|
13630
13675
|
/***/ "d8e7":
|
|
13631
13676
|
/***/ (function(module, exports) {
|
|
13632
13677
|
|
|
13633
|
-
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=\"authFlag\">\n <i-switch class=\"diy-switch\" :disabled=\"!isEdit\" :true-value=\"1\" :false-value=\"0\" v-model=\"model.authFlag\">\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"
|
|
13634
13679
|
|
|
13635
13680
|
/***/ }),
|
|
13636
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=\"authFlag\" slot-scope=\"{row,index}\">\n <i-switch class=\"diy-switch\" :value=\"row.authFlag\" :true-value=\"1\" :false-value=\"0\" @on-change=\"onAuthFlagChange($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
|
|
|
@@ -5077,6 +5077,13 @@ var service_Service = /** @class */function (_super) {
|
|
|
5077
5077
|
Service.prototype.getDoc = function (id) {
|
|
5078
5078
|
return this._get("/unity/combine-info/".concat(id, "/doc"));
|
|
5079
5079
|
};
|
|
5080
|
+
Service.prototype.changeAuthFlag = function (id, authFlag) {
|
|
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, "&authFlag=").concat(authFlag))];
|
|
5084
|
+
});
|
|
5085
|
+
});
|
|
5086
|
+
};
|
|
5080
5087
|
Service.prototype.changeStatus = function (id, status) {
|
|
5081
5088
|
return __awaiter(this, void 0, Promise, function () {
|
|
5082
5089
|
return __generator(this, function (_a) {
|
|
@@ -5115,6 +5122,9 @@ var service_Service = /** @class */function (_super) {
|
|
|
5115
5122
|
__decorate([serviceHandler("get", {
|
|
5116
5123
|
title: "获取文档"
|
|
5117
5124
|
})], Service.prototype, "getDoc", null);
|
|
5125
|
+
__decorate([serviceHandler("save", {
|
|
5126
|
+
title: "保存数据"
|
|
5127
|
+
})], Service.prototype, "changeAuthFlag", null);
|
|
5118
5128
|
__decorate([serviceHandler("save", {
|
|
5119
5129
|
title: "保存数据"
|
|
5120
5130
|
})], Service.prototype, "changeStatus", null);
|
|
@@ -6455,43 +6465,57 @@ var project_combine_ProjectCombineManage = /** @class */function (_super) {
|
|
|
6455
6465
|
_this.columns = [{
|
|
6456
6466
|
type: "selection",
|
|
6457
6467
|
align: "center",
|
|
6458
|
-
width:
|
|
6468
|
+
width: window.pageRatio * 80
|
|
6459
6469
|
}, {
|
|
6460
6470
|
title: "名称",
|
|
6461
6471
|
key: "name",
|
|
6462
6472
|
align: "left",
|
|
6463
6473
|
class: "STRING",
|
|
6464
6474
|
ellipsis: true,
|
|
6465
|
-
tooltip: true
|
|
6475
|
+
tooltip: true,
|
|
6476
|
+
width: window.pageRatio * 225,
|
|
6477
|
+
resizable: true
|
|
6466
6478
|
}, {
|
|
6467
6479
|
title: "编码",
|
|
6468
6480
|
key: "code",
|
|
6469
6481
|
align: "left",
|
|
6470
6482
|
class: "STRING",
|
|
6471
6483
|
ellipsis: true,
|
|
6472
|
-
tooltip: true
|
|
6484
|
+
tooltip: true,
|
|
6485
|
+
width: window.pageRatio * 225,
|
|
6486
|
+
resizable: true
|
|
6473
6487
|
}, {
|
|
6474
6488
|
title: "描述",
|
|
6475
6489
|
key: "description",
|
|
6476
6490
|
align: "left",
|
|
6477
6491
|
class: "STRING",
|
|
6478
6492
|
ellipsis: true,
|
|
6479
|
-
tooltip: true
|
|
6493
|
+
tooltip: true,
|
|
6494
|
+
width: window.pageRatio * 225,
|
|
6495
|
+
resizable: true
|
|
6496
|
+
}, {
|
|
6497
|
+
title: "是否需要认证",
|
|
6498
|
+
align: "left",
|
|
6499
|
+
slot: "authFlag",
|
|
6500
|
+
width: window.pageRatio * 160,
|
|
6501
|
+
resizable: true
|
|
6480
6502
|
}, {
|
|
6481
6503
|
title: "发布状态",
|
|
6482
6504
|
align: "left",
|
|
6483
6505
|
slot: "status",
|
|
6484
|
-
width:
|
|
6506
|
+
width: window.pageRatio * 180,
|
|
6507
|
+
resizable: true
|
|
6485
6508
|
}, {
|
|
6486
6509
|
title: "接口文档",
|
|
6487
6510
|
align: "left",
|
|
6488
6511
|
slot: "doc",
|
|
6489
|
-
width:
|
|
6512
|
+
width: window.pageRatio * 120,
|
|
6513
|
+
resizable: true
|
|
6490
6514
|
}, {
|
|
6491
6515
|
title: "操作",
|
|
6492
6516
|
align: "left",
|
|
6493
6517
|
slot: "operates",
|
|
6494
|
-
width:
|
|
6518
|
+
width: window.pageRatio * 180
|
|
6495
6519
|
}];
|
|
6496
6520
|
_this.paging = {
|
|
6497
6521
|
pageIndex: 1,
|
|
@@ -6725,6 +6749,27 @@ var project_combine_ProjectCombineManage = /** @class */function (_super) {
|
|
|
6725
6749
|
this.categoryData = node;
|
|
6726
6750
|
this.copyData.categoryId = node.id;
|
|
6727
6751
|
};
|
|
6752
|
+
ProjectCombineManage.prototype.onAuthFlagChange = 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.changeAuthFlag(id, value ? 1 : 0)];
|
|
6763
|
+
case 1:
|
|
6764
|
+
res = _a.sent();
|
|
6765
|
+
if (!(res === null || res === void 0 ? void 0 : res.hasError)) {
|
|
6766
|
+
row.authFlag = value ? 1 : 0;
|
|
6767
|
+
}
|
|
6768
|
+
return [2 /*return*/];
|
|
6769
|
+
}
|
|
6770
|
+
});
|
|
6771
|
+
});
|
|
6772
|
+
};
|
|
6728
6773
|
ProjectCombineManage.prototype.onStatusChange = function (value, row, index) {
|
|
6729
6774
|
return __awaiter(this, void 0, void 0, function () {
|
|
6730
6775
|
var id, res;
|
|
@@ -6739,10 +6784,6 @@ var project_combine_ProjectCombineManage = /** @class */function (_super) {
|
|
|
6739
6784
|
case 1:
|
|
6740
6785
|
res = _a.sent();
|
|
6741
6786
|
if (!(res === null || res === void 0 ? void 0 : res.hasError)) {
|
|
6742
|
-
// const res = await this.service.getById(id);
|
|
6743
|
-
// if (!res?.result) {
|
|
6744
|
-
// this.list.splice(index, 1, res.result);
|
|
6745
|
-
// }
|
|
6746
6787
|
row.status = value ? "PUBLISHED" : "NOT_PUBLISHED";
|
|
6747
6788
|
}
|
|
6748
6789
|
return [2 /*return*/];
|
|
@@ -8479,6 +8520,7 @@ var combine_model_ProjectCombineModel = /** @class */function (_super) {
|
|
|
8479
8520
|
function ProjectCombineModel() {
|
|
8480
8521
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
8481
8522
|
_this.model = {
|
|
8523
|
+
authFlag: 1,
|
|
8482
8524
|
type: "SCRIPT",
|
|
8483
8525
|
status: "NOT_PUBLISHED",
|
|
8484
8526
|
relations: [],
|
|
@@ -8603,6 +8645,9 @@ var combine_model_ProjectCombineModel = /** @class */function (_super) {
|
|
|
8603
8645
|
res = _a.sent();
|
|
8604
8646
|
if (!(res === null || res === void 0 ? void 0 : res.hasError)) {
|
|
8605
8647
|
this.model = res.result;
|
|
8648
|
+
if (!this.model.authFlag) {
|
|
8649
|
+
this.model.authFlag = 0;
|
|
8650
|
+
}
|
|
8606
8651
|
}
|
|
8607
8652
|
_a.label = 2;
|
|
8608
8653
|
case 2:
|
|
@@ -13639,7 +13684,7 @@ module.exports = "<div class=\"v-parameter-list-container\">\r\n <main>\r\n
|
|
|
13639
13684
|
/***/ "d8e7":
|
|
13640
13685
|
/***/ (function(module, exports) {
|
|
13641
13686
|
|
|
13642
|
-
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=\"authFlag\">\n <i-switch class=\"diy-switch\" :disabled=\"!isEdit\" :true-value=\"1\" :false-value=\"0\" v-model=\"model.authFlag\">\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"
|
|
13643
13688
|
|
|
13644
13689
|
/***/ }),
|
|
13645
13690
|
|