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/modules/shift/ShiftSystem.vue |  156 +++++++++++++++++++++++++++------------------------
 1 files changed, 82 insertions(+), 74 deletions(-)

diff --git a/src/views/mdc/base/modules/shift/ShiftSystem.vue b/src/views/mdc/base/modules/shift/ShiftSystem.vue
index 7197ad4..857cf18 100644
--- a/src/views/mdc/base/modules/shift/ShiftSystem.vue
+++ b/src/views/mdc/base/modules/shift/ShiftSystem.vue
@@ -6,7 +6,7 @@
     </div>
     <!-- table鍖哄煙-begin -->
     <div style="flex: 1;overflow: auto">
-      <a-table ref="table" bordered size="middle" rowKey="id" :columns="columns"
+      <a-table ref="table" bordered size="middle" rowKey="id" :columns="columns" :customRow="customRow"
                :dataSource="dataSource" :pagination="false" :loading="loading"
                :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio'}">
          <span
@@ -21,7 +21,7 @@
           slot-scope="text, record"
         >
             <span v-if="text == 'true'">鏄�</span>
-            <span v-else-if="text == 'false'" >鍚�</span>
+            <span v-else-if="text == 'false'">鍚�</span>
             <span v-else-if="text == null">鍚�</span>
          </span>
         <span
@@ -45,7 +45,7 @@
               <a-menu-item v-if="record.shiftStatus == 1">
                 <a key="3" @click="handleStatus(record.id,0)">鍋滅敤</a>
               </a-menu-item>
-               <a-menu-item >
+               <a-menu-item>
                 <a key="4" @click="handleDelete(record.id)">鍒犻櫎</a>
               </a-menu-item>
             </a-menu>
@@ -54,18 +54,14 @@
       </a-table>
     </div>
 
-    <shift-system-model ref="modalForm" @ok="modalFormOk"></shift-system-model>
+    <shift-system-model ref="modalForm" @ok="loadData"></shift-system-model>
   </div>
 </template>
 
 <script>
   import qs from 'qs'
-  import {
-    requestPut, putAction, deleteAction,postAction
-  } from '@/api/manage'
-  import {
-    JeecgListMixin
-  } from '@/mixins/JeecgListMixin'
+  import { putAction, deleteAction, postAction } from '@/api/manage'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import ShiftSystemModel from './ShiftSystemModel'
 
   export default {
@@ -76,15 +72,7 @@
     },
     data() {
       return {
-        statusName: '',
-        disabled: true,
         disableMixinCreated: false,
-        url: {
-          list: '/mdc/mdcMdcShift/queryPageList',
-          changeStatus: '/mdc/mdcMdcShift/changeStatus',
-          deleteBatch:'/mdc/mdcMdcShift/deleteShift',
-          changeDefaultShift: '/mdc/mdcMdcShift/changeDefaultShift'
-        },
         columns: [
           {
             title: '鐝埗',
@@ -109,7 +97,13 @@
             dataIndex: 'action',
             scopedSlots: { customRender: 'action' }
           }
-        ]
+        ],
+        url: {
+          list: '/mdc/mdcMdcShift/queryPageList',
+          changeStatus: '/mdc/mdcMdcShift/changeStatus',
+          deleteBatch: '/mdc/mdcMdcShift/deleteShift',
+          changeDefaultShift: '/mdc/mdcMdcShift/changeDefaultShift'
+        }
       }
     },
     methods: {
@@ -118,15 +112,15 @@
         putAction(this.url.changeStatus, { id: id, status: status }).then((res) => {
           if (res.success) {
             _this.$notification.success({
-              message:'娑堟伅',
-              description:res.message
+              message: '娑堟伅',
+              description: res.message
             })
             _this.loadData()
           } else {
             _this.$notification.warning({
-              message:'娑堟伅',
-              description:res.message
-            });
+              message: '娑堟伅',
+              description: res.message
+            })
           }
         })
       },
@@ -135,46 +129,46 @@
         this.$refs.modalForm.title = '鐝埗閰嶇疆'
         this.$refs.modalForm.disableSubmit = false
       },
-      handleDefault:function(record){
-        postAction(this.url.changeDefaultShift,qs.stringify({id:record.id})).then((res) =>{
-            if(res.success){
-              // this.$message.success(res.message);
-              this.$notification.success({
-                message:'娑堟伅',
-                description:res.message
-              });
-              this.loadData()
-            }else{
-              // this.$message.success(res.message);
-              this.$notification.warning({
-                message:'娑堟伅',
-                description:res.message
-              });
-            }
+      handleDefault: function(record) {
+        postAction(this.url.changeDefaultShift, qs.stringify({ id: record.id })).then((res) => {
+          if (res.success) {
+            // this.$message.success(res.message);
+            this.$notification.success({
+              message: '娑堟伅',
+              description: res.message
+            })
+            this.loadData()
+          } else {
+            // this.$message.success(res.message);
+            this.$notification.warning({
+              message: '娑堟伅',
+              description: res.message
+            })
+          }
         })
       },
-      handleDelete: function(record){
-        if(!this.url.deleteBatch){
-          this.$message.error("璇疯缃畊rl.delete灞炴��!")
+      handleDelete: function(record) {
+        if (!this.url.deleteBatch) {
+          this.$message.error('璇疯缃畊rl.delete灞炴��!')
           return
         }
-        var that = this;
-        deleteAction(that.url.deleteBatch, {id: record}).then((res) => {
+        var that = this
+        deleteAction(that.url.deleteBatch, { id: record }).then((res) => {
           if (res.success) {
             // that.$message.success(res.message);
             that.$notification.success({
-              message:'娑堟伅',
-              description:res.message
-            });
-            that.loadData();
+              message: '娑堟伅',
+              description: res.message
+            })
+            that.loadData()
           } else {
             // that.$message.warning(res.message);
             that.$notification.warning({
-              message:'娑堟伅',
-              description:res.message
-            });
+              message: '娑堟伅',
+              description: res.message
+            })
           }
-        });
+        })
       },
       handleEdit(record) {
         this.$refs.modalForm.edit(record)
@@ -183,47 +177,61 @@
 
       },
       onSelectChange(selectedRowKeys, selectionRows) {
-        this.selectedRowKeys = selectedRowKeys;
-        this.selectionRows = selectionRows;
+        this.selectedRowKeys = selectedRowKeys
+        this.selectionRows = selectionRows
         this.$emit('selectionShiftRow', this.selectionRows[0])
       },
-    },
-    created() {
-    }
 
+      customRow(record) {
+        return {
+          style: {
+            cursor: 'pointer'
+          },
+          on: {
+            click: () => {
+              this.onSelectChange([record.id], [record])
+            }
+          }
+        }
+      }
+    }
   }
 </script>
 
 <style lang="less" scoped>
-  .shift_system{
+  .shift_system {
     overflow: auto;
     display: flex;
     flex-direction: column;
   }
 
-  @media screen and (min-width: 1920px){
-    .shift_system{
-      height: 748px!important;
+  @media screen and (min-width: 1920px) {
+    .shift_system {
+      height: 748px !important;
     }
   }
-  @media screen and (min-width: 1680px) and (max-width: 1920px){
-    .shift_system{
-      height: 748px!important;
+
+  @media screen and (min-width: 1680px) and (max-width: 1920px) {
+    .shift_system {
+      height: 748px !important;
     }
   }
-  @media screen and (min-width: 1400px) and (max-width: 1680px){
-    .shift_system{
-      height: 600px!important;
+
+  @media screen and (min-width: 1400px) and (max-width: 1680px) {
+    .shift_system {
+      height: 600px !important;
     }
   }
-  @media screen and (min-width: 1280px) and (max-width: 1400px){
-    .shift_system{
-      height: 501px!important;
+
+  @media screen and (min-width: 1280px) and (max-width: 1400px) {
+    .shift_system {
+      height: 501px !important;
     }
   }
-  @media screen and (max-width: 1280px){
-    .shift_system{
-      height: 501px!important;
+
+  @media screen and (max-width: 1280px) {
+    .shift_system {
+      height: 501px !important;
     }
   }
 </style>

--
Gitblit v1.9.3