@indfnd/common 0.1.9 → 0.1.11

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,16 @@
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.11](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.10...v0.1.11) (2024-03-29)
6
+
7
+
8
+ ### Features
9
+
10
+ * 报表选择指标组件优化 ([aea5c94](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/aea5c94b29eeda13c8e42c8e8ce58ea17297101f))
11
+ * 优化报表选择组件 ([b2b8535](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/b2b8535aab2e4770f93c09e9b429ce37456fe66a))
12
+
13
+ ### [0.1.10](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.9...v0.1.10) (2024-03-29)
14
+
5
15
  ### [0.1.9](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.8...v0.1.9) (2024-03-29)
6
16
 
7
17
  ### [0.1.8](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.7...v0.1.8) (2024-03-29)
@@ -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.8";
5
+ const version = "0.1.10";
6
6
  const author = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -48976,112 +48976,6 @@ var FormImpl = {
48976
48976
  },
48977
48977
  "\u91CD\u7F6E"
48978
48978
  ),
48979
- h(
48980
- "IndDropdown",
48981
- {
48982
- on: {
48983
- "on-click": (val) => {
48984
- console.log("on-click", val);
48985
- this.$emit("setCondition", val);
48986
- }
48987
- }
48988
- },
48989
- [
48990
- h(
48991
- "IndButton",
48992
- {
48993
- props: { bizType: "reset" }
48994
- },
48995
- "\u9884\u7F6E"
48996
- ),
48997
- h(
48998
- "DropdownMenu",
48999
- {
49000
- slot: "list"
49001
- },
49002
- [
49003
- ...this.formCacheList.map((d) => {
49004
- return h(
49005
- "DropdownItem",
49006
- {
49007
- props: {
49008
- name: d.id,
49009
- selected: d.id == this.curCacheId
49010
- }
49011
- },
49012
- d.titleName
49013
- );
49014
- }),
49015
- h(
49016
- "DropdownItem",
49017
- {
49018
- props: {
49019
- divided: true,
49020
- name: "manager"
49021
- }
49022
- },
49023
- [
49024
- h(
49025
- "IndButtonGroup",
49026
- {
49027
- style: {
49028
- margin: "0"
49029
- }
49030
- },
49031
- [
49032
- h(
49033
- "IndButton",
49034
- {
49035
- props: {
49036
- bizType: "reset"
49037
- },
49038
- on: {
49039
- click: (event) => {
49040
- this.$emit("setCondition", "save");
49041
- event.preventDefault();
49042
- }
49043
- }
49044
- },
49045
- "\u4FDD\u5B58"
49046
- ),
49047
- h(
49048
- "IndButton",
49049
- {
49050
- props: {
49051
- bizType: "reset"
49052
- },
49053
- on: {
49054
- click: (event) => {
49055
- this.$emit("setCondition", "saveAs");
49056
- event.preventDefault();
49057
- }
49058
- }
49059
- },
49060
- "\u53E6\u5B58\u4E3A"
49061
- ),
49062
- h(
49063
- "IndButton",
49064
- {
49065
- props: {
49066
- bizType: "reset"
49067
- },
49068
- on: {
49069
- click: (event) => {
49070
- this.$emit("setCondition", "edit");
49071
- event.preventDefault();
49072
- }
49073
- }
49074
- },
49075
- "\u8BBE\u7F6E"
49076
- )
49077
- ]
49078
- )
49079
- ]
49080
- )
49081
- ]
49082
- )
49083
- ]
49084
- ),
49085
48979
  h(
49086
48980
  "Button",
49087
48981
  {
@@ -50306,19 +50200,13 @@ var render$W = function() {
50306
50200
  var _vm = this;
50307
50201
  var _h = _vm.$createElement;
50308
50202
  var _c = _vm._self._c || _h;
50309
- 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) {
50310
- return _c("DropdownItem", { key: "index" + idx, attrs: { "name": indexCache.id, "selected": indexCache.id == _vm.curIndex.id } }, [_vm._v(" " + _vm._s(indexCache.titleName) + " ")]);
50311
- }), _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) {
50203
+ return _c("div", { staticClass: "index-manager" }, [_c("IndButton", { attrs: { "bizType": "reset" }, on: { "click": _vm.manageIndex } }, [_vm._v(" \u5217\u7B5B\u9009 ")]), _c("IndDrawer", { staticClass: "index-manager", attrs: { "width": "800", "title": "\u9884\u7F6E\u5217\u7BA1\u7406", "lazyRender": false }, model: { value: _vm.showManager, callback: function($$v) {
50312
50204
  _vm.showManager = $$v;
50313
- }, 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) {
50314
- 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) {
50315
- return _vm.editIndex(indexCache);
50316
- } } }, [_vm._v(_vm._s(indexCache.titleName))])]);
50317
- }), 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: { "gridColumns": 1, "fieldList": _vm.fieldList }, model: { value: _vm.titleForm, callback: function($$v) {
50318
- _vm.titleForm = $$v;
50319
- }, 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) {
50205
+ }, expression: "showManager" } }, [_c("div", { staticClass: "ind-flex-column height100" }, [_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) {
50320
50206
  _vm.$set(_vm.curIndex, "columnList", $$v);
50321
- }, 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);
50207
+ }, expression: "curIndex.columnList" } })], 1), _c("IndButtonGroup", { attrs: { "slot": "footer", "split": "", "right": "" }, slot: "footer" }, [_c("IndButton", { attrs: { "bizType": "save", "loading": _vm.saving }, on: { "click": _vm.apply } }, [_vm._v(" \u786E\u8BA4 ")]), _c("IndButton", { attrs: { "bizType": "save", "ghost": "", "loading": _vm.saving }, on: { "click": function($event) {
50208
+ _vm.showManager = false;
50209
+ } } }, [_vm._v(" \u53D6\u6D88 ")])], 1)], 1)], 1);
50322
50210
  };
50323
50211
  var staticRenderFns$W = [];
50324
50212
  function deepEach$4(parentNode, list, callback) {
@@ -50512,6 +50400,7 @@ const __vue2_script$14 = {
50512
50400
  dd.checked = _.some(checkRows, { field: dd.field });
50513
50401
  });
50514
50402
  this.$emit("resetColumns", _.cloneDeep(curIndexClone.columnList));
50403
+ this.showManager = false;
50515
50404
  },
50516
50405
  async saveIndex(isDefault) {
50517
50406
  if (await this.$refs.editForm.validate()) {
@@ -60311,6 +60200,11 @@ function generateNodeWithPath(dimension, nodes) {
60311
60200
  d.pathStr = (p.pathStr || p.id) + "_" + d.id;
60312
60201
  d.seq = idx;
60313
60202
  });
60203
+ deepEach$1({}, nodeClone, (d) => {
60204
+ if (!d.children || !d.children.length) {
60205
+ d.id = d.pathStr;
60206
+ }
60207
+ });
60314
60208
  return nodeClone;
60315
60209
  }
60316
60210
  function concatNodes(choosedNodes, newNodes, options) {
@@ -60455,11 +60349,11 @@ var render$d = function() {
60455
60349
  return _c("div", { key: "dimension1" + idx, staticClass: "report-index-dimension1", class: [dimensionItem1.id == _vm.dimension1.id ? "selected" : ""], on: { "click": function($event) {
60456
60350
  return _vm.chooseDimension1(dimensionItem1);
60457
60351
  } } }, [_vm._v(" " + _vm._s(dimensionItem1.title) + " ")]);
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) {
60352
+ }), 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.dimension1.options[0].title || "") + " ")] : [_c("Select", { attrs: { "multiple": "" }, on: { "on-change": _vm.setDisabled1 }, model: { value: _vm.optionsData, callback: function($$v) {
60459
60353
  _vm.optionsData = $$v;
60460
60354
  }, expression: "optionsData" } }, _vm._l(_vm.dimension1.options, function(item2) {
60461
60355
  return _c("Option", { key: item2.id, attrs: { "value": item2.id } }, [_vm._v(_vm._s(item2.title))]);
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)]);
60356
+ }), 1)]], 2), _c("div", { staticClass: "report-index-index" }, [_c("Tree", { ref: "tree1", attrs: { "height": "570px", "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)]);
60463
60357
  };
60464
60358
  var staticRenderFns$d = [];
60465
60359
  const __vue2_script$d = {
@@ -60485,7 +60379,7 @@ const __vue2_script$d = {
60485
60379
  indexesSouce: [],
60486
60380
  indexes: [],
60487
60381
  dimension1: {
60488
- options: [],
60382
+ options: [{ id: "", title: "" }],
60489
60383
  indexList: []
60490
60384
  },
60491
60385
  optionsData: [],
@@ -60519,23 +60413,27 @@ const __vue2_script$d = {
60519
60413
  this.removeDisabled = !(indexList2 == null ? void 0 : indexList2.length);
60520
60414
  },
60521
60415
  async initSrc() {
60416
+ var _a, _b;
60522
60417
  if (this.dataApi) {
60523
60418
  const { data } = await this.dataApi(this.searchParams);
60524
60419
  this.indexesSouce = data;
60525
60420
  } else {
60526
60421
  this.indexesSouce = this.options;
60527
60422
  }
60528
- this.dimension1 = this.indexesSouce[0] || {};
60529
- this.optionsData = this.dimension1.options.length == 1 ? this.dimension1.options.map((d) => d.id) : [];
60530
- this.indexListSrc = generateNodeWithPath(this.dimension1, [
60531
- {
60532
- id: "ALL",
60533
- title: "\u5168\u9009",
60534
- children: this.dimension1.indexList
60535
- }
60536
- ]);
60537
- this.indexList = [];
60538
- this.initIndexByDefault();
60423
+ if (this.indexesSouce && this.indexesSouce.length) {
60424
+ this.indexesSouce = JSON.parse(JSON.stringify(this.indexesSouce));
60425
+ this.dimension1 = this.indexesSouce[0] || {};
60426
+ this.optionsData = ((_a = this.dimension1.options) == null ? void 0 : _a.length) == 1 ? (_b = this.dimension1.options) == null ? void 0 : _b.map((d) => d.id) : [];
60427
+ this.indexListSrc = generateNodeWithPath(this.dimension1, [
60428
+ {
60429
+ id: "ALL",
60430
+ title: "\u5168\u9009",
60431
+ children: this.dimension1.indexList
60432
+ }
60433
+ ]);
60434
+ this.indexList = [];
60435
+ this.initIndexByDefault();
60436
+ }
60539
60437
  },
60540
60438
  initIndexByDefault() {
60541
60439
  this.choosedIndexList = generateChoosedNodesByInit(this.indexesSouce) || [];