@egova/egova-api 1.0.263 → 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
 
@@ -62656,7 +62656,8 @@ function (_super) {
62656
62656
 
62657
62657
  _this.value = [];
62658
62658
  _this.paramColumns = [{
62659
- slot: "selection",
62659
+ // slot: "selection",
62660
+ type: "selection",
62660
62661
  width: 60,
62661
62662
  align: "center",
62662
62663
  title: " "
@@ -62668,7 +62669,12 @@ function (_super) {
62668
62669
  title: "参数值",
62669
62670
  slot: "valueContent",
62670
62671
  align: "left"
62671
- }, {
62672
+ }, // {
62673
+ // title: "是否必须",
62674
+ // slot: "required",
62675
+ // align: "left"
62676
+ // },
62677
+ {
62672
62678
  title: "备注",
62673
62679
  slot: "text",
62674
62680
  align: "left"
@@ -62701,7 +62707,11 @@ function (_super) {
62701
62707
  return this.value.includes(value);
62702
62708
  };
62703
62709
 
62704
- 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
+
62705
62715
  paramList.splice(index, 1);
62706
62716
  };
62707
62717
 
@@ -62778,11 +62788,20 @@ function (_super) {
62778
62788
  var _a, _b;
62779
62789
 
62780
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
+ });
62781
62798
  this.queryDataList = this.interfaceModel.queryParams;
62782
62799
  this.interfaceModel.formParams.forEach(function (item) {
62783
62800
  if (!item.indexFlag) {
62784
62801
  item.indexFlag = _this.formParamsIndex++ + "_" + _this.interfaceModel.info.id;
62785
62802
  }
62803
+
62804
+ item._checked = !item.disabled;
62786
62805
  }); // this.bodyDataList = this.interfaceModel.formParams;
62787
62806
  };
62788
62807
 
@@ -62802,11 +62821,13 @@ function (_super) {
62802
62821
 
62803
62822
  ParamsSetting.prototype.onAddRequestParam = function () {
62804
62823
  this.queryDataList.push({
62824
+ indexFlag: this.formParamsIndex++ + "_" + this.interfaceModel.info.id,
62805
62825
  name: "",
62806
62826
  text: "",
62807
62827
  type: "QueryString",
62808
62828
  valueContent: "",
62809
- disabled: false
62829
+ disabled: false,
62830
+ _checked: true
62810
62831
  });
62811
62832
  };
62812
62833
 
@@ -62818,6 +62839,7 @@ function (_super) {
62818
62839
  text: "",
62819
62840
  type: this.typeMap[this.bodyType],
62820
62841
  valueContent: "",
62842
+ _checked: true,
62821
62843
  disabled: false,
62822
62844
  valueType: "String"
62823
62845
  });
@@ -62918,6 +62940,53 @@ function (_super) {
62918
62940
  });
62919
62941
  };
62920
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
+
62921
62990
  var _a, _b, _c;
62922
62991
 
62923
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
 
@@ -62665,7 +62665,8 @@ function (_super) {
62665
62665
 
62666
62666
  _this.value = [];
62667
62667
  _this.paramColumns = [{
62668
- slot: "selection",
62668
+ // slot: "selection",
62669
+ type: "selection",
62669
62670
  width: 60,
62670
62671
  align: "center",
62671
62672
  title: " "
@@ -62677,7 +62678,12 @@ function (_super) {
62677
62678
  title: "参数值",
62678
62679
  slot: "valueContent",
62679
62680
  align: "left"
62680
- }, {
62681
+ }, // {
62682
+ // title: "是否必须",
62683
+ // slot: "required",
62684
+ // align: "left"
62685
+ // },
62686
+ {
62681
62687
  title: "备注",
62682
62688
  slot: "text",
62683
62689
  align: "left"
@@ -62710,7 +62716,11 @@ function (_super) {
62710
62716
  return this.value.includes(value);
62711
62717
  };
62712
62718
 
62713
- 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
+
62714
62724
  paramList.splice(index, 1);
62715
62725
  };
62716
62726
 
@@ -62787,11 +62797,20 @@ function (_super) {
62787
62797
  var _a, _b;
62788
62798
 
62789
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
+ });
62790
62807
  this.queryDataList = this.interfaceModel.queryParams;
62791
62808
  this.interfaceModel.formParams.forEach(function (item) {
62792
62809
  if (!item.indexFlag) {
62793
62810
  item.indexFlag = _this.formParamsIndex++ + "_" + _this.interfaceModel.info.id;
62794
62811
  }
62812
+
62813
+ item._checked = !item.disabled;
62795
62814
  }); // this.bodyDataList = this.interfaceModel.formParams;
62796
62815
  };
62797
62816
 
@@ -62811,11 +62830,13 @@ function (_super) {
62811
62830
 
62812
62831
  ParamsSetting.prototype.onAddRequestParam = function () {
62813
62832
  this.queryDataList.push({
62833
+ indexFlag: this.formParamsIndex++ + "_" + this.interfaceModel.info.id,
62814
62834
  name: "",
62815
62835
  text: "",
62816
62836
  type: "QueryString",
62817
62837
  valueContent: "",
62818
- disabled: false
62838
+ disabled: false,
62839
+ _checked: true
62819
62840
  });
62820
62841
  };
62821
62842
 
@@ -62827,6 +62848,7 @@ function (_super) {
62827
62848
  text: "",
62828
62849
  type: this.typeMap[this.bodyType],
62829
62850
  valueContent: "",
62851
+ _checked: true,
62830
62852
  disabled: false,
62831
62853
  valueType: "String"
62832
62854
  });
@@ -62927,6 +62949,53 @@ function (_super) {
62927
62949
  });
62928
62950
  };
62929
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
+
62930
62999
  var _a, _b, _c;
62931
63000
 
62932
63001
  params_setting_decorate([Object(flagwind_web_["config"])({