src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue
@@ -21,7 +21,7 @@
                </a-select>
              </a-form-item>
            </a-col>
            <a-col :md="5" :sm="5" :xs="5">
            <a-col :md="6" :sm="6" :xs="6">
              <a-form-item label="驱动类型">
                <a-select
                  :value="queryParams.driveType"
@@ -37,20 +37,16 @@
                </a-select>
              </a-form-item>
            </a-col>
            <a-col :md="4" :sm="4" :xs="4">
              <a-form-item label="设备级别">
                <a-select
                  :value="queryParams.deviceLevel"
                  mode="multiple"
                  placeholder="请选择设备级别"
                  allow-clear
                  :maxTagCount="1"
                  @change="selectChange($event,'deviceLevel')"
                >
                  <a-select-option v-for="(item,index) in device_level_list" :value="item.value" :key="index">
                    {{item.label}}
                  </a-select-option>
                </a-select>
            <a-col :md="5" :sm="5" :xs="5">
              <a-form-item label="时间">
                <a-range-picker
                  :placeholder="['开始时间', '结束时间']"
                  format="YYYY-MM"
                  :value="dates"
                  :mode="['month', 'month']"
                  @panelChange="dateParamChange"
                  @change="handleDateChange"
                />
              </a-form-item>
            </a-col>
            <a-col :md="5" :sm="5" :xs="5">
@@ -69,19 +65,68 @@
                </a-select>
              </a-form-item>
            </a-col>
            <a-col :md="2" :sm="2">
              <a
                @click="toggleSearchStatus=!toggleSearchStatus"
                @selectstart="$event.preventDefault()"
                style="display: inline-block;height: 32px;line-height: 32px"
              >
                {{ toggleSearchStatus ? '收起' : '展开' }}
                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
              </a>
            </a-col>
          </a-row>
          <a-row :gutter="24" v-if="toggleSearchStatus">
            <a-col :md="5" :sm="5" :xs="5">
              <a-form-item label="时间">
                <a-range-picker
                  :placeholder="['开始时间', '结束时间']"
                  format="YYYY-MM"
                  :value="dates"
                  :mode="['month', 'month']"
                  @panelChange="dateParamChange"
                  @change="handleDateChange"
                />
              <a-form-item label="设备级别">
                <a-select
                  :value="queryParams.deviceLevel"
                  mode="multiple"
                  placeholder="请选择设备级别"
                  allow-clear
                  :maxTagCount="1"
                  @change="selectChange($event,'deviceLevel')"
                >
                  <a-select-option v-for="(item,index) in device_level_list" :value="item.value" :key="index">
                    {{item.label}}
                  </a-select-option>
                </a-select>
              </a-form-item>
            </a-col>
            <!--<a-col :md="5" :sm="5" :xs="5">-->
              <!--<a-form-item label="数据分布">-->
                <!--<a-select-->
                  <!--:value="queryParams.deviceLevel"-->
                  <!--mode="multiple"-->
                  <!--placeholder="请选择数据分布"-->
                  <!--allow-clear-->
                  <!--:maxTagCount="1"-->
                  <!--@change="selectChange($event,'deviceLevel')"-->
                <!--&gt;-->
                  <!--<a-select-option v-for="(item,index) in device_level_list" :value="item.value" :key="index">-->
                    <!--{{item.label}}-->
                  <!--</a-select-option>-->
                <!--</a-select>-->
              <!--</a-form-item>-->
            <!--</a-col>-->
            <a-col :md="5" :sm="5" :xs="5">
              <a-form-item label="重要程度">
                <a-select
                  :value="queryParams.deviceImportanceLevel"
                  mode="multiple"
                  placeholder="请选择设备重要程度"
                  allow-clear
                  :maxTagCount="1"
                  @change="selectChange($event,'deviceImportanceLevel')"
                >
                  <a-select-option v-for="(item,index) in device_importance_level_list" :value="item.value"
                                   :key="index">
                    {{item.label}}
                  </a-select-option>
                </a-select>
              </a-form-item>
            </a-col>
          </a-row>
          <a-row :gutter="24" style="margin-bottom: 20px">
@@ -105,9 +150,9 @@
      <a-table :columns="columns" rowKey="id" :dataSource="dataSource.records?dataSource.records:[]"
               :loading="tableLoading"
               :pagination="false" :scroll="{x:'max-content',y:scrollY}" bordered>
        <template slot="equipmentModel" slot-scope="text, record">
          <editable-cell :text="text" @change="onCellChange(record.id, 'equipmentModel', $event)"/>
        </template>
        <!--<template slot="equipmentModel" slot-scope="text, record">-->
        <!--<editable-cell :text="text" @change="onCellChange(record.id, 'equipmentModel', $event)"/>-->
        <!--</template>-->
      </a-table>
    </div>
    <!--<div class="pagination">-->
@@ -134,11 +179,11 @@
  import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
  import api from '@api/mdc'
  import EditableCell from './EditableCell.vue'
  // import EditableCell from './EditableCell.vue'
  export default {
    name: 'OEEAnalysisList',
    components: { EditableCell },
    components: {},
    data() {
      return {
        dates: [moment().subtract('month', 1), moment().subtract('month', 1)],
@@ -150,7 +195,8 @@
          equipmentType: [],
          driveType: [],
          deviceLevel: [],
          deviceCategory: []
          deviceCategory: [],
          deviceImportanceLevel: []
        },
        queryParamEquip: {},
        queryParamPeople: {},
@@ -163,7 +209,7 @@
            title: '序号',
            dataIndex: '',
            key: 'rowIndex',
            width: 70,
            width: 60,
            align: 'center',
            customRender: function(t, r, index) {
              return parseInt(index) + 1
@@ -173,10 +219,10 @@
            title: '车间',
            align: 'center',
            dataIndex: 'productionName',
            width: 200
            width: 110
          },
          {
            title: '设备统一编号',
            title: '设备编号',
            align: 'center',
            dataIndex: 'equipmentId',
            width: 120
@@ -184,13 +230,13 @@
          {
            title: '设备名称',
            align: 'center',
            width: 200,
            width: 120,
            dataIndex: 'equipmentName'
          },
          {
            title: '设备型号',
            align: 'center',
            width: 200,
            width: 120,
            dataIndex: 'equipmentModel',
            scopedSlots: { customRender: 'equipmentModel' }
          },
@@ -203,32 +249,32 @@
          {
            title: '班次',
            align: 'center',
            width: 300,
            width: 100,
            dataIndex: 'shift'
          },
          {
            title: '每班小时',
            dataIndex: 'shiftTimeCount',
            align: 'center',
            width: 110
            width: 100
          },
          {
            title: '加班时间(分钟)',
            dataIndex: 'overtime',
            align: 'center',
            width: 110
            width: 100
          },
          {
            title: '实际班产天数',
            dataIndex: 'actualWorkDayCount',
            align: 'center',
            width: 120
            width: 100
          },
          {
            title: '月度实际班产总时间(分钟)',
            dataIndex: 'monthActualWorkDayTimeCount',
            align: 'center',
            width: 110
            width: 100
          },
          {
            title: '非计划停机损失(分钟)(一个月)',
@@ -255,7 +301,7 @@
                title: '计划等任务',
                dataIndex: 'plannedTaskDuration',
                align: 'center',
                width: 110
                width: 100
              },
              {
                title: '检验',
@@ -284,45 +330,45 @@
                title: '会议/培训',
                dataIndex: 'conferenceTrainingDuration',
                align: 'center',
                width: 110
                width: 100
              },
              {
                title: '其他休息等',
                dataIndex: 'otherRestDuration',
                align: 'center',
                width: 110
                width: 100
              }]
          },
          {
            title: '负荷时间(小时)',
            dataIndex: 'loadTime',
            align: 'center',
            width: 110
            width: 100
          },
          {
            title: '时间开动率',
            dataIndex: 'timeActuationRate',
            align: 'center',
            width: 110,
            width: 100,
            customRender: text => text != 0 ? parseFloat((text * 100).toFixed(2)) + '%' : 0
          },
          {
            title: '加工零件数(件)',
            dataIndex: 'processQuantity',
            align: 'center',
            width: 120
          },
          {
            title: '标准加工时间(分钟)',
            dataIndex: 'standardProcessDuration',
            align: 'center',
            width: 120
          },
          // {
          //   title: '加工零件数(件)',
          //   dataIndex: 'processQuantity',
          //   align: 'center',
          //   width: 120
          // },
          // {
          //   title: '标准加工时间(分钟)',
          //   dataIndex: 'standardProcessDuration',
          //   align: 'center',
          //   width: 120
          // },
          {
            title: '性能开动率',
            dataIndex: 'performanceRate',
            align: 'center',
            width: 110,
            width: 100,
            customRender: text => text != 0 ? parseFloat((text * 100).toFixed(2)) + '%' : 0
          },
          {
@@ -342,7 +388,7 @@
            title: '设备综合效率',
            dataIndex: 'overallEquipmentEfficiency',
            align: 'center',
            width: 120,
            width: 100,
            customRender: text => text != 0 ? parseFloat((text * 100).toFixed(2)) + '%' : 0
          }
        ],
@@ -352,7 +398,8 @@
        device_level_list: [],
        device_category_list: [],
        scrollY: 465,
        tableLoading: false
        tableLoading: false,
        toggleSearchStatus: false
      }
    },
    props: { nodeTree: '', Type: '', nodePeople: '' },
@@ -373,6 +420,7 @@
      this.queryGroup()
      this.initDictData('device_level')
      this.initDictData('device_category')
      this.initDictData('device_importance_level')
    },
    mounted() {
      window.addEventListener('resize', this.handleWindowResize)