Sfoglia il codice sorgente

月度工分汇总-查看拆分

wanglt 5 mesi fa
parent
commit
a4a5ba51c9
1 ha cambiato i file con 887 aggiunte e 0 eliminazioni
  1. 887 0
      ygtx-ui/src/views/gxt/userScore/info.vue

+ 887 - 0
ygtx-ui/src/views/gxt/userScore/info.vue

@@ -0,0 +1,887 @@
+<template>
+  <div class="user-score-container-wrapper">
+    <div class="user-score-container">
+  <div class="app-container">
+    <!-- 页面标题 -->
+    <div class="content-header">
+      <h1 class="page-title">月度工分汇总</h1>
+      <el-select style="width: 150px;" v-model="selectedMonth" placeholder="请选择月份" @change="handleMonthChange">
+        <el-option
+          v-for="item in monthOptions"
+          :key="item.value"
+          :value="item.value"
+          :label="item.label">
+          <span style="margin-left: 15px;">{{ item.label }}</span>
+        </el-option>
+      </el-select>
+    </div>
+    
+    <!-- 第一个表单:本月维保工单统计 -->
+    <el-card class="card-form" shadow="hover">
+      <div slot="header" class="clearfix">
+        <span style="font-weight: bold;">本月维保工单统计</span>
+      </div>
+      <div class="form-content">
+        <el-row :gutter="20">
+          <el-col :span="4">
+            <div class="statistic-item">
+              <div class="statistic-label">计划维保台数</div>
+              <el-input-number 
+                v-model="maintenanceOrderStats.plannedCount" 
+                :min="0"
+                :readonly="!isFirst"
+                controls-position="right" 
+                class="full-width-input"
+              ></el-input-number>
+            </div>
+          </el-col>
+          <el-col :span="4">
+            <div class="statistic-item">
+              <div class="statistic-label">实际维保台数</div>
+              <el-input-number 
+                v-model="maintenanceOrderStats.actualCount" 
+                :min="0"
+                :readonly="!isFirst"
+                controls-position="right" 
+                class="full-width-input"
+              ></el-input-number>
+            </div>
+          </el-col>
+          <el-col :span="4">
+            <div class="statistic-item">
+              <div class="statistic-label">全组扣分</div>
+              <el-input 
+                v-model="maintenanceOrderStats.groupDeduction" 
+                readonly
+              ></el-input>
+            </div>
+          </el-col>
+          <el-col :span="4">
+            <div class="statistic-item">
+              <div class="statistic-label">
+                <el-tooltip placement="top" effect="light">
+                  <template #content>
+                    <el-tag style="padding: 5px;" v-if="monthScore.coefficientScore.status==2" type="danger">取消扣分申请已拒绝</el-tag>
+                    <el-tag style="padding: 5px;" v-else-if="monthScore.coefficientScore.status==1" type="success">取消扣分申请已通过</el-tag>
+                    <el-tag style="padding: 5px;" v-else type="primary">全组扣分未处理</el-tag>
+                  </template>
+                  <span style="cursor: pointer;">说明<span v-if="isRemarksRequired" class="required-mark">*</span></span>
+                </el-tooltip>
+              </div>
+              <el-input 
+                v-model="maintenanceOrderStats.explainCode" 
+                :readonly="!isFirst"
+                maxlength="50"
+                :class="{ 'required-field': isRemarksRequired }"
+                placeholder="输入说明(限制50字以内)"
+              ></el-input>
+            </div>
+          </el-col>
+          <el-col :span="4">
+            <div class="statistic-item">
+              <div class="statistic-label">维保工单系数</div>
+              <el-input-number 
+                v-model="maintenanceOrderStats.workOrderCoefficient" 
+                :min="0.8"
+                :max="1.2"
+                :step="0.1"
+                :controls="true"
+                :readonly="!isThird"
+                controls-position="right"
+                class="full-width-input"
+              ></el-input-number>
+            </div>
+          </el-col>
+          <el-col :span="4">
+            <div class="statistic-item">
+              <div class="statistic-label">维修工单系数</div>
+              <el-input-number 
+                v-model="maintenanceOrderStats.repairOrderCoefficient" 
+                :min="0.5"
+                :max="1.5"
+                :step="0.1"
+                :controls="true"
+                :readonly="!isThird"
+                controls-position="right"
+                class="full-width-input"
+              ></el-input-number>
+            </div>
+          </el-col>
+        </el-row>
+      </div>
+    </el-card>
+    
+    <!-- 第二和第三个表单在同一行 -->
+    <el-row :gutter="20">
+      <!-- 第二个表单:非停设备统计 -->
+      <el-col :span="12">
+        <el-card class="card-form-left" shadow="hover">
+          <div slot="header" class="clearfix">
+            <span style="font-weight: bold;">设备连续运行时长情况</span>
+          </div>
+          <div class="form-content" style="margin-top: 20px;">
+            <!-- 非停设备统计表格 -->
+            <el-table :data="runtimeList" style="width: 100%">
+              <el-table-column prop="runtimeRange" label="运行天数"></el-table-column>
+              <el-table-column label="风机数量">
+                <template #default="scope">
+                  <el-input-number 
+                    v-model="scope.row.deviceCount" 
+                    :min="0"
+                    controls-position="right" 
+                    readonly
+                    class="full-width-input"
+                  ></el-input-number>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </el-card>
+      </el-col>
+      
+      <!-- 第三个表单:维保机型类型统计 -->
+      <el-col :span="12">
+        <el-card class="card-form-right" shadow="hover">
+          <div slot="header" class="clearfix">
+            <span style="font-weight: bold;">本月维保机型类型统计</span>
+          </div>
+          <div class="form-content" style="margin-top: 20px;">
+            <!-- 维保机型类型统计表格 -->
+            <el-table :data="fanInspectionScoreList" style="width: 100%">
+              <el-table-column prop="model" label="机型"></el-table-column>
+              <el-table-column prop="inspectionType" label="维保类型"></el-table-column>
+              <el-table-column label="维保数量">
+                <template #default="scope">
+                  <el-input-number 
+                    v-model="scope.row.deviceCount" 
+                    :min="0" 
+                    controls-position="right" 
+                    readonly
+                    class="full-width-input"
+                  ></el-input-number>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </el-card>
+      </el-col>
+    </el-row>
+    
+    <!-- 第四个表单:维修工单详情 -->
+    <el-card class="card-form" shadow="hover">
+      <div slot="header" class="clearfix">
+        <span style="font-weight: bold;">本月维修工单统计</span>
+      </div>
+      <div class="form-content" style="margin-top: 20px;">
+        <!-- 维修工单详情表格 -->
+        <el-table :data="repairOrderStatistics" style="width: 100%">
+          <el-table-column prop="repairType" label="检修类型" width="400"></el-table-column>
+          <el-table-column label="工单数量">
+            <template #default="scope">
+              <el-input-number 
+                v-model="scope.row.orderCount" 
+                :min="0" 
+                controls-position="right" 
+                readonly
+                class="full-width-input"
+              ></el-input-number>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </el-card>
+    
+    <!-- 第五个表单:组员考核得分 -->
+    <el-card class="card-form" shadow="hover">
+      <div slot="header" class="clearfix">
+        <span style="font-weight: bold;">组员考核得分</span>
+      </div>
+      <div class="form-content" style="margin-top: 20px;">
+        <!-- 组员考核得分表格 -->
+        <el-table :data="userScoreList" style="width: 100%">
+          <el-table-column prop="userName" label="组员姓名"></el-table-column>
+          <el-table-column label="维保工分">
+            <template #default="scope">
+              <el-input-number 
+                v-model="scope.row.maintenanceTotalScore" 
+                :min="0" 
+                controls-position="right" 
+                readonly
+                class="full-width-input"
+              ></el-input-number>
+            </template>
+          </el-table-column>
+          <el-table-column label="维修工分">
+            <template #default="scope">
+              <el-input-number 
+                v-model="scope.row.repairTotalScore" 
+                :min="0" 
+                controls-position="right" 
+                readonly
+                class="full-width-input"
+              ></el-input-number>
+            </template>
+          </el-table-column>
+          <el-table-column label="总工分">
+            <template #default="scope">
+              <el-input-number 
+                v-model="scope.row.finalScore" 
+                :min="0" 
+                controls-position="right" 
+                readonly
+                class="full-width-input"
+              ></el-input-number>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </el-card>
+
+    <el-card v-if="!isFirst" class="card-form" shadow="hover">
+      <div slot="header" class="clearfix">
+        <el-tooltip placement="top" effect="light">
+          <template #content>
+            <el-tag style="padding: 5px;" v-if="monthScore.coefficientScore.status==2" type="danger">取消扣分申请已拒绝</el-tag>
+            <el-tag style="padding: 5px;" v-else-if="monthScore.coefficientScore.status==1" type="success">取消扣分申请已通过</el-tag>
+            <el-tag style="padding: 5px;" v-else type="primary">全组扣分未处理</el-tag>
+          </template>
+          <span style="font-weight: bold;margin-right: 20px;">评分更改说明</span>
+        </el-tooltip>
+      </div>
+      <div class="form-content">
+        <el-form style="margin-top: 20px;">
+          <el-form-item>
+            <el-input
+              type="textarea"
+              style="width: 100%"
+              :rows="4"
+              placeholder="请输入评分更改的详细说明"
+              v-model="monthScore.feedbackContent"
+              maxlength="200"
+              readonly
+              show-word-limit>
+            </el-input>
+          </el-form-item>
+        </el-form>
+      </div>
+    </el-card>
+    
+    <!-- 底部按钮 -->
+    <div class="button-group">
+      <el-button @click="handleClose">关闭</el-button>
+      <el-button v-hasPermi="['gxt:scoresummary:first']" v-if="monthScore.status==0" @click="handleFeedback">反馈</el-button>
+      <el-button v-hasPermi="['gxt:scoresummary:first']" v-if="monthScore.status==0" @click="handleSubmit">提交评分</el-button>
+      <el-button v-hasPermi="['gxt:scoresummary:second']" v-if="monthScore.status==1" @click="agreeFeedBack">取消全组扣分</el-button>
+      <el-button v-hasPermi="['gxt:scoresummary:second']" v-if="monthScore.status==1" @click="againstFeedBack">拒绝取消扣分</el-button>
+      <el-button v-hasPermi="['gxt:scoresummary:third']" v-if="monthScore.status==2" @click="submitCoefficient">提交本月系数</el-button>
+    </div>
+  </div>
+  </div>
+  
+  <!-- 评分反馈弹窗 -->
+  <el-dialog
+    class="force-center-dialog"
+    title="评分反馈"
+    v-model="feedbackDialogVisible"
+    width="650px"
+    :before-close="handleFeedbackDialogClose">
+    <div class="header-divider"></div>
+    <el-form label-position="top">
+      <el-form-item label="评分更改说明">
+        <el-input
+          type="textarea"
+          style="width: 100%"
+          :rows="4"
+          placeholder="请输入评分更改的详细说明(必填)"
+          v-model="monthScore.feedbackContent"
+          maxlength="200"
+          show-word-limit>
+        </el-input>
+      </el-form-item>
+    </el-form>
+    <div class="end-divider"></div>
+    <template #footer>
+      <div class="dialog-footer">
+        <el-button class="button-ex" @click="handleFeedbackCancel">取消</el-button>
+        <el-button class="button-ex" type="primary" @click="handleFeedbackSubmit">提交</el-button>
+      </div>
+    </template>
+  </el-dialog>
+  </div>
+</template>
+
+<script>
+import { checkPermi } from '@/utils/permission'
+import { getScoreSummary, getScoreSummaryById, getSummaryMonths, submitMonthScore, getMonthScoreList } from '@/api/gxt/userScore'
+
+export default {
+  name: 'info',
+  data() {
+    return {
+      isFirst: false,
+      isSecond: false,
+      isThird:false,
+      isInfo:false,
+      monthScore: {
+        status: 0,
+        deptId: 0,
+        feedbackContent: '' // 添加feedbackContent属性
+      },
+      selectedMonth: null, // 默认选中的月份
+      monthOptions: [], // 月份选项
+      statusFilter: null, // 状态筛选
+      // 新增的部门统计数据
+      departmentStats: [],
+      // 字典数据
+      gxtInspectionType: [], // 维保类型字典
+      gxtMaintenanceType: [], // 维保类型字典
+      // 本月维保工单统计数据
+      maintenanceOrderStats: {
+        plannedCount: 0,
+        actualCount: 0,
+        groupDeduction: 0,
+        explainCode: '',
+        workOrderCoefficient: 1,
+        repairOrderCoefficient: 1
+      },
+      // 非停设备统计数据
+      runtimeList: [],
+      // 维保机型类型统计数据
+      fanInspectionScoreList: [],
+      // 维修工单详情数据
+      repairOrderStatistics: [],
+      // 组员考核得分数据
+      userScoreList: [],
+      // 评分反馈弹窗相关数据
+      feedbackDialogVisible: false,
+      total:0,
+      queryParams: {
+        status: null,
+        statusList: null,
+        pageNum: 1,
+        pageSize: 10,
+        deptName: null,
+        parentName: null,
+        monthPeriod: null
+      }
+    }
+  },
+  created() {
+    this.initDict();
+    // 获取路由参数
+    const route = this.$route;
+    console.log(route);
+    if (route.params && route.params.summaryId) {
+      this.checkPermissions();
+      const rtType = this.isInfo ? 1 : 0;
+      getScoreSummaryById(rtType,route.params.summaryId).then(response => {
+        if(response.code === 200 && response.monthScore) {
+          this.monthScore = response.monthScore;
+          this.selectedMonth = this.monthScore.monthPeriod;
+          this.initMonthOptions(this.monthScore.deptId, this.selectedMonth);
+          this.checkPermissions();
+        }
+      });
+    }
+  },
+  computed: {
+    // 计算说明输入框是否必填
+    isRemarksRequired() {
+      // 当实际维保台数小于计划维保台数时,说明输入框为必填
+      const planned = parseInt(this.maintenanceOrderStats.plannedCount) || 0;
+      const actual = parseInt(this.maintenanceOrderStats.actualCount) || 0;
+      return actual < planned;
+    }
+  },
+  watch: {
+    // 监听 plannedCount 或 actualCount 的变化
+    'maintenanceOrderStats.plannedCount': 'calculateDeduction',
+    'maintenanceOrderStats.actualCount': 'calculateDeduction'
+  },
+  methods: {
+    calculateDeduction() {
+      const { plannedCount, actualCount } = this.maintenanceOrderStats;
+      // 当计划值大于实际值时,计算差值;否则清空
+      if (plannedCount > actualCount) {
+        this.maintenanceOrderStats.groupDeduction = plannedCount - actualCount;
+      } else {
+        this.maintenanceOrderStats.groupDeduction = 0; // 或设为 0
+      }
+    },
+    // 根据inspectionTypeId获取inspectionType标签
+    getInspectionTypeLabel(inspectionTypeId) {
+      if (!inspectionTypeId) return '';
+      
+      const dictItem = this.gxtInspectionType.find(item => item.value === inspectionTypeId.toString());
+      return dictItem ? dictItem.label : '';
+    },
+    getMaintenanceTypeLabel(maintenanceTypeId) {
+      if (!maintenanceTypeId) return '';
+      
+      const dictItem = this.gxtMaintenanceType.find(item => item.value === maintenanceTypeId.toString());
+      return dictItem ? dictItem.label : '';
+    },
+    
+    // 初始化字典数据
+    initDict() {
+      const { gxt_inspection_type, gxt_maintenance_type } = this.useDict("gxt_inspection_type", "gxt_maintenance_type")
+      this.gxtInspectionType = gxt_inspection_type || []
+      this.gxtMaintenanceType = gxt_maintenance_type || []
+    },
+    // 初始化月份选项
+    initMonthOptions(param,monthParam) {
+      // 从后端接口获取月份选项数据
+      getSummaryMonths(param).then(response => {
+        if (response.code === 200) {
+          this.monthOptions = response.dictList || [];
+          
+          // 如果有月份选项数据,设置默认选中第一个
+          if (this.monthOptions.length > 0) {
+            if(monthParam && monthParam!=null) {
+              this.selectedMonth = monthParam;
+            }else{
+              this.selectedMonth = this.monthOptions[0].value;
+            }
+            // 获取默认月份的数据
+            this.fetchScoreSummaryData(this.selectedMonth,param);
+          }
+        } else {
+          console.error('获取月份选项数据失败:', response.msg);
+          // 如果获取失败,使用原有的默认逻辑
+          this.initDefaultMonthOptions();
+        }
+      }).catch(error => {
+        console.error('获取月份选项数据异常:', error);
+        // 如果获取异常,使用原有的默认逻辑
+        this.initDefaultMonthOptions();
+      });
+    },
+    
+    // 获取月度工分汇总数据
+    fetchScoreSummaryData(monthPeriod,deptParam) {
+      // 根据权限设置rtType参数
+      const rtType = this.isInfo ? 1 : 0;
+      
+      // 如果有传入的ID参数,则使用ID获取数据
+      // 原有逻辑
+      getScoreSummary(monthPeriod, rtType, deptParam).then(response => {
+        if (response.code === 200 && response.monthScore) {
+          const monthScoreGet = response.monthScore;
+          this.monthScore = monthScoreGet;
+          if(this.monthScore.status==4) {
+            alert('当前用户所属部门非场站,无法生成月度工分汇总数据!');
+          }
+          // console.log(monthScoreGet);
+          
+          // 设置本月维保工单统计数据
+          if (monthScoreGet.coefficientScore) {
+            this.maintenanceOrderStats = monthScoreGet.coefficientScore;
+          }
+          
+          // 设置非停设备统计数据
+          if (monthScoreGet.monthRuntimes) {
+            this.runtimeList = monthScoreGet.monthRuntimes;;
+          }
+          
+          // 设置维保机型类型统计数据
+          if (monthScoreGet.monthFanInspections) {
+            this.fanInspectionScoreList = monthScoreGet.monthFanInspections.map(item => {
+              return {
+                model: item.model,
+                inspectionType: this.getInspectionTypeLabel(item.inspectionTypeId), // 从字典中获取
+                deviceCount: item.deviceCount || 0
+              };
+            });
+          }
+          
+          // 设置维修工单详情数据
+          if (monthScoreGet.monthRepairProjects) {
+            this.repairOrderStatistics = monthScoreGet.monthRepairProjects.map(item => {
+              return {
+                repairType: this.getMaintenanceTypeLabel(item.maintenanceType),
+                orderCount: item.orderCount || 0
+              };
+            });
+          }
+          
+          // 设置组员考核得分数据
+          if (monthScoreGet.userScores) {
+            this.userScoreList = monthScoreGet.userScores;
+          }
+        } else {
+          console.error('获取月度工分汇总数据失败:', response.msg);
+        }
+      }).catch(error => {
+        console.error('获取月度工分汇总数据异常:', error);
+      });
+    },
+    
+    // 处理月份变化
+    handleMonthChange(value) {
+      // console.log('选择的月份:', value);
+      // 获取选择月份的数据
+      this.fetchScoreSummaryData(value,this.monthScore.deptId);
+    },
+    
+    // 关闭当前标签页
+    handleClose() {
+      this.$tab.closePage();
+    },
+    
+    // 处理反馈按钮点击事件
+    handleFeedback() {
+      // console.log('反馈按钮被点击')
+      // 只有当isFirst为true时才显示弹窗
+      const planned = parseInt(this.maintenanceOrderStats.plannedCount) || 0;
+      const actual = parseInt(this.maintenanceOrderStats.actualCount) || 0;
+      if(actual < planned && this.maintenanceOrderStats.explainCode=='') {
+        this.$message.warning('请输入全组扣分说明');
+        return;
+      }
+      this.feedbackDialogVisible = true;
+    },
+    
+    // 处理提交评分按钮点击事件
+    handleSubmit() {
+      // console.log('提交评分按钮被点击')
+      if(this.monthScore.status != 0) {
+        this.$message.warning('请勿重复提交评分!');
+        return;
+      }
+      // 在这里添加提交评分操作的逻辑
+      this.monthScore.previousStatus = this.monthScore.status;
+      this.monthScore.status = 2;
+      this.monthScore.coefficientScore = this.maintenanceOrderStats;
+      submitMonthScore(this.monthScore).then(response => {
+        if (response.code === 200) {
+          alert('评分提交成功!');
+          this.checkPermissions();
+          this.fetchScoreSummaryData(this.selectedMonth,this.monthScore.deptId);
+        } else {
+          alert(response.msg)
+        }
+      }).catch(error => {
+        console.error('评分提交失败:', error)
+        alert('评分提交失败,请查看控制台错误信息')
+      })
+    },
+
+    agreeFeedBack() {
+      // console.log('通过反馈按钮被点击')
+      if(this.monthScore.status != 1) {
+        this.$message.warning('反馈已审核,请勿重复操作!');
+        return;
+      }
+      // 在这里添加提交评分操作的逻辑
+      this.monthScore.previousStatus = this.monthScore.status;
+      this.monthScore.status = 2;
+      this.maintenanceOrderStats.status = 1;
+      this.monthScore.coefficientScore = this.maintenanceOrderStats;
+      submitMonthScore(this.monthScore).then(response => {
+        if (response.code === 200) {
+          alert('取消全组扣分成功!');
+          this.checkPermissions();
+          this.fetchScoreSummaryData(this.selectedMonth,this.monthScore.deptId);
+        } else {
+          alert(response.msg)
+        }
+      }).catch(error => {
+        console.error('审核提交失败:', error)
+        alert('审核提交失败,请查看控制台错误信息')
+      })
+    },
+
+    againstFeedBack() {
+      // console.log('不通过反馈按钮被点击')
+      if(this.monthScore.status != 1) {
+        this.$message.warning('反馈已审核,请勿重复操作!');
+        return;
+      }
+      // 在这里添加提交评分操作的逻辑
+      this.monthScore.previousStatus = this.monthScore.status;
+      this.monthScore.status = 2;
+      this.maintenanceOrderStats.status = 2;
+      this.monthScore.coefficientScore = this.maintenanceOrderStats;
+      submitMonthScore(this.monthScore).then(response => {
+        if (response.code === 200) {
+          alert('审核提交成功!');
+          this.checkPermissions();
+          this.fetchScoreSummaryData(this.selectedMonth,this.monthScore.deptId);
+        } else {
+          alert(response.msg)
+        }
+      }).catch(error => {
+        console.error('审核提交失败:', error)
+        alert('审核提交失败,请查看控制台错误信息')
+      })
+    },
+
+    submitCoefficient() {
+      // console.log('主任提交本月系数按钮被点击')
+      if(this.monthScore.status != 2) {
+        this.$message.warning('系数已提交,请勿重复操作!');
+        return;
+      }
+      // 在这里添加提交评分操作的逻辑
+      this.monthScore.previousStatus = this.monthScore.status;
+      this.monthScore.status = 3;
+      this.monthScore.coefficientScore = this.maintenanceOrderStats;
+      submitMonthScore(this.monthScore).then(response => {
+        if (response.code === 200) {
+          alert('系数提交成功!');
+          this.checkPermissions();
+          this.fetchScoreSummaryData(this.selectedMonth,this.monthScore.deptId);
+        } else {
+          alert(response.msg)
+        }
+      }).catch(error => {
+        console.error('系数提交失败:', error)
+        alert('系数提交失败,请查看控制台错误信息')
+      })
+    },
+    
+    // 初始化默认月份选项(原有逻辑)
+    initDefaultMonthOptions() {
+      const now = new Date();
+      // 获取上个月
+      const lastMonth = new Date(now.getFullYear(), now.getMonth() - 1, 1);
+      
+      // 生成最近6个月的选项(包括本月)
+      this.monthOptions = [];
+      for (let i = 0; i < 6; i++) {
+        const date = new Date(now.getFullYear(), now.getMonth() - i, 1);
+        const year = date.getFullYear();
+        const month = String(date.getMonth() + 1).padStart(2, '0');
+        const value = `${year}-${month}`;
+        const label = `${year}年${month}月`;
+        
+        this.monthOptions.push({
+          value: value,
+          label: label
+        });
+      }
+      
+      // 设置默认选中为上个月
+      const defaultYear = lastMonth.getFullYear();
+      const defaultMonth = String(lastMonth.getMonth() + 1).padStart(2, '0');
+      this.selectedMonth = `${defaultYear}-${defaultMonth}`;
+      
+      // 获取默认月份的数据
+      this.fetchScoreSummaryData(this.selectedMonth,this.monthScore.deptId);
+    },
+    
+    // 检查权限
+    checkPermissions() {
+      this.isFirst = checkPermi(['gxt:scoresummary:first']) && this.monthScore.status==0;
+      this.isSecond = checkPermi(['gxt:scoresummary:second']) && this.monthScore.status==1;
+      this.isThird = checkPermi(['gxt:scoresummary:third']) && this.monthScore.status==2;
+      this.isInfo = checkPermi(['gxt:scoresummary:first']) || checkPermi(['gxt:scoresummary:second']) || checkPermi(['gxt:scoresummary:third']);
+      // console.log(this.isFirst);
+      // console.log(this.isSecond);
+      // console.log(this.isThird);
+      // console.log(this.monthScore.status);
+    },
+    
+    // 处理反馈弹窗关闭
+    handleFeedbackDialogClose(done) {
+      // 清空反馈内容
+      this.monthScore.feedbackContent = '';
+      done();
+    },
+    
+    // 处理反馈弹窗取消按钮
+    handleFeedbackCancel() {
+      this.feedbackDialogVisible = false;
+      // 清空反馈内容
+      this.monthScore.feedbackContent = '';
+    },
+    
+    // 处理反馈弹窗提交按钮
+    handleFeedbackSubmit() {
+      if(this.monthScore.status != 0) {
+        this.$message.warning('请勿重复提交反馈!');
+        return;
+      }
+      // 添加验证逻辑,确保用户输入了反馈内容
+      if (!this.monthScore.feedbackContent || this.monthScore.feedbackContent.trim() === '') {
+        this.$message.warning('请输入评分更改说明');
+        return;
+      }
+      // console.log('提交反馈:', this.monthScore.feedbackContent);
+      this.monthScore.previousStatus = this.monthScore.status;
+      this.monthScore.status = 1;
+      this.monthScore.coefficientScore = this.maintenanceOrderStats;
+      submitMonthScore(this.monthScore).then(response => {
+        if (response.code === 200) {
+          alert('反馈提交成功!');
+          this.checkPermissions();
+          this.fetchScoreSummaryData(this.selectedMonth,this.monthScore.deptId);
+        } else {
+          alert(response.msg)
+        }
+      }).catch(error => {
+        console.error('反馈提交失败:', error)
+        alert('反馈提交失败,请查看控制台错误信息')
+      })
+      // 提交后关闭弹窗
+      this.feedbackDialogVisible = false;
+    },
+    
+    // 处理状态筛选变化
+    handleStatusChange(value) {
+      console.log('状态筛选变化:', this.queryParams);
+      this.queryParams.pageNum = 1;
+      this.fetchScoreSummaryData(this.selectedMonth,this.monthScore.deptId);
+      // 在这里可以添加根据状态筛选数据的逻辑
+      // 例如:重新加载部门统计数据或其他相关操作
+    }
+  }
+}
+</script>
+
+<style scoped>
+/* 全局样式 */
+* {
+  margin: 0;
+  padding: 0;
+  box-sizing: border-box;
+  font-family: 'Inter', sans-serif;
+}
+
+.user-score-container-wrapper {
+  position: relative;
+  height: 100%;
+}
+
+.user-score-container {
+  display: flex;
+  flex-direction: column;
+  height: 100%;
+  overflow: hidden;
+  background-color: #f5f7fa;
+}
+
+/* 页面头部样式 */
+.content-header {
+  padding: 1.2rem 2rem;
+  background-color: #fff;
+  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.page-title {
+  font-size: 1.4rem;
+  font-weight: 600;
+  color: #2d3748;
+  margin: 0;
+}
+
+.card-form {
+  border-radius: 10px; /* 统一圆角半径 */
+  margin-top: 20px;
+  margin-bottom: 0px;
+  margin-left: 20px;
+  margin-right: 20px;
+}
+
+.card-form-left {
+  border-radius: 10px; /* 统一圆角半径 */
+  margin-top: 20px;
+  margin-bottom: 0px;
+  margin-left: 20px;
+  margin-right: 0px;
+}
+
+.card-form-right {
+  border-radius: 10px; /* 统一圆角半径 */
+  margin-top: 20px;
+  margin-bottom: 0px;
+  margin-left: 0px;
+  margin-right: 20px;
+}
+
+.button-group {
+  display: flex;
+  justify-content: right;
+  gap: 10px;
+  margin-top: 20px;
+  margin-right: 20px;
+  margin-bottom: 10px;
+}
+
+.button-group .el-button {
+  background-color: #165dff; /* 蓝色背景 */
+  color: white;             /* 白色文字 */
+  border: none;             /* 去掉默认边框 */
+  border-radius: 4px;       /* 圆角(可调整) */
+  padding: 10px 15px;            /* 内边距 */
+  cursor: pointer;          /* 鼠标悬停时显示手型 */
+  font-size: 14px;          /* 可选:调整字体大小 */
+}
+
+/* 可选:悬停效果 */
+.button-group .el-button:hover {
+  opacity: 0.9;             /* 悬停时略微变透明 */
+  /* 或者用更深蓝色:background-color: #1450d9; */
+}
+
+/* 统计项样式 */
+.statistic-item {
+  margin-top: 20px;
+  padding: 15px;
+  border: 1px solid #ccc; /* 宽度 | 样式 | 颜色 */
+}
+
+.statistic-label {
+  font-size: 14px;
+  color: #606266;
+  margin-bottom: 5px;
+}
+
+/* 输入框样式 - 占据100%宽度并左对齐数字 */
+.full-width-input {
+  width: 100% !important;
+}
+
+:deep(.full-width-input .el-input__inner) {
+  text-align: left !important;
+}
+
+/* 必填项标记样式 */
+.required-mark {
+  color: #f56c6c;
+  margin-left: 4px;
+}
+
+/* 必填项输入框样式 */
+.required-field :deep(.el-input__inner) {
+  border-color: #f56c6c !important;
+}
+/* 使用 :deep() 穿透 scoped 样式 */
+:deep(.force-center-dialog) {
+  position: absolute !important;
+  top: 50% !important;
+  left: 50% !important;
+  transform: translate(-50%, -50%) !important;
+  margin: 0 !important;
+  font-weight: bold;
+}
+
+.header-divider {
+  height: 0.1px;
+  background-color: #ddd; /* Element Plus 默认灰色 */
+  margin-bottom: 12px;
+}
+
+.end-divider {
+  height: 0.1px;
+  background-color: #ddd; /* Element Plus 默认灰色 */
+  margin-top: 12px;
+}
+
+.button-ex {
+  padding: 10px 15px;            /* 内边距 */
+}
+</style>