jinlin
2024-08-15 a856b0db283f46b6b48086e371393d375eece1a3
web/src/views/modules/taskReliability/SimulatCurve.vue
@@ -15,6 +15,7 @@
        yDataList: [],
        mttr: '',
        mtbf: '',
        msr: '',
        myChart: {},
        myChartStyle: {float: "left", width: "100%", height: "600px"}, //图表样式
        option: {}
@@ -23,6 +24,7 @@
    components: {},
    methods: {
      async initEcharts(Param) {
        console.log(Param)
        let res = await this.$http.post(`/taskReliability/SimulatAssess/getResultXML`, Param)
        console.log(res.data)
        if (res.data) {
@@ -30,23 +32,24 @@
          this.xDataList = res.data.curveParam.xdata
          this.mttr = res.data.mttr.toFixed(4)
          this.mtbf = res.data.mtbf.toFixed(4)
          this.msr = res.data.msr.toFixed(4)
        }
        this.option = {
          title: {
            text: "mttr:" + this.mttr + "    mtbf:" + this.mtbf,
            text: "mtbf:" + this.mtbf + "    mttr:" + this.mttr + "    msr:" + this.msr,
            textStyle: { // 主标题文本样式{"fontSize": 18,"fontWeight": "bolder","color": "#333"}
              fontFamily: 'Arial',
              fontSize: 30,
              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 组件离容器下侧的距离
            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 组件离容器下侧的距离
          },
          xAxis: {
            data: this.xDataList,
@@ -80,10 +83,11 @@
          this.xDataList = res.data.curveParam.xdata
          this.mttr = res.data.mttr.toFixed(4)
          this.mtbf = res.data.mtbf.toFixed(4)
          this.msr = res.data.msr.toFixed(4)
        }
        this.option = {
          title: {
            text: "mttr:" + this.mttr + "    mtbf:" + this.mtbf,
            text: "mtbf:" + this.mtbf + "    mttr:" + this.mttr + "    msr:" + this.msr,
            textStyle: { // 主标题文本样式{"fontSize": 18,"fontWeight": "bolder","color": "#333"}
              fontFamily: 'Arial',
              fontSize: 30,