@indfnd/common 0.1.14 → 0.1.16

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,10 @@
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.16](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.15...v0.1.16) (2024-03-30)
6
+
7
+ ### [0.1.15](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.14...v0.1.15) (2024-03-30)
8
+
5
9
  ### [0.1.14](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.13...v0.1.14) (2024-03-30)
6
10
 
7
11
 
@@ -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.13";
5
+ const version = "0.1.15";
6
6
  const author = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -60209,13 +60209,23 @@ function deepEach$1(parentNode, list, callback) {
60209
60209
  });
60210
60210
  }
60211
60211
  }
60212
+ function generateOptionsSeq(options) {
60213
+ _.forEach(options, (d, idx) => {
60214
+ d.seq = idx;
60215
+ _.forEach(d.options, (dd, idxx) => {
60216
+ dd.seq = idxx;
60217
+ });
60218
+ });
60219
+ console.log("generateOptionsSeq rlt is", options);
60220
+ }
60212
60221
  function generateNodeWithPath(dimension, nodes) {
60213
60222
  let nodeClone = _.cloneDeep(nodes);
60214
60223
  deepEach$1(dimension, nodeClone, (d, p, idx) => {
60215
- let pPath = p.path ? _.cloneDeep(p.path) : [{ id: p.id, title: p.title }];
60224
+ let pPath = p.path ? _.cloneDeep(p.path) : [{ id: p.id, title: p.title, seq: p.seq }];
60216
60225
  pPath.push({
60217
60226
  id: d.id,
60218
- title: d.title
60227
+ title: d.title,
60228
+ seq: d.seq
60219
60229
  });
60220
60230
  d.path = pPath;
60221
60231
  d.pathStr = (p.pathStr || p.id) + "_" + d.id;
@@ -60242,7 +60252,7 @@ function concatNodes(choosedNodes, newNodes, options) {
60242
60252
  let newPathStr = newPathArr.join("_");
60243
60253
  if (_.findIndex(choosedNodesClone, { pathStr: newPathStr }) == -1) {
60244
60254
  let pathTmp = _.cloneDeep(d.path);
60245
- pathTmp.splice(1, 0, { id: dd.id, title: dd.title });
60255
+ pathTmp.splice(1, 0, { id: dd.id, title: dd.title, seq: dd.seq });
60246
60256
  _.remove(pathTmp, { id: "ALL" });
60247
60257
  choosedNodesClone.push({
60248
60258
  ...d,
@@ -60301,6 +60311,7 @@ function addNodeToTree(tree, node) {
60301
60311
  pathStr: path2.length == 0 ? node.pathStr : "",
60302
60312
  id: path2.length == 0 ? node.pathStr : midPathNode == null ? void 0 : midPathNode.id,
60303
60313
  title: midPathNode == null ? void 0 : midPathNode.title,
60314
+ seq: midPathNode == null ? void 0 : midPathNode.seq,
60304
60315
  children: []
60305
60316
  };
60306
60317
  }
@@ -60321,6 +60332,7 @@ function generateTreeByNodes(nodes) {
60321
60332
  d.children = _.orderBy(d.children, ["seq"], ["asc"]);
60322
60333
  }
60323
60334
  });
60335
+ console.log("generateTreeByNodes rlt is", rlt);
60324
60336
  return rlt;
60325
60337
  }
60326
60338
  function generateColumnsByTreeNodes(treeNodes) {
@@ -60440,6 +60452,7 @@ const __vue2_script$d = {
60440
60452
  },
60441
60453
  setDisabled2() {
60442
60454
  let indexList2 = this.$refs.tree2.getCheckedNodes(true);
60455
+ console.log("indexList2 is", indexList2);
60443
60456
  this.removeDisabled = !(indexList2 == null ? void 0 : indexList2.length);
60444
60457
  },
60445
60458
  async initSrc() {
@@ -60451,7 +60464,9 @@ const __vue2_script$d = {
60451
60464
  this.indexesSouce = this.options;
60452
60465
  }
60453
60466
  if (this.indexesSouce && this.indexesSouce.length) {
60454
- this.indexesSouce = JSON.parse(JSON.stringify(this.indexesSouce));
60467
+ let indexesSouceBuilded = JSON.parse(JSON.stringify(this.indexesSouce));
60468
+ generateOptionsSeq(indexesSouceBuilded);
60469
+ this.indexesSouce = indexesSouceBuilded;
60455
60470
  this.dimension1 = this.indexesSouce[0] || {};
60456
60471
  this.optionsData = ((_a = this.dimension1.options) == null ? void 0 : _a.length) == 1 ? (_b = this.dimension1.options) == null ? void 0 : _b.map((d) => d.id) : [];
60457
60472
  this.indexListSrc = generateNodeWithPath(this.dimension1, [
@@ -60494,7 +60509,7 @@ const __vue2_script$d = {
60494
60509
  this.choosedIndexTree = generateTreeByNodes(choosedIndexListNew);
60495
60510
  this.$refs.tree1.clearCheckedAndSelectedNodes();
60496
60511
  },
60497
- removeIndex() {
60512
+ async removeIndex() {
60498
60513
  let choosedIndexListClone = _.cloneDeep(this.choosedIndexList);
60499
60514
  let indexes = this.$refs.tree2.getCheckedNodes(true);
60500
60515
  _.remove(choosedIndexListClone, (d) => {
@@ -60504,6 +60519,8 @@ const __vue2_script$d = {
60504
60519
  });
60505
60520
  this.choosedIndexList = choosedIndexListClone;
60506
60521
  this.choosedIndexTree = generateTreeByNodes(choosedIndexListClone);
60522
+ this.$refs.tree2.clearCheckedAndSelectedNodes();
60523
+ this.setDisabled2();
60507
60524
  },
60508
60525
  onCancel() {
60509
60526
  this.$emit("update:show", false);