| | |
| | | <div class="pickerData"> |
| | | <span> 开始时间:</span> |
| | | <span class="pickerTable"> |
| | | <el-date-picker type="datetime" v-model="formInline.timeStart"></el-date-picker> |
| | | <el-date-picker type="datetime" v-model="formInline.timeStart" |
| | | default-value="'"></el-date-picker> |
| | | </span> |
| | | </div> |
| | | <div class="pickerData"> |
| | |
| | | } |
| | | } |
| | | }, |
| | | mounted () { |
| | | created () { |
| | | this.formInline.timeEnd = dayjs().format('YYYY-MM-DD HH:mm:ss') |
| | | this.formInline.timeStart = dayjs().subtract(12, 'hour').format('YYYY-MM-DD HH:mm:ss') |
| | | // this.onSubmit() |
| | | // this.CreateChart(this.JsonCtarts.id, this.JsonCtarts.title, this.JsonCtarts.legend, this.JsonCtarts.xdata, this.JsonCtarts.ydatas, this.JsonCtarts.yname, this.JsonCtarts.id, this.JsonCtarts.datatype) |
| | | }, |
| | | updated () { |
| | | mounted () { |
| | | // this.formInline.timeEnd = dayjs().format('YYYY-MM-DD HH:mm:ss') |
| | | // this.formInline.timeStart = dayjs().subtract(12, 'hour').format('YYYY-MM-DD HH:mm:ss') |
| | | this.onSubmit() |
| | | }, |
| | | methods: { |
| | | onSubmit () { |
| | | this.CreateChart() |
| | | // console.log(this.JsonCtarts.id, this.JsonCtarts.title, this.JsonCtarts.legend, this.JsonCtarts.xdata, this.JsonCtarts.ydatas, this.JsonCtarts.yname, this.JsonCtarts.id, this.JsonCtarts.datatype) |
| | | // this.CreateChart(this.JsonCtarts.id, this.JsonCtarts.title, this.JsonCtarts.legend, this.JsonCtarts.xdata, this.JsonCtarts.ydatas, this.JsonCtarts.yname, this.JsonCtarts.id, this.JsonCtarts.datatype) |
| | | }, |
| | | CreateChart: function () { |
| | | CreateChart () { |
| | | // var id = this.JsonCtarts.id |
| | | // var title = this.JsonCtarts.title |
| | | var legend = this.JsonCtarts.legend |
| | |
| | | var seriesName = params[i].seriesName |
| | | // 值 |
| | | var value = params[i].value |
| | | var valueFliter |
| | | if (value === 'NaN') { |
| | | valueFliter = '' |
| | | } |
| | | // else { |
| | | // // valueFliter = formatter(value) |
| | | // var valueFliter |
| | | // if (value === 'NaN') { |
| | | // valueFliter = '' |
| | | // } else { |
| | | // valueFliter = this.formatter(value) |
| | | // } |
| | | var maker = params[i].marker |
| | | if (seriesName === '二氧化硫') { |
| | |
| | | } else { |
| | | maker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#4ec99c;"></span>' |
| | | } |
| | | s += maker + seriesName + ':' + valueFliter + '<br />' |
| | | s += maker + seriesName + ':' + value + '<br />' |
| | | } |
| | | return s |
| | | } |