@fmdeui/fmui 1.0.72 → 1.0.74
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/es/components/fmtree/index.d.ts +8 -0
- package/es/components/fmtree/index.vue.d.ts +8 -0
- package/es/packages/components/fmtree/index.vue2.mjs +44 -1
- package/index.js +45 -2
- package/index.min.js +6 -6
- package/index.min.mjs +6 -6
- package/index.mjs +45 -2
- package/lib/components/fmtree/index.d.ts +8 -0
- package/lib/components/fmtree/index.vue.d.ts +8 -0
- package/lib/packages/components/fmtree/index.vue2.js +44 -1
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/package.json +1 -1
- /package/es/{make-installer.css → defaults.css} +0 -0
- /package/lib/{make-installer.css → version.css} +0 -0
|
@@ -55,6 +55,14 @@ export declare const FmTree: DefineComponent<ExtractPropTypes<{
|
|
|
55
55
|
}>, {
|
|
56
56
|
fetchTreeData: (showLoading?: boolean) => Promise<any>;
|
|
57
57
|
getCheckedKeys: () => TreeKey[];
|
|
58
|
+
getCheckedKeysByCmp: () => {
|
|
59
|
+
orgIdList: any;
|
|
60
|
+
cmpList: any;
|
|
61
|
+
depList: any;
|
|
62
|
+
groupList: any;
|
|
63
|
+
tenantList: any;
|
|
64
|
+
};
|
|
65
|
+
setCheckedKeys: (orgData: any) => void;
|
|
58
66
|
setCurrentKey: (key?: TreeKey | undefined, shouldAutoExpandParent?: boolean | undefined) => void;
|
|
59
67
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
60
68
|
refresh: (...args: any[]) => void;
|
|
@@ -61,6 +61,14 @@ declare const _default: DefineComponent<ExtractPropTypes<{
|
|
|
61
61
|
}>, {
|
|
62
62
|
fetchTreeData: (showLoading?: boolean) => Promise<any>;
|
|
63
63
|
getCheckedKeys: () => TreeKey[];
|
|
64
|
+
getCheckedKeysByCmp: () => {
|
|
65
|
+
orgIdList: any;
|
|
66
|
+
cmpList: any;
|
|
67
|
+
depList: any;
|
|
68
|
+
groupList: any;
|
|
69
|
+
tenantList: any;
|
|
70
|
+
};
|
|
71
|
+
setCheckedKeys: (orgData: any) => void;
|
|
64
72
|
setCurrentKey: (key?: TreeKey | undefined, shouldAutoExpandParent?: boolean | undefined) => void;
|
|
65
73
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
66
74
|
refresh: (...args: any[]) => void;
|
|
@@ -91,6 +91,45 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
91
91
|
const getCheckedKeys = () => {
|
|
92
92
|
return treeRef.value.getCheckedKeys();
|
|
93
93
|
};
|
|
94
|
+
const getCheckedKeysByCmp = () => {
|
|
95
|
+
const rel = { orgIdList: [], cmpList: [], depList: [], groupList: [], tenantList: [] };
|
|
96
|
+
rel.orgIdList = treeRef.value.getCheckedKeys();
|
|
97
|
+
if (rel.orgIdList && rel.orgIdList.length > 0) {
|
|
98
|
+
const nodes = treeRef.value.getCheckedNodes();
|
|
99
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
100
|
+
if (nodes[i].pid == 0) {
|
|
101
|
+
rel.cmpList.push(nodes[i].id);
|
|
102
|
+
if (!rel.tenantList.includes(nodes[i].tenantId)) {
|
|
103
|
+
rel.tenantList.push(nodes[i].tenantId);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
if (nodes[i].pid > 0 && nodes[i].level == 2) {
|
|
107
|
+
rel.depList.push(nodes[i].id);
|
|
108
|
+
if (!rel.cmpList.includes(nodes[i].pid)) {
|
|
109
|
+
rel.cmpList.push(nodes[i].pid);
|
|
110
|
+
}
|
|
111
|
+
if (!rel.tenantList.includes(nodes[i].tenantId)) {
|
|
112
|
+
rel.tenantList.push(nodes[i].tenantId);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (nodes[i].pid > 0 && nodes[i].level == 3) {
|
|
116
|
+
rel.groupList.push(nodes[i].id);
|
|
117
|
+
if (!rel.depList.includes(nodes[i].pid)) {
|
|
118
|
+
rel.depList.push(nodes[i].pid);
|
|
119
|
+
}
|
|
120
|
+
if (!rel.tenantList.includes(nodes[i].tenantId)) {
|
|
121
|
+
rel.tenantList.push(nodes[i].tenantId);
|
|
122
|
+
}
|
|
123
|
+
const fitem = findNode(nodes[i].pid);
|
|
124
|
+
if (fitem && fitem.pid > 0) {
|
|
125
|
+
if (!rel.cmpList.includes(fitem.pid))
|
|
126
|
+
rel.cmpList.push(fitem.pid);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return rel;
|
|
132
|
+
};
|
|
94
133
|
const filterNode = (value, data) => {
|
|
95
134
|
if (!value) return true;
|
|
96
135
|
return data.name.includes(value);
|
|
@@ -136,11 +175,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
136
175
|
};
|
|
137
176
|
return search(state.folderData || []);
|
|
138
177
|
};
|
|
178
|
+
const setCheckedKeys = (orgData) => {
|
|
179
|
+
state.isShowCheckbox = true;
|
|
180
|
+
treeRef.value.setCheckedKeys(orgData);
|
|
181
|
+
};
|
|
139
182
|
const setCurrentKey = (key, shouldAutoExpandParent) => {
|
|
140
183
|
var _a;
|
|
141
184
|
(_a = treeRef.value) == null ? void 0 : _a.setCurrentKey(key, shouldAutoExpandParent);
|
|
142
185
|
};
|
|
143
|
-
__expose({ fetchTreeData, getCheckedKeys, setCurrentKey });
|
|
186
|
+
__expose({ fetchTreeData, getCheckedKeys, getCheckedKeysByCmp, setCheckedKeys, setCurrentKey });
|
|
144
187
|
return (_ctx, _cache) => {
|
|
145
188
|
const _component_el_input = resolveComponent("el-input");
|
|
146
189
|
const _component_el_checkbox = resolveComponent("el-checkbox");
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fmdeui-fmui v1.0.
|
|
1
|
+
/*! fmdeui-fmui v1.0.74 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vxe-table'), require('@vxe-ui/plugin-render-element'), require('@vxe-ui/plugin-export-xlsx'), require('vxe-pc-ui'), require('exceljs'), require('@element-plus/icons-vue'), require('vue'), require('element-plus'), require('lodash-es'), require('js-cookie'), require('pinia'), require('@vueuse/core'), require('crypto-js'), require('xlsx-js-style'), require('vue-i18n'), require('vue-router'), require('sortablejs'), require('screenfull'), require('push.js'), require('mitt'), require('@microsoft/signalr'), require('axios')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'vxe-table', '@vxe-ui/plugin-render-element', '@vxe-ui/plugin-export-xlsx', 'vxe-pc-ui', 'exceljs', '@element-plus/icons-vue', 'vue', 'element-plus', 'lodash-es', 'js-cookie', 'pinia', '@vueuse/core', 'crypto-js', 'xlsx-js-style', 'vue-i18n', 'vue-router', 'sortablejs', 'screenfull', 'push.js', 'mitt', '@microsoft/signalr', 'axios'], factory) :
|
|
@@ -26272,6 +26272,45 @@
|
|
|
26272
26272
|
const getCheckedKeys = () => {
|
|
26273
26273
|
return treeRef.value.getCheckedKeys();
|
|
26274
26274
|
};
|
|
26275
|
+
const getCheckedKeysByCmp = () => {
|
|
26276
|
+
const rel = { orgIdList: [], cmpList: [], depList: [], groupList: [], tenantList: [] };
|
|
26277
|
+
rel.orgIdList = treeRef.value.getCheckedKeys();
|
|
26278
|
+
if (rel.orgIdList && rel.orgIdList.length > 0) {
|
|
26279
|
+
const nodes = treeRef.value.getCheckedNodes();
|
|
26280
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
26281
|
+
if (nodes[i].pid == 0) {
|
|
26282
|
+
rel.cmpList.push(nodes[i].id);
|
|
26283
|
+
if (!rel.tenantList.includes(nodes[i].tenantId)) {
|
|
26284
|
+
rel.tenantList.push(nodes[i].tenantId);
|
|
26285
|
+
}
|
|
26286
|
+
}
|
|
26287
|
+
if (nodes[i].pid > 0 && nodes[i].level == 2) {
|
|
26288
|
+
rel.depList.push(nodes[i].id);
|
|
26289
|
+
if (!rel.cmpList.includes(nodes[i].pid)) {
|
|
26290
|
+
rel.cmpList.push(nodes[i].pid);
|
|
26291
|
+
}
|
|
26292
|
+
if (!rel.tenantList.includes(nodes[i].tenantId)) {
|
|
26293
|
+
rel.tenantList.push(nodes[i].tenantId);
|
|
26294
|
+
}
|
|
26295
|
+
}
|
|
26296
|
+
if (nodes[i].pid > 0 && nodes[i].level == 3) {
|
|
26297
|
+
rel.groupList.push(nodes[i].id);
|
|
26298
|
+
if (!rel.depList.includes(nodes[i].pid)) {
|
|
26299
|
+
rel.depList.push(nodes[i].pid);
|
|
26300
|
+
}
|
|
26301
|
+
if (!rel.tenantList.includes(nodes[i].tenantId)) {
|
|
26302
|
+
rel.tenantList.push(nodes[i].tenantId);
|
|
26303
|
+
}
|
|
26304
|
+
const fitem = findNode(nodes[i].pid);
|
|
26305
|
+
if (fitem && fitem.pid > 0) {
|
|
26306
|
+
if (!rel.cmpList.includes(fitem.pid))
|
|
26307
|
+
rel.cmpList.push(fitem.pid);
|
|
26308
|
+
}
|
|
26309
|
+
}
|
|
26310
|
+
}
|
|
26311
|
+
}
|
|
26312
|
+
return rel;
|
|
26313
|
+
};
|
|
26275
26314
|
const filterNode = (value, data) => {
|
|
26276
26315
|
if (!value) return true;
|
|
26277
26316
|
return data.name.includes(value);
|
|
@@ -26317,11 +26356,15 @@
|
|
|
26317
26356
|
};
|
|
26318
26357
|
return search(state.folderData || []);
|
|
26319
26358
|
};
|
|
26359
|
+
const setCheckedKeys = (orgData) => {
|
|
26360
|
+
state.isShowCheckbox = true;
|
|
26361
|
+
treeRef.value.setCheckedKeys(orgData);
|
|
26362
|
+
};
|
|
26320
26363
|
const setCurrentKey = (key, shouldAutoExpandParent) => {
|
|
26321
26364
|
var _a;
|
|
26322
26365
|
(_a = treeRef.value) == null ? void 0 : _a.setCurrentKey(key, shouldAutoExpandParent);
|
|
26323
26366
|
};
|
|
26324
|
-
__expose({ fetchTreeData, getCheckedKeys, setCurrentKey });
|
|
26367
|
+
__expose({ fetchTreeData, getCheckedKeys, getCheckedKeysByCmp, setCheckedKeys, setCurrentKey });
|
|
26325
26368
|
return (_ctx, _cache) => {
|
|
26326
26369
|
const _component_el_input = vue.resolveComponent("el-input");
|
|
26327
26370
|
const _component_el_checkbox = vue.resolveComponent("el-checkbox");
|