@indfnd/common 0.1.6 → 0.1.8

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/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.1.8](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.7...v0.1.8) (2024-03-29)
6
+
7
+
8
+ ### Features
9
+
10
+ * 查询表单支持查询条件通行;报表组件完善入库 ([9640832](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/96408327b005bc2beeb5dd64697307dd0d0d90a0))
11
+
12
+ ### [0.1.7](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.6...v0.1.7) (2024-03-29)
13
+
5
14
  ### [0.1.6](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.5...v0.1.6) (2024-03-28)
6
15
 
7
16
 
@@ -2,7 +2,7 @@ import { Button as Button$1, ButtonGroup as ButtonGroup$1, Input, Drawer as Draw
2
2
  import { isNil, formatDate as formatDate$1, useConfig, getLocalStorage, getQuarterNum, formatQuarter, str2Date, isDate, isArray, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios, isFunction, isString, exportJsonToExcel as exportJsonToExcel$1, importJsonFromExcel, on, off, deleteMenuHistoryApi, deleteMenuCollectApi, getMenuHistoryApi, getMenuCollectApi, listItemTreeApi, getPriceInfo, MIME_TYPE, base64ToBlob, putOssFileApi, isEqual, getCaptchaURL, guid, setLocalStorage, removeLocalStorage, clearSessionStorage, cryptor, getToken, putOssFileUrl, getOssFileUrl, responseInterceptors, config as config$1, setToken, loginApi, clearUserInfoCache, clearPermissionCache, logoutApi, getUserInfoCache, getUserInfoApi, setUserInfoCache, getSessionStorage, setSessionStorage, getAppListApi, getPermissionCache, getPermissionApi, setPermissionCache, menuHistoryApi, addMenuCollectApi, removeMenuCollectApi, getIndexDescCache, listIndexDescApi, setIndexDescCache } from "@indfnd/utils";
3
3
  import Vue$1 from "vue";
4
4
  const name$1 = "@indfnd/common";
5
- const version = "0.1.5";
5
+ const version = "0.1.7";
6
6
  const author = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -48386,6 +48386,7 @@ var FormImpl = {
48386
48386
  };
48387
48387
  if (d.validate) {
48388
48388
  validateTmp.validator = d.validate;
48389
+ validateTmp.message = null;
48389
48390
  }
48390
48391
  if (["number"].includes(d.type)) {
48391
48392
  validateTmp.type = "number";
@@ -48524,21 +48525,22 @@ var FormImpl = {
48524
48525
  render(h) {
48525
48526
  let formItems = [];
48526
48527
  let spanList;
48527
- if (this.formType == "search") {
48528
- spanList = _.fill(_.range(Math.max(4, this.fieldList.length)), 6);
48529
- } else {
48530
- spanList = _.fill(_.range(this.fieldList.length), this.defaultSpan);
48531
- _.forEach(this.fieldList, (d, idx) => {
48532
- if (d.span) {
48533
- spanList[idx] = d.span;
48534
- } else if (["textarea", "fileUpload", "imgUpload"].includes(d.type)) {
48535
- spanList[idx] = 24;
48536
- }
48537
- let conditionFlag = d.condition instanceof Function ? d.condition(this.form) : d.condition !== false;
48538
- if (!conditionFlag) {
48539
- spanList[idx] = 0;
48540
- }
48541
- });
48528
+ spanList = _.fill(
48529
+ _.range(this.fieldList.length),
48530
+ this.formType == "search" ? 6 : this.defaultSpan
48531
+ );
48532
+ _.forEach(this.fieldList, (d, idx) => {
48533
+ if (d.span) {
48534
+ spanList[idx] = d.span;
48535
+ } else if (["textarea", "fileUpload", "imgUpload"].includes(d.type)) {
48536
+ spanList[idx] = 24;
48537
+ }
48538
+ let conditionFlag = d.condition instanceof Function ? d.condition(this.form) : d.condition !== false;
48539
+ if (!conditionFlag) {
48540
+ spanList[idx] = 0;
48541
+ }
48542
+ });
48543
+ if (this.formType !== "search") {
48542
48544
  let spanCount = 0;
48543
48545
  _.forEach(spanList, (d, idx) => {
48544
48546
  if (spanCount != 0 && d != this.defaultSpan && d !== 0) {
@@ -51861,7 +51863,7 @@ var render$U = function() {
51861
51863
  _vm.checkAllGroup = $$v;
51862
51864
  }, expression: "checkAllGroup" } }, [_vm._l(_vm.columns, function(item2) {
51863
51865
  return [item2.title ? _c("Checkbox", { key: item2.field, attrs: { "label": item2.title } }, [_vm._v(_vm._s(item2.title))]) : _vm._e()];
51864
- }), _c("br"), _c("br"), _vm._v(" \xA0 "), _c("Button", { staticClass: "table-column-select-btn", attrs: { "type": "default" }, on: { "click": _vm.columnSave } }, [_vm._v("\u4FDD \u5B58")]), _vm._v(" \xA0 "), _c("Button", { staticClass: "table-column-select-btn", attrs: { "type": "default" }, on: { "click": _vm.columnClear } }, [_vm._v("\u6E05 \u9664")])], 2)] : _vm._e(), _vm.btnSel != "1" ? _c("Button", { staticStyle: { "position": "absolute", "top": "10px", "right": "10px" }, attrs: { "type": "primary", "icon": "md-close", "size": "small", "title": "\u5173\u95ED" }, on: { "click": _vm.closeTableSettingDropdown } }) : _vm._e()], 2)], 1) : _vm._e()], 1)]) : _vm._e()], 2)], 1), _c("IndLoadingPanel", { attrs: { "loading": _vm.tableLoading } }, [!_vm.refreshTable ? _c("ag-grid-vue", _vm._g(_vm._b({ ref: "tableRef", staticClass: "ag-theme-balham", style: { height: _vm.height && !_vm.fullSreen ? _vm.height + "px" : "100%" }, attrs: { "id": "agTable", "suppressCellFocus": true, "suppressMenu": true, "suppressContextMenu": true, "defaultColDef": _vm.defaultColDef, "headerHeight": _vm.headerHeight || null, "getRowHeight": _vm.getRowHeight, "rowData": _vm.tableData, "suppressRowClickSelection": _vm.isEditTable || _vm.suppressRowClickSelection, "rowSelection": _vm.rowSelection, "rowMultiSelectWithClick": !_vm.isEditTable && (_vm.rowSelection == "multiple" || _vm.rowMultiSelectWithClick), "columnDefs": _vm.tableColumns, "localeText": _vm.localeText, "singleClickEdit": true, "pinnedTopRowData": _vm.topRows, "pinnedBottomRowData": _vm.pinnedBottomRowData, "suppressRowTransform": true, "stopEditingWhenCellsLoseFocus": true, "getRowClass": _vm.getRowClass, "getRowId": _vm.getRowId, "tooltipShowDelay": 500, "overlayNoRowsTemplate": _vm.noRowsTemplate || _vm.overlayNoRowsTemplate, "treeData": _vm.treeData, "getDataPath": _vm.getDataPath, "autoGroupColumnDef": _vm.autoGroupColumnDef, "groupDisplayType": _vm.groupDisplayType, "groupSelectsChildren": _vm.groupSelectsChildren, "groupDefaultExpanded": _vm.groupDefaultExpanded }, on: { "sortChanged": _vm.sortChanged, "selection-changed": _vm.selectionChanged, "grid-ready": _vm.onGridReady, "cellClicked": _vm.cellClicked, "cellDoubleClicked": _vm.cellDoubleClicked } }, "ag-grid-vue", _vm.$attrs, false), _vm.$listeners)) : _vm._e()], 1), _vm.showBottom ? _c("div", { ref: "bottom" }, [_c("Row", { staticStyle: { "margin-top": "10px" } }, [_c("i-col", { staticStyle: { "text-align": "left" }, attrs: { "span": "18" } }, [_c("Page", { directives: [{ name: "show", rawName: "v-show", value: !_vm.disablePage, expression: "!disablePage" }], attrs: { "size": "small", "total": _vm.totalNumber, "current": _vm.currentPage, "page-size": _vm.limitNumber, "show-sizer": "", "show-total": "", "show-elevator": "" }, on: { "on-change": _vm.onPageChange, "on-page-size-change": _vm.onPageSizeChange } }), _c("span", { directives: [{ name: "show", rawName: "v-show", value: _vm.disablePage, expression: "disablePage" }] }, [_vm._v("\u5171 " + _vm._s(_vm.tableData.length) + " \u6761\u6570\u636E")])], 1)], 1)], 1) : _vm._e()], 1);
51866
+ }), _c("br"), _c("br"), _vm._v(" \xA0 "), _c("Button", { staticClass: "table-column-select-btn", attrs: { "type": "default" }, on: { "click": _vm.columnSave } }, [_vm._v("\u4FDD \u5B58")]), _vm._v(" \xA0 "), _c("Button", { staticClass: "table-column-select-btn", attrs: { "type": "default" }, on: { "click": _vm.columnClear } }, [_vm._v("\u6E05 \u9664")])], 2)] : _vm._e(), _vm.btnSel != "1" ? _c("Button", { staticStyle: { "position": "absolute", "top": "10px", "right": "10px" }, attrs: { "type": "primary", "icon": "md-close", "size": "small", "title": "\u5173\u95ED" }, on: { "click": _vm.closeTableSettingDropdown } }) : _vm._e()], 2)], 1) : _vm._e()], 1)]) : _vm._e()], 2)], 1), _c("IndLoadingPanel", { attrs: { "loading": _vm.tableLoading } }, [!_vm.refreshTable ? _c("ag-grid-vue", _vm._g(_vm._b({ ref: "tableRef", staticClass: "ag-theme-balham", style: { height: _vm.height && !_vm.fullSreen ? _vm.height + "px" : "100%" }, attrs: { "id": "agTable", "suppressCellFocus": true, "suppressMenu": true, "suppressContextMenu": true, "defaultColDef": _vm.defaultColDef, "headerHeight": _vm.headerHeight, "getRowHeight": _vm.getRowHeight, "rowData": _vm.tableData, "suppressRowClickSelection": _vm.isEditTable || _vm.suppressRowClickSelection, "rowSelection": _vm.rowSelection, "rowMultiSelectWithClick": !_vm.isEditTable && (_vm.rowSelection == "multiple" || _vm.rowMultiSelectWithClick), "columnDefs": _vm.tableColumns, "localeText": _vm.localeText, "singleClickEdit": true, "pinnedTopRowData": _vm.topRows, "pinnedBottomRowData": _vm.pinnedBottomRowData, "suppressRowTransform": true, "stopEditingWhenCellsLoseFocus": true, "getRowClass": _vm.getRowClass, "getRowId": _vm.getRowId, "tooltipShowDelay": 500, "overlayNoRowsTemplate": _vm.noRowsTemplate || _vm.overlayNoRowsTemplate, "treeData": _vm.treeData, "getDataPath": _vm.getDataPath, "autoGroupColumnDef": _vm.autoGroupColumnDef, "groupDisplayType": _vm.groupDisplayType, "groupSelectsChildren": _vm.groupSelectsChildren, "groupDefaultExpanded": _vm.groupDefaultExpanded }, on: { "sortChanged": _vm.sortChanged, "selection-changed": _vm.selectionChanged, "grid-ready": _vm.onGridReady, "cellClicked": _vm.cellClicked, "cellDoubleClicked": _vm.cellDoubleClicked } }, "ag-grid-vue", _vm.$attrs, false), _vm.$listeners)) : _vm._e()], 1), _vm.showBottom ? _c("div", { ref: "bottom" }, [_c("Row", { staticStyle: { "margin-top": "10px" } }, [_c("i-col", { staticStyle: { "text-align": "left" }, attrs: { "span": "18" } }, [_c("Page", { directives: [{ name: "show", rawName: "v-show", value: !_vm.disablePage, expression: "!disablePage" }], attrs: { "size": "small", "total": _vm.totalNumber, "current": _vm.currentPage, "page-size": _vm.limitNumber, "show-sizer": "", "show-total": "", "show-elevator": "" }, on: { "on-change": _vm.onPageChange, "on-page-size-change": _vm.onPageSizeChange } }), _c("span", { directives: [{ name: "show", rawName: "v-show", value: _vm.disablePage, expression: "disablePage" }] }, [_vm._v("\u5171 " + _vm._s(_vm.tableData.length) + " \u6761\u6570\u636E")])], 1)], 1)], 1) : _vm._e()], 1);
51865
51867
  };
51866
51868
  var staticRenderFns$U = [];
51867
51869
  function suppressNavigation(params) {
@@ -60298,7 +60300,6 @@ function deepEach$1(parentNode, list, callback) {
60298
60300
  }
60299
60301
  }
60300
60302
  function generateNodeWithPath(dimension, nodes) {
60301
- console.log("dimension is", dimension, "nodes is", nodes);
60302
60303
  let nodeClone = _.cloneDeep(nodes);
60303
60304
  deepEach$1(dimension, nodeClone, (d, p, idx) => {
60304
60305
  let pPath = p.path ? _.cloneDeep(p.path) : [{ id: p.id, title: p.title }];
@@ -60324,7 +60325,6 @@ function concatNodes(choosedNodes, newNodes, options) {
60324
60325
  let newPathArr = oldPathStr.split("_");
60325
60326
  newPathArr.splice(1, 1, dd.id);
60326
60327
  let newPathStr = newPathArr.join("_");
60327
- console.log("newPathStr is", newPathStr);
60328
60328
  if (_.findIndex(choosedNodesClone, { pathStr: newPathStr }) == -1) {
60329
60329
  let pathTmp = _.cloneDeep(d.path);
60330
60330
  pathTmp.splice(1, 0, { id: dd.id, title: dd.title });
@@ -60340,9 +60340,34 @@ function concatNodes(choosedNodes, newNodes, options) {
60340
60340
  });
60341
60341
  return choosedNodesClone;
60342
60342
  }
60343
+ function generateChoosedNodesByInit(options) {
60344
+ let rlt = [];
60345
+ _.forEach(options, (option) => {
60346
+ let checkedOptions = _.filter(option.options, { checked: true });
60347
+ let checkedIndex = [];
60348
+ let indexListTmp = generateNodeWithPath(option, [
60349
+ {
60350
+ id: "ALL",
60351
+ title: "\u5168\u9009",
60352
+ children: option.indexList
60353
+ }
60354
+ ]);
60355
+ deepEach$1({}, indexListTmp, (d) => {
60356
+ if (!d.children || !d.children.length) {
60357
+ if (d.checked === true) {
60358
+ checkedIndex.push(d);
60359
+ }
60360
+ }
60361
+ });
60362
+ if (checkedOptions.length && checkedIndex.length) {
60363
+ rlt = concatNodes(rlt, checkedIndex, checkedOptions);
60364
+ }
60365
+ });
60366
+ console.log("generateChoosedNodesByInit rlt is", rlt);
60367
+ return rlt;
60368
+ }
60343
60369
  function addNodeToTree(tree, node) {
60344
60370
  function addNodeToTreeInner(subTree, path2) {
60345
- console.log(subTree, "path is", path2);
60346
60371
  if (!(path2 == null ? void 0 : path2.length)) {
60347
60372
  return;
60348
60373
  }
@@ -60351,7 +60376,7 @@ function addNodeToTree(tree, node) {
60351
60376
  if (!midNode) {
60352
60377
  midNode = {
60353
60378
  pathStr: path2.length == 0 ? node.pathStr : "",
60354
- id: midPathNode == null ? void 0 : midPathNode.id,
60379
+ id: path2.length == 0 ? node.pathStr : midPathNode == null ? void 0 : midPathNode.id,
60355
60380
  title: midPathNode == null ? void 0 : midPathNode.title,
60356
60381
  children: []
60357
60382
  };
@@ -60365,6 +60390,13 @@ function addNodeToTree(tree, node) {
60365
60390
  function generateTreeByNodes(nodes) {
60366
60391
  let rlt = [];
60367
60392
  nodes.forEach((d) => addNodeToTree(rlt, d));
60393
+ rlt = _.orderBy(rlt, ["seq"], ["asc"]);
60394
+ deepEach$1({}, rlt, (d) => {
60395
+ var _a;
60396
+ if ((_a = d.children) == null ? void 0 : _a.length) {
60397
+ d.children = _.orderBy(d.children, ["seq"], ["asc"]);
60398
+ }
60399
+ });
60368
60400
  return rlt;
60369
60401
  }
60370
60402
  function generateColumnsByTreeNodes(treeNodes) {
@@ -60380,6 +60412,15 @@ function generateColumnsByTreeNodes(treeNodes) {
60380
60412
  });
60381
60413
  return rlt;
60382
60414
  }
60415
+ function generateOptionsByTreeNodes(treeNodes) {
60416
+ let columnsClone = _.cloneDeep(treeNodes);
60417
+ let rlt = {};
60418
+ columnsClone.forEach((d) => {
60419
+ var _a;
60420
+ rlt[d.id] = (_a = d.children) == null ? void 0 : _a.map((dd) => dd.id);
60421
+ });
60422
+ return rlt;
60423
+ }
60383
60424
  function getFilterColumnsByParams(options, columns) {
60384
60425
  let columnsClone = _.cloneDeep(columns);
60385
60426
  let itemIdx = _.findIndex(columnsClone, { field: "item" });
@@ -60408,17 +60449,17 @@ var render$d = function() {
60408
60449
  var _vm = this;
60409
60450
  var _h = _vm.$createElement;
60410
60451
  var _c = _vm._self._c || _h;
60411
- return _c("Modal", { attrs: { "value": _vm.show, "title": _vm.title, "mask-closable": false, "width": _vm.width, "transfer": "" }, on: { "input": function($event) {
60452
+ return _c("Modal", { attrs: { "lazyRender": false, "value": _vm.show, "title": _vm.title, "mask-closable": false, "width": _vm.width, "transfer": "" }, on: { "input": function($event) {
60412
60453
  return _vm.$emit("update:show", $event);
60413
60454
  }, "on-cancel": _vm.onCancel } }, [_c("div", { staticClass: "report-index-model-panel ind-flex" }, [_c("div", { staticClass: "left-panel ind-flex ind-flex-grow" }, [_c("div", { staticClass: "report-index-dimension1-panel ind-flex-no-shrink ind-flex-column" }, _vm._l(_vm.indexesSouce, function(dimensionItem1, idx) {
60414
60455
  return _c("div", { key: "dimension1" + idx, staticClass: "report-index-dimension1", class: [dimensionItem1.id == _vm.dimension1.id ? "selected" : ""], on: { "click": function($event) {
60415
60456
  return _vm.chooseDimension1(dimensionItem1);
60416
60457
  } } }, [_vm._v(" " + _vm._s(dimensionItem1.title) + " ")]);
60417
- }), 0), _c("div", { staticClass: "report-index-index-panel ind-flex-column ind-flex-grow" }, [_c("div", { staticClass: "report-index-options" }, [_vm.dimension1.options.length == 1 ? [_vm._v(" " + _vm._s(_vm.options[0].title || "") + " ")] : [_c("Select", { attrs: { "multiple": "" }, model: { value: _vm.optionsData, callback: function($$v) {
60458
+ }), 0), _c("div", { staticClass: "report-index-index-panel ind-flex-column ind-flex-grow" }, [_c("div", { staticClass: "report-index-options" }, [_vm.dimension1.options.length == 1 ? [_vm._v(" " + _vm._s(_vm.options[0].title || "") + " ")] : [_c("Select", { attrs: { "multiple": "" }, on: { "on-change": _vm.setDisabled1 }, model: { value: _vm.optionsData, callback: function($$v) {
60418
60459
  _vm.optionsData = $$v;
60419
60460
  }, expression: "optionsData" } }, _vm._l(_vm.dimension1.options, function(item2) {
60420
60461
  return _c("Option", { key: item2.id, attrs: { "value": item2.id } }, [_vm._v(_vm._s(item2.title))]);
60421
- }), 1)]], 2), _c("div", { staticClass: "report-index-index" }, [_c("Tree", { ref: "tree1", attrs: { "height": "500px", "expandAll": "", "show-checkbox": "", "data": _vm.indexListSrc, "isShowHeader": false, "is-show-search": true, "check-directly": "" } })], 1)])]), _c("div", { staticClass: "opt-panel ind-flex-no-shrink ind-flex-column" }, [_c("Button", { attrs: { "type": "default", "icon": "md-arrow-back" }, on: { "click": _vm.removeIndex } }), _c("Button", { staticStyle: { "margin-top": "10px" }, attrs: { "type": "default", "icon": "md-arrow-forward" }, on: { "click": _vm.addIndex } })], 1), _c("div", { staticClass: "right-panel ind-flex-grow" }, [_c("Tree", { ref: "tree2", attrs: { "height": "600px", "expandAll": "", "show-checkbox": "", "data": _vm.choosedIndexTree, "isShowHeader": false, "is-show-search": true, "check-directly": "" } })], 1)]), _c("div", { attrs: { "slot": "footer" }, slot: "footer" }, [_c("IndButtonGroup", { attrs: { "right": "", "split": "" } }, [_c("IndButton", { attrs: { "bizType": "cancel" }, on: { "click": _vm.onCancel } }, [_vm._v("\u53D6\u6D88")]), _c("IndButton", { attrs: { "bizType": "confirm" }, on: { "click": _vm.onOk } }, [_vm._v("\u786E\u5B9A")])], 1)], 1)]);
60462
+ }), 1)]], 2), _c("div", { staticClass: "report-index-index" }, [_c("Tree", { ref: "tree1", attrs: { "height": "500px", "expandAll": "", "show-checkbox": "", "data": _vm.indexListSrc, "isShowHeader": false, "is-show-search": true, "check-directly": "" }, on: { "on-check-change": _vm.setDisabled1 } })], 1)])]), _c("div", { staticClass: "opt-panel ind-flex-no-shrink ind-flex-column" }, [_c("Button", { attrs: { "disabled": _vm.addDisabled, "type": "default", "icon": "md-arrow-forward" }, on: { "click": _vm.addIndex } }), _c("Button", { staticStyle: { "margin-top": "10px" }, attrs: { "type": "default", "disabled": _vm.removeDisabled, "icon": "md-arrow-back" }, on: { "click": _vm.removeIndex } })], 1), _c("div", { staticClass: "right-panel ind-flex-grow" }, [_c("Tree", { ref: "tree2", attrs: { "height": "600px", "expandAll": "", "show-checkbox": "", "data": _vm.choosedIndexTree, "isShowHeader": false, "is-show-search": true, "check-directly": "" }, on: { "on-check-change": _vm.setDisabled2 } })], 1)]), _c("div", { attrs: { "slot": "footer" }, slot: "footer" }, [_c("IndButtonGroup", { attrs: { "right": "", "split": "" } }, [_c("IndButton", { attrs: { "bizType": "cancel" }, on: { "click": _vm.onCancel } }, [_vm._v("\u53D6\u6D88")]), _c("IndButton", { attrs: { "bizType": "confirm" }, on: { "click": _vm.onOk } }, [_vm._v("\u786E\u5B9A")])], 1)], 1)]);
60422
60463
  };
60423
60464
  var staticRenderFns$d = [];
60424
60465
  const __vue2_script$d = {
@@ -60451,13 +60492,32 @@ const __vue2_script$d = {
60451
60492
  indexListSrc: [],
60452
60493
  indexList: [],
60453
60494
  choosedIndexList: [],
60454
- choosedIndexTree: []
60495
+ choosedIndexTree: [],
60496
+ addDisabled: true,
60497
+ removeDisabled: true
60455
60498
  };
60456
60499
  },
60457
60500
  created() {
60458
60501
  this.initSrc();
60459
60502
  },
60503
+ watch: {
60504
+ options: {
60505
+ hanlder: function() {
60506
+ this.initSrc();
60507
+ },
60508
+ deep: true
60509
+ }
60510
+ },
60460
60511
  methods: {
60512
+ setDisabled1() {
60513
+ var _a;
60514
+ let indexList1 = this.$refs.tree1.getCheckedNodes(true);
60515
+ this.addDisabled = !((indexList1 == null ? void 0 : indexList1.length) && ((_a = this.optionsData) == null ? void 0 : _a.length));
60516
+ },
60517
+ setDisabled2() {
60518
+ let indexList2 = this.$refs.tree2.getCheckedNodes(true);
60519
+ this.removeDisabled = !(indexList2 == null ? void 0 : indexList2.length);
60520
+ },
60461
60521
  async initSrc() {
60462
60522
  if (this.dataApi) {
60463
60523
  const { data } = await this.dataApi(this.searchParams);
@@ -60475,6 +60535,14 @@ const __vue2_script$d = {
60475
60535
  }
60476
60536
  ]);
60477
60537
  this.indexList = [];
60538
+ this.initIndexByDefault();
60539
+ },
60540
+ initIndexByDefault() {
60541
+ this.choosedIndexList = generateChoosedNodesByInit(this.indexesSouce) || [];
60542
+ this.choosedIndexTree = generateTreeByNodes(this.choosedIndexList);
60543
+ this.$nextTick(() => {
60544
+ this.onOk();
60545
+ });
60478
60546
  },
60479
60547
  chooseDimension1(dimension1) {
60480
60548
  this.dimension1 = dimension1;
@@ -60500,7 +60568,7 @@ const __vue2_script$d = {
60500
60568
  },
60501
60569
  removeIndex() {
60502
60570
  let choosedIndexListClone = _.cloneDeep(this.choosedIndexList);
60503
- let indexes = this.$refs.tree1.getCheckedNodes(true);
60571
+ let indexes = this.$refs.tree2.getCheckedNodes(true);
60504
60572
  _.remove(choosedIndexListClone, (d) => {
60505
60573
  return _.some(indexes, (dd) => {
60506
60574
  return dd.pathStr === d.pathStr;
@@ -60513,9 +60581,11 @@ const __vue2_script$d = {
60513
60581
  this.$emit("update:show", false);
60514
60582
  },
60515
60583
  onOk() {
60584
+ let columns = generateColumnsByTreeNodes(this.choosedIndexTree);
60585
+ let options = generateOptionsByTreeNodes(this.choosedIndexTree);
60516
60586
  this.$emit("update:show", false);
60517
- this.$emit("input", generateColumnsByTreeNodes(this.choosedIndexTree));
60518
- this.$emit("confirm");
60587
+ this.$emit("input", columns);
60588
+ this.$emit("confirm", { options, columns });
60519
60589
  },
60520
60590
  getFilterColumnsByParams(options) {
60521
60591
  let columns = generateColumnsByTreeNodes(this.choosedIndexTree);