Commit 1287c47b by jiang'yun

修改

parent ac2b9088
......@@ -10,20 +10,26 @@
</div>
<!-- 右侧按钮组(与左侧同一行,靠右对齐) -->
<div class="toolbar-right">
<div class="color-maps">
<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">
<span class="color-map-option">
<span class="color-map-preview" :class="map.value"></span>
{{ map.label }}
</span>
</el-option>
</el-select>
</div>
<!-- <div class="color-maps">-->
<!-- <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">-->
<!-- <span class="color-map-option">-->
<!-- <span class="color-map-preview" :class="map.value"></span>-->
<!-- {{ map.label }}-->
<!-- </span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </div>-->
<toolbar-controls :plots="plots" :data-loaded="isWidgetReady" :show-line-style-panel="showLineStylePanel"
@toggleLineStylePanel="toggleLineStylePanel" @exporting="exporting = $event"
@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-button @click="toggleDrawText" :class="{ 'active': isDrawingText }">
<i class="el-icon-edit-outline"></i>
......@@ -257,6 +263,234 @@
</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>
</template>
......@@ -728,6 +962,167 @@ export default {
left: '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: {
......@@ -5926,7 +6321,207 @@ export default {
this.disableScrollbarTools();
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() {
......@@ -6024,6 +6619,7 @@ export default {
// 停止滚动条监控
this.stopScrollbarMonitor();
}
}
</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