src/views/dashboard/IndexSignage.vue
@@ -109,6 +109,7 @@
        barChartData: [],
        doubleBarChart: '',
        doubleBarChartData: {},
        workshopProblemChartData: [['-', '-', '-']],
        efficiencyChartConfig: {},
        maintenanceConfig: {},
        problemConfig: {},
@@ -121,7 +122,6 @@
    mounted() {
      window.addEventListener('resize', this.handleWindowResize)
      this.getChartDataByApi()
      this.drawProblemChart()
    },
    beforeDestroy() {
      window.removeEventListener('resize', this.handleWindowResize)
@@ -137,6 +137,7 @@
        this.getTwoMaintenanceChartDataByApi()
        this.getBarChartDataByApi()
        this.getDoubleBarChartDataByApi()
        this.getWorkshopProblemChartDataByApi()
      },
      /* 调用接口获取设备运行状态 */
@@ -239,7 +240,7 @@
      getTwoMaintenanceChartDataByApi() {
        signageApi.getTwoMaintenancePlanListApi()
          .then(res => {
            if (res.success && res.result) this.twoMaintenanceChartData = res.result.map(item => [item.centerName, item.maintenanceDate, item.content])
            if (res.success && res.result.length > 0) this.twoMaintenanceChartData = res.result.map(item => [item.centerName, item.maintenanceDate, item.content])
            this.drawMaintenanceChart()
          })
      },
@@ -273,6 +274,16 @@
          .then(res => {
            if (res.success) this.doubleBarChartData = res.result
            this.drawDoubleBarChart()
          })
      },
      /* 调用接口获取车间问题列表*/
      getWorkshopProblemChartDataByApi() {
        signageApi.getWorkshopProblemListApi()
          .then(res => {
            console.log('res', res.result)
            if (res.success && res.result.length > 0) this.workshopProblemChartData = res.result.map(item => [item.content, item.createTime])
            this.drawWorkshopProblemChart()
          })
      },
@@ -1144,27 +1155,16 @@
      },
      /* 绘制问题滚动表 */
      drawProblemChart() {
      drawWorkshopProblemChart() {
        this.problemConfig = {
          indexHeader: '序号',
          header: ['时间', '问题内容'],
          header: [ '问题内容', '时间'],
          headerBGC: '#86D186',
          oddRowBGC: '#7CBF7C',
          evenRowBGC: '#7CBF7C',
          data: [
            // ['2024年3月23号', '大家注意安全问题'],
            // ['2024年3月23号', '大家注意安全问题'],
            // ['2024年3月23号', '大家注意安全问题'],
            // ['2024年3月23号', '大家注意安全问题'],
            // ['2024年3月23号', '大家注意安全问题'],
            // ['2024年3月23号', '大家注意安全问题'],
            // ['2024年3月23号', '大家注意安全问题'],
            // ['2024年3月23号', '大家注意安全问题'],
            // ['2024年3月23号', '大家注意安全问题'],
            // ['2024年3月23号', '大家注意安全问题']
          ],
          data: this.workshopProblemChartData,
          index: true,
          columnWidth: [100, 300, 300],
          columnWidth: [100, 300, 150],
          align: ['center']
        }
      },