1、调整设备打卡率页面查询区域样式
2、对比分析页面新增图表数据加载提示以及优化整体页面图表展示及代码
3、调整班次班制管理页面左侧新增班制后刷新列表逻辑以及右侧配置按钮展示条件
已修改10个文件
已删除1个文件
1179 ■■■■ 文件已修改
src/mixins/JeecgListMixin.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/ContrastiveAnalysis.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/EfficiencyPunchReport.vue 74 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/EfficiencyPunchReport/EfficiencyPunchReportModal.vue 214 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisBar.vue 338 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisGauge.vue 178 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue 195 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisPie.vue 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/shift/ShiftInfo.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/shift/ShiftSystem.vue 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mixins/JeecgListMixin.js
@@ -380,6 +380,7 @@
          this.loadData()
        } else {
          // this.$message.error(`${info.file.name} ${info.file.response.message}.`);
          this.loading = false
          this.$notification.error({
            message:'消息',
            description:`${info.file.name} ${info.file.response.message}.`
src/views/mdc/base/ContrastiveAnalysis.vue
@@ -1,6 +1,6 @@
<template>
  <a-card :bordered="false">
    <div style="width: 100%; height: 100%;overflow: hidden">
    <div>
      <a-row type="flex" :gutter="16">
        <a-col :md="5">
          <a-tabs :activeKey="activeKey" @change="tabChange">
@@ -13,7 +13,8 @@
          </a-tabs>
        </a-col>
        <a-col :md="24-5" :sm="24">
          <ComparativeAnalysisMain  ref="ComparativeAnalysisMain" :nodeTree='selectEquement'  :nodePeople='selectPeople' :Type="slectTypeTree"></ComparativeAnalysisMain>
          <ComparativeAnalysisMain ref="ComparativeAnalysisMain" :nodeTree='selectEquipment' :nodePeople='selectPeople'
                                   :Type="selectTypeTree"/>
        </a-col>
      </a-row>
    </div>
@@ -25,6 +26,7 @@
  import ComparativeAnalysisMain from './modules/comparativeAnalysis/ComparativeAnalysisMain'
  import DepartTree from './modules/DepartList/DepartListTree/DepartTree'
  import {mapActions} from 'vuex'
  export default {
    name: 'comparativeAnalysis',
    components:{
@@ -35,15 +37,11 @@
    data() {
      return {
        activeKey: '1',
        description: '设备信息',
        selectEquementId: '',
        selectEquement: {},
        selectEquipmentId: '',
        selectEquipment: {},
        selectPeople:{},
        slectTypeTree: '',
        url: {
          equipmentStatistics: '/mdc/equipment/equipmentStatistics'
        },
        isDepartType:'',
        selectTypeTree: '',
        isDepartType: ''
      }
    },
    created() {
@@ -56,11 +54,10 @@
          if (res.success) {
            this.isDepartType = res.result[0].value
          } else {
            // this.$message.warn(res.message)
            this.$notification.warning({
              message:'消息',
              description:res.message
            });
            })
          }
        }).finally(() =>{
        })
@@ -68,19 +65,15 @@
      tabChange(val) {
        // console.log(val)
        this.activeKey = val
        this.slectTypeTree = val
        this.selectTypeTree = val
      },
      /*      changeSelection(val) {
              this.selectEquementId = val
              this.$refs.DeviceRepairList.pQuery(val)
            },*/
      changeSelectionNode(val) {
        this.selectEquement = val
        this.slectTypeTree = '1'
        this.selectEquipment = val
        this.selectTypeTree = '1'
      },
      changeSelectionNodedd(val) {
        this.selectPeople = val
        this.slectTypeTree = '2'
        this.selectTypeTree = '2'
      }
    }
  }
src/views/mdc/base/EfficiencyPunchReport.vue
@@ -5,23 +5,23 @@
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
          <a-col :xl="4" :lg="5" :md="6" :sm="24">
            <a-form-item label="记录时间">
              <a-date-picker format="YYYY-MM-DD" :allowClear="false" v-model="queryParam.theDate"
                             @change="dateParamChange"></a-date-picker>
              <a-date-picker value-format="YYYYMMDD" :allowClear="false" v-model="queryParam.theDate"
                             style="width: 100%"/>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
          <a-col :xl="4" :lg="5" :md="6" :sm="24">
            <a-form-item label="班次">
              <j-dict-select-tag v-model="queryParam.shiftSchedule" dictCode="shift_schedule"
                                 placeholder="请选择班次"></j-dict-select-tag>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
            <a-space>
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
              <a-button type="info" @click="searchReset" icon="reload">重置</a-button>
            </a-space>
          </a-col>
        </a-row>
      </a-form>
@@ -30,7 +30,6 @@
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div class="table-operator">
      <a-button type="primary" icon="download" @click="handleExportXls('设备打卡率报表')">导出</a-button>
    </div>
    <!-- table区域-begin -->
@@ -59,30 +58,21 @@
      </a-table>
    </div>
    <!-- table区域-end -->
    <efficiency-punch-report-modal ref="modalForm" @ok="modalFormOk"></efficiency-punch-report-modal>
  </a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
  import moment from 'moment'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import EfficiencyPunchReportModal from '@views/mdc/base/modules/EfficiencyPunchReport/EfficiencyPunchReportModal.vue'
export default {
  name: 'EfficiencyPunchReport',
  mixins: [JeecgListMixin],
  components: {
    EfficiencyPunchReportModal
  },
  data() {
    return {
      queryParam: {
        theDate: this.formatDate(new Date(new Date().setDate(new Date().getDate() - 1))), // é»˜è®¤è®¾ç½®ä¸ºæ˜¨å¤©
        shiftSchedule: ''
          theDate: moment().add(-1, 'days').format('YYYYMMDD') // é»˜è®¤è®¾ç½®ä¸ºæ˜¨å¤©
      },
      dataSource: [], // ç¡®ä¿åˆå§‹åŒ–为空数组
      description: '设备打卡率',
      // è¡¨å¤´
      columns: [
@@ -96,7 +86,6 @@
            return parseInt(index) + 1
          }
        },
        {
          title: '记录时间',
          align: 'center',
@@ -107,7 +96,6 @@
          align: 'center',
          dataIndex: 'shiftSchedule_dictText'
        },
        {
          title: '早班上班打卡设备数量',
          align: 'center',
@@ -142,7 +130,6 @@
          title: '早班下班打卡率(%)',
          align: 'center',
          dataIndex: 'mornShiftOutRate'
        },
        {
          title: '晚班上班打卡率(%)',
@@ -150,9 +137,9 @@
          dataIndex: 'evenShiftInRate',
          customRender: (text) => {
            if (text !== null && text !== undefined) {
              return parseFloat(text).toFixed(2);
                return parseFloat(text).toFixed(2)
            }
            return text;
              return text
          }
        },
        {
@@ -173,44 +160,5 @@
      }
    }
  },
  methods: {
    searchQuery() {
      if (this.queryParam.theDate) {
        // ç¡®ä¿ queryParam.recordDate æ˜¯ä¸€ä¸ªæœ‰æ•ˆçš„ Date å¯¹è±¡
        const date = new Date(this.queryParam.recordDate)
        if (!isNaN(date.getTime())) { // æ£€æŸ¥æ˜¯å¦ä¸ºæœ‰æ•ˆæ—¥æœŸ
          const formattedDate = this.formatDate(date)
          this.queryParam.theDate = formattedDate
          console.log('Formatted theDate:', this.queryParam.theDate) // éªŒè¯æ ¼å¼
        } else {
          console.error('Invalid date format')
        }
      }
      this.loadData()
    },
    formatDate(date) {
      const year = date.getFullYear()
      const month = String(date.getMonth() + 1).padStart(2, '0')
      const day = String(date.getDate()).padStart(2, '0')
      return `${year}${month}${day}`
    },
    dateParamChange(value) {
      // value æ˜¯ä¸€ä¸ªæ—¶åˆ»å¯¹è±¡ï¼ˆmoment object),需要转换为 Date å¯¹è±¡
      if (value) {
        const date = value.toDate() // è½¬æ¢ä¸º Date å¯¹è±¡
        const formattedDate = this.formatDate(date)
        this.queryParam.theDate = formattedDate
      } else {
        this.queryParam.theDate = null
      }
    }
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
src/views/mdc/base/modules/EfficiencyPunchReport/EfficiencyPunchReportModal.vue
ÎļþÒÑɾ³ý
src/views/mdc/base/modules/StatisticsChart/StatisticsLegend.vue
@@ -27,7 +27,7 @@
    </div>
    <a-spin :spinning="spinning">
      <!--开机率-->
      <!--利用率-->
      <div class="PowerOnRate  Line-box">
        <div class="title">
          <div class="circle"></div>
@@ -38,7 +38,7 @@
          <div class="PowerOnRate-right" ref="PowerOnRateLine" id="PowerOnRateLine"></div>
        </div>
      </div>
      <!--利用率和开动率-->
      <!--开机率和开动率-->
      <div class="UtilizationStartup">
        <div class="Utilization Line-box">
          <div class="title">
@@ -634,13 +634,13 @@
  }
  #StatisticsLegend .PowerOnRate {
    flex: 1;
    height: 50%;
    margin-bottom: 15px;
    background-color: #fff;
  }
  #StatisticsLegend .UtilizationStartup {
    flex: 1;
    height: 50%;
    display: flex;
  }
@@ -690,7 +690,7 @@
  }
  .PowerOnRate-box .PowerOnRate-right {
    flex: 1;
    width: 75%;
  }
  .Utilization-box {
src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisBar.vue
@@ -1,12 +1,13 @@
<template>
    <div class="comparative_Bar" style="width: 100%;height: 900px;display: flex;flex-direction: column;overflow: scroll">
      <div id="compAnalBar1" style="flex: 1;"></div>
      <div id="compAnalBar2" style="flex: 1;"></div>
  <div style="height: 100%;overflow: auto">
    <div id="compAnalBar1" style="height: 400px"></div>
    <div id="compAnalBar2" style="height: 400px"></div>
    </div>
</template>
<script>
  import * as echarts from 'echarts'
  export default {
    name: 'comparativeAnalysisBar',
    props:{
@@ -30,22 +31,22 @@
      dataList(val){
        this.OpenCloseList = val
        this.drawTu()
      },
      }
    },
    mounted() {
      this.drawTu()
    },
    methods:{
      drawTu(){
       let compAnalBar1 = this.$echarts.init(document.getElementById('compAnalBar1'), 'macarons');
       let compAnalBar2 = this.$echarts.init(document.getElementById('compAnalBar2'), 'macarons');
        let compAnalBar1 = this.$echarts.init(document.getElementById('compAnalBar1'), 'macarons')
        let compAnalBar2 = this.$echarts.init(document.getElementById('compAnalBar2'), 'macarons')
       let compAnalBarOption1 = {
          tooltip: {
            trigger: 'axis',
            axisPointer: {
              type: "shadow",
              type: 'shadow',
              textStyle: {
                color: "#fff"
                color: '#fff'
              }
            }
@@ -72,19 +73,19 @@
          grid: {
            borderWidth: 0,
            top: 110,
            bottom: 95,
            bottom: 110,
            textStyle: {
              color: "#fff"
              color: '#fff'
            }
          },
          xAxis: [
            {
              type: 'category',
              splitLine: {
                "show": false
                'show': false
              },
              axisTick: {
                "show": false
                'show': false
              },
              splitArea: {
                show: false
@@ -92,14 +93,8 @@
              boundaryGap : true,
              axisLabel : {
                interval : 0,
                rotate : 0,
                rotate: 45,
                show: true,
                wigth:20,
                splitNumber: 8,
                textStyle: {
                  fontFamily: "微软雅黑",
                  fontSize: 12
                }
              },
              data : [0]
            }
@@ -137,14 +132,14 @@
            handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
            handleSize: '110%',
            handleStyle: {
              color: "#d3dee5"
              color: '#d3dee5'
            },
            textStyle: {
              color: "#fff"
              color: '#fff'
            },
            borderColor: "#90979c"
            borderColor: '#90979c'
          }, {
            type: "inside",
            type: 'inside',
            show: true,
            height: 15,
            start: 1,
@@ -160,29 +155,22 @@
                normal: {
                  color: function(params) {
                    let colorList = [
                      ["#6496e9","#6bded3"],
                      // ["#849db8","#b4b8cc"],
                      // ["#4fe1c5","#4ecee1"],
                      // // ["#9978fa","#88a1fa"],
                      // ["#ffbb65","#fdc68b"],
                    ];
                    // return colorList[params.dataIndex];
                    let colorItem = colorList[params.dataIndex];
                      ['#6496e9', '#6bded3']
                    ]
                    let colorItem = colorList[params.dataIndex]
                    return new echarts.graphic.LinearGradient(0,0,0,1,[{
                      offset:0,
                      color:'#6496e9'
                    },
                      {
                        offset:1,
                        color:"#6bded3"
                        color: '#6bded3'
                      }],false)
                  },
                  barBorderRadius: [5, 5, 0, 0],
                  barBorderRadius: [5, 5, 0, 0]
                }
              },
              data: [0],
              // barCategoryGap: '20%',
              // barGap : '-10%',
              markPoint : {
                data : [
                  {type : 'max', name: '最大值',symbolSize:70},
@@ -198,32 +186,25 @@
            {
              name: '利用率',
              type: 'bar',
              //barWidth: 30,
              barWidth: 25,
              // barCategoryGap: '20%',
              // barGap : '-10%',
              itemStyle: {
                normal: {
                  color: function(params) {
                    let colorList = [
                      // ["#6496e9","#6bded3"],
                      // ["#849db8","#b4b8cc"],
                      ["#4fe1c5","#4ecee1"],
                      // ["#9978fa","#88a1fa"],
                      // ["#ffbb65","#fdc68b"],
                    ];
                      ['#4fe1c5', '#4ecee1']
                    ]
                    // return colorList[params.dataIndex];
                    let colorItem = colorList[params.dataIndex];
                    let colorItem = colorList[params.dataIndex]
                    return new echarts.graphic.LinearGradient(0,0,0,1,[{
                      offset:0,
                      color:"#4fe1c5"
                      color: '#4fe1c5'
                    },
                      {
                        offset:1,
                        color:"#4ecee1"
                        color: '#4ecee1'
                      }],false)
                  },
                  barBorderRadius: [5, 5, 0, 0],
                  barBorderRadius: [5, 5, 0, 0]
                }
              },
              data: [0],
@@ -240,194 +221,14 @@
              }
            }
          ]
        };
       // let compAnalBarOption2 = {
       //    tooltip: {
       //      trigger: 'axis',
       //      axisPointer: {
       //        type: "shadow",
       //        textStyle: {
       //          color: "#fff"
       //        }
       //
       //      }
       //    },
       //    legend: {
       //      x: '4%',
       //      top: '11%',
       //      textStyle: {
       //        color: '#90979c'
       //      },
       //      data: ['开机时间', '关机时间'],
       //      color:['#6496e9','#b4b8cc']
       //    },
       //    toolbox: {
       //      show : true,
       //      feature : {
       //        mark : {show: true},
       //        magicType : {show: true, type: ['line', 'bar']},
       //        restore : {show: true},
       //        saveAsImage : {show: true,name:'设备运行时间对比分析图'}
       //      }
       //    },
       //    calculable: true,
       //    grid: {
       //      borderWidth: 0,
       //      top: 110,
       //      bottom: 95,
       //      textStyle: {
       //        color: "#fff"
       //      }
       //    },
       //    xAxis: [
       //      {
       //        type: 'category',
       //        splitLine: {
       //          "show": false
       //        },
       //        axisTick: {
       //          "show": false
       //        },
       //        splitArea: {
       //          show: false
       //        },
       //        boundaryGap : true,
       //        axisLabel : {
       //          interval : 0,
       //          rotate : 0,
       //          show: true,
       //          wigth:20,
       //          splitNumber: 8,
       //          textStyle: {
       //            fontFamily: "微软雅黑",
       //            fontSize: 12
       //          }
       //        },
       //        data : [0]
       //      }
       //    ],
       //    yAxis: [
       //      {
       //        type: 'value',
       //        splitLine: {
       //          show: false
       //        },
       //        axisLine: {
       //          lineStyle: {
       //            color: '#90979c'
       //          }
       //        },
       //        axisTick: {
       //          show: false
       //        },
       //        axisLabel: {
       //          interval: 0
       //
       //        },
       //        splitArea: {
       //          show: false
       //        }
       //      }
       //    ],
       //    dataZoom: [{
       //      show: true,
       //      height: 30,
       //      xAxisIndex: [0],
       //      bottom: 30,
       //      start: 0,
       //      end: 100,
       //      handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
       //      handleSize: '110%',
       //      handleStyle: {
       //        color: "#d3dee5"
       //      },
       //      textStyle: {
       //        color: "#fff"
       //      },
       //      borderColor: "#90979c"
       //    }, {
       //      type: "inside",
       //      show: true,
       //      height: 15,
       //      start: 1,
       //      end: 35
       //    }],
       //    series: [
       //      {
       //        name: '开机时间',
       //        type: 'bar',
       //        //barWidth: 30,
       //        barWidth: 25,
       //        // stack: 'sum',
       //        // barCategoryGap: '20%',
       //        itemStyle: {
       //          normal: {
       //            color: function(params) {
       //              let colorList = [
       //                ["#6496e9","#6bded3"],
       //                // ["#849db8","#b4b8cc"],
       //                // ["#4fe1c5","#4ecee1"],
       //                // // ["#9978fa","#88a1fa"],
       //                // ["#ffbb65","#fdc68b"],
       //              ];
       //              // return colorList[params.dataIndex];
       //              let colorItem = colorList[params.dataIndex];
       //              return new echarts.graphic.LinearGradient(0,0,0,1,[{
       //                offset:0,
       //                color:'#6496e9'
       //              },
       //                {
       //                  offset:1,
       //                  color:"#6bded3"
       //                }],false)
       //            },
       //            barBorderRadius: [5, 5, 0, 0],
       //          }
       //        },
       //        data: [0]
       //      },
       //      {
       //        name: '关机时间',
       //        type: 'bar',
       //        //barWidth: 30,
       //        barWidth: 25,
       //        // stack: 'sum',
       //        // barCategoryGap: '20%',
       //        itemStyle: {
       //          normal: {
       //            color: function(params) {
       //              let colorList = [
       //                // ["#6496e9","#6bded3"],
       //                ["#849db8","#b4b8cc"],
       //                // ["#4fe1c5","#4ecee1"],
       //                // // ["#9978fa","#88a1fa"],
       //                // ["#ffbb65","#fdc68b"],
       //              ];
       //              // return colorList[params.dataIndex];
       //              let colorItem = colorList[params.dataIndex];
       //              return new echarts.graphic.LinearGradient(0,0,0,1,[{
       //                offset:0,
       //                color:'#849db8'
       //              },
       //                {
       //                  offset:1,
       //                  color:"#b4b8cc"
       //                }],false)
       //            },
       //            barBorderRadius: [5, 5, 0, 0],
       //          }
       //        },
       //        data: [0]
       //      }
       //    ]
       //  };
        }
        let compAnalBarOption2 = {
          tooltip: {
            trigger: 'axis',
            axisPointer: {
              type: "shadow",
              type: 'shadow',
              textStyle: {
                color: "#fff"
                color: '#fff'
              }
            }
@@ -454,19 +255,19 @@
          grid: {
            borderWidth: 0,
            top: 110,
            bottom: 95,
            bottom: 110,
            textStyle: {
              color: "#fff"
              color: '#fff'
            }
          },
          xAxis: [
            {
              type: 'category',
              splitLine: {
                "show": false
                'show': false
              },
              axisTick: {
                "show": false
                'show': false
              },
              splitArea: {
                show: false
@@ -474,14 +275,8 @@
              boundaryGap : true,
              axisLabel : {
                interval : 0,
                rotate : 0,
                rotate: 45,
                show: true,
                wigth:20,
                splitNumber: 8,
                textStyle: {
                  fontFamily: "微软雅黑",
                  fontSize: 12
                }
              },
              data : [0]
            }
@@ -519,14 +314,14 @@
            handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
            handleSize: '110%',
            handleStyle: {
              color: "#d3dee5"
              color: '#d3dee5'
            },
            textStyle: {
              color: "#fff"
              color: '#fff'
            },
            borderColor: "#90979c"
            borderColor: '#90979c'
          }, {
            type: "inside",
            type: 'inside',
            show: true,
            height: 15,
            start: 1,
@@ -542,29 +337,22 @@
                normal: {
                  color: function(params) {
                    let colorList = [
                      ["#6496e9","#6bded3"],
                      // ["#849db8","#b4b8cc"],
                      // ["#4fe1c5","#4ecee1"],
                      // // ["#9978fa","#88a1fa"],
                      // ["#ffbb65","#fdc68b"],
                    ];
                    // return colorList[params.dataIndex];
                    let colorItem = colorList[params.dataIndex];
                      ['#6496e9', '#6bded3']
                    ]
                    let colorItem = colorList[params.dataIndex]
                    return new echarts.graphic.LinearGradient(0,0,0,1,[{
                      offset:0,
                      color:'#6496e9'
                    },
                      {
                        offset:1,
                        color:"#6bded3"
                        color: '#6bded3'
                      }],false)
                  },
                  barBorderRadius: [5, 5, 0, 0],
                  barBorderRadius: [5, 5, 0, 0]
                }
              },
              data: [0],
              // barCategoryGap: '20%',
              // barGap : '-10%',
              markPoint : {
                data : [
                  {type : 'max', name: '最大值',symbolSize:70},
@@ -580,32 +368,24 @@
            {
              name: '关机时间',
              type: 'bar',
              //barWidth: 30,
              barWidth: 25,
              // barCategoryGap: '20%',
              // barGap : '-10%',
              itemStyle: {
                normal: {
                  color: function(params) {
                    let colorList = [
                      // ["#6496e9","#6bded3"],
                      ["#849db8","#b4b8cc"],
                      // ["#4fe1c5","#4ecee1"],
                      // ["#9978fa","#88a1fa"],
                      // ["#ffbb65","#fdc68b"],
                    ];
                    // return colorList[params.dataIndex];
                    let colorItem = colorList[params.dataIndex];
                      ['#849db8', '#b4b8cc']
                    ]
                    let colorItem = colorList[params.dataIndex]
                    return new echarts.graphic.LinearGradient(0,0,0,1,[{
                      offset:0,
                      color:"#849db8"
                      color: '#849db8'
                    },
                      {
                        offset:1,
                        color:"#b4b8cc"
                        color: '#b4b8cc'
                      }],false)
                  },
                  barBorderRadius: [5, 5, 0, 0],
                  barBorderRadius: [5, 5, 0, 0]
                }
              },
              data: [0],
@@ -622,7 +402,7 @@
              }
            }
          ]
        };
        }
        if(this.OpenCloseList != null){
          this.equipmentList = []
          this.openRate =[]
@@ -632,7 +412,6 @@
          for(var i = 0;i<this.OpenCloseList.length;i++){
              this.equipmentList.push(this.OpenCloseList[i].equipmentId)
              this.openRate.push((this.OpenCloseList[i].openRate*100).toFixed(2))
              // (this.openRate * 100).toFixed(2)
              this.utilizationRate.push((this.OpenCloseList[i].utilizationRate*100).toFixed(2))
              this.openLong.push(this.OpenCloseList[i].openLong)
              this.closeLong.push(this.OpenCloseList[i].closeLong)
@@ -643,12 +422,9 @@
          compAnalBarOption2.xAxis[0].data = this.equipmentList
          compAnalBarOption2.series[0].data = this.openLong
          compAnalBarOption2.series[1].data = this.closeLong
          compAnalBar1.setOption(compAnalBarOption1);
          compAnalBar2.setOption(compAnalBarOption2);
        }else{
          compAnalBar1.setOption(compAnalBarOption1);
          compAnalBar2.setOption(compAnalBarOption2);
        }
        compAnalBar1.setOption(compAnalBarOption1)
        compAnalBar2.setOption(compAnalBarOption2)
        window.addEventListener('resize', function() {
          compAnalBar1.resize()
          compAnalBar2.resize()
@@ -657,7 +433,3 @@
    }
  }
</script>
<style scoped>
</style>
src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisGauge.vue
@@ -1,9 +1,9 @@
<template>
  <div class="comparative_Gauge" style="width: 100%;height: 700px;display: flex;flex-direction: column;overflow: scroll">
    <div style="flex: 1;text-align:center;display: flex;flex-direction: column">
      <h3 style="height: 18px;margin: 0 auto;">利用率 Top 5</h3>
  <div class="outer-container">
    <div>
      <h3 style="margin: 0 auto;">利用率 Top 5</h3>
      <div style="flex: 1;display: flex;">
      <div style="flex: 1;display: flex">
        <div id="top1Gauge" class="div-inline"></div>
        <div id="top2Gauge" class="div-inline"></div>
        <div id="top3Gauge" class="div-inline"></div>
@@ -11,10 +11,11 @@
        <div id="top5Gauge" class="div-inline"></div>
      </div>
    </div>
    <div style="flex: 1;text-align:center;display: flex;flex-direction: column">
      <h3 style="height: 18px; margin: 0 auto;">利用率 Last 5</h3>
      <div style="flex: 1;display: flex;">
    <div>
      <h3 style="margin: 0 auto;">利用率 Last 5</h3>
      <div style="flex: 1;display: flex">
        <div id="last1Gauge" class="div-inline"></div>
        <div id="last2Gauge" class="div-inline"></div>
        <div id="last3Gauge" class="div-inline"></div>
@@ -26,7 +27,6 @@
</template>
<script>
  import * as echarts from 'echarts'
  export default {
    name: 'comparativeAnalysisGauge',
    props:{dataList:''},
@@ -57,26 +57,26 @@
    },
    watch:{
      dataList(val){
        console.log(val);
        console.log(val)
        this.TopLastList = val
        this.draw()
      },
      }
    },
    mounted(){
      this.draw();
      this.draw()
    },
    methods:{
      draw(){
       let gaugeTopChart1 = this.$echarts.init(document.getElementById('top1Gauge'),'macarons');
       let gaugeTopChart2 = this.$echarts.init(document.getElementById('top2Gauge'),'macarons');
       let gaugeTopChart3 = this.$echarts.init(document.getElementById('top3Gauge'),'macarons');
       let gaugeTopChart4 = this.$echarts.init(document.getElementById('top4Gauge'),'macarons');
       let gaugeTopChart5 = this.$echarts.init(document.getElementById('top5Gauge'),'macarons');
       let gaugeLastChart1 = this.$echarts.init(document.getElementById('last1Gauge'),'macarons');
       let gaugeLastChart2 = this.$echarts.init(document.getElementById('last2Gauge'),'macarons');
        let gaugeLastChart3 = this.$echarts.init(document.getElementById('last3Gauge'),'macarons');
        let gaugeLastChart4 = this.$echarts.init(document.getElementById('last4Gauge'),'macarons');
        let gaugeLastChart5 = this.$echarts.init(document.getElementById('last5Gauge'),'macarons');
        let gaugeTopChart1 = this.$echarts.init(document.getElementById('top1Gauge'), 'macarons')
        let gaugeTopChart2 = this.$echarts.init(document.getElementById('top2Gauge'), 'macarons')
        let gaugeTopChart3 = this.$echarts.init(document.getElementById('top3Gauge'), 'macarons')
        let gaugeTopChart4 = this.$echarts.init(document.getElementById('top4Gauge'), 'macarons')
        let gaugeTopChart5 = this.$echarts.init(document.getElementById('top5Gauge'), 'macarons')
        let gaugeLastChart1 = this.$echarts.init(document.getElementById('last1Gauge'), 'macarons')
        let gaugeLastChart2 = this.$echarts.init(document.getElementById('last2Gauge'), 'macarons')
        let gaugeLastChart3 = this.$echarts.init(document.getElementById('last3Gauge'), 'macarons')
        let gaugeLastChart4 = this.$echarts.init(document.getElementById('last4Gauge'), 'macarons')
        let gaugeLastChart5 = this.$echarts.init(document.getElementById('last5Gauge'), 'macarons')
        let gaugeTopOption1 = {
          title : {
            x : 'center',
@@ -84,7 +84,7 @@
            text : 'TOP1'
          },
          tooltip : {
            formatter: "{a} <br/>{b} : {c}%"
            formatter: '{a} <br/>{b} : {c}%'
          },
          series : [
            {
@@ -138,7 +138,7 @@
              data:[{value: 0, name: '利用率'}]
            }
          ]
        };
        }
        let  gaugeTopOption2 = {
          title : {
            x : 'center',
@@ -146,7 +146,7 @@
            text : 'TOP2'
          },
          tooltip : {
            formatter: "{a} <br/>{b} : {c}%"
            formatter: '{a} <br/>{b} : {c}%'
          },
          series : [
            {
@@ -200,7 +200,7 @@
              data:[{value: 0, name: '利用率'}]
            }
          ]
        };
        }
        let gaugeTopOption3 = {
          title : {
            x : 'center',
@@ -208,7 +208,7 @@
            text : 'TOP3'
          },
          tooltip : {
            formatter: "{a} <br/>{b} : {c}%"
            formatter: '{a} <br/>{b} : {c}%'
          },
          series : [
            {
@@ -262,7 +262,7 @@
              data:[{value: 0, name: '利用率'}]
            }
          ]
        };
        }
        let gaugeTopOption4 = {
          title : {
            x : 'center',
@@ -270,7 +270,7 @@
            text : 'TOP4'
          },
          tooltip : {
            formatter: "{a} <br/>{b} : {c}%"
            formatter: '{a} <br/>{b} : {c}%'
          },
          series : [
            {
@@ -324,7 +324,7 @@
              data:[{value: 0, name: '利用率'}]
            }
          ]
        };
        }
        let gaugeTopOption5 = {
          title : {
            x : 'center',
@@ -332,7 +332,7 @@
            text : 'TOP5'
          },
          tooltip : {
            formatter: "{a} <br/>{b} : {c}%"
            formatter: '{a} <br/>{b} : {c}%'
          },
          series : [
            {
@@ -386,7 +386,7 @@
              data:[{value: 0, name: '利用率'}]
            }
          ]
        };
        }
        let gaugeLessOption1 = {
          title : {
            x : 'center',
@@ -394,7 +394,7 @@
            text : 'LAST1'
          },
          tooltip : {
            formatter: "{a} <br/>{b} : {c}%"
            formatter: '{a} <br/>{b} : {c}%'
          },
          series : [
            {
@@ -448,7 +448,7 @@
              data:[{value: 0, name: '利用率'}]
            }
          ]
        };
        }
        let gaugeLessOption2 = {
          title : {
            x : 'center',
@@ -456,7 +456,7 @@
            text : 'LAST2'
          },
          tooltip : {
            formatter: "{a} <br/>{b} : {c}%"
            formatter: '{a} <br/>{b} : {c}%'
          },
          series : [
            {
@@ -510,7 +510,7 @@
              data:[{value: 0, name: '利用率'}]
            }
          ]
        };
        }
        let gaugeLessOption3 = {
          title : {
            x : 'center',
@@ -518,7 +518,7 @@
            text : 'LAST3'
          },
          tooltip : {
            formatter: "{a} <br/>{b} : {c}%"
            formatter: '{a} <br/>{b} : {c}%'
          },
          series : [
            {
@@ -572,7 +572,7 @@
              data:[{value: 0, name: '利用率'}]
            }
          ]
        };
        }
        let gaugeLessOption4 = {
          title : {
            x : 'center',
@@ -580,7 +580,7 @@
            text : 'LAST4'
          },
          tooltip : {
            formatter: "{a} <br/>{b} : {c}%"
            formatter: '{a} <br/>{b} : {c}%'
          },
          series : [
            {
@@ -634,7 +634,7 @@
              data:[{value: 0, name: '利用率'}]
            }
          ]
        };
        }
        let gaugeLessOption5 = {
          title : {
            x : 'center',
@@ -642,7 +642,7 @@
            text : 'LAST5'
          },
          tooltip : {
            formatter: "{a} <br/>{b} : {c}%"
            formatter: '{a} <br/>{b} : {c}%'
          },
          series : [
            {
@@ -696,7 +696,7 @@
              data:[{value: 0, name: '利用率'}]
            }
          ]
        };
        }
        if(this.TopLastList != null){
            this.utilizationRateTopOne=0
            this.utilizationRateTopOneEquipment = 'TOP1'
@@ -759,58 +759,58 @@
            }
          }
          gaugeTopOption1.title.text = this.utilizationRateTopOneEquipment
          gaugeTopOption1.series[0].data = [{value : (this.utilizationRateTopOne * 100).toFixed(2), name : '利用率'}];
          gaugeTopOption1.series[0].data = [{ value: (this.utilizationRateTopOne * 100).toFixed(2), name: '利用率' }]
          gaugeTopOption2.title.text = this.utilizationRateTopTwoEquipment
          gaugeTopOption2.series[0].data = [{value : (this.utilizationRateTopTwo * 100).toFixed(2), name : '利用率'}];
          gaugeTopOption2.series[0].data = [{ value: (this.utilizationRateTopTwo * 100).toFixed(2), name: '利用率' }]
          gaugeTopOption3.title.text = this.utilizationRateTopThreeEquipment
          gaugeTopOption3.series[0].data = [{value : (this.utilizationRateTopThree * 100).toFixed(2), name : '利用率'}];
          gaugeTopOption3.series[0].data = [{ value: (this.utilizationRateTopThree * 100).toFixed(2), name: '利用率' }]
          gaugeTopOption4.title.text = this.utilizationRateTopFourEquipment
          gaugeTopOption4.series[0].data = [{value : (this.utilizationRateTopFour * 100).toFixed(2), name : '利用率'}];
          gaugeTopOption4.series[0].data = [{ value: (this.utilizationRateTopFour * 100).toFixed(2), name: '利用率' }]
          gaugeTopOption5.title.text = this.utilizationRateTopFiveEquipment
          gaugeTopOption5.series[0].data = [{value : (this.utilizationRateTopFive * 100).toFixed(2), name : '利用率'}];
          gaugeTopOption5.series[0].data = [{ value: (this.utilizationRateTopFive * 100).toFixed(2), name: '利用率' }]
          gaugeLessOption1.title.text = this.utilizationRateLastOneEquipment
          gaugeLessOption1.series[0].data = [{value : (this.utilizationRateLastOne * 100).toFixed(2), name : '利用率'}];
          gaugeLessOption1.series[0].data = [{ value: (this.utilizationRateLastOne * 100).toFixed(2), name: '利用率' }]
          gaugeLessOption2.title.text = this.utilizationRateLastTwoEquipment
          gaugeLessOption2.series[0].data = [{value : (this.utilizationRateLastTwo * 100).toFixed(2), name : '利用率'}];
          gaugeLessOption2.series[0].data = [{ value: (this.utilizationRateLastTwo * 100).toFixed(2), name: '利用率' }]
          gaugeLessOption3.title.text = this.utilizationRateLastThreeEquipment
          gaugeLessOption3.series[0].data = [{value : (this.utilizationRateLastThree * 100).toFixed(2), name : '利用率'}];
          gaugeLessOption3.series[0].data = [{ value: (this.utilizationRateLastThree * 100).toFixed(2), name: '利用率' }]
          gaugeLessOption4.title.text = this.utilizationRateLastFourEquipment
          gaugeLessOption4.series[0].data = [{value : (this.utilizationRateLastFour * 100).toFixed(2), name : '利用率'}];
          gaugeLessOption4.series[0].data = [{ value: (this.utilizationRateLastFour * 100).toFixed(2), name: '利用率' }]
          gaugeLessOption5.title.text = this.utilizationRateLastFiveEquipment
          gaugeLessOption5.series[0].data = [{value : (this.utilizationRateLastFive * 100).toFixed(2), name : '利用率'}];
          gaugeTopChart1.setOption(gaugeTopOption1);
          gaugeTopChart2.setOption(gaugeTopOption2);
          gaugeTopChart3.setOption(gaugeTopOption3);
          gaugeTopChart4.setOption(gaugeTopOption4);
          gaugeTopChart5.setOption(gaugeTopOption5);
          gaugeLastChart1.setOption(gaugeLessOption1);
          gaugeLastChart2.setOption(gaugeLessOption2);
          gaugeLastChart3.setOption(gaugeLessOption3);
          gaugeLastChart4.setOption(gaugeLessOption4);
          gaugeLastChart5.setOption(gaugeLessOption5);
          gaugeLessOption5.series[0].data = [{ value: (this.utilizationRateLastFive * 100).toFixed(2), name: '利用率' }]
          gaugeTopChart1.setOption(gaugeTopOption1)
          gaugeTopChart2.setOption(gaugeTopOption2)
          gaugeTopChart3.setOption(gaugeTopOption3)
          gaugeTopChart4.setOption(gaugeTopOption4)
          gaugeTopChart5.setOption(gaugeTopOption5)
          gaugeLastChart1.setOption(gaugeLessOption1)
          gaugeLastChart2.setOption(gaugeLessOption2)
          gaugeLastChart3.setOption(gaugeLessOption3)
          gaugeLastChart4.setOption(gaugeLessOption4)
          gaugeLastChart5.setOption(gaugeLessOption5)
        }else{
          gaugeTopChart1.setOption(gaugeTopOption1);
          gaugeTopChart2.setOption(gaugeTopOption2);
          gaugeTopChart3.setOption(gaugeTopOption3);
          gaugeTopChart4.setOption(gaugeTopOption4);
          gaugeTopChart5.setOption(gaugeTopOption5);
          gaugeLastChart1.setOption(gaugeLessOption1);
          gaugeLastChart2.setOption(gaugeLessOption2);
          gaugeLastChart3.setOption(gaugeLessOption3);
          gaugeLastChart4.setOption(gaugeLessOption4);
          gaugeLastChart5.setOption(gaugeLessOption5);
          gaugeTopChart1.setOption(gaugeTopOption1)
          gaugeTopChart2.setOption(gaugeTopOption2)
          gaugeTopChart3.setOption(gaugeTopOption3)
          gaugeTopChart4.setOption(gaugeTopOption4)
          gaugeTopChart5.setOption(gaugeTopOption5)
          gaugeLastChart1.setOption(gaugeLessOption1)
          gaugeLastChart2.setOption(gaugeLessOption2)
          gaugeLastChart3.setOption(gaugeLessOption3)
          gaugeLastChart4.setOption(gaugeLessOption4)
          gaugeLastChart5.setOption(gaugeLessOption5)
        }
        gaugeTopChart1.setOption(gaugeTopOption1);
        gaugeTopChart2.setOption(gaugeTopOption2);
        gaugeTopChart3.setOption(gaugeTopOption3);
        gaugeTopChart4.setOption(gaugeTopOption4);
        gaugeTopChart5.setOption(gaugeTopOption5);
        gaugeLastChart1.setOption(gaugeLessOption1);
        gaugeLastChart2.setOption(gaugeLessOption2);
        gaugeLastChart3.setOption(gaugeLessOption3);
        gaugeLastChart4.setOption(gaugeLessOption4);
        gaugeLastChart5.setOption(gaugeLessOption5);
        gaugeTopChart1.setOption(gaugeTopOption1)
        gaugeTopChart2.setOption(gaugeTopOption2)
        gaugeTopChart3.setOption(gaugeTopOption3)
        gaugeTopChart4.setOption(gaugeTopOption4)
        gaugeTopChart5.setOption(gaugeTopOption5)
        gaugeLastChart1.setOption(gaugeLessOption1)
        gaugeLastChart2.setOption(gaugeLessOption2)
        gaugeLastChart3.setOption(gaugeLessOption3)
        gaugeLastChart4.setOption(gaugeLessOption4)
        gaugeLastChart5.setOption(gaugeLessOption5)
        window.addEventListener('resize', function() {
          gaugeTopChart1.resize()
          gaugeTopChart2.resize()
@@ -829,8 +829,20 @@
  }
</script>
<style scoped>
<style lang="less" scoped>
  .outer-container {
    height: 100%;
    overflow: auto;
    > div {
      height: 320px;
      display: flex;
      flex-direction: column
    }
  .div-inline{
    flex: 1;
      width: 20%;
      height: 100%;
    }
  }
</style>
src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue
@@ -1,13 +1,13 @@
<template>
  <div :bordered="false" class="device_list">
    <div class="com_box">
  <div class="device_list">
      <!-- æŸ¥è¯¢åŒºåŸŸ -->
      <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper">
    <div style="background-color: #fff" class="table-page-search-wrapper">
        <a-form layout="inline" @keyup.enter.native="searchQuery">
          <a-row :gutter="24">
            <a-col :md="5" :sm="5">
              <a-form-item label="设备">
                <a-input-search :readOnly="true" v-model="queryParam.equipmentId" @search="deviceSearch" @click="deviceSearch"
              <a-input-search readOnly v-model="queryParam.equipmentId" @search="deviceSearch"
                              @click="deviceSearch"
                                placeholder='请选择设备'/>
              </a-form-item>
            </a-col>
@@ -37,65 +37,45 @@
          </a-row>
        </a-form>
      </div>
      <!-- table区域-begin -->
      <div id="DeviceList">
        <a-tabs :activeKey="activeKey" @change="tabChange" tabPosition="top">
    <a-spin :spinning="spinning">
      <a-tabs tabPosition="top" id="custom-tabs">
          <a-tab-pane key="1" tab="图形">
            <ComparativeAnalysisBar ref="AnalysisBar" :dataList='AnalysisBarList'></ComparativeAnalysisBar>
          <ComparativeAnalysisBar ref="AnalysisBar" :dataList='AnalysisBarList'/>
          </a-tab-pane>
          <a-tab-pane key="2" tab="仪表" forceRender>
            <ComparativeAnalysisGauge ref="AnalysisGauge" :dataList="AnalysisGauge"></ComparativeAnalysisGauge>
          <ComparativeAnalysisGauge ref="AnalysisGauge" :dataList="AnalysisGauge"/>
          </a-tab-pane>
          <a-tab-pane key="3" tab="饼图" forceRender>
            <ComparativeAnalysisPie ref="AnalysisPie" :dataList="AnalysisPie"></ComparativeAnalysisPie>
          <ComparativeAnalysisPie ref="AnalysisPie" :dataList="AnalysisPie"/>
          </a-tab-pane>
        </a-tabs>
      </div>
      <!-- table区域-end -->
    </div>
    </a-spin>
    <SelectDeviceDrawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'选择设备'"></SelectDeviceDrawer>
    <SelectDeviceDrawer ref="selectDeviceDrawer" @selectFinished="selectOK" :title="'选择设备'"/>
  </div>
</template>
<script>
  import moment from 'moment'
  import $ from 'jquery'
  import JDictSelectTag from '@/components/dict/JDictSelectTag'
  import JDate from '../../../../../components/jeecg/JDate'
  import {
    requestPut,
    deleteAction,
    getAction
  } from '@/api/manage'
  import { getAction } from '@/api/manage'
  import api from '@/api/mdc'
  import ComparativeAnalysisBar from './ComparativeAnalysisBar'
  import ComparativeAnalysisGauge from './ComparativeAnalysisGauge'
  import ComparativeAnalysisPie from './ComparativeAnalysisPie'
  import '@/components/table2excel/table2excel'
  import JInput from '@/components/jeecg/JInput'
  import JEllipsis from '@/components/jeecg/JEllipsis'
  import Tooltip from 'ant-design-vue/es/tooltip'
  import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
  import api from '@/api/mdc'
  import SelectDeviceDrawer from '../../../../system/modules/SelectDeviceDrawer.vue'
  export default {
    name: 'ComparativeAnalysisMain',
    components: {
      Tooltip,
      ComparativeAnalysisBar,
      ComparativeAnalysisGauge,
      ComparativeAnalysisPie,
      JDictSelectTag,
      JInput,
      JDate,
      JEllipsis,
      SelectDeviceDrawer
    },
    props: { nodeTree: '', Type: '', nodePeople: '' },
    data() {
      return {
        activeKey: '1',
        typeTree: '',
        typeParent: 1,
        typeEquipment: 1,
@@ -103,38 +83,31 @@
        AnalysisGauge: [],
        AnalysisPie: [],
        dates: [],
        xianshi: '',
        readOnly: true,
        queryParam: {
          equipmentId: ''
        },
        queryParams: {},
        queryParamEquip: {},
        queryParamPeople: {},
        dataStartsoucre: [],
        url: {
          comparativeAnalysis: '/mdc/efficiencyReport/comparativeAnalysis'
        },
        AnalysisList: {},
        driveTypeList: []
        driveTypeList: [],
        spinning: false
      }
    },
    watch: {
      Type(valmath) {
        this.dataList = []
        this.queryParams.typeTree = valmath
        // console.log(this.queryParams.typeTree)
      },
      nodeTree(val) { //监听currSelected å˜åŒ–,将变化后的数值传递给 getCurrSelected äº‹ä»¶
        if (JSON.stringify(val) != '{}') {
          if (val.equipmentId) {
            // this.$set(this.queryParam, 'tierName', val.title)
            this.queryParamEquip.parentId = ''
            // this.queryParams.equipmentId = val.equipmentId
            this.queryParam.equipmentId = val.equipmentId
            this.queryParamEquip.equipmentId = val.equipmentId
          } else {
            // this.$set(this.queryParam, 'tierName', val.title)
            this.queryParamEquip.parentId = val.key
            this.queryParams.equipmentId = ''
          }
@@ -144,12 +117,10 @@
      nodePeople(val) {
        if (JSON.stringify(val) != '{}') {
          if (val.equipmentId) {
            // this.$set(this.queryParam, 'tierName', val.title)
            this.queryParamEquip.parentId = ''
            this.queryParams.equipmentId = val.equipmentId
            this.queryParamEquip.equipmentId = val.equipmentId
          } else {
            // this.$set(this.queryParam, 'tierName', val.title)
            this.queryParamEquip.parentId = val.key
            this.queryParams.equipmentId = ''
          }
@@ -157,19 +128,29 @@
        }
      }
    },
    methods: {
      tabChange(val) {
        this.activeKey = val
    created() {
      this.dates = [moment().subtract('days', 7), moment().subtract('days', 0)]
      this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD')
      this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
      this.queryParam.typeTree = '1'
      this.loadAnalysis()
      this.getDriveTypeByApi()
      },
    mounted() {
      const tabsBar = document.querySelector('#custom-tabs .ant-tabs-bar')
      const tabsContent = document.querySelector('#custom-tabs .ant-tabs-content')
      const tabsBarHeight = window.getComputedStyle(tabsBar).height
      const tabsBarMarginBottom = window.getComputedStyle(tabsBar).marginBottom
      tabsContent.style.height = `calc(100% - ${tabsBarHeight} - ${tabsBarMarginBottom})`
    },
    methods: {
      dateParamChange(v1, v2) {
        // console.log(v1,v2)
        this.queryParam.startTime = v2[0]
        this.queryParam.endTime = v2[1]
        console.log(v2[0], v2[1])
      },
      loadAnalysis() {
        this.spinning = true
        getAction(this.url.comparativeAnalysis, this.queryParam).then(res => {
          if (res.success) {
            this.AnalysisList = res.result
@@ -180,7 +161,7 @@
            this.$message.warning(res.message)
          }
        }).finally(() => {
          this.loading = false
          this.spinning = false
        })
      },
@@ -191,32 +172,14 @@
        this.AnalysisPie = []
        if (this.queryParams.typeTree == '1') {
          this.queryParams.parentId = this.queryParamEquip.parentId
          // this.queryParams.equipmentId =  this.queryParamEquip.equipmentId
        } else {
          this.queryParams.parentId = this.queryParamEquip.parentId
          // this.queryParams.equipmentId = ""
        }
        this.AnalysisList = []
        //获取查询条件
        this.queryParam.parentId = this.queryParams.parentId
        // this.queryParam.equipmentId = this.queryParams.equipmentId
        this.queryParam.typeTree = this.queryParams.typeTree
        getAction(this.url.comparativeAnalysis, this.queryParam).then((res) => {
          if (res.success) {
            this.AnalysisList = res.result
            this.AnalysisBarList = res.result.graphics
            this.AnalysisGauge = res.result.meters
            this.AnalysisPie.push(res.result.pieCharts)
          } else {
            // this.$message.warning(res.message)
            this.$notification.warning({
              message: '消息',
              description: res.message
            })
          }
        }).finally(() => {
          this.loading = false
        })
        this.loadAnalysis()
      },
      searchReset() {
@@ -246,21 +209,6 @@
              this.queryParams.equipmentId = this.queryParamEquip.equipmentId
            }
          }
          getAction(this.url.comparativeAnalysis, this.queryParams).then((res) => {
            if (res.success) {
              this.AnalysisList = res.result
              this.AnalysisBarList = res.result.graphics
              this.AnalysisGauge = res.result.meters
              this.AnalysisPie.push(res.result.pieCharts)
            } else {
              this.$notification.warning({
                message: '消息',
                description: res.message
              })
            }
          }).finally(() => {
            this.loading = false
          })
        } else {
          this.typeTree = this.queryParams.typeTree
          this.typeParent = this.queryParams.parentId
@@ -283,22 +231,8 @@
              this.queryParams.equipmentId = this.queryParamEquip.equipmentId
            }
          }
          getAction(this.url.comparativeAnalysis, this.queryParams).then((res) => {
            if (res.success) {
              this.AnalysisList = res.result
              this.AnalysisBarList = res.result.graphics
              this.AnalysisGauge = res.result.meters
              this.AnalysisPie.push(res.result.pieCharts)
            } else {
              this.$notification.warning({
                message: '消息',
                description: res.message
              })
            }
          }).finally(() => {
            this.loading = false
          })
        }
        this.loadAnalysis()
      },
      /**
@@ -334,81 +268,60 @@
       * @param data å·²é€‰æ‹©çš„设备
       */
      selectOK(data) {
        console.log('data=', data)
        this.queryParam.equipmentId = data.join(',')
        console.log('queryParam', this.queryParam.equipmentId)
      }
    },
    created() {
      this.dates = [moment().subtract('days', 7), moment().subtract('days', 0)]
      this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD')
      this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
      this.queryParam.typeTree = '1'
      this.loadAnalysis()
      this.getDriveTypeByApi()
    }
  }
</script>
<style lang="less" scoped>
  /*@import '~@assets/less/common.less';*/
  .device_list {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /deep/ .ant-spin-nested-loading {
      flex: 1;
      overflow: hidden;
      .ant-spin-container {
        height: 100%;
        .ant-tabs {
          height: 100%;
          overflow: hidden;
        }
      }
    }
  }
  @media screen and (min-width: 1920px) {
    .device_list {
      height: 811px !important;
      overflow: scroll;
    }
  }
  @media screen and (min-width: 1680px) and (max-width: 1920px) {
    .device_list {
      height: 811px !important;
      overflow: scroll;
    }
  }
  @media screen and (min-width: 1400px) and (max-width: 1680px) {
    .device_list {
      height: 663px !important;
      overflow: scroll;
    }
  }
  @media screen and (min-width: 1280px) and (max-width: 1400px) {
    .device_list {
      height: 564px !important;
      overflow: scroll;
    }
  }
  @media screen and (max-width: 1280px) {
    .device_list {
      height: 564px !important;
      overflow: scroll;
    }
  }
  /*.device_list{*/
  /*display: flex;*/
  /*}*/
  /*.device_list .table-page-search-wrapper{*/
  /**/
  /*}*/
  /deep/ .ant-card-body {
    height: 100% !important;
  }
  .device_list .com_box {
    display: flex !important;
    height: 100% !important;
    flex-direction: column !important;
  }
  .device_list .table-page-search-wrapper {
    height: 6% !important;
  }
  .device_list #DeviceList {
    height: 90% !important;
  }
</style>
src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisPie.vue
@@ -1,14 +1,13 @@
<template>
  <div class="comparative_pie" style="width: 100%;height: 600px;display: flex;overflow: scroll">
    <div id="compAnalPie1" style="flex: 1;"></div>
    <div id="compAnalPie2" style="flex: 1;"></div>
  <div style="display: flex;height: 100%;overflow: auto">
    <div id="compAnalPie1" style="width:50%;height:600px"></div>
    <div id="compAnalPie2" style="width:50%;height:600px"></div>
  </div>
</template>
<script>
  import * as echarts from 'echarts'
  export default {
    name: 'conparativeAnalysisPie',
    name: 'comparativeAnalysisPie',
    props:{ dataList:''},
    data(){
      return{
@@ -19,23 +18,19 @@
        RateList:[]
      }
    },
    created(){
    },
    watch:{
      dataList(val){
        this.RateList = val
        console.log(val)
        this.drawTu()
      },
      }
    },
    mounted() {
      this.drawTu()
    },
    methods:{
      drawTu(){
       let pieCompChart1 = this.$echarts.init(document.getElementById('compAnalPie1'),'macarons');
       let pieCompChart2 = this.$echarts.init(document.getElementById('compAnalPie2'),'macarons');
        let pieCompChart1 = this.$echarts.init(document.getElementById('compAnalPie1'), 'macarons')
        let pieCompChart2 = this.$echarts.init(document.getElementById('compAnalPie2'), 'macarons')
       let pieCompChartOption1 = {
          title: {
            x: 'center',
@@ -43,7 +38,7 @@
          },
          tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
            formatter: '{a} <br/>{b} : {c} ({d}%)'
          },
          legend: {
            orient: 'vertical',
@@ -60,7 +55,7 @@
            itemStyle: {
              normal: {
                color: function (params) {
                  var colorList = ['#4169E1', '#A8A8A8'];
                  var colorList = ['#4169E1', '#A8A8A8']
                  return colorList[params.dataIndex]
                },
                label: {
@@ -73,7 +68,7 @@
            data: [{value: 0, name: '开机率'},
              {value: 0, name: '关机率'}]
          }]
        };
        }
       let pieCompChartOption2 = {
          title: {
            x: 'center',
@@ -81,7 +76,7 @@
          },
          tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
            formatter: '{a} <br/>{b} : {c} ({d}%)'
          },
          legend: {
            orient: 'vertical',
@@ -98,7 +93,7 @@
            itemStyle: {
              normal: {
                color: function (params) {
                  var colorList = ['#00ee00', '#FCCE10', '#A8A8A8'];
                  var colorList = ['#00ee00', '#FCCE10', '#A8A8A8']
                  return colorList[params.dataIndex]
                },
                label: {
@@ -112,7 +107,7 @@
              {value: 0, name: '待机率'},
              {value: 0, name: '关机率'}]
          }]
        };
        }
        if(this.RateList != null){
          this.closeRate =[]
          this.openRate =[]
@@ -123,22 +118,31 @@
            this.openRate=this.RateList[0].openRate
            this.usedRate=this.RateList[0].processRate
            this.waitRate=this.RateList[0].waitRate
            pieCompChartOption1.series[0].data = [{value:(this.openRate * 100).toFixed(2), name:'开机率'},{value:(this.closeRate * 100).toFixed(2), name:'关机率'}];
            pieCompChartOption2.series[0].data = [{value:(this.usedRate * 100).toFixed(2), name:'加工率'},{value:(this.waitRate * 100).toFixed(2), name:'待机率'},{value:(this.closeRate * 100).toFixed(2), name:'关机率'}];
            pieCompChart1.setOption(pieCompChartOption1);
            pieCompChart2.setOption(pieCompChartOption2);
            pieCompChartOption1.series[0].data = [{
              value: (this.openRate * 100).toFixed(2),
              name: '开机率'
            }, { value: (this.closeRate * 100).toFixed(2), name: '关机率' }]
            pieCompChartOption2.series[0].data = [{
              value: (this.usedRate * 100).toFixed(2),
              name: '加工率'
            }, { value: (this.waitRate * 100).toFixed(2), name: '待机率' }, {
              value: (this.closeRate * 100).toFixed(2),
              name: '关机率'
            }]
            pieCompChart1.setOption(pieCompChartOption1)
            pieCompChart2.setOption(pieCompChartOption2)
          }else{
            pieCompChart1.setOption(pieCompChartOption1);
            pieCompChart2.setOption(pieCompChartOption2);
            pieCompChart1.setOption(pieCompChartOption1)
            pieCompChart2.setOption(pieCompChartOption2)
          }
        }else{
          pieCompChart1.setOption(pieCompChartOption1);
          pieCompChart2.setOption(pieCompChartOption2);
          pieCompChart1.setOption(pieCompChartOption1)
          pieCompChart2.setOption(pieCompChartOption2)
        }
        pieCompChart1.setOption(pieCompChartOption1);
        pieCompChart2.setOption(pieCompChartOption2);
        pieCompChart1.setOption(pieCompChartOption1)
        pieCompChart2.setOption(pieCompChartOption2)
        window.addEventListener('resize', function() {
          pieCompChart1.resize()
          pieCompChart2.resize()
@@ -147,7 +151,3 @@
    }
  }
</script>
<style scoped>
</style>
src/views/mdc/base/modules/shift/ShiftInfo.vue
@@ -2,7 +2,7 @@
  <div class="shift_info">
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div class="table-operator">
      <a-button type="primary" v-if="Object.keys(shiftSystemRow).length>0" @click="handleAdd" icon="plus">配置</a-button>
      <a-button type="primary" :disabled="Object.keys(shiftSystemRow).length===0" @click="handleAdd" icon="plus">配置</a-button>
    </div>
    <!-- table区域-begin -->
    <div style="width: 100%;flex: 1;overflow: auto">
src/views/mdc/base/modules/shift/ShiftSystem.vue
@@ -6,7 +6,7 @@
    </div>
    <!-- table区域-begin -->
    <div style="flex: 1;overflow: auto">
      <a-table ref="table" bordered size="middle" rowKey="id" :columns="columns"
      <a-table ref="table" bordered size="middle" rowKey="id" :columns="columns" :customRow="customRow"
               :dataSource="dataSource" :pagination="false" :loading="loading"
               :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio'}">
         <span
@@ -54,18 +54,14 @@
      </a-table>
    </div>
    <shift-system-model ref="modalForm" @ok="modalFormOk"></shift-system-model>
    <shift-system-model ref="modalForm" @ok="loadData"></shift-system-model>
  </div>
</template>
<script>
  import qs from 'qs'
  import {
    requestPut, putAction, deleteAction,postAction
  } from '@/api/manage'
  import {
    JeecgListMixin
  } from '@/mixins/JeecgListMixin'
  import { putAction, deleteAction, postAction } from '@/api/manage'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import ShiftSystemModel from './ShiftSystemModel'
  export default {
@@ -76,15 +72,7 @@
    },
    data() {
      return {
        statusName: '',
        disabled: true,
        disableMixinCreated: false,
        url: {
          list: '/mdc/mdcMdcShift/queryPageList',
          changeStatus: '/mdc/mdcMdcShift/changeStatus',
          deleteBatch:'/mdc/mdcMdcShift/deleteShift',
          changeDefaultShift: '/mdc/mdcMdcShift/changeDefaultShift'
        },
        columns: [
          {
            title: '班制',
@@ -109,7 +97,13 @@
            dataIndex: 'action',
            scopedSlots: { customRender: 'action' }
          }
        ]
        ],
        url: {
          list: '/mdc/mdcMdcShift/queryPageList',
          changeStatus: '/mdc/mdcMdcShift/changeStatus',
          deleteBatch: '/mdc/mdcMdcShift/deleteShift',
          changeDefaultShift: '/mdc/mdcMdcShift/changeDefaultShift'
        }
      }
    },
    methods: {
@@ -126,7 +120,7 @@
            _this.$notification.warning({
              message:'消息',
              description:res.message
            });
            })
          }
        })
      },
@@ -142,39 +136,39 @@
              this.$notification.success({
                message:'消息',
                description:res.message
              });
            })
              this.loadData()
            }else{
              // this.$message.success(res.message);
              this.$notification.warning({
                message:'消息',
                description:res.message
              });
            })
            }
        })
      },
      handleDelete: function(record){
        if(!this.url.deleteBatch){
          this.$message.error("请设置url.delete属性!")
          this.$message.error('请设置url.delete属性!')
          return
        }
        var that = this;
        var that = this
        deleteAction(that.url.deleteBatch, {id: record}).then((res) => {
          if (res.success) {
            // that.$message.success(res.message);
            that.$notification.success({
              message:'消息',
              description:res.message
            });
            that.loadData();
            })
            that.loadData()
          } else {
            // that.$message.warning(res.message);
            that.$notification.warning({
              message:'消息',
              description:res.message
            });
            })
          }
        });
        })
      },
      handleEdit(record) {
        this.$refs.modalForm.edit(record)
@@ -183,14 +177,24 @@
      },
      onSelectChange(selectedRowKeys, selectionRows) {
        this.selectedRowKeys = selectedRowKeys;
        this.selectionRows = selectionRows;
        this.selectedRowKeys = selectedRowKeys
        this.selectionRows = selectionRows
        this.$emit('selectionShiftRow', this.selectionRows[0])
      },
    },
    created() {
    }
      customRow(record) {
        return {
          style: {
            cursor: 'pointer'
          },
          on: {
            click: () => {
              this.onSelectChange([record.id], [record])
            }
          }
        }
      }
    }
  }
</script>
@@ -206,21 +210,25 @@
      height: 748px!important;
    }
  }
  @media screen and (min-width: 1680px) and (max-width: 1920px){
    .shift_system{
      height: 748px!important;
    }
  }
  @media screen and (min-width: 1400px) and (max-width: 1680px){
    .shift_system{
      height: 600px!important;
    }
  }
  @media screen and (min-width: 1280px) and (max-width: 1400px){
    .shift_system{
      height: 501px!important;
    }
  }
  @media screen and (max-width: 1280px){
    .shift_system{
      height: 501px!important;