zenglf
2023-10-24 575a75a0519e53ceec6bb5d31f682124596c3bae
Merge branch 'master' of http://117.34.109.166:18448/r/vue_mdc_430 into develop
已添加4个文件
已修改29个文件
已删除1个文件
3329 ■■■■■ 文件已修改
package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mdc.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/config/router.config.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/TestWorkshop.vue 180 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/WorkshopSignage.vue 369 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dashboard/Analysis.vue 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/HolidayManagement/HolidayManagementList.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationList.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerList.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue 233 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/deviceCalendar/DeviceCalendarList.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/deviceLog/LogInfo.vue 115 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/deviceLog/LogList.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/deviceLog/WorkChartModel.vue 796 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/equipmentAvailCompare/equipmentAvailCompareMain.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/equipmentDayAvail/equipmentDayAvailMain.vue 411 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/mdcPassRate/mdcPassRateList.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityList.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationList.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/shift/ShiftInfoModel.vue 123 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/WorkshopSignageManagement.vue 501 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/modules/SelectDeviceModal.vue 256 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/modules/UserModal.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/modules/WorkshopModal.vue 134 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json
@@ -42,6 +42,7 @@
    "vue-area-linkage": "^5.1.0",
    "vue-calendar-component": "^2.8.2",
    "vue-cropper": "^0.5.4",
    "vue-drag-resize": "^1.5.4",
    "vue-i18n": "^8.7.0",
    "vue-loader": "^15.7.0",
    "vue-ls": "^3.2.0",
src/api/mdc.js
@@ -1,7 +1,34 @@
import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage'
export default {
//  -------------------------------------驱动参数管理页面----------------------------------------
//  èŽ·å–æŽ§åˆ¶ç³»ç»Ÿç±»åž‹
  getDriveTypeApi:()=>getAction('/mdc/mdcDriveTypeParamConfig/getDriveParamOptions')
  // -------------------------------------驱动参数管理页面----------------------------------------
  // èŽ·å–æŽ§åˆ¶ç³»ç»Ÿç±»åž‹
  getDriveTypeApi: () => getAction('/mdc/mdcDriveTypeParamConfig/getDriveParamOptions'),
  // -------------------------------------车间看板页面----------------------------------------
  // é¦–页获取大屏入口车间列表
  getWorkshopListInHomePageApi: () => getAction('/mdc/mdcWorkshopInfo/getWorkshopList'),
  // æ ¹æ®è½¦é—´id查询设备列表
  getDeviceListByWorkshopIdApi: params => getAction('/mdc/mdcWorkshopInfo/workshopEquipmentList', params),
  // æ ¹æ®è½¦é—´id查询车间详细信息
  getWorkshopDetailByWorkshopIdApi: id => getAction('/mdc/mdcWorkshopInfo/queryById', { id }),
  // æ ¹æ®è½¦é—´id查询大屏信息
  getDeviceListInWorkshopSignagePageApi: workshopId => getAction('/mdc/mdcWorkshopInfo/getBigScreenInfo', { workshopId }),
  // ä¿å­˜å¤§å±è½¦é—´è®¾å¤‡åæ ‡å¤§å°ä¿¡æ¯
  saveDevicePositionAndSizeApi: params => putAction('/mdc/mdcWorkshopInfo/saveEquipmentCoordinate', params),
  // æŸ¥è¯¢è½¦é—´åˆ—表
  getWorkshopListApi: params => getAction('/mdc/mdcWorkshopInfo/list', params),
  // æ–°å¢žè½¦é—´ä¿¡æ¯
  addWorkshopApi: params => postAction('/mdc/mdcWorkshopInfo/add', params),
  // ç¼–辑车间信息
  editWorkshopApi: params => putAction('/mdc/mdcWorkshopInfo/edit', params),
  // åˆ é™¤å•个车间信息
  deleteSingleWorkshopApi: id => deleteAction('/mdc/mdcWorkshopInfo/delete', { id }),
  // æ‰¹é‡åˆ é™¤è½¦é—´ä¿¡æ¯
  deleteBatchWorkshopApi: ids => deleteAction('/mdc/mdcWorkshopInfo/deleteBatch', { ids }),
  // æ–°å¢žå¤§å±è½¦é—´å’Œè®¾å¤‡å…³ç³»
  addDeviceInWorkshopApi: params => postAction('/mdc/mdcWorkshopInfo/addWorkshopEquipment', params),
  // åˆ é™¤å•个大屏车间和设备关系
  deleteSingleDeviceInWorkshopApi: params => deleteAction('/mdc/mdcWorkshopInfo/deleteWorkshopEquipment', params),
  // æ‰¹é‡åˆ é™¤å¤§å±è½¦é—´å’Œè®¾å¤‡å…³ç³»
  deleteBatchDeviceInWorkshopApi: params => deleteAction('/mdc/mdcWorkshopInfo/deleteWorkshopEquipmentBatch', params)
}
src/config/router.config.js
@@ -12,7 +12,6 @@
    meta: { title: '首页' },
    redirect: '/dashboard/analysis',
    children: [
      // // dashboard
      // {
      //   path: '/dashboard',
@@ -373,8 +372,8 @@
    ]
  },
  {
    path:'/testWorkshop',
    component:()=>import('@/views/TestWorkshop.vue')
    path:'/workshopSignage/:id',
    component:()=>import('@/views/WorkshopSignage.vue')
  },
  {
    path: '/404',
src/main.js
@@ -72,6 +72,9 @@
import dataV from '@jiaminghi/data-view'
Vue.use(dataV)
import VueDragResize from "vue-drag-resize"
Vue.component('vue-drag-resize', VueDragResize)
// import 'echarts-liquidfill'
Vue.prototype.$echarts = echarts
Vue.prototype.$qs = qs
src/views/TestWorkshop.vue
ÎļþÒÑɾ³ý
src/views/WorkshopSignage.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,369 @@
<template>
  <dv-full-screen-container class="full-screen-container">
    <header class="page-header">
      {{ workshopDetails.workshopName }}
      <div class="header-right" v-has="'home:saveDevicePositionAndSize'">
        <a-space>
          <span v-if="!isSwitchChecked">开启功能</span>
          <span v-else>关闭功能</span>
          <a-switch
            checked-children="开"
            un-checked-children="关"
            @change="handleSwitchChange"
            v-model="isSwitchChecked"
            :disabled="isSwitchChecked"
          />
        </a-space>
        <a-button type="primary" icon="save" size="large" @click="saveDevicePositionAndSizeByApi">保存位置 </a-button>
      </div>
    </header>
    <dv-border-box-8>
      <div class="content-container" ref="deviceContainerRef">
        <VueDragResize
          v-for="(item, index) in deviceList"
          :key="item.equipmentId"
          :w="item.vw"
          :h="item.vh"
          :x="item.coordinateLeft"
          :y="item.coordinateTop"
          v-on:resizing="resize($event, index)"
          v-on:dragging="resize($event, index)"
          :parentLimitation="true"
          :minw="100"
          :minh="100"
          :isDraggable="isDraggable"
          :isResizable="isResizable"
          :stickSize="6"
        >
          <div class="single-device" :style="{ width: item.vw + 'px', height: item.vh + 'px' }">
            <div class="device-status">
              <div
                v-if="item.equipmentStatus == 2 || item.equipmentStatus == 1"
                :style="{ backgroundImage: `url(${require('@/assets/yellow.png')})` }"
                class="status-image"
              ></div>
              <div
                v-if="item.equipmentStatus == 22"
                :style="{ backgroundImage: `url(${require('@/assets/red.png')})` }"
                class="status-image"
              ></div>
              <div
                v-if="item.equipmentStatus == 0"
                :style="{ backgroundImage: `url(${require('@/assets/gray.png')})` }"
                class="status-image"
              ></div>
              <div
                v-if="item.equipmentStatus == 3"
                :style="{ backgroundImage: `url(${require('@/assets/green.png')})` }"
                class="status-image"
              ></div>
              <div
                :style="{ backgroundImage: `url(${getImgView(item.equipmentImage) || require('@/assets/8.png')})` }"
                class="device-image"
              ></div>
            </div>
            <div class="device-id" :style="{ fontSize: item.fontSize + 'px' }">
              {{ item.equipmentId }}
            </div>
          </div>
        </VueDragResize>
        <div class="device-status-info">
          <div 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>
        </div>
      </div>
    </dv-border-box-8>
  </dv-full-screen-container>
</template>
<script>
import VueDragResize from 'vue-drag-resize'
import api from '@/api/mdc'
import { getFileAccessHttpUrl } from '@/api/manage'
export default {
  components: {
    VueDragResize,
  },
  data() {
    return {
      workshopDetails: {}, //  è½¦é—´è¯¦ç»†ä¿¡æ¯,
      isDraggable: false, // æ˜¯å¦å¼€å¯æ‹–拽
      isResizable: false, // æ˜¯å¦å¼€å¯ç¼©æ”¾
      isSwitchChecked: false, // æ˜¯å¦å¼€å¯åŠŸèƒ½
      timingAcquisition: null, // å®šæ—¶åˆ·æ–°æ˜¯å¦å¼€å¯
      deviceList: [
        // {
        //   equipmentId: '123213213123232',// è®¾å¤‡ID
        //   equipmentImage: require('@/assets/8.png'), // è®¾å¤‡å›¾ç‰‡
        //   coordinateTop: 200, // æ‹–拽元素距盒子顶距离
        //   coordinateLeft: 100, // æ‹–拽元素距盒子左侧距离
        //   vw: 100,  // ç¼©æ”¾å…ƒç´ å®½åº¦
        //   vh: 100, // ç¼©æ”¾å…ƒç´ é«˜åº¦
        //   fontSize: 12, // ç¼©æ”¾å…ƒç´ å­—体大小
        //   equipmentStatus: 1 // è®¾å¤‡çŠ¶æ€ 0:关机 22:报警 2:待机 3:运行 å¼€æœº:1(没有四色灯标识归为待机)
        // }
      ], // è®¾å¤‡ä¿¡æ¯åˆ—表
      deviceStatusList: [
        {
          label: '关机',
          value: 0,
          color: '#A8A8A8',
        },
        {
          label: '待机',
          value: 2,
          color: '#FFFF00',
        },
        {
          label: '运行',
          value: 3,
          color: '#00EE00',
        },
        {
          label: '报警',
          value: 22,
          color: '#FF0000',
        },
      ], // è®¾å¤‡çŠ¶æ€æŒ‡ç¤ºç¯åˆ—è¡¨
    }
  },
  watch: {
    isSwitchChecked: {
      handler(newVal) {
        if (!newVal) {
          console.log('定时器开启中')
          this.timingAcquisition = setInterval(() => {
            this.getDeviceListByApi(this.$route.params.id)
          }, 2000)
        } else {
          console.log('关闭定时器')
          clearInterval(this.timingAcquisition)
          this.timingAcquisition = null
        }
      },
      immediate: true,
    },
  },
  methods: {
    /**
     * é€šè¿‡è½¦é—´Id调用接口获取设备信息列表
     * @param id è½¦é—´Id
     */
    getDeviceListByApi(id) {
      console.log('重新刷新')
      api.getDeviceListInWorkshopSignagePageApi(id).then((res) => {
        if (res.result && res.result.length > 0) {
          this.deviceList = res.result
        }
      })
    },
    /**
     * é€šè¿‡è½¦é—´Id调用接口获取车间详细信息
     * @param id è½¦é—´Id
     */
    getWorkshopDetailsByApi(id) {
      api.getWorkshopDetailByWorkshopIdApi(id).then((res) => {
        this.workshopDetails = res.result
        this.$refs.deviceContainerRef.style.backgroundImage = `url(${this.getImgView(
          this.workshopDetails.backgroundImage
        )})`
      })
    },
    /**
     * å›¾ç‰‡é¢„览
     * @param text å›¾ç‰‡åœ°å€
     */
    getImgView(text) {
      if (text && text.indexOf(',') > 0) {
        text = text.substring(0, text.indexOf(','))
      }
      return getFileAccessHttpUrl(text)
    },
    /**
     * ç‚¹å‡»ä¿å­˜æŒ‰é’®è°ƒç”¨æŽ¥å£ä¿å­˜æ‹–拽后的位置与设备图标尺寸
     */
    saveDevicePositionAndSizeByApi() {
      console.log('触发保存')
      if (this.isOperatingDevice) {
        api.saveDevicePositionAndSizeApi(this.deviceList).then((res) => {
          if (res.code === 200) {
            this.$notification.success({
              message: '消息',
              description: res.message,
            })
            this.isOperatingDevice = false
            if (this.isSwitchChecked) {
              this.isSwitchChecked = false
              this.isResizable = !this.isResizable
              this.isDraggable = !this.isDraggable
            }
            this.getDeviceListByApi(this.$route.params.id)
          }
        })
      } else {
        this.$notification.warning({
          message: '消息',
          description: '请开启功能后再进行保存',
        })
      }
    },
    /**
     * è®¾å¤‡æ‹–拽或缩放时触发事件
     * @param newRect æ‹–拽或缩放后的尺寸及距离
     * @param index æ‹–拽设备在数组中的下标
     */
    resize(newRect, index) {
      // if (newRect.width > 100) {
      //   if (newRect.width / newRect.height < 2) {
      //     this.deviceList[index].fontSize = newRect.width / 10
      //   } else {
      //     this.deviceList[index].fontSize = newRect.height / 5
      //   }
      // } else {
      //   this.deviceList[index].fontSize = 12
      // }
      this.deviceList[index].vw = newRect.width
      this.deviceList[index].vh = newRect.height
      this.deviceList[index].coordinateTop = newRect.top
      this.deviceList[index].coordinateLeft = newRect.left
    },
    /**
     * æ ¹æ®è®¾å¤‡çŠ¶æ€å€¼èŽ·å–å¯¹åº”è®¾å¤‡æ•°é‡
     * @param value è®¾å¤‡çŠ¶æ€å€¼
     * @returns {number} è®¾å¤‡æ•°é‡
     */
    getDeviceNumberByStatus(value) {
      return this.deviceList.filter((item) => item.equipmentStatus === value).length
    },
    /**
     * å¼€å¯åŠŸèƒ½è§¦å‘äº‹ä»¶
     * @param checked å½“前switch状态,是否开启,初始为false
     */
    handleSwitchChange(checked) {
      this.isOperatingDevice = true
      this.isResizable = !this.isResizable
      this.isDraggable = !this.isDraggable
    },
  },
  created() {
    if (this.$route.params.id) {
      this.getDeviceListByApi(this.$route.params.id)
      this.getWorkshopDetailsByApi(this.$route.params.id)
    }
  },
  mounted() {
    // ç¦æ­¢ç”¨æˆ·é€‰ä¸­å†…容
    document.onselectstart = () => false
  },
  beforeDestroy() {
    // ç¡®ä¿é”€æ¯å®šæ—¶å™¨åŠå›žæ”¶èµ„源
    clearInterval(this.timingAcquisition)
    this.timingAcquisition = null
  },
}
</script>
<style scoped lang="less">
.full-screen-container {
  background-image: url('../assets/Bj.jpg');
  background-size: 100% 100%;
  color: #fff;
  .page-header {
    height: 80px;
    font-size: 50px;
    text-align: center;
    position: relative;
    .header-right {
      width: 450px;
      position: absolute;
      right: 0px;
      top: 35px;
      display: flex;
      justify-content: space-evenly;
      align-items: center;
      font-size: 16px;
    }
  }
  .content-container {
    position: relative;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    .device-status-info {
      width: 400px;
      position: absolute;
      top: 5px;
      right: 5px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      .single-status-info {
        width: 60px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        .status-square {
          width: 14px;
          height: 14px;
          border: 1px solid #fff;
          border-radius: 2px;
        }
      }
    }
    .single-device {
      position: absolute;
      border: 1px solid transparent;
      padding: 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: space-between;
      cursor: default;
      &:active {
        border: 1px solid #1890ff;
      }
      .device-status {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: space-between;
        .status-image {
          background-size: 100% 100%;
          background-repeat: no-repeat;
          width: 45px;
          margin-right: 10px;
        }
        .device-image {
          background-size: 100% 100%;
          background-repeat: no-repeat;
          width: 100%;
          height: 100%;
        }
      }
    }
  }
}
</style>
src/views/dashboard/Analysis.vue
@@ -4,24 +4,27 @@
    <!--<index-bdc v-if="indexStyle==2"></index-bdc>-->
    <!--<index-task v-if="indexStyle==3"></index-task>-->
    <!--<div style="width: 100%;text-align: right;margin-top: 20px">-->
      <!--请选择首页样式:-->
      <!--&lt;!&ndash;<a-radio-group v-model="indexStyle">&ndash;&gt;-->
        <!--&lt;!&ndash;<a-radio :value="1">统计图表</a-radio>&ndash;&gt;-->
        <!--&lt;!&ndash;<a-radio :value="2">统计图表2</a-radio>&ndash;&gt;-->
        <!--&lt;!&ndash;<a-radio :value="3">任务表格</a-radio>&ndash;&gt;-->
      <!--&lt;!&ndash;</a-radio-group>&ndash;&gt;-->
    <!--请选择首页样式:-->
    <!--&lt;!&ndash;<a-radio-group v-model="indexStyle">&ndash;&gt;-->
    <!--&lt;!&ndash;<a-radio :value="1">统计图表</a-radio>&ndash;&gt;-->
    <!--&lt;!&ndash;<a-radio :value="2">统计图表2</a-radio>&ndash;&gt;-->
    <!--&lt;!&ndash;<a-radio :value="3">任务表格</a-radio>&ndash;&gt;-->
    <!--&lt;!&ndash;</a-radio-group>&ndash;&gt;-->
    <!--</div>-->
    <a-button type="primary" @click="navigateToTestWorkshop">跳转至测试车间</a-button>
    <a-button type="primary" size="large" v-for="item in workshopList" :key="item.workshopId"
              @click="navigateToWorkshopSignage(item.id)">{{item.workshopName}}
    </a-button>
  </div>
</template>
<script>
  import IndexChart from './IndexChart'
  import IndexTask from "./IndexTask"
  import IndexTask from './IndexTask'
  import IndexBdc from './IndexBdc'
  import api from '@/api/mdc'
  export default {
    name: "Analysis",
    name: 'Analysis',
    components: {
      IndexChart,
      IndexTask,
@@ -29,16 +32,49 @@
    },
    data() {
      return {
        indexStyle:1
        indexStyle: 1,
        workshopList: [
          {
            workshopName: '长沙车间',
            id: '5321'
          },
          {
            workshopName: '天津车间',
            id: '6312'
          },
          {
            workshopName: '武汉车间',
            id: '3463'
          },
          {
            workshopName: '北京车间',
            id: '8421'
          }
        ]
      }
    },
    created() {
      this.getWorkshopListByApi()
    },
    methods: {
      navigateToTestWorkshop(){
        const url=this.$router.resolve('/testWorkshop').href
        window.open(url,'_blank')
      /**
       * é€šè¿‡è½¦é—´Id跳转至相应车间大屏看板
       * @param id è½¦é—´Id
       */
      navigateToWorkshopSignage(id) {
        const url = this.$router.resolve(`/workshopSignage/${id}`).href
        window.open(url, '_blank')
      },
      /**
       * èŽ·å–è½¦é—´åˆ—è¡¨
       */
      getWorkshopListByApi() {
        api.getWorkshopListInHomePageApi().then(res => {
          console.log('res', res)
          if (res.result && res.result.length > 0) {
            this.workshopList = res.result
          }
        })
      }
    }
  }
src/views/mdc/base/modules/HolidayManagement/HolidayManagementList.vue
@@ -1,5 +1,5 @@
<template>
  <a-card :bordered="false" class="device_list">
  <div :bordered="false" class="device_list">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
@@ -79,7 +79,7 @@
    <holiday-management-modal ref="modalForm" @ok="modalFormOk"></holiday-management-modal>
    <holiday-management-modal-edit  ref="modalFormedit" @ok="modalFormOk"></holiday-management-modal-edit>
  </a-card>
  </div>
</template>
<script>
src/views/mdc/base/modules/OvertimeManagement/OvertimeManagementList.vue
@@ -1,5 +1,5 @@
<template>
  <a-card :bordered="false" class="device_list">
  <div :bordered="false" class="device_list">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
@@ -83,8 +83,7 @@
    <!--<device-repair-model-add  ref="modalFormadd" @ok="modalFormOk"></device-repair-model-add>-->
    <!--<device-repair-model-edit ref="modalFormedit" @ok="modalFormOk"></device-repair-model-edit>-->
    <!--<repair-model ref="repairModelFrom" @ok="modalFormOk"></repair-model>-->
  </a-card>
  </div>
</template>
<script>
src/views/mdc/base/modules/StatisticalAnalysis/StatisticalAnalysisMain.vue
@@ -384,7 +384,6 @@
            name: '运行效率',
            type: 'pie',
            radius: '70%',
            center: ['55%', '55%'],
            itemStyle: {
              normal: {
                color: function (params) {
src/views/mdc/base/modules/TorqueconfigurationList/TorqueconfigurationList.vue
@@ -1,5 +1,5 @@
<template>
  <a-card :bordered="false" class="device_list">
  <div :bordered="false" class="device_list">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
@@ -83,7 +83,7 @@
    <!--<device-repair-model-edit ref="modalFormedit" @ok="modalFormOk"></device-repair-model-edit>-->
    <!--<repair-model ref="repairModelFrom" @ok="modalFormOk"></repair-model>-->
  </a-card>
  </div>
</template>
<script>
src/views/mdc/base/modules/UnplannedDowntimemManager/UnplannedDowntimemManagerList.vue
@@ -1,5 +1,5 @@
<template>
  <a-card :bordered="false" class="device_list">
  <div :bordered="false" class="device_list">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
@@ -81,7 +81,7 @@
    <plan-downtime-maintenance-modal ref="modalForm" @ok="modalFormOk"></plan-downtime-maintenance-modal>
    <plan-downtime-maintenance-modal-edit  ref="modalFormedit" @ok="modalFormOk"></plan-downtime-maintenance-modal-edit>
  </a-card>
  </div>
</template>
<script>
@@ -572,7 +572,7 @@
                  //重新计算分页问题
                  that.reCalculatePage(that.selectedRowKeys.length)
                  // that.$message.success(res.message);
                  that.$notification.warning({
                  that.$notification.success({
                    message:'消息',
                    description:res.message
                  });
src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue
@@ -1,13 +1,14 @@
<template>
  <div class="efficiency_list" style="width: 100%;height: 100%;">
    <a-card :bordered="false">
    <div :bordered="false" style="height: 100%">
      <!-- æŸ¥è¯¢åŒºåŸŸ -->
      <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-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">
@@ -20,26 +21,34 @@
        <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;">
              <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>
                  <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>-->
                  <!--<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>
                  <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>-->
                  <!--<td :style="{background:tableHead.color }">{{tableHead.utilizationRate | numFilter}}</td>-->
                  <!--</template>-->
                </tr>
                </tbody>
@@ -52,7 +61,7 @@
          <div id="MdcEquipmentWarningLine" style="height: 100%;width: 65%;"></div>
        </div>
      </div>
    </a-card>
    </div>
  </div>
</template>
@@ -65,6 +74,7 @@
  import {
    JeecgListMixin
  } from '@/mixins/JeecgListMixin'
  export default {
    // mixins: [JeecgListMixin],
    name: 'alarmAnalysisMain',
@@ -74,7 +84,7 @@
        dataSource: [],
        /* table加载状态 */
        loading: false,
        typeTree: "",
        typeTree: '',
        typeParent: 1,
        typeEquipment: 1,
        TreeIDOne: 1,
@@ -102,9 +112,9 @@
          alarmTrend: '/mdc/alarmAnalyze/alarmTrend'
        },
        tableHeads: [],
        pieDate:[0],
        XData:[0],
        YData:[0],
        pieDate: [0],
        XData: [0],
        YData: [0]
      }
    },
    props: { nodeTree: '', Type: '', nodePeople: '' },
@@ -115,16 +125,16 @@
      this.dates = [moment().subtract('days', 8), moment().subtract('days', 1)]
      this.queryParam.startDate = moment(this.dates[0]).format('YYYYMMDD')
      this.queryParam.endDate = moment(this.dates[1]).format('YYYYMMDD')
      this.queryParam.typeTree = "1"
      this.queryParam.typeTree = '1'
      this.loadData1()
    },
    mounted(){
    mounted() {
      this.drawWrin()
    },
    watch: {
      Type(valmath) {
        this.dataList = [];
        this.dataList = []
        this.queryParam.typeTree = valmath
      },
      nodeTree(val) { //监听currSelected å˜åŒ–,将变化后的数值传递给 getCurrSelected äº‹ä»¶
@@ -163,14 +173,14 @@
      }
    },
    methods: {
      numBerTwo(value){
      numBerTwo(value) {
        if (value) {
          return parseFloat((value * 100).toFixed(2))
        } else {
          return '0'
        }
      },
      TableDraw(key,val) {
      TableDraw(key, val) {
        let that = this
        that.queryParam.alarmCode = val.alarmCode
        console.log(this.queryParam)
@@ -179,10 +189,13 @@
        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})
            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
              })
            }
            for (var j = 0;j<res.result.dateCountList.length;j++){
            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)
            }
@@ -202,7 +215,7 @@
      },
      disabledDate(current) {
        //Can not slect days before today and today
        return current && current > moment().subtract('days', 1);
        return current && current > moment().subtract('days', 1)
      },
      initDeviceType(deviceList) {
        let dictCode = 'mdc_equipmentType'
@@ -236,19 +249,19 @@
        this.queryParam.endDate = v2[1]
      },
      searchQuery() {
        if (this.dates&&this.dates.length>0){
          if (this.queryParam.typeTree == "1") {
        if (this.dates && this.dates.length > 0) {
          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.equipmentId = ''
          }
          this.loadData1()
        } else{
        } else {
          this.$notification.warning({
             message:'提示',
             description:'请选择时间'
            message: '提示',
            description: '请选择时间'
          })
        }
@@ -340,8 +353,8 @@
          }
        })
      },
      drawWrin(){
        let equipmentWarningPie = this.$echarts.init(document.getElementById('MdcEquipmentWarningPie'), 'macarons');
      drawWrin() {
        let equipmentWarningPie = this.$echarts.init(document.getElementById('MdcEquipmentWarningPie'), 'macarons')
        let equipmentWarningPieOption = {
          title: {
            text: '各设备出现此报警的比例',
@@ -350,13 +363,12 @@
          },
          tooltip: {
            trigger: 'item',
            formatter: "<br/>{b} : {c} ({d}%)"
            formatter: '<br/>{b} : {c} ({d}%)'
          },
          calculable: true,
          series: [{
            type: 'pie',
            radius: '60%',
            center: ['55%', '55%'],
            itemStyle: {
              normal: {
                /*color: function (params) {
@@ -370,27 +382,27 @@
                }
              }
            },
            data:this.pieDate
            data: this.pieDate
            // data:[{name:'jjjjjjj',value:'2'}]
          }]
        };
        equipmentWarningPie.setOption(equipmentWarningPieOption,true);
        let equipmentWarningLine = this.$echarts.init(document.getElementById('MdcEquipmentWarningLine'), 'macarons');
        }
        equipmentWarningPie.setOption(equipmentWarningPieOption, true)
        let equipmentWarningLine = this.$echarts.init(document.getElementById('MdcEquipmentWarningLine'), 'macarons')
        let equipmentWarningLineOption = {
          title : {
          title: {
            text: '每天出现此报警的数量走势',
            x: 'center',
            y: 'bottom'
          },
          tooltip:{
            trigger: 'item'
          tooltip: {
            trigger: 'axis'
          },
          calculable: true,
          xAxis: [
            {
              type: 'category',
              show: true,
              data:this.XData
              data: this.XData
              /*axisLabel :{
                  interval:0
              }*/
@@ -407,16 +419,16 @@
              name: '报警数量',
              type: 'line',
              data: this.YData,
              markPoint : {
                data : [
                  {type : 'max', name: '最大值'},
                  {type : 'min', name: '最小值'}
              markPoint: {
                data: [
                  { type: 'max', name: '最大值' },
                  { type: 'min', name: '最小值' }
                ]
              }
            }
          ]
        };
        equipmentWarningLine.setOption(equipmentWarningLineOption,true);
        }
        equipmentWarningLine.setOption(equipmentWarningLineOption, true)
      }
    }
  }
@@ -456,28 +468,31 @@
  .dataContent tr td {
    height: 35px;
  }
  .dataContent .mathData:hover td{
  .dataContent .mathData:hover td {
    background-color: #e6f7ff;
  }
  .dataContent .mathData td {
    padding: 10px;
    /*display: none;*/
  }
  .dataContent .mathData .td {
  .dataContent .mathData td {
    /*background-color: #ff9bd2;*/
    display: inline-block;
    padding: 10px;
    cursor: pointer;
  }
  .dataContent .mathData .tdd {
    /*display: none;*/
  }
  .table2{
  .table2 {
    width: 100%;
    height: 100%;
    overflow: auto;
  }
  /*tr th {*/
  /*height: 50px!important;*/
  /*}*/
@@ -485,126 +500,150 @@
  /*height: 50px!important;*/
  /*}*/
  .table2 thead tr th:first-child,
  .table tbody tr .tdgu{
  .table tbody tr .tdgu {
    position: sticky;
    left: 0;
    z-index: 1;
  }
  .table tbody tr .kaitou{
  .table tbody tr .kaitou {
    z-index: 1;
    background-color: white;
  }
  .table tbody tr .tdgu1{
  .table tbody tr .tdgu1 {
    position: sticky;
    left: 150px;
    z-index: 2;
  }
  .table tbody tr .tdgu2{
  .table tbody tr .tdgu2 {
    position: sticky;
    left: 300px;
    z-index: 2;
  }
  .table tbody tr .tdgu3{
  .table tbody tr .tdgu3 {
    position: sticky;
    left: 450px;
    z-index: 2;
  }
  .table tbody tr .tdgu4{
  .table tbody tr .tdgu4 {
    position: sticky;
    left: 550px;
    z-index: 2;
  }
  .table tbody tr .tdgu5{
  .table tbody tr .tdgu5 {
    position: sticky;
    left: 700px;
    z-index: 2;
  }
  .table2 thead tr .timeth,
  .table2 thead tr  .thgu {
  .table2 thead tr .thgu {
    position: sticky;
    top:0;
    top: 0;
    z-index: 3;
  }
  .table2 thead .gudingth th{
  .table2 thead .gudingth th {
    position: sticky;
    top: 32px;
    z-index: 6!important;
    z-index: 6 !important;
  }
  .table2 thead .equipname .name{
  .table2 thead .equipname .name {
    z-index: 3;
  }
  .table2 thead .equipname .dong1{
  .table2 thead .equipname .dong1 {
    z-index: 4;
    left: 0;
    /*border: 1px solid #000;*/
  }
  .table2 thead .equipname .dong2{
  .table2 thead .equipname .dong2 {
    z-index: 5;
    left: 150px;
  }
  .table2 thead .equipname .dong3{
  .table2 thead .equipname .dong3 {
    z-index: 5;
    left: 300px;
  }
  .table2 thead .equipname .dong4{
  .table2 thead .equipname .dong4 {
    z-index: 5;
    left: 450px;
  }
  .table2 thead .equipname .dong5{
  .table2 thead .equipname .dong5 {
    z-index: 5;
    left: 550px;
  }
  .table2 thead .equipname .dong6{
  .table2 thead .equipname .dong6 {
    z-index: 5;
    left: 700px;
  }
  @media screen and (min-width: 1920px){
    #Efficiency{
      height: 337px!important;
  @media screen and (min-width: 1920px) {
    #Efficiency {
      height: 337px !important;
      overflow: scroll;
    }
  }
  @media screen and (min-width: 1680px) and (max-width: 1920px){
    #Efficiency{
      height: 337px!important;
  @media screen and (min-width: 1680px) and (max-width: 1920px) {
    #Efficiency {
      height: 337px !important;
      overflow: scroll;
    }
  }
  @media screen and (min-width: 1400px) and (max-width: 1680px){
    #Efficiency{
      height: 190px!important;
  @media screen and (min-width: 1400px) and (max-width: 1680px) {
    #Efficiency {
      height: 190px !important;
      overflow: scroll;
    }
  }
  @media screen and (min-width: 1280px) and (max-width: 1400px){
    #Efficiency{
      height: 90px!important;
  @media screen and (min-width: 1280px) and (max-width: 1400px) {
    #Efficiency {
      height: 90px !important;
      overflow: scroll;
    }
  }
  @media screen and (max-width: 1280px){
    #Efficiency{
      height: 90px!important;
  @media screen and (max-width: 1280px) {
    #Efficiency {
      height: 90px !important;
      overflow: scroll;
    }
  }
  #Efficiency .table_guding1{
  #Efficiency .table_guding1 {
    position: absolute;
    overflow: hidden;
    width: 500px;
  }
  #Efficiency .table_guding2{
  #Efficiency .table_guding2 {
    overflow-x: scroll;
    width: 500px;
  }
  /deep/ .ant-card{
    height: 100%!important;
  /deep/ .ant-card {
    height: 100% !important;
  }
  /deep/ .ant-card .ant-card-body{
    height: 100%!important;
  /deep/ .ant-card .ant-card-body {
    height: 100% !important;
  }
  .efficiency_list #DeviceList{
    height: 90%!important;
  .efficiency_list #DeviceList {
    height: 90% !important;
  }
</style>
src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue
@@ -1,5 +1,5 @@
<template>
  <a-card :bordered="false" class="device_list">
  <div :bordered="false" class="device_list">
    <div class="com_box">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper">
@@ -53,7 +53,7 @@
    </div>
    <!-- table区域-end -->
    </div>
  </a-card>
  </div>
</template>
<script>
src/views/mdc/base/modules/deviceCalendar/DeviceCalendarList.vue
@@ -1,6 +1,6 @@
<template>
  <div class="deviceCalendar_list">
    <a-card :bordered="false">
    <div :bordered="false">
      <!-- æŸ¥è¯¢åŒºåŸŸ -->
      <div>
@@ -47,7 +47,7 @@
        </a-table>
      </div>
      <device-calendar-model ref="modalForm" @ok="modalFormOk"></device-calendar-model>
    </a-card>
    </div>
  </div>
</template>
src/views/mdc/base/modules/deviceLog/LogInfo.vue
@@ -16,7 +16,8 @@
          </a-col>
          <a-col :md="6" :sm="6">
            <a-form-item label="日期">
              <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" @change="dataChange" format='YYYY-MM-DD'/>
              <a-date-picker v-model="queryParams.collectTime" :disabledDate="disabledDate" @change="dataChange"
                             format='YYYY-MM-DD'/>
            </a-form-item>
          </a-col>
          <a-col :md="3" :sm="3">
@@ -60,9 +61,9 @@
                            <span v-if="item.status == 23"
                                  :style='{display: "inline-block",width:item.dateProportion,  height: "100%", background: "#19FE01",position:"absolute",bottom:"0"}'></span>
                          </div>
                          <div  v-if="item.status == 22" style="z-index: 999;"
                                :style='{display: "inline-block",left:item.left,width:item.dateProportion,  height: "100%",position:"absolute"}'
                                v-for="item in waring">
                          <div v-if="item.status == 22" style="z-index: 999;"
                               :style='{display: "inline-block",left:item.left,width:item.dateProportion,  height: "100%",position:"absolute"}'
                               v-for="item in waring">
                            <span
                              :style='{display: "inline-block",width:"100%", left:0, height: "68%", background: "#FD0008",position:"absolute",bottom:"0"}'></span>
                          </div>
@@ -150,7 +151,8 @@
        </a-tabs>
      </div>
    </div>
    <work-chart-model ref="workChartModel"></work-chart-model>
    <work-chart-model ref="workChartModel" :collectTime="this.queryParams.collectTime"
                      :equipment="this.equipment"></work-chart-model>
    <work-history-model ref="workHistoryModel"></work-history-model>
  </div>
</template>
@@ -176,17 +178,17 @@
    props: { equement: {} },
    data() {
      return {
        readOnly:true,
        readOnly: true,
        defaultId: '',
        defaultName: '',
        middleTime: '',
        queryParam:{},
        queryParam: {},
        queryParams: {
          collectTime:undefined,
          collectTime: undefined
        },
        loadingstayus:false,
        loadingrunStatus:false,
        loadingwarnStatus:false,
        loadingstayus: false,
        loadingrunStatus: false,
        loadingwarnStatus: false,
        normal: [],
        waring: [],
        normalList: [],
@@ -200,7 +202,7 @@
          getEquipmentByPid: '/mdc/mdcEquipment/getEquipmentByPid',
          list: '/mdc/mdcEquipmentRunningSection/logList'
        },
        ProStartId:''
        ProStartId: ''
      }
    },
    methods: {
@@ -223,27 +225,27 @@
      tabChange(val) {
        this.activeKey = val
      },
      disabledDate(current){
      disabledDate(current) {
        //Can not slect days before today and today
        return current && current > moment().subtract('days', 0);
        return current && current > moment().subtract('days', 0)
      },
      queryChart() {
        // this.normal = []
        // this.waring = []
        this.loadingstayus = true;
        this.loadingrunStatus = true;
        this.loadingstayus = true
        this.loadingrunStatus = true
        this.loadingwarnStatus = true
        getAction(this.url.list, this.queryParams).then((res) => {
          this.normalList = []
          this.waringList = []
          this.runList = []
          this.loadingstayus = false;
          this.loadingrunStatus = false;
          this.loadingstayus = false
          this.loadingrunStatus = false
          this.loadingwarnStatus = false
          this.normal = []
          this.waring = []
          if (res.success) {
            if(res.result != null){
            if (res.result != null) {
              for (let i = 0; i < res.result.length; i++) {
                this.normalList.push(res.result[i])
                if ('22' == res.result[i].status) {
@@ -253,11 +255,11 @@
                  res.result[i].left = leftTmp / 86400 * 100 + '%'
                  this.waring.push(res.result[i])
                }else if('3' == res.result[i].status){
                } else if ('3' == res.result[i].status) {
                  this.runList.push(res.result[i])
                  res.result[i].dateProportion = res.result[i].duration / 86400 * 100 + '%'
                  this.normal.push(res.result[i])
                }else{
                } else {
                  res.result[i].dateProportion = res.result[i].duration / 86400 * 100 + '%'
                  this.normal.push(res.result[i])
                  // console.log(this.normal)
@@ -324,23 +326,23 @@
      },
      searchQuery() {
        // console.log(this.queryParams.collectTime)
        if(this.queryParams.collectTime != undefined){
        if (this.queryParams.collectTime != undefined) {
          this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD')
          if(!this.queryParams.equipmentId||!this.queryParams.equipmentName){
          if (!this.queryParams.equipmentId || !this.queryParams.equipmentName) {
            this.$notification.warning({
              message:'消息',
              description:"请选择设备"
            });
              message: '消息',
              description: '请选择设备'
            })
            return false
          }
          this.queryChart()
        }else{
        } else {
          // this.$message.warning("请选择时间")
          console.log('触发提示')
          this.$notification.warning({
            message:'消息',
            description:"请选择时间"
          });
            message: '消息',
            description: '请选择时间'
          })
        }
        // this.queryList()
      },
@@ -354,28 +356,29 @@
        // this.onClearSelected()
      },
      openWorkChart() {
        if(!this.equipment.equipmentId){
        if (!this.equipment.equipmentId) {
          // this.$message.warning("请选择设备进行查询")
          this.$notification.warning({
            message:'消息',
            description:"请选择设备进行查询"
          });
        }else{
            message: '消息',
            description: '请选择设备进行查询'
          })
        } else {
          // åˆ¤æ–­æ˜¯å¦ç‚¹å‡»è®¾å¤‡æ—¥å¿—表格行的数据,此时为点击表格数据为false
          this.$refs.workChartModel.isClicklogListRow = false
          this.$refs.workChartModel.add(this.equipment)
          this.$refs.workChartModel.title = '工作曲线'
        }
      },
      openHistoryChart() {
        // console.log(this.equipment);
        if(!this.equipment.equipmentId){
        if (!this.equipment.equipmentId) {
          // this.$message.warning("请选择设备进行查询")
          this.$notification.warning({
            message:'消息',
            description:"请选择设备进行查询"
          });
            message: '消息',
            description: '请选择设备进行查询'
          })
          // console.log(1111)
        } else{
        } else {
          this.$refs.workHistoryModel.add(this.equipment)
          this.$refs.workHistoryModel.title = '历史日志'
        }
@@ -386,13 +389,13 @@
        this.searchQuery()
      },
      dataAfter() {
        if((this.queryParams.collectTime).format('YYYY-MM-DD') ==  moment().format('YYYY-MM-DD')){
        if ((this.queryParams.collectTime).format('YYYY-MM-DD') == moment().format('YYYY-MM-DD')) {
          // this.$message.warning("请选择今天以及今天之前的日期!!")
          this.$notification.warning({
            message:'消息',
            description:'请选择今天以及今天之前的日期!!'
          });
        }else{
            message: '消息',
            description: '请选择今天以及今天之前的日期!!'
          })
        } else {
          this.queryParams.collectTime = moment(this.queryParams.collectTime.add(1, 'd'), 'YYYY-MM-DD')
          this.searchQuery()
        }
@@ -413,16 +416,16 @@
              this.equipment = {}
              // _this.$message.warning('请联系管理员,开放设备权限!')
              _this.$notification.warning({
                message:'消息',
                description:'请联系管理员,开放设备权限!'
              });
                message: '消息',
                description: '请联系管理员,开放设备权限!'
              })
            }
          }else{
          } else {
            // this.$message.warning(res.message)
            _this.$notification.warning({
              message:'消息',
              description:res.message
            });
              message: '消息',
              description: res.message
            })
          }
        })
@@ -431,13 +434,12 @@
    created() {
      this.queryParams.collectTime = moment()
      this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD')
      this.initEquipment();
      this.initEquipment()
      // this.queryTreeData();
    },
    watch: {
      equement(val) {
        console.log('通过watch触发')
        if (val && val.equipmentId) {
          this.$set(this.queryParams, 'equipmentName', val.equipmentName)
          this.$set(this.queryParams, 'equipmentId', val.equipmentId)
@@ -492,7 +494,8 @@
  #mdcLogShow > div {
    flex: 1;
  }
  /*.mdcLogShowOne{*/
    /*position: absolute;*/
  /*position: absolute;*/
  /*}*/
</style>
src/views/mdc/base/modules/deviceLog/LogList.vue
@@ -3,7 +3,7 @@
    <!-- table区域-begin -->
    <div class="table_logList">
      <a-table ref="table" bordered size="middle" :rowKey="(record,index)=>{return index}" :columns="columns"
               :dataSource="dataList" :pagination="ipagination" :loading="loadingequip"  @change="handleTableChange">
               :dataSource="dataList" :pagination="ipagination" :loading="loadingequip"  @change="handleTableChange" :customRow="rowClick">
        <template slot="status" slot-scope="status">
          <div v-if="status == '3' || status ==  '23'" style="color: #00ee00;width: 100%; height: 100%;">运行</div>
          <div v-else-if="status == '1' || status == '2'" style="color: #ffea91;width: 100%; height: 100%;">待机</div>
@@ -28,6 +28,7 @@
  import {
    JeecgListMixin
  } from '@/mixins/JeecgListMixin'
  import moment from 'moment'
  export default {
    name: 'LogList',
    mixins: [JeecgListMixin],
@@ -154,6 +155,24 @@
        this.ipagination = pagination;
        // this.loadData();
      },
      /**
       * ç»™è®¾å¤‡æ—¥å¿—表格中的行添加点击事件
       * @param record ç‚¹å‡»çš„当前行数据
       * @returns {{on: {click: on.click}}} æ·»åŠ äº‹ä»¶å¯¹è±¡
       */
      rowClick(record){
        return {
          on:{
            click:()=>{
              const timeObj={
                start:moment(record.startTime),
                end:moment(record.endTime)
              }
              this.$bus.$emit('tableRowRecord',timeObj)
            }
          }
        }
      }
    },
    created() {
    }
src/views/mdc/base/modules/deviceLog/WorkChartModel.vue
@@ -1,6 +1,7 @@
<template>
  <div ref="workChart">
    <a-modal :title="title" :getContainer="() => this.$refs.workChart"  width="80%" wrap-class-name="full-modal" :footer="null" :visible="visible"
    <a-modal :title="title" :getContainer="() => this.$refs.workChart" width="80%" wrap-class-name="full-modal"
             :footer="null" :visible="visible"
             @cancel="handleCancel" cancelText="关闭">
      <div>
        <div>
@@ -12,7 +13,7 @@
            </a-col>
            <a-col :span="6">
              <a-form-item label="日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
                <a-date-picker v-model="queryParams.paramDate"  :disabledDate="disabledDate" format='YYYY-MM-DD'/>
                <a-date-picker v-model="queryParams.paramDate" :disabledDate="disabledDate" format='YYYY-MM-DD'/>
              </a-form-item>
            </a-col>
            <a-col :span="6">
@@ -69,166 +70,206 @@
</template>
<script>
import moment from 'moment'
import * as echarts from 'echarts'
import {
  getAction,
  postAction
} from '@/api/manage'
import {
  duplicateCheck
} from '@/api/api'
  import moment from 'moment'
  import * as echarts from 'echarts'
  import {
    getAction,
    postAction
  } from '@/api/manage'
  import {
    duplicateCheck
  } from '@/api/api'
export default {
  name: 'WorkChartModel',
  components: {},
  props: {},
  data() {
    return {
      spinning:false,
      labelCol: {
        xs: {
          span: 24
        },
        sm: {
          span: 6
        }
  export default {
    name: 'WorkChartModel',
    components: {},
    props: {
      collectTime: {
        type: Object
      },
      wrapperCol: {
        xs: {
          span: 24
      equipment: {
        type: Object
      }
    },
    watch: {
      // ç›‘控父组件点击左右箭头切换的时间值将其赋给点击工作曲线后的时间选择器的值
      collectTime: {
        handler(newVal) {
          this.currentToggledTime = newVal
        }
      }
    },
    data() {
      return {
        spinning: false,
        labelCol: {
          xs: {
            span: 24
          },
          sm: {
            span: 6
          }
        },
        sm: {
          span: 18
        }
        wrapperCol: {
          xs: {
            span: 24
          },
          sm: {
            span: 18
          }
        },
        readOnly: true,
        title: '',
        plainOptions: [],
        option: [],
        workChart: '',
        node: {},
        stratOpen: false,
        endOpen: false,
        visible: false,
        show: false,
        queryParams: {},
        panduanResult: [],
        url: {
          initPlainOptions: '/mdc/mdcDriveTypeParamConfig/findWorkCurveParamList',
          workChart: '/mdc/mdcEquipmentRunningSection/workChart'
        },
        currentToggledTime: '',
        isClicklogListRow: false
      }
    },
    created() {
      this.$bus.$on('tableRowRecord', this.getLogListRowRecord)
    },
    mounted() {
    },
    methods: {
      disabledDate(current) {
        //Can not slect days before today and today
        return current && current > moment().endOf('day')
      },
      readOnly:true,
      title: '',
      plainOptions: [],
      option: [],
      workChart: '',
      node: {},
      stratOpen: false,
      endOpen: false,
      visible: false,
      show: false,
      queryParams: {},
      panduanResult:[],
      url: {
        initPlainOptions: '/mdc/mdcDriveTypeParamConfig/findWorkCurveParamList',
        workChart: '/mdc/mdcEquipmentRunningSection/workChart'
      }
    }
  },
  mounted() {
  },
  methods: {
    disabledDate(current){
      //Can not slect days before today and today
      return current && current > moment().endOf("day");
    },
    initPlainOptions(param) {
      let that = this
      let equipment = param.equipmentId
      getAction(this.url.initPlainOptions,{equipmentId:equipment}).then((res) => {
        if (res.success) {
          let temp = []
          // debugger
          for (var item of res.result) {
            temp.push({ label: item.chineseName, value: item.id, englishName: item.englishName })
      initPlainOptions(param) {
        let that = this
        let equipment = param.equipmentId
        getAction(this.url.initPlainOptions, { equipmentId: equipment }).then((res) => {
          if (res.success) {
            let temp = []
            // debugger
            for (var item of res.result) {
              temp.push({ label: item.chineseName, value: item.id, englishName: item.englishName })
            }
            that.plainOptions = temp
            if (temp.length > 0) {
              that.option = [temp[0].value]
              let param = {
                driveType: that.node.driveType,
                equipmentId: that.node.equipmentId,
                date: that.queryParams.paramDateStr,
                start: that.queryParams.startStr,
                end: that.queryParams.endStr,
                interval: that.queryParams.period,
                codeTypeId: that.option.join(',')
              }
              that.initChart(param)
            }
          }
          that.plainOptions = temp
          if(temp.length>0){
            that.option = [temp[0].value]
          }
        }
      })
    },
    searchQuery() {
      this.queryParams.paramDateStr = this.queryParams.paramDate.format('yyyy-MM-DD')
      this.queryParams.startStr = this.queryParams.start.format('HH:mm')
      this.queryParams.endStr = this.queryParams.end.format('HH:mm')
      let param = {
        driveType: this.node.driveType, equipmentId: this.node.equipmentId,
        date: this.queryParams.paramDateStr, start: this.queryParams.startStr,
        end: this.queryParams.endStr, interval: this.queryParams.period,
        codeTypeId: this.option.join(',')
      }
      this.initChart(param);
      this.spinning = true;
    },
    timeHandleChange(val) {
      if (val == 'start') {
        this.stratOpen = true
      } else {
        this.endOpen = true
      }
    },
    timeHandleClose(val) {
      if (val == 'start') {
        this.stratOpen = false
        this.endOpen = true
      } else {
        this.endOpen = false
      }
    },
    add(node) {
      let _this = this
      this.visible = true
      this.node = node
      let paramDate = moment()
      let start = moment('0:0', 'HH:mm')
      let end = moment(moment().format('HH:mm'), 'HH:mm')
      this.queryParams = {
        equipmentId: node.equipmentId,
        equipmentName: node.equipmentName,
        period: 1000,
        paramDate: paramDate,
        paramDateStr: paramDate.format('yyyy-MM-DD'),
        start: start,
        startStr: start.format('HH:mm'),
        end: end,
        endStr: end.format('HH:mm')
      }
      this.$nextTick(() => {
        _this.initPlainOptions(node)
        })
      },
      searchQuery() {
        this.queryParams.paramDateStr = this.queryParams.paramDate.format('yyyy-MM-DD')
        this.queryParams.startStr = this.queryParams.start.format('HH:mm')
        this.queryParams.endStr = this.queryParams.end.format('HH:mm')
        let param = {
          driveType: node.driveType, equipmentId: node.equipmentId,
          date: _this.queryParams.paramDateStr, start: _this.queryParams.startStr,
          end: _this.queryParams.endStr, interval: _this.queryParams.period,
          codeTypeId: _this.option.join(',')
          driveType: this.node.driveType, equipmentId: this.node.equipmentId,
          date: this.queryParams.paramDateStr, start: this.queryParams.startStr,
          end: this.queryParams.endStr, interval: this.queryParams.period,
          codeTypeId: this.option.join(',')
        }
        _this.initChart(param)
      })
    },
    handleCancel() {
      this.visible = false;
      this.stratOpen = false;
      this.endOpen = false;
    },
    checkboxOnChange(e) {
      if (e.length <= 3) {
        this.option = e
      } else {
        // this.$message.warn('最多只能选择3个')
        this.$notification.warning({
          message:'消息',
          description:'最多只能选择三个'
        });
        return false
      }
    },
    close() {
      this.visible = false
      this.show = false
    },
    getYAxisOffset(index) {
      return index * 50 + 10;
    },
    initChart(param) {
      if (!this.workChart) {
        this.workChart = echarts.init(document.getElementById('workChart'))
      }
        this.initChart(param)
        this.spinning = true
      },
      timeHandleChange(val) {
        if (val == 'start') {
          this.stratOpen = true
        } else {
          this.endOpen = true
        }
      },
      timeHandleClose(val) {
        if (val == 'start') {
          this.stratOpen = false
          this.endOpen = true
        } else {
          this.endOpen = false
        }
      },
      add(node) {
        let _this = this
        this.visible = true
        this.node = node
        this.spinning = true
        let paramDate
        let start
        let end
        // å½“没有切换过时间currentToggledTime的值为空值,如果由于点击左右箭头切换过时间,则currentToggledTime为切换后的时间
        if (!this.currentToggledTime) {
          paramDate = moment()
        } else {
          paramDate = this.currentToggledTime
        }
        // åˆ¤æ–­æ˜¯å¦ç‚¹å‡»è®¾å¤‡æ—¥å¿—表格行的数据,若点击表格数据则显示表格数据中的时间,若点击工作曲线图片则显示0点至当前时间数据
        if (this.isClicklogListRow) {
          start = node.start
          end = node.end
        } else {
          start = moment('0:0', 'HH:mm')
          end = moment(moment().format('HH:mm'), 'HH:mm')
        }
        this.queryParams = {
          equipmentId: node.equipmentId,
          equipmentName: node.equipmentName,
          period: 1000,
          paramDate: paramDate,
          paramDateStr: paramDate.format('yyyy-MM-DD'),
          start: start,
          startStr: start.format('HH:mm'),
          end: end,
          endStr: end.format('HH:mm')
        }
        this.$nextTick(() => {
          _this.initPlainOptions(node)
        })
      },
      handleCancel() {
        this.visible = false
        this.stratOpen = false
        this.endOpen = false
      },
      checkboxOnChange(e) {
        if (e.length <= 3) {
          this.option = e
        } else {
          // this.$message.warn('最多只能选择3个')
          this.$notification.warning({
            message: '消息',
            description: '最多只能选择三个'
          })
          return false
        }
      },
      close() {
        this.visible = false
        this.show = false
      },
      getYAxisOffset(index) {
        return index * 50 + 10
      },
      initChart(param) {
        if (!this.workChart) {
          this.workChart = echarts.init(document.getElementById('workChart'))
        }
        let option = {
          tooltip: {
            trigger: 'axis',
@@ -237,7 +278,7 @@
            }
          },
          legend: {
            data:[],
            data: []
          },
          title: {
            left: 'center',
@@ -252,12 +293,12 @@
              saveAsImage: {}
            }
          },
          grid:{
            left:'8%',
            top:'10%',
            right:'2%',
            bottom:'14%',
            containLabel:true
          grid: {
            left: '8%',
            top: '10%',
            right: '2%',
            bottom: '14%',
            containLabel: true
          },
          xAxis: {
            type: 'time',
@@ -265,44 +306,44 @@
          },
          yAxis: [
            {
              yAxisIndex:0,
            type: 'value',
              offset:0,
            position:'left',
            boundaryGap: [0, '15%'],
              axisLine:{
                show:true,
                // lineStyle:{
                //   color:'#000000'
                // }
              }
          },
            {
              yAxisIndex:1,
              yAxisIndex: 0,
              type: 'value',
              offset:60,
              position:'left',
              offset: 0,
              position: 'left',
              boundaryGap: [0, '15%'],
              axisLine:{
                show:true,
              axisLine: {
                show: true
                // lineStyle:{
                //   color:'#000000'
                // }
              }
            },
            {
              yAxisIndex:2,
              yAxisIndex: 1,
              type: 'value',
              offset:120,
              position:'left',
              offset: 60,
              position: 'left',
              boundaryGap: [0, '15%'],
              axisLine:{
                show:true,
              axisLine: {
                show: true
                // lineStyle:{
                //   color:'#000000'
                // }
              }
            },
            {
              yAxisIndex: 2,
              type: 'value',
              offset: 120,
              position: 'left',
              boundaryGap: [0, '15%'],
              axisLine: {
                show: true
                // lineStyle:{
                //   color:'#000000'
                // }
              }
            }
          ],
          dataZoom: [
            {
@@ -315,211 +356,236 @@
              end: 20
            }
          ],
          series:[
          series: [
            {
              showSymbol:true,
              symbolSize:20,
              label:'show',
              name:'',
              type:'line',
              data:[],
              smooth:true,
              symbol:'none',
              showSymbol: true,
              symbolSize: 20,
              label: 'show',
              name: '',
              type: 'line',
              data: [],
              smooth: true,
              symbol: 'none'
            }
          ]
        }
      let _this = this
      let temp = []
      for (let i = 0; i < this.plainOptions.length; i++) {
        let item = this.plainOptions[i]
        if (this.option.indexOf(item.value) > -1) {
          temp.push(item)
        }
      }
      getAction(this.url.workChart, param).then((res) => {
        if(JSON.stringify(res.result) == '[]' || res.result == null){
          // this.$message.warning('无数据!')
          this.$notification.warning({
            message:'消息',
            description:'无数据!'
          });
          this.spinning = false;
          _this.workChart.setOption(option,true)
        }else{
          this.spinning = false;
          // debugger
          let result = []
          let itemLine = []
          //y轴数组
          var Yarr = []
          var lengenddata = [];
          for (let i = 0; i < temp.length; i++) {
            let item = temp[i]
            itemLine = []
            for (let m = 0; m < res.result.length; m++) {
              let d = []
              d.push(res.result[m].collectTime)
              // debugger
              d.push(res.result[m][item.englishName])
              itemLine.push(d)
            }
            var lll = {
              name:item.label
            }
            lengenddata.push(lll)
            var Yline ={
              name:item.label,
              type:'value',
              yAxisIndex:i,
              boundaryGap: [0,'100%']
            }
            Yarr.push(Yline);
            var line ={
              name:item.label,
              type:'line',
              // areaStyle:{},
              smooth:true,
              symbol:'circle',
              symbolSize:10,
              yAxisIndex:i,
              data:itemLine
            }
            result.push(line);
        let _this = this
        let temp = []
        for (let i = 0; i < this.plainOptions.length; i++) {
          let item = this.plainOptions[i]
          if (this.option.indexOf(item.value) > -1) {
            temp.push(item)
          }
          // option.yAxis = Yarr;
          option.series = result;
          option.legend = lengenddata;
          // console.log(option);
          _this.workChart.setOption(option,true)
          window.addEventListener('resize', function() {
            _this.workChart.resize()
          })
        }
        getAction(this.url.workChart, param).then((res) => {
          if (JSON.stringify(res.result) == '[]' || res.result == null) {
            // this.$message.warning('无数据!')
            this.$notification.warning({
              message: '消息',
              description: '无数据!'
            })
            this.spinning = false
            _this.workChart.setOption(option, true)
          } else {
            this.spinning = false
            // debugger
            let result = []
            let itemLine = []
            //y轴数组
            var Yarr = []
            var lengenddata = []
            for (let i = 0; i < temp.length; i++) {
              let item = temp[i]
              itemLine = []
              for (let m = 0; m < res.result.length; m++) {
                let d = []
                d.push(res.result[m].collectTime)
                // debugger
                d.push(res.result[m][item.englishName])
                itemLine.push(d)
              }
              var lll = {
                name: item.label
              }
              lengenddata.push(lll)
              var Yline = {
                name: item.label,
                type: 'value',
                yAxisIndex: i,
                boundaryGap: [0, '100%']
              }
              Yarr.push(Yline)
              var line = {
                name: item.label,
                type: 'line',
                // areaStyle:{},
                smooth: true,
                symbol: 'circle',
                symbolSize: 10,
                yAxisIndex: i,
      })
                data: itemLine
              }
              result.push(line)
            }
            // option.yAxis = Yarr;
            option.series = result
            option.legend = lengenddata
            // console.log(option);
            _this.workChart.setOption(option, true)
            window.addEventListener('resize', function() {
              _this.workChart.resize()
            })
          }
        })
      },
      /**
       * èŽ·å–ç‚¹å‡»è®¾å¤‡æ—¥å¿—è¡¨æ ¼è¡ŒåŽä»Žå…„å¼Ÿç»„ä»¶ä¼ æ¥çš„æ—¶é—´å¯¹è±¡
       * @param timeObj å½“前行的开始时间与结束时间组成的对象
       */
      getLogListRowRecord(timeObj) {
        // åˆ¤æ–­æ˜¯å¦ç‚¹å‡»è®¾å¤‡æ—¥å¿—表格行的数据,此时为点击表格数据为true
        this.isClicklogListRow = true
        // åˆå¹¶çˆ¶ç»„件传来的当前设备信息对象与兄弟组件传来的当前行的时间对象
        const newQueryParams = Object.assign(this.equipment, timeObj)
        this.add(newQueryParams)
        this.title = '工作曲线'
      }
    }
  }
}
</script>
<style scoped lang="less">
.full-modal {
  .ant-modal {
    max-width: 100%;
    top: 0;
    padding-bottom: 0;
    margin: 0;
  .full-modal {
    .ant-modal {
      max-width: 100%;
      top: 0;
      padding-bottom: 0;
      margin: 0;
    }
    .ant-modal-content {
      display: flex;
      flex-direction: column;
      height: calc(100vh);
    }
    .ant-modal-body {
      flex: 1;
    }
  }
  .ant-modal-content {
  /deep/ .ant-modal {
    /*background-color: #000;*/
    /*color: #fff;*/
  }
  /deep/ .ant-modal-header {
    /*background-color: #000;*/
  }
  /deep/ .ant-modal-title {
    /*color: #fff;*/
  }
  /deep/ .ant-modal-close {
    color: #1191b0;
    font-size: 24px;
  }
  /deep/ .ant-modal-content {
    /*background: -moz-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.27) 100%);*/
    /*background: -webkit-gradient(linear, left left, right right, color-stop(0%, rgba(0, 0, 0, 0.66)), color-stop(100%, rgba(0, 0, 0, 0.4)));*/
    /*background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
    /*background: -o-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
    /*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: #000;*/
    /*color: #fff;*/
    position: relative;
  }
  /deep/ .ant-modal-header {
    /*border-bottom: none!important;*/
  }
  /deep/ .ant-checkbox-wrapper {
    /*color: #fff;*/
  }
  /deep/ .ant-form-item-label label {
    /*color: #fff;*/
  }
  /deep/ .ant-btn {
    /*position: absolute;*/
  }
  .checkboxgroup {
    position: absolute;
    right: 5%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
  }
  /deep/ .ant-checkbox-group {
    display: flex;
    flex-direction: column;
    height: calc(100vh);
  }
  .ant-modal-body {
    flex: 1;
  /deep/ .ant-checkbox-group .ant-checkbox-wrapper {
    padding: 10px;
  }
}
/deep/ .ant-modal{
  /*background-color: #000;*/
  /*color: #fff;*/
}
/deep/ .ant-modal-header{
  /*background-color: #000;*/
}
/deep/ .ant-modal-title{
  /*color: #fff;*/
}
/deep/ .ant-modal-close{
  color: #1191b0;
  font-size: 24px;
}
/deep/ .ant-modal-content{
  /*background: -moz-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.27) 100%);*/
  /*background: -webkit-gradient(linear, left left, right right, color-stop(0%, rgba(0, 0, 0, 0.66)), color-stop(100%, rgba(0, 0, 0, 0.4)));*/
  /*background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
  /*background: -o-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
  /*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: #000;*/
  /*color: #fff;*/
  position: relative;
}
/deep/ .ant-modal-header{
  /*border-bottom: none!important;*/
}
/deep/ .ant-checkbox-wrapper{
  /*color: #fff;*/
}
/deep/ .ant-form-item-label label{
  /*color: #fff;*/
}
/deep/ .ant-btn{
  /*position: absolute;*/
}
.checkboxgroup{
  position: absolute;
  right: 5%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
/deep/ .ant-checkbox-group{
  display: flex;
  flex-direction: column;
}
/deep/ .ant-checkbox-group .ant-checkbox-wrapper{
  padding: 10px;
}
  .con_btn {
    display: flex;
    align-items: center;
  }
.con_btn{
  display: flex;
  align-items: center;
}
.workChart_params{
  display: flex;
  /*align-items: center;*/
  flex-direction: column;
  float: left;
}
.workChart_params .params_one{
  display: flex;
  justify-content: space-between;
}
.workChart_params .params_two{
  display: flex;
  justify-content: space-between;
}
/deep/ .workChart_params .ant-form-item{
  display: flex;
}
/deep/ .workChart_params .ant-form-item .ant-form-item-control-wrapper{
  margin: 0 10px;
}
  .workChart_params {
    display: flex;
    /*align-items: center;*/
    flex-direction: column;
    float: left;
  }
  .workChart_params .params_one {
    display: flex;
    justify-content: space-between;
  }
  .workChart_params .params_two {
    display: flex;
    justify-content: space-between;
  }
  /deep/ .workChart_params .ant-form-item {
    display: flex;
  }
  /deep/ .workChart_params .ant-form-item .ant-form-item-control-wrapper {
    margin: 0 10px;
  }
.ant-btn {
  padding: 0 10px;
  margin-left: 3px;
}
  .ant-btn {
    padding: 0 10px;
    margin-left: 3px;
  }
.ant-form-item-control {
  line-height: 0px;
}
  .ant-form-item-control {
    line-height: 0px;
  }
/** ä¸»è¡¨å•行间距 */
.ant-form .ant-form-item {
  margin-bottom: 10px;
}
  /** ä¸»è¡¨å•行间距 */
  .ant-form .ant-form-item {
    margin-bottom: 10px;
  }
/** Tab页面行间距 */
.ant-tabs-content .ant-form-item {
  margin-bottom: 0px;
}
  /** Tab页面行间距 */
  .ant-tabs-content .ant-form-item {
    margin-bottom: 0px;
  }
</style>
src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue
@@ -1,5 +1,5 @@
<template>
  <a-card :bordered="false" class="device_list">
  <div :bordered="false" class="device_list">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
@@ -68,7 +68,7 @@
    <!--<device-repair-model-add  ref="modalFormadd" @ok="modalFormOk"></device-repair-model-add>-->
    <device-repair-model-edit ref="modalFormedit" @ok="modalFormOk"></device-repair-model-edit>
    <!--<repair-model ref="repairModelFrom" @ok="modalFormOk">0</repair-model>-->
  </a-card>
  </div>
</template>
<script>
src/views/mdc/base/modules/efficiencyPOReport/EfficiencyPOList.vue
@@ -1,6 +1,6 @@
<template>
  <div style="width: 100%;">
    <a-card :bordered="false">
    <div :bordered="false">
      <!-- æŸ¥è¯¢åŒºåŸŸ -->
      <div class="table-page-search-wrapper">
        <a-form layout="inline" @keyup.enter.native="searchQuery">
@@ -28,7 +28,7 @@
          </a-row>
        </a-form>
      </div>
      <div style="width: 530px;position: absolute;top: 20px; right:1.5%;">
      <div style="width: 530px;position: absolute;top: 0; right:1.5%;">
        <table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;">
          <tr>
            <td v-for="(item, index) in identifying">{{item.title}}</td>
@@ -101,7 +101,7 @@
          </table>
        </div>
      </div>
    </a-card>
    </div>
  </div>
</template>
src/views/mdc/base/modules/efficiencyReport/EfficiencyList.vue
@@ -1,6 +1,6 @@
<template>
  <div class="efficiency_list" style="width: 100%">
    <a-card :bordered="false">
    <div :bordered="false">
      <!-- æŸ¥è¯¢åŒºåŸŸ -->
      <div>
        <div class="table-page-search-wrapper">
@@ -29,7 +29,7 @@
            </a-row>
          </a-form>
        </div>
        <div style="width: 530px;position: absolute;top: 20px; right: 1.5%;">
        <div style="width: 530px;position: absolute;top: 0; right: 1.5%;">
          <table cellpadding="5" cellspacing="1" style="border: 1px solid darkgray;">
            <tr>
              <td v-for="(item, index) in identifying">{{item.title}}</td>
@@ -103,7 +103,7 @@
          </table>
        </div>
      </div>
    </a-card>
    </div>
  </div>
</template>
src/views/mdc/base/modules/efficiencyShiftReport/EfficiencyShiftList.vue
@@ -1,6 +1,6 @@
<template>
  <div style="width: 100%;">
    <a-card :bordered="false">
    <div :bordered="false">
      <!-- æŸ¥è¯¢åŒºåŸŸ -->
      <div class="seach-content">
        <div class="table-page-search-wrapper">
@@ -49,7 +49,7 @@
          </a-row>
        </a-form>
      </div>
        <div style="width: 530px;top: 20px; right: 0px;">
        <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>
@@ -143,7 +143,7 @@
          </table>
        </div>
      </div>
    </a-card>
    </div>
  </div>
</template>
src/views/mdc/base/modules/equipmentAvailCompare/equipmentAvailCompareMain.vue
@@ -1,6 +1,6 @@
<template>
  <a-spin :spinning="loading">
    <a-card :bordered="false" class="device_list">
    <div :bordered="false" class="device_list">
      <div class="com_box">
        <!-- æŸ¥è¯¢åŒºåŸŸ -->
        <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper">
@@ -46,7 +46,7 @@
        </div>
        <!-- table区域-end -->
      </div>
    </a-card>
    </div>
  </a-spin>
</template>
src/views/mdc/base/modules/equipmentDayAvail/equipmentDayAvailMain.vue
@@ -1,63 +1,67 @@
<template>
  <a-card :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="4" :sm="4">
              <a-form-item label="设备编号">
                <a-input placeholder="输入设备编号查询" :readOnly="readOnly" v-model="queryParams.equipmentId"></a-input>
              </a-form-item>
            </a-col>
            <a-col :md="4" :sm="4">
              <a-form-item label="设备名称">
                <a-input placeholder="输入设备名称查询" :readOnly="readOnly" v-model="queryParams.equipmentName"></a-input>
              </a-form-item>
            </a-col>
            <a-col :md="4" :sm="4" :xs="4">
              <a-form-item label="日期">
                <a-date-picker v-model="queryParam.dateTime" :disabledDate="disabledDate" format='YYYYMMDD' @change="dataChange"/>
              </a-form-item>
            </a-col>
            <a-col :md="4" :sm="4" :xs="4">
              <a-form-item label="间隔">
                <a-select default-value="2" style="width: 80px" v-model="queryParam.timeType">
                  <a-select-option :value="2">
                    2
                  </a-select-option>
                  <a-select-option :value="3">
                    3
                  </a-select-option>
                  <a-select-option :value="4">
                    4
                  </a-select-option>
                  <a-select-option :value="6">
                    6
                  </a-select-option>
                </a-select>小时
              </a-form-item>
            </a-col>
            <a-col :md="3" :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-spin :spinning="loading">
    <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="4" :sm="4">
                <a-form-item label="设备编号">
                  <a-input placeholder="输入设备编号查询" :readOnly="readOnly" v-model="queryParams.equipmentId"></a-input>
                </a-form-item>
              </a-col>
              <a-col :md="4" :sm="4">
                <a-form-item label="设备名称">
                  <a-input placeholder="输入设备名称查询" :readOnly="readOnly" v-model="queryParams.equipmentName"></a-input>
                </a-form-item>
              </a-col>
              <a-col :md="4" :sm="4" :xs="4">
                <a-form-item label="日期">
                  <a-date-picker v-model="queryParam.dateTime" :disabledDate="disabledDate" format='YYYYMMDD'
                                 @change="dataChange"/>
                </a-form-item>
              </a-col>
              <a-col :md="4" :sm="4" :xs="4">
                <a-form-item label="间隔">
                  <a-select default-value="2" style="width: 80px" v-model="queryParam.timeType">
                    <a-select-option :value="2">
                      2
                    </a-select-option>
                    <a-select-option :value="3">
                      3
                    </a-select-option>
                    <a-select-option :value="4">
                      4
                    </a-select-option>
                    <a-select-option :value="6">
                      6
                    </a-select-option>
                  </a-select>
                  å°æ—¶
                </a-form-item>
              </a-col>
              <a-col :md="3" :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>
      </div>
      <!-- table区域-begin -->
      <div id="DeviceList">
        <div style="padding: 5px;width: 100%;height: 100%">
          <div style="width: 100%;height: 100%" id="dayAvailBar"></div>
          <!--<div id="dayAvailLine"></div>-->
              <!--</a-col>-->
            </a-row>
          </a-form>
        </div>
        <!-- table区域-begin -->
        <div id="DeviceList">
          <div style="padding: 5px;width: 100%;height: 100%">
            <div style="width: 100%;height: 100%" id="dayAvailBar"></div>
            <!--<div id="dayAvailLine"></div>-->
          </div>
        </div>
        <!-- table区域-end -->
      </div>
      <!-- table区域-end -->
    </div>
  </a-card>
  </a-spin>
</template>
<script>
@@ -78,6 +82,7 @@
  import JEllipsis from '@/components/jeecg/JEllipsis'
  import Tooltip from 'ant-design-vue/es/tooltip'
  import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
  export default {
    name: 'equipmentDayAvailMain',
    // mixins: [JeecgListMixin],
@@ -91,38 +96,39 @@
      JDate,
      JEllipsis
    },
    props: {  nodeTree: '', Type:'',nodePeople: '' },
    props: { nodeTree: '', Type: '', nodePeople: '' },
    data() {
      return {
        activeKey: '1',
        typeTree:"",
        typeParent:1,
        typeEquipment:1,
        spaceTime:[],
        useingRates:[],
        typeTree: '',
        typeParent: 1,
        typeEquipment: 1,
        spaceTime: [],
        useingRates: [],
        dates: [],
        xianshi:"",
        readOnly:true,
        xianshi: '',
        readOnly: true,
        queryParam: {
          dateTime:undefined,
          timeType:'2'
          dateTime: undefined,
          timeType: '2'
        },
        queryParams:{},
        queryParamEquip:{},
        queryParamPeople:{},
        dataStartsoucre:[],
        queryParams: {},
        queryParamEquip: {},
        queryParamPeople: {},
        dataStartsoucre: [],
        url: {
          comparativeAnalysis:'/mdc/efficiencyReport/comparativeAnalysis',
          dayUtilizationRate:'/mdc/efficiencyReport/dayUtilizationRate',
          comparativeAnalysis: '/mdc/efficiencyReport/comparativeAnalysis',
          dayUtilizationRate: '/mdc/efficiencyReport/dayUtilizationRate',
          getEquipmentByPid: '/mdc/mdcEquipment/getEquipmentByPid',
          getEquipmentByDepPid:'/mdc/mdcEquipment/getEquipmentByDepPid'
          getEquipmentByDepPid: '/mdc/mdcEquipment/getEquipmentByDepPid'
        },
        AnalysisList:{}
        AnalysisList: {},
        loading: false
      }
    },
    watch:{
      Type(valmath){
        this.dataList = [];
    watch: {
      Type(valmath) {
        this.dataList = []
        this.queryParams.typeTree = valmath
        // console.log(this.queryParams.typeTree)
      },
@@ -130,7 +136,7 @@
        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
            this.searchQuery()
@@ -141,14 +147,13 @@
            this.initEquipment(val.key)
          }
        }
      },
      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
            this.searchQuery()
@@ -164,8 +169,8 @@
    },
    methods: {
      moment,
      drawTu(){
        let dayAvailBar = this.$echarts.init(document.getElementById('dayAvailBar'), 'macarons');
      drawTu() {
        let dayAvailBar = this.$echarts.init(document.getElementById('dayAvailBar'), 'macarons')
        //dayAvailLine = echarts.init(document.getElementById('dayAvailLine'));
        let dayAvailBarOption = {
          title: {
@@ -174,21 +179,21 @@
            textStyle: {
              fontSize: 18,
              fontWeight: 'bolder',
              color: "#151414"
              color: '#151414'
            }
          },
          tooltip: {
            trigger: 'axis',
            formatter: "{a} <br/>{b} :({c}%)"
            formatter: '{a} <br/>{b} :({c}%)'
          },
          toolbox: {
            show: true,
            feature: {
              mark: {show: true},
              dataView: {show: true, readOnly: false},
              magicType: {show: true, type: ['line', 'bar']},
              restore: {show: true},
              saveAsImage: {show: true}
              mark: { show: true },
              dataView: { show: true, readOnly: false },
              magicType: { show: true, type: ['line', 'bar'] },
              restore: { show: true },
              saveAsImage: { show: true }
            }
          },
          calculable: true, //是否启用拖拽重计算特性
@@ -219,18 +224,18 @@
              data: this.useingRates,
              markPoint: {
                data: [
                  {type: 'max', name: '最大值', symbolSize: 70},
                  {type: 'min', name: '最小值', symbolSize: 70}
                  { type: 'max', name: '最大值', symbolSize: 70 },
                  { type: 'min', name: '最小值', symbolSize: 70 }
                ]
              }
            }
          ]
        };
        dayAvailBar.setOption(dayAvailBarOption);
        }
        dayAvailBar.setOption(dayAvailBarOption)
      },
      disabledDate(current){
      disabledDate(current) {
        //Can not slect days before today and today
        return current && current > moment().subtract('days', 1);
        return current && current > moment().subtract('days', 1)
      },
      dataChange(val) {
        this.queryParam.dateTime = val.format('YYYYMMDD')
@@ -248,11 +253,12 @@
        this.queryParam.endTime = v2[1]
        // console.log(v2[0],v2[1])
      },
      loadAnalysis(){
        getAction(this.url.dayUtilizationRate,this.queryParam).then(res => {
      loadAnalysis() {
        this.loading = true
        getAction(this.url.dayUtilizationRate, this.queryParam).then(res => {
          if (res.success) {
            this.spaceTime.push(res.result.dataList)
            for(var i = 0;i<res.result.dayRateDto.length;i++){
            for (var i = 0; i < res.result.dayRateDto.length; i++) {
              this.useingRates.push(res.result.dayRateDto[i].utilizationRate)
            }
            // console.log(this,spaceTime)
@@ -260,9 +266,9 @@
          } else {
            // this.$message.warning(res.message)
            this.$notification.warning({
              message:'消息',
              description:res.message
            });
              message: '消息',
              description: res.message
            })
          }
        }).finally(() => {
          this.loading = false
@@ -275,119 +281,117 @@
          return '0'
        }
      },
      searchQuery(){
        if(this.queryParam.dateTime){
      searchQuery() {
        if (this.queryParam.dateTime) {
          this.loading = true
          this.spaceTime = []
          this.useingRates = []
          if(this.queryParams.typeTree == "1"){
            this.queryParams.parentId =  this.queryParamEquip.parentId
            // this.queryParams.equipmentId =  this.queryParamEquip.equipmentId
          }else{
          if (this.queryParams.typeTree == '1') {
            this.queryParams.parentId = this.queryParamEquip.parentId
            // this.queryParams.equipmentId =  this.queryParamEquip.equipmentId
          } else {
            this.queryParams.parentId = this.queryParamEquip.parentId
            // this.queryParams.equipmentId = ""
          }
          this.AnalysisList = [];
          this.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.dayUtilizationRate,this.queryParam).then((res) => {
            if(res.success){
              this.spaceTime=res.result.dateList
              for(var i = 0;i<res.result.dayRateDto.length;i++){
          getAction(this.url.dayUtilizationRate, this.queryParam).then((res) => {
            if (res.success) {
              this.spaceTime = res.result.dateList
              for (var i = 0; i < res.result.dayRateDto.length; i++) {
                this.useingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate))
              }
              this.drawTu()
            }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: '请选择时间'
          })
        }
      },
      searchReset() {
        this.spaceTime = []
        this.useingRates = []
        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.queryParams.typeTree = this.typeTree
          this.queryParams.parentId = this.typeParent
          if(this.queryParams.parentId !=  ""){
            this.queryParams.equipmentId =  ""
          if (this.queryParams.parentId != '') {
            this.queryParams.equipmentId = ''
            this.initEquipment()
          }else{
            if(this.queryParams.equipmentId == this.queryParamEquip.equipmentId){
              this.queryParams.equipmentId =  this.typeEquipment
            }else{
          } else {
            if (this.queryParams.equipmentId == this.queryParamEquip.equipmentId) {
              this.queryParams.equipmentId = this.typeEquipment
            } else {
              this.queryParams.equipmentId = this.queryParamEquip.equipmentId
            }
          }
          getAction(this.url.dayUtilizationRate,this.queryParams).then((res) => {
            if(res.success){
              this.spaceTime=res.result.dateList
              for(var i = 0;i<res.result.dayRateDto.length;i++){
          getAction(this.url.dayUtilizationRate, this.queryParams).then((res) => {
            if (res.success) {
              this.spaceTime = res.result.dateList
              for (var i = 0; i < res.result.dayRateDto.length; i++) {
                this.useingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate))
              }
              this.drawTu()
            }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 =  ""
          if (this.queryParams.parentId != '') {
            this.queryParams.equipmentId = ''
            this.initEquipment()
          }else{
            if(this.queryParams.equipmentId == this.queryParamEquip.equipmentId){
              this.queryParams.equipmentId =  this.typeEquipment
            }else{
          } else {
            if (this.queryParams.equipmentId == this.queryParamEquip.equipmentId) {
              this.queryParams.equipmentId = this.typeEquipment
            } else {
              this.queryParams.equipmentId = this.queryParamEquip.equipmentId
            }
          }
          getAction(this.url.dayUtilizationRate,this.queryParams).then((res) => {
            if(res.success){
              this.spaceTime=res.result.dateList
              for(var i = 0;i<res.result.dayRateDto.length;i++){
          getAction(this.url.dayUtilizationRate, this.queryParams).then((res) => {
            if (res.success) {
              this.spaceTime = res.result.dateList
              for (var i = 0; i < res.result.dayRateDto.length; i++) {
                this.useingRates.push(this.numFilter(res.result.dayRateDto[i].utilizationRate))
              }
              this.drawTu()
            }else{
            } else {
              // this.$message.warning(res.message)
              this.$notification.warning({
                message:'消息',
                description:res.message
              });
                message: '消息',
                description: res.message
              })
            }
          }).finally(() => {
            this.loading = false
@@ -411,16 +415,16 @@
              this.equipment = {}
              // _this.$message.warning('请联系管理员,开放设备权限!')
              _this.$notification.warning({
                message:'消息',
                description:'请联系管理员,开放设备权限!'
              });
                message: '消息',
                description: '请联系管理员,开放设备权限!'
              })
            }
          }else{
          } else {
            // this.$message.warning(res.message)
            _this.$notification.warning({
              message:'消息',
              description:res.message
            });
              message: '消息',
              description: res.message
            })
          }
        })
@@ -441,85 +445,92 @@
              this.equipment = {}
              // _this.$message.warning('请联系管理员,开放设备权限!')
              _this.$notification.warning({
                message:'消息',
                description:'请联系管理员,开放设备权限!'
              });
                message: '消息',
                description: '请联系管理员,开放设备权限!'
              })
            }
          }else{
          } else {
            // this.$message.warning(res.message)
            _this.$notification.warning({
              message:'消息',
              description:res.message
            });
              message: '消息',
              description: res.message
            })
          }
        })
      }
    },
    created() {
      let collectTime = moment(moment().add(-1,'d'),'YYYY-MM-DD');
      let collectTime = moment(moment().add(-1, 'd'), 'YYYY-MM-DD')
      this.queryParams.collectTime = collectTime;
      this.queryParams.collectTime = collectTime
      this.queryParam.dateTime = this.queryParams.collectTime.format('YYYYMMDD')
      this.queryParams.typeTree = '1'
      this.initEquipment()
    },
    }
  }
</script>
<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;*/
  /*}*/
  /*.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/mdcPassRate/mdcPassRateList.vue
@@ -1,5 +1,5 @@
<template>
  <a-card :bordered="false" class="device_list">
  <div :bordered="false" class="device_list">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
@@ -85,7 +85,7 @@
    <!--<device-repair-model></device-repair-model>-->
    <mdc-pass-rate-modal  ref="modalForm" @ok="modalFormOk"></mdc-pass-rate-modal>
    <mdc-pass-rate-edit  ref="modalFormedit" @ok="modalFormOk"></mdc-pass-rate-edit>
  </a-card>
  </div>
</template>
<script>
src/views/mdc/base/modules/mdcProcessQuantity/mdcProcessQuantityList.vue
@@ -1,5 +1,5 @@
<template>
  <a-card :bordered="false" class="device_list">
  <div :bordered="false" class="device_list">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
@@ -81,7 +81,7 @@
    <mdc-process-quantity-modal  ref="modalForm" @ok="modalFormOk"></mdc-process-quantity-modal>
    <mdc-process-quantity-edit ref="modalFormedit" @ok="modalFormOk"></mdc-process-quantity-edit>
  </a-card>
  </div>
</template>
<script>
src/views/mdc/base/modules/mdcStandardProcessDuration/MdcStandardProcessDurationList.vue
@@ -1,5 +1,5 @@
<template>
  <a-card :bordered="false" class="device_list">
  <div :bordered="false" class="device_list">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
@@ -81,7 +81,7 @@
    <mdc-standard-process-duration-modal  ref="modalForm" @ok="modalFormOk"></mdc-standard-process-duration-modal>
    <mdc-standard-process-duration-edit   ref="modalFormedit" @ok="modalFormOk"></mdc-standard-process-duration-edit>
  </a-card>
  </div>
</template>
<script>
src/views/mdc/base/modules/openRateFractionAnalysis/openRateFractionAnalysisMain.vue
@@ -1,6 +1,6 @@
<template>
  <div class="efficiency_list" style="width: 100%;height: 100%;">
    <a-card :bordered="false">
    <div :bordered="false" style="height: 100%">
      <!-- æŸ¥è¯¢åŒºåŸŸ -->
      <div class="table-page-search-wrapper">
        <a-form layout="inline" @keyup.enter.native="searchQuery">
@@ -64,7 +64,7 @@
        </div>
        <div id="openRateTrendChart" style="width: 100%;height: 60%"></div>
      </div>
    </a-card>
    </div>
  </div>
</template>
@@ -326,7 +326,7 @@
        let openRateTrendAnalysisChart = this.$echarts.init(document.getElementById('openRateTrendChart'), 'macarons')
        let openRateTrendChartOptions = {
          title: {
            text: '利用率走势分析',
            text: '利用率分段分析',
            x: 'center',
            textStyle: {
              fontSize: 18,
@@ -422,6 +422,7 @@
  .dataContent .mathData td {
    padding: 10px;
    /*display: none;*/
    cursor: pointer;
  }
  .dataContent .mathData:hover td {
src/views/mdc/base/modules/openRateTrendAnalysis/openRateTrendAnalysisMain.vue
@@ -1,6 +1,6 @@
<template>
  <div class="efficiency_list" style="width: 100%;height: 100%;">
    <a-card :bordered="false">
    <div :bordered="false" style="height: 100%">
      <!-- æŸ¥è¯¢åŒºåŸŸ -->
      <div class="table-page-search-wrapper">
        <a-form layout="inline" @keyup.enter.native="searchQuery">
@@ -57,7 +57,7 @@
        </div>
        <div id="openRateTrendChart" style="width: 100%;height: 60%"></div>
      </div>
    </a-card>
    </div>
  </div>
</template>
@@ -428,6 +428,7 @@
  .dataContent .mathData td {
    padding: 10px;
    /*display: none;*/
    cursor: pointer;
  }
  .dataContent .mathData:hover td {
src/views/mdc/base/modules/shift/ShiftInfoModel.vue
@@ -1,6 +1,6 @@
<template>
  <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading"
            @ok="handleOk" @cancel="handleCancel" cancelText="关闭">
           @ok="handleOk" @cancel="handleCancel" cancelText="关闭">
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <a-row :gutter="24">
@@ -12,7 +12,7 @@
          </a-col>
          <a-col :span="12">
            <a-form-item label="班次名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input allow-clear placeholder="请输入班制名称" v-decorator="['shiftSubName',validatorRules.shiftSubName]"/>
              <a-input allow-clear placeholder="请输入班次名称" v-decorator="['shiftSubName',validatorRules.shiftSubName]"/>
            </a-form-item>
          </a-col>
        </a-row>
@@ -72,7 +72,6 @@
    JeecgListMixin
  } from '@/mixins/JeecgListMixin'
  export default {
    name: 'ShiftInfoModel',
    mixins: [JeecgListMixin],
@@ -105,20 +104,35 @@
        confirmLoading: false,
        form: this.$form.createForm(this),
        validatorRules: {
          shiftSubName:[
            {
              required:true,
              message:'请输入字段长度',
            },{
              validator:this.checkshiftSuName,
              trigger:'blur'
            }
          ]
          shiftSubName: {
            rules: [
              {
                required: true,
                message: '请输入班次名称'
              }
            ]
          },
          startDate: {
            rules: [
              {
                required: true,
                message: '请选择开始时间'
              }
            ]
          },
          endDate: {
            rules: [
              {
                required: true,
                message: '请选择结束时间'
              }
            ]
          }
        },
        url: {
          add: '/mdc/mdcShiftSub/addShiftSub',
          edit: '/mdc/mdcShiftSub/editMdcShiftSub',
          list: '/mdc/mdcMdcShift/queryPageList',
          list: '/mdc/mdcMdcShift/queryPageList'
        },
        disableSubmit: true
      }
@@ -129,27 +143,27 @@
    methods: {
      //自定义校验函数,要求名字不能重复  value是表单的值,callback是回调函数   å¿…须调用才可验证
      checkshiftSuName(rule,value,callback){
        if(!value){
          alert("不能为空!")
      checkshiftSuName(rule, value, callback) {
        if (!value) {
          alert('不能为空!')
          return
        }
        // debugger
        // let NameSelf = value;
       this.loadData()
        this.loadData()
        // console.log(dataSource);
        callback();
        callback()
      },
      loadData() {
        if(!this.url.list){
          this.$message.error("请设置url.list属性!")
        if (!this.url.list) {
          this.$message.error('请设置url.list属性!')
          return
        }
        //加载数据 è‹¥ä¼ å…¥å‚æ•°1则加载第一页的内容
        // if (arg === 1) {
        //   this.ipagination.current = 1;
        // }
        var params = this.getQueryParams();//查询条件
        var params = this.getQueryParams()//查询条件
        //
        // if(!params){
        //   return false;
@@ -160,7 +174,7 @@
          if (res.success) {
            // console.log(res)
            //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
            this.dataSource = res.result.records||res.result;
            this.dataSource = res.result.records || res.result
            // if(res.result.total)
            // {
            //   this.ipagination.total = res.result.total;
@@ -168,12 +182,12 @@
            //   this.ipagination.total = 0;
            // }
            //update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
          }else{
          } else {
            // this.$message.warning(res.message)
            this.$notification.warning({
              message:'消息',
              description:res.message
            });
              message: '消息',
              description: res.message
            })
          }
        }).finally(() => {
          this.loading = false
@@ -230,28 +244,23 @@
            that.confirmLoading = true
            let formData = Object.assign(this.model, values)
            formData.isDaySpan = that.isDaySpan
            console.log(formData.isDaySpan);
            if(formData.isDaySpan == false){
              formData.startDate = moment(formData.startDate).format('HH:mm:ss');
              formData.endDate = moment(formData.endDate).format('HH:mm:ss');
              formData.sleepStartDate = moment(formData.sleepStartDate).format('HH:mm:ss');
              formData.sleepEndDate = moment(formData.sleepEndDate).format('HH:mm:ss');
              let startTimeOne = formData.startDate.replace(/:/g,'');
              let endTimeOne = formData.endDate.replace(/:/g,'');
              if(startTimeOne > endTimeOne){
            console.log(formData.isDaySpan)
            formData.startDate = moment(formData.startDate).format('HH:mm:ss')
            formData.endDate = moment(formData.endDate).format('HH:mm:ss')
            if (formData.sleepStartDate) formData.sleepStartDate = moment(formData.sleepStartDate).format('HH:mm:ss')
            if (formData.sleepEndDate) formData.sleepEndDate = moment(formData.sleepEndDate).format('HH:mm:ss')
            if (formData.isDaySpan == false) {
              let startTimeOne = formData.startDate.replace(/:/g, '')
              let endTimeOne = formData.endDate.replace(/:/g, '')
              if (startTimeOne > endTimeOne) {
                // that.$message.warning("非跨天班次结束时间不能小于等于开始时间!")
                that.$notification.warning({
                  message:'消息',
                  description:"非跨天班次结束时间不能小于等于开始时间!"
                });
                // that.$message.success("保存失败")
                that.$notification.error({
                  message:'消息',
                  description:"保存失败!"
                });
                  message: '消息',
                  description: '非跨天班次结束时间不能小于等于开始时间!'
                })
                that.confirmLoading = false
                that.close()
              }else{
              } else {
                formData.shiftSubStatus = 1
                let obj
                if (!this.model.id) {
@@ -265,23 +274,23 @@
                  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
                  that.close()
                })
              }
            }else{
            } else {
              formData.shiftSubStatus = 1
              let obj
              if (!this.model.id) {
@@ -295,16 +304,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/system/WorkshopSignageManagement.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,501 @@
<template>
  <a-row :gutter="10">
    <a-col :md="leftColMd" :sm="24" style="margin-bottom: 20px">
      <a-card :bordered="false">
        <!-- æŸ¥è¯¢åŒºåŸŸ -->
        <div class="table-page-search-wrapper">
          <!-- æœç´¢åŒºåŸŸ -->
          <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-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>
              </span>
            </a-row>
          </a-form>
        </div>
        <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
        <div class="table-operator" style="margin: 5px 0 10px 2px">
          <a-button @click="handleAdd" type="primary" icon="plus">新建车间</a-button>
        </div>
        <div class="ant-alert ant-alert-info" style="margin-bottom: 16px">
          <i class="anticon anticon-info-circle ant-alert-icon"> </i> å·²é€‰æ‹©
          <a
            ><b>{{ selectedRowKeys1.length }}</b></a
          >项
          <a style="margin-left: 24px" @click="onClearSelected1">清空</a>
        </div>
        <div style="margin-top: 15px">
          <a-table
            style="height: 500px"
            ref="table"
            size="middle"
            bordered
            rowKey="id"
            :columns="columns"
            :dataSource="dataSource"
            :pagination="ipagination"
            :loading="loading"
            :rowSelection="{ selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type: 'radio' }"
            @change="handleTableChange"
          >
            <template slot="backgroundImage" slot-scope="text, record">
              <img :src="getImgView(record.backgroundImage)" width="50" height="50" />
            </template>
            <span slot="action" slot-scope="text, record">
              <a @click="handleOpen(record)">设备</a>
              <a-divider type="vertical" />
              <a-dropdown>
                <a class="ant-dropdown-link"> æ›´å¤š <a-icon type="down" /> </a>
                <a-menu slot="overlay">
                  <a-menu-item>
                    <a @click="handleEdit(record)">编辑</a>
                  </a-menu-item>
                  <a-menu-item>
                    <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete1(record.id)">
                      <a>删除</a>
                    </a-popconfirm>
                  </a-menu-item>
                </a-menu>
              </a-dropdown>
            </span>
          </a-table>
        </div>
      </a-card>
    </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>
        <!-- æŸ¥è¯¢åŒºåŸŸ -->
        <div class="table-page-search-wrapper">
          <a-form layout="inline">
            <a-row :gutter="24">
              <a-col :md="12" :sm="12">
                <a-form-item label="设备编码">
                  <a-input placeholder="" v-model="queryParam2.equipmentId"></a-input>
                </a-form-item>
              </a-col>
              <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
                <a-col :md="9" :sm="24">
                  <a-button type="primary" @click="searchQuery2" icon="search" style="margin-left: 21px">查询</a-button>
                  <a-button type="primary" @click="searchReset2" icon="reload" style="margin-left: 8px">重置</a-button>
                </a-col>
              </span>
            </a-row>
          </a-form>
        </div>
        <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
        <div class="table-operator" :md="24" :sm="24">
          <a-button @click="handleAddDeviceInWorkshop" type="primary" icon="plus" style="margin-top: 16px"
            >已有设备
          </a-button>
          <a-dropdown v-if="selectedRowKeys2.length > 0">
            <a-menu slot="overlay">
              <a-menu-item key="1" @click="batchDel2">
                <a-icon type="delete" />
                åˆ é™¤
              </a-menu-item>
            </a-menu>
            <a-button style="margin-left: 8px">
              æ‰¹é‡æ“ä½œ
              <a-icon type="down" />
            </a-button>
          </a-dropdown>
        </div>
        <!-- table区域-begin -->
        <div>
          <div class="ant-alert ant-alert-info" style="margin-bottom: 16px">
            <i class="anticon anticon-info-circle ant-alert-icon"></i> å·²é€‰æ‹©
            <a style="font-weight: 600">{{ selectedRowKeys2.length }}</a
            >项
            <a style="margin-left: 24px" @click="onClearSelected2">清空</a>
          </div>
          <a-table
            style="height: 500px"
            ref="table2"
            bordered
            size="middle"
            rowKey="equipmentId"
            :columns="columns2"
            :dataSource="dataSource2"
            :pagination="ipagination2"
            :loading="loading2"
            :rowSelection="{ selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2 }"
            @change="handleTableChange2"
          >
            <span slot="action" slot-scope="text, record">
              <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete2(record.equipmentId)">
                <a>删除</a>
              </a-popconfirm>
            </span>
          </a-table>
        </div>
      </a-card>
    </a-col>
    <!-- è¡¨å•区域 -->
    <workshop-modal ref="modalForm" @ok="modalFormOk"></workshop-modal>
    <!--新增车间-->
    <select-device-modal ref="selectUserModal" @selectFinished="selectOK"></select-device-modal>
    <!--已有设备-->
  </a-row>
</template>
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { deleteAction, postAction, getAction } from '@/api/manage'
import SelectDeviceModal from './modules/SelectDeviceModal'
import WorkshopModal from './modules/WorkshopModal'
import { filterObj } from '@/utils/util'
import moment from 'moment'
export default {
  name: 'WorkshopSignageManagement',
  mixins: [JeecgListMixin],
  components: {
    SelectDeviceModal,
    WorkshopModal,
    moment,
  },
  data() {
    return {
      model1: {},
      model2: {},
      currentRoleId: '',
      currentWorkshopId: '',
      queryParam1: {},
      queryParam2: {},
      dataSource1: [],
      dataSource2: [],
      ipagination1: {
        current: 1,
        pageSize: 10,
        pageSizeOptions: ['10', '20', '30'],
        showTotal: (total, range) => {
          return range[0] + '-' + range[1] + ' å…±' + total + '条'
        },
        showQuickJumper: true,
        showSizeChanger: true,
        total: 0,
      },
      ipagination2: {
        current: 1,
        pageSize: 10,
        pageSizeOptions: ['10', '20', '30'],
        showTotal: (total, range) => {
          return range[0] + '-' + range[1] + ' å…±' + total + '条'
        },
        showQuickJumper: true,
        showSizeChanger: true,
        total: 0,
      },
      isorter1: {
        column: 'createTime',
        order: 'desc',
      },
      isorter2: {
        column: 'createTime',
        order: 'desc',
      },
      filters1: {},
      filters2: {},
      loading1: false,
      loading2: false,
      selectedRowKeys1: [],
      selectedRowKeys2: [],
      selectionRows1: [],
      selectionRows2: [],
      test: {},
      rightcolval: 0,
      columns: [
        {
          title: '车间名称',
          align: 'center',
          dataIndex: 'workshopName',
        },
        {
          title: '车间背景图',
          dataIndex: 'backgroundImage',
          align: 'center',
          scopedSlots: { customRender: 'backgroundImage' },
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          scopedSlots: { customRender: 'action' },
        },
      ],
      columns2: [
        {
          title: '设备编码',
          align: 'center',
          dataIndex: 'equipmentId',
          width: 120,
        },
        {
          title: '设备名称',
          align: 'center',
          width: 100,
          dataIndex: 'equipmentName',
        },
        {
          title: '设备类型',
          align: 'center',
          width: 80,
          dataIndex: 'equipmentType',
        },
        {
          title: '操作',
          dataIndex: 'action',
          scopedSlots: { customRender: 'action' },
          align: 'center',
          width: 120,
        },
      ],
      // é«˜çº§æŸ¥è¯¢å‚æ•°
      superQueryParams2: '',
      // é«˜çº§æŸ¥è¯¢æ‹¼æŽ¥æ¡ä»¶
      superQueryMatchType2: 'and',
      url: {
        list: '/mdc/mdcWorkshopInfo/list',
        delete: '/mdc/mdcWorkshopInfo/delete',
        list2: '/mdc/mdcWorkshopInfo/workshopEquipmentList',
        addDeviceInWorkshop: '/mdc/mdcWorkshopInfo/addWorkshopEquipment',
        delete2: '/mdc/mdcWorkshopInfo/deleteWorkshopEquipment',
        deleteBatch2: '/mdc/mdcWorkshopInfo/deleteWorkshopEquipmentBatch',
      },
    }
  },
  computed: {
    leftColMd() {
      return this.selectedRowKeys1.length === 0 ? 24 : 12
    },
    rightColMd() {
      return this.selectedRowKeys1.length === 0 ? 0 : 12
    },
  },
  methods: {
    onSelectChange2(selectedRowKeys, selectionRows) {
      this.selectedRowKeys2 = selectedRowKeys
      this.selectionRows2 = selectionRows
    },
    onClearSelected2() {
      this.selectedRowKeys2 = []
      this.selectionRows2 = []
    },
    onClearSelected1() {
      this.selectedRowKeys1 = []
      this.selectionRows1 = []
    },
    onSelectChange1(selectedRowKeys, selectionRows) {
      this.rightcolval = 1
      this.selectedRowKeys1 = selectedRowKeys
      this.selectionRows1 = selectionRows
      this.model1 = Object.assign({}, selectionRows[0])
      this.currentWorkshopId = selectedRowKeys[0]
      this.loadData2()
    },
    getQueryParams2() {
      //获取查询条件
      let sqp = {}
      if (this.superQueryParams2) {
        sqp['superQueryParams'] = encodeURI(this.superQueryParams2)
        sqp['superQueryMatchType'] = this.superQueryMatchType2
      }
      var param = Object.assign(sqp, this.queryParam2, this.isorter2, this.filters2)
      param.field = this.getQueryField2()
      param.pageNo = this.ipagination2.current
      param.pageSize = this.ipagination2.pageSize
      return filterObj(param)
    },
    getQueryField2() {
      //TODO å­—段权限控制
      var str = 'id,'
      this.columns2.forEach(function (value) {
        str += ',' + value.dataIndex
      })
      return str
    },
    modalFormOk2() {
      // æ–°å¢ž/修改 æˆåŠŸæ—¶ï¼Œé‡è½½åˆ—è¡¨
      this.loadData2()
    },
    loadData2(arg) {
      if (!this.url.list2) {
        this.$message.error('请设置url.list2属性!')
        return
      }
      //加载数据 è‹¥ä¼ å…¥å‚æ•°1则加载第一页的内容
      if (arg === 1) {
        this.ipagination2.current = 1
      }
      if (this.currentWorkshopId === '') return
      let params = this.getQueryParams2() //查询条件
      params.workshopId = this.currentWorkshopId
      this.loading2 = true
      getAction(this.url.list2, params).then((res) => {
        if (res.success) {
          this.dataSource2 = res.result.records
          this.ipagination2.total = res.result.total
        }
        this.loading2 = false
      })
    },
    handleDelete1: function (id) {
      this.handleDelete(id)
      this.dataSource2 = []
      this.currentRoleId = ''
    },
    /**
     * ç‚¹å‡»è®¾å¤‡è¡¨æ ¼ä¸­çš„删除按钮后触发删除单个车间与设备的关系
     * @param equipmentId å½“前行的设备编号
     */
    handleDelete2: function (equipmentId) {
      if (!this.url.delete2) {
        this.$message.error('请设置url.delete2属性!')
        return
      }
      var that = this
      deleteAction(that.url.delete2, { workshopId: this.currentWorkshopId, equipmentId }).then((res) => {
        if (res.success) {
          that.$message.success(res.message)
          that.loadData2()
        } else {
          that.$message.warning(res.message)
        }
      })
    },
    /**
     * æ‰¹é‡åˆ é™¤è½¦é—´ä¸Žè®¾å¤‡çš„关系
     */
    batchDel2: function () {
      if (!this.url.deleteBatch2) {
        this.$message.error('请设置url.deleteBatch2属性!')
        return
      }
      if (this.selectedRowKeys2.length <= 0) {
        // this.$message.warning('请选择一条记录!')
        this.$notification.warning({
          message: '消息',
          description: '请选择一条记录',
        })
        return
      } else {
        var ids = ''
        for (var a = 0; a < this.selectedRowKeys2.length; a++) {
          ids += this.selectedRowKeys2[a] + ','
        }
        var that = this
        this.$confirm({
          title: '确认删除',
          content: '是否删除选中数据?',
          onOk: function () {
            deleteAction(that.url.deleteBatch2, {
              workshopId: that.currentWorkshopId,
              equipmentIds: ids,
            }).then((res) => {
              if (res.success) {
                that.$message.success(res.message)
                that.loadData2()
                that.onClearSelected()
              } else {
                that.$message.warning(res.message)
              }
            })
          },
        })
      }
    },
    /**
     * é€‰æ‹©å·²æœ‰è®¾å¤‡åŽç‚¹å‡»ç¡®å®šæ—¶è§¦å‘
     * @param data å·²é€‰æ‹©çš„设备
     */
    selectOK(data) {
      let params = {}
      params.workshopId = this.currentWorkshopId
      params.equipmentIdList = []
      for (var a = 0; a < data.length; a++) {
        params.equipmentIdList.push(data[a])
      }
      console.log(params)
      postAction(this.url.addDeviceInWorkshop, params).then((res) => {
        if (res.success) {
          this.loadData2()
          this.$message.success(res.message)
        } else {
          this.$message.warning(res.message)
        }
      })
    },
    /**
     * ç‚¹å‡»å·²æœ‰è®¾å¤‡æŒ‰é’®è§¦å‘
     */
    handleAddDeviceInWorkshop() {
      if (this.currentWorkshopId == '') {
        this.$message.error('请选择一个车间!')
      } else {
        this.$refs.selectUserModal.visible = true
        this.$refs.selectUserModal.selectedRowKeys = []
        this.$refs.selectUserModal.selectedRows = []
      }
    },
    /**
     * ç‚¹å‡»å½“前行车间选项后触发事件
     * @param record å½“前行数据
     */
    handleOpen(record) {
      this.rightcolval = 1
      this.selectedRowKeys1 = [record.id]
      this.model1 = Object.assign({}, record)
      this.currentWorkshopId = record.id
      this.onClearSelected2()
      this.loadData2()
    },
    searchQuery2() {
      this.loadData2(1)
    },
    searchReset2() {
      this.queryParam2 = {}
      this.loadData2(1)
    },
    handleTableChange2(pagination, filters, sorter) {
      //分页、排序、筛选变化时触发
      //TODO ç­›é€‰
      if (Object.keys(sorter).length > 0) {
        this.isorter2.column = sorter.field
        this.isorter2.order = 'ascend' == sorter.order ? 'asc' : 'desc'
      }
      this.ipagination2 = pagination
      this.loadData2()
    },
    hideUserList() {
      //this.rightcolval = 0
      this.selectedRowKeys1 = []
    },
  },
}
</script>
<style scoped>
/** Button按钮间距 */
.ant-btn {
  margin-left: 8px;
}
</style>
src/views/system/modules/SelectDeviceModal.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,256 @@
<template>
  <div>
    <a-modal
      centered
      :title="title"
      :width="1000"
      :visible="visible"
      @ok="handleOk"
      @cancel="handleCancel"
      cancelText="关闭">
      <!-- æŸ¥è¯¢åŒºåŸŸ -->
      <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-row>
        </a-form>
      </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>
  </div>
</template>
<script>
  import { filterObj } from '@/utils/util'
  import { getAction } from '@/api/manage'
  export default {
    name: 'SelectDeviceModal',
    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
        },
        loading: false,
        selectedRowKeys: [],
        selectedRows: [],
        url: {
          list: '/mdc/mdcEquipment/list'
        }
      }
    },
    created() {
      this.loadData()
    },
    methods: {
      searchQuery() {
        this.loadData(1)
      },
      searchReset() {
        this.queryParam = {}
        this.loadData(1)
      },
      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.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()
      }
    }
  }
</script>
<style lang="less" scoped>
  .ant-card-body .table-operator {
    margin-bottom: 18px;
  }
  .ant-table-tbody .ant-table-row td {
    padding-top: 15px;
    padding-bottom: 15px;
  }
  .anty-row-operator button {
    margin: 0 5px
  }
  .ant-btn-danger {
    background-color: #ffffff
  }
  .ant-modal-cust-warp {
    height: 100%
  }
  .ant-modal-cust-warp .ant-modal-body {
    height: calc(100% - 110px) !important;
    overflow-y: auto
  }
  .ant-modal-cust-warp .ant-modal-content {
    height: 90% !important;
    overflow-y: hidden
  }
</style>
src/views/system/modules/UserModal.vue
@@ -238,9 +238,9 @@
        //根据屏幕宽度自适应抽屉宽度
        this.resetScreenSize();
        that.userId = record.id;
        that.model = Object.assign({},{selectedroles:'',selecteddeparts:''}, record);
        that.model = Object.assign({},{selectedroles:'',selectedProduction:''}, record);
        //身份为上级显示负责部门,否则不显示
        if(this.model.userIdentity==2){
          this.departIdShow=true;
@@ -252,7 +252,7 @@
          that.getUserRoles(record.id);
          that.getUserDeparts(record.id);
        }
        console.log('that.model=',that.model)
        console.log('that.model',that.model)
      },
      isDisabledAuth(code){
        return disabledAuthFilter(code);
@@ -366,8 +366,6 @@
          return c;
        })
      },
      refresh () {
        this.userId=""
src/views/system/modules/WorkshopModal.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,134 @@
<template>
  <a-modal
    :title="title"
    :width="800"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭"
    wrapClassName="ant-modal-cust-warp"
    style="top:5%;height: 85%;overflow-y: hidden">
    <a-spin :spinning="confirmLoading">
      <a-form-model ref="form" v-bind="layout" :model="model" :rules="validatorRules">
        <a-form-model-item label="车间编号" required prop="id">
          <a-input v-model="model.id" :disabled="isEdit" placeholder="请输入车间编号"/>
        </a-form-model-item>
        <a-form-model-item label="车间名称" required prop="workshopName">
          <a-input v-model="model.workshopName" placeholder="请输入车间名称"/>
        </a-form-model-item>
        <a-form-model-item label="车间背景图" required prop="backgroundImage">
          <j-image-upload class="avatar-uploader" text="上传" v-model="model.backgroundImage"></j-image-upload>
        </a-form-model-item>
      </a-form-model>
    </a-spin>
  </a-modal>
</template>
<script>
  import api from '@/api/mdc'
  export default {
    name: 'WorkshopModal',
    data() {
      return {
        title: '操作',
        visible: false,
        isEdit: false,
        model: {},
        layout: {
          labelCol: { span: 3 },
          wrapperCol: { span: 14 }
        },
        confirmLoading: false,
        validatorRules: {
          workshopName: [
            { required: true, message: '请输入车间名称!' },
            { min: 2, max: 30, message: '长度在 2 åˆ° 30 ä¸ªå­—符', trigger: 'blur' }
          ],
          id: [
            { required: true, message: '请输入车间编号!' },
            { min: 0, max: 64, message: '长度不超过 64 ä¸ªå­—符', trigger: 'blur' },
            { validator: this.validateRoleCode }
          ],
          backgroundImage:[
            { required: true, message: '请上传车间背景图!' }
          ]
        }
      }
    },
    created() {
      //备份model原始值
      this.modelDefault = JSON.parse(JSON.stringify(this.model))
    },
    methods: {
      add() {
        this.edit(this.modelDefault)
      },
      edit(record) {
        this.model = Object.assign({}, record)
        this.visible = true
        //编辑页面禁止修改角色编码
        if (this.model.id) {
          this.isEdit = true
        } else {
          this.isEdit = false
        }
      },
      close() {
        this.$refs.form.clearValidate()
        this.$emit('close')
        this.visible = false
      },
      handleOk() {
        const that = this
        // è§¦å‘表单验证
        this.$refs.form.validate(valid => {
          if (valid) {
            console.log('触发')
            that.confirmLoading = true
            let obj
            if (!this.isEdit) {
              console.log('触发新增')
              obj = api.addWorkshopApi(this.model)
            } else {
              console.log('触发修改')
              obj = api.editWorkshopApi(this.model)
            }
            obj.then((res) => {
              if (res.success) {
                that.$message.success(res.message)
                that.$emit('ok')
              } else {
                that.$message.warning(res.message)
              }
            }).finally(() => {
              that.confirmLoading = false
              that.close()
            })
          } else {
            return false
          }
        })
      },
      handleCancel() {
        this.close()
      },
      validateRoleCode(rule, value, callback) {
        if (/[\u4E00-\u9FA5]/g.test(value)) {
          callback('车间编号不可输入汉字!')
        } else {
          callback()
        }
      }
    }
  }
</script>
<style scoped>
  .avatar-uploader > .ant-upload {
    width: 104px;
    height: 104px;
  }
</style>