@egova/egova-api 1.1.7 → 1.1.9

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.
@@ -1199,7 +1199,7 @@ module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
1199
1199
  /***/ "7640":
1200
1200
  /***/ (function(module, exports) {
1201
1201
 
1202
- 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-switch size=\"large\" :value=\"!queryDataList[index].disabled\" @on-change=\"onChangeDisabled($event,queryDataList[index])\">\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=\"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].requireFlag\" :disabled=\"queryDataList[index].disabled\" :true-value=\"1\" :false-value=\"0\">\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\r\n height=\"200\"\r\n width=\"1280\"\r\n class=\"diy-table\"\r\n @on-selection-change=\"onBodySelectionChange\"\r\n :columns=\"paramColumns\"\r\n :data=\"bodyDataList\"\r\n v-if=\"isFormData\"\r\n >\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\r\n v-if=\"index < bodyDataList.length - 1\"\r\n @click=\"onBottomBodyParam(interfaceModel.formParams,row.id)\"\r\n class=\"iconfont icon-bottom\"\r\n title=\"置底\"\r\n ></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"
1202
+ 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-switch size=\"large\" :value=\"!queryDataList[index].disabled\" @on-change=\"onChangeDisabled($event,queryDataList[index],'query')\">\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=\"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].requireFlag\" :disabled=\"queryDataList[index].disabled\" :true-value=\"1\" :false-value=\"0\">\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,'query')\" 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\r\n height=\"200\"\r\n width=\"1280\"\r\n class=\"diy-table\"\r\n @on-selection-change=\"onBodySelectionChange\"\r\n :columns=\"bodyColumns\"\r\n :data=\"bodyDataList\"\r\n v-if=\"isFormData\"\r\n >\r\n <template slot-scope=\"{ row,index }\" slot=\"selection\">\r\n <i-switch size=\"large\" :value=\"!bodyDataList[index].disabled\" @on-change=\"onChangeDisabled($event,bodyDataList[index],'body')\">\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=\"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].requireFlag\" :disabled=\"bodyDataList[index].disabled\" :true-value=\"1\" :false-value=\"0\">\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,'body')\" 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\r\n v-if=\"index < bodyDataList.length - 1\"\r\n @click=\"onBottomBodyParam(interfaceModel.formParams,row.id)\"\r\n class=\"iconfont icon-bottom\"\r\n title=\"置底\"\r\n ></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"
1203
1203
 
1204
1204
  /***/ }),
1205
1205
 
@@ -5993,7 +5993,6 @@ var tree_Tree = /** @class */function (_super) {
5993
5993
  });
5994
5994
  };
5995
5995
  Tree.prototype.onSuccess = function (res, file) {
5996
- // debugger
5997
5996
  if (res && !res.hasError) {
5998
5997
  if (!res.result) {
5999
5998
  this.$Message.success("导入成功");
@@ -6302,6 +6301,9 @@ var css = __webpack_require__("3497");
6302
6301
  // EXTERNAL MODULE: ./src/views/project-combine/data-model/data-model-doc/index.scss
6303
6302
  var data_model_doc = __webpack_require__("9b65");
6304
6303
 
6304
+ // CONCATENATED MODULE: ./src/views/project-combine/data-model/data-model-doc/markdown-style.ts
6305
+ /* 自定义一个markdown样式,用来导出到pdf和html时使用 */
6306
+ var markdownStyle = '<style>body { font-family: Arial, sans-serif; line-height: 1.6;margin: 20px;color: #333;background-color: #fff;} h1, h2, h3, h4,h5,h6 { font-weight: bold; margin-bottom: 20px; color: #333; border-bottom: 2px solid #ddd; padding-bottom: 10px;} h1 { font-size: 2.5em;} h2 { font-size: 2em; } h3 {font-size: 1.75em;} h4 {font-size: 1.5em;} h5 {font-size: 1.25em;} h6 {font-size: 1em;} p { margin-bottom: 1em;} ul, ol { margin-bottom: 1em; padding-left: 40px;} li {margin-bottom: 0.5em;} a { color: #0366d6; text-decoration: none;} a:hover {text-decoration: underline;} pre, code { background-color: #f0f0f0; padding: 5px; font-family: Consolas, "Courier New", monospace;} pre { padding: 10px; overflow-x: auto;} blockquote { border-left: 4px solid #dfe2e5; padding: 10px 20px; margin: 20px 0; background-color: #f9f9f9; color: #555;} table { width: 100%; border-collapse: collapse; margin-bottom: 20px;} th,td { border: 1px solid #ddd; padding: 8px; text-align: left;} th { background-color: #f3f3f3; font-weight: bold;} tr:nth-child(even) { background-color: #f9f9f9;} img { max-width: 100%; height: auto; display: block; margin: 20px 0;} @media print { body {font-size: 12pt;} table { border: 1px solid black;} th, td {border: 1px solid black; } pre,code { background-color: #f0f0f0;} a { color: black; text-decoration: none;} h1, h2, h3, h4, h5, h6 { color: black; border: none;} }</style>';
6305
6307
  // CONCATENATED MODULE: ./src/views/project-combine/data-model/data-model-doc/index.ts
6306
6308
 
6307
6309
 
@@ -6312,6 +6314,7 @@ var data_model_doc = __webpack_require__("9b65");
6312
6314
  // tslint:disable-next-line:no-submodule-imports
6313
6315
 
6314
6316
 
6317
+
6315
6318
  var data_model_doc_DataModelDoc = /** @class */function (_super) {
6316
6319
  __extends(DataModelDoc, _super);
6317
6320
  function DataModelDoc() {
@@ -6347,7 +6350,7 @@ var data_model_doc_DataModelDoc = /** @class */function (_super) {
6347
6350
  iframe.contentWindow.print();
6348
6351
  };
6349
6352
  DataModelDoc.prototype.onChange = function (value, render) {
6350
- this.render = render;
6353
+ this.render = markdownStyle + render;
6351
6354
  };
6352
6355
  DataModelDoc.prototype.onMenuClick = function (name) {
6353
6356
  if (name === "pdf") {
@@ -10898,11 +10901,53 @@ var params_setting_ParamsSetting = /** @class */function (_super) {
10898
10901
  function ParamsSetting() {
10899
10902
  var _this = _super !== null && _super.apply(this, arguments) || this;
10900
10903
  _this.value = [];
10904
+ _this.commonColuns = [{
10905
+ title: "参数名",
10906
+ slot: "name",
10907
+ align: "left"
10908
+ }, {
10909
+ title: "参数值",
10910
+ slot: "valueContent",
10911
+ align: "left"
10912
+ }, {
10913
+ title: "必填",
10914
+ slot: "required",
10915
+ width: 95,
10916
+ align: "left",
10917
+ renderHeader: function (h, params) {
10918
+ return h("div", {
10919
+ class: "th-tip"
10920
+ }, [h("i-poptip", {
10921
+ props: {
10922
+ trigger: "hover",
10923
+ content: "参数启用同时非必填时,若调用方未传具体参数值,将使用当前定义的参数值。",
10924
+ placement: "top",
10925
+ transfer: true,
10926
+ "word-wrap": true
10927
+ }
10928
+ }, [h("i-icon", {
10929
+ props: {
10930
+ type: "ios-information-circle-outline"
10931
+ }
10932
+ })]), h("span", "必填")]);
10933
+ }
10934
+ }, {
10935
+ title: "备注",
10936
+ slot: "text",
10937
+ align: "left"
10938
+ }, {
10939
+ title: "操作",
10940
+ slot: "action",
10941
+ align: "left",
10942
+ width: 300
10943
+ }];
10901
10944
  _this.queryDataList = [];
10902
10945
  // public bodyDataList: Array<any> = [];
10903
10946
  _this.requestBodyTypeList = [];
10904
- _this.hasChecked = false;
10905
- _this.hasMidChecked = false;
10947
+ _this.hasQueryChecked = false;
10948
+ _this.hasQueryMidChecked = false;
10949
+ _this.hasBodyChecked = false;
10950
+ _this.hasBodyMidChecked = false;
10906
10951
  _this.typeMap = {
10907
10952
  Form: "FormData",
10908
10953
  X_www_form_urlencoded: "FormUrlEncoded"
@@ -10921,63 +10966,47 @@ var params_setting_ParamsSetting = /** @class */function (_super) {
10921
10966
  Object.defineProperty(ParamsSetting.prototype, "paramColumns", {
10922
10967
  get: function () {
10923
10968
  var _this = this;
10924
- return [{
10969
+ return __spreadArray([{
10925
10970
  slot: "selection",
10926
- // type: "selection",
10927
10971
  width: 100,
10928
10972
  align: "center",
10929
10973
  title: "启用",
10930
10974
  renderHeader: function (h, params) {
10931
10975
  return h(project_detail_params_setting_switch, {
10932
10976
  props: {
10933
- value: _this.hasChecked,
10934
- midState: _this.hasMidChecked
10977
+ value: _this.hasQueryChecked,
10978
+ midState: _this.hasQueryMidChecked
10935
10979
  },
10936
10980
  on: {
10937
- onChange: _this.onChange
10981
+ onChange: _this.onQueryChange
10938
10982
  }
10939
10983
  });
10940
10984
  }
10941
- }, {
10942
- title: "参数名",
10943
- slot: "name",
10944
- align: "left"
10945
- }, {
10946
- title: "参数值",
10947
- slot: "valueContent",
10948
- align: "left"
10949
- }, {
10950
- title: "必填",
10951
- slot: "required",
10952
- width: 95,
10953
- align: "left",
10985
+ }], this.commonColuns, true);
10986
+ },
10987
+ enumerable: false,
10988
+ configurable: true
10989
+ });
10990
+ Object.defineProperty(ParamsSetting.prototype, "bodyColumns", {
10991
+ get: function () {
10992
+ var _this = this;
10993
+ return __spreadArray([{
10994
+ slot: "selection",
10995
+ width: 100,
10996
+ align: "center",
10997
+ title: "启用",
10954
10998
  renderHeader: function (h, params) {
10955
- return h("div", {
10956
- class: "th-tip"
10957
- }, [h("i-poptip", {
10958
- props: {
10959
- trigger: "hover",
10960
- content: "参数启用同时非必填时,若调用方未传具体参数值,将使用当前定义的参数值。",
10961
- placement: "top",
10962
- transfer: true,
10963
- "word-wrap": true
10964
- }
10965
- }, [h("i-icon", {
10999
+ return h(project_detail_params_setting_switch, {
10966
11000
  props: {
10967
- type: "ios-information-circle-outline"
11001
+ value: _this.hasBodyChecked,
11002
+ midState: _this.hasBodyMidChecked
11003
+ },
11004
+ on: {
11005
+ onChange: _this.onBodyChange
10968
11006
  }
10969
- })]), h("span", "必填")]);
10970
- }
10971
- }, {
10972
- title: "备注",
10973
- slot: "text",
10974
- align: "left"
10975
- }, {
10976
- title: "操作",
10977
- slot: "action",
10978
- align: "left",
10979
- width: 300
10980
- }];
11007
+ });
11008
+ }
11009
+ }], this.commonColuns, true);
10981
11010
  },
10982
11011
  enumerable: false,
10983
11012
  configurable: true
@@ -10989,14 +11018,13 @@ var params_setting_ParamsSetting = /** @class */function (_super) {
10989
11018
  var index = paramList.findIndex(function (v) {
10990
11019
  return v.indexFlag === id;
10991
11020
  });
10992
- // paramList.splice(index, 1);
10993
11021
  paramList.splice(index, 1);
10994
- this.buildCheckedState();
11022
+ this.buildQueryCheckedState();
10995
11023
  };
10996
11024
  /**
10997
11025
  * [true,true]: 第一个代表是否勾选,第二个代表是否半勾选
10998
11026
  */
10999
- ParamsSetting.prototype.buildCheckedState = function () {
11027
+ ParamsSetting.prototype.buildQueryCheckedState = function () {
11000
11028
  var checked = 0;
11001
11029
  for (var _i = 0, _a = this.queryDataList; _i < _a.length; _i++) {
11002
11030
  var o = _a[_i];
@@ -11005,11 +11033,27 @@ var params_setting_ParamsSetting = /** @class */function (_super) {
11005
11033
  }
11006
11034
  }
11007
11035
  if (checked > 0 && checked !== this.queryDataList.length) {
11008
- this.hasChecked = true;
11009
- this.hasMidChecked = true;
11036
+ this.hasQueryChecked = true;
11037
+ this.hasQueryMidChecked = true;
11038
+ } else {
11039
+ this.hasQueryChecked = checked > 0;
11040
+ this.hasQueryMidChecked = false;
11041
+ }
11042
+ };
11043
+ ParamsSetting.prototype.buildBodyCheckedState = function () {
11044
+ var checked = 0;
11045
+ for (var _i = 0, _a = this.bodyDataList; _i < _a.length; _i++) {
11046
+ var o = _a[_i];
11047
+ if (!o.disabled) {
11048
+ checked = checked + 1;
11049
+ }
11050
+ }
11051
+ if (checked > 0 && checked !== this.bodyDataList.length) {
11052
+ this.hasBodyChecked = true;
11053
+ this.hasBodyMidChecked = true;
11010
11054
  } else {
11011
- this.hasChecked = checked > 0;
11012
- this.hasMidChecked = false;
11055
+ this.hasBodyChecked = checked > 0;
11056
+ this.hasBodyMidChecked = false;
11013
11057
  }
11014
11058
  };
11015
11059
  ParamsSetting.prototype.onUp = function (paramList, index) {
@@ -11035,6 +11079,7 @@ var params_setting_ParamsSetting = /** @class */function (_super) {
11035
11079
  return v.indexFlag === id;
11036
11080
  });
11037
11081
  paramList.splice(index, 1);
11082
+ this.buildBodyCheckedState();
11038
11083
  };
11039
11084
  ParamsSetting.prototype.onUpBodyParam = function (paramList, id) {
11040
11085
  var index = paramList.findIndex(function (v) {
@@ -11066,9 +11111,13 @@ var params_setting_ParamsSetting = /** @class */function (_super) {
11066
11111
  var obj = paramList.splice(index, 1);
11067
11112
  paramList.push(obj[0]);
11068
11113
  };
11069
- ParamsSetting.prototype.onChangeDisabled = function (value, item) {
11114
+ ParamsSetting.prototype.onChangeDisabled = function (value, item, type) {
11070
11115
  item.disabled = !value;
11071
- this.buildCheckedState();
11116
+ if (type === "query") {
11117
+ this.buildQueryCheckedState();
11118
+ } else {
11119
+ this.buildBodyCheckedState();
11120
+ }
11072
11121
  };
11073
11122
  ParamsSetting.prototype.init = function () {
11074
11123
  var _this = this;
@@ -11087,8 +11136,8 @@ var params_setting_ParamsSetting = /** @class */function (_super) {
11087
11136
  }
11088
11137
  item._checked = !item.disabled;
11089
11138
  });
11090
- this.buildCheckedState();
11091
- // this.bodyDataList = this.interfaceModel.formParams;
11139
+ this.buildQueryCheckedState();
11140
+ this.buildBodyCheckedState();
11092
11141
  };
11093
11142
  Object.defineProperty(ParamsSetting.prototype, "bodyDataList", {
11094
11143
  get: function () {
@@ -11114,7 +11163,7 @@ var params_setting_ParamsSetting = /** @class */function (_super) {
11114
11163
  disabled: false,
11115
11164
  _checked: true
11116
11165
  });
11117
- this.buildCheckedState();
11166
+ this.buildQueryCheckedState();
11118
11167
  };
11119
11168
  ParamsSetting.prototype.onAddBodyParam = function () {
11120
11169
  this.interfaceModel.formParams.push({
@@ -11124,10 +11173,12 @@ var params_setting_ParamsSetting = /** @class */function (_super) {
11124
11173
  text: "",
11125
11174
  type: this.typeMap[this.bodyType],
11126
11175
  valueContent: "",
11176
+ requireFlag: 0,
11127
11177
  _checked: true,
11128
11178
  disabled: false,
11129
11179
  valueType: "String"
11130
11180
  });
11181
+ this.buildBodyCheckedState();
11131
11182
  };
11132
11183
  Object.defineProperty(ParamsSetting.prototype, "bodyType", {
11133
11184
  get: function () {
@@ -11216,14 +11267,14 @@ var params_setting_ParamsSetting = /** @class */function (_super) {
11216
11267
  }
11217
11268
  });
11218
11269
  };
11219
- ParamsSetting.prototype.onChange = function () {
11270
+ ParamsSetting.prototype.onQueryChange = function () {
11220
11271
  var _this = this;
11221
- if (this.hasMidChecked) {
11272
+ if (this.hasQueryMidChecked) {
11222
11273
  this.queryDataList.forEach(function (item) {
11223
11274
  _this.$set(item, "disabled", true);
11224
11275
  _this.$set(item, "_checked", false);
11225
11276
  });
11226
- } else if (this.hasChecked) {
11277
+ } else if (this.hasQueryChecked) {
11227
11278
  this.queryDataList.forEach(function (item) {
11228
11279
  _this.$set(item, "disabled", true);
11229
11280
  _this.$set(item, "_checked", false);
@@ -11234,7 +11285,27 @@ var params_setting_ParamsSetting = /** @class */function (_super) {
11234
11285
  _this.$set(item, "_checked", true);
11235
11286
  });
11236
11287
  }
11237
- this.buildCheckedState();
11288
+ this.buildQueryCheckedState();
11289
+ };
11290
+ ParamsSetting.prototype.onBodyChange = function () {
11291
+ var _this = this;
11292
+ if (this.hasBodyMidChecked) {
11293
+ this.bodyDataList.forEach(function (item) {
11294
+ _this.$set(item, "disabled", true);
11295
+ _this.$set(item, "_checked", false);
11296
+ });
11297
+ } else if (this.hasBodyChecked) {
11298
+ this.bodyDataList.forEach(function (item) {
11299
+ _this.$set(item, "disabled", true);
11300
+ _this.$set(item, "_checked", false);
11301
+ });
11302
+ } else {
11303
+ this.bodyDataList.forEach(function (item) {
11304
+ _this.$set(item, "disabled", false);
11305
+ _this.$set(item, "_checked", true);
11306
+ });
11307
+ }
11308
+ this.buildBodyCheckedState();
11238
11309
  };
11239
11310
  ParamsSetting.prototype.onBodySelectionChange = function (rows) {
11240
11311
  var _this = this;