1、车间看板页面缩放和拖拽时增加辅助线
2、驱动参数管理页面调整英文名称字段验证输入字数长度由2-18位调整为为仅验证非空
3、设备日志页面采样周期字段默认值由1000调整为100
4、设备日志页面设备日志列表中若时段状态为关机则不弹出工作曲线
5、设备综合效率分析页面增加表格数据加载动画
6、jQuery.table2excel组件导出表格数据功能增加日期格式的转换
7、设备日志页面工作曲线Y轴增加颜色区分,与对应数据颜色保持一致
8、设备管理页面表单填写界面设备功率增加计量单位kw
已修改8个文件
138 ■■■■■ 文件已修改
src/components/table2excel/table2excel.js 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/WorkshopSignage.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/EquipmentList/UserModal.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/deviceLog/LogInfo.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/deviceLog/LogList.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/deviceLog/WorkChartModel.vue 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigForm.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/table2excel/table2excel.js
@@ -93,15 +93,21 @@
            if( rc.flag.length > 0 ) {
              tempRows += "<td> </td>"; // exclude it!!
            } else {
              // 匹配格式为'yyyy-mm'的日期字符串数据,若有其他需求后期再增加
              var regexPattern = /^\d{4}-\d{2}$/;
              if($(q).html().match(regexPattern)){
                tempRows += "<td style=\"mso-number-format:'yyyy-mm';\"";
              }else{
              tempRows += "<td";
                if(additionalStyles){
                  tempRows += " style='" + additionalStyles + "'";
                }
              }
              if( rc.rows > 0) {
                tempRows += " rowspan='" + rc.rows + "' ";
              }
              if( rc.cols > 0) {
                tempRows += " colspan='" + rc.cols + "' ";
              }
              if(additionalStyles){
                tempRows += " style='" + additionalStyles + "'";
              }
              tempRows += ">" + $(q).html() + "</td>";
            }
src/views/WorkshopSignage.vue
@@ -42,6 +42,8 @@
      <!--拖拽设备区域-->
      <div class="content-container" ref="deviceContainerRef" style="overflow: auto">
        <img :src="imgSrc" width="1920" height="900">
        <div class="guideline guidelineX" :style="{top:guidelineXTop+'px',display:showGuideline}"></div>
        <div class="guideline guidelineY" :style="{left:guidelineYLeft+'px',display:showGuideline}"></div>
        <VueDragResize
          v-for="(item, index) in deviceList"
          :key="item.equipmentId"
@@ -59,6 +61,7 @@
          :isDraggable="isDraggable"
          :isResizable="isResizable"
          :stickSize="6"
          @deactivated="showGuideline = 'none'"
        >
          <div class="single-device" :style="{ width: item.vw + 'px', height: item.vh + 'px' }"
               @click="openDetail(item)">
@@ -127,6 +130,9 @@
        timingAcquisition: null, // 定时刷新是否开启
        parentH: 5000,//父级高度
        parentW: 1920,//父级宽度
        showGuideline: 'none',
        guidelineXTop: 0,
        guidelineYLeft: 0,
        deviceList: [
          // {
          //   equipmentId: '123213213123232',// 设备ID
@@ -283,10 +289,13 @@
        // } else {
        //   this.deviceList[index].fontSize = 12
        // }
        this.showGuideline = 'block'
        this.deviceList[index].vw = newRect.width
        this.deviceList[index].vh = newRect.height
        this.deviceList[index].coordinateTop = newRect.top
        this.deviceList[index].coordinateLeft = newRect.left
        this.guidelineXTop = newRect.top + newRect.height / 2
        this.guidelineYLeft = newRect.left + newRect.width / 2
      },
      /**
@@ -492,6 +501,22 @@
      width: 100%;
      background-repeat: no-repeat;
      background-size: 100% 100%;
      position: relative;
      .guideline{
        position: absolute;
        border: 1px dashed #ccc;
      }
      .guidelineX {
        width: 1920px;
        left: 0;
      }
      .guidelineY {
        top: 0;
        height: 900px;
      }
      .single-device {
        position: absolute;
src/views/mdc/base/modules/EquipmentList/UserModal.vue
@@ -78,7 +78,7 @@
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="设备功率" :labelCol="labelCol" :wrapperCol="wrapperCol">
            <a-form-model-item label="设备功率(kw)" :labelCol="labelCol" :wrapperCol="wrapperCol">
              <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="请输入设备功率"
                       v-model="model.devicePower"/>
            </a-form-model-item>
@@ -228,7 +228,7 @@
        },
        labelCol: {
          xs: { span: 24 },
          sm: { span: 6 },
          sm: { span: 8 },
        },
        wrapperCol: {
          xs: { span: 24 },
src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue
@@ -41,7 +41,8 @@
      </div>
      <div id="EfficiencyShift" style="flex:1;overflow: hidden">
        <a-table :columns="columns" rowKey="id" :dataSource="dataSource.records" :pagination="false" :scroll="{x:'max-content',y:scrollY}" bordered></a-table>
      <a-table :columns="columns" rowKey="id" :dataSource="dataSource.records" :loading="tableLoading"
               :pagination="false" :scroll="{x:'max-content',y:scrollY}" bordered></a-table>
      </div>
     <!--<div class="pagination">-->
       <!--<a-pagination-->
@@ -126,7 +127,7 @@
            align: 'center',
            width: 100,
            dataIndex: 'shift',
            ellipsis: true,
            ellipsis: true
          },
          {
            title: '每班小时',
@@ -271,6 +272,7 @@
        dataSource: [],
        driveTypeList: [],
        scrollY:465,
        tableLoading: false
      }
    },
    props: { nodeTree: '', Type: '', nodePeople: '' },
@@ -395,7 +397,7 @@
      searchReset() {
        this.queryParam = {
          pageSize: 20,
          pageSize: 10000,
          pageNo: 1
        }
        this.dates = []
@@ -412,10 +414,16 @@
      },
      loadData() {
        getAction(this.url.list, this.queryParam).then(res => {
        this.tableLoading = true
        getAction(this.url.list, this.queryParam)
          .then(res => {
          if (res.success) {
            this.dataSource = res.result
              this.tableLoading = false
          }
          })
          .finally(() => {
            this.tableLoading = false
        })
      },
@@ -479,21 +487,25 @@
      height: 811px!important;
    }
  }
  @media screen and (min-width: 1680px) and (max-width: 1920px){
    .device_list{
      height: 811px!important;
    }
  }
  @media screen and (min-width: 1400px) and (max-width: 1680px){
    .device_list{
      height: 663px!important;
    }
  }
  @media screen and (min-width: 1280px) and (max-width: 1400px){
    .device_list{
      height: 564px!important;
    }
  }
  @media screen and (max-width: 1280px){
    .device_list{
      height: 564px!important;
src/views/mdc/base/modules/deviceLog/LogInfo.vue
@@ -332,7 +332,6 @@
      },
      searchQuery() {
        // console.log(this.queryParams.collectTime)
        if (this.queryParams.collectTime != undefined) {
          this.queryParams.collectTimeStr = this.queryParams.collectTime.format('YYYY-MM-DD')
          if (!this.queryParams.equipmentId || !this.queryParams.equipmentName) {
            this.$notification.warning({
@@ -342,18 +341,12 @@
            return false
          }
          this.queryChart()
        } else {
          // this.$message.warning("请选择时间")
          console.log('触发提示')
          this.$notification.warning({
            message: '消息',
            description: '请选择时间'
          })
        }
        // this.queryList()
      },
      searchReset() {
        this.queryParams = {}
        this.queryParams = {
          collectTime : moment()
      }
        // this.queryList()
        this.equipment = {}
        this.queryChart()
src/views/mdc/base/modules/deviceLog/LogList.vue
@@ -3,7 +3,8 @@
    <!-- 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" :customRow="rowClick">
               :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>
@@ -29,6 +30,7 @@
    JeecgListMixin
  } from '@/mixins/JeecgListMixin'
  import moment from 'moment'
  export default {
    name: 'LogList',
    mixins: [JeecgListMixin],
@@ -49,9 +51,7 @@
        default: false
      }
    },
    watch:{
    },
    watch: {},
    data() {
      return {
        statusName: '',
@@ -63,7 +63,7 @@
          pageSize: 100,
          pageSizeOptions: ['100', '500', '1000'],
          showTotal: (total, range) => {
            return range[0] + "-" + range[1] + " 共" + total + "条"
            return range[0] + '-' + range[1] + ' 共' + total + '条'
          },
          showQuickJumper: true,
          showSizeChanger: true,
@@ -79,14 +79,14 @@
          {
            title: '开始时间',
            align: 'center',
            dataIndex: 'startTime',
            dataIndex: 'startTime'
            // defaultSortOrder:'descend',
            // sorter: (a, b) => {return a.startTime>b.startTime?1:-1}
          },
          {
            title: '结束时间',
            align: 'center',
            dataIndex: 'endTime',
            dataIndex: 'endTime'
            // defaultSortOrder:'descend',
            // sorter: (a, b) => {return a.endTime>b.endTime?1:-1}
          },
@@ -127,7 +127,7 @@
              }else if(60<ss && ss<3600){
                const min1 = parseInt(ss % 3600 / 60) < 10 ? '0' + parseInt(ss % 3600 / 60) : parseInt(ss % 3600 / 60)
                const sec1 = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60)
                return  min1 + '分' + sec1 + "秒"
                return min1 + '分' + sec1 + '秒'
              }else{
                const sec2 = parseInt(ss % 3600 % 60) < 10 ? '0' + parseInt(ss % 3600 % 60) : parseInt(ss % 3600 % 60)
                return sec2 + '秒'
@@ -149,10 +149,10 @@
        //分页、排序、筛选变化时触发
        //TODO 筛选
        if (Object.keys(sorter).length > 0) {
          this.isorter.column = sorter.field;
          this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
          this.isorter.column = sorter.field
          this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc'
        }
        this.ipagination = pagination;
        this.ipagination = pagination
        // this.loadData();
      },
      /**
@@ -164,6 +164,8 @@
        return {
          on:{
            click:()=>{
              // 关机状态设备日志不弹出工作曲线
              if (record.status === 0) return
              const timeObj={
                start:moment(record.startTime),
                end:moment(record.endTime)
@@ -182,30 +184,35 @@
<style lang="less" scoped>
  @import '~@assets/less/common.less';
  @media screen and (min-width: 1920px){
    .table_logList{
      height: 417px!important;
      overflow: scroll;
    }
  }
  @media screen and (min-width: 1680px) and (max-width: 1920px){
    .table_logList{
      height: 417px!important;
      overflow: scroll;
    }
  }
  @media screen and (min-width: 1400px) and (max-width: 1680px){
    .table_logList{
      height: 266px!important;
      overflow: scroll;
    }
  }
  @media screen and (min-width: 1280px) and (max-width: 1400px){
    .table_logList{
      height: 360px!important;
      overflow: scroll;
    }
  }
  @media screen and (max-width: 1280px){
    .table_logList{
      height: 170px!important;
src/views/mdc/base/modules/deviceLog/WorkChartModel.vue
@@ -160,9 +160,9 @@
              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,
@@ -173,7 +173,6 @@
                codeTypeId: that.option.join(',')
              }
              that.initChart(param)
            }
          }
        })
      },
@@ -230,7 +229,7 @@
        this.queryParams = {
          equipmentId: node.equipmentId,
          equipmentName: node.equipmentName,
          period: 1000,
          period: 100,
          paramDate: paramDate,
          paramDateStr: paramDate.format('yyyy-MM-DD'),
          start: start,
@@ -312,10 +311,10 @@
              position: 'left',
              boundaryGap: [0, '15%'],
              axisLine: {
                show: true
                // lineStyle:{
                //   color:'#000000'
                // }
                show: true,
                lineStyle:{
                  color:'#5470C6'
                }
              }
            },
            {
@@ -325,10 +324,10 @@
              position: 'left',
              boundaryGap: [0, '15%'],
              axisLine: {
                show: true
                // lineStyle:{
                //   color:'#000000'
                // }
                show: true,
                lineStyle:{
                  color:'#91CC75'
                }
              }
            },
            {
@@ -338,10 +337,10 @@
              position: 'left',
              boundaryGap: [0, '15%'],
              axisLine: {
                show: true
                // lineStyle:{
                //   color:'#000000'
                // }
                show: true,
                lineStyle:{
                  color:'#FAC858'
                }
              }
            }
          ],
@@ -377,6 +376,7 @@
            temp.push(item)
          }
        }
        console.log('temp',temp)
        getAction(this.url.workChart, param).then((res) => {
          if (JSON.stringify(res.result) == '[]' || res.result == null) {
            // this.$message.warning('无数据!')
@@ -423,12 +423,13 @@
                symbol: 'circle',
                symbolSize: 10,
                yAxisIndex: i,
                data: itemLine
              }
              result.push(line)
            }
            console.log('result===========',result)
            console.log('legend=============',lengenddata)
            // option.yAxis = Yarr;
            option.series = result
            option.legend = lengenddata
src/views/mdc/base/modules/mdcDriveTypeParamConfig/MdcDriveTypeParamConfigForm.vue
@@ -139,7 +139,7 @@
        ],
        englishName: [
          { required: true, message: '请输入英文名称!' },
          { pattern: /^.{2,18}$/, message: '请输入2到18位任意字符!' ,trigger:'blur'},
          // { pattern: /^.{2,24}$/, message: '请输入2到24位任意字符!' ,trigger:'blur'},
        ],
        showFlag: [
          { required: true, message: '请输入显示标志!' },