From 2d93721c3758621a6b9a7eff038a8d6eac4fda24 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期四, 26 六月 2025 15:30:26 +0800
Subject: [PATCH] 1、调整设备打卡率页面查询区域样式 2、对比分析页面新增图表数据加载提示以及优化整体页面图表展示及代码 3、调整班次班制管理页面左侧新增班制后刷新列表逻辑以及右侧配置按钮展示条件

---
 src/views/mdc/base/EfficiencyPunchReport.vue |  250 +++++++++++++++++++------------------------------
 1 files changed, 99 insertions(+), 151 deletions(-)

diff --git a/src/views/mdc/base/EfficiencyPunchReport.vue b/src/views/mdc/base/EfficiencyPunchReport.vue
index e90b63d..a67850d 100644
--- a/src/views/mdc/base/EfficiencyPunchReport.vue
+++ b/src/views/mdc/base/EfficiencyPunchReport.vue
@@ -5,23 +5,23 @@
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+          <a-col :xl="4" :lg="5" :md="6" :sm="24">
             <a-form-item label="璁板綍鏃堕棿">
-              <a-date-picker format="YYYY-MM-DD" :allowClear="false" v-model="queryParam.theDate"
-                             @change="dateParamChange"></a-date-picker>
+              <a-date-picker value-format="YYYYMMDD" :allowClear="false" v-model="queryParam.theDate"
+                             style="width: 100%"/>
             </a-form-item>
           </a-col>
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+          <a-col :xl="4" :lg="5" :md="6" :sm="24">
             <a-form-item label="鐝">
               <j-dict-select-tag v-model="queryParam.shiftSchedule" dictCode="shift_schedule"
                                  placeholder="璇烽�夋嫨鐝"></j-dict-select-tag>
             </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="info" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
-            </span>
+              <a-button type="info" @click="searchReset" icon="reload">閲嶇疆</a-button>
+            </a-space>
           </a-col>
         </a-row>
       </a-form>
@@ -30,7 +30,6 @@
     <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
     <div class="table-operator">
       <a-button type="primary" icon="download" @click="handleExportXls('璁惧鎵撳崱鐜囨姤琛�')">瀵煎嚭</a-button>
-
     </div>
 
     <!-- table鍖哄煙-begin -->
@@ -59,158 +58,107 @@
       </a-table>
     </div>
     <!-- table鍖哄煙-end -->
-    <efficiency-punch-report-modal ref="modalForm" @ok="modalFormOk"></efficiency-punch-report-modal>
   </a-card>
 </template>
 
 <script>
-import '@/assets/less/TableExpand.less'
+  import moment from 'moment'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 
-import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-import EfficiencyPunchReportModal from '@views/mdc/base/modules/EfficiencyPunchReport/EfficiencyPunchReportModal.vue'
-
-export default {
-  name: 'EfficiencyPunchReport',
-  mixins: [JeecgListMixin],
-  components: {
-    EfficiencyPunchReportModal
-  },
-  data() {
-    return {
-      queryParam: {
-        theDate: this.formatDate(new Date(new Date().setDate(new Date().getDate() - 1))), // 榛樿璁剧疆涓烘槰澶�
-        shiftSchedule: ''
-      },
-
-      dataSource: [], // 纭繚鍒濆鍖栦负绌烘暟缁�
-      description: '璁惧鎵撳崱鐜�',
-      // 琛ㄥご
-      columns: [
-        {
-          title: '#',
-          dataIndex: '',
-          key: 'rowIndex',
-          width: 60,
-          align: 'center',
-          customRender: function(t, r, index) {
-            return parseInt(index) + 1
-          }
+  export default {
+    name: 'EfficiencyPunchReport',
+    mixins: [JeecgListMixin],
+    data() {
+      return {
+        queryParam: {
+          theDate: moment().add(-1, 'days').format('YYYYMMDD') // 榛樿璁剧疆涓烘槰澶�
         },
-
-        {
-          title: '璁板綍鏃堕棿',
-          align: 'center',
-          dataIndex: 'theDate'
-        },
-        {
-          title: '鐝',
-          align: 'center',
-          dataIndex: 'shiftSchedule_dictText'
-        },
-
-        {
-          title: '鏃╃彮涓婄彮鎵撳崱璁惧鏁伴噺',
-          align: 'center',
-          dataIndex: 'mornShiftInNum'
-        },
-        {
-          title: '鏃╀笅鐝墦鍗¤澶囨暟閲�',
-          align: 'center',
-          dataIndex: 'mornShiftOutNum'
-        },
-        {
-          title: '鏅氱彮涓婄彮鎵撳崱璁惧鏁伴噺',
-          align: 'center',
-          dataIndex: 'evenShiftInNum'
-        },
-        {
-          title: '鏅氱彮涓嬬彮鎵撳崱璁惧鏁伴噺',
-          align: 'center',
-          dataIndex: 'evenShiftOutNum'
-        },
-        {
-          title: '璁惧鎬绘暟',
-          align: 'center',
-          dataIndex: 'deviceCountNum'
-        },
-        {
-          title: '鏃╃彮涓婄彮鎵撳崱鐜�(%)',
-          align: 'center',
-          dataIndex: 'mornShiftInRate'
-        },
-        {
-          title: '鏃╃彮涓嬬彮鎵撳崱鐜�(%)',
-          align: 'center',
-          dataIndex: 'mornShiftOutRate'
-
-        },
-        {
-          title: '鏅氱彮涓婄彮鎵撳崱鐜�(%)',
-          align: 'center',
-          dataIndex: 'evenShiftInRate',
-          customRender: (text) => {
-            if (text !== null && text !== undefined) {
-              return parseFloat(text).toFixed(2);
+        description: '璁惧鎵撳崱鐜�',
+        // 琛ㄥご
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key: 'rowIndex',
+            width: 60,
+            align: 'center',
+            customRender: function(t, r, index) {
+              return parseInt(index) + 1
             }
-            return text;
+          },
+          {
+            title: '璁板綍鏃堕棿',
+            align: 'center',
+            dataIndex: 'theDate'
+          },
+          {
+            title: '鐝',
+            align: 'center',
+            dataIndex: 'shiftSchedule_dictText'
+          },
+          {
+            title: '鏃╃彮涓婄彮鎵撳崱璁惧鏁伴噺',
+            align: 'center',
+            dataIndex: 'mornShiftInNum'
+          },
+          {
+            title: '鏃╀笅鐝墦鍗¤澶囨暟閲�',
+            align: 'center',
+            dataIndex: 'mornShiftOutNum'
+          },
+          {
+            title: '鏅氱彮涓婄彮鎵撳崱璁惧鏁伴噺',
+            align: 'center',
+            dataIndex: 'evenShiftInNum'
+          },
+          {
+            title: '鏅氱彮涓嬬彮鎵撳崱璁惧鏁伴噺',
+            align: 'center',
+            dataIndex: 'evenShiftOutNum'
+          },
+          {
+            title: '璁惧鎬绘暟',
+            align: 'center',
+            dataIndex: 'deviceCountNum'
+          },
+          {
+            title: '鏃╃彮涓婄彮鎵撳崱鐜�(%)',
+            align: 'center',
+            dataIndex: 'mornShiftInRate'
+          },
+          {
+            title: '鏃╃彮涓嬬彮鎵撳崱鐜�(%)',
+            align: 'center',
+            dataIndex: 'mornShiftOutRate'
+          },
+          {
+            title: '鏅氱彮涓婄彮鎵撳崱鐜�(%)',
+            align: 'center',
+            dataIndex: 'evenShiftInRate',
+            customRender: (text) => {
+              if (text !== null && text !== undefined) {
+                return parseFloat(text).toFixed(2)
+              }
+              return text
+            }
+          },
+          {
+            title: '鏅氱彮涓嬬彮鎵撳崱鐜�(%)',
+            align: 'center',
+            dataIndex: 'evenShiftOutRate'
+          },
+          {
+            title: '鎿嶄綔',
+            dataIndex: 'action',
+            align: 'center',
+            scopedSlots: { customRender: 'action' }
           }
-        },
-        {
-          title: '鏅氱彮涓嬬彮鎵撳崱鐜�(%)',
-          align: 'center',
-          dataIndex: 'evenShiftOutRate'
-        },
-        {
-          title: '鎿嶄綔',
-          dataIndex: 'action',
-          align: 'center',
-          scopedSlots: { customRender: 'action' }
-        }
-      ],
-      url: {
-        list: '/mdcEquipmentPunchRate/queryPageList',
-        exportXlsUrl: '/mdcEquipmentPunchRate/exportXls'
-      }
-    }
-  },
-  methods: {
-    searchQuery() {
-      if (this.queryParam.theDate) {
-        // 纭繚 queryParam.recordDate 鏄竴涓湁鏁堢殑 Date 瀵硅薄
-        const date = new Date(this.queryParam.recordDate)
-        if (!isNaN(date.getTime())) { // 妫�鏌ユ槸鍚︿负鏈夋晥鏃ユ湡
-          const formattedDate = this.formatDate(date)
-          this.queryParam.theDate = formattedDate
-          console.log('Formatted theDate:', this.queryParam.theDate) // 楠岃瘉鏍煎紡
-        } else {
-          console.error('Invalid date format')
+        ],
+        url: {
+          list: '/mdcEquipmentPunchRate/queryPageList',
+          exportXlsUrl: '/mdcEquipmentPunchRate/exportXls'
         }
       }
-
-      this.loadData()
     },
-
-    formatDate(date) {
-      const year = date.getFullYear()
-      const month = String(date.getMonth() + 1).padStart(2, '0')
-      const day = String(date.getDate()).padStart(2, '0')
-      return `${year}${month}${day}`
-    },
-
-    dateParamChange(value) {
-      // value 鏄竴涓椂鍒诲璞★紙moment object锛夛紝闇�瑕佽浆鎹负 Date 瀵硅薄
-      if (value) {
-        const date = value.toDate() // 杞崲涓� Date 瀵硅薄
-        const formattedDate = this.formatDate(date)
-        this.queryParam.theDate = formattedDate
-      } else {
-        this.queryParam.theDate = null
-      }
-    }
-
   }
-}
-</script>
-<style scoped>
-@import '~@assets/less/common.less';
-</style>
\ No newline at end of file
+</script>
\ No newline at end of file

--
Gitblit v1.9.3