kd-lane-chart-v3 0.0.6 → 0.0.8
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/dist/esm/index.js +2308 -575
- package/dist/esm/index.js.map +1 -1
- package/dist/kd-lane-chart-v3.css +166 -87
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -236,72 +236,6 @@ function splitArrayByDepth(arr, key = "depth") {
|
|
|
236
236
|
processSegment(arr);
|
|
237
237
|
return result;
|
|
238
238
|
}
|
|
239
|
-
const getAttrGap = (arr, key) => {
|
|
240
|
-
if (!arr || !Array.isArray(arr) || arr.length < 2) {
|
|
241
|
-
return {
|
|
242
|
-
min: null,
|
|
243
|
-
max: null,
|
|
244
|
-
minGap: null,
|
|
245
|
-
maxGap: null,
|
|
246
|
-
avgGap: null,
|
|
247
|
-
// 新增:平均间隔(去除离群值后)
|
|
248
|
-
sortedList: arr || [],
|
|
249
|
-
gaps: []
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
|
-
const validList = arr.map((item) => Number(item[key])).filter((val) => !isNaN(val) && val !== null && val !== void 0);
|
|
253
|
-
if (validList.length < 2) {
|
|
254
|
-
return {
|
|
255
|
-
min: null,
|
|
256
|
-
max: null,
|
|
257
|
-
minGap: null,
|
|
258
|
-
maxGap: null,
|
|
259
|
-
avgGap: null,
|
|
260
|
-
sortedList: validList,
|
|
261
|
-
gaps: []
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
const sortedList = [...validList].sort((a, b) => a - b);
|
|
265
|
-
const min = sortedList[0];
|
|
266
|
-
const max = sortedList[sortedList.length - 1];
|
|
267
|
-
const gaps = [];
|
|
268
|
-
for (let i = 1; i < sortedList.length; i++) {
|
|
269
|
-
const gap = sortedList[i] - sortedList[i - 1];
|
|
270
|
-
gaps.push(gap < 0 ? -gap : gap);
|
|
271
|
-
}
|
|
272
|
-
let filteredGaps = [...gaps];
|
|
273
|
-
let avgGap = null;
|
|
274
|
-
if (filteredGaps.length > 1) {
|
|
275
|
-
const mean = filteredGaps.reduce((sum, gap) => sum + gap, 0) / filteredGaps.length;
|
|
276
|
-
const variance = filteredGaps.reduce((sum, gap) => sum + Math.pow(gap - mean, 2), 0) / filteredGaps.length;
|
|
277
|
-
const stdDev = Math.sqrt(variance);
|
|
278
|
-
const threshold = 3 * stdDev;
|
|
279
|
-
filteredGaps = filteredGaps.filter((gap) => Math.abs(gap - mean) <= threshold);
|
|
280
|
-
if (filteredGaps.length > 0) {
|
|
281
|
-
avgGap = filteredGaps.reduce((sum, gap) => sum + gap, 0) / filteredGaps.length;
|
|
282
|
-
}
|
|
283
|
-
} else if (filteredGaps.length === 1) {
|
|
284
|
-
avgGap = filteredGaps[0];
|
|
285
|
-
}
|
|
286
|
-
const minGap = filteredGaps.length > 0 ? Math.min(...filteredGaps) : null;
|
|
287
|
-
const maxGap = filteredGaps.length > 0 ? Math.max(...filteredGaps) : null;
|
|
288
|
-
return {
|
|
289
|
-
min,
|
|
290
|
-
// 属性最小值
|
|
291
|
-
max,
|
|
292
|
-
// 属性最大值
|
|
293
|
-
minGap,
|
|
294
|
-
// 相邻最小间隔(去除离群值后)
|
|
295
|
-
maxGap,
|
|
296
|
-
// 相邻最大间隔(去除离群值后)
|
|
297
|
-
avgGap,
|
|
298
|
-
// 平均间隔(去除离群值后)
|
|
299
|
-
sortedList,
|
|
300
|
-
// 排序后的属性值
|
|
301
|
-
gaps: filteredGaps
|
|
302
|
-
// 过滤后的所有间隔
|
|
303
|
-
};
|
|
304
|
-
};
|
|
305
239
|
const isNumeric = (value) => {
|
|
306
240
|
const num = Number(value);
|
|
307
241
|
return typeof num === "number" && !isNaN(num) && isFinite(num);
|
|
@@ -326,6 +260,10 @@ const _sfc_main$d = {
|
|
|
326
260
|
left: 0,
|
|
327
261
|
top: 0
|
|
328
262
|
})
|
|
263
|
+
},
|
|
264
|
+
parentElement: {
|
|
265
|
+
type: Object,
|
|
266
|
+
default: null
|
|
329
267
|
}
|
|
330
268
|
},
|
|
331
269
|
data() {
|
|
@@ -371,16 +309,9 @@ const _sfc_main$d = {
|
|
|
371
309
|
menu.classList.add("vue-simple-context-menu--active");
|
|
372
310
|
},
|
|
373
311
|
// 以 .kd-lane-chart-container 作为定位父元素(其 position 为 relative)
|
|
374
|
-
getContainer(
|
|
375
|
-
if (
|
|
376
|
-
return
|
|
377
|
-
}
|
|
378
|
-
let el = menu.parentElement;
|
|
379
|
-
while (el) {
|
|
380
|
-
if (el.classList && el.classList.contains("kd-lane-chart-container")) {
|
|
381
|
-
return el;
|
|
382
|
-
}
|
|
383
|
-
el = el.parentElement;
|
|
312
|
+
getContainer() {
|
|
313
|
+
if (this.parentElement) {
|
|
314
|
+
return this.parentElement;
|
|
384
315
|
}
|
|
385
316
|
return null;
|
|
386
317
|
},
|
|
@@ -419,7 +350,7 @@ const _hoisted_1$d = {
|
|
|
419
350
|
class: "vue-simple-context-menu"
|
|
420
351
|
};
|
|
421
352
|
const _hoisted_2$c = ["onClick"];
|
|
422
|
-
const _hoisted_3$
|
|
353
|
+
const _hoisted_3$8 = ["innerHTML"];
|
|
423
354
|
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
424
355
|
const _directive_click_outside = resolveDirective("click-outside");
|
|
425
356
|
return openBlock(), createElementBlock("div", null, [
|
|
@@ -432,7 +363,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
432
363
|
}, [
|
|
433
364
|
createElementVNode("span", {
|
|
434
365
|
innerHTML: option.name
|
|
435
|
-
}, null, 8, _hoisted_3$
|
|
366
|
+
}, null, 8, _hoisted_3$8)
|
|
436
367
|
], 10, _hoisted_2$c);
|
|
437
368
|
}), 128))
|
|
438
369
|
])), [
|
|
@@ -440,7 +371,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
440
371
|
])
|
|
441
372
|
]);
|
|
442
373
|
}
|
|
443
|
-
const VueSimpleContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d], ["__scopeId", "data-v-
|
|
374
|
+
const VueSimpleContextMenu = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d], ["__scopeId", "data-v-b1e7434d"]]);
|
|
444
375
|
class CustomStrategy {
|
|
445
376
|
constructor(strategy) {
|
|
446
377
|
this.strategy = strategy;
|
|
@@ -1683,11 +1614,19 @@ const _sfc_main$b = {
|
|
|
1683
1614
|
lineSize: [
|
|
1684
1615
|
{ required: true, message: "请输入曲线粗细", trigger: "blur" },
|
|
1685
1616
|
{ validator: validatorNumber, trigger: "blur" },
|
|
1686
|
-
{
|
|
1617
|
+
{
|
|
1618
|
+
validator: sizeLimit,
|
|
1619
|
+
message: "曲线粗细必须在1-4之间",
|
|
1620
|
+
trigger: "blur"
|
|
1621
|
+
}
|
|
1622
|
+
],
|
|
1623
|
+
lineColor: [
|
|
1624
|
+
{ required: true, message: "请选择曲线颜色", trigger: "blur" }
|
|
1687
1625
|
],
|
|
1688
|
-
lineColor: [{ required: true, message: "请选择曲线颜色", trigger: "blur" }],
|
|
1689
1626
|
lineType: [{ required: true, message: "请选择线型", trigger: "blur" }],
|
|
1690
|
-
paramId: [
|
|
1627
|
+
paramId: [
|
|
1628
|
+
{ required: true, message: "请选择参数名称", trigger: "blur" }
|
|
1629
|
+
]
|
|
1691
1630
|
}
|
|
1692
1631
|
};
|
|
1693
1632
|
},
|
|
@@ -1743,7 +1682,6 @@ const _sfc_main$b = {
|
|
|
1743
1682
|
themeLineColor = lineColor;
|
|
1744
1683
|
}
|
|
1745
1684
|
}
|
|
1746
|
-
console.log(themeLineColor, "2222222222222");
|
|
1747
1685
|
if (themeLineColor) {
|
|
1748
1686
|
this.formData = Object.assign({}, newD, { lineColor: themeLineColor });
|
|
1749
1687
|
} else {
|
|
@@ -1924,7 +1862,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1924
1862
|
])
|
|
1925
1863
|
]);
|
|
1926
1864
|
}
|
|
1927
|
-
const LineEdit = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-
|
|
1865
|
+
const LineEdit = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b], ["__scopeId", "data-v-5019069d"]]);
|
|
1928
1866
|
const _sfc_main$a = {
|
|
1929
1867
|
inject: ["upsertTemplate", "setTargetData", "setExpanded"],
|
|
1930
1868
|
props: {
|
|
@@ -2233,6 +2171,9 @@ const _sfc_main$9 = {
|
|
|
2233
2171
|
})
|
|
2234
2172
|
}
|
|
2235
2173
|
},
|
|
2174
|
+
mounted() {
|
|
2175
|
+
this.parentElement = document.querySelector(".kd-lane-el-container");
|
|
2176
|
+
},
|
|
2236
2177
|
data() {
|
|
2237
2178
|
return {
|
|
2238
2179
|
templateContentShow: false,
|
|
@@ -2248,7 +2189,8 @@ const _sfc_main$9 = {
|
|
|
2248
2189
|
currentNodeKey: "",
|
|
2249
2190
|
targetData: void 0,
|
|
2250
2191
|
treeKey: "",
|
|
2251
|
-
tooltipVisible: {}
|
|
2192
|
+
tooltipVisible: {},
|
|
2193
|
+
parentElement: void 0
|
|
2252
2194
|
};
|
|
2253
2195
|
},
|
|
2254
2196
|
methods: {
|
|
@@ -2533,8 +2475,8 @@ const _sfc_main$9 = {
|
|
|
2533
2475
|
};
|
|
2534
2476
|
const _hoisted_1$9 = ["onContextmenu"];
|
|
2535
2477
|
const _hoisted_2$8 = ["onMouseover", "onMouseleave"];
|
|
2536
|
-
const _hoisted_3$
|
|
2537
|
-
const _hoisted_4$
|
|
2478
|
+
const _hoisted_3$7 = { style: { "padding-left": "5px" } };
|
|
2479
|
+
const _hoisted_4$7 = { class: "rtd-config-side-option" };
|
|
2538
2480
|
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2539
2481
|
const _component_el_tooltip = resolveComponent("el-tooltip");
|
|
2540
2482
|
const _component_Star = resolveComponent("Star");
|
|
@@ -2593,7 +2535,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2593
2535
|
]),
|
|
2594
2536
|
_: 2
|
|
2595
2537
|
}, 1032, ["content", "visible"]),
|
|
2596
|
-
withDirectives(createElementVNode("span", _hoisted_3$
|
|
2538
|
+
withDirectives(createElementVNode("span", _hoisted_3$7, [
|
|
2597
2539
|
createVNode(_component_el_icon, null, {
|
|
2598
2540
|
default: withCtx(() => [
|
|
2599
2541
|
createVNode(_component_Star)
|
|
@@ -2607,7 +2549,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2607
2549
|
]),
|
|
2608
2550
|
_: 1
|
|
2609
2551
|
}, 8, ["data", "current-node-key", "default-expanded-keys", "onNodeClick", "onNodeExpand", "onNodeCollapse"])),
|
|
2610
|
-
createElementVNode("div", _hoisted_4$
|
|
2552
|
+
createElementVNode("div", _hoisted_4$7, [
|
|
2611
2553
|
createVNode(_component_el_button, { onClick: $options.addTemplate }, {
|
|
2612
2554
|
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
2613
2555
|
createTextVNode("新增模板", -1)
|
|
@@ -2648,18 +2590,19 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2648
2590
|
_: 1
|
|
2649
2591
|
}),
|
|
2650
2592
|
createVNode(_component_VueSimpleContextMenu, {
|
|
2593
|
+
parentElement: $data.parentElement,
|
|
2651
2594
|
options: $options.contextMenuOptions,
|
|
2652
2595
|
positionInfo: $props.positionInfo,
|
|
2653
2596
|
ref: "vueSimpleContextMenu",
|
|
2654
2597
|
onOptionClicked: $options.optionClicked
|
|
2655
|
-
}, null, 8, ["options", "positionInfo", "onOptionClicked"])
|
|
2598
|
+
}, null, 8, ["parentElement", "options", "positionInfo", "onOptionClicked"])
|
|
2656
2599
|
]),
|
|
2657
2600
|
_: 1
|
|
2658
2601
|
})), [
|
|
2659
2602
|
[_directive_loading, $data.curveConfigLoading]
|
|
2660
2603
|
]);
|
|
2661
2604
|
}
|
|
2662
|
-
const RealTimeCurveConfig = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9], ["__scopeId", "data-v-
|
|
2605
|
+
const RealTimeCurveConfig = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9], ["__scopeId", "data-v-41fc6892"]]);
|
|
2663
2606
|
const ACTION_TYPE = {
|
|
2664
2607
|
UPSERT_LINE: "upsertLine",
|
|
2665
2608
|
DELETE_LINE: "delLine"
|
|
@@ -2716,12 +2659,18 @@ const _sfc_main$8 = {
|
|
|
2716
2659
|
methods: {
|
|
2717
2660
|
// 获取字体大小类名
|
|
2718
2661
|
getFontSize(type) {
|
|
2719
|
-
if (type == "label" && Object.prototype.hasOwnProperty.call(
|
|
2662
|
+
if (type == "label" && Object.prototype.hasOwnProperty.call(
|
|
2663
|
+
this.currentHeaderStyle,
|
|
2664
|
+
`headerLabelFontSize`
|
|
2665
|
+
)) {
|
|
2720
2666
|
return {
|
|
2721
2667
|
fontSize: `${isNumeric(this.currentHeaderStyle[`headerLabelFontSize`]) ? this.currentHeaderStyle[`headerLabelFontSize`] + `px` : this.currentHeaderStyle[`headerLabelFontSize`]}`
|
|
2722
2668
|
};
|
|
2723
2669
|
}
|
|
2724
|
-
if (type == "data" && Object.prototype.hasOwnProperty.call(
|
|
2670
|
+
if (type == "data" && Object.prototype.hasOwnProperty.call(
|
|
2671
|
+
this.currentHeaderStyle,
|
|
2672
|
+
`headerDataFontSize`
|
|
2673
|
+
)) {
|
|
2725
2674
|
return {
|
|
2726
2675
|
fontSize: `${isNumeric(this.currentHeaderStyle[`headerDataFontSize`]) ? this.currentHeaderStyle[`headerDataFontSize`] + `px` : this.currentHeaderStyle[`headerDataFontSize`]}`
|
|
2727
2676
|
};
|
|
@@ -2738,7 +2687,10 @@ const _sfc_main$8 = {
|
|
|
2738
2687
|
if (this.formCache.displayType == "float") {
|
|
2739
2688
|
return "";
|
|
2740
2689
|
}
|
|
2741
|
-
if (!Object.prototype.hasOwnProperty.call(
|
|
2690
|
+
if (!Object.prototype.hasOwnProperty.call(
|
|
2691
|
+
this.headerData,
|
|
2692
|
+
this.line.paramId
|
|
2693
|
+
)) {
|
|
2742
2694
|
return "--";
|
|
2743
2695
|
}
|
|
2744
2696
|
return this.headerData[this.line.paramId] !== null && this.headerData[this.line.paramId] !== void 0 && this.headerData[this.line.paramId] !== "" ? typeof +this.headerData[this.line.paramId] === "number" ? Number(Number(this.headerData[this.line.paramId]).toFixed(2)) : this.headerData[this.line.paramId] : "--";
|
|
@@ -2793,10 +2745,14 @@ const _sfc_main$8 = {
|
|
|
2793
2745
|
if (this.line.isGradient) {
|
|
2794
2746
|
lineType = {};
|
|
2795
2747
|
} else {
|
|
2796
|
-
lineType = {
|
|
2748
|
+
lineType = {
|
|
2749
|
+
"box-shadow": `inset 0 0 8px 0px ${lineColor || this.line.lineColor}`
|
|
2750
|
+
};
|
|
2797
2751
|
}
|
|
2798
2752
|
} else {
|
|
2799
|
-
lineType = {
|
|
2753
|
+
lineType = {
|
|
2754
|
+
"border-bottom": `2px ${this.line.lineType} ${lineColor || this.line.lineColor}`
|
|
2755
|
+
};
|
|
2800
2756
|
}
|
|
2801
2757
|
let backgroundColor = {};
|
|
2802
2758
|
let headerHeight = {};
|
|
@@ -2824,8 +2780,8 @@ const _sfc_main$8 = {
|
|
|
2824
2780
|
};
|
|
2825
2781
|
const _hoisted_1$8 = { class: "kd-lane-chart-container-text-container" };
|
|
2826
2782
|
const _hoisted_2$7 = { class: "left" };
|
|
2827
|
-
const _hoisted_3$
|
|
2828
|
-
const _hoisted_4$
|
|
2783
|
+
const _hoisted_3$6 = { class: "center" };
|
|
2784
|
+
const _hoisted_4$6 = { class: "right" };
|
|
2829
2785
|
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2830
2786
|
return openBlock(), createElementBlock("div", {
|
|
2831
2787
|
class: normalizeClass(["kd-lane-chart-container-header-item", { "kd-lane-chart-container-header-item_warning": $options.isShowWarning() }]),
|
|
@@ -2833,8 +2789,8 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2833
2789
|
onClick: _cache[0] || (_cache[0] = (...args) => $options.toggleIsUsed && $options.toggleIsUsed(...args))
|
|
2834
2790
|
}, [
|
|
2835
2791
|
createElementVNode("div", _hoisted_1$8, [
|
|
2836
|
-
createElementVNode("span", _hoisted_2$7, toDisplayString($props.line.min ||
|
|
2837
|
-
createElementVNode("div", _hoisted_3$
|
|
2792
|
+
createElementVNode("span", _hoisted_2$7, toDisplayString($props.line.min || $props.lineRange[$props.line.lineId] && $props.lineRange[$props.line.lineId].min || 0), 1),
|
|
2793
|
+
createElementVNode("div", _hoisted_3$6, [
|
|
2838
2794
|
createElementVNode("div", {
|
|
2839
2795
|
class: "paramsTitle",
|
|
2840
2796
|
style: normalizeStyle($options.getFontSize("label"))
|
|
@@ -2845,7 +2801,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2845
2801
|
style: normalizeStyle($options.getFontSize("data"))
|
|
2846
2802
|
}, toDisplayString($options.getCurrentData()), 5)) : createCommentVNode("", true)
|
|
2847
2803
|
]),
|
|
2848
|
-
createElementVNode("span", _hoisted_4$
|
|
2804
|
+
createElementVNode("span", _hoisted_4$6, toDisplayString($props.line.max || $props.lineRange[$props.line.lineId] && $props.lineRange[$props.line.lineId].max || 0), 1),
|
|
2849
2805
|
createElementVNode("div", {
|
|
2850
2806
|
class: "gradient-display",
|
|
2851
2807
|
style: normalizeStyle($options.gradientDisplay)
|
|
@@ -2853,7 +2809,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2853
2809
|
])
|
|
2854
2810
|
], 6);
|
|
2855
2811
|
}
|
|
2856
|
-
const HeaderItem = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-
|
|
2812
|
+
const HeaderItem = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8], ["__scopeId", "data-v-28f8ebac"]]);
|
|
2857
2813
|
const _sfc_main$7 = {
|
|
2858
2814
|
name: "LegendItem",
|
|
2859
2815
|
props: {
|
|
@@ -2970,10 +2926,10 @@ const _sfc_main$7 = {
|
|
|
2970
2926
|
};
|
|
2971
2927
|
const _hoisted_1$7 = { class: "legend-label" };
|
|
2972
2928
|
const _hoisted_2$6 = { class: "legend-content" };
|
|
2973
|
-
const _hoisted_3$
|
|
2974
|
-
const _hoisted_4$
|
|
2975
|
-
const _hoisted_5$
|
|
2976
|
-
const _hoisted_6$
|
|
2929
|
+
const _hoisted_3$5 = { class: "scale-left" };
|
|
2930
|
+
const _hoisted_4$5 = ["onClick"];
|
|
2931
|
+
const _hoisted_5$4 = { class: "legend-line-item-top" };
|
|
2932
|
+
const _hoisted_6$4 = { class: "legend-text" };
|
|
2977
2933
|
const _hoisted_7$3 = {
|
|
2978
2934
|
key: 0,
|
|
2979
2935
|
class: "legend-data"
|
|
@@ -2986,7 +2942,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2986
2942
|
}, [
|
|
2987
2943
|
createElementVNode("div", _hoisted_1$7, toDisplayString($options.getParamName()), 1),
|
|
2988
2944
|
createElementVNode("div", _hoisted_2$6, [
|
|
2989
|
-
createElementVNode("div", _hoisted_3$
|
|
2945
|
+
createElementVNode("div", _hoisted_3$5, toDisplayString($props.line.min || 0), 1),
|
|
2990
2946
|
createElementVNode("div", {
|
|
2991
2947
|
class: "legend-lines",
|
|
2992
2948
|
style: normalizeStyle({ flexDirection: $props.formCache.displayType == "header" ? "column" : "row" })
|
|
@@ -2998,15 +2954,15 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2998
2954
|
onClick: ($event) => $options.toggleLegend(legend.label),
|
|
2999
2955
|
style: normalizeStyle({ opacity: legend.isUsed ? 1 : 0.5 })
|
|
3000
2956
|
}, [
|
|
3001
|
-
createElementVNode("div", _hoisted_5$
|
|
2957
|
+
createElementVNode("div", _hoisted_5$4, [
|
|
3002
2958
|
createElementVNode("div", {
|
|
3003
2959
|
class: normalizeClass(["legend-color", legend.lineType]),
|
|
3004
2960
|
style: normalizeStyle({ borderBottom: `2px ${legend.lineType} ${legend.color}` })
|
|
3005
2961
|
}, null, 6),
|
|
3006
|
-
createElementVNode("div", _hoisted_6$
|
|
2962
|
+
createElementVNode("div", _hoisted_6$4, toDisplayString(legend.label), 1)
|
|
3007
2963
|
]),
|
|
3008
2964
|
$props.formCache.displayType == "header" ? (openBlock(), createElementBlock("div", _hoisted_7$3, toDisplayString(legend.data), 1)) : createCommentVNode("", true)
|
|
3009
|
-
], 12, _hoisted_4$
|
|
2965
|
+
], 12, _hoisted_4$5);
|
|
3010
2966
|
}), 128))
|
|
3011
2967
|
], 4),
|
|
3012
2968
|
createElementVNode("div", _hoisted_8$2, toDisplayString($props.line.max || 20), 1)
|
|
@@ -3096,6 +3052,16 @@ const _sfc_main$6 = {
|
|
|
3096
3052
|
showContextMenuStatus: {
|
|
3097
3053
|
type: Boolean,
|
|
3098
3054
|
default: true
|
|
3055
|
+
},
|
|
3056
|
+
// 当前选中的泳道ID(用于在头部显示红色边框)
|
|
3057
|
+
activeLaneId: {
|
|
3058
|
+
type: [String, Number],
|
|
3059
|
+
default: null
|
|
3060
|
+
},
|
|
3061
|
+
// 是否为地应力模式(只有为 true 时才启用泳道选中功能)
|
|
3062
|
+
isGeomechanical: {
|
|
3063
|
+
type: Boolean,
|
|
3064
|
+
default: false
|
|
3099
3065
|
}
|
|
3100
3066
|
},
|
|
3101
3067
|
data() {
|
|
@@ -3120,7 +3086,8 @@ const _sfc_main$6 = {
|
|
|
3120
3086
|
domHeight: 0,
|
|
3121
3087
|
positionInfo: {},
|
|
3122
3088
|
resizeObserver: null,
|
|
3123
|
-
resizeObserverContainer: null
|
|
3089
|
+
resizeObserverContainer: null,
|
|
3090
|
+
scrollbarHeight: 0
|
|
3124
3091
|
};
|
|
3125
3092
|
},
|
|
3126
3093
|
created() {
|
|
@@ -3144,6 +3111,7 @@ const _sfc_main$6 = {
|
|
|
3144
3111
|
}
|
|
3145
3112
|
},
|
|
3146
3113
|
mounted() {
|
|
3114
|
+
this.parentElement = document.querySelector(".kd-lane-chart-container");
|
|
3147
3115
|
window.addEventListener("mousemove", this.resize);
|
|
3148
3116
|
window.addEventListener("mouseup", this.stopResize);
|
|
3149
3117
|
this.updateDomHeight();
|
|
@@ -3224,8 +3192,13 @@ const _sfc_main$6 = {
|
|
|
3224
3192
|
const headerStyle = this.headerStyle;
|
|
3225
3193
|
const heightNum = pxToNumber(headerStyle.height);
|
|
3226
3194
|
const minHeightNum = pxToNumber(headerStyle["min-height"]);
|
|
3227
|
-
const maxHeightNum = this.percentorpxToNumber(
|
|
3228
|
-
|
|
3195
|
+
const maxHeightNum = this.percentorpxToNumber(
|
|
3196
|
+
headerStyle["max-height"] || "40%"
|
|
3197
|
+
);
|
|
3198
|
+
const actualHeight = Math.max(
|
|
3199
|
+
Math.min(heightNum, maxHeightNum),
|
|
3200
|
+
minHeightNum
|
|
3201
|
+
);
|
|
3229
3202
|
return actualHeight;
|
|
3230
3203
|
},
|
|
3231
3204
|
handleResize() {
|
|
@@ -3245,6 +3218,17 @@ const _sfc_main$6 = {
|
|
|
3245
3218
|
const container = this.$refs.targetDom;
|
|
3246
3219
|
if (container) {
|
|
3247
3220
|
this.domHeight = container.clientHeight;
|
|
3221
|
+
this.updateScrollbarHeight();
|
|
3222
|
+
}
|
|
3223
|
+
},
|
|
3224
|
+
updateScrollbarHeight() {
|
|
3225
|
+
var _a;
|
|
3226
|
+
const scrollContent = (_a = this.$el) == null ? void 0 : _a.querySelector(".kd-lane-chart-scroll-content");
|
|
3227
|
+
if (scrollContent) {
|
|
3228
|
+
const scrollbarHeight = scrollContent.offsetHeight - scrollContent.clientHeight;
|
|
3229
|
+
this.scrollbarHeight = scrollbarHeight > 0 ? scrollbarHeight : 0;
|
|
3230
|
+
} else {
|
|
3231
|
+
this.scrollbarHeight = 0;
|
|
3248
3232
|
}
|
|
3249
3233
|
},
|
|
3250
3234
|
updateLaneWidthOverrides() {
|
|
@@ -3282,49 +3266,16 @@ const _sfc_main$6 = {
|
|
|
3282
3266
|
const deltaX = event.clientX - this.startX;
|
|
3283
3267
|
if (deltaX === 0) return;
|
|
3284
3268
|
const lanes = this.currentTemplate.lanes;
|
|
3285
|
-
const laneIndex = lanes.findIndex(
|
|
3269
|
+
const laneIndex = lanes.findIndex(
|
|
3270
|
+
(l) => l.laneId === this.currentLane.laneId
|
|
3271
|
+
);
|
|
3286
3272
|
if (laneIndex === -1) return;
|
|
3287
3273
|
const minWidth = 40;
|
|
3288
3274
|
const getWidth = (lane) => this.getEffectiveLaneWidthPx(lane);
|
|
3289
3275
|
const currentLane = lanes[laneIndex];
|
|
3290
3276
|
let currentWidth = getWidth(currentLane);
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
if (rightLanes.length === 0) return;
|
|
3294
|
-
let totalShrinkable = rightLanes.reduce((sum, l) => sum + (getWidth(l) - minWidth), 0);
|
|
3295
|
-
let actualDelta = Math.min(deltaX, totalShrinkable);
|
|
3296
|
-
if (actualDelta <= 0) return;
|
|
3297
|
-
this.setLaneWidthOverride(currentLane.laneId, currentWidth + actualDelta);
|
|
3298
|
-
rightLanes.forEach((lane) => {
|
|
3299
|
-
let w = getWidth(lane);
|
|
3300
|
-
let reducible = w - minWidth;
|
|
3301
|
-
let reduce = totalShrinkable > 0 ? reducible / totalShrinkable * actualDelta : 0;
|
|
3302
|
-
this.setLaneWidthOverride(lane.laneId, Math.max(minWidth, w - reduce));
|
|
3303
|
-
});
|
|
3304
|
-
} else {
|
|
3305
|
-
const rightLane = lanes[laneIndex + 1];
|
|
3306
|
-
if (!rightLane) return;
|
|
3307
|
-
const leftLanes = lanes.slice(0, laneIndex);
|
|
3308
|
-
let rightWidth = getWidth(rightLane);
|
|
3309
|
-
let shrinkAmount = Math.abs(deltaX);
|
|
3310
|
-
let leftShrinkable = leftLanes.reduce((sum, l) => sum + (getWidth(l) - minWidth), 0);
|
|
3311
|
-
let currentShrinkable = currentWidth - minWidth;
|
|
3312
|
-
let totalShrinkable = leftShrinkable + currentShrinkable;
|
|
3313
|
-
let actualShrink = Math.min(shrinkAmount, totalShrinkable);
|
|
3314
|
-
if (actualShrink <= 0) return;
|
|
3315
|
-
let currentReduce = Math.min(currentShrinkable, actualShrink);
|
|
3316
|
-
this.setLaneWidthOverride(currentLane.laneId, currentWidth - currentReduce);
|
|
3317
|
-
let remain = actualShrink - currentReduce;
|
|
3318
|
-
if (remain > 0 && leftLanes.length > 0) {
|
|
3319
|
-
leftLanes.forEach((lane) => {
|
|
3320
|
-
let w = getWidth(lane);
|
|
3321
|
-
let reducible = w - minWidth;
|
|
3322
|
-
let reduce = leftShrinkable > 0 ? reducible / leftShrinkable * remain : 0;
|
|
3323
|
-
this.setLaneWidthOverride(lane.laneId, Math.max(minWidth, w - reduce));
|
|
3324
|
-
});
|
|
3325
|
-
}
|
|
3326
|
-
this.setLaneWidthOverride(rightLane.laneId, rightWidth + actualShrink);
|
|
3327
|
-
}
|
|
3277
|
+
let newWidth = Math.max(minWidth, currentWidth + deltaX);
|
|
3278
|
+
this.setLaneWidthOverride(currentLane.laneId, newWidth);
|
|
3328
3279
|
this.startX = event.clientX;
|
|
3329
3280
|
this.$forceUpdate();
|
|
3330
3281
|
},
|
|
@@ -3335,6 +3286,7 @@ const _sfc_main$6 = {
|
|
|
3335
3286
|
this.resizeDirection = null;
|
|
3336
3287
|
this.startX = 0;
|
|
3337
3288
|
this.startWidth = 0;
|
|
3289
|
+
this.updateScrollbarHeight();
|
|
3338
3290
|
this.$emit("lane-width-change", this.laneWidthOverrides);
|
|
3339
3291
|
},
|
|
3340
3292
|
// 获取指定泳道的DOM元素
|
|
@@ -3342,7 +3294,9 @@ const _sfc_main$6 = {
|
|
|
3342
3294
|
if (!this.$refs.refLaneDiv) return null;
|
|
3343
3295
|
const id = laneId != null ? String(laneId) : "";
|
|
3344
3296
|
if (Array.isArray(this.$refs.refLaneDiv)) {
|
|
3345
|
-
return this.$refs.refLaneDiv.find(
|
|
3297
|
+
return this.$refs.refLaneDiv.find(
|
|
3298
|
+
(el) => el.getAttribute("lane-id") === id
|
|
3299
|
+
);
|
|
3346
3300
|
}
|
|
3347
3301
|
return this.$refs.refLaneDiv.getAttribute("lane-id") === id ? this.$refs.refLaneDiv : null;
|
|
3348
3302
|
},
|
|
@@ -3355,7 +3309,9 @@ const _sfc_main$6 = {
|
|
|
3355
3309
|
// 将当前模板中的泳道/曲线顺序同步到 treeTemplates,避免拖拽后图表仍用旧结构
|
|
3356
3310
|
syncTreeTemplateFromCurrent() {
|
|
3357
3311
|
if (!this.currentTemplate || !this.treeTemplates) return;
|
|
3358
|
-
const tpl = this.treeTemplates.find(
|
|
3312
|
+
const tpl = this.treeTemplates.find(
|
|
3313
|
+
(t) => t.templateId === this.currentTemplate.templateId
|
|
3314
|
+
);
|
|
3359
3315
|
if (tpl && tpl !== this.currentTemplate) {
|
|
3360
3316
|
tpl.lanes = this.currentTemplate.lanes;
|
|
3361
3317
|
}
|
|
@@ -3417,7 +3373,9 @@ const _sfc_main$6 = {
|
|
|
3417
3373
|
const currentLanes = this.currentTemplate.lanes;
|
|
3418
3374
|
currentLanes.forEach((lane) => {
|
|
3419
3375
|
if (lane.laneId != savedData.laneId) {
|
|
3420
|
-
const staleIndex = (lane.lines || []).findIndex(
|
|
3376
|
+
const staleIndex = (lane.lines || []).findIndex(
|
|
3377
|
+
(line) => line.lineId == savedData.lineId
|
|
3378
|
+
);
|
|
3421
3379
|
if (staleIndex >= 0) {
|
|
3422
3380
|
lane.lines.splice(staleIndex, 1);
|
|
3423
3381
|
}
|
|
@@ -3473,7 +3431,9 @@ const _sfc_main$6 = {
|
|
|
3473
3431
|
} else {
|
|
3474
3432
|
const template = this.treeTemplates[index2];
|
|
3475
3433
|
const lanes = template.lanes || [];
|
|
3476
|
-
const laneIndex = lanes.findIndex(
|
|
3434
|
+
const laneIndex = lanes.findIndex(
|
|
3435
|
+
(lane) => lane.laneId == savedData.laneId
|
|
3436
|
+
);
|
|
3477
3437
|
if (laneIndex < 0) {
|
|
3478
3438
|
lanes.push(savedData);
|
|
3479
3439
|
} else {
|
|
@@ -3490,7 +3450,17 @@ const _sfc_main$6 = {
|
|
|
3490
3450
|
if (isArray) {
|
|
3491
3451
|
return this.$refs.refLaneDiv.map((item) => {
|
|
3492
3452
|
const { x, y, width, height, top, right, bottom, left } = item.getBoundingClientRect();
|
|
3493
|
-
return {
|
|
3453
|
+
return {
|
|
3454
|
+
x,
|
|
3455
|
+
y,
|
|
3456
|
+
width,
|
|
3457
|
+
height,
|
|
3458
|
+
top,
|
|
3459
|
+
bottom,
|
|
3460
|
+
right,
|
|
3461
|
+
left,
|
|
3462
|
+
"lane-id": item.getAttribute("lane-id")
|
|
3463
|
+
};
|
|
3494
3464
|
});
|
|
3495
3465
|
} else {
|
|
3496
3466
|
return [this.$refs.refLaneDiv.getBoundingClientRect()];
|
|
@@ -3531,9 +3501,20 @@ const _sfc_main$6 = {
|
|
|
3531
3501
|
if (type === "slot") {
|
|
3532
3502
|
return isWidthNumeric ? { width: `${widthPx}px` } : { width: "auto" };
|
|
3533
3503
|
} else {
|
|
3534
|
-
return isWidthNumeric ? { width: `${widthPx}px` } : { flex:
|
|
3504
|
+
return isWidthNumeric ? { width: `${widthPx}px` } : { flex: 1 };
|
|
3535
3505
|
}
|
|
3536
3506
|
},
|
|
3507
|
+
// 获取泳道头部样式,选中泳道添加红色边框(仅地应力模式)
|
|
3508
|
+
getLaneHeaderStyle(lane) {
|
|
3509
|
+
const base = this.headerStyle;
|
|
3510
|
+
const isActive = this.isGeomechanical && this.activeLaneId != null && lane && lane.laneId === this.activeLaneId;
|
|
3511
|
+
if (!isActive) return base;
|
|
3512
|
+
return {
|
|
3513
|
+
...base,
|
|
3514
|
+
boxSizing: "border-box",
|
|
3515
|
+
border: "1px solid #F86C59"
|
|
3516
|
+
};
|
|
3517
|
+
},
|
|
3537
3518
|
setExpanded() {
|
|
3538
3519
|
this.$refs.curveConfig.setExpanded();
|
|
3539
3520
|
},
|
|
@@ -3640,7 +3621,9 @@ const _sfc_main$6 = {
|
|
|
3640
3621
|
return;
|
|
3641
3622
|
}
|
|
3642
3623
|
const template = this.treeTemplates[index2];
|
|
3643
|
-
const laneIndex = template.lanes.findIndex(
|
|
3624
|
+
const laneIndex = template.lanes.findIndex(
|
|
3625
|
+
(lane) => lane.laneId == delLane.laneId
|
|
3626
|
+
);
|
|
3644
3627
|
template.lanes.splice(laneIndex, 1);
|
|
3645
3628
|
if (this.currentTemplate.templateId == templateId) {
|
|
3646
3629
|
this.setDefaultAndNotify("changeNumber");
|
|
@@ -3657,7 +3640,9 @@ const _sfc_main$6 = {
|
|
|
3657
3640
|
} else {
|
|
3658
3641
|
const template = this.treeTemplates[index2];
|
|
3659
3642
|
const lanes = template.lanes || [];
|
|
3660
|
-
const laneIndex = lanes.findIndex(
|
|
3643
|
+
const laneIndex = lanes.findIndex(
|
|
3644
|
+
(lane) => lane.laneId == savedData.laneId
|
|
3645
|
+
);
|
|
3661
3646
|
if (laneIndex < 0) {
|
|
3662
3647
|
lanes.push(savedData);
|
|
3663
3648
|
} else {
|
|
@@ -3753,7 +3738,9 @@ const _sfc_main$6 = {
|
|
|
3753
3738
|
this.setDefaultAndNotify();
|
|
3754
3739
|
}).catch((e) => {
|
|
3755
3740
|
var _a, _b;
|
|
3756
|
-
console.error(
|
|
3741
|
+
console.error(
|
|
3742
|
+
`加载配置失败: ${(_a = this.config) == null ? void 0 : _a.caseId},${(_b = this.config) == null ? void 0 : _b.versionCode},${e.message}`
|
|
3743
|
+
);
|
|
3757
3744
|
}).finally(() => {
|
|
3758
3745
|
this.isLoading = false;
|
|
3759
3746
|
});
|
|
@@ -3769,14 +3756,18 @@ const _sfc_main$6 = {
|
|
|
3769
3756
|
console.warn("未加载到泳道模板配置,图表将无法渲染曲线");
|
|
3770
3757
|
return;
|
|
3771
3758
|
}
|
|
3772
|
-
const publicTemplates = this.treeTemplates.find(
|
|
3759
|
+
const publicTemplates = this.treeTemplates.find(
|
|
3760
|
+
(template) => template.isPublic === "1"
|
|
3761
|
+
);
|
|
3773
3762
|
if (publicTemplates) {
|
|
3774
3763
|
if (prevTemplateId === publicTemplates.templateId && draggedLanes) {
|
|
3775
3764
|
publicTemplates.lanes = draggedLanes;
|
|
3776
3765
|
}
|
|
3777
3766
|
this.currentTemplate = publicTemplates;
|
|
3778
3767
|
} else {
|
|
3779
|
-
const sysTemplate = this.treeTemplates.find(
|
|
3768
|
+
const sysTemplate = this.treeTemplates.find(
|
|
3769
|
+
(template) => template.createUser == "SYSTEM_USER"
|
|
3770
|
+
);
|
|
3780
3771
|
if (sysTemplate) {
|
|
3781
3772
|
sysTemplate.isPublic = "1";
|
|
3782
3773
|
this.currentTemplate = sysTemplate;
|
|
@@ -3795,7 +3786,9 @@ const _sfc_main$6 = {
|
|
|
3795
3786
|
this.$emit("params-change", this.params);
|
|
3796
3787
|
this.$nextTick(() => {
|
|
3797
3788
|
const { lanes = [] } = this.currentTemplate || {};
|
|
3798
|
-
const needsUpdate = lanes.some(
|
|
3789
|
+
const needsUpdate = lanes.some(
|
|
3790
|
+
(lane) => !this.laneWidthOverrides[String(lane.laneId)]
|
|
3791
|
+
);
|
|
3799
3792
|
console.log(needsUpdate, "needsUpdate");
|
|
3800
3793
|
if (needsUpdate) {
|
|
3801
3794
|
this.updateLaneWidthOverrides();
|
|
@@ -3815,9 +3808,16 @@ const _sfc_main$6 = {
|
|
|
3815
3808
|
computed: {
|
|
3816
3809
|
contextMenuOptions() {
|
|
3817
3810
|
if (this.config.type == "local") {
|
|
3818
|
-
return [
|
|
3811
|
+
return [
|
|
3812
|
+
{ name: "编辑模板", key: "editTemplate" },
|
|
3813
|
+
{ name: "恢复默认", key: "restoreSetting" },
|
|
3814
|
+
...this.customMenuList
|
|
3815
|
+
];
|
|
3819
3816
|
} else {
|
|
3820
|
-
return [
|
|
3817
|
+
return [
|
|
3818
|
+
{ name: "编辑模板", key: "editTemplate" },
|
|
3819
|
+
...this.customMenuList
|
|
3820
|
+
];
|
|
3821
3821
|
}
|
|
3822
3822
|
},
|
|
3823
3823
|
paramsNameMap() {
|
|
@@ -3830,6 +3830,19 @@ const _sfc_main$6 = {
|
|
|
3830
3830
|
}
|
|
3831
3831
|
return result;
|
|
3832
3832
|
},
|
|
3833
|
+
fixedLanes() {
|
|
3834
|
+
const { lanes = [] } = this.currentTemplate || {};
|
|
3835
|
+
return lanes.filter((lane) => lane.canScroll === false);
|
|
3836
|
+
},
|
|
3837
|
+
scrollableLanes: {
|
|
3838
|
+
get() {
|
|
3839
|
+
const { lanes = [] } = this.currentTemplate || {};
|
|
3840
|
+
return lanes.filter((lane) => lane.canScroll !== false);
|
|
3841
|
+
},
|
|
3842
|
+
set(newVal) {
|
|
3843
|
+
this.currentTemplate.lanes = [...this.fixedLanes, ...newVal];
|
|
3844
|
+
}
|
|
3845
|
+
},
|
|
3833
3846
|
/**
|
|
3834
3847
|
* 计算当前模板中所有车道(lane)的最大行数。
|
|
3835
3848
|
* @returns {number} 返回所有车道中的最大行数,如果没有车道则返回0。
|
|
@@ -3846,7 +3859,11 @@ const _sfc_main$6 = {
|
|
|
3846
3859
|
headerStyle() {
|
|
3847
3860
|
var _a;
|
|
3848
3861
|
if (!this.isKdCurveV2) {
|
|
3849
|
-
const common2 = {
|
|
3862
|
+
const common2 = {
|
|
3863
|
+
gap: `${this.itemGap}px`,
|
|
3864
|
+
padding: `${this.headerPadding}px`,
|
|
3865
|
+
"max-height": "40%"
|
|
3866
|
+
};
|
|
3850
3867
|
if (!this.currentTemplate) {
|
|
3851
3868
|
return { ...common2, height: "30%", "min-height": "60px" };
|
|
3852
3869
|
} else {
|
|
@@ -3864,7 +3881,10 @@ const _sfc_main$6 = {
|
|
|
3864
3881
|
}
|
|
3865
3882
|
}
|
|
3866
3883
|
}
|
|
3867
|
-
const common = {
|
|
3884
|
+
const common = {
|
|
3885
|
+
gap: `${this.currentHeaderStyle.itemGap}px`,
|
|
3886
|
+
padding: `${this.currentHeaderStyle.headerPadding}px`
|
|
3887
|
+
};
|
|
3868
3888
|
if (!this.currentTemplate) {
|
|
3869
3889
|
let data = {
|
|
3870
3890
|
...common,
|
|
@@ -3872,11 +3892,19 @@ const _sfc_main$6 = {
|
|
|
3872
3892
|
"min-height": "60px",
|
|
3873
3893
|
"max-height": "30%"
|
|
3874
3894
|
};
|
|
3875
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
3895
|
+
if (Object.prototype.hasOwnProperty.call(
|
|
3896
|
+
this.currentHeaderStyle,
|
|
3897
|
+
"headerHeight"
|
|
3898
|
+
)) {
|
|
3876
3899
|
data.height = isNumeric(this.currentHeaderStyle.headerHeight) ? this.currentHeaderStyle.headerHeight + "px" : this.currentHeaderStyle.headerHeight;
|
|
3877
3900
|
}
|
|
3878
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
3879
|
-
|
|
3901
|
+
if (Object.prototype.hasOwnProperty.call(
|
|
3902
|
+
this.currentHeaderStyle,
|
|
3903
|
+
"maxHeaderHeight"
|
|
3904
|
+
)) {
|
|
3905
|
+
data["max-height"] = isNumeric(
|
|
3906
|
+
this.currentHeaderStyle.maxHeaderHeight
|
|
3907
|
+
) ? this.currentHeaderStyle.maxHeaderHeight + "px" : this.currentHeaderStyle.maxHeaderHeight;
|
|
3880
3908
|
}
|
|
3881
3909
|
return data;
|
|
3882
3910
|
} else {
|
|
@@ -3888,11 +3916,19 @@ const _sfc_main$6 = {
|
|
|
3888
3916
|
"min-height": "60px",
|
|
3889
3917
|
"max-height": "30%"
|
|
3890
3918
|
};
|
|
3891
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
3919
|
+
if (Object.prototype.hasOwnProperty.call(
|
|
3920
|
+
this.currentHeaderStyle,
|
|
3921
|
+
"headerHeight"
|
|
3922
|
+
)) {
|
|
3892
3923
|
data.height = isNumeric(this.currentHeaderStyle.headerHeight) ? this.currentHeaderStyle.headerHeight + "px" : this.currentHeaderStyle.headerHeight;
|
|
3893
3924
|
}
|
|
3894
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
3895
|
-
|
|
3925
|
+
if (Object.prototype.hasOwnProperty.call(
|
|
3926
|
+
this.currentHeaderStyle,
|
|
3927
|
+
"maxHeaderHeight"
|
|
3928
|
+
)) {
|
|
3929
|
+
data["max-height"] = isNumeric(
|
|
3930
|
+
this.currentHeaderStyle.maxHeaderHeight
|
|
3931
|
+
) ? this.currentHeaderStyle.maxHeaderHeight + "px" : this.currentHeaderStyle.maxHeaderHeight;
|
|
3896
3932
|
}
|
|
3897
3933
|
return data;
|
|
3898
3934
|
} else {
|
|
@@ -3903,11 +3939,19 @@ const _sfc_main$6 = {
|
|
|
3903
3939
|
"min-height": "60px",
|
|
3904
3940
|
"max-height": "30%"
|
|
3905
3941
|
};
|
|
3906
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
3942
|
+
if (Object.prototype.hasOwnProperty.call(
|
|
3943
|
+
this.currentHeaderStyle,
|
|
3944
|
+
"headerHeight"
|
|
3945
|
+
)) {
|
|
3907
3946
|
data.height = isNumeric(this.currentHeaderStyle.headerHeight) ? this.currentHeaderStyle.headerHeight + "px" : this.currentHeaderStyle.headerHeight;
|
|
3908
3947
|
}
|
|
3909
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
3910
|
-
|
|
3948
|
+
if (Object.prototype.hasOwnProperty.call(
|
|
3949
|
+
this.currentHeaderStyle,
|
|
3950
|
+
"maxHeaderHeight"
|
|
3951
|
+
)) {
|
|
3952
|
+
data["max-height"] = isNumeric(
|
|
3953
|
+
this.currentHeaderStyle.maxHeaderHeight
|
|
3954
|
+
) ? this.currentHeaderStyle.maxHeaderHeight + "px" : this.currentHeaderStyle.maxHeaderHeight;
|
|
3911
3955
|
}
|
|
3912
3956
|
return data;
|
|
3913
3957
|
}
|
|
@@ -3939,11 +3983,19 @@ const _sfc_main$6 = {
|
|
|
3939
3983
|
"min-height": "60px",
|
|
3940
3984
|
"max-height": "30%"
|
|
3941
3985
|
};
|
|
3942
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
3986
|
+
if (Object.prototype.hasOwnProperty.call(
|
|
3987
|
+
this.currentHeaderStyle,
|
|
3988
|
+
"headerHeight"
|
|
3989
|
+
)) {
|
|
3943
3990
|
data.height = isNumeric(this.currentHeaderStyle.headerHeight) ? this.currentHeaderStyle.headerHeight + "px" : this.currentHeaderStyle.headerHeight;
|
|
3944
3991
|
}
|
|
3945
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
3946
|
-
|
|
3992
|
+
if (Object.prototype.hasOwnProperty.call(
|
|
3993
|
+
this.currentHeaderStyle,
|
|
3994
|
+
"maxHeaderHeight"
|
|
3995
|
+
)) {
|
|
3996
|
+
data["max-height"] = isNumeric(
|
|
3997
|
+
this.currentHeaderStyle.maxHeaderHeight
|
|
3998
|
+
) ? this.currentHeaderStyle.maxHeaderHeight + "px" : this.currentHeaderStyle.maxHeaderHeight;
|
|
3947
3999
|
}
|
|
3948
4000
|
return data;
|
|
3949
4001
|
} else {
|
|
@@ -3954,11 +4006,19 @@ const _sfc_main$6 = {
|
|
|
3954
4006
|
"min-height": "60px",
|
|
3955
4007
|
"max-height": "30%"
|
|
3956
4008
|
};
|
|
3957
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
4009
|
+
if (Object.prototype.hasOwnProperty.call(
|
|
4010
|
+
this.currentHeaderStyle,
|
|
4011
|
+
"headerHeight"
|
|
4012
|
+
)) {
|
|
3958
4013
|
data.height = isNumeric(this.currentHeaderStyle.headerHeight) ? this.currentHeaderStyle.headerHeight + "px" : this.currentHeaderStyle.headerHeight;
|
|
3959
4014
|
}
|
|
3960
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
3961
|
-
|
|
4015
|
+
if (Object.prototype.hasOwnProperty.call(
|
|
4016
|
+
this.currentHeaderStyle,
|
|
4017
|
+
"maxHeaderHeight"
|
|
4018
|
+
)) {
|
|
4019
|
+
data["max-height"] = isNumeric(
|
|
4020
|
+
this.currentHeaderStyle.maxHeaderHeight
|
|
4021
|
+
) ? this.currentHeaderStyle.maxHeaderHeight + "px" : this.currentHeaderStyle.maxHeaderHeight;
|
|
3962
4022
|
}
|
|
3963
4023
|
return data;
|
|
3964
4024
|
} else {
|
|
@@ -3968,11 +4028,19 @@ const _sfc_main$6 = {
|
|
|
3968
4028
|
"min-height": "60px",
|
|
3969
4029
|
"max-height": "30%"
|
|
3970
4030
|
};
|
|
3971
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
4031
|
+
if (Object.prototype.hasOwnProperty.call(
|
|
4032
|
+
this.currentHeaderStyle,
|
|
4033
|
+
"headerHeight"
|
|
4034
|
+
)) {
|
|
3972
4035
|
data.height = isNumeric(this.currentHeaderStyle.headerHeight) ? this.currentHeaderStyle.headerHeight + "px" : this.currentHeaderStyle.headerHeight;
|
|
3973
4036
|
}
|
|
3974
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
3975
|
-
|
|
4037
|
+
if (Object.prototype.hasOwnProperty.call(
|
|
4038
|
+
this.currentHeaderStyle,
|
|
4039
|
+
"maxHeaderHeight"
|
|
4040
|
+
)) {
|
|
4041
|
+
data["max-height"] = isNumeric(
|
|
4042
|
+
this.currentHeaderStyle.maxHeaderHeight
|
|
4043
|
+
) ? this.currentHeaderStyle.maxHeaderHeight + "px" : this.currentHeaderStyle.maxHeaderHeight;
|
|
3976
4044
|
}
|
|
3977
4045
|
return data;
|
|
3978
4046
|
}
|
|
@@ -3982,32 +4050,49 @@ const _sfc_main$6 = {
|
|
|
3982
4050
|
const headerStyle = this.headerStyle;
|
|
3983
4051
|
const heightNum = pxToNumber(headerStyle.height);
|
|
3984
4052
|
const minHeightNum = pxToNumber(headerStyle["min-height"]);
|
|
3985
|
-
const maxHeightNum = this.percentorpxToNumber(
|
|
3986
|
-
|
|
4053
|
+
const maxHeightNum = this.percentorpxToNumber(
|
|
4054
|
+
headerStyle["max-height"] || "40%"
|
|
4055
|
+
);
|
|
4056
|
+
const actualHeight = Math.max(
|
|
4057
|
+
Math.min(heightNum, maxHeightNum),
|
|
4058
|
+
minHeightNum
|
|
4059
|
+
);
|
|
3987
4060
|
return { top: `${actualHeight}px` };
|
|
3988
4061
|
}
|
|
3989
4062
|
}
|
|
3990
4063
|
};
|
|
3991
4064
|
const _hoisted_1$6 = ["id", "lane-id"];
|
|
3992
|
-
const _hoisted_2$5 =
|
|
3993
|
-
|
|
4065
|
+
const _hoisted_2$5 = {
|
|
4066
|
+
key: 0,
|
|
4067
|
+
class: "kd-lane-chart-lane-container-echart"
|
|
4068
|
+
};
|
|
4069
|
+
const _hoisted_3$4 = ["onMousedown"];
|
|
4070
|
+
const _hoisted_4$4 = ["onContextmenu"];
|
|
4071
|
+
const _hoisted_5$3 = {
|
|
4072
|
+
key: 0,
|
|
4073
|
+
class: "kd-lane-chart-lane-container-echart"
|
|
4074
|
+
};
|
|
4075
|
+
const _hoisted_6$3 = ["onMousedown"];
|
|
4076
|
+
const _hoisted_7$2 = ["id", "lane-id"];
|
|
4077
|
+
const _hoisted_8$1 = ["onMousedown"];
|
|
4078
|
+
const _hoisted_9$1 = {
|
|
3994
4079
|
key: 1,
|
|
3995
4080
|
class: "kd-lane-chart-lane-container-echart"
|
|
3996
4081
|
};
|
|
3997
|
-
const
|
|
3998
|
-
const
|
|
4082
|
+
const _hoisted_10$1 = ["onContextmenu"];
|
|
4083
|
+
const _hoisted_11$1 = {
|
|
3999
4084
|
key: 0,
|
|
4000
4085
|
class: "kd-lane-chart-lane-container-echart"
|
|
4001
4086
|
};
|
|
4002
|
-
const
|
|
4003
|
-
const
|
|
4087
|
+
const _hoisted_12$1 = ["onMousedown"];
|
|
4088
|
+
const _hoisted_13$1 = {
|
|
4004
4089
|
key: 1,
|
|
4005
4090
|
class: "kd-lane-chart-lane-container",
|
|
4006
4091
|
ref: "refLaneDiv"
|
|
4007
4092
|
};
|
|
4008
|
-
const
|
|
4009
|
-
const
|
|
4010
|
-
const
|
|
4093
|
+
const _hoisted_14$1 = { class: "custom-dialog__header" };
|
|
4094
|
+
const _hoisted_15$1 = { class: "custom-dialog__body RealTimeCurveConfig_area" };
|
|
4095
|
+
const _hoisted_16$1 = { class: "custom-dialog__footer" };
|
|
4011
4096
|
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4012
4097
|
const _component_HeaderItem = resolveComponent("HeaderItem");
|
|
4013
4098
|
const _component_LegendItem = resolveComponent("LegendItem");
|
|
@@ -4021,111 +4106,227 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4021
4106
|
onContextmenu: _cache[4] || (_cache[4] = (...args) => $options.onParentContextMenu && $options.onParentContextMenu(...args)),
|
|
4022
4107
|
ref: "targetDom"
|
|
4023
4108
|
}, [
|
|
4024
|
-
$data.currentTemplate && $data.currentTemplate.lanes && $data.currentTemplate.lanes.length > 0 ? (openBlock(),
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4109
|
+
$data.currentTemplate && $data.currentTemplate.lanes && $data.currentTemplate.lanes.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4110
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($options.fixedLanes, (lane, index2) => {
|
|
4111
|
+
return openBlock(), createElementBlock("div", {
|
|
4112
|
+
key: lane.laneId,
|
|
4113
|
+
id: `lane-header-${lane.laneId}`,
|
|
4114
|
+
class: normalizeClass([
|
|
4115
|
+
_ctx.$slots[`lane${lane.laneId}`] ? "kd-lane-chart-lane-slot-container" : "kd-lane-chart-lane-container",
|
|
4116
|
+
{
|
|
4117
|
+
"border-left": _ctx.$slots[`lane${lane.laneId}`] ? $props.isKdCurveV2 || !$props.isKdCurveV2 && index2 !== 0 : !$props.isKdCurveV2 && index2 !== 0,
|
|
4118
|
+
"border-top": _ctx.$slots[`lane${lane.laneId}`] && $props.isKdCurveV2,
|
|
4119
|
+
"border-right": _ctx.$slots[`lane${lane.laneId}`] && $props.isKdCurveV2
|
|
4120
|
+
}
|
|
4121
|
+
]),
|
|
4122
|
+
"lane-id": lane.laneId,
|
|
4123
|
+
style: normalizeStyle({
|
|
4124
|
+
...$options.laneContainerStyle(
|
|
4125
|
+
lane,
|
|
4126
|
+
_ctx.$slots[`lane${lane.laneId}`] ? "slot" : "lane"
|
|
4127
|
+
),
|
|
4128
|
+
paddingBottom: $data.scrollbarHeight + "px"
|
|
4129
|
+
}),
|
|
4130
|
+
ref_for: true,
|
|
4131
|
+
ref: "refLaneDiv"
|
|
4132
|
+
}, [
|
|
4133
|
+
_ctx.$slots[`lane${lane.laneId}`] ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4134
|
+
createElementVNode("div", {
|
|
4135
|
+
class: normalizeClass(["kd-lane-chart-lane-header", { "border-bottom": true }]),
|
|
4136
|
+
style: normalizeStyle($options.slotHeaderStyle)
|
|
4137
|
+
}, [
|
|
4138
|
+
renderSlot(_ctx.$slots, `lane${lane.laneId}`, { lane }, void 0, true)
|
|
4139
|
+
], 4),
|
|
4140
|
+
$props.isKdCurveV2 ? (openBlock(), createElementBlock("div", _hoisted_2$5, [
|
|
4141
|
+
renderSlot(_ctx.$slots, `slotheader-content-${lane.laneId}`, { lane }, void 0, true)
|
|
4142
|
+
])) : createCommentVNode("", true),
|
|
4143
|
+
index2 < $options.fixedLanes.length - 1 || $options.scrollableLanes.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
4144
|
+
key: 1,
|
|
4145
|
+
class: "kd-lane-resize-handle kd-lane-resize-handle-right",
|
|
4146
|
+
onMousedown: ($event) => $options.startResize($event, lane, "right")
|
|
4147
|
+
}, null, 40, _hoisted_3$4)) : createCommentVNode("", true)
|
|
4148
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4149
|
+
createElementVNode("div", {
|
|
4150
|
+
class: normalizeClass(["kd-lane-chart-lane-header", {
|
|
4151
|
+
"border-bottom": !$props.isKdCurveV2,
|
|
4152
|
+
"kd-lane-chart-lane-header-isKdCurveV2": $props.isKdCurveV2
|
|
4153
|
+
}]),
|
|
4154
|
+
style: normalizeStyle($options.getLaneHeaderStyle(lane)),
|
|
4155
|
+
onContextmenu: withModifiers(($event) => $options.showContextMenu($event, lane), ["prevent"])
|
|
4156
|
+
}, [
|
|
4157
|
+
createVNode(_component_VueDraggable, {
|
|
4158
|
+
modelValue: lane.lines,
|
|
4159
|
+
"onUpdate:modelValue": ($event) => lane.lines = $event,
|
|
4160
|
+
animation: 200,
|
|
4161
|
+
fallbackOnBody: true,
|
|
4162
|
+
swapThreshold: 0.65,
|
|
4163
|
+
group: { name: "lineGroup", pull: true, put: ["lineGroup"] },
|
|
4164
|
+
onStart: $options.onLineDragStart,
|
|
4165
|
+
onEnd: $options.onLineDragEnd,
|
|
4166
|
+
class: "header-list-gap",
|
|
4167
|
+
style: normalizeStyle({
|
|
4168
|
+
gap: ($props.isKdCurveV2 ? $props.currentHeaderStyle.itemGap : $props.itemGap) + "px"
|
|
4169
|
+
}),
|
|
4170
|
+
"item-key": "lineId",
|
|
4171
|
+
filter: ".no-drag"
|
|
4172
|
+
}, {
|
|
4173
|
+
default: withCtx(() => [
|
|
4174
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(lane.lines || [], (line) => {
|
|
4175
|
+
return openBlock(), createElementBlock("div", {
|
|
4176
|
+
key: line.lineId,
|
|
4177
|
+
class: normalizeClass({ "no-drag": line.canDrag === false })
|
|
4178
|
+
}, [
|
|
4179
|
+
!line.hasOwnProperty("recommendParamId") ? (openBlock(), createBlock(_component_HeaderItem, mergeProps({
|
|
4180
|
+
key: 0,
|
|
4181
|
+
line,
|
|
4182
|
+
paramsNameMap: $options.paramsNameMap
|
|
4183
|
+
}, { ref_for: true }, _ctx.$props, {
|
|
4184
|
+
onContextmenu: withModifiers(($event) => $options.showContextMenu($event, line), ["prevent"]),
|
|
4185
|
+
onUpdateLine: $options.upsertLine
|
|
4186
|
+
}), null, 16, ["line", "paramsNameMap", "onContextmenu", "onUpdateLine"])) : (openBlock(), createBlock(_component_LegendItem, mergeProps({
|
|
4187
|
+
key: 1,
|
|
4188
|
+
line,
|
|
4189
|
+
paramsNameMap: $options.paramsNameMap
|
|
4190
|
+
}, { ref_for: true }, _ctx.$props, {
|
|
4191
|
+
onContextmenu: withModifiers(($event) => $options.showContextMenu($event, line), ["prevent"]),
|
|
4192
|
+
onUpdateLine: $options.upsertLine
|
|
4193
|
+
}), null, 16, ["line", "paramsNameMap", "onContextmenu", "onUpdateLine"]))
|
|
4194
|
+
], 2);
|
|
4195
|
+
}), 128))
|
|
4196
|
+
]),
|
|
4197
|
+
_: 2
|
|
4198
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "onStart", "onEnd", "style"])
|
|
4199
|
+
], 46, _hoisted_4$4),
|
|
4200
|
+
$props.isKdCurveV2 ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
|
|
4201
|
+
renderSlot(_ctx.$slots, `content-${lane.laneId}`, { lane }, void 0, true)
|
|
4202
|
+
])) : createCommentVNode("", true),
|
|
4203
|
+
index2 < $options.fixedLanes.length - 1 || $options.scrollableLanes.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
4204
|
+
key: 1,
|
|
4205
|
+
class: "kd-lane-resize-handle kd-lane-resize-handle-right",
|
|
4206
|
+
onMousedown: ($event) => $options.startResize($event, lane, "right")
|
|
4207
|
+
}, null, 40, _hoisted_6$3)) : createCommentVNode("", true)
|
|
4208
|
+
], 64))
|
|
4209
|
+
], 14, _hoisted_1$6);
|
|
4210
|
+
}), 128)),
|
|
4211
|
+
createVNode(_component_VueDraggable, {
|
|
4212
|
+
class: "kd-lane-chart-scroll-content",
|
|
4213
|
+
onStart: $options.onLaneDragStart,
|
|
4214
|
+
onEnd: $options.onLaneDragEnd,
|
|
4215
|
+
modelValue: $options.scrollableLanes,
|
|
4216
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.scrollableLanes = $event),
|
|
4217
|
+
animation: 200,
|
|
4218
|
+
fallbackOnBody: true,
|
|
4219
|
+
swapThreshold: 0.65,
|
|
4220
|
+
group: { name: "laneGroup", pull: false, put: false },
|
|
4221
|
+
"item-key": "laneId",
|
|
4222
|
+
filter: ".no-drag"
|
|
4223
|
+
}, {
|
|
4224
|
+
default: withCtx(() => [
|
|
4225
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($options.scrollableLanes || [], (lane, index2) => {
|
|
4226
|
+
return openBlock(), createElementBlock("div", {
|
|
4227
|
+
key: lane.laneId,
|
|
4228
|
+
id: `lane-header-${lane.laneId}`,
|
|
4229
|
+
class: normalizeClass([
|
|
4230
|
+
_ctx.$slots[`lane${lane.laneId}`] ? "kd-lane-chart-lane-slot-container" : "kd-lane-chart-lane-container",
|
|
4231
|
+
{
|
|
4232
|
+
"no-drag": lane.canDrag === false,
|
|
4233
|
+
"border-left": _ctx.$slots[`lane${lane.laneId}`] ? $props.isKdCurveV2 || !$props.isKdCurveV2 && (index2 !== 0 || $options.fixedLanes.length > 0) : !$props.isKdCurveV2 && (index2 !== 0 || $options.fixedLanes.length > 0),
|
|
4234
|
+
"border-top": _ctx.$slots[`lane${lane.laneId}`] && $props.isKdCurveV2,
|
|
4235
|
+
"border-right": _ctx.$slots[`lane${lane.laneId}`] && $props.isKdCurveV2
|
|
4236
|
+
}
|
|
4237
|
+
]),
|
|
4238
|
+
"lane-id": lane.laneId,
|
|
4239
|
+
style: normalizeStyle(
|
|
4240
|
+
$options.laneContainerStyle(
|
|
4241
|
+
lane,
|
|
4242
|
+
_ctx.$slots[`lane${lane.laneId}`] ? "slot" : "lane"
|
|
4243
|
+
)
|
|
4244
|
+
),
|
|
4245
|
+
ref_for: true,
|
|
4246
|
+
ref: "refLaneDiv"
|
|
4247
|
+
}, [
|
|
4248
|
+
_ctx.$slots[`lane${lane.laneId}`] ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
4249
|
+
createElementVNode("div", {
|
|
4250
|
+
class: normalizeClass(["kd-lane-chart-lane-header", { "border-bottom": true }]),
|
|
4251
|
+
style: normalizeStyle($options.slotHeaderStyle)
|
|
4252
|
+
}, [
|
|
4253
|
+
renderSlot(_ctx.$slots, `lane${lane.laneId}`, { lane }, void 0, true)
|
|
4254
|
+
], 4),
|
|
4255
|
+
index2 < $options.scrollableLanes.length - 1 ? (openBlock(), createElementBlock("div", {
|
|
4256
|
+
key: 0,
|
|
4257
|
+
class: "kd-lane-resize-handle kd-lane-resize-handle-right",
|
|
4258
|
+
onMousedown: ($event) => $options.startResize($event, lane, "right")
|
|
4259
|
+
}, null, 40, _hoisted_8$1)) : createCommentVNode("", true),
|
|
4260
|
+
$props.isKdCurveV2 ? (openBlock(), createElementBlock("div", _hoisted_9$1, [
|
|
4261
|
+
renderSlot(_ctx.$slots, `slotheader-content-${lane.laneId}`, { lane }, void 0, true)
|
|
4262
|
+
])) : createCommentVNode("", true)
|
|
4263
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4264
|
+
createElementVNode("div", {
|
|
4265
|
+
class: normalizeClass(["kd-lane-chart-lane-header", {
|
|
4266
|
+
"border-bottom": !$props.isKdCurveV2,
|
|
4267
|
+
"kd-lane-chart-lane-header-isKdCurveV2": $props.isKdCurveV2
|
|
4268
|
+
}]),
|
|
4269
|
+
style: normalizeStyle($options.getLaneHeaderStyle(lane)),
|
|
4270
|
+
onContextmenu: withModifiers(($event) => $options.showContextMenu($event, lane), ["prevent"])
|
|
4271
|
+
}, [
|
|
4272
|
+
createVNode(_component_VueDraggable, {
|
|
4273
|
+
modelValue: lane.lines,
|
|
4274
|
+
"onUpdate:modelValue": ($event) => lane.lines = $event,
|
|
4275
|
+
animation: 200,
|
|
4276
|
+
fallbackOnBody: true,
|
|
4277
|
+
swapThreshold: 0.65,
|
|
4278
|
+
group: { name: "lineGroup", pull: true, put: ["lineGroup"] },
|
|
4279
|
+
onStart: $options.onLineDragStart,
|
|
4280
|
+
onEnd: $options.onLineDragEnd,
|
|
4281
|
+
class: "header-list-gap",
|
|
4282
|
+
style: normalizeStyle({
|
|
4283
|
+
gap: ($props.isKdCurveV2 ? $props.currentHeaderStyle.itemGap : $props.itemGap) + "px"
|
|
4284
|
+
}),
|
|
4285
|
+
"item-key": "lineId",
|
|
4286
|
+
filter: ".no-drag"
|
|
4287
|
+
}, {
|
|
4288
|
+
default: withCtx(() => [
|
|
4289
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(lane.lines || [], (line) => {
|
|
4290
|
+
return openBlock(), createElementBlock("div", {
|
|
4291
|
+
key: line.lineId,
|
|
4292
|
+
class: normalizeClass({ "no-drag": line.canDrag === false })
|
|
4293
|
+
}, [
|
|
4294
|
+
!line.hasOwnProperty("recommendParamId") ? (openBlock(), createBlock(_component_HeaderItem, mergeProps({
|
|
4295
|
+
key: 0,
|
|
4296
|
+
line,
|
|
4297
|
+
paramsNameMap: $options.paramsNameMap
|
|
4298
|
+
}, { ref_for: true }, _ctx.$props, {
|
|
4299
|
+
onContextmenu: withModifiers(($event) => $options.showContextMenu($event, line), ["prevent"]),
|
|
4300
|
+
onUpdateLine: $options.upsertLine
|
|
4301
|
+
}), null, 16, ["line", "paramsNameMap", "onContextmenu", "onUpdateLine"])) : (openBlock(), createBlock(_component_LegendItem, mergeProps({
|
|
4302
|
+
key: 1,
|
|
4303
|
+
line,
|
|
4304
|
+
paramsNameMap: $options.paramsNameMap
|
|
4305
|
+
}, { ref_for: true }, _ctx.$props, {
|
|
4306
|
+
onContextmenu: withModifiers(($event) => $options.showContextMenu($event, line), ["prevent"]),
|
|
4307
|
+
onUpdateLine: $options.upsertLine
|
|
4308
|
+
}), null, 16, ["line", "paramsNameMap", "onContextmenu", "onUpdateLine"]))
|
|
4309
|
+
], 2);
|
|
4310
|
+
}), 128))
|
|
4311
|
+
]),
|
|
4312
|
+
_: 2
|
|
4313
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "onStart", "onEnd", "style"])
|
|
4314
|
+
], 46, _hoisted_10$1),
|
|
4315
|
+
$props.isKdCurveV2 ? (openBlock(), createElementBlock("div", _hoisted_11$1, [
|
|
4316
|
+
renderSlot(_ctx.$slots, `content-${lane.laneId}`, { lane }, void 0, true)
|
|
4317
|
+
])) : createCommentVNode("", true),
|
|
4318
|
+
index2 < $options.scrollableLanes.length - 1 ? (openBlock(), createElementBlock("div", {
|
|
4319
|
+
key: 1,
|
|
4320
|
+
class: "kd-lane-resize-handle kd-lane-resize-handle-right",
|
|
4321
|
+
onMousedown: ($event) => $options.startResize($event, lane, "right")
|
|
4322
|
+
}, null, 40, _hoisted_12$1)) : createCommentVNode("", true)
|
|
4323
|
+
], 64))
|
|
4324
|
+
], 14, _hoisted_7$2);
|
|
4325
|
+
}), 128))
|
|
4326
|
+
]),
|
|
4327
|
+
_: 3
|
|
4328
|
+
}, 8, ["onStart", "onEnd", "modelValue"])
|
|
4329
|
+
], 64)) : (openBlock(), createElementBlock("div", _hoisted_13$1, [
|
|
4129
4330
|
createElementVNode("div", {
|
|
4130
4331
|
class: normalizeClass(["kd-lane-chart-lane-header", { "kd-lane-chart-lane-header-isKdCurveV2": $props.isKdCurveV2 }]),
|
|
4131
4332
|
style: normalizeStyle($options.headerStyle),
|
|
@@ -4140,10 +4341,11 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4140
4341
|
renderSlot(_ctx.$slots, "draw-slot", {}, void 0, true)
|
|
4141
4342
|
], 4)) : createCommentVNode("", true),
|
|
4142
4343
|
createVNode(_component_VueSimpleContextMenu, {
|
|
4344
|
+
parentElement: _ctx.parentElement,
|
|
4143
4345
|
options: $options.contextMenuOptions,
|
|
4144
4346
|
ref: "vueSimpleContextMenu",
|
|
4145
4347
|
onOptionClicked: $options.optionClicked
|
|
4146
|
-
}, null, 8, ["options", "onOptionClicked"]),
|
|
4348
|
+
}, null, 8, ["parentElement", "options", "onOptionClicked"]),
|
|
4147
4349
|
createVNode(_component_el_dialog, {
|
|
4148
4350
|
width: "45%",
|
|
4149
4351
|
modelValue: $data.curveConfigVisible,
|
|
@@ -4160,16 +4362,16 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4160
4362
|
"align-center": ""
|
|
4161
4363
|
}, {
|
|
4162
4364
|
header: withCtx(() => [
|
|
4163
|
-
createElementVNode("div",
|
|
4365
|
+
createElementVNode("div", _hoisted_14$1, [
|
|
4164
4366
|
_cache[5] || (_cache[5] = createElementVNode("span", { class: "custom-dialog__title" }, "泳道模板设置", -1)),
|
|
4165
4367
|
createElementVNode("button", {
|
|
4166
4368
|
class: "custom-dialog__close",
|
|
4167
4369
|
onClick: _cache[2] || (_cache[2] = (...args) => $options.closeCurveConfigDialog && $options.closeCurveConfigDialog(...args))
|
|
4168
|
-
}, "×")
|
|
4370
|
+
}, " × ")
|
|
4169
4371
|
])
|
|
4170
4372
|
]),
|
|
4171
4373
|
footer: withCtx(() => [
|
|
4172
|
-
createElementVNode("div",
|
|
4374
|
+
createElementVNode("div", _hoisted_16$1, [
|
|
4173
4375
|
createVNode(_component_el_button, { onClick: $options.closeCurveConfigDialog }, {
|
|
4174
4376
|
default: withCtx(() => [..._cache[6] || (_cache[6] = [
|
|
4175
4377
|
createTextVNode("取消", -1)
|
|
@@ -4188,7 +4390,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4188
4390
|
])
|
|
4189
4391
|
]),
|
|
4190
4392
|
default: withCtx(() => [
|
|
4191
|
-
createElementVNode("div",
|
|
4393
|
+
createElementVNode("div", _hoisted_15$1, [
|
|
4192
4394
|
createVNode(_component_RealTimeCurveConfig, mergeProps({
|
|
4193
4395
|
ref: "curveConfig",
|
|
4194
4396
|
inputTempates: $data.treeTemplates,
|
|
@@ -4205,7 +4407,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4205
4407
|
}, 8, ["modelValue", "onClose"])
|
|
4206
4408
|
], 544);
|
|
4207
4409
|
}
|
|
4208
|
-
const KdLaneContainerComponent = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-
|
|
4410
|
+
const KdLaneContainerComponent = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-423ed0d6"]]);
|
|
4209
4411
|
const SLIDER_GROUP_ID = "depthSliderGroup";
|
|
4210
4412
|
function pad2(n) {
|
|
4211
4413
|
return n < 10 ? "0" + n : "" + n;
|
|
@@ -4317,7 +4519,9 @@ const _sfc_main$5 = {
|
|
|
4317
4519
|
targetSliderIndex: 0,
|
|
4318
4520
|
sliderAnimationId: null,
|
|
4319
4521
|
// 缓存的曲线数据
|
|
4320
|
-
cachedCurveData: []
|
|
4522
|
+
cachedCurveData: [],
|
|
4523
|
+
// 待处理的数据请求信息
|
|
4524
|
+
pendingRequestData: null
|
|
4321
4525
|
};
|
|
4322
4526
|
},
|
|
4323
4527
|
computed: {
|
|
@@ -4380,66 +4584,110 @@ const _sfc_main$5 = {
|
|
|
4380
4584
|
}
|
|
4381
4585
|
},
|
|
4382
4586
|
cachedCurveDatas: {
|
|
4383
|
-
deep: true,
|
|
4384
|
-
immediate: true,
|
|
4385
4587
|
async handler(newVal) {
|
|
4386
|
-
|
|
4588
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
4387
4589
|
await this.$nextTick();
|
|
4388
|
-
const data = newVal && newVal.data ? Array.isArray(newVal.data) ? newVal.data : [newVal.data] : [];
|
|
4389
|
-
const direction = newVal.direction || "bottom";
|
|
4390
4590
|
if (newVal.type === "replace") {
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4591
|
+
this.cachedCurveData = [];
|
|
4592
|
+
let processedData = newVal && newVal.data ? Array.isArray(newVal.data) ? [...newVal.data] : [newVal.data] : [];
|
|
4593
|
+
if (this.formCache.axisType == "time") {
|
|
4594
|
+
const axisKey = ((_c = (_b = (_a = this.getCurrentModeConfig()) == null ? void 0 : _a.datas) == null ? void 0 : _b[0]) == null ? void 0 : _c.xCode) || "timestamp";
|
|
4595
|
+
processedData = processedData.map((item) => ({
|
|
4596
|
+
...item,
|
|
4597
|
+
[axisKey]: this.toMillisecondTimestamp(item[axisKey] || item.timestamp)
|
|
4598
|
+
}));
|
|
4599
|
+
this.cachedCurveData = processedData;
|
|
4600
|
+
} else {
|
|
4601
|
+
const axisKey = ((_f = (_e = (_d = this.getCurrentModeConfig()) == null ? void 0 : _d.datas) == null ? void 0 : _e[0]) == null ? void 0 : _f.xCode) || "depth";
|
|
4602
|
+
if (processedData[0] && processedData[0].timestamp) {
|
|
4603
|
+
processedData = processedData.map((item) => ({
|
|
4396
4604
|
...item,
|
|
4397
|
-
|
|
4398
|
-
};
|
|
4605
|
+
timestamp: this.toMillisecondTimestamp(item.timestamp)
|
|
4606
|
+
}));
|
|
4607
|
+
this.cachedCurveData = this.deduplicateByUniqueKey(this.cachedCurveData, processedData, "timestamp");
|
|
4608
|
+
} else {
|
|
4609
|
+
this.cachedCurveData = this.deduplicateByUniqueKey(this.cachedCurveData, processedData, axisKey);
|
|
4399
4610
|
}
|
|
4400
|
-
|
|
4401
|
-
...item,
|
|
4402
|
-
timestamp: this.toMillisecondTimestamp(item.timestamp)
|
|
4403
|
-
};
|
|
4404
|
-
});
|
|
4405
|
-
this.cachedCurveData = processedData;
|
|
4611
|
+
}
|
|
4406
4612
|
if (this.cachedCurveData.length > 0) {
|
|
4407
4613
|
this.sliderIndex = this.cachedCurveData.length - 1;
|
|
4408
4614
|
this.startIndex = Math.max(0, this.cachedCurveData.length - this.windowSize);
|
|
4409
4615
|
this.targetStartIndex = this.startIndex;
|
|
4410
4616
|
}
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
}
|
|
4421
|
-
return {
|
|
4617
|
+
this.renderChart();
|
|
4618
|
+
} else if (newVal.type === "supplementaryData") {
|
|
4619
|
+
let data = newVal && newVal.data ? Array.isArray(newVal.data) ? [...newVal.data] : [newVal.data] : [];
|
|
4620
|
+
this.handleDataLoaded(data);
|
|
4621
|
+
} else if (newVal.type === "updateData") {
|
|
4622
|
+
let data = newVal && newVal.data ? Array.isArray(newVal.data) ? [...newVal.data] : [newVal.data] : [];
|
|
4623
|
+
const axisKey = ((_i = (_h = (_g = this.getCurrentModeConfig()) == null ? void 0 : _g.datas) == null ? void 0 : _h[0]) == null ? void 0 : _i.xCode) || "depth";
|
|
4624
|
+
if (this.formCache.axisType === "depth") {
|
|
4625
|
+
data = data.map((item) => ({
|
|
4422
4626
|
...item,
|
|
4423
4627
|
timestamp: this.toMillisecondTimestamp(item.timestamp)
|
|
4424
|
-
};
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4628
|
+
}));
|
|
4629
|
+
data.forEach((item) => {
|
|
4630
|
+
const hasTimestamp = item.timestamp !== void 0 && item.timestamp !== null && item.timestamp !== "";
|
|
4631
|
+
if (hasTimestamp) {
|
|
4632
|
+
const matchIndex = this.cachedCurveData.findIndex(
|
|
4633
|
+
(d) => d[axisKey] == item[axisKey] && d.timestamp == item.timestamp
|
|
4634
|
+
);
|
|
4635
|
+
if (matchIndex > -1) {
|
|
4636
|
+
this.$set(this.cachedCurveData, matchIndex, {
|
|
4637
|
+
...this.cachedCurveData[matchIndex],
|
|
4638
|
+
...item
|
|
4639
|
+
});
|
|
4640
|
+
}
|
|
4641
|
+
} else {
|
|
4642
|
+
const matchIndex = this.cachedCurveData.findIndex(
|
|
4643
|
+
(d) => d[axisKey] == item[axisKey]
|
|
4644
|
+
);
|
|
4645
|
+
if (matchIndex > -1) {
|
|
4646
|
+
this.$set(this.cachedCurveData, matchIndex, {
|
|
4647
|
+
...this.cachedCurveData[matchIndex],
|
|
4648
|
+
...item
|
|
4649
|
+
});
|
|
4650
|
+
}
|
|
4651
|
+
}
|
|
4652
|
+
});
|
|
4653
|
+
this.renderChart();
|
|
4654
|
+
}
|
|
4655
|
+
} else {
|
|
4656
|
+
let data = newVal && newVal.data ? Array.isArray(newVal.data) ? [...newVal.data] : [newVal.data] : [];
|
|
4657
|
+
const direction = newVal.direction || "bottom";
|
|
4658
|
+
if (this.formCache.axisType == "time") {
|
|
4659
|
+
const axisKey = ((_l = (_k = (_j = this.getCurrentModeConfig()) == null ? void 0 : _j.datas) == null ? void 0 : _k[0]) == null ? void 0 : _l.xCode) || "timestamp";
|
|
4660
|
+
data = data.map((item) => ({
|
|
4661
|
+
...item,
|
|
4662
|
+
[axisKey]: this.toMillisecondTimestamp(item[axisKey] || item.timestamp)
|
|
4663
|
+
}));
|
|
4664
|
+
this.cachedCurveData = this.deduplicateByUniqueKey(
|
|
4665
|
+
this.cachedCurveData,
|
|
4666
|
+
data,
|
|
4667
|
+
axisKey
|
|
4668
|
+
);
|
|
4431
4669
|
} else {
|
|
4432
|
-
|
|
4670
|
+
data = data.map((item) => ({
|
|
4671
|
+
...item,
|
|
4672
|
+
timestamp: this.toMillisecondTimestamp(item.timestamp)
|
|
4673
|
+
}));
|
|
4674
|
+
if (direction === "top") {
|
|
4675
|
+
const tempData = [...data, ...this.cachedCurveData];
|
|
4676
|
+
this.cachedCurveData = this.deduplicateByUniqueKey([], tempData, "timestamp");
|
|
4677
|
+
} else {
|
|
4678
|
+
this.cachedCurveData = this.deduplicateByUniqueKey(this.cachedCurveData, data, "timestamp");
|
|
4679
|
+
}
|
|
4433
4680
|
}
|
|
4681
|
+
if (this.cachedCurveData.length > 0) {
|
|
4682
|
+
this.sliderIndex = this.cachedCurveData.length - 1;
|
|
4683
|
+
this.startIndex = Math.max(0, this.cachedCurveData.length - this.windowSize);
|
|
4684
|
+
this.targetStartIndex = this.startIndex;
|
|
4685
|
+
}
|
|
4686
|
+
this.renderChart();
|
|
4434
4687
|
}
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
this.startIndex = Math.max(0, this.cachedCurveData.length - this.windowSize);
|
|
4439
|
-
this.targetStartIndex = this.startIndex;
|
|
4440
|
-
}
|
|
4441
|
-
this.renderChart();
|
|
4442
|
-
}
|
|
4688
|
+
},
|
|
4689
|
+
immediate: true,
|
|
4690
|
+
deep: true
|
|
4443
4691
|
},
|
|
4444
4692
|
depthTimeChartData: {
|
|
4445
4693
|
deep: true,
|
|
@@ -4507,6 +4755,81 @@ const _sfc_main$5 = {
|
|
|
4507
4755
|
if (!this.mode) return null;
|
|
4508
4756
|
return this.depthTimeChartData.find((item) => item.mode === this.mode);
|
|
4509
4757
|
},
|
|
4758
|
+
handleDataLoaded(newData) {
|
|
4759
|
+
var _a, _b, _c;
|
|
4760
|
+
if (!this.pendingRequestData) {
|
|
4761
|
+
return;
|
|
4762
|
+
}
|
|
4763
|
+
const { showLastValue, axisType, startValue } = this.pendingRequestData;
|
|
4764
|
+
const axisKey = ((_c = (_b = (_a = this.getCurrentModeConfig()) == null ? void 0 : _a.datas) == null ? void 0 : _b[0]) == null ? void 0 : _c.xCode) || (axisType === "time" ? "timestamp" : "depth");
|
|
4765
|
+
const existingKeys = new Set(
|
|
4766
|
+
this.cachedCurveData.map((item) => item[axisKey])
|
|
4767
|
+
);
|
|
4768
|
+
const newItems = newData.filter(
|
|
4769
|
+
(item) => !existingKeys.has(item[axisKey])
|
|
4770
|
+
);
|
|
4771
|
+
this.cachedCurveData = [...this.cachedCurveData, ...newItems];
|
|
4772
|
+
if (axisType === "depth") {
|
|
4773
|
+
if (this.cachedCurveData[0] && this.cachedCurveData[0].timestamp) {
|
|
4774
|
+
this.cachedCurveData.sort((a, b) => {
|
|
4775
|
+
const timestampA = this.toMillisecondTimestamp(a.timestamp);
|
|
4776
|
+
const timestampB = this.toMillisecondTimestamp(b.timestamp);
|
|
4777
|
+
return timestampA - timestampB;
|
|
4778
|
+
});
|
|
4779
|
+
} else {
|
|
4780
|
+
this.cachedCurveData.sort((a, b) => {
|
|
4781
|
+
const valA = Number(a[axisKey]);
|
|
4782
|
+
const valB = Number(b[axisKey]);
|
|
4783
|
+
return valA - valB;
|
|
4784
|
+
});
|
|
4785
|
+
}
|
|
4786
|
+
} else {
|
|
4787
|
+
this.cachedCurveData.sort((a, b) => {
|
|
4788
|
+
const valA = Number(a[axisKey]);
|
|
4789
|
+
const valB = Number(b[axisKey]);
|
|
4790
|
+
return valA - valB;
|
|
4791
|
+
});
|
|
4792
|
+
}
|
|
4793
|
+
let targetStartValue = Number(startValue);
|
|
4794
|
+
if (axisType !== "depth") {
|
|
4795
|
+
const str = String(targetStartValue);
|
|
4796
|
+
if (str.length < 13 && targetStartValue < 1e12) {
|
|
4797
|
+
targetStartValue = targetStartValue * 1e3;
|
|
4798
|
+
}
|
|
4799
|
+
}
|
|
4800
|
+
let startIndex = 0;
|
|
4801
|
+
for (let i = 0; i < this.cachedCurveData.length; i++) {
|
|
4802
|
+
let itemValue = Number(this.cachedCurveData[i][axisKey]);
|
|
4803
|
+
if (axisType !== "depth") {
|
|
4804
|
+
const str = String(itemValue);
|
|
4805
|
+
if (str.length < 13 && itemValue < 1e12) {
|
|
4806
|
+
itemValue = itemValue * 1e3;
|
|
4807
|
+
}
|
|
4808
|
+
}
|
|
4809
|
+
if (itemValue <= targetStartValue) {
|
|
4810
|
+
startIndex = i;
|
|
4811
|
+
}
|
|
4812
|
+
}
|
|
4813
|
+
let targetEndValue = Number(showLastValue);
|
|
4814
|
+
if (axisType !== "depth") {
|
|
4815
|
+
const str = String(targetEndValue);
|
|
4816
|
+
if (str.length < 13 && targetEndValue < 1e12) {
|
|
4817
|
+
targetEndValue = targetEndValue * 1e3;
|
|
4818
|
+
}
|
|
4819
|
+
}
|
|
4820
|
+
const endIndex = this.cachedCurveData.findIndex(
|
|
4821
|
+
(item, index2) => index2 >= startIndex && Number(item[axisKey]) >= targetEndValue
|
|
4822
|
+
);
|
|
4823
|
+
const actualEndIndex = endIndex === -1 ? this.cachedCurveData.length : endIndex;
|
|
4824
|
+
const newWindowSize = actualEndIndex - startIndex;
|
|
4825
|
+
this.startIndex = startIndex;
|
|
4826
|
+
this.windowSize = Math.max(1, newWindowSize);
|
|
4827
|
+
this.$emit("loadingChange", false);
|
|
4828
|
+
this.pendingRequestData = null;
|
|
4829
|
+
this.$nextTick(() => {
|
|
4830
|
+
this.renderChart();
|
|
4831
|
+
});
|
|
4832
|
+
},
|
|
4510
4833
|
deduplicateByUniqueKey(existingData, newData, uniqueKey) {
|
|
4511
4834
|
const newDataArr = Array.isArray(newData) ? newData : [newData];
|
|
4512
4835
|
let resultData = JSON.parse(JSON.stringify(existingData));
|
|
@@ -5343,16 +5666,16 @@ const _hoisted_1$5 = {
|
|
|
5343
5666
|
ref: "wrap"
|
|
5344
5667
|
};
|
|
5345
5668
|
const _hoisted_2$4 = { class: "header" };
|
|
5346
|
-
const _hoisted_3$
|
|
5669
|
+
const _hoisted_3$3 = {
|
|
5347
5670
|
class: "chart-wrap",
|
|
5348
5671
|
ref: "chartWrap"
|
|
5349
5672
|
};
|
|
5350
|
-
const _hoisted_4$
|
|
5673
|
+
const _hoisted_4$3 = {
|
|
5351
5674
|
ref: "chart",
|
|
5352
5675
|
class: "chart"
|
|
5353
5676
|
};
|
|
5354
|
-
const _hoisted_5$
|
|
5355
|
-
const _hoisted_6$
|
|
5677
|
+
const _hoisted_5$2 = { class: "label-card" };
|
|
5678
|
+
const _hoisted_6$2 = { class: "label-row" };
|
|
5356
5679
|
const _hoisted_7$1 = { class: "label-row" };
|
|
5357
5680
|
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5358
5681
|
const _component_el_radio = resolveComponent("el-radio");
|
|
@@ -5381,14 +5704,14 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5381
5704
|
_: 1
|
|
5382
5705
|
}, 8, ["modelValue", "onChange"])
|
|
5383
5706
|
]),
|
|
5384
|
-
createElementVNode("div", _hoisted_3$
|
|
5385
|
-
createElementVNode("div", _hoisted_4$
|
|
5707
|
+
createElementVNode("div", _hoisted_3$3, [
|
|
5708
|
+
createElementVNode("div", _hoisted_4$3, null, 512),
|
|
5386
5709
|
withDirectives(createElementVNode("div", {
|
|
5387
5710
|
class: "label-float",
|
|
5388
5711
|
style: normalizeStyle($options.labelFloatStyle)
|
|
5389
5712
|
}, [
|
|
5390
|
-
createElementVNode("div", _hoisted_5$
|
|
5391
|
-
createElementVNode("div", _hoisted_6$
|
|
5713
|
+
createElementVNode("div", _hoisted_5$2, [
|
|
5714
|
+
createElementVNode("div", _hoisted_6$2, toDisplayString($data.labelPos.line1), 1),
|
|
5392
5715
|
createElementVNode("div", _hoisted_7$1, toDisplayString($data.labelPos.line2), 1)
|
|
5393
5716
|
])
|
|
5394
5717
|
], 4), [
|
|
@@ -5397,7 +5720,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5397
5720
|
], 512)
|
|
5398
5721
|
], 512);
|
|
5399
5722
|
}
|
|
5400
|
-
const DepthTimeChart = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-
|
|
5723
|
+
const DepthTimeChart = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-b2c14c77"]]);
|
|
5401
5724
|
const curveExportIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAYAAACMRWrdAAAH+ElEQVRo3u1ZTWxU1xX+zpuxsRvbWLEBx6mFIcEOTWkChYZ00abdgNRKDVJRi1pVTvHYRCy6qsKilbLMoot0YRV7jGRVipSGLpAapV1UqRsSKKi0iAK1cRxIY4gJGNvEP2PPvPN1ce/7sz1vxsbTRJWvNPZ77/68c+4595zvOw9Ya2ttrZWySb6Ow4ePbpaE2/aZC0hOpNPdv17uvGS+DsfR5rqqzMtfb/mYpAhA8yKxF7aREO8ZCTF7RX/fRBjqQ2SNxXNNn3c9M5/E21eabgBYPcUAoK5qFt95+jogQtDal4SRx5ee9o+AntD0nYGEGHXJhc5CowhsV9AvQpC4+2mlvH2laUWWjlWMANSTmOaBEZlUK7kg2OHoXEb6fQUFBAGSYq2DxR7gr8iVunCsYkYAaye1LwRACAhS4Pullc9orhRxHNBIbcaSIg5A164jECrtYuKpJyICKmnfvWK9irCY0riL3T2NKMjIOSMhAoE4pGpo9wEhCQ25oQZC0z++YubZGzyAXvGKCUAIoSoiDmi2WBjspBFbBFS1ziNKqj1DDDbIuiTsCkHgEIAKEQdUNxxMCFVKaVwRANUeL5ciDhjdxpBrGnPRWNQ7jcG9hiOm9QCliJhdspthn3kvkRKdseFPauWl158rKu8t6JcC+VIKrCkPmv/yKjY09O/3WlpaajNZ5zNGELoGo9ba/yUI/umLL7YmcjwWfpZOH38hfJ9Kdb4EyBOlFZF30+nun69a8Ejk0LChZrrtW9s/IAC8cX6HAHghmsBl/7e/9ME366umJQyOF4LbhdfhZx7OFCwG19Nz5XjrUusNAKunGABUV8xh1+ZbAoBvnN+x5Jhtm+5i64Z7DGN6WpgoQpICkbAOhox4ORsWUNODVhQLsYTjMxV461JrCSCVwWtLgtxQAhdVH9xa+BieY4BK1Eq0KnkYw6rovdWCZH2ASF8QeQRIYmnlPPRrhQ8PIumxnRC8ChRkwFYkglKi1i2RYkY+iQs/1JB5VMUHyZ4itKiSFB+EGQWFHswKzl/g1D7+XH3FyIUccJFFGcBHQwS4RJAgNFjHWMbCegkzJMv9PABaStoiZIHlrQ+64egHgGqCwOLzFXiwUKChMkLWdcR1HSQcMplwA0dfddpCD5XnN5kSomavSZp7n9AwoD9hET2eNj5Tiau3GjB0e4OM3q/B9FxZBkBGRJLliVzVww/NSKkshkIGM/Q44q5+RCTF5yXhNjb1EN659rhcGmmcUMrrFL5Z5jgXe9PHb3pjfnL0aN38ZNmXKdxdIleMj04MOcyCSlNkW7y+M8Nb0T/QMpF1E686jr7am+6eXGrd33Z1jQH4q/2VgGiSsfRIlUIb1gih2IDil99sMHA1wVMXn5IrNxv/lkzg+729gXVK0QoVc2iSL2Njh7oe7aWJjH6yDpz09xd2yuDtTX/KZTMHetN9mVKD4AIskiAIt0A+IUgloWpU8YpMqhAl8d77j8ngaEN/bn7uQF9fvFKp1JF97e3tXyypYgzXcWNs5inkxX5V+qWM0cn1OH2tZYKaaCuklF3vCXGSp9vajjSX1mLWEnGQiwz/N9DBuz89tA05dV4+caLrw2KFmqr6tDmxjmc7Oo4+UxqLGYELWiyIgLQuSAHIjydrZPCTR25ns3PdyxFqvO4eLu260JBz5vtTqSP7SmAxPwnHAw/rjuFzpgQGRhsJoK84F1yQ6+ru4p+7/l6RTWZPtbd3fm/VFVMvGsQgD4aCBmwgoUKG72wUunhzpe40UTuGc197tyLzhdlThq2vLh+DUiQuz6lf3wzm5Sgcm65xh4cHzoXHt3d2/oB0KmJeujec/GcqZ3D+6bPYfXHvK4dTnVUn0t2/XKUEHU64+YZ4Xy58CoL7MxXiqtzo7+/PRU2M4xOb79Sqox6nBD2GQJNe7tdO2gK6gFDMVszg7M53sPPqnl+0d3Q25+bnUoXcu2DtXjWe8all0I6lJ/ZzEefcpIhwaqk5/9l9HdlkDlQXqgpVQlXB0DXU5wAAFPPl8zj35BnsvvrMjzdNbKxva2uLzYlOIawY4ckxA1UhrkIIv5aQf45IiDlLLA71xxNQx8X57WfwUd3I/rKydX88ePBg1YrRvRYB7tX7lmvLMyBQWZYBIQ3xErOIwmDkAykq5yuxfmY9ALx78uTJqZVFRQJUQ8pixzBA+V6doyKZkcrkXMOhQx31+TVbSPVkiSHBs6rZajx7+Ruonqk+li4QRAqVBiK0JF9UND+/NEjAgOKGmnHJZBv2AXgtPGfHH3bmtxWBm00f4f1tgxEF6ybqsevynkwyW9aW7u3+3QNixUDwuDzm1eiMWwY5bWvdCAD8MPJCYXMy69SW5fkls4ljjkbFqr+3EXv+9exUWa78+d4ilCqGtsDVRfWKJdIBfEoqtqZIAFsevoV1Zdn9HR0dj/X09AwDQE9Pz2Q8uu+MRLpHbzVh++COUXGd76Z7f3Nh1ZBHAeARKXhSTTVKbZQsT2b5VOO1BCG/Wgny2Hr9cTw58JUbyCX39i5DqYIWG5+txl+GvhpLof8x0ioDt5sXebB39HPqAJDnU6kjP0qnj79W1JcSCrYNtqLpwy2XEw72p3u6ls228yqWzc4OilS2XbuzJe9nGQFeGZl4pK+YTzrqaK5YoRpHHoW4iT9PTowdiAvphd75uWqpVOfPIHguOz93aCWsYBkl7v9tU02eGh6+0rUIY661tbbWPlftv9DKUDsQUF/KAAAAAElFTkSuQmCC";
|
|
5402
5725
|
const depthSlotIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAYAAACMRWrdAAAFnUlEQVRo3u1ZTWxUVRT+zptOp51pZZpOaWlGCgIFFIRgiCsNJi6MbFyyMRqgPygmJhrXNbJgQQQTSf9mGhaEuGkCK/9iMkhAoxAoJCIBTZEWO0Ch03ZsZzpzPxf3venr0JoZ7LzOkJ7Mz3v3vfvuO/ec7zvn3Assy7IUhUihB9h74MBGI8099jblkq/6OjtvFHLcskIrZii1KVFZ3zEW2AEFYc39S1KRiF4BUNqKAUCiciVGVr/BFAWVk0OoSEQLPqbhlM/TYYyVOYVkIUUc1M5w0lxOquaMYiJOEPBSWIyAOAszZzAGcdgRHWNFghDSQasZTllMtH7ylJEHtameOlZ0Ojo7mXmIw4oVhBX3t7YdFYofAKiwJlstUXKwpaX9LZNWpm/dvPFBJBJJlQDdy/SUf/07sYadUIRMe2ppUX501at8UPPi6wrCVdHzqI7/+cViK1UwV2Ta1eWJD6cnA1sQq9+J+Ip10PQhjK1oxr2VL3PUv1W8U8MJqPThksFYOHz8tjEzddI/9CMIzYRCiGYR7ZYN939CWTp5OhQKRUuKPETUIf/dCwKmrcxD/5NiqBSCIz8gnebhQo1fMMV6enr+cM2Mf+OPXhKQYo9hDdFzUp4cP93X1z1QknQvNA7X3vkeAkUb77Mheh5KyZGSjWO9vZ1ny6ceRKpHr4mFrZqH11AxHb0YDnedL+kALcCXtX+fy6QfwTtfCxQOlXzZcvPm72c2bMAtX+zWOkVIZXzoSijUfaYoFGtpbTsHSNCW+k2Gerq25tI3Eomkmps3H2q4892JtOEBRbryymJa2i6L6CwGABQ5FO7tfmWRLCbB4e0H18x4/JR0AmsvHZkguSXXl4vH4wOfHz02CvzDAx9/djHU3Zlz3/b299b98vwn1akyL8uTY9hx/ejiumKqws9UeY1IetqKsp5c+/p8Pqysq+t3u90TgUAA+fQFgOmKWqZclQAphcGYCJ+0Btm9+81T/68ykLwWF3JXjBRrVeZJJBgMThZ1PeZ0XWWbVAhyd8WcFdPJrCxFMZyZTiuhXlTFBBSQsiQWM6dTCkIeIoQImMfDF00tMb1FCmCxDNU6uuw564jMEwRGXhYDl8gTTQgULI7Neryrv7+/2SF0uSxXLGASLKQYmPI1es9cuH4qC9vZh/PAP7tBSBNFgPYIZo2HykYBXHknBnkGaJAuD/566SOCEEUCYpCk0HxJQodxmqGBBGjjaWUeZt2n+ypo7jWXEJR1TT9Y8KSZx7597zcZhlpjnacNNdbXbZbvIpxT4pMZIuFjFtEvlsGlxWqKIqAo61kwUzTqPU+xlnvMiZpdBNIK20fY29a2zaWM2axfGYPh8PHb8yomrvS7SV+yY6YqASPpQsVDbwTAawDgiQ1KmXsUFGtKYR0DJDQIRO+qMONSYk22FV0tyiZpntC0GoUwiDl9xTI4QIo7OT7LekqOxXwPdyVdM/AmfPAmfR0APl3QFR+tH0V02136Rqrw3Lcbreaf6387OYgiEAWMWMfXmgZw75koNw+9gE3DW3LAmJmWiWBXS2u7uVGCohAB0NLavkd7DCkLJEMLkkd81QQH3r4IpikUkiSgIAqk/sz9AgCVdiwqitlGRQWLAax2ivZdKgqhn23vk7kP5lWTPZTKjDPnes4BWgzR9xMCYxa0NFGdsaoZXAQi9nOdfmnwiBV/aO7+yQIxQfuITtnEgl0mOTD/ZJ5uMm/RUTY/sxOVj7xo/PVZ2MBsiz8UW2zK8JW1vWe7D8w6N3/tHKe3BZkV4Gy5r/VS2VH6atNlxLxjecQxQlwJF6pGqq4AxocoSlHH3Kny7cT8rviYYr6RKtSjEe7JchAyFurtPFuMau1vaR9bfb+JgYk6BMbr/lsxoUR80eoOX7TaKhcGUaRCkROrH6yN2N8dy7IsxSf/Avx35qhCwuXeAAAAAElFTkSuQmCC";
|
|
5403
5726
|
const refreshIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAYAAACMRWrdAAAJgklEQVRo3u1aaVRURxbOj/yYHzknc04E3JClwY1RxyW4EBmXMC5xdIwh4MkEkO5+rxskioqAMJIIykQEFdmCERoaxA0XUIlBwCUmIWJwy5hojGbIDBkzkahRQObcO/dW92PR0BBFWh3eOd+pevXqVd3v3Vu37q3uZ57puXqu/79LluWpTyUxraRDrVaOnTRp0rNPHbHEmNeJnK4iIEDn+FQR++8nA6Eo/Y8YpJdqJUl65akh1vTxQLhLOF/ojuFL/Nk0EwICAn7zxJBgU9PI8hwSPFyS5PVkftlMrOEjV2w84QqM6+VDYeOqeWyanzzWpqnR60cLEpLuypK3FuCm2Hm4I3k6lGROwSMGTzya4wn1x12xgUg1fORCcBXg50F6bR0RnPd4mZhWN01DDiFyqR/uTfOCb4pHEAEXuHPMBVuXltq+2jsKwkPZNHWbrG6abD6kndKoZW/iCeMEvHXUFW4fdUESFBQo91w2455non5MBXXlgyBuxXzUSPJJb2/v56ylpTfIs93anzEFbla44s9HVdAGR1R4i6Dc325+5oI//0L7jQoXLEzxAlmWatgCrERKjo1c4geX9g0HEr4ZNysEmTb1m0fub1Pqyn3NQTd8N9oHSFMlOp2un3UcBDmH+BW+UPvBIBLOGW6Uq/BGuTNyyfckLPxUroIzO0ZDwYZpsPav3ric1k5IsEZA6W/q6wyV+e64OCSwSZJ0UVaLSDSSLiYucj5c+9CVCDnfh/+UukBx+mSMWOIn1gn3V1N8qFYHO9Bm/Dy7+5/KnAWul6kgP2k6kPZr1Gqdh9UcBUcJyxf749XiISSYE9S1xmFnrN4+EgQhra6Y+o5tb4Pmd68WDcHYSF+l7/NW9H4BvSkyr/28YCReP+wEP5Y6ibLOjMJNU5CfqyX9Kx1FHscNY8kk1fWkzaVW36fI/jdnvTsTfyx1ZFJgKh3hOtW3b3gZtZJ8gc2tMyEVaenSgnY02t051IhQiiK+L6E19KGjwA+HnJDLgxkvIUcZGo3GrlNrVKvbaVXTu8dhbN6VPBl/OOQI1z5wFCXjy91DQafT1pOgqicuGqe19Vs9CX+lyJVIOcC/SxyRyFHpgEkxczkyX/REphmSpPdfGz0PiQh8zzjogLWEqvwRwGulMzEd9+FIgj+CRtIHc93qsSDtRcb96ROI0ACobYXU2Fkdaos3WzLjKI0UVOcbloRzYgpwzso89KF6oBxSx8+sRpAdQ3XBUPzXgQGg4LtiBwgJUqMlh8ECU/pS4hu+ETwza8A9px7H5DTCKEMj/J4wOuMaeIdtRO7T7eS8g4KeC9Zr8LviAfjP/fbA4PpnxmEUVejOdRBLpvtGpqBH7m0Yl1sP7rkNMCanwUQsuxGGZzXi77Y0wKvhqfSBdJu713FI0uCI0L9ATTETasH+tPEcrBotbQ8LFoahZ+5N8Mi9g4JYTguxEURsWPZdcNtC5DJvgn9wGAYG6gd1GzGO31aFv441Rf2hpshe4B9UL0iaxBqLtxT5v7q6ECbm3QEPYz2MNzaYNGaox1HZDcimOIw05pZ1F4ZsaYLpbxeCpfEeQWqi/0NchDd+u68/COztjwQwrpvCgsRY2ISLZyZXCWITiFiLxhphpHmNCY2ZiY1PPC3SlXbH0/C5CZ2X/AIC9Q+gaQ573g7zgat7+sFVInR1bz+4sqc/bkvypIhcn2AhAS2dkXIGJhrvIBMbf88aazZFM7GxSed566iwlCatj/kTFqWMg30p40TJWLbIDx8oNFOr1S788hUi9s3ufkoJB9Je5FRjjwVi2bMTykymSGusmZihAUe10VgjDtlyFybFHwNLDkSjlXeWpI8Bnr+1LGGL38QHinp4HyJH0HRxl70gdLmwH17e3RdOGgcCbwPtCiLLPm+EJaCyxsYZW2usAUfcY4qvkdu3dDpFAXbNSeMgIYMix8Wd9sCyPXBiym792BY3uLSrL35NuFzYFxhL3/Jr15PxZBztz9xQiR7KGrvPFBsFMc+1n/J6PdfeXsZriK3ma9P8IEqa/zjJ1NGW0+ExwNZ1E5lYK/SBzNUvixPc9he8frRaXlg/bWMVmyK2dveKKU5cV4Xch/tacGAJ76+Zipd29kWeV5EhL4HXuW7TQ2XN0ct8SfV94OKOPvgVgeuVBhe27zoOki1tF2yyPrRReyV9hh4ZNTgh7VucvK4SX1ueLPIyS6Q4udXTIerJXGdQ5lWwcpkPPtRJljneq63MceHBBb7c3gcZqavEeUV6RwEwuWs1bwFMhE1Uy3Vq6yiU4rEz4rya51VwImsgm2HtQ4divGetj5mJF7b1JkK9QcHpPHsMDfFH3mcexfkKr+Oz+f2b57tgRlqsF6opCOiSnIzN7uMsFf69oDcTBC4JUJE5mJPNW115ykTnih46WVt/+D03mseO5zLPZ0faUiE/62zG3hmtLV0T+Wc8v9UOv6AJvthK4JImPbBpODK5rji9ZU1RYnvrQMrwtnOZ54uLmItdeggkXLhWrt6e6A7n823hXL4dnsuzw/P5dkACwKG0oSazJC/6ILbP5/TsZUND/JpKUt1QjE/gsRVsW+dODkeu7vI0h/ct1kxp+mA4l2cLZ4nY2TxbFkDUP80eAGujZvEXreUk1JLHbG3mWlkO53cSo2dCZbY9jWfbPD6XfH8obQiwCT6y8xU2t0UL/ZuOZtIRdq4tnjGyALZAJZMU9bIMV0iMnmFaCxQDcuQuPCP9CMigs0d/zgD4WZBe08R9y9JdxVhiHGPb8Y68p8JFwf5Nj/yHCq1WO4/JlaQMhtMkxOlcG6jOtcHTRNQEvrfFKkMfKE4eBu/HTcSk6BkQHzFbgIlsprZ9G4fhKUNv0b/5XTGeLVab7w+lDgImFRio7Z4fBPnrsUby176In+fYkCA2IMocKg02yGjT1qqPeEZtAq36KPdKncfuKqf0az2YihdzfOQsPJLhwAKzkAKnBLleojyV3Ytgum+BDbQ8Nz8zv1uR4YRx4XOEo+jWzPr+ozU5nLWXHDMVK9IHkHn1gqqsXlglCJHwDIOp5DbRbjC1NdfpWXmaI25Y6UW/AWjFCdZj8ScXjus4YKWvXPfOsrmQ+zd3KEt3gJNMMEsQEPUWvCDaSlOd0BA/Ft4JmwscBFBeFjNfkno9jifHHBvOUZv++nBlYdACjAz1wTURszAhajomrJiOq8NnY9QSbwzWB4pzf+7L7zxRf0PyCw5+gdN3TiT5VJnBLp/bOrPP9Vw9V8/Vc3X79T8J1TZaWjb6HwAAAABJRU5ErkJggg==";
|
|
@@ -5853,16 +6176,16 @@ const _hoisted_2$3 = {
|
|
|
5853
6176
|
key: 1,
|
|
5854
6177
|
class: "divider"
|
|
5855
6178
|
};
|
|
5856
|
-
const _hoisted_3$
|
|
6179
|
+
const _hoisted_3$2 = {
|
|
5857
6180
|
key: 3,
|
|
5858
6181
|
class: "divider"
|
|
5859
6182
|
};
|
|
5860
|
-
const _hoisted_4$
|
|
6183
|
+
const _hoisted_4$2 = {
|
|
5861
6184
|
key: 5,
|
|
5862
6185
|
class: "label"
|
|
5863
6186
|
};
|
|
5864
|
-
const _hoisted_5 = { class: "elTooltipArea" };
|
|
5865
|
-
const _hoisted_6 = {
|
|
6187
|
+
const _hoisted_5$1 = { class: "elTooltipArea" };
|
|
6188
|
+
const _hoisted_6$1 = {
|
|
5866
6189
|
key: 7,
|
|
5867
6190
|
class: "label"
|
|
5868
6191
|
};
|
|
@@ -6003,7 +6326,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6003
6326
|
]),
|
|
6004
6327
|
_: 1
|
|
6005
6328
|
}, 8, ["modelValue"])) : createCommentVNode("", true),
|
|
6006
|
-
$props.currentToolBarConfig.realHistoryRadioShow !== false ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
6329
|
+
$props.currentToolBarConfig.realHistoryRadioShow !== false ? (openBlock(), createElementBlock("div", _hoisted_3$2)) : createCommentVNode("", true),
|
|
6007
6330
|
$props.currentToolBarConfig.headerFloatRadioShow !== false ? (openBlock(), createBlock(_component_el_radio_group, {
|
|
6008
6331
|
key: 4,
|
|
6009
6332
|
modelValue: $data.form.displayType,
|
|
@@ -6027,7 +6350,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6027
6350
|
]),
|
|
6028
6351
|
_: 1
|
|
6029
6352
|
}, 8, ["modelValue"])) : createCommentVNode("", true),
|
|
6030
|
-
$props.currentToolBarConfig.scaleSelectShow !== false ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
6353
|
+
$props.currentToolBarConfig.scaleSelectShow !== false ? (openBlock(), createElementBlock("div", _hoisted_4$2, "比例尺:")) : createCommentVNode("", true),
|
|
6031
6354
|
$props.currentToolBarConfig.scaleSelectShow !== false ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
6032
6355
|
key: 6,
|
|
6033
6356
|
disabled: $data.form.axisType === "depth",
|
|
@@ -6036,7 +6359,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6036
6359
|
effect: "dark"
|
|
6037
6360
|
}, {
|
|
6038
6361
|
default: withCtx(() => [
|
|
6039
|
-
createElementVNode("div", _hoisted_5, [
|
|
6362
|
+
createElementVNode("div", _hoisted_5$1, [
|
|
6040
6363
|
createVNode(_component_el_select, {
|
|
6041
6364
|
modelValue: $data.form.scale,
|
|
6042
6365
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.form.scale = $event),
|
|
@@ -6061,7 +6384,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6061
6384
|
]),
|
|
6062
6385
|
_: 1
|
|
6063
6386
|
}, 8, ["disabled"])) : createCommentVNode("", true),
|
|
6064
|
-
$props.currentToolBarConfig.timeRangeSelectShow !== false ? (openBlock(), createElementBlock("div", _hoisted_6, "时间范围:")) : createCommentVNode("", true),
|
|
6387
|
+
$props.currentToolBarConfig.timeRangeSelectShow !== false ? (openBlock(), createElementBlock("div", _hoisted_6$1, "时间范围:")) : createCommentVNode("", true),
|
|
6065
6388
|
$props.currentToolBarConfig.timeRangeSelectShow !== false ? (openBlock(), createBlock(_component_el_tooltip, {
|
|
6066
6389
|
key: 8,
|
|
6067
6390
|
disabled: !($data.form.axisType == "depth"),
|
|
@@ -6980,21 +7303,103 @@ const _sfc_main$2 = {
|
|
|
6980
7303
|
showContextMenuStatus: {
|
|
6981
7304
|
type: Boolean,
|
|
6982
7305
|
default: true
|
|
6983
|
-
}
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
7306
|
+
},
|
|
7307
|
+
// 缺失数据点右键弹窗配置
|
|
7308
|
+
missingPointMenuConfig: {
|
|
7309
|
+
type: Object,
|
|
7310
|
+
default: () => ({
|
|
7311
|
+
topMenu: [
|
|
7312
|
+
{
|
|
7313
|
+
label: "向下插值",
|
|
7314
|
+
children: [
|
|
7315
|
+
{
|
|
7316
|
+
label: "方式一",
|
|
7317
|
+
canTransfer: true
|
|
7318
|
+
},
|
|
7319
|
+
{ label: "方式二", canTransfer: true }
|
|
7320
|
+
]
|
|
7321
|
+
},
|
|
7322
|
+
{
|
|
7323
|
+
label: "向下拟合",
|
|
7324
|
+
children: [
|
|
7325
|
+
{ label: "方式一", canTransfer: true },
|
|
7326
|
+
{ label: "方式二", canTransfer: true },
|
|
7327
|
+
{ label: "方式三", canTransfer: true }
|
|
7328
|
+
]
|
|
7329
|
+
}
|
|
7330
|
+
],
|
|
7331
|
+
bottomMenu: [
|
|
7332
|
+
{
|
|
7333
|
+
label: "向上插值",
|
|
7334
|
+
children: [
|
|
7335
|
+
{ label: "方式一", canTransfer: true },
|
|
7336
|
+
{ label: "方式二", canTransfer: true }
|
|
7337
|
+
]
|
|
7338
|
+
},
|
|
7339
|
+
{
|
|
7340
|
+
label: "向上拟合",
|
|
7341
|
+
children: [
|
|
7342
|
+
{ label: "方式一", canTransfer: true },
|
|
7343
|
+
{ label: "方式二", canTransfer: true },
|
|
7344
|
+
{ label: "方式三", canTransfer: true }
|
|
7345
|
+
]
|
|
7346
|
+
}
|
|
7347
|
+
]
|
|
7348
|
+
})
|
|
7349
|
+
},
|
|
7350
|
+
// 区块右键弹窗配置(始终自带"删除区块",无论是否传数据)
|
|
7351
|
+
markAreaMenuConfig: {
|
|
7352
|
+
type: Array,
|
|
7353
|
+
default: () => [
|
|
7354
|
+
{
|
|
7355
|
+
label: "插值计算",
|
|
7356
|
+
children: [
|
|
7357
|
+
{
|
|
7358
|
+
label: "方式一",
|
|
7359
|
+
canTransfer: true
|
|
7360
|
+
},
|
|
7361
|
+
{ label: "方式二", canTransfer: true }
|
|
7362
|
+
]
|
|
7363
|
+
},
|
|
7364
|
+
{
|
|
7365
|
+
label: "拟合计算",
|
|
7366
|
+
children: [
|
|
7367
|
+
{ label: "方式一", canTransfer: true },
|
|
7368
|
+
{ label: "方式二", canTransfer: true },
|
|
7369
|
+
{ label: "方式三", canTransfer: true }
|
|
7370
|
+
]
|
|
7371
|
+
}
|
|
7372
|
+
]
|
|
7373
|
+
},
|
|
7374
|
+
// 是否为地应力模式(只有为 true 时才启用泳道选中功能)
|
|
7375
|
+
isGeomechanical: {
|
|
7376
|
+
type: Boolean,
|
|
7377
|
+
default: false
|
|
7378
|
+
}
|
|
7379
|
+
},
|
|
7380
|
+
data() {
|
|
7381
|
+
return {
|
|
7382
|
+
laneWidthMap: null,
|
|
7383
|
+
treeTemplates: null,
|
|
7384
|
+
isLoading: false,
|
|
7385
|
+
strategy: null,
|
|
7386
|
+
currentTemplate: {},
|
|
7387
|
+
curveConfigVisible: false,
|
|
7388
|
+
contextMenuVisible: false,
|
|
7389
|
+
contextMenuX: 0,
|
|
7390
|
+
contextMenuY: 0,
|
|
7391
|
+
menuWidth: null,
|
|
7392
|
+
menuHeight: null,
|
|
7393
|
+
currentContextMenuItems: [],
|
|
7394
|
+
currentPointInfo: null,
|
|
7395
|
+
// 当前右键菜单来源:'missingPoint' | 'markArea' | null
|
|
7396
|
+
currentContextMenuType: null,
|
|
7397
|
+
activeSubMenu: null,
|
|
7398
|
+
params: [],
|
|
7399
|
+
contextItem: void 0,
|
|
7400
|
+
realTimeData: [],
|
|
7401
|
+
nowTheme: "dark",
|
|
7402
|
+
group: "echartsGroup",
|
|
6998
7403
|
isCtrlPressed: false,
|
|
6999
7404
|
// 是否按住 Ctrl
|
|
7000
7405
|
startIndex: 0,
|
|
@@ -7052,6 +7457,15 @@ const _sfc_main$2 = {
|
|
|
7052
7457
|
// 当前线段所有数据的最小值和最大值
|
|
7053
7458
|
lineRange: {},
|
|
7054
7459
|
markAreaLineData: [],
|
|
7460
|
+
// 区块选择状态
|
|
7461
|
+
selectedPoints: [],
|
|
7462
|
+
selectedLaneId: null,
|
|
7463
|
+
selectedParamId: null,
|
|
7464
|
+
// 当前选中的泳道ID(只有该泳道显示缺失点、区块、区块点)
|
|
7465
|
+
activeLaneId: null,
|
|
7466
|
+
currentMarkAreaIndex: -1,
|
|
7467
|
+
// 每个泳道的选中点对数组,每对包含两个点形成区块,与 markArea 通过 markAreaId 关联
|
|
7468
|
+
laneSelectedPointPairs: {},
|
|
7055
7469
|
// 待处理的数据请求信息
|
|
7056
7470
|
pendingRequestData: null,
|
|
7057
7471
|
// 按 laneId 收集图表组件引用(避免重复 ref 导致联动失效)
|
|
@@ -7082,7 +7496,10 @@ const _sfc_main$2 = {
|
|
|
7082
7496
|
};
|
|
7083
7497
|
},
|
|
7084
7498
|
mounted() {
|
|
7085
|
-
this.showDateTime = Object.prototype.hasOwnProperty.call(
|
|
7499
|
+
this.showDateTime = Object.prototype.hasOwnProperty.call(
|
|
7500
|
+
this.currentToolBarConfig,
|
|
7501
|
+
"showDateTime"
|
|
7502
|
+
) && this.currentToolBarConfig.showDateTime == true;
|
|
7086
7503
|
window.addEventListener("keydown", this.handleKeyDown);
|
|
7087
7504
|
window.addEventListener("keyup", this.handleKeyUp);
|
|
7088
7505
|
this.showTooltip = this.formCache.displayType == "float";
|
|
@@ -7114,24 +7531,72 @@ const _sfc_main$2 = {
|
|
|
7114
7531
|
getLaneChartContentStyle(laneId) {
|
|
7115
7532
|
const width = this.laneWidthMap && this.laneWidthMap[laneId];
|
|
7116
7533
|
const gap = this.currentHeaderStyle.itemGap || 0;
|
|
7534
|
+
const style = {};
|
|
7117
7535
|
if (width && Number(width) > 0) {
|
|
7118
|
-
|
|
7536
|
+
Object.assign(style, {
|
|
7537
|
+
width: `${width}px`,
|
|
7538
|
+
padding: `0 ${gap}px`,
|
|
7539
|
+
height: "100%"
|
|
7540
|
+
});
|
|
7541
|
+
} else {
|
|
7542
|
+
Object.assign(style, {
|
|
7543
|
+
width: "100%",
|
|
7544
|
+
height: "100%",
|
|
7545
|
+
padding: `0 ${gap}px`,
|
|
7546
|
+
flex: "1"
|
|
7547
|
+
});
|
|
7548
|
+
}
|
|
7549
|
+
if (this.isGeomechanical) {
|
|
7550
|
+
const isActive = this.activeLaneId === laneId;
|
|
7551
|
+
style.boxSizing = "border-box";
|
|
7552
|
+
style.border = isActive ? "1px solid #F86C59" : "1px solid transparent";
|
|
7119
7553
|
}
|
|
7120
|
-
return
|
|
7554
|
+
return style;
|
|
7121
7555
|
},
|
|
7122
7556
|
setChartRef(laneId, el) {
|
|
7123
7557
|
if (el) {
|
|
7558
|
+
if (this.chartRefMap[laneId] && this.chartRefMap[laneId].chart) {
|
|
7559
|
+
this.chartRefMap[laneId].chart.getZr().off("contextmenu");
|
|
7560
|
+
this.chartRefMap[laneId].chart.getZr().off("click");
|
|
7561
|
+
}
|
|
7124
7562
|
this.chartRefMap[laneId] = el;
|
|
7563
|
+
el.chart && el.chart.getZr().on("contextmenu", (e) => this.handleChartRightClick(e, laneId));
|
|
7564
|
+
el.chart && el.chart.getZr().on("click", (e) => this.handleChartClick(e, laneId));
|
|
7125
7565
|
} else if (this.chartRefMap[laneId]) {
|
|
7566
|
+
this.chartRefMap[laneId].chart && this.chartRefMap[laneId].chart.getZr().off("contextmenu");
|
|
7567
|
+
this.chartRefMap[laneId].chart && this.chartRefMap[laneId].chart.getZr().off("click");
|
|
7126
7568
|
delete this.chartRefMap[laneId];
|
|
7127
7569
|
}
|
|
7128
7570
|
},
|
|
7571
|
+
handleChartInited(laneId, chart) {
|
|
7572
|
+
if (this.chartRefMap[laneId]) {
|
|
7573
|
+
this.chartRefMap[laneId].chart.getZr().off("contextmenu");
|
|
7574
|
+
this.chartRefMap[laneId].chart.getZr().off("click");
|
|
7575
|
+
}
|
|
7576
|
+
chart.getZr().on("contextmenu", (e) => this.handleChartRightClick(e, laneId));
|
|
7577
|
+
chart.getZr().on("click", (e) => this.handleChartClick(e, laneId));
|
|
7578
|
+
},
|
|
7129
7579
|
getConnectedCharts() {
|
|
7130
7580
|
return Object.values(this.chartRefMap).map((item) => item == null ? void 0 : item.chart).filter((chart) => chart && !chart.isDisposed());
|
|
7131
7581
|
},
|
|
7132
7582
|
getChartRefByLaneId(laneId) {
|
|
7133
7583
|
return this.chartRefMap[laneId] || null;
|
|
7134
7584
|
},
|
|
7585
|
+
// 根据 paramId 判断曲线是否可见(isUsed === '1')
|
|
7586
|
+
isLineVisibleByParamId(paramId) {
|
|
7587
|
+
const lanes = this.currentTemplate && this.currentTemplate.lanes || [];
|
|
7588
|
+
for (let i = 0; i < lanes.length; i++) {
|
|
7589
|
+
const lane = lanes[i];
|
|
7590
|
+
if (!lane.lines) continue;
|
|
7591
|
+
for (let j = 0; j < lane.lines.length; j++) {
|
|
7592
|
+
const lineInfo = lane.lines[j];
|
|
7593
|
+
if (lineInfo.paramId === paramId) {
|
|
7594
|
+
return lineInfo.isUsed === "1";
|
|
7595
|
+
}
|
|
7596
|
+
}
|
|
7597
|
+
}
|
|
7598
|
+
return false;
|
|
7599
|
+
},
|
|
7135
7600
|
getYValueFromChart(chart, x, y) {
|
|
7136
7601
|
const option = chart.getOption();
|
|
7137
7602
|
const gridCount = option.grid && option.grid.length || 1;
|
|
@@ -7168,7 +7633,11 @@ const _sfc_main$2 = {
|
|
|
7168
7633
|
if (!dom) continue;
|
|
7169
7634
|
const rect = dom.getBoundingClientRect();
|
|
7170
7635
|
if (event.clientX >= rect.left && event.clientX <= rect.right && event.clientY >= rect.top && event.clientY <= rect.bottom) {
|
|
7171
|
-
this.syncAxisPointerAcrossCharts(
|
|
7636
|
+
this.syncAxisPointerAcrossCharts(
|
|
7637
|
+
chart,
|
|
7638
|
+
event.clientX - rect.left,
|
|
7639
|
+
event.clientY - rect.top
|
|
7640
|
+
);
|
|
7172
7641
|
return;
|
|
7173
7642
|
}
|
|
7174
7643
|
}
|
|
@@ -7214,11 +7683,15 @@ const _sfc_main$2 = {
|
|
|
7214
7683
|
this.headerData = {};
|
|
7215
7684
|
this.getConnectedCharts().forEach((chart) => {
|
|
7216
7685
|
chart.dispatchAction({ type: "hideTip" });
|
|
7217
|
-
chart.dispatchAction({
|
|
7686
|
+
chart.dispatchAction({
|
|
7687
|
+
type: "updateAxisPointer",
|
|
7688
|
+
currTrigger: "leave"
|
|
7689
|
+
});
|
|
7218
7690
|
});
|
|
7219
7691
|
},
|
|
7220
7692
|
unbindChartPointerSync() {
|
|
7221
|
-
if (!this._pointerSyncHandlers || this._pointerSyncHandlers.length === 0)
|
|
7693
|
+
if (!this._pointerSyncHandlers || this._pointerSyncHandlers.length === 0)
|
|
7694
|
+
return;
|
|
7222
7695
|
this._pointerSyncHandlers.forEach(({ zr, onMove }) => {
|
|
7223
7696
|
if (zr) {
|
|
7224
7697
|
zr.off("mousemove", onMove);
|
|
@@ -7275,13 +7748,23 @@ const _sfc_main$2 = {
|
|
|
7275
7748
|
if (scaleValues.length === 0) return;
|
|
7276
7749
|
const minScale = Math.min(...scaleValues);
|
|
7277
7750
|
const maxScale = Math.max(...scaleValues);
|
|
7278
|
-
this.minWindowSize = Math.round(
|
|
7279
|
-
|
|
7280
|
-
|
|
7751
|
+
this.minWindowSize = Math.round(
|
|
7752
|
+
this.pxToCm() * (+minScale / this.depthInterval)
|
|
7753
|
+
);
|
|
7754
|
+
this.maxWindowSize = Math.round(
|
|
7755
|
+
this.pxToCm() * (+maxScale / this.depthInterval)
|
|
7756
|
+
);
|
|
7757
|
+
this.updateSettings({
|
|
7758
|
+
key: "scale",
|
|
7759
|
+
value: this.currentToolBarConfig.form.scale
|
|
7760
|
+
});
|
|
7281
7761
|
} else {
|
|
7282
7762
|
this.minWindowSize = 10;
|
|
7283
7763
|
this.maxWindowSize = 1e6;
|
|
7284
|
-
this.updateSettings({
|
|
7764
|
+
this.updateSettings({
|
|
7765
|
+
key: "timeRange",
|
|
7766
|
+
value: this.currentToolBarConfig.form.timeRange
|
|
7767
|
+
});
|
|
7285
7768
|
}
|
|
7286
7769
|
this.startIndex = this.realTimeData.length > this.windowSize ? this.realTimeData.length - this.windowSize : 0;
|
|
7287
7770
|
},
|
|
@@ -7296,7 +7779,8 @@ const _sfc_main$2 = {
|
|
|
7296
7779
|
} else {
|
|
7297
7780
|
targetValue = Number(data.x);
|
|
7298
7781
|
}
|
|
7299
|
-
if (targetValue === null || targetValue === void 0 || isNaN(targetValue))
|
|
7782
|
+
if (targetValue === null || targetValue === void 0 || isNaN(targetValue))
|
|
7783
|
+
return;
|
|
7300
7784
|
let targetIndex = -1;
|
|
7301
7785
|
let minDiff = Infinity;
|
|
7302
7786
|
for (let i = 0; i < this.realTimeData.length; i++) {
|
|
@@ -7404,6 +7888,15 @@ const _sfc_main$2 = {
|
|
|
7404
7888
|
});
|
|
7405
7889
|
}
|
|
7406
7890
|
},
|
|
7891
|
+
// 判断指定泳道是否应该显示tooltip内容
|
|
7892
|
+
// 地应力模式下:如果没有选中泳道,所有泳道正常显示;如果有选中泳道,只有选中的泳道显示
|
|
7893
|
+
shouldShowTooltipContent(laneId) {
|
|
7894
|
+
if (!this.showTooltip) return false;
|
|
7895
|
+
if (this.isGeomechanical && this.activeLaneId && laneId !== this.activeLaneId) {
|
|
7896
|
+
return false;
|
|
7897
|
+
}
|
|
7898
|
+
return true;
|
|
7899
|
+
},
|
|
7407
7900
|
// 控制tooltip显示隐藏
|
|
7408
7901
|
toggleTooltip(enable) {
|
|
7409
7902
|
if (enable) this.headerData = {};
|
|
@@ -7416,7 +7909,7 @@ const _sfc_main$2 = {
|
|
|
7416
7909
|
chart.setOption({
|
|
7417
7910
|
tooltip: {
|
|
7418
7911
|
...chart.getOption().tooltip,
|
|
7419
|
-
showContent:
|
|
7912
|
+
showContent: this.shouldShowTooltipContent(lane.laneId)
|
|
7420
7913
|
}
|
|
7421
7914
|
});
|
|
7422
7915
|
});
|
|
@@ -7508,7 +8001,10 @@ const _sfc_main$2 = {
|
|
|
7508
8001
|
const ratio = (anchorIndex - this.startIndex) / this.windowSize;
|
|
7509
8002
|
const scale = 1 + delta * 0.2;
|
|
7510
8003
|
let newWindowSize = this.windowSize * scale;
|
|
7511
|
-
newWindowSize = Math.max(
|
|
8004
|
+
newWindowSize = Math.max(
|
|
8005
|
+
this.minWindowSize,
|
|
8006
|
+
Math.min(newWindowSize, dataLength, this.maxWindowSize)
|
|
8007
|
+
);
|
|
7512
8008
|
this.targetWindowSize = Math.floor(newWindowSize);
|
|
7513
8009
|
let calcStartIndex = anchorIndex - this.targetWindowSize * ratio;
|
|
7514
8010
|
this.targetStartIndex = Math.floor(calcStartIndex);
|
|
@@ -7521,7 +8017,10 @@ const _sfc_main$2 = {
|
|
|
7521
8017
|
}
|
|
7522
8018
|
}
|
|
7523
8019
|
const maxStartFinal = Math.max(0, dataLength - this.targetWindowSize);
|
|
7524
|
-
this.targetStartIndex = Math.max(
|
|
8020
|
+
this.targetStartIndex = Math.max(
|
|
8021
|
+
0,
|
|
8022
|
+
Math.min(this.targetStartIndex, maxStartFinal)
|
|
8023
|
+
);
|
|
7525
8024
|
this.targetStartIndex = Math.floor(this.targetStartIndex);
|
|
7526
8025
|
if (Math.abs(this.targetStartIndex - this.startIndex) < 0.5 && Math.abs(this.targetWindowSize - this.windowSize) < 0.5) {
|
|
7527
8026
|
return;
|
|
@@ -7576,7 +8075,9 @@ const _sfc_main$2 = {
|
|
|
7576
8075
|
if (this.formCache.axisType === "depth") {
|
|
7577
8076
|
return Number(((_a = item.data) == null ? void 0 : _a.depth) || item.depth || item);
|
|
7578
8077
|
} else if (this.formCache.axisType === "time") {
|
|
7579
|
-
return this.toMillisecondTimestamp(
|
|
8078
|
+
return this.toMillisecondTimestamp(
|
|
8079
|
+
((_b = item.data) == null ? void 0 : _b.time) || item.time || item
|
|
8080
|
+
);
|
|
7580
8081
|
}
|
|
7581
8082
|
return Number(item);
|
|
7582
8083
|
}).filter((val) => val !== null && !isNaN(val));
|
|
@@ -7677,7 +8178,9 @@ const _sfc_main$2 = {
|
|
|
7677
8178
|
}
|
|
7678
8179
|
if (foundMatch) {
|
|
7679
8180
|
this.$emit("loadingChange", false);
|
|
7680
|
-
const endIndex = this.realTimeData.findIndex(
|
|
8181
|
+
const endIndex = this.realTimeData.findIndex(
|
|
8182
|
+
(item, index2) => index2 >= startIndex && Number(item[axisKey]) > endValue
|
|
8183
|
+
);
|
|
7681
8184
|
const actualEndIndex = endIndex === -1 ? this.realTimeData.length : endIndex;
|
|
7682
8185
|
const newWindowSize = actualEndIndex - startIndex;
|
|
7683
8186
|
this.startIndex = startIndex;
|
|
@@ -7738,14 +8241,34 @@ const _sfc_main$2 = {
|
|
|
7738
8241
|
this.pendingRequestData = null;
|
|
7739
8242
|
return;
|
|
7740
8243
|
}
|
|
7741
|
-
const existingKeys = new Set(
|
|
7742
|
-
|
|
8244
|
+
const existingKeys = new Set(
|
|
8245
|
+
this.realTimeData.map((item) => item[axisKey])
|
|
8246
|
+
);
|
|
8247
|
+
const newItems = newData.filter(
|
|
8248
|
+
(item) => !existingKeys.has(item[axisKey])
|
|
8249
|
+
);
|
|
7743
8250
|
this.realTimeData = [...this.realTimeData, ...newItems];
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
8251
|
+
if (axisType === "depth") {
|
|
8252
|
+
if (this.realTimeData[0] && this.realTimeData[0].timestamp) {
|
|
8253
|
+
this.realTimeData.sort((a, b) => {
|
|
8254
|
+
const timestampA = this.toMillisecondTimestamp(a.timestamp);
|
|
8255
|
+
const timestampB = this.toMillisecondTimestamp(b.timestamp);
|
|
8256
|
+
return timestampA - timestampB;
|
|
8257
|
+
});
|
|
8258
|
+
} else {
|
|
8259
|
+
this.realTimeData.sort((a, b) => {
|
|
8260
|
+
const valA = Number(a[axisKey]);
|
|
8261
|
+
const valB = Number(b[axisKey]);
|
|
8262
|
+
return valA - valB;
|
|
8263
|
+
});
|
|
8264
|
+
}
|
|
8265
|
+
} else {
|
|
8266
|
+
this.realTimeData.sort((a, b) => {
|
|
8267
|
+
const valA = Number(a[axisKey]);
|
|
8268
|
+
const valB = Number(b[axisKey]);
|
|
8269
|
+
return valA - valB;
|
|
8270
|
+
});
|
|
8271
|
+
}
|
|
7749
8272
|
let targetStartValue = Number(startValue);
|
|
7750
8273
|
if (axisType !== "depth") {
|
|
7751
8274
|
const str = String(targetStartValue);
|
|
@@ -7773,7 +8296,9 @@ const _sfc_main$2 = {
|
|
|
7773
8296
|
targetEndValue = targetEndValue * 1e3;
|
|
7774
8297
|
}
|
|
7775
8298
|
}
|
|
7776
|
-
const endIndex = this.realTimeData.findIndex(
|
|
8299
|
+
const endIndex = this.realTimeData.findIndex(
|
|
8300
|
+
(item, index2) => index2 >= startIndex && Number(item[axisKey]) >= targetEndValue
|
|
8301
|
+
);
|
|
7777
8302
|
const actualEndIndex = endIndex === -1 ? this.realTimeData.length : endIndex;
|
|
7778
8303
|
const newWindowSize = actualEndIndex - startIndex;
|
|
7779
8304
|
this.startIndex = startIndex;
|
|
@@ -7814,7 +8339,7 @@ const _sfc_main$2 = {
|
|
|
7814
8339
|
return null;
|
|
7815
8340
|
}
|
|
7816
8341
|
for (const item of seriesData) {
|
|
7817
|
-
if (
|
|
8342
|
+
if (item.data && Object.prototype.hasOwnProperty.call(item.data, "rowData")) {
|
|
7818
8343
|
return item;
|
|
7819
8344
|
}
|
|
7820
8345
|
}
|
|
@@ -7914,15 +8439,14 @@ const _sfc_main$2 = {
|
|
|
7914
8439
|
axis: "y",
|
|
7915
8440
|
snap: true,
|
|
7916
8441
|
label: {
|
|
8442
|
+
backgroundColor: `${this.getCssVar("--kd-lane-container-border-color")}99`,
|
|
8443
|
+
color: `${this.getCssVar("--default-text-color")}`,
|
|
7917
8444
|
show: true,
|
|
7918
8445
|
formatter: (params) => {
|
|
8446
|
+
var _a;
|
|
7919
8447
|
if (this.formCache.displayType == "header") {
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
this.headerData = this.visibleData[dataIndexItem];
|
|
7923
|
-
} else {
|
|
7924
|
-
this.headerData = {};
|
|
7925
|
-
}
|
|
8448
|
+
const firstItem = this.getFirstDataIndexItem(params.seriesData);
|
|
8449
|
+
this.headerData = ((_a = firstItem == null ? void 0 : firstItem.data) == null ? void 0 : _a.rowData) || {};
|
|
7926
8450
|
}
|
|
7927
8451
|
if (this.formCache.axisType == "time") {
|
|
7928
8452
|
return this.timestampToYMDHMS(params.value);
|
|
@@ -7933,43 +8457,20 @@ const _sfc_main$2 = {
|
|
|
7933
8457
|
}
|
|
7934
8458
|
},
|
|
7935
8459
|
confine: true,
|
|
7936
|
-
appendTo: document.querySelector(
|
|
8460
|
+
// appendTo: document.querySelector('.kd-curve-2d-container'),
|
|
7937
8461
|
backgroundColor: this.getCssVar("--tooltip-bg-color"),
|
|
7938
8462
|
borderWidth: 0,
|
|
7939
8463
|
textStyle: {
|
|
7940
|
-
color: this.getCssVar("
|
|
8464
|
+
color: this.getCssVar("--default-text-color")
|
|
7941
8465
|
},
|
|
7942
8466
|
formatter: (series) => {
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
if (existingIndex === -1) {
|
|
7946
|
-
acc.push(current);
|
|
7947
|
-
} else {
|
|
7948
|
-
const existingItem = acc[existingIndex];
|
|
7949
|
-
const existingValue = Array.isArray(existingItem.value) ? existingItem.value[0] : existingItem.value;
|
|
7950
|
-
const currentValue = Array.isArray(current.value) ? current.value[0] : current.value;
|
|
7951
|
-
const existingHasValue = existingValue !== void 0 && existingValue !== null && existingValue !== "";
|
|
7952
|
-
const currentHasValue = currentValue !== void 0 && currentValue !== null && currentValue !== "";
|
|
7953
|
-
if (!existingHasValue && currentHasValue) ;
|
|
7954
|
-
else if (existingHasValue && !currentHasValue) {
|
|
7955
|
-
acc[existingIndex] = current;
|
|
7956
|
-
} else if (existingHasValue && currentHasValue) {
|
|
7957
|
-
if (Number(currentValue) > Number(existingValue)) {
|
|
7958
|
-
acc[existingIndex] = current;
|
|
7959
|
-
}
|
|
7960
|
-
} else {
|
|
7961
|
-
acc[existingIndex] = current;
|
|
7962
|
-
}
|
|
7963
|
-
}
|
|
7964
|
-
return acc;
|
|
7965
|
-
}, []);
|
|
8467
|
+
var _a;
|
|
8468
|
+
const uniqueSeries = series.filter((item) => item.seriesName !== "helper");
|
|
7966
8469
|
if (this.tooltipFormatter && typeof this.tooltipFormatter === "function") {
|
|
7967
8470
|
let mousePositionData = null;
|
|
7968
8471
|
if (uniqueSeries.length > 0) {
|
|
7969
8472
|
const firstItem = this.getFirstDataIndexItem(uniqueSeries);
|
|
7970
|
-
|
|
7971
|
-
mousePositionData = this.visibleData[firstItem.dataIndex];
|
|
7972
|
-
}
|
|
8473
|
+
mousePositionData = ((_a = firstItem == null ? void 0 : firstItem.data) == null ? void 0 : _a.rowData) || {};
|
|
7973
8474
|
}
|
|
7974
8475
|
return this.tooltipFormatter({
|
|
7975
8476
|
series: uniqueSeries,
|
|
@@ -8023,14 +8524,26 @@ const _sfc_main$2 = {
|
|
|
8023
8524
|
},
|
|
8024
8525
|
// 时间戳转换为毫秒级
|
|
8025
8526
|
toMillisecondTimestamp(time) {
|
|
8026
|
-
if (time === null || time === void 0) return
|
|
8027
|
-
let
|
|
8028
|
-
if (
|
|
8029
|
-
|
|
8030
|
-
|
|
8527
|
+
if (time === null || time === void 0) return null;
|
|
8528
|
+
let needConvert = true;
|
|
8529
|
+
if (typeof time === "number" || typeof time === "string" && /^\d+$/.test(time)) {
|
|
8530
|
+
needConvert = false;
|
|
8531
|
+
}
|
|
8532
|
+
if (!needConvert) {
|
|
8533
|
+
const num = Number(time);
|
|
8534
|
+
if (isNaN(num)) return Date.now();
|
|
8535
|
+
if (String(num).length === 13 || num > 1e12) {
|
|
8536
|
+
return num;
|
|
8537
|
+
} else {
|
|
8538
|
+
return num * 1e3;
|
|
8539
|
+
}
|
|
8540
|
+
} else {
|
|
8541
|
+
const timestamp = new Date(time).getTime();
|
|
8542
|
+
if (isNaN(timestamp)) {
|
|
8543
|
+
return Date.now();
|
|
8544
|
+
}
|
|
8031
8545
|
return timestamp;
|
|
8032
8546
|
}
|
|
8033
|
-
return timestamp * 1e3;
|
|
8034
8547
|
},
|
|
8035
8548
|
// 更新泳道图表选项
|
|
8036
8549
|
async updateLanesChartOption(transferData) {
|
|
@@ -8063,7 +8576,10 @@ const _sfc_main$2 = {
|
|
|
8063
8576
|
try {
|
|
8064
8577
|
for (let laneIndex = 0; laneIndex < lanes.length; laneIndex++) {
|
|
8065
8578
|
const lane = lanes[laneIndex];
|
|
8066
|
-
const axisTypeList = this.currentToolBarConfig.axisTypeList || {
|
|
8579
|
+
const axisTypeList = this.currentToolBarConfig.axisTypeList || {
|
|
8580
|
+
depth: "depth",
|
|
8581
|
+
time: "time"
|
|
8582
|
+
};
|
|
8067
8583
|
const isDepthLane = Object.prototype.hasOwnProperty.call(axisTypeList, "depth") && axisTypeList.depth == lane.laneKey;
|
|
8068
8584
|
const isTimeLane = Object.prototype.hasOwnProperty.call(axisTypeList, "time") && axisTypeList.time == lane.laneKey;
|
|
8069
8585
|
const option = this.getDefaultLaneChartOption();
|
|
@@ -8072,20 +8588,36 @@ const _sfc_main$2 = {
|
|
|
8072
8588
|
if (lane && lane.lines && lane.lines.length > 0) {
|
|
8073
8589
|
for (const lineInfo of lane.lines) {
|
|
8074
8590
|
if (lineInfo.isUsed !== "1") continue;
|
|
8075
|
-
const seriesData = this.generateSeriesDataCached(
|
|
8591
|
+
const seriesData = this.generateSeriesDataCached(
|
|
8592
|
+
realTimeData,
|
|
8593
|
+
lineInfo,
|
|
8594
|
+
axisKey,
|
|
8595
|
+
paramCodeMap
|
|
8596
|
+
);
|
|
8076
8597
|
seriesDataCache[lineInfo.lineId] = { full: seriesData };
|
|
8077
8598
|
if (!hasValidLineData) {
|
|
8078
|
-
hasValidLineData = seriesData.some(
|
|
8599
|
+
hasValidLineData = seriesData.some(
|
|
8600
|
+
(point) => point[0] !== null && point[0] !== void 0 && point[0] !== ""
|
|
8601
|
+
);
|
|
8079
8602
|
}
|
|
8080
8603
|
if (lineInfo.recommendParamId) {
|
|
8081
8604
|
const recommendLineInfo = {
|
|
8082
8605
|
...lineInfo,
|
|
8083
8606
|
paramId: lineInfo.recommendParamId
|
|
8084
8607
|
};
|
|
8085
|
-
const recommendSeriesData = this.generateSeriesDataCached(
|
|
8086
|
-
|
|
8608
|
+
const recommendSeriesData = this.generateSeriesDataCached(
|
|
8609
|
+
realTimeData,
|
|
8610
|
+
recommendLineInfo,
|
|
8611
|
+
axisKey,
|
|
8612
|
+
paramCodeMap
|
|
8613
|
+
);
|
|
8614
|
+
seriesDataCache[lineInfo.lineId + "_recommend"] = {
|
|
8615
|
+
full: recommendSeriesData
|
|
8616
|
+
};
|
|
8087
8617
|
if (!hasValidLineData) {
|
|
8088
|
-
hasValidLineData = recommendSeriesData.some(
|
|
8618
|
+
hasValidLineData = recommendSeriesData.some(
|
|
8619
|
+
(point) => point[0] !== null && point[0] !== void 0 && point[0] !== ""
|
|
8620
|
+
);
|
|
8089
8621
|
}
|
|
8090
8622
|
}
|
|
8091
8623
|
}
|
|
@@ -8129,9 +8661,17 @@ const _sfc_main$2 = {
|
|
|
8129
8661
|
if (allIntervals.length > 0) {
|
|
8130
8662
|
const minInterval = Math.min(...allIntervals);
|
|
8131
8663
|
const totalRange = Math.max(...allValues) - Math.min(...allValues);
|
|
8132
|
-
const intervalCount = Math.max(
|
|
8133
|
-
|
|
8134
|
-
|
|
8664
|
+
const intervalCount = Math.max(
|
|
8665
|
+
1,
|
|
8666
|
+
Math.min(12, Math.ceil(totalRange / minInterval))
|
|
8667
|
+
);
|
|
8668
|
+
unifiedInterval = Math.ceil(
|
|
8669
|
+
totalRange / Math.min(12, intervalCount)
|
|
8670
|
+
);
|
|
8671
|
+
unifiedInterval = Math.max(
|
|
8672
|
+
minInterval,
|
|
8673
|
+
Math.ceil(unifiedInterval / minInterval) * minInterval
|
|
8674
|
+
);
|
|
8135
8675
|
}
|
|
8136
8676
|
let currentTop = 0;
|
|
8137
8677
|
for (let groupIndex = 0; groupIndex < dataGroups.length; groupIndex++) {
|
|
@@ -8162,7 +8702,9 @@ const _sfc_main$2 = {
|
|
|
8162
8702
|
showMinLine: false,
|
|
8163
8703
|
showMaxLine: false,
|
|
8164
8704
|
lineStyle: {
|
|
8165
|
-
color: this.getCssVar(
|
|
8705
|
+
color: this.getCssVar(
|
|
8706
|
+
"--kd-lane-container-item-line-color"
|
|
8707
|
+
),
|
|
8166
8708
|
type: "dashed"
|
|
8167
8709
|
}
|
|
8168
8710
|
},
|
|
@@ -8190,9 +8732,10 @@ const _sfc_main$2 = {
|
|
|
8190
8732
|
});
|
|
8191
8733
|
option.series.push({
|
|
8192
8734
|
type: "line",
|
|
8193
|
-
xAxisIndex:
|
|
8735
|
+
xAxisIndex: option.xAxis.length - 1,
|
|
8194
8736
|
yAxisIndex: gridIndex,
|
|
8195
|
-
nameIndex: groupIndex
|
|
8737
|
+
nameIndex: groupIndex,
|
|
8738
|
+
data: []
|
|
8196
8739
|
});
|
|
8197
8740
|
Object.assign(option.yAxis[gridIndex], {
|
|
8198
8741
|
splitLine: { show: false },
|
|
@@ -8228,18 +8771,39 @@ const _sfc_main$2 = {
|
|
|
8228
8771
|
lineHeight: 14
|
|
8229
8772
|
}
|
|
8230
8773
|
},
|
|
8231
|
-
formatter: this.getYAxisLabelFormatter(
|
|
8774
|
+
formatter: this.getYAxisLabelFormatter(
|
|
8775
|
+
isTimeLane,
|
|
8776
|
+
dataGroups,
|
|
8777
|
+
groupIndex,
|
|
8778
|
+
groupMin,
|
|
8779
|
+
groupMax,
|
|
8780
|
+
axisKey
|
|
8781
|
+
)
|
|
8232
8782
|
}
|
|
8233
8783
|
});
|
|
8234
8784
|
option.backgroundColor = "transparent";
|
|
8235
8785
|
delete option.tooltip;
|
|
8786
|
+
} else if (!lane.lines || lane.lines.length === 0) {
|
|
8787
|
+
option.xAxis.push({
|
|
8788
|
+
gridIndex,
|
|
8789
|
+
type: "value",
|
|
8790
|
+
min: 0,
|
|
8791
|
+
max: 10,
|
|
8792
|
+
splitLine: { show: false },
|
|
8793
|
+
axisLabel: { show: false },
|
|
8794
|
+
axisLine: { show: false },
|
|
8795
|
+
axisTick: { show: false }
|
|
8796
|
+
});
|
|
8236
8797
|
}
|
|
8237
8798
|
const isLogScale = lane.isLogScale === "1";
|
|
8238
8799
|
let laneMin = 0, laneMax = 0;
|
|
8239
8800
|
if (lane && lane.lines) {
|
|
8240
8801
|
for (const lineInfo of lane.lines) {
|
|
8241
8802
|
const allValidData = ((_a = seriesDataCache[lineInfo.lineId]) == null ? void 0 : _a.full) || [];
|
|
8242
|
-
const range = this.getXAxisRangeByHeader(
|
|
8803
|
+
const range = this.getXAxisRangeByHeader(
|
|
8804
|
+
lineInfo,
|
|
8805
|
+
allValidData
|
|
8806
|
+
);
|
|
8243
8807
|
if (lineInfo.min) laneMin = Math.min(laneMin, range.min);
|
|
8244
8808
|
if (lineInfo.max) laneMax = Math.max(laneMax, range.max);
|
|
8245
8809
|
}
|
|
@@ -8249,12 +8813,31 @@ const _sfc_main$2 = {
|
|
|
8249
8813
|
var _a2, _b, _c, _d;
|
|
8250
8814
|
if (!seriesDataCache[lineInfo.lineId]) {
|
|
8251
8815
|
seriesDataCache[lineInfo.lineId] = {
|
|
8252
|
-
full: this.generateSeriesDataCached(
|
|
8816
|
+
full: this.generateSeriesDataCached(
|
|
8817
|
+
realTimeData,
|
|
8818
|
+
lineInfo,
|
|
8819
|
+
axisKey,
|
|
8820
|
+
paramCodeMap
|
|
8821
|
+
)
|
|
8253
8822
|
};
|
|
8254
8823
|
}
|
|
8255
|
-
const groupSeriesData = this.generateSeriesDataCached(
|
|
8824
|
+
const groupSeriesData = this.generateSeriesDataCached(
|
|
8825
|
+
group,
|
|
8826
|
+
lineInfo,
|
|
8827
|
+
axisKey,
|
|
8828
|
+
paramCodeMap
|
|
8829
|
+
);
|
|
8830
|
+
const groupAllSeriesData = this.generateAllSeriesDataCached(
|
|
8831
|
+
group,
|
|
8832
|
+
lineInfo,
|
|
8833
|
+
axisKey,
|
|
8834
|
+
paramCodeMap
|
|
8835
|
+
);
|
|
8256
8836
|
const allValidData = seriesDataCache[lineInfo.lineId].full;
|
|
8257
|
-
const { min, max } = this.getXAxisRangeByHeader(
|
|
8837
|
+
const { min, max } = this.getXAxisRangeByHeader(
|
|
8838
|
+
lineInfo,
|
|
8839
|
+
allValidData
|
|
8840
|
+
);
|
|
8258
8841
|
const xAxisIndex = option.xAxis.length;
|
|
8259
8842
|
option.xAxis.push({
|
|
8260
8843
|
interval: isLogScale ? "auto" : (max - min) / 5,
|
|
@@ -8268,7 +8851,12 @@ const _sfc_main$2 = {
|
|
|
8268
8851
|
show: !isDepthLane,
|
|
8269
8852
|
showMaxLine: false,
|
|
8270
8853
|
showMinLine: false,
|
|
8271
|
-
lineStyle: {
|
|
8854
|
+
lineStyle: {
|
|
8855
|
+
color: this.getCssVar(
|
|
8856
|
+
"--kd-lane-container-item-line-color"
|
|
8857
|
+
),
|
|
8858
|
+
type: "dashed"
|
|
8859
|
+
}
|
|
8272
8860
|
},
|
|
8273
8861
|
axisLabel: { show: false },
|
|
8274
8862
|
axisLine: { show: false },
|
|
@@ -8276,7 +8864,9 @@ const _sfc_main$2 = {
|
|
|
8276
8864
|
});
|
|
8277
8865
|
const baseSeries = {
|
|
8278
8866
|
laneId: lineInfo.paramId,
|
|
8279
|
-
|
|
8867
|
+
paramId: lineInfo.paramId,
|
|
8868
|
+
lineId: lineInfo.lineId,
|
|
8869
|
+
data: lineInfo.isUsed === "1" ? groupAllSeriesData : [],
|
|
8280
8870
|
type: "line",
|
|
8281
8871
|
xAxisIndex,
|
|
8282
8872
|
yAxisIndex: gridIndex,
|
|
@@ -8292,22 +8882,81 @@ const _sfc_main$2 = {
|
|
|
8292
8882
|
z: lineInfo.lineSort
|
|
8293
8883
|
};
|
|
8294
8884
|
if (lane.lines.length - 1 == index2) {
|
|
8295
|
-
this.addMarkLineToSeries(
|
|
8885
|
+
this.addMarkLineToSeries(
|
|
8886
|
+
baseSeries,
|
|
8887
|
+
lineInfo,
|
|
8888
|
+
realTimeData,
|
|
8889
|
+
axisKey,
|
|
8890
|
+
dataIndexMap,
|
|
8891
|
+
groupMin,
|
|
8892
|
+
groupMax
|
|
8893
|
+
);
|
|
8296
8894
|
}
|
|
8297
|
-
this.addMarkAreaToSeries(
|
|
8298
|
-
|
|
8299
|
-
|
|
8895
|
+
this.addMarkAreaToSeries(
|
|
8896
|
+
baseSeries,
|
|
8897
|
+
lineInfo,
|
|
8898
|
+
realTimeData,
|
|
8899
|
+
axisKey,
|
|
8900
|
+
min,
|
|
8901
|
+
max,
|
|
8902
|
+
dataIndexMap
|
|
8903
|
+
);
|
|
8904
|
+
this.addAreaStyleToSeries(
|
|
8905
|
+
baseSeries,
|
|
8906
|
+
lineInfo,
|
|
8907
|
+
groupSeriesData,
|
|
8908
|
+
min
|
|
8909
|
+
);
|
|
8910
|
+
const rangeAreaSeries = this.addRangeAreaToSeries(
|
|
8911
|
+
baseSeries,
|
|
8912
|
+
lineInfo,
|
|
8913
|
+
realTimeData,
|
|
8914
|
+
axisKey,
|
|
8915
|
+
paramCodeMap,
|
|
8916
|
+
min,
|
|
8917
|
+
max
|
|
8918
|
+
);
|
|
8300
8919
|
option.series.push(baseSeries);
|
|
8301
8920
|
if (rangeAreaSeries) {
|
|
8302
8921
|
option.series.push(rangeAreaSeries);
|
|
8303
8922
|
}
|
|
8923
|
+
if (lineInfo.isUsed === "1" && this.isGeomechanical && lane.laneId === this.activeLaneId) {
|
|
8924
|
+
const boundaryPoints = this.findMissingDataBoundaryPoints(groupSeriesData);
|
|
8925
|
+
if (boundaryPoints.length > 0) {
|
|
8926
|
+
option.series.push({
|
|
8927
|
+
type: "scatter",
|
|
8928
|
+
xAxisIndex,
|
|
8929
|
+
yAxisIndex: gridIndex,
|
|
8930
|
+
data: boundaryPoints.map((bp) => ({
|
|
8931
|
+
value: bp.data,
|
|
8932
|
+
type: bp.type,
|
|
8933
|
+
originalIndex: bp.originalIndex,
|
|
8934
|
+
lineId: lineInfo.lineId,
|
|
8935
|
+
paramId: lineInfo.paramId
|
|
8936
|
+
})),
|
|
8937
|
+
symbol: "circle",
|
|
8938
|
+
symbolSize: getAdaptedFontSize(8),
|
|
8939
|
+
itemStyle: {
|
|
8940
|
+
color: "red",
|
|
8941
|
+
opacity: 1
|
|
8942
|
+
},
|
|
8943
|
+
tooltip: { show: false },
|
|
8944
|
+
z: lineInfo.lineSort + 2
|
|
8945
|
+
});
|
|
8946
|
+
}
|
|
8947
|
+
}
|
|
8304
8948
|
if (lineInfo.recommendParamId) {
|
|
8305
8949
|
const recommendLineInfo = {
|
|
8306
8950
|
...lineInfo,
|
|
8307
8951
|
paramId: lineInfo.recommendParamId,
|
|
8308
8952
|
lineType: "dashed"
|
|
8309
8953
|
};
|
|
8310
|
-
const recommendGroupSeriesData = this.generateSeriesDataCached(
|
|
8954
|
+
const recommendGroupSeriesData = this.generateSeriesDataCached(
|
|
8955
|
+
group,
|
|
8956
|
+
recommendLineInfo,
|
|
8957
|
+
axisKey,
|
|
8958
|
+
paramCodeMap
|
|
8959
|
+
);
|
|
8311
8960
|
const recommendSeries = {
|
|
8312
8961
|
laneId: lineInfo.recommendParamId,
|
|
8313
8962
|
data: lineInfo.recommendIsUsed === "1" || lineInfo.recommendIsUsed == 1 ? recommendGroupSeriesData : [],
|
|
@@ -8330,18 +8979,26 @@ const _sfc_main$2 = {
|
|
|
8330
8979
|
if (effectScatterPoint && lineInfo.latestDataTips) {
|
|
8331
8980
|
let findIndex = -1;
|
|
8332
8981
|
if (axisKey === "depth") {
|
|
8333
|
-
findIndex = group.findIndex(
|
|
8982
|
+
findIndex = group.findIndex(
|
|
8983
|
+
(item) => item.timestamp === effectScatterPoint.timestamp && item[axisKey] === effectScatterPoint[axisKey]
|
|
8984
|
+
);
|
|
8334
8985
|
} else {
|
|
8335
|
-
findIndex = group.findIndex(
|
|
8986
|
+
findIndex = group.findIndex(
|
|
8987
|
+
(item) => item[axisKey] === effectScatterPoint[axisKey]
|
|
8988
|
+
);
|
|
8336
8989
|
}
|
|
8337
8990
|
const pointAxisValue = effectScatterPoint[axisKey];
|
|
8338
8991
|
if (pointAxisValue >= groupMin && pointAxisValue <= groupMax && findIndex !== -1) {
|
|
8339
|
-
console.log(pointAxisValue, findIndex, groupMin, groupMax, "444444", [effectScatterPoint[lineInfo.paramId], effectScatterPoint[axisKey]]);
|
|
8340
8992
|
option.series.push({
|
|
8341
8993
|
type: "effectScatter",
|
|
8342
8994
|
xAxisIndex,
|
|
8343
8995
|
yAxisIndex: gridIndex,
|
|
8344
|
-
data: [
|
|
8996
|
+
data: [
|
|
8997
|
+
[
|
|
8998
|
+
effectScatterPoint[lineInfo.paramId],
|
|
8999
|
+
effectScatterPoint[axisKey]
|
|
9000
|
+
]
|
|
9001
|
+
],
|
|
8345
9002
|
symbol: "circle",
|
|
8346
9003
|
symbolSize: getAdaptedFontSize(12),
|
|
8347
9004
|
itemStyle: {
|
|
@@ -8365,22 +9022,31 @@ const _sfc_main$2 = {
|
|
|
8365
9022
|
const rangeMins = lane.lines.map((item) => {
|
|
8366
9023
|
var _a2;
|
|
8367
9024
|
return (_a2 = this.lineRange[item.lineId]) == null ? void 0 : _a2.min;
|
|
8368
|
-
}).filter(
|
|
9025
|
+
}).filter(
|
|
9026
|
+
(v) => v !== void 0 && v !== null && !Number.isNaN(v)
|
|
9027
|
+
);
|
|
8369
9028
|
if (rangeMins.length > 0) {
|
|
8370
9029
|
const min = Math.max(...rangeMins);
|
|
8371
9030
|
option.series.unshift({
|
|
8372
9031
|
name: "helper",
|
|
8373
9032
|
type: "line",
|
|
8374
|
-
xAxisIndex:
|
|
9033
|
+
xAxisIndex: option.xAxis.length - 1,
|
|
8375
9034
|
yAxisIndex: gridIndex,
|
|
8376
9035
|
data: group.map((item) => [min, +item[axisKey]]),
|
|
8377
9036
|
lineStyle: { opacity: 0 },
|
|
8378
|
-
symbol: "none"
|
|
9037
|
+
symbol: "none",
|
|
9038
|
+
silent: true
|
|
9039
|
+
// 禁用鼠标事件
|
|
8379
9040
|
});
|
|
8380
9041
|
}
|
|
8381
9042
|
}
|
|
8382
9043
|
}
|
|
8383
9044
|
}
|
|
9045
|
+
if (hasValidLineData && option.tooltip) {
|
|
9046
|
+
option.tooltip.showContent = this.shouldShowTooltipContent(
|
|
9047
|
+
lane.laneId
|
|
9048
|
+
);
|
|
9049
|
+
}
|
|
8384
9050
|
this.updateOptionsByLineId(lane.laneId, option);
|
|
8385
9051
|
const chartRef = this.getChartRefByLaneId(lane.laneId);
|
|
8386
9052
|
if (chartRef && chartRef.chart) {
|
|
@@ -8392,6 +9058,17 @@ const _sfc_main$2 = {
|
|
|
8392
9058
|
} finally {
|
|
8393
9059
|
this.isUpdatingChart = false;
|
|
8394
9060
|
this.scheduleConnectAllCharts();
|
|
9061
|
+
const lanesToRefresh = new Set(
|
|
9062
|
+
Object.keys(this.laneSelectedPointPairs || {})
|
|
9063
|
+
);
|
|
9064
|
+
if (this.selectedLaneId) lanesToRefresh.add(this.selectedLaneId);
|
|
9065
|
+
if (lanesToRefresh.size > 0) {
|
|
9066
|
+
this.$nextTick(() => {
|
|
9067
|
+
lanesToRefresh.forEach((lid) => {
|
|
9068
|
+
this.showSelectedPointScatter(lid);
|
|
9069
|
+
});
|
|
9070
|
+
});
|
|
9071
|
+
}
|
|
8395
9072
|
if (this.pendingChartUpdate) {
|
|
8396
9073
|
this.pendingChartUpdate = false;
|
|
8397
9074
|
this.$nextTick(() => {
|
|
@@ -8407,7 +9084,9 @@ const _sfc_main$2 = {
|
|
|
8407
9084
|
if (Object.prototype.hasOwnProperty.call(item, lineInfo.paramId)) {
|
|
8408
9085
|
value = item[lineInfo.paramId];
|
|
8409
9086
|
} else {
|
|
8410
|
-
const currentParam = this.params.find(
|
|
9087
|
+
const currentParam = this.params.find(
|
|
9088
|
+
(p) => p.paramId == lineInfo.paramId
|
|
9089
|
+
);
|
|
8411
9090
|
if (currentParam && currentParam.paramCode) {
|
|
8412
9091
|
const codes = currentParam.paramCode.split(",");
|
|
8413
9092
|
for (const code of codes) {
|
|
@@ -8439,6 +9118,27 @@ const _sfc_main$2 = {
|
|
|
8439
9118
|
return [value, +item[axisKey]];
|
|
8440
9119
|
});
|
|
8441
9120
|
},
|
|
9121
|
+
generateAllSeriesDataCached(data, lineInfo, axisKey, paramCodeMap) {
|
|
9122
|
+
const paramId = lineInfo.paramId;
|
|
9123
|
+
const codes = paramCodeMap.get(paramId);
|
|
9124
|
+
return data.map((item) => {
|
|
9125
|
+
let value = null;
|
|
9126
|
+
if (Object.prototype.hasOwnProperty.call(item, paramId)) {
|
|
9127
|
+
value = item[paramId];
|
|
9128
|
+
} else if (codes) {
|
|
9129
|
+
for (let i = 0; i < codes.length; i++) {
|
|
9130
|
+
if (Object.prototype.hasOwnProperty.call(item, codes[i])) {
|
|
9131
|
+
value = item[codes[i]];
|
|
9132
|
+
break;
|
|
9133
|
+
}
|
|
9134
|
+
}
|
|
9135
|
+
}
|
|
9136
|
+
return {
|
|
9137
|
+
value: [value, +item[axisKey]],
|
|
9138
|
+
rowData: item
|
|
9139
|
+
};
|
|
9140
|
+
});
|
|
9141
|
+
},
|
|
8442
9142
|
getEffectScatterPoint(lineInfo, axisKey) {
|
|
8443
9143
|
if (!this.realTimeData || this.realTimeData.length === 0) return null;
|
|
8444
9144
|
let latestData = null;
|
|
@@ -8462,6 +9162,621 @@ const _sfc_main$2 = {
|
|
|
8462
9162
|
depth: latestData[axisKey]
|
|
8463
9163
|
};
|
|
8464
9164
|
},
|
|
9165
|
+
findMissingDataBoundaryPoints(seriesData) {
|
|
9166
|
+
const boundaryPoints = [];
|
|
9167
|
+
if (!seriesData || seriesData.length === 0) return boundaryPoints;
|
|
9168
|
+
let lastValidPoint = null;
|
|
9169
|
+
let lastValidIndex = -1;
|
|
9170
|
+
let inMissingRange = false;
|
|
9171
|
+
for (let i = 0; i < seriesData.length; i++) {
|
|
9172
|
+
const point = seriesData[i];
|
|
9173
|
+
const value = point[0];
|
|
9174
|
+
const isValid = value !== null && value !== void 0 && value !== "" && Number.isFinite(+value);
|
|
9175
|
+
if (isValid) {
|
|
9176
|
+
if (inMissingRange && lastValidPoint) {
|
|
9177
|
+
boundaryPoints.push({
|
|
9178
|
+
data: lastValidPoint,
|
|
9179
|
+
type: "top",
|
|
9180
|
+
originalIndex: lastValidIndex
|
|
9181
|
+
});
|
|
9182
|
+
boundaryPoints.push({
|
|
9183
|
+
data: point,
|
|
9184
|
+
type: "bottom",
|
|
9185
|
+
originalIndex: i
|
|
9186
|
+
});
|
|
9187
|
+
}
|
|
9188
|
+
lastValidPoint = point;
|
|
9189
|
+
lastValidIndex = i;
|
|
9190
|
+
inMissingRange = false;
|
|
9191
|
+
} else {
|
|
9192
|
+
if (!inMissingRange && lastValidPoint) {
|
|
9193
|
+
inMissingRange = true;
|
|
9194
|
+
}
|
|
9195
|
+
}
|
|
9196
|
+
}
|
|
9197
|
+
return boundaryPoints;
|
|
9198
|
+
},
|
|
9199
|
+
async handleChartClick(e, laneId) {
|
|
9200
|
+
var _a, _b, _c;
|
|
9201
|
+
const chartRef = this.getChartRefByLaneId(laneId);
|
|
9202
|
+
if (!chartRef || !chartRef.chart) return;
|
|
9203
|
+
if (!this.isGeomechanical) return;
|
|
9204
|
+
const wasActiveLane = this.activeLaneId === laneId;
|
|
9205
|
+
if (this.activeLaneId !== laneId) {
|
|
9206
|
+
const prevActiveLaneId = this.activeLaneId;
|
|
9207
|
+
this.activeLaneId = laneId;
|
|
9208
|
+
await this.updateLanesChartOption();
|
|
9209
|
+
if (prevActiveLaneId) {
|
|
9210
|
+
this.showSelectedPointScatter(prevActiveLaneId);
|
|
9211
|
+
}
|
|
9212
|
+
}
|
|
9213
|
+
const chart = chartRef.chart;
|
|
9214
|
+
const option = chart.getOption();
|
|
9215
|
+
const pointInPixel = [
|
|
9216
|
+
e.offsetX || ((_a = e.event) == null ? void 0 : _a.offsetX),
|
|
9217
|
+
e.offsetY || ((_b = e.event) == null ? void 0 : _b.offsetY)
|
|
9218
|
+
];
|
|
9219
|
+
let clickedPoint = null;
|
|
9220
|
+
let closestPoint = null;
|
|
9221
|
+
let closestDistance = 10;
|
|
9222
|
+
const axisKey = this.currentToolBarConfig.axisTypeList && this.currentToolBarConfig.axisTypeList[this.formCache.axisType] || (this.formCache.axisType === "time" ? "time" : "depth");
|
|
9223
|
+
for (let i = 0; i < option.series.length; i++) {
|
|
9224
|
+
const series = option.series[i];
|
|
9225
|
+
if (series.name === "helper") continue;
|
|
9226
|
+
if (series.type !== "line") continue;
|
|
9227
|
+
const data = series.data || [];
|
|
9228
|
+
for (let j = 0; j < data.length; j++) {
|
|
9229
|
+
const item = data[j];
|
|
9230
|
+
if (!item) continue;
|
|
9231
|
+
let pointValue;
|
|
9232
|
+
pointValue = Array.isArray(item) ? item : item.value || [];
|
|
9233
|
+
if (!pointValue || !Array.isArray(pointValue) || pointValue.length < 2)
|
|
9234
|
+
continue;
|
|
9235
|
+
const point = chart.convertToPixel({ seriesIndex: i }, pointValue);
|
|
9236
|
+
if (!point) continue;
|
|
9237
|
+
const distance = Math.sqrt(
|
|
9238
|
+
Math.pow(point[0] - pointInPixel[0], 2) + Math.pow(point[1] - pointInPixel[1], 2)
|
|
9239
|
+
);
|
|
9240
|
+
if (distance < closestDistance) {
|
|
9241
|
+
closestDistance = distance;
|
|
9242
|
+
const axisValue = pointValue[1];
|
|
9243
|
+
const originalData = this.realTimeData.find(
|
|
9244
|
+
(d) => d[axisKey] == axisValue
|
|
9245
|
+
);
|
|
9246
|
+
closestPoint = {
|
|
9247
|
+
...item,
|
|
9248
|
+
value: pointValue,
|
|
9249
|
+
seriesIndex: i,
|
|
9250
|
+
dataIndex: j,
|
|
9251
|
+
paramId: item.paramId || series.paramId,
|
|
9252
|
+
lineId: item.lineId || series.lineId,
|
|
9253
|
+
color: series.color,
|
|
9254
|
+
laneId,
|
|
9255
|
+
depth: (originalData == null ? void 0 : originalData.depth) || null,
|
|
9256
|
+
timestamp: ((_c = originalData == null ? void 0 : originalData.timestamp) == null ? void 0 : _c.toString()) || null
|
|
9257
|
+
};
|
|
9258
|
+
}
|
|
9259
|
+
}
|
|
9260
|
+
}
|
|
9261
|
+
if (closestPoint && closestDistance < 10) {
|
|
9262
|
+
clickedPoint = closestPoint;
|
|
9263
|
+
}
|
|
9264
|
+
if (clickedPoint) {
|
|
9265
|
+
this._lastBlankClickTime = null;
|
|
9266
|
+
this._lastBlankClickLaneId = null;
|
|
9267
|
+
if (this.selectedPoints.length === 0) {
|
|
9268
|
+
this.selectedPoints = [clickedPoint];
|
|
9269
|
+
this.selectedLaneId = laneId;
|
|
9270
|
+
this.selectedParamId = clickedPoint.paramId;
|
|
9271
|
+
if (!this.laneSelectedPointPairs.hasOwnProperty(laneId)) {
|
|
9272
|
+
this.laneSelectedPointPairs[laneId] = [];
|
|
9273
|
+
}
|
|
9274
|
+
this.laneSelectedPointPairs[laneId].push({
|
|
9275
|
+
point1: clickedPoint,
|
|
9276
|
+
point2: null,
|
|
9277
|
+
markAreaId: null
|
|
9278
|
+
});
|
|
9279
|
+
console.log(clickedPoint, this.laneSelectedPointPairs[laneId]);
|
|
9280
|
+
this.showSelectedPointScatter(laneId);
|
|
9281
|
+
} else {
|
|
9282
|
+
const firstPoint = this.selectedPoints[0];
|
|
9283
|
+
if (firstPoint.lineId === clickedPoint.lineId && firstPoint.paramId === clickedPoint.paramId) {
|
|
9284
|
+
const markAreaId = this.createMarkArea(
|
|
9285
|
+
firstPoint,
|
|
9286
|
+
clickedPoint,
|
|
9287
|
+
laneId
|
|
9288
|
+
);
|
|
9289
|
+
this.laneSelectedPointPairs[laneId][this.laneSelectedPointPairs[laneId].length - 1].point2 = clickedPoint;
|
|
9290
|
+
this.laneSelectedPointPairs[laneId][this.laneSelectedPointPairs[laneId].length - 1].markAreaId = markAreaId;
|
|
9291
|
+
this.selectedPoints = [];
|
|
9292
|
+
this.selectedLaneId = null;
|
|
9293
|
+
this.selectedParamId = null;
|
|
9294
|
+
this.showSelectedPointScatter(laneId);
|
|
9295
|
+
} else {
|
|
9296
|
+
this.laneSelectedPointPairs[this.selectedLaneId].pop();
|
|
9297
|
+
this.showSelectedPointScatter(this.selectedLaneId);
|
|
9298
|
+
this.selectedPoints = [clickedPoint];
|
|
9299
|
+
this.selectedLaneId = laneId;
|
|
9300
|
+
this.selectedParamId = clickedPoint.paramId;
|
|
9301
|
+
if (!this.laneSelectedPointPairs.hasOwnProperty(laneId)) {
|
|
9302
|
+
this.laneSelectedPointPairs[laneId] = [];
|
|
9303
|
+
}
|
|
9304
|
+
this.laneSelectedPointPairs[laneId].push({
|
|
9305
|
+
point1: clickedPoint,
|
|
9306
|
+
point2: null,
|
|
9307
|
+
markAreaId: null
|
|
9308
|
+
});
|
|
9309
|
+
this.showSelectedPointScatter(laneId);
|
|
9310
|
+
}
|
|
9311
|
+
}
|
|
9312
|
+
} else {
|
|
9313
|
+
if (this.selectedLaneId && this.selectedLaneId !== laneId) {
|
|
9314
|
+
this.laneSelectedPointPairs[this.selectedLaneId].pop();
|
|
9315
|
+
this.showSelectedPointScatter(this.selectedLaneId);
|
|
9316
|
+
this.selectedPoints = [];
|
|
9317
|
+
this.selectedLaneId = laneId;
|
|
9318
|
+
this.selectedParamId = null;
|
|
9319
|
+
this.showSelectedPointScatter(laneId);
|
|
9320
|
+
}
|
|
9321
|
+
if (wasActiveLane) {
|
|
9322
|
+
const now = Date.now();
|
|
9323
|
+
if (this._lastBlankClickLaneId === laneId && this._lastBlankClickTime && now - this._lastBlankClickTime < 500) {
|
|
9324
|
+
this._lastBlankClickTime = null;
|
|
9325
|
+
this._lastBlankClickLaneId = null;
|
|
9326
|
+
if (this.selectedPoints.length > 0 && this.selectedLaneId) {
|
|
9327
|
+
this.laneSelectedPointPairs[this.selectedLaneId].pop();
|
|
9328
|
+
this.selectedPoints = [];
|
|
9329
|
+
this.selectedLaneId = null;
|
|
9330
|
+
this.selectedParamId = null;
|
|
9331
|
+
}
|
|
9332
|
+
this.activeLaneId = null;
|
|
9333
|
+
await this.updateLanesChartOption();
|
|
9334
|
+
} else {
|
|
9335
|
+
this._lastBlankClickTime = now;
|
|
9336
|
+
this._lastBlankClickLaneId = laneId;
|
|
9337
|
+
}
|
|
9338
|
+
} else {
|
|
9339
|
+
this._lastBlankClickTime = null;
|
|
9340
|
+
this._lastBlankClickLaneId = null;
|
|
9341
|
+
}
|
|
9342
|
+
}
|
|
9343
|
+
await this.$nextTick();
|
|
9344
|
+
this.showSelectedPointScatter(laneId);
|
|
9345
|
+
},
|
|
9346
|
+
// 收集某泳道所有需要展示 scatter 的点:已完成区块的两个点 + 进行中的第一个点
|
|
9347
|
+
// 仅在地应力模式下的当前激活泳道才收集并显示
|
|
9348
|
+
collectScatterPointsForLane(laneId) {
|
|
9349
|
+
if (!this.isGeomechanical || laneId !== this.activeLaneId) return [];
|
|
9350
|
+
const points = [];
|
|
9351
|
+
const pairs = this.laneSelectedPointPairs[laneId] || [];
|
|
9352
|
+
pairs.forEach((pair) => {
|
|
9353
|
+
if (pair.point1 && this.isLineVisibleByParamId(pair.point1.paramId)) {
|
|
9354
|
+
points.push({
|
|
9355
|
+
...pair.point1
|
|
9356
|
+
});
|
|
9357
|
+
}
|
|
9358
|
+
if (pair.point2 && this.isLineVisibleByParamId(pair.point2.paramId)) {
|
|
9359
|
+
points.push({
|
|
9360
|
+
...pair.point2
|
|
9361
|
+
});
|
|
9362
|
+
}
|
|
9363
|
+
});
|
|
9364
|
+
return points;
|
|
9365
|
+
},
|
|
9366
|
+
showSelectedPointScatter(laneId) {
|
|
9367
|
+
const chartRef = this.getChartRefByLaneId(laneId);
|
|
9368
|
+
if (!chartRef || !chartRef.chart) return;
|
|
9369
|
+
const chart = chartRef.chart;
|
|
9370
|
+
const points = this.collectScatterPointsForLane(laneId);
|
|
9371
|
+
const axisKey = this.currentToolBarConfig.axisTypeList && this.currentToolBarConfig.axisTypeList[this.formCache.axisType] || (this.formCache.axisType === "time" ? "time" : "depth");
|
|
9372
|
+
const filteredPoints = points.filter((point) => {
|
|
9373
|
+
if (this.formCache.axisType === "depth" && point.timestamp !== void 0 && point.timestamp !== null) {
|
|
9374
|
+
const pointY = point.value[1];
|
|
9375
|
+
let findItem = this.visibleData.find(
|
|
9376
|
+
(d) => d[axisKey] == pointY && d.timestamp == point.timestamp
|
|
9377
|
+
) || {};
|
|
9378
|
+
if (JSON.stringify(findItem) == "{}") {
|
|
9379
|
+
return false;
|
|
9380
|
+
}
|
|
9381
|
+
return true;
|
|
9382
|
+
}
|
|
9383
|
+
return true;
|
|
9384
|
+
});
|
|
9385
|
+
const scatterData = filteredPoints.map((point) => ({
|
|
9386
|
+
value: point.value,
|
|
9387
|
+
itemStyle: {
|
|
9388
|
+
color: point.color || "#1890ff",
|
|
9389
|
+
borderColor: "#fff",
|
|
9390
|
+
borderWidth: 2
|
|
9391
|
+
}
|
|
9392
|
+
}));
|
|
9393
|
+
const option = chart.getOption();
|
|
9394
|
+
const existingIndex = option.series.findIndex(
|
|
9395
|
+
(s) => s.id === "selectedPointScatter"
|
|
9396
|
+
);
|
|
9397
|
+
if (existingIndex >= 0) {
|
|
9398
|
+
chart.setOption({
|
|
9399
|
+
series: [
|
|
9400
|
+
{
|
|
9401
|
+
id: "selectedPointScatter",
|
|
9402
|
+
data: scatterData,
|
|
9403
|
+
tooltip: { show: false }
|
|
9404
|
+
}
|
|
9405
|
+
]
|
|
9406
|
+
});
|
|
9407
|
+
} else {
|
|
9408
|
+
chart.setOption({
|
|
9409
|
+
series: [
|
|
9410
|
+
{
|
|
9411
|
+
id: "selectedPointScatter",
|
|
9412
|
+
type: "scatter",
|
|
9413
|
+
data: scatterData,
|
|
9414
|
+
symbolSize: 8,
|
|
9415
|
+
zlevel: 100,
|
|
9416
|
+
silent: true,
|
|
9417
|
+
tooltip: { show: false }
|
|
9418
|
+
}
|
|
9419
|
+
]
|
|
9420
|
+
});
|
|
9421
|
+
}
|
|
9422
|
+
},
|
|
9423
|
+
createMarkArea(point1, point2, laneId) {
|
|
9424
|
+
const yValue1 = point1.value[1];
|
|
9425
|
+
const yValue2 = point2.value[1];
|
|
9426
|
+
const axisType = this.formCache.axisType;
|
|
9427
|
+
let dataItem1 = {};
|
|
9428
|
+
let dataItem2 = {};
|
|
9429
|
+
if (axisType === "depth") {
|
|
9430
|
+
dataItem1 = {
|
|
9431
|
+
depth: yValue1,
|
|
9432
|
+
timestamp: point1.timestamp || null
|
|
9433
|
+
};
|
|
9434
|
+
dataItem2 = {
|
|
9435
|
+
depth: yValue2,
|
|
9436
|
+
timestamp: point2.timestamp || null
|
|
9437
|
+
};
|
|
9438
|
+
} else if (axisType === "time") {
|
|
9439
|
+
dataItem1 = {
|
|
9440
|
+
time: point1.time || yValue1,
|
|
9441
|
+
timestamp: point1.timestamp || null
|
|
9442
|
+
};
|
|
9443
|
+
dataItem2 = {
|
|
9444
|
+
time: point2.time || yValue2,
|
|
9445
|
+
timestamp: point2.timestamp || null
|
|
9446
|
+
};
|
|
9447
|
+
} else {
|
|
9448
|
+
dataItem1 = { y: yValue1 };
|
|
9449
|
+
dataItem2 = { y: yValue2 };
|
|
9450
|
+
}
|
|
9451
|
+
const newMarkArea = {
|
|
9452
|
+
id: Date.now() + "_" + (this._markAreaIdCounter = (this._markAreaIdCounter || 0) + 1),
|
|
9453
|
+
paramsId: point1.paramId,
|
|
9454
|
+
lineId: point1.lineId,
|
|
9455
|
+
type: "markArea",
|
|
9456
|
+
laneId,
|
|
9457
|
+
color: "rgba(139, 69, 19, 0.3)",
|
|
9458
|
+
data: [dataItem1, dataItem2]
|
|
9459
|
+
};
|
|
9460
|
+
this.markAreaLineData.push(newMarkArea);
|
|
9461
|
+
this.updateLanesChartOption();
|
|
9462
|
+
return newMarkArea.id;
|
|
9463
|
+
},
|
|
9464
|
+
handleChartRightClick(e, laneId) {
|
|
9465
|
+
var _a, _b;
|
|
9466
|
+
if (e.event) {
|
|
9467
|
+
e.event.preventDefault();
|
|
9468
|
+
}
|
|
9469
|
+
const chartRef = this.getChartRefByLaneId(laneId);
|
|
9470
|
+
if (!chartRef || !chartRef.chart) return;
|
|
9471
|
+
if (!this.isGeomechanical) return;
|
|
9472
|
+
if (this.activeLaneId !== laneId) {
|
|
9473
|
+
const prevActiveLaneId = this.activeLaneId;
|
|
9474
|
+
this.activeLaneId = laneId;
|
|
9475
|
+
this.updateLanesChartOption();
|
|
9476
|
+
if (prevActiveLaneId) {
|
|
9477
|
+
this.$nextTick(() => {
|
|
9478
|
+
this.showSelectedPointScatter(prevActiveLaneId);
|
|
9479
|
+
});
|
|
9480
|
+
}
|
|
9481
|
+
}
|
|
9482
|
+
const chart = chartRef.chart;
|
|
9483
|
+
const pointInPixel = [
|
|
9484
|
+
e.offsetX || ((_a = e.event) == null ? void 0 : _a.offsetX),
|
|
9485
|
+
e.offsetY || ((_b = e.event) == null ? void 0 : _b.offsetY)
|
|
9486
|
+
];
|
|
9487
|
+
const option = chart.getOption();
|
|
9488
|
+
let clickedPoint = null;
|
|
9489
|
+
let minDistance = 15;
|
|
9490
|
+
for (let i = 0; i < option.series.length; i++) {
|
|
9491
|
+
const series = option.series[i];
|
|
9492
|
+
if (series.type !== "scatter") continue;
|
|
9493
|
+
const data = series.data || [];
|
|
9494
|
+
for (let j = 0; j < data.length; j++) {
|
|
9495
|
+
const item = data[j];
|
|
9496
|
+
if (!item || !item.value) continue;
|
|
9497
|
+
const point = chart.convertToPixel({ seriesIndex: i }, item.value);
|
|
9498
|
+
if (!point) continue;
|
|
9499
|
+
const distance = Math.sqrt(
|
|
9500
|
+
Math.pow(point[0] - pointInPixel[0], 2) + Math.pow(point[1] - pointInPixel[1], 2)
|
|
9501
|
+
);
|
|
9502
|
+
if (distance < minDistance) {
|
|
9503
|
+
minDistance = distance;
|
|
9504
|
+
clickedPoint = item;
|
|
9505
|
+
}
|
|
9506
|
+
}
|
|
9507
|
+
}
|
|
9508
|
+
if (clickedPoint) {
|
|
9509
|
+
this.showContextMenu(clickedPoint, laneId, e);
|
|
9510
|
+
} else {
|
|
9511
|
+
this.showMarkAreaContextMenu(laneId, e);
|
|
9512
|
+
}
|
|
9513
|
+
},
|
|
9514
|
+
showMarkAreaContextMenu(laneId, e) {
|
|
9515
|
+
var _a, _b;
|
|
9516
|
+
const chartRef = this.getChartRefByLaneId(laneId);
|
|
9517
|
+
if (!chartRef || !chartRef.chart) return;
|
|
9518
|
+
const chart = chartRef.chart;
|
|
9519
|
+
const pointInPixel = [
|
|
9520
|
+
e.offsetX || ((_a = e.event) == null ? void 0 : _a.offsetX),
|
|
9521
|
+
e.offsetY || ((_b = e.event) == null ? void 0 : _b.offsetY)
|
|
9522
|
+
];
|
|
9523
|
+
const val = chart.convertFromPixel({ gridIndex: 0 }, pointInPixel);
|
|
9524
|
+
if (!val || val.length < 2) return;
|
|
9525
|
+
const yValue = val[1];
|
|
9526
|
+
for (let i = 0; i < this.markAreaLineData.length; i++) {
|
|
9527
|
+
const area = this.markAreaLineData[i];
|
|
9528
|
+
if (area.laneId !== laneId) continue;
|
|
9529
|
+
const data = area.data || [];
|
|
9530
|
+
if (data.length < 2) continue;
|
|
9531
|
+
let y1, y2;
|
|
9532
|
+
if (this.formCache.axisType === "depth") {
|
|
9533
|
+
y1 = data[0].depth;
|
|
9534
|
+
y2 = data[1].depth;
|
|
9535
|
+
} else if (this.formCache.axisType === "time") {
|
|
9536
|
+
y1 = this.toMillisecondTimestamp(data[0].time);
|
|
9537
|
+
y2 = this.toMillisecondTimestamp(data[1].time);
|
|
9538
|
+
} else {
|
|
9539
|
+
y1 = data[0].y;
|
|
9540
|
+
y2 = data[1].y;
|
|
9541
|
+
}
|
|
9542
|
+
const minY = Math.min(y1, y2);
|
|
9543
|
+
const maxY = Math.max(y1, y2);
|
|
9544
|
+
if (yValue >= minY && yValue <= maxY) {
|
|
9545
|
+
this.currentMarkAreaIndex = i;
|
|
9546
|
+
this.currentContextMenuType = "markArea";
|
|
9547
|
+
this.currentPointInfo = null;
|
|
9548
|
+
this.currentContextMenuItems = [
|
|
9549
|
+
...this.markAreaMenuConfig || [],
|
|
9550
|
+
{ label: "删除区块", action: "deleteMarkArea" }
|
|
9551
|
+
];
|
|
9552
|
+
this.calculateContextMenuPosition(e);
|
|
9553
|
+
this.contextMenuVisible = true;
|
|
9554
|
+
this.activeSubMenu = null;
|
|
9555
|
+
return;
|
|
9556
|
+
}
|
|
9557
|
+
}
|
|
9558
|
+
},
|
|
9559
|
+
showContextMenu(item, laneId, e) {
|
|
9560
|
+
this.currentPointInfo = {
|
|
9561
|
+
...item,
|
|
9562
|
+
laneId
|
|
9563
|
+
};
|
|
9564
|
+
this.currentContextMenuType = "missingPoint";
|
|
9565
|
+
const isTop = item.type === "top";
|
|
9566
|
+
let menuItems = isTop ? this.missingPointMenuConfig.topMenu || [] : this.missingPointMenuConfig.bottomMenu || [];
|
|
9567
|
+
const chartRef = this.getChartRefByLaneId(laneId);
|
|
9568
|
+
if (chartRef && chartRef.chart) {
|
|
9569
|
+
const markAreaIndex = this.findMarkAreaByPoint(item, laneId);
|
|
9570
|
+
if (markAreaIndex !== -1) {
|
|
9571
|
+
this.currentMarkAreaIndex = markAreaIndex;
|
|
9572
|
+
menuItems = [
|
|
9573
|
+
{ label: "删除区块", action: "deleteMarkArea" },
|
|
9574
|
+
...menuItems
|
|
9575
|
+
];
|
|
9576
|
+
}
|
|
9577
|
+
}
|
|
9578
|
+
this.currentContextMenuItems = menuItems;
|
|
9579
|
+
this.contextMenuVisible = true;
|
|
9580
|
+
this.calculateContextMenuPosition(e);
|
|
9581
|
+
this.activeSubMenu = null;
|
|
9582
|
+
},
|
|
9583
|
+
calculateContextMenuPosition({ event }) {
|
|
9584
|
+
const container = document.querySelector(".kd-lane-chart-lane-container-echart");
|
|
9585
|
+
const menu = this.$refs.contextMenuRef;
|
|
9586
|
+
if (!container || !menu) return;
|
|
9587
|
+
const rect = container.getBoundingClientRect();
|
|
9588
|
+
const clientX = typeof (event == null ? void 0 : event.clientX) === "number" ? event == null ? void 0 : event.clientX : event == null ? void 0 : event.pageX;
|
|
9589
|
+
const clientY = typeof (event == null ? void 0 : event.clientY) === "number" ? event == null ? void 0 : event.clientY : event == null ? void 0 : event.pageY;
|
|
9590
|
+
this.$nextTick(() => {
|
|
9591
|
+
menu.style.visibility = "hidden";
|
|
9592
|
+
this.menuWidth = menu.offsetWidth;
|
|
9593
|
+
this.menuHeight = menu.offsetHeight;
|
|
9594
|
+
menu.style.visibility = "";
|
|
9595
|
+
this.adjustContextMenuPosition(clientX, clientY, rect);
|
|
9596
|
+
});
|
|
9597
|
+
},
|
|
9598
|
+
adjustContextMenuPosition(clientX, clientY, rect) {
|
|
9599
|
+
const containerW = rect.right - rect.left;
|
|
9600
|
+
const containerH = rect.bottom - rect.top;
|
|
9601
|
+
let relX = clientX - rect.left + 8;
|
|
9602
|
+
let relY = clientY - rect.top + 8;
|
|
9603
|
+
if (relX + this.menuWidth > containerW) {
|
|
9604
|
+
relX = clientX - rect.left - this.menuWidth + 8;
|
|
9605
|
+
}
|
|
9606
|
+
if (relY + this.menuHeight > containerH) {
|
|
9607
|
+
relY = clientY - rect.top - this.menuHeight + 8;
|
|
9608
|
+
}
|
|
9609
|
+
this.contextMenuX = Math.max(0, relX) / containerW * 100;
|
|
9610
|
+
this.contextMenuY = Math.max(0, relY) / containerH * 100;
|
|
9611
|
+
},
|
|
9612
|
+
findMarkAreaByPoint(point, laneId) {
|
|
9613
|
+
const chartRef = this.getChartRefByLaneId(laneId);
|
|
9614
|
+
if (!chartRef || !chartRef.chart) return -1;
|
|
9615
|
+
chartRef.chart.getOption();
|
|
9616
|
+
const yValue = point.value[1];
|
|
9617
|
+
for (let i = 0; i < this.markAreaLineData.length; i++) {
|
|
9618
|
+
const area = this.markAreaLineData[i];
|
|
9619
|
+
if (area.laneId !== laneId) continue;
|
|
9620
|
+
if (area.lineId !== point.lineId) continue;
|
|
9621
|
+
const data = area.data || [];
|
|
9622
|
+
if (data.length < 2) continue;
|
|
9623
|
+
let y1, y2;
|
|
9624
|
+
if (this.formCache.axisType === "depth") {
|
|
9625
|
+
y1 = data[0].depth;
|
|
9626
|
+
y2 = data[1].depth;
|
|
9627
|
+
} else if (this.formCache.axisType === "time") {
|
|
9628
|
+
y1 = this.toMillisecondTimestamp(data[0].time);
|
|
9629
|
+
y2 = this.toMillisecondTimestamp(data[1].time);
|
|
9630
|
+
} else {
|
|
9631
|
+
y1 = data[0].y;
|
|
9632
|
+
y2 = data[1].y;
|
|
9633
|
+
}
|
|
9634
|
+
const minY = Math.min(y1, y2);
|
|
9635
|
+
const maxY = Math.max(y1, y2);
|
|
9636
|
+
if (yValue >= minY && yValue <= maxY) {
|
|
9637
|
+
return i;
|
|
9638
|
+
}
|
|
9639
|
+
}
|
|
9640
|
+
return -1;
|
|
9641
|
+
},
|
|
9642
|
+
closeContextMenu() {
|
|
9643
|
+
this.contextMenuVisible = false;
|
|
9644
|
+
this.currentPointInfo = null;
|
|
9645
|
+
this.currentContextMenuType = null;
|
|
9646
|
+
this.currentContextMenuItems = [];
|
|
9647
|
+
this.activeSubMenu = null;
|
|
9648
|
+
this.menuWidth = null;
|
|
9649
|
+
this.menuHeight = null;
|
|
9650
|
+
},
|
|
9651
|
+
showSubMenu(item, event) {
|
|
9652
|
+
event.stopPropagation();
|
|
9653
|
+
this.activeSubMenu = item;
|
|
9654
|
+
},
|
|
9655
|
+
handleContextMenuItemClick(item) {
|
|
9656
|
+
if (item.action === "deleteMarkArea") {
|
|
9657
|
+
this.deleteMarkArea(this.currentMarkAreaIndex);
|
|
9658
|
+
this.closeContextMenu();
|
|
9659
|
+
return;
|
|
9660
|
+
}
|
|
9661
|
+
if (this.currentContextMenuType === "markArea" && !item.canTransfer)
|
|
9662
|
+
return;
|
|
9663
|
+
if (this.currentContextMenuType === "markArea") {
|
|
9664
|
+
const markArea = this.markAreaLineData[this.currentMarkAreaIndex];
|
|
9665
|
+
if (!markArea) {
|
|
9666
|
+
this.closeContextMenu();
|
|
9667
|
+
return;
|
|
9668
|
+
}
|
|
9669
|
+
const { startPoint, endPoint } = this.findBlockPointPair(
|
|
9670
|
+
this.currentMarkAreaIndex
|
|
9671
|
+
);
|
|
9672
|
+
this.$emit("markAreaMenuItemClick", {
|
|
9673
|
+
markArea,
|
|
9674
|
+
menuItem: item,
|
|
9675
|
+
startPoint,
|
|
9676
|
+
endPoint
|
|
9677
|
+
});
|
|
9678
|
+
console.log(
|
|
9679
|
+
{
|
|
9680
|
+
markArea,
|
|
9681
|
+
menuItem: item,
|
|
9682
|
+
startPoint,
|
|
9683
|
+
endPoint
|
|
9684
|
+
},
|
|
9685
|
+
"传递的数据"
|
|
9686
|
+
);
|
|
9687
|
+
this.closeContextMenu();
|
|
9688
|
+
return;
|
|
9689
|
+
}
|
|
9690
|
+
if (this.currentContextMenuType === "missingPoint" && !item.canTransfer)
|
|
9691
|
+
return;
|
|
9692
|
+
const currentPoint = this.currentPointInfo;
|
|
9693
|
+
if (!currentPoint) {
|
|
9694
|
+
this.closeContextMenu();
|
|
9695
|
+
return;
|
|
9696
|
+
}
|
|
9697
|
+
const { topPoint, bottomPoint } = this.findBoundaryPointPair(currentPoint);
|
|
9698
|
+
this.$emit("missingPointMenuItemClick", {
|
|
9699
|
+
pointInfo: currentPoint,
|
|
9700
|
+
menuItem: item,
|
|
9701
|
+
topPoint,
|
|
9702
|
+
bottomPoint
|
|
9703
|
+
});
|
|
9704
|
+
this.closeContextMenu();
|
|
9705
|
+
},
|
|
9706
|
+
// 查找区块的起止点(优先从选中点对中获取完整点信息,兜底使用 markArea.data)
|
|
9707
|
+
findBlockPointPair(markAreaIndex) {
|
|
9708
|
+
const markArea = this.markAreaLineData[markAreaIndex];
|
|
9709
|
+
if (!markArea) return { startPoint: null, endPoint: null };
|
|
9710
|
+
const pairs = this.laneSelectedPointPairs[markArea.laneId] || [];
|
|
9711
|
+
const pair = pairs.find((p) => p.markAreaId === markArea.id);
|
|
9712
|
+
if (pair) {
|
|
9713
|
+
return {
|
|
9714
|
+
startPoint: pair.point1 || null,
|
|
9715
|
+
endPoint: pair.point2 || null
|
|
9716
|
+
};
|
|
9717
|
+
}
|
|
9718
|
+
const data = markArea.data || [];
|
|
9719
|
+
return {
|
|
9720
|
+
startPoint: data[0] || null,
|
|
9721
|
+
endPoint: data[1] || null
|
|
9722
|
+
};
|
|
9723
|
+
},
|
|
9724
|
+
deleteMarkArea(index2) {
|
|
9725
|
+
if (index2 >= 0 && index2 < this.markAreaLineData.length) {
|
|
9726
|
+
const markArea = this.markAreaLineData[index2];
|
|
9727
|
+
const laneId = markArea.laneId;
|
|
9728
|
+
const markAreaId = markArea.id;
|
|
9729
|
+
if (this.laneSelectedPointPairs[laneId]) {
|
|
9730
|
+
const filtered = this.laneSelectedPointPairs[laneId].filter(
|
|
9731
|
+
(pair) => pair.markAreaId !== markAreaId
|
|
9732
|
+
);
|
|
9733
|
+
this.laneSelectedPointPairs[laneId] = filtered;
|
|
9734
|
+
}
|
|
9735
|
+
this.markAreaLineData.splice(index2, 1);
|
|
9736
|
+
this.updateLanesChartOption();
|
|
9737
|
+
}
|
|
9738
|
+
},
|
|
9739
|
+
findBoundaryPointPair(currentPoint) {
|
|
9740
|
+
const chartRef = this.getChartRefByLaneId(currentPoint.laneId);
|
|
9741
|
+
if (!chartRef || !chartRef.chart) {
|
|
9742
|
+
return { topPoint: null, bottomPoint: null };
|
|
9743
|
+
}
|
|
9744
|
+
const option = chartRef.chart.getOption();
|
|
9745
|
+
let topPoint = null;
|
|
9746
|
+
let bottomPoint = null;
|
|
9747
|
+
for (let i = 0; i < option.series.length; i++) {
|
|
9748
|
+
const series = option.series[i];
|
|
9749
|
+
if (series.type !== "scatter") continue;
|
|
9750
|
+
const data = series.data || [];
|
|
9751
|
+
for (let j = 0; j < data.length; j++) {
|
|
9752
|
+
const point = data[j];
|
|
9753
|
+
if (!point || !point.value) continue;
|
|
9754
|
+
if (point.lineId === currentPoint.lineId && point.paramId === currentPoint.paramId) {
|
|
9755
|
+
if (point.type === "top") {
|
|
9756
|
+
topPoint = point;
|
|
9757
|
+
} else if (point.type === "bottom") {
|
|
9758
|
+
bottomPoint = point;
|
|
9759
|
+
}
|
|
9760
|
+
}
|
|
9761
|
+
}
|
|
9762
|
+
}
|
|
9763
|
+
if (currentPoint.type === "top" && topPoint) {
|
|
9764
|
+
const nextPoint = option.series.filter((s) => s.type === "scatter").flatMap((s) => s.data || []).find(
|
|
9765
|
+
(p) => p && p.value && p.lineId === currentPoint.lineId && p.paramId === currentPoint.paramId && p.type === "bottom" && p.originalIndex > currentPoint.originalIndex
|
|
9766
|
+
);
|
|
9767
|
+
if (nextPoint) {
|
|
9768
|
+
bottomPoint = nextPoint;
|
|
9769
|
+
}
|
|
9770
|
+
} else if (currentPoint.type === "bottom" && bottomPoint) {
|
|
9771
|
+
const prevPoint = option.series.filter((s) => s.type === "scatter").flatMap((s) => s.data || []).find(
|
|
9772
|
+
(p) => p && p.value && p.lineId === currentPoint.lineId && p.paramId === currentPoint.paramId && p.type === "top" && p.originalIndex < currentPoint.originalIndex
|
|
9773
|
+
);
|
|
9774
|
+
if (prevPoint) {
|
|
9775
|
+
topPoint = prevPoint;
|
|
9776
|
+
}
|
|
9777
|
+
}
|
|
9778
|
+
return { topPoint, bottomPoint };
|
|
9779
|
+
},
|
|
8465
9780
|
// 获取Y轴标签格式化函数
|
|
8466
9781
|
getYAxisLabelFormatter(isTimeLane, dataGroups, groupIndex, groupMin, groupMax, axisKey) {
|
|
8467
9782
|
return (value) => {
|
|
@@ -8470,8 +9785,11 @@ const _sfc_main$2 = {
|
|
|
8470
9785
|
}
|
|
8471
9786
|
if (groupIndex > 0 && value === groupMin) {
|
|
8472
9787
|
const prevGroup = dataGroups[groupIndex - 1];
|
|
8473
|
-
const prevGroupMax = Math.max(
|
|
8474
|
-
|
|
9788
|
+
const prevGroupMax = Math.max(
|
|
9789
|
+
...prevGroup.map((item) => +item[axisKey])
|
|
9790
|
+
);
|
|
9791
|
+
if (Math.abs(prevGroupMax - groupMin) < 1)
|
|
9792
|
+
return `{center2|${prevGroupMax}/${value}}`;
|
|
8475
9793
|
return `{center2|${prevGroupMax.toFixed(0)}/${value.toFixed(0)}}`;
|
|
8476
9794
|
}
|
|
8477
9795
|
if (groupIndex <= dataGroups.length - 1 && value === groupMax) {
|
|
@@ -8486,7 +9804,9 @@ const _sfc_main$2 = {
|
|
|
8486
9804
|
// 添加标记线到泳道图表
|
|
8487
9805
|
addMarkLineToSeries(baseSeries, lineInfo, realTimeData, axisKey, dataIndexMap) {
|
|
8488
9806
|
if (!this.markLineData || this.markLineData.length === 0) return;
|
|
8489
|
-
let filterLanes = this.currentTemplate.lanes.filter(
|
|
9807
|
+
let filterLanes = this.currentTemplate.lanes.filter(
|
|
9808
|
+
(l) => !Object.prototype.hasOwnProperty.call(l, "contentKey") && l.laneKey !== axisKey && l.lines.length > 0
|
|
9809
|
+
).map((l) => l.lines).flat();
|
|
8490
9810
|
let isLastLine = filterLanes.findIndex((l) => l.lineId == lineInfo.lineId);
|
|
8491
9811
|
let show = isLastLine == filterLanes.length - 1;
|
|
8492
9812
|
baseSeries.markLine = {
|
|
@@ -8501,7 +9821,19 @@ const _sfc_main$2 = {
|
|
|
8501
9821
|
const markTimeMs2 = this.toMillisecondTimestamp(markTime);
|
|
8502
9822
|
const findItem = dataIndexMap.get(String(markDepth)) || realTimeData.find((d) => d[axisKey] == markDepth);
|
|
8503
9823
|
if (findItem) {
|
|
8504
|
-
return {
|
|
9824
|
+
return {
|
|
9825
|
+
yAxis: Number(markDepth),
|
|
9826
|
+
lineStyle: {
|
|
9827
|
+
color: item.color || "red",
|
|
9828
|
+
type: "dashed",
|
|
9829
|
+
width: 2
|
|
9830
|
+
},
|
|
9831
|
+
label: {
|
|
9832
|
+
show,
|
|
9833
|
+
position: "insideEndTop",
|
|
9834
|
+
fontSize: getAdaptedFontSize(10)
|
|
9835
|
+
}
|
|
9836
|
+
};
|
|
8505
9837
|
}
|
|
8506
9838
|
let closestItem = null, minDiff = Infinity;
|
|
8507
9839
|
realTimeData.forEach((d) => {
|
|
@@ -8516,10 +9848,34 @@ const _sfc_main$2 = {
|
|
|
8516
9848
|
const dataTime = closestItem.timestamp || null;
|
|
8517
9849
|
const dataTimeMs = this.toMillisecondTimestamp(dataTime);
|
|
8518
9850
|
if (markTimeMs2 >= dataTimeMs) {
|
|
8519
|
-
return {
|
|
9851
|
+
return {
|
|
9852
|
+
yAxis: Number(markDepth),
|
|
9853
|
+
lineStyle: {
|
|
9854
|
+
color: item.color || "red",
|
|
9855
|
+
type: "dashed",
|
|
9856
|
+
width: 2
|
|
9857
|
+
},
|
|
9858
|
+
label: {
|
|
9859
|
+
show,
|
|
9860
|
+
position: "insideEndTop",
|
|
9861
|
+
fontSize: getAdaptedFontSize(10)
|
|
9862
|
+
}
|
|
9863
|
+
};
|
|
8520
9864
|
}
|
|
8521
9865
|
} else {
|
|
8522
|
-
return {
|
|
9866
|
+
return {
|
|
9867
|
+
yAxis: Number(markDepth),
|
|
9868
|
+
lineStyle: {
|
|
9869
|
+
color: item.color || "red",
|
|
9870
|
+
type: "dashed",
|
|
9871
|
+
width: 2
|
|
9872
|
+
},
|
|
9873
|
+
label: {
|
|
9874
|
+
show,
|
|
9875
|
+
position: "insideEndTop",
|
|
9876
|
+
fontSize: getAdaptedFontSize(10)
|
|
9877
|
+
}
|
|
9878
|
+
};
|
|
8523
9879
|
}
|
|
8524
9880
|
}
|
|
8525
9881
|
return { yAxis: null };
|
|
@@ -8528,22 +9884,63 @@ const _sfc_main$2 = {
|
|
|
8528
9884
|
const markTimeMs2 = this.toMillisecondTimestamp(markTime);
|
|
8529
9885
|
const findItem = dataIndexMap.get(String(markTime)) || realTimeData.find((d) => d[axisKey] == markTime);
|
|
8530
9886
|
if (findItem) {
|
|
8531
|
-
return {
|
|
9887
|
+
return {
|
|
9888
|
+
yAxis: markTimeMs2,
|
|
9889
|
+
lineStyle: {
|
|
9890
|
+
color: item.color || "red",
|
|
9891
|
+
type: "dashed",
|
|
9892
|
+
width: 2
|
|
9893
|
+
},
|
|
9894
|
+
label: {
|
|
9895
|
+
show,
|
|
9896
|
+
position: "insideEndTop",
|
|
9897
|
+
fontSize: getAdaptedFontSize(10),
|
|
9898
|
+
formatter: (value) => this.timestampToYMDHMS(markTimeMs2) || ""
|
|
9899
|
+
}
|
|
9900
|
+
};
|
|
8532
9901
|
}
|
|
8533
9902
|
let closestItem = null, minDiff = Infinity;
|
|
8534
9903
|
realTimeData.forEach((d) => {
|
|
8535
|
-
const diff = Math.abs(
|
|
9904
|
+
const diff = Math.abs(
|
|
9905
|
+
this.toMillisecondTimestamp(d[axisKey]) - markTimeMs2
|
|
9906
|
+
);
|
|
8536
9907
|
if (diff < minDiff) {
|
|
8537
9908
|
minDiff = diff;
|
|
8538
9909
|
closestItem = d;
|
|
8539
9910
|
}
|
|
8540
9911
|
});
|
|
8541
9912
|
if (closestItem) {
|
|
8542
|
-
return {
|
|
9913
|
+
return {
|
|
9914
|
+
yAxis: markTimeMs2,
|
|
9915
|
+
lineStyle: {
|
|
9916
|
+
color: item.color || "red",
|
|
9917
|
+
type: "dashed",
|
|
9918
|
+
width: 2
|
|
9919
|
+
},
|
|
9920
|
+
label: {
|
|
9921
|
+
show,
|
|
9922
|
+
position: "insideEndTop",
|
|
9923
|
+
fontSize: getAdaptedFontSize(10),
|
|
9924
|
+
formatter: (value) => this.timestampToYMDHMS(markTimeMs2) || ""
|
|
9925
|
+
}
|
|
9926
|
+
};
|
|
8543
9927
|
}
|
|
8544
9928
|
return { yAxis: null };
|
|
8545
9929
|
}
|
|
8546
|
-
return {
|
|
9930
|
+
return {
|
|
9931
|
+
yAxis: Number(item.data || item),
|
|
9932
|
+
lineStyle: {
|
|
9933
|
+
color: item.color || "red",
|
|
9934
|
+
type: "dashed",
|
|
9935
|
+
width: 2
|
|
9936
|
+
},
|
|
9937
|
+
label: {
|
|
9938
|
+
show,
|
|
9939
|
+
position: "insideEndTop",
|
|
9940
|
+
fontSize: getAdaptedFontSize(10),
|
|
9941
|
+
formatter: (value) => this.timestampToYMDHMS(markTimeMs) || ""
|
|
9942
|
+
}
|
|
9943
|
+
};
|
|
8547
9944
|
}).filter((item) => item.yAxis !== null)
|
|
8548
9945
|
};
|
|
8549
9946
|
},
|
|
@@ -8551,62 +9948,81 @@ const _sfc_main$2 = {
|
|
|
8551
9948
|
addMarkAreaToSeries(baseSeries, lineInfo, realTimeData, axisKey, min, max, dataIndexMap) {
|
|
8552
9949
|
var _a;
|
|
8553
9950
|
if (!this.markAreaLineData || this.markAreaLineData.length === 0) return;
|
|
8554
|
-
const currentMarkAreaData = this.markAreaLineData.filter(
|
|
9951
|
+
const currentMarkAreaData = this.markAreaLineData.filter(
|
|
9952
|
+
(item) => item.paramsId === lineInfo.paramId
|
|
9953
|
+
);
|
|
8555
9954
|
if (currentMarkAreaData.length === 0) return;
|
|
8556
9955
|
const markAreaData = [];
|
|
8557
9956
|
for (let i = 0; i < currentMarkAreaData.length; i++) {
|
|
8558
9957
|
const areaItem = currentMarkAreaData[i];
|
|
8559
9958
|
if (!areaItem.data || areaItem.data.length < 2) continue;
|
|
9959
|
+
if (lineInfo.laneId !== this.activeLaneId && areaItem.type === "markArea")
|
|
9960
|
+
continue;
|
|
9961
|
+
if (areaItem.data[0].timestamp) {
|
|
9962
|
+
areaItem.data.sort(
|
|
9963
|
+
(a, b) => this.toMillisecondTimestamp(a.timestamp) - this.toMillisecondTimestamp(b.timestamp)
|
|
9964
|
+
);
|
|
9965
|
+
} else {
|
|
9966
|
+
areaItem.data.sort((a, b) => Number(a[axisKey]) - Number(b[axisKey]));
|
|
9967
|
+
}
|
|
8560
9968
|
const startData = areaItem.data[0];
|
|
8561
9969
|
const endData = areaItem.data[1];
|
|
9970
|
+
console.log("startData", startData, "endData", endData);
|
|
8562
9971
|
let startY, endY;
|
|
8563
9972
|
if (this.formCache.axisType === "depth") {
|
|
8564
9973
|
const startDepth = startData.depth;
|
|
8565
|
-
const startTime = this.toMillisecondTimestamp(startData.timestamp
|
|
9974
|
+
const startTime = this.toMillisecondTimestamp(startData.timestamp);
|
|
8566
9975
|
const endDepth = endData.depth;
|
|
8567
|
-
const endTime = this.toMillisecondTimestamp(endData.timestamp
|
|
9976
|
+
const endTime = this.toMillisecondTimestamp(endData.timestamp);
|
|
8568
9977
|
let startFindItem = dataIndexMap.get(String(startDepth));
|
|
8569
9978
|
if (!startFindItem) {
|
|
8570
|
-
startFindItem = realTimeData.find(
|
|
9979
|
+
startFindItem = realTimeData.find(
|
|
9980
|
+
(d) => d[axisKey] == startDepth && this.toMillisecondTimestamp(d.timestamp) == startTime
|
|
9981
|
+
);
|
|
8571
9982
|
}
|
|
8572
9983
|
if (startFindItem) {
|
|
8573
9984
|
startY = Number(startDepth);
|
|
8574
9985
|
} else {
|
|
8575
|
-
let closestStartItem = null
|
|
9986
|
+
let closestStartItem = null;
|
|
8576
9987
|
for (let j = 0; j < realTimeData.length; j++) {
|
|
8577
9988
|
const d = realTimeData[j];
|
|
8578
|
-
const diff =
|
|
8579
|
-
if (diff
|
|
8580
|
-
minStartDiff = diff;
|
|
9989
|
+
const diff = Number(d[axisKey]) - Number(startDepth);
|
|
9990
|
+
if (diff >= 0) {
|
|
8581
9991
|
closestStartItem = d;
|
|
9992
|
+
break;
|
|
8582
9993
|
}
|
|
8583
9994
|
}
|
|
8584
9995
|
if (closestStartItem) {
|
|
8585
|
-
const dataTimeMs = this.toMillisecondTimestamp(
|
|
8586
|
-
|
|
9996
|
+
const dataTimeMs = this.toMillisecondTimestamp(
|
|
9997
|
+
closestStartItem.timestamp
|
|
9998
|
+
);
|
|
9999
|
+
startY = startTime <= dataTimeMs && dataTimeMs <= endTime && closestStartItem[axisKey] >= startDepth ? Number(startDepth) : null;
|
|
8587
10000
|
} else {
|
|
8588
10001
|
startY = null;
|
|
8589
10002
|
}
|
|
8590
10003
|
}
|
|
8591
10004
|
let endFindItem = dataIndexMap.get(String(endDepth));
|
|
8592
10005
|
if (!endFindItem) {
|
|
8593
|
-
endFindItem = realTimeData.find(
|
|
10006
|
+
endFindItem = realTimeData.find(
|
|
10007
|
+
(d) => d[axisKey] == endDepth && this.toMillisecondTimestamp(d.timestamp) == endTime
|
|
10008
|
+
);
|
|
8594
10009
|
}
|
|
8595
10010
|
if (endFindItem) {
|
|
8596
10011
|
endY = Number(endDepth);
|
|
8597
10012
|
} else {
|
|
8598
|
-
let closestEndItem = null
|
|
10013
|
+
let closestEndItem = null;
|
|
8599
10014
|
for (let j = 0; j < realTimeData.length; j++) {
|
|
8600
10015
|
const d = realTimeData[j];
|
|
8601
|
-
const diff =
|
|
8602
|
-
if (diff
|
|
8603
|
-
minEndDiff = diff;
|
|
10016
|
+
const diff = Number(d[axisKey]) - Number(endDepth);
|
|
10017
|
+
if (diff <= 0) {
|
|
8604
10018
|
closestEndItem = d;
|
|
8605
10019
|
}
|
|
8606
10020
|
}
|
|
8607
10021
|
if (closestEndItem) {
|
|
8608
|
-
const dataTimeMs = this.toMillisecondTimestamp(
|
|
8609
|
-
|
|
10022
|
+
const dataTimeMs = this.toMillisecondTimestamp(
|
|
10023
|
+
closestEndItem.timestamp
|
|
10024
|
+
);
|
|
10025
|
+
endY = endTime >= dataTimeMs && dataTimeMs >= startTime && closestEndItem[axisKey] <= endDepth ? Number(endDepth) : null;
|
|
8610
10026
|
} else {
|
|
8611
10027
|
endY = null;
|
|
8612
10028
|
}
|
|
@@ -8622,13 +10038,13 @@ const _sfc_main$2 = {
|
|
|
8622
10038
|
}
|
|
8623
10039
|
startY = startFindItem ? startTimeMs : null;
|
|
8624
10040
|
if (!startY) {
|
|
8625
|
-
let closestStartItem = null
|
|
10041
|
+
let closestStartItem = null;
|
|
8626
10042
|
for (let j = 0; j < realTimeData.length; j++) {
|
|
8627
10043
|
const d = realTimeData[j];
|
|
8628
|
-
const diff =
|
|
8629
|
-
if (diff
|
|
8630
|
-
minStartDiff = diff;
|
|
10044
|
+
const diff = this.toMillisecondTimestamp(d[axisKey]) - startTimeMs;
|
|
10045
|
+
if (diff > 0) {
|
|
8631
10046
|
closestStartItem = d;
|
|
10047
|
+
break;
|
|
8632
10048
|
}
|
|
8633
10049
|
}
|
|
8634
10050
|
startY = closestStartItem ? startTimeMs : null;
|
|
@@ -8639,12 +10055,11 @@ const _sfc_main$2 = {
|
|
|
8639
10055
|
}
|
|
8640
10056
|
endY = endFindItem ? endTimeMs : null;
|
|
8641
10057
|
if (!endY) {
|
|
8642
|
-
let closestEndItem = null
|
|
10058
|
+
let closestEndItem = null;
|
|
8643
10059
|
for (let j = 0; j < realTimeData.length; j++) {
|
|
8644
10060
|
const d = realTimeData[j];
|
|
8645
|
-
const diff =
|
|
8646
|
-
if (diff <
|
|
8647
|
-
minEndDiff = diff;
|
|
10061
|
+
const diff = this.toMillisecondTimestamp(d[axisKey]) - endTimeMs;
|
|
10062
|
+
if (diff < 0) {
|
|
8648
10063
|
closestEndItem = d;
|
|
8649
10064
|
}
|
|
8650
10065
|
}
|
|
@@ -8676,8 +10091,18 @@ const _sfc_main$2 = {
|
|
|
8676
10091
|
addRangeAreaToSeries(baseSeries, lineInfo, realTimeData, axisKey, paramCodeMap, min, max) {
|
|
8677
10092
|
var _a, _b;
|
|
8678
10093
|
if (!lineInfo.upperParamId && !lineInfo.lowerParamId) return null;
|
|
8679
|
-
const upperSeriesData = lineInfo.upperParamId ? this.generateSeriesDataCached(
|
|
8680
|
-
|
|
10094
|
+
const upperSeriesData = lineInfo.upperParamId ? this.generateSeriesDataCached(
|
|
10095
|
+
realTimeData,
|
|
10096
|
+
{ ...lineInfo, paramId: lineInfo.upperParamId },
|
|
10097
|
+
axisKey,
|
|
10098
|
+
paramCodeMap
|
|
10099
|
+
) : [];
|
|
10100
|
+
const lowerSeriesData = lineInfo.lowerParamId ? this.generateSeriesDataCached(
|
|
10101
|
+
realTimeData,
|
|
10102
|
+
{ ...lineInfo, paramId: lineInfo.lowerParamId },
|
|
10103
|
+
axisKey,
|
|
10104
|
+
paramCodeMap
|
|
10105
|
+
) : [];
|
|
8681
10106
|
const customData = [];
|
|
8682
10107
|
const maxLength = Math.max(upperSeriesData.length, lowerSeriesData.length);
|
|
8683
10108
|
for (let i = 0; i < maxLength - 1; i++) {
|
|
@@ -8685,12 +10110,18 @@ const _sfc_main$2 = {
|
|
|
8685
10110
|
const upperPoint2 = upperSeriesData[i + 1];
|
|
8686
10111
|
const lowerPoint1 = lowerSeriesData[i];
|
|
8687
10112
|
const lowerPoint2 = lowerSeriesData[i + 1];
|
|
8688
|
-
if (!upperPoint1 || !upperPoint2 || !lowerPoint1 || !lowerPoint2)
|
|
8689
|
-
|
|
8690
|
-
if (
|
|
8691
|
-
|
|
8692
|
-
if (
|
|
8693
|
-
|
|
10113
|
+
if (!upperPoint1 || !upperPoint2 || !lowerPoint1 || !lowerPoint2)
|
|
10114
|
+
continue;
|
|
10115
|
+
if (upperPoint1[0] === null || upperPoint1[0] === void 0 || upperPoint1[0] === "")
|
|
10116
|
+
continue;
|
|
10117
|
+
if (upperPoint2[0] === null || upperPoint2[0] === void 0 || upperPoint2[0] === "")
|
|
10118
|
+
continue;
|
|
10119
|
+
if (lowerPoint1[0] === null || lowerPoint1[0] === void 0 || lowerPoint1[0] === "")
|
|
10120
|
+
continue;
|
|
10121
|
+
if (lowerPoint2[0] === null || lowerPoint2[0] === void 0 || lowerPoint2[0] === "")
|
|
10122
|
+
continue;
|
|
10123
|
+
if (!Number.isFinite(upperPoint1[1]) || !Number.isFinite(upperPoint2[1]) || !Number.isFinite(lowerPoint1[1]) || !Number.isFinite(lowerPoint2[1]))
|
|
10124
|
+
continue;
|
|
8694
10125
|
customData.push([
|
|
8695
10126
|
upperPoint1[0],
|
|
8696
10127
|
lowerPoint1[0],
|
|
@@ -8743,7 +10174,9 @@ const _sfc_main$2 = {
|
|
|
8743
10174
|
return;
|
|
8744
10175
|
}
|
|
8745
10176
|
if (seriesData.length > 0) {
|
|
8746
|
-
const firstValidPoint = seriesData.find(
|
|
10177
|
+
const firstValidPoint = seriesData.find(
|
|
10178
|
+
(point) => Number.isFinite(+point[0])
|
|
10179
|
+
);
|
|
8747
10180
|
if (firstValidPoint) {
|
|
8748
10181
|
seriesData.unshift([min, firstValidPoint[1]]);
|
|
8749
10182
|
const lastValidPoint = seriesData[seriesData.length - 1];
|
|
@@ -8778,7 +10211,10 @@ const _sfc_main$2 = {
|
|
|
8778
10211
|
if (!chartRef || !chartRef.chart) continue;
|
|
8779
10212
|
const chart = chartRef.chart;
|
|
8780
10213
|
const currentOption = chart.getOption();
|
|
8781
|
-
const axisTypeList = this.currentToolBarConfig.axisTypeList || {
|
|
10214
|
+
const axisTypeList = this.currentToolBarConfig.axisTypeList || {
|
|
10215
|
+
depth: "depth",
|
|
10216
|
+
time: "time"
|
|
10217
|
+
};
|
|
8782
10218
|
const isDepthLane = Object.prototype.hasOwnProperty.call(axisTypeList, "depth") && axisTypeList.depth == lane.laneKey;
|
|
8783
10219
|
const dataGroups = splitArrayByDepth(realTimeData, axisKey);
|
|
8784
10220
|
if (dataGroups.length === 0) continue;
|
|
@@ -8819,9 +10255,17 @@ const _sfc_main$2 = {
|
|
|
8819
10255
|
if (allIntervals.length > 0) {
|
|
8820
10256
|
const minInterval = Math.min(...allIntervals);
|
|
8821
10257
|
const totalRange = Math.max(...allValues) - Math.min(...allValues);
|
|
8822
|
-
const intervalCount = Math.max(
|
|
8823
|
-
|
|
8824
|
-
|
|
10258
|
+
const intervalCount = Math.max(
|
|
10259
|
+
1,
|
|
10260
|
+
Math.min(12, Math.ceil(totalRange / minInterval))
|
|
10261
|
+
);
|
|
10262
|
+
unifiedInterval = Math.ceil(
|
|
10263
|
+
totalRange / Math.min(12, intervalCount)
|
|
10264
|
+
);
|
|
10265
|
+
unifiedInterval = Math.max(
|
|
10266
|
+
minInterval,
|
|
10267
|
+
Math.ceil(unifiedInterval / minInterval) * minInterval
|
|
10268
|
+
);
|
|
8825
10269
|
}
|
|
8826
10270
|
let currentTop = 0;
|
|
8827
10271
|
let seriesIndex = 0;
|
|
@@ -8875,8 +10319,15 @@ const _sfc_main$2 = {
|
|
|
8875
10319
|
if (lane && lane.lines) {
|
|
8876
10320
|
lane.lines.forEach((lineInfo) => {
|
|
8877
10321
|
var _a, _b, _c, _d;
|
|
8878
|
-
const allSeriesData = this.generateSeriesData(
|
|
8879
|
-
|
|
10322
|
+
const allSeriesData = this.generateSeriesData(
|
|
10323
|
+
realTimeData,
|
|
10324
|
+
lineInfo,
|
|
10325
|
+
axisKey
|
|
10326
|
+
);
|
|
10327
|
+
const { min, max } = this.getXAxisRangeByHeader(
|
|
10328
|
+
lineInfo,
|
|
10329
|
+
allSeriesData
|
|
10330
|
+
);
|
|
8880
10331
|
const isLogScale = lane.isLogScale === "1";
|
|
8881
10332
|
const xAxisItem = {
|
|
8882
10333
|
gridIndex,
|
|
@@ -8889,15 +10340,26 @@ const _sfc_main$2 = {
|
|
|
8889
10340
|
needUpdate.xAxis = true;
|
|
8890
10341
|
}
|
|
8891
10342
|
newXAxis.push(xAxisItem);
|
|
8892
|
-
const seriesData = this.generateSeriesData(
|
|
10343
|
+
const seriesData = this.generateSeriesData(
|
|
10344
|
+
group,
|
|
10345
|
+
lineInfo,
|
|
10346
|
+
axisKey
|
|
10347
|
+
);
|
|
8893
10348
|
const finalSeriesData = lineInfo.isUsed === "1" ? seriesData : [];
|
|
8894
10349
|
const currentSeries = currentOption.series && currentOption.series[seriesIndex];
|
|
8895
10350
|
if (!currentSeries || JSON.stringify(currentSeries.data) !== JSON.stringify(finalSeriesData)) {
|
|
8896
10351
|
needUpdate.series = true;
|
|
8897
|
-
newSeriesData.push({
|
|
10352
|
+
newSeriesData.push({
|
|
10353
|
+
index: seriesIndex,
|
|
10354
|
+
data: finalSeriesData
|
|
10355
|
+
});
|
|
8898
10356
|
}
|
|
8899
10357
|
seriesIndex++;
|
|
8900
|
-
const effectScatterPoint = this.getEffectScatterPoint(
|
|
10358
|
+
const effectScatterPoint = this.getEffectScatterPoint(
|
|
10359
|
+
lineInfo,
|
|
10360
|
+
realTimeData,
|
|
10361
|
+
axisKey
|
|
10362
|
+
);
|
|
8901
10363
|
const effectScatterIndex = seriesIndex;
|
|
8902
10364
|
const currentEffectScatter = currentOption.series && currentOption.series[effectScatterIndex];
|
|
8903
10365
|
let effectScatterData = [];
|
|
@@ -8910,7 +10372,10 @@ const _sfc_main$2 = {
|
|
|
8910
10372
|
if (!currentEffectScatter || JSON.stringify(currentEffectScatter.data) !== JSON.stringify(effectScatterData)) {
|
|
8911
10373
|
needUpdate.series = true;
|
|
8912
10374
|
if (currentEffectScatter) {
|
|
8913
|
-
newSeriesData.push({
|
|
10375
|
+
newSeriesData.push({
|
|
10376
|
+
index: effectScatterIndex,
|
|
10377
|
+
data: effectScatterData
|
|
10378
|
+
});
|
|
8914
10379
|
} else {
|
|
8915
10380
|
const color = lineInfo.themeConfig ? lineInfo.isGradient && ((_d = (_c = this.linearGradientLineColor) == null ? void 0 : _c[this.nowTheme]) == null ? void 0 : _d[lineInfo.paramId]) ? this.linearGradientLineColor[this.nowTheme][lineInfo.paramId] : lineInfo.themeConfig[this.nowTheme].lineColor : lineInfo.lineColor;
|
|
8916
10381
|
newSeriesData.push({
|
|
@@ -8922,12 +10387,61 @@ const _sfc_main$2 = {
|
|
|
8922
10387
|
itemStyle: { color, opacity: 1 },
|
|
8923
10388
|
tooltip: { show: false },
|
|
8924
10389
|
showEffectOn: "render",
|
|
8925
|
-
rippleEffect: {
|
|
10390
|
+
rippleEffect: {
|
|
10391
|
+
brushType: "stroke",
|
|
10392
|
+
scale: 3,
|
|
10393
|
+
period: 2
|
|
10394
|
+
},
|
|
8926
10395
|
z: (lineInfo.lineSort || 0) + 1
|
|
8927
10396
|
});
|
|
8928
10397
|
}
|
|
8929
10398
|
}
|
|
8930
10399
|
seriesIndex++;
|
|
10400
|
+
if (lineInfo.isUsed === "1" && this.isGeomechanical && lane.laneId === this.activeLaneId) {
|
|
10401
|
+
const boundaryPoints = this.findMissingDataBoundaryPoints(seriesData);
|
|
10402
|
+
const formattedBoundaryPoints = boundaryPoints.map(
|
|
10403
|
+
(bp) => ({
|
|
10404
|
+
value: bp.data,
|
|
10405
|
+
type: bp.type,
|
|
10406
|
+
originalIndex: bp.originalIndex,
|
|
10407
|
+
lineId: lineInfo.lineId,
|
|
10408
|
+
paramId: lineInfo.paramId
|
|
10409
|
+
})
|
|
10410
|
+
);
|
|
10411
|
+
const boundaryScatterIndex = seriesIndex;
|
|
10412
|
+
const currentBoundaryScatter = currentOption.series && currentOption.series[boundaryScatterIndex];
|
|
10413
|
+
if (!currentBoundaryScatter || JSON.stringify(currentBoundaryScatter.data) !== JSON.stringify(formattedBoundaryPoints)) {
|
|
10414
|
+
needUpdate.series = true;
|
|
10415
|
+
if (currentBoundaryScatter) {
|
|
10416
|
+
newSeriesData.push({
|
|
10417
|
+
index: boundaryScatterIndex,
|
|
10418
|
+
data: formattedBoundaryPoints
|
|
10419
|
+
});
|
|
10420
|
+
} else {
|
|
10421
|
+
newSeriesData.push({
|
|
10422
|
+
index: boundaryScatterIndex,
|
|
10423
|
+
data: formattedBoundaryPoints,
|
|
10424
|
+
type: "scatter",
|
|
10425
|
+
symbol: "circle",
|
|
10426
|
+
symbolSize: getAdaptedFontSize(8),
|
|
10427
|
+
itemStyle: { color: "red", opacity: 1 },
|
|
10428
|
+
tooltip: { show: false },
|
|
10429
|
+
z: (lineInfo.lineSort || 0) + 2
|
|
10430
|
+
});
|
|
10431
|
+
}
|
|
10432
|
+
}
|
|
10433
|
+
} else if (lineInfo.isUsed === "1") {
|
|
10434
|
+
const boundaryScatterIndex = seriesIndex;
|
|
10435
|
+
const currentBoundaryScatter = currentOption.series && currentOption.series[boundaryScatterIndex];
|
|
10436
|
+
if (currentBoundaryScatter && Array.isArray(currentBoundaryScatter.data) && currentBoundaryScatter.data.length > 0) {
|
|
10437
|
+
needUpdate.series = true;
|
|
10438
|
+
newSeriesData.push({
|
|
10439
|
+
index: boundaryScatterIndex,
|
|
10440
|
+
data: []
|
|
10441
|
+
});
|
|
10442
|
+
}
|
|
10443
|
+
}
|
|
10444
|
+
seriesIndex++;
|
|
8931
10445
|
});
|
|
8932
10446
|
}
|
|
8933
10447
|
}
|
|
@@ -8985,6 +10499,8 @@ const _sfc_main$2 = {
|
|
|
8985
10499
|
this.headerData = {};
|
|
8986
10500
|
this.markLineData = [];
|
|
8987
10501
|
this.markAreaLineData = [];
|
|
10502
|
+
this.laneSelectedPointPairs = {};
|
|
10503
|
+
this.activeLaneId = null;
|
|
8988
10504
|
this.lineRange = {};
|
|
8989
10505
|
this.pendingRequestData = null;
|
|
8990
10506
|
this.initialRealTimeData = {};
|
|
@@ -9108,28 +10624,43 @@ const _sfc_main$2 = {
|
|
|
9108
10624
|
scale = +scale.replace("1:", "") / 100;
|
|
9109
10625
|
}
|
|
9110
10626
|
let size = Math.round(this.pxToCm() * (+scale / this.depthInterval));
|
|
9111
|
-
let maxSize = Math.max(
|
|
10627
|
+
let maxSize = Math.max(
|
|
10628
|
+
Math.round(this.pxToCm() * (1 / this.depthInterval)),
|
|
10629
|
+
this.realTimeData.length
|
|
10630
|
+
);
|
|
9112
10631
|
if (size < maxSize) {
|
|
9113
10632
|
this.windowSize = size;
|
|
9114
10633
|
} else {
|
|
9115
10634
|
this.windowSize = maxSize;
|
|
9116
10635
|
let newsize = Math.round(maxSize / this.pxToCm() * this.depthInterval);
|
|
9117
10636
|
let data = ((_b = (_a = this.currentToolBarConfig) == null ? void 0 : _a.scaleList) == null ? void 0 : _b.map((item) => item.value)) || [];
|
|
9118
|
-
this.$emit(
|
|
10637
|
+
this.$emit(
|
|
10638
|
+
"updateScale",
|
|
10639
|
+
data.includes(newsize) ? newsize : `1:${newsize * 100}`
|
|
10640
|
+
);
|
|
9119
10641
|
}
|
|
9120
10642
|
},
|
|
9121
10643
|
getLatestLineDataByParamCode() {
|
|
9122
10644
|
if (!this.realTimeData || this.realTimeData.length === 0) return {};
|
|
9123
|
-
if (!this.currentTemplate || !this.currentTemplate.lanes || this.currentTemplate.lanes.length === 0)
|
|
10645
|
+
if (!this.currentTemplate || !this.currentTemplate.lanes || this.currentTemplate.lanes.length === 0)
|
|
10646
|
+
return {};
|
|
9124
10647
|
const axisType = this.formCache.axisType;
|
|
9125
10648
|
const axisKey = this.currentToolBarConfig.axisTypeList && this.currentToolBarConfig.axisTypeList[axisType] || (axisType === "time" ? "time" : "depth");
|
|
9126
10649
|
const sortedData = [...this.realTimeData];
|
|
9127
10650
|
if (axisType === "depth") {
|
|
9128
|
-
sortedData.
|
|
9129
|
-
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
10651
|
+
if (sortedData[0] && sortedData[0].timestamp) {
|
|
10652
|
+
sortedData.sort((a, b) => {
|
|
10653
|
+
const timestampA = this.toMillisecondTimestamp(a.timestamp);
|
|
10654
|
+
const timestampB = this.toMillisecondTimestamp(b.timestamp);
|
|
10655
|
+
return timestampA - timestampB;
|
|
10656
|
+
});
|
|
10657
|
+
} else {
|
|
10658
|
+
sortedData.sort((a, b) => {
|
|
10659
|
+
const valA = Number(a[axisKey]);
|
|
10660
|
+
const valB = Number(b[axisKey]);
|
|
10661
|
+
return valA - valB;
|
|
10662
|
+
});
|
|
10663
|
+
}
|
|
9133
10664
|
} else if (axisType === "time") {
|
|
9134
10665
|
sortedData.sort((a, b) => {
|
|
9135
10666
|
const valA = Number(a[axisKey]);
|
|
@@ -9180,6 +10711,13 @@ const _sfc_main$2 = {
|
|
|
9180
10711
|
}
|
|
9181
10712
|
},
|
|
9182
10713
|
watch: {
|
|
10714
|
+
activeLaneId: {
|
|
10715
|
+
handler(newVal) {
|
|
10716
|
+
const lane = this.currentTemplate.lanes.find((item) => item.laneId === newVal) || {};
|
|
10717
|
+
this.$emit("updateLaneId", lane);
|
|
10718
|
+
},
|
|
10719
|
+
immediate: true
|
|
10720
|
+
},
|
|
9183
10721
|
warningData: {
|
|
9184
10722
|
handler(newVal) {
|
|
9185
10723
|
this.$nextTick(() => {
|
|
@@ -9197,8 +10735,8 @@ const _sfc_main$2 = {
|
|
|
9197
10735
|
this.updateLanesChartOption();
|
|
9198
10736
|
});
|
|
9199
10737
|
},
|
|
9200
|
-
|
|
9201
|
-
|
|
10738
|
+
immediate: true,
|
|
10739
|
+
deep: true
|
|
9202
10740
|
},
|
|
9203
10741
|
themeName: {
|
|
9204
10742
|
handler() {
|
|
@@ -9217,7 +10755,10 @@ const _sfc_main$2 = {
|
|
|
9217
10755
|
if (newVal && this.formCache.axisType == "depth") {
|
|
9218
10756
|
let data = ((_b = (_a = this.currentToolBarConfig) == null ? void 0 : _a.scaleList) == null ? void 0 : _b.map((item) => item.value)) || [];
|
|
9219
10757
|
let size = Math.round(newVal * this.depthInterval / this.pxToCm()) < Math.max(...data) ? Math.round(newVal * this.depthInterval / this.pxToCm()) : Math.max(...data);
|
|
9220
|
-
this.$emit(
|
|
10758
|
+
this.$emit(
|
|
10759
|
+
"updateScale",
|
|
10760
|
+
data.includes(size) ? size : `1:${size * 100}`
|
|
10761
|
+
);
|
|
9221
10762
|
}
|
|
9222
10763
|
}
|
|
9223
10764
|
},
|
|
@@ -9235,9 +10776,18 @@ const _sfc_main$2 = {
|
|
|
9235
10776
|
this.lastVisibleDataChangeParams = { firstValue, lastValue };
|
|
9236
10777
|
if (this.formCache.axisType === "depth") {
|
|
9237
10778
|
const dataGroups = splitArrayByDepth(val, axisKey);
|
|
9238
|
-
this.$emit("visibleDataChange", {
|
|
10779
|
+
this.$emit("visibleDataChange", {
|
|
10780
|
+
firstValue,
|
|
10781
|
+
lastValue,
|
|
10782
|
+
settings: this.formCache,
|
|
10783
|
+
dataGroups
|
|
10784
|
+
});
|
|
9239
10785
|
} else {
|
|
9240
|
-
this.$emit("visibleDataChange", {
|
|
10786
|
+
this.$emit("visibleDataChange", {
|
|
10787
|
+
firstValue,
|
|
10788
|
+
lastValue,
|
|
10789
|
+
settings: this.formCache
|
|
10790
|
+
});
|
|
9241
10791
|
}
|
|
9242
10792
|
},
|
|
9243
10793
|
immediate: true
|
|
@@ -9258,25 +10808,36 @@ const _sfc_main$2 = {
|
|
|
9258
10808
|
...item,
|
|
9259
10809
|
[axisKey]: this.toMillisecondTimestamp(item[axisKey])
|
|
9260
10810
|
}));
|
|
9261
|
-
this.realTimeData = this.deduplicateByUniqueKey(
|
|
9262
|
-
this.realTimeData = processedData;
|
|
9263
|
-
} else {
|
|
9264
|
-
processedData = processedData.map((item) => ({
|
|
9265
|
-
...item,
|
|
9266
|
-
timestamp: this.toMillisecondTimestamp(item.timestamp)
|
|
9267
|
-
}));
|
|
9268
|
-
this.realTimeData = processedData;
|
|
9269
|
-
}
|
|
9270
|
-
if (this.formCache.axisType == "depth") {
|
|
9271
|
-
let data = getAttrGap(
|
|
10811
|
+
this.realTimeData = this.deduplicateByUniqueKey(
|
|
9272
10812
|
this.realTimeData,
|
|
9273
|
-
|
|
10813
|
+
processedData,
|
|
10814
|
+
axisKey
|
|
9274
10815
|
);
|
|
9275
|
-
|
|
9276
|
-
|
|
10816
|
+
this.realTimeData = processedData;
|
|
10817
|
+
} else {
|
|
10818
|
+
const axisKey = this.currentToolBarConfig.axisTypeList && this.currentToolBarConfig.axisTypeList[this.formCache.axisType] || "depth";
|
|
10819
|
+
if (processedData[0] && processedData[0].timestamp) {
|
|
10820
|
+
console.log(processedData[0].timestamp, "timestamp11111111");
|
|
10821
|
+
processedData = processedData.map((item) => ({
|
|
10822
|
+
...item,
|
|
10823
|
+
timestamp: this.toMillisecondTimestamp(item.timestamp)
|
|
10824
|
+
}));
|
|
10825
|
+
this.realTimeData = this.deduplicateByUniqueKey(
|
|
10826
|
+
this.realTimeData,
|
|
10827
|
+
processedData,
|
|
10828
|
+
"timestamp"
|
|
10829
|
+
);
|
|
9277
10830
|
} else {
|
|
9278
|
-
this.
|
|
10831
|
+
this.realTimeData = this.deduplicateByUniqueKey(
|
|
10832
|
+
this.realTimeData,
|
|
10833
|
+
processedData,
|
|
10834
|
+
axisKey
|
|
10835
|
+
);
|
|
9279
10836
|
}
|
|
10837
|
+
console.log(
|
|
10838
|
+
this.realTimeData.filter((item) => item[axisKey] == "9551.25"),
|
|
10839
|
+
"当前数据"
|
|
10840
|
+
);
|
|
9280
10841
|
}
|
|
9281
10842
|
console.log(this.realTimeData, "当前数据");
|
|
9282
10843
|
this.getLatestLineDataByParamCode();
|
|
@@ -9289,7 +10850,47 @@ const _sfc_main$2 = {
|
|
|
9289
10850
|
data = [data];
|
|
9290
10851
|
}
|
|
9291
10852
|
this.handleDataLoaded(data);
|
|
10853
|
+
} else if (newVal.type === "updateData") {
|
|
10854
|
+
let data = cloneDeep(newVal && newVal.data) || [];
|
|
10855
|
+
if (!Array.isArray(data)) {
|
|
10856
|
+
data = [data];
|
|
10857
|
+
}
|
|
10858
|
+
const axisKey = this.currentToolBarConfig.axisTypeList && this.currentToolBarConfig.axisTypeList[this.formCache.axisType] || "depth";
|
|
10859
|
+
if (this.formCache.axisType === "depth") {
|
|
10860
|
+
data = data.map((item) => ({
|
|
10861
|
+
...item,
|
|
10862
|
+
timestamp: this.toMillisecondTimestamp(item.timestamp)
|
|
10863
|
+
}));
|
|
10864
|
+
data.forEach((item) => {
|
|
10865
|
+
const hasTimestamp = item.timestamp !== void 0 && item.timestamp !== null && item.timestamp !== "";
|
|
10866
|
+
if (hasTimestamp) {
|
|
10867
|
+
const matchIndex = this.realTimeData.findIndex(
|
|
10868
|
+
(d) => d[axisKey] == item[axisKey] && d.timestamp == item.timestamp
|
|
10869
|
+
);
|
|
10870
|
+
if (matchIndex > -1) {
|
|
10871
|
+
this.$set(this.realTimeData, matchIndex, {
|
|
10872
|
+
...this.realTimeData[matchIndex],
|
|
10873
|
+
...item
|
|
10874
|
+
});
|
|
10875
|
+
}
|
|
10876
|
+
} else {
|
|
10877
|
+
const matchIndex = this.realTimeData.findIndex(
|
|
10878
|
+
(d) => d[axisKey] == item[axisKey]
|
|
10879
|
+
);
|
|
10880
|
+
if (matchIndex > -1) {
|
|
10881
|
+
this.$set(this.realTimeData, matchIndex, {
|
|
10882
|
+
...this.realTimeData[matchIndex],
|
|
10883
|
+
...item
|
|
10884
|
+
});
|
|
10885
|
+
}
|
|
10886
|
+
}
|
|
10887
|
+
});
|
|
10888
|
+
this.getLatestLineDataByParamCode();
|
|
10889
|
+
await this.$nextTick();
|
|
10890
|
+
this.updateLanesChartOption();
|
|
10891
|
+
}
|
|
9292
10892
|
} else {
|
|
10893
|
+
console.log(newVal, "newVal");
|
|
9293
10894
|
let data = cloneDeep(newVal && newVal.data) || [];
|
|
9294
10895
|
if (!Array.isArray(data)) {
|
|
9295
10896
|
data = [data];
|
|
@@ -9312,9 +10913,15 @@ const _sfc_main$2 = {
|
|
|
9312
10913
|
timestamp: this.toMillisecondTimestamp(item.timestamp)
|
|
9313
10914
|
}));
|
|
9314
10915
|
if (direction === "top") {
|
|
9315
|
-
this.realTimeData = this.uniqueByKeys(
|
|
10916
|
+
this.realTimeData = this.uniqueByKeys(
|
|
10917
|
+
[...data, ...this.realTimeData],
|
|
10918
|
+
"timestamp"
|
|
10919
|
+
);
|
|
9316
10920
|
} else {
|
|
9317
|
-
this.realTimeData = this.uniqueByKeys(
|
|
10921
|
+
this.realTimeData = this.uniqueByKeys(
|
|
10922
|
+
[...this.realTimeData, ...data],
|
|
10923
|
+
"timestamp"
|
|
10924
|
+
);
|
|
9318
10925
|
}
|
|
9319
10926
|
}
|
|
9320
10927
|
this.getLatestLineDataByParamCode();
|
|
@@ -9344,6 +10951,14 @@ const _hoisted_2$2 = {
|
|
|
9344
10951
|
class: "kd-lane-chart-container",
|
|
9345
10952
|
ref: "targetDom"
|
|
9346
10953
|
};
|
|
10954
|
+
const _hoisted_3$1 = ["onMouseenter", "onClick"];
|
|
10955
|
+
const _hoisted_4$1 = {
|
|
10956
|
+
key: 0,
|
|
10957
|
+
class: "context-menu sub-menu",
|
|
10958
|
+
style: { left: "100%", top: 0 }
|
|
10959
|
+
};
|
|
10960
|
+
const _hoisted_5 = ["onClick"];
|
|
10961
|
+
const _hoisted_6 = ["onClick"];
|
|
9347
10962
|
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
9348
10963
|
const _component_resizeEcharts = resolveComponent("resizeEcharts");
|
|
9349
10964
|
const _component_chartContainer = resolveComponent("chartContainer");
|
|
@@ -9357,7 +10972,8 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9357
10972
|
onParamsChange: $options.paramsChange,
|
|
9358
10973
|
visibleData: $data.visibleData,
|
|
9359
10974
|
headerData: $data.headerData,
|
|
9360
|
-
lineRange: $data.lineRange
|
|
10975
|
+
lineRange: $data.lineRange,
|
|
10976
|
+
activeLaneId: $data.activeLaneId
|
|
9361
10977
|
}), createSlots({ _: 2 }, [
|
|
9362
10978
|
renderList($props.headerSlotName, (lane) => {
|
|
9363
10979
|
return {
|
|
@@ -9390,8 +11006,9 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9390
11006
|
ref: (el) => $options.setChartRef(lane.laneId, el),
|
|
9391
11007
|
autoresize: "",
|
|
9392
11008
|
options: $options.getOptionsByLineId(lane.laneId),
|
|
9393
|
-
group: $data.group
|
|
9394
|
-
|
|
11009
|
+
group: $data.group,
|
|
11010
|
+
onChartInited: (chart) => $options.handleChartInited(lane.laneId, chart)
|
|
11011
|
+
}, null, 8, ["options", "group", "onChartInited"]))
|
|
9395
11012
|
], 36))
|
|
9396
11013
|
])
|
|
9397
11014
|
};
|
|
@@ -9419,23 +11036,68 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9419
11036
|
ref: (el) => $options.setChartRef(lane.laneId, el),
|
|
9420
11037
|
autoresize: "",
|
|
9421
11038
|
options: $options.getOptionsByLineId(lane.laneId),
|
|
9422
|
-
group: $data.group
|
|
9423
|
-
|
|
11039
|
+
group: $data.group,
|
|
11040
|
+
onChartInited: (chart) => $options.handleChartInited(lane.laneId, chart)
|
|
11041
|
+
}, null, 8, ["options", "group", "onChartInited"]))
|
|
9424
11042
|
], 36))
|
|
9425
11043
|
])
|
|
9426
11044
|
};
|
|
9427
11045
|
})
|
|
9428
|
-
]), 1040, ["onTemplateChange", "onLineChange", "onLaneWidthChange", "onParamsChange", "visibleData", "headerData", "lineRange"])
|
|
11046
|
+
]), 1040, ["onTemplateChange", "onLineChange", "onLaneWidthChange", "onParamsChange", "visibleData", "headerData", "lineRange", "activeLaneId"])
|
|
9429
11047
|
], 512),
|
|
9430
11048
|
withDirectives(createElementVNode("div", {
|
|
9431
11049
|
class: "kd-lane-crosshair-line",
|
|
9432
11050
|
style: normalizeStyle({ top: `${$data.crosshairTop}px` })
|
|
9433
11051
|
}, null, 4), [
|
|
9434
11052
|
[vShow, $data.crosshairVisible]
|
|
11053
|
+
]),
|
|
11054
|
+
withDirectives(createElementVNode("div", {
|
|
11055
|
+
class: "context-menu-wrapper",
|
|
11056
|
+
onClick: _cache[6] || (_cache[6] = withModifiers((...args) => $options.closeContextMenu && $options.closeContextMenu(...args), ["self"])),
|
|
11057
|
+
onContextmenu: _cache[7] || (_cache[7] = withModifiers((...args) => $options.closeContextMenu && $options.closeContextMenu(...args), ["prevent"]))
|
|
11058
|
+
}, [
|
|
11059
|
+
createElementVNode("div", {
|
|
11060
|
+
ref: "contextMenuRef",
|
|
11061
|
+
class: "context-menu",
|
|
11062
|
+
style: normalizeStyle({ left: `${$data.contextMenuX}%`, top: `${$data.contextMenuY}%` })
|
|
11063
|
+
}, [
|
|
11064
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList($data.currentContextMenuItems, (item, index2) => {
|
|
11065
|
+
return openBlock(), createElementBlock(Fragment, { key: index2 }, [
|
|
11066
|
+
item.children && item.children.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
11067
|
+
key: 0,
|
|
11068
|
+
class: "context-menu-item has-children",
|
|
11069
|
+
onMouseenter: ($event) => $options.showSubMenu(item, $event),
|
|
11070
|
+
onClick: ($event) => $options.handleContextMenuItemClick(item)
|
|
11071
|
+
}, [
|
|
11072
|
+
createElementVNode("span", null, toDisplayString(item.label), 1),
|
|
11073
|
+
_cache[8] || (_cache[8] = createElementVNode("span", { class: "arrow" }, "›", -1)),
|
|
11074
|
+
$data.activeSubMenu === item ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
11075
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(item.children, (child, childIndex) => {
|
|
11076
|
+
return openBlock(), createElementBlock("div", {
|
|
11077
|
+
key: childIndex,
|
|
11078
|
+
class: "context-menu-item",
|
|
11079
|
+
onClick: ($event) => $options.handleContextMenuItemClick(child)
|
|
11080
|
+
}, [
|
|
11081
|
+
createElementVNode("span", null, toDisplayString(child.label), 1)
|
|
11082
|
+
], 8, _hoisted_5);
|
|
11083
|
+
}), 128))
|
|
11084
|
+
])) : createCommentVNode("", true)
|
|
11085
|
+
], 40, _hoisted_3$1)) : (openBlock(), createElementBlock("div", {
|
|
11086
|
+
key: 1,
|
|
11087
|
+
class: "context-menu-item",
|
|
11088
|
+
onClick: ($event) => $options.handleContextMenuItemClick(item)
|
|
11089
|
+
}, [
|
|
11090
|
+
createElementVNode("span", null, toDisplayString(item.label), 1)
|
|
11091
|
+
], 8, _hoisted_6))
|
|
11092
|
+
], 64);
|
|
11093
|
+
}), 128))
|
|
11094
|
+
], 4)
|
|
11095
|
+
], 544), [
|
|
11096
|
+
[vShow, $data.contextMenuVisible]
|
|
9435
11097
|
])
|
|
9436
11098
|
], 512);
|
|
9437
11099
|
}
|
|
9438
|
-
const chartContainer = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-
|
|
11100
|
+
const chartContainer = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-b2028739"]]);
|
|
9439
11101
|
const _sfc_main$1 = {
|
|
9440
11102
|
name: "ParameterPanel",
|
|
9441
11103
|
props: {
|
|
@@ -10077,6 +11739,10 @@ const _sfc_main = {
|
|
|
10077
11739
|
chartContainer
|
|
10078
11740
|
},
|
|
10079
11741
|
props: {
|
|
11742
|
+
isGeomechanical: {
|
|
11743
|
+
type: Boolean,
|
|
11744
|
+
default: false
|
|
11745
|
+
},
|
|
10080
11746
|
timeConfig: {
|
|
10081
11747
|
type: Object,
|
|
10082
11748
|
default: () => ({})
|
|
@@ -10149,6 +11815,73 @@ const _sfc_main = {
|
|
|
10149
11815
|
showContextMenuStatus: {
|
|
10150
11816
|
type: Boolean,
|
|
10151
11817
|
default: true
|
|
11818
|
+
},
|
|
11819
|
+
// 缺失数据点右键弹窗配置
|
|
11820
|
+
missingPointMenuConfig: {
|
|
11821
|
+
type: Object,
|
|
11822
|
+
default: () => ({
|
|
11823
|
+
topMenu: [
|
|
11824
|
+
{
|
|
11825
|
+
label: "向下插值",
|
|
11826
|
+
children: [
|
|
11827
|
+
{
|
|
11828
|
+
label: "方式一",
|
|
11829
|
+
canTransfer: true
|
|
11830
|
+
},
|
|
11831
|
+
{ label: "方式二", canTransfer: true }
|
|
11832
|
+
]
|
|
11833
|
+
},
|
|
11834
|
+
{
|
|
11835
|
+
label: "向下拟合",
|
|
11836
|
+
children: [
|
|
11837
|
+
{ label: "方式一", canTransfer: true },
|
|
11838
|
+
{ label: "方式二", canTransfer: true },
|
|
11839
|
+
{ label: "方式三", canTransfer: true }
|
|
11840
|
+
]
|
|
11841
|
+
}
|
|
11842
|
+
],
|
|
11843
|
+
bottomMenu: [
|
|
11844
|
+
{
|
|
11845
|
+
label: "向上插值",
|
|
11846
|
+
children: [
|
|
11847
|
+
{ label: "方式一", canTransfer: true },
|
|
11848
|
+
{ label: "方式二", canTransfer: true }
|
|
11849
|
+
]
|
|
11850
|
+
},
|
|
11851
|
+
{
|
|
11852
|
+
label: "向上拟合",
|
|
11853
|
+
children: [
|
|
11854
|
+
{ label: "方式一", canTransfer: true },
|
|
11855
|
+
{ label: "方式二", canTransfer: true },
|
|
11856
|
+
{ label: "方式三", canTransfer: true }
|
|
11857
|
+
]
|
|
11858
|
+
}
|
|
11859
|
+
]
|
|
11860
|
+
})
|
|
11861
|
+
},
|
|
11862
|
+
// 区块右键弹窗配置(始终自带"删除区块",无论是否传数据)
|
|
11863
|
+
markAreaMenuConfig: {
|
|
11864
|
+
type: Array,
|
|
11865
|
+
default: () => [
|
|
11866
|
+
{
|
|
11867
|
+
label: "插值计算",
|
|
11868
|
+
children: [
|
|
11869
|
+
{
|
|
11870
|
+
label: "方式一",
|
|
11871
|
+
canTransfer: true
|
|
11872
|
+
},
|
|
11873
|
+
{ label: "方式二", canTransfer: true }
|
|
11874
|
+
]
|
|
11875
|
+
},
|
|
11876
|
+
{
|
|
11877
|
+
label: "拟合计算",
|
|
11878
|
+
children: [
|
|
11879
|
+
{ label: "方式一", canTransfer: true },
|
|
11880
|
+
{ label: "方式二", canTransfer: true },
|
|
11881
|
+
{ label: "方式三", canTransfer: true }
|
|
11882
|
+
]
|
|
11883
|
+
}
|
|
11884
|
+
]
|
|
10152
11885
|
}
|
|
10153
11886
|
},
|
|
10154
11887
|
data() {
|
|
@@ -10808,7 +12541,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
10808
12541
|
])])) : createCommentVNode("", true)
|
|
10809
12542
|
]);
|
|
10810
12543
|
}
|
|
10811
|
-
const FrameLayoutComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
12544
|
+
const FrameLayoutComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-eea6a3a0"]]);
|
|
10812
12545
|
KdLaneContainerComponent.install = function(app) {
|
|
10813
12546
|
app.component(KdLaneContainerComponent.name, KdLaneContainerComponent);
|
|
10814
12547
|
};
|