From f67b4c736c68cd3d1f75e5fc6b6e23189f12b979 Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期二, 19 十二月 2023 11:34:57 +0800
Subject: [PATCH] 设备管理增加按车间筛选条件

---
 src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue |   45 ++++++++++++++++++++++++++++-----------------
 1 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue b/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue
index f4c5aa5..bccdd0f 100644
--- a/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue
+++ b/src/views/mdc/base/modules/deviceRepair/DeviceRepairList.vue
@@ -1,10 +1,10 @@
 <template>
-  <a-card :bordered="false" class="device_list">
+  <div :bordered="false" class="device_list">
     <!-- 鏌ヨ鍖哄煙 -->
     <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="9" :sm="9">
+          <a-col :md="7" :sm="7">
             <a-form-item label="鏃堕棿">
               <a-range-picker @change="dateParamChange" v-model="dates"  format="YYYY-MM-DD HH:mm:ss"/>
             </a-form-item>
@@ -19,15 +19,23 @@
               <a-input placeholder="杈撳叆璁惧鍚嶇О鏌ヨ" v-model="queryParams.equipmentName"></a-input>
             </a-form-item>
           </a-col>
-          <a-col :md="2" :sm="3" :xs="3">
-            <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
-          </a-col>
           <a-col :md="2" :sm="2" :xs="2">
-            <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
+            <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="handleExportXls('缁翠慨浼戠彮绠$悊')" icon="download">瀵煎嚭</a-button>
+            </a-space>
           </a-col>
-          <a-col :lg="2" :md="3" :sm="3" :xs="3">
-            <a-button type="primary" @click="exportExcel" icon="download">瀵煎嚭</a-button>
-          </a-col>
+          <!--<a-col :md="2" :sm="3" :xs="3">-->
+            <!--<a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>-->
+          <!--</a-col>-->
+          <!--<a-col :md="2" :sm="2" :xs="2">-->
+            <!--<a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>-->
+          <!--</a-col>-->
+          <!--<a-col :lg="2" :md="3" :sm="3" :xs="3">-->
+            <!--&lt;!&ndash;<a-button type="primary" @click="exportExcel" icon="download">瀵煎嚭</a-button>&ndash;&gt;-->
+            <!--<a-button type="primary" @click="handleExportXls('缁翠慨浼戠彮绠$悊')" icon="download">瀵煎嚭</a-button>-->
+          <!--</a-col>-->
         </a-row>
       </a-form>
     </div>
@@ -63,12 +71,11 @@
       </a-table>
     </div>
     <!-- table鍖哄煙-end -->
-    <device-repair-model ref="modalForm" @ok="modalFormOk"></device-repair-model>
+    <device-repair-model ref="modalForm" :equipmentId="queryParams.equipmentId" @ok="modalFormOk"></device-repair-model>
     <!--<device-repair-model-add  ref="modalFormadd" @ok="modalFormOk"></device-repair-model-add>-->
     <device-repair-model-edit ref="modalFormedit" @ok="modalFormOk"></device-repair-model-edit>
     <!--<repair-model ref="repairModelFrom" @ok="modalFormOk">0</repair-model>-->
-
-  </a-card>
+  </div>
 </template>
 
 <script>
@@ -92,10 +99,12 @@
   import JEllipsis from '@/components/jeecg/JEllipsis'
   import Tooltip from 'ant-design-vue/es/tooltip'
   import { ajaxGetDictItems, getDictItemsFromCache, duplicateCheck } from '@/api/api'
+  import ACol from 'ant-design-vue/es/grid/Col'
   export default {
     name: 'DeviceRepairList',
     mixins: [JeecgListMixin],
     components: {
+      ACol,
       Tooltip,
       DeviceRepairModel,
       DeviceRepairModelAdd,
@@ -163,6 +172,7 @@
           list: '/mdc/mdcEquipmentRepair/pageList',
           deleteBatch: '/mdc/mdcEquipmentRepair/delete',
           getEquipmentByPid: '/mdc/mdcequipment/getEquipmentByPid',
+          exportXlsUrl:'/mdc/mdcEquipmentRepair/exportXls'
         }
       }
     },
@@ -180,10 +190,13 @@
             this.queryParamEquip.equipmentId = val.equipmentId
           } else {
             this.queryParamEquip.parentId = val.key
-            this.queryParams.equipmentId = ''
+            this.queryParams.equipmentId =''
           }
-          this.searchQuery()
+        }else{
+          this.queryParams.equipmentId=''
+          this.queryParamEquip.parentId = ""
         }
+        this.searchQuery()
       },
       nodePeople(val){
         if (JSON.stringify(val) != '{}') {
@@ -384,10 +397,8 @@
         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 = [];
@@ -541,7 +552,7 @@
         $("#DeviceList").table2excel({
           exclude: ".noExl",
           name: "Excel Document Name",
-          filename: "璁惧缁翠慨璇︽儏",
+          filename: "缁翠慨浼戠彮绠$悊",
           exclude_img: true,
           fileext: ".xls",
           exclude_links: true,

--
Gitblit v1.9.3