From 20f77a55f8eeaceb026d1c5ad96de75d6edb712a Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期四, 29 五月 2025 14:18:14 +0800
Subject: [PATCH] 1、报警分析页面报警页面调整比例饼图颜色 2、维修看板页面设备平均故障率柱状图Y轴去除%号以及去除柱子注释含义 3、设备管理页面新增弹窗添加禁止手输设备编号,新增安装位置字段(同时将MDC模块内所有设备名称显示调整为安装位置) 4、设备级看板页面的设备选择框新增安装位置显示 5、首页添加法士特沃克背景图 6、对比分析页面解决时间段查询选择框无法选择问题以及柱状图组件重置按钮关联设备树选择 7、OEE页面列表取消展示合格零件数量和加工零件数量字段,仅展示合格率字段

---
 src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue |  267 ++++++++++------------------------------------------
 1 files changed, 53 insertions(+), 214 deletions(-)

diff --git a/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue b/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue
index 32121ec..c6f8d44 100644
--- a/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue
+++ b/src/views/mdc/base/modules/comparativeAnalysis/ComparativeAnalysisMain.vue
@@ -5,11 +5,6 @@
       <div style="width: 100%; background-color: #fff" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="searchQuery">
           <a-row :gutter="24">
-            <!--<a-col :md="5" :sm="5">-->
-            <!--<a-form-item label="鍚嶇О">-->
-            <!--<a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" :readOnly="readOnly" v-model="queryParam.tierName"></a-input>-->
-            <!--</a-form-item>-->
-            <!--</a-col>-->
             <a-col :md="5" :sm="5">
               <a-form-item label="璁惧">
                 <a-input-search :readOnly="true" v-model="queryParam.equipmentId" @search="deviceSearch"
@@ -19,9 +14,6 @@
 
             <a-col :md="5" :sm="5">
               <a-form-item label="椹卞姩绫诲瀷">
-                <!--<j-dict-select-tag placeholder="璇烽�夋嫨椹卞姩绫诲瀷"-->
-                <!--:triggerChange="true" dictCode="mdc_driveType"-->
-                <!--v-model="queryParam.driveType" allow-clear/>-->
                 <a-auto-complete
                   v-model="queryParam.driveType"
                   :data-source="driveTypeList"
@@ -33,10 +25,10 @@
             </a-col>
             <a-col :md="6" :sm="6" :xs="6">
               <a-form-item label="鏃堕棿">
-                <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD"/>
+                <a-range-picker @change="dateParamChange" v-model="dates" format="YYYYMMDD" :allow-clear="false"/>
               </a-form-item>
             </a-col>
-            <a-col>
+            <a-col :md="5" :sm="5">
               <a-space>
                 <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
                 <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
@@ -47,7 +39,7 @@
       </div>
       <!-- table鍖哄煙-begin -->
       <div id="DeviceList">
-        <a-tabs :activeKey="activeKey" @change="tabChange" tabPosition="top">
+        <a-tabs>
           <a-tab-pane key="1" tab="鍥惧舰">
             <ComparativeAnalysisBar ref="AnalysisBar" :dataList='AnalysisBarList'></ComparativeAnalysisBar>
           </a-tab-pane>
@@ -68,43 +60,24 @@
 
 <script>
   import moment from 'moment'
-  import $ from 'jquery'
-  import JDictSelectTag from '@/components/dict/JDictSelectTag'
-  import JDate from '../../../../../components/jeecg/JDate'
-  import {
-    requestPut,
-    deleteAction,
-    getAction
-  } from '@/api/manage'
+  import { getAction } from '@/api/manage'
   import ComparativeAnalysisBar from './ComparativeAnalysisBar'
   import ComparativeAnalysisGauge from './ComparativeAnalysisGauge'
   import ComparativeAnalysisPie from './ComparativeAnalysisPie'
-  import '@/components/table2excel/table2excel'
-  import JInput from '@/components/jeecg/JInput'
-  import JEllipsis from '@/components/jeecg/JEllipsis'
-  import Tooltip from 'ant-design-vue/es/tooltip'
-  import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
   import api from '@/api/mdc'
   import SelectDeviceDrawer from '../../../../system/modules/SelectDeviceDrawer.vue'
 
   export default {
     name: 'ComparativeAnalysisMain',
-    // mixins: [JeecgListMixin],
     components: {
-      Tooltip,
       ComparativeAnalysisBar,
       ComparativeAnalysisGauge,
       ComparativeAnalysisPie,
-      JDictSelectTag,
-      JInput,
-      JDate,
-      JEllipsis,
       SelectDeviceDrawer
     },
     props: { nodeTree: '', Type: '', nodePeople: '' },
     data() {
       return {
-        activeKey: '1',
         typeTree: '',
         typeParent: 1,
         typeEquipment: 1,
@@ -112,15 +85,12 @@
         AnalysisGauge: [],
         AnalysisPie: [],
         dates: [],
-        xianshi: '',
-        readOnly: true,
         queryParam: {
           equipmentId: ''
         },
         queryParams: {},
         queryParamEquip: {},
         queryParamPeople: {},
-        dataStartsoucre: [],
         url: {
           comparativeAnalysis: '/mdc/efficiencyReport/comparativeAnalysis'
         },
@@ -132,19 +102,16 @@
       Type(valmath) {
         this.dataList = []
         this.queryParams.typeTree = valmath
-        // console.log(this.queryParams.typeTree)
       },
       nodeTree(val) { //鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢
         if (JSON.stringify(val) != '{}') {
           if (val.equipmentId) {
-            // this.$set(this.queryParam, 'tierName', val.title)
             this.queryParamEquip.parentId = ''
-            // this.queryParams.equipmentId = val.equipmentId
             this.queryParam.equipmentId = val.equipmentId
             this.queryParamEquip.equipmentId = val.equipmentId
           } else {
-            // this.$set(this.queryParam, 'tierName', val.title)
             this.queryParamEquip.parentId = val.key
+            this.queryParam.equipmentId = ''
             this.queryParams.equipmentId = ''
           }
           this.searchQuery()
@@ -167,71 +134,63 @@
       }
     },
     methods: {
-      tabChange(val) {
-        this.activeKey = val
-      },
       dateParamChange(v1, v2) {
-        // console.log(v1,v2)
         this.queryParam.startTime = v2[0]
         this.queryParam.endTime = v2[1]
-        console.log(v2[0], v2[1])
       },
+
       loadAnalysis() {
-        getAction(this.url.comparativeAnalysis, this.queryParam).then(res => {
-          if (res.success) {
-            this.AnalysisList = res.result
-            this.AnalysisBarList = res.result.graphics
-            this.AnalysisGauge = res.result.meters
-            this.AnalysisPie.push(res.result.pieCharts)
-          } else {
-            this.$message.warning(res.message)
-          }
-        }).finally(() => {
-          this.loading = false
-        })
-      },
-      searchQuery() {
-        if (this.dates && this.dates.length > 0) {
-          this.AnalysisList = []
-          this.AnalysisBarList = []
-          this.AnalysisGauge = []
-          this.AnalysisPie = []
-          if (this.queryParams.typeTree == '1') {
-            this.queryParams.parentId = this.queryParamEquip.parentId
-            // this.queryParams.equipmentId =  this.queryParamEquip.equipmentId
-          } else {
-            this.queryParams.parentId = this.queryParamEquip.parentId
-            // this.queryParams.equipmentId = ""
-          }
-          this.AnalysisList = []
-          //鑾峰彇鏌ヨ鏉′欢
-          this.queryParam.parentId = this.queryParams.parentId
-          // this.queryParam.equipmentId = this.queryParams.equipmentId
-          this.queryParam.typeTree = this.queryParams.typeTree
-          getAction(this.url.comparativeAnalysis, this.queryParam).then((res) => {
+        getAction(this.url.comparativeAnalysis, this.queryParam)
+          .then(res => {
             if (res.success) {
               this.AnalysisList = res.result
               this.AnalysisBarList = res.result.graphics
               this.AnalysisGauge = res.result.meters
               this.AnalysisPie.push(res.result.pieCharts)
             } else {
-              // this.$message.warning(res.message)
-              this.$notification.warning({
-                message: '娑堟伅',
-                description: res.message
-              })
+              this.$message.warning(res.message)
             }
-          }).finally(() => {
+          })
+          .finally(() => {
             this.loading = false
           })
-        } else {
-          this.$notification.warning({
-            message: '鎻愮ず',
-            description: '璇烽�夋嫨鏃堕棿'
-          })
-        }
-
       },
+
+      searchQuery() {
+        this.AnalysisList = []
+        this.AnalysisBarList = []
+        this.AnalysisGauge = []
+        this.AnalysisPie = []
+        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.queryParam.parentId = this.queryParams.parentId
+        // this.queryParam.equipmentId = this.queryParams.equipmentId
+        this.queryParam.typeTree = this.queryParams.typeTree
+        getAction(this.url.comparativeAnalysis, this.queryParam).then((res) => {
+          if (res.success) {
+            this.AnalysisList = res.result
+            this.AnalysisBarList = res.result.graphics
+            this.AnalysisGauge = res.result.meters
+            this.AnalysisPie.push(res.result.pieCharts)
+          } else {
+            // this.$message.warning(res.message)
+            this.$notification.warning({
+              message: '娑堟伅',
+              description: res.message
+            })
+          }
+        }).finally(() => {
+          this.loading = false
+        })
+      },
+
       searchReset() {
         this.AnalysisList = []
         this.AnalysisBarList = []
@@ -277,7 +236,9 @@
           this.typeEquipment = this.queryParams.equipmentId
           this.queryParams = {}
           this.queryParam = {}
-          this.dates = []
+          this.dates = [moment().subtract('days', 7), moment().subtract('days', 0)]
+          this.queryParam.startTime = moment(this.dates[0]).format('YYYYMMDD')
+          this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
           this.queryParams.typeTree = this.typeTree
           this.queryParams.parentId = this.typeParent
           if (this.queryParams.parentId != '') {
@@ -307,6 +268,7 @@
           })
         }
       },
+
       /**
        * 璋冪敤鎺ュ彛鑾峰彇鎺у埗绯荤粺绫诲瀷
        */
@@ -315,6 +277,7 @@
           this.driveTypeList = res.result.map(item => item.value)
         })
       },
+
       /**
        * 鑱旀兂杈撳叆妗嗙瓫閫夊姛鑳�
        * @param input 杈撳叆鐨勫唴瀹�
@@ -326,119 +289,8 @@
           option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
         )
       },
-      // onChange(value, dateString) {
-      //   // console.log('Selected Time: ', value);
-      //   // console.log('Formatted Selected Time: ', dateString);
-      // },
-      // searchReset() {
-      //   if(this.queryParams.typeTree == "1"){
-      //     this.typeTree = this.queryParams.typeTree
-      //     this.typeParent =  this.queryParams.parentId
-      //     this.typeEquipment = this.queryParams.equipmentId
-      //     this.queryParams = {}
-      //     this.queryParam = {}
-      //     this.dates = []
-      //     this.queryParams.typeTree = this.typeTree
-      //     this.queryParams.parentId = this.typeParent
-      //     if(this.queryParams.parentId !=  ""){
-      //       this.queryParams.equipmentId =  ""
-      //     }else{
-      //       if(this.queryParams.equipmentId == this.queryParamEquip.equipmentId){
-      //         this.queryParams.equipmentId =  this.typeEquipment
-      //       }else{
-      //         this.queryParams.equipmentId = this.queryParamEquip.equipmentId
-      //       }
-      //
-      //     }
-      //
-      //     this.ipagination.current = 1
-      //     this.ResetloadData();
-      //   }else{
-      //     this.typeTree = this.queryParams.typeTree
-      //     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
-      //     // this.queryParams.equipmentId =  this.typeEquipment
-      //     this.ipagination.current = 1
-      //     this.ResetloadData();
-      //   }
-      //
-      // },
-      // ResetloadData() {
-      //   if(!this.url.list){
-      //     this.$message.error("璇疯缃畊rl.list灞炴��!")
-      //     return
-      //   }
-      //   var params = {}
-      //   params.typeTree = this.queryParams.typeTree
-      //   params.parentId = this.queryParams.parentId
-      //   params.equipmentId = this.queryParams.equipmentId
-      //   this.loading = true;
-      //   getAction(this.url.list, params).then((res) => {
-      //     if (res.success) {
-      //       this.dataSource = res.result.records||res.result;
-      //     }else{
-      //       this.$message.warning(res.message)
-      //     }
-      //   }).finally(() => {
-      //     this.loading = false
-      //   })
-      // },
-      // searchQuery(){
-      //   if(this.queryParams.typeTree == "1"){
-      //     this.queryParams.parentId =  this.queryParamEquip.parentId
-      //     // this.queryParams.equipmentId =  this.queryParamEquip.equipmentId
-      //
-      //   }else{
-      //     this.queryParams.parentId = this.queryParamPeople.parentId
-      //
-      //     // this.queryParams.equipmentId = ""
-      //   }
-      //   this.dataSource = [];
-      //   //鑾峰彇鏌ヨ鏉′欢
-      //   let  param = {}
-      //   param.parentId = this.queryParams.parentId;
-      //   param.equipmentId = this.queryParams.equipmentId;
-      //   param.startTime = this.queryParam.startTime;
-      //   param.driveType = this.queryParam.driveType;
-      //   param.endTime =  this.queryParam.endTime;
-      //   getAction(this.url.list,param).then((res) => {
-      //     if(res.success){
-      //       this.dataSource = res.result.records||res.result;
-      //     }else{
-      //       this.$message.warning(res.message)
-      //     }
-      //   }).finally(() => {
-      //     this.loading = false
-      //   })
-      // },
-      // loadData() {
-      //   if(!this.url.list){
-      //     this.$message.error("璇疯缃畊rl.list灞炴��!")
-      //     return
-      //   }
-      //   //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
-      //   var params = {}
-      //   this.loading = true;
-      //   params.startTime = this.queryParam.startTime;
-      //   params.endTime =  this.queryParam.endTime;
-      //   params.typeTree = this.queryParams.typeTree
-      //   getAction(this.url.list, params).then((res) => {
-      //     if (res.success) {
-      //       this.dataSource = res.result.records||res.result;
-      //     }else{
-      //       this.$message.warning(res.message)
-      //     }
-      //   }).finally(() => {
-      //     this.loading = false
-      //   })
-      // },
+
       deviceSearch() {
-        console.log('瑙﹀彂')
         this.$refs.selectDeviceDrawer.visible = true
         this.$refs.selectDeviceDrawer.selectedRowKeys = []
         this.$refs.selectDeviceDrawer.selectedRows = []
@@ -450,11 +302,6 @@
        * @param data 宸查�夋嫨鐨勮澶�
        */
       selectOK(data) {
-        // let params = {}
-        // params.equipmentIdList = []
-        // for (var a = 0; a < data.length; a++) {
-        //   params.equipmentIdList.push(data[a])
-        // }
         console.log('data=', data)
         this.queryParam.equipmentId = data.join(',')
         console.log('queryParam', this.queryParam.equipmentId)
@@ -472,8 +319,6 @@
 </script>
 
 <style lang="less" scoped>
-  /*@import '~@assets/less/common.less';*/
-
   @media screen and (min-width: 1920px) {
     .device_list {
       height: 811px !important;
@@ -509,12 +354,6 @@
     }
   }
 
-  /*.device_list{*/
-  /*display: flex;*/
-  /*}*/
-  /*.device_list .table-page-search-wrapper{*/
-  /**/
-  /*}*/
   /deep/ .ant-card-body {
     height: 100% !important;
   }

--
Gitblit v1.9.3