From f360cde8ff0b28ba677a4693cf45f47f206dd746 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期三, 21 五月 2025 17:52:54 +0800
Subject: [PATCH] 1、设备管理中设备属性的字段显隐权限调整到设备状态字段 2、设备日志添加批量导出功能

---
 src/views/mdc/base/modules/MdcUnplannedCloseManagement/MdcUnplannedCloseList.vue |   50 ++++++++++++++++++++++++++++----------------------
 1 files changed, 28 insertions(+), 22 deletions(-)

diff --git a/src/views/mdc/base/modules/MdcUnplannedCloseManagement/MdcUnplannedCloseList.vue b/src/views/mdc/base/modules/MdcUnplannedCloseManagement/MdcUnplannedCloseList.vue
index 5d6ea0a..8c0c42e 100644
--- a/src/views/mdc/base/modules/MdcUnplannedCloseManagement/MdcUnplannedCloseList.vue
+++ b/src/views/mdc/base/modules/MdcUnplannedCloseManagement/MdcUnplannedCloseList.vue
@@ -6,7 +6,7 @@
         <a-row :gutter="24">
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <a-form-item label="璁惧缂栧彿">
-              <a-input placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-model="queryParam.equipmentId" allowClear/>
+              <a-input placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-model="queryParam.equipmentId"/>
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -17,15 +17,14 @@
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <a-form-item label="鏃ユ湡">
-              <a-date-picker v-model="queryParam.theDate" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
-                             style="width: 100%"></a-date-picker>
+              <a-range-picker v-model="dates" style="width: 100%" @change="dateParamChange"></a-range-picker>
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+            <a-space>
               <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
-              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
-            </span>
+              <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
+            </a-space>
           </a-col>
         </a-row>
       </a-form>
@@ -35,8 +34,8 @@
     <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
     <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
-      <a-button type="primary" icon="download" @click="importTemplate('璁″垝鍋滄満妯℃澘')">瀵煎叆妯℃澘</a-button>
-      <a-button type="primary" icon="download" @click="handleExportXls('璁″垝鍋滄満绠$悊')">瀵煎嚭</a-button>
+      <a-button type="primary" icon="download" @click="importTemplate('闈炶鍒掑仠鏈虹鐞�')">瀵煎叆妯℃澘</a-button>
+      <a-button type="primary" icon="download" @click="handleExportXls('闈炶鍒掑仠鏈虹鐞�')">瀵煎嚭</a-button>
       <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
                 @change="handleImportExcel">
         <a-button type="primary" icon="import">瀵煎叆</a-button>
@@ -59,7 +58,6 @@
     <!-- table鍖哄煙-begin -->
     <div id="DeviceList" style="flex: 1;overflow: hidden">
       <a-table
-        id="planClose"
         ref="table"
         size="middle"
         :scroll="{x:'max-content',y:scrollY}"
@@ -70,7 +68,6 @@
         :pagination="ipagination"
         :loading="loading"
         :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        class="j-table-force-nowrap"
         @change="handleTableChange">
 
         <span slot="action" slot-scope="text, record">
@@ -100,22 +97,21 @@
 </template>
 
 <script>
-
-  import '@/assets/less/TableExpand.less'
-  import { mixinDevice } from '@/utils/mixin'
+  import moment from 'moment'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import MdcUnplannedCloseModal from './MdcUnplannedCloseModal'
 
   export default {
     name: 'MdcUnplannedCloseList',
-    mixins: [JeecgListMixin, mixinDevice],
+    mixins: [JeecgListMixin],
     components: {
       MdcUnplannedCloseModal
     },
     props: { nodeTree: '', Type: '', nodePeople: '' },
     data() {
       return {
-        description: 'mdcPlanClose绠$悊椤甸潰',
+        description: 'mdcUnplannedClose绠$悊椤甸潰',
+        disableMixinCreated: true,
         /* 鍒嗛〉鍙傛暟 */
         ipagination: {
           current: 1,
@@ -128,6 +124,7 @@
           showSizeChanger: true,
           total: 0
         },
+        dates: [moment().subtract(1, 'day'), moment()],
         queryParam: {
           closeType: 2
         },
@@ -190,8 +187,6 @@
           exportXlsUrl: '/mdc/mdcPlanClose/exportXls',
           importExcelUrl: 'mdc/mdcPlanClose/importExcel'
         },
-        dictOptions: {},
-        superFieldList: []
       }
     },
     watch: {
@@ -231,20 +226,26 @@
       }
     },
     methods: {
+      dateParamChange(v1, v2) {
+        this.queryParam.startTime = v2[0]
+        this.queryParam.endTime = v2[1]
+        this.dates = [v1[0], v1[1]]
+      },
       importTemplate(fileName) {
         var a = document.createElement('a')
-        a.href = '/static/璁″垝鍋滄満绠$悊.xls'
-        a.download = '璁″垝鍋滄満绠$悊.xls'
+        a.href = `/static/${fileName}.xls`
+        a.download = `${fileName}.xls`
         a.style.display = 'none'
         document.body.appendChild(a)
         a.click()
         a.remove()
       },
-      initDictConfig() {
-      },
       searchReset() {
+        this.dates = [moment().subtract(1, 'day'), moment()]
         this.queryParam = {
-          closeType: 2
+          closeType: 2,
+          startTime: this.dates[0].format('YYYY-MM-DD'),
+          endTime: this.dates[1].format('YYYY-MM-DD')
         }
         this.loadData(1)
       },
@@ -257,6 +258,11 @@
         this.scrollY = boxHeight - tableHeadHeight - 50
       }
     },
+    created() {
+      this.queryParam.startTime = this.dates[0].format('YYYY-MM-DD')
+      this.queryParam.endTime = this.dates[1].format('YYYY-MM-DD')
+      this.loadData()
+    },
     mounted() {
       window.addEventListener('resize', this.handleWindowResize)
       this.handleWindowResize()

--
Gitblit v1.9.3