@indfnd/common 0.1.6 → 0.1.7
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 +2 -0
- package/dist/ind-common.es.js +29 -19
- package/dist/ind-common.umd.cjs +11 -11
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
- package/src/styles/components/modal.less +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
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.7](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.6...v0.1.7) (2024-03-29)
|
|
6
|
+
|
|
5
7
|
### [0.1.6](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.5...v0.1.6) (2024-03-28)
|
|
6
8
|
|
|
7
9
|
|
package/dist/ind-common.es.js
CHANGED
|
@@ -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.
|
|
5
|
+
const version = "0.1.6";
|
|
6
6
|
const author = "huxuetong";
|
|
7
7
|
const publishConfig = {
|
|
8
8
|
registry: "https://registry.npmjs.org/"
|
|
@@ -48386,6 +48386,7 @@ var FormImpl = {
|
|
|
48386
48386
|
};
|
|
48387
48387
|
if (d.validate) {
|
|
48388
48388
|
validateTmp.validator = d.validate;
|
|
48389
|
+
validateTmp.message = null;
|
|
48389
48390
|
}
|
|
48390
48391
|
if (["number"].includes(d.type)) {
|
|
48391
48392
|
validateTmp.type = "number";
|
|
@@ -48524,21 +48525,19 @@ var FormImpl = {
|
|
|
48524
48525
|
render(h) {
|
|
48525
48526
|
let formItems = [];
|
|
48526
48527
|
let spanList;
|
|
48527
|
-
|
|
48528
|
-
|
|
48529
|
-
|
|
48530
|
-
|
|
48531
|
-
|
|
48532
|
-
|
|
48533
|
-
|
|
48534
|
-
|
|
48535
|
-
|
|
48536
|
-
|
|
48537
|
-
|
|
48538
|
-
|
|
48539
|
-
|
|
48540
|
-
}
|
|
48541
|
-
});
|
|
48528
|
+
spanList = _.fill(_.range(this.fieldList.length), this.formType == "search" ? 6 : this.defaultSpan);
|
|
48529
|
+
_.forEach(this.fieldList, (d, idx) => {
|
|
48530
|
+
if (d.span) {
|
|
48531
|
+
spanList[idx] = d.span;
|
|
48532
|
+
} else if (["textarea", "fileUpload", "imgUpload"].includes(d.type)) {
|
|
48533
|
+
spanList[idx] = 24;
|
|
48534
|
+
}
|
|
48535
|
+
let conditionFlag = d.condition instanceof Function ? d.condition(this.form) : d.condition !== false;
|
|
48536
|
+
if (!conditionFlag) {
|
|
48537
|
+
spanList[idx] = 0;
|
|
48538
|
+
}
|
|
48539
|
+
});
|
|
48540
|
+
if (this.formType !== "search") {
|
|
48542
48541
|
let spanCount = 0;
|
|
48543
48542
|
_.forEach(spanList, (d, idx) => {
|
|
48544
48543
|
if (spanCount != 0 && d != this.defaultSpan && d !== 0) {
|
|
@@ -60351,7 +60350,7 @@ function addNodeToTree(tree, node) {
|
|
|
60351
60350
|
if (!midNode) {
|
|
60352
60351
|
midNode = {
|
|
60353
60352
|
pathStr: path2.length == 0 ? node.pathStr : "",
|
|
60354
|
-
id: midPathNode == null ? void 0 : midPathNode.id,
|
|
60353
|
+
id: path2.length == 0 ? node.pathStr : midPathNode == null ? void 0 : midPathNode.id,
|
|
60355
60354
|
title: midPathNode == null ? void 0 : midPathNode.title,
|
|
60356
60355
|
children: []
|
|
60357
60356
|
};
|
|
@@ -60380,6 +60379,15 @@ function generateColumnsByTreeNodes(treeNodes) {
|
|
|
60380
60379
|
});
|
|
60381
60380
|
return rlt;
|
|
60382
60381
|
}
|
|
60382
|
+
function generateOptionsByTreeNodes(treeNodes) {
|
|
60383
|
+
let columnsClone = _.cloneDeep(treeNodes);
|
|
60384
|
+
let rlt = {};
|
|
60385
|
+
columnsClone.forEach((d) => {
|
|
60386
|
+
var _a;
|
|
60387
|
+
rlt[d.id] = (_a = d.children) == null ? void 0 : _a.map((dd) => dd.id);
|
|
60388
|
+
});
|
|
60389
|
+
return rlt;
|
|
60390
|
+
}
|
|
60383
60391
|
function getFilterColumnsByParams(options, columns) {
|
|
60384
60392
|
let columnsClone = _.cloneDeep(columns);
|
|
60385
60393
|
let itemIdx = _.findIndex(columnsClone, { field: "item" });
|
|
@@ -60513,9 +60521,11 @@ const __vue2_script$d = {
|
|
|
60513
60521
|
this.$emit("update:show", false);
|
|
60514
60522
|
},
|
|
60515
60523
|
onOk() {
|
|
60524
|
+
let columns = generateColumnsByTreeNodes(this.choosedIndexTree);
|
|
60525
|
+
let options = generateOptionsByTreeNodes(this.choosedIndexTree);
|
|
60516
60526
|
this.$emit("update:show", false);
|
|
60517
|
-
this.$emit("input",
|
|
60518
|
-
this.$emit("confirm");
|
|
60527
|
+
this.$emit("input", columns);
|
|
60528
|
+
this.$emit("confirm", { options, columns });
|
|
60519
60529
|
},
|
|
60520
60530
|
getFilterColumnsByParams(options) {
|
|
60521
60531
|
let columns = generateColumnsByTreeNodes(this.choosedIndexTree);
|