|
@@ -27,10 +27,10 @@
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 数据来源 -->
|
|
<!-- 数据来源 -->
|
|
- <el-form-item label="数据来源" prop="chartSource">
|
|
|
|
|
|
+ <el-form-item :label="$t('Edb.Detail.source')" prop="chartSource">
|
|
<el-input
|
|
<el-input
|
|
v-model="formData.chartSource"
|
|
v-model="formData.chartSource"
|
|
- placeholder="请输入数据来源"
|
|
|
|
|
|
+ :placeholder="$t('OnlineExcelPage.chart_source_placehoder')"
|
|
style="width: 150px"
|
|
style="width: 150px"
|
|
></el-input>
|
|
></el-input>
|
|
<el-switch
|
|
<el-switch
|
|
@@ -42,7 +42,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="item-tr">
|
|
<div class="item-tr">
|
|
<!-- 图表类型 -->
|
|
<!-- 图表类型 -->
|
|
- <el-form-item label="图表类型" prop="chartType">
|
|
|
|
|
|
+ <el-form-item :label="$t('SystemManage.ChartSet.label01')" prop="chartType">
|
|
<el-select v-model="formData.chartType" style="width: 200px">
|
|
<el-select v-model="formData.chartType" style="width: 200px">
|
|
<el-option
|
|
<el-option
|
|
:label="item.label"
|
|
:label="item.label"
|
|
@@ -58,7 +58,9 @@
|
|
style="display: inline-block; margin-right: 20px"
|
|
style="display: inline-block; margin-right: 20px"
|
|
v-if="hasLeftAxis"
|
|
v-if="hasLeftAxis"
|
|
>
|
|
>
|
|
- <span>左轴上下限</span>
|
|
|
|
|
|
+ <span>
|
|
|
|
+ <!-- 左轴上下限 -->
|
|
|
|
+ {{$t('OnlineExcelPage.left_limit')}}</span>
|
|
<el-input
|
|
<el-input
|
|
class="number-input"
|
|
class="number-input"
|
|
size="mini"
|
|
size="mini"
|
|
@@ -66,7 +68,7 @@
|
|
style="width: 60px"
|
|
style="width: 60px"
|
|
v-model="formData.leftMin"
|
|
v-model="formData.leftMin"
|
|
></el-input>
|
|
></el-input>
|
|
- <span>至</span>
|
|
|
|
|
|
+ <span>{{$t('Common.to')}}</span>
|
|
<el-input
|
|
<el-input
|
|
class="number-input"
|
|
class="number-input"
|
|
size="mini"
|
|
size="mini"
|
|
@@ -79,7 +81,10 @@
|
|
style="display: inline-block; margin-right: 20px"
|
|
style="display: inline-block; margin-right: 20px"
|
|
v-if="hasRightAxis"
|
|
v-if="hasRightAxis"
|
|
>
|
|
>
|
|
- <span>右轴上下限</span>
|
|
|
|
|
|
+ <span>
|
|
|
|
+ <!-- 右轴上下限 -->
|
|
|
|
+ {{$t('OnlineExcelPage.right_limit')}}
|
|
|
|
+ </span>
|
|
<el-input
|
|
<el-input
|
|
class="number-input"
|
|
class="number-input"
|
|
size="mini"
|
|
size="mini"
|
|
@@ -87,7 +92,7 @@
|
|
style="width: 60px"
|
|
style="width: 60px"
|
|
v-model="formData.rightMin"
|
|
v-model="formData.rightMin"
|
|
></el-input>
|
|
></el-input>
|
|
- <span>至</span>
|
|
|
|
|
|
+ <span>{{$t('Common.to')}}</span>
|
|
<el-input
|
|
<el-input
|
|
class="number-input"
|
|
class="number-input"
|
|
size="mini"
|
|
size="mini"
|
|
@@ -100,7 +105,10 @@
|
|
style="display: inline-block; margin-right: 20px"
|
|
style="display: inline-block; margin-right: 20px"
|
|
v-if="hasRightTwoAxis"
|
|
v-if="hasRightTwoAxis"
|
|
>
|
|
>
|
|
- <span>右二轴上下限</span>
|
|
|
|
|
|
+ <span>
|
|
|
|
+ <!-- 右二轴上下限 -->
|
|
|
|
+ {{$t('OnlineExcelPage.right_two_limit')}}
|
|
|
|
+ </span>
|
|
<el-input
|
|
<el-input
|
|
class="number-input"
|
|
class="number-input"
|
|
size="mini"
|
|
size="mini"
|
|
@@ -108,7 +116,7 @@
|
|
style="width: 60px"
|
|
style="width: 60px"
|
|
v-model="formData.rightTwoMin"
|
|
v-model="formData.rightTwoMin"
|
|
></el-input>
|
|
></el-input>
|
|
- <span>至</span>
|
|
|
|
|
|
+ <span>{{$t('Common.to')}}</span>
|
|
<el-input
|
|
<el-input
|
|
class="number-input"
|
|
class="number-input"
|
|
size="mini"
|
|
size="mini"
|
|
@@ -120,7 +128,10 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item v-if="formData.chartType == 2">
|
|
<el-form-item v-if="formData.chartType == 2">
|
|
<span style="display: inline-block; margin-right: 20px">
|
|
<span style="display: inline-block; margin-right: 20px">
|
|
- <span>坐标轴范围</span>
|
|
|
|
|
|
+ <span>
|
|
|
|
+ <!-- 纵轴上下限 -->
|
|
|
|
+ {{$t('OnlineExcelPage.y_limit')}}
|
|
|
|
+ </span>
|
|
<el-input
|
|
<el-input
|
|
class="number-input"
|
|
class="number-input"
|
|
size="mini"
|
|
size="mini"
|
|
@@ -128,7 +139,7 @@
|
|
style="width: 60px"
|
|
style="width: 60px"
|
|
v-model="formData.leftMin"
|
|
v-model="formData.leftMin"
|
|
></el-input>
|
|
></el-input>
|
|
- <span>至</span>
|
|
|
|
|
|
+ <span>{{$t('Common.to')}}</span>
|
|
<el-input
|
|
<el-input
|
|
class="number-input"
|
|
class="number-input"
|
|
size="mini"
|
|
size="mini"
|
|
@@ -141,9 +152,11 @@
|
|
<el-form-item v-if="formData.chartType == 4">
|
|
<el-form-item v-if="formData.chartType == 4">
|
|
<span
|
|
<span
|
|
style="display: inline-block; margin-right: 20px"
|
|
style="display: inline-block; margin-right: 20px"
|
|
- v-if="hasLeftAxis"
|
|
|
|
|
|
+ v-if="edbList[0].axis===1"
|
|
>
|
|
>
|
|
- <span>纵轴上下限</span>
|
|
|
|
|
|
+ <span>
|
|
|
|
+ <!-- 纵轴上下限 -->
|
|
|
|
+ {{$t('OnlineExcelPage.y_limit')}}</span>
|
|
<el-input
|
|
<el-input
|
|
class="number-input"
|
|
class="number-input"
|
|
size="mini"
|
|
size="mini"
|
|
@@ -151,7 +164,7 @@
|
|
style="width: 60px"
|
|
style="width: 60px"
|
|
v-model="formData.leftMin"
|
|
v-model="formData.leftMin"
|
|
></el-input>
|
|
></el-input>
|
|
- <span>至</span>
|
|
|
|
|
|
+ <span>{{$t('Common.to')}}</span>
|
|
<el-input
|
|
<el-input
|
|
class="number-input"
|
|
class="number-input"
|
|
size="mini"
|
|
size="mini"
|
|
@@ -162,9 +175,12 @@
|
|
</span>
|
|
</span>
|
|
<span
|
|
<span
|
|
style="display: inline-block; margin-right: 20px"
|
|
style="display: inline-block; margin-right: 20px"
|
|
- v-if="hasRightAxis"
|
|
|
|
|
|
+ v-if="edbList[0].axis===0"
|
|
>
|
|
>
|
|
- <span>纵轴上下限</span>
|
|
|
|
|
|
+ <span>
|
|
|
|
+ <!-- 纵轴上下限 -->
|
|
|
|
+ {{$t('OnlineExcelPage.y_limit')}}
|
|
|
|
+ </span>
|
|
<el-input
|
|
<el-input
|
|
class="number-input"
|
|
class="number-input"
|
|
size="mini"
|
|
size="mini"
|
|
@@ -172,7 +188,7 @@
|
|
style="width: 60px"
|
|
style="width: 60px"
|
|
v-model="formData.rightMin"
|
|
v-model="formData.rightMin"
|
|
></el-input>
|
|
></el-input>
|
|
- <span>至</span>
|
|
|
|
|
|
+ <span>{{$t('Common.to')}}</span>
|
|
<el-input
|
|
<el-input
|
|
class="number-input"
|
|
class="number-input"
|
|
size="mini"
|
|
size="mini"
|
|
@@ -192,25 +208,29 @@
|
|
style="width: 16px; position: relative; top: 3px; cursor: pointer"
|
|
style="width: 16px; position: relative; top: 3px; cursor: pointer"
|
|
alt=""
|
|
alt=""
|
|
/>
|
|
/>
|
|
- <span class="edb-tag-box">指标{{ item.tag }}</span>
|
|
|
|
- <el-form-item label="时间序列">
|
|
|
|
|
|
+ <span class="edb-tag-box">{{$t('Edb.eta_name')}}{{ item.tag }}</span>
|
|
|
|
+ <el-form-item :label="$t('OnlineExcelPage.time_serial')">
|
|
<el-input
|
|
<el-input
|
|
|
|
+ :class="{'select_input': selectInput===item.tag+'_timeSerial'}"
|
|
v-model="item.timeSerial"
|
|
v-model="item.timeSerial"
|
|
- placeholder="请选择日期序列"
|
|
|
|
|
|
+ :placeholder="$t('CustomAnalysisPage.select_date_sequence')"
|
|
style="width: 180px"
|
|
style="width: 180px"
|
|
|
|
+ @focus="handleChooseInput(item.tag+'_timeSerial')"
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="数值序列">
|
|
|
|
|
|
+ <el-form-item :label="$t('OnlineExcelPage.value_serial')">
|
|
<el-input
|
|
<el-input
|
|
|
|
+ :class="{'select_input': selectInput===item.tag+'_valueSerial'}"
|
|
v-model="item.valueSerial"
|
|
v-model="item.valueSerial"
|
|
- placeholder="请选择数值序列"
|
|
|
|
|
|
+ :placeholder="$t('CustomAnalysisPage.select_date_numerical')"
|
|
style="width: 180px"
|
|
style="width: 180px"
|
|
|
|
+ @focus="handleChooseInput(item.tag+'_valueSerial')"
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="指标名称">
|
|
|
|
|
|
+ <el-form-item :label="$t('Table.edb_name')">
|
|
<el-input
|
|
<el-input
|
|
v-model="item.name"
|
|
v-model="item.name"
|
|
- placeholder="请输入指标名称"
|
|
|
|
|
|
+ :placeholder="$t('Edb.InputHolderAll.input_name')"
|
|
style="width: 180px"
|
|
style="width: 180px"
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -226,7 +246,7 @@
|
|
>
|
|
>
|
|
<!-- 堆积柱状图只有第一个指标有设置左右轴和逆序功能 -->
|
|
<!-- 堆积柱状图只有第一个指标有设置左右轴和逆序功能 -->
|
|
<template v-if="!(formData.chartType ===4&&index>0)">
|
|
<template v-if="!(formData.chartType ===4&&index>0)">
|
|
- <el-radio-group v-model="item.axis" size="mini">
|
|
|
|
|
|
+ <el-radio-group v-model="item.axis" size="mini" @change="handleAxisChange">
|
|
<el-radio-button :label="1">{{
|
|
<el-radio-button :label="1">{{
|
|
$t("Chart.Detail.l_axis")
|
|
$t("Chart.Detail.l_axis")
|
|
}}</el-radio-button>
|
|
}}</el-radio-button>
|
|
@@ -329,10 +349,10 @@
|
|
></el-checkbox>
|
|
></el-checkbox>
|
|
<!-- 春节对齐 -->
|
|
<!-- 春节对齐 -->
|
|
<el-radio-group v-model="SeasonExtraConfig.type" size="mini">
|
|
<el-radio-group v-model="SeasonExtraConfig.type" size="mini">
|
|
- <!-- 标准指标 -->
|
|
|
|
- <el-radio-button :label="1">公历</el-radio-button>
|
|
|
|
- <!-- 领先指标 -->
|
|
|
|
- <el-radio-button :label="0">春节对齐</el-radio-button>
|
|
|
|
|
|
+ <!-- 公历 -->
|
|
|
|
+ <el-radio-button label="公历">{{$t('Chart.calendar_gre')}}</el-radio-button>
|
|
|
|
+ <!-- 农历 -->
|
|
|
|
+ <el-radio-button label="农历">{{$t('Chart.calendar_lunar')}}</el-radio-button>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</div>
|
|
</div>
|
|
<!-- 季节图设置图例名称按钮 -->
|
|
<!-- 季节图设置图例名称按钮 -->
|
|
@@ -353,7 +373,8 @@
|
|
@click="handleAddEdb"
|
|
@click="handleAddEdb"
|
|
v-if="formData.chartType !== 2"
|
|
v-if="formData.chartType !== 2"
|
|
>
|
|
>
|
|
- 添加指标
|
|
|
|
|
|
+ <!-- 添加指标 -->
|
|
|
|
+ {{$t('SteelChemicalPage.add_edb')}}
|
|
</div>
|
|
</div>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
@@ -381,6 +402,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import * as sheetInterface from "@/api/modules/sheetApi.js";
|
|
import LegendEditDia from '@/views/dataEntry_manage/components/LegendEditDia.vue';
|
|
import LegendEditDia from '@/views/dataEntry_manage/components/LegendEditDia.vue';
|
|
import { generateSeriesArray } from '@/views/dataEntry_manage/databaseComponents/util'
|
|
import { generateSeriesArray } from '@/views/dataEntry_manage/databaseComponents/util'
|
|
const tag_arr = generateSeriesArray();
|
|
const tag_arr = generateSeriesArray();
|
|
@@ -391,6 +413,17 @@ export default {
|
|
isShow: {
|
|
isShow: {
|
|
type: Boolean,
|
|
type: Boolean,
|
|
},
|
|
},
|
|
|
|
+ ExcelInfoId:0
|
|
|
|
+ },
|
|
|
|
+ watch: {
|
|
|
|
+ 'formData.chartType':{
|
|
|
|
+ handler(newVal,oldVal){
|
|
|
|
+ if(newVal===2&&this.edbList.length>1){
|
|
|
|
+ this.formData.chartType = oldVal;
|
|
|
|
+ return this.$message.warning(/* '您选择的图表样式为季节性图表,只支持单指标画图' */this.$t('Chart.OptMsg.season_one_msg'));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
hasLeftAxis() {
|
|
hasLeftAxis() {
|
|
@@ -413,7 +446,7 @@ export default {
|
|
],
|
|
],
|
|
formData: {
|
|
formData: {
|
|
chartName: '',
|
|
chartName: '',
|
|
- chartSource: '',
|
|
|
|
|
|
+ chartSource: '平衡表',
|
|
showChartSource: false,
|
|
showChartSource: false,
|
|
chartType: 1,
|
|
chartType: 1,
|
|
leftMin: 0,
|
|
leftMin: 0,
|
|
@@ -430,19 +463,119 @@ export default {
|
|
XEndDate:"12-31", // 横坐标显示范围-结束
|
|
XEndDate:"12-31", // 横坐标显示范围-结束
|
|
JumpYear:false, //是否跨年
|
|
JumpYear:false, //是否跨年
|
|
isSpanYearDisable:false,
|
|
isSpanYearDisable:false,
|
|
- type:1,
|
|
|
|
|
|
+ type:'公历',
|
|
},
|
|
},
|
|
legendEditDiaShow:false,
|
|
legendEditDiaShow:false,
|
|
|
|
|
|
formRules: {},
|
|
formRules: {},
|
|
|
|
|
|
- edbList: [],
|
|
|
|
|
|
+ edbList: [],//sheet1!$A$3:$A$13
|
|
|
|
+ selectInput:''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.edbList.push(this.createEbdListItem('A'))
|
|
this.edbList.push(this.createEbdListItem('A'))
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 点击选中哪个指标的时间\数值序列
|
|
|
|
+ handleChooseInput(e){
|
|
|
|
+ this.selectInput=e
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 指标轴改变
|
|
|
|
+ handleAxisChange(){
|
|
|
|
+ this.updateLimit()
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 选中的序列
|
|
|
|
+ tableSelect(start,end,str){
|
|
|
|
+ if(this.selectInput){
|
|
|
|
+ // 如果选择的不是同行或者同列
|
|
|
|
+ if(!(start.col==end.col||start.row==end.row)){
|
|
|
|
+ this.$message.warning(this.$t('CustomAnalysisPage.only_allowed_select_msg'));
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ //查找到是哪个指标
|
|
|
|
+ const tag=this.selectInput.split('_')[0]
|
|
|
|
+ const type=this.selectInput.split('_')[1]
|
|
|
|
+ this.edbList.forEach(edb => {
|
|
|
|
+ if(edb.tag===tag){
|
|
|
|
+ if(type==='timeSerial'){
|
|
|
|
+ edb.timeSerial=str
|
|
|
|
+ }
|
|
|
|
+ if(type==='valueSerial'){
|
|
|
|
+ edb.valueSerial=str
|
|
|
|
+ edb.maxData=this.findLimitData(start,end).maxData
|
|
|
|
+ edb.minData=this.findLimitData(start,end).minData
|
|
|
|
+ this.updateLimit()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 根据选择的数据更新上下限
|
|
|
|
+ updateLimit(){
|
|
|
|
+ let leftArr=[],rightArr=[],rightTwoArr=[];
|
|
|
|
+ this.edbList.forEach(item=>{
|
|
|
|
+ if(item.axis===1){
|
|
|
|
+ leftArr.push(...[item.minData,item.maxData])
|
|
|
|
+ }
|
|
|
|
+ if(item.axis===0){
|
|
|
|
+ rightArr.push(...[item.minData,item.maxData])
|
|
|
|
+ }
|
|
|
|
+ if(item.axis===2){
|
|
|
|
+ rightTwoArr.push(...[item.minData,item.maxData])
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.formData.leftMin=Math.min(...leftArr)||0
|
|
|
|
+ this.formData.leftMax=Math.max(...leftArr)||0
|
|
|
|
+ this.formData.rightMin=Math.min(...rightArr)||0
|
|
|
|
+ this.formData.rightMax=Math.max(...rightArr)||0
|
|
|
|
+ this.formData.rightTwoMin=Math.min(...rightTwoArr)||0
|
|
|
|
+ this.formData.rightTwoMax=Math.max(...rightTwoArr)||0
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 找出选择的最大最小值
|
|
|
|
+ findLimitData(start,end){
|
|
|
|
+ let minData=0,maxData=0;
|
|
|
|
+ const data=this.$parent.config.data
|
|
|
|
+ // console.log(data);
|
|
|
|
+ let numArr=[]
|
|
|
|
+ // 判断是选择的同行还是同列
|
|
|
|
+ if(start.col===end.col&&start.row!=end.row){//同列
|
|
|
|
+ for (let index = start.row; index < data.length; index++) {
|
|
|
|
+ numArr.push(data[index][start.col].ShowValue)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(start.col!=end.col&&start.row==end.row){//同行
|
|
|
|
+ const rowData=data[start.row]
|
|
|
|
+ for (let index = start.col; index <= end.col; index++) {
|
|
|
|
+ numArr.push(rowData[index].ShowValue)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //只选择了一个单元格
|
|
|
|
+ if(start.row===end.row&&start.col===end.col){
|
|
|
|
+ numArr.push(data[start.row][start.col].ShowValue)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ numArr=[...new Set(numArr)]
|
|
|
|
+ numArr=numArr.filter(item=>!isNaN(item)).map(Number)
|
|
|
|
+
|
|
|
|
+ if(numArr.length!==0){
|
|
|
|
+ maxData=Math.max(...numArr)
|
|
|
|
+ minData=Math.min(...numArr)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // console.log(numArr);
|
|
|
|
+ // console.log(minData,maxData);
|
|
|
|
+ return{
|
|
|
|
+ maxData,
|
|
|
|
+ minData
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+
|
|
// 图例编辑接口保存
|
|
// 图例编辑接口保存
|
|
saveLegend(copyList){
|
|
saveLegend(copyList){
|
|
if(copyList && copyList.length>0){
|
|
if(copyList && copyList.length>0){
|
|
@@ -452,7 +585,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
-
|
|
|
|
|
|
+ //添加指标
|
|
handleAddEdb() {
|
|
handleAddEdb() {
|
|
if (this.edbList.length === MAX_ADD_NUM) {
|
|
if (this.edbList.length === MAX_ADD_NUM) {
|
|
this.$message.warning(this.$t('EtaBasePage.num_overrun_msg'))
|
|
this.$message.warning(this.$t('EtaBasePage.num_overrun_msg'))
|
|
@@ -469,6 +602,8 @@ export default {
|
|
tag: t,
|
|
tag: t,
|
|
timeSerial: '',
|
|
timeSerial: '',
|
|
valueSerial: '',
|
|
valueSerial: '',
|
|
|
|
+ maxData:0,//选中数据的最大值
|
|
|
|
+ minData:0,//选中数据的最大=小值
|
|
name: '',
|
|
name: '',
|
|
axis: 1,//哪个轴 1左轴 0右轴 2右二轴
|
|
axis: 1,//哪个轴 1左轴 0右轴 2右二轴
|
|
EdbInfoType: 1,//指标类型 1标准指标 0领先指标
|
|
EdbInfoType: 1,//指标类型 1标准指标 0领先指标
|
|
@@ -481,10 +616,86 @@ export default {
|
|
handleDelEdb(index) {
|
|
handleDelEdb(index) {
|
|
this.edbList.splice(index, 1)
|
|
this.edbList.splice(index, 1)
|
|
},
|
|
},
|
|
|
|
+ // 初始化表单
|
|
initData() {
|
|
initData() {
|
|
|
|
+ // this.
|
|
|
|
+ },
|
|
|
|
+ saveHandle() {
|
|
|
|
+ const params={
|
|
|
|
+ ExcelInfoId:this.ExcelInfoId,
|
|
|
|
+ ChartInfoId:0,
|
|
|
|
+ ChartEdbInfoList:[],
|
|
|
|
+ ChartName:this.formData.chartName,
|
|
|
|
+ ChartType:this.formData.chartType,
|
|
|
|
+ SourcesFrom:JSON.stringify({
|
|
|
|
+ text:this.formData.chartSource,
|
|
|
|
+ isShow:this.formData.showChartSource
|
|
|
|
+ }),
|
|
|
|
+ LeftMin:this.formData.leftMin+'',
|
|
|
|
+ LeftMax:this.formData.leftMax+'',
|
|
|
|
+ RightMin:this.formData.rightMin+'',
|
|
|
|
+ RightMax:this.formData.rightMax+'',
|
|
|
|
+ Right2Min:this.formData.rightTwoMin+'',
|
|
|
|
+ Right2Max:this.formData.rightTwoMax+'',
|
|
|
|
+ MinMaxSave:1,
|
|
|
|
+ Source:11
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 季节图横坐标范围必须有
|
|
|
|
+ if(params.ChartType===2){
|
|
|
|
+ params.SeasonExtraConfig={
|
|
|
|
+ ChartLegend:this.SeasonExtraConfig.ChartLegend,// 图例名称数组
|
|
|
|
+ XStartDate:this.SeasonExtraConfig.XStartDate,
|
|
|
|
+ XEndDate:this.SeasonExtraConfig.XEndDate,
|
|
|
|
+ JumpYear:this.SeasonExtraConfig.JumpYear?1:0
|
|
|
|
+ }
|
|
|
|
+ params.Calendar=this.SeasonExtraConfig.type
|
|
|
|
+
|
|
|
|
+ //季节图横坐标范围必须有
|
|
|
|
+ if(!(params.SeasonExtraConfig.XStartDate&¶ms.SeasonExtraConfig.XEndDate)){
|
|
|
|
+ this.$message.warning('横坐标显示范围不能为空');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if(!params.ChartName){
|
|
|
|
+ this.$message.warning('请填写图表名称')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 处理指标数据
|
|
|
|
+ let arr=[]
|
|
|
|
+ this.edbList.forEach(item=>{
|
|
|
|
+ arr.push({
|
|
|
|
+ FromTag:item.tag,
|
|
|
|
+ ExcelChartEdbId:0,
|
|
|
|
+ EdbName:item.name,
|
|
|
|
+ IsAxis:item.axis,
|
|
|
|
+ IsOrder:item.IsOrder,
|
|
|
|
+ EdbInfoType:item.EdbInfoType,
|
|
|
|
+ LeadUnit:item.leadUnit,
|
|
|
|
+ LeadValue:item.leadVal,
|
|
|
|
+ MaxData:item.maxData,
|
|
|
|
+ MinData:item.minData,
|
|
|
|
+ DateSequenceStr:item.timeSerial,
|
|
|
|
+ DataSequenceStr:item.valueSerial
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ params.ChartEdbInfoList=arr
|
|
|
|
+ // 检测选择的指标名称是否填写了
|
|
|
|
+ for (let index = 0; index < params.ChartEdbInfoList.length; index++) {
|
|
|
|
+ const item = params.ChartEdbInfoList[index];
|
|
|
|
+ if(!item.EdbName) return this.$message.warning(`第${index+1}个指标名称未填写`)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ sheetInterface.addBalanceChart(params).then(res=>{
|
|
|
|
+ if(res.Ret===200){
|
|
|
|
+ this.$message.success(this.$t('MsgPrompt.add_msg2'));
|
|
|
|
+ this.$emit('success')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
|
|
},
|
|
},
|
|
- saveHandle() { },
|
|
|
|
cancelHandle() {
|
|
cancelHandle() {
|
|
this.$emit('update:isShow', false);
|
|
this.$emit('update:isShow', false);
|
|
},
|
|
},
|
|
@@ -505,6 +716,14 @@ export default {
|
|
padding: 0;
|
|
padding: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .select_input .el-input__inner {
|
|
|
|
+ border: 2px dashed #18ad18;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+ /*他不要下拉选择框 QAQ */
|
|
|
|
+.x-range-picker-date {
|
|
|
|
+ display: none;
|
|
}
|
|
}
|
|
.dia-bot{
|
|
.dia-bot{
|
|
text-align: center;
|
|
text-align: center;
|