sctj-components 1.0.48 → 1.0.50
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/lib/sctj-components.es.js +408 -59
- package/lib/sctj-components.umd.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
|
@@ -38,9 +38,9 @@ const _export_sfc = (sfc, props) => {
|
|
|
38
38
|
}
|
|
39
39
|
return target;
|
|
40
40
|
};
|
|
41
|
-
const _hoisted_1$
|
|
42
|
-
const _hoisted_2$
|
|
43
|
-
const _sfc_main$
|
|
41
|
+
const _hoisted_1$m = { class: "dict-tag-container" };
|
|
42
|
+
const _hoisted_2$d = ["index"];
|
|
43
|
+
const _sfc_main$u = {
|
|
44
44
|
__name: "index",
|
|
45
45
|
props: {
|
|
46
46
|
options: {
|
|
@@ -60,7 +60,7 @@ const _sfc_main$t = {
|
|
|
60
60
|
});
|
|
61
61
|
return (_ctx, _cache) => {
|
|
62
62
|
const _component_el_tag = resolveComponent("el-tag");
|
|
63
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
63
|
+
return openBlock(), createElementBlock("div", _hoisted_1$m, [
|
|
64
64
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item, index2) => {
|
|
65
65
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
66
66
|
unref(values).includes(item.value) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
@@ -68,7 +68,7 @@ const _sfc_main$t = {
|
|
|
68
68
|
key: item.value,
|
|
69
69
|
index: index2,
|
|
70
70
|
class: normalizeClass(item.elTagClass)
|
|
71
|
-
}, toDisplayString(item.label), 11, _hoisted_2$
|
|
71
|
+
}, toDisplayString(item.label), 11, _hoisted_2$d)) : (openBlock(), createBlock(_component_el_tag, {
|
|
72
72
|
"disable-transitions": true,
|
|
73
73
|
key: item.value + "",
|
|
74
74
|
index: index2,
|
|
@@ -87,10 +87,10 @@ const _sfc_main$t = {
|
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
|
-
const SCTJDictTag = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
90
|
+
const SCTJDictTag = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["__scopeId", "data-v-659e1d01"]]);
|
|
91
91
|
const index_vue_vue_type_style_index_0_scope_true_lang = "";
|
|
92
|
-
const _hoisted_1$
|
|
93
|
-
const _sfc_main$
|
|
92
|
+
const _hoisted_1$l = ["xlink:href", "fill"];
|
|
93
|
+
const _sfc_main$t = {
|
|
94
94
|
__name: "index",
|
|
95
95
|
props: {
|
|
96
96
|
iconClass: {
|
|
@@ -123,7 +123,7 @@ const _sfc_main$s = {
|
|
|
123
123
|
createElementVNode("use", {
|
|
124
124
|
"xlink:href": unref(iconName),
|
|
125
125
|
fill: __props.color
|
|
126
|
-
}, null, 8, _hoisted_1$
|
|
126
|
+
}, null, 8, _hoisted_1$l)
|
|
127
127
|
], 2);
|
|
128
128
|
};
|
|
129
129
|
}
|
|
@@ -132,14 +132,14 @@ const index$2 = "";
|
|
|
132
132
|
const index$1 = "";
|
|
133
133
|
const index_vue_vue_type_style_index_0_scoped_006fbc77_lang = "";
|
|
134
134
|
const index_vue_vue_type_style_index_1_lang = "";
|
|
135
|
-
const _hoisted_1$
|
|
136
|
-
const _hoisted_2$
|
|
135
|
+
const _hoisted_1$k = { class: "upload-file" };
|
|
136
|
+
const _hoisted_2$c = { class: "el-upload__tip" };
|
|
137
137
|
const _hoisted_3$9 = { style: { "color": "#f56c6c" } };
|
|
138
138
|
const _hoisted_4$7 = { style: { "color": "#f56c6c" } };
|
|
139
139
|
const _hoisted_5$6 = ["title"];
|
|
140
140
|
const _hoisted_6$3 = { class: "ele-upload-list__item-content-action" };
|
|
141
141
|
const _hoisted_7$3 = { style: { "width": "100%", "height": "100%", "overflow": "auto" } };
|
|
142
|
-
const _sfc_main$
|
|
142
|
+
const _sfc_main$s = {
|
|
143
143
|
__name: "index",
|
|
144
144
|
props: {
|
|
145
145
|
modelValue: [String, Object, Array],
|
|
@@ -371,7 +371,7 @@ const _sfc_main$r = {
|
|
|
371
371
|
const _component_el_icon = resolveComponent("el-icon");
|
|
372
372
|
const _component_el_image = resolveComponent("el-image");
|
|
373
373
|
const _component_el_dialog = resolveComponent("el-dialog");
|
|
374
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
374
|
+
return openBlock(), createElementBlock("div", _hoisted_1$k, [
|
|
375
375
|
!__props.disabled ? (openBlock(), createBlock(_component_el_upload, mergeProps({
|
|
376
376
|
key: 0,
|
|
377
377
|
multiple: "",
|
|
@@ -410,7 +410,7 @@ const _sfc_main$r = {
|
|
|
410
410
|
unref(showTip) ? {
|
|
411
411
|
name: "tip",
|
|
412
412
|
fn: withCtx(() => [
|
|
413
|
-
createElementVNode("div", _hoisted_2$
|
|
413
|
+
createElementVNode("div", _hoisted_2$c, [
|
|
414
414
|
createTextVNode(" \u8BF7\u4E0A\u4F20 "),
|
|
415
415
|
__props.fileSize ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
416
416
|
createTextVNode(" \u5927\u5C0F\u4E0D\u8D85\u8FC7 "),
|
|
@@ -517,17 +517,17 @@ const _sfc_main$r = {
|
|
|
517
517
|
};
|
|
518
518
|
}
|
|
519
519
|
};
|
|
520
|
-
const SCTJFileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
520
|
+
const SCTJFileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-006fbc77"]]);
|
|
521
521
|
const index_vue_vue_type_style_index_0_scoped_672e5149_lang = "";
|
|
522
|
-
const _hoisted_1$
|
|
523
|
-
const _hoisted_2$
|
|
522
|
+
const _hoisted_1$j = { class: "component-upload-image" };
|
|
523
|
+
const _hoisted_2$b = {
|
|
524
524
|
key: 0,
|
|
525
525
|
class: "el-upload__tip"
|
|
526
526
|
};
|
|
527
527
|
const _hoisted_3$8 = { style: { "color": "#f56c6c" } };
|
|
528
528
|
const _hoisted_4$6 = { style: { "color": "#f56c6c" } };
|
|
529
529
|
const _hoisted_5$5 = ["src"];
|
|
530
|
-
const _sfc_main$
|
|
530
|
+
const _sfc_main$r = {
|
|
531
531
|
__name: "index",
|
|
532
532
|
props: {
|
|
533
533
|
modelValue: {
|
|
@@ -728,7 +728,7 @@ const _sfc_main$q = {
|
|
|
728
728
|
const _component_el_icon = resolveComponent("el-icon");
|
|
729
729
|
const _component_el_upload = resolveComponent("el-upload");
|
|
730
730
|
const _component_el_dialog = resolveComponent("el-dialog");
|
|
731
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
731
|
+
return openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
732
732
|
createVNode(_component_el_upload, mergeProps({
|
|
733
733
|
disabled: props.disabled,
|
|
734
734
|
multiple: "",
|
|
@@ -760,7 +760,7 @@ const _sfc_main$q = {
|
|
|
760
760
|
]),
|
|
761
761
|
_: 1
|
|
762
762
|
}, 16, ["disabled", "action", "limit", "http-request", "headers", "file-list", "drag", "class"]),
|
|
763
|
-
unref(showTip) ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
763
|
+
unref(showTip) ? (openBlock(), createElementBlock("div", _hoisted_2$b, [
|
|
764
764
|
createTextVNode(" \u8BF7\u4E0A\u4F20 "),
|
|
765
765
|
props.fileSize ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
766
766
|
createTextVNode(" \u5927\u5C0F\u4E0D\u8D85\u8FC7 "),
|
|
@@ -791,10 +791,10 @@ const _sfc_main$q = {
|
|
|
791
791
|
};
|
|
792
792
|
}
|
|
793
793
|
};
|
|
794
|
-
const SCTJImageUpload = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
794
|
+
const SCTJImageUpload = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-672e5149"]]);
|
|
795
795
|
const index_vue_vue_type_style_index_0_scoped_e91fd2ba_lang = "";
|
|
796
|
-
const _hoisted_1$
|
|
797
|
-
const _sfc_main$
|
|
796
|
+
const _hoisted_1$i = { class: "image-slot" };
|
|
797
|
+
const _sfc_main$q = {
|
|
798
798
|
__name: "index",
|
|
799
799
|
props: {
|
|
800
800
|
enableDelete: {
|
|
@@ -908,7 +908,7 @@ const _sfc_main$p = {
|
|
|
908
908
|
"preview-src-list": unref(realSrcList)
|
|
909
909
|
}, {
|
|
910
910
|
error: withCtx(() => [
|
|
911
|
-
createElementVNode("div", _hoisted_1$
|
|
911
|
+
createElementVNode("div", _hoisted_1$i, [
|
|
912
912
|
createVNode(_component_el_icon, { class: "el-icon-picture-outline" }, {
|
|
913
913
|
default: withCtx(() => [
|
|
914
914
|
createVNode(unref(Picture))
|
|
@@ -925,7 +925,7 @@ const _sfc_main$p = {
|
|
|
925
925
|
};
|
|
926
926
|
}
|
|
927
927
|
};
|
|
928
|
-
const SCTJImagePreview = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
928
|
+
const SCTJImagePreview = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-e91fd2ba"]]);
|
|
929
929
|
const icons = [
|
|
930
930
|
"404",
|
|
931
931
|
"asset",
|
|
@@ -1017,10 +1017,10 @@ const icons = [
|
|
|
1017
1017
|
"zip"
|
|
1018
1018
|
];
|
|
1019
1019
|
const index_vue_vue_type_style_index_0_scoped_37029e19_lang = "";
|
|
1020
|
-
const _hoisted_1$
|
|
1021
|
-
const _hoisted_2$
|
|
1020
|
+
const _hoisted_1$h = { class: "icon-content" };
|
|
1021
|
+
const _hoisted_2$a = { class: "icon-list" };
|
|
1022
1022
|
const _hoisted_3$7 = ["onClick"];
|
|
1023
|
-
const _sfc_main$
|
|
1023
|
+
const _sfc_main$p = {
|
|
1024
1024
|
__name: "index",
|
|
1025
1025
|
props: {
|
|
1026
1026
|
modelValue: {
|
|
@@ -1111,12 +1111,12 @@ const _sfc_main$o = {
|
|
|
1111
1111
|
unref(iconName) ? {
|
|
1112
1112
|
name: "prefix",
|
|
1113
1113
|
fn: withCtx(() => [
|
|
1114
|
-
createVNode(_sfc_main$
|
|
1114
|
+
createVNode(_sfc_main$t, { "icon-class": unref(iconName) }, null, 8, ["icon-class"])
|
|
1115
1115
|
]),
|
|
1116
1116
|
key: "0"
|
|
1117
1117
|
} : void 0
|
|
1118
1118
|
]), 1032, ["modelValue"]),
|
|
1119
|
-
withDirectives(createElementVNode("div", _hoisted_1$
|
|
1119
|
+
withDirectives(createElementVNode("div", _hoisted_1$h, [
|
|
1120
1120
|
createElementVNode("div", null, [
|
|
1121
1121
|
createVNode(_component_el_input, {
|
|
1122
1122
|
modelValue: keyWord.value,
|
|
@@ -1138,13 +1138,13 @@ const _sfc_main$o = {
|
|
|
1138
1138
|
_: 1
|
|
1139
1139
|
}, 8, ["modelValue"])
|
|
1140
1140
|
]),
|
|
1141
|
-
createElementVNode("div", _hoisted_2$
|
|
1141
|
+
createElementVNode("div", _hoisted_2$a, [
|
|
1142
1142
|
(openBlock(true), createElementBlock(Fragment, null, renderList(iconList.value, (item, index2) => {
|
|
1143
1143
|
return openBlock(), createElementBlock("div", {
|
|
1144
1144
|
key: index2,
|
|
1145
1145
|
onClick: ($event) => selectedIcon(item)
|
|
1146
1146
|
}, [
|
|
1147
|
-
createVNode(_sfc_main$
|
|
1147
|
+
createVNode(_sfc_main$t, {
|
|
1148
1148
|
"icon-class": item,
|
|
1149
1149
|
style: { "height": "30px", "width": "16px", "flex-shrink": "0" }
|
|
1150
1150
|
}, null, 8, ["icon-class"]),
|
|
@@ -1159,7 +1159,7 @@ const _sfc_main$o = {
|
|
|
1159
1159
|
};
|
|
1160
1160
|
}
|
|
1161
1161
|
};
|
|
1162
|
-
const SCTJIconSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1162
|
+
const SCTJIconSelect = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["__scopeId", "data-v-37029e19"]]);
|
|
1163
1163
|
function useMobile() {
|
|
1164
1164
|
const isMobile = ref$1(false);
|
|
1165
1165
|
const checkIsMobile = () => {
|
|
@@ -1186,7 +1186,7 @@ function useMobile() {
|
|
|
1186
1186
|
checkIsMobile
|
|
1187
1187
|
};
|
|
1188
1188
|
}
|
|
1189
|
-
const _sfc_main$
|
|
1189
|
+
const _sfc_main$o = {
|
|
1190
1190
|
__name: "index",
|
|
1191
1191
|
props: {
|
|
1192
1192
|
modelValue: {
|
|
@@ -1291,8 +1291,8 @@ const _sfc_main$n = {
|
|
|
1291
1291
|
}
|
|
1292
1292
|
};
|
|
1293
1293
|
const index_vue_vue_type_style_index_0_scoped_a2fe1763_lang = "";
|
|
1294
|
-
const _hoisted_1$
|
|
1295
|
-
const _sfc_main$
|
|
1294
|
+
const _hoisted_1$g = { class: "el-tree-select" };
|
|
1295
|
+
const _sfc_main$n = {
|
|
1296
1296
|
__name: "index",
|
|
1297
1297
|
props: {
|
|
1298
1298
|
objMap: {
|
|
@@ -1386,7 +1386,7 @@ const _sfc_main$m = {
|
|
|
1386
1386
|
const _component_el_tree = resolveComponent("el-tree");
|
|
1387
1387
|
const _component_el_option = resolveComponent("el-option");
|
|
1388
1388
|
const _component_el_select = resolveComponent("el-select");
|
|
1389
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1389
|
+
return openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
1390
1390
|
createVNode(_component_el_select, {
|
|
1391
1391
|
style: { "width": "100%" },
|
|
1392
1392
|
modelValue: unref(valueId),
|
|
@@ -1426,8 +1426,8 @@ const _sfc_main$m = {
|
|
|
1426
1426
|
};
|
|
1427
1427
|
}
|
|
1428
1428
|
};
|
|
1429
|
-
const SCTJTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1430
|
-
const _sfc_main$
|
|
1429
|
+
const SCTJTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-a2fe1763"]]);
|
|
1430
|
+
const _sfc_main$m = {
|
|
1431
1431
|
__name: "index",
|
|
1432
1432
|
props: {
|
|
1433
1433
|
modelValue: {
|
|
@@ -1491,7 +1491,7 @@ const _sfc_main$l = {
|
|
|
1491
1491
|
};
|
|
1492
1492
|
}
|
|
1493
1493
|
};
|
|
1494
|
-
const _sfc_main$
|
|
1494
|
+
const _sfc_main$l = {
|
|
1495
1495
|
__name: "index",
|
|
1496
1496
|
props: {
|
|
1497
1497
|
modelValue: {
|
|
@@ -1548,6 +1548,292 @@ const _sfc_main$k = {
|
|
|
1548
1548
|
};
|
|
1549
1549
|
}
|
|
1550
1550
|
};
|
|
1551
|
+
const index_vue_vue_type_style_index_0_scoped_a098c8b6_lang = "";
|
|
1552
|
+
const _hoisted_1$f = { class: "time-line-slider-container" };
|
|
1553
|
+
const _hoisted_2$9 = { class: "time-line-slider-wrapper" };
|
|
1554
|
+
const _sfc_main$k = {
|
|
1555
|
+
__name: "index",
|
|
1556
|
+
props: {
|
|
1557
|
+
timeConfig: {
|
|
1558
|
+
type: [Array, Object],
|
|
1559
|
+
default: () => ({
|
|
1560
|
+
startTime: "2025-01-13",
|
|
1561
|
+
endTime: "2025-06-18"
|
|
1562
|
+
})
|
|
1563
|
+
},
|
|
1564
|
+
modelValue: {
|
|
1565
|
+
type: [Number, String],
|
|
1566
|
+
default: void 0
|
|
1567
|
+
}
|
|
1568
|
+
},
|
|
1569
|
+
emits: ["update:modelValue"],
|
|
1570
|
+
setup(__props, { emit }) {
|
|
1571
|
+
const props = __props;
|
|
1572
|
+
const selectDate = computed$1({
|
|
1573
|
+
get() {
|
|
1574
|
+
return normalizeDate(props.modelValue);
|
|
1575
|
+
},
|
|
1576
|
+
set(value) {
|
|
1577
|
+
if (typeof props.modelValue === "string") {
|
|
1578
|
+
emit("update:modelValue", value);
|
|
1579
|
+
} else {
|
|
1580
|
+
const timestamp = dateStringToTimestamp(value);
|
|
1581
|
+
emit("update:modelValue", timestamp);
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
});
|
|
1585
|
+
const selectChange = async () => {
|
|
1586
|
+
await nextTick();
|
|
1587
|
+
setTimeout(() => {
|
|
1588
|
+
const sliderButton = document.querySelector(".el-slider__button-wrapper");
|
|
1589
|
+
if (sliderButton) {
|
|
1590
|
+
const scrollContainer = document.querySelector(".time-line-slider-wrapper");
|
|
1591
|
+
if (scrollContainer) {
|
|
1592
|
+
const buttonRect = sliderButton.getBoundingClientRect();
|
|
1593
|
+
const containerRect = scrollContainer.getBoundingClientRect();
|
|
1594
|
+
const scrollLeft = scrollContainer.scrollLeft + (buttonRect.left - containerRect.left) - containerRect.width / 2 + buttonRect.width / 2;
|
|
1595
|
+
scrollContainer.scrollTo({
|
|
1596
|
+
left: scrollLeft,
|
|
1597
|
+
behavior: "smooth"
|
|
1598
|
+
});
|
|
1599
|
+
} else {
|
|
1600
|
+
sliderButton.scrollIntoView({
|
|
1601
|
+
behavior: "smooth",
|
|
1602
|
+
block: "center",
|
|
1603
|
+
inline: "center"
|
|
1604
|
+
});
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
}, 100);
|
|
1608
|
+
};
|
|
1609
|
+
const generateDateRange = (startTime, endTime) => {
|
|
1610
|
+
let dates = [];
|
|
1611
|
+
let start = new Date(startTime);
|
|
1612
|
+
let end = new Date(endTime);
|
|
1613
|
+
if (isNaN(start.getTime()) || isNaN(end.getTime())) {
|
|
1614
|
+
return [];
|
|
1615
|
+
}
|
|
1616
|
+
start.setHours(0, 0, 0, 0);
|
|
1617
|
+
end.setHours(0, 0, 0, 0);
|
|
1618
|
+
if (start > end) {
|
|
1619
|
+
[start, end] = [end, start];
|
|
1620
|
+
}
|
|
1621
|
+
const currentDate = new Date(start);
|
|
1622
|
+
while (currentDate <= end) {
|
|
1623
|
+
const year = currentDate.getFullYear();
|
|
1624
|
+
const month = String(currentDate.getMonth() + 1).padStart(2, "0");
|
|
1625
|
+
const day = String(currentDate.getDate()).padStart(2, "0");
|
|
1626
|
+
dates.push(`${year}-${month}-${day}`);
|
|
1627
|
+
currentDate.setDate(currentDate.getDate() + 1);
|
|
1628
|
+
}
|
|
1629
|
+
return dates;
|
|
1630
|
+
};
|
|
1631
|
+
const timePoints = computed$1(() => {
|
|
1632
|
+
if (Array.isArray(props.timeConfig)) {
|
|
1633
|
+
return props.timeConfig;
|
|
1634
|
+
} else if (typeof props.timeConfig === "object" && props.timeConfig !== null) {
|
|
1635
|
+
if (props.timeConfig.startTime && props.timeConfig.endTime) {
|
|
1636
|
+
return generateDateRange(props.timeConfig.startTime, props.timeConfig.endTime);
|
|
1637
|
+
}
|
|
1638
|
+
if (Array.isArray(props.timeConfig.data)) {
|
|
1639
|
+
return props.timeConfig.data;
|
|
1640
|
+
} else if (Array.isArray(props.timeConfig.list)) {
|
|
1641
|
+
return props.timeConfig.list;
|
|
1642
|
+
} else {
|
|
1643
|
+
return Object.values(props.timeConfig);
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
return [];
|
|
1647
|
+
});
|
|
1648
|
+
const min = computed$1(() => 0);
|
|
1649
|
+
const max = computed$1(() => Math.max(0, timePoints.value.length - 1));
|
|
1650
|
+
const step = computed$1(() => 1);
|
|
1651
|
+
const sliderWidth = computed$1(() => {
|
|
1652
|
+
const pointCount = timePoints.value.length;
|
|
1653
|
+
if (pointCount === 0) {
|
|
1654
|
+
return "100%";
|
|
1655
|
+
}
|
|
1656
|
+
const minWidthPerPoint = 80;
|
|
1657
|
+
const minTotalWidth = 300;
|
|
1658
|
+
const maxTotalWidth = 12e3;
|
|
1659
|
+
const calculatedWidth = pointCount * minWidthPerPoint;
|
|
1660
|
+
const finalWidth = Math.max(minTotalWidth, Math.min(calculatedWidth, maxTotalWidth));
|
|
1661
|
+
return `${finalWidth}px`;
|
|
1662
|
+
});
|
|
1663
|
+
const marks = computed$1(() => {
|
|
1664
|
+
const marksObj = {};
|
|
1665
|
+
timePoints.value.forEach((point, index2) => {
|
|
1666
|
+
marksObj[index2] = formatTimeLabel(point);
|
|
1667
|
+
});
|
|
1668
|
+
return marksObj;
|
|
1669
|
+
});
|
|
1670
|
+
const formatTimeLabel = (time) => {
|
|
1671
|
+
if (typeof time === "string") {
|
|
1672
|
+
if (time.includes("T") || time.includes(" ")) {
|
|
1673
|
+
return time.split(" ")[0] || time.split("T")[0];
|
|
1674
|
+
}
|
|
1675
|
+
return time;
|
|
1676
|
+
} else if (typeof time === "number") {
|
|
1677
|
+
const date = new Date(time);
|
|
1678
|
+
return date.toLocaleDateString("zh-CN");
|
|
1679
|
+
} else if (time && typeof time === "object") {
|
|
1680
|
+
return time.label || time.name || time.value || String(time);
|
|
1681
|
+
}
|
|
1682
|
+
return String(time);
|
|
1683
|
+
};
|
|
1684
|
+
const formatTooltip = (val) => {
|
|
1685
|
+
const index2 = Math.round(val);
|
|
1686
|
+
if (index2 >= 0 && index2 < timePoints.value.length) {
|
|
1687
|
+
const point = timePoints.value[index2];
|
|
1688
|
+
return formatTimeLabel(point);
|
|
1689
|
+
}
|
|
1690
|
+
return String(val);
|
|
1691
|
+
};
|
|
1692
|
+
const dateStringToTimestamp = (dateStr) => {
|
|
1693
|
+
const cleanDateStr = dateStr.split("T")[0].split(" ")[0];
|
|
1694
|
+
const [year, month, day] = cleanDateStr.split("-").map(Number);
|
|
1695
|
+
const date = new Date(year, month - 1, day);
|
|
1696
|
+
return date.getTime();
|
|
1697
|
+
};
|
|
1698
|
+
const normalizeDate = (date) => {
|
|
1699
|
+
if (typeof date === "string") {
|
|
1700
|
+
return date.split("T")[0].split(" ")[0];
|
|
1701
|
+
} else if (typeof date === "number") {
|
|
1702
|
+
const d = new Date(date);
|
|
1703
|
+
const year = d.getFullYear();
|
|
1704
|
+
const month = String(d.getMonth() + 1).padStart(2, "0");
|
|
1705
|
+
const day = String(d.getDate()).padStart(2, "0");
|
|
1706
|
+
return `${year}-${month}-${day}`;
|
|
1707
|
+
}
|
|
1708
|
+
return String(date);
|
|
1709
|
+
};
|
|
1710
|
+
const getIndexFromModalValue = (modalValue) => {
|
|
1711
|
+
if (Number.isInteger(modalValue) && modalValue >= 0 && modalValue < timePoints.value.length) {
|
|
1712
|
+
return modalValue;
|
|
1713
|
+
}
|
|
1714
|
+
const modalDateStr = normalizeDate(modalValue);
|
|
1715
|
+
const index2 = timePoints.value.findIndex((point) => {
|
|
1716
|
+
const pointDateStr = normalizeDate(point);
|
|
1717
|
+
return pointDateStr === modalDateStr;
|
|
1718
|
+
});
|
|
1719
|
+
if (index2 !== -1) {
|
|
1720
|
+
return index2;
|
|
1721
|
+
}
|
|
1722
|
+
return 0;
|
|
1723
|
+
};
|
|
1724
|
+
const selectValue = ref$1(0);
|
|
1725
|
+
let lastEmittedValue = null;
|
|
1726
|
+
let modalValueType = null;
|
|
1727
|
+
const getValueFromIndex = (index2) => {
|
|
1728
|
+
if (index2 >= 0 && index2 < timePoints.value.length) {
|
|
1729
|
+
const point = timePoints.value[index2];
|
|
1730
|
+
if (modalValueType === "string") {
|
|
1731
|
+
if (typeof point === "string") {
|
|
1732
|
+
return point;
|
|
1733
|
+
} else if (typeof point === "number") {
|
|
1734
|
+
return normalizeDate(point);
|
|
1735
|
+
} else {
|
|
1736
|
+
return String(point);
|
|
1737
|
+
}
|
|
1738
|
+
} else {
|
|
1739
|
+
if (typeof point === "number") {
|
|
1740
|
+
return point;
|
|
1741
|
+
} else if (typeof point === "string") {
|
|
1742
|
+
const timestamp = dateStringToTimestamp(point);
|
|
1743
|
+
if (!isNaN(timestamp)) {
|
|
1744
|
+
return timestamp;
|
|
1745
|
+
} else {
|
|
1746
|
+
return index2;
|
|
1747
|
+
}
|
|
1748
|
+
} else {
|
|
1749
|
+
return index2;
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
return modalValueType === "string" ? "" : 0;
|
|
1754
|
+
};
|
|
1755
|
+
const updateSelectValueFromProps = () => {
|
|
1756
|
+
const value = props.modelValue;
|
|
1757
|
+
if (value === void 0) {
|
|
1758
|
+
selectValue.value = 0;
|
|
1759
|
+
return;
|
|
1760
|
+
}
|
|
1761
|
+
modalValueType = typeof value === "string" ? "string" : "number";
|
|
1762
|
+
const index2 = getIndexFromModalValue(value);
|
|
1763
|
+
if (selectValue.value !== index2) {
|
|
1764
|
+
selectValue.value = index2;
|
|
1765
|
+
}
|
|
1766
|
+
};
|
|
1767
|
+
updateSelectValueFromProps();
|
|
1768
|
+
watch(
|
|
1769
|
+
() => [props.modelValue, timePoints.value],
|
|
1770
|
+
() => {
|
|
1771
|
+
const value = props.modelValue;
|
|
1772
|
+
if (lastEmittedValue !== null) {
|
|
1773
|
+
if (value === lastEmittedValue) {
|
|
1774
|
+
lastEmittedValue = null;
|
|
1775
|
+
return;
|
|
1776
|
+
}
|
|
1777
|
+
const modalDateStr = normalizeDate(value);
|
|
1778
|
+
const emittedDateStr = normalizeDate(lastEmittedValue);
|
|
1779
|
+
if (modalDateStr === emittedDateStr) {
|
|
1780
|
+
lastEmittedValue = null;
|
|
1781
|
+
return;
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
updateSelectValueFromProps();
|
|
1785
|
+
},
|
|
1786
|
+
{ deep: true }
|
|
1787
|
+
);
|
|
1788
|
+
watch(selectValue, (val) => {
|
|
1789
|
+
const index2 = Math.round(val);
|
|
1790
|
+
const emitValue = getValueFromIndex(index2);
|
|
1791
|
+
lastEmittedValue = emitValue;
|
|
1792
|
+
console.log("emitValue", emitValue);
|
|
1793
|
+
emit("update:modelValue", emitValue);
|
|
1794
|
+
});
|
|
1795
|
+
return (_ctx, _cache) => {
|
|
1796
|
+
const _component_el_slider = resolveComponent("el-slider");
|
|
1797
|
+
const _component_el_option = resolveComponent("el-option");
|
|
1798
|
+
const _component_el_select = resolveComponent("el-select");
|
|
1799
|
+
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
1800
|
+
createElementVNode("div", _hoisted_2$9, [
|
|
1801
|
+
createVNode(_component_el_slider, {
|
|
1802
|
+
style: normalizeStyle({ width: unref(sliderWidth) }),
|
|
1803
|
+
modelValue: selectValue.value,
|
|
1804
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectValue.value = $event),
|
|
1805
|
+
min: unref(min),
|
|
1806
|
+
max: unref(max),
|
|
1807
|
+
step: unref(step),
|
|
1808
|
+
marks: unref(marks),
|
|
1809
|
+
"show-stops": true,
|
|
1810
|
+
"show-tooltip": true,
|
|
1811
|
+
"format-tooltip": formatTooltip
|
|
1812
|
+
}, null, 8, ["style", "modelValue", "min", "max", "step", "marks"])
|
|
1813
|
+
]),
|
|
1814
|
+
createVNode(_component_el_select, {
|
|
1815
|
+
modelValue: unref(selectDate),
|
|
1816
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(selectDate) ? selectDate.value = $event : null),
|
|
1817
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
1818
|
+
filterable: "",
|
|
1819
|
+
onChange: selectChange
|
|
1820
|
+
}, {
|
|
1821
|
+
default: withCtx(() => [
|
|
1822
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(timePoints), (point, index2) => {
|
|
1823
|
+
return openBlock(), createBlock(_component_el_option, {
|
|
1824
|
+
key: index2,
|
|
1825
|
+
label: formatTimeLabel(point),
|
|
1826
|
+
value: normalizeDate(point)
|
|
1827
|
+
}, null, 8, ["label", "value"]);
|
|
1828
|
+
}), 128))
|
|
1829
|
+
]),
|
|
1830
|
+
_: 1
|
|
1831
|
+
}, 8, ["modelValue"])
|
|
1832
|
+
]);
|
|
1833
|
+
};
|
|
1834
|
+
}
|
|
1835
|
+
};
|
|
1836
|
+
const SCTJTimeLineSelect = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-a098c8b6"]]);
|
|
1551
1837
|
const index_vue_vue_type_style_index_0_scoped_0e809a5c_lang = "";
|
|
1552
1838
|
const _hoisted_1$e = { class: "table-container" };
|
|
1553
1839
|
const _sfc_main$j = {
|
|
@@ -9113,13 +9399,13 @@ const _sfc_main$2 = {
|
|
|
9113
9399
|
}
|
|
9114
9400
|
};
|
|
9115
9401
|
const SCTJBusinessMapDrawingDialog = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-d0bea808"]]);
|
|
9116
|
-
const
|
|
9402
|
+
const BimViewer_vue_vue_type_style_index_0_scoped_c145e90e_lang = "";
|
|
9117
9403
|
const _sfc_main$1 = {
|
|
9118
9404
|
__name: "BimViewer",
|
|
9119
9405
|
props: {
|
|
9120
9406
|
viewToken: {
|
|
9121
9407
|
type: String,
|
|
9122
|
-
default: "
|
|
9408
|
+
default: ""
|
|
9123
9409
|
},
|
|
9124
9410
|
extraContextMenu: {
|
|
9125
9411
|
type: Array,
|
|
@@ -9142,7 +9428,7 @@ const _sfc_main$1 = {
|
|
|
9142
9428
|
}
|
|
9143
9429
|
},
|
|
9144
9430
|
emits: ["contextMenuClick"],
|
|
9145
|
-
setup(__props, { emit }) {
|
|
9431
|
+
setup(__props, { expose, emit }) {
|
|
9146
9432
|
const props = __props;
|
|
9147
9433
|
const bimContainer = ref$1(null);
|
|
9148
9434
|
const viewer3D = ref$1(null);
|
|
@@ -9303,6 +9589,10 @@ const _sfc_main$1 = {
|
|
|
9303
9589
|
console.error("\u5BB9\u5668\u5143\u7D20\u672A\u51C6\u5907\u597D");
|
|
9304
9590
|
return;
|
|
9305
9591
|
}
|
|
9592
|
+
if (!props.viewToken) {
|
|
9593
|
+
console.error("\u7F3A\u5C11\u5FC5\u8981\u53C2\u6570viewToken");
|
|
9594
|
+
return;
|
|
9595
|
+
}
|
|
9306
9596
|
const options = new BimfaceSDKLoaderConfig();
|
|
9307
9597
|
options.viewToken = props.viewToken;
|
|
9308
9598
|
BimfaceSDKLoader.load(options, successCallback, failureCallback);
|
|
@@ -9341,17 +9631,73 @@ const _sfc_main$1 = {
|
|
|
9341
9631
|
viewer3D.value = null;
|
|
9342
9632
|
app.value = null;
|
|
9343
9633
|
};
|
|
9634
|
+
const freezeComponent = (idArr, colorRgba = [128, 128, 128, 0.5]) => {
|
|
9635
|
+
let newColor = new Glodon.Web.Graphics.Color(...colorRgba);
|
|
9636
|
+
const model3D = viewer3D.value.getModel();
|
|
9637
|
+
model3D.overrideComponentsColorById(idArr, newColor);
|
|
9638
|
+
model3D.deactivateComponentsById(idArr);
|
|
9639
|
+
viewer3D.value.render();
|
|
9640
|
+
};
|
|
9641
|
+
const unfreezeComponent = () => {
|
|
9642
|
+
const model3D = viewer3D.value.getModel();
|
|
9643
|
+
model3D.activateAllComponents();
|
|
9644
|
+
model3D.clearOverrideColorComponents();
|
|
9645
|
+
viewer3D.value.render();
|
|
9646
|
+
};
|
|
9647
|
+
const hideComponent = (mode = "id", arr) => {
|
|
9648
|
+
const model3D = viewer3D.value.getModel();
|
|
9649
|
+
if (mode === "id") {
|
|
9650
|
+
arr && arr.length ? model3D.hideComponentsById(arr) : model3D.hideAllComponents();
|
|
9651
|
+
} else {
|
|
9652
|
+
arr && arr.length ? model3D.hideComponentsByObjectData(arr) : model3D.hideAllComponents();
|
|
9653
|
+
}
|
|
9654
|
+
viewer3D.value.render();
|
|
9655
|
+
};
|
|
9656
|
+
const showComponent = (mode = "id", arr) => {
|
|
9657
|
+
const model3D = viewer3D.value.getModel();
|
|
9658
|
+
if (mode === "id") {
|
|
9659
|
+
arr && arr.length ? model3D.showComponentsById(arr) : model3D.showAllComponents();
|
|
9660
|
+
} else {
|
|
9661
|
+
arr && arr.length ? model3D.showComponentsByObjectData(arr) : model3D.showAllComponents();
|
|
9662
|
+
}
|
|
9663
|
+
viewer3D.value.render();
|
|
9664
|
+
};
|
|
9665
|
+
const isolateComponent = (arr, mode = "id") => {
|
|
9666
|
+
const model3D = viewer3D.value.getModel();
|
|
9667
|
+
const makeOthersTranslucent = Glodon.Bimface.Viewer.IsolateOption.MakeOthersTranslucent;
|
|
9668
|
+
if (mode === "id") {
|
|
9669
|
+
model3D.isolateComponentsById(arr, makeOthersTranslucent);
|
|
9670
|
+
} else if (mode === "objectData") {
|
|
9671
|
+
model3D.isolateComponentsByObjectData(arr, makeOthersTranslucent);
|
|
9672
|
+
}
|
|
9673
|
+
viewer3D.value.render();
|
|
9674
|
+
};
|
|
9675
|
+
const unIsolateComponent = () => {
|
|
9676
|
+
const model3D = viewer3D.value.getModel();
|
|
9677
|
+
model3D.clearIsolation();
|
|
9678
|
+
viewer3D.value.render();
|
|
9679
|
+
};
|
|
9344
9680
|
const initBim = () => {
|
|
9345
9681
|
nextTick(() => {
|
|
9346
9682
|
loadModel();
|
|
9347
9683
|
});
|
|
9348
9684
|
};
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9685
|
+
watch(() => props.viewToken, () => {
|
|
9686
|
+
if (props.viewToken) {
|
|
9687
|
+
initBim();
|
|
9688
|
+
}
|
|
9689
|
+
}, { immediate: true });
|
|
9352
9690
|
onBeforeUnmount(() => {
|
|
9353
9691
|
cleanup();
|
|
9354
9692
|
});
|
|
9693
|
+
expose({
|
|
9694
|
+
freezeComponent,
|
|
9695
|
+
unfreezeComponent,
|
|
9696
|
+
hideComponent,
|
|
9697
|
+
showComponent,
|
|
9698
|
+
isolateComponent,
|
|
9699
|
+
unIsolateComponent
|
|
9700
|
+
});
|
|
9355
9701
|
return (_ctx, _cache) => {
|
|
9356
9702
|
return openBlock(), createElementBlock("div", {
|
|
9357
9703
|
class: "model-container",
|
|
@@ -9361,7 +9707,7 @@ const _sfc_main$1 = {
|
|
|
9361
9707
|
};
|
|
9362
9708
|
}
|
|
9363
9709
|
};
|
|
9364
|
-
const SCTJBimViewer = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
9710
|
+
const SCTJBimViewer = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-c145e90e"]]);
|
|
9365
9711
|
const DwgViewer_vue_vue_type_style_index_0_scoped_ab9c8ebd_lang = "";
|
|
9366
9712
|
const _sfc_main = {
|
|
9367
9713
|
__name: "DwgViewer",
|
|
@@ -9605,15 +9951,16 @@ const SCTJDwgViewer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "dat
|
|
|
9605
9951
|
const components = [
|
|
9606
9952
|
{ component: SCTJDictTag, name: "SCTJDictTag" },
|
|
9607
9953
|
{ component: SCTJTreeSelect, name: "SCTJTreeSelect" },
|
|
9608
|
-
{ component: _sfc_main$
|
|
9609
|
-
{ component: _sfc_main$
|
|
9610
|
-
{ component:
|
|
9954
|
+
{ component: _sfc_main$m, name: "SCTJSelect" },
|
|
9955
|
+
{ component: _sfc_main$l, name: "SCTJCheckBox" },
|
|
9956
|
+
{ component: SCTJTimeLineSelect, name: "SCTJTimeLineSelect" },
|
|
9957
|
+
{ component: _sfc_main$t, name: "SCTJIcon" },
|
|
9611
9958
|
{ component: SCTJFileUpload, name: "SCTJFileUpload" },
|
|
9612
9959
|
{ component: SCTJImageUpload, name: "SCTJImageUpload" },
|
|
9613
9960
|
{ component: SCTJImagePreview, name: "SCTJImagePreview" },
|
|
9614
9961
|
{ component: SCTJIconSelect, name: "SCTJIconSelect" },
|
|
9615
9962
|
{ component: SCTJSearch, name: "SCTJSearch" },
|
|
9616
|
-
{ component: _sfc_main$
|
|
9963
|
+
{ component: _sfc_main$o, name: "SCTJDateRangePicker" },
|
|
9617
9964
|
{ component: SCTJTable, name: "SCTJTable" },
|
|
9618
9965
|
{ component: SCTJTableContainer, name: "SCTJTableContainer" },
|
|
9619
9966
|
{ component: SCTJTablePageContainer, name: "SCTJTablePageContainer" },
|
|
@@ -9643,15 +9990,16 @@ const index = {
|
|
|
9643
9990
|
install,
|
|
9644
9991
|
SCTJDictTag,
|
|
9645
9992
|
SCTJTreeSelect,
|
|
9646
|
-
SCTJSelect: _sfc_main$
|
|
9647
|
-
SCTJCheckBox: _sfc_main$
|
|
9648
|
-
|
|
9993
|
+
SCTJSelect: _sfc_main$m,
|
|
9994
|
+
SCTJCheckBox: _sfc_main$l,
|
|
9995
|
+
SCTJTimeLineSelect,
|
|
9996
|
+
SCTJIcon: _sfc_main$t,
|
|
9649
9997
|
SCTJFileUpload,
|
|
9650
9998
|
SCTJImageUpload,
|
|
9651
9999
|
SCTJImagePreview,
|
|
9652
10000
|
SCTJIconSelect,
|
|
9653
10001
|
SCTJSearch,
|
|
9654
|
-
SCTJDateRangePicker: _sfc_main$
|
|
10002
|
+
SCTJDateRangePicker: _sfc_main$o,
|
|
9655
10003
|
SCTJTable,
|
|
9656
10004
|
SCTJTableContainer,
|
|
9657
10005
|
SCTJTablePageContainer,
|
|
@@ -9677,15 +10025,15 @@ export {
|
|
|
9677
10025
|
SCTJBimViewer,
|
|
9678
10026
|
_sfc_main$d as SCTJBtnContainer,
|
|
9679
10027
|
SCTJBusinessMapDrawingDialog,
|
|
9680
|
-
_sfc_main$
|
|
10028
|
+
_sfc_main$l as SCTJCheckBox,
|
|
9681
10029
|
SCTJCommonChart,
|
|
9682
|
-
_sfc_main$
|
|
10030
|
+
_sfc_main$o as SCTJDateRangePicker,
|
|
9683
10031
|
SCTJDialogTable,
|
|
9684
10032
|
SCTJDictTag,
|
|
9685
10033
|
SCTJDwgViewer,
|
|
9686
10034
|
SCTJFileUpload,
|
|
9687
10035
|
SCTJFlvPlayer,
|
|
9688
|
-
_sfc_main$
|
|
10036
|
+
_sfc_main$t as SCTJIcon,
|
|
9689
10037
|
SCTJIconSelect,
|
|
9690
10038
|
_sfc_main$6 as SCTJIframe,
|
|
9691
10039
|
SCTJImagePreview,
|
|
@@ -9697,11 +10045,12 @@ export {
|
|
|
9697
10045
|
SCTJRightToolbar,
|
|
9698
10046
|
SCTJScrollTable,
|
|
9699
10047
|
SCTJSearch,
|
|
9700
|
-
_sfc_main$
|
|
10048
|
+
_sfc_main$m as SCTJSelect,
|
|
9701
10049
|
SCTJTable,
|
|
9702
10050
|
SCTJTableContainer,
|
|
9703
10051
|
SCTJTablePageContainer,
|
|
9704
10052
|
SCTJTableTopActionContainer,
|
|
10053
|
+
SCTJTimeLineSelect,
|
|
9705
10054
|
SCTJTreeSelect,
|
|
9706
10055
|
index as default
|
|
9707
10056
|
};
|