Commit 1287c47b by jiang'yun

修改

parent ac2b9088
...@@ -10,20 +10,26 @@ ...@@ -10,20 +10,26 @@
</div> </div>
<!-- 右侧按钮组(与左侧同一行,靠右对齐) --> <!-- 右侧按钮组(与左侧同一行,靠右对齐) -->
<div class="toolbar-right"> <div class="toolbar-right">
<div class="color-maps"> <!-- <div class="color-maps">-->
<el-select v-model="currentColorMap" @change="switchColorMap" size="small"> <!-- <el-select v-model="currentColorMap" @change="switchColorMap" size="small">-->
<el-option v-for="map in colorMaps" :key="map.value" :label="map.label" :value="map.value"> <!-- <el-option v-for="map in colorMaps" :key="map.value" :label="map.label" :value="map.value">-->
<span class="color-map-option"> <!-- <span class="color-map-option">-->
<span class="color-map-preview" :class="map.value"></span> <!-- <span class="color-map-preview" :class="map.value"></span>-->
{{ map.label }} <!-- {{ map.label }}-->
</span> <!-- </span>-->
</el-option> <!-- </el-option>-->
</el-select> <!-- </el-select>-->
</div> <!-- </div>-->
<toolbar-controls :plots="plots" :data-loaded="isWidgetReady" :show-line-style-panel="showLineStylePanel" <toolbar-controls :plots="plots" :data-loaded="isWidgetReady" :show-line-style-panel="showLineStylePanel"
@toggleLineStylePanel="toggleLineStylePanel" @exporting="exporting = $event" @toggleLineStylePanel="toggleLineStylePanel" @exporting="exporting = $event"
@closePrintDialog="showPrintDialog = false" /> @closePrintDialog="showPrintDialog = false" />
<el-tooltip content="设置" placement="bottom" effect="light">
<el-button @click="editProperties" :class="{ 'active': showLineStylePanel }">
<i class="el-icon-setting"></i>
</el-button>
</el-tooltip>
<el-tooltip content="绘制文本" placement="bottom" effect="light"> <el-tooltip content="绘制文本" placement="bottom" effect="light">
<el-button @click="toggleDrawText" :class="{ 'active': isDrawingText }"> <el-button @click="toggleDrawText" :class="{ 'active': isDrawingText }">
<i class="el-icon-edit-outline"></i> <i class="el-icon-edit-outline"></i>
...@@ -42,10 +48,10 @@ ...@@ -42,10 +48,10 @@
</el-tooltip> --> </el-tooltip> -->
</div> </div>
<!-- 缩略图 start--> <!-- 缩略图 start-->
<div <div
v-if="shouldShowThumb" v-if="shouldShowThumb"
ref="thumbContainer" ref="thumbContainer"
@click="handleThumbClick" @click="handleThumbClick"
@mousedown="startDrag" @mousedown="startDrag"
class="right-thumb draggable-thumb" class="right-thumb draggable-thumb"
:style="thumbPosition"> :style="thumbPosition">
...@@ -61,11 +67,11 @@ ...@@ -61,11 +67,11 @@
</div> </div>
<!-- 缩略图 end--> <!-- 缩略图 end-->
<!-- 缩略图弹窗 start --> <!-- 缩略图弹窗 start -->
<el-dialog <el-dialog
v-if="shouldShowThumb" v-if="shouldShowThumb"
title="缩略图预览" title="缩略图预览"
:visible.sync="showThumbDialog" :visible.sync="showThumbDialog"
width="80%" width="80%"
append-to-body append-to-body
:z-index="9999999" :z-index="9999999"
:modal="true" :modal="true"
...@@ -257,6 +263,234 @@ ...@@ -257,6 +263,234 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 图形设置-->
<el-dialog title="设置" :visible.sync="showPropertiesDialog" width="100%">
<el-form ref="form" label-width="130px">
<el-row>
<el-col :span="5">
<el-form-item label="颜色集合">
<el-select v-model="colorMapSelect" placeholder="请选择颜色集合" @change="changeColor">
<el-option v-for="item in listNameColorMaps" :label="item" :value="item"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="归一化类型">
<el-select v-model="NormalizationType" @change="changeNor" placeholder="请选择归一化类型">
<el-option v-for="item in NormalizationTypeData" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="归一化比例">
<el-slider @change="changeNor" style="width: 180px;"
v-model="NormalizationBl"
:min="0.1"
:max="5"
:step="0.1"
show-stops>
</el-slider>
</el-form-item>
</el-col>
<!-- <el-col :span="5">-->
<!-- <el-form-item label="每英寸道数" >-->
<!-- <el-input v-model="mycds" @blur="changeMycds"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
<el-row>
<!-- <el-col :span="5">-->
<!-- <el-form-item label="每秒英寸数" >-->
<!-- <el-input v-model="msycs" @blur="changeMycds"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="5">
<el-form-item label="采样插值类型" >
<el-select v-model="samplesType" @change="changeInt" placeholder="请选择采样插值类型">
<el-option v-for="item in InterpolationType" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="采样插值边缘" >
<el-select v-model="samplesEdge" @change="changeInt" placeholder="请选择采样插值边缘">
<el-option v-for="item in InterpolationEdge" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="道插值类型" >
<el-select v-model="tracesEdge" @change="changeInt" placeholder="请选择道插值类型">
<el-option v-for="item in InterpolationType" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="5">
<el-form-item label="道插值边缘" >
<el-select v-model="tracesType" @change="changeInt" placeholder="请选择道插值边缘">
<el-option v-for="item in InterpolationEdge" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="绘图类型" >
<el-checkbox v-model="Wiggle" @change="changePlotType">Wiggle</el-checkbox>
<el-checkbox v-model="Reversed" @change="changePlotType">Reversed</el-checkbox>
<el-checkbox v-model="PositiveFill" @change="changePlotType">Positive fill</el-checkbox>
<el-checkbox v-model="NegativeFill" @change="changePlotType">Negative fill</el-checkbox>
<el-checkbox v-model="PositiveColorFill" @change="changePlotType">Positive color fill</el-checkbox>
<el-checkbox v-model="NegativeColorFill" @change="changePlotType">Negative color fill</el-checkbox>
<el-checkbox v-model="SimpleDensity" @change="changePlotType">Simple density</el-checkbox>
<el-checkbox v-model="InterpolatedDensity" @change="changePlotType">Interpolated density</el-checkbox>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="Wiggle-裁剪因子" >
<el-input v-model="ClippingFactor" @blur="changePlotType"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="5">
<el-form-item label="Wiggle-抽取间距" >
<el-input v-model="DecimationSpacing" @blur="changePlotType"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="Wiggle-密度抽取" >
<el-checkbox v-model="densityDecimation" @change="changePlotType">Density decimation(密度抽取)</el-checkbox>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="Clipping mode(裁剪模式)" >
<el-select v-model="ClippingMode" @change="changePlotType" placeholder="请选择裁剪模式">
<el-option v-for="item in ClippingModeData" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<el-form-item label="TaperFilter(滤波)" >
<el-checkbox v-model="TaperFilterEnbled" @change="changePlotType">启用滤波</el-checkbox>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="f1" >
<el-input v-model="f1" style="width: 80px" @blur="changePlotType"></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="f2" >
<el-input v-model="f2" style="width: 80px" @blur="changePlotType"></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="f3" >
<el-input v-model="f3" style="width: 80px" @blur="changePlotType"></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="f4" >
<el-input v-model="f4" style="width: 80px" @blur="changePlotType"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="采样率" >
<el-input v-model="sampleRate" style="width: 80px" @blur="changePlotType"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="带通模式" >
<el-checkbox v-model="passFlag" @change="changePlotType">带通模式</el-checkbox>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<el-form-item label="AGC" >
<el-checkbox v-model="AGCEnbled" @change="changePlotType">启用AGC</el-checkbox>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="AGC length" >
<el-input v-model="AGCLength" style="width: 80px" @blur="changePlotType"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="Desired average" >
<el-input v-model="DesiredAverage" style="width: 80px" @blur="changePlotType"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="Noise reduction" >
<el-select v-model="NoiseReduction" @change="changePlotType" placeholder="请选择降噪">
<el-option v-for="item in NoiseReductionData" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="Noise reduction percentage" >
<el-input v-model="NoiseReductionPercentage" style="width: 80px" @blur="changePlotType"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="Start sample" >
<el-input v-model="StartSample" style="width: 80px" @blur="changePlotType"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="Step" >
<el-input v-model="Step" style="width: 80px" @blur="changePlotType"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4">
<el-form-item label="Units" >
<el-select v-model="Units" @change="changePlotType" placeholder="请选择单位">
<el-option v-for="item in UnitsData" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="Window length" >
<el-input v-model="WindowLength" style="width: 80px" @blur="changePlotType"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<el-form-item label="Reverse" >
<el-checkbox v-model="ReverseEnbled" @change="changePlotType">启用Reverse</el-checkbox>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="inverted" >
<el-checkbox v-model="inverted" @change="changePlotType">启用inverted</el-checkbox>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="reversed" >
<el-checkbox v-model="reversed" @change="changePlotType">启用reversed</el-checkbox>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="showPropertiesDialog = false">取 消</el-button>
<el-button type="primary" @click="showPropertiesDialog = false">确 定</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
...@@ -400,27 +634,27 @@ export default { ...@@ -400,27 +634,27 @@ export default {
savedLineAnnotations: [], savedLineAnnotations: [],
// savedLineAnnotations: [{ // savedLineAnnotations: [{
// properties: { // properties: {
// x: [2390.510986101919, 2313.4866975512905, 2307.7161482461947, 2303.4509596293847, 2298.934877564527, // x: [2390.510986101919, 2313.4866975512905, 2307.7161482461947, 2303.4509596293847, 2298.934877564527,
// 2295.924156187955, 2292.9134348113835, 2290.404500330907, 2287.8955658504306, 2283.63037723362, // 2295.924156187955, 2292.9134348113835, 2290.404500330907, 2287.8955658504306, 2283.63037723362,
// 2280.870549305096, 2278.612508272667, 2275.852680344143, 2274.347319655857, 2272.8419589675714, // 2280.870549305096, 2278.612508272667, 2275.852680344143, 2274.347319655857, 2272.8419589675714,
// 2271.8383851753806, 2271.8383851753806, 2272.340172071476, 2273.092852415619, 2274.8491065519524, // 2271.8383851753806, 2271.8383851753806, 2272.340172071476, 2273.092852415619, 2274.8491065519524,
// 2276.8562541363335, 2280.3687624090007, 2287.6446724023826, 2292.6625413633355, 2298.4330906684318, // 2276.8562541363335, 2280.3687624090007, 2287.6446724023826, 2292.6625413633355, 2298.4330906684318,
// 2307.2143613500994, 2313.7375909993384, 2320.511714096625, 2325.7804765056253, 2333.307279947055, // 2307.2143613500994, 2313.7375909993384, 2320.511714096625, 2325.7804765056253, 2333.307279947055,
// 2344.095698213104, 2349.8662475182, 2356.1385837193916, 2365.421641297154, 2373.450231634679, // 2344.095698213104, 2349.8662475182, 2356.1385837193916, 2365.421641297154, 2373.450231634679,
// 2382.231502316347, 2389.7583057577763, 2403.3065519523498, 2422.625347452019, 2433.915552614163, // 2382.231502316347, 2389.7583057577763, 2403.3065519523498, 2422.625347452019, 2433.915552614163,
// 2443.1986101919256, 2449.470946393117, 2457.75043017869, 2469.5424222369293, 2475.8147584381204, // 2443.1986101919256, 2449.470946393117, 2457.75043017869, 2469.5424222369293, 2475.8147584381204,
// 2488.861217736598, 2508.6818001323627, 2522.731833223031, 2536.530972865652, 2547.0684976836533, // 2488.861217736598, 2508.6818001323627, 2522.731833223031, 2536.530972865652, 2547.0684976836533,
// 2628.1070814030445], // 2628.1070814030445],
// y: [2.5366336633663367, 2.5056105610561055, 2.506930693069307, 2.5095709570957094, 2.516831683168317, // y: [2.5366336633663367, 2.5056105610561055, 2.506930693069307, 2.5095709570957094, 2.516831683168317,
// 2.5227722772277223, 2.5346534653465347, 2.545214521452145, 2.5597359735973595, 2.586138613861386, // 2.5227722772277223, 2.5346534653465347, 2.545214521452145, 2.5597359735973595, 2.586138613861386,
// 2.6046204620462046, 2.625082508250825, 2.6547854785478546, 2.6785478547854784, 2.707590759075907, // 2.6046204620462046, 2.625082508250825, 2.6547854785478546, 2.6785478547854784, 2.707590759075907,
// 2.7326732673267324, 2.758415841584158, 2.801980198019802, 2.834983498349835, 2.8666666666666667, // 2.7326732673267324, 2.758415841584158, 2.801980198019802, 2.834983498349835, 2.8666666666666667,
// 2.89042904290429, 2.925412541254125, 2.9788778877887787, 3.0072607260726074, 3.0323432343234322, // 2.89042904290429, 2.925412541254125, 2.9788778877887787, 3.0072607260726074, 3.0323432343234322,
// 3.0613861386138614, 3.0792079207920793, 3.094389438943894, 3.104290429042904, 3.1135313531353135, // 3.0613861386138614, 3.0792079207920793, 3.094389438943894, 3.104290429042904, 3.1135313531353135,
// 3.124092409240924, 3.1273927392739274, 3.13003300330033, 3.130693069306931, 3.131353135313531, // 3.124092409240924, 3.1273927392739274, 3.13003300330033, 3.130693069306931, 3.131353135313531,
// 3.131353135313531, 3.131353135313531, 3.132673267326733, 3.1353135313531353, 3.1366336633663363, // 3.131353135313531, 3.131353135313531, 3.132673267326733, 3.1353135313531353, 3.1366336633663363,
// 3.1372937293729373, 3.137953795379538, 3.1392739273927392, 3.141254125412541, 3.141254125412541, // 3.1372937293729373, 3.137953795379538, 3.1392739273927392, 3.141254125412541, 3.141254125412541,
// 3.1399339933993398, 3.1392739273927392, 3.1392739273927392, 3.1392739273927392, 3.1392739273927392, // 3.1399339933993398, 3.1392739273927392, 3.1392739273927392, 3.1392739273927392, 3.1392739273927392,
// 3.1392739273927392], // 3.1392739273927392],
// linestyle: { // linestyle: {
// Lx: "#0351ad", // Lx: "#0351ad",
...@@ -728,6 +962,167 @@ export default { ...@@ -728,6 +962,167 @@ export default {
left: 'auto', left: 'auto',
bottom: 'auto' bottom: 'auto'
}, },
// 图形设置
showPropertiesDialog:false,
listNameColorMaps: [
"WhiteBlack",
"RedWhiteBlack",
"RedWhiteBlue",
"Saddleback",
"Angles5color",
"BlackRedYellowWhite",
"GreyOrange",
"IntervalVelocity",
"IntervalVelocity16",
"IntervalVelocity32",
"Rainbow",
"RedGreenBlue",
"RedWhiteBlueExtremes",
"RedWhiteBlueHot",
"RedYellowBlue",
"SaddlebackHot",
"Spectrum"
],
colorMapSelect: "",
// _colorMap: "",
// pipeline: null,
// _seismicWidget: null,
NormalizationType: null,
NormalizationBl: 0.1,
NormalizationTypeData:[
{
"label":"None",
"value":0,
},
{
"label":"Maximum",
"value":1,
},
{
"label":"TraceMaximum",
"value":2,
},
{
"label":"Average",
"value":3,
},
{
"label":"TraceAverage",
"value":4,
},{
"label":"RMS",
"value":5,
},{
"label":"TraceRMS",
"value":6,
},{
"label":"Limits",
"value":7,
}
],
mycds:null,
msycs:null,
samplesType:null,
samplesEdge:null,
tracesType:null,
tracesEdge:null,
InterpolationType:[
{
"label":"Linear",
"value":1,
},{
"label":"Quadratic",
"value":2,
},{
"label":"Step",
"value":3,
},{
"label":"CenteredStep",
"value":4,
},{
"label":"Cubic",
"value":5,
},{
"label":"Logarithmic",
"value":6,
},
],
InterpolationEdge:[
{
"label":"Zero",
"value":0,
},{
"label":"Duplicate",
"value":1,
}
],
Wiggle:false,
Reversed:false,
PositiveFill:false,
NegativeFill:false,
PositiveColorFill:false,
NegativeColorFill:false,
SimpleDensity:false,
InterpolatedDensity:true,
ClippingFactor:4,
DecimationSpacing:5,
densityDecimation:false,
ClippingMode:null,
ClippingModeData:[
{
"label":"Connected",
"value":"Connected"
},{
"label":"Disconnected",
"value":"Disconnected"
},
],
TaperFilterEnbled:false,
f1:10,
f2:20,
f3:60,
f4:70,
sampleRate:0,
passFlag:false,
AGCEnbled:false,
AGCLength:0,
DesiredAverage:1,
NoiseReductionPercentage:3,
NoiseReduction:null,
StartSample:0,
Step:1,
Units:"",
WindowLength:250,
UnitsData:[
{
"label":"Sample",
"value":0
}, {
"label":"Time",
"value":1
},
],
NoiseReductionData:[
{
"label":"disable",
"value":"disable"
}, {
"label":"enable",
"value":"enable"
},{
"label":"auto",
"value":"auto"
},
],
ReverseEnbled:false,
inverted:false,
reversed:false,
}; };
}, },
computed: { computed: {
...@@ -863,7 +1258,7 @@ export default { ...@@ -863,7 +1258,7 @@ export default {
this.$refs.plot.removeEventListener('contextmenu', this.showContextMenu); this.$refs.plot.removeEventListener('contextmenu', this.showContextMenu);
document.removeEventListener('click', this.hideContextMenu); document.removeEventListener('click', this.hideContextMenu);
} }
// 清理拖动事件监听 // 清理拖动事件监听
document.removeEventListener('mousemove', this.onDrag); document.removeEventListener('mousemove', this.onDrag);
document.removeEventListener('mouseup', this.stopDrag); document.removeEventListener('mouseup', this.stopDrag);
...@@ -1402,13 +1797,13 @@ export default { ...@@ -1402,13 +1797,13 @@ export default {
if (!event.target.closest('.drag-handle') && !event.target.closest('.thumb-holder')) { if (!event.target.closest('.drag-handle') && !event.target.closest('.thumb-holder')) {
return; return;
} }
event.preventDefault(); event.preventDefault();
this.isDragging = false; // 初始状态不是拖动 this.isDragging = false; // 初始状态不是拖动
this.dragDistance = 0; this.dragDistance = 0;
this.dragStartX = event.clientX; this.dragStartX = event.clientX;
this.dragStartY = event.clientY; this.dragStartY = event.clientY;
// 添加全局事件监听 // 添加全局事件监听
document.addEventListener('mousemove', this.onDrag); document.addEventListener('mousemove', this.onDrag);
document.addEventListener('mouseup', this.stopDrag); document.addEventListener('mouseup', this.stopDrag);
...@@ -1416,11 +1811,11 @@ export default { ...@@ -1416,11 +1811,11 @@ export default {
// 拖动中 // 拖动中
onDrag(event) { onDrag(event) {
event.preventDefault(); event.preventDefault();
const deltaX = event.clientX - this.dragStartX; const deltaX = event.clientX - this.dragStartX;
const deltaY = event.clientY - this.dragStartY; const deltaY = event.clientY - this.dragStartY;
this.dragDistance = Math.sqrt(deltaX * deltaX + deltaY * deltaY); this.dragDistance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
// 只有拖动距离超过阈值才开始真正的拖动 // 只有拖动距离超过阈值才开始真正的拖动
if (this.dragDistance > this.dragThreshold) { if (this.dragDistance > this.dragThreshold) {
if (!this.isDragging) { if (!this.isDragging) {
...@@ -1430,25 +1825,25 @@ export default { ...@@ -1430,25 +1825,25 @@ export default {
this.$refs.thumbContainer.style.cursor = 'grabbing'; this.$refs.thumbContainer.style.cursor = 'grabbing';
} }
} }
// 获取当前缩略图的位置 // 获取当前缩略图的位置
const currentTop = parseInt(this.thumbPosition.top) || 150; const currentTop = parseInt(this.thumbPosition.top) || 150;
const currentRight = parseInt(this.thumbPosition.right) || 20; const currentRight = parseInt(this.thumbPosition.right) || 20;
// 计算新位置 // 计算新位置
let newTop = currentTop + deltaY; let newTop = currentTop + deltaY;
let newRight = currentRight - deltaX; let newRight = currentRight - deltaX;
// 边界检查 // 边界检查
const windowWidth = window.innerWidth; const windowWidth = window.innerWidth;
const windowHeight = window.innerHeight; const windowHeight = window.innerHeight;
const thumbWidth = 260; const thumbWidth = 260;
const thumbHeight = 160; const thumbHeight = 160;
// 限制在窗口范围内 // 限制在窗口范围内
newTop = Math.max(0, Math.min(newTop, windowHeight - thumbHeight)); newTop = Math.max(0, Math.min(newTop, windowHeight - thumbHeight));
newRight = Math.max(0, Math.min(newRight, windowWidth - thumbWidth)); newRight = Math.max(0, Math.min(newRight, windowWidth - thumbWidth));
// 更新位置 // 更新位置
this.thumbPosition = { this.thumbPosition = {
top: newTop + 'px', top: newTop + 'px',
...@@ -1456,7 +1851,7 @@ export default { ...@@ -1456,7 +1851,7 @@ export default {
left: 'auto', left: 'auto',
bottom: 'auto' bottom: 'auto'
}; };
// 更新起始位置 // 更新起始位置
this.dragStartX = event.clientX; this.dragStartX = event.clientX;
this.dragStartY = event.clientY; this.dragStartY = event.clientY;
...@@ -1467,12 +1862,12 @@ export default { ...@@ -1467,12 +1862,12 @@ export default {
// 移除全局事件监听 // 移除全局事件监听
document.removeEventListener('mousemove', this.onDrag); document.removeEventListener('mousemove', this.onDrag);
document.removeEventListener('mouseup', this.stopDrag); document.removeEventListener('mouseup', this.stopDrag);
// 恢复样式 // 恢复样式
if (this.$refs.thumbContainer) { if (this.$refs.thumbContainer) {
this.$refs.thumbContainer.style.cursor = 'grab'; this.$refs.thumbContainer.style.cursor = 'grab';
} }
// 延迟重置拖动状态,避免立即触发点击事件 // 延迟重置拖动状态,避免立即触发点击事件
setTimeout(() => { setTimeout(() => {
this.isDragging = false; this.isDragging = false;
...@@ -3844,20 +4239,20 @@ export default { ...@@ -3844,20 +4239,20 @@ export default {
async handleFileSelect(plot) { async handleFileSelect(plot) {
let segys = []; let segys = [];
try { try {
// 使用 toDht 接口获取数据 // 使用 toDht 接口获取数据
//console.log('[handleFileSelect] 开始获取数据,routeId:', this.routeId); //console.log('[handleFileSelect] 开始获取数据,routeId:', this.routeId);
const res = await toDht(this.routeId); const res = await toDht(this.routeId);
console.log('[handleFileSelect] toDht 接口返回:', res); console.log('[handleFileSelect] toDht 接口返回:', res);
const data = (res && (res.data !== undefined ? res.data : res)) || {}; const data = (res && (res.data !== undefined ? res.data : res)) || {};
console.log('[handleFileSelect] 解析后的数据:', data); console.log('[handleFileSelect] 解析后的数据:', data);
// 从 ysqqXmxxSegy 数组中获取 jbsegy 字段 // 从 ysqqXmxxSegy 数组中获取 jbsegy 字段
segys = Array.isArray(data.ysqqXmxxSegy) ? data.ysqqXmxxSegy : []; segys = Array.isArray(data.ysqqXmxxSegy) ? data.ysqqXmxxSegy : [];
console.log('[handleFileSelect] ysqqXmxxSegy 数组:', segys); console.log('[handleFileSelect] ysqqXmxxSegy 数组:', segys);
if (segys.length === 0) { if (segys.length === 0) {
throw new Error('未找到 SEGY 数据'); throw new Error('未找到 SEGY 数据');
} }
...@@ -3866,17 +4261,17 @@ export default { ...@@ -3866,17 +4261,17 @@ export default {
this.loadingError = `获取数据失败: ${error.message}`; this.loadingError = `获取数据失败: ${error.message}`;
throw error; throw error;
} }
// 使用第一个 SEGY 数据的 jbsegy 字段 // 使用第一个 SEGY 数据的 jbsegy 字段
const firstSegy = segys[0]; const firstSegy = segys[0];
console.log('[handleFileSelect] 第一个 SEGY 数据:', firstSegy); console.log('[handleFileSelect] 第一个 SEGY 数据:', firstSegy);
let url = firstSegy.jbsegy; let url = firstSegy.jbsegy;
if (url && !url.startsWith('http')) { if (url && !url.startsWith('http')) {
url = process.env.VUE_APP_BASE_API + url; url = process.env.VUE_APP_BASE_API + url;
} }
let fileName = firstSegy.jbsegyName || 'density.segy'; let fileName = firstSegy.jbsegyName || 'density.segy';
console.log('[handleFileSelect] 最终 URL:', url); console.log('[handleFileSelect] 最终 URL:', url);
console.log('[handleFileSelect] 文件名:', fileName); console.log('[handleFileSelect] 文件名:', fileName);
...@@ -5926,7 +6321,207 @@ export default { ...@@ -5926,7 +6321,207 @@ export default {
this.disableScrollbarTools(); this.disableScrollbarTools();
this.$message.info('已禁用内部滚动条同步 - 使用外部滚动条控制'); this.$message.info('已禁用内部滚动条同步 - 使用外部滚动条控制');
} }
} },
editProperties(){
this.showPropertiesDialog=true;
},
changeColor(val){
var colorMap=SeismicColors.getDefault().createNamedColorMap(val, 256)
this.pipeline.setColorMap(colorMap);
console.log(this.plots)
if (this._seismicWidget) {
this._seismicWidget.invalidate(); // 使组件重新渲染
this._seismicWidget.fitToBounds(); // 调整视图以适应数据
} else {
console.error('Widget不可用,无法更新视图');
}
// 如果plots对象存在redraw方法,使用它来触发重绘
if (this.plots && typeof this.plots.redraw === 'function') {
this.plots.redraw();
}
//下方图
this.pipelineBottom.setColorMap(colorMap);
if (this._seismicWidgetBottom) {
this._seismicWidgetBottom.invalidate(); // 使组件重新渲染
this._seismicWidgetBottom.fitToBounds(); // 调整视图以适应数据
} else {
console.error('Widget不可用,无法更新视图');
}
// 如果plots对象存在redraw方法,使用它来触发重绘
if (this.plotsBottom && typeof this.plotsBottom.redraw === 'function') {
this.plotsBottom.redraw();
}
},
//归一化
changeNor(val){
if(this.NormalizationType==7){
this.pipeline .setOptions({
'normalization': {
'type': this.NormalizationType,
'scale': this.NormalizationBl
}
})
}else {
this.pipeline .setOptions({
'normalization': {
'type': this.NormalizationType,
'scale': this.NormalizationBl
}
})
}
//下方图
if(this.NormalizationType==7){
this.pipelineBottom .setOptions({
'normalization': {
'type': this.NormalizationType,
'scale': this.NormalizationBl
}
})
}else {
this.pipelineBottom .setOptions({
'normalization': {
'type': this.NormalizationType,
'scale': this.NormalizationBl
}
})
}
},
changeMycds(){
this._seismicWidget.setScaleOptions({
'tracescale': this.mycds,
'samplescale': this.msycs,
'deviceunit': 'in',
'sampleunit': 's',
});
},
changeInt(){
console.log(this.pipeline .getOptions())
this.pipeline.setOptions({
'interpolation': {
'samples': {
"type":this.samplesType,//采样插值类型,
"edge":this.samplesEdge,//采样插值边缘,
},
'traces': {
"type":this.tracesType,//道插值类型
"edge":this.tracesEdge,//道插值边缘
},
}
})
//下方图
this.pipelineBottom.setOptions({
'interpolation': {
'samples': {
"type":this.samplesType,//采样插值类型,
"edge":this.samplesEdge,//采样插值边缘,
},
'traces': {
"type":this.tracesType,//道插值类型
"edge":this.tracesEdge,//道插值边缘
},
}
})
},
changePlotType(){
this.pipeline .setOptions({
'plot': {
'type': {
"Wiggle":this.Wiggle,
"Reversed":this.Reversed,
"PositiveFill":this.PositiveFill,
"NegativeFill":this.NegativeFill,
"PositiveColorFill":this.PositiveColorFill,
"NegativeColorFill":this.NegativeColorFill,
"SimpleDensity":this.SimpleDensity,
"InterpolatedDensity":this.InterpolatedDensity,
},
"clippingFactor":this.ClippingFactor,
"decimationSpacing":this.DecimationSpacing,
"densityDecimation":this.densityDecimation,
},
"clippingmode":this.ClippingMode,
"dataProcessors":{
"TaperFilter":{
"apply":this.TaperFilterEnbled,
"f1":Number(this.f1),
"f2":Number(this.f2),
"f3":Number(this.f3),
"f4":Number(this.f4),
"sampleRate":Number(this.sampleRate),
"passFlag":this.passFlag,
},
"AGC":{
"agcLength":this.AGCLength,
"apply":this.AGCEnbled,
"desiredAverage":this.DesiredAverage,
"noiseReduction":this.NoiseReduction,
"noiseReductionPercentage":this.NoiseReductionPercentage,
"startSample":this.StartSample,
"step":this.Step,
"units":this.Units,
"windowLength":this.WindowLength,
},
"Reverse":{
"apply":this.ReverseEnbled,
"inverted":this.inverted,
"reversed":this.reversed,
}
}
})
console.log(this.pipeline .getOptions())
//下方图
this.pipelineBottom .setOptions({
'plot': {
'type': {
"Wiggle":this.Wiggle,
"Reversed":this.Reversed,
"PositiveFill":this.PositiveFill,
"NegativeFill":this.NegativeFill,
"PositiveColorFill":this.PositiveColorFill,
"NegativeColorFill":this.NegativeColorFill,
"SimpleDensity":this.SimpleDensity,
"InterpolatedDensity":this.InterpolatedDensity,
},
"clippingFactor":this.ClippingFactor,
"decimationSpacing":this.DecimationSpacing,
"densityDecimation":this.densityDecimation,
},
"clippingmode":this.ClippingMode,
"dataProcessors":{
"TaperFilter":{
"apply":this.TaperFilterEnbled,
"f1":Number(this.f1),
"f2":Number(this.f2),
"f3":Number(this.f3),
"f4":Number(this.f4),
"sampleRate":Number(this.sampleRate),
"passFlag":this.passFlag,
},
"AGC":{
"agcLength":this.AGCLength,
"apply":this.AGCEnbled,
"desiredAverage":this.DesiredAverage,
"noiseReduction":this.NoiseReduction,
"noiseReductionPercentage":this.NoiseReductionPercentage,
"startSample":this.StartSample,
"step":this.Step,
"units":this.Units,
"windowLength":this.WindowLength,
},
"Reverse":{
"apply":this.ReverseEnbled,
"inverted":this.inverted,
"reversed":this.reversed,
}
}
})
},
}, },
beforeDestroy() { beforeDestroy() {
...@@ -6024,6 +6619,7 @@ export default { ...@@ -6024,6 +6619,7 @@ export default {
// 停止滚动条监控 // 停止滚动条监控
this.stopScrollbarMonitor(); this.stopScrollbarMonitor();
} }
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment