From e91ea94c5e06bd183c65999b49c7852205e1ac64 Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期三, 20 九月 2023 17:42:55 +0800
Subject: [PATCH] 1、工作日历管理页面增加表格单条数据删除功能 2、报警号管理页面与对比分析页面中的驱动类型数据不再使用数据字典,而采用调用接口获取数据方式 3、报警号管理页面的新增与编辑弹窗中的是否过滤选项切换器优化

---
 src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue |   63 +++++++++++++++++++++++++------
 1 files changed, 50 insertions(+), 13 deletions(-)

diff --git a/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue b/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue
index 00de61a..b586a1c 100644
--- a/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue
+++ b/src/views/mdc/base/modules/comparativeAnalysis/comparativeAnalysismain.vue
@@ -12,9 +12,15 @@
           <!--</a-col>-->
           <a-col :md="5" :sm="5">
             <a-form-item label="椹卞姩绫诲瀷">
-              <j-dict-select-tag placeholder="璇烽�夋嫨椹卞姩绫诲瀷"
-                                 :triggerChange="true" dictCode="mdc_driveType"
-                                 v-model="queryParam.driveType" allow-clear/>
+              <!--<j-dict-select-tag placeholder="璇烽�夋嫨椹卞姩绫诲瀷"-->
+                                 <!--:triggerChange="true" dictCode="mdc_driveType"-->
+                                 <!--v-model="queryParam.driveType" allow-clear/>-->
+              <a-auto-complete
+                v-model="queryParam.driveType"
+                :data-source="driveTypeList"
+                placeholder="椹卞姩绫诲瀷"
+                :filter-option="filterOption"
+              />
             </a-form-item>
           </a-col>
           <a-col :md="9" :sm="9" :xs="4">
@@ -34,13 +40,13 @@
     <!-- table鍖哄煙-begin -->
     <div id="DeviceList">
       <a-tabs :activeKey="activeKey" @change="tabChange" tabPosition="top">
-        <a-tab-pane key="1" tab="鍥惧舰" force-render>
+        <a-tab-pane key="1" tab="鍥惧舰">
           <comparative-analysis-bar ref="AnalysisBar" :dataList='AnalysisBarList'></comparative-analysis-bar>
         </a-tab-pane>
-        <a-tab-pane key="2" tab="浠〃">
+        <a-tab-pane key="2" tab="浠〃" forceRender>
           <comparative-analysis-gauge ref="AnalysisGauge" :dataList="AnalysisGauge"></comparative-analysis-gauge>
         </a-tab-pane>
-        <a-tab-pane key="3" tab="楗煎浘">
+        <a-tab-pane key="3" tab="楗煎浘" forceRender>
           <conparative-analysis-pie ref="AnalysisPie" :dataList="AnalysisPie"></conparative-analysis-pie>
         </a-tab-pane>
       </a-tabs>
@@ -68,6 +74,7 @@
   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'
   export default {
     name: 'comparativeAnalysismain',
     // mixins: [JeecgListMixin],
@@ -102,7 +109,8 @@
         url: {
           comparativeAnalysis:'/mdc/efficiencyReport/comparativeAnalysis'
         },
-        AnalysisList:{}
+        AnalysisList:{},
+        driveTypeList:[]
       }
     },
     watch:{
@@ -193,10 +201,12 @@
             this.AnalysisBarList = res.result.graphics
             this.AnalysisGauge = res.result.meters
             this.AnalysisPie.push(res.result.pieCharts)
-            console.log(res.result.pieCharts)
-            console.log(this.AnalysisPie)
           }else{
-            this.$message.warning(res.message)
+            // this.$message.warning(res.message)
+            this.$notification.warning({
+              message:'娑堟伅',
+              description:res.message
+            });
           }
         }).finally(() => {
           this.loading = false
@@ -232,7 +242,11 @@
               this.AnalysisGauge = res.result.meters
               this.AnalysisPie.push(res.result.pieCharts)
             }else{
-              this.$message.warning(res.message)
+              // this.$message.warning(res.message)
+              this.$notification.warning({
+                message:'娑堟伅',
+                description:res.message
+              });
             }
           }).finally(() => {
             this.loading = false
@@ -262,13 +276,35 @@
               this.AnalysisGauge = res.result.meters
               this.AnalysisPie.push(res.result.pieCharts)
             }else{
-              this.$message.warning(res.message)
+              // this.$message.warning(res.message)
+              this.$notification.warning({
+                message:'娑堟伅',
+                description:res.message
+              });
             }
           }).finally(() => {
             this.loading = false
           })
         }
-
+      },
+      /**
+       * 璋冪敤鎺ュ彛鑾峰彇鎺у埗绯荤粺绫诲瀷
+       */
+      getDriveTypeByApi(){
+        api.getDriveTypeApi().then((res)=>{
+          this.driveTypeList=res.result.map(item=>item.value)
+        })
+      },
+      /**
+       * 鑱旀兂杈撳叆妗嗙瓫閫夊姛鑳�
+       * @param input 杈撳叆鐨勫唴瀹�
+       * @param option 閰嶇疆
+       * @returns {boolean} 鍒ゆ柇鏄惁绛涢��
+       */
+      filterOption(input, option) {
+        return (
+          option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
+        );
       },
       // onChange(value, dateString) {
       //   // console.log('Selected Time: ', value);
@@ -388,6 +424,7 @@
       this.queryParam.endTime = moment(this.dates[1]).format('YYYYMMDD')
       this.queryParam.typeTree = "1";
       this.loadAnalysis();
+      this.getDriveTypeByApi()
     }
   }
 </script>

--
Gitblit v1.9.3