sctj-components 1.0.61 → 1.0.63
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 +199 -36
- package/lib/sctj-components.umd.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
|
@@ -1290,7 +1290,7 @@ const _sfc_main$p = {
|
|
|
1290
1290
|
};
|
|
1291
1291
|
}
|
|
1292
1292
|
};
|
|
1293
|
-
const
|
|
1293
|
+
const index_vue_vue_type_style_index_0_scoped_7b45925b_lang = "";
|
|
1294
1294
|
const _hoisted_1$i = { class: "el-tree-select" };
|
|
1295
1295
|
const _sfc_main$o = {
|
|
1296
1296
|
__name: "index",
|
|
@@ -1311,9 +1311,22 @@ const _sfc_main$o = {
|
|
|
1311
1311
|
return false;
|
|
1312
1312
|
}
|
|
1313
1313
|
},
|
|
1314
|
+
multiple: {
|
|
1315
|
+
type: Boolean,
|
|
1316
|
+
default: false
|
|
1317
|
+
},
|
|
1318
|
+
checkStrictly: {
|
|
1319
|
+
type: Boolean,
|
|
1320
|
+
default: false
|
|
1321
|
+
},
|
|
1322
|
+
valueFormat: {
|
|
1323
|
+
type: String,
|
|
1324
|
+
default: "string",
|
|
1325
|
+
validator: (value) => ["array", "string"].includes(value)
|
|
1326
|
+
},
|
|
1314
1327
|
modelValue: {
|
|
1315
|
-
type: [String, Number],
|
|
1316
|
-
default:
|
|
1328
|
+
type: [String, Number, Array],
|
|
1329
|
+
default: () => null
|
|
1317
1330
|
},
|
|
1318
1331
|
options: {
|
|
1319
1332
|
type: Array,
|
|
@@ -1328,36 +1341,127 @@ const _sfc_main$o = {
|
|
|
1328
1341
|
setup(__props, { emit }) {
|
|
1329
1342
|
const props = __props;
|
|
1330
1343
|
const { proxy } = getCurrentInstance();
|
|
1344
|
+
const TREE_OPTION_VALUE = "__SCTJ_TREE_SELECT__";
|
|
1345
|
+
function stringToArray(str) {
|
|
1346
|
+
if (typeof str !== "string")
|
|
1347
|
+
return [];
|
|
1348
|
+
return str.split(",").map((item) => item.trim()).filter((item) => item !== "");
|
|
1349
|
+
}
|
|
1350
|
+
function arrayToString(arr) {
|
|
1351
|
+
if (!Array.isArray(arr))
|
|
1352
|
+
return "";
|
|
1353
|
+
return arr.join(",");
|
|
1354
|
+
}
|
|
1331
1355
|
const valueId = computed$1({
|
|
1332
|
-
get: () =>
|
|
1356
|
+
get: () => {
|
|
1357
|
+
if (props.multiple) {
|
|
1358
|
+
if (Array.isArray(props.modelValue)) {
|
|
1359
|
+
return props.modelValue;
|
|
1360
|
+
} else if (typeof props.modelValue === "string") {
|
|
1361
|
+
return stringToArray(props.modelValue);
|
|
1362
|
+
} else if (props.modelValue !== null && props.modelValue !== void 0 && props.modelValue !== "") {
|
|
1363
|
+
return [props.modelValue];
|
|
1364
|
+
} else {
|
|
1365
|
+
return [];
|
|
1366
|
+
}
|
|
1367
|
+
} else {
|
|
1368
|
+
if (props.modelValue === null || props.modelValue === void 0 || props.modelValue === "") {
|
|
1369
|
+
return "";
|
|
1370
|
+
}
|
|
1371
|
+
return String(props.modelValue);
|
|
1372
|
+
}
|
|
1373
|
+
},
|
|
1333
1374
|
set: (val) => {
|
|
1334
|
-
|
|
1375
|
+
if (props.multiple) {
|
|
1376
|
+
if (props.valueFormat === "string") {
|
|
1377
|
+
emit("update:modelValue", arrayToString(val));
|
|
1378
|
+
} else {
|
|
1379
|
+
emit("update:modelValue", val);
|
|
1380
|
+
}
|
|
1381
|
+
} else {
|
|
1382
|
+
emit("update:modelValue", val === null || val === void 0 || val === "" ? "" : String(val));
|
|
1383
|
+
}
|
|
1335
1384
|
}
|
|
1336
1385
|
});
|
|
1337
1386
|
const valueTitle = ref$1("");
|
|
1387
|
+
const selectedOptions = ref$1([]);
|
|
1338
1388
|
const defaultExpandedKey = ref$1([]);
|
|
1339
1389
|
function initHandle() {
|
|
1340
1390
|
nextTick(() => {
|
|
1391
|
+
if (!proxy.$refs.selectTree)
|
|
1392
|
+
return;
|
|
1341
1393
|
const selectedValue = valueId.value;
|
|
1342
|
-
if (
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1394
|
+
if (props.multiple) {
|
|
1395
|
+
if (Array.isArray(selectedValue) && selectedValue.length > 0) {
|
|
1396
|
+
const titles = [];
|
|
1397
|
+
const opts = [];
|
|
1398
|
+
const expandedKeys = [];
|
|
1399
|
+
selectedValue.forEach((val) => {
|
|
1400
|
+
const node = proxy.$refs.selectTree.getNode(val);
|
|
1401
|
+
if (node) {
|
|
1402
|
+
const label = node.data[props.objMap.label];
|
|
1403
|
+
titles.push(label);
|
|
1404
|
+
opts.push({ value: val, label });
|
|
1405
|
+
expandedKeys.push(val);
|
|
1406
|
+
} else {
|
|
1407
|
+
opts.push({ value: val, label: String(val) });
|
|
1408
|
+
}
|
|
1409
|
+
});
|
|
1410
|
+
valueTitle.value = titles.join(",");
|
|
1411
|
+
selectedOptions.value = opts;
|
|
1412
|
+
proxy.$refs.selectTree.setCheckedKeys(selectedValue);
|
|
1413
|
+
defaultExpandedKey.value = expandedKeys;
|
|
1414
|
+
} else {
|
|
1415
|
+
valueTitle.value = "";
|
|
1416
|
+
selectedOptions.value = [];
|
|
1417
|
+
proxy.$refs.selectTree.setCheckedKeys([]);
|
|
1418
|
+
defaultExpandedKey.value = [];
|
|
1348
1419
|
}
|
|
1349
1420
|
} else {
|
|
1350
|
-
|
|
1421
|
+
if (selectedValue !== null && typeof selectedValue !== "undefined" && selectedValue !== "") {
|
|
1422
|
+
const node = proxy.$refs.selectTree.getNode(selectedValue);
|
|
1423
|
+
if (node) {
|
|
1424
|
+
valueTitle.value = node.data[props.objMap.label];
|
|
1425
|
+
proxy.$refs.selectTree.setCurrentKey(selectedValue);
|
|
1426
|
+
defaultExpandedKey.value = [selectedValue];
|
|
1427
|
+
}
|
|
1428
|
+
} else {
|
|
1429
|
+
clearHandle();
|
|
1430
|
+
}
|
|
1351
1431
|
}
|
|
1352
1432
|
});
|
|
1353
1433
|
}
|
|
1354
|
-
function handleNodeClick(node) {
|
|
1355
|
-
|
|
1356
|
-
|
|
1434
|
+
function handleNodeClick(data, node) {
|
|
1435
|
+
if (props.multiple) {
|
|
1436
|
+
return;
|
|
1437
|
+
}
|
|
1438
|
+
valueTitle.value = data[props.objMap.label];
|
|
1439
|
+
const nodeValue = data[props.objMap.value];
|
|
1440
|
+
valueId.value = nodeValue === null || nodeValue === void 0 ? "" : String(nodeValue);
|
|
1357
1441
|
defaultExpandedKey.value = [];
|
|
1358
1442
|
proxy.$refs.treeSelect.blur();
|
|
1359
1443
|
selectFilterData("");
|
|
1360
1444
|
}
|
|
1445
|
+
function handleCheck(data, checkedInfo) {
|
|
1446
|
+
if (!props.multiple)
|
|
1447
|
+
return;
|
|
1448
|
+
const checkedKeys = checkedInfo.checkedKeys || [];
|
|
1449
|
+
const titles = [];
|
|
1450
|
+
const opts = [];
|
|
1451
|
+
checkedKeys.forEach((key) => {
|
|
1452
|
+
const node = proxy.$refs.selectTree.getNode(key);
|
|
1453
|
+
if (node) {
|
|
1454
|
+
const label = node.data[props.objMap.label];
|
|
1455
|
+
titles.push(label);
|
|
1456
|
+
opts.push({ value: key, label });
|
|
1457
|
+
} else {
|
|
1458
|
+
opts.push({ value: key, label: String(key) });
|
|
1459
|
+
}
|
|
1460
|
+
});
|
|
1461
|
+
valueId.value = checkedKeys;
|
|
1462
|
+
valueTitle.value = titles.join(",");
|
|
1463
|
+
selectedOptions.value = opts;
|
|
1464
|
+
}
|
|
1361
1465
|
function selectFilterData(val) {
|
|
1362
1466
|
proxy.$refs.selectTree.filter(val);
|
|
1363
1467
|
}
|
|
@@ -1367,8 +1471,17 @@ const _sfc_main$o = {
|
|
|
1367
1471
|
return data[props.objMap["label"]].indexOf(value) !== -1;
|
|
1368
1472
|
}
|
|
1369
1473
|
function clearHandle() {
|
|
1370
|
-
|
|
1371
|
-
|
|
1474
|
+
if (props.multiple) {
|
|
1475
|
+
valueTitle.value = "";
|
|
1476
|
+
valueId.value = [];
|
|
1477
|
+
selectedOptions.value = [];
|
|
1478
|
+
if (proxy.$refs.selectTree) {
|
|
1479
|
+
proxy.$refs.selectTree.setCheckedKeys([]);
|
|
1480
|
+
}
|
|
1481
|
+
} else {
|
|
1482
|
+
valueTitle.value = "";
|
|
1483
|
+
valueId.value = "";
|
|
1484
|
+
}
|
|
1372
1485
|
defaultExpandedKey.value = [];
|
|
1373
1486
|
clearSelected();
|
|
1374
1487
|
}
|
|
@@ -1379,12 +1492,15 @@ const _sfc_main$o = {
|
|
|
1379
1492
|
onMounted$1(() => {
|
|
1380
1493
|
initHandle();
|
|
1381
1494
|
});
|
|
1495
|
+
watch(() => props.modelValue, () => {
|
|
1496
|
+
initHandle();
|
|
1497
|
+
}, { immediate: true });
|
|
1382
1498
|
watch(valueId, () => {
|
|
1383
1499
|
initHandle();
|
|
1384
1500
|
});
|
|
1385
1501
|
return (_ctx, _cache) => {
|
|
1386
|
-
const _component_el_tree = resolveComponent("el-tree");
|
|
1387
1502
|
const _component_el_option = resolveComponent("el-option");
|
|
1503
|
+
const _component_el_tree = resolveComponent("el-tree");
|
|
1388
1504
|
const _component_el_select = resolveComponent("el-select");
|
|
1389
1505
|
return openBlock(), createElementBlock("div", _hoisted_1$i, [
|
|
1390
1506
|
createVNode(_component_el_select, {
|
|
@@ -1394,14 +1510,31 @@ const _sfc_main$o = {
|
|
|
1394
1510
|
ref: "treeSelect",
|
|
1395
1511
|
filterable: true,
|
|
1396
1512
|
clearable: true,
|
|
1513
|
+
multiple: __props.multiple,
|
|
1514
|
+
"collapse-tags": "",
|
|
1515
|
+
"collapse-tags-tooltip": "",
|
|
1397
1516
|
onClear: clearHandle,
|
|
1398
1517
|
"filter-method": selectFilterData,
|
|
1399
1518
|
placeholder: __props.placeholder
|
|
1400
1519
|
}, {
|
|
1401
1520
|
default: withCtx(() => [
|
|
1402
|
-
|
|
1521
|
+
__props.multiple ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(selectedOptions.value, (opt) => {
|
|
1522
|
+
return openBlock(), createBlock(_component_el_option, {
|
|
1523
|
+
key: String(opt.value),
|
|
1524
|
+
value: opt.value,
|
|
1525
|
+
label: opt.label,
|
|
1526
|
+
style: { "display": "none" }
|
|
1527
|
+
}, null, 8, ["value", "label"]);
|
|
1528
|
+
}), 128)) : (openBlock(), createBlock(_component_el_option, {
|
|
1529
|
+
key: 1,
|
|
1403
1530
|
value: unref(valueId),
|
|
1404
|
-
label: valueTitle.value
|
|
1531
|
+
label: valueTitle.value,
|
|
1532
|
+
style: { "display": "none" }
|
|
1533
|
+
}, null, 8, ["value", "label"])),
|
|
1534
|
+
createVNode(_component_el_option, {
|
|
1535
|
+
value: TREE_OPTION_VALUE,
|
|
1536
|
+
label: "",
|
|
1537
|
+
disabled: true
|
|
1405
1538
|
}, {
|
|
1406
1539
|
default: withCtx(() => [
|
|
1407
1540
|
createVNode(_component_el_tree, {
|
|
@@ -1414,19 +1547,22 @@ const _sfc_main$o = {
|
|
|
1414
1547
|
"expand-on-click-node": false,
|
|
1415
1548
|
"default-expanded-keys": defaultExpandedKey.value,
|
|
1416
1549
|
"filter-node-method": filterNode,
|
|
1417
|
-
|
|
1418
|
-
|
|
1550
|
+
"show-checkbox": __props.multiple,
|
|
1551
|
+
"check-strictly": __props.checkStrictly,
|
|
1552
|
+
onNodeClick: handleNodeClick,
|
|
1553
|
+
onCheck: handleCheck
|
|
1554
|
+
}, null, 8, ["accordion", "data", "props", "node-key", "default-expanded-keys", "show-checkbox", "check-strictly"])
|
|
1419
1555
|
]),
|
|
1420
1556
|
_: 1
|
|
1421
|
-
}
|
|
1557
|
+
})
|
|
1422
1558
|
]),
|
|
1423
1559
|
_: 1
|
|
1424
|
-
}, 8, ["modelValue", "placeholder"])
|
|
1560
|
+
}, 8, ["modelValue", "multiple", "placeholder"])
|
|
1425
1561
|
]);
|
|
1426
1562
|
};
|
|
1427
1563
|
}
|
|
1428
1564
|
};
|
|
1429
|
-
const SCTJTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-
|
|
1565
|
+
const SCTJTreeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["__scopeId", "data-v-7b45925b"]]);
|
|
1430
1566
|
const _sfc_main$n = {
|
|
1431
1567
|
__name: "index",
|
|
1432
1568
|
props: {
|
|
@@ -1442,6 +1578,11 @@ const _sfc_main$n = {
|
|
|
1442
1578
|
type: Boolean,
|
|
1443
1579
|
default: false
|
|
1444
1580
|
},
|
|
1581
|
+
valueFormat: {
|
|
1582
|
+
type: String,
|
|
1583
|
+
default: "string",
|
|
1584
|
+
validator: (value) => ["array", "string"].includes(value)
|
|
1585
|
+
},
|
|
1445
1586
|
valueProp: {
|
|
1446
1587
|
type: String,
|
|
1447
1588
|
default: "value"
|
|
@@ -1457,13 +1598,28 @@ const _sfc_main$n = {
|
|
|
1457
1598
|
const selectValue = computed$1({
|
|
1458
1599
|
get() {
|
|
1459
1600
|
if (props.multiple) {
|
|
1460
|
-
|
|
1601
|
+
if (Array.isArray(props.modelValue)) {
|
|
1602
|
+
return props.modelValue;
|
|
1603
|
+
} else if (typeof props.modelValue === "string") {
|
|
1604
|
+
return props.modelValue.split(",").filter((item) => item !== "");
|
|
1605
|
+
} else if (props.modelValue != null && props.modelValue !== void 0) {
|
|
1606
|
+
return [props.modelValue];
|
|
1607
|
+
}
|
|
1608
|
+
return [];
|
|
1461
1609
|
} else {
|
|
1462
1610
|
return props.modelValue;
|
|
1463
1611
|
}
|
|
1464
1612
|
},
|
|
1465
1613
|
set(val) {
|
|
1466
|
-
|
|
1614
|
+
if (props.multiple) {
|
|
1615
|
+
if (props.valueFormat === "array") {
|
|
1616
|
+
emit("update:modelValue", Array.isArray(val) ? val : val ? [val] : []);
|
|
1617
|
+
} else {
|
|
1618
|
+
emit("update:modelValue", Array.isArray(val) ? val.join(",") : val != null ? val : "");
|
|
1619
|
+
}
|
|
1620
|
+
} else {
|
|
1621
|
+
emit("update:modelValue", val);
|
|
1622
|
+
}
|
|
1467
1623
|
}
|
|
1468
1624
|
});
|
|
1469
1625
|
return (_ctx, _cache) => {
|
|
@@ -9436,7 +9592,7 @@ const _sfc_main$3 = {
|
|
|
9436
9592
|
}
|
|
9437
9593
|
};
|
|
9438
9594
|
const SCTJBusinessMapDrawingDialog = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-d0bea808"]]);
|
|
9439
|
-
const
|
|
9595
|
+
const index_vue_vue_type_style_index_0_scoped_3a5f08b0_lang = "";
|
|
9440
9596
|
const _hoisted_1$1 = { class: "controls" };
|
|
9441
9597
|
const _sfc_main$2 = {
|
|
9442
9598
|
__name: "index",
|
|
@@ -9488,7 +9644,7 @@ const _sfc_main$2 = {
|
|
|
9488
9644
|
const startMarker = ref$1(null);
|
|
9489
9645
|
const endMarker = ref$1(null);
|
|
9490
9646
|
const isPlaying = ref$1(false);
|
|
9491
|
-
const playSpeed = ref$1(
|
|
9647
|
+
const playSpeed = ref$1(1.25);
|
|
9492
9648
|
const passedPolyline = ref$1(null);
|
|
9493
9649
|
const isPlayed = ref$1(false);
|
|
9494
9650
|
let AMapInstance = null;
|
|
@@ -9578,12 +9734,18 @@ const _sfc_main$2 = {
|
|
|
9578
9734
|
});
|
|
9579
9735
|
map.value.add([polyline.value, startMarker.value, endMarker.value, moveMarker.value, passedPolyline.value]);
|
|
9580
9736
|
map.value.setFitView();
|
|
9737
|
+
let lastUpdateTime = 0;
|
|
9738
|
+
const throttleInterval = 100;
|
|
9581
9739
|
moveMarker.value.on("moving", (e) => {
|
|
9582
9740
|
if (!isPlayed.value) {
|
|
9583
9741
|
isPlayed.value = true;
|
|
9584
9742
|
}
|
|
9585
9743
|
passedPolyline.value.setPath(e.passedPath);
|
|
9586
|
-
|
|
9744
|
+
const now = Date.now();
|
|
9745
|
+
if (now - lastUpdateTime >= throttleInterval) {
|
|
9746
|
+
map.value.setCenter(e.target.getPosition(), false);
|
|
9747
|
+
lastUpdateTime = now;
|
|
9748
|
+
}
|
|
9587
9749
|
});
|
|
9588
9750
|
};
|
|
9589
9751
|
const startPlay = () => {
|
|
@@ -9650,6 +9812,7 @@ const _sfc_main$2 = {
|
|
|
9650
9812
|
});
|
|
9651
9813
|
onBeforeUnmount(() => {
|
|
9652
9814
|
if (moveMarker.value) {
|
|
9815
|
+
moveMarker.value.off("moving");
|
|
9653
9816
|
moveMarker.value.stopMove();
|
|
9654
9817
|
}
|
|
9655
9818
|
if (map.value) {
|
|
@@ -9713,19 +9876,19 @@ const _sfc_main$2 = {
|
|
|
9713
9876
|
}, {
|
|
9714
9877
|
default: withCtx(() => [
|
|
9715
9878
|
createVNode(_component_el_option, {
|
|
9716
|
-
value:
|
|
9879
|
+
value: 10,
|
|
9717
9880
|
label: "1x"
|
|
9718
9881
|
}),
|
|
9719
9882
|
createVNode(_component_el_option, {
|
|
9720
|
-
value:
|
|
9883
|
+
value: 5,
|
|
9721
9884
|
label: "2x"
|
|
9722
9885
|
}),
|
|
9723
9886
|
createVNode(_component_el_option, {
|
|
9724
|
-
value:
|
|
9887
|
+
value: 2.5,
|
|
9725
9888
|
label: "4x"
|
|
9726
|
-
}),
|
|
9889
|
+
}, null, 8, ["value"]),
|
|
9727
9890
|
createVNode(_component_el_option, {
|
|
9728
|
-
value:
|
|
9891
|
+
value: 1.25,
|
|
9729
9892
|
label: "8x"
|
|
9730
9893
|
}, null, 8, ["value"])
|
|
9731
9894
|
]),
|
|
@@ -9736,7 +9899,7 @@ const _sfc_main$2 = {
|
|
|
9736
9899
|
};
|
|
9737
9900
|
}
|
|
9738
9901
|
};
|
|
9739
|
-
const SCTJTrackPlayback = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
9902
|
+
const SCTJTrackPlayback = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-3a5f08b0"]]);
|
|
9740
9903
|
const BimViewer_vue_vue_type_style_index_0_scoped_89f55b38_lang = "";
|
|
9741
9904
|
const _withScopeId = (n) => (pushScopeId("data-v-89f55b38"), n = n(), popScopeId(), n);
|
|
9742
9905
|
const _hoisted_1 = {
|