qushaowei
2023-12-13 41d50b20c975faeaa9e5277bdcff13b5acecb575
Merge branch 'master' of http://117.34.109.166:18448/r/vue_mdc_430 into develop
已添加3个文件
已修改42个文件
5059 ■■■■■ 文件已修改
src/assets/lxzn_white.png 补丁 | 查看 | 原始文档 | blame | 历史
src/components/layouts/UserLayout.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/page/GlobalHeader.vue 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tools/Logo.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tools/UserMenu.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tools/UserPassword.vue 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/defaultSettings.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/WorkshopSignage.vue 83 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/DeviceProcessReport.vue 139 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/EfficiencyPOReport.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/EfficiencyReport.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/MdcUtilizationRateList.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/DepartList/DepartListTree/DepartTree.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue 439 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/HolidayManagement/HolidayManagementModal.vue 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue 75 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue 166 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModal.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/WorkshopSignage/EquipmentDetailModal.vue 91 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue 376 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue 358 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/deviceBaseInfo/EqumentDetaiModel.vue 87 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/deviceRepair/DeviceRepairModel.vue 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue 195 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue 1215 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue 292 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/equipmentAvailCompare/equipmentAvailCompareMain.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/equipmentDayAvail/equipmentDayAvailMain.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigForm.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/mdcPassRate/mdcPassRateModal.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModal.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/mdcUtilizationRate/MdcUtilizationRateModel.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/common/BaseTree.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/ProductionManager.vue 375 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/UserList.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/WorkshopSignageManagement.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/modules/PasswordModal.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/modules/ProductionManager/ProductionModal.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/modules/SelectDeviceModal.vue 527 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/modules/UserModal.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/user/Login.vue 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/user/LoginAccount.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/lxzn_white.png
src/components/layouts/UserLayout.vue
@@ -5,7 +5,7 @@
        <div class="header">
          <a href="/">
            <img src="~@/assets/lxzn.png" class="logo" alt="logo">
            <span class="title">统计分析</span>
            <span class="title">MDC智慧车间</span>
          </a>
        </div>
        <!--<div class="desc">-->
src/components/page/GlobalHeader.vue
@@ -25,7 +25,11 @@
    <div v-else :class="['top-nav-header-index', theme]">
      <div class="header-index-wide">
        <div class="header-index-left" :style="topMenuStyle.headerIndexLeft">
          <logo class="top-nav-header" :show-title="device !== 'mobile'" :style="topMenuStyle.topNavHeader"/>
          <logo class="top-nav-header" :show-title="showTitle" :style="topMenuStyle.topNavHeader"/>
          <div class="top-nav-text">
            <div style="width:100%;height: 50%;line-height:35px">密级:内部</div>
            <div style="width:100%;height: 50%;line-height:25px">警告:本系统禁止存储、处理、传输涉密信息</div>
          </div>
          <div v-if="device !== 'mobile'" :style="topMenuStyle.topSmenuStyle">
            <s-menu
              mode="horizontal"
@@ -58,7 +62,7 @@
    components: {
      UserMenu,
      SMenu,
      Logo,
      Logo
    },
    mixins: [mixin],
    props: {
@@ -98,6 +102,7 @@
          topSmenuStyle: {}
        },
        chatStatus: '',
        showTitle: true
      }
    },
    watch: {
@@ -121,6 +126,8 @@
      if (this.mode === 'topmenu') {
        this.buildTopMenuStyle()
      }
      window.addEventListener('resize', this.handleResize)
      this.topMenuStyle.topNavHeader = { 'min-width': '165px', width: '165px' }
      //update-end--author:sunjianlei---date:20190508------for: é¡¶éƒ¨å¯¼èˆªæ è¿‡é•¿æ—¶æ˜¾ç¤ºæ›´å¤šæŒ‰é’®-----
    },
    methods: {
@@ -150,8 +157,8 @@
            this.topMenuStyle.headerIndexLeft = {}
          } else {
            let rightWidth = '360px'
            this.topMenuStyle.topNavHeader = { 'min-width': '165px' }
            this.topMenuStyle.topSmenuStyle = { 'width': 'calc(100% - 165px)' }
            this.topMenuStyle.topNavHeader = { 'min-width': '50px', width: '50px' }
            this.topMenuStyle.topSmenuStyle = { 'width': 'calc(100% - 350px)' }
            this.topMenuStyle.headerIndexRight = { 'min-width': rightWidth }
            this.topMenuStyle.headerIndexLeft = { 'width': `calc(100% - ${rightWidth})` }
          }
@@ -165,6 +172,20 @@
      },
      // update-end-author:sunjianlei date:20210508 for: ä¿®å¤åŠ¨æ€åŠŸèƒ½æµ‹è¯•èœå•ã€å¸¦å‚æ•°èœå•æ ‡é¢˜é”™è¯¯ã€å±•å¼€é”™è¯¯çš„é—®é¢˜
      handleResize() {
        console.log('触发尺寸改变', window.innerWidth)
        if (window.innerWidth > 1680) {
          this.showTitle = true
          this.topMenuStyle.topNavHeader = { 'min-width': '165px' }
          this.topMenuStyle.topSmenuStyle = { 'width': 'calc(100% - 165px)' }
        } else if (window.innerWidth <= 1680 && window.innerWidth > 1280) {
          this.showTitle = false
          this.topMenuStyle.topNavHeader = { 'min-width': '50px', width: '50px' }
          this.topMenuStyle.topSmenuStyle = { 'width': 'calc(100% - 250px)' }
        } else if (window.innerWidth <= 1280 && window.innerWidth > 960) {
          this.topMenuStyle.topSmenuStyle = { 'width': 'calc(100% - 350px)' }
        }
      }
    }
  }
</script>
@@ -223,4 +244,38 @@
  /* update_end author:scott date:20190220 for: ç¼©å°é¦–页布局顶部的高度*/
  .top-nav-text {
    color: #f00;
    height: 100%
  }
  @media screen and (min-width: 1920px) {
    .top-nav-text {
      min-width: 400px;
    }
  }
  @media screen and (min-width: 1680px) and (max-width: 1920px) {
    .top-nav-text {
      min-width: 300px;
    }
  }
  @media screen and (min-width: 1400px) and (max-width: 1680px) {
    .top-nav-text {
      min-width: 300px;
    }
  }
  @media screen and (min-width: 1280px) and (max-width: 1400px) {
    .top-nav-text {
      min-width: 450px;
    }
  }
  @media screen and (max-width: 1280px) {
    .top-nav-text {
      min-width: 300px;
    }
  }
</style>
src/components/tools/Logo.vue
@@ -3,7 +3,7 @@
    <router-link :to="routerLinkTo">
      <!-- update-begin- author:sunjianlei --- date:20190814 --- for: logo颜色根据主题颜色变化 -->
      <img v-if="navTheme === 'dark'" src="~@/assets/lxzn.png" alt="logo">
      <img v-if="navTheme === 'dark'" src="~@/assets/lxzn_white.png" alt="logo">
      <img v-else src="~@/assets/lxzn.png" alt="logo">
      <!-- update-begin- author:sunjianlei --- date:20190814 --- for: logo颜色根据主题颜色变化 -->
@@ -21,7 +21,7 @@
    props: {
      title: {
        type: String,
        default: '统计分析',
        default: 'MDC智慧车间',
        required: false
      },
      showTitle: {
src/components/tools/UserMenu.vue
@@ -16,7 +16,7 @@
        :filterOption="filterOption"
        :open="isMobile()?true:null"
        :getPopupContainer="(node) => node.parentNode"
        :style="isMobile()?{width: '100%',marginBottom:'50px'}:{}"
        :style="isMobile()?{width: '100%',marginBottom:'50px',color:theme=='dark'?'#fff':'#000'}:{color:theme=='dark'?'#fff':'#000'}"
        @change="searchMethods"
        @blur="hiddenClick"
      >
@@ -79,8 +79,8 @@
        </a-menu-item>-->
      </a-menu>
    </a-dropdown>
    <span class="action">
      <a class="logout_title" href="javascript:;" @click="handleLogout">
    <span class="action" @click="handleLogout">
      <a class="logout_title" href="javascript:;" >
        <a-icon type="logout"/>
        <span v-if="isDesktop()">&nbsp;退出登录</span>
      </a>
@@ -268,7 +268,6 @@
  /* update-begin author:sunjianlei date:20191220 for: è§£å†³å…¨å±€æ ·å¼å†²çªé—®é¢˜ */
  .user-wrapper .search-input {
    width: 180px;
    color: inherit;
    /deep/ .ant-select-selection {
      background-color: inherit;
src/components/tools/UserPassword.vue
@@ -31,14 +31,13 @@
          label="确认新密码">
          <a-input type="password" @blur="handleConfirmBlur" placeholder="请确认新密码" v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>
        </a-form-item>
      </a-form>
    </a-spin>
  </a-modal>
</template>
<script>
  import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
  import { putAction } from '@/api/manage'
  export default {
@@ -57,10 +56,14 @@
          },
          password:{
            rules: [{
              required: true, message: '请输入新密码!',
              required: true, message: '请输入新密码!',trigger:'blur'
            }, {
              validator: this.validateToNextPassword,
            }],
            },
              {
                pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
                message: '密码由8位数字、大小写字母和特殊符号组成!',
              }],
          },
          confirmpassword:{
            rules: [{
@@ -85,6 +88,13 @@
        username:"",
      }
    },
    watch:{
      visible:{
        handler(value){
          if(value) this.initDictData('password_length')
        }
      }
    },
    methods: {
      show(uname){
        if(!uname){
@@ -95,6 +105,18 @@
          this.form.resetFields();
          this.visible = true;
        }
      },
      initDictData(dictCode) {
        //根据字典Code, åˆå§‹åŒ–字典数组
        ajaxGetDictItems(dictCode, null).then((res) => {
          if (res.success) {
            const regExp = new RegExp("^(?=.*[a-zA-Z])(?=.*\\\d)(?=.*[~!@#$%^&*()_+`\\-={}:\";'<>?,./]).{"+Number(res.result[0].value)+",}$");
            this.validatorRules.password.rules[2]={
              pattern: regExp,
              message: `密码由${res.result[0].value}位数字、大小写字母和特殊符号组成!`,
            }
          }
        })
      },
      handleCancel () {
        this.close()
@@ -110,20 +132,24 @@
        // è§¦å‘表单验证
        this.form.validateFields((err, values) => {
          if (!err) {
            that.confirmLoading = true;
            let params = Object.assign({username:this.username},values)
            console.log("修改密码提交数据",params)
            putAction(this.url,params).then((res)=>{
              if(res.success){
                console.log(res)
                that.$message.success(res.message);
                that.close();
              }else{
                that.$message.warning(res.message);
              }
            }).finally(() => {
              that.confirmLoading = false;
            })
            if(values.oldpassword!==values.confirmpassword){
              that.confirmLoading = true;
              let params = Object.assign({username:this.username},values)
              console.log("修改密码提交数据",params)
              putAction(this.url,params).then((res)=>{
                if(res.success){
                  console.log(res)
                  that.$message.success(res.message);
                  that.close();
                }else{
                  that.$message.warning(res.message);
                }
              }).finally(() => {
                that.confirmLoading = false;
              })
            }else{
              that.$message.warning('新密码与旧密码不能相同');
            }
          }
        })
      },
src/defaultSettings.js
@@ -15,7 +15,7 @@
export default {
  primaryColor: '#000000', // primary color of ant design
  navTheme: 'light', // theme for nav menu
  navTheme: 'dark', // theme for nav menu
  layout: 'topmenu', // nav menu position: sidemenu or topmenu
  contentWidth: 'Fixed', // layout of content: Fluid or Fixed, only works when layout is topmenu
  fixedHeader: true, // sticky header
src/views/WorkshopSignage.vue
@@ -1,6 +1,6 @@
<template>
  <dv-full-screen-container class="full-screen-container">
    <header class="page-header">
    <header class="page-header" :style="{height: pageHeaderHeight+'px'}">
      {{ workshopDetails.workshopName }}
      <div class="header-left" v-has="'home:saveDevicePositionAndSize'">
        <a-space>
@@ -17,11 +17,11 @@
        <a-button type="primary" icon="save" size="large" @click="saveDevicePositionAndSizeByApi">保存位置</a-button>
      </div>
      <div class="device-status-info">
        <div v-for="item in deviceStatusList" :key="item.value" class="single-status-info">
        <a-space v-for="item in deviceStatusList" :key="item.value" class="single-status-info">
          <div>{{ item.label }}</div>
          <div class="status-square" :style="{ backgroundColor: item.color }"></div>
          <div>{{ getDeviceNumberByStatus(item.value) }}</div>
        </div>
        </a-space>
      </div>
    </header>
@@ -77,7 +77,6 @@
            </div>
          </div>
        </VueDragResize>
      </div>
    </dv-border-box-8>
@@ -103,6 +102,11 @@
    },
    data() {
      return {
        pageHeaderHeight: 80,// é¡µå¤´é«˜åº¦
        taskBarHeight: window.screen.height - window.screen.availHeight,// å±å¹•底部任务栏高度
        utilsBarHeight: window.outerHeight - window.innerHeight,// æµè§ˆå™¨å·¥å…·æ é«˜åº¦
        normalPageHeight: 0,
        fullScreenPageHeight: 0,
        workshopDetails: {}, //  è½¦é—´è¯¦ç»†ä¿¡æ¯,
        isDraggable: false, // æ˜¯å¦å¼€å¯æ‹–拽
        isResizable: false, // æ˜¯å¦å¼€å¯ç¼©æ”¾
@@ -141,7 +145,8 @@
            value: 22,
            color: '#FF0000'
          }
        ] // è®¾å¤‡çŠ¶æ€æŒ‡ç¤ºç¯åˆ—è¡¨
        ],// è®¾å¤‡çŠ¶æ€æŒ‡ç¤ºç¯åˆ—è¡¨ï¼Œ
        isFullscreen: false
      }
    },
    watch: {
@@ -186,7 +191,14 @@
            this.workshopDetails.backgroundImage
          )})`
          this.fullScreenPageHeight = `calc(100% - ${this.pageHeaderHeight}px)`
          this.normalPageHeight = `calc(100% - ${this.pageHeaderHeight}px - ${this.taskBarHeight}px - ${this.utilsBarHeight}px)`
          if (this.isFullscreen) {
            this.$refs.deviceContainerRef.style.height = this.fullScreenPageHeight
          } else {
            this.$refs.deviceContainerRef.style.height = this.normalPageHeight
          }
        })
      },
@@ -285,6 +297,35 @@
          //   setTimeout( this.$refs.equmentDetaiModel.initData(item.equipmentId),0)
          // },1000*10)
        }
      },
      onResize() {
        // åˆ©ç”¨å±å¹•分辨率和window对象的内高度来判断兼容IE
        let winFlag = window.innerHeight === window.screen.height
        // åˆ©ç”¨window全屏标识来判断 -- IE无效
        let isFull = window.fullScreen || document.webkitIsFullScreen
        if (isFull === undefined) {
          this.isFullscreen = winFlag
        } else {
          this.isFullscreen = winFlag || isFull
        }
        console.log(winFlag)  // true全屏   false不是全屏
        console.log('任务栏高度', this.taskBarHeight)
        console.log('工具栏高度', this.utilsBarHeight)
        //全屏则图纸盒子可视高度减去页头高度,正常窗口则减去页头、屏幕底部任务栏以及浏览器工具栏高度
        if (winFlag) {
          console.log('触发全屏')
          this.$refs.deviceContainerRef.style.height = this.fullScreenPageHeight
        } else {
          console.log('关闭全屏')
          // å¦‚果刷新页面重新加载后默认处于全屏模式,则工具栏高度为负数,因此需要退出全屏模式时重置工具栏高度
          this.utilsBarHeight = window.outerHeight - window.innerHeight
          this.normalPageHeight = `calc(100% - ${this.pageHeaderHeight}px - ${this.taskBarHeight}px - ${this.utilsBarHeight}px)`
          this.$refs.deviceContainerRef.style.height = this.normalPageHeight
        }
      }
    },
@@ -293,15 +334,29 @@
        this.getDeviceListByApi(this.$route.params.id)
        this.getWorkshopDetailsByApi(this.$route.params.id)
      }
      let winFlag = window.innerHeight === window.screen.height
      // åˆ©ç”¨window全屏标识来判断 -- IE无效
      let isFull = window.fullScreen || document.webkitIsFullScreen
      if (isFull === undefined) {
        this.isFullscreen = winFlag
      } else {
        this.isFullscreen = winFlag || isFull
      }
      // window.addEventListener('resize', this.onResize)
    },
    mounted() {
      // ç¦æ­¢ç”¨æˆ·é€‰ä¸­å†…容
      document.onselectstart = () => false
    },
    beforeDestroy() {
      // ç¡®ä¿é”€æ¯å®šæ—¶å™¨åŠå›žæ”¶èµ„源
      // ç¡®ä¿é”€æ¯å®šæ—¶å™¨ã€äº‹ä»¶åŠå›žæ”¶èµ„源
      clearInterval(this.timingAcquisition)
      this.timingAcquisition = null
      // window.removeEventListener('resize', this.onResize)
    }
  }
</script>
@@ -313,7 +368,6 @@
    color: #fff;
    .page-header {
      height: 80px;
      font-size: 50px;
      text-align: center;
      position: relative;
@@ -340,10 +394,10 @@
        justify-content: space-between;
        .single-status-info {
          width: 60px;
          display: flex;
          align-items: center;
          justify-content: space-between;
          /*width: 70px;*/
          /*display: flex;*/
          /*align-items: center;*/
          /*justify-content: space-between;*/
          .status-square {
            width: 14px;
@@ -357,10 +411,10 @@
    .content-container {
      width: 100%;
      height: calc(100% - 80px);
      /*height: calc(100% - 200px);*/
      /*height: 100%;*/
      background-repeat: no-repeat;
      background-size: 100% 100%;
      .single-device {
        position: absolute;
@@ -380,8 +434,7 @@
          width: 100%;
          height: 100%;
          display: flex;
          align-items:end ;
          align-items: end;
          .status-image {
            background-size: 100% 100%;
src/views/mdc/base/DeviceProcessReport.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,139 @@
<template>
  <div style="width: 100%; height: 100%;">
    <a-card :bordered="false">
      <a-row type="flex" :gutter="16">
        <a-col :md="5">
          <a-tabs :activeKey="activeKey" @change="tabChange">
            <a-tab-pane key="1" tab="车间层级" force-render>
              <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
            </a-tab-pane>
            <a-tab-pane v-if="isDepartType == 0" key="2" tab="部门层级">
              <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree>
            </a-tab-pane>
          </a-tabs>
        </a-col>
        <a-col :md="19">
          <DeviceProcessReportList ref="deviceList" :nodeTree='selectEquement' :nodePeople='selectPeople'
                                   :Type="slectTypeTree"/>
        </a-col>
      </a-row>
    </a-card>
  </div>
</template>
<script>
  import { putAction, getAction } from '@/api/manage'
  import { frozenBatch } from '@/api/api'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import JInput from '@/components/jeecg/JInput'
  import BaseTree from '../common/BaseTree'
  import EfficiencyShiftList from './modules/efficiencyShiftReport/EfficiencyShiftList'
  import JSuperQuery from '@/components/jeecg/JSuperQuery'
  import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton'
  import DepartTree from './modules/DepartList/DepartListTree/DepartTree'
  import { mapActions } from 'vuex'
  import DeviceProcessReportList from './modules/DeviceProcessReport/DeviceProcessReportList'
  export default {
    name: 'DeviceProcessReport',
    components: {
      DeviceProcessReportList,
      JThirdAppButton,
      JInput,
      BaseTree,
      JSuperQuery,
      DepartTree,
      EfficiencyShiftList
    },
    data() {
      return {
        activeKey: '1',
        description: '设备信息',
        selectEquementId: '',
        selectEquement: {},
        slectTypeTree: '',
        selectPeople: {},
        url: {
          equipmentStatistics: '/mdc/equipment/equipmentStatistics'
        },
        isDepartType: ''
      }
    },
    created() {
      this.queryTreeData()
    },
    methods: {
      ...mapActions(['QueryDepartTree']),
      queryTreeData() {
        this.QueryDepartTree().then(res => {
          if (res.success) {
            this.isDepartType = res.result[0].value
          } else {
            // this.$message.warn(res.message)
            this.$notification.warning({
              message: '消息',
              description: res.message
            })
          }
        }).finally(() => {
        })
      },
      tabChange(val) {
        // console.log(val);
        this.activeKey = val
        this.slectTypeTree = val
      },
      changeSelectionNode(val) {
        this.selectEquement = val
        this.slectTypeTree = '1'
      },
      changeSelectionNodedd(val) {
        this.selectPeople = val
        this.slectTypeTree = '2'
      }
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less';
  .equipMessage {
    width: 100%;
    height: 10%;
  }
  .equipMessage table {
    width: 60%;
    height: 100%;
    line-height: 50%;
  }
  .equipMessage table td {
    text-align: center;
  }
  .equipMessage table td span {
    display: inline-block;
    width: 15px;
    height: 15px;
  }
  .equipMessage table td .equipShutdown {
    background-color: #808080;
  }
  .equipMessage table td .equipStandby {
    background-color: #ffbf37;
  }
  .equipMessage table td .equipRun {
    background-color: #19FE01;
  }
  .equipMessage table td .equipAlarm {
    background-color: #FD0008;
  }
</style>
src/views/mdc/base/EfficiencyPOReport.vue
@@ -2,7 +2,7 @@
  <div style="width: 100%; height: 100%;">
    <a-card :bordered="false">
      <a-row type="flex" :gutter="16">
        <a-col :md="4">
        <a-col :md="5">
          <a-tabs :activeKey="activeKey"  @change="tabChange">
            <a-tab-pane key="1" tab="车间层级" force-render>
              <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
@@ -12,7 +12,7 @@
            </a-tab-pane>
          </a-tabs>
        </a-col>
        <a-col :md="20">
        <a-col :md="19">
          <efficiencyPO-list ref="EfficiencyPOList" :nodeTree='selectEquement'  :nodePeople='selectPeople' :Type="slectTypeTree"/>
        </a-col>
      </a-row>
src/views/mdc/base/EfficiencyReport.vue
@@ -2,7 +2,7 @@
  <div style="width: 100%; height: 100%;">
    <a-card :bordered="false">
      <a-row type="flex" :gutter="16">
        <a-col :md="4">
        <a-col :md="5">
          <a-tabs :activeKey="activeKey"  @change="tabChange">
            <a-tab-pane key="1" tab="车间层级" force-render>
              <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
@@ -12,7 +12,7 @@
            </a-tab-pane>
          </a-tabs>
        </a-col>
        <a-col :md="20">
        <a-col :md="19">
          <EfficiencyList ref="EfficiencyList" :nodePeople='selectPeople' :nodeTree = 'selectEquement' :Type="slectTypeTree"></EfficiencyList>
        </a-col>
      </a-row>
src/views/mdc/base/MdcUtilizationRateList.vue
@@ -9,11 +9,11 @@
              <a-input placeholder="请输入类别" v-model="queryParam.rateParameterCategory"></a-input>
            </a-form-item>
          </a-col>
          <a-col :md="2" :sm="2">
            <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
          </a-col>
          <a-col :md="2" :sm="2">
            <a-button type="primary" @click="searchReset" icon="reload">重置</a-button>
          <a-col>
            <a-space>
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload">重置</a-button>
            </a-space>
          </a-col>
        </a-row>
      </a-form>
src/views/mdc/base/modules/DepartList/DepartListTree/DepartTree.vue
@@ -145,6 +145,7 @@
            this.allTreeKeys = []
            this.treeDataSource = res.result
            this.generateList(res.result)
            this.expandedKeys=this.allTreeKeys
          } else {
            // this.$message.warn(res.message)
            this.$notification.warning({
src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,439 @@
<template>
  <div style="width: 100%;">
    <div :bordered="false">
      <!-- æŸ¥è¯¢åŒºåŸŸ -->
      <div class="seach-content">
        <div class="table-page-search-wrapper">
          <a-form layout="inline" @keyup.enter.native="searchQuery">
            <a-row :gutter="24">
              <a-col :md="5" :sm="5" :xs="5">
                <a-form-item label="驱动类型">
                  <a-auto-complete
                    v-model="queryParam.driveType"
                    :data-source="driveTypeList"
                    placeholder="请选择驱动类型"
                    :filter-option="filterOption"
                  />
                </a-form-item>
              </a-col>
              <a-col :md="5" :sm="5" :xs="5">
                <a-form-item label="时间">
                  <a-range-picker
                    :placeholder="['开始时间', '结束时间']"
                    format="YYYY-MM-DD"
                    :value="dates"
                    @change="dateParamChange"
                  />
                </a-form-item>
              </a-col>
              <a-col :md="4" :sm="4" :xs="4">
                <a-space>
                  <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
                  <a-button type="primary" @click="searchReset" icon="reload">重置</a-button>
                  <a-button type="primary" @click="exportExcel" icon="download">导出</a-button>
                </a-space>
              </a-col>
            </a-row>
          </a-form>
        </div>
      </div>
      <div class="container" id="EfficiencyShift" style="margin-top: 20px;">
        <div class="table2">
          <a-table :columns="columns" :dataSource="dataSource.records" :pagination="false" bordered>
            <span slot="duration" slot-scope="text">{{getFormattedTime(text)}}</span>
          </a-table>
        </div>
      </div>
      <div class="pagination">
        <a-pagination
          :total=dataSource.total
          :show-total="(total, range) => `${range[0]}-${range[1]} å…± ${total} æ¡`"
          :page-size="+queryParam.pageSize"
          :default-current="1"
          :current=+queryParam.pageNo
          show-size-changer
          :pageSizeOptions="['20','30','40','50']"
          @change="handlePageNoChange"
          @showSizeChange="handlePageSizeChange"
        />
      </div>
    </div>
  </div>
</template>
<script>
  import moment from 'moment'
  import { putAction, getAction } from '@/api/manage'
  import $ from 'jquery'
  import '@/components/table2excel/table2excel'
  import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
  import api from '@/api/mdc'
  export default {
    name: 'DeviceProcessReportList',
    components: {},
    data() {
      return {
        typeTree: '',
        typeParent: 1,
        typeEquipment: 1,
        allowClear: true,
        allowClearSu: true,
        dates: [moment(), moment()],
        identifying: [],
        queryParam: {
          pageSize: 20,
          pageNo: 1
        },
        queryParamEquip: {},
        queryParamPeople: {},
        url: {
          list: '/mdc/mdcProcessCount/list'
        },
        columns: [
          {
            title: '序号',
            dataIndex: '',
            key: 'rowIndex',
            width: 70,
            align: 'center',
            customRender: function(t, r, index) {
              return parseInt(index) + 1
            }
            // fixed: 'left'
          },
          {
            title: '设备统一编号',
            align: 'center',
            dataIndex: 'equipmentId',
            width: 120
          },
          {
            title: '设备名称',
            align: 'center',
            width: 150,
            dataIndex: 'equipmentName'
          },
          {
            title: '驱动类型',
            align: 'center',
            width: 110,
            dataIndex: 'driveType'
          },
          {
            title: '程序号',
            align: 'center',
            width: 100,
            dataIndex: 'sequenceNumber'
          },
          {
            title: '加工件数',
            align: 'center',
            width: 80,
            dataIndex: 'processCount'
          },
          {
            title: '持续时间',
            dataIndex: 'duration',
            align: 'center',
            scopedSlots: { customRender: 'duration' },
            width: 110
          },
          {
            title: '日期',
            dataIndex: 'theDate',
            align: 'center',
            width: 110
          }
        ],
        dataSource: [],
        driveTypeList: []
      }
    },
    props: { nodeTree: '', Type: '', nodePeople: '' },
    created() {
      this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD')
      this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
      this.queryParam.typeTree = '1'
      this.loadData()
      this.getDriveTypeByApi()
    },
    watch: {
      Type(valmath) {
        this.dataList = []
        this.queryParam.typeTree = valmath
      },
      nodeTree(val) { //监听currSelected å˜åŒ–,将变化后的数值传递给 getCurrSelected äº‹ä»¶
        console.log(val)
        if (JSON.stringify(val) != '{}') {
          if (val.equipmentId != null) {
            this.queryParamEquip.parentId = ''
            this.queryParamEquip.equipmentId = val.equipmentId
          } else {
            this.queryParamEquip.parentId = val.key
            this.queryParamEquip.equipmentId = ''
          }
          this.searchQuery()
        }
      },
      nodePeople(val) {
        if (JSON.stringify(val) != '{}') {
          if (val.equipmentId != null) {
            this.queryParamPeople.parentId = val.equipmentId
            this.queryParamPeople.equipmentId = ''
          } else {
            this.queryParamPeople.parentId = val.key
            this.queryParamPeople.equipmentId = ''
          }
          this.searchQuery()
        }
      }
    },
    filters: {
      numFilter(value) {
        if (value) {
          return parseFloat((value * 100).toFixed(2))
        } else {
          return '0'
        }
      }
    },
    methods: {
      dateParamChange(value) {
        this.dates = value
        console.log('value', value)
        this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD')
        this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
      },
      exportExcel() {
        $('#EfficiencyShift').table2excel({
          exclude: '.noExl',
          name: 'Excel Document Name',
          filename: '设备加工工件报表',
          exclude_img: true,
          fileext: '.xls',
          exclude_links: true,
          exclude_inputs: true
        })
      },
      searchQuery() {
        if (this.dates != '') {
          if (this.queryParam.typeTree == '1') {
            this.queryParam.parentId = this.queryParamEquip.parentId
            this.queryParam.equipmentId = this.queryParamEquip.equipmentId
          } else {
            this.queryParam.parentId = this.queryParamPeople.parentId
            this.queryParam.equipmentId = ''
          }
          this.queryParam.pageNo = 1
          this.loadData()
        } else {
          // this.$message.warning("请选择时间")
          this.$notification.warning({
            message: '消息',
            description: '请选择时间'
          })
        }
        // this.onClearSelected()
      },
      searchReset() {
        this.queryParam = {
          pageSize: 20,
          pageNo: 1
        }
        this.dates = []
        this.loadData()
      },
      loadData() {
        getAction(this.url.list, this.queryParam).then(res => {
          if (res.success) {
            this.dataSource = res.result
          }
        })
      },
      /**
       * è°ƒç”¨æŽ¥å£èŽ·å–æŽ§åˆ¶ç³»ç»Ÿç±»åž‹
       */
      getDriveTypeByApi() {
        api.getDriveTypeApi().then((res) => {
          this.driveTypeList = res.result.map(item => item.value)
        })
      },
      /**
       * æ ¼å¼åŒ–æ—¶é—´
       * @param seconds ç§’æ•°
       * @returns '' æ ¼å¼åŒ–后时间字符串
       */
      getFormattedTime(seconds) {
        var hours = Math.floor(seconds / 3600)
        var minutes = Math.floor((seconds % 3600) / 60)
        var secs = seconds % 60
        if (hours === 0) {
          if (minutes === 0) {
            return secs === 0 ? 0 : `${secs}秒`
          } else {
            if (secs === 0) {
              return `${minutes}分`
            }
            return `${minutes}分 ${secs}秒`
          }
        } else {
          if (minutes === 0 && secs === 0) {
            return `${hours}小时`
          } else if (minutes !== 0 && secs === 0) {
            return `${hours}小时 ${minutes}分`
          }
        }
        return `${hours}小时 ${minutes}分 ${secs}秒`
      },
      /**
       * åˆ†é¡µå™¨é¡µæ•°å‘生改变时触发
       * @param page æ”¹å˜åŽé¡µæ•°
       * @param pageSize æ”¹å˜åŽæ¯é¡µå±•示数据条数
       */
      handlePageNoChange(page, pageSize) {
        this.queryParam.pageNo = page
        this.loadData()
      },
      /**
       * åˆ†é¡µå™¨æ¯é¡µå±•示数据条数发生改变时触发
       * @param current æ”¹å˜åŽé¡µæ•°
       * @param size æ”¹å˜åŽæ¯é¡µå±•示数据条数
       */
      handlePageSizeChange(current, size) {
        this.queryParam.pageSize = size
        this.loadData()
      },
      /**
       * è”想输入框筛选功能
       * @param input è¾“入的内容
       * @param option é…ç½®
       * @returns {boolean} åˆ¤æ–­æ˜¯å¦ç­›é€‰
       */
      filterOption(input, option) {
        return (
          option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
        )
      }
    }
  }
</script>
<style scoped>
  .table2 {
    width: 100%;
    height: 100%;
    overflow: auto;
  }
  .pagination {
    display: flex;
    justify-content: end;
    margin: 20px 0;
  }
  @media screen and (min-width: 1920px) {
    #EfficiencyShift {
      height: 670px !important;
      overflow: scroll;
    }
  }
  @media screen and (min-width: 1680px) and (max-width: 1920px) {
    #EfficiencyShift {
      height: 670px !important;
      overflow: scroll;
    }
  }
  @media screen and (min-width: 1400px) and (max-width: 1680px) {
    #EfficiencyShift {
      height: 522px !important;
      overflow: scroll;
    }
  }
  @media screen and (min-width: 1280px) and (max-width: 1400px) {
    #EfficiencyShift {
      height: 414px !important;
      overflow: scroll;
    }
  }
  @media screen and (max-width: 1280px) {
    #EfficiencyShift {
      height: 414px !important;
      overflow: scroll;
    }
  }
  .identifyingclass {
    width: 55px;
    height: 15px;
    display: inline-block
  }
  .dataContent {
    white-space: nowrap;
    /*margin: 0;*/
    /*border: none;*/
    border-collapse: separate;
    border-spacing: 0;
    /*table-layout: fixed;*/
    border: 1px solid #ccc;
    /*border: 1px solid #ccc;*/
    width: 100%;
    /*height: 100%;*/
    /*overflow: hidden;*/
    /*overflow-y: auto;*/
    text-align: center;
  }
  .dataContent .fixed th {
    width: 50px;
  }
  .dataContent .thead th {
    background-color: #fafafa;
    text-align: center;
    height: 30px;
    padding: 5px;
  }
  .dataContent .notfixed th {
    width: auto;
  }
  /*.dataContent tr td {*/
  /*height: 35px*/
  /*}*/
  .dataContent .mathData td {
    padding: 10px;
    /*display: none;*/
  }
  .dataContent .mathData .td {
    /*background-color: #ff9bd2;*/
    display: inline-block;
    padding: 10px;
  }
  .dataContent .mathData .tdd {
    /*display: none;*/
  }
</style>
src/views/mdc/base/modules/HolidayManagement/HolidayManagementModal.vue
@@ -7,7 +7,7 @@
          <a-col :span="24">
            <a-form-item label="设备组" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
              <a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]"
                              @search="deviceSearch" enter-button/>
                              @search="deviceSearch" enter-button placeholder="请选择设备"/>
            </a-form-item>
          </a-col>
        </a-row>
@@ -36,7 +36,7 @@
      </a-form>
    </a-spin>
    <holiday-management-modal-list ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></holiday-management-modal-list>
    <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'选择设备'"/>
  </a-modal>
</template>
@@ -53,10 +53,11 @@
  import {
    duplicateCheck
  } from '@/api/api'
  import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal'
  export default {
    name: 'HolidayManagementModal',
    components: {HolidayManagementModalList},
    components: { SelectDeviceModal, HolidayManagementModalList},
    props: {},
    data() {
      return {
@@ -184,9 +185,10 @@
        // })
      },
      deviceSearch() {
        this.$refs.deviceRepairListModel.openPage()
        this.$refs.deviceRepairListModel.title = '选择设备'
        this.$refs.deviceRepairListModel.disableSubmit = false
        this.$refs.selectDeviceModal.visible = true
        this.$refs.selectDeviceModal.selectedRowKeys = []
        this.$refs.selectDeviceModal.selectedRows = []
        this.$refs.selectDeviceModal.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : []
      },
      //级联框onChange事件
      // onChange(value) {
@@ -322,6 +324,22 @@
      },
      checkboxChange(e) {
        this.checked = e.target.checked
      },
      /**
       * é€‰æ‹©å·²æœ‰è®¾å¤‡åŽç‚¹å‡»ç¡®å®šæ—¶è§¦å‘
       * @param data å·²é€‰æ‹©çš„设备
       */
      selectOK(data) {
        // let params = {}
        // params.equipmentIdList = []
        // for (var a = 0; a < data.length; a++) {
        //   params.equipmentIdList.push(data[a])
        // }
        console.log('data=', data)
        this.form.setFieldsValue({
          equipmentIds: data.join(',')
        })
      }
    }
  }
src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue
@@ -17,26 +17,26 @@
                  />
                </a-form-item>
              </a-col>
              <a-col :md="5" :sm="5" :xs="5">
                <a-form-item label="班制">
                  <a-select v-model="queryParam.shiftId" placeholder="请选择班制"
                            @change="initShiftSubList" :allowClear="allowClear">
                    <a-select-option v-for="(em,index) in shiftList" :key="index" :value="em.value">
                      {{ em.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 v-model="queryParam.shiftSubId" placeholder="请选择班次" @change="initShiftSubListChange"
                            :allowClear="allowClearSu">
                    <a-select-option v-for="(em,index) in shiftSubList" :key="index" :value="em.value">
                      {{ em.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 v-model="queryParam.shiftId" placeholder="请选择班制"-->
              <!--@change="initShiftSubList" :allowClear="allowClear">-->
              <!--<a-select-option v-for="(em,index) in shiftList" :key="index" :value="em.value">-->
              <!--{{ em.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 v-model="queryParam.shiftSubId" placeholder="请选择班次" @change="initShiftSubListChange"-->
              <!--:allowClear="allowClearSu">-->
              <!--<a-select-option v-for="(em,index) in shiftSubList" :key="index" :value="em.value">-->
              <!--{{ em.label }}-->
              <!--</a-select-option>-->
              <!--</a-select>-->
              <!--</a-form-item>-->
              <!--</a-col>-->
              <a-col :md="8" :sm="8" :xs="8">
                <a-space>
@@ -54,8 +54,7 @@
      <div class="container" id="EfficiencyShift" style="margin-top: 20px;">
        <div class="table2">
          <a-table :columns="columns" :dataSource="dataSource.records" :pagination="false" bordered
                   :scroll="{ x: 1500, y: false }">
                   :scroll="{ x: 3200, y: false }">
          </a-table>
        </div>
      </div>
@@ -67,7 +66,7 @@
          :default-current="1"
          :current=+queryParam.pageNo
          show-size-changer
          :pageSizeOptions="['10','15','20','25']"
          :pageSizeOptions="['20','30','40','50']"
          @change="handlePageNoChange"
          @showSizeChange="handlePageSizeChange"
        />
@@ -96,7 +95,7 @@
        dates: [moment().subtract('month', 1), moment().subtract('month', 1)],
        identifying: [],
        queryParam: {
          pageSize: 10,
          pageSize: 20,
          pageNo: 1
        },
        queryParamEquip: {},
@@ -117,22 +116,22 @@
            align: 'center',
            customRender: function(t, r, index) {
              return parseInt(index) + 1
            },
            fixed: 'left'
            }
            // fixed: 'left'
          },
          {
            title: '设备统一编号',
            align: 'center',
            dataIndex: 'equipmentId',
            width: 120,
            fixed: 'left'
            width: 120
            // fixed: 'left'
          },
          {
            title: '设备名称',
            align: 'center',
            width: 150,
            dataIndex: 'equipmentName',
            fixed: 'left'
            width: 200,
            dataIndex: 'equipmentName'
            // fixed: 'left'
          },
          {
            title: '设备型号',
@@ -149,8 +148,9 @@
          {
            title: '班次',
            align: 'center',
            width: 80,
            dataIndex: 'shift'
            width: 300,
            dataIndex: 'shift',
            ellipsis: true,
          },
          {
            title: '每班小时',
@@ -410,18 +410,11 @@
      },
      searchReset() {
        this.typeTree = this.queryParam.typeTree
        this.typeParent = this.queryParam.parentId
        this.typeEquipment = this.queryParam.equipmentId
        this.queryParam = {
          pageSize: 10,
          pageSize: 20,
          pageNo: 1
        }
        this.dates = []
        this.shiftSubList = []
        this.queryParam.typeTree = this.typeTree
        this.queryParam.parentId = this.typeParent
        this.queryParam.equipmentId = this.typeEquipment
        this.loadData()
      },
src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationModal.vue
@@ -7,7 +7,7 @@
          <a-col :span="24">
            <a-form-item label="设备组" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
              <a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]"
                              @search="deviceSearch" enter-button/>
                              @search="deviceSearch" enter-button placeholder="请选择设备"/>
            </a-form-item>
          </a-col>
        </a-row>
@@ -15,27 +15,27 @@
          <a-col :span="12">
            <a-form-item label="时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择时间"
                       v-decorator="['torqueDate', validatorRules.torqueDate]"></j-date>
                      v-decorator="['torqueDate', validatorRules.torqueDate]"></j-date>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="扭矩值" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input-number :min="0" :disabled="disableSubmit" placeholder="请输入扭矩值"
                       v-decorator="['torqueValue', validatorRules.torqueValue]"/>
                              v-decorator="['torqueValue', validatorRules.torqueValue]"/>
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="24">
          <a-form-item label="备注" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
            <a-textarea :maxLength="20"  v-decorator="['notes', validatorRules.notes]" placeholder="请输入备注"  ></a-textarea>
          </a-form-item>
            <a-form-item label="备注" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
              <a-textarea :maxLength="20" v-decorator="['notes', validatorRules.notes]"
                          placeholder="请输入备注"></a-textarea>
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </a-spin>
    <torqueconfiguration-modal-list ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></torqueconfiguration-modal-list>
    <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'选择设备'"/>
  </a-modal>
</template>
@@ -52,22 +52,23 @@
  import {
    duplicateCheck
  } from '@/api/api'
  import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal'
  export default {
    name: 'TorqueconfigurationModal',
    components: {TorqueconfigurationModalList},
    components: { SelectDeviceModal },
    props: {},
    data() {
      return {
        mesag:21,
        readOnly:true,
        mesag: 21,
        readOnly: true,
        title: '',
        visible: false,
        show: false,
        model: {},
        checked: false,
        startData:"",
        endData:"",
        startData: '',
        endData: '',
        labelCol: {
          xs: {
            span: 24
@@ -103,30 +104,30 @@
        confirmLoading: false,
        form: this.$form.createForm(this),
        validatorRules: {
          equipmentIds:{
            rules:[
          equipmentIds: {
            rules: [
              {
                required:true,
                message: "请选择设备"
              },
            ],
                required: true,
                message: '请选择设备'
              }
            ]
          },
          torqueDate:{
            rules:[
          torqueDate: {
            rules: [
              {
                required:true,
                message: "请选择时间"
              },
            ],
                required: true,
                message: '请选择时间'
              }
            ]
          },
          torqueValue:{
            rules:[
          torqueValue: {
            rules: [
              {
                required:true,
                message: "请输入扭矩值"
              },
            ],
          },
                required: true,
                message: '请输入扭矩值'
              }
            ]
          }
        },
        url: {
@@ -158,21 +159,21 @@
      //   // this.endData = dateStrings[1];
      //   // console.log(this.startData,this.endData);
      // },
      onChangeEnd(dates, dateStrings){
        this.endTime = dateStrings[0];
      onChangeEnd(dates, dateStrings) {
        this.endTime = dateStrings[0]
      },
      getDeviceRows(val) {
        var equipmentIds;
        for(var i = 0;i<val.length;i++){
        var equipmentIds
        for (var i = 0; i < val.length; i++) {
          if (i == 0) {
            equipmentIds =  val[i].equipmentId;
            equipmentIds = val[i].equipmentId
          } else {
            equipmentIds = equipmentIds + "," + val[i].equipmentId;
            equipmentIds = equipmentIds + ',' + val[i].equipmentId
          }
        }
        // console.log("========",equipmentIds);
        this.form.setFieldsValue({
          equipmentIds: equipmentIds,
          equipmentIds: equipmentIds
        })
        //   this.form.setFieldsValue({
        // equipmentId: val.equipmentId,
@@ -184,9 +185,10 @@
        // })
      },
      deviceSearch() {
        this.$refs.deviceRepairListModel.openPage()
        this.$refs.deviceRepairListModel.title = '选择设备'
        this.$refs.deviceRepairListModel.disableSubmit = false
        this.$refs.selectDeviceModal.visible = true
        this.$refs.selectDeviceModal.selectedRowKeys = []
        this.$refs.selectDeviceModal.selectedRows = []
        this.$refs.selectDeviceModal.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : []
      },
      //级联框onChange事件
      // onChange(value) {
@@ -219,7 +221,7 @@
        this.model = Object.assign({}, record)
        this.visible = true
        this.$nextTick(() => {
          this.form.setFieldsValue(pick(this.model, 'equipmentIds', 'equipmentName', 'mdcRepairType', 'startTime', 'endTime',
          this.form.setFieldsValue(pick(this.model, 'equipmentIds', 'equipmentName', 'mdcRepairType', 'startTime', 'endTime'
          ))
        })
      },
@@ -252,36 +254,36 @@
            //     // this.endTime = ''
            //     that.confirmLoading = false
            //   }else{
                let obj
                if (!this.model.id) {
                  obj = postAction(this.url.add, formData)
                } else {
                  obj = requestPut(this.url.edit, formData, {
                    id: this.model.id
                  })
                }
                obj.then((res) => {
                  if (res.success) {
                    // that.$message.success("添加成功")
                    that.$notification.success({
                      message:'消息',
                      description:"添加成功"
                    });
                    // that.$message.success(res.message)
                    that.$emit('ok', res.result)
                  } else {
                    // that.$message.warning(res.message)
                    that.$notification.warning({
                      message:'消息',
                      description:res.message
                    });
                  }
                }).finally(() => {
                  that.confirmLoading = false
                  that.close()
            let obj
            if (!this.model.id) {
              obj = postAction(this.url.add, formData)
            } else {
              obj = requestPut(this.url.edit, formData, {
                id: this.model.id
              })
            }
            obj.then((res) => {
              if (res.success) {
                // that.$message.success("添加成功")
                that.$notification.success({
                  message: '消息',
                  description: '添加成功'
                })
                // that.$message.success(res.message)
                that.$emit('ok', res.result)
              } else {
                // that.$message.warning(res.message)
                that.$notification.warning({
                  message: '消息',
                  description: res.message
                })
              }
            // }
            }).finally(() => {
              that.confirmLoading = false
              that.close()
            })
          }
          // }
          // }
        })
@@ -322,7 +324,24 @@
      },
      checkboxChange(e) {
        this.checked = e.target.checked
      },
      /**
       * é€‰æ‹©å·²æœ‰è®¾å¤‡åŽç‚¹å‡»ç¡®å®šæ—¶è§¦å‘
       * @param data å·²é€‰æ‹©çš„设备
       */
      selectOK(data) {
        // let params = {}
        // params.equipmentIdList = []
        // for (var a = 0; a < data.length; a++) {
        //   params.equipmentIdList.push(data[a])
        // }
        console.log('data=', data)
        this.form.setFieldsValue({
          equipmentIds: data.join(',')
        })
      }
    }
  }
</script>
@@ -346,7 +365,8 @@
  .ant-tabs-content .ant-form-item {
    margin-bottom: 0px;
  }
  /deep/ .ant-input-number{
    width: 100%!important;
  /deep/ .ant-input-number {
    width: 100% !important;
  }
</style>
src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerModal.vue
@@ -7,7 +7,7 @@
          <a-col :span="24">
            <a-form-item label="设备组" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
              <a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]"
                              @search="deviceSearch" enter-button/>
                              @search="deviceSearch" enter-button placeholder="请选择设备"/>
            </a-form-item>
          </a-col>
        </a-row>
@@ -43,15 +43,13 @@
        </a-row>
      </a-form>
    </a-spin>
    <plan-downtime-maintenance-modal-list ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></plan-downtime-maintenance-modal-list>
    <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'选择设备'"/>
  </a-modal>
</template>
<script>
  import moment from 'moment'
  import pick from 'lodash.pick'
  import PlanDowntimeMaintenanceModalList from './UnplannedDowntimemManagerModalList'
  import JDate from '../deviceRepair/JDate'
  import {
    getAction,
@@ -61,10 +59,11 @@
  import {
    duplicateCheck
  } from '@/api/api'
  import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal'
  export default {
    name: 'UnplannedDowntimemManagerModal',
    components: {PlanDowntimeMaintenanceModalList,JDate},
    components: { SelectDeviceModal,JDate},
    props: {},
    data() {
      return {
@@ -201,9 +200,10 @@
        // })
      },
      deviceSearch() {
        this.$refs.deviceRepairListModel.openPage()
        this.$refs.deviceRepairListModel.title = '选择设备'
        this.$refs.deviceRepairListModel.disableSubmit = false
        this.$refs.selectDeviceModal.visible = true
        this.$refs.selectDeviceModal.selectedRowKeys = []
        this.$refs.selectDeviceModal.selectedRows = []
        this.$refs.selectDeviceModal.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : []
      },
      //级联框onChange事件
      // onChange(value) {
@@ -336,6 +336,22 @@
      },
      checkboxChange(e) {
        this.checked = e.target.checked
      },
      /**
       * é€‰æ‹©å·²æœ‰è®¾å¤‡åŽç‚¹å‡»ç¡®å®šæ—¶è§¦å‘
       * @param data å·²é€‰æ‹©çš„设备
       */
      selectOK(data) {
        // let params = {}
        // params.equipmentIdList = []
        // for (var a = 0; a < data.length; a++) {
        //   params.equipmentIdList.push(data[a])
        // }
        console.log('data=', data)
        this.form.setFieldsValue({
          equipmentIds: data.join(',')
        })
      }
    }
  }
src/views/mdc/base/modules/WorkshopSignage/EquipmentDetailModal.vue
@@ -9,7 +9,6 @@
      cancelText="关闭"
      wrap-class-name="full-modal"
      centered
      :closable="false"
      :footer="null"
    >
      <div
@@ -230,13 +229,24 @@
                v-show="mdcDriveTypeParamConfigList != null"
                v-if="driverType != 'PLC'"
                :column="4"
                class="operationData"
              >
                <a-descriptions-item
                  v-for="(item,id) in mdcDriveTypeParamConfigList  "
                  :key="item.id"
                  :label="item.chineseName"
                >{{item.value}}
                >
                  <a-popover v-if="item.value&&item.value.length>18">
                    <template slot="content">
                      {{item.value}}
                    </template>
                    {{item.value}}
                  </a-popover>
                  <template v-else>
                    {{item.value}}
                  </template>
                </a-descriptions-item>
              </a-descriptions>
@@ -254,16 +264,17 @@
              <!--&gt;{{item.value}}</a-descriptions-item>-->
              <!--</a-descriptions>-->
              <a-descriptions
                title="版本信息 for lsv2"
                v-if="driverType == 'LSV2'"
                :column="4"
              >
                <a-descriptions-item label="NC版本">{{resultData.nCVersion}}</a-descriptions-item>
                <a-descriptions-item label="TNC版本">{{resultData.tNCVersion}}</a-descriptions-item>
                <a-descriptions-item label="OPT版本">{{resultData.oPTVersion}}</a-descriptions-item>
                <a-descriptions-item label="PLC版本">{{resultData.pLCVersion}}</a-descriptions-item>
              </a-descriptions>
              <!--<a-descriptions-->
                <!--title="版本信息 for lsv2"-->
                <!--v-if="driverType == 'LSV2'"-->
                <!--:column="4"-->
                <!--class="lsv2Data"-->
              <!--&gt;-->
                <!--<a-descriptions-item label="NC版本">{{resultData.ncversion}}</a-descriptions-item>-->
                <!--<a-descriptions-item label="TNC版本">{{resultData.tncversion}}</a-descriptions-item>-->
                <!--<a-descriptions-item label="OPT版本">{{resultData.optversion}}</a-descriptions-item>-->
                <!--<a-descriptions-item label="PLC版本">{{resultData.plcversion}}</a-descriptions-item>-->
              <!--</a-descriptions>-->
            </td>
          </tr>
@@ -287,10 +298,11 @@
    postAction
  } from '@/api/manage'
  import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
  import Template1 from '../../../../jeecg/JVxeDemo/layout-demo/Template1'
  export default {
    name: 'EqumentDetaiModal',
    components: {},
    components: { Template1 },
    props: {},
    data() {
      return {
@@ -471,7 +483,7 @@
                  show: false
                },
                axisTick: {
                  show: true,
                  show: false,
                  length: 20,
                  splitNumber: 1,
                  lineStyle: {
@@ -526,7 +538,10 @@
                },
                pointer: {
                  show: true,
                  width: 3
                  width: 3,
                  itemStyle:{
                    color:'#fff'
                  }
                },
                data: [{
                  name: '',
@@ -724,7 +739,7 @@
                  show: false
                },
                axisTick: {
                  show: true,
                  show: false,
                  length: 20,
                  splitNumber: 1,
                  lineStyle: {
@@ -779,7 +794,10 @@
                },
                pointer: {
                  show: true,
                  width: 3
                  width: 3,
                  itemStyle:{
                    color:'#fff'
                  }
                },
                data: [{
                  name: '',
@@ -874,7 +892,7 @@
                type: 'gauge',
                radius: '80%',
                min: 0, //最小刻度
                max: 300, //最大刻度
                max: 100, //最大刻度
                splitNumber: 10, //刻度数量
                startAngle: 225,
                endAngle: -45,
@@ -977,7 +995,7 @@
                  show: false
                },
                axisTick: {
                  show: true,
                  show: false,
                  length: 20,
                  splitNumber: 1,
                  lineStyle: {
@@ -1001,12 +1019,12 @@
                radius: '52.5%',
                z: 3,
                startAngle: 225,
                max: 300,
                max: 100,
                endAngle: -45,
                axisLine: {
                  lineStyle: {
                    color: [
                      [_this.spindleload / 300, '#31F3FF'], // åŠ¨æ€
                      [_this.spindleload / 100, '#31F3FF'], // åŠ¨æ€
                      [1, '#185363']
                    ],
                    width: 4
@@ -1032,7 +1050,10 @@
                },
                pointer: {
                  show: true,
                  width: 3
                  width: 3,
                  itemStyle:{
                    color:'#fff'
                  }
                },
                data: [{
                  name: '',
@@ -1230,7 +1251,7 @@
                  show: false
                },
                axisTick: {
                  show: true,
                  show: false,
                  length: 20,
                  splitNumber: 1,
                  lineStyle: {
@@ -1285,7 +1306,10 @@
                },
                pointer: {
                  show: true,
                  width: 3
                  width: 3,
                  itemStyle:{
                    color:'#fff'
                  }
                },
                data: [{
                  name: '',
@@ -1419,7 +1443,7 @@
      padding-bottom: 0;
      margin: 0;
      background-color: #4a4a48 !important;
      opacity: 0.5;
      opacity: 0.9;
    }
    /deep/ .ant-modal-content {
      display: flex;
@@ -1440,7 +1464,7 @@
    /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
    /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
    background-color: #312c2c;
    opacity: 0.7;
    opacity: 1;
  }
  /deep/ .ant-modal-close {
@@ -1535,4 +1559,19 @@
  .ant-tabs-content .ant-form-item {
    margin-bottom: 0px;
  }
  /deep/ .ant-descriptions-item-label{
    width: 6.7vw;
    text-align: right;
    margin-right: 10px;
  }
  /deep/ .operationData .ant-descriptions-item-content,
  .lsv2Data .ant-descriptions-item-content
  {
    width: 130px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
</style>
src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue
@@ -19,47 +19,68 @@
      </div>
      <div id="DeviceList">
        <div class="openRateTrendDg">
          <div id="Efficiency" class="container" style="margin-top: 20px;">
            <div class="table2">
              <table class="dataContent table" border="1" cellspacing="0" cellpadding="0"
                     style="white-space: nowrap;text-align: left;">
                <thead>
                <tr class="thead fixed equipname">
                  <th class="thgu dong1 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">报警号
                  </th>
                  <th class="thgu dong2 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">
                    å‡ºçŽ°æ¬¡æ•°
                  </th>
                  <th class="thgu dong3 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">
                    åˆè®¡æŒç»­æ—¶é—´ï¼ˆç§’)
                  </th>
                  <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">
                    æŠ¥è­¦ä¿¡æ¯
                  </th>
                  <!--<template v-for="(tableHead, index) in tableHeads">-->
                  <!--<th class="timeth" :colspan="checkedList.length">{{tableHead}}</th>-->
                  <!--</template>-->
                </tr>
                </thead>
                <tbody>
                <tr class="mathData" v-for="(item, index) in dataList" @click="TableDraw(index,item)">
                  <td class="tdgu  kaitou">{{item.alarmCode}}</td>
                  <td class="tdgu1  kaitou">{{item.count}}</td>
                  <td class="tdgu2 kaitou">{{item.timeCount}}</td>
                  <td class="tdgu3 kaitou">{{item.alarmContent}}</td>
                  <!--<template v-for="(tableHead, index) in item.dataList">-->
                  <!--<td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td>-->
                  <!--</template>-->
                </tr>
                </tbody>
              </table>
            </div>
          <!--<div id="Efficiency" class="container">-->
          <!--<div class="table2">-->
          <!--<table class="dataContent table" border="1" cellspacing="0" cellpadding="0"-->
          <!--style="white-space: nowrap;text-align: left;">-->
          <!--<thead>-->
          <!--<tr class="thead fixed equipname">-->
          <!--<th class="thgu dong1 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">报警号-->
          <!--</th>-->
          <!--<th class="thgu dong2 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">-->
          <!--出现次数-->
          <!--</th>-->
          <!--<th class="thgu dong3 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">-->
          <!--合计持续时间-->
          <!--</th>-->
          <!--<th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">-->
          <!--报警信息-->
          <!--</th>-->
          <!--&lt;!&ndash;<template v-for="(tableHead, index) in tableHeads">&ndash;&gt;-->
          <!--&lt;!&ndash;<th class="timeth" :colspan="checkedList.length">{{tableHead}}</th>&ndash;&gt;-->
          <!--&lt;!&ndash;</template>&ndash;&gt;-->
          <!--</tr>-->
          <!--</thead>-->
          <!--<tbody>-->
          <!--<tr class="mathData" v-for="(item, index) in dataList" @click="TableDraw(index,item)">-->
          <!--<td class="tdgu  kaitou">{{item.alarmCode}}</td>-->
          <!--<td class="tdgu1  kaitou">{{item.count}}</td>-->
          <!--<td class="tdgu2 kaitou">{{getFormattedTime(item.timeCount)}}-->
          <!--&lt;!&ndash;<td class="tdgu2 kaitou">{{item.timeCount}}</td>&ndash;&gt;-->
          <!--<td class="tdgu3 kaitou">{{item.alarmContent}}</td>-->
          <!--&lt;!&ndash;<template v-for="(tableHead, index) in item.dataList">&ndash;&gt;-->
          <!--&lt;!&ndash;<td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td>&ndash;&gt;-->
          <!--&lt;!&ndash;</template>&ndash;&gt;-->
          <!--</tr>-->
          <!--</tbody>-->
          <!--</table>-->
          <!--</div>-->
          <!--</div>-->
          <a-table :columns="columns" :data-source="dataList" bordered :pagination="false" :scroll="{y:210}"
                   :customRow="customRow"
                   rowKey="alarmCode" @expand="handleExpandChange"
          >
            <span slot="timeCount" slot-scope="text">{{getFormattedTime(text)}}</span>
            <!--<a-table-->
              <!--slot="expandedRowRender"-->
              <!--slot-scope="row"-->
              <!--:columns="innerColumns"-->
              <!--:data-source="row.innerDataList"-->
              <!--:pagination="false"-->
              <!--rowKey="equipmentId"-->
              <!--:loading="loading"-->
            <!--&gt;-->
              <!--<span slot="duration" slot-scope="text">{{getFormattedTime(text)}}</span>-->
            <!--</a-table>-->
          </a-table>
        </div>
        <a-spin :spinning="spinning">
          <div style="width: 100%;height: 100%;display: flex;">
            <div id="MdcEquipmentWarningPie" style="height: 100%;width: 35%;"></div>
            <div id="MdcEquipmentWarningLine" style="height: 100%;width: 65%;"></div>
          </div>
        </div>
        <div style="width: 100%;height: 60%;display: flex;">
          <div id="MdcEquipmentWarningPie" style="height: 100%;width: 35%;"></div>
          <div id="MdcEquipmentWarningLine" style="height: 100%;width: 65%;"></div>
        </div>
        </a-spin>
      </div>
    </div>
  </div>
@@ -75,6 +96,34 @@
    JeecgListMixin
  } from '@/mixins/JeecgListMixin'
  const columns = [
    { title: '报警号', dataIndex: 'alarmCode', key: 'alarmCode', align: 'center' },
    { title: '出现次数', dataIndex: 'count', key: 'count', align: 'center', sorter: (a, b) => b.count - a.count },
    {
      title: '合计持续时间',
      dataIndex: 'timeCount',
      key: 'timeCount',
      scopedSlots: { customRender: 'timeCount' },
      align: 'center',
      sorter: (a, b) => b.timeCount - a.timeCount
    },
    { title: '报警信息', dataIndex: 'alarmContent', key: 'alarmContent', align: 'center' }
  ]
  const innerColumns = [
    { title: '设备编号', dataIndex: 'equipmentId', key: 'equipmentId', align: 'center' },
    { title: '设备名称', dataIndex: 'equipmentName', key: 'equipmentName', align: 'center' },
    { title: '报警时间', dataIndex: 'alarmTime', key: 'alarmTime', align: 'center' },
    { title: '结束时间', dataIndex: 'endTime', key: 'endTime', align: 'center' },
    {
      title: '持续时间',
      dataIndex: 'duration',
      key: 'duration',
      scopedSlots: { customRender: 'duration' },
      align: 'center'
    }
  ]
  export default {
    // mixins: [JeecgListMixin],
    name: 'alarmAnalysisMain',
@@ -84,6 +133,7 @@
        dataSource: [],
        /* table加载状态 */
        loading: false,
        spinning: false,
        typeTree: '',
        typeParent: 1,
        typeEquipment: 1,
@@ -114,7 +164,10 @@
        tableHeads: [],
        pieDate: [0],
        XData: [0],
        YData: [0]
        YData: [0],
        columns,
        innerColumns,
        hasRequsetAlarmCodeList: []
      }
    },
    props: { nodeTree: '', Type: '', nodePeople: '' },
@@ -182,34 +235,35 @@
      },
      TableDraw(key, val) {
        let that = this
        that.spinning = true
        that.queryParam.alarmCode = val.alarmCode
        console.log(this.queryParam)
        that.pieDate = []
        that.XData = []
        that.YData = []
        getAction(that.url.alarmTrend, that.queryParam).then(res => {
          if (res.success) {
            for (var i = 0; i < res.result.equipmentCountList.length; i++) {
              that.pieDate.push({
                name: res.result.equipmentCountList[i].key,
                value: res.result.equipmentCountList[i].count
        getAction(that.url.alarmTrend, that.queryParam)
          .then(res => {
            if (res.success) {
              that.pieDate = res.result.equipmentCountList.map(item => {
                return {
                  name: item.key,
                  value: item.count
                }
              })
              that.XData = res.result.dateCountList.map(item => item.key)
              that.YData = res.result.dateCountList.map(item => item.count)
              // this.tableHeads = res.result.dates
              // this.dataList = res.result
              // this.draw()
              // this.checkSameData(this.dataList)
              // this.checkSameData1(this.dataList)
              // this.checkSameData2(this.dataList)
              // this.combineCell();
              // this.initDeviceType(this.dataList)
              that.drawWrin()
            }
            for (var j = 0; j < res.result.dateCountList.length; j++) {
              that.XData.push(res.result.dateCountList[j].key)
              that.YData.push(res.result.dateCountList[j].count)
            }
            // this.tableHeads = res.result.dates
            // this.dataList = res.result
            // this.draw()
            // this.checkSameData(this.dataList)
            // this.checkSameData1(this.dataList)
            // this.checkSameData2(this.dataList)
            // this.combineCell();
            // this.initDeviceType(this.dataList)
            that.drawWrin()
          }
        })
          })
          .finally(() => {
            that.spinning = false
          })
        console.log(this.YData)
      },
@@ -343,6 +397,7 @@
          if (res.success) {
            // this.tableHeads = res.result.dates
            this.dataList = res.result
            this.hasRequsetAlarmCodeList = []
            // this.draw()
            // this.checkSameData(this.dataList)
            // this.checkSameData1(this.dataList)
@@ -359,7 +414,10 @@
          title: {
            text: '各设备出现此报警的比例',
            x: 'center',
            y: 'bottom'
            y: 'bottom',
            textStyle: {
              color: '#4FAEDC'
            }
          },
          tooltip: {
            trigger: 'item',
@@ -371,14 +429,18 @@
            radius: '60%',
            itemStyle: {
              normal: {
                /*color: function (params) {
                    var colorList = ['#4169E1', '#A8A8A8'];
                    return colorList[params.dataIndex]
                },*/
                color: function(params) {
                  var colorList = ['#5AB1EF', '#2EC7C9', '#B6A2DE', '#FFB980', '#D87A80', '#8D98B3']
                  return colorList[params.dataIndex]
                },
                label: {
                  show: true,
                  position: 'top',
                  formatter: '{b}\n{c}'
                  // position: 'top',
                  formatter: '{b}\n{c}',
                  color: function(params) {
                    var colorList = ['#5AB1EF', '#2EC7C9', '#B6A2DE', '#FFB980', '#D87A80', '#8D98B3']
                    return colorList[params.dataIndex]
                  }
                }
              }
            },
@@ -392,7 +454,10 @@
          title: {
            text: '每天出现此报警的数量走势',
            x: 'center',
            y: 'bottom'
            y: 'bottom',
            textStyle: {
              color: '#4FAEDC'
            }
          },
          tooltip: {
            trigger: 'axis'
@@ -405,13 +470,29 @@
              data: this.XData
              /*axisLabel :{
                  interval:0
              }*/
              }*/,
              axisLine: {
                //x轴线的颜色以及宽度
                show: true,
                lineStyle: {
                  width: 2,
                  color: '#4FAEDC'
                }
              }
            }
          ],
          yAxis: [
            {
              type: 'value',
              name: '次数'
              name: '次数',
              axisLine: {
                //x轴线的颜色以及宽度
                show: true,
                lineStyle: {
                  width: 2,
                  color: '#4FAEDC'
                }
              }
            }
          ],
          series: [
@@ -423,13 +504,126 @@
                data: [
                  { type: 'max', name: '最大值' },
                  { type: 'min', name: '最小值' }
                ]
                ],
                label: {
                  color: '#fff'
                }
              },
              itemStyle: {
                normal: {
                  color: '#2EC7C9'
                }
              }
            }
          ]
        }
        equipmentWarningLine.setOption(equipmentWarningLineOption, true)
      },
      /**
       * æ ¼å¼åŒ–æ—¶é—´
       * @param seconds ç§’æ•°
       * @returns '' æ ¼å¼åŒ–后时间字符串
       */
      getFormattedTime(seconds) {
        var hours = Math.floor(seconds / 3600)
        var minutes = Math.floor((seconds % 3600) / 60)
        var secs = seconds % 60
        if (hours === 0) {
          if (minutes === 0) {
            return secs === 0 ? 0 : `${secs}秒`
          } else {
            if (secs === 0) {
              return `${minutes}分`
            }
            return `${minutes}分 ${secs}秒`
          }
        } else {
          if (minutes === 0 && secs === 0) {
            return `${hours}小时`
          } else if (minutes !== 0 && secs === 0) {
            return `${hours}小时 ${minutes}分`
          }
        }
        return `${hours}小时 ${minutes}分 ${secs}秒`
      },
      /**
       * è‡ªå®šä¹‰è¡¨æ ¼è¡Œè§¦å‘
       * @param record å½“前行信息
       * @param index å½“前行下标
       * @returns {{on: {click: on.click}}} è¿”回对象
       */
      customRow(record, index) {
        return {
          on: {
            click: (event) => {
              // å¦‚果点击的不是展开图标区域则渲染图表,相反则相当于点击展开图标
              if (event.target.className !== 'ant-table-row-expand-icon-cell') {
                this.TableDraw(index, record)
              } else {
                if (event.target.children && event.target.children.length > 0) event.target.children[0].click()
              }
            }
          }
        }
      },
      handleExpandChange(expanded, record) {
        console.log('expanded', expanded, 'record', record)
        let _this = this
        // å½“展开时若该行未被展开过才会请求后台数据,展开过的数据会被缓存无需重复请求
        if (expanded && !this.hasRequsetAlarmCodeList.includes(record.alarmCode)) {
          this.loading = true
          setTimeout(() => {
            _this.dataList.forEach(item => {
              if (record.alarmCode === item.alarmCode) {
                item.innerDataList = [
                  {
                    equipmentId: '11234',
                    equipmentName: '立体机床',
                    alarmTime: 20,
                    endTime: 20,
                    duration: 123
                  },
                  {
                    equipmentId: '4213',
                    equipmentName: '卧室机床',
                    alarmTime: 312,
                    endTime: 31,
                    duration: 421
                  }
                ]
              }
            })
            this.loading = false
          }, 1000)
          this.hasRequsetAlarmCodeList.push(record.alarmCode)
        }
      }
      // /**
      //  * è‡ªå®šä¹‰å±•开表格图标
      //  * @param props å›¾æ ‡å±žæ€§
      //  * @returns {null} è‹¥ä¸»è¡¨æ•°æ®ä¸‹æ— æ•°æ®åˆ™ä¸æ˜¾ç¤ºå›¾æ ‡
      //  */
      // expandIcon(props){
      //   console.log('props',props)
      //   if (props.record.innerDataList&&props.record.innerDataList.length>0){
      //     if (props.expanded) {
      //       return <a style="margin-right:0px;color:#999" onClick={e=> {
      //         props.onExpand(props.record, e);
      //       }}><a-icon type="minus" /></a>
      //     } else{
      //       return <a style="margin-right:0px;color:#999" onClick={e => {
      //         props.onExpand(props.record, e);
      //       }}><a-icon type="plus"/></a>
      //     }
      //   }else{
      //     return null
      //   }
      // }
    }
  }
</script>
@@ -591,28 +785,28 @@
  @media screen and (min-width: 1920px) {
    #Efficiency {
      height: 337px !important;
      height: 258px !important;
      overflow: scroll;
    }
  }
  @media screen and (min-width: 1680px) and (max-width: 1920px) {
    #Efficiency {
      height: 337px !important;
      height: 258px !important;
      overflow: scroll;
    }
  }
  @media screen and (min-width: 1400px) and (max-width: 1680px) {
    #Efficiency {
      height: 190px !important;
      height: 160px !important;
      overflow: scroll;
    }
  }
  @media screen and (min-width: 1280px) and (max-width: 1400px) {
    #Efficiency {
      height: 90px !important;
      height: 60px !important;
      overflow: scroll;
    }
  }
@@ -646,4 +840,26 @@
  .efficiency_list #DeviceList {
    height: 90% !important;
  }
  /deep/ .ant-table-body .ant-table-row td {
    padding-top: 10px;
    padding-bottom: 10px;
    cursor: pointer;
  }
  /deep/ .ant-spin-nested-loading {
    height: 55%;
  }
  /deep/ .ant-spin-container {
    height: 100%;
  }
  /deep/ .ant-table.ant-table-bordered {
    height: 265px;
  }
  /deep/ .ant-table-scroll>.ant-table-placeholder {
    height: 210px;
  }
</style>
src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue
@@ -1,58 +1,67 @@
<template>
  <div :bordered="false" class="device_list">
    <div class="com_box">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div style="width: 100%; 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">-->
      <!-- æŸ¥è¯¢åŒºåŸŸ -->
      <div style="width: 100%; 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 placeholder="输入设备名称查询" :readOnly="readOnly" v-model="queryParam.tierName"></a-input>-->
            <!--<a-input placeholder="输入设备名称查询" :readOnly="readOnly" v-model="queryParam.tierName"></a-input>-->
            <!--</a-form-item>-->
          <!--</a-col>-->
          <a-col :md="5" :sm="5">
            <a-form-item label="驱动类型">
              <!--<j-dict-select-tag placeholder="请选择驱动类型"-->
                                 <!--:triggerChange="true" dictCode="mdc_driveType"-->
                                 <!--v-model="queryParam.driveType" allow-clear/>-->
              <a-auto-complete
                v-model="queryParam.driveType"
                :data-source="driveTypeList"
                placeholder="驱动类型"
                :filter-option="filterOption"
              />
            </a-form-item>
          </a-col>
          <a-col :md="9" :sm="9" :xs="4">
            <a-form-item label="时间">
              <a-range-picker @change="dateParamChange" v-model="dates"  format="YYYYMMDD"/>
            </a-form-item>
          </a-col>
          <a-col :md="2" :sm="3" :xs="3">
            <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
          </a-col>
          <a-col :md="2" :sm="2" :xs="2">
            <a-button type="primary" @click="searchReset" icon="reload">重置</a-button>
          </a-col>
        </a-row>
      </a-form>
            <!--</a-col>-->
            <a-col :md="5" :sm="5">
              <a-form-item label="设备">
                <a-input-search :readOnly="true" v-model="queryParam.equipmentId" @search="deviceSearch"
                                placeholder='请选择设备'/>
              </a-form-item>
            </a-col>
            <a-col :md="5" :sm="5">
              <a-form-item label="驱动类型">
                <!--<j-dict-select-tag placeholder="请选择驱动类型"-->
                <!--:triggerChange="true" dictCode="mdc_driveType"-->
                <!--v-model="queryParam.driveType" allow-clear/>-->
                <a-auto-complete
                  v-model="queryParam.driveType"
                  :data-source="driveTypeList"
                  placeholder="驱动类型"
                  :filter-option="filterOption"
                />
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="6" :xs="6">
              <a-form-item label="时间">
                <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD"/>
              </a-form-item>
            </a-col>
            <a-col>
              <a-space>
                <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
                <a-button type="primary" @click="searchReset" icon="reload">重置</a-button>
              </a-space>
            </a-col>
          </a-row>
        </a-form>
      </div>
      <!-- table区域-begin -->
      <div id="DeviceList">
        <a-tabs :activeKey="activeKey" @change="tabChange" tabPosition="top">
          <a-tab-pane key="1" tab="图形">
            <comparative-analysis-bar ref="AnalysisBar" :dataList='AnalysisBarList'></comparative-analysis-bar>
          </a-tab-pane>
          <a-tab-pane key="2" tab="仪表" forceRender>
            <comparative-analysis-gauge ref="AnalysisGauge" :dataList="AnalysisGauge"></comparative-analysis-gauge>
          </a-tab-pane>
          <a-tab-pane key="3" tab="饼图" forceRender>
            <conparative-analysis-pie ref="AnalysisPie" :dataList="AnalysisPie"></conparative-analysis-pie>
          </a-tab-pane>
        </a-tabs>
      </div>
      <!-- table区域-end -->
    </div>
    <!-- table区域-begin -->
    <div id="DeviceList">
      <a-tabs :activeKey="activeKey" @change="tabChange" tabPosition="top">
        <a-tab-pane key="1" tab="图形">
          <comparative-analysis-bar ref="AnalysisBar" :dataList='AnalysisBarList'></comparative-analysis-bar>
        </a-tab-pane>
        <a-tab-pane key="2" tab="仪表" forceRender>
          <comparative-analysis-gauge ref="AnalysisGauge" :dataList="AnalysisGauge"></comparative-analysis-gauge>
        </a-tab-pane>
        <a-tab-pane key="3" tab="饼图" forceRender>
          <conparative-analysis-pie ref="AnalysisPie" :dataList="AnalysisPie"></conparative-analysis-pie>
        </a-tab-pane>
      </a-tabs>
    </div>
    <!-- table区域-end -->
    </div>
    <selectDeviceModal ref="selectDeviceModal" @selectFinished="selectOK" :title="'选择设备'"></selectDeviceModal>
  </div>
</template>
@@ -67,7 +76,7 @@
    getAction
  } from '@/api/manage'
  import comparativeAnalysisBar from './comparativeAnalysisBar'
  import comparativeAnalysisGauge from'./comparativeAnalysisGauge'
  import comparativeAnalysisGauge from './comparativeAnalysisGauge'
  import conparativeAnalysisPie from './conparativeAnalysisPie'
  import '@/components/table2excel/table2excel'
  import JInput from '@/components/jeecg/JInput'
@@ -75,6 +84,8 @@
  import Tooltip from 'ant-design-vue/es/tooltip'
  import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
  import api from '@/api/mdc'
  import selectDeviceModal from '../../../../system/modules/SelectDeviceModal.vue'
  export default {
    name: 'comparativeAnalysismain',
    // mixins: [JeecgListMixin],
@@ -86,36 +97,39 @@
      JDictSelectTag,
      JInput,
      JDate,
      JEllipsis
      JEllipsis,
      selectDeviceModal
    },
    props: {  nodeTree: '', Type:'',nodePeople: '' },
    props: { nodeTree: '', Type: '', nodePeople: '' },
    data() {
      return {
        activeKey: '1',
        typeTree:"",
        typeParent:1,
        typeEquipment:1,
        AnalysisBarList:[],
        AnalysisGauge:[],
        AnalysisPie:[],
        typeTree: '',
        typeParent: 1,
        typeEquipment: 1,
        AnalysisBarList: [],
        AnalysisGauge: [],
        AnalysisPie: [],
        dates: [],
        xianshi:"",
        readOnly:true,
        queryParam: {},
        queryParams:{},
        queryParamEquip:{},
        queryParamPeople:{},
        dataStartsoucre:[],
        url: {
          comparativeAnalysis:'/mdc/efficiencyReport/comparativeAnalysis'
        xianshi: '',
        readOnly: true,
        queryParam: {
          equipmentId: ''
        },
        AnalysisList:{},
        driveTypeList:[]
        queryParams: {},
        queryParamEquip: {},
        queryParamPeople: {},
        dataStartsoucre: [],
        url: {
          comparativeAnalysis: '/mdc/efficiencyReport/comparativeAnalysis'
        },
        AnalysisList: {},
        driveTypeList: []
      }
    },
    watch:{
      Type(valmath){
        this.dataList = [];
    watch: {
      Type(valmath) {
        this.dataList = []
        this.queryParams.typeTree = valmath
        // console.log(this.queryParams.typeTree)
      },
@@ -123,8 +137,9 @@
        if (JSON.stringify(val) != '{}') {
          if (val.equipmentId) {
            // this.$set(this.queryParam, 'tierName', val.title)
            this.queryParamEquip.parentId =  ""
            this.queryParams.equipmentId = val.equipmentId
            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)
@@ -132,14 +147,13 @@
            this.queryParams.equipmentId = ''
          }
          this.searchQuery()
        }
      },
      nodePeople(val){
      nodePeople(val) {
        if (JSON.stringify(val) != '{}') {
          if (val.equipmentId) {
            // this.$set(this.queryParam, 'tierName', val.title)
            this.queryParamEquip.parentId =  ""
            this.queryParamEquip.parentId = ''
            this.queryParams.equipmentId = val.equipmentId
            this.queryParamEquip.equipmentId = val.equipmentId
          } else {
@@ -159,10 +173,10 @@
        // console.log(v1,v2)
        this.queryParam.startTime = v2[0]
        this.queryParam.endTime = v2[1]
        console.log(v2[0],v2[1])
        console.log(v2[0], v2[1])
      },
      loadAnalysis(){
        getAction(this.url.comparativeAnalysis,this.queryParam).then(res => {
      loadAnalysis() {
        getAction(this.url.comparativeAnalysis, this.queryParam).then(res => {
          if (res.success) {
            this.AnalysisList = res.result
            this.AnalysisBarList = res.result.graphics
@@ -175,44 +189,44 @@
          this.loading = false
        })
      },
      searchQuery(){
        if(this.dates&&this.dates.length>0){
      searchQuery() {
        if (this.dates && this.dates.length > 0) {
          this.AnalysisList = []
          this.AnalysisBarList = []
          this.AnalysisGauge = []
          this.AnalysisPie = []
          if(this.queryParams.typeTree == "1"){
            this.queryParams.parentId =  this.queryParamEquip.parentId
          if (this.queryParams.typeTree == '1') {
            this.queryParams.parentId = this.queryParamEquip.parentId
            // this.queryParams.equipmentId =  this.queryParamEquip.equipmentId
          }else{
          } 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.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){
          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{
            } else {
              // this.$message.warning(res.message)
              this.$notification.warning({
                message:'消息',
                description:res.message
              });
                message: '消息',
                description: res.message
              })
            }
          }).finally(() => {
            this.loading = false
          })
        }else{
        } else {
          this.$notification.warning({
            message:'提示' ,
            description:'请选择时间'
            message: '提示',
            description: '请选择时间'
          })
        }
@@ -222,70 +236,70 @@
        this.AnalysisBarList = []
        this.AnalysisGauge = []
        this.AnalysisPie = []
        if(this.queryParams.typeTree == "1"){
        if (this.queryParams.typeTree == '1') {
          this.typeTree = this.queryParams.typeTree
          this.typeParent =  this.queryParams.parentId
          this.typeParent = this.queryParams.parentId
          this.typeEquipment = this.queryParams.equipmentId
          this.queryParams = {}
          this.queryParam = {}
          this.dates = []
          this.queryParams.typeTree = this.typeTree
          this.queryParams.parentId = this.typeParent
          if(this.queryParams.parentId !=  ""){
            this.queryParams.equipmentId =  ""
          }else{
            if(this.queryParams.equipmentId == this.queryParamEquip.equipmentId){
              this.queryParams.equipmentId =  this.typeEquipment
            }else{
          if (this.queryParams.parentId != '') {
            this.queryParams.equipmentId = ''
          } else {
            if (this.queryParams.equipmentId == this.queryParamEquip.equipmentId) {
              this.queryParams.equipmentId = this.typeEquipment
            } else {
              this.queryParams.equipmentId = this.queryParamEquip.equipmentId
            }
          }
          getAction(this.url.comparativeAnalysis,this.queryParams).then((res) => {
            if(res.success){
          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{
            } else {
              // this.$message.warning(res.message)
              this.$notification.warning({
                message:'消息',
                description:res.message
              });
                message: '消息',
                description: res.message
              })
            }
          }).finally(() => {
            this.loading = false
          })
        }else{
        } else {
          this.typeTree = this.queryParams.typeTree
          this.typeParent =  this.queryParams.parentId
          this.typeParent = this.queryParams.parentId
          this.typeEquipment = this.queryParams.equipmentId
          this.queryParams = {}
          this.queryParam = {}
          this.dates = []
          this.queryParams.typeTree = this.typeTree
          this.queryParams.parentId = this.typeParent
          if(this.queryParams.parentId !=  ""){
            this.queryParams.equipmentId =  ""
          }else{
            if(this.queryParams.equipmentId == this.queryParamEquip.equipmentId){
              this.queryParams.equipmentId =  this.typeEquipment
            }else{
          if (this.queryParams.parentId != '') {
            this.queryParams.equipmentId = ''
          } else {
            if (this.queryParams.equipmentId == this.queryParamEquip.equipmentId) {
              this.queryParams.equipmentId = this.typeEquipment
            } else {
              this.queryParams.equipmentId = this.queryParamEquip.equipmentId
            }
          }
          getAction(this.url.comparativeAnalysis,this.queryParams).then((res) => {
            if(res.success){
          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{
            } else {
              // this.$message.warning(res.message)
              this.$notification.warning({
                message:'消息',
                description:res.message
              });
                message: '消息',
                description: res.message
              })
            }
          }).finally(() => {
            this.loading = false
@@ -295,9 +309,9 @@
      /**
       * è°ƒç”¨æŽ¥å£èŽ·å–æŽ§åˆ¶ç³»ç»Ÿç±»åž‹
       */
      getDriveTypeByApi(){
        api.getDriveTypeApi().then((res)=>{
          this.driveTypeList=res.result.map(item=>item.value)
      getDriveTypeByApi() {
        api.getDriveTypeApi().then((res) => {
          this.driveTypeList = res.result.map(item => item.value)
        })
      },
      /**
@@ -309,7 +323,7 @@
      filterOption(input, option) {
        return (
          option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
        );
        )
      },
      // onChange(value, dateString) {
      //   // console.log('Selected Time: ', value);
@@ -422,13 +436,35 @@
      //     this.loading = false
      //   })
      // },
      deviceSearch() {
        console.log('触发')
        this.$refs.selectDeviceModal.visible = true
        this.$refs.selectDeviceModal.selectedRowKeys = []
        this.$refs.selectDeviceModal.selectedRows = []
        this.$refs.selectDeviceModal.checkedKeys = this.queryParam.equipmentId.split(',')
      },
      /**
       * é€‰æ‹©å·²æœ‰è®¾å¤‡åŽç‚¹å‡»ç¡®å®šæ—¶è§¦å‘
       * @param data å·²é€‰æ‹©çš„设备
       */
      selectOK(data) {
        // let params = {}
        // params.equipmentIdList = []
        // for (var a = 0; a < data.length; a++) {
        //   params.equipmentIdList.push(data[a])
        // }
        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.queryParam.typeTree = '1'
      this.loadAnalysis()
      this.getDriveTypeByApi()
    }
  }
@@ -437,54 +473,62 @@
<style lang="less" scoped>
  /*@import '~@assets/less/common.less';*/
  @media screen and (min-width: 1920px){
    .device_list{
      height: 811px!important;
  @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;
  @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;
  @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;
  @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;
  @media screen and (max-width: 1280px) {
    .device_list {
      height: 564px !important;
      overflow: scroll;
    }
  }
  /*.device_list{*/
    /*display: flex;*/
  /*display: flex;*/
  /*}*/
  /*.device_list .table-page-search-wrapper{*/
    /**/
  /**/
  /*}*/
  /deep/ .ant-card-body{
    height: 100%!important;
  /deep/ .ant-card-body {
    height: 100% !important;
  }
   .device_list .com_box{
    display: flex!important;
    height: 100%!important;
    flex-direction: column!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 .table-page-search-wrapper {
    height: 6% !important;
  }
  .device_list #DeviceList{
   height: 90%!important;
  .device_list #DeviceList {
    height: 90% !important;
  }
</style>
src/views/mdc/base/modules/deviceBaseInfo/EqumentDetaiModel.vue
@@ -84,14 +84,15 @@
                <a-descriptions-item label="设备名称">{{resultData.equipmentName}}</a-descriptions-item>
                <a-descriptions-item label="IP地址">{{resultData.equipmentIP}}</a-descriptions-item>
                <a-descriptions-item label="端口号">{{resultData.dataPort}}</a-descriptions-item>
                <a-descriptions-item label="系统版本号">{{resultData.SystemVersion}}</a-descriptions-item>
                <a-descriptions-item label="系统版本号">{{resultData.systemVersion}}</a-descriptions-item>
                <a-descriptions-item label="驱动类型">{{resultData.driveType}}</a-descriptions-item>
                <a-descriptions-item label="系统型号">{{resultData.SystemType}}</a-descriptions-item>
                <a-descriptions-item label="系统型号">{{resultData.systemType}}</a-descriptions-item>
                <a-descriptions-item label="设备类型">{{resultData.deviceType}}</a-descriptions-item>
                <a-descriptions-item label="设备功率">{{resultData.devicePower}}</a-descriptions-item>
                <a-descriptions-item label="有效轴数">{{resultData.ValidAxis}}</a-descriptions-item>
                <a-descriptions-item label="最大轴数">{{resultData.MaxAxis}}</a-descriptions-item>
                <a-descriptions-item label="有效轴数">{{resultData.validAxis}}</a-descriptions-item>
                <a-descriptions-item label="最大轴数">{{resultData.maxAxis}}</a-descriptions-item>
                <a-descriptions-item label="备注">{{resultData.remark}}</a-descriptions-item>
              </a-descriptions>
              <!-- <a-descriptions
@@ -228,13 +229,25 @@
                v-show="mdcDriveTypeParamConfigList != null"
                v-if="driverType != 'PLC'"
                :column="4"
                class="operationData"
              >
                <a-descriptions-item
                  v-for="(item,id) in mdcDriveTypeParamConfigList  "
                  :key="item.id"
                  :label="item.chineseName"
                >{{item.value}}</a-descriptions-item>
                >
                  <a-popover v-if="item.value&&item.value.length>18">
                    <template slot="content">
                      {{item.value}}
                    </template>
                    {{item.value}}
                  </a-popover>
                  <template v-else>
                    {{item.value}}
                  </template>
                </a-descriptions-item>
              </a-descriptions>
@@ -251,16 +264,17 @@
                <!--&gt;{{item.value}}</a-descriptions-item>-->
              <!--</a-descriptions>-->
              <a-descriptions
                title="版本信息 for lsv2"
                v-if="driverType == 'LSV2'"
                :column="4"
              >
                <a-descriptions-item label="NC版本">{{resultData.nCVersion}}</a-descriptions-item>
                <a-descriptions-item label="TNC版本">{{resultData.tNCVersion}}</a-descriptions-item>
                <a-descriptions-item label="OPT版本">{{resultData.oPTVersion}}</a-descriptions-item>
                <a-descriptions-item label="PLC版本">{{resultData.pLCVersion}}</a-descriptions-item>
              </a-descriptions>
              <!--<a-descriptions-->
                <!--title="版本信息 for lsv2"-->
                <!--v-if="driverType == 'LSV2'"-->
                <!--:column="4"-->
                <!--class="lsv2Data"-->
              <!--&gt;-->
                <!--<a-descriptions-item label="NC版本">{{resultData.ncversion}}</a-descriptions-item>-->
                <!--<a-descriptions-item label="TNC版本">{{resultData.tncversion}}</a-descriptions-item>-->
                <!--<a-descriptions-item label="OPT版本">{{resultData.optversion}}</a-descriptions-item>-->
                <!--<a-descriptions-item label="PLC版本">{{resultData.plcversion}}</a-descriptions-item>-->
              <!--</a-descriptions>-->
            </td>
          </tr>
@@ -290,7 +304,6 @@
    props: {},
    data() {
      return {
        mdcDriveTypeParamConfigList: [],
        xyzAliasesList: [],
        title: '',
@@ -464,7 +477,7 @@
                  show: false,
                },
                axisTick: {
                  show: true,
                  show: false,
                  length: 20,
                  splitNumber: 1,
                  lineStyle: {
@@ -520,6 +533,9 @@
                pointer: {
                  show: true,
                  width: 3,
                  itemStyle:{
                    color:'#fff',
                  }
                },
                data: [{
                  name: '',
@@ -717,7 +733,7 @@
                  show: false,
                },
                axisTick: {
                  show: true,
                  show: false,
                  length: 20,
                  splitNumber: 1,
                  lineStyle: {
@@ -773,6 +789,9 @@
                pointer: {
                  show: true,
                  width: 3,
                  itemStyle:{
                    color:'#fff'
                  }
                },
                data: [{
                  name: '',
@@ -867,7 +886,7 @@
                type: 'gauge',
                radius: '80%',
                min: 0, //最小刻度
                max: 300, //最大刻度
                max: 100, //最大刻度
                splitNumber: 10, //刻度数量
                startAngle: 225,
                endAngle: -45,
@@ -970,7 +989,7 @@
                  show: false,
                },
                axisTick: {
                  show: true,
                  show: false,
                  length: 20,
                  splitNumber: 1,
                  lineStyle: {
@@ -994,12 +1013,12 @@
                radius: '52.5%',
                z: 3,
                startAngle: 225,
                max: 300,
                max: 100,
                endAngle: -45,
                axisLine: {
                  lineStyle: {
                    color: [
                      [_this.spindleload / 300, '#31F3FF'], // åŠ¨æ€
                      [_this.spindleload / 100, '#31F3FF'], // åŠ¨æ€
                      [1, '#185363']
                    ],
                    width: 4
@@ -1026,6 +1045,9 @@
                pointer: {
                  show: true,
                  width: 3,
                  itemStyle:{
                    color:'#fff'
                  }
                },
                data: [{
                  name: '',
@@ -1223,7 +1245,7 @@
                  show: false,
                },
                axisTick: {
                  show: true,
                  show: false,
                  length: 20,
                  splitNumber: 1,
                  lineStyle: {
@@ -1279,6 +1301,9 @@
                pointer: {
                  show: true,
                  width: 3,
                  itemStyle:{
                    color:'#fff'
                  }
                },
                data: [{
                  name: '',
@@ -1439,7 +1464,7 @@
    /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
    /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
    background-color: #312c2c;
    opacity: 0.7;
    opacity: 0.9;
  }
  /deep/ .ant-modal-close {
    color: #1191b0;
@@ -1524,4 +1549,18 @@
  .ant-tabs-content .ant-form-item {
    margin-bottom: 0px;
  }
  /deep/ .ant-descriptions-item-label{
    width: 6.7vw;
    text-align: right;
    margin-right: 10px;
  }
  /deep/ .operationData .ant-descriptions-item-content
  {
    width: 130px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
</style>
src/views/mdc/base/modules/deviceCalendar/DeviceCalendarModel.vue
@@ -8,7 +8,7 @@
            <a-col :span="24">
              <a-form-item label="设备组" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
                <a-input-search :readOnly="true" v-decorator="['equipmentId', validatorRules.equipmentId]"
                                @search="deviceSearch" enter-button/>
                                @search="deviceSearch" enter-button placeholder="请选择设备"/>
              </a-form-item>
            </a-col>
          </a-row>
@@ -44,6 +44,7 @@
        </a-form>
      </a-spin>
      <device-calend-list-model ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></device-calend-list-model>
      <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'选择设备'"/>
    </a-modal>
  </div>
</template>
@@ -62,10 +63,11 @@
  } from '@/api/api'
  import Calendar from 'vue-calendar-component';
  import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal'
  export default {
    name: 'ShiftInfoModel',
    components: {DeviceCalendListModel,Calendar},
    components: { SelectDeviceModal, DeviceCalendListModel,Calendar},
    props: {},
    data() {
      return {
@@ -239,9 +241,10 @@
        this.value = value;
      },
      deviceSearch() {
        this.$refs.deviceRepairListModel.openPage()
        this.$refs.deviceRepairListModel.title = '选择设备'
        this.$refs.deviceRepairListModel.disableSubmit = false
        this.$refs.selectDeviceModal.visible = true
        this.$refs.selectDeviceModal.selectedRowKeys = []
        this.$refs.selectDeviceModal.selectedRows = []
        this.$refs.selectDeviceModal.checkedKeys = this.form.getFieldValue('equipmentId') ? this.form.getFieldValue('equipmentId').split(',') : []
      },
      getDeviceRows(val) {
        console.log("========",val);
@@ -342,6 +345,21 @@
        this.close()
      },
      /**
       * é€‰æ‹©å·²æœ‰è®¾å¤‡åŽç‚¹å‡»ç¡®å®šæ—¶è§¦å‘
       * @param data å·²é€‰æ‹©çš„设备
       */
      selectOK(data) {
        // let params = {}
        // params.equipmentIdList = []
        // for (var a = 0; a < data.length; a++) {
        //   params.equipmentIdList.push(data[a])
        // }
        console.log('data=', data)
        this.form.setFieldsValue({
          equipmentId: data.join(',')
        })
      }
    }
  }
</script>
src/views/mdc/base/modules/deviceRepair/DeviceRepairModel.vue
@@ -19,7 +19,7 @@
            <!--</a-form-item>-->
            <a-form-item label="设备组" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
              <a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]"
                              @search="deviceSearch" enter-button/>
                              @search="deviceSearch" enter-button placeholder="请选择设备"/>
              <!--<a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="请输入设备编号"-->
              <!--v-decorator="['equipmentId',validatorRules.equipmentId]"/>-->
            </a-form-item>
@@ -74,17 +74,13 @@
        <!--</a-row>-->
      </a-form>
    </a-spin>
    <device-repair-list-model ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"
                              :selectedEquipmentIds="selectedEquipmentIds"
    ></device-repair-list-model>
    <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'选择设备'"/>
  </a-modal>
</template>
<script>
  import moment from 'moment'
  import pick from 'lodash.pick'
  import DeviceRepairListModel from './DeviceRepairListModel'
  import JDate from './JDate'
  import {
    getAction,
@@ -94,12 +90,12 @@
  import {
    duplicateCheck
  } from '@/api/api'
  import AFormItem from 'ant-design-vue/es/form/FormItem'
  import Vue from 'vue'
  import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal'
  export default {
    name: 'DeviceRepairModel',
    components: { AFormItem, DeviceRepairListModel, JDate },
    components: { SelectDeviceModal, JDate },
    props: {
      equipmentId: {
        type: String
@@ -277,9 +273,10 @@
        // })
      },
      deviceSearch() {
        this.$refs.deviceRepairListModel.openPage()
        this.$refs.deviceRepairListModel.title = '选择设备'
        this.$refs.deviceRepairListModel.disableSubmit = false
        this.$refs.selectDeviceModal.visible = true
        this.$refs.selectDeviceModal.selectedRowKeys = []
        this.$refs.selectDeviceModal.selectedRows = []
        this.$refs.selectDeviceModal.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : []
      },
      //级联框onChange事件
      // onChange(value) {
@@ -477,6 +474,22 @@
        return {
          disabledSeconds: () => this.range(1, 60)
        }
      },
      /**
       * é€‰æ‹©å·²æœ‰è®¾å¤‡åŽç‚¹å‡»ç¡®å®šæ—¶è§¦å‘
       * @param data å·²é€‰æ‹©çš„设备
       */
      selectOK(data) {
        // let params = {}
        // params.equipmentIdList = []
        // for (var a = 0; a < data.length; a++) {
        //   params.equipmentIdList.push(data[a])
        // }
        console.log('data=', data)
        this.form.setFieldsValue({
          equipmentIds: data.join(',')
        })
      }
    }
  }
src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue
@@ -5,19 +5,26 @@
      <div class="table-page-search-wrapper">
        <a-form layout="inline" @keyup.enter.native="searchQuery">
          <a-row :gutter="24">
            <a-col :md="4" :sm="4">
              <a-form-item label="设备类型">
                <a-select placeholder="请选择设备类型" :triggerChange="true" v-model="queryParam.equipmentType" :allowClear="true">
                  <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'>
                    {{item.equipmentTypeName}}
                  </a-select-option>
                </a-select>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="6">
              <a-form-item label="时间">
                <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates"/>
              </a-form-item>
            </a-col>
            <a-col :lg="2" :md="3" :sm="3" :xs="3">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
            </a-col>
            <a-col :lg="2"  :md="3" :sm="3" :xs="3">
              <a-button type="primary" @click="searchReset" icon="reload">重置</a-button>
            </a-col>
            <a-col :lg="2" :md="3" :sm="3" :xs="3">
              <a-button type="primary" @click="exportExcel" icon="download">导出</a-button>
            <a-col :md="14" :sm="14">
              <a-space>
                <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
                <a-button type="primary" @click="searchReset" icon="reload">重置</a-button>
                <a-button type="primary" @click="exportExcel" icon="download">导出</a-button>
              </a-space>
            </a-col>
          </a-row>
          <a-row :gutter="24">
@@ -42,65 +49,73 @@
          </tr>
        </table>
      </div>
      <div class="container" id="EfficiencyPO" style="margin-top: 20px;">
        <div class="table2">
          <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap">
            <thead>
            <tr class="thead fixed equipname">
              <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th>
              <th  class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th>
              <th  class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th>
              <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备编号</th>
              <th class="thgu dong5 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">设备名称</th>
              <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备类型</th>
              <!--<th rowspan="2">组别</th>-->
              <template v-for="(tableHead, index) in tableHeads">
                <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th>
              </template>
            </tr>
            <tr class="thead notfixed gudingth">
              <template v-for="(tableHead, index) in tableHeads">
                <th>开动率(%)</th>
                <th v-if="checkedList.indexOf('kjl') > -1">开机率(%)</th>
                <th v-if="checkedList.indexOf('kjsj') > -1">开机时间(s)</th>
                <th v-if="checkedList.indexOf('jgsj') > -1">加工时间(s)</th>
                <th v-if="checkedList.indexOf('djsj') > -1">待机时间(s)</th>
                <th v-if="checkedList.indexOf('gjsj') > -1">关机时间(s)</th>
              </template>
            </tr>
            </thead>
            <tbody>
            <tr class="mathData" v-for="(item, index) in dataList">
              <td  class="tdgu kaitou wenzi" :rowspan="item.level1span" :class="{hidden: item.level1dis,noExl:item.level1dis}"  v-show="!item.level1dis">{{item.level1}}</td>
              <td  class="tdgu1 kaitou wenzi" :rowspan="item.level2span" :class="{hidden: item.level2dis,noExl:item.level2dis}"  v-show="!item.level2dis">{{item.level2}}</td>
              <td  class="tdgu2 kaitou wenzi" :rowspan="item.level3span" :class="{hidden: item.level3dis,noExl:item.level3dis}"  v-show="!item.level3dis">{{item.level3}}</td>
              <td  class="tdgu3  kaitou">{{item.equipmentId}}</td>
              <td  class="tdgu4 kaitou">{{item.equipmentName}}</td>
              <td  class="tdgu5 kaitou">{{item.equipmentType}}</td>
              <!--<td>{{item.tierType}}</td>-->
              <template v-for="(tableHead, index) in item.dataList">
                <td :style="{background:tableHead.color }">{{tableHead.startRate | numFilter}}</td>
                <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjl') > -1">
                  {{tableHead.openRate | numFilter}}
                </td>
                <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1">
                  {{tableHead.openLong}}
                </td>
                <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('jgsj') > -1">
                  {{tableHead.processLong}}
                </td>
                <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('djsj') > -1">
                  {{tableHead.waitLong}}
                </td>
                <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gjsj') > -1">
                  {{tableHead.closeLong}}
                </td>
              </template>
            </tr>
            </tbody>
          </table>
      <a-spin :spinning="spinning">
        <div class="container" id="EfficiencyPO" style="margin-top: 20px;" >
          <div class="table2">
            <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap" v-if="dataList.length>0">
              <thead>
              <tr class="thead fixed equipname">
                <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">公司</th>
                <th  class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">车间</th>
                <th  class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">工段</th>
                <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备编号</th>
                <th class="thgu dong5 name" rowspan="2" style="min-width: 162px; max-width: 162px;width: 162px;">设备名称</th>
                <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备类型</th>
                <!--<th rowspan="2">组别</th>-->
                <template v-for="(tableHead, index) in tableHeads">
                  <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th>
                </template>
              </tr>
              <tr class="thead notfixed gudingth">
                <template v-for="(tableHead, index) in tableHeads">
                  <th>开动率(%)</th>
                  <th v-if="checkedList.indexOf('kjl') > -1">开机率(%)</th>
                  <th v-if="checkedList.indexOf('kjsj') > -1">开机时间(小时)</th>
                  <th v-if="checkedList.indexOf('jgsj') > -1">加工时间(小时)</th>
                  <th v-if="checkedList.indexOf('djsj') > -1">待机时间(小时)</th>
                  <th v-if="checkedList.indexOf('gjsj') > -1">关机时间(小时)</th>
                </template>
              </tr>
              </thead>
              <tbody>
              <tr class="mathData" v-for="(item, index) in dataList">
                <template v-if="item.level1!=='合计'&&item.level1!=='平均值'">
                  <td  class="tdgu kaitou wenzi" :rowspan="item.level1span" :class="{hidden: item.level1dis,noExl:item.level1dis}"  v-show="!item.level1dis">{{item.level1}}</td>
                  <td  class="tdgu1 kaitou wenzi" :rowspan="item.level2span" :class="{hidden: item.level2dis,noExl:item.level2dis}"  v-show="!item.level2dis">{{item.level2}}</td>
                  <td  class="tdgu2 kaitou wenzi" :rowspan="item.level3span" :class="{hidden: item.level3dis,noExl:item.level3dis}"  v-show="!item.level3dis">{{item.level3}}</td>
                  <td  class="tdgu3  kaitou">{{item.equipmentId}}</td>
                  <td style="min-width: 162px; max-width: 162px;width: 162px;"  class="tdgu4 kaitou">{{item.equipmentName}}</td>
                  <td  class="tdgu5 kaitou">{{item.equipmentType}}</td>
                </template>
                <template v-else>
                  <td colspan="6" class="tdgu kaitou">{{item.level1}}</td>
                </template>
                <!--<td>{{item.tierType}}</td>-->
                <template v-for="(tableHead, index) in item.dataList">
                  <td :style="{background:tableHead.color }">{{tableHead.startRate | numFilter}}</td>
                  <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjl') > -1">
                    {{tableHead.openRate | numFilter}}
                  </td>
                  <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1">
                    {{tableHead.openLong | getFormattedTime}}
                  </td>
                  <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('jgsj') > -1">
                    {{tableHead.processLong | getFormattedTime}}
                  </td>
                  <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('djsj') > -1">
                    {{tableHead.waitLong | getFormattedTime}}
                  </td>
                  <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gjsj') > -1">
                    {{tableHead.closeLong | getFormattedTime}}
                  </td>
                </template>
              </tr>
              </tbody>
            </table>
          </div>
        </div>
      </div>
      </a-spin>
    </div>
  </div>
</template>
@@ -120,6 +135,7 @@
      typeParent:1,
      typeEquipment:1,
      dates: [],
      selectList:[],
      queryParam: {},
      queryParamEquip:{},
      queryParamPeople:{},
@@ -136,9 +152,11 @@
      dataList: [],
      url: {
        list: '/mdc/efficiencyReport/efficiencyPOList',
        listByType: '/mdc/MdcUtilizationRate/getByType'
        listByType: '/mdc/MdcUtilizationRate/getByType',
        queryEquipmentType: '/mdc/mdcEquipmentType/queryEquipmentType'
      },
      tableHeads: []
      tableHeads: [],
      spinning:false
    }
  },
  props: { nodeTree: '', Type:'',nodePeople: ''},
@@ -149,6 +167,7 @@
    this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
    this.queryParam.typeTree = "1"
    this.loadData()
    this.queryGroup()
  },
  watch: {
    Type(valmath){
@@ -187,7 +206,20 @@
      } else {
        return '0'
      }
    }
    },
    /**
     * æ ¼å¼åŒ–æ—¶é—´
     * @param seconds ç§’æ•°
     * @returns '' æ ¼å¼åŒ–后时间字符串
     */
    getFormattedTime(seconds) {
      if (seconds) {
        return parseFloat((seconds / 3600).toFixed(2)) + '小时'
      } else {
        return '0'
      }
    },
  },
  methods: {
    checkSameData(dataList){
@@ -379,6 +411,7 @@
      // this.onClearSelected()
    },
    loadData() {
      this.spinning=true
      this.tableHeads = []
      this.dataList = []
      getAction(this.url.list, this.queryParam).then(res => {
@@ -392,6 +425,26 @@
          this.combineCell();
          // this.initDeviceType(this.dataList)
        }
      }).finally(()=>{
        this.spinning=false
      })
    },
    queryGroup() {
      getAction(this.url.queryEquipmentType).then(res => {
        if (res.success) {
          this.selectList = res.result
          // this.selectList = res.result.map((item, index, arr) => {
          //   return { label: item.id, value: item.equipmentTypeName + '' }
          // })
        } else {
          // this.$message.warning(res.message)
          this.$notification.warning({
            message: '消息',
            description: res.message
          })
        }
      }).finally(() => {
        this.loading = false
      })
    }
  }
@@ -443,7 +496,7 @@
}
.table tbody tr .tdgu5{
  position: sticky;
  left: 400px;
  left: 412px;
  z-index: 2;
}
@@ -484,7 +537,7 @@
}
.table2 thead .equipname .dong6{
  z-index: 5;
  left: 400px;
  left: 412px;
}
src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue
@@ -6,19 +6,28 @@
        <div class="table-page-search-wrapper">
          <a-form layout="inline" @keyup.enter.native="searchQuery">
            <a-row :gutter="24">
              <a-col :md="6" :sm="6">
                <a-form-item label="时间">
                  <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates"/>
              <a-col :md="4" :sm="4">
                <a-form-item label="设备类型">
                  <a-select placeholder="请选择设备类型" :triggerChange="true" v-model="queryParam.equipmentType"
                            :allowClear="true">
                    <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'>
                      {{item.equipmentTypeName}}
                    </a-select-option>
                  </a-select>
                </a-form-item>
              </a-col>
              <a-col :lg="2" :md="3" :sm="3" :xs="3">
                <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-col :md="6" :sm="6">
                <a-form-item label="时间">
                  <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD"
                                  v-model="dates"/>
                </a-form-item>
              </a-col>
              <a-col :lg="2" :md="3" :sm="3" :xs="3">
                <a-button type="primary" @click="searchReset" icon="reload">重置</a-button>
              </a-col>
              <a-col :lg="2" :md="3" :sm="3" :xs="3">
                <a-button type="primary" @click="exportExcel" icon="download">导出</a-button>
              <a-col :md="14" :sm="14">
                <a-space>
                  <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
                  <a-button type="primary" @click="searchReset" icon="reload">重置</a-button>
                  <a-button type="primary" @click="exportExcel" icon="download">导出</a-button>
                </a-space>
              </a-col>
            </a-row>
            <a-row :gutter="24">
@@ -45,583 +54,701 @@
        </div>
      </div>
      <div id="Efficiency" class="container" style="margin-top: 20px;">
        <div class="table2">
          <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap">
            <thead>
            <tr class="thead fixed equipname">
              <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th>
              <th  class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th>
              <th  class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th>
              <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备编号</th>
              <th class="thgu dong5 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">设备名称</th>
              <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备类型</th>
              <!--<th rowspan="2">组别</th>-->
              <template v-for="(tableHead, index) in tableHeads">
                <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th>
              </template>
            </tr>
            <tr class="thead notfixed gudingth">
              <template v-for="(tableHead, index) in tableHeads">
                <th>利用率(%)</th>
                <th v-if="checkedList.indexOf('kjl') > -1">开机率(%)</th>
                <th v-if="checkedList.indexOf('kjsj') > -1">开机时间(s)</th>
                <th v-if="checkedList.indexOf('jgsj') > -1">加工时间(s)</th>
                <th v-if="checkedList.indexOf('djsj') > -1">待机时间(s)</th>
                <th v-if="checkedList.indexOf('gjsj') > -1">关机时间(s)</th>
              </template>
            </tr>
            </thead>
            <tbody>
            <tr class="mathData" v-for="(item, index) in dataList">
              <td  class="tdgu kaitou wenzi" :rowspan="item.level1span" :class="{hidden: item.level1dis,noExl:item.level1dis}"  v-show="!item.level1dis">{{item.level1}}</td>
              <td  class="tdgu1 kaitou wenzi" :rowspan="item.level2span" :class="{hidden: item.level2dis,noExl:item.level2dis}"  v-show="!item.level2dis">{{item.level2}}</td>
              <td  class="tdgu2 kaitou wenzi" :rowspan="item.level3span" :class="{hidden: item.level3dis,noExl:item.level3dis}"  v-show="!item.level3dis">{{item.level3}}</td>
              <td  class="tdgu3  kaitou">{{item.equipmentId}}</td>
              <td  class="tdgu4 kaitou">{{item.equipmentName}}</td>
              <td  class="tdgu5 kaitou">{{item.equipmentType}}</td>
              <template v-for="(tableHead, index) in item.dataList">
                <td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td>
                <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjl') > -1">
                  {{tableHead.openRate | numFilter}}
                </td>
                <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1">
                  {{tableHead.openLong}}
                </td>
                <td :style="{background:tableHead.color }"  v-if="checkedList.indexOf('jgsj') > -1">
                  {{tableHead.processLong}}
                </td>
                <td :style="{background:tableHead.color }"  v-if="checkedList.indexOf('djsj') > -1">
                  {{tableHead.waitLong}}
                </td>
                <td :style="{background:tableHead.color }"  v-if="checkedList.indexOf('gjsj') > -1">
                  {{tableHead.closeLong}}
                </td>
              </template>
            </tr>
            </tbody>
          </table>
      <a-spin :spinning="spinning">
        <div id="Efficiency" class="container" style="margin-top: 20px;">
          <div class="table2">
            <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap"
                   v-if="dataList.length>0">
              <thead>
              <tr class="thead fixed equipname">
                <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">公司</th>
                <th class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">车间</th>
                <th class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">工段</th>
                <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备编号
                </th>
                <th class="thgu dong5 name" rowspan="2" style="min-width: 162px; max-width: 162px;width: 162px;">设备名称
                </th>
                <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备类型
                </th>
                <!--<th rowspan="2">组别</th>-->
                <template v-for="(tableHead, index) in tableHeads">
                  <th class="timeth" :colspan="checkedList.length">{{tableHead}}</th>
                </template>
              </tr>
              <tr class="thead notfixed gudingth">
                <template v-for="(tableHead, index) in tableHeads">
                  <th>利用率(%)</th>
                  <th v-if="checkedList.indexOf('kjl') > -1">开机率(%)</th>
                  <th v-if="checkedList.indexOf('kjsj') > -1">开机时间(小时)</th>
                  <th v-if="checkedList.indexOf('jgsj') > -1">加工时间(小时)</th>
                  <th v-if="checkedList.indexOf('djsj') > -1">待机时间(小时)</th>
                  <th v-if="checkedList.indexOf('gjsj') > -1">关机时间(小时)</th>
                </template>
              </tr>
              </thead>
              <tbody>
              <tr class="mathData" v-for="(item, index) in dataList">
                <template v-if="item.level1!=='合计'&&item.level1!=='平均值'">
                  <td class="tdgu kaitou wenzi" :rowspan="item.level1span"
                      :class="{hidden: item.level1dis,noExl:item.level1dis}" v-show="!item.level1dis">{{item.level1}}
                  </td>
                  <td class="tdgu1 kaitou wenzi" :rowspan="item.level2span"
                      :class="{hidden: item.level2dis,noExl:item.level2dis}" v-show="!item.level2dis">{{item.level2}}
                  </td>
                  <td class="tdgu2 kaitou wenzi" :rowspan="item.level3span"
                      :class="{hidden: item.level3dis,noExl:item.level3dis}" v-show="!item.level3dis">{{item.level3}}
                  </td>
                  <td class="tdgu3  kaitou">{{item.equipmentId}}</td>
                  <td class="tdgu4 kaitou" style="min-width: 162px; max-width: 162px;width: 162px;">{{item.equipmentName}}</td>
                  <td class="tdgu5 kaitou">{{item.equipmentType}}</td>
                </template>
                <!--合计与平均值区域-->
                <template v-else>
                  <td colspan="6" class="tdgu kaitou">{{item.level1}}</td>
                </template>
                <template v-for="(tableHead, index) in item.dataList">
                  <td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td>
                  <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjl') > -1">
                    {{tableHead.openRate | numFilter}}
                  </td>
                  <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1">
                    {{tableHead.openLong | getFormattedTime}}
                  </td>
                  <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('jgsj') > -1">
                    {{tableHead.processLong | getFormattedTime}}
                  </td>
                  <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('djsj') > -1">
                    {{tableHead.waitLong | getFormattedTime}}
                  </td>
                  <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gjsj') > -1">
                    {{tableHead.closeLong | getFormattedTime}}
                  </td>
                </template>
              </tr>
              </tbody>
            </table>
          </div>
        </div>
      </div>
      </a-spin>
    </div>
  </div>
</template>
<script>
import moment from 'moment'
import { putAction, getAction } from '@/api/manage'
import $ from 'jquery'
import '@/components/table2excel/table2excel'
import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
export default {
  name: 'EfficiencyList',
  components: {},
  data() {
    return {
      typeTree:"",
      typeParent:1,
      typeEquipment:1,
      TreeIDOne:1,
      TreeIDTwo:2,
      deviceTypeDict: '',
      dates: [],
      identifying: [],
      queryParam: {},
      queryParams:{},
      queryParamEquip:{},
      queryParamPeople:{},
      efficiencyOptions: [
        { label: '利用率', value: 'lyl' },
        { label: '开机率', value: 'kjl' },
        { label: '开机时间', value: 'kjsj' },
        { label: '加工时间', value: 'jgsj' },
        { label: '待机时间', value: 'djsj' },
        { label: '关机时间', value: 'gjsj' }
      ],
      checkedList: ['lyl'],
      dataList: [],
      url: {
        list: '/mdc/efficiencyReport/efficiencyList',
        listByType: '/mdc/MdcUtilizationRate/getByType',
      },
      tableHeads: [],
  import moment from 'moment'
  import { putAction, getAction } from '@/api/manage'
  import $ from 'jquery'
  import '@/components/table2excel/table2excel'
  import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
    }
  },
  props: { nodeTree: '',Type:'',nodePeople:'' },
  created() {
    this.showIdentifying()
    this.dates = [moment().subtract('days', 8), moment().subtract('days', 1)]
    this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD')
    this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
    this.queryParam.typeTree = "1"
    this.loadData()
  },
  watch: {
    Type(valmath){
      this.dataList = [];
      this.queryParam.typeTree = valmath
    },
    nodeTree(val) { //监听currSelected å˜åŒ–,将变化后的数值传递给 getCurrSelected äº‹ä»¶
      if (JSON.stringify(val) != '{}') {
        if (val.equipmentId != null) {
          this.queryParamEquip.parentId = ''
          this.queryParamEquip.equipmentId = val.equipmentId
        } else {
          this.queryParamEquip.parentId = val.key
          this.queryParamEquip.equipmentId = ''
        }
        this.searchQuery()
  export default {
    name: 'EfficiencyList',
    components: {},
    data() {
      return {
        typeTree: '',
        typeParent: 1,
        typeEquipment: 1,
        TreeIDOne: 1,
        TreeIDTwo: 2,
        deviceTypeDict: '',
        dates: [],
        selectList: [],
        identifying: [],
        queryParam: {},
        queryParams: {},
        queryParamEquip: {},
        queryParamPeople: {},
        efficiencyOptions: [
          { label: '利用率', value: 'lyl' },
          { label: '开机率', value: 'kjl' },
          { label: '开机时间', value: 'kjsj' },
          { label: '加工时间', value: 'jgsj' },
          { label: '待机时间', value: 'djsj' },
          { label: '关机时间', value: 'gjsj' }
        ],
        checkedList: ['lyl'],
        dataList: [],
        url: {
          list: '/mdc/efficiencyReport/efficiencyList',
          listByType: '/mdc/MdcUtilizationRate/getByType',
          queryEquipmentType: '/mdc/mdcEquipmentType/queryEquipmentType'
        },
        tableHeads: [],
        distinguishColorList: [],
        utilizationRateRowAverage: '',
        openRateRowAverage: '',
        openLongRowAverage: '',
        processLongRowAverage: '',
        waitLongRowAverage: '',
        closeLongRowAverage: '',
        spinning: false
      }
    },
    nodePeople(val){
      if (JSON.stringify(val) != '{}') {
        if (val.equipmentId != null) {
          this.queryParamPeople.parentId = val.equipmentId
          this.queryParamPeople.equipmentId = ''
        } else {
          this.queryParamPeople.parentId = val.key
          this.queryParamPeople.equipmentId = ''
        }
        this.searchQuery()
      }
    }
  },
  filters: {
    numFilter(value) {
      if (value) {
        return parseFloat((value * 100).toFixed(2))
      } else {
        return '0'
      }
    }
  },
  methods: {
    checkSameData(dataList){
      let cache = {};  //存储的是键是kclx çš„值,值是kclx åœ¨indeces中数组的下标
      let indices = [];  //数组中每一个值是一个数组,数组中的每一个元素是原数组中相同kclx的下标
      dataList.map((item,index)=>{
        let level1 = item.level1;
        let _index = cache[level1];
        if(_index!==undefined){
          indices[_index].push(index)
        }else{
          cache[level1] = indices.length
          indices.push([index])
        }
      })
      let result = [];
      indices.map((item)=>{
        item.map((index)=>{
          result.push(dataList[index])
        })
      })
      this.dataList = result
    props: { nodeTree: '', Type: '', nodePeople: '' },
    created() {
      this.showIdentifying()
      this.dates = [moment().subtract('days', 8), moment().subtract('days', 1)]
      this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD')
      this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
      this.queryParam.typeTree = '1'
      this.loadData()
      this.queryGroup()
    },
    checkSameData1(dataList){
      let cache = {};  //存储的是键是kclx çš„值,值是kclx åœ¨indeces中数组的下标
      let indices = [];  //数组中每一个值是一个数组,数组中的每一个元素是原数组中相同kclx的下标
      dataList.map((item,index)=>{
        let level2 = item.level2;
        let _index = cache[level2];
        if(_index!==undefined){
          indices[_index].push(index)
        }else{
          cache[level2] = indices.length
          indices.push([index])
        }
      })
      let result = [];
      indices.map((item)=>{
        item.map((index)=>{
          result.push(dataList[index])
        })
      })
      this.dataList = result
    },
    checkSameData2(dataList){
      let cache = {};  //存储的是键是kclx çš„值,值是kclx åœ¨indeces中数组的下标
      let indices = [];  //数组中每一个值是一个数组,数组中的每一个元素是原数组中相同kclx的下标
      dataList.map((item,index)=>{
        let level3 = item.level3;
        let _index = cache[level3];
        if(_index!==undefined){
          indices[_index].push(index)
        }else{
          cache[level3] = indices.length
          indices.push([index])
        }
      })
      let result = [];
      indices.map((item)=>{
        item.map((index)=>{
          result.push(dataList[index])
        })
      })
      this.dataList = result
    },
    // åˆå¹¶
    combineCell() {
      console.log(this.dataList)
      let list =this.dataList;
      for (let field in list[0]) {
        var k = 0;
        while (k < list.length) {
          list[k][field + 'span'] = 1;
          list[k][field + 'dis'] = false;
          for (var i = k + 1; i <= list.length - 1; i++) {
            if (list[k][field] == list[i][field] && list[k][field] != '') {
              list[k][field + 'span']++;
              list[k][field + 'dis'] = false;
              list[i][field + 'span'] = 1;
              list[i][field + 'dis'] = true;
            } else {
              break;
            }
    watch: {
      Type(valmath) {
        this.dataList = []
        this.queryParam.typeTree = valmath
      },
      nodeTree(val) { //监听currSelected å˜åŒ–,将变化后的数值传递给 getCurrSelected äº‹ä»¶
        if (JSON.stringify(val) != '{}') {
          if (val.equipmentId != null) {
            this.queryParamEquip.parentId = ''
            this.queryParamEquip.equipmentId = val.equipmentId
          } else {
            this.queryParamEquip.parentId = val.key
            this.queryParamEquip.equipmentId = ''
          }
          k = i;
          this.searchQuery()
        }
      },
      nodePeople(val) {
        if (JSON.stringify(val) != '{}') {
          if (val.equipmentId != null) {
            this.queryParamPeople.parentId = val.equipmentId
            this.queryParamPeople.equipmentId = ''
          } else {
            this.queryParamPeople.parentId = val.key
            this.queryParamPeople.equipmentId = ''
          }
          this.searchQuery()
        }
      }
      return list;
    },
    disabledDate(current){
      //Can not slect days before today and today
      return current && current > moment().subtract('days', 1);
    filters: {
      numFilter(value) {
        if (value) {
          return parseFloat((value * 100).toFixed(2))
        } else {
          return '0'
        }
      },
      /**
       * æ ¼å¼åŒ–æ—¶é—´
       * @param seconds ç§’æ•°
       * @returns '' æ ¼å¼åŒ–后时间字符串
       */
      getFormattedTime(seconds) {
        if (seconds) {
          return parseFloat((seconds / 3600).toFixed(2)) + '小时'
        } else {
          return '0'
        }
      }
    },
    initDeviceType(deviceList) {
      let dictCode = 'mdc_equipmentType'
      let items = []
      items = getDictItemsFromCache(dictCode)
      if (deviceList && items.length > 0) {
        for (let a = 0; a < deviceList.length; a++) {
          if (items && items.length > 0) {
            for (let i = 0; i < items.length; i++) {
              if (deviceList[a].equipmentType == items[i].value) {
                deviceList[a].equipmentType = items[i].title
    computed: {},
    methods: {
      checkSameData(dataList) {
        let cache = {}  //存储的是键是kclx çš„值,值是kclx åœ¨indeces中数组的下标
        let indices = []  //数组中每一个值是一个数组,数组中的每一个元素是原数组中相同kclx的下标
        dataList.map((item, index) => {
          let level1 = item.level1
          let _index = cache[level1]
          if (_index !== undefined) {
            indices[_index].push(index)
          } else {
            cache[level1] = indices.length
            indices.push([index])
          }
        })
        let result = []
        indices.map((item) => {
          item.map((index) => {
            result.push(dataList[index])
          })
        })
        this.dataList = result
      },
      checkSameData1(dataList) {
        let cache = {}  //存储的是键是kclx çš„值,值是kclx åœ¨indeces中数组的下标
        let indices = []  //数组中每一个值是一个数组,数组中的每一个元素是原数组中相同kclx的下标
        dataList.map((item, index) => {
          let level2 = item.level2
          let _index = cache[level2]
          if (_index !== undefined) {
            indices[_index].push(index)
          } else {
            cache[level2] = indices.length
            indices.push([index])
          }
        })
        let result = []
        indices.map((item) => {
          item.map((index) => {
            result.push(dataList[index])
          })
        })
        this.dataList = result
      },
      checkSameData2(dataList) {
        let cache = {}  //存储的是键是kclx çš„值,值是kclx åœ¨indeces中数组的下标
        let indices = []  //数组中每一个值是一个数组,数组中的每一个元素是原数组中相同kclx的下标
        dataList.map((item, index) => {
          let level3 = item.level3
          let _index = cache[level3]
          if (_index !== undefined) {
            indices[_index].push(index)
          } else {
            cache[level3] = indices.length
            indices.push([index])
          }
        })
        let result = []
        indices.map((item) => {
          item.map((index) => {
            result.push(dataList[index])
          })
        })
        this.dataList = result
      },
      // åˆå¹¶
      combineCell() {
        console.log(this.dataList)
        let list = this.dataList
        for (let field in list[0]) {
          var k = 0
          while (k < list.length) {
            list[k][field + 'span'] = 1
            list[k][field + 'dis'] = false
            for (var i = k + 1; i <= list.length - 1; i++) {
              if (list[k][field] == list[i][field] && list[k][field] != '') {
                list[k][field + 'span']++
                list[k][field + 'dis'] = false
                list[i][field + 'span'] = 1
                list[i][field + 'dis'] = true
              } else {
                break
              }
            }
          } else {
            ajaxGetDictItems(dictCode, null).then((res) => {
              if (res.success) {
                let items = res.result
                for (let i = 0; i < items.length; i++) {
                  if (deviceList[a].equipmentType == items[i].value) {
                    deviceList[a].equipmentType = items[i].title
                  }
            k = i
          }
        }
        return list
      },
      disabledDate(current) {
        //Can not slect days before today and today
        return current && current > moment().subtract('days', 1)
      },
      initDeviceType(deviceList) {
        let dictCode = 'mdc_equipmentType'
        let items = []
        items = getDictItemsFromCache(dictCode)
        if (deviceList && items.length > 0) {
          for (let a = 0; a < deviceList.length; a++) {
            if (items && items.length > 0) {
              for (let i = 0; i < items.length; i++) {
                if (deviceList[a].equipmentType == items[i].value) {
                  deviceList[a].equipmentType = items[i].title
                }
              }
            })
            } else {
              ajaxGetDictItems(dictCode, null).then((res) => {
                if (res.success) {
                  let items = res.result
                  for (let i = 0; i < items.length; i++) {
                    if (deviceList[a].equipmentType == items[i].value) {
                      deviceList[a].equipmentType = items[i].title
                    }
                  }
                }
              })
            }
          }
        }
      }
    },
    exportExcel() {
      $("#Efficiency").table2excel({
        exclude: ".noExl",
        name: "Excel Document Name",
        filename: "设备利用率",
        exclude_img: true,
        fileext: ".xls",
        exclude_links: true,
        exclude_inputs: false
      });
    },
    showIdentifying() {
      getAction(this.url.listByType, { type: 'lyl' }).then(res => {
        if (res.success) {
          this.identifying = res.result
        }
      })
    },
    dateParamChange(v1, v2) {
      this.queryParam.startTime = v2[0]
      this.queryParam.endTime = v2[1]
      // ç‚¹å‡»æ—¶é—´é€‰æ‹©å™¨çš„æ¸…空按钮时会触发此判断(点击重置按钮不会触发),实现重置列表功能,切实改变列表显示效果
      if(!this.queryParam.startTime&&!this.queryParam.endTime)this.searchReset()
    },
    efficiencyOptionsOnChange(checkedList) {
      let index = checkedList.indexOf('lyl')
      if (index < 0) {
        // this.$message.warn('不能取消查询开动率')
        this.$notification.warning({
          message:'消息',
          description:"不能取消查询开动率"
      },
      exportExcel() {
        $('#Efficiency').table2excel({
          exclude: '.noExl',
          name: 'Excel Document Name',
          filename: '设备利用率',
          exclude_img: true,
          fileext: '.xls',
          exclude_links: true,
          exclude_inputs: false
        })
      },
      showIdentifying() {
        getAction(this.url.listByType, { type: 'lyl' }).then(res => {
          if (res.success) {
            this.identifying = res.result
          }
        })
      },
      dateParamChange(v1, v2) {
        this.queryParam.startTime = v2[0]
        this.queryParam.endTime = v2[1]
        // ç‚¹å‡»æ—¶é—´é€‰æ‹©å™¨çš„æ¸…空按钮时会触发此判断(点击重置按钮不会触发),实现重置列表功能,切实改变列表显示效果
        if (!this.queryParam.startTime && !this.queryParam.endTime) this.searchReset()
      },
      efficiencyOptionsOnChange(checkedList) {
        let index = checkedList.indexOf('lyl')
        if (index < 0) {
          // this.$message.warn('不能取消查询开动率')
          this.$notification.warning({
            message: '消息',
            description: '不能取消查询开动率'
          })
        return false
      }
      this.checkedList = checkedList
    },
    // searchQuery() {
    //   if(this.queryParam.typeTree == "1"){
    //     // this.queryParam.TreeIDTwo = ""
    //     this.queryParam.parentId =  this.queryParamEquip.parentId
    //     this.queryParam.equipmentId = this.queryParamEquip.equipmentId
    //   }else{
    //     // this.queryParam.TreeIDOne = ""
    //     this.queryParam.parentId = this.queryParamPeople.parentId
    //     this.queryParam.equipmentId = ""
    //   }
    //   this.loadData()
    //   // this.onClearSelected()
    // },
    // searchReset() {
    //   this.typeTree = this.queryParam.typeTree
    //   this.typeParent =  this.queryParams.parentId
    //   this.queryParam = {}
    //   this.dates = []
    //   this.queryParam.typeTree = this.typeTree
    //   this.queryParam.parentId = this.typeParent
    //   this.loadData()
    //   // this.onClearSelected()
    // },
    searchQuery() {
      if(this.dates != ''){
        if(this.queryParam.typeTree == "1"){
          this.queryParam.parentId =  this.queryParamEquip.parentId
          this.queryParam.equipmentId = this.queryParamEquip.equipmentId
        }else{
          this.queryParam.parentId = this.queryParamPeople.parentId
          this.queryParam.equipmentId = ""
          return false
        }
        this.checkedList = checkedList
      },
      // searchQuery() {
      //   if(this.queryParam.typeTree == "1"){
      //     // this.queryParam.TreeIDTwo = ""
      //     this.queryParam.parentId =  this.queryParamEquip.parentId
      //     this.queryParam.equipmentId = this.queryParamEquip.equipmentId
      //   }else{
      //     // this.queryParam.TreeIDOne = ""
      //     this.queryParam.parentId = this.queryParamPeople.parentId
      //     this.queryParam.equipmentId = ""
      //   }
      //   this.loadData()
      //   // this.onClearSelected()
      // },
      // searchReset() {
      //   this.typeTree = this.queryParam.typeTree
      //   this.typeParent =  this.queryParams.parentId
      //   this.queryParam = {}
      //   this.dates = []
      //   this.queryParam.typeTree = this.typeTree
      //   this.queryParam.parentId = this.typeParent
      //   this.loadData()
      //   // this.onClearSelected()
      // },
      searchQuery() {
        console.log('dates', this.dates)
        if (this.dates != '') {
          if (this.queryParam.typeTree == '1') {
            this.queryParam.parentId = this.queryParamEquip.parentId
            this.queryParam.equipmentId = this.queryParamEquip.equipmentId
          } else {
            this.queryParam.parentId = this.queryParamPeople.parentId
            this.queryParam.equipmentId = ''
          }
          this.loadData()
        } else {
          this.$notification.warning({
            message: '消息',
            description: '请选择时间'
          })
        }
        // this.onClearSelected()
      },
      searchReset() {
        this.typeTree = this.queryParam.typeTree
        this.typeParent = this.queryParam.parentId
        this.typeEquipment = this.queryParam.equipmentId
        this.queryParam = {}
        this.dates = []
        this.queryParam.typeTree = this.typeTree
        this.queryParam.parentId = this.typeParent
        this.queryParam.equipmentId = this.typeEquipment
        // this.ipagination.current = 1
        this.loadData()
      }else{
        this.$notification.warning({
          message:'消息',
          description:"请选择时间"
        });
      }
      // this.onClearSelected()
    },
    searchReset() {
      this.typeTree = this.queryParam.typeTree
      this.typeParent =  this.queryParam.parentId
      this.typeEquipment = this.queryParam.equipmentId
      this.queryParam = {}
      this.dates = []
      this.queryParam.typeTree = this.typeTree
      this.queryParam.parentId = this.typeParent
      this.queryParam.equipmentId =  this.typeEquipment
      // this.ipagination.current = 1
      this.loadData();
      // this.queryParam = {}
      // this.dates = []
      // this.loadData()
      // this.onClearSelected()
    },
    loadData() {
      this.tableHeads = []
      this.dataList = []
      getAction(this.url.list, this.queryParam).then(res => {
        if (res.success) {
          this.tableHeads = res.result.dates
          this.dataList = res.result.mdcEfficiencyList
          this.checkSameData(this.dataList)
          this.checkSameData1(this.dataList)
          this.checkSameData2(this.dataList)
          this.combineCell();
          // this.initDeviceType(this.dataList)
        }
      })
        // this.queryParam = {}
        // this.dates = []
        // this.loadData()
        // this.onClearSelected()
      },
      loadData() {
        this.tableHeads = []
        this.dataList = []
        this.spinning = true
        getAction(this.url.list, this.queryParam).then(res => {
          if (res.success) {
            this.tableHeads = res.result.dates
            this.dataList = res.result.mdcEfficiencyList
            this.distinguishColorList = res.result.utilizationRateList
            this.checkSameData(this.dataList)
            this.checkSameData1(this.dataList)
            this.checkSameData2(this.dataList)
            this.combineCell()
            // this.columns.push(...dataColumns)
            // this.initDeviceType(this.dataList)
          }
        }).finally(() => {
          this.spinning = false
        })
      },
      queryGroup() {
        getAction(this.url.queryEquipmentType).then(res => {
          if (res.success) {
            this.selectList = res.result
            // this.selectList = res.result.map((item, index, arr) => {
            //   return { label: item.id, value: item.equipmentTypeName + '' }
            // })
          } else {
            // this.$message.warning(res.message)
            this.$notification.warning({
              message: '消息',
              description: res.message
            })
          }
        }).finally(() => {
          this.loading = false
        })
      },
    }
  }
}
</script>
<style scoped>
.table2{
  width: 100%;
  height: 100%;
  overflow: auto;
}
.table2 thead tr th:first-child,
.table tbody tr .tdgu{
  position: sticky;
  left: 0;
  z-index: 1;
}
.table tbody tr .wenzi{
  /*writing-mode: vertical-lr;*/
  /*text-orientation: upright;*/
  transform: rotate(360deg);
  writing-mode: vertical-lr;
  letter-spacing: 2px;
}
.table tbody tr .kaitou{
  z-index: 1;
  background-color: white;
}
.table tbody tr .tdgu1{
  position: sticky;
  left: 50px;
  z-index: 2;
}
.table tbody tr .tdgu2{
  position: sticky;
  left: 100px;
  z-index: 2;
}
.table tbody tr .tdgu3{
  position: sticky;
  left: 150px;
  z-index: 2;
}
.table tbody tr .tdgu4{
  position: sticky;
  left: 250px;
  z-index: 2;
}
.table tbody tr .tdgu5{
  position: sticky;
  left: 400px;
  z-index: 2;
}
.table2 thead tr .timeth,
.table2 thead tr  .thgu {
  position: sticky;
  top:0;
  z-index: 3;
}
.table2 thead .gudingth th{
  position: sticky;
  top: 32px;
  z-index: 2;
}
.table2 thead .equipname .name{
  z-index: 3;
}
.table2 thead .equipname .dong1{
  z-index: 4;
  left: 0;
  /*border: 1px solid #000;*/
}
.table2 thead .equipname .dong2{
  z-index: 5;
  left: 50px;
}
.table2 thead .equipname .dong3{
  z-index: 5;
  left: 100px;
}
.table2 thead .equipname .dong4{
  z-index: 5;
  left: 150px;
}
.table2 thead .equipname .dong5{
  z-index: 5;
  left: 250px;
}
.table2 thead .equipname .dong6{
  z-index: 5;
  left: 400px;
}
@media screen and (min-width: 1920px){
  #Efficiency{
    height: 687px!important;
    overflow: scroll;
  .table2 {
    width: 100%;
    height: 100%;
    overflow: auto;
  }
}
@media screen and (min-width: 1680px) and (max-width: 1920px){
  #Efficiency{
    height: 687px!important;
    overflow: scroll;
  .table2 thead tr th:first-child,
  .table tbody tr .tdgu {
    position: sticky;
    left: 0;
    z-index: 1;
  }
}
@media screen and (min-width: 1400px) and (max-width: 1680px){
  #Efficiency{
    height: 540px!important;
    overflow: scroll;
  .table tbody tr .wenzi {
    /*writing-mode: vertical-lr;*/
    /*text-orientation: upright;*/
    transform: rotate(360deg);
    writing-mode: vertical-lr;
    letter-spacing: 2px;
  }
}
@media screen and (min-width: 1280px) and (max-width: 1400px){
  #Efficiency{
    height: 440px!important;
    overflow: scroll;
  .table tbody tr .kaitou {
    z-index: 1;
    background-color: white;
  }
}
@media screen and (max-width: 1280px){
  #Efficiency{
    height: 440px!important;
    overflow: scroll;
  .table tbody tr .tdgu1 {
    position: sticky;
    left: 50px;
    z-index: 2;
  }
}
#Efficiency .table_guding1{
  position: absolute;
  overflow: hidden;
  width: 500px;
}
#Efficiency .table_guding2{
  overflow-x: scroll;
  width: 500px;
}
.identifyingclass {
  width: 55px;
  height: 15px;
  display: inline-block
}
.dataContent {
  white-space: nowrap;
  /*margin: 0;*/
  /*border: none;*/
  border-collapse: separate;
  border-spacing: 0;
  /*table-layout: fixed;*/
  border: 1px solid #ccc;
  /*border: 1px solid #ccc;*/
  width: 100%;
  /*height: 100%;*/
  /*overflow: hidden;*/
  /*overflow-y: auto;*/
  text-align: center;
}
  .table tbody tr .tdgu2 {
    position: sticky;
    left: 100px;
    z-index: 2;
  }
/*.dataContent .fixed th {*/
/*width: 50px;*/
/*}*/
  .table tbody tr .tdgu3 {
    position: sticky;
    left: 150px;
    z-index: 2;
  }
.dataContent .thead th {
  background-color: #fafafa;
  text-align: center;
  height: 30px;
  padding: 5px;
}
  .table tbody tr .tdgu4 {
    position: sticky;
    left: 250px;
    z-index: 2;
  }
.dataContent .notfixed th {
  /*width: auto;*/
}
  .table tbody tr .tdgu5 {
    position: sticky;
    left: 412px;
    z-index: 2;
  }
/*.dataContent tr td {*/
  .table2 thead tr .timeth,
  .table2 thead tr .thgu {
    position: sticky;
    top: 0;
    z-index: 3;
  }
  .table2 thead .gudingth th {
    position: sticky;
    top: 32px;
    z-index: 2;
  }
  .table2 thead .equipname .name {
    z-index: 3;
  }
  .table2 thead .equipname .dong1 {
    z-index: 4;
    left: 0;
    /*border: 1px solid #000;*/
  }
  .table2 thead .equipname .dong2 {
    z-index: 5;
    left: 50px;
  }
  .table2 thead .equipname .dong3 {
    z-index: 5;
    left: 100px;
  }
  .table2 thead .equipname .dong4 {
    z-index: 5;
    left: 150px;
  }
  .table2 thead .equipname .dong5 {
    z-index: 5;
    left: 250px;
  }
  .table2 thead .equipname .dong6 {
    z-index: 5;
    left: 412px;
  }
  @media screen and (min-width: 1920px) {
    #Efficiency {
      height: 687px !important;
      overflow: scroll;
    }
  }
  @media screen and (min-width: 1680px) and (max-width: 1920px) {
    #Efficiency {
      height: 687px !important;
      overflow: scroll;
    }
  }
  @media screen and (min-width: 1400px) and (max-width: 1680px) {
    #Efficiency {
      height: 540px !important;
      overflow: scroll;
    }
  }
  @media screen and (min-width: 1280px) and (max-width: 1400px) {
    #Efficiency {
      height: 440px !important;
      overflow: scroll;
    }
  }
  @media screen and (max-width: 1280px) {
    #Efficiency {
      height: 440px !important;
      overflow: scroll;
    }
  }
  #Efficiency .table_guding1 {
    position: absolute;
    overflow: hidden;
    width: 500px;
  }
  #Efficiency .table_guding2 {
    overflow-x: scroll;
    width: 500px;
  }
  .identifyingclass {
    width: 55px;
    height: 15px;
    display: inline-block
  }
  .dataContent {
    white-space: nowrap;
    /*margin: 0;*/
    /*border: none;*/
    border-collapse: separate;
    border-spacing: 0;
    /*table-layout: fixed;*/
    border: 1px solid #ccc;
    /*border: 1px solid #ccc;*/
    width: 100%;
    /*height: 100%;*/
    /*overflow: hidden;*/
    /*overflow-y: auto;*/
    text-align: center;
  }
  /*.dataContent .fixed th {*/
  /*width: 50px;*/
  /*}*/
  .dataContent .thead th {
    background-color: #fafafa;
    text-align: center;
    height: 30px;
    padding: 5px;
  }
  .dataContent .notfixed th {
    /*width: auto;*/
  }
  /*.dataContent tr td {*/
  /*height: 35px;*/
/*}*/
  /*}*/
.dataContent .mathData td {
  padding: 10px;
  /*display: none;*/
}
  .dataContent .mathData td {
    padding: 10px;
    /*display: none;*/
  }
.dataContent .mathData .td {
  /*background-color: #ff9bd2;*/
  display: inline-block;
  padding: 10px;
}
  .dataContent .mathData .td {
    /*background-color: #ff9bd2;*/
    display: inline-block;
    padding: 10px;
  }
.dataContent .mathData .tdd {
  /*display: none;*/
}
td {
  vertical-align: middle;
}
.pink {
  background-color: #ff9bd2;
}
  td {
    vertical-align: middle;
  }
.yellow {
  background-color: #e8ff37;
}
  .pink {
    background-color: #ff9bd2;
  }
.green {
  background-color: #99ff4e;
}
  .yellow {
    background-color: #e8ff37;
  }
  .green {
    background-color: #99ff4e;
  }
  .vertical-text {
    writing-mode: vertical-rl;
  }
  /*/deep/ .ant-table-body .ant-table-row td {*/
  /*padding-top: 10px;*/
  /*padding-bottom: 10px;*/
  /*}*/
  /deep/ .ant-table-body .ant-table-row td.data {
    min-width: 150px;
    max-width: 150px;
  }
  /deep/ .ant-table-tbody > tr.ant-table-row:hover > td {
    background: none !important;
  }
  /deep/ .ant-table-thead th {
    text-align: center;
  }
</style>
src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue
@@ -6,12 +6,21 @@
        <div class="table-page-search-wrapper">
        <a-form layout="inline" @keyup.enter.native="searchQuery">
          <a-row :gutter="24">
            <a-col :md="9" :sm="9" :xs="9">
            <a-col :md="4" :sm="4" >
              <a-form-item label="设备类型">
                <a-select placeholder="请选择设备类型" :triggerChange="true" v-model="queryParam.equipmentType" :allowClear="true">
                  <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'>
                    {{item.equipmentTypeName}}
                  </a-select-option>
                </a-select>
              </a-form-item>
            </a-col>
            <a-col :md="5" :sm="5" :xs="5">
              <a-form-item label="时间">
                <a-range-picker @change="dateParamChange" :disabledDate="disabledDate" format="YYYYMMDD" v-model="dates"/>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="6" :xs="6">
            <a-col :md="4" :sm="4" :xs="4">
              <a-form-item label="班制">
                <a-select v-model="queryParam.shiftId" placeholder="请选择班制"
                          @change="initShiftSubList" :allowClear = "allowClear">
@@ -21,7 +30,7 @@
                </a-select>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="6" :xs="6">
            <a-col :md="4" :sm="4" :xs="4">
              <a-form-item label="班次">
                <a-select v-model="queryParam.shiftSubId" placeholder="请选择班次" @change="initShiftSubListChange"  :allowClear = "allowClearSu">
                  <a-select-option v-for="(em,index) in shiftSubList" :key="index" :value="em.value">
@@ -30,119 +39,132 @@
                </a-select>
              </a-form-item>
            </a-col>
          </a-row>
          <a-row :gutter="24">
            <a-col :md="15" :sm="15" :xs="15">
            <a-col :md="9" :sm="9" :xs="9">
              <a-checkbox-group :value="checkedList" :default-value="['lyl']" :options="efficiencyOptions"
                                @change="efficiencyOptionsOnChange"/>
            </a-col>
            <a-col :md="3" :sm="3" :xs="3">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
            <a-col :md="5" :sm="5">
              <a-space>
                <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
                <a-button type="primary" @click="searchReset" icon="reload">重置</a-button>
                <a-button type="primary" @click="exportExcel" icon="download">导出</a-button>
              </a-space>
            </a-col>
            <a-col :md="3" :sm="3" :xs="3">
              <a-button type="primary" @click="searchReset" icon="reload">重置</a-button>
            </a-col>
            <a-col :md="3" :sm="3" :xs="3">
              <a-button type="primary" @click="exportExcel" icon="download">导出</a-button>
            <a-col :md="10" :sm="10">
              <table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;">
                <tr>
                  <td v-for="(item, index) in identifying">{{item.title}}</td>
                </tr>
                <tr>
                  <td style="text-align:center;" v-for="(item, index) in identifying">
                    <div class="identifyingclass" :style="{background: item.color}"></div>
                  </td>
                </tr>
              </table>
            </a-col>
          </a-row>
        </a-form>
      </div>
        <div style="width: 530px;top: 0; right: 0px;">
        <table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;">
          <tr>
            <td v-for="(item, index) in identifying">{{item.title}}</td>
          </tr>
          <tr>
            <td style="text-align:center;" v-for="(item, index) in identifying">
              <div class="identifyingclass" :style="{background: item.color}"></div>
            </td>
          </tr>
        </table>
      </div>
      </div>
      <div class="container" id="EfficiencyShift" style="margin-top: 20px;">
        <div class="table2">
          <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap">
            <thead>
            <tr class="thead fixed equipname">
              <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th>
              <th  class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th>
              <th  class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;"></th>
              <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备编号</th>
              <th class="thgu dong5 name" rowspan="2" style="min-width: 150px; max-width: 150px;width: 150px;">设备名称</th>
              <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备类型</th>
              <th class="thgu dong7 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">班次</th>
              <template v-for="(tableHead, index) in tableHeads">
                <th  class="timeth" :colspan="checkedList.length">{{tableHead}}</th>
              </template>
              <!--average-->
              <!--<th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 150px;width: 150px;">平均值(班次利用率)</th>-->
            </tr>
            <tr class="thead notfixed gudingth">
              <template v-for="(tableHead, index) in tableHeads">
                <th>班次利用率(%)</th>
                <!--<th v-if="checkedList.indexOf('gzl') > -1">故障率(%)</th>-->
                <!--<th v-if="checkedList.indexOf('processingLong') > -1">运行时间(s)</th>-->
                <!--<th v-if="checkedList.indexOf('totalLong') > -1">有效时间(s)</th>-->
                <!--<th v-if="checkedList.indexOf('faultLong') > -1">故障时间(s)</th>-->
                <!--&lt;!&ndash;<th v-if="checkedList.indexOf('gjsj') > -1">关机时间(s)</th>&ndash;&gt;-->
                <th v-if="checkedList.indexOf('kjsj') > -1">开机时间(s)</th>
                <th v-if="checkedList.indexOf('jgsj') > -1">加工时间(s)</th>
                <th v-if="checkedList.indexOf('djsj') > -1">待机时间(s)</th>
                <th v-if="checkedList.indexOf('gjsj') > -1">关机时间(s)</th>
              </template>
            </tr>
<!--            <tr>-->
<!--              <th rowspan="2">平均值</th>-->
<!--            </tr>-->
            </thead>
            <tbody>
            <tr class="mathData" v-for="(item, index) in dataList">
              <td  class="tdgu kaitou wenzi" :rowspan="item.level1span" :class="{hidden: item.level1dis,noExl:item.level1dis}"  v-show="!item.level1dis">{{item.level1}}</td>
              <td  class="tdgu1 kaitou wenzi" :rowspan="item.level2span" :class="{hidden: item.level2dis,noExl:item.level2dis}"  v-show="!item.level2dis">{{item.level2}}</td>
              <td  class="tdgu2 kaitou wenzi" :rowspan="item.level3span" :class="{hidden: item.level3dis,noExl:item.level3dis}"  v-show="!item.level3dis">{{item.level3}}</td>
              <td class="tdgu3  kaitou">{{item.equipmentId}}</td>
              <td class="tdgu4  kaitou">{{item.equipmentName}}</td>
              <td class="tdgu5  kaitou">{{item.equipmentType}}</td>
              <td class="tdgu6  kaitou">{{item.shiftSubName}}</td>
              <!--<td>{{item.tierType}}</td>-->
              <template v-for="(tableHead, index) in item.dataList">
                <!--<td :style="{background:tableHead.color }" v-if='tableHead.utilizationRate !== 0'>{{tableHead.utilizationRate | numFilter}}</td>-->
                <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 1'>ç»´ä¿®</td>-->
                <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 2'>休班</td>-->
                <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 10'>{{tableHead.lyl | numFilter}}</td>-->
                <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 11'>未计算</td>-->
                <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 12'>无班次</td>-->
                <td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td>
                <!--<td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gzl') > -1">-->
                  <!--{{tableHead.gzl | numFilter}}-->
                <!--</td>-->
                <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1">
                  {{tableHead.openLong}}
                </td>
                <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('jgsj') > -1">
                  {{tableHead.processLong}}
                </td>
                <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('djsj') > -1">
                  {{tableHead.waitLong}}
                </td>
                <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gjsj') > -1">
                  {{tableHead.closeLong}}
                </td>
                <!--<td :style="{background:item[tableHead].color }" v-if="checkedList.indexOf('gjsj') > -1">-->
                  <!--{{item[tableHead].gjsj}}-->
                <!--</td>-->
              </template>
              <!--<td :style="{background:item.average.color }" >{{item.average.lyl | numFilter}}</td>-->
            </tr>
            </tbody>
          </table>
        </div>
        <!--<div style="width: 530px;position:absolute;top: 10px; right: 0;">-->
          <!--<table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;">-->
            <!--<tr>-->
              <!--<td v-for="(item, index) in identifying">{{item.title}}</td>-->
            <!--</tr>-->
            <!--<tr>-->
              <!--<td style="text-align:center;" v-for="(item, index) in identifying">-->
                <!--<div class="identifyingclass" :style="{background: item.color}"></div>-->
              <!--</td>-->
            <!--</tr>-->
          <!--</table>-->
        <!--</div>-->
      </div>
      <a-spin :spinning="spinning">
        <div class="container" id="EfficiencyShift" style="margin-top: 20px;">
          <div class="table2">
            <table class="dataContent table" border="1" cellspacing="0" cellpadding="0" style="white-space: nowrap" v-if="dataList.length>0">
              <thead>
              <tr class="thead fixed equipname">
                <th class="thgu dong1 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">公司</th>
                <th  class="thgu dong2 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">车间</th>
                <th  class="thgu dong3 name" rowspan="2" style="min-width: 50px; max-width: 50px;width: 50px;">工段</th>
                <th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备编号</th>
                <th class="thgu dong5 name" rowspan="2" style="min-width: 162px; max-width: 162px;width: 162px;">设备名称</th>
                <th class="thgu dong6 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">设备类型</th>
                <th class="thgu dong7 name" rowspan="2" style="min-width: 100px; max-width: 100px;width: 100px;">班次</th>
                <template v-for="(tableHead, index) in tableHeads">
                  <th  class="timeth" :colspan="checkedList.length">{{tableHead}}</th>
                </template>
                <!--average-->
                <!--<th class="thgu dong4 name" rowspan="2" style="min-width: 100px; max-width: 150px;width: 150px;">平均值(班次利用率)</th>-->
              </tr>
              <tr class="thead notfixed gudingth">
                <template v-for="(tableHead, index) in tableHeads">
                  <th>班次利用率(%)</th>
                  <!--<th v-if="checkedList.indexOf('gzl') > -1">故障率(%)</th>-->
                  <!--<th v-if="checkedList.indexOf('processingLong') > -1">运行时间(s)</th>-->
                  <!--<th v-if="checkedList.indexOf('totalLong') > -1">有效时间(s)</th>-->
                  <!--<th v-if="checkedList.indexOf('faultLong') > -1">故障时间(s)</th>-->
                  <!--&lt;!&ndash;<th v-if="checkedList.indexOf('gjsj') > -1">关机时间(s)</th>&ndash;&gt;-->
                  <th v-if="checkedList.indexOf('kjsj') > -1">开机时间(小时)</th>
                  <th v-if="checkedList.indexOf('jgsj') > -1">加工时间(小时)</th>
                  <th v-if="checkedList.indexOf('djsj') > -1">待机时间(小时)</th>
                  <th v-if="checkedList.indexOf('gjsj') > -1">关机时间(小时)</th>
                </template>
              </tr>
              </thead>
              <tbody>
              <tr class="mathData" v-for="(item, index) in dataList">
                <template v-if="item.level1!=='合计'&&item.level1!=='平均值'">
                  <td  class="tdgu kaitou wenzi" :rowspan="item.level1span" :class="{hidden: item.level1dis,noExl:item.level1dis}"  v-show="!item.level1dis">{{item.level1}}</td>
                  <td  class="tdgu1 kaitou wenzi" :rowspan="item.level2span" :class="{hidden: item.level2dis,noExl:item.level2dis}"  v-show="!item.level2dis">{{item.level2}}</td>
                  <td  class="tdgu2 kaitou wenzi" :rowspan="item.level3span" :class="{hidden: item.level3dis,noExl:item.level3dis}"  v-show="!item.level3dis">{{item.level3}}</td>
                  <td class="tdgu3  kaitou">{{item.equipmentId}}</td>
                  <td class="tdgu4  kaitou" style="min-width: 162px; max-width: 162px;width: 162px;">{{item.equipmentName}}</td>
                  <td class="tdgu5  kaitou">{{item.equipmentType}}</td>
                  <td class="tdgu6  kaitou">{{item.shiftSubName}}</td>
                </template>
                <template v-else>
                  <td colspan="7" class="tdgu kaitou">{{item.level1}}</td>
                </template>
                <!--<td>{{item.tierType}}</td>-->
                <template v-for="(tableHead, index) in item.dataList">
                  <!--<td :style="{background:tableHead.color }" v-if='tableHead.utilizationRate !== 0'>{{tableHead.utilizationRate | numFilter}}</td>-->
                  <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 1'>ç»´ä¿®</td>-->
                  <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 2'>休班</td>-->
                  <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 10'>{{tableHead.lyl | numFilter}}</td>-->
                  <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 11'>未计算</td>-->
                  <!--<td :style="{background:tableHead.color }" v-if='tableHead.lyl == 0 && tableHead.status == 12'>无班次</td>-->
                  <td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td>
                  <!--<td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gzl') > -1">-->
                  <!--{{tableHead.gzl | numFilter}}-->
                  <!--</td>-->
                  <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('kjsj') > -1">
                    {{tableHead.openLong | getFormattedTime}}
                  </td>
                  <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('jgsj') > -1">
                    {{tableHead.processLong | getFormattedTime}}
                  </td>
                  <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('djsj') > -1">
                    {{tableHead.waitLong | getFormattedTime}}
                  </td>
                  <td :style="{background:tableHead.color }" v-if="checkedList.indexOf('gjsj') > -1">
                    {{tableHead.closeLong | getFormattedTime}}
                  </td>
                  <!--<td :style="{background:item[tableHead].color }" v-if="checkedList.indexOf('gjsj') > -1">-->
                  <!--{{item[tableHead].gjsj}}-->
                  <!--</td>-->
                </template>
                <!--<td :style="{background:item.average.color }" >{{item.average.lyl | numFilter}}</td>-->
              </tr>
              </tbody>
            </table>
          </div>
        </div>
      </a-spin>
    </div>
  </div>
</template>
@@ -164,6 +186,7 @@
        allowClear:true,
        allowClearSu:true,
        dates: [],
        selectList:[],
        identifying: [],
        queryParam: {},
        queryParamEquip:{},
@@ -186,11 +209,13 @@
          list: '/mdc/efficiencyReport/efficiencyShiftList',
          listByType: '/mdc/MdcUtilizationRate/getByType',
          initShiftList: '/mdc/mdcMdcShift/initShiftList',
          initShiftSubList: '/mdc/mdcShiftSub/initShiftSubList'
          initShiftSubList: '/mdc/mdcShiftSub/initShiftSubList',
          queryEquipmentType: '/mdc/mdcEquipmentType/queryEquipmentType'
        },
        tableHeads: [],
        shiftList: [],
        shiftSubList: []
        shiftSubList: [],
        spinning:false
      }
    },
    props: {  nodeTree: '', Type:'',nodePeople: ''  },
@@ -202,6 +227,7 @@
      this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
      this.queryParam.typeTree = "1"
      this.loadData();
      this.queryGroup()
    },
    watch: {
      Type(valmath){
@@ -241,7 +267,20 @@
        } else {
          return '0'
        }
      }
      },
      /**
       * æ ¼å¼åŒ–æ—¶é—´
       * @param seconds ç§’æ•°
       * @returns '' æ ¼å¼åŒ–后时间字符串
       */
      getFormattedTime(seconds) {
        if (seconds) {
          return parseFloat((seconds / 3600).toFixed(2)) + '小时'
        } else {
          return '0'
        }
      },
    },
    methods: {
      checkSameData(dataList){
@@ -453,6 +492,7 @@
        // this.onClearSelected()
      },
      loadData() {
        this.spinning=true
        this.tableHeads = []
        this.dataList = []
        getAction(this.url.list, this.queryParam).then(res => {
@@ -465,6 +505,26 @@
            this.combineCell();
            // this.initDeviceType(this.dataList)
          }
        }).finally(()=>{
          this.spinning=false
        })
      },
      queryGroup() {
        getAction(this.url.queryEquipmentType).then(res => {
          if (res.success) {
            this.selectList = res.result
            // this.selectList = res.result.map((item, index, arr) => {
            //   return { label: item.id, value: item.equipmentTypeName + '' }
            // })
          } else {
            // this.$message.warning(res.message)
            this.$notification.warning({
              message: '消息',
              description: res.message
            })
          }
        }).finally(() => {
          this.loading = false
        })
      }
    }
@@ -515,12 +575,12 @@
  }
  .table tbody tr .tdgu5{
    position: sticky;
    left: 400px;
    left: 412px;
    z-index: 2;
  }
  .table tbody tr .tdgu6{
    position: sticky;
    left: 500px;
    left: 512px;
    z-index: 2;
  }
@@ -561,11 +621,11 @@
  }
  .table2 thead .equipname .dong6{
    z-index: 5;
    left: 400px;
    left: 412px;
  }
  .table2 thead .equipname .dong7{
    z-index: 6;
    left: 500px;
    left: 512px;
  }
  @media screen and (min-width: 1920px){
@@ -654,9 +714,9 @@
  .dataContent .mathData .tdd {
    /*display: none;*/
  }
  .seach-content{
    display: flex;
    justify-content: space-between;
  }
  /*.seach-content{*/
    /*display: flex;*/
    /*justify-content: space-between;*/
  /*}*/
</style>
src/views/mdc/base/modules/equipmentAvailCompare/equipmentAvailCompareMain.vue
@@ -125,6 +125,7 @@
            // this.$set(this.queryParam, 'tierName', val.title)
            this.queryParamEquip.parentId = ''
            this.queryParams.equipmentId = val.equipmentId
            this.queryParams.equipmentName = val.equipmentName
            this.queryParamEquip.equipmentId = val.equipmentId
            this.searchQuery()
          } else {
src/views/mdc/base/modules/equipmentDayAvail/equipmentDayAvailMain.vue
@@ -138,6 +138,8 @@
            // this.$set(this.queryParam, 'tierName', val.title)
            this.queryParamEquip.parentId = ''
            this.queryParams.equipmentId = val.equipmentId
            this.queryParams.equipmentName = val.equipmentName
            console.log('XXXval=', val)
            this.queryParamEquip.equipmentId = val.equipmentId
            this.searchQuery()
          } else {
src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigForm.vue
@@ -139,7 +139,7 @@
        ],
        englishName: [
          { required: true, message: '请输入英文名称!' },
          { pattern: /^.{6,18}$/, message: '请输入6到18位任意字符!' },
          { pattern: /^.{2,18}$/, message: '请输入2到18位任意字符!' ,trigger:'blur'},
        ],
        showFlag: [
          { required: true, message: '请输入显示标志!' },
src/views/mdc/base/modules/mdcPassRate/mdcPassRateModal.vue
@@ -7,7 +7,7 @@
          <a-col :span="12">
            <a-form-item label="设备组" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]"
                              @search="deviceSearch" enter-button/>
                              @search="deviceSearch" enter-button placeholder="请选择设备"/>
            </a-form-item>
          </a-col>
@@ -39,15 +39,13 @@
        </a-row>
      </a-form>
    </a-spin>
    <mdc-pass-rate-modal-list ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></mdc-pass-rate-modal-list>
    <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'选择设备'"/>
  </a-modal>
</template>
<script>
  import moment from 'moment'
  import pick from 'lodash.pick'
  import mdcPassRateModalList from './mdcPassRateModalList'
  // import JDate from './JDate'
  import {
    getAction,
@@ -57,10 +55,11 @@
  import {
    duplicateCheck
  } from '@/api/api'
  import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal'
  export default {
    name: 'mdcPassRateModal',
    components: {mdcPassRateModalList},
    components: { SelectDeviceModal},
    props: {},
    data() {
      return {
@@ -197,9 +196,10 @@
        // })
      },
      deviceSearch() {
        this.$refs.deviceRepairListModel.openPage()
        this.$refs.deviceRepairListModel.title = '选择设备'
        this.$refs.deviceRepairListModel.disableSubmit = false
        this.$refs.selectDeviceModal.visible = true
        this.$refs.selectDeviceModal.selectedRowKeys = []
        this.$refs.selectDeviceModal.selectedRows = []
        this.$refs.selectDeviceModal.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : []
      },
      //级联框onChange事件
      // onChange(value) {
@@ -347,6 +347,22 @@
      },
      checkboxChange(e) {
        this.checked = e.target.checked
      },
      /**
       * é€‰æ‹©å·²æœ‰è®¾å¤‡åŽç‚¹å‡»ç¡®å®šæ—¶è§¦å‘
       * @param data å·²é€‰æ‹©çš„设备
       */
      selectOK(data) {
        // let params = {}
        // params.equipmentIdList = []
        // for (var a = 0; a < data.length; a++) {
        //   params.equipmentIdList.push(data[a])
        // }
        console.log('data=', data)
        this.form.setFieldsValue({
          equipmentIds: data.join(',')
        })
      }
    }
  }
src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationModal.vue
@@ -7,7 +7,7 @@
          <a-col :span="24">
            <a-form-item label="设备组" :labelCol="labelColLong" :wrapperCol="wrapperColLong">
              <a-input-search :readOnly="true" v-decorator="['equipmentIds', validatorRules.equipmentIds]"
                              @search="deviceSearch" enter-button/>
                              @search="deviceSearch" enter-button placeholder="请选择设备"/>
            </a-form-item>
          </a-col>
        </a-row>
@@ -44,7 +44,7 @@
        </a-row>
      </a-form>
    </a-spin>
    <mdc-standard-process-duration-modal-list  ref="deviceRepairListModel" @sendSelectionRows="getDeviceRows"></mdc-standard-process-duration-modal-list>
    <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'选择设备'"/>
  </a-modal>
</template>
@@ -52,7 +52,6 @@
<script>
  import moment from 'moment'
  import pick from 'lodash.pick'
  import MdcStandardProcessDurationModalList from './MdcStandardProcessDurationModalList'
  // import JDate from './JDate'
  import {
    getAction,
@@ -62,10 +61,11 @@
  import {
    duplicateCheck
  } from '@/api/api'
  import SelectDeviceModal from '../../../../system/modules/SelectDeviceModal'
  export default {
    name: 'MdcStandardProcessDurationModal',
    components: {MdcStandardProcessDurationModalList},
    components: { SelectDeviceModal },
    props: {},
    data() {
      return {
@@ -210,9 +210,10 @@
        // })
      },
      deviceSearch() {
        this.$refs.deviceRepairListModel.openPage()
        this.$refs.deviceRepairListModel.title = '选择设备'
        this.$refs.deviceRepairListModel.disableSubmit = false
        this.$refs.selectDeviceModal.visible = true
        this.$refs.selectDeviceModal.selectedRowKeys = []
        this.$refs.selectDeviceModal.selectedRows = []
        this.$refs.selectDeviceModal.checkedKeys = this.form.getFieldValue('equipmentIds') ? this.form.getFieldValue('equipmentIds').split(',') : []
      },
      //级联框onChange事件
      // onChange(value) {
@@ -348,6 +349,22 @@
      },
      checkboxChange(e) {
        this.checked = e.target.checked
      },
      /**
       * é€‰æ‹©å·²æœ‰è®¾å¤‡åŽç‚¹å‡»ç¡®å®šæ—¶è§¦å‘
       * @param data å·²é€‰æ‹©çš„设备
       */
      selectOK(data) {
        // let params = {}
        // params.equipmentIdList = []
        // for (var a = 0; a < data.length; a++) {
        //   params.equipmentIdList.push(data[a])
        // }
        console.log('data=', data)
        this.form.setFieldsValue({
          equipmentIds: data.join(',')
        })
      }
    }
  }
src/views/mdc/base/modules/mdcUtilizationRate/MdcUtilizationRateModel.vue
@@ -32,6 +32,13 @@
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item label="颜色" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input type="color" v-decorator="['rateParameterColor',validatorRules.rateParameterColor]"></a-input>
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </a-spin>
  </a-modal>
@@ -95,7 +102,7 @@
        this.model = Object.assign({}, record)
        this.visible = true
        this.$nextTick(() => {
          this.form.setFieldsValue(pick(this.model, 'rateParameterCategory', 'rateParameterLevel', 'minimumRange', 'maximumRange'))
          this.form.setFieldsValue(pick(this.model, 'rateParameterCategory', 'rateParameterLevel', 'minimumRange', 'maximumRange', 'rateParameterColor'))
        })
      },
      close() {
@@ -116,16 +123,16 @@
              if (res.success) {
                // that.$message.success("保存成功")
                that.$notification.success({
                  message:'消息',
                  description:"保存成功"
                });
                  message: '消息',
                  description: '保存成功'
                })
                that.$emit('ok', res.result)
              } else {
                // that.$message.warning(res.message)
                that.$notification.warning({
                  message:'消息',
                  description:res.message
                });
                  message: '消息',
                  description: res.message
                })
              }
            }).finally(() => {
              that.confirmLoading = false
src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue
@@ -115,7 +115,10 @@
        },
        tableHeads: [],
        XData: [0],
        YData: [0]
        YData: [0],
        isLazyRequest: '',// æ˜¯å¦å¼€å¯æ‡’加载
        requestAlldataSize: 8,// æ€»å…±è¯·æ±‚的列表项数目
        everyRequestDataSize: 15// æ¯æ¬¡è¯·æ±‚的列表项数目
      }
    },
    props: { nodeTree: '', Type: '', nodePeople: '' },
@@ -131,6 +134,12 @@
      this.queryParam.typeTree = '1'
      this.loadData1()
    },
    mounted() {
      this.tableScroll = document.querySelector('.table2')
    },
    beforeDestroy() {
      this.tableScroll.removeEventListener('scroll', this.tableScrollX)
    },
    watch: {
      Type(valmath) {
@@ -213,9 +222,12 @@
      dateParamChange(v1, v2) {
        this.queryParam.startDate = v2[0]
        this.queryParam.endDate = v2[1]
        this.dates = [v1[0], v1[1]]
      },
      searchQuery() {
        if (this.queryParam.startTime && this.queryParam.endTime && this.dates && this.dates.length > 0) {
        this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD')
        this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
        if (this.queryParam.startTime && this.queryParam.endTime && this.dates[0] && this.dates[1]) {
          if (this.queryParam.typeTree == '1') {
            this.queryParam.parentId = this.queryParamEquip.parentId
            this.queryParam.equipmentId = this.queryParamEquip.equipmentId
@@ -223,6 +235,7 @@
            this.queryParam.parentId = this.queryParamPeople.parentId
            this.queryParam.equipmentId = ''
          }
          this.requestAlldataSize = moment.duration(moment(this.queryParam.endDate) - moment(this.queryParam.startDate), 'millisecond').asDays() + 1
          this.loadData1()
        } else {
          this.$notification.warning({
@@ -303,9 +316,16 @@
      //     }
      //   }
      loadData1() {
        this.loading=true
        this.loading = true
        this.tableHeads = []
        this.dataList = []
        // è‹¥æ—¥æœŸé€‰æ‹©å™¨è®¾ç½®çš„æŸ¥è¯¢è¯·æ±‚数量超过15条则开启懒加载
        if (this.requestAlldataSize > 15) {
          // å¼€å¯æ‡’加载后将结束日期设置为开始日期之后的14天,即先查询15天内的数据
          this.queryParam.endDate = moment(this.queryParam.startDate).add(this.everyRequestDataSize - 1, 'days').format('YYYYMMDD')
          this.isLazyRequest = true
          this.tableScroll.removeEventListener('scroll', this.tableScrollX) // ä¸ºé¿å…æ»šåŠ¨æ¡æœ‰æ»šåŠ¨è·ç¦»åŽåŽç‚¹å‡»æŸ¥è¯¢æŒ‰é’®è§¦å‘æ»šåŠ¨äº‹ä»¶ï¼Œå› æ­¤åœ¨è§¦å‘äº‹ä»¶å‰ç§»é™¤äº‹ä»¶
        }
        getAction(this.url.efficiencyList, this.queryParam).then(res => {
          if (res.success) {
            this.tableHeads = res.result.dates
@@ -316,10 +336,10 @@
            // this.checkSameData2(this.dataList)
            // this.combineCell();
            // this.initDeviceType(this.dataList)
            this.tableScroll.addEventListener('scroll', this.tableScrollX)
          }
        }).finally(()=>{
          this.loading=false
        }).finally(() => {
          this.loading = false
        })
      },
      draw() {
@@ -379,6 +399,41 @@
          ]
        }
        openRateTrendAnalysisChart.setOption(openRateTrendChartOptions, true)
      },
      /**
       * æ»šåŠ¨æ¡è§¦åº•åˆ·æ–°è¡¨æ ¼æ•°æ®
       */
      tableScrollX() {
        // å½“滚动条触底且懒加载开启时触发滚动条触底刷新
        if (Math.ceil(this.tableScroll.scrollLeft + this.tableScroll.clientWidth) + 1 >= this.tableScroll.scrollWidth && this.isLazyRequest) {
          this.loading = true
          this.queryParam.startDate = moment(this.queryParam.endDate).add(1, 'days').format('YYYYMMDD')
          // åˆ¤æ–­è®¾ç½®æ‡’加载后的结束时间是否超过时间选择器中设置的结束时间
          if (moment(this.queryParam.endDate).add(this.everyRequestDataSize - 1, 'days').format('YYYYMMDD') - moment(this.dates[1]).format('YYYYMMDD') < 0) {
            //再次查询后15天内的数据
            this.queryParam.endDate = moment(this.queryParam.endDate).add(this.everyRequestDataSize, 'days').format('YYYYMMDD')
          } else {
            // å¦‚果不小于时间选择器中设置的时间则设置请求结束日期为时间选择器中设置的结束时间并且关闭懒加载(意味着最后一次触底刷新)
            this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
            this.isLazyRequest = false
          }
          getAction(this.url.efficiencyList, this.queryParam).then(res => {
            if (res.success) {
              this.tableHeads = [...this.tableHeads, ...res.result.dates]
              this.dataList.forEach(item1 => {
                res.result.mdcEfficiencyList.forEach(item2 => {
                  if (item1.equipmentId === item2.equipmentId) {
                    item1.dataList = [...item1.dataList, ...item2.dataList]
                  }
                })
              })
              this.draw()
            }
          }).finally(() => {
            this.loading = false
          })
        }
      }
    }
  }
src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue
@@ -108,7 +108,10 @@
        },
        tableHeads: [],
        XData: [0],
        YData: [0]
        YData: [0],
        isLazyRequest: '',// æ˜¯å¦å¼€å¯æ‡’加载
        requestAlldataSize: 8,// æ€»å…±è¯·æ±‚的列表项数目
        everyRequestDataSize: 15// æ¯æ¬¡è¯·æ±‚的列表项数目
      }
    },
    props: { nodeTree: '', Type: '', nodePeople: '' },
@@ -121,6 +124,12 @@
      this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
      this.queryParam.typeTree = '1'
      this.loadData1()
    },
    mounted() {
      this.tableScroll = document.querySelector('.table2')
    },
    beforeDestroy() {
      this.tableScroll.removeEventListener('scroll', this.tableScrollX)
    },
    watch: {
      Type(valmath) {
@@ -221,9 +230,13 @@
      dateParamChange(v1, v2) {
        this.queryParam.startDate = v2[0]
        this.queryParam.endDate = v2[1]
        this.dates = [v1[0], v1[1]]
      },
      searchQuery() {
        if (this.dates && this.dates.length > 0) {
        console.log('dates', this.dates)
        this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD')
        this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
        if (this.dates[0] && this.dates[1]) {
          if (this.queryParam.typeTree == '1') {
            this.queryParam.parentId = this.queryParamEquip.parentId
            this.queryParam.equipmentId = this.queryParamEquip.equipmentId
@@ -231,6 +244,7 @@
            this.queryParam.parentId = this.queryParamPeople.parentId
            this.queryParam.equipmentId = ''
          }
          this.requestAlldataSize = moment.duration(moment(this.queryParam.endDate) - moment(this.queryParam.startDate), 'millisecond').asDays() + 1
          this.loadData1()
        } else {
          this.$notification.warning({
@@ -313,6 +327,13 @@
        this.loading = true
        this.tableHeads = []
        this.dataList = []
        // è‹¥æ—¥æœŸé€‰æ‹©å™¨è®¾ç½®çš„æŸ¥è¯¢è¯·æ±‚数量超过15条则开启懒加载
        if (this.requestAlldataSize > 15) {
          // å¼€å¯æ‡’加载后将结束日期设置为开始日期之后的14天,即先查询15天内的数据
          this.queryParam.endDate = moment(this.queryParam.startDate).add(this.everyRequestDataSize - 1, 'days').format('YYYYMMDD')
          this.isLazyRequest = true
          this.tableScroll.removeEventListener('scroll', this.tableScrollX) // ä¸ºé¿å…æ»šåŠ¨æ¡æœ‰æ»šåŠ¨è·ç¦»åŽåŽç‚¹å‡»æŸ¥è¯¢æŒ‰é’®è§¦å‘æ»šåŠ¨äº‹ä»¶ï¼Œå› æ­¤åœ¨è§¦å‘äº‹ä»¶å‰ç§»é™¤äº‹ä»¶
        }
        getAction(this.url.efficiencyList, this.queryParam).then(res => {
          if (res.success) {
            this.tableHeads = res.result.dates
@@ -323,6 +344,7 @@
            // this.checkSameData2(this.dataList)
            // this.combineCell();
            // this.initDeviceType(this.dataList)
            this.tableScroll.addEventListener('scroll', this.tableScrollX)
          }
        }).finally(() => {
          this.loading = false
@@ -385,6 +407,41 @@
          ]
        }
        openRateTrendAnalysisChart.setOption(openRateTrendChartOptions, true)
      },
      /**
       * æ»šåŠ¨æ¡è§¦åº•åˆ·æ–°è¡¨æ ¼æ•°æ®
       */
      tableScrollX() {
        // å½“滚动条触底且懒加载开启时触发滚动条触底刷新
        if (Math.ceil(this.tableScroll.scrollLeft + this.tableScroll.clientWidth) + 1 >= this.tableScroll.scrollWidth && this.isLazyRequest) {
          this.loading = true
          this.queryParam.startDate = moment(this.queryParam.endDate).add(1, 'days').format('YYYYMMDD')
          // åˆ¤æ–­è®¾ç½®æ‡’加载后的结束时间是否超过时间选择器中设置的结束时间
          if (moment(this.queryParam.endDate).add(this.everyRequestDataSize - 1, 'days').format('YYYYMMDD') - moment(this.dates[1]).format('YYYYMMDD') < 0) {
            //再次查询后15天内的数据
            this.queryParam.endDate = moment(this.queryParam.endDate).add(this.everyRequestDataSize, 'days').format('YYYYMMDD')
          } else {
            // å¦‚果不小于时间选择器中设置的时间则设置请求结束日期为时间选择器中设置的结束时间并且关闭懒加载(意味着最后一次触底刷新)
            this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
            this.isLazyRequest = false
          }
          getAction(this.url.efficiencyList, this.queryParam).then(res => {
            if (res.success) {
              this.tableHeads = [...this.tableHeads, ...res.result.dates]
              this.dataList.forEach(item1 => {
                res.result.mdcEfficiencyList.forEach(item2 => {
                  if (item1.equipmentId === item2.equipmentId) {
                    item1.dataList = [...item1.dataList, ...item2.dataList]
                  }
                })
              })
              this.draw()
            }
          }).finally(() => {
            this.loading = false
          })
        }
      }
    }
  }
src/views/mdc/common/BaseTree.vue
@@ -149,6 +149,7 @@
            this.allTreeKeys = []
            this.treeDataSource = res.result
            this.generateList(res.result)
            this.expandedKeys=this.allTreeKeys
          } else {
            this.$message.warn(res.message)
          }
src/views/system/ProductionManager.vue
@@ -8,12 +8,15 @@
          <a-button @click="handleAdd(1)" type="primary">添加车间</a-button>
          <a-button @click="handleAdd(2)" type="primary">添加下级</a-button>
          <a-button type="primary" icon="download" @click="handleExportXls('车间信息')">导出</a-button>
          <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
          <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader"
                    :action="importExcelUrl" @change="handleImportExcel">
            <a-button type="primary" icon="import">导入</a-button>
          </a-upload>
          <a-button title="删除多条数据" @click="batchDel" type="default">批量删除</a-button>
          <a-button @click="handleDelete" v-if="selectedKeys.length>0">删除</a-button>
          <a-button title="删除多条数据" @click="batchDel" v-if="checkedKeys.length>0">批量删除</a-button>
          <!--<a-button @click="refresh" type="default" icon="reload" :loading="loading">刷新</a-button>-->
        </a-row>
        `
        <div style="background: #fff;padding-left:16px;height: 100%; margin-top: 5px">
          <a-alert type="info" :showIcon="true">
            <div slot="message">
@@ -24,9 +27,32 @@
          <a-input-search @search="onSearch" style="width:100%;margin-top: 10px" placeholder="请输入车间名称"/>
          <!-- æ ‘-->
          <a-col :md="10" :sm="24">
            <template>
              <a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus">
               <span style="user-select: none">
            <!--<template>-->
            <!--<a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus">-->
            <!--<span style="user-select: none">-->
            <!--<a-tree-->
            <!--checkable-->
            <!--multiple-->
            <!--@select="onSelect"-->
            <!--@check="onCheck"-->
            <!--@rightClick="rightHandle"-->
            <!--:selectedKeys="selectedKeys"-->
            <!--:checkedKeys="checkedKeys"-->
            <!--:treeData="departTree"-->
            <!--:checkStrictly="checkStrictly"-->
            <!--:expandedKeys="iExpandedKeys"-->
            <!--:autoExpandParent="autoExpandParent"-->
            <!--@expand="onExpand"/>-->
            <!--</span>-->
            <!--&lt;!&ndash;新增右键点击事件,和增加添加和删除功能&ndash;&gt;-->
            <!--<a-menu slot="overlay">-->
            <!--<a-menu-item @click="handleAdd(3)" key="1">添加</a-menu-item>-->
            <!--<a-menu-item @click="handleDelete" key="2">删除</a-menu-item>-->
            <!--<a-menu-item @click="closeDrop" key="3">取消</a-menu-item>-->
            <!--</a-menu>-->
            <!--</a-dropdown>-->
            <!--</template>-->
            <a-tree
              checkable
              multiple
@@ -40,15 +66,6 @@
              :expandedKeys="iExpandedKeys"
              :autoExpandParent="autoExpandParent"
              @expand="onExpand"/>
                </span>
                <!--新增右键点击事件,和增加添加和删除功能-->
                <a-menu slot="overlay">
                  <a-menu-item @click="handleAdd(3)" key="1">添加</a-menu-item>
                  <a-menu-item @click="handleDelete" key="2">删除</a-menu-item>
                  <a-menu-item @click="closeDrop" key="3">取消</a-menu-item>
                </a-menu>
              </a-dropdown>
            </template>
          </a-col>
        </div>
      </a-card>
@@ -64,7 +81,8 @@
            <a-menu-item key="6" @click="closeAll">合并所有</a-menu-item>
          </a-menu>
          <a-button>
            æ ‘操作 <a-icon type="up" />
            æ ‘操作
            <a-icon type="up"/>
          </a-button>
        </a-dropdown>
      </div>
@@ -72,11 +90,11 @@
    </a-col>
    <a-col :md="12" :sm="24">
      <a-tabs defaultActiveKey="1">
        <a-tab-pane tab="基本信息" key="1" >
        <a-tab-pane tab="基本信息" key="1">
          <a-card :bordered="false" v-if="selectedKeys.length>0">
            <a-form-model ref="form" :model="model" :rules="validatorRules">
              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productionName" label="车间名称">
                <a-input placeholder="请输入产线/车间名称" v-model="model.productionName" />
                <a-input placeholder="请输入产线/车间名称" v-model="model.productionName"/>
              </a-form-model-item>
              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="上级车间">
                <a-tree-select
@@ -89,7 +107,7 @@
                </a-tree-select>
              </a-form-model-item>
              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="排序">
                <a-input-number v-model="model.departOrder" />
                <a-input-number v-model="model.productionOrder"/>
              </a-form-model-item>
              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="备注">
                <a-textarea placeholder="请输入备注" v-model="model.memo"/>
@@ -100,7 +118,7 @@
              <a-button @click="submitCurrForm" type="primary" htmlType="button" icon="form">保存</a-button>
            </div>
          </a-card>
          <a-card v-else >
          <a-card v-else>
            <a-empty>
              <span slot="description"> è¯·å…ˆé€‰æ‹©ä¸€ä¸ªè½¦é—´! </span>
            </a-empty>
@@ -111,65 +129,27 @@
        <!--</a-tab-pane>-->
        <a-tab-pane tab="设备列表" key="2" forceRender>
          <!--<depart-auth-modal/>-->
          <production-equipment  ref="departAuth"></production-equipment>
          <production-equipment ref="departAuth"></production-equipment>
        </a-tab-pane>
      </a-tabs>
    </a-col>
    <production-modal  ref="departModal" @ok="loadTree"></production-modal>
    <production-modal ref="departModal" @ok="loadTree"></production-modal>
  </a-row>
</template>
<script>
  import ProductionEquipment from './modules/ProductionManager/ProductionEquipment'
  import {queryProductionTreeList, searchByKeywords, deleteByProduction} from '@/api/api'
  import {httpAction, deleteAction} from '@/api/manage'
  import {JeecgListMixin} from '@/mixins/JeecgListMixin'
  import { queryProductionTreeList, searchByKeywords, deleteByProduction } from '@/api/api'
  import { httpAction, deleteAction } from '@/api/manage'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import ProductionModal from './modules/ProductionManager/ProductionModal'
  // è¡¨å¤´
  const columns = [
    {
      title: '机构名称',
      dataIndex: 'departName'
    },
    {
      title: '机构类型',
      align: 'center',
      dataIndex: 'orgType'
    },
    {
      title: '机构编码',
      dataIndex: 'orgCode',
    },
    {
      title: '手机号',
      dataIndex: 'mobile'
    },
    {
      title: '传真',
      dataIndex: 'fax'
    },
    {
      title: '地址',
      dataIndex: 'address'
    },
    {
      title: '排序',
      align: 'center',
      dataIndex: 'departOrder'
    },
    {
      title: '操作',
      align: 'center',
      dataIndex: 'action',
      scopedSlots: {customRender: 'action'}
    }
  ]
  export default {
    name: 'ProductionManager',
    mixins: [JeecgListMixin],
    components: {
      ProductionEquipment,
      ProductionModal,
      ProductionModal
    },
    data() {
      return {
@@ -188,47 +168,47 @@
        model: {},
        dropTrigger: '',
        depart: {},
        columns: columns,
        disableSubmit: false,
        checkedKeys: [],
        selectedKeys: [],
        autoIncr: 1,
        currSelected: {},
        allTreeKeys:[],
        allTreeKeys: [],
        checkStrictly: true,
        labelCol: {
          xs: {span: 24},
          sm: {span: 5}
          xs: { span: 24 },
          sm: { span: 5 }
        },
        wrapperCol: {
          xs: {span: 24},
          sm: {span: 16}
          xs: { span: 24 },
          sm: { span: 16 }
        },
        graphDatasource: {
          nodes: [],
          edges: []
        },
        validatorRules: {
          productionName: [{required: true, message: '请输入产线/车间名称!'}],
          productionName: [{ required: true, message: '请输入产线/车间名称!' }]
        },
        url: {
          delete: '/mdc/mdcProduction/delete',
          edit: '/mdc/mdcProduction/edit',
          deleteBatch: '/mdc/mdcProduction/deleteBatch',
          exportXlsUrl: "/mdc/mdcProduction/exportXls",
          importExcelUrl: "/mdc/mdcProduction/importExcel",
          exportXlsUrl: '/mdc/mdcProduction/exportXls',
          importExcelUrl: '/mdc/mdcProduction/importExcel'
        },
        orgCategoryDisabled:false,
        orgCategoryDisabled: false,
        isIncludesNotLeaf: false
      }
    },
    computed: {
      importExcelUrl: function () {
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
      importExcelUrl: function() {
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
      }
    },
    methods: {
      loadData() {
        this.refresh();
        this.refresh()
      },
      loadTree() {
        var that = this
@@ -237,13 +217,13 @@
        queryProductionTreeList().then((res) => {
          if (res.success) {
            //部门全选后,再添加部门,选中数量增多
            this.allTreeKeys = [];
            this.allTreeKeys = []
            for (let i = 0; i < res.result.length; i++) {
              let temp = res.result[i]
              that.treeData.push(temp)
              that.departTree.push(temp)
              that.setThisExpandedKeys(temp)
              that.getAllKeys(temp);
              that.getAllKeys(temp)
              // console.log(temp.id)
            }
            this.loading = false
@@ -263,11 +243,12 @@
        this.loadTree()
      },
      // å³é”®æ“ä½œæ–¹æ³•
      rightHandle(node) {
      rightHandle({ event, node }) {
        this.dropTrigger = 'contextmenu'
        console.log(node.node.eventKey)
        this.rightClickSelectedKey = node.node.eventKey
        this.rightClickSelectedOrgCode = node.node.dataRef.orgCode
        const record = node.dataRef
        this.rightClickSelectedKey = record.id
        this.rightClickSelected = record
        this.rightClickSelectedOrgCode = record.orgCode
      },
      onExpand(expandedKeys) {
        console.log('onExpand', expandedKeys)
@@ -290,49 +271,71 @@
      addRootNode() {
        this.$refs.nodeModal.add(this.currFlowId, '')
      },
      batchDel: function () {
      batchDel: function() {
        console.log(this.checkedKeys)
        if (this.checkedKeys.length <= 0) {
          // this.$message.warning('请选择一条记录!')
          this.$notification.warning({
            message:'消息',
            description:"请选择一条记录"
          });
        } else {
          var ids = ''
          for (var a = 0; a < this.checkedKeys.length; a++) {
            ids += this.checkedKeys[a] + ','
          }
          var that = this
          this.$confirm({
            title: '确认删除',
            content: '确定要删除所选中的 ' + this.checkedKeys.length + ' æ¡æ•°æ®ï¼Œä»¥åŠå­èŠ‚ç‚¹æ•°æ®å—?',
            onOk: function () {
              deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => {
                if (res.success) {
                  // that.$message.success(res.message)
                  that.$notification.warning({
                    message:'消息',
                    description:res.message
                  });
                  that.loadTree()
                  that.onClearSelected()
                } else {
                  // that.$message.warning(res.message)
                  that.$notification.warning({
                    message:'消息',
                    description:res.message
                  });
                }
              })
        this.isIncludesNotLeaf = false
        this.includesNotLeaf(this.departTree)
        console.log('isIncludesNotLeaf', this.isIncludesNotLeaf)
        // ä¸ºtrue则表示选中项包含非叶子结点 false则表示选中项均为叶子结点
        if (!this.isIncludesNotLeaf) {
          if (this.checkedKeys.length <= 0) {
            // this.$message.warning('请选择一条记录!')
            this.$notification.warning({
              message: '消息',
              description: '请选择一条记录'
            })
          } else {
            var ids = ''
            for (var a = 0; a < this.checkedKeys.length; a++) {
              ids += this.checkedKeys[a] + ','
            }
            var that = this
            this.$confirm({
              title: '确认删除',
              content: '确定要删除所选中的 ' + this.checkedKeys.length + ' æ¡æ•°æ®?',
              onOk: function() {
                deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => {
                  if (res.success) {
                    // that.$message.success(res.message)
                    that.$notification.success({
                      message: '消息',
                      description: res.message
                    })
                    that.loadTree()
                    that.onClearSelected()
                  } else {
                    // that.$message.warning(res.message)
                    that.$notification.warning({
                      message: '消息',
                      description: res.message
                    })
                  }
                })
              }
            })
          }
        } else {
          this.$notification.warning({
            message: '消息',
            description: '选中项包含已挂载子节点车间'
          })
        }
      },
      includesNotLeaf(treeData) {
        for (let i = 0; i < treeData.length; i++) {
          if (!treeData[i].leaf) {
            this.includesNotLeaf(treeData[i].children)
          }
          if (this.checkedKeys.includes(treeData[i].id) && !treeData[i].leaf) {
            this.isIncludesNotLeaf = true
          }
        }
      },
      onSearch(value) {
        let that = this
        if (value) {
          searchByKeywords({keyWord: value}).then((res) => {
          searchByKeywords({ keyWord: value }).then((res) => {
            if (res.success) {
              that.departTree = []
              for (let i = 0; i < res.result.length; i++) {
@@ -342,9 +345,9 @@
            } else {
              // that.$message.warning(res.message)
              that.$notification.warning({
                message:'消息',
                description:res.message
              });
                message: '消息',
                description: res.message
              })
            }
          })
        } else {
@@ -365,9 +368,9 @@
        console.log('onCheck', checkedKeys, info)
        this.hiding = false
        //---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------
        if(this.checkStrictly){
          this.checkedKeys = checkedKeys.checked;
        }else{
        if (this.checkStrictly) {
          this.checkedKeys = checkedKeys.checked
        } else {
          this.checkedKeys = checkedKeys
        }
        //---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------
@@ -375,6 +378,7 @@
      onSelect(selectedKeys, e) {
        console.log('selected', selectedKeys, e)
        this.hiding = false
        this.deleteTrigger = 'leftClick'
        let record = e.node.dataRef
        console.log('onSelect-record', record)
        this.currSelected = Object.assign({}, record)
@@ -382,15 +386,14 @@
        this.selectedKeys = [record.key]
        this.model.parentId = record.parentId
        this.setValuesToForm(record)
        this.$refs.departAuth.show(record.id);
        this.$refs.departAuth.show(record.id)
      },
      // è§¦å‘onSelect事件时,为部门树右侧的form表单赋值
      setValuesToForm(record) {
        if(record.orgCategory == '1'){
          this.orgCategoryDisabled = true;
        }else{
          this.orgCategoryDisabled = false;
        if (record.orgCategory == '1') {
          this.orgCategoryDisabled = true
        } else {
          this.orgCategoryDisabled = false
        }
      },
      getCurrSelectedTitle() {
@@ -418,34 +421,34 @@
            if (!this.currSelected.id) {
              // this.$message.warning('请点击选择要修改车间!')
              this.$notification.warning({
                message:'消息',
                description:"请点击选择要修改车间!"
              });
                message: '消息',
                description: '请点击选择要修改车间!'
              })
              return
            }
            httpAction(this.url.edit, this.currSelected, 'put').then((res) => {
              if (res.success) {
                // this.$message.success('保存成功!')
                this.$notification.warning({
                  message:'消息',
                  description:"保存成功"
                });
                this.$notification.success({
                  message: '消息',
                  description: '保存成功'
                })
                this.loadTree()
              } else {
                // this.$message.error(res.message)
                this.$notification.warning({
                  message:'消息',
                  description:res.message
                });
                  message: '消息',
                  description: res.message
                })
              }
            })
          }
        })
      },
      emptyCurrForm() {
        this.$refs.form.resetFields();
        this.model={}
        this.$refs.form.resetFields()
        this.model = {}
      },
      nodeSettingFormSubmit() {
        this.$refs.form.validate(valid => {
@@ -467,9 +470,9 @@
          if (!key) {
            // this.$message.warning('请先点击选中上级车间!')
            this.$notification.warning({
              message:'消息',
              description:"请先点击选中上级车间!"
            });
              message: '消息',
              description: '请先点击选中上级车间!'
            })
            return false
          }
          this.$refs.departModal.add(this.selectedKeys)
@@ -481,39 +484,47 @@
      },
      handleDelete() {
        var that = this
        this.$confirm({
          title: '确认删除',
          content: '确定要删除此车间以及子节点数据吗?',
          onOk: function () {
            deleteByProduction({id: that.rightClickSelectedKey}).then((resp) => {
              if (resp.success) {
                //删除成功后,去除已选中中的数据
                that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1);
                // that.$message.success('删除成功!')
                that.$notification.success({
                  message:'消息',
                  description:"删除成功"
                });
                that.loadTree()
                //删除后同步清空右侧基本信息内容
                // let orgCode=that.model.orgCode;
                // if(orgCode && orgCode === that.rightClickSelectedOrgCode){
        if (this.currSelected.leaf) {
          this.$confirm({
            title: '确认删除',
            content: `确定要删除 ${that.currSelected.productionName} å—?`,
            onOk: function() {
              deleteByProduction({ id: that.currSelected.id }).then((resp) => {
                if (resp.success) {
                  //删除成功后,去除已选中中的数据
                  // that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1)
                  // that.$message.success('删除成功!')
                  that.$notification.success({
                    message: '消息',
                    description: '删除成功'
                  })
                  that.loadTree()
                  //删除后同步清空右侧基本信息内容
                  // let orgCode=that.model.orgCode;
                  // if(orgCode && orgCode === that.rightClickSelectedOrgCode){
                  that.onClearSelected()
                // }
              } else {
                // that.$message.warning('删除失败!')
                that.$notification.warning({
                  message:'消息',
                  description:"删除失败"
                });
              }
            })
          }
        })
                  // }
                } else {
                  // that.$message.warning('删除失败!')
                  that.$notification.warning({
                    message: '消息',
                    description: '删除失败'
                  })
                }
              })
            }
          })
        } else {
          this.$notification.warning({
            message: '消息',
            description: '此车间已挂载子节点'
          })
        }
        console.log('deletedRecord', deletedRecord)
      },
      selectDirectiveOk(record) {
        console.log('选中指令数据', record)
        this.nodeSettingForm.setFieldsValue({directiveCode: record.directiveCode})
        this.nodeSettingForm.setFieldsValue({ directiveCode: record.directiveCode })
        this.currSelected.sysCode = record.sysCode
      },
      getFlowGraphData(node) {
@@ -533,24 +544,24 @@
        }
      },
      //---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------
      expandAll () {
      expandAll() {
        this.iExpandedKeys = this.allTreeKeys
      },
      closeAll () {
      closeAll() {
        this.iExpandedKeys = []
      },
      checkALL () {
      checkALL() {
        this.checkStriccheckStrictlytly = false
        this.checkedKeys = this.allTreeKeys
      },
      cancelCheckALL () {
      cancelCheckALL() {
        //this.checkedKeys = this.defaultCheckedKeys
        this.checkedKeys = []
      },
      switchCheckStrictly (v) {
        if(v==1){
      switchCheckStrictly(v) {
        if (v == 1) {
          this.checkStrictly = false
        }else if(v==2){
        } else if (v == 2) {
          this.checkStrictly = true
        }
      },
@@ -570,7 +581,7 @@
      this.currFlowId = this.$route.params.id
      this.currFlowName = this.$route.params.name
      // this.loadTree()
    },
    }
  }
</script>
src/views/system/UserList.vue
@@ -269,7 +269,8 @@
            title: '车间',
            align: "center",
            width: 240,
            dataIndex: 'productionName'
            dataIndex: 'productionName',
            ellipsis: true,
          },
          {
            title: '状态',
@@ -363,7 +364,8 @@
                    title: '车间',
                    align: "center",
                    width: 240,
                    dataIndex: 'productionName'
                    dataIndex: 'productionName',
                    ellipsis: true,
                  },
                  {
                    title: '状态',
@@ -433,7 +435,8 @@
                    title: '车间',
                    align: "center",
                    width: 240,
                    dataIndex: 'productionName'
                    dataIndex: 'productionName',
                    ellipsis: true,
                  },
                  {
                    title: '班组',
src/views/system/WorkshopSignageManagement.vue
@@ -7,15 +7,17 @@
          <!-- æœç´¢åŒºåŸŸ -->
          <a-form layout="inline" @keyup.enter.native="searchQuery">
            <a-row :gutter="24">
              <a-col :md="12" :sm="8">
                <a-form-item label="车间名称" :labelCol="{ span: 5 }" :wrapperCol="{ span: 18, offset: 1 }">
              <a-col :md="6" :sm="6">
                <a-form-item label="车间名称" :labelCol="{ span: 5 }" :wrapperCol="{ span: 19}">
                  <a-input placeholder="" v-model="queryParam.workshopName"></a-input>
                </a-form-item>
              </a-col>
              <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
                <a-col :md="12" :sm="24">
                  <a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 21px">查询</a-button>
                  <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
                <a-col>
                  <a-space>
                    <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
                    <a-button type="primary" @click="searchReset" icon="reload">重置</a-button>
                  </a-space>
                </a-col>
              </span>
            </a-row>
@@ -74,8 +76,8 @@
    </a-col>
    <a-col :md="rightColMd" :sm="24" v-if="this.rightcolval == 1">
      <a-card :bordered="false">
        <div style="text-align: right">
          <a-icon type="close-circle" @click="hideUserList" />
        <div @click="hideUserList" class="close-circle">
          <a-icon type="close-circle"/>
        </div>
        <!-- æŸ¥è¯¢åŒºåŸŸ -->
        <div class="table-page-search-wrapper">
@@ -97,7 +99,7 @@
        </div>
        <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
        <div class="table-operator" :md="24" :sm="24">
          <a-button @click="handleAddDeviceInWorkshop" type="primary" icon="plus" style="margin-top: 16px"
          <a-button @click="handleAddDeviceInWorkshop" type="primary" icon="plus"  style="margin: 5px 0 10px 2px"
            >已有设备
          </a-button>
@@ -114,6 +116,7 @@
            </a-button>
          </a-dropdown>
        </div>
        <!-- table区域-begin -->
        <div>
          <div class="ant-alert ant-alert-info" style="margin-bottom: 16px">
@@ -147,7 +150,7 @@
    <!-- è¡¨å•区域 -->
    <workshop-modal ref="modalForm" @ok="modalFormOk"></workshop-modal>
    <!--新增车间-->
    <select-device-modal ref="selectUserModal" @selectFinished="selectOK"></select-device-modal>
    <select-device-modal ref="selectDeviceModal" @selectFinished="selectOK" :title="'添加已有设备'"></select-device-modal>
    <!--已有设备-->
  </a-row>
</template>
@@ -354,6 +357,8 @@
        if (res.success) {
          this.dataSource2 = res.result.records
          this.ipagination2.total = res.result.total
        }else{
          this.dataSource2=[]
        }
        this.loading2 = false
      })
@@ -416,7 +421,7 @@
              if (res.success) {
                that.$message.success(res.message)
                that.loadData2()
                that.onClearSelected()
                that.onClearSelected2()
              } else {
                that.$message.warning(res.message)
              }
@@ -455,9 +460,11 @@
      if (this.currentWorkshopId == '') {
        this.$message.error('请选择一个车间!')
      } else {
        this.$refs.selectUserModal.visible = true
        this.$refs.selectUserModal.selectedRowKeys = []
        this.$refs.selectUserModal.selectedRows = []
        this.$refs.selectDeviceModal.visible = true
        this.$refs.selectDeviceModal.selectedRowKeys = []
        this.$refs.selectDeviceModal.selectedRows = []
        this.$refs.selectDeviceModal.checkedKeys = []
        this.$refs.selectDeviceModal.expandAll()
      }
    },
@@ -503,4 +510,11 @@
.ant-btn {
  margin-left: 8px;
}
  .close-circle{
    position: absolute;
    z-index: 1;
    right: 15px;
    top: 15px;
    cursor: pointer;
  }
</style>
src/views/system/modules/PasswordModal.vue
@@ -31,6 +31,7 @@
<script>
  import {changePassword} from '@/api/api'
  import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
  export default {
    name: "PasswordModal",
@@ -69,6 +70,13 @@
          sm: { span: 16 },
        },
        form:this.$form.createForm(this)
      }
    },
    watch:{
      visible:{
        handler(value){
          if(value) this.initDictData('password_length')
        }
      }
    },
    created () {
@@ -136,7 +144,20 @@
      handleConfirmBlur  (e) {
        const value = e.target.value
        this.confirmDirty = this.confirmDirty || !!value
      }
      },
      initDictData(dictCode) {
        //根据字典Code, åˆå§‹åŒ–字典数组
        ajaxGetDictItems(dictCode, null).then((res) => {
          if (res.success) {
            const regExp = new RegExp("^(?=.*[a-zA-Z])(?=.*\\\d)(?=.*[~!@#$%^&*()_+`\\-={}:\";'<>?,./]).{"+Number(res.result[0].value)+",}$");
            this.validatorRules.password.rules[0]={
              required:true,
              pattern: regExp,
              message: `密码由${res.result[0].value}位数字、大小写字母和特殊符号组成!`,
            }
          }
        })
      },
    }
  }
</script>
src/views/system/modules/ProductionManager/ProductionModal.vue
@@ -137,7 +137,7 @@
            httpAction(this.url.add,this.model,"post").then((res)=>{
              if(res.success){
                // that.$message.success(res.message);
                that.$notification.warning({
                that.$notification.success({
                  message:'消息',
                  description:res.message
                });
src/views/system/modules/SelectDeviceModal.vue
@@ -1,228 +1,369 @@
<template>
  <div>
    <a-modal
      centered
    <a-drawer
      :title="title"
      :width="1000"
      :visible="visible"
      width="650"
      @ok="handleOk"
      @cancel="handleCancel"
      cancelText="关闭">
      @close="handleCancel"
    >
      <!-- æŸ¥è¯¢åŒºåŸŸ -->
      <div class="table-page-search-wrapper">
        <a-form layout="inline" @keyup.enter.native="searchQuery">
          <a-row :gutter="24">
      <!--&lt;!&ndash; æŸ¥è¯¢åŒºåŸŸ &ndash;&gt;-->
      <!--<div class="table-page-search-wrapper">-->
      <!--<a-form layout="inline" @keyup.enter.native="searchQuery">-->
      <!--<a-row :gutter="24">-->
            <a-col :span="10">
              <a-form-item label="设备名称">
                <a-input placeholder="请输入设备名称" v-model="queryParam.equipmentName"></a-input>
              </a-form-item>
            </a-col>
            <a-col :span="8">
                    <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
                      <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
                      <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
                    </span>
            </a-col>
      <!--<a-col :span="10">-->
      <!--<a-form-item label="设备名称">-->
      <!--<a-input placeholder="请输入设备名称" v-model="queryParam.equipmentName"></a-input>-->
      <!--</a-form-item>-->
      <!--</a-col>-->
      <!--<a-col :span="8">-->
      <!--<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">-->
      <!--<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>-->
      <!--<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>-->
      <!--</span>-->
      <!--</a-col>-->
          </a-row>
      <!--</a-row>-->
      <!--</a-form>-->
      <!--</div>-->
      <!--&lt;!&ndash; table区域-begin &ndash;&gt;-->
      <!--<div>-->
      <!--<a-table-->
      <!--size="small"-->
      <!--bordered-->
      <!--rowKey="equipmentId"-->
      <!--:columns="columns1"-->
      <!--:dataSource="dataSource1"-->
      <!--:pagination="ipagination"-->
      <!--:loading="loading"-->
      <!--:scroll="{ y: 240 }"-->
      <!--:rowSelection="{selectedRowKeys: selectedRowKeys,onSelectAll:onSelectAll,onSelect:onSelect,onChange: onSelectChange}"-->
      <!--@change="handleTableChange">-->
      <!--</a-table>-->
      <!--</div>-->
      <!--&lt;!&ndash; table区域-end &ndash;&gt;-->
      <a-spin :spinning="loading">
        <!-- showLine -->
        <a-form>
          <a-form-item label="车间层级:">
            <a-tree showLine ref="tree" :expandedKeys.sync="expandedKeys"
                    :treeData="treeDataSource" checkable @check="onCheck" v-model="checkedKeys"
                    @expand="onExpand">
            </a-tree>
          </a-form-item>
        </a-form>
      </a-spin>
      <div class="drawer-bottom-button">
        <a-dropdown
          style="float: left"
          :trigger="['click']"
          placement="topCenter"
        >
          <a-menu slot="overlay">
            <a-menu-item key="1" @click="expandAll">展开所有</a-menu-item>
            <a-menu-item key="2" @click="closeAll">合并所有</a-menu-item>
            <a-menu-item key="3" @click="refreshTree">刷新</a-menu-item>
          </a-menu>
          <a-button>
            æ ‘操作
            <a-icon type="up"/>
          </a-button>
        </a-dropdown>
        <a-popconfirm title="确定放弃编辑?" @confirm="handleCancel" okText="确定" cancelText="取消">
          <a-button style="margin-right: .8rem">关闭</a-button>
        </a-popconfirm>
        <a-button
          @click="handleOk"
          type="primary"
        >确定
        </a-button>
      </div>
      <!-- table区域-begin -->
      <div>
        <a-table
          size="small"
          bordered
          rowKey="equipmentId"
          :columns="columns1"
          :dataSource="dataSource1"
          :pagination="ipagination"
          :loading="loading"
          :scroll="{ y: 240 }"
          :rowSelection="{selectedRowKeys: selectedRowKeys,onSelectAll:onSelectAll,onSelect:onSelect,onChange: onSelectChange}"
          @change="handleTableChange">
        </a-table>
      </div>
      <!-- table区域-end -->
    </a-modal>
    </a-drawer>
  </div>
</template>
<script>
  import { filterObj } from '@/utils/util'
  import { getAction } from '@/api/manage'
  // import { filterObj } from '@/utils/util'
  // import { getAction } from '@/api/manage'
  import {
    getAction,
    postAction,
    deleteAction
  } from '@/api/manage'
  import BaseTree from '@/views/mdc/common/BaseTree'
  import DepartTree from '@/views/mdc/base/modules/DepartList/DepartListTree/DepartTree'
  import { mapActions } from 'vuex'
  export default {
    name: 'SelectDeviceModal',
    components: {
      BaseTree, DepartTree
    },
    props: {
      editDisable: {
        type: Boolean,
        default() {
          return true
        }
      },
      title: {
        type: String
      }
    },
    data() {
      return {
        title: '添加已有设备',
        names: [],
        visible: false,
        placement: 'right',
        description: '',
        // æŸ¥è¯¢æ¡ä»¶
        queryParam: {},
        // è¡¨å¤´
        columns1: [
          {
            title: '#',
            dataIndex: '',
            key: 'rowIndex',
            width: 50,
            align: 'center',
            customRender: function(t, r, index) {
              return parseInt(index) + 1
            }
          },
          {
            title: '设备编号',
            align: 'center',
            width: 100,
            dataIndex: 'equipmentId'
          },
          {
            title: '设备名称',
            align: 'center',
            width: 100,
            dataIndex: 'equipmentName'
          },
          {
            title: '设备类型',
            align: 'center',
            width: 100,
            dataIndex: 'equipmentType'
          },
          {
            title: '驱动类型',
            align: 'center',
            width: 100,
            dataIndex: 'driveType'
          }
        ],
        //数据集
        dataSource1: [],
        dataSource2: [],
        // åˆ†é¡µå‚æ•°
        ipagination: {
          current: 1,
          pageSize: 10,
          pageSizeOptions: ['10', '20', '30'],
          showTotal: (total, range) => {
            return range[0] + '-' + range[1] + ' å…±' + total + '条'
          },
          showQuickJumper: true,
          showSizeChanger: true,
          total: 0
        },
        cardLoading: false,
        loading: false,
        selectedRowKeys: [],
        selectedRows: [],
        treeDataSource: [],
        expandedKeys: [],
        checkedKeys: [],
        url: {
          list: '/mdc/mdcEquipment/list'
        }
          getBaseTree: '/mdc/mdcEquipment/queryTreeListByProduction'
        },
        dataList: [],
        allTreeKeys: [],
        visible: false,
        dataSource: []
        // names: [],
        // placement: 'right',
        // description: '',
        // // æŸ¥è¯¢æ¡ä»¶
        // queryParam: {},
        // // è¡¨å¤´
        // columns1: [
        //   {
        //     title: '#',
        //     dataIndex: '',
        //     key: 'rowIndex',
        //     width: 50,
        //     align: 'center',
        //     customRender: function(t, r, index) {
        //       return parseInt(index) + 1
        //     }
        //   },
        //   {
        //     title: '设备编号',
        //     align: 'center',
        //     width: 100,
        //     dataIndex: 'equipmentId'
        //   },
        //   {
        //     title: '设备名称',
        //     align: 'center',
        //     width: 100,
        //     dataIndex: 'equipmentName'
        //   },
        //   {
        //     title: '设备类型',
        //     align: 'center',
        //     width: 100,
        //     dataIndex: 'equipmentType'
        //   },
        //   {
        //     title: '驱动类型',
        //     align: 'center',
        //     width: 100,
        //     dataIndex: 'driveType'
        //   }
        // ],
        // //数据集
        // dataSource1: [],
        // dataSource2: [],
        // // åˆ†é¡µå‚æ•°
        // ipagination: {
        //   current: 1,
        //   pageSize: 10,
        //   pageSizeOptions: ['10', '20', '30'],
        //   showTotal: (total, range) => {
        //     return range[0] + '-' + range[1] + ' å…±' + total + '条'
        //   },
        //   showQuickJumper: true,
        //   showSizeChanger: true,
        //   total: 0
        // },
        // loading: false,
        // selectedRowKeys: [],
        // selectedRows: [],
        // url: {
        //   list: '/mdc/mdcEquipment/list'
        // },
        // activeKey: '1',
        // isDepartType: ''
      }
    },
    created() {
      this.loadData()
      // this.loadData()
      this.queryTreeData()
      this.closeAll()
    },
    methods: {
      searchQuery() {
        this.loadData(1)
      ...mapActions(['QueryProduction']),
      onExpand(expandedKeys) {
        this.expandedKeys = expandedKeys
        this.autoExpandParent = false
      },
      searchReset() {
        this.queryParam = {}
        this.loadData(1)
      queryTreeData() {
        this.loading = true
        this.cardLoading = true
        this.QueryProduction().then(res => {
          if (res.success) {
            this.dataList = []
            this.allTreeKeys = []
            this.getTreeDataSouce(res.result)
            this.treeDataSource = res.result
            this.generateList(this.treeDataSource)
            console.log('treeDataSource', this.treeDataSource)
            this.expandedKeys = this.allTreeKeys
          } else {
            this.$message.warn(res.message)
          }
        }).finally(() => {
          this.loading = false
          this.cardLoading = false
        })
      },
      generateList(data) {
        for (let i = 0; i < data.length; i++) {
          const node = data[i]
          const key = node.key
          const title = node.title
          this.dataList.push({
            key,
            title: title
          })
          this.allTreeKeys.push(key)
          if (node.children) {
            this.generateList(node.children)
          }
        }
      },
      getTreeDataSouce(data) {
        data.forEach(item => {
          if (item.children && item.children.length > 0) {
            this.getTreeDataSouce(item.children)
          }
          item.key = item.equipmentId ? item.equipmentId : item.key
          item.value = item.equipmentId ? item.equipmentId : item.value
        })
      },
      expandAll() {
        this.expandedKeys = this.allTreeKeys
      },
      closeAll() {
        this.expandedKeys = ['-1']
      },
      refreshTree() {
        this.queryTreeData()
      },
      onCheck(value, obj) {
        this.checkedKeys = value
        console.log('obj,', obj)
        this.deviceNodes = obj.checkedNodes.filter(item => item.data.props.equipmentId).map(item => item.data.props.equipmentId)
        console.log(this.deviceNodes)
      },
      handleCancel() {
        this.visible = false
      },
      handleOk() {
        this.dataSource2 = this.selectedRowKeys
        console.log('data---------' + this.dataSource2)
        if (this.dataSource2.length > 0) {
          this.$emit('selectFinished', this.dataSource2)
        }
        this.$emit('selectFinished', this.deviceNodes)
        this.visible = false
      },
      add() {
        this.visible = true
      },
      loadData(arg) {
        //加载数据 è‹¥ä¼ å…¥å‚æ•°1则加载第一页的内容
        if (arg === 1) {
          this.ipagination.current = 1
        }
        var params = this.getQueryParams()//查询条件
        getAction(this.url.list, params).then((res) => {
          if (res.success) {
            this.dataSource1 = res.result.records
            this.ipagination.total = res.result.total
          }
        })
      },
      getQueryParams() {
        var param = Object.assign({}, this.queryParam, this.isorter)
        param.field = this.getQueryField()
        param.pageNo = this.ipagination.current
        param.pageSize = this.ipagination.pageSize
        return filterObj(param)
      },
      getQueryField() {
        //TODO å­—段权限控制
      },
      onSelectAll(selected, selectedRows, changeRows) {
        if (selected === true) {
          for (var a = 0; a < changeRows.length; a++) {
            this.dataSource2.push(changeRows[a])
          }
        } else {
          for (var b = 0; b < changeRows.length; b++) {
            this.dataSource2.splice(this.dataSource2.indexOf(changeRows[b]), 1)
          }
        }
        // console.log(selected, selectedRows, changeRows);
      },
      onSelect(record, selected) {
        console.log(this.selectedRowKeys)
        if (selected === true) {
          this.dataSource2.push(record)
        } else {
          var index = this.dataSource2.indexOf(record)
          //console.log();
          if (index >= 0) {
            this.dataSource2.splice(this.dataSource2.indexOf(record), 1)
          }
        }
      },
      onSelectChange(selectedRowKeys, selectedRows) {
        console.log('selectedRowKeys', selectedRowKeys)
        this.selectedRowKeys = selectedRowKeys
        this.selectionRows = selectedRows
      },
      onClearSelected() {
        this.selectedRowKeys = []
        this.selectionRows = []
      },
      handleDelete: function(record) {
        this.dataSource2.splice(this.dataSource2.indexOf(record), 1)
      },
      handleTableChange(pagination, filters, sorter) {
        //分页、排序、筛选变化时触发
        console.log(sorter)
        //TODO ç­›é€‰
        if (Object.keys(sorter).length > 0) {
          this.isorter.column = sorter.field
          this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc'
        }
        this.ipagination = pagination
        this.loadData()
      }
      // add() {
      //   this.visible = true
      // },
      // loadData(arg) {
      //   //加载数据 è‹¥ä¼ å…¥å‚æ•°1则加载第一页的内容
      //   if (arg === 1) {
      //     this.ipagination.current = 1
      //   }
      //   var params = this.getQueryParams()//查询条件
      //   getAction(this.url.list, params).then((res) => {
      //     if (res.success) {
      //       this.dataSource1 = res.result.records
      //       this.ipagination.total = res.result.total
      //     }
      //   })
      // },
      // getQueryParams() {
      //   var param = Object.assign({}, this.queryParam, this.isorter)
      //   param.field = this.getQueryField()
      //   param.pageNo = this.ipagination.current
      //   param.pageSize = this.ipagination.pageSize
      //   return filterObj(param)
      // },
      // getQueryField() {
      //   //TODO å­—段权限控制
      // },
      // onSelectAll(selected, selectedRows, changeRows) {
      //   if (selected === true) {
      //     for (var a = 0; a < changeRows.length; a++) {
      //       this.dataSource2.push(changeRows[a])
      //     }
      //   } else {
      //     for (var b = 0; b < changeRows.length; b++) {
      //       this.dataSource2.splice(this.dataSource2.indexOf(changeRows[b]), 1)
      //     }
      //   }
      //   // console.log(selected, selectedRows, changeRows);
      // },
      // onSelect(record, selected) {
      //   console.log(this.selectedRowKeys)
      //   if (selected === true) {
      //     this.dataSource2.push(record)
      //   } else {
      //     var index = this.dataSource2.indexOf(record)
      //     //console.log();
      //     if (index >= 0) {
      //       this.dataSource2.splice(this.dataSource2.indexOf(record), 1)
      //     }
      //   }
      // },
      // onSelectChange(selectedRowKeys, selectedRows) {
      //   console.log('selectedRowKeys', selectedRowKeys)
      //   this.selectedRowKeys = selectedRowKeys
      //   this.selectionRows = selectedRows
      // },
      // onClearSelected() {
      //   this.selectedRowKeys = []
      //   this.selectionRows = []
      // },
      // handleDelete: function(record) {
      //   this.dataSource2.splice(this.dataSource2.indexOf(record), 1)
      // },
      // handleTableChange(pagination, filters, sorter) {
      //   //分页、排序、筛选变化时触发
      //   console.log(sorter)
      //   //TODO ç­›é€‰
      //   if (Object.keys(sorter).length > 0) {
      //     this.isorter.column = sorter.field
      //     this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc'
      //   }
      //   this.ipagination = pagination
      //   this.loadData()
      // },
    }
  }
</script>
<style lang="less" scoped>
  /deep/ .ant-modal {
    /*transform-origin: 337px 50px;*/
  }
  .ant-card-body .table-operator {
    margin-bottom: 18px;
  }
@@ -253,4 +394,16 @@
    height: 90% !important;
    overflow-y: hidden
  }
  .drawer-bottom-button {
    position: absolute;
    bottom: 0;
    width: 100%;
    border-top: 1px solid #e8e8e8;
    padding: 10px 16px;
    text-align: right;
    left: 0;
    background: #fff;
    border-radius: 0 0 2px 2px;
  }
</style>
src/views/system/modules/UserModal.vue
@@ -67,7 +67,7 @@
          <j-select-production  v-model="model.selectedProduction" :multi="true" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-production>
        </a-form-model-item>
        <a-form-model-item label="班组分配" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="teamId">
          <j-dict-select-tag
          <j-dict-select-tag
          v-model="model.teamId"
          :triggerChange="true"
          dictCode="mom_base_team,name,id,del_flag = 0"
@@ -150,6 +150,7 @@
  import { duplicateCheck } from '@/api/api'
  import JSelectProduction from '../../../components/jeecgbiz/JSelectProduction'
  import {mapActions} from 'vuex'
  import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api'
  export default {
    name: "UserModal",
@@ -215,6 +216,13 @@
        nextProductionOptions:[],
        isDepartType:'',
      }
    },
    watch:{
      visible:{
        handler(value){
          if(value) this.initDictData('password_length')
        }
      }
    },
    created () {
@@ -548,7 +556,22 @@
        }else{
            this.departIdShow=true;
        }
      }
      },
      initDictData(dictCode) {
        //根据字典Code, åˆå§‹åŒ–字典数组
        ajaxGetDictItems(dictCode, null).then((res) => {
          if (res.success) {
            const regExp = new RegExp("^(?=.*[a-zA-Z])(?=.*\\\d)(?=.*[~!@#$%^&*()_+`\\-={}:\";'<>?,./]).{"+Number(res.result[0].value)+",}$");
            this.validatorRules.password[0]={
              required:true,
              pattern: regExp,
              message: `密码由${res.result[0].value}位数字、大小写字母和特殊符号组成!`,
            }
          }
        })
      },
    }
  }
</script>
src/views/user/Login.vue
@@ -49,6 +49,10 @@
        </a-button>
      </a-form-item>
      <a-form-model-item style="color: red">
        å¯†çº§ï¼šå†…部&nbsp;&nbsp;&nbsp;&nbsp;警告:本系统禁止存储、处理、传输涉密信息
      </a-form-model-item>
    </a-form-model>
    <!--<two-step-captcha v-if="requiredTwoStepCaptcha" :visible="stepCaptchaVisible" @success="stepCaptchaSuccess" @cancel="stepCaptchaCancel"></two-step-captcha>-->
@@ -57,6 +61,7 @@
      @success="loginSelectOk"
    ></login-select-tenant>
    <!--<third-login ref="thirdLogin"></third-login>-->
    <user-password ref="userPassword"/>
  </div>
</template>
@@ -73,9 +78,11 @@
import LoginPhone from './LoginPhone'
import store from '@/store'
import { getAction } from '../../api/manage'
import UserPassword from '../../components/tools/UserPassword'
export default {
  components: {
    UserPassword,
    LoginSelectTenant,
    TwoStepCaptcha,
    // ThirdLogin,
@@ -138,7 +145,10 @@
    },
    // ç™»å½•后台成功
    requestSuccess(loginResult) {
      this.$router.push({ path: "/isps/userAnnouncement" }).catch(() => {
      // this.$router.push({ path: "/isps/userAnnouncement" }).catch(() => {
      //   console.log('登录跳转首页出错,这个错误从哪里来的')
      // })
      this.$router.push({ path: "/dashboard/analysis" }).catch(() => {
        console.log('登录跳转首页出错,这个错误从哪里来的')
      })
      this.$notification.success({
@@ -162,13 +172,25 @@
      // this.$refs.loginSelect.show(loginResult)
    },
    //登录后台失败
    requestFailed(err) {
    requestFailed(err,username) {
      let description = ((err.response || {}).data || {}).message || err.message || "请求出现错误,请稍后再试"
      this.$notification['error']({
        message: '登录失败',
        description: description,
        duration: 4,
      });
      if(err.code!==5001&&err.code!==5002){
        this.$notification['error']({
          message: '登录失败',
          description: description,
          duration: 4,
        });
      }else{
        this.$notification['warning']({
          message: '提示',
          description: description,
          duration:1,
          onClose:()=>{
            console.log('err',err)
            this.$refs.userPassword.show(username)
          }
        });
      }
      //账户密码登录错误后更新验证码
      // if (this.customActiveKey === 'tab1' && description.indexOf('密码错误') > 0) {
      //   this.$refs.alogin.handleChangeCheckCode()
src/views/user/LoginAccount.vue
@@ -136,7 +136,7 @@
            this.Login(loginParams).then((res) => {
              this.$emit('success', res.result)
            }).catch((err) => {
              this.$emit('fail', err)
              this.$emit('fail', err,loginParams.username)
            });
          }else{
            this.$emit('validateFail')