@egova/egova-api 1.0.263 → 1.0.265
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.common.js
CHANGED
|
@@ -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,
|
|
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,
|
|
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"])({
|
|
@@ -65780,6 +65849,7 @@ var project_detail_tree = __webpack_require__("9355");
|
|
|
65780
65849
|
|
|
65781
65850
|
|
|
65782
65851
|
|
|
65852
|
+
|
|
65783
65853
|
var project_detail_tree_extends = undefined && undefined.__extends || function () {
|
|
65784
65854
|
var _extendStatics = function extendStatics(d, b) {
|
|
65785
65855
|
_extendStatics = Object.setPrototypeOf || {
|
|
@@ -66323,25 +66393,45 @@ function (_super) {
|
|
|
66323
66393
|
}
|
|
66324
66394
|
|
|
66325
66395
|
this.renderData = this.filterData(this.data.$clone());
|
|
66326
|
-
};
|
|
66396
|
+
}; // /**
|
|
66397
|
+
// * 判断一个节点是否是与关键字匹配的叶子节点,或者是包含符合条件的叶子节点的祖先节点
|
|
66398
|
+
// * @param node
|
|
66399
|
+
// */
|
|
66400
|
+
// public match(node: any) {
|
|
66401
|
+
// if (!node.children || node.children.length === 0) {
|
|
66402
|
+
// return (node.title || node.name).indexOf(this.keyword) !== -1 && (this.type === "all" || this.type === node.method);
|
|
66403
|
+
// } else {
|
|
66404
|
+
// let flag = false;
|
|
66405
|
+
// node.children.forEach((v: any) => {
|
|
66406
|
+
// flag = this.match(v) ? this.match(v) : flag;
|
|
66407
|
+
// });
|
|
66408
|
+
// return flag;
|
|
66409
|
+
// }
|
|
66410
|
+
// }
|
|
66411
|
+
|
|
66327
66412
|
/**
|
|
66328
|
-
|
|
66329
|
-
|
|
66330
|
-
|
|
66413
|
+
* 判断一个节点是否是与关键字匹配的叶子节点或者目录节点,或者是包含符合条件的叶子节点的祖先节点
|
|
66414
|
+
* 如果匹配的是目录节点,那么目录下的节点无需过滤
|
|
66415
|
+
* @param node
|
|
66416
|
+
*/
|
|
66331
66417
|
|
|
66332
66418
|
|
|
66333
66419
|
ProjectTree.prototype.match = function (node) {
|
|
66334
66420
|
var _this = this;
|
|
66335
66421
|
|
|
66336
|
-
|
|
66337
|
-
|
|
66338
|
-
|
|
66339
|
-
|
|
66422
|
+
var matched = (node.title || node.name).indexOf(this.keyword) !== -1;
|
|
66423
|
+
var childrenMatched = false;
|
|
66424
|
+
|
|
66425
|
+
if (!matched && node.children) {
|
|
66340
66426
|
node.children.forEach(function (v) {
|
|
66341
|
-
|
|
66427
|
+
childrenMatched = _this.match(v).matched || _this.match(v).childrenMatched || childrenMatched;
|
|
66342
66428
|
});
|
|
66343
|
-
return flag_1;
|
|
66344
66429
|
}
|
|
66430
|
+
|
|
66431
|
+
return {
|
|
66432
|
+
matched: matched,
|
|
66433
|
+
childrenMatched: childrenMatched
|
|
66434
|
+
};
|
|
66345
66435
|
};
|
|
66346
66436
|
/**
|
|
66347
66437
|
* 处理渲染数据,只保留与关键字匹配的叶子节点和其祖先节点
|
|
@@ -66354,15 +66444,19 @@ function (_super) {
|
|
|
66354
66444
|
|
|
66355
66445
|
if (!data || !Array.isArray(data)) return data;
|
|
66356
66446
|
var d = data.filter(function (v) {
|
|
66357
|
-
return _this.match(v);
|
|
66447
|
+
return _this.match(v).childrenMatched;
|
|
66358
66448
|
});
|
|
66359
66449
|
d = d.map(function (v) {
|
|
66360
66450
|
if (v.children) {
|
|
66451
|
+
v.expand = true;
|
|
66361
66452
|
v.children = _this.filterData(v.children);
|
|
66362
66453
|
}
|
|
66363
66454
|
|
|
66364
66455
|
return v;
|
|
66365
66456
|
});
|
|
66457
|
+
d = d.concat(data.filter(function (v) {
|
|
66458
|
+
return _this.match(v).matched;
|
|
66459
|
+
}));
|
|
66366
66460
|
return d;
|
|
66367
66461
|
};
|
|
66368
66462
|
|
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,
|
|
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,
|
|
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"])({
|
|
@@ -65789,6 +65858,7 @@ var project_detail_tree = __webpack_require__("9355");
|
|
|
65789
65858
|
|
|
65790
65859
|
|
|
65791
65860
|
|
|
65861
|
+
|
|
65792
65862
|
var project_detail_tree_extends = undefined && undefined.__extends || function () {
|
|
65793
65863
|
var _extendStatics = function extendStatics(d, b) {
|
|
65794
65864
|
_extendStatics = Object.setPrototypeOf || {
|
|
@@ -66332,25 +66402,45 @@ function (_super) {
|
|
|
66332
66402
|
}
|
|
66333
66403
|
|
|
66334
66404
|
this.renderData = this.filterData(this.data.$clone());
|
|
66335
|
-
};
|
|
66405
|
+
}; // /**
|
|
66406
|
+
// * 判断一个节点是否是与关键字匹配的叶子节点,或者是包含符合条件的叶子节点的祖先节点
|
|
66407
|
+
// * @param node
|
|
66408
|
+
// */
|
|
66409
|
+
// public match(node: any) {
|
|
66410
|
+
// if (!node.children || node.children.length === 0) {
|
|
66411
|
+
// return (node.title || node.name).indexOf(this.keyword) !== -1 && (this.type === "all" || this.type === node.method);
|
|
66412
|
+
// } else {
|
|
66413
|
+
// let flag = false;
|
|
66414
|
+
// node.children.forEach((v: any) => {
|
|
66415
|
+
// flag = this.match(v) ? this.match(v) : flag;
|
|
66416
|
+
// });
|
|
66417
|
+
// return flag;
|
|
66418
|
+
// }
|
|
66419
|
+
// }
|
|
66420
|
+
|
|
66336
66421
|
/**
|
|
66337
|
-
|
|
66338
|
-
|
|
66339
|
-
|
|
66422
|
+
* 判断一个节点是否是与关键字匹配的叶子节点或者目录节点,或者是包含符合条件的叶子节点的祖先节点
|
|
66423
|
+
* 如果匹配的是目录节点,那么目录下的节点无需过滤
|
|
66424
|
+
* @param node
|
|
66425
|
+
*/
|
|
66340
66426
|
|
|
66341
66427
|
|
|
66342
66428
|
ProjectTree.prototype.match = function (node) {
|
|
66343
66429
|
var _this = this;
|
|
66344
66430
|
|
|
66345
|
-
|
|
66346
|
-
|
|
66347
|
-
|
|
66348
|
-
|
|
66431
|
+
var matched = (node.title || node.name).indexOf(this.keyword) !== -1;
|
|
66432
|
+
var childrenMatched = false;
|
|
66433
|
+
|
|
66434
|
+
if (!matched && node.children) {
|
|
66349
66435
|
node.children.forEach(function (v) {
|
|
66350
|
-
|
|
66436
|
+
childrenMatched = _this.match(v).matched || _this.match(v).childrenMatched || childrenMatched;
|
|
66351
66437
|
});
|
|
66352
|
-
return flag_1;
|
|
66353
66438
|
}
|
|
66439
|
+
|
|
66440
|
+
return {
|
|
66441
|
+
matched: matched,
|
|
66442
|
+
childrenMatched: childrenMatched
|
|
66443
|
+
};
|
|
66354
66444
|
};
|
|
66355
66445
|
/**
|
|
66356
66446
|
* 处理渲染数据,只保留与关键字匹配的叶子节点和其祖先节点
|
|
@@ -66363,15 +66453,19 @@ function (_super) {
|
|
|
66363
66453
|
|
|
66364
66454
|
if (!data || !Array.isArray(data)) return data;
|
|
66365
66455
|
var d = data.filter(function (v) {
|
|
66366
|
-
return _this.match(v);
|
|
66456
|
+
return _this.match(v).childrenMatched;
|
|
66367
66457
|
});
|
|
66368
66458
|
d = d.map(function (v) {
|
|
66369
66459
|
if (v.children) {
|
|
66460
|
+
v.expand = true;
|
|
66370
66461
|
v.children = _this.filterData(v.children);
|
|
66371
66462
|
}
|
|
66372
66463
|
|
|
66373
66464
|
return v;
|
|
66374
66465
|
});
|
|
66466
|
+
d = d.concat(data.filter(function (v) {
|
|
66467
|
+
return _this.match(v).matched;
|
|
66468
|
+
}));
|
|
66375
66469
|
return d;
|
|
66376
66470
|
};
|
|
66377
66471
|
|