From 8a4d90d80c6ae8472bf11a1c1f148ca49c90f0a7 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期四, 29 五月 2025 15:42:59 +0800
Subject: [PATCH] 1、设备TEEP、设备开动率以及班次利用率页面时间选择器新增用户选择时对时间范围的限制功能并测试大数据导出功能 2、生产设备自主维护点检表设备编号的输入方式由手动输入调整为弹窗选择输入 3、生产设备自主维护点检表页面调整周保执行记录渲染逻辑(日期对应到周)

---
 src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue |  100 ++++++++++++++++++++++++++++----------------------
 1 files changed, 56 insertions(+), 44 deletions(-)

diff --git a/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue b/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue
index f799bac..f42b4d6 100644
--- a/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue
+++ b/src/views/mdc/base/modules/EquipmentList/DeviceListModal.vue
@@ -30,10 +30,10 @@
 
       <!-- table鍖哄煙-begin -->
       <div>
-        <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{聽 y: 300聽}" :columns="columns"
+        <a-table ref="table" size="middle" bordered rowKey="equipmentid" :scroll="{聽 y: 300聽}" :columns="columns"
                  :dataSource="dataSource" :pagination="ipagination" :loading="loading"
                  :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}"
-                 @change="handleTableChange">
+                 @change="handleTableChange" :customRow="customRow">
         </a-table>
       </div>
       <!-- table鍖哄煙-end -->
@@ -59,7 +59,7 @@
   import Tooltip from 'ant-design-vue/es/tooltip'
   import JDate from '@/components/jeecg/JDate'
   import moment from 'moment'
-  import { filterObj } from '@/utils/util';
+  import { filterObj } from '@/utils/util'
 
   export default {
     name: 'DeviceListModel',
@@ -79,24 +79,24 @@
     },
     data() {
       return {
-        title:'',
+        title: '',
         visible: false,
         disableMixinCreated: true,
         queryParam: {},
         columns: [{
           title: '缁熶竴缂栫爜',
           align: 'center',
-          dataIndex: 'equipmentid',
+          dataIndex: 'equipmentid'
         },
           {
             title: '璁惧鍚嶇О',
             align: 'center',
-            dataIndex: 'equipmentname',
+            dataIndex: 'equipmentname'
           },
           {
             title: '璁惧鍨嬪彿',
             align: 'center',
-            dataIndex: 'equipmentmodel',
+            dataIndex: 'equipmentmodel'
           },
           // {
           //   title: '璁惧绫诲瀷',
@@ -106,27 +106,27 @@
           {
             title: '鏈哄簥IP',
             align: 'center',
-            dataIndex: 'equipmentip',
+            dataIndex: 'equipmentip'
           },
           {
             title: '椹卞姩绫诲瀷',
             align: 'center',
-            dataIndex: 'drivetype',
+            dataIndex: 'drivetype'
           },
           {
             title: '绔彛',
             align: 'center',
-            dataIndex: 'dataport',
+            dataIndex: 'dataport'
           },
           {
             title: '鏁版帶绯荤粺',
             align: 'center',
-            dataIndex: 'controlsystem',
+            dataIndex: 'controlsystem'
           }
         ],
         url: {
-          list: '/mdc/equipment/list',
-        },
+          list: '/mdc/equipment/list'
+        }
 
       }
     },
@@ -137,23 +137,23 @@
       openPage() {
         this.visible = true
         this.onClearSelected()
-        this.dataSource = [];
+        this.dataSource = []
         // this.queryParam = {
         //   status: this.status
         // };
-        this.loadData();
+        this.loadData()
       },
       getQueryParams() {
         //鑾峰彇鏌ヨ鏉′欢
         let sqp = {}
-        if(this.superQueryParams){
-          sqp['superQueryParams']=encodeURI(this.superQueryParams)
+        if (this.superQueryParams) {
+          sqp['superQueryParams'] = encodeURI(this.superQueryParams)
           sqp['superQueryMatchType'] = this.superQueryMatchType
         }
-        var param = Object.assign(sqp, this.queryParam);
+        var param = Object.assign(sqp, this.queryParam)
         // param.field = this.getQueryField();
-        param.pageNo = this.ipagination.current;
-        param.pageSize = this.ipagination.pageSize;
+        param.pageNo = this.ipagination.current
+        param.pageSize = this.ipagination.pageSize
         //鑾峰彇鐢ㄦ埛瀹氬埗鐨勫弬鏁板睘鎬�
         // if (this.getCustomQueryParams) {
         //   param = this.getCustomQueryParams(param);
@@ -162,42 +162,41 @@
         //   }
         // }
 
-        return filterObj(param);
+        return filterObj(param)
       },
       loadData(arg) {
-        if(!this.url.list){
-          this.$message.error("璇疯缃畊rl.list灞炴��!")
+        if (!this.url.list) {
+          this.$message.error('璇疯缃畊rl.list灞炴��!')
           return
         }
         //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭
         if (arg === 1) {
-          this.ipagination.current = 1;
+          this.ipagination.current = 1
         }
-        var params = this.getQueryParams();//鏌ヨ鏉′欢
+        var params = this.getQueryParams()//鏌ヨ鏉′欢
 
-        if(!params){
-          return false;
+        if (!params) {
+          return false
         }
 
-        this.loading = true;
+        this.loading = true
         getAction(this.url.list, params).then((res) => {
           if (res.success) {
             // console.log(res)
             //update-begin---author:zhangyafei    Date:20201118  for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
-            this.dataSource = res.result.records||res.result;
-            if(res.result.total)
-            {
-              this.ipagination.total = res.result.total;
-            }else{
-              this.ipagination.total = 0;
+            this.dataSource = res.result.records || res.result
+            if (res.result.total) {
+              this.ipagination.total = res.result.total
+            } else {
+              this.ipagination.total = 0
             }
             //update-end---author:zhangyafei    Date:20201118  for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------
-          }else{
+          } else {
             // this.$message.warning(res.message)
             this.$notification.warning({
-              message:'娑堟伅',
-              description:res.message
-            });
+              message: '娑堟伅',
+              description: res.message
+            })
           }
         }).finally(() => {
           this.loading = false
@@ -211,18 +210,31 @@
         // });
         // return str;
       },
+      customRow(record) {
+        return {
+          style: {
+            cursor: 'pointer'
+          },
+          on: {
+            click: () => {
+              console.log('瑙﹀彂鐐瑰嚮')
+              this.onSelectChange([record.equipmentid], [record])
+            }
+          }
+        }
+      },
       modalFormOk(val) {
         // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
-        this.loadData();
-        this.selectedRowKeys = [val.id];
+        this.loadData()
+        this.selectedRowKeys = [val.id]
       },
       searchQuery() {
-        this.loadData();
+        this.loadData()
         this.onClearSelected()
       },
       searchReset() {
         this.queryParam = {}
-        this.loadData();
+        this.loadData()
         this.onClearSelected()
       },
       close() {
@@ -235,8 +247,8 @@
       handleOk() {
         this.$emit('sendSelectionRows', this.selectionRows[0])
         this.close()
-      },
-    },
+      }
+    }
   }
 </script>
 <style>

--
Gitblit v1.9.3