@fmdevui/fm-dev 1.0.76 → 1.0.78
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/component.mjs +7 -2
- package/es/core/ui/components/index.d.ts +807 -2
- package/es/core/ui/components/querycondition/index.vue.d.ts +88 -0
- package/es/core/ui/components/querycondition/moreChoose.vue.d.ts +30 -0
- package/es/core/ui/components/querycondition/renderComp.vue.d.ts +9 -0
- package/es/core/ui/components/querycondition/style/css.d.ts +1 -0
- package/es/core/ui/components/querycondition/style/index.d.ts +1 -0
- package/es/core/ui/components/querycondition/type.d.ts +21 -0
- package/es/core/ui/components/querycondition/useComputed.d.ts +28 -0
- package/es/core/ui/components/selecttable/ClickOutside.d.ts +3 -0
- package/es/core/ui/components/selecttable/index.vue.d.ts +190 -0
- package/es/core/ui/components/selecttable/renderCol.vue.d.ts +21 -0
- package/es/core/ui/components/selecttable/style/css.d.ts +1 -0
- package/es/core/ui/components/selecttable/style/index.d.ts +1 -0
- package/es/core/ui/components/selecttable/type.d.ts +56 -0
- package/es/core/ui/components/selecttable/useVirtualized.d.ts +11 -0
- package/es/index.mjs +1 -1
- package/es/packages/core/index.mjs +1 -1
- package/es/packages/core/ui/components/index.mjs +18 -1
- package/es/packages/core/ui/components/querycondition/index.vue.mjs +5 -0
- package/es/packages/core/ui/components/querycondition/index.vue2.mjs +521 -0
- package/es/packages/core/ui/components/querycondition/moreChoose.vue.mjs +5 -0
- package/es/packages/core/ui/components/querycondition/moreChoose.vue2.mjs +237 -0
- package/es/packages/core/ui/components/querycondition/renderComp.vue.mjs +5 -0
- package/es/packages/core/ui/components/querycondition/renderComp.vue2.mjs +23 -0
- package/es/packages/core/ui/components/querycondition/style/css.mjs +1 -0
- package/es/packages/core/ui/components/querycondition/style/index.mjs +1 -0
- package/es/packages/core/ui/components/querycondition/type.mjs +1 -0
- package/es/packages/core/ui/components/querycondition/useComputed.mjs +104 -0
- package/es/packages/core/ui/components/selecttable/ClickOutside.mjs +69 -0
- package/es/packages/core/ui/components/selecttable/index.vue.mjs +5 -0
- package/es/packages/core/ui/components/selecttable/index.vue2.mjs +816 -0
- package/es/packages/core/ui/components/selecttable/renderCol.vue.mjs +5 -0
- package/es/packages/core/ui/components/selecttable/renderCol.vue2.mjs +28 -0
- package/es/packages/core/ui/components/selecttable/style/css.mjs +1 -0
- package/es/packages/core/ui/components/selecttable/style/index.mjs +1 -0
- package/es/packages/core/ui/components/selecttable/type.mjs +1 -0
- package/es/packages/core/ui/components/selecttable/useVirtualized.mjs +67 -0
- package/index.js +1897 -52
- package/index.min.js +30 -29
- package/index.min.mjs +27 -26
- package/index.mjs +1894 -54
- package/lib/component.js +6 -1
- package/lib/core/ui/components/index.d.ts +807 -2
- package/lib/core/ui/components/querycondition/index.vue.d.ts +88 -0
- package/lib/core/ui/components/querycondition/moreChoose.vue.d.ts +30 -0
- package/lib/core/ui/components/querycondition/renderComp.vue.d.ts +9 -0
- package/lib/core/ui/components/querycondition/style/css.d.ts +1 -0
- package/lib/core/ui/components/querycondition/style/index.d.ts +1 -0
- package/lib/core/ui/components/querycondition/type.d.ts +21 -0
- package/lib/core/ui/components/querycondition/useComputed.d.ts +28 -0
- package/lib/core/ui/components/selecttable/ClickOutside.d.ts +3 -0
- package/lib/core/ui/components/selecttable/index.vue.d.ts +190 -0
- package/lib/core/ui/components/selecttable/renderCol.vue.d.ts +21 -0
- package/lib/core/ui/components/selecttable/style/css.d.ts +1 -0
- package/lib/core/ui/components/selecttable/style/index.d.ts +1 -0
- package/lib/core/ui/components/selecttable/type.d.ts +56 -0
- package/lib/core/ui/components/selecttable/useVirtualized.d.ts +11 -0
- package/lib/index.js +5 -0
- package/lib/packages/core/index.js +5 -0
- package/lib/packages/core/ui/components/index.js +22 -0
- package/lib/packages/core/ui/components/querycondition/index.vue.js +9 -0
- package/lib/packages/core/ui/components/querycondition/index.vue2.js +525 -0
- package/lib/packages/core/ui/components/querycondition/moreChoose.vue.js +9 -0
- package/lib/packages/core/ui/components/querycondition/moreChoose.vue2.js +241 -0
- package/lib/packages/core/ui/components/querycondition/renderComp.vue.js +9 -0
- package/lib/packages/core/ui/components/querycondition/renderComp.vue2.js +27 -0
- package/lib/packages/core/ui/components/querycondition/style/css.js +4 -0
- package/lib/packages/core/ui/components/querycondition/style/index.js +4 -0
- package/lib/packages/core/ui/components/querycondition/type.js +2 -0
- package/lib/packages/core/ui/components/querycondition/useComputed.js +106 -0
- package/lib/packages/core/ui/components/selecttable/ClickOutside.js +73 -0
- package/lib/packages/core/ui/components/selecttable/index.vue.js +9 -0
- package/lib/packages/core/ui/components/selecttable/index.vue2.js +820 -0
- package/lib/packages/core/ui/components/selecttable/renderCol.vue.js +9 -0
- package/lib/packages/core/ui/components/selecttable/renderCol.vue2.js +32 -0
- package/lib/packages/core/ui/components/selecttable/style/css.js +4 -0
- package/lib/packages/core/ui/components/selecttable/style/index.js +4 -0
- package/lib/packages/core/ui/components/selecttable/type.js +2 -0
- package/lib/packages/core/ui/components/selecttable/useVirtualized.js +69 -0
- package/package.json +1 -1
- package/theme-chalk/src/query-condition.scss +118 -0
- package/theme-chalk/src/select-table.scss +71 -0
- package/theme-chalk/t-query-condition.css +1 -0
- package/theme-chalk/t-select-table.css +1 -0
package/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! fm-dev v1.0.
|
|
2
|
-
import { defineComponent, reactive, computed, watch, resolveComponent, createBlock, openBlock, withCtx, createVNode, createElementVNode, createTextVNode, toDisplayString as toDisplayString$1, withDirectives, createElementBlock, Fragment, renderList, vShow, ref, onMounted, nextTick, normalizeStyle, createCommentVNode, normalizeClass, withModifiers, mergeModels, useModel, effectScope, getCurrentInstance, shallowRef, isRef as isRef$1, inject, onUnmounted, h, Text, markRaw, hasInjectionContext, toRaw as toRaw$1, isReactive as isReactive$1, toRef, unref, getCurrentScope, onScopeDispose, toRefs, resolveDirective, resolveDynamicComponent } from 'vue';
|
|
1
|
+
/*! fm-dev v1.0.78 */
|
|
2
|
+
import { defineComponent, reactive, computed, watch, resolveComponent, createBlock, openBlock, withCtx, createVNode, createElementVNode, createTextVNode, toDisplayString as toDisplayString$1, withDirectives, createElementBlock, Fragment, renderList, vShow, ref, onMounted, nextTick, normalizeStyle, createCommentVNode, normalizeClass, withModifiers, mergeModels, useModel, effectScope, getCurrentInstance, shallowRef, isRef as isRef$1, inject, onUnmounted, h, Text, markRaw, hasInjectionContext, toRaw as toRaw$1, isReactive as isReactive$1, toRef, unref, getCurrentScope, onScopeDispose, toRefs, resolveDirective, resolveDynamicComponent, useSlots, mergeProps, createSlots, renderSlot, toHandlers, onBeforeUnmount, onUpdated, useAttrs, normalizeProps, guardReactiveProps } from 'vue';
|
|
3
3
|
import crypto from 'crypto';
|
|
4
4
|
import require$$0 from 'url';
|
|
5
5
|
import require$$1 from 'http';
|
|
@@ -10,17 +10,17 @@ import require$$4 from 'assert';
|
|
|
10
10
|
import zlib from 'zlib';
|
|
11
11
|
import { ElMessage, ElLoading, dayjs } from 'element-plus';
|
|
12
12
|
|
|
13
|
-
const _hoisted_1$
|
|
14
|
-
const _hoisted_2$
|
|
15
|
-
const _hoisted_3$
|
|
16
|
-
const _hoisted_4$
|
|
17
|
-
const _hoisted_5$
|
|
13
|
+
const _hoisted_1$7 = { class: "fm-transfer-panel" };
|
|
14
|
+
const _hoisted_2$5 = { class: "fm-transfer-panel__header" };
|
|
15
|
+
const _hoisted_3$4 = { class: "fm-transfer-panel__body" };
|
|
16
|
+
const _hoisted_4$4 = { class: "fm-transfer-buttons__item" };
|
|
17
|
+
const _hoisted_5$2 = { class: "fm-transfer-buttons__item" };
|
|
18
18
|
const _hoisted_6 = { class: "fm-transfer-buttons__item" };
|
|
19
19
|
const _hoisted_7 = { class: "fm-transfer-buttons__item" };
|
|
20
20
|
const _hoisted_8 = { class: "fm-transfer-panel" };
|
|
21
21
|
const _hoisted_9 = { class: "fm-transfer-panel__header" };
|
|
22
22
|
const _hoisted_10 = { class: "fm-transfer-panel__body" };
|
|
23
|
-
var _sfc_main$
|
|
23
|
+
var _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
24
24
|
...{
|
|
25
25
|
name: "FmTransfer"
|
|
26
26
|
},
|
|
@@ -180,8 +180,8 @@ var _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
180
180
|
default: withCtx(() => [
|
|
181
181
|
createVNode(_component_el_col, { span: 10 }, {
|
|
182
182
|
default: withCtx(() => [
|
|
183
|
-
createElementVNode("div", _hoisted_1$
|
|
184
|
-
createElementVNode("p", _hoisted_2$
|
|
183
|
+
createElementVNode("div", _hoisted_1$7, [
|
|
184
|
+
createElementVNode("p", _hoisted_2$5, [
|
|
185
185
|
createVNode(_component_el_checkbox, {
|
|
186
186
|
modelValue: state.leftAllChecked,
|
|
187
187
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.leftAllChecked = $event),
|
|
@@ -207,7 +207,7 @@ var _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
207
207
|
/* TEXT */
|
|
208
208
|
)
|
|
209
209
|
]),
|
|
210
|
-
createElementVNode("div", _hoisted_3$
|
|
210
|
+
createElementVNode("div", _hoisted_3$4, [
|
|
211
211
|
createVNode(_component_el_input, {
|
|
212
212
|
class: "transfer-panel__filter",
|
|
213
213
|
modelValue: state.leftKeyword,
|
|
@@ -258,7 +258,7 @@ var _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
258
258
|
class: "fm-transfer-buttons"
|
|
259
259
|
}, {
|
|
260
260
|
default: withCtx(() => [
|
|
261
|
-
createElementVNode("div", _hoisted_4$
|
|
261
|
+
createElementVNode("div", _hoisted_4$4, [
|
|
262
262
|
createVNode(_component_el_button, {
|
|
263
263
|
type: "primary",
|
|
264
264
|
style: {},
|
|
@@ -266,7 +266,7 @@ var _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
266
266
|
onClick: toRight
|
|
267
267
|
})
|
|
268
268
|
]),
|
|
269
|
-
createElementVNode("div", _hoisted_5$
|
|
269
|
+
createElementVNode("div", _hoisted_5$2, [
|
|
270
270
|
createVNode(_component_el_button, {
|
|
271
271
|
type: "primary",
|
|
272
272
|
style: {},
|
|
@@ -377,9 +377,9 @@ var _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
377
377
|
}
|
|
378
378
|
});
|
|
379
379
|
|
|
380
|
-
const _hoisted_1$
|
|
381
|
-
const _hoisted_2$
|
|
382
|
-
var _sfc_main$
|
|
380
|
+
const _hoisted_1$6 = { class: "notice-bar-warp-text-box" };
|
|
381
|
+
const _hoisted_2$4 = ["innerHTML"];
|
|
382
|
+
var _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
383
383
|
...{
|
|
384
384
|
name: "FmNoticeBar"
|
|
385
385
|
},
|
|
@@ -470,7 +470,7 @@ var _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
470
470
|
2
|
|
471
471
|
/* CLASS */
|
|
472
472
|
)) : createCommentVNode("v-if", true),
|
|
473
|
-
createElementVNode("div", _hoisted_1$
|
|
473
|
+
createElementVNode("div", _hoisted_1$6, [
|
|
474
474
|
createElementVNode(
|
|
475
475
|
"div",
|
|
476
476
|
{
|
|
@@ -482,7 +482,7 @@ var _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
482
482
|
createElementVNode("div", {
|
|
483
483
|
innerHTML: props.text,
|
|
484
484
|
"data-slate-editor": ""
|
|
485
|
-
}, null, 8, _hoisted_2$
|
|
485
|
+
}, null, 8, _hoisted_2$4)
|
|
486
486
|
],
|
|
487
487
|
512
|
|
488
488
|
/* NEED_PATCH */
|
|
@@ -502,7 +502,7 @@ var _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
504
|
|
|
505
|
-
var _sfc_main$
|
|
505
|
+
var _sfc_main$c = {
|
|
506
506
|
name: "dragVerify",
|
|
507
507
|
props: {
|
|
508
508
|
isPassing: {
|
|
@@ -775,18 +775,18 @@ var _export_sfc = (sfc, props) => {
|
|
|
775
775
|
return target;
|
|
776
776
|
};
|
|
777
777
|
|
|
778
|
-
const _hoisted_1$
|
|
779
|
-
const _hoisted_2$
|
|
780
|
-
const _hoisted_3$
|
|
778
|
+
const _hoisted_1$5 = { class: "drag-verify-container" };
|
|
779
|
+
const _hoisted_2$3 = ["src"];
|
|
780
|
+
const _hoisted_3$3 = {
|
|
781
781
|
key: 0,
|
|
782
782
|
class: "tips success"
|
|
783
783
|
};
|
|
784
|
-
const _hoisted_4$
|
|
784
|
+
const _hoisted_4$3 = {
|
|
785
785
|
key: 1,
|
|
786
786
|
class: "tips danger"
|
|
787
787
|
};
|
|
788
788
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
789
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
789
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
790
790
|
createElementVNode(
|
|
791
791
|
"div",
|
|
792
792
|
{
|
|
@@ -800,17 +800,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
800
800
|
onLoad: _cache[0] || (_cache[0] = (...args) => $options.checkimgLoaded && $options.checkimgLoaded(...args)),
|
|
801
801
|
style: normalizeStyle($data.imgStyle),
|
|
802
802
|
alt: ""
|
|
803
|
-
}, null, 46, _hoisted_2$
|
|
803
|
+
}, null, 46, _hoisted_2$3),
|
|
804
804
|
$props.showTips && $props.isPassing ? (openBlock(), createElementBlock(
|
|
805
805
|
"div",
|
|
806
|
-
_hoisted_3$
|
|
806
|
+
_hoisted_3$3,
|
|
807
807
|
toDisplayString$1($props.successTip),
|
|
808
808
|
1
|
|
809
809
|
/* TEXT */
|
|
810
810
|
)) : createCommentVNode("v-if", true),
|
|
811
811
|
$props.showTips && !$props.isPassing && $data.showErrorTip ? (openBlock(), createElementBlock(
|
|
812
812
|
"div",
|
|
813
|
-
_hoisted_4$
|
|
813
|
+
_hoisted_4$3,
|
|
814
814
|
toDisplayString$1($props.failTip),
|
|
815
815
|
1
|
|
816
816
|
/* TEXT */
|
|
@@ -884,9 +884,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
884
884
|
)
|
|
885
885
|
]);
|
|
886
886
|
}
|
|
887
|
-
var dragimg = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
887
|
+
var dragimg = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render], ["__scopeId", "data-v-9e8c9ed2"]]);
|
|
888
888
|
|
|
889
|
-
var _sfc_main$
|
|
889
|
+
var _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
890
890
|
...{
|
|
891
891
|
name: "Fmselect"
|
|
892
892
|
},
|
|
@@ -23784,8 +23784,8 @@ const useApi = (url, options = {}) => {
|
|
|
23784
23784
|
};
|
|
23785
23785
|
};
|
|
23786
23786
|
|
|
23787
|
-
const _hoisted_1$
|
|
23788
|
-
var _sfc_main$
|
|
23787
|
+
const _hoisted_1$4 = { style: { "font-size": "14px", "line-height": "30px" } };
|
|
23788
|
+
var _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
23789
23789
|
...{
|
|
23790
23790
|
name: "FmAutocomplete"
|
|
23791
23791
|
},
|
|
@@ -23891,7 +23891,7 @@ var _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
23891
23891
|
default: withCtx(({ item }) => [
|
|
23892
23892
|
createElementVNode(
|
|
23893
23893
|
"div",
|
|
23894
|
-
_hoisted_1$
|
|
23894
|
+
_hoisted_1$4,
|
|
23895
23895
|
toDisplayString$1(item[__props.fName]),
|
|
23896
23896
|
1
|
|
23897
23897
|
/* TEXT */
|
|
@@ -36160,7 +36160,7 @@ const usefminputdropdownstore = defineStore("fminputdropdownstore", () => {
|
|
|
36160
36160
|
};
|
|
36161
36161
|
});
|
|
36162
36162
|
|
|
36163
|
-
var _sfc_main$
|
|
36163
|
+
var _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
36164
36164
|
...{
|
|
36165
36165
|
name: "Fminputdropdown"
|
|
36166
36166
|
},
|
|
@@ -36333,12 +36333,12 @@ var _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
36333
36333
|
}
|
|
36334
36334
|
});
|
|
36335
36335
|
|
|
36336
|
-
const _hoisted_1$
|
|
36337
|
-
const _hoisted_2 = { style: { "display": "flex", "align-items": "center", "gap": "8px", "flex-wrap": "nowrap", "overflow": "hidden" } };
|
|
36338
|
-
const _hoisted_3 = { style: { "flex": "1 1 200px", "min-width": "0", "overflow": "hidden" } };
|
|
36339
|
-
const _hoisted_4 = { style: { "display": "flex", "align-items": "center", "flex-shrink": "0", "white-space": "nowrap" } };
|
|
36340
|
-
const _hoisted_5 = { style: { "margin-bottom": "45px" } };
|
|
36341
|
-
var _sfc_main$
|
|
36336
|
+
const _hoisted_1$3 = { style: { "padding": "5px" } };
|
|
36337
|
+
const _hoisted_2$2 = { style: { "display": "flex", "align-items": "center", "gap": "8px", "flex-wrap": "nowrap", "overflow": "hidden" } };
|
|
36338
|
+
const _hoisted_3$2 = { style: { "flex": "1 1 200px", "min-width": "0", "overflow": "hidden" } };
|
|
36339
|
+
const _hoisted_4$2 = { style: { "display": "flex", "align-items": "center", "flex-shrink": "0", "white-space": "nowrap" } };
|
|
36340
|
+
const _hoisted_5$1 = { style: { "margin-bottom": "45px" } };
|
|
36341
|
+
var _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
36342
36342
|
...{
|
|
36343
36343
|
name: "FmTree"
|
|
36344
36344
|
},
|
|
@@ -36445,9 +36445,9 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
36445
36445
|
style: { "height": "100%" }
|
|
36446
36446
|
}, {
|
|
36447
36447
|
header: withCtx(() => [
|
|
36448
|
-
createElementVNode("div", _hoisted_1$
|
|
36449
|
-
createElementVNode("div", _hoisted_2, [
|
|
36450
|
-
createElementVNode("div", _hoisted_3, [
|
|
36448
|
+
createElementVNode("div", _hoisted_1$3, [
|
|
36449
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
36450
|
+
createElementVNode("div", _hoisted_3$2, [
|
|
36451
36451
|
createVNode(_component_el_input, {
|
|
36452
36452
|
"prefix-icon": unref(search_default),
|
|
36453
36453
|
modelValue: filterText.value,
|
|
@@ -36457,7 +36457,7 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
36457
36457
|
placeholder: "\u7C7B\u578B\u540D\u79F0"
|
|
36458
36458
|
}, null, 8, ["prefix-icon", "modelValue"])
|
|
36459
36459
|
]),
|
|
36460
|
-
createElementVNode("div", _hoisted_4, [
|
|
36460
|
+
createElementVNode("div", _hoisted_4$2, [
|
|
36461
36461
|
!props.checkStrictly && state.isShowCheckbox ? (openBlock(), createBlock(_component_el_checkbox, {
|
|
36462
36462
|
key: 0,
|
|
36463
36463
|
modelValue: state.strictly,
|
|
@@ -36526,7 +36526,7 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
36526
36526
|
])
|
|
36527
36527
|
]),
|
|
36528
36528
|
default: withCtx(() => [
|
|
36529
|
-
withDirectives((openBlock(), createElementBlock("div", _hoisted_5, [
|
|
36529
|
+
withDirectives((openBlock(), createElementBlock("div", _hoisted_5$1, [
|
|
36530
36530
|
createVNode(_component_el_scrollbar, null, {
|
|
36531
36531
|
default: withCtx(() => [
|
|
36532
36532
|
createVNode(_component_el_tree, {
|
|
@@ -36569,7 +36569,7 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
36569
36569
|
}
|
|
36570
36570
|
});
|
|
36571
36571
|
|
|
36572
|
-
var _sfc_main$
|
|
36572
|
+
var _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
36573
36573
|
...{
|
|
36574
36574
|
name: "Fmdatepicker"
|
|
36575
36575
|
},
|
|
@@ -36618,6 +36618,1836 @@ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
36618
36618
|
}
|
|
36619
36619
|
});
|
|
36620
36620
|
|
|
36621
|
+
var _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
36622
|
+
...{
|
|
36623
|
+
name: "RenderComp"
|
|
36624
|
+
},
|
|
36625
|
+
__name: "renderComp",
|
|
36626
|
+
props: {
|
|
36627
|
+
render: Function,
|
|
36628
|
+
form: Object
|
|
36629
|
+
},
|
|
36630
|
+
setup(__props) {
|
|
36631
|
+
const props = __props;
|
|
36632
|
+
const renderComponent = () => {
|
|
36633
|
+
return props.render(props?.form);
|
|
36634
|
+
};
|
|
36635
|
+
return (_ctx, _cache) => {
|
|
36636
|
+
return openBlock(), createBlock(resolveDynamicComponent(renderComponent));
|
|
36637
|
+
};
|
|
36638
|
+
}
|
|
36639
|
+
});
|
|
36640
|
+
|
|
36641
|
+
const _hoisted_1$2 = { class: "inside_box" };
|
|
36642
|
+
const _hoisted_2$1 = { class: "inside_box_title" };
|
|
36643
|
+
const _hoisted_3$1 = { class: "check-box" };
|
|
36644
|
+
const _hoisted_4$1 = { class: "more_dropdown_icon" };
|
|
36645
|
+
const _hoisted_5 = { class: "out_box" };
|
|
36646
|
+
var _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
36647
|
+
...{
|
|
36648
|
+
name: "MoreChoose"
|
|
36649
|
+
},
|
|
36650
|
+
__name: "moreChoose",
|
|
36651
|
+
props: {
|
|
36652
|
+
// 以下拉方式展示更多条件---数据源
|
|
36653
|
+
moreCheckList: {
|
|
36654
|
+
type: Array,
|
|
36655
|
+
default: () => []
|
|
36656
|
+
},
|
|
36657
|
+
popoverAttrsBind: {
|
|
36658
|
+
type: Object,
|
|
36659
|
+
default: () => ({})
|
|
36660
|
+
}
|
|
36661
|
+
},
|
|
36662
|
+
emits: ["getCheckList"],
|
|
36663
|
+
setup(__props, { emit: __emit }) {
|
|
36664
|
+
const props = __props;
|
|
36665
|
+
const checkList = ref([]);
|
|
36666
|
+
const isCheckList = ref([]);
|
|
36667
|
+
const allcheckList = ref(props.moreCheckList);
|
|
36668
|
+
const emit = __emit;
|
|
36669
|
+
watch(
|
|
36670
|
+
() => props.moreCheckList,
|
|
36671
|
+
(list) => {
|
|
36672
|
+
allcheckList.value = list;
|
|
36673
|
+
},
|
|
36674
|
+
{ deep: true }
|
|
36675
|
+
);
|
|
36676
|
+
watch(
|
|
36677
|
+
() => checkList,
|
|
36678
|
+
(nval, oval) => {
|
|
36679
|
+
let list = [];
|
|
36680
|
+
oval.value.forEach((ele) => {
|
|
36681
|
+
if (!nval.value.some((val) => val == ele)) {
|
|
36682
|
+
list.push(ele);
|
|
36683
|
+
}
|
|
36684
|
+
});
|
|
36685
|
+
isCheckList.value.forEach((ele, j) => {
|
|
36686
|
+
if (list.filter((val) => val == ele.label)[0]) {
|
|
36687
|
+
delete isCheckList.value[j];
|
|
36688
|
+
}
|
|
36689
|
+
});
|
|
36690
|
+
},
|
|
36691
|
+
{ deep: true }
|
|
36692
|
+
);
|
|
36693
|
+
const handlecheckAll = () => {
|
|
36694
|
+
const allList = JSON.parse(JSON.stringify(allcheckList.value));
|
|
36695
|
+
checkList.value = allList.map((item) => item.label);
|
|
36696
|
+
isCheckList.value = allList;
|
|
36697
|
+
const checkObj = analysisObj(isCheckList.value);
|
|
36698
|
+
emit("getCheckList", checkObj);
|
|
36699
|
+
};
|
|
36700
|
+
const handleReverseCheck = () => {
|
|
36701
|
+
const deepCheckList = JSON.parse(JSON.stringify(checkList.value));
|
|
36702
|
+
checkList.value = [];
|
|
36703
|
+
isCheckList.value = [];
|
|
36704
|
+
allcheckList.value.forEach((ele) => {
|
|
36705
|
+
if (!deepCheckList.filter((item1) => item1 == ele.label)[0]) {
|
|
36706
|
+
checkList.value.push(ele.label);
|
|
36707
|
+
isCheckList.value.push(ele);
|
|
36708
|
+
}
|
|
36709
|
+
});
|
|
36710
|
+
const checkObj = analysisObj(isCheckList.value);
|
|
36711
|
+
emit("getCheckList", checkObj);
|
|
36712
|
+
};
|
|
36713
|
+
const handleReset = () => {
|
|
36714
|
+
checkList.value = [];
|
|
36715
|
+
isCheckList.value = [];
|
|
36716
|
+
emit("getCheckList", {});
|
|
36717
|
+
};
|
|
36718
|
+
const getcheck = (val) => {
|
|
36719
|
+
isCheckList.value = [];
|
|
36720
|
+
allcheckList.value.forEach((ele, j) => {
|
|
36721
|
+
if (val.filter((item1) => item1 == ele.label)[0]) {
|
|
36722
|
+
isCheckList.value.push(ele);
|
|
36723
|
+
}
|
|
36724
|
+
});
|
|
36725
|
+
const checkObj = analysisObj(isCheckList.value);
|
|
36726
|
+
emit("getCheckList", checkObj);
|
|
36727
|
+
};
|
|
36728
|
+
const analysisObj = (val) => {
|
|
36729
|
+
return val.reduce((obj, item) => {
|
|
36730
|
+
obj[item.prop] = {
|
|
36731
|
+
label: item?.label,
|
|
36732
|
+
comp: item.comp,
|
|
36733
|
+
bind: item?.bind,
|
|
36734
|
+
list: item?.list,
|
|
36735
|
+
eventHandle: item?.eventHandle,
|
|
36736
|
+
changeEvent: item?.changeEvent,
|
|
36737
|
+
listTypeInfo: item?.listTypeInfo,
|
|
36738
|
+
arrLabel: item?.arrLabel,
|
|
36739
|
+
arrKey: item?.arrKey,
|
|
36740
|
+
slotName: item?.slotName,
|
|
36741
|
+
span: item?.span,
|
|
36742
|
+
type: item?.type,
|
|
36743
|
+
isSelfCom: item && item.isSelfCom || false,
|
|
36744
|
+
defaultVal: item?.defaultVal,
|
|
36745
|
+
placeholder: item?.placeholder,
|
|
36746
|
+
event: item?.event
|
|
36747
|
+
};
|
|
36748
|
+
return obj;
|
|
36749
|
+
}, {});
|
|
36750
|
+
};
|
|
36751
|
+
return (_ctx, _cache) => {
|
|
36752
|
+
const _component_el_button = resolveComponent("el-button");
|
|
36753
|
+
const _component_el_checkbox = resolveComponent("el-checkbox");
|
|
36754
|
+
const _component_el_checkbox_group = resolveComponent("el-checkbox-group");
|
|
36755
|
+
const _component_el_icon = resolveComponent("el-icon");
|
|
36756
|
+
const _component_el_popover = resolveComponent("el-popover");
|
|
36757
|
+
return allcheckList.value.length > 0 ? (openBlock(), createBlock(_component_el_popover, {
|
|
36758
|
+
key: 0,
|
|
36759
|
+
"popper-class": "fm_query_condition_more",
|
|
36760
|
+
bind: __props.popoverAttrsBind,
|
|
36761
|
+
trigger: "click",
|
|
36762
|
+
width: "auto",
|
|
36763
|
+
ref: "popover"
|
|
36764
|
+
}, {
|
|
36765
|
+
reference: withCtx(() => [
|
|
36766
|
+
createElementVNode("div", _hoisted_4$1, [
|
|
36767
|
+
createElementVNode(
|
|
36768
|
+
"span",
|
|
36769
|
+
_hoisted_5,
|
|
36770
|
+
toDisplayString$1(__props.popoverAttrsBind.showTxt || "\u66F4\u591A"),
|
|
36771
|
+
1
|
|
36772
|
+
/* TEXT */
|
|
36773
|
+
),
|
|
36774
|
+
createVNode(_component_el_icon, null, {
|
|
36775
|
+
default: withCtx(() => [
|
|
36776
|
+
createVNode(unref(arrow_down_default))
|
|
36777
|
+
]),
|
|
36778
|
+
_: 1
|
|
36779
|
+
/* STABLE */
|
|
36780
|
+
})
|
|
36781
|
+
])
|
|
36782
|
+
]),
|
|
36783
|
+
default: withCtx(() => [
|
|
36784
|
+
createElementVNode("div", _hoisted_1$2, [
|
|
36785
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
36786
|
+
createElementVNode(
|
|
36787
|
+
"div",
|
|
36788
|
+
null,
|
|
36789
|
+
toDisplayString$1(__props.popoverAttrsBind.title || "\u6240\u6709\u6761\u4EF6"),
|
|
36790
|
+
1
|
|
36791
|
+
/* TEXT */
|
|
36792
|
+
),
|
|
36793
|
+
createElementVNode("div", _hoisted_3$1, [
|
|
36794
|
+
createVNode(_component_el_button, {
|
|
36795
|
+
size: "small",
|
|
36796
|
+
link: "",
|
|
36797
|
+
onClick: handlecheckAll
|
|
36798
|
+
}, {
|
|
36799
|
+
default: withCtx(() => [
|
|
36800
|
+
createTextVNode(
|
|
36801
|
+
toDisplayString$1(__props.popoverAttrsBind.allTxt || "\u5168\u9009"),
|
|
36802
|
+
1
|
|
36803
|
+
/* TEXT */
|
|
36804
|
+
)
|
|
36805
|
+
]),
|
|
36806
|
+
_: 1
|
|
36807
|
+
/* STABLE */
|
|
36808
|
+
}),
|
|
36809
|
+
createVNode(_component_el_button, {
|
|
36810
|
+
size: "small",
|
|
36811
|
+
link: "",
|
|
36812
|
+
onClick: handleReset
|
|
36813
|
+
}, {
|
|
36814
|
+
default: withCtx(() => [
|
|
36815
|
+
createTextVNode(
|
|
36816
|
+
toDisplayString$1(__props.popoverAttrsBind.clearTxt || "\u6E05\u7A7A"),
|
|
36817
|
+
1
|
|
36818
|
+
/* TEXT */
|
|
36819
|
+
)
|
|
36820
|
+
]),
|
|
36821
|
+
_: 1
|
|
36822
|
+
/* STABLE */
|
|
36823
|
+
}),
|
|
36824
|
+
createVNode(_component_el_button, {
|
|
36825
|
+
size: "small",
|
|
36826
|
+
link: "",
|
|
36827
|
+
onClick: handleReverseCheck
|
|
36828
|
+
}, {
|
|
36829
|
+
default: withCtx(() => [
|
|
36830
|
+
createTextVNode(
|
|
36831
|
+
toDisplayString$1(__props.popoverAttrsBind.reverseTxt || "\u53CD\u9009"),
|
|
36832
|
+
1
|
|
36833
|
+
/* TEXT */
|
|
36834
|
+
)
|
|
36835
|
+
]),
|
|
36836
|
+
_: 1
|
|
36837
|
+
/* STABLE */
|
|
36838
|
+
})
|
|
36839
|
+
])
|
|
36840
|
+
]),
|
|
36841
|
+
createVNode(_component_el_checkbox_group, {
|
|
36842
|
+
modelValue: checkList.value,
|
|
36843
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => checkList.value = $event),
|
|
36844
|
+
class: "inside_box_main",
|
|
36845
|
+
onChange: getcheck
|
|
36846
|
+
}, {
|
|
36847
|
+
default: withCtx(() => [
|
|
36848
|
+
(openBlock(true), createElementBlock(
|
|
36849
|
+
Fragment,
|
|
36850
|
+
null,
|
|
36851
|
+
renderList(allcheckList.value, (item, index) => {
|
|
36852
|
+
return openBlock(), createBlock(_component_el_checkbox, {
|
|
36853
|
+
key: index,
|
|
36854
|
+
label: item.label,
|
|
36855
|
+
value: item.label
|
|
36856
|
+
}, null, 8, ["label", "value"]);
|
|
36857
|
+
}),
|
|
36858
|
+
128
|
|
36859
|
+
/* KEYED_FRAGMENT */
|
|
36860
|
+
))
|
|
36861
|
+
]),
|
|
36862
|
+
_: 1
|
|
36863
|
+
/* STABLE */
|
|
36864
|
+
}, 8, ["modelValue"])
|
|
36865
|
+
])
|
|
36866
|
+
]),
|
|
36867
|
+
_: 1
|
|
36868
|
+
/* STABLE */
|
|
36869
|
+
}, 8, ["bind"])) : createCommentVNode("v-if", true);
|
|
36870
|
+
};
|
|
36871
|
+
}
|
|
36872
|
+
});
|
|
36873
|
+
|
|
36874
|
+
function useComputed() {
|
|
36875
|
+
const compChildName = computed(() => {
|
|
36876
|
+
return (opt) => {
|
|
36877
|
+
switch (opt.type) {
|
|
36878
|
+
case "checkbox":
|
|
36879
|
+
return "el-checkbox";
|
|
36880
|
+
case "radio":
|
|
36881
|
+
return "el-radio";
|
|
36882
|
+
case "select-arr":
|
|
36883
|
+
case "select-obj":
|
|
36884
|
+
return "el-option";
|
|
36885
|
+
}
|
|
36886
|
+
};
|
|
36887
|
+
});
|
|
36888
|
+
const selectListType = computed(() => {
|
|
36889
|
+
return (opt) => {
|
|
36890
|
+
if (opt.listTypeInfo) {
|
|
36891
|
+
return opt.listTypeInfo[opt.list];
|
|
36892
|
+
} else {
|
|
36893
|
+
return [];
|
|
36894
|
+
}
|
|
36895
|
+
};
|
|
36896
|
+
});
|
|
36897
|
+
const compChildLabel = computed(() => {
|
|
36898
|
+
return (opt, value) => {
|
|
36899
|
+
switch (opt.type) {
|
|
36900
|
+
case "radio":
|
|
36901
|
+
case "checkbox":
|
|
36902
|
+
return value[opt.arrLabel || "label"];
|
|
36903
|
+
case "el-select-multiple":
|
|
36904
|
+
case "select-arr":
|
|
36905
|
+
return value[opt.arrLabel || "label"];
|
|
36906
|
+
case "select-obj":
|
|
36907
|
+
return value;
|
|
36908
|
+
}
|
|
36909
|
+
};
|
|
36910
|
+
});
|
|
36911
|
+
const compChildValue = computed(() => {
|
|
36912
|
+
return (opt, value, key) => {
|
|
36913
|
+
switch (opt.type) {
|
|
36914
|
+
case "radio":
|
|
36915
|
+
case "checkbox":
|
|
36916
|
+
return value[opt.arrKey || "key"];
|
|
36917
|
+
case "el-select-multiple":
|
|
36918
|
+
case "select-arr":
|
|
36919
|
+
return value[opt.arrKey || "key"];
|
|
36920
|
+
case "select-obj":
|
|
36921
|
+
return key;
|
|
36922
|
+
}
|
|
36923
|
+
};
|
|
36924
|
+
});
|
|
36925
|
+
const compChildShowLabel = computed(() => {
|
|
36926
|
+
return (opt, value) => {
|
|
36927
|
+
switch (opt.type) {
|
|
36928
|
+
case "radio":
|
|
36929
|
+
case "checkbox":
|
|
36930
|
+
return value[opt.arrLabel || "label"];
|
|
36931
|
+
case "el-select-multiple":
|
|
36932
|
+
case "select-arr":
|
|
36933
|
+
return value[opt.arrLabel || "label"];
|
|
36934
|
+
case "select-obj":
|
|
36935
|
+
return value;
|
|
36936
|
+
}
|
|
36937
|
+
};
|
|
36938
|
+
});
|
|
36939
|
+
const getPlaceholder = (row) => {
|
|
36940
|
+
let placeholder;
|
|
36941
|
+
if (row.comp && typeof row.comp == "string") {
|
|
36942
|
+
if (row.comp.includes("input")) {
|
|
36943
|
+
placeholder = "\u8BF7\u8F93\u5165" + row.label;
|
|
36944
|
+
} else if (row.comp.includes("select") || row.comp.includes("date")) {
|
|
36945
|
+
placeholder = "\u8BF7\u9009\u62E9" + row.label;
|
|
36946
|
+
} else {
|
|
36947
|
+
placeholder = row.label;
|
|
36948
|
+
}
|
|
36949
|
+
}
|
|
36950
|
+
return placeholder;
|
|
36951
|
+
};
|
|
36952
|
+
const getColLength = () => {
|
|
36953
|
+
const width = window.innerWidth;
|
|
36954
|
+
let colLength = 4;
|
|
36955
|
+
if (width > 1e3 && width < 1280) {
|
|
36956
|
+
colLength = 3;
|
|
36957
|
+
} else if (width > 768 && width <= 1e3) {
|
|
36958
|
+
colLength = 2;
|
|
36959
|
+
} else if (width <= 768) {
|
|
36960
|
+
colLength = 1;
|
|
36961
|
+
}
|
|
36962
|
+
return colLength;
|
|
36963
|
+
};
|
|
36964
|
+
return {
|
|
36965
|
+
compChildName,
|
|
36966
|
+
selectListType,
|
|
36967
|
+
compChildLabel,
|
|
36968
|
+
compChildValue,
|
|
36969
|
+
compChildShowLabel,
|
|
36970
|
+
getPlaceholder,
|
|
36971
|
+
getColLength
|
|
36972
|
+
};
|
|
36973
|
+
}
|
|
36974
|
+
|
|
36975
|
+
var _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
36976
|
+
...{
|
|
36977
|
+
name: "FmQueryCondition"
|
|
36978
|
+
},
|
|
36979
|
+
__name: "index",
|
|
36980
|
+
props: {
|
|
36981
|
+
opts: { default: () => ({}) },
|
|
36982
|
+
labelWidth: { default: "120px" },
|
|
36983
|
+
btnCheckBind: { default: () => ({}) },
|
|
36984
|
+
btnResetBind: { default: () => ({}) },
|
|
36985
|
+
loading: { type: Boolean, default: false },
|
|
36986
|
+
reset: { type: Boolean, default: true },
|
|
36987
|
+
boolEnter: { type: Boolean, default: true },
|
|
36988
|
+
isShowOpen: { type: Boolean, default: true },
|
|
36989
|
+
isExpansion: { type: Boolean, default: false },
|
|
36990
|
+
maxVisibleRows: { default: 1 },
|
|
36991
|
+
packUpTxt: { default: "\u6536\u8D77" },
|
|
36992
|
+
unfoldTxt: { default: "\u5C55\u5F00" },
|
|
36993
|
+
isFooter: { type: Boolean, default: true },
|
|
36994
|
+
configChangedReset: { type: Boolean, default: false },
|
|
36995
|
+
isShowWidthSize: { type: Boolean, default: false },
|
|
36996
|
+
widthSize: { default: 4 },
|
|
36997
|
+
isDropDownSelectMore: { type: Boolean, default: false },
|
|
36998
|
+
moreCheckList: { default: () => [] },
|
|
36999
|
+
popoverAttrs: { default: () => ({}) }
|
|
37000
|
+
},
|
|
37001
|
+
emits: ["handleEvent", "submit", "reset", "getCheckList", "getRefs"],
|
|
37002
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
37003
|
+
const {
|
|
37004
|
+
compChildName,
|
|
37005
|
+
selectListType,
|
|
37006
|
+
compChildLabel,
|
|
37007
|
+
compChildValue,
|
|
37008
|
+
compChildShowLabel,
|
|
37009
|
+
getPlaceholder,
|
|
37010
|
+
getColLength
|
|
37011
|
+
} = useComputed();
|
|
37012
|
+
const props = __props;
|
|
37013
|
+
const slots = useSlots();
|
|
37014
|
+
const isShow = (name) => {
|
|
37015
|
+
return Object.keys(slots).includes(name);
|
|
37016
|
+
};
|
|
37017
|
+
const popoverAttrsBind = computed(() => {
|
|
37018
|
+
return {
|
|
37019
|
+
showTxt: "\u66F4\u591A",
|
|
37020
|
+
title: "\u6240\u6709\u6761\u4EF6",
|
|
37021
|
+
allTxt: "\u5168\u9009",
|
|
37022
|
+
reverseTxt: "\u53CD\u9009",
|
|
37023
|
+
clearTxt: "\u6E05\u7A7A",
|
|
37024
|
+
...props.popoverAttrs
|
|
37025
|
+
};
|
|
37026
|
+
});
|
|
37027
|
+
let queryState = reactive({
|
|
37028
|
+
form: Object.keys(props.opts).reduce((acc, field) => {
|
|
37029
|
+
acc[field] = props.opts[field].defaultVal ?? null;
|
|
37030
|
+
return acc;
|
|
37031
|
+
}, {})
|
|
37032
|
+
});
|
|
37033
|
+
let colLength = ref(4);
|
|
37034
|
+
let showOpen = ref(false);
|
|
37035
|
+
let open = ref(false);
|
|
37036
|
+
const queryAttrs = computed(() => {
|
|
37037
|
+
return {
|
|
37038
|
+
btnTxt: "\u67E5\u8BE2",
|
|
37039
|
+
...props.btnCheckBind
|
|
37040
|
+
};
|
|
37041
|
+
});
|
|
37042
|
+
const resetAttrs = computed(() => {
|
|
37043
|
+
return { btnTxt: "\u91CD\u7F6E", ...props.btnResetBind };
|
|
37044
|
+
});
|
|
37045
|
+
const originCellLength = computed(() => {
|
|
37046
|
+
let length = 0;
|
|
37047
|
+
Object.keys(props.opts).forEach((key) => {
|
|
37048
|
+
let span = props.opts[key].span || 1;
|
|
37049
|
+
if (length % colLength.value + span > colLength.value) {
|
|
37050
|
+
length += colLength.value - length % colLength.value;
|
|
37051
|
+
}
|
|
37052
|
+
length += span;
|
|
37053
|
+
});
|
|
37054
|
+
return length;
|
|
37055
|
+
});
|
|
37056
|
+
const cOpts = computed(() => {
|
|
37057
|
+
let renderSpan = 0;
|
|
37058
|
+
return Object.keys(props.opts).reduce((acc, field) => {
|
|
37059
|
+
let opt = {
|
|
37060
|
+
...props.opts[field]
|
|
37061
|
+
};
|
|
37062
|
+
if (showOpen.value) {
|
|
37063
|
+
renderSpan += opt.span ?? 1;
|
|
37064
|
+
if (!open.value && renderSpan - 1 >= props.maxVisibleRows * colLength.value) {
|
|
37065
|
+
return acc;
|
|
37066
|
+
}
|
|
37067
|
+
}
|
|
37068
|
+
opt.dataIndex = field;
|
|
37069
|
+
acc[field] = opt;
|
|
37070
|
+
return acc;
|
|
37071
|
+
}, {});
|
|
37072
|
+
});
|
|
37073
|
+
const cellLength = computed(() => {
|
|
37074
|
+
let length = 0;
|
|
37075
|
+
Object.keys(props.opts).forEach((key) => {
|
|
37076
|
+
let span = props.opts[key].span > 4 ? 4 : props.opts[key].span || 1;
|
|
37077
|
+
length += span;
|
|
37078
|
+
});
|
|
37079
|
+
return length;
|
|
37080
|
+
});
|
|
37081
|
+
const gridAreas = computed(() => {
|
|
37082
|
+
const fields = Object.keys(cOpts.value);
|
|
37083
|
+
let rowIndex = 0;
|
|
37084
|
+
let rowSpan = 0;
|
|
37085
|
+
const areas = [[]];
|
|
37086
|
+
for (let fieldIndex = 0; fieldIndex < fields.length; fieldIndex++) {
|
|
37087
|
+
const field = fields[fieldIndex];
|
|
37088
|
+
const opt = cOpts.value[field];
|
|
37089
|
+
const span = Math.min(opt.span ?? 1, Math.min(colLength.value, 4));
|
|
37090
|
+
if (rowSpan + span > colLength.value) {
|
|
37091
|
+
while (rowSpan < colLength.value) {
|
|
37092
|
+
areas[rowIndex].push(".");
|
|
37093
|
+
rowSpan += 1;
|
|
37094
|
+
}
|
|
37095
|
+
rowSpan = 0;
|
|
37096
|
+
areas[++rowIndex] = [];
|
|
37097
|
+
}
|
|
37098
|
+
rowSpan += span;
|
|
37099
|
+
for (let index = 0; index < span; index++) {
|
|
37100
|
+
areas[rowIndex].push(field);
|
|
37101
|
+
}
|
|
37102
|
+
}
|
|
37103
|
+
if (areas[rowIndex].length === colLength.value) {
|
|
37104
|
+
areas.push(Array(colLength.value).fill("submit_btn"));
|
|
37105
|
+
} else {
|
|
37106
|
+
while (areas[rowIndex].length < colLength.value) {
|
|
37107
|
+
areas[rowIndex].push("submit_btn");
|
|
37108
|
+
}
|
|
37109
|
+
}
|
|
37110
|
+
return areas.reduce((acc, cur) => {
|
|
37111
|
+
acc += `'${cur.join(" ")}'
|
|
37112
|
+
`;
|
|
37113
|
+
return acc;
|
|
37114
|
+
}, "");
|
|
37115
|
+
});
|
|
37116
|
+
const cEvent = computed(() => {
|
|
37117
|
+
return (opt) => {
|
|
37118
|
+
let event = { ...opt.eventHandle };
|
|
37119
|
+
let changeEvent = {};
|
|
37120
|
+
Object.keys(event).forEach((v) => {
|
|
37121
|
+
changeEvent[v] = (e) => {
|
|
37122
|
+
if (opt.comp.includes("select") || opt.comp.includes("picker") || opt.comp.includes("date")) {
|
|
37123
|
+
event[v] && event[v](e, queryState.form);
|
|
37124
|
+
} else {
|
|
37125
|
+
if (e) {
|
|
37126
|
+
event[v] && event[v](e, queryState.form);
|
|
37127
|
+
} else {
|
|
37128
|
+
event[v] && event[v](queryState.form);
|
|
37129
|
+
}
|
|
37130
|
+
}
|
|
37131
|
+
};
|
|
37132
|
+
});
|
|
37133
|
+
return { ...changeEvent };
|
|
37134
|
+
};
|
|
37135
|
+
});
|
|
37136
|
+
const initForm = (opts, keepVal = false) => {
|
|
37137
|
+
return Object.keys(opts).reduce((acc, field) => {
|
|
37138
|
+
if (keepVal && queryState.form) {
|
|
37139
|
+
acc[field] = queryState.form[field] ?? opts[field].defaultVal ?? null;
|
|
37140
|
+
} else {
|
|
37141
|
+
acc[field] = opts[field].defaultVal ?? null;
|
|
37142
|
+
}
|
|
37143
|
+
return acc;
|
|
37144
|
+
}, {});
|
|
37145
|
+
};
|
|
37146
|
+
const emits = __emit;
|
|
37147
|
+
const tselecttableref = ref({});
|
|
37148
|
+
const handleRef = (el, opt, key) => {
|
|
37149
|
+
emits("getRefs", el, opt, key);
|
|
37150
|
+
if (el) {
|
|
37151
|
+
tselecttableref.value[`tselecttableref-${key}`] = el;
|
|
37152
|
+
}
|
|
37153
|
+
};
|
|
37154
|
+
const getRefs = (el, opt, index) => {
|
|
37155
|
+
emits("getRefs", el, opt, index);
|
|
37156
|
+
};
|
|
37157
|
+
const resetHandle = () => {
|
|
37158
|
+
queryState.form = initForm(props.opts);
|
|
37159
|
+
const refList = Object.keys(tselecttableref.value).filter(
|
|
37160
|
+
(item) => item.includes("tselecttableref")
|
|
37161
|
+
);
|
|
37162
|
+
if (refList.length > 0 && tselecttableref.value) {
|
|
37163
|
+
refList.map((val) => {
|
|
37164
|
+
tselecttableref.value[val].clear();
|
|
37165
|
+
});
|
|
37166
|
+
}
|
|
37167
|
+
emits("reset", queryState.form);
|
|
37168
|
+
checkHandle("reset");
|
|
37169
|
+
};
|
|
37170
|
+
const resetData = () => {
|
|
37171
|
+
queryState.form = initForm(props.opts);
|
|
37172
|
+
const refList = Object.keys(tselecttableref.value).filter(
|
|
37173
|
+
(item) => item.includes("tselecttableref")
|
|
37174
|
+
);
|
|
37175
|
+
if (refList.length > 0 && tselecttableref.value) {
|
|
37176
|
+
refList.map((val) => {
|
|
37177
|
+
tselecttableref.value[val].clear();
|
|
37178
|
+
});
|
|
37179
|
+
}
|
|
37180
|
+
};
|
|
37181
|
+
const handleEvent = ({ isChange = false, type, val }, dataIndex) => {
|
|
37182
|
+
if (!isChange) {
|
|
37183
|
+
emits("handleEvent", type, val, queryState.form);
|
|
37184
|
+
} else if (dataIndex) {
|
|
37185
|
+
queryState.form[dataIndex] = val;
|
|
37186
|
+
}
|
|
37187
|
+
};
|
|
37188
|
+
const checkHandle = (flagText = false) => {
|
|
37189
|
+
emits("submit", queryState.form, flagText);
|
|
37190
|
+
};
|
|
37191
|
+
onMounted(() => {
|
|
37192
|
+
if (props.isShowOpen) {
|
|
37193
|
+
showOpen.value = true;
|
|
37194
|
+
} else {
|
|
37195
|
+
showOpen.value = false;
|
|
37196
|
+
}
|
|
37197
|
+
if (props.isExpansion) {
|
|
37198
|
+
open.value = true;
|
|
37199
|
+
} else {
|
|
37200
|
+
open.value = false;
|
|
37201
|
+
}
|
|
37202
|
+
if (props.isShowWidthSize) {
|
|
37203
|
+
colLength.value = props.widthSize;
|
|
37204
|
+
} else {
|
|
37205
|
+
colLength.value = getColLength();
|
|
37206
|
+
}
|
|
37207
|
+
if (props.boolEnter) {
|
|
37208
|
+
document.onkeyup = (e) => {
|
|
37209
|
+
let key = e.keyCode;
|
|
37210
|
+
let pagination = document.querySelectorAll(".el-pagination");
|
|
37211
|
+
let isPaginationInputFocus = false;
|
|
37212
|
+
if (pagination) {
|
|
37213
|
+
pagination.forEach((ele) => {
|
|
37214
|
+
let paginationInputList = ele.getElementsByTagName("input");
|
|
37215
|
+
let paginationInput = paginationInputList[paginationInputList.length - 1];
|
|
37216
|
+
if (paginationInput === document.activeElement) {
|
|
37217
|
+
isPaginationInputFocus = true;
|
|
37218
|
+
}
|
|
37219
|
+
});
|
|
37220
|
+
}
|
|
37221
|
+
if (isPaginationInputFocus) {
|
|
37222
|
+
return;
|
|
37223
|
+
}
|
|
37224
|
+
if (key === 13) {
|
|
37225
|
+
checkHandle();
|
|
37226
|
+
}
|
|
37227
|
+
};
|
|
37228
|
+
}
|
|
37229
|
+
if (isShow("footerBtn") || !props.isFooter) {
|
|
37230
|
+
open.value = true;
|
|
37231
|
+
}
|
|
37232
|
+
if (props.isDropDownSelectMore) {
|
|
37233
|
+
open.value = true;
|
|
37234
|
+
showOpen.value = false;
|
|
37235
|
+
}
|
|
37236
|
+
});
|
|
37237
|
+
watch(
|
|
37238
|
+
() => props.widthSize,
|
|
37239
|
+
(val) => {
|
|
37240
|
+
colLength.value = val;
|
|
37241
|
+
}
|
|
37242
|
+
);
|
|
37243
|
+
watch(
|
|
37244
|
+
() => props.opts,
|
|
37245
|
+
(opts) => {
|
|
37246
|
+
queryState.form = initForm(opts, !props.configChangedReset);
|
|
37247
|
+
},
|
|
37248
|
+
{ deep: true }
|
|
37249
|
+
);
|
|
37250
|
+
__expose({
|
|
37251
|
+
queryState,
|
|
37252
|
+
props,
|
|
37253
|
+
colLength,
|
|
37254
|
+
resetData,
|
|
37255
|
+
resetHandle,
|
|
37256
|
+
checkHandle,
|
|
37257
|
+
handleEvent
|
|
37258
|
+
});
|
|
37259
|
+
return (_ctx, _cache) => {
|
|
37260
|
+
const _component_el_form_item = resolveComponent("el-form-item");
|
|
37261
|
+
const _component_el_button = resolveComponent("el-button");
|
|
37262
|
+
const _component_el_icon = resolveComponent("el-icon");
|
|
37263
|
+
const _component_el_form = resolveComponent("el-form");
|
|
37264
|
+
return openBlock(), createBlock(_component_el_form, mergeProps({ id: "t_query_condition" }, _ctx.$attrs, {
|
|
37265
|
+
"label-width": _ctx.labelWidth,
|
|
37266
|
+
form: unref(queryState).form,
|
|
37267
|
+
size: "default",
|
|
37268
|
+
class: "fm-query-condition",
|
|
37269
|
+
style: {
|
|
37270
|
+
"grid-template-areas": gridAreas.value,
|
|
37271
|
+
"grid-template-columns": `repeat(${unref(colLength)}, minmax(0px, ${100 / unref(colLength)}%))`
|
|
37272
|
+
},
|
|
37273
|
+
onSubmit: _cache[2] || (_cache[2] = withModifiers(() => {
|
|
37274
|
+
}, ["prevent"]))
|
|
37275
|
+
}), {
|
|
37276
|
+
default: withCtx(() => [
|
|
37277
|
+
(openBlock(true), createElementBlock(
|
|
37278
|
+
Fragment,
|
|
37279
|
+
null,
|
|
37280
|
+
renderList(cOpts.value, (opt, i) => {
|
|
37281
|
+
return openBlock(), createBlock(_component_el_form_item, mergeProps({
|
|
37282
|
+
key: i,
|
|
37283
|
+
label: opt.label,
|
|
37284
|
+
"label-width": opt.labelWidth
|
|
37285
|
+
}, { ref_for: true }, _ctx.$attrs, {
|
|
37286
|
+
style: { gridArea: i },
|
|
37287
|
+
class: [opt.className, { render_label: opt.labelRender }]
|
|
37288
|
+
}), createSlots({
|
|
37289
|
+
default: withCtx(() => [
|
|
37290
|
+
opt.slotName ? renderSlot(_ctx.$slots, opt.slotName, {
|
|
37291
|
+
key: 0,
|
|
37292
|
+
param: unref(queryState).form,
|
|
37293
|
+
scope: unref(queryState).form
|
|
37294
|
+
}) : createCommentVNode("v-if", true),
|
|
37295
|
+
opt.isSelfCom ? (openBlock(), createBlock(resolveDynamicComponent(opt.comp), mergeProps(
|
|
37296
|
+
{
|
|
37297
|
+
key: 1,
|
|
37298
|
+
ref_for: true,
|
|
37299
|
+
ref: opt.comp === "fm-select-table" ? (el) => handleRef(el, opt, i) : (el) => getRefs(el, opt, i),
|
|
37300
|
+
modelValue: unref(queryState).form[opt.dataIndex],
|
|
37301
|
+
"onUpdate:modelValue": ($event) => unref(queryState).form[opt.dataIndex] = $event,
|
|
37302
|
+
placeholder: opt.placeholder || unref(getPlaceholder)(opt)
|
|
37303
|
+
},
|
|
37304
|
+
{ ref_for: true },
|
|
37305
|
+
typeof opt.bind == "function" ? opt.bind(unref(queryState).form) : { clearable: true, filterable: true, ..._ctx.$attrs, ...opt.bind },
|
|
37306
|
+
{
|
|
37307
|
+
style: { width: opt.width || "100%" },
|
|
37308
|
+
onChange: ($event) => handleEvent({ type: opt.event, val: unref(queryState).form[opt.dataIndex] })
|
|
37309
|
+
},
|
|
37310
|
+
toHandlers(cEvent.value(opt))
|
|
37311
|
+
), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "style", "onChange"])) : createCommentVNode("v-if", true),
|
|
37312
|
+
!opt.isSelfCom && !opt.slotName ? (openBlock(), createBlock(resolveDynamicComponent(opt.comp), mergeProps(
|
|
37313
|
+
{
|
|
37314
|
+
key: 2,
|
|
37315
|
+
ref_for: true
|
|
37316
|
+
},
|
|
37317
|
+
typeof opt.bind == "function" ? opt.bind(unref(queryState).form) : { clearable: true, filterable: true, ..._ctx.$attrs, ...opt.bind },
|
|
37318
|
+
{
|
|
37319
|
+
placeholder: opt.placeholder || unref(getPlaceholder)(opt),
|
|
37320
|
+
onChange: ($event) => handleEvent({ type: opt.event, val: unref(queryState).form[opt.dataIndex] }),
|
|
37321
|
+
ref_for: true,
|
|
37322
|
+
ref: (el) => getRefs(el, opt, i)
|
|
37323
|
+
},
|
|
37324
|
+
toHandlers(cEvent.value(opt)),
|
|
37325
|
+
{
|
|
37326
|
+
modelValue: unref(queryState).form[opt.dataIndex],
|
|
37327
|
+
"onUpdate:modelValue": ($event) => unref(queryState).form[opt.dataIndex] = $event
|
|
37328
|
+
}
|
|
37329
|
+
), {
|
|
37330
|
+
default: withCtx(() => [
|
|
37331
|
+
(openBlock(true), createElementBlock(
|
|
37332
|
+
Fragment,
|
|
37333
|
+
null,
|
|
37334
|
+
renderList(unref(selectListType)(opt), (value, key, index) => {
|
|
37335
|
+
return openBlock(), createBlock(resolveDynamicComponent(unref(compChildName)(opt)), {
|
|
37336
|
+
key: index,
|
|
37337
|
+
disabled: value.disabled,
|
|
37338
|
+
label: unref(compChildLabel)(opt, value),
|
|
37339
|
+
value: unref(compChildValue)(opt, value, key)
|
|
37340
|
+
}, {
|
|
37341
|
+
default: withCtx(() => [
|
|
37342
|
+
createTextVNode(
|
|
37343
|
+
toDisplayString$1(unref(compChildShowLabel)(opt, value)),
|
|
37344
|
+
1
|
|
37345
|
+
/* TEXT */
|
|
37346
|
+
)
|
|
37347
|
+
]),
|
|
37348
|
+
_: 2
|
|
37349
|
+
/* DYNAMIC */
|
|
37350
|
+
}, 1032, ["disabled", "label", "value"]);
|
|
37351
|
+
}),
|
|
37352
|
+
128
|
|
37353
|
+
/* KEYED_FRAGMENT */
|
|
37354
|
+
))
|
|
37355
|
+
]),
|
|
37356
|
+
_: 2
|
|
37357
|
+
/* DYNAMIC */
|
|
37358
|
+
}, 1040, ["placeholder", "onChange", "modelValue", "onUpdate:modelValue"])) : createCommentVNode("v-if", true)
|
|
37359
|
+
]),
|
|
37360
|
+
_: 2
|
|
37361
|
+
/* DYNAMIC */
|
|
37362
|
+
}, [
|
|
37363
|
+
opt.labelRender ? {
|
|
37364
|
+
name: "label",
|
|
37365
|
+
fn: withCtx(() => [
|
|
37366
|
+
createVNode(_sfc_main$6, {
|
|
37367
|
+
form: unref(queryState).form,
|
|
37368
|
+
render: opt.labelRender
|
|
37369
|
+
}, null, 8, ["form", "render"])
|
|
37370
|
+
]),
|
|
37371
|
+
key: "0"
|
|
37372
|
+
} : void 0
|
|
37373
|
+
]), 1040, ["label", "label-width", "style", "class"]);
|
|
37374
|
+
}),
|
|
37375
|
+
128
|
|
37376
|
+
/* KEYED_FRAGMENT */
|
|
37377
|
+
)),
|
|
37378
|
+
Object.keys(cOpts.value).length > 0 ? (openBlock(), createBlock(_component_el_form_item, {
|
|
37379
|
+
key: 0,
|
|
37380
|
+
"label-width": "0",
|
|
37381
|
+
style: { "grid-area": "submit_btn" },
|
|
37382
|
+
class: normalizeClass([
|
|
37383
|
+
"btn",
|
|
37384
|
+
{ flex_end: cellLength.value % unref(colLength) === 0 },
|
|
37385
|
+
{ btn_flex_end: Object.keys(cOpts.value).length === 4 || cellLength.value > 3 }
|
|
37386
|
+
])
|
|
37387
|
+
}, {
|
|
37388
|
+
default: withCtx(() => [
|
|
37389
|
+
_ctx.isFooter ? (openBlock(), createElementBlock(
|
|
37390
|
+
Fragment,
|
|
37391
|
+
{ key: 0 },
|
|
37392
|
+
[
|
|
37393
|
+
renderSlot(_ctx.$slots, "footerBtn"),
|
|
37394
|
+
!unref(slots).footerBtn ? (openBlock(), createElementBlock(
|
|
37395
|
+
Fragment,
|
|
37396
|
+
{ key: 0 },
|
|
37397
|
+
[
|
|
37398
|
+
createVNode(_component_el_button, mergeProps({
|
|
37399
|
+
class: "btn_check",
|
|
37400
|
+
onClick: checkHandle
|
|
37401
|
+
}, { type: "primary", ...queryAttrs.value }, { loading: _ctx.loading }), {
|
|
37402
|
+
default: withCtx(() => [
|
|
37403
|
+
createTextVNode(
|
|
37404
|
+
toDisplayString$1(queryAttrs.value.btnTxt),
|
|
37405
|
+
1
|
|
37406
|
+
/* TEXT */
|
|
37407
|
+
)
|
|
37408
|
+
]),
|
|
37409
|
+
_: 1
|
|
37410
|
+
/* STABLE */
|
|
37411
|
+
}, 16, ["loading"]),
|
|
37412
|
+
_ctx.reset ? (openBlock(), createBlock(
|
|
37413
|
+
_component_el_button,
|
|
37414
|
+
mergeProps({
|
|
37415
|
+
key: 0,
|
|
37416
|
+
class: "btn_reset"
|
|
37417
|
+
}, resetAttrs.value, { onClick: resetHandle }),
|
|
37418
|
+
{
|
|
37419
|
+
default: withCtx(() => [
|
|
37420
|
+
createTextVNode(
|
|
37421
|
+
toDisplayString$1(resetAttrs.value.btnTxt),
|
|
37422
|
+
1
|
|
37423
|
+
/* TEXT */
|
|
37424
|
+
)
|
|
37425
|
+
]),
|
|
37426
|
+
_: 1
|
|
37427
|
+
/* STABLE */
|
|
37428
|
+
},
|
|
37429
|
+
16
|
|
37430
|
+
/* FULL_PROPS */
|
|
37431
|
+
)) : createCommentVNode("v-if", true),
|
|
37432
|
+
renderSlot(_ctx.$slots, "querybar"),
|
|
37433
|
+
originCellLength.value > _ctx.maxVisibleRows * unref(colLength) && unref(showOpen) ? (openBlock(), createBlock(_component_el_button, {
|
|
37434
|
+
key: 1,
|
|
37435
|
+
onClick: _cache[0] || (_cache[0] = ($event) => isRef$1(open) ? open.value = !unref(open) : open = !unref(open)),
|
|
37436
|
+
link: ""
|
|
37437
|
+
}, {
|
|
37438
|
+
default: withCtx(() => [
|
|
37439
|
+
createTextVNode(
|
|
37440
|
+
toDisplayString$1(unref(open) ? _ctx.packUpTxt : _ctx.unfoldTxt) + " ",
|
|
37441
|
+
1
|
|
37442
|
+
/* TEXT */
|
|
37443
|
+
),
|
|
37444
|
+
unref(open) ? (openBlock(), createBlock(_component_el_icon, { key: 0 }, {
|
|
37445
|
+
default: withCtx(() => [
|
|
37446
|
+
createVNode(unref(arrow_up_default))
|
|
37447
|
+
]),
|
|
37448
|
+
_: 1
|
|
37449
|
+
/* STABLE */
|
|
37450
|
+
})) : (openBlock(), createBlock(_component_el_icon, { key: 1 }, {
|
|
37451
|
+
default: withCtx(() => [
|
|
37452
|
+
createVNode(unref(arrow_down_default))
|
|
37453
|
+
]),
|
|
37454
|
+
_: 1
|
|
37455
|
+
/* STABLE */
|
|
37456
|
+
}))
|
|
37457
|
+
]),
|
|
37458
|
+
_: 1
|
|
37459
|
+
/* STABLE */
|
|
37460
|
+
})) : createCommentVNode("v-if", true),
|
|
37461
|
+
createVNode(_sfc_main$5, {
|
|
37462
|
+
isDropDownSelectMore: _ctx.isDropDownSelectMore,
|
|
37463
|
+
moreCheckList: _ctx.moreCheckList,
|
|
37464
|
+
popoverAttrsBind: popoverAttrsBind.value,
|
|
37465
|
+
onGetCheckList: _cache[1] || (_cache[1] = (event) => emits("getCheckList", event))
|
|
37466
|
+
}, null, 8, ["isDropDownSelectMore", "moreCheckList", "popoverAttrsBind"])
|
|
37467
|
+
],
|
|
37468
|
+
64
|
|
37469
|
+
/* STABLE_FRAGMENT */
|
|
37470
|
+
)) : createCommentVNode("v-if", true)
|
|
37471
|
+
],
|
|
37472
|
+
64
|
|
37473
|
+
/* STABLE_FRAGMENT */
|
|
37474
|
+
)) : createCommentVNode("v-if", true)
|
|
37475
|
+
]),
|
|
37476
|
+
_: 3
|
|
37477
|
+
/* FORWARDED */
|
|
37478
|
+
}, 8, ["class"])) : createCommentVNode("v-if", true)
|
|
37479
|
+
]),
|
|
37480
|
+
_: 3
|
|
37481
|
+
/* FORWARDED */
|
|
37482
|
+
}, 16, ["label-width", "form", "style"]);
|
|
37483
|
+
};
|
|
37484
|
+
}
|
|
37485
|
+
});
|
|
37486
|
+
|
|
37487
|
+
var _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
37488
|
+
...{
|
|
37489
|
+
name: "RenderCol"
|
|
37490
|
+
},
|
|
37491
|
+
__name: "renderCol",
|
|
37492
|
+
props: {
|
|
37493
|
+
row: Object,
|
|
37494
|
+
render: Function,
|
|
37495
|
+
index: Number,
|
|
37496
|
+
column: {
|
|
37497
|
+
type: Object,
|
|
37498
|
+
default: null
|
|
37499
|
+
}
|
|
37500
|
+
},
|
|
37501
|
+
setup(__props) {
|
|
37502
|
+
const props = __props;
|
|
37503
|
+
const renderComponent = () => {
|
|
37504
|
+
return props.render(props?.row[props?.column?.prop], props.row, props.index);
|
|
37505
|
+
};
|
|
37506
|
+
return (_ctx, _cache) => {
|
|
37507
|
+
return openBlock(), createBlock(resolveDynamicComponent(renderComponent));
|
|
37508
|
+
};
|
|
37509
|
+
}
|
|
37510
|
+
});
|
|
37511
|
+
|
|
37512
|
+
const isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
37513
|
+
typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
|
37514
|
+
|
|
37515
|
+
const nodeList = /* @__PURE__ */ new Map();
|
|
37516
|
+
let startClick;
|
|
37517
|
+
if (isClient) {
|
|
37518
|
+
document.addEventListener("mousedown", (e) => startClick = e);
|
|
37519
|
+
document.addEventListener("mouseup", (e) => {
|
|
37520
|
+
for (const handlers of nodeList.values()) {
|
|
37521
|
+
for (const { documentHandler } of handlers) {
|
|
37522
|
+
documentHandler(e, startClick);
|
|
37523
|
+
}
|
|
37524
|
+
}
|
|
37525
|
+
});
|
|
37526
|
+
}
|
|
37527
|
+
function createDocumentHandler(el, binding) {
|
|
37528
|
+
let excludes = [];
|
|
37529
|
+
if (Array.isArray(binding.arg)) {
|
|
37530
|
+
excludes = binding.arg;
|
|
37531
|
+
} else if (binding.arg instanceof HTMLElement) {
|
|
37532
|
+
excludes.push(binding.arg);
|
|
37533
|
+
}
|
|
37534
|
+
return function(mouseup, mousedown) {
|
|
37535
|
+
const popperRef = binding.instance.popperRef;
|
|
37536
|
+
const mouseUpTarget = mouseup.target;
|
|
37537
|
+
const mouseDownTarget = mousedown?.target;
|
|
37538
|
+
const isBound = !binding || !binding.instance;
|
|
37539
|
+
const isTargetExists = !mouseUpTarget || !mouseDownTarget;
|
|
37540
|
+
const isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget);
|
|
37541
|
+
const isSelf = el === mouseUpTarget;
|
|
37542
|
+
const isTargetExcluded = excludes.length && excludes.some((item) => item?.contains(mouseUpTarget)) || excludes.length && excludes.includes(mouseDownTarget);
|
|
37543
|
+
const isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget));
|
|
37544
|
+
if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) {
|
|
37545
|
+
return;
|
|
37546
|
+
}
|
|
37547
|
+
binding.value(mouseup, mousedown);
|
|
37548
|
+
};
|
|
37549
|
+
}
|
|
37550
|
+
const ClickOutside = {
|
|
37551
|
+
beforeMount(el, binding) {
|
|
37552
|
+
if (!nodeList.has(el)) {
|
|
37553
|
+
nodeList.set(el, []);
|
|
37554
|
+
}
|
|
37555
|
+
nodeList.get(el).push({
|
|
37556
|
+
documentHandler: createDocumentHandler(el, binding),
|
|
37557
|
+
bindingFn: binding.value
|
|
37558
|
+
});
|
|
37559
|
+
},
|
|
37560
|
+
updated(el, binding) {
|
|
37561
|
+
if (!nodeList.has(el)) {
|
|
37562
|
+
nodeList.set(el, []);
|
|
37563
|
+
}
|
|
37564
|
+
const handlers = nodeList.get(el);
|
|
37565
|
+
const oldHandlerIndex = handlers.findIndex((item) => item.bindingFn === binding.oldValue);
|
|
37566
|
+
const newHandler = {
|
|
37567
|
+
documentHandler: createDocumentHandler(el, binding),
|
|
37568
|
+
bindingFn: binding.value
|
|
37569
|
+
};
|
|
37570
|
+
if (oldHandlerIndex >= 0) {
|
|
37571
|
+
handlers.splice(oldHandlerIndex, 1, newHandler);
|
|
37572
|
+
} else {
|
|
37573
|
+
handlers.push(newHandler);
|
|
37574
|
+
}
|
|
37575
|
+
},
|
|
37576
|
+
unmounted(el) {
|
|
37577
|
+
nodeList.delete(el);
|
|
37578
|
+
}
|
|
37579
|
+
};
|
|
37580
|
+
|
|
37581
|
+
function useVirtualized() {
|
|
37582
|
+
const actualHeightContainerEl = ref(null);
|
|
37583
|
+
const translateContainerEl = ref(null);
|
|
37584
|
+
const scrollContainerEl = ref(null);
|
|
37585
|
+
const isMultiple = ref(false);
|
|
37586
|
+
const saveDATA = ref([]);
|
|
37587
|
+
const RenderedItemsCache = {};
|
|
37588
|
+
const getDom = (props) => {
|
|
37589
|
+
const getElements = (className) => {
|
|
37590
|
+
actualHeightContainerEl.value = document.querySelector(`${className} .el-scrollbar__view`);
|
|
37591
|
+
translateContainerEl.value = document.querySelector(`${className} .el-table__body`);
|
|
37592
|
+
scrollContainerEl.value = document.querySelector(`${className} .el-scrollbar__wrap`);
|
|
37593
|
+
};
|
|
37594
|
+
isMultiple.value = props.multiple;
|
|
37595
|
+
if (props.multiple) {
|
|
37596
|
+
getElements(".fm_select_table_multiple");
|
|
37597
|
+
} else {
|
|
37598
|
+
getElements(".fm_select_table_radio");
|
|
37599
|
+
}
|
|
37600
|
+
};
|
|
37601
|
+
const getItemHeightFromCache = (index) => {
|
|
37602
|
+
const val = RenderedItemsCache[index];
|
|
37603
|
+
return val === void 0 ? 50 : val;
|
|
37604
|
+
};
|
|
37605
|
+
const updateActualHeight = () => {
|
|
37606
|
+
let actualHeight = 0;
|
|
37607
|
+
saveDATA.value.forEach((_, i) => {
|
|
37608
|
+
actualHeight += getItemHeightFromCache(i);
|
|
37609
|
+
});
|
|
37610
|
+
actualHeightContainerEl.value.style.height = actualHeight + "px";
|
|
37611
|
+
};
|
|
37612
|
+
const updateOffset = (offset) => {
|
|
37613
|
+
if (translateContainerEl.value && translateContainerEl.value.style) {
|
|
37614
|
+
translateContainerEl.value.style.transform = `translateY(${offset}px)`;
|
|
37615
|
+
}
|
|
37616
|
+
};
|
|
37617
|
+
const updateRenderedItemCache = (index) => {
|
|
37618
|
+
const shouldUpdate = Object.keys(RenderedItemsCache).length < saveDATA.value.length;
|
|
37619
|
+
if (!shouldUpdate) return;
|
|
37620
|
+
nextTick(() => {
|
|
37621
|
+
const Items = Array.from(
|
|
37622
|
+
document.querySelectorAll(
|
|
37623
|
+
`${isMultiple.value ? `.fm_select_table_multiple` : `.fm_select_table_radio`} .el-table__row`
|
|
37624
|
+
)
|
|
37625
|
+
);
|
|
37626
|
+
Items.forEach((el) => {
|
|
37627
|
+
if (!RenderedItemsCache[index]) {
|
|
37628
|
+
RenderedItemsCache[index] = el.offsetHeight;
|
|
37629
|
+
}
|
|
37630
|
+
index++;
|
|
37631
|
+
});
|
|
37632
|
+
updateActualHeight();
|
|
37633
|
+
});
|
|
37634
|
+
};
|
|
37635
|
+
return {
|
|
37636
|
+
scrollContainerEl,
|
|
37637
|
+
updateRenderedItemCache,
|
|
37638
|
+
updateOffset,
|
|
37639
|
+
getDom,
|
|
37640
|
+
getItemHeightFromCache,
|
|
37641
|
+
saveDATA
|
|
37642
|
+
};
|
|
37643
|
+
}
|
|
37644
|
+
|
|
37645
|
+
const _hoisted_1$1 = {
|
|
37646
|
+
key: 0,
|
|
37647
|
+
class: "table_query_condition"
|
|
37648
|
+
};
|
|
37649
|
+
const _hoisted_2 = ["element-loading-text"];
|
|
37650
|
+
const _hoisted_3 = { key: 2 };
|
|
37651
|
+
const _hoisted_4 = {
|
|
37652
|
+
key: 0,
|
|
37653
|
+
class: "fm-table-select__page"
|
|
37654
|
+
};
|
|
37655
|
+
var _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
37656
|
+
...{
|
|
37657
|
+
name: "TSelectTable"
|
|
37658
|
+
},
|
|
37659
|
+
__name: "index",
|
|
37660
|
+
props: {
|
|
37661
|
+
modelValue: { default: void 0 },
|
|
37662
|
+
inputValue: { default: void 0 },
|
|
37663
|
+
defaultSelectVal: { default: () => [] },
|
|
37664
|
+
radioSelectValLabel: { default: "" },
|
|
37665
|
+
table: { default: () => ({
|
|
37666
|
+
data: [],
|
|
37667
|
+
currentPage: 1,
|
|
37668
|
+
pageSize: 10,
|
|
37669
|
+
total: 0
|
|
37670
|
+
}) },
|
|
37671
|
+
keywords: { default: () => ({
|
|
37672
|
+
value: "value",
|
|
37673
|
+
label: "label"
|
|
37674
|
+
}) },
|
|
37675
|
+
value: {},
|
|
37676
|
+
columns: { default: () => [] },
|
|
37677
|
+
multiple: { type: Boolean, default: false },
|
|
37678
|
+
filterable: { type: Boolean, default: true },
|
|
37679
|
+
remote: { type: Boolean, default: false },
|
|
37680
|
+
remoteMethod: { type: Function, default: void 0 },
|
|
37681
|
+
filterMethod: { type: Function, default: void 0 },
|
|
37682
|
+
isShowInput: { type: Boolean, default: false },
|
|
37683
|
+
inputAttr: { default: () => ({}) },
|
|
37684
|
+
inputWidth: { default: 550 },
|
|
37685
|
+
selectWidth: { default: 550 },
|
|
37686
|
+
tableWidth: { default: 550 },
|
|
37687
|
+
isShowQuery: { type: Boolean, default: false },
|
|
37688
|
+
isShowBlurBtn: { type: Boolean, default: false },
|
|
37689
|
+
btnBind: { default: () => ({ btnTxt: "\u5173\u95ED\u4E0B\u62C9\u6846" }) },
|
|
37690
|
+
align: { default: "center" },
|
|
37691
|
+
reserveSelection: { type: Boolean, default: true },
|
|
37692
|
+
selectable: { type: Function, default: void 0 },
|
|
37693
|
+
multipleFixed: { type: [String, Boolean], default: true },
|
|
37694
|
+
radioTxt: { default: "\u5355\u9009" },
|
|
37695
|
+
radioFixed: { type: [String, Boolean], default: true },
|
|
37696
|
+
tableSize: { default: "default" },
|
|
37697
|
+
border: { type: Boolean, default: true },
|
|
37698
|
+
isShowFirstColumn: { type: Boolean, default: true },
|
|
37699
|
+
useVirtual: { type: Boolean, default: false },
|
|
37700
|
+
virtualShowSize: { default: 30 },
|
|
37701
|
+
isShowPagination: { type: Boolean, default: false },
|
|
37702
|
+
paginationSize: { default: "small" },
|
|
37703
|
+
selfExpanded: { type: Boolean, default: false },
|
|
37704
|
+
isClearQuery: { type: Boolean, default: false },
|
|
37705
|
+
isRadioEchoLabel: { type: Boolean, default: true },
|
|
37706
|
+
defaultValIsOpenRadioChange: { type: Boolean, default: false },
|
|
37707
|
+
radioSameIsCancel: { type: Boolean, default: true },
|
|
37708
|
+
rowClickRadio: { type: Boolean, default: true },
|
|
37709
|
+
isKeyup: { type: Boolean, default: false },
|
|
37710
|
+
isExpanded: { type: Boolean, default: false },
|
|
37711
|
+
multipleDisableDelete: { type: Boolean, default: true },
|
|
37712
|
+
tableLoading: { type: Boolean, default: false },
|
|
37713
|
+
loadingTxt: { default: "\u52A0\u8F7D\u4E2D..." }
|
|
37714
|
+
},
|
|
37715
|
+
emits: ["page-change", "selectionChange", "radioChange", "update:inputValue", "input-focus", "input-blur", "input-clear", "input-click"],
|
|
37716
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
37717
|
+
const {
|
|
37718
|
+
scrollContainerEl,
|
|
37719
|
+
updateRenderedItemCache,
|
|
37720
|
+
updateOffset,
|
|
37721
|
+
getDom,
|
|
37722
|
+
saveDATA,
|
|
37723
|
+
getItemHeightFromCache
|
|
37724
|
+
} = useVirtualized();
|
|
37725
|
+
const props = __props;
|
|
37726
|
+
const vClickOutside = ClickOutside;
|
|
37727
|
+
const emits = __emit;
|
|
37728
|
+
const slots = useSlots();
|
|
37729
|
+
const isDefaultSelectVal = ref(true);
|
|
37730
|
+
const forbidden = ref(true);
|
|
37731
|
+
const isRadio = ref(false);
|
|
37732
|
+
const isQueryVisible = ref(false);
|
|
37733
|
+
const isVisible = ref(false);
|
|
37734
|
+
const radioVal = ref("");
|
|
37735
|
+
const isShowFirstRadio = ref(props.isShowFirstColumn);
|
|
37736
|
+
const selectDefaultLabel = ref(props.modelValue);
|
|
37737
|
+
const scrollTopNum = ref(0);
|
|
37738
|
+
let selectInputVal = computed({
|
|
37739
|
+
get() {
|
|
37740
|
+
return props.inputValue;
|
|
37741
|
+
},
|
|
37742
|
+
set(val) {
|
|
37743
|
+
emits("update:inputValue", val);
|
|
37744
|
+
}
|
|
37745
|
+
});
|
|
37746
|
+
const state = reactive({
|
|
37747
|
+
defaultSelectValue: props.defaultSelectVal,
|
|
37748
|
+
// 默认选中
|
|
37749
|
+
tableData: props.table.data,
|
|
37750
|
+
// table数据
|
|
37751
|
+
defaultValue: props.value,
|
|
37752
|
+
ids: [],
|
|
37753
|
+
// 多选id集合
|
|
37754
|
+
tabularMap: {}
|
|
37755
|
+
// 存储下拉tale的所有name
|
|
37756
|
+
});
|
|
37757
|
+
const selectRef = ref(null);
|
|
37758
|
+
const selectTable = ref(null);
|
|
37759
|
+
const tQueryConditionRef = ref(null);
|
|
37760
|
+
const nowIndex = ref(-1);
|
|
37761
|
+
const tableDataLabelList = computed(() => {
|
|
37762
|
+
return state.tableData.map((item) => item[props.keywords.label]);
|
|
37763
|
+
});
|
|
37764
|
+
watch(
|
|
37765
|
+
() => props.table.data,
|
|
37766
|
+
(val) => {
|
|
37767
|
+
if (props.useVirtual) {
|
|
37768
|
+
saveDATA.value = val;
|
|
37769
|
+
updateRenderData(scrollTopNum.value);
|
|
37770
|
+
} else {
|
|
37771
|
+
state.tableData = val;
|
|
37772
|
+
if (props.multiple && props.multipleDisableDelete) {
|
|
37773
|
+
selectRef.value?.$el?.querySelectorAll(".el-tag").forEach((item) => {
|
|
37774
|
+
if (tableDataLabelList.value?.includes(
|
|
37775
|
+
item.querySelector(".el-select__tags-text")?.innerText
|
|
37776
|
+
)) {
|
|
37777
|
+
item.querySelector(".el-tag__close").style = "display: block";
|
|
37778
|
+
} else {
|
|
37779
|
+
item.querySelector(".el-tag__close").style = "display: none";
|
|
37780
|
+
}
|
|
37781
|
+
});
|
|
37782
|
+
}
|
|
37783
|
+
}
|
|
37784
|
+
nextTick(() => {
|
|
37785
|
+
state.tableData && state.tableData.length > 0 && state.tableData.forEach((item) => {
|
|
37786
|
+
state.tabularMap[item[props.keywords.value]] = item[props.keywords.label];
|
|
37787
|
+
});
|
|
37788
|
+
});
|
|
37789
|
+
},
|
|
37790
|
+
{ deep: true }
|
|
37791
|
+
);
|
|
37792
|
+
watch(
|
|
37793
|
+
() => props.defaultSelectVal,
|
|
37794
|
+
(val) => {
|
|
37795
|
+
state.defaultSelectValue = val;
|
|
37796
|
+
if (val.length > 0) {
|
|
37797
|
+
if (props.multiple) {
|
|
37798
|
+
if (isDefaultSelectVal.value) {
|
|
37799
|
+
defaultSelect(state.defaultSelectValue);
|
|
37800
|
+
}
|
|
37801
|
+
} else {
|
|
37802
|
+
defaultSelect(state.defaultSelectValue);
|
|
37803
|
+
}
|
|
37804
|
+
}
|
|
37805
|
+
},
|
|
37806
|
+
{ deep: true }
|
|
37807
|
+
);
|
|
37808
|
+
watch(
|
|
37809
|
+
() => props.radioSelectValLabel,
|
|
37810
|
+
(val) => {
|
|
37811
|
+
if (val) findLabel();
|
|
37812
|
+
},
|
|
37813
|
+
{ deep: true }
|
|
37814
|
+
);
|
|
37815
|
+
onMounted(() => {
|
|
37816
|
+
if (state.defaultSelectValue && state.defaultSelectValue.length > 0 && isDefaultSelectVal.value) {
|
|
37817
|
+
defaultSelect(state.defaultSelectValue);
|
|
37818
|
+
}
|
|
37819
|
+
if (props.selfExpanded) {
|
|
37820
|
+
selectRef.value.expanded = true;
|
|
37821
|
+
}
|
|
37822
|
+
if (props.useVirtual) {
|
|
37823
|
+
saveDATA.value = props.table.data;
|
|
37824
|
+
isShowFirstRadio.value = false;
|
|
37825
|
+
getDom(props);
|
|
37826
|
+
scrollContainerEl.value?.addEventListener("scroll", handleScroll);
|
|
37827
|
+
}
|
|
37828
|
+
if (props.radioSelectValLabel) findLabel();
|
|
37829
|
+
});
|
|
37830
|
+
const updateRenderData = (scrollTop) => {
|
|
37831
|
+
let startIndex = 0;
|
|
37832
|
+
let offsetHeight = 0;
|
|
37833
|
+
for (let i = 0; i < saveDATA.value.length; i++) {
|
|
37834
|
+
offsetHeight += getItemHeightFromCache(i);
|
|
37835
|
+
if (offsetHeight >= scrollTop) {
|
|
37836
|
+
startIndex = i;
|
|
37837
|
+
break;
|
|
37838
|
+
}
|
|
37839
|
+
}
|
|
37840
|
+
state.tableData = saveDATA.value.slice(startIndex, startIndex + props.virtualShowSize);
|
|
37841
|
+
updateRenderedItemCache(startIndex);
|
|
37842
|
+
updateOffset(offsetHeight - getItemHeightFromCache(startIndex));
|
|
37843
|
+
};
|
|
37844
|
+
const handleScroll = (e) => {
|
|
37845
|
+
scrollTopNum.value = e.target.scrollTop;
|
|
37846
|
+
updateRenderData(scrollTopNum.value);
|
|
37847
|
+
};
|
|
37848
|
+
onBeforeUnmount(() => {
|
|
37849
|
+
if (props.useVirtual) {
|
|
37850
|
+
scrollContainerEl.value?.removeEventListener("scroll", handleScroll);
|
|
37851
|
+
}
|
|
37852
|
+
});
|
|
37853
|
+
onUpdated(() => {
|
|
37854
|
+
if (props.isShowQuery) {
|
|
37855
|
+
selectTable.value.doLayout();
|
|
37856
|
+
}
|
|
37857
|
+
});
|
|
37858
|
+
const visibleChange = (visible) => {
|
|
37859
|
+
isVisible.value = visible;
|
|
37860
|
+
if (isQueryVisible.value) {
|
|
37861
|
+
selectRef.value.expanded = true;
|
|
37862
|
+
}
|
|
37863
|
+
if (visible) {
|
|
37864
|
+
if (state.defaultSelectValue && state.defaultSelectValue.length > 0 && isDefaultSelectVal.value) {
|
|
37865
|
+
defaultSelect(state.defaultSelectValue);
|
|
37866
|
+
}
|
|
37867
|
+
initTableData();
|
|
37868
|
+
if (props.useVirtual) {
|
|
37869
|
+
saveDATA.value = props.table.data;
|
|
37870
|
+
updateRenderData(scrollTopNum.value);
|
|
37871
|
+
}
|
|
37872
|
+
} else {
|
|
37873
|
+
if (tQueryConditionRef.value && props.isShowQuery && props.isClearQuery && !selectRef.value.expanded && !props.selfExpanded) {
|
|
37874
|
+
tQueryConditionRef.value?.resetData();
|
|
37875
|
+
}
|
|
37876
|
+
findLabel();
|
|
37877
|
+
filterMethodHandle("");
|
|
37878
|
+
if (props.useVirtual) {
|
|
37879
|
+
state.tableData = [];
|
|
37880
|
+
saveDATA.value = [];
|
|
37881
|
+
}
|
|
37882
|
+
}
|
|
37883
|
+
if (props.selfExpanded) {
|
|
37884
|
+
selectRef.value.expanded = true;
|
|
37885
|
+
}
|
|
37886
|
+
};
|
|
37887
|
+
const handleEvent = () => {
|
|
37888
|
+
selectRef.value.expanded = true;
|
|
37889
|
+
};
|
|
37890
|
+
const queryVisibleChange = (val) => {
|
|
37891
|
+
isQueryVisible.value = val;
|
|
37892
|
+
};
|
|
37893
|
+
const closeBox = () => {
|
|
37894
|
+
if (tQueryConditionRef.value && props.isShowQuery) {
|
|
37895
|
+
selectRef.value.expanded = true;
|
|
37896
|
+
Object.values(tQueryConditionRef.value?.props?.opts).map((val) => {
|
|
37897
|
+
if (val.comp.includes("select") || val.comp.includes("picker") || val.comp.includes("date")) {
|
|
37898
|
+
val.eventHandle = {
|
|
37899
|
+
"visible-change": ($event) => queryVisibleChange($event)
|
|
37900
|
+
};
|
|
37901
|
+
selectRef.value.expanded = true;
|
|
37902
|
+
}
|
|
37903
|
+
});
|
|
37904
|
+
if (isVisible.value && props.isShowQuery) {
|
|
37905
|
+
selectRef.value.expanded = true;
|
|
37906
|
+
} else {
|
|
37907
|
+
selectRef.value.expanded = false;
|
|
37908
|
+
}
|
|
37909
|
+
}
|
|
37910
|
+
};
|
|
37911
|
+
const attrs = useAttrs();
|
|
37912
|
+
const selectKeyup = (e) => {
|
|
37913
|
+
if (!props.multiple && props.isKeyup && state.tableData.length > 0) {
|
|
37914
|
+
const newIndex = nowIndex.value * 1;
|
|
37915
|
+
const nextIndex = e.keyCode === 40 ? newIndex + 1 : e.keyCode === 38 ? newIndex - 1 : newIndex;
|
|
37916
|
+
const rowHeight = selectTable.value.$el.querySelectorAll(".el-table__row")[0]?.clientHeight || 0;
|
|
37917
|
+
const headerHeight = selectTable.value.$el.querySelectorAll(".el-table__header")[0]?.clientHeight || 0;
|
|
37918
|
+
const attrsMaxHeight = (typeof (attrs["max-height"] || attrs["maxHeight"]) === "number" ? attrs["max-height"] || attrs["maxHeight"] : parseFloat(attrs["max-height"] || attrs["maxHeight"])) || 0;
|
|
37919
|
+
const maxHeight = attrsMaxHeight ? attrsMaxHeight - headerHeight : 0;
|
|
37920
|
+
const height = rowHeight * (nextIndex + 3);
|
|
37921
|
+
const scrollTop = height > maxHeight ? height - maxHeight : 0;
|
|
37922
|
+
if (attrsMaxHeight) {
|
|
37923
|
+
selectTable.value.setScrollTop(scrollTop);
|
|
37924
|
+
}
|
|
37925
|
+
const validNextIndex = Math.max(0, Math.min(nextIndex, state.tableData.length - 1));
|
|
37926
|
+
selectTable.value.setCurrentRow(state.tableData[validNextIndex]);
|
|
37927
|
+
nowIndex.value = validNextIndex;
|
|
37928
|
+
if (e.keyCode === 13) {
|
|
37929
|
+
rowClick(state.tableData[validNextIndex]);
|
|
37930
|
+
}
|
|
37931
|
+
}
|
|
37932
|
+
};
|
|
37933
|
+
const findLabel = () => {
|
|
37934
|
+
nextTick(() => {
|
|
37935
|
+
if (props.multiple) {
|
|
37936
|
+
selectRef.value.selected?.forEach((item) => {
|
|
37937
|
+
item.currentLabel = item.value;
|
|
37938
|
+
});
|
|
37939
|
+
} else {
|
|
37940
|
+
if (props.isRadioEchoLabel) {
|
|
37941
|
+
selectDefaultLabel.value = state.defaultValue && state.defaultValue[props.keywords.label] || props.radioSelectValLabel;
|
|
37942
|
+
} else {
|
|
37943
|
+
selectDefaultLabel.value = state.defaultValue && state.defaultValue[props.keywords.label] || "";
|
|
37944
|
+
}
|
|
37945
|
+
}
|
|
37946
|
+
});
|
|
37947
|
+
};
|
|
37948
|
+
const handlesCurrentChange = (val) => {
|
|
37949
|
+
if (props.multiple) {
|
|
37950
|
+
if (!props.reserveSelection) {
|
|
37951
|
+
clear();
|
|
37952
|
+
}
|
|
37953
|
+
} else {
|
|
37954
|
+
reset();
|
|
37955
|
+
}
|
|
37956
|
+
emits("page-change", val);
|
|
37957
|
+
};
|
|
37958
|
+
const reset = () => {
|
|
37959
|
+
if (!props.multiple) {
|
|
37960
|
+
selectTable.value.setCurrentRow(-1);
|
|
37961
|
+
nowIndex.value = -1;
|
|
37962
|
+
radioVal.value = "";
|
|
37963
|
+
isDefaultSelectVal.value = true;
|
|
37964
|
+
forbidden.value = false;
|
|
37965
|
+
}
|
|
37966
|
+
};
|
|
37967
|
+
const defaultSelect = (defaultSelectVal) => {
|
|
37968
|
+
if (props.multiple) {
|
|
37969
|
+
const multipleList = defaultSelectVal.map((val) => state.tableData.find((row) => row[props.keywords.value] === val)).filter(Boolean);
|
|
37970
|
+
setTimeout(() => {
|
|
37971
|
+
state.defaultValue = multipleList.map((item) => item[props.keywords.label]);
|
|
37972
|
+
multipleList.forEach((row) => {
|
|
37973
|
+
selectTable.value.toggleRowSelection(row, true);
|
|
37974
|
+
});
|
|
37975
|
+
selectRef.value?.selected?.forEach((item) => {
|
|
37976
|
+
item.currentLabel = item.value;
|
|
37977
|
+
});
|
|
37978
|
+
}, 0);
|
|
37979
|
+
} else {
|
|
37980
|
+
setTimeout(() => {
|
|
37981
|
+
const row = state.tableData.find((item) => item[props.keywords.value] === defaultSelectVal[0]);
|
|
37982
|
+
if (row) {
|
|
37983
|
+
radioVal.value = state.tableData.indexOf(row) + 1;
|
|
37984
|
+
state.defaultValue = row;
|
|
37985
|
+
selectDefaultLabel.value = row[props.keywords.label];
|
|
37986
|
+
if (!props.defaultValIsOpenRadioChange) {
|
|
37987
|
+
emits("radioChange", row, row[props.keywords.value]);
|
|
37988
|
+
}
|
|
37989
|
+
}
|
|
37990
|
+
}, 0);
|
|
37991
|
+
}
|
|
37992
|
+
};
|
|
37993
|
+
const handlesSelectionChange = (val) => {
|
|
37994
|
+
isDefaultSelectVal.value = false;
|
|
37995
|
+
state.defaultValue = val.map((item) => item[props.keywords.label]);
|
|
37996
|
+
state.ids = val.map((item) => item[props.keywords.value]);
|
|
37997
|
+
if (val.length === 0) {
|
|
37998
|
+
isDefaultSelectVal.value = true;
|
|
37999
|
+
state.defaultSelectValue = [];
|
|
38000
|
+
}
|
|
38001
|
+
emits("selectionChange", val, state.ids);
|
|
38002
|
+
};
|
|
38003
|
+
const getRowClassName = ({ row }) => {
|
|
38004
|
+
if (!props.multiple && JSON.stringify(row) === JSON.stringify(state.defaultValue)) {
|
|
38005
|
+
return "selected_row_style";
|
|
38006
|
+
}
|
|
38007
|
+
return "";
|
|
38008
|
+
};
|
|
38009
|
+
const getRowKey = (row) => {
|
|
38010
|
+
return row[props.keywords.value];
|
|
38011
|
+
};
|
|
38012
|
+
const filterMethodHandle = (val) => {
|
|
38013
|
+
if (!props.filterable) return;
|
|
38014
|
+
if (props.filterable && props.remote && typeof props.remoteMethod === "function") {
|
|
38015
|
+
props.remoteMethod(val);
|
|
38016
|
+
return;
|
|
38017
|
+
}
|
|
38018
|
+
const tableData = JSON.parse(JSON.stringify(props.table?.data));
|
|
38019
|
+
if (!tableData || tableData.length === 0) return;
|
|
38020
|
+
if (!props.multiple) {
|
|
38021
|
+
if (val) {
|
|
38022
|
+
radioVal.value = "";
|
|
38023
|
+
} else {
|
|
38024
|
+
const defaultIndex = tableData.findIndex(
|
|
38025
|
+
(item) => item[props.keywords.label] === selectDefaultLabel.value
|
|
38026
|
+
);
|
|
38027
|
+
if (defaultIndex !== -1) {
|
|
38028
|
+
radioVal.value = defaultIndex + 1;
|
|
38029
|
+
}
|
|
38030
|
+
}
|
|
38031
|
+
}
|
|
38032
|
+
state.tableData = tableData.filter((item) => {
|
|
38033
|
+
return item[props.keywords.label]?.includes(val);
|
|
38034
|
+
});
|
|
38035
|
+
if (selectDefaultLabel.value) {
|
|
38036
|
+
const defaultIndex = state.tableData.findIndex(
|
|
38037
|
+
(item) => item[props.keywords.label] === selectDefaultLabel.value
|
|
38038
|
+
);
|
|
38039
|
+
if (defaultIndex !== -1) {
|
|
38040
|
+
radioVal.value = defaultIndex + 1;
|
|
38041
|
+
}
|
|
38042
|
+
}
|
|
38043
|
+
};
|
|
38044
|
+
const initTableData = () => {
|
|
38045
|
+
nextTick(() => {
|
|
38046
|
+
if (props.multiple) {
|
|
38047
|
+
state.defaultValue?.forEach((row) => {
|
|
38048
|
+
const matchedRow = state.tableData.find(
|
|
38049
|
+
(item) => item[props.keywords.value] === row[props.keywords.value]
|
|
38050
|
+
);
|
|
38051
|
+
if (matchedRow) {
|
|
38052
|
+
selectTable.value.toggleRowSelection(matchedRow, true);
|
|
38053
|
+
}
|
|
38054
|
+
});
|
|
38055
|
+
} else {
|
|
38056
|
+
const matchedRow = state.tableData?.find(
|
|
38057
|
+
(item) => item[props.keywords.value] === selectDefaultLabel.value
|
|
38058
|
+
);
|
|
38059
|
+
if (matchedRow) {
|
|
38060
|
+
selectTable.value.setCurrentRow(matchedRow);
|
|
38061
|
+
}
|
|
38062
|
+
}
|
|
38063
|
+
});
|
|
38064
|
+
};
|
|
38065
|
+
const copyToClipboard = async (text) => {
|
|
38066
|
+
if (typeof text !== "string" || text.trim() === "") {
|
|
38067
|
+
throw new Error("\u65E0\u6548\u7684\u590D\u5236\u5185\u5BB9");
|
|
38068
|
+
}
|
|
38069
|
+
try {
|
|
38070
|
+
await navigator.clipboard.writeText(text);
|
|
38071
|
+
} catch (error) {
|
|
38072
|
+
if (error.name === "NotAllowedError" || error.name === "SecurityError") {
|
|
38073
|
+
throw new Error("\u590D\u5236\u5931\u8D25\uFF1A\u6743\u9650\u88AB\u62D2\u7EDD");
|
|
38074
|
+
} else {
|
|
38075
|
+
throw new Error("\u590D\u5236\u5931\u8D25\uFF1A\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u6216\u53D1\u751F\u672A\u77E5\u9519\u8BEF");
|
|
38076
|
+
}
|
|
38077
|
+
}
|
|
38078
|
+
};
|
|
38079
|
+
const showMessage = (type, message) => {
|
|
38080
|
+
if (type === "success") {
|
|
38081
|
+
ElMessage.success(message);
|
|
38082
|
+
} else {
|
|
38083
|
+
ElMessage.error(message);
|
|
38084
|
+
}
|
|
38085
|
+
};
|
|
38086
|
+
const cellDblclick = async (row, column) => {
|
|
38087
|
+
const value = row[column.property];
|
|
38088
|
+
try {
|
|
38089
|
+
await copyToClipboard(String(value));
|
|
38090
|
+
showMessage("success", "\u590D\u5236\u6210\u529F");
|
|
38091
|
+
} catch (error) {
|
|
38092
|
+
showMessage("error", error.message || "\u590D\u5236\u5931\u8D25");
|
|
38093
|
+
}
|
|
38094
|
+
};
|
|
38095
|
+
const radioChangeHandle = (event, row, index) => {
|
|
38096
|
+
event.preventDefault();
|
|
38097
|
+
if (row.isRadioDisabled) return;
|
|
38098
|
+
isDefaultSelectVal.value = false;
|
|
38099
|
+
radioClick(row, index);
|
|
38100
|
+
};
|
|
38101
|
+
const isForbidden = () => {
|
|
38102
|
+
forbidden.value = false;
|
|
38103
|
+
setTimeout(() => {
|
|
38104
|
+
forbidden.value = true;
|
|
38105
|
+
}, 0);
|
|
38106
|
+
};
|
|
38107
|
+
const radioClick = (row, index) => {
|
|
38108
|
+
forbidden.value = !forbidden.value;
|
|
38109
|
+
if (radioVal.value === index) {
|
|
38110
|
+
if (!props.radioSameIsCancel) return;
|
|
38111
|
+
clear();
|
|
38112
|
+
} else {
|
|
38113
|
+
updateState(row, index);
|
|
38114
|
+
}
|
|
38115
|
+
if (props.isExpanded && state.defaultValue) {
|
|
38116
|
+
selectDefaultLabel.value = state.defaultValue[props.keywords.label] || "";
|
|
38117
|
+
selectRef.value.expanded = true;
|
|
38118
|
+
} else {
|
|
38119
|
+
blur();
|
|
38120
|
+
}
|
|
38121
|
+
};
|
|
38122
|
+
const updateState = (row, index) => {
|
|
38123
|
+
isForbidden();
|
|
38124
|
+
radioVal.value = index;
|
|
38125
|
+
state.defaultValue = row;
|
|
38126
|
+
emits("radioChange", row, row[props.keywords.value]);
|
|
38127
|
+
};
|
|
38128
|
+
const rowClick = async (row) => {
|
|
38129
|
+
if (row.isRadioDisabled) return;
|
|
38130
|
+
if (!props.rowClickRadio) return;
|
|
38131
|
+
if (!props.multiple) {
|
|
38132
|
+
const rowIndex = props.table?.data.findIndex(
|
|
38133
|
+
(item) => item[props.keywords.value] === row[props.keywords.value]
|
|
38134
|
+
);
|
|
38135
|
+
if (rowIndex !== -1) {
|
|
38136
|
+
isDefaultSelectVal.value = false;
|
|
38137
|
+
await radioClick(row, rowIndex + 1);
|
|
38138
|
+
if (radioVal.value) {
|
|
38139
|
+
isRadio.value = true;
|
|
38140
|
+
} else {
|
|
38141
|
+
isRadio.value = false;
|
|
38142
|
+
}
|
|
38143
|
+
}
|
|
38144
|
+
}
|
|
38145
|
+
};
|
|
38146
|
+
const removeTag = (tag) => {
|
|
38147
|
+
const row = state.tableData.find(
|
|
38148
|
+
(item) => item[props.keywords.label] === tag
|
|
38149
|
+
);
|
|
38150
|
+
row && selectTable.value.toggleRowSelection(row, false);
|
|
38151
|
+
isDefaultSelectVal.value = true;
|
|
38152
|
+
};
|
|
38153
|
+
const clear = () => {
|
|
38154
|
+
const resetDefaultState = () => {
|
|
38155
|
+
isDefaultSelectVal.value = true;
|
|
38156
|
+
state.defaultSelectValue = [];
|
|
38157
|
+
state.defaultValue = props.multiple ? [] : null;
|
|
38158
|
+
};
|
|
38159
|
+
if (!selectTable.value) {
|
|
38160
|
+
console.warn("selectTable.value is not initialized");
|
|
38161
|
+
return;
|
|
38162
|
+
}
|
|
38163
|
+
if (props.multiple === true) {
|
|
38164
|
+
try {
|
|
38165
|
+
selectTable.value.clearSelection();
|
|
38166
|
+
} catch (error) {
|
|
38167
|
+
console.error("Failed to clear selection:", error);
|
|
38168
|
+
}
|
|
38169
|
+
resetDefaultState();
|
|
38170
|
+
} else if (props.multiple === false) {
|
|
38171
|
+
try {
|
|
38172
|
+
selectTable.value.setCurrentRow(-1);
|
|
38173
|
+
} catch (error) {
|
|
38174
|
+
console.error("Failed to set current row:", error);
|
|
38175
|
+
}
|
|
38176
|
+
nowIndex.value = -1;
|
|
38177
|
+
radioVal.value = "";
|
|
38178
|
+
forbidden.value = false;
|
|
38179
|
+
selectDefaultLabel.value = null;
|
|
38180
|
+
resetDefaultState();
|
|
38181
|
+
emits("radioChange", null, null);
|
|
38182
|
+
} else {
|
|
38183
|
+
console.warn("Invalid value for props.multiple:", props.multiple);
|
|
38184
|
+
}
|
|
38185
|
+
};
|
|
38186
|
+
const blur = () => {
|
|
38187
|
+
selectRef.value.blur();
|
|
38188
|
+
};
|
|
38189
|
+
const focus = () => {
|
|
38190
|
+
selectRef.value.focus();
|
|
38191
|
+
};
|
|
38192
|
+
const isShowSlot = (name) => {
|
|
38193
|
+
return Object.keys(slots).includes(name);
|
|
38194
|
+
};
|
|
38195
|
+
__expose({
|
|
38196
|
+
focus,
|
|
38197
|
+
blur,
|
|
38198
|
+
clear,
|
|
38199
|
+
props,
|
|
38200
|
+
state,
|
|
38201
|
+
tQueryConditionRef,
|
|
38202
|
+
selectRef,
|
|
38203
|
+
selectTable
|
|
38204
|
+
});
|
|
38205
|
+
return (_ctx, _cache) => {
|
|
38206
|
+
const _component_el_input = resolveComponent("el-input");
|
|
38207
|
+
const _component_el_button = resolveComponent("el-button");
|
|
38208
|
+
const _component_el_table_column = resolveComponent("el-table-column");
|
|
38209
|
+
const _component_el_radio = resolveComponent("el-radio");
|
|
38210
|
+
const _component_el_table = resolveComponent("el-table");
|
|
38211
|
+
const _component_el_pagination = resolveComponent("el-pagination");
|
|
38212
|
+
const _component_el_select = resolveComponent("el-select");
|
|
38213
|
+
const _directive_loading = resolveDirective("loading");
|
|
38214
|
+
return _ctx.isShowInput ? (openBlock(), createBlock(_component_el_input, mergeProps({
|
|
38215
|
+
key: 0,
|
|
38216
|
+
modelValue: unref(selectInputVal),
|
|
38217
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef$1(selectInputVal) ? selectInputVal.value = $event : selectInputVal = $event)
|
|
38218
|
+
}, { clearable: true, ..._ctx.inputAttr }, {
|
|
38219
|
+
onFocus: _cache[1] || (_cache[1] = () => emits("input-focus")),
|
|
38220
|
+
onBlur: _cache[2] || (_cache[2] = () => emits("input-blur")),
|
|
38221
|
+
onClick: _cache[3] || (_cache[3] = () => emits("input-click")),
|
|
38222
|
+
onClear: _cache[4] || (_cache[4] = () => emits("input-clear")),
|
|
38223
|
+
style: { width: _ctx.inputWidth ? `${_ctx.inputWidth}px` : "100%" }
|
|
38224
|
+
}), createSlots({
|
|
38225
|
+
_: 2
|
|
38226
|
+
/* DYNAMIC */
|
|
38227
|
+
}, [
|
|
38228
|
+
renderList(unref(slots), (_index, name) => {
|
|
38229
|
+
return {
|
|
38230
|
+
name,
|
|
38231
|
+
fn: withCtx((data) => [
|
|
38232
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(data)))
|
|
38233
|
+
])
|
|
38234
|
+
};
|
|
38235
|
+
})
|
|
38236
|
+
]), 1040, ["modelValue", "style"])) : withDirectives((openBlock(), createBlock(_component_el_select, mergeProps({
|
|
38237
|
+
key: 1,
|
|
38238
|
+
ref_key: "selectRef",
|
|
38239
|
+
ref: selectRef,
|
|
38240
|
+
"model-value": _ctx.multiple ? state.defaultValue : selectDefaultLabel.value,
|
|
38241
|
+
"popper-class": "fm-select-table",
|
|
38242
|
+
style: { width: _ctx.selectWidth ? `${_ctx.selectWidth}px` : "100%" },
|
|
38243
|
+
"value-key": _ctx.keywords.value,
|
|
38244
|
+
"filter-method": _ctx.filterMethod || filterMethodHandle,
|
|
38245
|
+
onVisibleChange: visibleChange,
|
|
38246
|
+
onRemoveTag: removeTag,
|
|
38247
|
+
onClear: clear,
|
|
38248
|
+
onKeyup: selectKeyup
|
|
38249
|
+
}, { clearable: true, multiple: _ctx.multiple, filterable: _ctx.filterable, remote: _ctx.remote, remoteMethod: _ctx.remoteMethod, ..._ctx.$attrs }), {
|
|
38250
|
+
empty: withCtx(() => [
|
|
38251
|
+
createElementVNode(
|
|
38252
|
+
"div",
|
|
38253
|
+
{
|
|
38254
|
+
class: "fm-table-select__table",
|
|
38255
|
+
style: normalizeStyle({ width: _ctx.tableWidth ? `${_ctx.tableWidth}px` : "100%" })
|
|
38256
|
+
},
|
|
38257
|
+
[
|
|
38258
|
+
_ctx.isShowQuery ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
38259
|
+
createVNode(
|
|
38260
|
+
_sfc_main$4,
|
|
38261
|
+
mergeProps({
|
|
38262
|
+
ref_key: "tQueryConditionRef",
|
|
38263
|
+
ref: tQueryConditionRef,
|
|
38264
|
+
boolEnter: false,
|
|
38265
|
+
onHandleEvent: handleEvent
|
|
38266
|
+
}, _ctx.$attrs),
|
|
38267
|
+
createSlots({
|
|
38268
|
+
_: 2
|
|
38269
|
+
/* DYNAMIC */
|
|
38270
|
+
}, [
|
|
38271
|
+
renderList(unref(slots), (_index, name) => {
|
|
38272
|
+
return {
|
|
38273
|
+
name,
|
|
38274
|
+
fn: withCtx((data) => [
|
|
38275
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(data)))
|
|
38276
|
+
])
|
|
38277
|
+
};
|
|
38278
|
+
}),
|
|
38279
|
+
_ctx.isShowBlurBtn ? {
|
|
38280
|
+
name: "querybar",
|
|
38281
|
+
fn: withCtx(() => [
|
|
38282
|
+
createVNode(
|
|
38283
|
+
_component_el_button,
|
|
38284
|
+
mergeProps({ type: "danger", ..._ctx.btnBind }, { onClick: blur }),
|
|
38285
|
+
{
|
|
38286
|
+
default: withCtx(() => [
|
|
38287
|
+
createTextVNode(
|
|
38288
|
+
toDisplayString$1(_ctx.btnBind.btnTxt || "\u5173\u95ED\u4E0B\u62C9\u6846"),
|
|
38289
|
+
1
|
|
38290
|
+
/* TEXT */
|
|
38291
|
+
)
|
|
38292
|
+
]),
|
|
38293
|
+
_: 1
|
|
38294
|
+
/* STABLE */
|
|
38295
|
+
},
|
|
38296
|
+
16
|
|
38297
|
+
/* FULL_PROPS */
|
|
38298
|
+
),
|
|
38299
|
+
renderSlot(_ctx.$slots, "querybar")
|
|
38300
|
+
]),
|
|
38301
|
+
key: "0"
|
|
38302
|
+
} : void 0
|
|
38303
|
+
]),
|
|
38304
|
+
1040
|
|
38305
|
+
/* FULL_PROPS, DYNAMIC_SLOTS */
|
|
38306
|
+
)
|
|
38307
|
+
])) : createCommentVNode("v-if", true),
|
|
38308
|
+
createElementVNode(
|
|
38309
|
+
"div",
|
|
38310
|
+
{
|
|
38311
|
+
class: "header_wrap",
|
|
38312
|
+
style: normalizeStyle({ paddingBottom: isShowSlot("toolbar") ? "10px" : 0 })
|
|
38313
|
+
},
|
|
38314
|
+
[
|
|
38315
|
+
renderSlot(_ctx.$slots, "toolbar")
|
|
38316
|
+
],
|
|
38317
|
+
4
|
|
38318
|
+
/* STYLE */
|
|
38319
|
+
),
|
|
38320
|
+
withDirectives((openBlock(), createElementBlock("div", {
|
|
38321
|
+
class: "table_content",
|
|
38322
|
+
"element-loading-text": _ctx.loadingTxt
|
|
38323
|
+
}, [
|
|
38324
|
+
createVNode(_component_el_table, mergeProps({
|
|
38325
|
+
ref_key: "selectTable",
|
|
38326
|
+
ref: selectTable,
|
|
38327
|
+
data: state.tableData,
|
|
38328
|
+
class: {
|
|
38329
|
+
radioStyle: !_ctx.multiple,
|
|
38330
|
+
highlightCurrentRow: isRadio.value,
|
|
38331
|
+
keyUpStyle: _ctx.isKeyup,
|
|
38332
|
+
fm_select_table_multiple: _ctx.useVirtual && _ctx.multiple,
|
|
38333
|
+
fm_select_table_radio: _ctx.useVirtual && !_ctx.multiple
|
|
38334
|
+
},
|
|
38335
|
+
"row-class-name": getRowClassName,
|
|
38336
|
+
"row-key": getRowKey,
|
|
38337
|
+
onRowClick: rowClick,
|
|
38338
|
+
onCellDblclick: cellDblclick,
|
|
38339
|
+
onSelectionChange: handlesSelectionChange
|
|
38340
|
+
}, { border: _ctx.border, size: _ctx.tableSize, "highlight-current-row": true, ..._ctx.$attrs }), {
|
|
38341
|
+
default: withCtx(() => [
|
|
38342
|
+
_ctx.multiple ? (openBlock(), createBlock(_component_el_table_column, {
|
|
38343
|
+
key: 0,
|
|
38344
|
+
type: "selection",
|
|
38345
|
+
width: _ctx.tableSize === "large" ? 65 : 55,
|
|
38346
|
+
align: _ctx.align || "center",
|
|
38347
|
+
"reserve-selection": _ctx.reserveSelection,
|
|
38348
|
+
selectable: _ctx.selectable,
|
|
38349
|
+
fixed: _ctx.multipleFixed
|
|
38350
|
+
}, null, 8, ["width", "align", "reserve-selection", "selectable", "fixed"])) : createCommentVNode("v-if", true),
|
|
38351
|
+
!_ctx.multiple && isShowFirstRadio.value ? (openBlock(), createBlock(_component_el_table_column, {
|
|
38352
|
+
key: 1,
|
|
38353
|
+
type: "radio",
|
|
38354
|
+
width: _ctx.tableSize === "large" ? 65 : 55,
|
|
38355
|
+
label: _ctx.radioTxt,
|
|
38356
|
+
fixed: _ctx.radioFixed,
|
|
38357
|
+
align: _ctx.align || "center"
|
|
38358
|
+
}, {
|
|
38359
|
+
default: withCtx((scope) => [
|
|
38360
|
+
createVNode(_component_el_radio, {
|
|
38361
|
+
modelValue: radioVal.value,
|
|
38362
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => radioVal.value = $event),
|
|
38363
|
+
label: scope.$index + 1,
|
|
38364
|
+
disabled: scope.row.isRadioDisabled,
|
|
38365
|
+
onClick: withModifiers(($event) => radioChangeHandle($event, scope.row, scope.$index + 1), ["stop"])
|
|
38366
|
+
}, null, 8, ["modelValue", "label", "disabled", "onClick"])
|
|
38367
|
+
]),
|
|
38368
|
+
_: 1
|
|
38369
|
+
/* STABLE */
|
|
38370
|
+
}, 8, ["width", "label", "fixed", "align"])) : createCommentVNode("v-if", true),
|
|
38371
|
+
(openBlock(true), createElementBlock(
|
|
38372
|
+
Fragment,
|
|
38373
|
+
null,
|
|
38374
|
+
renderList(_ctx.columns, (item, index) => {
|
|
38375
|
+
return openBlock(), createBlock(_component_el_table_column, mergeProps({
|
|
38376
|
+
key: index + "i",
|
|
38377
|
+
type: item.type,
|
|
38378
|
+
label: item.label,
|
|
38379
|
+
prop: item.prop,
|
|
38380
|
+
"min-width": item["min-width"] || item.minWidth,
|
|
38381
|
+
width: item.width,
|
|
38382
|
+
align: item.align || _ctx.align || "center",
|
|
38383
|
+
fixed: item.fixed
|
|
38384
|
+
}, { ref_for: true }, { "show-overflow-tooltip": true, ...item.bind }), {
|
|
38385
|
+
default: withCtx((scope) => [
|
|
38386
|
+
createCommentVNode(" render\u65B9\u5F0F "),
|
|
38387
|
+
item.render ? (openBlock(), createBlock(_sfc_main$3, {
|
|
38388
|
+
key: 0,
|
|
38389
|
+
column: item,
|
|
38390
|
+
row: scope.row,
|
|
38391
|
+
render: item.render,
|
|
38392
|
+
index: scope.$index
|
|
38393
|
+
}, null, 8, ["column", "row", "render", "index"])) : createCommentVNode("v-if", true),
|
|
38394
|
+
createCommentVNode(" \u4F5C\u7528\u57DF\u63D2\u69FD "),
|
|
38395
|
+
item.slotName ? renderSlot(_ctx.$slots, item.slotName, {
|
|
38396
|
+
key: 1,
|
|
38397
|
+
scope
|
|
38398
|
+
}) : createCommentVNode("v-if", true),
|
|
38399
|
+
!item.render && !item.slotName ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
38400
|
+
createElementVNode(
|
|
38401
|
+
"span",
|
|
38402
|
+
null,
|
|
38403
|
+
toDisplayString$1(scope.row[item.prop]),
|
|
38404
|
+
1
|
|
38405
|
+
/* TEXT */
|
|
38406
|
+
)
|
|
38407
|
+
])) : createCommentVNode("v-if", true)
|
|
38408
|
+
]),
|
|
38409
|
+
_: 2
|
|
38410
|
+
/* DYNAMIC */
|
|
38411
|
+
}, 1040, ["type", "label", "prop", "min-width", "width", "align", "fixed"]);
|
|
38412
|
+
}),
|
|
38413
|
+
128
|
|
38414
|
+
/* KEYED_FRAGMENT */
|
|
38415
|
+
)),
|
|
38416
|
+
renderSlot(_ctx.$slots, "default")
|
|
38417
|
+
]),
|
|
38418
|
+
_: 3
|
|
38419
|
+
/* FORWARDED */
|
|
38420
|
+
}, 16, ["data", "class"]),
|
|
38421
|
+
_ctx.isShowPagination ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
38422
|
+
createVNode(_component_el_pagination, mergeProps({
|
|
38423
|
+
"current-page": _ctx.table.currentPage,
|
|
38424
|
+
"onUpdate:currentPage": _cache[6] || (_cache[6] = ($event) => _ctx.table.currentPage = $event),
|
|
38425
|
+
"page-size": _ctx.table.pageSize,
|
|
38426
|
+
"onUpdate:pageSize": _cache[7] || (_cache[7] = ($event) => _ctx.table.pageSize = $event),
|
|
38427
|
+
onCurrentChange: handlesCurrentChange,
|
|
38428
|
+
layout: "total, prev, pager, next, jumper",
|
|
38429
|
+
"pager-count": _ctx.table["pager-count"] || 5,
|
|
38430
|
+
total: _ctx.table.total
|
|
38431
|
+
}, { background: true, size: _ctx.paginationSize || "small", ..._ctx.$attrs }), null, 16, ["current-page", "page-size", "pager-count", "total"])
|
|
38432
|
+
])) : createCommentVNode("v-if", true)
|
|
38433
|
+
], 8, _hoisted_2)), [
|
|
38434
|
+
[_directive_loading, _ctx.tableLoading]
|
|
38435
|
+
]),
|
|
38436
|
+
renderSlot(_ctx.$slots, "footer")
|
|
38437
|
+
],
|
|
38438
|
+
4
|
|
38439
|
+
/* STYLE */
|
|
38440
|
+
)
|
|
38441
|
+
]),
|
|
38442
|
+
_: 3
|
|
38443
|
+
/* FORWARDED */
|
|
38444
|
+
}, 16, ["model-value", "style", "value-key", "filter-method"])), [
|
|
38445
|
+
[unref(vClickOutside), closeBox]
|
|
38446
|
+
]);
|
|
38447
|
+
};
|
|
38448
|
+
}
|
|
38449
|
+
});
|
|
38450
|
+
|
|
36621
38451
|
const _hoisted_1 = ["src"];
|
|
36622
38452
|
var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
36623
38453
|
...{
|
|
@@ -36717,14 +38547,19 @@ function elSvg(app) {
|
|
|
36717
38547
|
}
|
|
36718
38548
|
}
|
|
36719
38549
|
|
|
36720
|
-
const FmTransfer = _sfc_main$
|
|
36721
|
-
const FmNoticeBar = _sfc_main$
|
|
38550
|
+
const FmTransfer = _sfc_main$e;
|
|
38551
|
+
const FmNoticeBar = _sfc_main$d;
|
|
36722
38552
|
const FmDragImg = dragimg;
|
|
36723
|
-
const Fmselect = _sfc_main$
|
|
36724
|
-
const FmAutocomplete = _sfc_main$
|
|
36725
|
-
const Fminputdropdown = _sfc_main$
|
|
36726
|
-
const Fmdatepicker = _sfc_main$
|
|
36727
|
-
const FmTree = _sfc_main$
|
|
38553
|
+
const Fmselect = _sfc_main$b;
|
|
38554
|
+
const FmAutocomplete = _sfc_main$a;
|
|
38555
|
+
const Fminputdropdown = _sfc_main$9;
|
|
38556
|
+
const Fmdatepicker = _sfc_main$7;
|
|
38557
|
+
const FmTree = _sfc_main$8;
|
|
38558
|
+
const FmQueryCondition = _sfc_main$4;
|
|
38559
|
+
const FmMoreChoose = _sfc_main$5;
|
|
38560
|
+
const FmRenderComp = _sfc_main$6;
|
|
38561
|
+
const FmSelectTable = _sfc_main$2;
|
|
38562
|
+
const FmRenderCol = _sfc_main$3;
|
|
36728
38563
|
|
|
36729
38564
|
const makeInstaller = (components = []) => {
|
|
36730
38565
|
const install = (app) => {
|
|
@@ -36777,7 +38612,12 @@ const plugins = [
|
|
|
36777
38612
|
FmAutocomplete,
|
|
36778
38613
|
Fminputdropdown,
|
|
36779
38614
|
FmTree,
|
|
36780
|
-
Fmdatepicker
|
|
38615
|
+
Fmdatepicker,
|
|
38616
|
+
FmQueryCondition,
|
|
38617
|
+
FmMoreChoose,
|
|
38618
|
+
FmRenderComp,
|
|
38619
|
+
FmSelectTable,
|
|
38620
|
+
FmRenderCol
|
|
36781
38621
|
];
|
|
36782
38622
|
|
|
36783
38623
|
var installer = makeInstaller([...plugins]);
|
|
@@ -53603,4 +55443,4 @@ const version = "1.0.0";
|
|
|
53603
55443
|
|
|
53604
55444
|
const install = installer.install;
|
|
53605
55445
|
|
|
53606
|
-
export { AccountTypeEnum, AppItem, FmAutocomplete, FmDragImg, FmLogin, FmNoticeBar, FmTransfer, FmTree, Fmdatepicker, Fminputdropdown, Fmselect, HttpMethodEnum, JobCreateTypeEnum, Local, NextLoading, PUB, Session, Watermark, accessTokenKey, auth, authAll, auths, axiosInstance, base64ToFile, blobToFile, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, clone, commonFunction, commonFunctionObj, dataURLtoBlob, decryptJWT, installer as default, directive, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, elSvg, emitter, feature, fileToBase64, formatAxis, formatDate, formatPast, getAppItemData, getAppItemText, getBdate, getCountryCode, getEdate, getFileName, getFileUrl, getJWTDate, getToken, getWeek, hAuth, hAuthAll, hAuths, i18n, install, isObjectValueEqual, iso_3166_1_CountryList, judgementIdCard, judgementSameArr, languageList, mergMessage, openWindow, pinia, refreshAccessTokenKey, removeDuplicate, request2, service, setIntroduction, setupI18n, showFileUrl, signatureByKSort, tansParams, urlToBase64, useApi, useBaseApi, useChangeColor, useDateTimeShortCust, useKeepALiveNames, useLoginApi, useRequestOldRoutes, useRoutesList, useSysApi, useTagsViewRoutes, useThemeConfig, useUserInfo, useVxeTable, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl, version };
|
|
55446
|
+
export { AccountTypeEnum, AppItem, FmAutocomplete, FmDragImg, FmLogin, FmMoreChoose, FmNoticeBar, FmQueryCondition, FmRenderCol, FmRenderComp, FmSelectTable, FmTransfer, FmTree, Fmdatepicker, Fminputdropdown, Fmselect, HttpMethodEnum, JobCreateTypeEnum, Local, NextLoading, PUB, Session, Watermark, accessTokenKey, auth, authAll, auths, axiosInstance, base64ToFile, blobToFile, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, clone, commonFunction, commonFunctionObj, dataURLtoBlob, decryptJWT, installer as default, directive, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, elSvg, emitter, feature, fileToBase64, formatAxis, formatDate, formatPast, getAppItemData, getAppItemText, getBdate, getCountryCode, getEdate, getFileName, getFileUrl, getJWTDate, getToken, getWeek, hAuth, hAuthAll, hAuths, i18n, install, isObjectValueEqual, iso_3166_1_CountryList, judgementIdCard, judgementSameArr, languageList, mergMessage, openWindow, pinia, refreshAccessTokenKey, removeDuplicate, request2, service, setIntroduction, setupI18n, showFileUrl, signatureByKSort, tansParams, urlToBase64, useApi, useBaseApi, useChangeColor, useDateTimeShortCust, useKeepALiveNames, useLoginApi, useRequestOldRoutes, useRoutesList, useSysApi, useTagsViewRoutes, useThemeConfig, useUserInfo, useVxeTable, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl, version };
|