@indfnd/common 0.0.81 → 0.0.83

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.
@@ -2,7 +2,7 @@ import { Button as Button$1, ButtonGroup as ButtonGroup$1, Input, Drawer as Draw
2
2
  import { isNil, useConfig, getLocalStorage, getQuarterNum, formatQuarter, str2Date, isDate, isArray, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, formatDate as formatDate$1, axios, isFunction, exportJsonToExcel as exportJsonToExcel$1, importJsonFromExcel, getPriceCode, getPriceSeg, getItem, on as on$1, off as off$1, deleteMenuHistoryApi, deleteMenuCollectApi, getMenuHistoryApi, getMenuCollectApi, getCaptchaURL, guid, setLocalStorage, removeLocalStorage, clearSessionStorage, cryptor, getToken, MIME_TYPE, responseInterceptors, config as config$1, setToken, loginApi, clearUserInfoCache, clearPermissionCache, logoutApi, getUserInfoCache, getUserInfoApi, setUserInfoCache, getSessionStorage, setSessionStorage, getAppListApi, getPermissionCache, getPermissionApi, setPermissionCache, menuHistoryApi, addMenuCollectApi, removeMenuCollectApi } from "@indfnd/utils";
3
3
  import Vue$1 from "vue";
4
4
  const name$1 = "@indfnd/common";
5
- const version$1 = "0.0.81";
5
+ const version$1 = "0.0.82";
6
6
  const author = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -43831,13 +43831,14 @@ function doChangeTheme(theme) {
43831
43831
  const body = (_a = document.getElementsByTagName("body")) == null ? void 0 : _a[0];
43832
43832
  if (body) {
43833
43833
  let cls = ((_b = body.className) == null ? void 0 : _b.split(" ")) || [];
43834
- let removeCls = null;
43834
+ const nowCls = cls.reduce((rlt, item2) => ({ ...rlt, [item2]: true }), {});
43835
+ let removeCls = {};
43835
43836
  const nowTheme = body.getAttribute(THEME_KEY);
43836
43837
  if (nowTheme) {
43837
43838
  removeCls = { [nowTheme]: false };
43838
43839
  }
43839
43840
  body.setAttribute(THEME_KEY, theme);
43840
- body.className = classnames(cls, theme, removeCls);
43841
+ body.className = classnames(theme, { ...nowCls, ...removeCls });
43841
43842
  }
43842
43843
  }
43843
43844
  let transferIndex = 1e3;
@@ -48043,7 +48044,9 @@ var render$V = function() {
48043
48044
  return void 0;
48044
48045
  }, proxy: true }, { key: "trigger", fn: function() {
48045
48046
  return void 0;
48046
- }, proxy: true }], null, false, 3562645912) }, "Drawer", _vm.$attrs, false), [_vm._t("default"), _vm.footer ? _c("div", { staticClass: "ind-drawer-footer" }, [_c("ButtonGroup", { attrs: { "right": "" } }, [_vm.showCancel ? _c("Button", { attrs: { "bizType": "cancel", "loading": _vm.saving }, on: { "click": _vm.cancel } }, [_vm._v(_vm._s(_vm.cancelText))]) : _vm._e(), _c("Button", { attrs: { "bizType": "confirm", "loading": _vm.saving }, on: { "click": _vm.ok } }, [_vm._v(_vm._s(_vm.okText))])], 1)], 1) : _vm._e()], 2)], 1) : _vm._e();
48047
+ }, proxy: true }], null, false, 3562645912) }, "Drawer", _vm.$attrs, false), [_vm._t("default"), _vm.footer || _vm.$slots.footer ? _c("div", { staticClass: "ind-drawer-footer" }, [_vm._t("footer", function() {
48048
+ return [_c("ButtonGroup", { attrs: { "right": "" } }, [_vm.showCancel ? _c("Button", { attrs: { "bizType": "cancel", "loading": _vm.saving }, on: { "click": _vm.cancel } }, [_vm._v(_vm._s(_vm.cancelText))]) : _vm._e(), _c("Button", { attrs: { "bizType": "confirm", "loading": _vm.saving }, on: { "click": _vm.ok } }, [_vm._v(_vm._s(_vm.okText))])], 1)];
48049
+ })], 2) : _vm._e()], 2)], 1) : _vm._e();
48047
48050
  };
48048
48051
  var staticRenderFns$V = [];
48049
48052
  const __vue2_script$13 = {
@@ -48563,12 +48566,9 @@ var FormImpl = {
48563
48566
  if (formatRlt && formatRlt.length) {
48564
48567
  v = (((_a2 = d == null ? void 0 : d.props) == null ? void 0 : _a2.enableNegative) ? formatRlt[1] : "") + formatRlt[2] + (formatRlt[4] || "");
48565
48568
  }
48566
- this.form[d.formKey] = Infinity;
48569
+ this.form[d.formKey] = parseFloat(v);
48570
+ this.$refs[d.formKey] && this.$refs[d.formKey].setCurrentValue(v);
48567
48571
  this.$emit("input", this.form);
48568
- this.$nextTick(() => {
48569
- this.form[d.formKey] = parseFloat(v);
48570
- this.$emit("input", this.form);
48571
- });
48572
48572
  }
48573
48573
  }
48574
48574
  });
@@ -54709,31 +54709,40 @@ var render$O = function() {
54709
54709
  var _h = _vm.$createElement;
54710
54710
  var _c = _vm._self._c || _h;
54711
54711
  return _c("div", { staticClass: "index-manager" }, [_c("IndDropdown", { on: { "on-click": _vm.triggerToogle } }, [_c("IndButton", { attrs: { "bizType": "reset" } }, [_vm._v(" \u5217\u8BBE\u7F6E ")]), _c("DropdownMenu", { attrs: { "slot": "list" }, slot: "list" }, [_vm._l(_vm.indexCacheList, function(indexCache, idx) {
54712
- return _c("DropdownItem", { key: "index" + idx, attrs: { "name": indexCache.id } }, [_vm._v(" " + _vm._s(indexCache.titleName) + " ")]);
54713
- }), _c("DropdownItem", { attrs: { "name": "manage", "divided": "" } }, [_c("IndButtonGroup", [_c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": _vm.saveTableIndex } }, [_vm._v("\u4FDD\u5B58")]), _c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": _vm.saveAsIndex } }, [_vm._v("\u53E6\u5B58\u4E3A")]), _c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": _vm.manageIndex } }, [_vm._v("\u8BBE\u7F6E")])], 1)], 1)], 2)], 1), _c("IndDrawer", { staticClass: "index-manager", attrs: { "width": "800", "title": "\u9884\u7F6E\u5217\u7BA1\u7406" }, model: { value: _vm.showManager, callback: function($$v) {
54712
+ return _c("DropdownItem", { key: "index" + idx, attrs: { "name": indexCache.id, "selected": indexCache.id == _vm.curIndex.id } }, [_vm._v(" " + _vm._s(indexCache.titleName) + " ")]);
54713
+ }), _c("DropdownItem", { attrs: { "name": "manage", "divided": "" } }, [_c("IndButtonGroup", [_c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": _vm.saveTableIndex } }, [_vm._v("\u4FDD\u5B58")]), _c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": _vm.saveAsIndex } }, [_vm._v("\u53E6\u5B58\u4E3A")]), _c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": _vm.manageIndex } }, [_vm._v("\u8BBE\u7F6E")])], 1)], 1)], 2)], 1), _c("IndDrawer", { staticClass: "index-manager", attrs: { "width": "800", "title": "\u9884\u7F6E\u5217\u7BA1\u7406", "lazyRender": false }, model: { value: _vm.showManager, callback: function($$v) {
54714
54714
  _vm.showManager = $$v;
54715
- }, expression: "showManager" } }, [_c("Card", [_c("div", { attrs: { "slot": "title" }, slot: "title" }, [_vm._v("\u9884\u7F6E\u65B9\u6848")]), _c("div", { staticClass: "ind-flex" }, _vm._l(_vm.indexCacheList, function(indexCache, idx) {
54715
+ }, expression: "showManager" } }, [_c("div", { staticClass: "ind-flex-column height100" }, [_c("Card", { staticClass: "ind-flex-no-shrink" }, [_c("div", { attrs: { "slot": "title" }, slot: "title" }, [_vm._v("\u9884\u7F6E\u65B9\u6848")]), _c("div", { staticClass: "ind-flex" }, _vm._l(_vm.indexCacheList, function(indexCache, idx) {
54716
54716
  return _c("Tag", { key: "index-tag" + idx, attrs: { "name": indexCache.id, "closable": "", "color": indexCache.id == _vm.curIndex.id ? "primary" : "default" }, on: { "on-close": _vm.removeIndex } }, [_c("span", { staticStyle: { "cursor": "pointer" }, on: { "click": function($event) {
54717
54717
  return _vm.editIndex(indexCache);
54718
54718
  } } }, [_vm._v(_vm._s(indexCache.titleName))])]);
54719
- }), 1)]), _c("Card", { staticClass: "ind-mt ivu-biz-form-row" }, [_c("div", { attrs: { "slot": "title" }, slot: "title" }, [_vm._v("\u8BBE\u7F6E\u65B9\u6848")]), _c("IndButtonGroup", { staticStyle: { "margin-top": "-6px" }, attrs: { "slot": "extra" }, slot: "extra" }, [_c("IndButton", { attrs: { "bizType": "table" }, on: { "click": _vm.saveIndex } }, [_vm._v("\u4FDD\u5B58")]), _c("IndButton", { attrs: { "bizType": "table" }, on: { "click": _vm.saveIndexAsDefault } }, [_vm._v("\u4FDD\u5B58\u5E76\u8BBE\u4E3A\u9ED8\u8BA4")])], 1), _c("IndFormWrap", { ref: "editForm", attrs: { "labelWidth": 80, "gridColumns": 1, "fieldList": _vm.fieldList }, model: { value: _vm.curIndex, callback: function($$v) {
54720
- _vm.curIndex = $$v;
54721
- }, expression: "curIndex" } }), _c("div", { staticClass: "ind-flex index-manager-drag-title" }, [_c("div", { staticClass: "manage-col1" }, [_vm._v("\u662F\u5426\u663E\u793A")]), _c("div", { staticClass: "manage-col2" }, [_vm._v("\u8868\u5934")]), _c("div", { staticClass: "manage-col3" }, [_vm._v("\u5DE6\u4FA7\u9501\u5B9A")]), _c("div", { staticClass: "manage-col4" }, [_vm._v("\u53F3\u4FA7\u9501\u5B9A")]), _c("div", { staticClass: "manage-col5" }, [_vm._v("\u5217\u5BBD")]), _c("div", { staticClass: "manage-col6" }, [_vm._v("\u62D6\u52A8\u6392\u5E8F")])]), _vm.refreshColumns ? _c("Draggable", { staticStyle: { "max-height": "calc(100vh - 370px)", "overflow": "auto" }, attrs: { "draggable": ".index-manager-drag-item" }, model: { value: _vm.curIndex.columnList, callback: function($$v) {
54719
+ }), 1)]), _c("Card", { staticClass: "ind-mt ivu-biz-form-row ind-flex-grow index-manager-height100-card" }, [_c("div", { attrs: { "slot": "title" }, slot: "title" }, [_vm._v("\u8BBE\u7F6E\u65B9\u6848")]), _c("div", { staticClass: "ind-flex-column height100 no-border-left-top" }, [_c("IndFormWrap", { ref: "editForm", staticClass: "ind-flex-no-shrink", attrs: { "labelWidth": 80, "gridColumns": 1, "fieldList": _vm.fieldList }, model: { value: _vm.titleForm, callback: function($$v) {
54720
+ _vm.titleForm = $$v;
54721
+ }, expression: "titleForm" } }), _c("IndTable", { ref: "mangeTable", staticStyle: { "padding": "0" }, attrs: { "columns": _vm.manageColumns, "disablePage": "", "showTableOption": false, "isIndexManageTable": "", "rowKey": "headerName" }, model: { value: _vm.curIndex.columnList, callback: function($$v) {
54722
54722
  _vm.$set(_vm.curIndex, "columnList", $$v);
54723
- }, expression: "curIndex.columnList" } }, _vm._l(_vm.curIndex.columnList, function(element) {
54724
- return _c("div", { key: element.field || element.key, staticClass: "ind-flex index-manager-drag-item" }, [_c("div", { staticClass: "manage-col1" }, [_c("Icon", { attrs: { "type": element.checked ? "ios-checkbox-outline" : "ios-square-outline", "size": "20" }, on: { "click": function($event) {
54725
- $event.stopPropagation();
54726
- return _vm.toggleCheck(element);
54727
- } } })], 1), _c("div", { staticClass: "manage-col2" }, [_vm._v(_vm._s(element.headerName || element.title))]), _c("div", { staticClass: "manage-col3" }, [_c("v-switch", { attrs: { "value": element.pinned == "left" }, on: { "on-change": function($event) {
54728
- return _vm.toggleLeft(element);
54729
- } } })], 1), _c("div", { staticClass: "manage-col4" }, [_c("v-switch", { attrs: { "value": element.pinned == "right" }, on: { "on-change": function($event) {
54730
- return _vm.toggleRight(element);
54731
- } } })], 1), _c("div", { staticClass: "manage-col5" }, [_c("Input", { staticStyle: { "width": "100%" }, attrs: { "type": "number", "number": "" }, model: { value: element.width, callback: function($$v) {
54732
- _vm.$set(element, "width", $$v);
54733
- }, expression: "element.width" } })], 1), _c("div", { staticClass: "manage-col6" }, [_c("Icon", { attrs: { "type": "md-reorder", "size": "20" } })], 1)]);
54734
- }), 0) : _vm._e()], 1)], 1)], 1);
54723
+ }, expression: "curIndex.columnList" } })], 1)])], 1), _c("IndButtonGroup", { attrs: { "slot": "footer", "split": "", "center": "" }, slot: "footer" }, [_c("IndButton", { attrs: { "bizType": "table", "loading": _vm.saving }, on: { "click": _vm.apply } }, [_vm._v(" \u5E94\u7528 ")]), _c("IndButton", { attrs: { "bizType": "primary", "loading": _vm.saving }, on: { "click": _vm.saveIndex } }, [_vm._v(" \u4FDD\u5B58 ")]), _c("IndButton", { attrs: { "bizType": "primary", "loading": _vm.saving }, on: { "click": _vm.saveIndexAsDefault } }, [_vm._v(" \u4FDD\u5B58\u5E76\u8BBE\u4E3A\u9ED8\u8BA4 ")])], 1)], 1)], 1);
54735
54724
  };
54736
54725
  var staticRenderFns$O = [];
54726
+ function deepEach$3(parentNode, list, callback) {
54727
+ if (Array.isArray(list) && list.length) {
54728
+ _.forEach(list, (node, idx) => {
54729
+ let breakDeep = false;
54730
+ if (typeof callback === "function") {
54731
+ try {
54732
+ const callbackResult = callback(node, parentNode, idx);
54733
+ if (typeof callbackResult === "boolean") {
54734
+ breakDeep = callbackResult;
54735
+ }
54736
+ } catch (error) {
54737
+ console.error(error);
54738
+ }
54739
+ }
54740
+ if (!breakDeep) {
54741
+ deepEach$3(node, node.children, callback);
54742
+ }
54743
+ });
54744
+ }
54745
+ }
54737
54746
  const __vue2_script$Y = {
54738
54747
  props: {
54739
54748
  funId: String,
@@ -54743,6 +54752,14 @@ const __vue2_script$Y = {
54743
54752
  Draggable,
54744
54753
  "v-switch": Switch
54745
54754
  },
54755
+ computed: {
54756
+ isTreeColumn() {
54757
+ return _.some(this.curIndex.columnList, (d) => {
54758
+ var _a, _b;
54759
+ return ((_a = d.children) == null ? void 0 : _a.length) || ((_b = d.treeLevelFlag) == null ? void 0 : _b.length);
54760
+ });
54761
+ }
54762
+ },
54746
54763
  data() {
54747
54764
  return {
54748
54765
  indexCacheList: [],
@@ -54751,6 +54768,8 @@ const __vue2_script$Y = {
54751
54768
  titleName: "",
54752
54769
  id: ""
54753
54770
  },
54771
+ manageColumns: [],
54772
+ titleForm: { titleName: "" },
54754
54773
  fieldList: [
54755
54774
  {
54756
54775
  formKey: "titleName",
@@ -54760,60 +54779,159 @@ const __vue2_script$Y = {
54760
54779
  }
54761
54780
  ],
54762
54781
  showManager: false,
54763
- refreshColumns: true
54782
+ saving: false
54764
54783
  };
54765
54784
  },
54785
+ watch: {
54786
+ isTreeColumn() {
54787
+ this.renderManageColumns();
54788
+ }
54789
+ },
54766
54790
  created() {
54767
54791
  let cacheData = localStorage.getItem("index-cache" + this.funId);
54768
54792
  if (cacheData) {
54769
54793
  let cacheList = JSON.parse(cacheData);
54770
54794
  cacheList.forEach((d) => {
54771
- d.columnList.forEach((dd) => {
54795
+ deepEach$3(null, d.columnList, (dd) => {
54772
54796
  dd.checked = dd.checked == "1";
54773
- dd.pinned = dd.pinned || dd.fixed || false;
54797
+ dd.pinned = dd.pinned || "none";
54774
54798
  });
54775
54799
  });
54776
54800
  this.indexCacheList = cacheList;
54777
54801
  } else {
54778
54802
  this.indexCacheList = [];
54779
54803
  }
54804
+ this.renderManageColumns();
54780
54805
  },
54781
54806
  methods: {
54782
- syncToStorage() {
54807
+ async syncToStorage() {
54783
54808
  let dataToCache = _.cloneDeep(this.indexCacheList);
54784
54809
  dataToCache.forEach((d) => {
54785
- d.columnList.forEach((dd) => {
54810
+ deepEach$3(null, d.columnList, (dd) => {
54786
54811
  dd.checked = dd.checked ? "1" : "0";
54812
+ if (dd.pinned == "none") {
54813
+ delete dd.pinned;
54814
+ }
54787
54815
  });
54788
54816
  });
54789
54817
  localStorage.setItem("index-cache" + this.funId, JSON.stringify(dataToCache));
54818
+ await this.$nextTick();
54819
+ },
54820
+ renderManageColumns() {
54821
+ if (this.isTreeColumn) {
54822
+ this.manageColumns = [
54823
+ {
54824
+ field: "headerName",
54825
+ headerName: "\u5217\u540D",
54826
+ minWidth: 200,
54827
+ flex: 2,
54828
+ tree: true,
54829
+ cellRendererParams: {
54830
+ checkbox: true
54831
+ }
54832
+ },
54833
+ {
54834
+ field: "pinned",
54835
+ headerName: "\u9501\u5B9A",
54836
+ width: 200,
54837
+ type: "select",
54838
+ cellRendererParams: {
54839
+ datas: [
54840
+ { K: "none", V: "\u4E0D\u9501\u5B9A" },
54841
+ { K: "left", V: "\u9501\u5B9A\u5230\u5DE6\u4FA7" },
54842
+ { K: "right", V: "\u9501\u5B9A\u5230\u53F3\u4FA7" }
54843
+ ]
54844
+ }
54845
+ },
54846
+ {
54847
+ field: "width",
54848
+ headerName: "\u5217\u5BBD",
54849
+ width: 100,
54850
+ type: "input",
54851
+ cellRendererParams: {
54852
+ props: {
54853
+ number: true,
54854
+ type: "number"
54855
+ }
54856
+ }
54857
+ }
54858
+ ];
54859
+ } else {
54860
+ this.manageColumns = [
54861
+ {
54862
+ headerName: "",
54863
+ minWidth: 60,
54864
+ width: 60,
54865
+ type: "checkbox"
54866
+ },
54867
+ {
54868
+ field: "headerName",
54869
+ headerName: "\u5217\u540D",
54870
+ minWidth: 200,
54871
+ flex: 2
54872
+ },
54873
+ {
54874
+ field: "pinned",
54875
+ headerName: "\u9501\u5B9A",
54876
+ flex: 1,
54877
+ minWidth: 100,
54878
+ type: "select",
54879
+ cellRendererParams: {
54880
+ datas: [
54881
+ { K: "", V: "\u4E0D\u9501\u5B9A" },
54882
+ { K: "left", V: "\u9501\u5B9A\u5230\u5DE6\u4FA7" },
54883
+ { K: "right", V: "\u9501\u5B9A\u5230\u53F3\u4FA7" }
54884
+ ]
54885
+ }
54886
+ },
54887
+ {
54888
+ field: "width",
54889
+ headerName: "\u5217\u5BBD",
54890
+ width: 100,
54891
+ type: "input",
54892
+ cellRendererParams: {
54893
+ props: {
54894
+ number: true,
54895
+ type: "number"
54896
+ }
54897
+ }
54898
+ }
54899
+ ];
54900
+ }
54790
54901
  },
54791
54902
  triggerToogle(name2) {
54792
- console.log("triggerToogle", name2);
54793
54903
  if (name2 != "manage") {
54794
54904
  let tmp = _.find(this.indexCacheList, { id: name2 }) || {};
54795
54905
  if (tmp) {
54796
54906
  this.curIndex = tmp;
54797
- console.log("this.curIndex", this.curIndex);
54798
54907
  this.$emit("resetColumns", _.cloneDeep(this.curIndex.columnList));
54799
54908
  }
54800
54909
  }
54801
54910
  },
54911
+ apply() {
54912
+ let curIndexClone = _.cloneDeep(this.curIndex);
54913
+ let checkRows = this.$refs.mangeTable.getSelection();
54914
+ deepEach$3(null, curIndexClone.columnList, (dd) => {
54915
+ dd.checked = _.some(checkRows, { field: dd.field });
54916
+ });
54917
+ this.$emit("resetColumns", _.cloneDeep(curIndexClone.columnList));
54918
+ },
54802
54919
  async saveIndex(isDefault) {
54803
54920
  if (await this.$refs.editForm.validate()) {
54804
54921
  let datasClone = _.cloneDeep(this.indexCacheList);
54805
- console.log("saveIndex", this.curIndex);
54806
54922
  if (this.curIndex.id) {
54807
54923
  let curData = _.find(datasClone, { id: this.curIndex.id });
54808
- _.assign(curData, _.cloneDeep(this.curIndex));
54924
+ _.assign(curData, _.cloneDeep(this.curIndex), this.titleForm);
54809
54925
  } else {
54810
54926
  let tmp = _.cloneDeep(this.curIndex);
54927
+ tmp.titleName = this.titleForm.titleName;
54811
54928
  tmp.id = new Date().getTime() + "" + Math.ceil(Math.random() * 1e4);
54812
54929
  tmp.isDefault = isDefault ? "1" : "0";
54813
54930
  datasClone.push(tmp);
54814
54931
  }
54815
54932
  this.indexCacheList = datasClone;
54816
- this.syncToStorage();
54933
+ await this.syncToStorage();
54934
+ this.$emit("resetColumns", _.cloneDeep(this.curIndex.columnList));
54817
54935
  }
54818
54936
  },
54819
54937
  saveIndexAsDefault() {
@@ -54823,26 +54941,42 @@ const __vue2_script$Y = {
54823
54941
  },
54824
54942
  saveAsIndex() {
54825
54943
  },
54826
- manageIndex() {
54944
+ async manageIndex() {
54827
54945
  this.showManager = true;
54828
- if (!this.curIndex.id) {
54829
- console.log("this.tableRef", this.tableRef);
54946
+ let cloneData = _.cloneDeep(this.curIndex);
54947
+ if (!cloneData.id) {
54830
54948
  let columns = _.cloneDeep(this.tableRef.columns);
54831
- columns.forEach((dd) => {
54832
- dd.checked = dd.checked ? "1" : "0";
54833
- if (dd.fixed) {
54834
- dd.pinned = dd.fixed;
54835
- }
54949
+ deepEach$3(null, columns, (dd) => {
54950
+ dd.field = dd.field || dd.key;
54951
+ dd.headerName = dd.headerName || dd.title;
54952
+ dd.checked = !dd.hide;
54953
+ dd.pinned = dd.fixed || dd.pinned || "none";
54836
54954
  });
54837
- this.curIndex.columnList = columns;
54838
- this.curNameTitlte = "";
54955
+ cloneData.columnList = columns;
54956
+ this.curIndex = cloneData;
54957
+ this.titleForm = {
54958
+ titleName: ""
54959
+ };
54839
54960
  }
54961
+ this.setTableSelected();
54840
54962
  },
54841
54963
  async editIndex(index2) {
54842
54964
  this.curIndex = index2;
54843
- this.refreshColumns = false;
54844
- await this.$nextTick();
54845
- this.refreshColumns = true;
54965
+ this.titleForm = {
54966
+ titleName: index2.titleName
54967
+ };
54968
+ this.setTableSelected();
54969
+ },
54970
+ async setTableSelected() {
54971
+ setTimeout(() => {
54972
+ let initSelected = [];
54973
+ deepEach$3(null, this.curIndex.columnList, (dd) => {
54974
+ if (dd.checked) {
54975
+ initSelected.push(dd);
54976
+ }
54977
+ });
54978
+ this.$refs.mangeTable.setSelection(initSelected);
54979
+ }, 10);
54846
54980
  },
54847
54981
  async removeIndex(event, item2) {
54848
54982
  try {
@@ -54859,23 +54993,6 @@ const __vue2_script$Y = {
54859
54993
  console.log(error);
54860
54994
  }
54861
54995
  this.$Modal.remove();
54862
- },
54863
- toggleCheck(column) {
54864
- column.checked = !column.checked;
54865
- },
54866
- toggleLeft(column) {
54867
- if (column.pinned == "left") {
54868
- column.pinned = null;
54869
- } else {
54870
- column.pinned = "left";
54871
- }
54872
- },
54873
- toggleRight(column) {
54874
- if (column.pinned == "right") {
54875
- column.pinned = null;
54876
- } else {
54877
- column.pinned = "right";
54878
- }
54879
54996
  }
54880
54997
  }
54881
54998
  };
@@ -55258,9 +55375,9 @@ const __vue2_script$V = {
55258
55375
  }
55259
55376
  const value = this.params.value;
55260
55377
  let renderVal = value;
55261
- if (scale == 0) {
55378
+ if (scale === 0) {
55262
55379
  renderVal = value ? parseInt(value) : value;
55263
- } else {
55380
+ } else if (scale) {
55264
55381
  let cellV = parseFloat(value);
55265
55382
  if (!isNaN(cellV)) {
55266
55383
  renderVal = cellV.toFixed(scale);
@@ -55276,6 +55393,7 @@ const __vue2_script$V = {
55276
55393
  );
55277
55394
  } else {
55278
55395
  return h("Input", {
55396
+ ref: "input",
55279
55397
  props: {
55280
55398
  type: "text",
55281
55399
  ...props,
@@ -55290,10 +55408,8 @@ const __vue2_script$V = {
55290
55408
  v = ((props == null ? void 0 : props.enableNegative) ? formatRlt[1] : "") + formatRlt[2] + (formatRlt[4] || "");
55291
55409
  }
55292
55410
  if (type == "number") {
55293
- rNode.setDataValue(this.params.column, Infinity);
55294
- this.$nextTick(() => {
55295
- rNode.setDataValue(this.params.column, parseFloat(v));
55296
- });
55411
+ rNode.setDataValue(this.params.column, parseFloat(v));
55412
+ this.$refs.input && this.$refs.input.setCurrentValue(v);
55297
55413
  } else {
55298
55414
  rNode.setDataValue(this.params.column, v);
55299
55415
  }
@@ -55649,9 +55765,9 @@ const __vue2_script$O = {
55649
55765
  });
55650
55766
  }
55651
55767
  let renderVal = value;
55652
- if (scale == 0) {
55768
+ if (scale === 0) {
55653
55769
  renderVal = value ? parseInt(value) : value;
55654
- } else {
55770
+ } else if (scale) {
55655
55771
  let cellV = parseFloat(value);
55656
55772
  if (!isNaN(cellV)) {
55657
55773
  renderVal = cellV.toFixed(scale);
@@ -56110,17 +56226,17 @@ var render$M = function() {
56110
56226
  var _vm = this;
56111
56227
  var _h = _vm.$createElement;
56112
56228
  var _c = _vm._self._c || _h;
56113
- return _c("div", { staticClass: "lambo-grid-table", class: [_vm.fullSreen ? "fullscreen-fixed" : ""] }, [_c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.$slots.search, expression: "$slots.search" }], ref: "search", staticClass: "search" }, [_vm._t("search")], 2), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.$slots.tip, expression: "$slots.tip" }], ref: "tip", staticClass: "tip" }, [_vm._t("tip")], 2), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.$slots.important - _vm.tip, expression: "$slots.important - tip" }], ref: "important-tip", staticClass: "important-tip" }, [_c("Icon", { attrs: { "type": "md-information-circle" } }), _vm._t("important-tip")], 2), _c("div", { ref: "buttons", staticClass: "other-button" }, [_c("Row", [[_c("i-col", { staticStyle: { "text-align": "left" }, attrs: { "flex": "1 1 0%" } }, [_c("IndButtonGroup", { attrs: { "split": "", "mb": "" } }, [_vm._t("buttons")], 2)], 1)], _vm.showUnitSwitch || _vm.showTableOption ? _c("i-col", { staticStyle: { "text-align": "right" }, attrs: { "flex": "0 0 auto" } }, [_c("div", { staticClass: "ind-flex end" }, [_vm.showUnitSwitch ? _c("IndUnitRadio", { staticStyle: { "margin-bottom": "10px", "line-height": "1" }, attrs: { "isShowWX": _vm.isShowWX, "isShowJ": _vm.isShowJ }, model: { value: _vm.unitType, callback: function($$v) {
56229
+ return _c("div", { staticClass: "lambo-grid-table", class: [_vm.fullSreen ? "fullscreen-fixed" : ""] }, [_c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.$slots.search, expression: "$slots.search" }], ref: "search", staticClass: "search" }, [_vm._t("search")], 2), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.$slots.tip, expression: "$slots.tip" }], ref: "tip", staticClass: "tip" }, [_vm._t("tip")], 2), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.$slots.important - _vm.tip, expression: "$slots.important - tip" }], ref: "important-tip", staticClass: "important-tip" }, [_c("Icon", { attrs: { "type": "md-information-circle" } }), _vm._t("important-tip")], 2), _c("div", { ref: "buttons", staticClass: "other-button" }, [_c("Row", [[_c("i-col", { staticStyle: { "text-align": "left" }, attrs: { "flex": "1 1 0%" } }, [_c("IndButtonGroup", { attrs: { "split": "", "mb": "" } }, [_vm._t("buttons")], 2)], 1)], _vm.showUnitSwitch && _vm.isShowUnitSwitch || _vm.showTableOption || _vm.$slots.options ? _c("i-col", { staticStyle: { "text-align": "right" }, attrs: { "flex": "0 0 auto" } }, [_c("div", { staticClass: "ind-flex end" }, [_vm._t("options"), _vm.showUnitSwitch && _vm.isShowUnitSwitch ? _c("IndUnitRadio", { staticStyle: { "margin-bottom": "10px", "line-height": "1" }, attrs: { "isShowWX": _vm.isShowWX, "isShowJ": _vm.isShowJ }, model: { value: _vm.unitType, callback: function($$v) {
56114
56230
  _vm.unitType = $$v;
56115
56231
  }, expression: "unitType" } }) : _vm._e(), _vm.showTableOption ? _c("Dropdown", { staticClass: "table-option-dropdown", staticStyle: { "float": "right", "margin-bottom": "var(--ind-padding-base)" }, attrs: { "trigger": "custom", "visible": _vm.optionDropdownVisible, "placement": "bottom-end" }, on: { "on-click": _vm.resetTableSize } }, [_c("IndButtonGroup", { staticStyle: { "display": "flex" }, attrs: { "split": false, "mb": "" } }, [_c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": _vm.toggleFullScreen } }, [_vm._v(" " + _vm._s(_vm.fullSreen ? "\u53D6\u6D88\u5168\u5C4F" : "\u5168\u5C4F") + " ")]), _vm.revertBtn ? _c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": function($event) {
56116
56232
  return _vm.$emit("revertColumnRow");
56117
- } } }, [_vm._v(" \u8F6C\u7F6E ")]) : _vm._e(), _c("IndexManage", { attrs: { "tableRef": _vm.tableRef, "funId": (_vm.funId || "") + "-" + _vm.$route.meta.permissionId }, on: { "resetColumns": _vm.resetColumns } }), _c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": function($event) {
56233
+ } } }, [_vm._v(" \u8F6C\u7F6E ")]) : _vm._e(), !_vm.isIndexManageTable ? _c("IndexManage", { attrs: { "tableRef": _vm.tableRef, "funId": (_vm.funId || "") + "-" + _vm.$route.meta.permissionId }, on: { "resetColumns": _vm.resetColumns } }) : _vm._e(), _c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": function($event) {
56118
56234
  return _vm.tableSettingToggle("3");
56119
56235
  } } }, [_vm._v(" \u5BFC\u51FA ")])], 1), _c("DropdownMenu", { style: { width: _vm.btnSel != "1" ? "400px" : "200px", padding: "5px 10px" }, attrs: { "slot": "list" }, slot: "list" }, [_vm.btnSel == "3" ? _c("ExportData", { attrs: { "exportFileName": _vm.exportFileName, "paramLeft": _vm.paramLeft, "paramRight": _vm.paramRight, "rowSpanColumns": _vm.rowSpanColumns, "rowSpanIndexCol": _vm.rowSpanIndexCol, "pinnedTopRowData": _vm.topRows, "tableColumns": _vm.tableColumns, "data": _vm.tableData, "dataApi": _vm.dataApi, "searchParams": _vm.searchParams, "sortParams": _vm.sortParams, "paginationParams": _vm.paginationParams, "show-summary": _vm.tableShowSummary, "summary-method": _vm.tableSummaryMethod, "parsedColumns": _vm.parsedColumns, "exportEnum": _vm.exportEnum, "data-children": _vm.dataChildren } }) : _vm.btnSel == "2" ? [_c("div", { staticStyle: { "border-bottom": "1px solid #e9e9e9", "padding-bottom": "6px", "margin-bottom": "6px" } }, [_c("Checkbox", { attrs: { "value": _vm.checkAll }, on: { "on-change": _vm.handleCheckAll } }, [_vm._v("\u5168\u9009")])], 1), _c("CheckboxGroup", { on: { "on-change": _vm.checkAllGroupChange }, model: { value: _vm.checkAllGroup, callback: function($$v) {
56120
56236
  _vm.checkAllGroup = $$v;
56121
56237
  }, expression: "checkAllGroup" } }, [_vm._l(_vm.columns, function(item2) {
56122
56238
  return [item2.title ? _c("Checkbox", { key: item2.field, attrs: { "label": item2.title } }, [_vm._v(_vm._s(item2.title))]) : _vm._e()];
56123
- }), _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, "getRowHeight": _vm.getRowHeight, "rowData": _vm.tableData, "rowSelection": _vm.rowSelection, "columnDefs": _vm.tableColumns, "localeText": _vm.localeText, "singleClickEdit": true, "pinnedTopRowData": _vm.topRows, "pinnedBottomRowData": _vm.pinnedBottomRowData, "suppressRowClickSelection": _vm.suppressRowClickSelection, "suppressRowTransform": true, "stopEditingWhenCellsLoseFocus": true, "getRowClass": _vm.getRowClass, "tooltipShowDelay": 500, "overlayNoRowsTemplate": _vm.overlayNoRowsTemplate, "treeData": _vm.treeData, "getDataPath": _vm.getDataPath, "autoGroupColumnDef": _vm.autoGroupColumnDef, "groupSelectsChildren": true }, 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), _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)], 1);
56239
+ }), _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()], 2)]) : _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, "getRowHeight": _vm.getRowHeight, "rowData": _vm.tableData, "rowSelection": _vm.rowSelection, "columnDefs": _vm.tableColumns, "localeText": _vm.localeText, "singleClickEdit": true, "pinnedTopRowData": _vm.topRows, "pinnedBottomRowData": _vm.pinnedBottomRowData, "suppressRowClickSelection": _vm.suppressRowClickSelection, "suppressRowTransform": true, "stopEditingWhenCellsLoseFocus": true, "getRowClass": _vm.getRowClass, "tooltipShowDelay": 500, "overlayNoRowsTemplate": _vm.overlayNoRowsTemplate, "treeData": _vm.treeData, "getDataPath": _vm.getDataPath, "autoGroupColumnDef": _vm.autoGroupColumnDef, "groupDisplayType": _vm.groupDisplayType, "groupSelectsChildren": true, "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), _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)], 1);
56124
56240
  };
56125
56241
  var staticRenderFns$M = [];
56126
56242
  function suppressNavigation(params) {
@@ -56308,6 +56424,8 @@ const __vue2_script$N = {
56308
56424
  },
56309
56425
  renderDataFn: Function,
56310
56426
  revertBtn: Boolean,
56427
+ isIndexManageTable: Boolean,
56428
+ isShowUnitSwitch: { type: Boolean, default: true },
56311
56429
  isShowWX: Boolean,
56312
56430
  isShowJ: Boolean,
56313
56431
  defaultUnitType: {
@@ -56323,6 +56441,10 @@ const __vue2_script$N = {
56323
56441
  default: 4
56324
56442
  },
56325
56443
  funId: String,
56444
+ groupDefaultExpanded: {
56445
+ type: Number,
56446
+ default: -1
56447
+ },
56326
56448
  xmlInfo: String
56327
56449
  },
56328
56450
  data() {
@@ -56393,7 +56515,8 @@ const __vue2_script$N = {
56393
56515
  getDataPath: (data) => {
56394
56516
  return data.treeLevelFlag;
56395
56517
  },
56396
- autoGroupColumnDef: null
56518
+ autoGroupColumnDef: null,
56519
+ groupDisplayType: ""
56397
56520
  };
56398
56521
  },
56399
56522
  computed: {
@@ -56522,7 +56645,11 @@ const __vue2_script$N = {
56522
56645
  });
56523
56646
  });
56524
56647
  }
56525
- this.$emit("input", datasTmp);
56648
+ if (this.dataApi) {
56649
+ this.tableData = datasTmp;
56650
+ } else {
56651
+ this.$emit("input", datasTmp);
56652
+ }
56526
56653
  },
56527
56654
  getTheme() {
56528
56655
  this.gridApi.resetRowHeights();
@@ -56570,7 +56697,12 @@ const __vue2_script$N = {
56570
56697
  value: {
56571
56698
  async handler(val) {
56572
56699
  if (!this.updating) {
56573
- val = await this.renderTreeData(val);
56700
+ if (!_.some(val, (d) => {
56701
+ var _a;
56702
+ return (_a = d.treeLevelFlag) == null ? void 0 : _a.length;
56703
+ })) {
56704
+ val = await this.renderTreeData(val);
56705
+ }
56574
56706
  this.tableData = this.formatDatas(_.cloneDeep(val));
56575
56707
  this.totalNumber = val.length;
56576
56708
  }
@@ -56641,6 +56773,9 @@ const __vue2_script$N = {
56641
56773
  },
56642
56774
  methods: {
56643
56775
  resetColumns(columns) {
56776
+ columns.forEach((d) => {
56777
+ d.hide = !d.checked;
56778
+ });
56644
56779
  this.$emit("update:columns", columns);
56645
56780
  },
56646
56781
  cellClicked(event) {
@@ -56692,7 +56827,6 @@ const __vue2_script$N = {
56692
56827
  }).map(function(s) {
56693
56828
  return { sort: s.colId, order: s.sort, sortIndex: s.sortIndex };
56694
56829
  });
56695
- console.log("saved sort", sortState);
56696
56830
  let sortParams = sortState[0] || {};
56697
56831
  if (sortParams.order === void 0) {
56698
56832
  Reflect.deleteProperty(this.sortParams, "sort");
@@ -56780,7 +56914,7 @@ const __vue2_script$N = {
56780
56914
  this.optionDropdownVisible = false;
56781
56915
  },
56782
56916
  tableColumnsInner(columns, isChildren) {
56783
- var _a, _b, _c;
56917
+ var _a, _b, _c, _d;
56784
56918
  let rlt = [];
56785
56919
  for (let i = 0; i < columns.length; i++) {
56786
56920
  let column = columns[i];
@@ -56854,6 +56988,14 @@ const __vue2_script$N = {
56854
56988
  if (column.colSpan) {
56855
56989
  agColumn.colSpan = column.colSpan;
56856
56990
  }
56991
+ if (column.tree) {
56992
+ agColumn.cellRenderer = "agGroupCellRenderer";
56993
+ agColumn.showRowGroup = true;
56994
+ this.groupDisplayType = "custom";
56995
+ if ((_a = column == null ? void 0 : column.cellRendererParams) == null ? void 0 : _a.checkbox) {
56996
+ this.rowSelection = "multiple";
56997
+ }
56998
+ }
56857
56999
  if (column.rowDrag) {
56858
57000
  agColumn.rowDrag = column.rowDrag;
56859
57001
  }
@@ -56936,21 +57078,16 @@ const __vue2_script$N = {
56936
57078
  };
56937
57079
  }
56938
57080
  }
56939
- if (!column.type && (column.isSum || ((_a = column == null ? void 0 : column.cellRendererParams) == null ? void 0 : _a.scale) !== void 0 || column.isSwitchUnit)) {
57081
+ if (!column.type && (column.isSum || ((_b = column == null ? void 0 : column.cellRendererParams) == null ? void 0 : _b.scale) !== void 0 || column.isSwitchUnit)) {
56940
57082
  agColumn.cellRendererSelector = (params) => {
56941
- var _a2;
56942
57083
  if (params.node.rowPinned) {
56943
- if (isNil((_a2 = column.cellRendererParams) == null ? void 0 : _a2.scale)) {
56944
- return void 0;
56945
- } else {
56946
- return {
56947
- component: "AgFormat",
56948
- params: {
56949
- ...column.cellRendererParams,
56950
- formatCols: this.formatCols
56951
- }
56952
- };
56953
- }
57084
+ return {
57085
+ component: "AgFormat",
57086
+ params: {
57087
+ ...column.cellRendererParams,
57088
+ formatCols: this.formatCols
57089
+ }
57090
+ };
56954
57091
  } else {
56955
57092
  return {
56956
57093
  component: "AgFormat",
@@ -56964,7 +57101,7 @@ const __vue2_script$N = {
56964
57101
  }
56965
57102
  if (column.cellRendererParams) {
56966
57103
  agColumn.cellRendererParams = column.cellRendererParams;
56967
- if (column.type == "input" && ((_c = (_b = column.cellRendererParams) == null ? void 0 : _b.props) == null ? void 0 : _c.number)) {
57104
+ if (column.type == "input" && ((_d = (_c = column.cellRendererParams) == null ? void 0 : _c.props) == null ? void 0 : _d.number)) {
56968
57105
  agColumn.cellDataType = "number";
56969
57106
  }
56970
57107
  }
@@ -57008,6 +57145,9 @@ const __vue2_script$N = {
57008
57145
  }
57009
57146
  if (column.autoMergeRow) {
57010
57147
  agColumn.rowSpan = (params) => {
57148
+ if (params.node.rowPinned) {
57149
+ return 0;
57150
+ }
57011
57151
  return this.tableRowSpanMergeIndexMap[params.colDef.field] ? this.tableRowSpanMergeIndexMap[params.colDef.field][params.node.rowIndex + ""] || 0 : 0;
57012
57152
  };
57013
57153
  agColumn.cellClassRules = {
@@ -57096,6 +57236,9 @@ const __vue2_script$N = {
57096
57236
  }
57097
57237
  this.optionDropdownVisible = false;
57098
57238
  }, 1),
57239
+ setUnitType(unitType) {
57240
+ this.unitType = unitType;
57241
+ },
57099
57242
  async toggleUnitIfNeeded() {
57100
57243
  await this.$nextTick();
57101
57244
  let datasTmp = _.cloneDeep(this.tableData);
@@ -57208,7 +57351,6 @@ const __vue2_script$N = {
57208
57351
  deselected.push(node);
57209
57352
  }
57210
57353
  });
57211
- console.log("selected", selected.length);
57212
57354
  this.gridApi.setNodesSelected({ nodes: selected, newValue: true });
57213
57355
  this.gridApi.setNodesSelected({ nodes: deselected, newValue: false });
57214
57356
  },
@@ -57353,9 +57495,18 @@ const __vue2_script$N = {
57353
57495
  sumCols.forEach((d) => sumData[d.field || d.key] = 0);
57354
57496
  sumData = _.reduce(
57355
57497
  this.tableData,
57356
- (s, d) => {
57498
+ (s, d, idx) => {
57357
57499
  sumCols.forEach((dd) => {
57358
- sumData[dd.field || dd.key] = sumData[dd.field || dd.key] + (!d[dd.field || dd.key] || isNaN(d[dd.field || dd.key]) ? 0 : parseFloat(d[dd.field || dd.key]));
57500
+ let field = dd.field || dd.key;
57501
+ let rowMergeInfo = this.tableRowSpanMergeIndexMap[field];
57502
+ let mergedRows = [];
57503
+ _.forEach(rowMergeInfo, (v, k) => {
57504
+ let rows2 = _.range(k, parseInt(k) + v);
57505
+ mergedRows.push(...rows2.slice(1));
57506
+ });
57507
+ if (!mergedRows.includes(idx)) {
57508
+ sumData[field] = sumData[field] + (!d[field] || isNaN(d[field]) ? 0 : parseFloat(d[field]));
57509
+ }
57359
57510
  });
57360
57511
  return s;
57361
57512
  },
@@ -57365,16 +57516,7 @@ const __vue2_script$N = {
57365
57516
  if (!_.isEmpty(this.formatCols)) {
57366
57517
  _.forEach(sumRows, (d) => {
57367
57518
  _.forEach(this.formatCols, (v, k) => {
57368
- if (!isNaN(v)) {
57369
- if (v == 0) {
57370
- d[k] = d[k] ? parseInt(d[k]) : d[k];
57371
- } else {
57372
- let cellV = parseFloat(d[k]);
57373
- if (!isNaN(cellV)) {
57374
- d[k] = parseFloat(cellV.toFixed(v));
57375
- }
57376
- }
57377
- } else if (v == "dateFormat") {
57519
+ if (v == "dateFormat") {
57378
57520
  d[k] = d[k] ? formatDate$1(d[k]) : d[k];
57379
57521
  }
57380
57522
  });
@@ -57386,10 +57528,9 @@ const __vue2_script$N = {
57386
57528
  }
57387
57529
  },
57388
57530
  async renderTreeData(val) {
57389
- var _a;
57390
57531
  this.treeData = _.some(val, (d) => {
57391
- var _a2, _b;
57392
- return ((_a2 = d.children) == null ? void 0 : _a2.length) || ((_b = d.treeLevelFlag) == null ? void 0 : _b.length);
57532
+ var _a, _b;
57533
+ return ((_a = d.children) == null ? void 0 : _a.length) || ((_b = d.treeLevelFlag) == null ? void 0 : _b.length);
57393
57534
  });
57394
57535
  if (this.treeData) {
57395
57536
  this.renderTreeFlag(val);
@@ -57398,30 +57539,13 @@ const __vue2_script$N = {
57398
57539
  rlt.push(d);
57399
57540
  });
57400
57541
  val = rlt;
57401
- let treeColDef = _.find(this.columns, { tree: true });
57402
- if (_.isEmpty(treeColDef)) {
57403
- treeColDef = this.columns[0];
57404
- }
57405
- let treeCol = (treeColDef == null ? void 0 : treeColDef.field) || (treeColDef == null ? void 0 : treeColDef.key);
57406
- let tableColumnTree = _.find(this.tableColumns, { field: treeCol });
57407
- this.autoGroupColumnDef = {
57408
- ...tableColumnTree
57409
- };
57410
- if ((_a = tableColumnTree == null ? void 0 : tableColumnTree.cellRendererParams) == null ? void 0 : _a.checkbox) {
57411
- this.rowSelection = "multiple";
57412
- }
57413
- let tableColumnsClone = _.cloneDeep(this.tableColumns);
57414
- this.tableColumns = tableColumnsClone.slice(1);
57415
- this.refreshTable = false;
57416
- await this.$nextTick();
57417
- this.refreshTable = true;
57418
57542
  }
57419
57543
  return val;
57420
57544
  },
57421
57545
  renderTreeFlag(datas) {
57422
57546
  let treeColDef = _.find(this.columns, { tree: true });
57423
57547
  if (_.isEmpty(treeColDef)) {
57424
- treeColDef = this.columns[0];
57548
+ return;
57425
57549
  }
57426
57550
  let treeCol = (treeColDef == null ? void 0 : treeColDef.field) || (treeColDef == null ? void 0 : treeColDef.key);
57427
57551
  deepEach$2(null, datas, (d, parentNode, idx) => {
@@ -63497,7 +63621,7 @@ var render$d = function() {
63497
63621
  var _vm = this;
63498
63622
  var _h = _vm.$createElement;
63499
63623
  var _c = _vm._self._c || _h;
63500
- return _c("div", { staticClass: "ind-loading-panel" }, [_vm._t("default"), _vm.loading ? _c("Spin", { class: ["ind-loading-spin", "ind-loading-spin--" + _vm.theme], attrs: { "fix": "" } }, [_c("Icons", { staticClass: "ind-loading-spin-icon", attrs: { "type": "ios-loading", "size": "18" } }), !_vm.noText ? _c("div", [_vm._v("\u52A0\u8F7D\u4E2D...")]) : _vm._e()], 1) : _vm._e()], 2);
63624
+ return _c("div", { staticClass: "ind-loading-panel" }, [_vm._t("default"), _vm.loading ? _c("Spin", { class: ["ind-loading-spin", "ind-loading-spin--" + _vm.theme], attrs: { "fix": "" } }, [_c("Icons", { staticClass: "ind-loading-spin-icon", attrs: { "type": "ios-loading", "size": "18" } }), !_vm.noText ? _c("div", [_vm._v(_vm._s(_vm.text))]) : _vm._e()], 1) : _vm._e()], 2);
63501
63625
  };
63502
63626
  var staticRenderFns$d = [];
63503
63627
  const __vue2_script$e = {
@@ -63506,7 +63630,8 @@ const __vue2_script$e = {
63506
63630
  props: {
63507
63631
  loading: Boolean,
63508
63632
  theme: { type: String, default: "light" },
63509
- noText: Boolean
63633
+ noText: Boolean,
63634
+ text: { type: String, default: "\u52A0\u8F7D\u4E2D..." }
63510
63635
  }
63511
63636
  };
63512
63637
  const __cssModules$e = {};