ljs-tools 0.2.7 → 0.2.9
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/index.css +1 -1
- package/index.js +233 -80
- package/index.umd.cjs +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -448,14 +448,24 @@ const LJSfc = {
|
|
|
448
448
|
pickerOptions,
|
|
449
449
|
pickerOptionsDynamic
|
|
450
450
|
};
|
|
451
|
-
function pieChange(data,
|
|
451
|
+
function pieChange(data, o = {
|
|
452
|
+
name: "name",
|
|
453
|
+
key: "val"
|
|
454
|
+
}) {
|
|
452
455
|
if (data.length === 0) {
|
|
453
456
|
return data;
|
|
454
457
|
}
|
|
458
|
+
const opt = {
|
|
459
|
+
name: "name",
|
|
460
|
+
key: "val"
|
|
461
|
+
};
|
|
462
|
+
for (let key in o) {
|
|
463
|
+
opt[key] = o[key];
|
|
464
|
+
}
|
|
455
465
|
let total = 0;
|
|
456
466
|
data.forEach((item) => {
|
|
457
467
|
item.proportion = 0;
|
|
458
|
-
total += Number(item[key]);
|
|
468
|
+
total += Number(item[opt.key]);
|
|
459
469
|
});
|
|
460
470
|
if (total > 0) {
|
|
461
471
|
let max = {
|
|
@@ -463,8 +473,8 @@ function pieChange(data, key = "val") {
|
|
|
463
473
|
index: -1
|
|
464
474
|
};
|
|
465
475
|
data.forEach((item, i) => {
|
|
466
|
-
item[key] = item[key] == 0 ? null : item[key];
|
|
467
|
-
const proportion = LJSnum.numberChangeDecimal(Number(item[key]) / total * 100);
|
|
476
|
+
item[opt.key] = item[opt.key] == 0 ? null : item[opt.key];
|
|
477
|
+
const proportion = LJSnum.numberChangeDecimal(Number(item[opt.key]) / total * 100);
|
|
468
478
|
const realProportion = Number(proportion);
|
|
469
479
|
if (Number(max.value) < realProportion) {
|
|
470
480
|
max = {
|
|
@@ -472,7 +482,7 @@ function pieChange(data, key = "val") {
|
|
|
472
482
|
index: i
|
|
473
483
|
};
|
|
474
484
|
}
|
|
475
|
-
item.proportion = realProportion === 0 && Number(item[key]) > 0 ? 0.01 : realProportion;
|
|
485
|
+
item.proportion = realProportion === 0 && Number(item[opt.key]) > 0 ? 0.01 : realProportion;
|
|
476
486
|
});
|
|
477
487
|
data[max.index].proportion = 100;
|
|
478
488
|
data.forEach((item, i) => {
|
|
@@ -484,8 +494,8 @@ function pieChange(data, key = "val") {
|
|
|
484
494
|
const newData = [];
|
|
485
495
|
data.forEach((item) => {
|
|
486
496
|
newData.push({
|
|
487
|
-
name: item.name,
|
|
488
|
-
value: item[key],
|
|
497
|
+
name: item[opt.name],
|
|
498
|
+
value: item[opt.key],
|
|
489
499
|
proportion: item.proportion + "%"
|
|
490
500
|
});
|
|
491
501
|
});
|
|
@@ -9277,7 +9287,7 @@ const __default__$3 = defineComponent({
|
|
|
9277
9287
|
name: "ElIcon",
|
|
9278
9288
|
inheritAttrs: false
|
|
9279
9289
|
});
|
|
9280
|
-
const _sfc_main$
|
|
9290
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
9281
9291
|
...__default__$3,
|
|
9282
9292
|
props: iconProps,
|
|
9283
9293
|
setup(__props) {
|
|
@@ -9302,7 +9312,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
9302
9312
|
};
|
|
9303
9313
|
}
|
|
9304
9314
|
});
|
|
9305
|
-
var Icon = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
9315
|
+
var Icon = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);
|
|
9306
9316
|
const ElIcon = withInstall(Icon);
|
|
9307
9317
|
const formContextKey = Symbol("formContextKey");
|
|
9308
9318
|
const formItemContextKey = Symbol("formItemContextKey");
|
|
@@ -9546,14 +9556,14 @@ const inputEmits = {
|
|
|
9546
9556
|
compositionupdate: (evt) => evt instanceof CompositionEvent,
|
|
9547
9557
|
compositionend: (evt) => evt instanceof CompositionEvent
|
|
9548
9558
|
};
|
|
9549
|
-
const _hoisted_1$
|
|
9559
|
+
const _hoisted_1$8 = ["role"];
|
|
9550
9560
|
const _hoisted_2$6 = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus"];
|
|
9551
9561
|
const _hoisted_3$4 = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus"];
|
|
9552
9562
|
const __default__$2 = defineComponent({
|
|
9553
9563
|
name: "ElInput",
|
|
9554
9564
|
inheritAttrs: false
|
|
9555
9565
|
});
|
|
9556
|
-
const _sfc_main$
|
|
9566
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
9557
9567
|
...__default__$2,
|
|
9558
9568
|
props: inputProps,
|
|
9559
9569
|
emits: inputEmits,
|
|
@@ -9973,13 +9983,13 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
9973
9983
|
class: normalizeClass(unref(nsInput).e("count"))
|
|
9974
9984
|
}, toDisplayString(unref(textLength)) + " / " + toDisplayString(unref(attrs).maxlength), 7)) : createCommentVNode("v-if", true)
|
|
9975
9985
|
], 64))
|
|
9976
|
-
], 16, _hoisted_1$
|
|
9986
|
+
], 16, _hoisted_1$8)), [
|
|
9977
9987
|
[vShow, _ctx.type !== "hidden"]
|
|
9978
9988
|
]);
|
|
9979
9989
|
};
|
|
9980
9990
|
}
|
|
9981
9991
|
});
|
|
9982
|
-
var Input = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
9992
|
+
var Input = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/input/src/input.vue"]]);
|
|
9983
9993
|
const ElInput = withInstall(Input);
|
|
9984
9994
|
const FOCUS_AFTER_TRAPPED = "focus-trap.focus-after-trapped";
|
|
9985
9995
|
const FOCUS_AFTER_RELEASED = "focus-trap.focus-after-released";
|
|
@@ -10129,7 +10139,7 @@ const createFocusOutPreventedEvent = (detail) => {
|
|
|
10129
10139
|
detail
|
|
10130
10140
|
});
|
|
10131
10141
|
};
|
|
10132
|
-
const _sfc_main$
|
|
10142
|
+
const _sfc_main$b = defineComponent({
|
|
10133
10143
|
name: "ElFocusTrap",
|
|
10134
10144
|
inheritAttrs: false,
|
|
10135
10145
|
props: {
|
|
@@ -10365,10 +10375,10 @@ const _sfc_main$a = defineComponent({
|
|
|
10365
10375
|
};
|
|
10366
10376
|
}
|
|
10367
10377
|
});
|
|
10368
|
-
function _sfc_render$
|
|
10378
|
+
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
10369
10379
|
return renderSlot(_ctx.$slots, "default", { handleKeydown: _ctx.onKeydown });
|
|
10370
10380
|
}
|
|
10371
|
-
var ElFocusTrap = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
10381
|
+
var ElFocusTrap = /* @__PURE__ */ _export_sfc$1(_sfc_main$b, [["render", _sfc_render$9], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/focus-trap/src/focus-trap.vue"]]);
|
|
10372
10382
|
const buttonGroupContextKey = Symbol("buttonGroupContextKey");
|
|
10373
10383
|
const useButton = (props, emit) => {
|
|
10374
10384
|
useDeprecated({
|
|
@@ -11421,7 +11431,7 @@ function useButtonCustomStyle(props) {
|
|
|
11421
11431
|
const __default__$1 = defineComponent({
|
|
11422
11432
|
name: "ElButton"
|
|
11423
11433
|
});
|
|
11424
|
-
const _sfc_main$
|
|
11434
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
11425
11435
|
...__default__$1,
|
|
11426
11436
|
props: buttonProps,
|
|
11427
11437
|
emits: buttonEmits,
|
|
@@ -11487,7 +11497,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
11487
11497
|
};
|
|
11488
11498
|
}
|
|
11489
11499
|
});
|
|
11490
|
-
var Button = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
11500
|
+
var Button = /* @__PURE__ */ _export_sfc$1(_sfc_main$a, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);
|
|
11491
11501
|
const buttonGroupProps = {
|
|
11492
11502
|
size: buttonProps.size,
|
|
11493
11503
|
type: buttonProps.type
|
|
@@ -11495,7 +11505,7 @@ const buttonGroupProps = {
|
|
|
11495
11505
|
const __default__ = defineComponent({
|
|
11496
11506
|
name: "ElButtonGroup"
|
|
11497
11507
|
});
|
|
11498
|
-
const _sfc_main$
|
|
11508
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
11499
11509
|
...__default__,
|
|
11500
11510
|
props: buttonGroupProps,
|
|
11501
11511
|
setup(__props) {
|
|
@@ -11514,7 +11524,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
11514
11524
|
};
|
|
11515
11525
|
}
|
|
11516
11526
|
});
|
|
11517
|
-
var ButtonGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
11527
|
+
var ButtonGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);
|
|
11518
11528
|
const ElButton = withInstall(Button, {
|
|
11519
11529
|
ButtonGroup
|
|
11520
11530
|
});
|
|
@@ -11631,7 +11641,7 @@ var Overlay = defineComponent({
|
|
|
11631
11641
|
}
|
|
11632
11642
|
});
|
|
11633
11643
|
const ElOverlay = Overlay;
|
|
11634
|
-
const _sfc_main$
|
|
11644
|
+
const _sfc_main$8 = defineComponent({
|
|
11635
11645
|
name: "ElMessageBox",
|
|
11636
11646
|
directives: {
|
|
11637
11647
|
TrapFocus
|
|
@@ -11900,10 +11910,10 @@ const _sfc_main$7 = defineComponent({
|
|
|
11900
11910
|
};
|
|
11901
11911
|
}
|
|
11902
11912
|
});
|
|
11903
|
-
const _hoisted_1$
|
|
11913
|
+
const _hoisted_1$7 = ["aria-label", "aria-describedby"];
|
|
11904
11914
|
const _hoisted_2$5 = ["aria-label"];
|
|
11905
11915
|
const _hoisted_3$3 = ["id"];
|
|
11906
|
-
function _sfc_render$
|
|
11916
|
+
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11907
11917
|
const _component_el_icon = resolveComponent("el-icon");
|
|
11908
11918
|
const _component_close = resolveComponent("close");
|
|
11909
11919
|
const _component_el_input = resolveComponent("el-input");
|
|
@@ -12091,7 +12101,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12091
12101
|
]),
|
|
12092
12102
|
_: 3
|
|
12093
12103
|
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"])
|
|
12094
|
-
], 42, _hoisted_1$
|
|
12104
|
+
], 42, _hoisted_1$7)
|
|
12095
12105
|
]),
|
|
12096
12106
|
_: 3
|
|
12097
12107
|
}, 8, ["z-index", "overlay-class", "mask"]), [
|
|
@@ -12101,7 +12111,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12101
12111
|
_: 3
|
|
12102
12112
|
});
|
|
12103
12113
|
}
|
|
12104
|
-
var MessageBoxConstructor = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
12114
|
+
var MessageBoxConstructor = /* @__PURE__ */ _export_sfc$1(_sfc_main$8, [["render", _sfc_render$8], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue"]]);
|
|
12105
12115
|
const messageInstance = /* @__PURE__ */ new Map();
|
|
12106
12116
|
const getAppendToElement = (props) => {
|
|
12107
12117
|
let appendTo = document.body;
|
|
@@ -12267,7 +12277,7 @@ function delMessageBox({
|
|
|
12267
12277
|
const LJSEl = {
|
|
12268
12278
|
delMessageBox
|
|
12269
12279
|
};
|
|
12270
|
-
const index$
|
|
12280
|
+
const index$3 = {
|
|
12271
12281
|
// emits: ['input', 'update:value'],
|
|
12272
12282
|
props: {
|
|
12273
12283
|
// 转速,单位秒
|
|
@@ -12310,13 +12320,13 @@ const _export_sfc = (sfc, props) => {
|
|
|
12310
12320
|
}
|
|
12311
12321
|
return target;
|
|
12312
12322
|
};
|
|
12313
|
-
const _sfc_main$
|
|
12314
|
-
const _withScopeId$
|
|
12315
|
-
const _hoisted_1$
|
|
12323
|
+
const _sfc_main$7 = index$3;
|
|
12324
|
+
const _withScopeId$2 = (n) => (pushScopeId("data-v-295da8be"), n = n(), popScopeId(), n);
|
|
12325
|
+
const _hoisted_1$6 = { class: "text" };
|
|
12316
12326
|
const _hoisted_2$4 = { class: "g-container" };
|
|
12317
|
-
const _hoisted_3$2 = /* @__PURE__ */ _withScopeId$
|
|
12327
|
+
const _hoisted_3$2 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("div", { class: "g-circle" }, null, -1));
|
|
12318
12328
|
const _hoisted_4 = { class: "g-bubbles" };
|
|
12319
|
-
function _sfc_render$
|
|
12329
|
+
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12320
12330
|
return openBlock(), createElementBlock("div", {
|
|
12321
12331
|
class: "ljs-loading",
|
|
12322
12332
|
id: "ljs-loading",
|
|
@@ -12328,7 +12338,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12328
12338
|
"--textcolor": _ctx.textColor
|
|
12329
12339
|
})
|
|
12330
12340
|
}, [
|
|
12331
|
-
createElementVNode("div", _hoisted_1$
|
|
12341
|
+
createElementVNode("div", _hoisted_1$6, [
|
|
12332
12342
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
12333
12343
|
]),
|
|
12334
12344
|
createElementVNode("div", _hoisted_2$4, [
|
|
@@ -12344,9 +12354,9 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12344
12354
|
])
|
|
12345
12355
|
], 4);
|
|
12346
12356
|
}
|
|
12347
|
-
const LJSLoading = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12357
|
+
const LJSLoading = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7], ["__scopeId", "data-v-295da8be"]]);
|
|
12348
12358
|
const pagination_vue_vue_type_style_index_0_scoped_fc144f23_lang = "";
|
|
12349
|
-
const _sfc_main$
|
|
12359
|
+
const _sfc_main$6 = {
|
|
12350
12360
|
name: "pagination",
|
|
12351
12361
|
props: {
|
|
12352
12362
|
total: {
|
|
@@ -12426,11 +12436,11 @@ const _sfc_main$5 = {
|
|
|
12426
12436
|
}
|
|
12427
12437
|
}
|
|
12428
12438
|
};
|
|
12429
|
-
const _hoisted_1$
|
|
12439
|
+
const _hoisted_1$5 = { class: "pagination" };
|
|
12430
12440
|
const _hoisted_2$3 = { class: "note" };
|
|
12431
|
-
function _sfc_render$
|
|
12441
|
+
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12432
12442
|
const _component_el_pagination = resolveComponent("el-pagination");
|
|
12433
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12443
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
12434
12444
|
createElementVNode("div", _hoisted_2$3, toDisplayString($props.note), 1),
|
|
12435
12445
|
createVNode(_component_el_pagination, mergeProps({
|
|
12436
12446
|
background: $props.background,
|
|
@@ -12448,8 +12458,8 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12448
12458
|
}), null, 16, ["background", "current-page", "page-size", "layout", "page-sizes", "pager-count", "total", "onSizeChange", "onCurrentChange"])
|
|
12449
12459
|
]);
|
|
12450
12460
|
}
|
|
12451
|
-
const Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12452
|
-
const index = {
|
|
12461
|
+
const Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-fc144f23"]]);
|
|
12462
|
+
const index$2 = {
|
|
12453
12463
|
name: "RightMenu",
|
|
12454
12464
|
props: {
|
|
12455
12465
|
modelValue: [Boolean],
|
|
@@ -12480,8 +12490,8 @@ const index = {
|
|
|
12480
12490
|
}
|
|
12481
12491
|
};
|
|
12482
12492
|
const index_vue_vue_type_style_index_0_scoped_a4322b42_lang = "";
|
|
12483
|
-
const _sfc_main$
|
|
12484
|
-
function _sfc_render$
|
|
12493
|
+
const _sfc_main$5 = index$2;
|
|
12494
|
+
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12485
12495
|
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
12486
12496
|
_ctx.modelValue ? (openBlock(), createElementBlock("div", {
|
|
12487
12497
|
key: 0,
|
|
@@ -12495,9 +12505,9 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12495
12505
|
], 6)) : createCommentVNode("", true)
|
|
12496
12506
|
]);
|
|
12497
12507
|
}
|
|
12498
|
-
const RightMenu = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12508
|
+
const RightMenu = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-a4322b42"]]);
|
|
12499
12509
|
const index_vue_vue_type_style_index_0_scoped_2c007365_lang = "";
|
|
12500
|
-
const _sfc_main$
|
|
12510
|
+
const _sfc_main$4 = {
|
|
12501
12511
|
name: "DatetypeChooseDate",
|
|
12502
12512
|
props: {
|
|
12503
12513
|
// 日期区间数据
|
|
@@ -12647,9 +12657,9 @@ const _sfc_main$3 = {
|
|
|
12647
12657
|
}
|
|
12648
12658
|
}
|
|
12649
12659
|
};
|
|
12650
|
-
const _hoisted_1$
|
|
12660
|
+
const _hoisted_1$4 = ["onClick"];
|
|
12651
12661
|
const _hoisted_2$2 = { class: "frequencyDate" };
|
|
12652
|
-
function _sfc_render$
|
|
12662
|
+
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12653
12663
|
const _component_el_date_picker = resolveComponent("el-date-picker");
|
|
12654
12664
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
12655
12665
|
return openBlock(), createBlock(_component_el_form_item, {
|
|
@@ -12668,7 +12678,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12668
12678
|
class: normalizeClass(["one", { active: $options.dateType === dict.dictValue }]),
|
|
12669
12679
|
onClick: ($event) => $options.dateTypeF(dict.dictValue),
|
|
12670
12680
|
key: dict.dictValue
|
|
12671
|
-
}, toDisplayString(dict.dictLabel), 11, _hoisted_1$
|
|
12681
|
+
}, toDisplayString(dict.dictLabel), 11, _hoisted_1$4);
|
|
12672
12682
|
}), 128))
|
|
12673
12683
|
], 4),
|
|
12674
12684
|
createVNode(Transition, { name: "frequencyDate" }, {
|
|
@@ -12693,9 +12703,8 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12693
12703
|
_: 1
|
|
12694
12704
|
}, 8, ["label"]);
|
|
12695
12705
|
}
|
|
12696
|
-
const DatetypeChooseDate = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12697
|
-
const
|
|
12698
|
-
const _sfc_main$2 = {
|
|
12706
|
+
const DatetypeChooseDate = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4], ["__scopeId", "data-v-2c007365"]]);
|
|
12707
|
+
const index$1 = {
|
|
12699
12708
|
name: "DatetypeChooseDateRange",
|
|
12700
12709
|
props: {
|
|
12701
12710
|
// 日期区间数据
|
|
@@ -12839,7 +12848,9 @@ const _sfc_main$2 = {
|
|
|
12839
12848
|
}
|
|
12840
12849
|
}
|
|
12841
12850
|
};
|
|
12842
|
-
const
|
|
12851
|
+
const index_vue_vue_type_style_index_0_scoped_df1ad931_lang = "";
|
|
12852
|
+
const _sfc_main$3 = index$1;
|
|
12853
|
+
const _hoisted_1$3 = ["onClick"];
|
|
12843
12854
|
const _hoisted_2$1 = {
|
|
12844
12855
|
key: 0,
|
|
12845
12856
|
class: "frequencyDate"
|
|
@@ -12848,69 +12859,69 @@ const _hoisted_3$1 = {
|
|
|
12848
12859
|
key: 2,
|
|
12849
12860
|
class: "zhi"
|
|
12850
12861
|
};
|
|
12851
|
-
function _sfc_render$
|
|
12862
|
+
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12852
12863
|
const _component_el_date_picker = resolveComponent("el-date-picker");
|
|
12853
12864
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
12854
12865
|
return openBlock(), createBlock(_component_el_form_item, {
|
|
12855
|
-
label:
|
|
12866
|
+
label: _ctx.formItemLabel,
|
|
12856
12867
|
prop: "date"
|
|
12857
12868
|
}, {
|
|
12858
12869
|
default: withCtx(() => [
|
|
12859
12870
|
createElementVNode("div", {
|
|
12860
12871
|
class: "frequency",
|
|
12861
12872
|
style: normalizeStyle({
|
|
12862
|
-
"--dateTypeNum":
|
|
12873
|
+
"--dateTypeNum": _ctx.date_type.length
|
|
12863
12874
|
})
|
|
12864
12875
|
}, [
|
|
12865
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
12876
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.date_type, (dict) => {
|
|
12866
12877
|
return openBlock(), createElementBlock("div", {
|
|
12867
|
-
class: normalizeClass(["one", { active:
|
|
12868
|
-
onClick: ($event) =>
|
|
12878
|
+
class: normalizeClass(["one", { active: _ctx.dateType === dict.dictValue }]),
|
|
12879
|
+
onClick: ($event) => _ctx.dateTypeF(dict.dictValue),
|
|
12869
12880
|
key: dict.dictValue
|
|
12870
|
-
}, toDisplayString(dict.dictLabel), 11, _hoisted_1$
|
|
12881
|
+
}, toDisplayString(dict.dictLabel), 11, _hoisted_1$3);
|
|
12871
12882
|
}), 128))
|
|
12872
12883
|
], 4),
|
|
12873
12884
|
createVNode(Transition, { name: "frequencyDate" }, {
|
|
12874
12885
|
default: withCtx(() => [
|
|
12875
|
-
|
|
12876
|
-
|
|
12886
|
+
_ctx.opts.dateTypeTag ? (openBlock(), createElementBlock("div", _hoisted_2$1, [
|
|
12887
|
+
_ctx.opts.dateType !== "year" ? (openBlock(), createBlock(_component_el_date_picker, {
|
|
12877
12888
|
key: 0,
|
|
12878
|
-
modelValue:
|
|
12879
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) =>
|
|
12889
|
+
modelValue: _ctx.dateValue,
|
|
12890
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.dateValue = $event),
|
|
12880
12891
|
style: { "width": "240px" },
|
|
12881
|
-
"value-format":
|
|
12882
|
-
type:
|
|
12892
|
+
"value-format": _ctx.opts.valueFormat,
|
|
12893
|
+
type: _ctx.opts.dateType,
|
|
12883
12894
|
placeholder: "请选择",
|
|
12884
12895
|
editable: false,
|
|
12885
12896
|
clearable: false,
|
|
12886
|
-
"disabled-date":
|
|
12897
|
+
"disabled-date": _ctx.LJSfc.pickerOptions()
|
|
12887
12898
|
}, null, 8, ["modelValue", "value-format", "type", "disabled-date"])) : createCommentVNode("", true),
|
|
12888
|
-
|
|
12899
|
+
_ctx.opts.dateType === "year" ? (openBlock(), createBlock(_component_el_date_picker, {
|
|
12889
12900
|
key: 1,
|
|
12890
|
-
modelValue:
|
|
12891
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) =>
|
|
12901
|
+
modelValue: _ctx.dateValue[0],
|
|
12902
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.dateValue[0] = $event),
|
|
12892
12903
|
style: { "width": "100px !important" },
|
|
12893
|
-
"value-format":
|
|
12894
|
-
type:
|
|
12904
|
+
"value-format": _ctx.opts.valueFormat,
|
|
12905
|
+
type: _ctx.opts.dateType,
|
|
12895
12906
|
placeholder: "请选择",
|
|
12896
12907
|
editable: false,
|
|
12897
12908
|
clearable: false,
|
|
12898
|
-
"disabled-date":
|
|
12899
|
-
onChange:
|
|
12909
|
+
"disabled-date": _ctx.LJSfc.pickerOptions(),
|
|
12910
|
+
onChange: _ctx.yearChange
|
|
12900
12911
|
}, null, 8, ["modelValue", "value-format", "type", "disabled-date", "onChange"])) : createCommentVNode("", true),
|
|
12901
|
-
|
|
12902
|
-
|
|
12912
|
+
_ctx.opts.dateType === "year" ? (openBlock(), createElementBlock("span", _hoisted_3$1, "~")) : createCommentVNode("", true),
|
|
12913
|
+
_ctx.opts.dateType === "year" ? (openBlock(), createBlock(_component_el_date_picker, {
|
|
12903
12914
|
key: 3,
|
|
12904
|
-
modelValue:
|
|
12905
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) =>
|
|
12915
|
+
modelValue: _ctx.dateValue[1],
|
|
12916
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.dateValue[1] = $event),
|
|
12906
12917
|
style: { "width": "100px !important" },
|
|
12907
|
-
"value-format":
|
|
12908
|
-
type:
|
|
12918
|
+
"value-format": _ctx.opts.valueFormat,
|
|
12919
|
+
type: _ctx.opts.dateType,
|
|
12909
12920
|
placeholder: "请选择",
|
|
12910
12921
|
editable: false,
|
|
12911
12922
|
clearable: false,
|
|
12912
|
-
"disabled-date":
|
|
12913
|
-
onChange:
|
|
12923
|
+
"disabled-date": _ctx.LJSfc.pickerOptions(),
|
|
12924
|
+
onChange: _ctx.yearChange
|
|
12914
12925
|
}, null, 8, ["modelValue", "value-format", "type", "disabled-date", "onChange"])) : createCommentVNode("", true)
|
|
12915
12926
|
])) : createCommentVNode("", true)
|
|
12916
12927
|
]),
|
|
@@ -12920,7 +12931,147 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
12920
12931
|
_: 1
|
|
12921
12932
|
}, 8, ["label"]);
|
|
12922
12933
|
}
|
|
12923
|
-
const DatetypeChooseDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
12934
|
+
const DatetypeChooseDateRange = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-df1ad931"]]);
|
|
12935
|
+
const index = {
|
|
12936
|
+
name: "DatetypeChooseDateRange",
|
|
12937
|
+
props: {
|
|
12938
|
+
// 日期区间数据
|
|
12939
|
+
modelValue: Array,
|
|
12940
|
+
// 日期类型
|
|
12941
|
+
dateType: {
|
|
12942
|
+
type: String,
|
|
12943
|
+
default: "date"
|
|
12944
|
+
},
|
|
12945
|
+
// 默认类型,默认值:日。字典value
|
|
12946
|
+
formItemLabel: {
|
|
12947
|
+
type: String,
|
|
12948
|
+
default: "日期区间"
|
|
12949
|
+
},
|
|
12950
|
+
// 清除按钮
|
|
12951
|
+
clearable: {
|
|
12952
|
+
type: Boolean,
|
|
12953
|
+
default: true
|
|
12954
|
+
},
|
|
12955
|
+
disabledDate: {
|
|
12956
|
+
type: Function,
|
|
12957
|
+
default: () => {
|
|
12958
|
+
}
|
|
12959
|
+
}
|
|
12960
|
+
},
|
|
12961
|
+
data() {
|
|
12962
|
+
return {
|
|
12963
|
+
LJSfc,
|
|
12964
|
+
date_type: [],
|
|
12965
|
+
// 日期参数
|
|
12966
|
+
opts: {
|
|
12967
|
+
startDate: null,
|
|
12968
|
+
endDate: null,
|
|
12969
|
+
valueFormat: "YYYY-MM-DD"
|
|
12970
|
+
}
|
|
12971
|
+
};
|
|
12972
|
+
},
|
|
12973
|
+
watch: {
|
|
12974
|
+
modelValue: {
|
|
12975
|
+
handler(val) {
|
|
12976
|
+
if (!LJSbase.fieldCheck(this.modelValue) && this.modelValue.length === 2) {
|
|
12977
|
+
this.opts.startDate = this.modelValue[0];
|
|
12978
|
+
this.opts.endDate = this.modelValue[1];
|
|
12979
|
+
}
|
|
12980
|
+
},
|
|
12981
|
+
deep: true,
|
|
12982
|
+
immediate: true
|
|
12983
|
+
}
|
|
12984
|
+
},
|
|
12985
|
+
mounted() {
|
|
12986
|
+
this.init();
|
|
12987
|
+
},
|
|
12988
|
+
methods: {
|
|
12989
|
+
// 切换日期
|
|
12990
|
+
dateChange() {
|
|
12991
|
+
if (this.opts.startDate === null || this.opts.endDate === null) {
|
|
12992
|
+
return;
|
|
12993
|
+
}
|
|
12994
|
+
let start = this.opts.startDate;
|
|
12995
|
+
let end = this.opts.startDate;
|
|
12996
|
+
if (this.dateType !== "year") {
|
|
12997
|
+
start = new Date(this.opts.startDate).getTime();
|
|
12998
|
+
end = new Date(this.opts.endDate).getTime();
|
|
12999
|
+
}
|
|
13000
|
+
if (Number(start) > Number(end)) {
|
|
13001
|
+
const temp = this.opts.startDate;
|
|
13002
|
+
this.opts.startDate = this.opts.endDate;
|
|
13003
|
+
this.opts.endDate = temp;
|
|
13004
|
+
}
|
|
13005
|
+
this.$emit("update:modelValue", [this.opts.startDate, this.opts.endDate]);
|
|
13006
|
+
},
|
|
13007
|
+
init() {
|
|
13008
|
+
this.dateTypeF();
|
|
13009
|
+
},
|
|
13010
|
+
// 日期类型切换
|
|
13011
|
+
dateTypeF() {
|
|
13012
|
+
switch (this.dateType) {
|
|
13013
|
+
case "datetime":
|
|
13014
|
+
this.opts.valueFormat = "YYYY-MM-DD HH:mm:ss";
|
|
13015
|
+
break;
|
|
13016
|
+
case "date":
|
|
13017
|
+
this.opts.valueFormat = "YYYY-MM-DD";
|
|
13018
|
+
break;
|
|
13019
|
+
case "month":
|
|
13020
|
+
this.opts.valueFormat = "YYYY-MM";
|
|
13021
|
+
break;
|
|
13022
|
+
case "year":
|
|
13023
|
+
this.opts.valueFormat = "YYYY";
|
|
13024
|
+
break;
|
|
13025
|
+
}
|
|
13026
|
+
}
|
|
13027
|
+
}
|
|
13028
|
+
};
|
|
13029
|
+
const index_vue_vue_type_style_index_0_scoped_9216c7d9_lang = "";
|
|
13030
|
+
const _sfc_main$2 = index;
|
|
13031
|
+
const _withScopeId$1 = (n) => (pushScopeId("data-v-9216c7d9"), n = n(), popScopeId(), n);
|
|
13032
|
+
const _hoisted_1$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("span", { class: "and" }, "~", -1));
|
|
13033
|
+
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
13034
|
+
const _component_el_date_picker = resolveComponent("el-date-picker");
|
|
13035
|
+
const _component_el_form_item = resolveComponent("el-form-item");
|
|
13036
|
+
return openBlock(), createBlock(_component_el_form_item, {
|
|
13037
|
+
label: _ctx.formItemLabel,
|
|
13038
|
+
prop: "date"
|
|
13039
|
+
}, {
|
|
13040
|
+
default: withCtx(() => [
|
|
13041
|
+
createVNode(_component_el_date_picker, {
|
|
13042
|
+
modelValue: _ctx.opts.startDate,
|
|
13043
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.opts.startDate = $event),
|
|
13044
|
+
style: normalizeStyle({
|
|
13045
|
+
width: `${_ctx.dateType === "year" ? 100 : _ctx.dateType === "month" ? 120 : _ctx.dateType === "date" ? 140 : _ctx.dateType === "datetime" ? 200 : 200}px !important`
|
|
13046
|
+
}),
|
|
13047
|
+
"value-format": _ctx.opts.valueFormat,
|
|
13048
|
+
type: _ctx.dateType,
|
|
13049
|
+
placeholder: "开始日期",
|
|
13050
|
+
editable: false,
|
|
13051
|
+
clearable: _ctx.clearable,
|
|
13052
|
+
"disabled-date": _ctx.disabledDate,
|
|
13053
|
+
onChange: _ctx.dateChange
|
|
13054
|
+
}, null, 8, ["modelValue", "style", "value-format", "type", "clearable", "disabled-date", "onChange"]),
|
|
13055
|
+
_hoisted_1$2,
|
|
13056
|
+
createVNode(_component_el_date_picker, {
|
|
13057
|
+
modelValue: _ctx.opts.endDate,
|
|
13058
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.opts.endDate = $event),
|
|
13059
|
+
style: normalizeStyle({
|
|
13060
|
+
width: `${_ctx.dateType === "year" ? 100 : _ctx.dateType === "month" ? 120 : _ctx.dateType === "date" ? 140 : _ctx.dateType === "datetime" ? 200 : 200}px !important`
|
|
13061
|
+
}),
|
|
13062
|
+
"value-format": _ctx.opts.valueFormat,
|
|
13063
|
+
type: _ctx.dateType,
|
|
13064
|
+
placeholder: "结束日期",
|
|
13065
|
+
editable: false,
|
|
13066
|
+
clearable: _ctx.clearable,
|
|
13067
|
+
"disabled-date": _ctx.disabledDate,
|
|
13068
|
+
onChange: _ctx.dateChange
|
|
13069
|
+
}, null, 8, ["modelValue", "style", "value-format", "type", "clearable", "disabled-date", "onChange"])
|
|
13070
|
+
]),
|
|
13071
|
+
_: 1
|
|
13072
|
+
}, 8, ["label"]);
|
|
13073
|
+
}
|
|
13074
|
+
const DateRange = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-9216c7d9"]]);
|
|
12924
13075
|
const index_vue_vue_type_style_index_0_scoped_f2de2f23_lang = "";
|
|
12925
13076
|
const _sfc_main$1 = {
|
|
12926
13077
|
name: "DictTag",
|
|
@@ -14252,6 +14403,7 @@ const tools = [
|
|
|
14252
14403
|
{ type: "component", name: "RightMenu", entity: RightMenu },
|
|
14253
14404
|
{ type: "component", name: "DatetypeChooseDate", entity: DatetypeChooseDate },
|
|
14254
14405
|
{ type: "component", name: "DatetypeChooseDateRange", entity: DatetypeChooseDateRange },
|
|
14406
|
+
{ type: "component", name: "DateRange", entity: DateRange },
|
|
14255
14407
|
{ type: "component", name: "DictTag", entity: DictTag },
|
|
14256
14408
|
{ type: "component", name: "Particles", entity: Particles },
|
|
14257
14409
|
{ type: "other_function", name: "self", entity: self$1 }
|
|
@@ -14280,6 +14432,7 @@ const globals = {
|
|
|
14280
14432
|
RightMenu,
|
|
14281
14433
|
DatetypeChooseDate,
|
|
14282
14434
|
DatetypeChooseDateRange,
|
|
14435
|
+
DateRange,
|
|
14283
14436
|
DictTag,
|
|
14284
14437
|
Particles,
|
|
14285
14438
|
// 方法
|