@indfnd/common 0.1.79 → 0.1.81
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 +10 -0
- package/dist/ind-common.es.js +29 -49
- package/dist/ind-common.umd.cjs +68 -68
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
- package/src/styles/third/view-design.less +2 -1
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.81](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.80...v0.1.81) (2024-05-28)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* 改了一堆样式 ([2651c4d](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/2651c4dfa662a097c26f950b054ea11b1f9c1e54))
|
|
11
|
+
* help-tree-modal ([241f20b](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/241f20b8a09eac1e8331eecdf4e6b16eeaa27f28))
|
|
12
|
+
|
|
13
|
+
### [0.1.80](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.79...v0.1.80) (2024-05-25)
|
|
14
|
+
|
|
5
15
|
### [0.1.79](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.78...v0.1.79) (2024-05-24)
|
|
6
16
|
|
|
7
17
|
### [0.1.78](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.77...v0.1.78) (2024-05-24)
|
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, getQuarterNum, formatQuarter, str2Date, isDate, isArray, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios, isFunction, isString, uuid, exportJsonToExcel as exportJsonToExcel$1, importJsonFromExcel, on, off, deleteMenuHistoryApi, deleteMenuCollectApi, getMenuHistoryApi, getMenuCollectApi, getPermissionCache, listItemTreeApi, getPriceInfo, MIME_TYPE, base64ToBlob, putOssFileApi, isEqual, getCaptchaURL, getLocalStorage, guid, setLocalStorage, removeLocalStorage, clearSessionStorage, cryptor, getToken, putOssFileUrl, getOssFileUrl, responseInterceptors, config as config$1, setToken, loginApi, clearUserInfoCache, clearPermissionCache, logoutApi, getUserInfoCache, getUserInfoApi, setUserInfoCache, getSessionStorage, setSessionStorage, getAppListApi, getPermissionApi, setPermissionCache, menuHistoryApi, addMenuCollectApi, removeMenuCollectApi, 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.80";
|
|
6
6
|
const author = "huxuetong";
|
|
7
7
|
const publishConfig = {
|
|
8
8
|
registry: "https://registry.npmjs.org/"
|
|
@@ -48555,7 +48555,7 @@ var FormImpl = {
|
|
|
48555
48555
|
name: "FormImpl",
|
|
48556
48556
|
data() {
|
|
48557
48557
|
return {
|
|
48558
|
-
showMorePosition: 3,
|
|
48558
|
+
showMorePosition: window.innerWidth < 1700 ? 2 : 3,
|
|
48559
48559
|
form: {},
|
|
48560
48560
|
enumList: [],
|
|
48561
48561
|
enumData: {},
|
|
@@ -48742,9 +48742,11 @@ var FormImpl = {
|
|
|
48742
48742
|
let formItems = [];
|
|
48743
48743
|
let showMorePosition = this.showMorePosition;
|
|
48744
48744
|
let spanList;
|
|
48745
|
+
let searchSpan = window.innerWidth < 1700 ? 8 : 6;
|
|
48746
|
+
this.showMorePosition = window.innerWidth < 1700 ? 2 : this.showMorePosition;
|
|
48745
48747
|
spanList = _.fill(
|
|
48746
48748
|
_.range(this.fieldList.length),
|
|
48747
|
-
this.formType == "search" ?
|
|
48749
|
+
this.formType == "search" ? searchSpan : this.defaultSpan
|
|
48748
48750
|
);
|
|
48749
48751
|
_.forEach(this.fieldList, (d, idx) => {
|
|
48750
48752
|
var _a, _b;
|
|
@@ -48752,14 +48754,8 @@ var FormImpl = {
|
|
|
48752
48754
|
spanList[idx] = d.span;
|
|
48753
48755
|
} else if (["textarea", "fileUpload", "imgUpload"].includes(d.type)) {
|
|
48754
48756
|
spanList[idx] = 24;
|
|
48755
|
-
} else if (d.type == "datepicker" && ((_b = (_a = d.props) == null ? void 0 : _a.type) == null ? void 0 : _b.includes("range")))
|
|
48756
|
-
|
|
48757
|
-
if (idx < 3) {
|
|
48758
|
-
showMorePosition = showMorePosition - 1;
|
|
48759
|
-
}
|
|
48760
|
-
spanList[idx] = 12;
|
|
48761
|
-
}
|
|
48762
|
-
}
|
|
48757
|
+
} else if (d.type == "datepicker" && ((_b = (_a = d.props) == null ? void 0 : _a.type) == null ? void 0 : _b.includes("range")))
|
|
48758
|
+
;
|
|
48763
48759
|
let conditionFlag = d.condition instanceof Function ? d.condition(this.form) : d.condition !== false;
|
|
48764
48760
|
if (!conditionFlag) {
|
|
48765
48761
|
spanList[idx] = 0;
|
|
@@ -49177,7 +49173,7 @@ var FormImpl = {
|
|
|
49177
49173
|
"Col",
|
|
49178
49174
|
{
|
|
49179
49175
|
props: {
|
|
49180
|
-
span:
|
|
49176
|
+
span: searchSpan
|
|
49181
49177
|
}
|
|
49182
49178
|
},
|
|
49183
49179
|
[
|
|
@@ -49252,7 +49248,7 @@ var FormImpl = {
|
|
|
49252
49248
|
"Col",
|
|
49253
49249
|
{
|
|
49254
49250
|
props: {
|
|
49255
|
-
span:
|
|
49251
|
+
span: searchSpan
|
|
49256
49252
|
}
|
|
49257
49253
|
},
|
|
49258
49254
|
[h("FormItem", { props: { label: " " } }, "")]
|
|
@@ -49928,7 +49924,8 @@ const __vue2_script$1c = {
|
|
|
49928
49924
|
props: {
|
|
49929
49925
|
fieldList: Array,
|
|
49930
49926
|
funId: String,
|
|
49931
|
-
value: Object
|
|
49927
|
+
value: Object,
|
|
49928
|
+
openPreSetting: Boolean
|
|
49932
49929
|
},
|
|
49933
49930
|
components: {
|
|
49934
49931
|
FormImpl,
|
|
@@ -52160,7 +52157,7 @@ var render$Y = function() {
|
|
|
52160
52157
|
var _vm = this;
|
|
52161
52158
|
var _h = _vm.$createElement;
|
|
52162
52159
|
var _c = _vm._self._c || _h;
|
|
52163
|
-
return _c("div", { staticClass: "lambo-grid-table", class: [_vm.fullSreen ? "fullscreen-fixed" : ""] }, [_c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.$slots.search, expression: "$slots.search" }], ref: "search", staticClass: "search" }, [_vm._t("search")], 2), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.$slots.tip, expression: "$slots.tip" }], ref: "tip", staticClass: "tip" }, [_vm._t("tip")], 2), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.$slots.important - _vm.tip, expression: "$slots.important - tip" }], ref: "important-tip", staticClass: "important-tip" }, [_c("Icon", { attrs: { "type": "md-information-circle" } }), _vm._t("important-tip")], 2), _c("div", { ref: "buttons", staticClass: "other-button" }, [_c("Row", [[_c("i-col", { staticStyle: { "text-align": "left" }, attrs: { "flex": "1 1 0%" } }, [_c("IndButtonGroup", { attrs: { "split": "", "mb": "" } }, [_vm._t("buttons")], 2)], 1)], _c("i-col", { directives: [{ name: "show", rawName: "v-show", value: _vm.showUnitSwitch && _vm.isShowUnitSwitch || _vm.showTableOption || _vm.$slots.options, expression: "(showUnitSwitch && isShowUnitSwitch) || showTableOption || $slots.options" }], staticStyle: { "text-align": "right" }, attrs: { "flex": "0 0 auto" } }, [_c("div", { staticClass: "ind-flex end" }, [_c("div", { staticStyle: { "line-height": "var(--ivu-form-item-content-line-height)", "padding-bottom": "calc(var(--ind-table-button-padding) +
|
|
52160
|
+
return _c("div", { staticClass: "lambo-grid-table", class: [_vm.fullSreen ? "fullscreen-fixed" : ""] }, [_c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.$slots.search, expression: "$slots.search" }], ref: "search", staticClass: "search" }, [_vm._t("search")], 2), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.$slots.tip, expression: "$slots.tip" }], ref: "tip", staticClass: "tip" }, [_vm._t("tip")], 2), _c("div", { directives: [{ name: "show", rawName: "v-show", value: _vm.$slots.important - _vm.tip, expression: "$slots.important - tip" }], ref: "important-tip", staticClass: "important-tip" }, [_c("Icon", { attrs: { "type": "md-information-circle" } }), _vm._t("important-tip")], 2), _c("div", { ref: "buttons", staticClass: "other-button" }, [_c("Row", [[_c("i-col", { staticStyle: { "text-align": "left" }, attrs: { "flex": "1 1 0%" } }, [_c("IndButtonGroup", { attrs: { "split": "", "mb": "" } }, [_vm._t("buttons")], 2)], 1)], _c("i-col", { directives: [{ name: "show", rawName: "v-show", value: _vm.showUnitSwitch && _vm.isShowUnitSwitch || _vm.showTableOption || _vm.$slots.options, expression: "(showUnitSwitch && isShowUnitSwitch) || showTableOption || $slots.options" }], staticStyle: { "text-align": "right" }, attrs: { "flex": "0 0 auto" } }, [_c("div", { staticClass: "ind-flex end" }, [_c("div", { staticStyle: { "line-height": "var(--ivu-form-item-content-line-height)", "padding-bottom": "calc(var(--ind-table-button-padding) + 2px)", "margin-right": "10px" } }, [_vm._t("options")], 2), _vm.showZeroSwitch ? _c("IndZeroRadio", { staticStyle: { "margin-bottom": "var(--ind-unit-switch-bottom)", "line-height": "1" }, attrs: { "zeroTitle": _vm.switchZeroTitle }, model: { value: _vm.showZero, callback: function($$v) {
|
|
52164
52161
|
_vm.showZero = $$v;
|
|
52165
52162
|
}, expression: "showZero" } }) : _vm._e(), _vm.showUnitSwitch && _vm.isShowUnitSwitch ? _c("IndUnitRadio", { staticStyle: { "margin-bottom": "var(--ind-unit-switch-bottom)", "line-height": "1" }, attrs: { "isShowWX": _vm.isShowWX, "isShowJ": _vm.isShowJ }, model: { value: _vm.unitType, callback: function($$v) {
|
|
52166
52163
|
_vm.unitType = $$v;
|
|
@@ -55025,8 +55022,9 @@ const __vue2_script$U = {
|
|
|
55025
55022
|
title: { type: String, default: "\u5E2E\u52A9\u6846" },
|
|
55026
55023
|
width: { type: Number, default: 520 },
|
|
55027
55024
|
height: { type: Number, default: 350 },
|
|
55028
|
-
|
|
55025
|
+
helpBoxSearchParams: { type: Object, default: () => null },
|
|
55029
55026
|
showCheckbox: Boolean,
|
|
55027
|
+
selectLeafOnly: { type: Boolean, default: true },
|
|
55030
55028
|
isShowSearch: { type: Boolean, default: true },
|
|
55031
55029
|
isShowHeader: Boolean
|
|
55032
55030
|
},
|
|
@@ -55052,10 +55050,14 @@ const __vue2_script$U = {
|
|
|
55052
55050
|
methods: {
|
|
55053
55051
|
onOk() {
|
|
55054
55052
|
let nodes = [];
|
|
55055
|
-
|
|
55056
|
-
|
|
55057
|
-
|
|
55058
|
-
|
|
55053
|
+
if (this.showCheckbox && this.selectLeafOnly) {
|
|
55054
|
+
nodes = this.getCheckedNodes(true);
|
|
55055
|
+
} else if (this.showCheckbox) {
|
|
55056
|
+
nodes = this.getCheckedNodes(false);
|
|
55057
|
+
} else {
|
|
55058
|
+
nodes = this.getSelectedNodes();
|
|
55059
|
+
}
|
|
55060
|
+
this.$emit("onOk", nodes);
|
|
55059
55061
|
this.$emit("input", false);
|
|
55060
55062
|
this.boxShow = false;
|
|
55061
55063
|
},
|
|
@@ -55074,8 +55076,6 @@ const __vue2_script$U = {
|
|
|
55074
55076
|
},
|
|
55075
55077
|
onSelectChange(nodes) {
|
|
55076
55078
|
this.updateSelectedTitles(nodes);
|
|
55077
|
-
this.getCheckedNodes();
|
|
55078
|
-
this.getCheckedAndIndeterminateNodes();
|
|
55079
55079
|
this.visible = false;
|
|
55080
55080
|
},
|
|
55081
55081
|
clearSelected() {
|
|
@@ -55088,39 +55088,19 @@ const __vue2_script$U = {
|
|
|
55088
55088
|
this.searchNum = data;
|
|
55089
55089
|
},
|
|
55090
55090
|
updateSelectedTitles() {
|
|
55091
|
-
let
|
|
55092
|
-
|
|
55093
|
-
|
|
55094
|
-
|
|
55095
|
-
|
|
55096
|
-
nodes = nodes1.length > nodes2.length ? nodes1 : nodes2;
|
|
55097
|
-
nodes.forEach((e) => {
|
|
55098
|
-
if (!e.indeterminate && e.children.length > 0 && !noAdd.includes(e.parentId)) {
|
|
55099
|
-
tempNodes.push(e);
|
|
55100
|
-
noAdd.push(e.id);
|
|
55101
|
-
} else if (!noAdd.includes(e.parentId) && e.children.length < 1) {
|
|
55102
|
-
tempNodes.push(e);
|
|
55103
|
-
} else if (noAdd.includes(e.parentId) && e.children.length > 0) {
|
|
55104
|
-
noAdd.push(e.id);
|
|
55105
|
-
}
|
|
55106
|
-
});
|
|
55107
|
-
this.selectedTitles = tempNodes.map((item2) => {
|
|
55108
|
-
return item2.title;
|
|
55109
|
-
}).join(",");
|
|
55110
|
-
console.log("this.selectedTitles", this.selectedTitles);
|
|
55091
|
+
let tempNodes = this.getCheckedNodes(true);
|
|
55092
|
+
if (!tempNodes.length) {
|
|
55093
|
+
tempNodes = this.getSelectedNodes();
|
|
55094
|
+
}
|
|
55095
|
+
this.selectedTitles = _.join(_.map(tempNodes || [], "title"), ",");
|
|
55111
55096
|
},
|
|
55112
55097
|
getSelectedNodes() {
|
|
55113
55098
|
return this.$refs.tree.getSelectedNodes();
|
|
55114
55099
|
},
|
|
55115
|
-
getCheckedNodes() {
|
|
55116
|
-
|
|
55117
|
-
return this.$refs.tree.getCheckedNodes();
|
|
55100
|
+
getCheckedNodes(onlyLeaf = false) {
|
|
55101
|
+
return this.$refs.tree.getCheckedNodes(onlyLeaf);
|
|
55118
55102
|
},
|
|
55119
55103
|
getCheckedAndIndeterminateNodes() {
|
|
55120
|
-
console.log(
|
|
55121
|
-
"getCheckedAndIndeterminateNodes",
|
|
55122
|
-
this.$refs.tree.getCheckedAndIndeterminateNodes()
|
|
55123
|
-
);
|
|
55124
55104
|
return this.$refs.tree.getCheckedAndIndeterminateNodes();
|
|
55125
55105
|
},
|
|
55126
55106
|
updateNodeStatus(id, statusData) {
|