From e055d2d93b516985fbc2df0f6f5a135f3230cccf Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期四, 14 三月 2024 11:13:47 +0800
Subject: [PATCH] Merge branch 'master' of http://117.34.109.166:18448/r/vue_mdc_430 into develop

---
 src/views/mdc/base/EquipmentOperationParamsAlarm.vue |  120 +++++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 103 insertions(+), 17 deletions(-)

diff --git a/src/views/mdc/base/EquipmentOperationParamsAlarm.vue b/src/views/mdc/base/EquipmentOperationParamsAlarm.vue
index 2c37b68..400450a 100644
--- a/src/views/mdc/base/EquipmentOperationParamsAlarm.vue
+++ b/src/views/mdc/base/EquipmentOperationParamsAlarm.vue
@@ -4,13 +4,36 @@
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
-          <a-col :md="6" :sm="12">
+          <a-col :md="6" :sm="6">
             <a-form-item label="璁惧缂栧彿">
-              <a-input placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-model="queryParam.equipmentid"></a-input>
+              <a-input placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-model="queryParam.equipmentId"></a-input>
             </a-form-item>
           </a-col>
 
-          <a-col :md="6" :sm="8">
+          <a-col :md="6" :sm="6">
+            <a-form-item label="璁惧绫诲瀷">
+              <a-select placeholder="璇烽�夋嫨璁惧绫诲瀷" :triggerChange="true" v-model="queryParam.equipmentType"
+                        :allowClear="true">
+                <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'>
+                  {{item.equipmentTypeName}}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+
+          <a-col :md="6" :sm="6">
+            <a-form-item label="椹卞姩绫诲瀷">
+              <a-auto-complete
+                v-model="queryParam.driveType"
+                :data-source="driveTypeList"
+                placeholder="璇烽�夋嫨椹卞姩绫诲瀷"
+                :filter-option="filterOption"
+                :allowClear="true"
+              />
+            </a-form-item>
+          </a-col>
+
+          <a-col :md="6" :sm="6">
             <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
             <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
           </a-col>
@@ -27,21 +50,31 @@
       :columns="columns"
       :dataSource="dataSource"
       :pagination="ipagination"
-      :loading="loading"></a-table>
+      :loading="loading"
+      @change="handleTableChange"
+    ></a-table>
   </a-card>
 </template>
 
 <script>
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import api from '@/api/mdc'
+  import { putAction, getAction } from '@/api/manage'
 
   export default {
     name: 'EquipmentOperationParamsAlarm',
     mixins: [JeecgListMixin],
+    created(){
+      this.getDriveTypeByApi()
+      this.queryGroup()
+    },
     data() {
       return {
         name: 'EquipmentOperationParamsAlarm',
         description: '杩欐槸璁惧杩愯鍙傛暟鎶ヨ椤甸潰',
         queryParam: {},
+        driveTypeList:[],
+        selectList: [],
         columns: [
           {
             title: '#',
@@ -56,49 +89,102 @@
           {
             title: '璁惧缂栧彿',
             align: 'center',
-            dataIndex: 'equipmentid',
+            dataIndex: 'equipmentId',
             width: 250
           },
           {
             title: '鎶ヨ鏃堕棿',
             align: 'center',
-            dataIndex: 'collecttime',
+            dataIndex: 'createTime',
             width: 250
           },
           {
             title: '璁惧畾鍊�',
             align: 'center',
             width: 250,
-            dataIndex: 'setvalue'
+            dataIndex: 'setValue'
           },
           {
             title: '瀹為檯鍊�',
             align: 'center',
             width: 250,
-            dataIndex: 'realvalue'
+            dataIndex: 'realValue'
           },
-          {
-            title: '鎶ヨ鍙�',
-            align: 'center',
-            width: 250,
-            dataIndex: 'alarmno'
-          },
+          // {
+          //   title: '鎶ヨ鍙�',
+          //   align: 'center',
+          //   width: 250,
+          //   dataIndex: 'alarmno'
+          // },
           {
             title: '鎶ヨ鍐呭',
             align: 'center',
             width: 250,
-            dataIndex: 'alarmcontent'
+            dataIndex: 'alarmContent'
           }
         ],
         url: {
-          list: '/mdc/equipmentBeilvAlarm/list'
+          list: '/mdc/mdcOverrunAlarm/list',
+          queryEquipmentType: '/mdc/mdcEquipmentType/queryEquipmentType'
+        },
+        ipagination:{
+          current: 1,
+          pageSize: 30,
+          pageSizeOptions: ['30', '50', '100'],
+          showTotal: (total, range) => {
+            return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
+          },
+          showQuickJumper: true,
+          showSizeChanger: true,
+          total: 0
         },
         /* 鎺掑簭鍙傛暟 */
         isorter: {
-          column: 'collecttime',
+          column: 'createTime',
           order: 'desc'
         }
       }
+    },
+    methods:{
+      /**
+       * 璋冪敤鎺ュ彛鑾峰彇鎺у埗绯荤粺绫诲瀷
+       */
+      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
+        );
+      },
+
+      queryGroup() {
+        getAction(this.url.queryEquipmentType).then(res => {
+          if (res.success) {
+            this.selectList = res.result
+            // this.selectList = res.result.map((item, index, arr) => {
+            //   return { label: item.id, value: item.equipmentTypeName + '' }
+            // })
+          } else {
+            // this.$message.warning(res.message)
+            this.$notification.warning({
+              message: '娑堟伅',
+              description: res.message
+            })
+          }
+        }).finally(() => {
+          this.loading = false
+        })
+      },
     }
   }
 </script>

--
Gitblit v1.9.3