likang 2 years ago
parent
commit
174919a883
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/views/dashboard/rladmin/components/MaintenanceAlarmChart.vue

+ 6 - 0
src/views/dashboard/rladmin/components/MaintenanceAlarmChart.vue

@@ -106,6 +106,7 @@ export default {
                 bolt_type:'',
                 time:'',
             },
+            legend:[],
             //查询参数
             work_local_options:[],
             parts:[],
@@ -152,6 +153,7 @@ export default {
     methods: {
         getData() {
              this.lineDataX=['2020-05-06','2020-05-06 09:49:01','2020-05-06 09:49:02','2020-05-06 09:49:03','2020-05-07','2020-05-08','2020-05-09','2020-05-10','2020-05-11','2020-05-12']
+             this.legend=['SWT-4.0-146','SWT-2.38-101','SWT-6.0-154','SG-8.0-167'];
             this.seriesData=[
                 {
                      name: 'SWT-4.0-146',
@@ -229,6 +231,10 @@ export default {
                         magicType: {type: ['line', 'bar']},
                     }
                 }, */
+                legend: {
+                         show:true,
+                        data: this.legend
+                    },
                 xAxis: {
                     type: "category",
                     data: this.lineDataX,