@egova/egova-api 1.0.145 → 1.0.147
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
|
@@ -26701,7 +26701,7 @@ fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNa
|
|
|
26701
26701
|
/***/ "46d3":
|
|
26702
26702
|
/***/ (function(module, exports) {
|
|
26703
26703
|
|
|
26704
|
-
module.exports = "<article class=\"u-common-tree u-type-tree\">\
|
|
26704
|
+
module.exports = "<article class=\"u-common-tree u-type-tree\">\n <slot name=\"header\">\n <header slot=\"header\" class=\"tree-header\">\n <span>合并模型列表</span>\n <i-upload\n class=\"action-item\"\n :action=\"uploadAction\"\n accept=\".json\"\n :headers=\"headers\"\n :show-upload-list=\"false\"\n :format=\"['json']\"\n :on-success=\"onSuccess\"\n :before-upload=\"onBeforeUpload\"\n :on-format-error=\"onFormatError\"\n >\n <i title=\"导入\" class=\"iconfont icon-import\"></i>\n </i-upload>\n <i\n @click=\"onModelExport(null)\"\n :class=\"{'disabled': !data.length}\"\n class=\"iconfont icon-export\"\n title=\"导出\"\n ></i>\n <i @click.stop=\"onAddTreeNode\" title=\"新增合并模型\" class=\"iconfont icon-add-folder\"></i>\n </header>\n </slot>\n <section class=\"content\">\n <i-input class=\"search-input diy-input\" suffix=\"ios-search\" :placeholder=\"placeholder\" @on-change=\"onFilter\" v-model=\"keyword\" />\n <i-tree :data=\"renderData\" :render=\"renderContent\" @on-toggle-expand=\"onToggleExpand\"></i-tree>\n </section>\n <u-add-node :data=\"tempNode\" :categories=\"data\" v-model=\"showAddTreeNodeModal\" @on-refresh=\"queryTreeData\"></u-add-node>\n\n <i-modal draggable sticky reset-drag-position v-model=\"showImportModal\" class=\"diy-modal duplicate-import-modal\" width=\"800\" :mask-closable=\"false\" title=\"导入已合并接口\">\n <div class=\"import-title\">上传成功</div>\n <div class=\"import-label\">{{ `上传共${importResult.total}条合并接口数据,其中${importResult.total - importResult.duplicateNum}条可成功导入。` }}</div>\n <div class=\"import-label\">{{ `发现以下${importResult.duplicateNum}条接口数据存在编码重复(编码已存在),将不会被导入。` }}</div>\n <i-table class=\"diy-table import-modal-table\" :columns=\"columns\" :data=\"importResult.items\">\n </i-table>\n <footer slot=\"footer\">\n <i-button class=\"diy-btn-primary\" type=\"primary\" @click=\"onImportConfirm\">确定</i-button>\n <i-button class=\"diy-btn-default\" @click=\"onImportCancel\">取消</i-button>\n </footer>\n </i-modal>\n</article>\n"
|
|
26705
26705
|
|
|
26706
26706
|
/***/ }),
|
|
26707
26707
|
|
|
@@ -50882,6 +50882,15 @@ function (_super) {
|
|
|
50882
50882
|
return this._post("/unity/combine-info/export", data);
|
|
50883
50883
|
};
|
|
50884
50884
|
|
|
50885
|
+
Service.prototype.confirmImport = function (id) {
|
|
50886
|
+
return this._post("/unity/combine-info/import/confirm?key=".concat(id));
|
|
50887
|
+
}; // @service("save", { title: "取消导入接口数据", showTip: true })
|
|
50888
|
+
|
|
50889
|
+
|
|
50890
|
+
Service.prototype.cancelImport = function (id) {
|
|
50891
|
+
return this._post("/unity/combine-info/import/cancel?key=".concat(id));
|
|
50892
|
+
};
|
|
50893
|
+
|
|
50885
50894
|
tree_service_decorate([serviceHandler("save", {
|
|
50886
50895
|
title: "保存",
|
|
50887
50896
|
showTip: false
|
|
@@ -50892,6 +50901,12 @@ function (_super) {
|
|
|
50892
50901
|
showTip: false
|
|
50893
50902
|
}), tree_service_metadata("design:type", Function), tree_service_metadata("design:paramtypes", [String]), tree_service_metadata("design:returntype", void 0)], Service.prototype, "deleteTreeNodeById", null);
|
|
50894
50903
|
|
|
50904
|
+
tree_service_decorate([serviceHandler("save", {
|
|
50905
|
+
title: "导入接口数据",
|
|
50906
|
+
showTip: true,
|
|
50907
|
+
showErrorMsg: true
|
|
50908
|
+
}), tree_service_metadata("design:type", Function), tree_service_metadata("design:paramtypes", [Object]), tree_service_metadata("design:returntype", void 0)], Service.prototype, "confirmImport", null);
|
|
50909
|
+
|
|
50895
50910
|
return Service;
|
|
50896
50911
|
}(common_service);
|
|
50897
50912
|
|
|
@@ -51687,6 +51702,30 @@ function (_super) {
|
|
|
51687
51702
|
type: _this.type,
|
|
51688
51703
|
parentId: null
|
|
51689
51704
|
};
|
|
51705
|
+
_this.showImportModal = false;
|
|
51706
|
+
_this.importResult = {}; // 表头信息
|
|
51707
|
+
|
|
51708
|
+
_this.columns = [{
|
|
51709
|
+
type: "index",
|
|
51710
|
+
title: "序号",
|
|
51711
|
+
align: "center",
|
|
51712
|
+
width: 80
|
|
51713
|
+
}, {
|
|
51714
|
+
title: "名称",
|
|
51715
|
+
align: "center",
|
|
51716
|
+
key: "name",
|
|
51717
|
+
tooltip: true
|
|
51718
|
+
}, {
|
|
51719
|
+
title: "编码",
|
|
51720
|
+
align: "center",
|
|
51721
|
+
key: "code",
|
|
51722
|
+
tooltip: true
|
|
51723
|
+
}, {
|
|
51724
|
+
title: "说明",
|
|
51725
|
+
align: "center",
|
|
51726
|
+
key: "remark",
|
|
51727
|
+
tooltip: true
|
|
51728
|
+
}];
|
|
51690
51729
|
return _this; // public get headers() {
|
|
51691
51730
|
// let token = Cookies.get("access_token");
|
|
51692
51731
|
// return { Authorization: "Bearer " + token };
|
|
@@ -51711,11 +51750,101 @@ function (_super) {
|
|
|
51711
51750
|
configurable: true
|
|
51712
51751
|
});
|
|
51713
51752
|
|
|
51753
|
+
Tree.prototype.onImportConfirm = function () {
|
|
51754
|
+
return tree_awaiter(this, void 0, void 0, function () {
|
|
51755
|
+
var res_1, res;
|
|
51756
|
+
return tree_generator(this, function (_a) {
|
|
51757
|
+
switch (_a.label) {
|
|
51758
|
+
case 0:
|
|
51759
|
+
if (!(this.importResult.total === this.importResult.duplicateNum)) return [3
|
|
51760
|
+
/*break*/
|
|
51761
|
+
, 2];
|
|
51762
|
+
return [4
|
|
51763
|
+
/*yield*/
|
|
51764
|
+
, this.service.cancelImport(this.importResult.id)];
|
|
51765
|
+
|
|
51766
|
+
case 1:
|
|
51767
|
+
res_1 = _a.sent();
|
|
51768
|
+
|
|
51769
|
+
if (res_1 && !res_1.hasError) {
|
|
51770
|
+
this.$message.success("导入接口数据成功!");
|
|
51771
|
+
this.showImportModal = false;
|
|
51772
|
+
return [2
|
|
51773
|
+
/*return*/
|
|
51774
|
+
];
|
|
51775
|
+
}
|
|
51776
|
+
|
|
51777
|
+
this.$Message.error(res_1.message || "导入接口数据失败!");
|
|
51778
|
+
return [2
|
|
51779
|
+
/*return*/
|
|
51780
|
+
];
|
|
51781
|
+
|
|
51782
|
+
case 2:
|
|
51783
|
+
return [4
|
|
51784
|
+
/*yield*/
|
|
51785
|
+
, this.service.confirmImport(this.importResult.id)];
|
|
51786
|
+
|
|
51787
|
+
case 3:
|
|
51788
|
+
res = _a.sent();
|
|
51789
|
+
|
|
51790
|
+
if (res && !res.hasError) {
|
|
51791
|
+
this.showImportModal = false;
|
|
51792
|
+
this.queryTreeData();
|
|
51793
|
+
return [2
|
|
51794
|
+
/*return*/
|
|
51795
|
+
];
|
|
51796
|
+
}
|
|
51797
|
+
|
|
51798
|
+
return [2
|
|
51799
|
+
/*return*/
|
|
51800
|
+
];
|
|
51801
|
+
}
|
|
51802
|
+
});
|
|
51803
|
+
});
|
|
51804
|
+
};
|
|
51805
|
+
|
|
51806
|
+
Tree.prototype.onImportCancel = function () {
|
|
51807
|
+
return tree_awaiter(this, void 0, void 0, function () {
|
|
51808
|
+
var res;
|
|
51809
|
+
return tree_generator(this, function (_a) {
|
|
51810
|
+
switch (_a.label) {
|
|
51811
|
+
case 0:
|
|
51812
|
+
return [4
|
|
51813
|
+
/*yield*/
|
|
51814
|
+
, this.service.cancelImport(this.importResult.id)];
|
|
51815
|
+
|
|
51816
|
+
case 1:
|
|
51817
|
+
res = _a.sent();
|
|
51818
|
+
|
|
51819
|
+
if (res && !res.hasError) {
|
|
51820
|
+
this.$message.success("取消成功");
|
|
51821
|
+
this.showImportModal = false;
|
|
51822
|
+
return [2
|
|
51823
|
+
/*return*/
|
|
51824
|
+
];
|
|
51825
|
+
}
|
|
51826
|
+
|
|
51827
|
+
this.$Message.error(res.message || "取消异常");
|
|
51828
|
+
return [2
|
|
51829
|
+
/*return*/
|
|
51830
|
+
];
|
|
51831
|
+
}
|
|
51832
|
+
});
|
|
51833
|
+
});
|
|
51834
|
+
};
|
|
51835
|
+
|
|
51714
51836
|
Tree.prototype.onSuccess = function (res, file) {
|
|
51837
|
+
// debugger
|
|
51715
51838
|
if (res && !res.hasError) {
|
|
51716
|
-
|
|
51717
|
-
|
|
51718
|
-
|
|
51839
|
+
if (!res.result) {
|
|
51840
|
+
this.$Message.success("导入成功");
|
|
51841
|
+
this.queryTreeData();
|
|
51842
|
+
return;
|
|
51843
|
+
} else {
|
|
51844
|
+
this.showImportModal = true;
|
|
51845
|
+
this.importResult = res.result;
|
|
51846
|
+
return;
|
|
51847
|
+
}
|
|
51719
51848
|
}
|
|
51720
51849
|
|
|
51721
51850
|
this.$Message.error(res.message || "导入出错,请稍后再试");
|
|
@@ -51818,7 +51947,7 @@ function (_super) {
|
|
|
51818
51947
|
_this.onSelect(data);
|
|
51819
51948
|
},
|
|
51820
51949
|
"on-import-success": function onImportSuccess(res, file) {
|
|
51821
|
-
_this.onSuccess(
|
|
51950
|
+
_this.onSuccess(res, file);
|
|
51822
51951
|
}
|
|
51823
51952
|
}
|
|
51824
51953
|
});
|