|
@@ -6,7 +6,7 @@
|
|
@close="cancelHandle"
|
|
@close="cancelHandle"
|
|
custom-class="marker-edit-dialog"
|
|
custom-class="marker-edit-dialog"
|
|
center
|
|
center
|
|
- width="650px"
|
|
|
|
|
|
+ width="950px"
|
|
v-dialogDrag
|
|
v-dialogDrag
|
|
top="8vh"
|
|
top="8vh"
|
|
:title="form.title"
|
|
:title="form.title"
|
|
@@ -24,7 +24,7 @@
|
|
v-model="markerForm.axis"
|
|
v-model="markerForm.axis"
|
|
:placeholder="$t('EtaChartAddPage.label_select_seris_placeholder')"
|
|
:placeholder="$t('EtaChartAddPage.label_select_seris_placeholder')"
|
|
style="width:200px;"
|
|
style="width:200px;"
|
|
- @change="markerForm.axisName=axisLabelMap[markerForm.axis]"
|
|
|
|
|
|
+ @change="markerForm.axisName=axisLabelMap[markerForm.axis];markerForm.markLineType=1;"
|
|
>
|
|
>
|
|
<el-option :label="$t('Chart.Detail.l_axis')" :value="1" v-if="canSelectLeftYaxis"/>
|
|
<el-option :label="$t('Chart.Detail.l_axis')" :value="1" v-if="canSelectLeftYaxis"/>
|
|
<el-option :label="$t('Chart.Detail.h_axis')" :value="3" v-if="canSelectXaxis"/>
|
|
<el-option :label="$t('Chart.Detail.h_axis')" :value="3" v-if="canSelectXaxis"/>
|
|
@@ -35,45 +35,55 @@
|
|
<el-form-item :label="form.markerType==='line'?$t('EtaChartAddPage.label_line_scale'):$t('EtaChartAddPage.label_area_scale')" prop="value">
|
|
<el-form-item :label="form.markerType==='line'?$t('EtaChartAddPage.label_line_scale'):$t('EtaChartAddPage.label_area_scale')" prop="value">
|
|
<!-- 标识线 -->
|
|
<!-- 标识线 -->
|
|
<template v-if="form.markerType==='line'">
|
|
<template v-if="form.markerType==='line'">
|
|
- <!-- 时间轴1,2,4,6的y轴数字 x轴日期 -->
|
|
|
|
- <template v-if="[1,2,4,6].includes(chartInfo.ChartType)">
|
|
|
|
- <el-date-picker
|
|
|
|
- v-if="markerForm.axis===3"
|
|
|
|
- v-model="markerForm.value"
|
|
|
|
- :popper-class="{'month-day-picker':chartInfo.ChartType===2}"
|
|
|
|
- type="date"
|
|
|
|
- style="width: 200px;"
|
|
|
|
- :placeholder="$t('EtaChartAddPage.label_date_choose')"
|
|
|
|
- :clearable="false"
|
|
|
|
- :format="chartInfo.ChartType===2?'MM-dd':'yyyy-MM-dd'"
|
|
|
|
- :value-format="chartInfo.ChartType===2?'MM-dd':'yyyy-MM-dd'"
|
|
|
|
- ></el-date-picker>
|
|
|
|
|
|
+ <div class="mark-value-wrap form-item-content">
|
|
|
|
+ <!-- 固定值:原标识线输入框 -->
|
|
|
|
+ <div class="default-value">
|
|
|
|
+ <el-radio v-model="markerForm.markLineType" :label="1" style="margin-right: 20px;">{{$t('PredictEditPage.rule_fix')}}</el-radio>
|
|
|
|
+ <!-- 时间轴1,2,4,6的y轴数字 x轴日期 -->
|
|
|
|
+ <template v-if="[1,2,4,6].includes(chartInfo.ChartType)">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-if="markerForm.axis===3"
|
|
|
|
+ v-model="markerForm.value"
|
|
|
|
+ :popper-class="{'month-day-picker':chartInfo.ChartType===2}"
|
|
|
|
+ type="date"
|
|
|
|
+ style="width: 100px;"
|
|
|
|
+ :placeholder="$t('EtaChartAddPage.label_date_choose')"
|
|
|
|
+ :clearable="false"
|
|
|
|
+ :format="chartInfo.ChartType===2?'MM-dd':'yyyy-MM-dd'"
|
|
|
|
+ :value-format="chartInfo.ChartType===2?'MM-dd':'yyyy-MM-dd'"
|
|
|
|
+ ></el-date-picker>
|
|
|
|
|
|
- <el-input
|
|
|
|
- v-else
|
|
|
|
- v-model="markerForm.value"
|
|
|
|
- class="number-input"
|
|
|
|
- style="width: 200px;"
|
|
|
|
- type="number"
|
|
|
|
- :placeholder="$t('Edb.InputHolderAll.input_number')"
|
|
|
|
- />
|
|
|
|
-
|
|
|
|
- </template>
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-else
|
|
|
|
+ v-model="markerForm.value"
|
|
|
|
+ class="number-input"
|
|
|
|
+ style="width: 100px;"
|
|
|
|
+ type="number"
|
|
|
|
+ :placeholder="$t('Edb.InputHolderAll.input_number')"
|
|
|
|
+ :disabled="markerForm.markLineType===2"
|
|
|
|
+ />
|
|
|
|
+ </template>
|
|
|
|
|
|
- <!-- 柱形图,散点,截面散点只可选数字 -->
|
|
|
|
- <template v-else-if="[5,7,10].includes(chartInfo.ChartType)">
|
|
|
|
- <el-input
|
|
|
|
- v-model="markerForm.value"
|
|
|
|
- style="width: 200px;"
|
|
|
|
- type="number"
|
|
|
|
- class="number-input"
|
|
|
|
- :placeholder="$t('Edb.InputHolderAll.input_number')"
|
|
|
|
- clearable
|
|
|
|
- />
|
|
|
|
- </template>
|
|
|
|
|
|
+ <!-- 柱形图,散点,截面散点只可选数字 -->
|
|
|
|
+ <template v-else-if="[5,7,10].includes(chartInfo.ChartType)">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="markerForm.value"
|
|
|
|
+ style="width: 100px;"
|
|
|
|
+ type="number"
|
|
|
|
+ class="number-input"
|
|
|
|
+ :placeholder="$t('Edb.InputHolderAll.input_number')"
|
|
|
|
+ :disabled="markerForm.markLineType===2"
|
|
|
|
+ clearable
|
|
|
|
+ />
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 指标计算 -->
|
|
|
|
+ <div class="custom-value" v-if="markerForm.axis!==3">
|
|
|
|
+ <el-radio v-model="markerForm.markLineType" :label="2" style="margin-left: 20px;">{{ $t('Edb.CalculatesAll.indicator_calculation') }}</el-radio>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
-
|
|
|
|
<!-- 标识区 -->
|
|
<!-- 标识区 -->
|
|
<template v-else>
|
|
<template v-else>
|
|
<!-- 时间轴1,2,4,6的y轴数字 x轴日期 -->
|
|
<!-- 时间轴1,2,4,6的y轴数字 x轴日期 -->
|
|
@@ -108,6 +118,7 @@
|
|
class="number-input"
|
|
class="number-input"
|
|
style="width: 90px;"
|
|
style="width: 90px;"
|
|
type="number"
|
|
type="number"
|
|
|
|
+ @change="e => {markerForm.fromValue=Number(e);}"
|
|
:placeholder="$t('Edb.InputHolderAll.input_number')"
|
|
:placeholder="$t('Edb.InputHolderAll.input_number')"
|
|
/>
|
|
/>
|
|
<!-- 至 -->{{$t('Common.to')}}
|
|
<!-- 至 -->{{$t('Common.to')}}
|
|
@@ -116,6 +127,7 @@
|
|
class="number-input"
|
|
class="number-input"
|
|
style="width: 90px;"
|
|
style="width: 90px;"
|
|
type="number"
|
|
type="number"
|
|
|
|
+ @change="e => {markerForm.toValue=Number(e);}"
|
|
:placeholder="$t('Edb.InputHolderAll.input_number')"
|
|
:placeholder="$t('Edb.InputHolderAll.input_number')"
|
|
/>
|
|
/>
|
|
|
|
|
|
@@ -129,6 +141,7 @@
|
|
class="number-input"
|
|
class="number-input"
|
|
style="width: 90px;"
|
|
style="width: 90px;"
|
|
type="number"
|
|
type="number"
|
|
|
|
+ @change="e => {markerForm.fromValue=Number(e);}"
|
|
:placeholder="$t('Edb.InputHolderAll.input_number')"
|
|
:placeholder="$t('Edb.InputHolderAll.input_number')"
|
|
/>
|
|
/>
|
|
<!-- 至 -->{{$t('Common.to')}}
|
|
<!-- 至 -->{{$t('Common.to')}}
|
|
@@ -137,81 +150,271 @@
|
|
class="number-input"
|
|
class="number-input"
|
|
style="width: 90px;"
|
|
style="width: 90px;"
|
|
type="number"
|
|
type="number"
|
|
|
|
+ @change="e => {markerForm.toValue=Number(e);}"
|
|
:placeholder="$t('Edb.InputHolderAll.input_number')"
|
|
:placeholder="$t('Edb.InputHolderAll.input_number')"
|
|
/>
|
|
/>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item :label="$t('EtaChartAddPage.label_line_sty')" prop="dashStyle" v-if="form.markerType==='line'">
|
|
|
|
- <el-select
|
|
|
|
- v-model="markerForm.dashStyle"
|
|
|
|
- style="width:200px;"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in dashOptions"
|
|
|
|
- :key="item.value"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value"
|
|
|
|
- >
|
|
|
|
- <svg width="60" height="10" viewBox="0 0 60 10" fill="none" xmlns="http://www.w3.org/2000/svg" v-html="item.svg"></svg>
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item :label="$t('Chart.Detail.color')" prop="color" style="margin-bottom:8px;">
|
|
|
|
- <el-color-picker
|
|
|
|
- v-model="markerForm.color"
|
|
|
|
- :predefine="predefineColors"
|
|
|
|
- show-alpha
|
|
|
|
- style="width: 90px"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item :label="$t('Chart.Detail.size')" prop="lineWidth" v-if="form.markerType==='line'">
|
|
|
|
- <el-input
|
|
|
|
- v-model="markerForm.lineWidth"
|
|
|
|
- style="width: 90px"
|
|
|
|
- type="number"
|
|
|
|
- :min="1"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item :label="form.markerType==='line'?$t('EtaChartAddPage.label_line_intru'):$t('EtaChartAddPage.label_area_intru')" prop="text">
|
|
|
|
- <el-input
|
|
|
|
- v-model="markerForm.text"
|
|
|
|
- style="width: 200px"
|
|
|
|
- :placeholder="$t('Chart.InputHolderAll.input_content')"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item :label="$t('EtaChartAddPage.label_text_pos')" prop="textPosition">
|
|
|
|
- <el-select
|
|
|
|
- v-model="markerForm.textPosition"
|
|
|
|
- style="width:200px;"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in verticalPositions"
|
|
|
|
- :key="item.value"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item :label="$t('EtaChartAddPage.label_text_color')" prop="textColor" style="margin-bottom:8px;">
|
|
|
|
- <el-color-picker
|
|
|
|
- v-model="markerForm.textColor"
|
|
|
|
- show-alpha
|
|
|
|
- :predefine="predefineColors"
|
|
|
|
- style="width: 90px"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item :label="$t('EtaChartAddPage.label_text_size')" prop="textFontSize">
|
|
|
|
- <el-input
|
|
|
|
- v-model="markerForm.textFontSize"
|
|
|
|
- class="number-input"
|
|
|
|
- style="width: 90px"
|
|
|
|
- type="number"
|
|
|
|
- :min="1"
|
|
|
|
- />
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+
|
|
|
|
+ <!-- 标识线-指标计算部分 -->
|
|
|
|
+ <div class="custom-value-setting-wrap" v-if="form.markerType==='line'&&markerForm.markLineType===2">
|
|
|
|
+ <!-- 指标选择 -->
|
|
|
|
+ <el-form-item :label="$t('Edb.eta_name')">
|
|
|
|
+ <div class="edb-box-wrap form-item-content">
|
|
|
|
+ <!-- 固定第一个指标 -->
|
|
|
|
+ <div class="fixed-edb" style="margin-right: 20px;width:45%;">
|
|
|
|
+ <el-radio v-model="markerForm.edbType" :label="0">{{ $t('Chart.Detail.chart_first_edb') }}</el-radio>
|
|
|
|
+ <p>{{tableData&&tableData[0].EdbName||''}}</p>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 指标/预测指标库的指标 -->
|
|
|
|
+ <div class="other-edb">
|
|
|
|
+ <el-radio v-model="markerForm.edbType" :label="1" style="margin-right: 20px;">{{$t('Chart.Detail.chart_other_edb')}}</el-radio>
|
|
|
|
+ <!-- /datamanage/edb_info/filter_by_es/all -->
|
|
|
|
+ <el-select style="width: 200px;"
|
|
|
|
+ filterable remote clearable
|
|
|
|
+ :placeholder="$t('ToolBox.ForexCalendar.edb_input')"
|
|
|
|
+ v-model="searchObj"
|
|
|
|
+ :remote-method="searchHandle"
|
|
|
|
+ value-key="EdbInfoId"
|
|
|
|
+ @click.native="searchHandle('')"
|
|
|
|
+ @change="searchChange">
|
|
|
|
+ <i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in searchOptions"
|
|
|
|
+ :key="item.EdbInfoId"
|
|
|
|
+ :label="item.EdbName"
|
|
|
|
+ :value="item"/>
|
|
|
|
+ </el-select>
|
|
|
|
+ <p>{{ markerForm.edbType&&markerForm.edbName||'' }}</p>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <!-- 时间区间选择 -->
|
|
|
|
+ <el-form-item :label="$t('Chart.Detail.time_interval')">
|
|
|
|
+ <div class="time-area-wrap">
|
|
|
|
+ <el-radio v-model="markerForm.timeInterval" :label="0" :disabled="[7,10].includes(chartInfo.ChartType)">{{ $t('Chart.Detail.follow_chart') }}</el-radio>
|
|
|
|
+ <el-radio v-model="markerForm.timeInterval" :label="1">{{ $t('Chart.Detail.custom') }}</el-radio>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <!-- 如果时间区间选择自定义 -->
|
|
|
|
+ <div class="custom-time-wrap" v-if="markerForm.timeInterval===1">
|
|
|
|
+ <!-- 起始时间 -->
|
|
|
|
+ <el-form-item :label="$t('Table.start_time')">
|
|
|
|
+ <div class="form-item-content">
|
|
|
|
+ <div class="format">
|
|
|
|
+ <el-radio v-model="markerForm.startTime.timeType" :label="1" style="margin-right: 0;"><!-- 固定 -->{{ $t('Chart.Detail.edb_time_fix') }}</el-radio>
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="markerForm.startTime.date"
|
|
|
|
+ popper-class="x-range-picker-date"
|
|
|
|
+ style="width: 140px;"
|
|
|
|
+ placeholder="请输入固定时间"
|
|
|
|
+ :clearable="false"
|
|
|
|
+ format="yyyy-MM-dd"
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
+ ></el-date-picker>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="format">
|
|
|
|
+ <el-radio v-model="markerForm.startTime.timeType" :label="2" style="margin-left:20px;margin-right:0"><!-- 动态 -->{{ $t('Chart.Detail.edb_time_dyn') }}</el-radio>
|
|
|
|
+ <el-tooltip effect="dark" placement="top">
|
|
|
|
+ <div slot="content" v-html="$t('EtaChartAddPage.dynamic_time_tip')"></div>
|
|
|
|
+ <i class="el-icon-question" style="font-size: 16px;"></i>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <!-- 起始时间为动态 -->
|
|
|
|
+ <div class="start-time-custom-wrap" v-if="markerForm.startTime.timeType===2">
|
|
|
|
+ <!-- 基准日期 -->
|
|
|
|
+ <el-form-item :label="$t('Chart.Detail.time_base')">
|
|
|
|
+ <div class="form-item-content">
|
|
|
|
+ <div class="format">
|
|
|
|
+ <el-radio v-model="markerForm.startTime.baseDate" :label="0"><!-- 系统日期 -->{{ $t('Chart.Detail.sys_time') }}</el-radio>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="format" style="display: flex;align-items: center;">
|
|
|
|
+ <p>
|
|
|
|
+ <el-radio v-model="markerForm.startTime.baseDate" :label="1" style="margin-right:5px;"><!-- 指标最新日期 -->{{ $t('Chart.Detail.edb_new_time') }}</el-radio>
|
|
|
|
+ </p>
|
|
|
|
+ <p><!-- 期数前移 -->{{ $t('Chart.Detail.edb_periods') }}{{ $t('Chart.Detail.edb_periods_lead') }}
|
|
|
|
+ <el-input style="width:60px" type="number" class="number-input"
|
|
|
|
+ v-model.number="markerForm.startTime.conf.moveForward"
|
|
|
|
+ @change="e => {markerForm.startTime.conf.moveForward=Number(e);}"
|
|
|
|
+ />
|
|
|
|
+ <!-- 期 -->{{ $t('Chart.Detail.edb_period') }}
|
|
|
|
+ </p>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <!-- 日期变换 -->
|
|
|
|
+ <dateMoveWaySec ref="startTime"></dateMoveWaySec>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <!-- 结束时间 -->
|
|
|
|
+ <el-form-item :label="$t('Edb.Detail.e_end_time')">
|
|
|
|
+ <div class="form-item-content">
|
|
|
|
+ <div class="format">
|
|
|
|
+ <el-radio v-model="markerForm.endTime.timeType" :label="3"><!-- 至今 -->{{ $t('Chart.Detail.edb_time_now') }}</el-radio>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="format">
|
|
|
|
+ <el-radio v-model="markerForm.endTime.timeType" :label="1" style="margin-right: 0;"><!-- 固定 -->{{ $t('Chart.Detail.edb_time_fix') }}</el-radio>
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="markerForm.endTime.date"
|
|
|
|
+ popper-class="x-range-picker-date"
|
|
|
|
+ style="width: 140px;"
|
|
|
|
+ placeholder="请输入固定时间"
|
|
|
|
+ :clearable="false"
|
|
|
|
+ format="yyyy-MM-dd"
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
+ ></el-date-picker>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="format">
|
|
|
|
+ <el-radio v-model="markerForm.endTime.timeType" :label="2" style="margin-right: 0;"><!-- 动态 -->{{ $t('Chart.Detail.edb_time_dyn') }}</el-radio>
|
|
|
|
+ <el-tooltip effect="dark" placement="top">
|
|
|
|
+ <div slot="content" v-html="$t('EtaChartAddPage.dynamic_time_tip')"></div>
|
|
|
|
+ <i class="el-icon-question" style="font-size: 16px;"></i>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <!-- 结束时间为动态 -->
|
|
|
|
+ <div class="end-time-custom-wrap" v-if="markerForm.endTime.timeType===2">
|
|
|
|
+ <!-- 基准日期 -->
|
|
|
|
+ <el-form-item :label="$t('Chart.Detail.time_base')">
|
|
|
|
+ <div class="form-item-content">
|
|
|
|
+ <div class="format">
|
|
|
|
+ <el-radio v-model="markerForm.endTime.baseDate" :label="0"><!-- 系统日期 -->{{ $t('Chart.Detail.sys_time') }}</el-radio>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="format" style="display: flex;align-items: center;">
|
|
|
|
+ <p>
|
|
|
|
+ <el-radio v-model="markerForm.endTime.baseDate" :label="1" style="margin-right:5px;"><!-- 指标最新日期 -->{{ $t('Chart.Detail.edb_new_time') }}</el-radio>
|
|
|
|
+ </p>
|
|
|
|
+ <p><!-- 期数前移 -->{{ $t('Chart.Detail.edb_periods') }}{{ $t('Chart.Detail.edb_periods_lead') }}
|
|
|
|
+ <el-input style="width:60px" type="number" class="number-input"
|
|
|
|
+ v-model.number="markerForm.endTime.conf.moveForward"
|
|
|
|
+ @change="e => {markerForm.endTime.conf.moveForward=Number(e);}"
|
|
|
|
+ />
|
|
|
|
+ <!-- 期 -->{{ $t('Chart.Detail.edb_period') }}
|
|
|
|
+ </p>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <!-- 日期变换 -->
|
|
|
|
+ <dateMoveWaySec ref="endTime"></dateMoveWaySec>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 计算方式 -->
|
|
|
|
+ <el-form-item :label="$t('Chart.Detail.plot_calculation')">
|
|
|
|
+ <div class="form-item-content">
|
|
|
|
+ <!--区间均值-->
|
|
|
|
+ <div class="format">
|
|
|
|
+ <el-radio v-model="markerForm.calculation" :label="1">{{ $t('Chart.Detail.cal_range_val') }}{{ $t('Chart.Detail.cal_range_mean') }}</el-radio>
|
|
|
|
+ </div>
|
|
|
|
+ <!--区间均值加N倍标准差-->
|
|
|
|
+ <div class="format">
|
|
|
|
+ <el-radio v-model="markerForm.calculation" :label="2" style="margin-right:0;">{{ $t('Chart.Detail.cal_range_val') }}{{ $t('Chart.Detail.cal_range_mean') }}</el-radio>
|
|
|
|
+ <p style="display:inline-block">{{ $t('Chart.Detail.cal_range_plus') }}
|
|
|
|
+ <el-input
|
|
|
|
+ style="width:60px"
|
|
|
|
+ v-model.number="markerForm.calculationValue"
|
|
|
|
+ @change="e => {markerForm.calculationValue=Number(e);}"
|
|
|
|
+ type="number" class="number-input"></el-input>{{ $t('Chart.Detail.cal_range_times') }} {{ $t('Chart.Detail.cal_range_std') }}</p>
|
|
|
|
+ </div>
|
|
|
|
+ <!--区间分位-->
|
|
|
|
+ <div class="format">
|
|
|
|
+ <el-radio v-model="markerForm.calculation" :label="3" style="margin-right:0;">{{ $t('Chart.Detail.cal_range_val') }}</el-radio>
|
|
|
|
+ <p style="display:inline-block">
|
|
|
|
+ <el-input style="width:60px" v-model="calculationValue" type="number" class="number-input"></el-input>%
|
|
|
|
+ <el-select v-model="calculationType" style="width:80px">
|
|
|
|
+ <el-option :label="$t('Chart.Detail.cal_range_count')" :value="3"></el-option>
|
|
|
|
+ <el-option :label="$t('Chart.Detail.cal_range_value')" :value="4"></el-option>
|
|
|
|
+ </el-select>{{ $t('Chart.Detail.cal_range_quantile') }}
|
|
|
|
+ </p>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <!-- 标识线样式 可收起 -->
|
|
|
|
+ <div class="mark-box" @click="isMarkStyleShow = !isMarkStyleShow;">
|
|
|
|
+ <span><i :class="isMarkStyleShow?'el-icon-arrow-down':'el-icon-arrow-right'"></i></span><span>{{ $t('Chart.Detail.plot_style') }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="mark-style-wrap" v-show="isMarkStyleShow">
|
|
|
|
+ <el-form-item :label="$t('EtaChartAddPage.label_line_sty')" prop="dashStyle" v-if="form.markerType==='line'">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="markerForm.dashStyle"
|
|
|
|
+ style="width:200px;"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in dashOptions"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ >
|
|
|
|
+ <svg width="60" height="10" viewBox="0 0 60 10" fill="none" xmlns="http://www.w3.org/2000/svg" v-html="item.svg"></svg>
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item :label="$t('Chart.Detail.color')" prop="color" style="margin-bottom:8px;">
|
|
|
|
+ <el-color-picker
|
|
|
|
+ v-model="markerForm.color"
|
|
|
|
+ :predefine="predefineColors"
|
|
|
|
+ show-alpha
|
|
|
|
+ style="width: 90px"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item :label="$t('Chart.Detail.size')" prop="lineWidth" v-if="form.markerType==='line'">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="markerForm.lineWidth"
|
|
|
|
+ style="width: 90px"
|
|
|
|
+ type="number"
|
|
|
|
+ @change="e => {markerForm.lineWidth=Number(e);}"
|
|
|
|
+ :min="1"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item :label="form.markerType==='line'?$t('EtaChartAddPage.label_line_intru'):$t('EtaChartAddPage.label_area_intru')" prop="text">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="markerForm.text"
|
|
|
|
+ style="width: 200px"
|
|
|
|
+ :placeholder="$t('Chart.InputHolderAll.input_content')"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item :label="$t('EtaChartAddPage.label_text_pos')" prop="textPosition">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="markerForm.textPosition"
|
|
|
|
+ style="width:200px;"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in verticalPositions"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item :label="$t('EtaChartAddPage.label_text_color')" prop="textColor" style="margin-bottom:8px;">
|
|
|
|
+ <el-color-picker
|
|
|
|
+ v-model="markerForm.textColor"
|
|
|
|
+ show-alpha
|
|
|
|
+ :predefine="predefineColors"
|
|
|
|
+ style="width: 90px"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item :label="$t('EtaChartAddPage.label_text_size')" prop="textFontSize">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="markerForm.textFontSize"
|
|
|
|
+ class="number-input"
|
|
|
|
+ style="width: 90px"
|
|
|
|
+ type="number"
|
|
|
|
+ @change="e => {markerForm.textFontSize=Number(e);}"
|
|
|
|
+ :min="1"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </div>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -223,8 +426,10 @@
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
|
|
+import dateMoveWaySec from '@/views/datasheet_manage/components/dateMoveWaySection.vue'
|
|
import { defaultOpts } from '@/utils/defaultOptions';
|
|
import { defaultOpts } from '@/utils/defaultOptions';
|
|
import { verticalPositions } from '@/views/system_manage/chartTheme/common/config';
|
|
import { verticalPositions } from '@/views/system_manage/chartTheme/common/config';
|
|
|
|
+import {ForexCalendarInterface} from '@/api/modules/toolBoxApi';
|
|
export default {
|
|
export default {
|
|
props: {
|
|
props: {
|
|
isShow: {
|
|
isShow: {
|
|
@@ -241,18 +446,40 @@ export default {
|
|
|
|
|
|
chartInfo: {
|
|
chartInfo: {
|
|
type:Object
|
|
type:Object
|
|
|
|
+ },
|
|
|
|
+ tableData:{
|
|
|
|
+ type:Array
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ },
|
|
|
|
+ components:{
|
|
|
|
+ dateMoveWaySec
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
isShow(nval) {
|
|
isShow(nval) {
|
|
if(!nval) return
|
|
if(!nval) return
|
|
-
|
|
|
|
|
|
+ this.searchObj = ''
|
|
if(this.form.editIndex) { //表单回显
|
|
if(this.form.editIndex) { //表单回显
|
|
this.editIndex = this.form.editIndex;
|
|
this.editIndex = this.form.editIndex;
|
|
this.markerForm = {
|
|
this.markerForm = {
|
|
...this.form.data
|
|
...this.form.data
|
|
}
|
|
}
|
|
|
|
+ //标识线特殊处理
|
|
|
|
+ if(this.form.markerType==='line'){
|
|
|
|
+ if(!this.markerForm.markLineType){
|
|
|
|
+ Object.assign(this.markerForm,this.markerExtraConfig)
|
|
|
|
+ //柱形图 截面散点图禁用时间区间-跟随图表
|
|
|
|
+ if([7,10].includes(this.chartInfo.ChartType)){
|
|
|
|
+ this.markerForm.timeInterval = 1
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ //重置计算方式的值
|
|
|
|
+ const {calculation} = this.markerForm
|
|
|
|
+ if(calculation===3){
|
|
|
|
+ this.calculationValue = this.markerForm.calculationValue
|
|
|
|
+ this.markerForm.calculationValue = 1
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}else {
|
|
}else {
|
|
this.editIndex = 0;
|
|
this.editIndex = 0;
|
|
|
|
|
|
@@ -262,8 +489,8 @@ export default {
|
|
axis: this.canSelectLeftYaxis?1:0,
|
|
axis: this.canSelectLeftYaxis?1:0,
|
|
axisName:this.axisLabelMap[this.canSelectLeftYaxis?1:0],
|
|
axisName:this.axisLabelMap[this.canSelectLeftYaxis?1:0],
|
|
value: '',
|
|
value: '',
|
|
- from: '',
|
|
|
|
- to:'',
|
|
|
|
|
|
+ fromValue: '',
|
|
|
|
+ toValue:'',
|
|
lineWidth: 2,
|
|
lineWidth: 2,
|
|
dashStyle: 'ShortDashDot',
|
|
dashStyle: 'ShortDashDot',
|
|
color: '#999',
|
|
color: '#999',
|
|
@@ -273,7 +500,27 @@ export default {
|
|
textFontSize: themeOpt.markerOptions.style.fontSize,
|
|
textFontSize: themeOpt.markerOptions.style.fontSize,
|
|
isShow: true,
|
|
isShow: true,
|
|
}
|
|
}
|
|
|
|
+ //标识线特殊处理
|
|
|
|
+ if(this.form.markerType==='line'){
|
|
|
|
+ this.markerForm = {
|
|
|
|
+ ...this.markerForm,
|
|
|
|
+ ...this.markerExtraConfig
|
|
|
|
+ }
|
|
|
|
+ this.calculationValue = 50
|
|
|
|
+ //柱形图 截面散点图禁用时间区间-跟随图表
|
|
|
|
+ if([7,10].includes(this.chartInfo.ChartType)){
|
|
|
|
+ this.markerForm.timeInterval = 1
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ 'markerForm.axis':{
|
|
|
|
+ handler(newval,oldval){
|
|
|
|
+ //从横轴切换到其他轴/其他轴切换到横轴 清空value值
|
|
|
|
+ if(oldval===3||newval===3){
|
|
|
|
+ this.markerForm.value = ''
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -326,8 +573,53 @@ export default {
|
|
text: '',
|
|
text: '',
|
|
textPosition: 'top',
|
|
textPosition: 'top',
|
|
textColor: '#999',
|
|
textColor: '#999',
|
|
- textFontSize: 12
|
|
|
|
|
|
+ textFontSize: 12,
|
|
|
|
+ //markerType:'line'
|
|
|
|
+ },
|
|
|
|
+ //eta1.9.4新增标识线设置
|
|
|
|
+ markerExtraConfig:{
|
|
|
|
+ markLineType:1,//标识线所在刻度 1固定值 2指标计算
|
|
|
|
+ edbType:0,//指标 0图上第一个指标 1其他指标 -
|
|
|
|
+ edbInfoId:0,//选择的指标id 图上第一个指标取tableData[0] 其他指标取 searchObj
|
|
|
|
+ edbName:'',//回显指标用
|
|
|
|
+ timeInterval:0,//时间区间 0跟随图表 1自定义
|
|
|
|
+ startTime:{//当timeInterval为1时,有值
|
|
|
|
+ timeType:1,//起始时间类型 1 固定 2动态
|
|
|
|
+ date:'2020-01-01',//固定的时间值,timeType为2时为空
|
|
|
|
+ baseDate:0,//基准日期 0系统日期 1指标最新日期
|
|
|
|
+ conf:{
|
|
|
|
+ moveForward:0,//baseTimeType为2时,表示前移的期数
|
|
|
|
+ dateChange:[
|
|
|
|
+ {//和 datasheet_manage/components/dateMoveWaySection 保持一致
|
|
|
|
+ ChangeType:1,//1日期位移 2指定频率
|
|
|
|
+ Day: 0,
|
|
|
|
+ Month: 0,
|
|
|
|
+ Year: 0,
|
|
|
|
+ Frequency: '本周',
|
|
|
|
+ FrequencyDay: '周一'
|
|
|
|
+ }
|
|
|
|
+ ]//日期变换的值,最多两项,最少0项,
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ endTime:{
|
|
|
|
+ timeType:3,//起始时间类型 3至今 1 固定 2动态
|
|
|
|
+ date:'2024-01-01',//固定的时间值,timeType不为1时为空
|
|
|
|
+ baseDate:0,//基准日期 0系统日期 1指标最新日期
|
|
|
|
+ conf:{
|
|
|
|
+ moveForward:0,
|
|
|
|
+ dateChange:[]
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ calculation:1,//计算方式 1区间均值 2区间均值+标准差 3区间百分位个数分位 4区间百分位数值分位
|
|
|
|
+ calculationValue:1,//计算方式对应值,calculation为2时表示标准差的倍数,为3时表示个数分位的百分数
|
|
},
|
|
},
|
|
|
|
+ calculationType:3,
|
|
|
|
+ calculationValue:50,
|
|
|
|
+ /* calculationSelect:[
|
|
|
|
+ {lable:'个数',value:3},
|
|
|
|
+ {label:'数值',value:4}
|
|
|
|
+ ], */
|
|
|
|
|
|
axisLabelMap: { //暂时没有横轴的代表key 规定为3好了
|
|
axisLabelMap: { //暂时没有横轴的代表key 规定为3好了
|
|
1: '左轴',
|
|
1: '左轴',
|
|
@@ -335,6 +627,10 @@ export default {
|
|
2: '右二轴',
|
|
2: '右二轴',
|
|
3: '横轴',
|
|
3: '横轴',
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ isMarkStyleShow:false,
|
|
|
|
+ searchObj:'',
|
|
|
|
+ searchOptions:[]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted(){
|
|
mounted(){
|
|
@@ -344,15 +640,52 @@ export default {
|
|
|
|
|
|
async saveMarker() {
|
|
async saveMarker() {
|
|
|
|
|
|
- if(this.form.markerType==='line'&&!this.markerForm.value) return this.$message.warning(/* '标识线所在刻度不能为空' */this.$t('Chart.Vailds.plotline_msg'))
|
|
|
|
|
|
+ if(this.form.markerType==='line'&&this.markerForm.markLineType===1&&!this.markerForm.value) return this.$message.warning(/* '标识线所在刻度不能为空' */this.$t('Chart.Vailds.plotline_msg'))
|
|
|
|
|
|
else if(this.form.markerType==='area'&&(!this.markerForm.fromValue||!this.markerForm.toValue)) return this.$message.warning(/* '标识区所在范围不能为空' */this.$t('Chart.Vailds.plotarea_msg'))
|
|
else if(this.form.markerType==='area'&&(!this.markerForm.fromValue||!this.markerForm.toValue)) return this.$message.warning(/* '标识区所在范围不能为空' */this.$t('Chart.Vailds.plotarea_msg'))
|
|
|
|
|
|
else if(this.form.markerType==='area'&&this.markerForm.fromValue===this.markerForm.toValue) return this.$message.warning(/* '标识区所在范围不能相同' */this.$t('Chart.Vailds.plotarea_same_msg'))
|
|
else if(this.form.markerType==='area'&&this.markerForm.fromValue===this.markerForm.toValue) return this.$message.warning(/* '标识区所在范围不能相同' */this.$t('Chart.Vailds.plotarea_same_msg'))
|
|
|
|
|
|
|
|
+ //其他判断
|
|
|
|
+ if(this.form.markerType==='line'){
|
|
|
|
+ if(this.markerForm.markLineType===2&&this.markerForm.edbType===1&&!this.searchObj){
|
|
|
|
+ return this.$message.warning(/* '请选择指标' */this.$t('Edb.InputHolderAll.input_select_edb'))
|
|
|
|
+ }
|
|
|
|
+ //起始日期为动态 获取日期变换
|
|
|
|
+ if(this.markerForm.startTime.timeType===2){
|
|
|
|
+ this.markerForm.startTime.conf.dateChange = this.$refs.startTime.dateChangeArr||[]
|
|
|
|
+ //key的第一个字母改为小写
|
|
|
|
+ this.markerForm.startTime.conf.dateChange = this.markerForm.startTime.conf.dateChange.map(i=>{
|
|
|
|
+ return Object.fromEntries(
|
|
|
|
+ Object.keys(i).map(key => [key.charAt(0).toLowerCase() + key.slice(1), i[key]])
|
|
|
|
+ );
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ //结束日期为动态 获取日期变换
|
|
|
|
+ if(this.markerForm.endTime.timeType===2){
|
|
|
|
+ this.markerForm.endTime.conf.dateChange = this.$refs.endTime.dateChangeArr||[]
|
|
|
|
+ this.markerForm.startTime.conf.dateChange = this.markerForm.startTime.conf.dateChange.map(i=>{
|
|
|
|
+ return Object.fromEntries(
|
|
|
|
+ Object.keys(i).map(key => [key.charAt(0).toLowerCase() + key.slice(1), i[key]])
|
|
|
|
+ );
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ if(this.markerForm.edbType===1){
|
|
|
|
+ this.markerForm.edbInfoId = this.searchObj.EdbInfoId||0
|
|
|
|
+ this.markerForm.edbName = this.searchObj.EdbName||''
|
|
|
|
+ }else{
|
|
|
|
+ this.markerForm.edbInfoId = this.tableData&&this.tableData[0].EdbInfoId||0
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
let item = _.cloneDeep(this.markerForm)
|
|
let item = _.cloneDeep(this.markerForm)
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ //格式化某些值
|
|
|
|
+ //form.calculation+calculationType 共同判断计算方式
|
|
|
|
+ if(this.markerForm.calculation===3){
|
|
|
|
+ item.calculation = this.calculationType
|
|
|
|
+ item.calculationValue = Number(this.calculationValue)
|
|
|
|
+ }
|
|
this.editIndex
|
|
this.editIndex
|
|
? this.$emit('edit',{
|
|
? this.$emit('edit',{
|
|
index: this.editIndex,
|
|
index: this.editIndex,
|
|
@@ -365,13 +698,33 @@ export default {
|
|
|
|
|
|
cancelHandle() {
|
|
cancelHandle() {
|
|
this.$emit('update:isShow',false)
|
|
this.$emit('update:isShow',false)
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ searchHandle(keyword){
|
|
|
|
+ ForexCalendarInterface.searchEdbInfo({
|
|
|
|
+ KeyWord:keyword,
|
|
|
|
+ CurrentIndex:1,
|
|
|
|
+ PageSize:100,
|
|
|
|
+ }).then(res=>{
|
|
|
|
+ if(res.Ret!==200) return
|
|
|
|
+ this.searchOptions = res.Data.List||[]
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ searchChange(){
|
|
|
|
+ if(typeof this.searchObj === 'object'){
|
|
|
|
+ //获取需要的数据
|
|
|
|
+ this.markerForm.edbInfoId = this.searchObj.EdbInfoId
|
|
|
|
+ this.markerForm.edbName = this.searchObj.EdbName
|
|
|
|
+ }else{
|
|
|
|
+ this.markerForm.edbInfoId = 0
|
|
|
|
+ this.markerForm.edbName = ''
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style scoped lang='scss'>
|
|
<style scoped lang='scss'>
|
|
.main {
|
|
.main {
|
|
- padding-left: 20%;
|
|
|
|
|
|
+ padding-left: 5%;
|
|
}
|
|
}
|
|
.bottom {
|
|
.bottom {
|
|
margin: 30px 0;
|
|
margin: 30px 0;
|
|
@@ -383,6 +736,28 @@ export default {
|
|
.marker-edit-dialog {
|
|
.marker-edit-dialog {
|
|
.el-color-picker__trigger { width: 100%;padding: 0;border-radius: 4px; }
|
|
.el-color-picker__trigger { width: 100%;padding: 0;border-radius: 4px; }
|
|
.number-input .el-input__inner { padding: 0 2px 0 10px; }
|
|
.number-input .el-input__inner { padding: 0 2px 0 10px; }
|
|
|
|
+ .form-item-content{
|
|
|
|
+ display: flex;
|
|
|
|
+ .format{
|
|
|
|
+ margin-right: 30px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .date-change-ways{
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ .header{
|
|
|
|
+ label{
|
|
|
|
+ text-align: left !important;
|
|
|
|
+ width:120px !important;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .mark-box{
|
|
|
|
+ background-color: #EBEFF6;
|
|
|
|
+ border:1px solid #C8CDD9;
|
|
|
|
+ padding:12px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
.month-day-picker {
|
|
.month-day-picker {
|