@egova/egova-api 1.0.64 → 1.0.68

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.
@@ -51883,7 +51883,7 @@ function (_super) {
51883
51883
  slot: "name"
51884
51884
  }, {
51885
51885
  title: "操作",
51886
- width: 60,
51886
+ width: 80,
51887
51887
  align: "center",
51888
51888
  slot: "action"
51889
51889
  }];
@@ -51957,15 +51957,33 @@ function (_super) {
51957
51957
  return after_execution_transfer_generator(this, function (_c) {
51958
51958
  switch (_c.label) {
51959
51959
  case 0:
51960
- if (!this.response.originalContent) return [2
51961
- /*return*/
51962
- ];
51960
+ console.log("response", this.response);
51961
+
51962
+ if (!this.response.originalContent) {
51963
+ return [2
51964
+ /*return*/
51965
+ ];
51966
+ }
51967
+
51968
+ if (this.dataList.length > 0) {
51969
+ return [2
51970
+ /*return*/
51971
+ ];
51972
+ }
51973
+
51963
51974
  return [4
51964
51975
  /*yield*/
51965
51976
  , this.service.parseResponse2Fields(this.response.originalContent, (_a = this.interfaceModel.convertConfig) === null || _a === void 0 ? void 0 : _a.convertRoot)];
51966
51977
 
51967
51978
  case 1:
51968
51979
  result = _c.sent();
51980
+
51981
+ if (result === null || result === void 0 ? void 0 : result.hasError) {
51982
+ return [2
51983
+ /*return*/
51984
+ ];
51985
+ }
51986
+
51969
51987
  dataList = ((_b = result === null || result === void 0 ? void 0 : result.result) === null || _b === void 0 ? void 0 : _b.fieldMappings) || [];
51970
51988
  checkArray = this.interfaceModel.fieldMappings;
51971
51989
  set = new Set(checkArray.map(function (v) {
@@ -51982,7 +52000,6 @@ function (_super) {
51982
52000
  }
51983
52001
  });
51984
52002
  this.dataList = dataList;
51985
- this.lastDataList = this.dataList.$clone();
51986
52003
  return [2
51987
52004
  /*return*/
51988
52005
  ];
@@ -51991,6 +52008,11 @@ function (_super) {
51991
52008
  });
51992
52009
  };
51993
52010
 
52011
+ AfterExecutionTransfer.prototype.refreshLastDataList = function () {
52012
+ console.log("api://project-detail-save", this.dataList);
52013
+ this.lastDataList = this.dataList.$clone();
52014
+ };
52015
+
51994
52016
  AfterExecutionTransfer.prototype.onToggleAll = function (checkAll) {
51995
52017
  this.dataList = this.dataList.map(function (d) {
51996
52018
  return after_execution_transfer_assign(after_execution_transfer_assign({}, d), {
@@ -52049,6 +52071,8 @@ function (_super) {
52049
52071
  immediate: true
52050
52072
  }), after_execution_transfer_metadata("design:type", Function), after_execution_transfer_metadata("design:paramtypes", []), after_execution_transfer_metadata("design:returntype", Promise)], AfterExecutionTransfer.prototype, "getFiledMappings", null);
52051
52073
 
52074
+ after_execution_transfer_decorate([Object(flagwind_web_["receivable"])("api://project-detail-save"), after_execution_transfer_metadata("design:type", Function), after_execution_transfer_metadata("design:paramtypes", []), after_execution_transfer_metadata("design:returntype", void 0)], AfterExecutionTransfer.prototype, "refreshLastDataList", null);
52075
+
52052
52076
  AfterExecutionTransfer = after_execution_transfer_decorate([Object(flagwind_web_["component"])({
52053
52077
  template: __webpack_require__("236b"),
52054
52078
  components: {}
@@ -53410,8 +53434,10 @@ function (_super) {
53410
53434
  , this.service.saveApiInfo(this.interfaceModel)];
53411
53435
 
53412
53436
  case 1:
53413
- _a.sent();
53437
+ _a.sent(); // 保存后触发
53438
+
53414
53439
 
53440
+ this.$publish("api://project-detail-save");
53415
53441
  this.loading = false;
53416
53442
  return [2
53417
53443
  /*return*/
package/dist/index.umd.js CHANGED
@@ -51892,7 +51892,7 @@ function (_super) {
51892
51892
  slot: "name"
51893
51893
  }, {
51894
51894
  title: "操作",
51895
- width: 60,
51895
+ width: 80,
51896
51896
  align: "center",
51897
51897
  slot: "action"
51898
51898
  }];
@@ -51966,15 +51966,33 @@ function (_super) {
51966
51966
  return after_execution_transfer_generator(this, function (_c) {
51967
51967
  switch (_c.label) {
51968
51968
  case 0:
51969
- if (!this.response.originalContent) return [2
51970
- /*return*/
51971
- ];
51969
+ console.log("response", this.response);
51970
+
51971
+ if (!this.response.originalContent) {
51972
+ return [2
51973
+ /*return*/
51974
+ ];
51975
+ }
51976
+
51977
+ if (this.dataList.length > 0) {
51978
+ return [2
51979
+ /*return*/
51980
+ ];
51981
+ }
51982
+
51972
51983
  return [4
51973
51984
  /*yield*/
51974
51985
  , this.service.parseResponse2Fields(this.response.originalContent, (_a = this.interfaceModel.convertConfig) === null || _a === void 0 ? void 0 : _a.convertRoot)];
51975
51986
 
51976
51987
  case 1:
51977
51988
  result = _c.sent();
51989
+
51990
+ if (result === null || result === void 0 ? void 0 : result.hasError) {
51991
+ return [2
51992
+ /*return*/
51993
+ ];
51994
+ }
51995
+
51978
51996
  dataList = ((_b = result === null || result === void 0 ? void 0 : result.result) === null || _b === void 0 ? void 0 : _b.fieldMappings) || [];
51979
51997
  checkArray = this.interfaceModel.fieldMappings;
51980
51998
  set = new Set(checkArray.map(function (v) {
@@ -51991,7 +52009,6 @@ function (_super) {
51991
52009
  }
51992
52010
  });
51993
52011
  this.dataList = dataList;
51994
- this.lastDataList = this.dataList.$clone();
51995
52012
  return [2
51996
52013
  /*return*/
51997
52014
  ];
@@ -52000,6 +52017,11 @@ function (_super) {
52000
52017
  });
52001
52018
  };
52002
52019
 
52020
+ AfterExecutionTransfer.prototype.refreshLastDataList = function () {
52021
+ console.log("api://project-detail-save", this.dataList);
52022
+ this.lastDataList = this.dataList.$clone();
52023
+ };
52024
+
52003
52025
  AfterExecutionTransfer.prototype.onToggleAll = function (checkAll) {
52004
52026
  this.dataList = this.dataList.map(function (d) {
52005
52027
  return after_execution_transfer_assign(after_execution_transfer_assign({}, d), {
@@ -52058,6 +52080,8 @@ function (_super) {
52058
52080
  immediate: true
52059
52081
  }), after_execution_transfer_metadata("design:type", Function), after_execution_transfer_metadata("design:paramtypes", []), after_execution_transfer_metadata("design:returntype", Promise)], AfterExecutionTransfer.prototype, "getFiledMappings", null);
52060
52082
 
52083
+ after_execution_transfer_decorate([Object(flagwind_web_["receivable"])("api://project-detail-save"), after_execution_transfer_metadata("design:type", Function), after_execution_transfer_metadata("design:paramtypes", []), after_execution_transfer_metadata("design:returntype", void 0)], AfterExecutionTransfer.prototype, "refreshLastDataList", null);
52084
+
52061
52085
  AfterExecutionTransfer = after_execution_transfer_decorate([Object(flagwind_web_["component"])({
52062
52086
  template: __webpack_require__("236b"),
52063
52087
  components: {}
@@ -53419,8 +53443,10 @@ function (_super) {
53419
53443
  , this.service.saveApiInfo(this.interfaceModel)];
53420
53444
 
53421
53445
  case 1:
53422
- _a.sent();
53446
+ _a.sent(); // 保存后触发
53447
+
53423
53448
 
53449
+ this.$publish("api://project-detail-save");
53424
53450
  this.loading = false;
53425
53451
  return [2
53426
53452
  /*return*/