@egova/egova-api 1.0.262 → 1.0.264

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.
@@ -39903,7 +39903,7 @@ module.exports = function (NAME) {
39903
39903
  /***/ "7640":
39904
39904
  /***/ (function(module, exports) {
39905
39905
 
39906
- module.exports = "<article class=\"params-setting\">\r\n <i-collapse v-model=\"value\" simple>\r\n <i-panel name=\"1\">\r\n <span>Query参数</span>\r\n <span class=\"status\">{{getExpand('1') ? \"收起\" : \"展开\"}}</span>\r\n <div slot=\"content\" class=\"setting-content\">\r\n <header>\r\n <i-button type=\"primary\" ghost class=\"diy-btn-primary\" @click=\"onAddRequestParam\"> <i class=\"api-icon icon-add\"></i>新增参数 </i-button>\r\n </header>\r\n <main>\r\n <i-table height=\"200\" width=\"1280\" class=\"diy-table\" :columns=\"paramColumns\" :data=\"queryDataList\">\r\n <template slot-scope=\"{ row,index }\" slot=\"selection\">\r\n <i-checkbox :value=\"!queryDataList[index].disabled\" @on-change=\"onChangeDisabled($event,queryDataList[index])\"> </i-checkbox>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"name\">\r\n <i-input class=\"diy-input\" placeholder=\"输入参数名称\" v-model=\"queryDataList[index].name\"></i-input>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"valueContent\">\r\n <i-input class=\"diy-input\" placeholder=\"输入参数值\" v-model=\"queryDataList[index].valueContent\"></i-input>\r\n </template>\r\n <!-- <template slot-scope=\"{ row,index }\" slot=\"required\">\r\n <i-switch v-model=\"queryDataList[index].required\">\r\n <span slot=\"open\">是</span>\r\n <span slot=\"close\">否</span>\r\n </i-switch>\r\n </template> -->\r\n <template slot-scope=\"{ row,index }\" slot=\"text\">\r\n <i-input class=\"diy-input\" placeholder=\"输入备注\" v-model=\"queryDataList[index].text\"></i-input>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"action\">\r\n <i-poptip class=\"action-btn delete\" title=\"确认删除这条数据吗?\" confirm @on-ok=\"onDelete(queryDataList,index)\" transfer>\r\n <i class=\"iconfont icon-delete\" title=\"删除\"></i>\r\n </i-poptip>\r\n <span>\r\n <i v-if=\"index>0\" class=\"iconfont icon-up\" @click=\"onUp(queryDataList,index)\" title=\"上移\"></i>\r\n <i v-if=\"index>0\" class=\"iconfont icon-top\" title=\"置顶\" @click=\"onTop(queryDataList,index)\"></i>\r\n <i v-if=\"index < queryDataList.length - 1\" @click=\"onDown(queryDataList,index)\" class=\"iconfont icon-down\" title=\"下移\"></i>\r\n <i v-if=\"index < queryDataList.length - 1\" @click=\"onBottom(queryDataList,index)\" class=\"iconfont icon-bottom\" title=\"置底\"></i>\r\n </span>\r\n </template>\r\n </i-table>\r\n </main>\r\n </div>\r\n </i-panel>\r\n <i-panel name=\"2\">\r\n <span>Body参数</span>\r\n <span class=\"status\">{{getExpand('2') ? \"收起\" : \"展开\"}}</span>\r\n <div slot=\"content\" class=\"setting-content\">\r\n <header>\r\n <i-button v-if=\"isFormData\" type=\"primary\" ghost class=\"diy-btn-primary\" @click=\"onAddBodyParam\"> <i class=\"api-icon icon-add\"></i>新增参数 </i-button>\r\n <i-button v-else type=\"primary\" ghost class=\"diy-btn-primary\" @click=\"onBeautify\"> <i class=\"api-icon icon-view\"></i>格式化 </i-button>\r\n <i-select transfer v-model=\"interfaceModel.info.requestBodyType\" class=\"diy-select\">\r\n <i-option v-for=\"item in requestBodyTypeList\" :value=\"item.name\" :key=\"item.name\">{{item.text}}</i-option>\r\n </i-select>\r\n </header>\r\n <main>\r\n <i-table height=\"200\" width=\"1280\" class=\"diy-table\" :columns=\"paramColumns\" :data=\"bodyDataList\" v-if=\"isFormData\">\r\n <template slot-scope=\"{ row,index }\" slot=\"selection\">\r\n <i-checkbox :value=\"!bodyDataList[index].disabled\" @on-change=\"onChangeDisabled($event,bodyDataList[index])\"> </i-checkbox>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"name\">\r\n <div class=\"body-name-row\">\r\n <i-input class=\"diy-input\" placeholder=\"输入参数名称\" v-model=\"bodyDataList[index].name\"></i-input>\r\n <i-select class=\"diy-select\" v-if=\"bodyType === 'Form'\" v-model=\"row.valueType\" @on-change=\"onChangeFormParamType(index, row)\" transfer>\r\n <i-option v-for=\"item in formParamTypeList\" :value=\"item.name\" :key=\"item.name\">{{item.text}}</i-option>\r\n </i-select>\r\n </div>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"valueContent\">\r\n <i-input v-if=\"row.valueType !== 'FILE'\" class=\"diy-input\" placeholder=\"输入参数值\" v-model=\"bodyDataList[index].valueContent\"></i-input>\r\n <i-upload v-if=\"row.valueType === 'FILE' && !row.fileName\" action=\"\" :before-upload=\"onImport\" :show-upload-list=\"false\">\r\n <i-button class=\"file-btn\" icon=\"ios-cloud-upload-outline\" @click=\"onClickRow(row)\">选择文件</i-button>\r\n </i-upload>\r\n <div class=\"file-wrap\" v-if=\"row.valueType === 'FILE' && row.fileName\">\r\n <div class=\"file-name\" :title=\"row.fileName\">{{ row.fileName }}</div>\r\n <i-icon type=\"ios-close\" @click=\"onClearFile(row)\"/>\r\n </div>\r\n </template>\r\n <!-- <template slot-scope=\"{ row,index }\" slot=\"required\">\r\n <i-switch v-model=\"bodyDataList[index].required\">\r\n <span slot=\"open\">是</span>\r\n <span slot=\"close\">否</span>\r\n </i-switch>\r\n </template> -->\r\n <template slot-scope=\"{ row,index }\" slot=\"text\">\r\n <i-input class=\"diy-input\" placeholder=\"输入备注\" v-model=\"bodyDataList[index].remark\"></i-input>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"action\">\r\n <i-poptip class=\"action-btn delete\" title=\"确认删除这条数据吗?\" confirm @on-ok=\"onDeleteBodyParam(interfaceModel.formParams,row.indexFlag)\" transfer>\r\n <i class=\"iconfont icon-delete\" title=\"删除\"></i>\r\n </i-poptip>\r\n <span>\r\n <i v-if=\"index > 0\" class=\"iconfont icon-up\" @click=\"onUpBodyParam(interfaceModel.formParams,row.id)\" title=\"上移\"></i>\r\n <i v-if=\"index > 0\" class=\"iconfont icon-top\" @click=\"onTopBodyParam(interfaceModel.formParams,row.id)\" title=\"置顶\"></i>\r\n <i v-if=\"index < bodyDataList.length - 1\" @click=\"onDownBodyParam(interfaceModel.formParams,row.id)\" class=\"iconfont icon-down\" title=\"下移\"></i>\r\n <i v-if=\"index < bodyDataList.length - 1\" @click=\"onBottomBodyParam(interfaceModel.formParams,row.id)\" class=\"iconfont icon-bottom\" title=\"置底\"></i>\r\n </span>\r\n </template>\r\n </i-table>\r\n <u-editor v-else :value.sync=\"interfaceModel.json\" lang=\"json\" @inited=\"onEditorInited\"></u-editor>\r\n </main>\r\n </div>\r\n </i-panel>\r\n </i-collapse>\r\n</article>\r\n"
39906
+ module.exports = "<article class=\"params-setting\">\r\n <i-collapse v-model=\"value\" simple>\r\n <i-panel name=\"1\">\r\n <span>Query参数</span>\r\n <span class=\"status\">{{getExpand('1') ? \"收起\" : \"展开\"}}</span>\r\n <div slot=\"content\" class=\"setting-content\">\r\n <header>\r\n <i-button type=\"primary\" ghost class=\"diy-btn-primary\" @click=\"onAddRequestParam\"> <i class=\"api-icon icon-add\"></i>新增参数 </i-button>\r\n </header>\r\n <main>\r\n <i-table height=\"200\" width=\"1280\" class=\"diy-table\" @on-selection-change=\"onQuerySelectionChange\" :columns=\"paramColumns\" :data=\"queryDataList\">\r\n <template slot-scope=\"{ row,index }\" slot=\"selection\">\r\n <i-checkbox :value=\"!queryDataList[index].disabled\" @on-change=\"onChangeDisabled($event,queryDataList[index])\"> </i-checkbox>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"name\">\r\n <i-input class=\"diy-input\" placeholder=\"输入参数名称\" v-model=\"queryDataList[index].name\"></i-input>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"valueContent\">\r\n <i-input class=\"diy-input\" placeholder=\"输入参数值\" v-model=\"queryDataList[index].valueContent\"></i-input>\r\n </template>\r\n <!-- <template slot-scope=\"{ row,index }\" slot=\"required\">\r\n <i-switch v-model=\"queryDataList[index].required\">\r\n <span slot=\"open\">是</span>\r\n <span slot=\"close\">否</span>\r\n </i-switch>\r\n </template> -->\r\n <template slot-scope=\"{ row,index }\" slot=\"text\">\r\n <i-input class=\"diy-input\" placeholder=\"输入备注\" v-model=\"queryDataList[index].text\"></i-input>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"action\">\r\n <i-poptip class=\"action-btn delete\" title=\"确认删除这条数据吗?\" confirm @on-ok=\"onDelete(queryDataList,row.indexFlag)\" transfer>\r\n <i class=\"iconfont icon-delete\" title=\"删除\"></i>\r\n </i-poptip>\r\n <span>\r\n <i v-if=\"index>0\" class=\"iconfont icon-up\" @click=\"onUp(queryDataList,index)\" title=\"上移\"></i>\r\n <i v-if=\"index>0\" class=\"iconfont icon-top\" title=\"置顶\" @click=\"onTop(queryDataList,index)\"></i>\r\n <i v-if=\"index < queryDataList.length - 1\" @click=\"onDown(queryDataList,index)\" class=\"iconfont icon-down\" title=\"下移\"></i>\r\n <i v-if=\"index < queryDataList.length - 1\" @click=\"onBottom(queryDataList,index)\" class=\"iconfont icon-bottom\" title=\"置底\"></i>\r\n </span>\r\n </template>\r\n </i-table>\r\n </main>\r\n </div>\r\n </i-panel>\r\n <i-panel name=\"2\">\r\n <span>Body参数</span>\r\n <span class=\"status\">{{getExpand('2') ? \"收起\" : \"展开\"}}</span>\r\n <div slot=\"content\" class=\"setting-content\">\r\n <header>\r\n <i-button v-if=\"isFormData\" type=\"primary\" ghost class=\"diy-btn-primary\" @click=\"onAddBodyParam\"> <i class=\"api-icon icon-add\"></i>新增参数 </i-button>\r\n <i-button v-else type=\"primary\" ghost class=\"diy-btn-primary\" @click=\"onBeautify\"> <i class=\"api-icon icon-view\"></i>格式化 </i-button>\r\n <i-select transfer v-model=\"interfaceModel.info.requestBodyType\" class=\"diy-select\">\r\n <i-option v-for=\"item in requestBodyTypeList\" :value=\"item.name\" :key=\"item.name\">{{item.text}}</i-option>\r\n </i-select>\r\n </header>\r\n <main>\r\n <i-table height=\"200\" width=\"1280\" class=\"diy-table\" @on-selection-change=\"onBodySelectionChange\" :columns=\"paramColumns\" :data=\"bodyDataList\" v-if=\"isFormData\">\r\n <template slot-scope=\"{ row,index }\" slot=\"selection\">\r\n <i-checkbox :value=\"!bodyDataList[index].disabled\" @on-change=\"onChangeDisabled($event,bodyDataList[index])\"> </i-checkbox>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"name\">\r\n <div class=\"body-name-row\">\r\n <i-input class=\"diy-input\" placeholder=\"输入参数名称\" v-model=\"bodyDataList[index].name\"></i-input>\r\n <i-select class=\"diy-select\" v-if=\"bodyType === 'Form'\" v-model=\"row.valueType\" @on-change=\"onChangeFormParamType(index, row)\" transfer>\r\n <i-option v-for=\"item in formParamTypeList\" :value=\"item.name\" :key=\"item.name\">{{item.text}}</i-option>\r\n </i-select>\r\n </div>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"valueContent\">\r\n <i-input v-if=\"row.valueType !== 'FILE'\" class=\"diy-input\" placeholder=\"输入参数值\" v-model=\"bodyDataList[index].valueContent\"></i-input>\r\n <i-upload v-if=\"row.valueType === 'FILE' && !row.fileName\" action=\"\" :before-upload=\"onImport\" :show-upload-list=\"false\">\r\n <i-button class=\"file-btn\" icon=\"ios-cloud-upload-outline\" @click=\"onClickRow(row)\">选择文件</i-button>\r\n </i-upload>\r\n <div class=\"file-wrap\" v-if=\"row.valueType === 'FILE' && row.fileName\">\r\n <div class=\"file-name\" :title=\"row.fileName\">{{ row.fileName }}</div>\r\n <i-icon type=\"ios-close\" @click=\"onClearFile(row)\"/>\r\n </div>\r\n </template>\r\n <!-- <template slot-scope=\"{ row,index }\" slot=\"required\">\r\n <i-switch v-model=\"bodyDataList[index].required\">\r\n <span slot=\"open\">是</span>\r\n <span slot=\"close\">否</span>\r\n </i-switch>\r\n </template> -->\r\n <template slot-scope=\"{ row,index }\" slot=\"text\">\r\n <i-input class=\"diy-input\" placeholder=\"输入备注\" v-model=\"bodyDataList[index].remark\"></i-input>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"action\">\r\n <i-poptip class=\"action-btn delete\" title=\"确认删除这条数据吗?\" confirm @on-ok=\"onDeleteBodyParam(interfaceModel.formParams,row.indexFlag)\" transfer>\r\n <i class=\"iconfont icon-delete\" title=\"删除\"></i>\r\n </i-poptip>\r\n <span>\r\n <i v-if=\"index > 0\" class=\"iconfont icon-up\" @click=\"onUpBodyParam(interfaceModel.formParams,row.id)\" title=\"上移\"></i>\r\n <i v-if=\"index > 0\" class=\"iconfont icon-top\" @click=\"onTopBodyParam(interfaceModel.formParams,row.id)\" title=\"置顶\"></i>\r\n <i v-if=\"index < bodyDataList.length - 1\" @click=\"onDownBodyParam(interfaceModel.formParams,row.id)\" class=\"iconfont icon-down\" title=\"下移\"></i>\r\n <i v-if=\"index < bodyDataList.length - 1\" @click=\"onBottomBodyParam(interfaceModel.formParams,row.id)\" class=\"iconfont icon-bottom\" title=\"置底\"></i>\r\n </span>\r\n </template>\r\n </i-table>\r\n <u-editor v-else :value.sync=\"interfaceModel.json\" lang=\"json\" @inited=\"onEditorInited\"></u-editor>\r\n </main>\r\n </div>\r\n </i-panel>\r\n </i-collapse>\r\n</article>\r\n"
39907
39907
 
39908
39908
  /***/ }),
39909
39909
 
@@ -53229,16 +53229,22 @@ function (_super) {
53229
53229
  };
53230
53230
 
53231
53231
  ProjectCombineManage.prototype.onDetail = function (row) {
53232
- var id = (row !== null && row !== void 0 ? row : {}).id;
53233
- this.onAdd(id, false);
53232
+ var _a = row !== null && row !== void 0 ? row : {},
53233
+ id = _a.id,
53234
+ categoryId = _a.categoryId;
53235
+
53236
+ this.onAdd(id, categoryId, false);
53234
53237
  };
53235
53238
 
53236
53239
  ProjectCombineManage.prototype.onEdit = function (row) {
53237
- var id = (row !== null && row !== void 0 ? row : {}).id;
53238
- this.onAdd(id, true);
53240
+ var _a = row !== null && row !== void 0 ? row : {},
53241
+ id = _a.id,
53242
+ categoryId = _a.categoryId;
53243
+
53244
+ this.onAdd(id, categoryId, true);
53239
53245
  };
53240
53246
 
53241
- ProjectCombineManage.prototype.onAdd = function (id, isEdit) {
53247
+ ProjectCombineManage.prototype.onAdd = function (id, categoryId, isEdit) {
53242
53248
  var _a;
53243
53249
 
53244
53250
  if (isEdit === void 0) {
@@ -53261,7 +53267,7 @@ function (_super) {
53261
53267
  query: (_b = {
53262
53268
  isEdit: isEdit ? "1" : "0",
53263
53269
  id: id !== null && id !== void 0 ? id : "",
53264
- categoryId: this.currentNode.id
53270
+ categoryId: categoryId ? categoryId : this.currentNode.id
53265
53271
  }, _b["_".concat(id ? "edit" : "add")] = Date.now().toString(), _b)
53266
53272
  });
53267
53273
  return [2
@@ -62650,7 +62656,8 @@ function (_super) {
62650
62656
 
62651
62657
  _this.value = [];
62652
62658
  _this.paramColumns = [{
62653
- slot: "selection",
62659
+ // slot: "selection",
62660
+ type: "selection",
62654
62661
  width: 60,
62655
62662
  align: "center",
62656
62663
  title: " "
@@ -62662,7 +62669,12 @@ function (_super) {
62662
62669
  title: "参数值",
62663
62670
  slot: "valueContent",
62664
62671
  align: "left"
62665
- }, {
62672
+ }, // {
62673
+ // title: "是否必须",
62674
+ // slot: "required",
62675
+ // align: "left"
62676
+ // },
62677
+ {
62666
62678
  title: "备注",
62667
62679
  slot: "text",
62668
62680
  align: "left"
@@ -62695,7 +62707,11 @@ function (_super) {
62695
62707
  return this.value.includes(value);
62696
62708
  };
62697
62709
 
62698
- ParamsSetting.prototype.onDelete = function (paramList, index) {
62710
+ ParamsSetting.prototype.onDelete = function (paramList, id) {
62711
+ var index = paramList.findIndex(function (v) {
62712
+ return v.indexFlag === id;
62713
+ }); // paramList.splice(index, 1);
62714
+
62699
62715
  paramList.splice(index, 1);
62700
62716
  };
62701
62717
 
@@ -62772,11 +62788,20 @@ function (_super) {
62772
62788
  var _a, _b;
62773
62789
 
62774
62790
  if (!((_b = (_a = this.interfaceModel) === null || _a === void 0 ? void 0 : _a.info) === null || _b === void 0 ? void 0 : _b.id)) return;
62791
+ this.interfaceModel.queryParams.forEach(function (item) {
62792
+ if (!item.indexFlag) {
62793
+ item.indexFlag = _this.formParamsIndex++ + "_" + _this.interfaceModel.info.id;
62794
+ }
62795
+
62796
+ item._checked = !item.disabled;
62797
+ });
62775
62798
  this.queryDataList = this.interfaceModel.queryParams;
62776
62799
  this.interfaceModel.formParams.forEach(function (item) {
62777
62800
  if (!item.indexFlag) {
62778
62801
  item.indexFlag = _this.formParamsIndex++ + "_" + _this.interfaceModel.info.id;
62779
62802
  }
62803
+
62804
+ item._checked = !item.disabled;
62780
62805
  }); // this.bodyDataList = this.interfaceModel.formParams;
62781
62806
  };
62782
62807
 
@@ -62796,11 +62821,13 @@ function (_super) {
62796
62821
 
62797
62822
  ParamsSetting.prototype.onAddRequestParam = function () {
62798
62823
  this.queryDataList.push({
62824
+ indexFlag: this.formParamsIndex++ + "_" + this.interfaceModel.info.id,
62799
62825
  name: "",
62800
62826
  text: "",
62801
62827
  type: "QueryString",
62802
62828
  valueContent: "",
62803
- disabled: false
62829
+ disabled: false,
62830
+ _checked: true
62804
62831
  });
62805
62832
  };
62806
62833
 
@@ -62812,6 +62839,7 @@ function (_super) {
62812
62839
  text: "",
62813
62840
  type: this.typeMap[this.bodyType],
62814
62841
  valueContent: "",
62842
+ _checked: true,
62815
62843
  disabled: false,
62816
62844
  valueType: "String"
62817
62845
  });
@@ -62912,6 +62940,53 @@ function (_super) {
62912
62940
  });
62913
62941
  };
62914
62942
 
62943
+ ParamsSetting.prototype.onQuerySelectionChange = function (rows) {
62944
+ var _this = this;
62945
+
62946
+ this.queryDataList.forEach(function (item) {
62947
+ if (_this.isInArray(rows, item.indexFlag)) {
62948
+ _this.$set(item, "disabled", false);
62949
+
62950
+ _this.$set(item, "_checked", true);
62951
+ } else {
62952
+ _this.$set(item, "disabled", true);
62953
+
62954
+ _this.$set(item, "_checked", false);
62955
+ }
62956
+ });
62957
+ };
62958
+
62959
+ ParamsSetting.prototype.onBodySelectionChange = function (rows) {
62960
+ var _this = this;
62961
+
62962
+ this.bodyDataList.forEach(function (item) {
62963
+ if (_this.isInArray(rows, item.indexFlag)) {
62964
+ _this.$set(item, "disabled", false);
62965
+
62966
+ _this.$set(item, "_checked", true);
62967
+ } else {
62968
+ _this.$set(item, "disabled", true);
62969
+
62970
+ _this.$set(item, "_checked", false);
62971
+ }
62972
+ });
62973
+ };
62974
+
62975
+ ParamsSetting.prototype.isInArray = function (rows, id) {
62976
+ var find = false;
62977
+
62978
+ for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {
62979
+ var o = rows_1[_i];
62980
+
62981
+ if (o.indexFlag === id) {
62982
+ find = true;
62983
+ break;
62984
+ }
62985
+ }
62986
+
62987
+ return find;
62988
+ };
62989
+
62915
62990
  var _a, _b, _c;
62916
62991
 
62917
62992
  params_setting_decorate([Object(flagwind_web_["config"])({
package/dist/index.umd.js CHANGED
@@ -39912,7 +39912,7 @@ module.exports = function (NAME) {
39912
39912
  /***/ "7640":
39913
39913
  /***/ (function(module, exports) {
39914
39914
 
39915
- module.exports = "<article class=\"params-setting\">\r\n <i-collapse v-model=\"value\" simple>\r\n <i-panel name=\"1\">\r\n <span>Query参数</span>\r\n <span class=\"status\">{{getExpand('1') ? \"收起\" : \"展开\"}}</span>\r\n <div slot=\"content\" class=\"setting-content\">\r\n <header>\r\n <i-button type=\"primary\" ghost class=\"diy-btn-primary\" @click=\"onAddRequestParam\"> <i class=\"api-icon icon-add\"></i>新增参数 </i-button>\r\n </header>\r\n <main>\r\n <i-table height=\"200\" width=\"1280\" class=\"diy-table\" :columns=\"paramColumns\" :data=\"queryDataList\">\r\n <template slot-scope=\"{ row,index }\" slot=\"selection\">\r\n <i-checkbox :value=\"!queryDataList[index].disabled\" @on-change=\"onChangeDisabled($event,queryDataList[index])\"> </i-checkbox>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"name\">\r\n <i-input class=\"diy-input\" placeholder=\"输入参数名称\" v-model=\"queryDataList[index].name\"></i-input>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"valueContent\">\r\n <i-input class=\"diy-input\" placeholder=\"输入参数值\" v-model=\"queryDataList[index].valueContent\"></i-input>\r\n </template>\r\n <!-- <template slot-scope=\"{ row,index }\" slot=\"required\">\r\n <i-switch v-model=\"queryDataList[index].required\">\r\n <span slot=\"open\">是</span>\r\n <span slot=\"close\">否</span>\r\n </i-switch>\r\n </template> -->\r\n <template slot-scope=\"{ row,index }\" slot=\"text\">\r\n <i-input class=\"diy-input\" placeholder=\"输入备注\" v-model=\"queryDataList[index].text\"></i-input>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"action\">\r\n <i-poptip class=\"action-btn delete\" title=\"确认删除这条数据吗?\" confirm @on-ok=\"onDelete(queryDataList,index)\" transfer>\r\n <i class=\"iconfont icon-delete\" title=\"删除\"></i>\r\n </i-poptip>\r\n <span>\r\n <i v-if=\"index>0\" class=\"iconfont icon-up\" @click=\"onUp(queryDataList,index)\" title=\"上移\"></i>\r\n <i v-if=\"index>0\" class=\"iconfont icon-top\" title=\"置顶\" @click=\"onTop(queryDataList,index)\"></i>\r\n <i v-if=\"index < queryDataList.length - 1\" @click=\"onDown(queryDataList,index)\" class=\"iconfont icon-down\" title=\"下移\"></i>\r\n <i v-if=\"index < queryDataList.length - 1\" @click=\"onBottom(queryDataList,index)\" class=\"iconfont icon-bottom\" title=\"置底\"></i>\r\n </span>\r\n </template>\r\n </i-table>\r\n </main>\r\n </div>\r\n </i-panel>\r\n <i-panel name=\"2\">\r\n <span>Body参数</span>\r\n <span class=\"status\">{{getExpand('2') ? \"收起\" : \"展开\"}}</span>\r\n <div slot=\"content\" class=\"setting-content\">\r\n <header>\r\n <i-button v-if=\"isFormData\" type=\"primary\" ghost class=\"diy-btn-primary\" @click=\"onAddBodyParam\"> <i class=\"api-icon icon-add\"></i>新增参数 </i-button>\r\n <i-button v-else type=\"primary\" ghost class=\"diy-btn-primary\" @click=\"onBeautify\"> <i class=\"api-icon icon-view\"></i>格式化 </i-button>\r\n <i-select transfer v-model=\"interfaceModel.info.requestBodyType\" class=\"diy-select\">\r\n <i-option v-for=\"item in requestBodyTypeList\" :value=\"item.name\" :key=\"item.name\">{{item.text}}</i-option>\r\n </i-select>\r\n </header>\r\n <main>\r\n <i-table height=\"200\" width=\"1280\" class=\"diy-table\" :columns=\"paramColumns\" :data=\"bodyDataList\" v-if=\"isFormData\">\r\n <template slot-scope=\"{ row,index }\" slot=\"selection\">\r\n <i-checkbox :value=\"!bodyDataList[index].disabled\" @on-change=\"onChangeDisabled($event,bodyDataList[index])\"> </i-checkbox>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"name\">\r\n <div class=\"body-name-row\">\r\n <i-input class=\"diy-input\" placeholder=\"输入参数名称\" v-model=\"bodyDataList[index].name\"></i-input>\r\n <i-select class=\"diy-select\" v-if=\"bodyType === 'Form'\" v-model=\"row.valueType\" @on-change=\"onChangeFormParamType(index, row)\" transfer>\r\n <i-option v-for=\"item in formParamTypeList\" :value=\"item.name\" :key=\"item.name\">{{item.text}}</i-option>\r\n </i-select>\r\n </div>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"valueContent\">\r\n <i-input v-if=\"row.valueType !== 'FILE'\" class=\"diy-input\" placeholder=\"输入参数值\" v-model=\"bodyDataList[index].valueContent\"></i-input>\r\n <i-upload v-if=\"row.valueType === 'FILE' && !row.fileName\" action=\"\" :before-upload=\"onImport\" :show-upload-list=\"false\">\r\n <i-button class=\"file-btn\" icon=\"ios-cloud-upload-outline\" @click=\"onClickRow(row)\">选择文件</i-button>\r\n </i-upload>\r\n <div class=\"file-wrap\" v-if=\"row.valueType === 'FILE' && row.fileName\">\r\n <div class=\"file-name\" :title=\"row.fileName\">{{ row.fileName }}</div>\r\n <i-icon type=\"ios-close\" @click=\"onClearFile(row)\"/>\r\n </div>\r\n </template>\r\n <!-- <template slot-scope=\"{ row,index }\" slot=\"required\">\r\n <i-switch v-model=\"bodyDataList[index].required\">\r\n <span slot=\"open\">是</span>\r\n <span slot=\"close\">否</span>\r\n </i-switch>\r\n </template> -->\r\n <template slot-scope=\"{ row,index }\" slot=\"text\">\r\n <i-input class=\"diy-input\" placeholder=\"输入备注\" v-model=\"bodyDataList[index].remark\"></i-input>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"action\">\r\n <i-poptip class=\"action-btn delete\" title=\"确认删除这条数据吗?\" confirm @on-ok=\"onDeleteBodyParam(interfaceModel.formParams,row.indexFlag)\" transfer>\r\n <i class=\"iconfont icon-delete\" title=\"删除\"></i>\r\n </i-poptip>\r\n <span>\r\n <i v-if=\"index > 0\" class=\"iconfont icon-up\" @click=\"onUpBodyParam(interfaceModel.formParams,row.id)\" title=\"上移\"></i>\r\n <i v-if=\"index > 0\" class=\"iconfont icon-top\" @click=\"onTopBodyParam(interfaceModel.formParams,row.id)\" title=\"置顶\"></i>\r\n <i v-if=\"index < bodyDataList.length - 1\" @click=\"onDownBodyParam(interfaceModel.formParams,row.id)\" class=\"iconfont icon-down\" title=\"下移\"></i>\r\n <i v-if=\"index < bodyDataList.length - 1\" @click=\"onBottomBodyParam(interfaceModel.formParams,row.id)\" class=\"iconfont icon-bottom\" title=\"置底\"></i>\r\n </span>\r\n </template>\r\n </i-table>\r\n <u-editor v-else :value.sync=\"interfaceModel.json\" lang=\"json\" @inited=\"onEditorInited\"></u-editor>\r\n </main>\r\n </div>\r\n </i-panel>\r\n </i-collapse>\r\n</article>\r\n"
39915
+ module.exports = "<article class=\"params-setting\">\r\n <i-collapse v-model=\"value\" simple>\r\n <i-panel name=\"1\">\r\n <span>Query参数</span>\r\n <span class=\"status\">{{getExpand('1') ? \"收起\" : \"展开\"}}</span>\r\n <div slot=\"content\" class=\"setting-content\">\r\n <header>\r\n <i-button type=\"primary\" ghost class=\"diy-btn-primary\" @click=\"onAddRequestParam\"> <i class=\"api-icon icon-add\"></i>新增参数 </i-button>\r\n </header>\r\n <main>\r\n <i-table height=\"200\" width=\"1280\" class=\"diy-table\" @on-selection-change=\"onQuerySelectionChange\" :columns=\"paramColumns\" :data=\"queryDataList\">\r\n <template slot-scope=\"{ row,index }\" slot=\"selection\">\r\n <i-checkbox :value=\"!queryDataList[index].disabled\" @on-change=\"onChangeDisabled($event,queryDataList[index])\"> </i-checkbox>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"name\">\r\n <i-input class=\"diy-input\" placeholder=\"输入参数名称\" v-model=\"queryDataList[index].name\"></i-input>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"valueContent\">\r\n <i-input class=\"diy-input\" placeholder=\"输入参数值\" v-model=\"queryDataList[index].valueContent\"></i-input>\r\n </template>\r\n <!-- <template slot-scope=\"{ row,index }\" slot=\"required\">\r\n <i-switch v-model=\"queryDataList[index].required\">\r\n <span slot=\"open\">是</span>\r\n <span slot=\"close\">否</span>\r\n </i-switch>\r\n </template> -->\r\n <template slot-scope=\"{ row,index }\" slot=\"text\">\r\n <i-input class=\"diy-input\" placeholder=\"输入备注\" v-model=\"queryDataList[index].text\"></i-input>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"action\">\r\n <i-poptip class=\"action-btn delete\" title=\"确认删除这条数据吗?\" confirm @on-ok=\"onDelete(queryDataList,row.indexFlag)\" transfer>\r\n <i class=\"iconfont icon-delete\" title=\"删除\"></i>\r\n </i-poptip>\r\n <span>\r\n <i v-if=\"index>0\" class=\"iconfont icon-up\" @click=\"onUp(queryDataList,index)\" title=\"上移\"></i>\r\n <i v-if=\"index>0\" class=\"iconfont icon-top\" title=\"置顶\" @click=\"onTop(queryDataList,index)\"></i>\r\n <i v-if=\"index < queryDataList.length - 1\" @click=\"onDown(queryDataList,index)\" class=\"iconfont icon-down\" title=\"下移\"></i>\r\n <i v-if=\"index < queryDataList.length - 1\" @click=\"onBottom(queryDataList,index)\" class=\"iconfont icon-bottom\" title=\"置底\"></i>\r\n </span>\r\n </template>\r\n </i-table>\r\n </main>\r\n </div>\r\n </i-panel>\r\n <i-panel name=\"2\">\r\n <span>Body参数</span>\r\n <span class=\"status\">{{getExpand('2') ? \"收起\" : \"展开\"}}</span>\r\n <div slot=\"content\" class=\"setting-content\">\r\n <header>\r\n <i-button v-if=\"isFormData\" type=\"primary\" ghost class=\"diy-btn-primary\" @click=\"onAddBodyParam\"> <i class=\"api-icon icon-add\"></i>新增参数 </i-button>\r\n <i-button v-else type=\"primary\" ghost class=\"diy-btn-primary\" @click=\"onBeautify\"> <i class=\"api-icon icon-view\"></i>格式化 </i-button>\r\n <i-select transfer v-model=\"interfaceModel.info.requestBodyType\" class=\"diy-select\">\r\n <i-option v-for=\"item in requestBodyTypeList\" :value=\"item.name\" :key=\"item.name\">{{item.text}}</i-option>\r\n </i-select>\r\n </header>\r\n <main>\r\n <i-table height=\"200\" width=\"1280\" class=\"diy-table\" @on-selection-change=\"onBodySelectionChange\" :columns=\"paramColumns\" :data=\"bodyDataList\" v-if=\"isFormData\">\r\n <template slot-scope=\"{ row,index }\" slot=\"selection\">\r\n <i-checkbox :value=\"!bodyDataList[index].disabled\" @on-change=\"onChangeDisabled($event,bodyDataList[index])\"> </i-checkbox>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"name\">\r\n <div class=\"body-name-row\">\r\n <i-input class=\"diy-input\" placeholder=\"输入参数名称\" v-model=\"bodyDataList[index].name\"></i-input>\r\n <i-select class=\"diy-select\" v-if=\"bodyType === 'Form'\" v-model=\"row.valueType\" @on-change=\"onChangeFormParamType(index, row)\" transfer>\r\n <i-option v-for=\"item in formParamTypeList\" :value=\"item.name\" :key=\"item.name\">{{item.text}}</i-option>\r\n </i-select>\r\n </div>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"valueContent\">\r\n <i-input v-if=\"row.valueType !== 'FILE'\" class=\"diy-input\" placeholder=\"输入参数值\" v-model=\"bodyDataList[index].valueContent\"></i-input>\r\n <i-upload v-if=\"row.valueType === 'FILE' && !row.fileName\" action=\"\" :before-upload=\"onImport\" :show-upload-list=\"false\">\r\n <i-button class=\"file-btn\" icon=\"ios-cloud-upload-outline\" @click=\"onClickRow(row)\">选择文件</i-button>\r\n </i-upload>\r\n <div class=\"file-wrap\" v-if=\"row.valueType === 'FILE' && row.fileName\">\r\n <div class=\"file-name\" :title=\"row.fileName\">{{ row.fileName }}</div>\r\n <i-icon type=\"ios-close\" @click=\"onClearFile(row)\"/>\r\n </div>\r\n </template>\r\n <!-- <template slot-scope=\"{ row,index }\" slot=\"required\">\r\n <i-switch v-model=\"bodyDataList[index].required\">\r\n <span slot=\"open\">是</span>\r\n <span slot=\"close\">否</span>\r\n </i-switch>\r\n </template> -->\r\n <template slot-scope=\"{ row,index }\" slot=\"text\">\r\n <i-input class=\"diy-input\" placeholder=\"输入备注\" v-model=\"bodyDataList[index].remark\"></i-input>\r\n </template>\r\n <template slot-scope=\"{ row,index }\" slot=\"action\">\r\n <i-poptip class=\"action-btn delete\" title=\"确认删除这条数据吗?\" confirm @on-ok=\"onDeleteBodyParam(interfaceModel.formParams,row.indexFlag)\" transfer>\r\n <i class=\"iconfont icon-delete\" title=\"删除\"></i>\r\n </i-poptip>\r\n <span>\r\n <i v-if=\"index > 0\" class=\"iconfont icon-up\" @click=\"onUpBodyParam(interfaceModel.formParams,row.id)\" title=\"上移\"></i>\r\n <i v-if=\"index > 0\" class=\"iconfont icon-top\" @click=\"onTopBodyParam(interfaceModel.formParams,row.id)\" title=\"置顶\"></i>\r\n <i v-if=\"index < bodyDataList.length - 1\" @click=\"onDownBodyParam(interfaceModel.formParams,row.id)\" class=\"iconfont icon-down\" title=\"下移\"></i>\r\n <i v-if=\"index < bodyDataList.length - 1\" @click=\"onBottomBodyParam(interfaceModel.formParams,row.id)\" class=\"iconfont icon-bottom\" title=\"置底\"></i>\r\n </span>\r\n </template>\r\n </i-table>\r\n <u-editor v-else :value.sync=\"interfaceModel.json\" lang=\"json\" @inited=\"onEditorInited\"></u-editor>\r\n </main>\r\n </div>\r\n </i-panel>\r\n </i-collapse>\r\n</article>\r\n"
39916
39916
 
39917
39917
  /***/ }),
39918
39918
 
@@ -53238,16 +53238,22 @@ function (_super) {
53238
53238
  };
53239
53239
 
53240
53240
  ProjectCombineManage.prototype.onDetail = function (row) {
53241
- var id = (row !== null && row !== void 0 ? row : {}).id;
53242
- this.onAdd(id, false);
53241
+ var _a = row !== null && row !== void 0 ? row : {},
53242
+ id = _a.id,
53243
+ categoryId = _a.categoryId;
53244
+
53245
+ this.onAdd(id, categoryId, false);
53243
53246
  };
53244
53247
 
53245
53248
  ProjectCombineManage.prototype.onEdit = function (row) {
53246
- var id = (row !== null && row !== void 0 ? row : {}).id;
53247
- this.onAdd(id, true);
53249
+ var _a = row !== null && row !== void 0 ? row : {},
53250
+ id = _a.id,
53251
+ categoryId = _a.categoryId;
53252
+
53253
+ this.onAdd(id, categoryId, true);
53248
53254
  };
53249
53255
 
53250
- ProjectCombineManage.prototype.onAdd = function (id, isEdit) {
53256
+ ProjectCombineManage.prototype.onAdd = function (id, categoryId, isEdit) {
53251
53257
  var _a;
53252
53258
 
53253
53259
  if (isEdit === void 0) {
@@ -53270,7 +53276,7 @@ function (_super) {
53270
53276
  query: (_b = {
53271
53277
  isEdit: isEdit ? "1" : "0",
53272
53278
  id: id !== null && id !== void 0 ? id : "",
53273
- categoryId: this.currentNode.id
53279
+ categoryId: categoryId ? categoryId : this.currentNode.id
53274
53280
  }, _b["_".concat(id ? "edit" : "add")] = Date.now().toString(), _b)
53275
53281
  });
53276
53282
  return [2
@@ -62659,7 +62665,8 @@ function (_super) {
62659
62665
 
62660
62666
  _this.value = [];
62661
62667
  _this.paramColumns = [{
62662
- slot: "selection",
62668
+ // slot: "selection",
62669
+ type: "selection",
62663
62670
  width: 60,
62664
62671
  align: "center",
62665
62672
  title: " "
@@ -62671,7 +62678,12 @@ function (_super) {
62671
62678
  title: "参数值",
62672
62679
  slot: "valueContent",
62673
62680
  align: "left"
62674
- }, {
62681
+ }, // {
62682
+ // title: "是否必须",
62683
+ // slot: "required",
62684
+ // align: "left"
62685
+ // },
62686
+ {
62675
62687
  title: "备注",
62676
62688
  slot: "text",
62677
62689
  align: "left"
@@ -62704,7 +62716,11 @@ function (_super) {
62704
62716
  return this.value.includes(value);
62705
62717
  };
62706
62718
 
62707
- ParamsSetting.prototype.onDelete = function (paramList, index) {
62719
+ ParamsSetting.prototype.onDelete = function (paramList, id) {
62720
+ var index = paramList.findIndex(function (v) {
62721
+ return v.indexFlag === id;
62722
+ }); // paramList.splice(index, 1);
62723
+
62708
62724
  paramList.splice(index, 1);
62709
62725
  };
62710
62726
 
@@ -62781,11 +62797,20 @@ function (_super) {
62781
62797
  var _a, _b;
62782
62798
 
62783
62799
  if (!((_b = (_a = this.interfaceModel) === null || _a === void 0 ? void 0 : _a.info) === null || _b === void 0 ? void 0 : _b.id)) return;
62800
+ this.interfaceModel.queryParams.forEach(function (item) {
62801
+ if (!item.indexFlag) {
62802
+ item.indexFlag = _this.formParamsIndex++ + "_" + _this.interfaceModel.info.id;
62803
+ }
62804
+
62805
+ item._checked = !item.disabled;
62806
+ });
62784
62807
  this.queryDataList = this.interfaceModel.queryParams;
62785
62808
  this.interfaceModel.formParams.forEach(function (item) {
62786
62809
  if (!item.indexFlag) {
62787
62810
  item.indexFlag = _this.formParamsIndex++ + "_" + _this.interfaceModel.info.id;
62788
62811
  }
62812
+
62813
+ item._checked = !item.disabled;
62789
62814
  }); // this.bodyDataList = this.interfaceModel.formParams;
62790
62815
  };
62791
62816
 
@@ -62805,11 +62830,13 @@ function (_super) {
62805
62830
 
62806
62831
  ParamsSetting.prototype.onAddRequestParam = function () {
62807
62832
  this.queryDataList.push({
62833
+ indexFlag: this.formParamsIndex++ + "_" + this.interfaceModel.info.id,
62808
62834
  name: "",
62809
62835
  text: "",
62810
62836
  type: "QueryString",
62811
62837
  valueContent: "",
62812
- disabled: false
62838
+ disabled: false,
62839
+ _checked: true
62813
62840
  });
62814
62841
  };
62815
62842
 
@@ -62821,6 +62848,7 @@ function (_super) {
62821
62848
  text: "",
62822
62849
  type: this.typeMap[this.bodyType],
62823
62850
  valueContent: "",
62851
+ _checked: true,
62824
62852
  disabled: false,
62825
62853
  valueType: "String"
62826
62854
  });
@@ -62921,6 +62949,53 @@ function (_super) {
62921
62949
  });
62922
62950
  };
62923
62951
 
62952
+ ParamsSetting.prototype.onQuerySelectionChange = function (rows) {
62953
+ var _this = this;
62954
+
62955
+ this.queryDataList.forEach(function (item) {
62956
+ if (_this.isInArray(rows, item.indexFlag)) {
62957
+ _this.$set(item, "disabled", false);
62958
+
62959
+ _this.$set(item, "_checked", true);
62960
+ } else {
62961
+ _this.$set(item, "disabled", true);
62962
+
62963
+ _this.$set(item, "_checked", false);
62964
+ }
62965
+ });
62966
+ };
62967
+
62968
+ ParamsSetting.prototype.onBodySelectionChange = function (rows) {
62969
+ var _this = this;
62970
+
62971
+ this.bodyDataList.forEach(function (item) {
62972
+ if (_this.isInArray(rows, item.indexFlag)) {
62973
+ _this.$set(item, "disabled", false);
62974
+
62975
+ _this.$set(item, "_checked", true);
62976
+ } else {
62977
+ _this.$set(item, "disabled", true);
62978
+
62979
+ _this.$set(item, "_checked", false);
62980
+ }
62981
+ });
62982
+ };
62983
+
62984
+ ParamsSetting.prototype.isInArray = function (rows, id) {
62985
+ var find = false;
62986
+
62987
+ for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {
62988
+ var o = rows_1[_i];
62989
+
62990
+ if (o.indexFlag === id) {
62991
+ find = true;
62992
+ break;
62993
+ }
62994
+ }
62995
+
62996
+ return find;
62997
+ };
62998
+
62924
62999
  var _a, _b, _c;
62925
63000
 
62926
63001
  params_setting_decorate([Object(flagwind_web_["config"])({