@indfnd/common 0.1.10 → 0.1.12

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.12](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.11...v0.1.12) (2024-03-29)
6
+
7
+ ### [0.1.11](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.10...v0.1.11) (2024-03-29)
8
+
9
+
10
+ ### Features
11
+
12
+ * 报表选择指标组件优化 ([aea5c94](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/aea5c94b29eeda13c8e42c8e8ce58ea17297101f))
13
+ * 优化报表选择组件 ([b2b8535](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/b2b8535aab2e4770f93c09e9b429ce37456fe66a))
14
+
5
15
  ### [0.1.10](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.9...v0.1.10) (2024-03-29)
6
16
 
7
17
  ### [0.1.9](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.8...v0.1.9) (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.9";
5
+ const version = "0.1.11";
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()) {
@@ -60379,12 +60268,21 @@ function addNodeToTree(tree, node) {
60379
60268
  let midPathNode = path2.shift();
60380
60269
  let midNode = _.find(subTree, { id: midPathNode == null ? void 0 : midPathNode.id });
60381
60270
  if (!midNode) {
60382
- midNode = {
60383
- pathStr: path2.length == 0 ? node.pathStr : "",
60384
- id: path2.length == 0 ? node.pathStr : midPathNode == null ? void 0 : midPathNode.id,
60385
- title: midPathNode == null ? void 0 : midPathNode.title,
60386
- children: []
60387
- };
60271
+ if (path2.length == 0) {
60272
+ midNode = {
60273
+ ...node,
60274
+ pathStr: node.pathStr,
60275
+ id: node.pathStr,
60276
+ title: midPathNode == null ? void 0 : midPathNode.title
60277
+ };
60278
+ } else {
60279
+ midNode = {
60280
+ pathStr: path2.length == 0 ? node.pathStr : "",
60281
+ id: path2.length == 0 ? node.pathStr : midPathNode == null ? void 0 : midPathNode.id,
60282
+ title: midPathNode == null ? void 0 : midPathNode.title,
60283
+ children: []
60284
+ };
60285
+ }
60388
60286
  subTree.push(midNode);
60389
60287
  }
60390
60288
  addNodeToTreeInner(midNode.children, path2);
@@ -60460,7 +60358,7 @@ var render$d = function() {
60460
60358
  return _c("div", { key: "dimension1" + idx, staticClass: "report-index-dimension1", class: [dimensionItem1.id == _vm.dimension1.id ? "selected" : ""], on: { "click": function($event) {
60461
60359
  return _vm.chooseDimension1(dimensionItem1);
60462
60360
  } } }, [_vm._v(" " + _vm._s(dimensionItem1.title) + " ")]);
60463
- }), 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) {
60361
+ }), 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) {
60464
60362
  _vm.optionsData = $$v;
60465
60363
  }, expression: "optionsData" } }, _vm._l(_vm.dimension1.options, function(item2) {
60466
60364
  return _c("Option", { key: item2.id, attrs: { "value": item2.id } }, [_vm._v(_vm._s(item2.title))]);
@@ -60490,7 +60388,7 @@ const __vue2_script$d = {
60490
60388
  indexesSouce: [],
60491
60389
  indexes: [],
60492
60390
  dimension1: {
60493
- options: [],
60391
+ options: [{ id: "", title: "" }],
60494
60392
  indexList: []
60495
60393
  },
60496
60394
  optionsData: [],
@@ -60524,24 +60422,27 @@ const __vue2_script$d = {
60524
60422
  this.removeDisabled = !(indexList2 == null ? void 0 : indexList2.length);
60525
60423
  },
60526
60424
  async initSrc() {
60425
+ var _a, _b;
60527
60426
  if (this.dataApi) {
60528
60427
  const { data } = await this.dataApi(this.searchParams);
60529
60428
  this.indexesSouce = data;
60530
60429
  } else {
60531
60430
  this.indexesSouce = this.options;
60532
60431
  }
60533
- this.indexesSouce = JSON.parse(JSON.stringify(this.indexesSouce));
60534
- this.dimension1 = this.indexesSouce[0] || {};
60535
- this.optionsData = this.dimension1.options.length == 1 ? this.dimension1.options.map((d) => d.id) : [];
60536
- this.indexListSrc = generateNodeWithPath(this.dimension1, [
60537
- {
60538
- id: "ALL",
60539
- title: "\u5168\u9009",
60540
- children: this.dimension1.indexList
60541
- }
60542
- ]);
60543
- this.indexList = [];
60544
- this.initIndexByDefault();
60432
+ if (this.indexesSouce && this.indexesSouce.length) {
60433
+ this.indexesSouce = JSON.parse(JSON.stringify(this.indexesSouce));
60434
+ this.dimension1 = this.indexesSouce[0] || {};
60435
+ this.optionsData = ((_a = this.dimension1.options) == null ? void 0 : _a.length) == 1 ? (_b = this.dimension1.options) == null ? void 0 : _b.map((d) => d.id) : [];
60436
+ this.indexListSrc = generateNodeWithPath(this.dimension1, [
60437
+ {
60438
+ id: "ALL",
60439
+ title: "\u5168\u9009",
60440
+ children: this.dimension1.indexList
60441
+ }
60442
+ ]);
60443
+ this.indexList = [];
60444
+ this.initIndexByDefault();
60445
+ }
60545
60446
  },
60546
60447
  initIndexByDefault() {
60547
60448
  this.choosedIndexList = generateChoosedNodesByInit(this.indexesSouce) || [];