| | |
| | | <template> |
| | | <div class="mod-taskReliability-taskPhase"> |
| | | <div class="echart" id="myChart" :style="myChartStyle"></div> |
| | | <div id="myChart" :style="myChartStyle"></div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | mttr: '', |
| | | mtbf: '', |
| | | msr: '', |
| | | mttfMle: '', |
| | | mttrMle: '', |
| | | myChart: {}, |
| | | myChartStyle: {float: "left", width: "100%", height: "680px"}, //图表样式 |
| | | myChartStyle: {width: "100%", height: "750px"}, //图表样式 |
| | | option: {} |
| | | } |
| | | }, |
| | |
| | | this.mttr = res.data.mttr.toFixed(4) |
| | | this.mtbf = res.data.mtbf.toFixed(4) |
| | | this.msr = res.data.msr.toFixed(4) |
| | | this.mttfMle = res.data.mttfMle.toFixed(4) |
| | | this.mttrMle = res.data.mttrMle.toFixed(4) |
| | | } |
| | | this.option = { |
| | | title: { |
| | | text: "mttf:" + this.mtbf + " mttr:" + this.mttr + " msr:" + this.msr, |
| | | text: "mttf:" + this.mtbf + " mttr:" + this.mttr + " msr:" + this.msr + " 节点寿命:" + this.mttfMle + " 平均维修时间:" + this.mttrMle, |
| | | textStyle: { // 主标题文本样式{"fontSize": 18,"fontWeight": "bolder","color": "#333"} |
| | | fontFamily: 'Arial', |
| | | fontSize: 30, |
| | | fontSize: 27, |
| | | fontStyle: 'normal', |
| | | fontWeight: 'normal', |
| | | }, |
| | | textAlign: 'auto',//整体(包括 text 和 subtext)的水平对齐 |
| | | textVerticalAlign: 'auto',//整体(包括 text 和 subtext)的垂直对齐 |
| | | padding: 0,//[5,10] | [ 5,6, 7, 8] ,标题内边距 |
| | | left: 'center',//'5' | '5%',title 组件离容器左侧的距离 |
| | | right: 'auto',//'title 组件离容器右侧的距离 |
| | | top: '20',//title 组件离容器上侧的距离 |
| | | bottom: 'auto',//title 组件离容器下侧的距离 |
| | | top: '20px' |
| | | }, |
| | | grid:{ |
| | | top:'15%' |
| | | }, |
| | | xAxis: { |
| | | data: this.xDataList, |
| | | name: '仿真总时长', |
| | | type: 'category', |
| | | axisLabel: { |
| | | formatter: function(value) { |
| | | formatter: function (value) { |
| | | // 将 X 轴刻度值格式化为保留两位小数的字符串 |
| | | return parseFloat(value).toFixed(2); |
| | | } |
| | | } |
| | | }, |
| | | yAxis: { |
| | | type:"value", |
| | | type: "value", |
| | | name: '可靠度', |
| | | }, |
| | | series: [ |
| | |
| | | this.mttr = res.data.mttr.toFixed(4) |
| | | this.mtbf = res.data.mtbf.toFixed(4) |
| | | this.msr = res.data.msr.toFixed(4) |
| | | this.mttfMle = res.data.mttfMle.toFixed(4) |
| | | this.mttrMle = res.data.mttrMle.toFixed(4) |
| | | } |
| | | this.option = { |
| | | title: { |
| | | text: "mttf:" + this.mtbf + " mttr:" + this.mttr + " msr:" + this.msr, |
| | | text: "mttf:" + this.mtbf + " mttr:" + this.mttr + " msr:" + this.msr + " 节点寿命:" + this.mttfMle + " 平均维修时间:" + this.mttrMle, |
| | | textStyle: { // 主标题文本样式{"fontSize": 18,"fontWeight": "bolder","color": "#333"} |
| | | fontFamily: 'Arial', |
| | | fontSize: 30, |
| | | fontSize: 27, |
| | | fontStyle: 'normal', |
| | | fontWeight: 'normal', |
| | | }, |
| | | textAlign: 'auto',//整体(包括 text 和 subtext)的水平对齐 |
| | | textVerticalAlign: 'auto',//整体(包括 text 和 subtext)的垂直对齐 |
| | | padding: 0,//[5,10] | [ 5,6, 7, 8] ,标题内边距 |
| | | left: 'center',//'5' | '5%',title 组件离容器左侧的距离 |
| | | right: 'auto',//'title 组件离容器右侧的距离 |
| | | top: 'auto',//title 组件离容器上侧的距离 |
| | | bottom: 'auto',//title 组件离容器下侧的距离 |
| | | top: '20px' |
| | | }, |
| | | grid:{ |
| | | top:'15%' |
| | | }, |
| | | xAxis: { |
| | | data: this.xDataList, |
| | |
| | | splitNumber: 10 |
| | | }, |
| | | yAxis: { |
| | | |
| | | name: '', |
| | | name: '可靠度', |
| | | }, |
| | | series: [ |
| | | { |