@indfnd/common 0.1.13 → 0.1.15

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.15](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.14...v0.1.15) (2024-03-30)
6
+
7
+ ### [0.1.14](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.13...v0.1.14) (2024-03-30)
8
+
9
+
10
+ ### Features
11
+
12
+ * 表格居右对齐;支持form表单链接 ([395d689](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/395d6890a6277c4243fe04ddd7d640ab0909fd18))
13
+
5
14
  ### [0.1.13](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.12...v0.1.13) (2024-03-30)
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.12";
5
+ const version = "0.1.14";
6
6
  const author = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -48564,6 +48564,23 @@ var FormImpl = {
48564
48564
  } else {
48565
48565
  const disabled = d.disabled instanceof Function ? d.disabled(this.form) : d.disabled;
48566
48566
  switch (d.type) {
48567
+ case "link": {
48568
+ itemInner = h(
48569
+ "span",
48570
+ {
48571
+ ref: d.formKey,
48572
+ style: { color: "var(--ind-primary-color)", cursor: "pointer" },
48573
+ on: {
48574
+ click: (event) => {
48575
+ d.onClick && d.onClick(this.form);
48576
+ event.preventDefault();
48577
+ }
48578
+ }
48579
+ },
48580
+ this.form[d.formKey]
48581
+ );
48582
+ break;
48583
+ }
48567
48584
  case "input":
48568
48585
  case "email":
48569
48586
  case "phone":
@@ -60192,13 +60209,23 @@ function deepEach$1(parentNode, list, callback) {
60192
60209
  });
60193
60210
  }
60194
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
+ }
60195
60221
  function generateNodeWithPath(dimension, nodes) {
60196
60222
  let nodeClone = _.cloneDeep(nodes);
60197
60223
  deepEach$1(dimension, nodeClone, (d, p, idx) => {
60198
- 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 }];
60199
60225
  pPath.push({
60200
60226
  id: d.id,
60201
- title: d.title
60227
+ title: d.title,
60228
+ seq: d.seq
60202
60229
  });
60203
60230
  d.path = pPath;
60204
60231
  d.pathStr = (p.pathStr || p.id) + "_" + d.id;
@@ -60225,7 +60252,7 @@ function concatNodes(choosedNodes, newNodes, options) {
60225
60252
  let newPathStr = newPathArr.join("_");
60226
60253
  if (_.findIndex(choosedNodesClone, { pathStr: newPathStr }) == -1) {
60227
60254
  let pathTmp = _.cloneDeep(d.path);
60228
- pathTmp.splice(1, 0, { id: dd.id, title: dd.title });
60255
+ pathTmp.splice(1, 0, { id: dd.id, title: dd.title, seq: dd.seq });
60229
60256
  _.remove(pathTmp, { id: "ALL" });
60230
60257
  choosedNodesClone.push({
60231
60258
  ...d,
@@ -60284,6 +60311,7 @@ function addNodeToTree(tree, node) {
60284
60311
  pathStr: path2.length == 0 ? node.pathStr : "",
60285
60312
  id: path2.length == 0 ? node.pathStr : midPathNode == null ? void 0 : midPathNode.id,
60286
60313
  title: midPathNode == null ? void 0 : midPathNode.title,
60314
+ seq: midPathNode == null ? void 0 : midPathNode.seq,
60287
60315
  children: []
60288
60316
  };
60289
60317
  }
@@ -60304,6 +60332,7 @@ function generateTreeByNodes(nodes) {
60304
60332
  d.children = _.orderBy(d.children, ["seq"], ["asc"]);
60305
60333
  }
60306
60334
  });
60335
+ console.log("generateTreeByNodes rlt is", rlt);
60307
60336
  return rlt;
60308
60337
  }
60309
60338
  function generateColumnsByTreeNodes(treeNodes) {
@@ -60423,6 +60452,7 @@ const __vue2_script$d = {
60423
60452
  },
60424
60453
  setDisabled2() {
60425
60454
  let indexList2 = this.$refs.tree2.getCheckedNodes(true);
60455
+ console.log("indexList2 is", indexList2);
60426
60456
  this.removeDisabled = !(indexList2 == null ? void 0 : indexList2.length);
60427
60457
  },
60428
60458
  async initSrc() {
@@ -60434,7 +60464,9 @@ const __vue2_script$d = {
60434
60464
  this.indexesSouce = this.options;
60435
60465
  }
60436
60466
  if (this.indexesSouce && this.indexesSouce.length) {
60437
- this.indexesSouce = JSON.parse(JSON.stringify(this.indexesSouce));
60467
+ let indexesSouceBuilded = JSON.parse(JSON.stringify(this.indexesSouce));
60468
+ generateOptionsSeq(indexesSouceBuilded);
60469
+ this.indexesSouce = indexesSouceBuilded;
60438
60470
  this.dimension1 = this.indexesSouce[0] || {};
60439
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) : [];
60440
60472
  this.indexListSrc = generateNodeWithPath(this.dimension1, [
@@ -60477,7 +60509,7 @@ const __vue2_script$d = {
60477
60509
  this.choosedIndexTree = generateTreeByNodes(choosedIndexListNew);
60478
60510
  this.$refs.tree1.clearCheckedAndSelectedNodes();
60479
60511
  },
60480
- removeIndex() {
60512
+ async removeIndex() {
60481
60513
  let choosedIndexListClone = _.cloneDeep(this.choosedIndexList);
60482
60514
  let indexes = this.$refs.tree2.getCheckedNodes(true);
60483
60515
  _.remove(choosedIndexListClone, (d) => {
@@ -60487,6 +60519,8 @@ const __vue2_script$d = {
60487
60519
  });
60488
60520
  this.choosedIndexList = choosedIndexListClone;
60489
60521
  this.choosedIndexTree = generateTreeByNodes(choosedIndexListClone);
60522
+ this.$refs.tree2.clearCheckedAndSelectedNodes();
60523
+ this.setDisabled2();
60490
60524
  },
60491
60525
  onCancel() {
60492
60526
  this.$emit("update:show", false);