From 1e1e70da5288f47d8770ba2e7f22f3362e5b577c Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期五, 08 十二月 2023 17:16:35 +0800
Subject: [PATCH] 1、全局修改密码弹窗中的新密码校验长度与数据字典password_length设置保持一致 2、报警分析页面优化过快点击多次表格行时图表内容出现数据残留以及加载图表应设置加载中动画,若不设置用户在查询时短时间内不清楚有无数据 3、车间看板以及设备监控页面设备详情弹窗右上角增加关闭按钮、设备详情弹窗透明度加深、设备详情弹窗图表表盘指针对比色加强、调整设备详情弹窗中描述列表子项标题对齐方式由左对齐改为右对齐,锁定运行数据描述列表子项数值宽度,超出部分隐藏出现省略号,悬浮出现气泡卡片 4、设备利用率、设备开动率、班次利用率页面表格前三列增加表头,依次为公司、车间、工段以及表格有关时间值调整为若小时或分钟为0则不显示 5、设备综合效率分析页面表格数据默认每页最多显示10条改为20条 6、设备加工工件报表页面完成布局及功能实现

---
 src/views/mdc/base/DeviceProcessReport.vue                                 |  139 +++++++++
 src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue                 |   15 
 src/views/mdc/base/modules/deviceBaseInfo/EqumentDetaiModel.vue            |   79 +++-
 src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue |  439 +++++++++++++++++++++++++++++
 src/views/mdc/base/modules/WorkshopSignage/EquipmentDetailModal.vue        |   89 ++++-
 src/components/tools/UserPassword.vue                                      |   19 
 src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue             |  120 ++++++-
 7 files changed, 805 insertions(+), 95 deletions(-)

diff --git a/src/components/tools/UserPassword.vue b/src/components/tools/UserPassword.vue
index e15b51d..0067138 100644
--- a/src/components/tools/UserPassword.vue
+++ b/src/components/tools/UserPassword.vue
@@ -88,8 +88,12 @@
         username:"",
       }
     },
-    created(){
-      // this.initDictData('password_length')
+    watch:{
+      visible:{
+        handler(value){
+          if(value) this.initDictData('password_length')
+        }
+      }
     },
     methods: {
       show(uname){
@@ -103,19 +107,14 @@
         }
       },
       initDictData(dictCode) {
-        //浼樺厛浠庣紦瀛樹腑璇诲彇瀛楀吀閰嶇疆
-        if (getDictItemsFromCache(dictCode)) {
-          return getDictItemsFromCache(dictCode);
-        }
         //鏍规嵁瀛楀吀Code, 鍒濆鍖栧瓧鍏告暟缁�
         ajaxGetDictItems(dictCode, null).then((res) => {
           if (res.success) {
-            const regx = new RegExp(/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{12,}$/);
+            const regExp = new RegExp("^(?=.*[a-zA-Z])(?=.*\\\d)(?=.*[~!@#$%^&*()_+`\\-={}:\";'<>?,./]).{"+Number(res.result[0].value)+",}$");
             this.validatorRules.password.rules[2]={
-              pattern: regx,
-              message: '瀵嗙爜鐢�8浣嶆暟瀛椼�佸ぇ灏忓啓瀛楁瘝鍜岀壒娈婄鍙风粍鎴�!',
+              pattern: regExp,
+              message: `瀵嗙爜鐢�${res.result[0].value}浣嶆暟瀛椼�佸ぇ灏忓啓瀛楁瘝鍜岀壒娈婄鍙风粍鎴�!`,
             }
-            return res.result
           }
         })
       },
diff --git a/src/views/mdc/base/DeviceProcessReport.vue b/src/views/mdc/base/DeviceProcessReport.vue
new file mode 100644
index 0000000..ee790c5
--- /dev/null
+++ b/src/views/mdc/base/DeviceProcessReport.vue
@@ -0,0 +1,139 @@
+<template>
+  <div style="width: 100%; height: 100%;">
+    <a-card :bordered="false">
+      <a-row type="flex" :gutter="16">
+        <a-col :md="5">
+          <a-tabs :activeKey="activeKey" @change="tabChange">
+            <a-tab-pane key="1" tab="杞﹂棿灞傜骇" force-render>
+              <base-tree @getCurrSelected="changeSelectionNode"></base-tree>
+            </a-tab-pane>
+            <a-tab-pane v-if="isDepartType == 0" key="2" tab="閮ㄩ棬灞傜骇">
+              <depart-tree @getCurrSelectedDD="changeSelectionNodedd"></depart-tree>
+            </a-tab-pane>
+          </a-tabs>
+        </a-col>
+
+        <a-col :md="19">
+          <DeviceProcessReportList ref="deviceList" :nodeTree='selectEquement' :nodePeople='selectPeople'
+                                   :Type="slectTypeTree"/>
+        </a-col>
+      </a-row>
+    </a-card>
+  </div>
+
+</template>
+
+<script>
+  import { putAction, getAction } from '@/api/manage'
+  import { frozenBatch } from '@/api/api'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import JInput from '@/components/jeecg/JInput'
+  import BaseTree from '../common/BaseTree'
+  import EfficiencyShiftList from './modules/efficiencyShiftReport/EfficiencyShiftList'
+  import JSuperQuery from '@/components/jeecg/JSuperQuery'
+  import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton'
+  import DepartTree from './modules/DepartList/DepartListTree/DepartTree'
+  import { mapActions } from 'vuex'
+  import DeviceProcessReportList from './modules/DeviceProcessReport/DeviceProcessReportList'
+
+  export default {
+    name: 'DeviceProcessReport',
+    components: {
+      DeviceProcessReportList,
+      JThirdAppButton,
+      JInput,
+      BaseTree,
+      JSuperQuery,
+      DepartTree,
+      EfficiencyShiftList
+    },
+    data() {
+      return {
+        activeKey: '1',
+        description: '璁惧淇℃伅',
+        selectEquementId: '',
+        selectEquement: {},
+        slectTypeTree: '',
+        selectPeople: {},
+        url: {
+          equipmentStatistics: '/mdc/equipment/equipmentStatistics'
+        },
+        isDepartType: ''
+      }
+    },
+    created() {
+      this.queryTreeData()
+    },
+    methods: {
+      ...mapActions(['QueryDepartTree']),
+      queryTreeData() {
+        this.QueryDepartTree().then(res => {
+          if (res.success) {
+            this.isDepartType = res.result[0].value
+          } else {
+            // this.$message.warn(res.message)
+            this.$notification.warning({
+              message: '娑堟伅',
+              description: res.message
+            })
+          }
+        }).finally(() => {
+        })
+      },
+      tabChange(val) {
+        // console.log(val);
+        this.activeKey = val
+        this.slectTypeTree = val
+      },
+      changeSelectionNode(val) {
+        this.selectEquement = val
+        this.slectTypeTree = '1'
+      },
+      changeSelectionNodedd(val) {
+        this.selectPeople = val
+        this.slectTypeTree = '2'
+      }
+    }
+
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+
+  .equipMessage {
+    width: 100%;
+    height: 10%;
+  }
+
+  .equipMessage table {
+    width: 60%;
+    height: 100%;
+    line-height: 50%;
+  }
+
+  .equipMessage table td {
+    text-align: center;
+  }
+
+  .equipMessage table td span {
+    display: inline-block;
+    width: 15px;
+    height: 15px;
+  }
+
+  .equipMessage table td .equipShutdown {
+    background-color: #808080;
+  }
+
+  .equipMessage table td .equipStandby {
+    background-color: #ffbf37;
+  }
+
+  .equipMessage table td .equipRun {
+    background-color: #19FE01;
+  }
+
+  .equipMessage table td .equipAlarm {
+    background-color: #FD0008;
+  }
+</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue b/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue
new file mode 100644
index 0000000..a4b39d9
--- /dev/null
+++ b/src/views/mdc/base/modules/DeviceProcessReport/DeviceProcessReportList.vue
@@ -0,0 +1,439 @@
+<template>
+  <div style="width: 100%;">
+    <div :bordered="false">
+      <!-- 鏌ヨ鍖哄煙 -->
+      <div class="seach-content">
+        <div class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="searchQuery">
+            <a-row :gutter="24">
+              <a-col :md="5" :sm="5" :xs="5">
+                <a-form-item label="椹卞姩绫诲瀷">
+                  <a-auto-complete
+                    v-model="queryParam.driveType"
+                    :data-source="driveTypeList"
+                    placeholder="璇烽�夋嫨椹卞姩绫诲瀷"
+                    :filter-option="filterOption"
+                  />
+                </a-form-item>
+              </a-col>
+
+              <a-col :md="5" :sm="5" :xs="5">
+                <a-form-item label="鏃堕棿">
+                  <a-range-picker
+                    :placeholder="['寮�濮嬫椂闂�', '缁撴潫鏃堕棿']"
+                    format="YYYY-MM-DD"
+                    :value="dates"
+                    @change="dateParamChange"
+                  />
+                </a-form-item>
+              </a-col>
+
+              <a-col :md="4" :sm="4" :xs="4">
+                <a-space>
+                  <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+                  <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
+                  <a-button type="primary" @click="exportExcel" icon="download">瀵煎嚭</a-button>
+                </a-space>
+              </a-col>
+            </a-row>
+          </a-form>
+
+        </div>
+      </div>
+
+      <div class="container" id="EfficiencyShift" style="margin-top: 20px;">
+        <div class="table2">
+          <a-table :columns="columns" :dataSource="dataSource.records" :pagination="false" bordered>
+            <span slot="duration" slot-scope="text">{{getFormattedTime(text)}}</span>
+          </a-table>
+        </div>
+      </div>
+      <div class="pagination">
+        <a-pagination
+          :total=dataSource.total
+          :show-total="(total, range) => `${range[0]}-${range[1]} 鍏� ${total} 鏉"
+          :page-size="+queryParam.pageSize"
+          :default-current="1"
+          :current=+queryParam.pageNo
+          show-size-changer
+          :pageSizeOptions="['20','30','40','50']"
+          @change="handlePageNoChange"
+          @showSizeChange="handlePageSizeChange"
+        />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  import moment from 'moment'
+  import { putAction, getAction } from '@/api/manage'
+  import $ from 'jquery'
+  import '@/components/table2excel/table2excel'
+  import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
+  import api from '@/api/mdc'
+
+  export default {
+    name: 'DeviceProcessReportList',
+    components: {},
+    data() {
+      return {
+        typeTree: '',
+        typeParent: 1,
+        typeEquipment: 1,
+        allowClear: true,
+        allowClearSu: true,
+        dates: [moment(), moment()],
+        identifying: [],
+        queryParam: {
+          pageSize: 20,
+          pageNo: 1
+        },
+        queryParamEquip: {},
+        queryParamPeople: {},
+        url: {
+          list: '/mdc/mdcProcessCount/list'
+        },
+        columns: [
+          {
+            title: '搴忓彿',
+            dataIndex: '',
+            key: 'rowIndex',
+            width: 70,
+            align: 'center',
+            customRender: function(t, r, index) {
+              return parseInt(index) + 1
+            }
+            // fixed: 'left'
+          },
+          {
+            title: '璁惧缁熶竴缂栧彿',
+            align: 'center',
+            dataIndex: 'equipmentId',
+            width: 120
+          },
+          {
+            title: '璁惧鍚嶇О',
+            align: 'center',
+            width: 150,
+            dataIndex: 'equipmentName'
+          },
+          {
+            title: '椹卞姩绫诲瀷',
+            align: 'center',
+            width: 110,
+            dataIndex: 'driveType'
+          },
+          {
+            title: '绋嬪簭鍙�',
+            align: 'center',
+            width: 100,
+            dataIndex: 'sequenceNumber'
+          },
+          {
+            title: '鍔犲伐浠舵暟',
+            align: 'center',
+            width: 80,
+            dataIndex: 'processCount'
+          },
+          {
+            title: '鎸佺画鏃堕棿',
+            dataIndex: 'duration',
+            align: 'center',
+            scopedSlots: { customRender: 'duration' },
+            width: 110
+          },
+          {
+            title: '鏃ユ湡',
+            dataIndex: 'theDate',
+            align: 'center',
+            width: 110
+          }
+        ],
+        dataSource: [],
+        driveTypeList: []
+      }
+    },
+    props: { nodeTree: '', Type: '', nodePeople: '' },
+    created() {
+      this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD')
+      this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
+      this.queryParam.typeTree = '1'
+      this.loadData()
+      this.getDriveTypeByApi()
+    },
+    watch: {
+      Type(valmath) {
+        this.dataList = []
+        this.queryParam.typeTree = valmath
+      },
+      nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
+        console.log(val)
+        if (JSON.stringify(val) != '{}') {
+          if (val.equipmentId != null) {
+            this.queryParamEquip.parentId = ''
+            this.queryParamEquip.equipmentId = val.equipmentId
+          } else {
+            this.queryParamEquip.parentId = val.key
+            this.queryParamEquip.equipmentId = ''
+          }
+          this.searchQuery()
+        }
+      },
+      nodePeople(val) {
+        if (JSON.stringify(val) != '{}') {
+          if (val.equipmentId != null) {
+            this.queryParamPeople.parentId = val.equipmentId
+            this.queryParamPeople.equipmentId = ''
+          } else {
+            this.queryParamPeople.parentId = val.key
+            this.queryParamPeople.equipmentId = ''
+          }
+          this.searchQuery()
+        }
+      }
+    },
+    filters: {
+      numFilter(value) {
+        if (value) {
+          return parseFloat((value * 100).toFixed(2))
+        } else {
+          return '0'
+        }
+      }
+    },
+    methods: {
+      dateParamChange(value) {
+        this.dates = value
+        console.log('value', value)
+        this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD')
+        this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
+      },
+
+      exportExcel() {
+        $('#EfficiencyShift').table2excel({
+          exclude: '.noExl',
+          name: 'Excel Document Name',
+          filename: '璁惧鍔犲伐宸ヤ欢鎶ヨ〃',
+          exclude_img: true,
+          fileext: '.xls',
+          exclude_links: true,
+          exclude_inputs: true
+        })
+      },
+
+      searchQuery() {
+        if (this.dates != '') {
+          if (this.queryParam.typeTree == '1') {
+            this.queryParam.parentId = this.queryParamEquip.parentId
+            this.queryParam.equipmentId = this.queryParamEquip.equipmentId
+          } else {
+            this.queryParam.parentId = this.queryParamPeople.parentId
+            this.queryParam.equipmentId = ''
+          }
+          this.queryParam.pageNo = 1
+          this.loadData()
+        } else {
+          // this.$message.warning("璇烽�夋嫨鏃堕棿")
+          this.$notification.warning({
+            message: '娑堟伅',
+            description: '璇烽�夋嫨鏃堕棿'
+          })
+        }
+        // this.onClearSelected()
+      },
+
+      searchReset() {
+        this.queryParam = {
+          pageSize: 20,
+          pageNo: 1
+        }
+        this.dates = []
+        this.loadData()
+      },
+
+      loadData() {
+        getAction(this.url.list, this.queryParam).then(res => {
+          if (res.success) {
+            this.dataSource = res.result
+          }
+        })
+      },
+
+      /**
+       * 璋冪敤鎺ュ彛鑾峰彇鎺у埗绯荤粺绫诲瀷
+       */
+      getDriveTypeByApi() {
+        api.getDriveTypeApi().then((res) => {
+          this.driveTypeList = res.result.map(item => item.value)
+        })
+      },
+
+      /**
+       * 鏍煎紡鍖栨椂闂�
+       * @param seconds 绉掓暟
+       * @returns '' 鏍煎紡鍖栧悗鏃堕棿瀛楃涓�
+       */
+      getFormattedTime(seconds) {
+        var hours = Math.floor(seconds / 3600)
+        var minutes = Math.floor((seconds % 3600) / 60)
+        var secs = seconds % 60
+
+        if (hours === 0) {
+          if (minutes === 0) {
+            return secs === 0 ? 0 : `${secs}绉抈
+          } else {
+            if (secs === 0) {
+              return `${minutes}鍒哷
+            }
+            return `${minutes}鍒� ${secs}绉抈
+          }
+        } else {
+          if (minutes === 0 && secs === 0) {
+            return `${hours}灏忔椂`
+          } else if (minutes !== 0 && secs === 0) {
+            return `${hours}灏忔椂 ${minutes}鍒哷
+          }
+        }
+        return `${hours}灏忔椂 ${minutes}鍒� ${secs}绉抈
+      },
+
+      /**
+       * 鍒嗛〉鍣ㄩ〉鏁板彂鐢熸敼鍙樻椂瑙﹀彂
+       * @param page 鏀瑰彉鍚庨〉鏁�
+       * @param pageSize 鏀瑰彉鍚庢瘡椤靛睍绀烘暟鎹潯鏁�
+       */
+      handlePageNoChange(page, pageSize) {
+        this.queryParam.pageNo = page
+        this.loadData()
+      },
+
+      /**
+       * 鍒嗛〉鍣ㄦ瘡椤靛睍绀烘暟鎹潯鏁板彂鐢熸敼鍙樻椂瑙﹀彂
+       * @param current 鏀瑰彉鍚庨〉鏁�
+       * @param size 鏀瑰彉鍚庢瘡椤靛睍绀烘暟鎹潯鏁�
+       */
+      handlePageSizeChange(current, size) {
+        this.queryParam.pageSize = size
+        this.loadData()
+      },
+
+      /**
+       * 鑱旀兂杈撳叆妗嗙瓫閫夊姛鑳�
+       * @param input 杈撳叆鐨勫唴瀹�
+       * @param option 閰嶇疆
+       * @returns {boolean} 鍒ゆ柇鏄惁绛涢��
+       */
+      filterOption(input, option) {
+        return (
+          option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
+        )
+      }
+    }
+  }
+</script>
+<style scoped>
+  .table2 {
+    width: 100%;
+    height: 100%;
+    overflow: auto;
+  }
+
+  .pagination {
+    display: flex;
+    justify-content: end;
+    margin: 20px 0;
+  }
+
+  @media screen and (min-width: 1920px) {
+    #EfficiencyShift {
+      height: 670px !important;
+      overflow: scroll;
+    }
+  }
+
+  @media screen and (min-width: 1680px) and (max-width: 1920px) {
+    #EfficiencyShift {
+      height: 670px !important;
+      overflow: scroll;
+    }
+  }
+
+  @media screen and (min-width: 1400px) and (max-width: 1680px) {
+    #EfficiencyShift {
+      height: 522px !important;
+      overflow: scroll;
+    }
+  }
+
+  @media screen and (min-width: 1280px) and (max-width: 1400px) {
+    #EfficiencyShift {
+      height: 414px !important;
+      overflow: scroll;
+    }
+  }
+
+  @media screen and (max-width: 1280px) {
+    #EfficiencyShift {
+      height: 414px !important;
+      overflow: scroll;
+    }
+  }
+
+  .identifyingclass {
+    width: 55px;
+    height: 15px;
+    display: inline-block
+  }
+
+  .dataContent {
+    white-space: nowrap;
+    /*margin: 0;*/
+    /*border: none;*/
+    border-collapse: separate;
+    border-spacing: 0;
+    /*table-layout: fixed;*/
+    border: 1px solid #ccc;
+    /*border: 1px solid #ccc;*/
+    width: 100%;
+    /*height: 100%;*/
+    /*overflow: hidden;*/
+    /*overflow-y: auto;*/
+    text-align: center;
+  }
+
+  .dataContent .fixed th {
+    width: 50px;
+  }
+
+  .dataContent .thead th {
+    background-color: #fafafa;
+    text-align: center;
+    height: 30px;
+    padding: 5px;
+  }
+
+  .dataContent .notfixed th {
+    width: auto;
+  }
+
+  /*.dataContent tr td {*/
+  /*height: 35px*/
+  /*}*/
+
+  .dataContent .mathData td {
+    padding: 10px;
+    /*display: none;*/
+  }
+
+  .dataContent .mathData .td {
+    /*background-color: #ff9bd2;*/
+    display: inline-block;
+    padding: 10px;
+  }
+
+  .dataContent .mathData .tdd {
+    /*display: none;*/
+  }
+
+</style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue b/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue
index a68adbb..136a05d 100644
--- a/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue
+++ b/src/views/mdc/base/modules/OEEAnalysis/OEEAnalysisList.vue
@@ -41,7 +41,7 @@
               <a-col :md="8" :sm="8" :xs="8">
                 <a-space>
                   <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
-                  <!--<a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>-->
+                  <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
                   <a-button type="primary" @click="exportExcel" icon="download">瀵煎嚭</a-button>
                 </a-space>
               </a-col>
@@ -66,7 +66,7 @@
           :default-current="1"
           :current=+queryParam.pageNo
           show-size-changer
-          :pageSizeOptions="['10','15','20','25']"
+          :pageSizeOptions="['20','30','40','50']"
           @change="handlePageNoChange"
           @showSizeChange="handlePageSizeChange"
         />
@@ -95,7 +95,7 @@
         dates: [moment().subtract('month', 1), moment().subtract('month', 1)],
         identifying: [],
         queryParam: {
-          pageSize: 10,
+          pageSize: 20,
           pageNo: 1
         },
         queryParamEquip: {},
@@ -409,18 +409,11 @@
       },
 
       searchReset() {
-        this.typeTree = this.queryParam.typeTree
-        this.typeParent = this.queryParam.parentId
-        this.typeEquipment = this.queryParam.equipmentId
         this.queryParam = {
-          pageSize: 10,
+          pageSize: 20,
           pageNo: 1
         }
         this.dates = []
-        this.shiftSubList = []
-        this.queryParam.typeTree = this.typeTree
-        this.queryParam.parentId = this.typeParent
-        this.queryParam.equipmentId = this.typeEquipment
         this.loadData()
       },
 
diff --git a/src/views/mdc/base/modules/WorkshopSignage/EquipmentDetailModal.vue b/src/views/mdc/base/modules/WorkshopSignage/EquipmentDetailModal.vue
index 4e68f1a..bcb1fe9 100644
--- a/src/views/mdc/base/modules/WorkshopSignage/EquipmentDetailModal.vue
+++ b/src/views/mdc/base/modules/WorkshopSignage/EquipmentDetailModal.vue
@@ -9,7 +9,6 @@
       cancelText="鍏抽棴"
       wrap-class-name="full-modal"
       centered
-      :closable="false"
       :footer="null"
     >
       <div
@@ -230,13 +229,24 @@
                 v-show="mdcDriveTypeParamConfigList != null"
                 v-if="driverType != 'PLC'"
                 :column="4"
+                class="operationData"
               >
 
                 <a-descriptions-item
                   v-for="(item,id) in mdcDriveTypeParamConfigList  "
                   :key="item.id"
                   :label="item.chineseName"
-                >{{item.value}}
+                >
+                  <a-popover v-if="item.value&&item.value.length>18">
+                    <template slot="content">
+                      {{item.value}}
+                    </template>
+                    {{item.value}}
+                  </a-popover>
+
+                  <template v-else>
+                    {{item.value}}
+                  </template>
                 </a-descriptions-item>
 
               </a-descriptions>
@@ -254,16 +264,17 @@
               <!--&gt;{{item.value}}</a-descriptions-item>-->
               <!--</a-descriptions>-->
 
-              <a-descriptions
-                title="鐗堟湰淇℃伅 for lsv2"
-                v-if="driverType == 'LSV2'"
-                :column="4"
-              >
-                <a-descriptions-item label="NC鐗堟湰">{{resultData.nCVersion}}</a-descriptions-item>
-                <a-descriptions-item label="TNC鐗堟湰">{{resultData.tNCVersion}}</a-descriptions-item>
-                <a-descriptions-item label="OPT鐗堟湰">{{resultData.oPTVersion}}</a-descriptions-item>
-                <a-descriptions-item label="PLC鐗堟湰">{{resultData.pLCVersion}}</a-descriptions-item>
-              </a-descriptions>
+              <!--<a-descriptions-->
+                <!--title="鐗堟湰淇℃伅 for lsv2"-->
+                <!--v-if="driverType == 'LSV2'"-->
+                <!--:column="4"-->
+                <!--class="lsv2Data"-->
+              <!--&gt;-->
+                <!--<a-descriptions-item label="NC鐗堟湰">{{resultData.ncversion}}</a-descriptions-item>-->
+                <!--<a-descriptions-item label="TNC鐗堟湰">{{resultData.tncversion}}</a-descriptions-item>-->
+                <!--<a-descriptions-item label="OPT鐗堟湰">{{resultData.optversion}}</a-descriptions-item>-->
+                <!--<a-descriptions-item label="PLC鐗堟湰">{{resultData.plcversion}}</a-descriptions-item>-->
+              <!--</a-descriptions>-->
 
             </td>
           </tr>
@@ -287,10 +298,11 @@
     postAction
   } from '@/api/manage'
   import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
+  import Template1 from '../../../../jeecg/JVxeDemo/layout-demo/Template1'
 
   export default {
     name: 'EqumentDetaiModal',
-    components: {},
+    components: { Template1 },
     props: {},
     data() {
       return {
@@ -471,7 +483,7 @@
                   show: false
                 },
                 axisTick: {
-                  show: true,
+                  show: false,
                   length: 20,
                   splitNumber: 1,
                   lineStyle: {
@@ -526,7 +538,10 @@
                 },
                 pointer: {
                   show: true,
-                  width: 3
+                  width: 3,
+                  itemStyle:{
+                    color:'#fff'
+                  }
                 },
                 data: [{
                   name: '',
@@ -724,7 +739,7 @@
                   show: false
                 },
                 axisTick: {
-                  show: true,
+                  show: false,
                   length: 20,
                   splitNumber: 1,
                   lineStyle: {
@@ -779,7 +794,10 @@
                 },
                 pointer: {
                   show: true,
-                  width: 3
+                  width: 3,
+                  itemStyle:{
+                    color:'#fff'
+                  }
                 },
                 data: [{
                   name: '',
@@ -874,7 +892,7 @@
                 type: 'gauge',
                 radius: '80%',
                 min: 0, //鏈�灏忓埢搴�
-                max: 300, //鏈�澶у埢搴�
+                max: 100, //鏈�澶у埢搴�
                 splitNumber: 10, //鍒诲害鏁伴噺
                 startAngle: 225,
                 endAngle: -45,
@@ -977,7 +995,7 @@
                   show: false
                 },
                 axisTick: {
-                  show: true,
+                  show: false,
                   length: 20,
                   splitNumber: 1,
                   lineStyle: {
@@ -1001,12 +1019,12 @@
                 radius: '52.5%',
                 z: 3,
                 startAngle: 225,
-                max: 300,
+                max: 100,
                 endAngle: -45,
                 axisLine: {
                   lineStyle: {
                     color: [
-                      [_this.spindleload / 300, '#31F3FF'], // 鍔ㄦ��
+                      [_this.spindleload / 100, '#31F3FF'], // 鍔ㄦ��
                       [1, '#185363']
                     ],
                     width: 4
@@ -1032,7 +1050,10 @@
                 },
                 pointer: {
                   show: true,
-                  width: 3
+                  width: 3,
+                  itemStyle:{
+                    color:'#fff'
+                  }
                 },
                 data: [{
                   name: '',
@@ -1230,7 +1251,7 @@
                   show: false
                 },
                 axisTick: {
-                  show: true,
+                  show: false,
                   length: 20,
                   splitNumber: 1,
                   lineStyle: {
@@ -1285,7 +1306,10 @@
                 },
                 pointer: {
                   show: true,
-                  width: 3
+                  width: 3,
+                  itemStyle:{
+                    color:'#fff'
+                  }
                 },
                 data: [{
                   name: '',
@@ -1419,7 +1443,7 @@
       padding-bottom: 0;
       margin: 0;
       background-color: #4a4a48 !important;
-      opacity: 0.5;
+      opacity: 0.9;
     }
     /deep/ .ant-modal-content {
       display: flex;
@@ -1535,4 +1559,19 @@
   .ant-tabs-content .ant-form-item {
     margin-bottom: 0px;
   }
+
+  /deep/ .ant-descriptions-item-label{
+    width: 6.7vw;
+    text-align: right;
+    margin-right: 10px;
+  }
+
+  /deep/ .operationData .ant-descriptions-item-content,
+  .lsv2Data .ant-descriptions-item-content
+  {
+    width: 130px;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+  }
 </style>
diff --git a/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue b/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue
index 479b163..dfbbc21 100644
--- a/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue
+++ b/src/views/mdc/base/modules/alarmAnalysis/alarmAnalysisMain.vue
@@ -58,7 +58,8 @@
           <!--</div>-->
           <a-table :columns="columns" :data-source="dataList" bordered :pagination="false" :scroll="{y:168}"
                    :customRow="customRow"
-                   rowKey="alarmCode">
+                   rowKey="alarmCode"
+          >
             <span slot="timeCount" slot-scope="text">{{getFormattedTime(text)}}</span>
             <!--<a-table-->
               <!--slot="expandedRowRender"-->
@@ -66,15 +67,19 @@
               <!--:columns="innerColumns"-->
               <!--:data-source="row.innerDataList"-->
               <!--:pagination="false"-->
+              <!--rowKey="equipmentId"-->
             <!--&gt;-->
               <!--<span slot="duration" slot-scope="text">{{getFormattedTime(text)}}</span>-->
             <!--</a-table>-->
           </a-table>
         </div>
-        <div style="width: 100%;height: 55%;display: flex;">
-          <div id="MdcEquipmentWarningPie" style="height: 100%;width: 35%;"></div>
-          <div id="MdcEquipmentWarningLine" style="height: 100%;width: 65%;"></div>
-        </div>
+
+        <a-spin :spinning="spinning">
+          <div style="width: 100%;height: 100%;display: flex;">
+            <div id="MdcEquipmentWarningPie" style="height: 100%;width: 35%;"></div>
+            <div id="MdcEquipmentWarningLine" style="height: 100%;width: 65%;"></div>
+          </div>
+        </a-spin>
       </div>
     </div>
   </div>
@@ -126,6 +131,7 @@
         dataSource: [],
         /* table鍔犺浇鐘舵�� */
         loading: false,
+        spinning:false,
         typeTree: '',
         typeParent: 1,
         typeEquipment: 1,
@@ -226,23 +232,21 @@
       },
       TableDraw(key, val) {
         let that = this
+        that.spinning=true
         that.queryParam.alarmCode = val.alarmCode
         console.log(this.queryParam)
-        that.pieDate = []
-        that.XData = []
-        that.YData = []
-        getAction(that.url.alarmTrend, that.queryParam).then(res => {
+        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 j = 0; j < res.result.dateCountList.length; j++) {
-              that.XData.push(res.result.dateCountList[j].key)
-              that.YData.push(res.result.dateCountList[j].count)
-            }
+            that.pieDate=res.result.equipmentCountList.map(item=>{
+              return {
+                name:item.key,
+                value:item.count
+              }
+            })
+            that.XData=res.result.dateCountList.map(item=>item.key)
+            that.YData=res.result.dateCountList.map(item=>item.count)
+
             // this.tableHeads = res.result.dates
             // this.dataList = res.result
             // this.draw()
@@ -254,6 +258,9 @@
             that.drawWrin()
           }
         })
+          .finally(()=>{
+            that.spinning=false
+          })
         console.log(this.YData)
 
       },
@@ -387,15 +394,31 @@
           if (res.success) {
             // this.tableHeads = res.result.dates
             this.dataList = res.result
-            this.dataList.forEach(item => item.innerDataList = [
+            this.dataList[0].innerDataList=[
               {
                 equipmentId: '11234',
                 equipmentName: '绔嬩綋鏈哄簥',
                 alarmTime: 20,
                 endTime: 20,
                 duration: 123
+              },
+              {
+                equipmentId: '4213',
+                equipmentName: '鍗у鏈哄簥',
+                alarmTime: 312,
+                endTime: 31,
+                duration: 421
               }
-            ])
+            ]
+            this.dataList[1].innerDataList=[
+              {
+                equipmentId: '4213',
+                equipmentName: '鍗у鏈哄簥',
+                alarmTime: 312,
+                endTime: 31,
+                duration: 421
+              }
+            ]
             // this.draw()
             // this.checkSameData(this.dataList)
             // this.checkSameData1(this.dataList)
@@ -521,23 +544,26 @@
       /**
        * 鏍煎紡鍖栨椂闂�
        * @param seconds 绉掓暟
-       * @returns 鏍煎紡鍖栧悗鏃堕棿瀛楃涓�
+       * @returns '' 鏍煎紡鍖栧悗鏃堕棿瀛楃涓�
        */
       getFormattedTime(seconds) {
         var hours = Math.floor(seconds / 3600)
         var minutes = Math.floor((seconds % 3600) / 60)
         var secs = seconds % 60
 
-        if (hours == 0) {
-          if (minutes == 0) {
-            return `${secs}绉抈
+        if (hours === 0) {
+          if (minutes === 0 ) {
+            return secs === 0 ? 0 : `${secs}绉抈
           } else {
+            if(secs=== 0 ){
+              return `${minutes}鍒哷
+            }
             return `${minutes}鍒� ${secs}绉抈
           }
         } else {
-          if (minutes == 0 && secs == 0) {
+          if (minutes === 0 && secs === 0) {
             return `${hours}灏忔椂`
-          } else if (minutes != 0 && secs == 0) {
+          } else if (minutes !== 0 && secs === 0) {
             return `${hours}灏忔椂 ${minutes}鍒哷
           }
         }
@@ -553,10 +579,37 @@
       customRow(record, index) {
         return {
           on: {
-            click: () => {
-              this.TableDraw(index, record)
+            click: (event) => {
+              // 濡傛灉鐐瑰嚮鐨勪笉鏄睍寮�鍥炬爣鍖哄煙鍒欐覆鏌撳浘琛紝鐩稿弽鍒欑浉褰撲簬鐐瑰嚮灞曞紑鍥炬爣
+              if(event.target.className !== 'ant-table-row-expand-icon-cell'){
+                this.TableDraw(index, record)
+              }else{
+                if(event.target.children && event.target.children.length>0) event.target.children[0].click()
+              }
             }
           }
+        }
+      },
+
+      /**
+       * 鑷畾涔夊睍寮�琛ㄦ牸鍥炬爣
+       * @param props 鍥炬爣灞炴��
+       * @returns {null} 鑻ヤ富琛ㄦ暟鎹笅鏃犳暟鎹垯涓嶆樉绀哄浘鏍�
+       */
+      expandIcon(props){
+        console.log('props',props)
+        if (props.record.innerDataList&&props.record.innerDataList.length>0){
+          if (props.expanded) {
+            return <a style="margin-right:0px;color:#999" onClick={e=> {
+              props.onExpand(props.record, e);
+            }}><a-icon type="minus" /></a>
+          } else{
+            return <a style="margin-right:0px;color:#999" onClick={e => {
+              props.onExpand(props.record, e);
+            }}><a-icon type="plus"/></a>
+          }
+        }else{
+          return null
         }
       }
     }
@@ -781,4 +834,13 @@
     padding-bottom: 10px;
     cursor: pointer;
   }
+
+  /deep/ .ant-spin-nested-loading{
+    height: 55%;
+  }
+
+  /deep/ .ant-spin-container{
+    height: 100%;
+  }
+
 </style>
\ No newline at end of file
diff --git a/src/views/mdc/base/modules/deviceBaseInfo/EqumentDetaiModel.vue b/src/views/mdc/base/modules/deviceBaseInfo/EqumentDetaiModel.vue
index 1597667..d643a0b 100644
--- a/src/views/mdc/base/modules/deviceBaseInfo/EqumentDetaiModel.vue
+++ b/src/views/mdc/base/modules/deviceBaseInfo/EqumentDetaiModel.vue
@@ -92,6 +92,7 @@
                 <a-descriptions-item label="鏈夋晥杞存暟">{{resultData.ValidAxis}}</a-descriptions-item>
                 <a-descriptions-item label="鏈�澶ц酱鏁�">{{resultData.MaxAxis}}</a-descriptions-item>
                 <a-descriptions-item label="澶囨敞">{{resultData.remark}}</a-descriptions-item>
+
               </a-descriptions>
 
               <!-- <a-descriptions
@@ -228,13 +229,25 @@
                 v-show="mdcDriveTypeParamConfigList != null"
                 v-if="driverType != 'PLC'"
                 :column="4"
+                class="operationData"
               >
 
                 <a-descriptions-item
                   v-for="(item,id) in mdcDriveTypeParamConfigList  "
                   :key="item.id"
                   :label="item.chineseName"
-                >{{item.value}}</a-descriptions-item>
+                >
+                  <a-popover v-if="item.value&&item.value.length>18">
+                    <template slot="content">
+                      {{item.value}}
+                    </template>
+                    {{item.value}}
+                  </a-popover>
+
+                  <template v-else>
+                    {{item.value}}
+                  </template>
+                </a-descriptions-item>
 
               </a-descriptions>
 
@@ -251,16 +264,17 @@
                 <!--&gt;{{item.value}}</a-descriptions-item>-->
               <!--</a-descriptions>-->
 
-              <a-descriptions
-                title="鐗堟湰淇℃伅 for lsv2"
-                v-if="driverType == 'LSV2'"
-                :column="4"
-              >
-                <a-descriptions-item label="NC鐗堟湰">{{resultData.ncversion}}</a-descriptions-item>
-                <a-descriptions-item label="TNC鐗堟湰">{{resultData.tncversion}}</a-descriptions-item>
-                <a-descriptions-item label="OPT鐗堟湰">{{resultData.optversion}}</a-descriptions-item>
-                <a-descriptions-item label="PLC鐗堟湰">{{resultData.plcversion}}</a-descriptions-item>
-              </a-descriptions>
+              <!--<a-descriptions-->
+                <!--title="鐗堟湰淇℃伅 for lsv2"-->
+                <!--v-if="driverType == 'LSV2'"-->
+                <!--:column="4"-->
+                <!--class="lsv2Data"-->
+              <!--&gt;-->
+                <!--<a-descriptions-item label="NC鐗堟湰">{{resultData.ncversion}}</a-descriptions-item>-->
+                <!--<a-descriptions-item label="TNC鐗堟湰">{{resultData.tncversion}}</a-descriptions-item>-->
+                <!--<a-descriptions-item label="OPT鐗堟湰">{{resultData.optversion}}</a-descriptions-item>-->
+                <!--<a-descriptions-item label="PLC鐗堟湰">{{resultData.plcversion}}</a-descriptions-item>-->
+              <!--</a-descriptions>-->
 
             </td>
           </tr>
@@ -290,7 +304,6 @@
     props: {},
     data() {
       return {
-
         mdcDriveTypeParamConfigList: [],
         xyzAliasesList: [],
         title: '',
@@ -464,7 +477,7 @@
                   show: false,
                 },
                 axisTick: {
-                  show: true,
+                  show: false,
                   length: 20,
                   splitNumber: 1,
                   lineStyle: {
@@ -520,6 +533,9 @@
                 pointer: {
                   show: true,
                   width: 3,
+                  itemStyle:{
+                    color:'#fff',
+                  }
                 },
                 data: [{
                   name: '',
@@ -717,7 +733,7 @@
                   show: false,
                 },
                 axisTick: {
-                  show: true,
+                  show: false,
                   length: 20,
                   splitNumber: 1,
                   lineStyle: {
@@ -773,6 +789,9 @@
                 pointer: {
                   show: true,
                   width: 3,
+                  itemStyle:{
+                    color:'#fff'
+                  }
                 },
                 data: [{
                   name: '',
@@ -867,7 +886,7 @@
                 type: 'gauge',
                 radius: '80%',
                 min: 0, //鏈�灏忓埢搴�
-                max: 300, //鏈�澶у埢搴�
+                max: 100, //鏈�澶у埢搴�
                 splitNumber: 10, //鍒诲害鏁伴噺
                 startAngle: 225,
                 endAngle: -45,
@@ -970,7 +989,7 @@
                   show: false,
                 },
                 axisTick: {
-                  show: true,
+                  show: false,
                   length: 20,
                   splitNumber: 1,
                   lineStyle: {
@@ -994,12 +1013,12 @@
                 radius: '52.5%',
                 z: 3,
                 startAngle: 225,
-                max: 300,
+                max: 100,
                 endAngle: -45,
                 axisLine: {
                   lineStyle: {
                     color: [
-                      [_this.spindleload / 300, '#31F3FF'], // 鍔ㄦ��
+                      [_this.spindleload / 100, '#31F3FF'], // 鍔ㄦ��
                       [1, '#185363']
                     ],
                     width: 4
@@ -1026,6 +1045,9 @@
                 pointer: {
                   show: true,
                   width: 3,
+                  itemStyle:{
+                    color:'#fff'
+                  }
                 },
                 data: [{
                   name: '',
@@ -1223,7 +1245,7 @@
                   show: false,
                 },
                 axisTick: {
-                  show: true,
+                  show: false,
                   length: 20,
                   splitNumber: 1,
                   lineStyle: {
@@ -1279,6 +1301,9 @@
                 pointer: {
                   show: true,
                   width: 3,
+                  itemStyle:{
+                    color:'#fff'
+                  }
                 },
                 data: [{
                   name: '',
@@ -1439,7 +1464,7 @@
     /*background: -ms-linear-gradient(left, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
     /*background: linear-gradient(to right, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.4) 100%);*/
     background-color: #312c2c;
-    opacity: 0.7;
+    opacity: 0.9;
   }
   /deep/ .ant-modal-close {
     color: #1191b0;
@@ -1524,4 +1549,18 @@
   .ant-tabs-content .ant-form-item {
     margin-bottom: 0px;
   }
+
+  /deep/ .ant-descriptions-item-label{
+    width: 6.7vw;
+    text-align: right;
+    margin-right: 10px;
+  }
+
+  /deep/ .operationData .ant-descriptions-item-content
+  {
+    width: 130px;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+  }
 </style>

--
Gitblit v1.9.3