|
@@ -72,17 +72,17 @@
|
|
|
<!-- 季节性图升级-同期上下限/均线/标准差-->
|
|
|
<template v-if="chartInfo.ChartType===2">
|
|
|
<div class="section-item">
|
|
|
- <div class="average-item" v-if="averageList[1].isAdd">
|
|
|
- <span>{{item.axisName}}: {{item.value}}</span>
|
|
|
+ <div class="average-item" v-if="averageArea.IsAdd">
|
|
|
+ <span>{{averageArea.Year||0}}年区间上下限</span>
|
|
|
<div style="flex-shrink:0">
|
|
|
- <i class="el-icon-view icon" :style="item.isShow?'color:#0052D9':'color:#999'" @click="item.isShow=!item.isShow;updateChartHandle()"/>
|
|
|
- <i class="el-icon-edit icon" style="margin:0 6px" @click="openAverageDialog(averageList[1],1)"/>
|
|
|
+ <i class="el-icon-view icon" :style="averageArea.IsShow?'color:#0052D9':'color:#999'" @click="averageArea.IsShow=!averageArea.IsShow;previewSeason('updateSeason')"/>
|
|
|
+ <i class="el-icon-edit icon" style="margin:0 6px" @click="openAverageDialog(averageArea,1,'edit')"/>
|
|
|
<i class="el-icon-delete icon" @click="deleteAverage(1)"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div
|
|
|
+ <div v-else
|
|
|
class="add-cont"
|
|
|
- @click="openAverageDialog(averageList[1],1)"
|
|
|
+ @click="openAverageDialog(averageArea,1)"
|
|
|
>
|
|
|
<img
|
|
|
src="~@/assets/img/set_m/add_ico.png"
|
|
@@ -93,9 +93,17 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="section-item">
|
|
|
- <div
|
|
|
+ <div class="average-item" v-if="averageLine.IsAdd">
|
|
|
+ <span>{{averageLine.Year||0}}年区间均值</span>
|
|
|
+ <div style="flex-shrink:0">
|
|
|
+ <i class="el-icon-view icon" :style="averageLine.IsShow?'color:#0052D9':'color:#999'" @click="averageLine.IsShow=!averageLine.IsShow;previewSeason('updateSeason')"/>
|
|
|
+ <i class="el-icon-edit icon" style="margin:0 6px" @click="openAverageDialog(averageLine,1,'edit')"/>
|
|
|
+ <i class="el-icon-delete icon" @click="deleteAverage(1)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else
|
|
|
class="add-cont"
|
|
|
- @click="openAverageDialog(averageList[2],2)"
|
|
|
+ @click="openAverageDialog(averageLine,2)"
|
|
|
>
|
|
|
<img
|
|
|
src="~@/assets/img/set_m/add_ico.png"
|
|
@@ -106,9 +114,17 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="section-item">
|
|
|
- <div
|
|
|
+ <div class="average-item" v-if="averageStd.IsAdd">
|
|
|
+ <span>{{averageStd.Year||0}}年区间标准差</span>
|
|
|
+ <div style="flex-shrink:0">
|
|
|
+ <i class="el-icon-view icon" :style="averageStd.IsShow?'color:#0052D9':'color:#999'" @click="averageStd.IsShow=!averageStd.IsShow;previewSeason('updateSeason')"/>
|
|
|
+ <i class="el-icon-edit icon" style="margin:0 6px" @click="openAverageDialog(averageStd,1,'edit')"/>
|
|
|
+ <i class="el-icon-delete icon" @click="deleteAverage(1)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else
|
|
|
class="add-cont"
|
|
|
- @click="openAverageDialog(averageList[3],3)"
|
|
|
+ @click="openAverageDialog(averageStd,3)"
|
|
|
>
|
|
|
<img
|
|
|
src="~@/assets/img/set_m/add_ico.png"
|
|
@@ -207,17 +223,33 @@
|
|
|
<addAverageDialog
|
|
|
:isShow="isAddAverageDialogShow"
|
|
|
:averageType="averageType"
|
|
|
+ :formData="averageForm"
|
|
|
+ @close="isAddAverageDialogShow=false"
|
|
|
+ @modify="addAverage"
|
|
|
/>
|
|
|
<!-- 右轴指标弹窗 -->
|
|
|
-
|
|
|
+ <addRightEdbDialog
|
|
|
+ :isShow="isAddRightEdbDialogShow"
|
|
|
+ @close="isAddRightEdbDialogShow=false"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import addMarkerDialog from './addMarkerDialog.vue'
|
|
|
import mDialog from '@/components/mDialog.vue'
|
|
|
import addAverageDialog from './addAverageDialog.vue'
|
|
|
+import addRightEdbDialog from './addRightEdbDialog.vue'
|
|
|
+
|
|
|
+const baseAverageForm = {
|
|
|
+ Legend:'',//图例名称
|
|
|
+ Year:2,//上下限取数范围/均线取数范围/取数范围
|
|
|
+ Color:'#075EEE',//颜色及透明度
|
|
|
+ LineType:'',//线型
|
|
|
+ LineWidth:1,//线宽
|
|
|
+ Multiple:1,//倍数
|
|
|
+}
|
|
|
export default {
|
|
|
- components: { addMarkerDialog,mDialog, addAverageDialog },
|
|
|
+ components: { addMarkerDialog,mDialog, addAverageDialog, addRightEdbDialog },
|
|
|
props: {
|
|
|
chartInfo: {
|
|
|
type: Object
|
|
@@ -251,11 +283,15 @@ export default {
|
|
|
isAddAverageDialogShow:false,
|
|
|
averageType:1,//1同期上下限 2同期均线 3同期标准差
|
|
|
averageForm:{},//初始化和回显用
|
|
|
- averageList:[
|
|
|
- '',
|
|
|
- {isAdd:false},//同期上下限
|
|
|
- {isAdd:false},//同期均线
|
|
|
- {isAdd:false}],//同期标准差
|
|
|
+ averageMap:{
|
|
|
+ 0:'',
|
|
|
+ 1:{name:'averageArea'},//同期上下限
|
|
|
+ 2:{name:'averageLine'},//同期均线
|
|
|
+ 3:{name:'averageStd'},//同期标准差
|
|
|
+ },
|
|
|
+ averageArea:{IsAdd:false,IsShow:false},
|
|
|
+ averageLine:{IsAdd:false,IsShow:false},
|
|
|
+ averageStd:{IsAdd:false,IsShow:false},
|
|
|
|
|
|
/* 右轴指标弹窗 */
|
|
|
isAddRightEdbDialogShow:false,
|
|
@@ -347,20 +383,41 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
//打开同期弹窗
|
|
|
- openAverageDialog(data,type){
|
|
|
- if(data.isAdd) return
|
|
|
- this.averageForm = data
|
|
|
+ openAverageDialog(data,type,openType='add'){
|
|
|
+ if(openType==='add'){
|
|
|
+ this.averageForm = {
|
|
|
+ ...baseAverageForm,
|
|
|
+ IsAdd:false,
|
|
|
+ IsShow:false
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.averageForm = data
|
|
|
+ }
|
|
|
this.averageType = type
|
|
|
this.isAddAverageDialogShow = true
|
|
|
-
|
|
|
},
|
|
|
- addAverage(data,type){
|
|
|
- this.averageList[type] = data
|
|
|
- this.averageList[type].isAdd = true
|
|
|
+ addAverage({data,type}){
|
|
|
+ Object.assign(this[this.averageMap[type].name],data)
|
|
|
+ this[this.averageMap[type].name].IsAdd = true
|
|
|
+ this[this.averageMap[type].name].IsShow = true
|
|
|
+ this.isAddAverageDialogShow=false
|
|
|
+ this.previewSeason('previewSeason')
|
|
|
},
|
|
|
deleteAverage(type){
|
|
|
- this.averageList[type] = {}
|
|
|
- this.averageList[type].isAdd = false
|
|
|
+ this[this.averageMap[type].name].IsAdd = false
|
|
|
+ this.previewSeason('previewSeason')
|
|
|
+ },
|
|
|
+ //更新季节性图 同期/右轴
|
|
|
+ //预览图表
|
|
|
+ previewSeason(eventName='previewSeason'){
|
|
|
+ this.$emit(eventName,{
|
|
|
+ SeasonAverageConfig:{
|
|
|
+ MaxMinLimits:this.averageArea,
|
|
|
+ SamePeriodAverage:this.averageLine,
|
|
|
+ SamePeriodStandardDeviation:this.averageStd
|
|
|
+ },
|
|
|
+ SeasonRightEdbConfig:{}
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
}
|
|
@@ -380,6 +437,15 @@ export default {
|
|
|
padding: 12px 15px;
|
|
|
}
|
|
|
}
|
|
|
+ .average-item{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 12px 15px;
|
|
|
+ border: 1px solid #DCDFE6;
|
|
|
+ background: #F0F2F5;
|
|
|
+ margin-bottom: 15px;
|
|
|
+ }
|
|
|
.icon {font-size: 18px;cursor: pointer;}
|
|
|
.el-icon-delete{
|
|
|
color: #f00;
|