|
|
@@ -55,21 +55,24 @@
|
|
55
|
55
|
<!-- 非干部操作按钮 -->
|
|
56
|
56
|
<div v-if="currentTab === 'non-cadre'" class="left-buttons">
|
|
57
|
57
|
<el-button type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
|
|
|
58
|
+ <el-button type="danger" plain icon="Delete" :disabled="selectedIds.length === 0"
|
|
|
59
|
+ @click="handleBatchDelete">删除</el-button>
|
|
58
|
60
|
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
|
59
|
61
|
</div>
|
|
60
|
62
|
<!-- 干部模式时显示空白占位 -->
|
|
61
|
63
|
<div v-else class="left-buttons"></div>
|
|
62
|
64
|
|
|
63
|
65
|
<div class="right-buttons">
|
|
64
|
|
- <el-button type="primary" :disabled="!queryParams.assessmentMonth" @click="generateMonthlyAssessment">生成本月考核表</el-button>
|
|
|
66
|
+ <el-button type="primary" :disabled="!queryParams.assessmentMonth"
|
|
|
67
|
+ @click="generateMonthlyAssessment">生成本月考核表</el-button>
|
|
65
|
68
|
</div>
|
|
66
|
69
|
</div>
|
|
67
|
70
|
|
|
68
|
71
|
<!-- 非干部数据表格 -->
|
|
69
|
72
|
<div v-if="currentTab === 'non-cadre'">
|
|
70
|
73
|
<el-table v-loading="loading" :data="nonCadreList" border fit highlight-current-row
|
|
71
|
|
- style="width: 100%; margin-top: 20px;">
|
|
72
|
|
- <el-table-column label="大队" prop="brigadeName" align="center" min-width="100" />
|
|
|
74
|
+ style="width: 100%; margin-top: 20px;" @selection-change="handleSelectionChange">
|
|
|
75
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
73
|
76
|
<el-table-column label="用工形式" prop="employmentType" align="center" min-width="100">
|
|
74
|
77
|
<template #default="scope">
|
|
75
|
78
|
<dict-tag :options="employment_type" :value="scope.row.employmentType" />
|
|
|
@@ -155,7 +158,8 @@
|
|
155
|
158
|
<!-- 干部数据表格 -->
|
|
156
|
159
|
<div v-else>
|
|
157
|
160
|
<el-table v-loading="loading" :data="cadreList" border fit highlight-current-row
|
|
158
|
|
- style="width: 100%; margin-top: 20px;">
|
|
|
161
|
+ style="width: 100%; margin-top: 20px;" @selection-change="handleSelectionChange">
|
|
|
162
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
159
|
163
|
<el-table-column label="姓名" prop="name" align="center" min-width="120" />
|
|
160
|
164
|
<el-table-column label="部门" prop="deptName" align="center" min-width="120" />
|
|
161
|
165
|
<el-table-column label="岗位" prop="post" align="center" min-width="120">
|
|
|
@@ -193,10 +197,10 @@
|
|
193
|
197
|
|
|
194
|
198
|
<!-- 编辑/新增弹窗 -->
|
|
195
|
199
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="80%" :close-on-click-modal="false"
|
|
196
|
|
- destroy-on-close >
|
|
|
200
|
+ destroy-on-close>
|
|
197
|
201
|
<!-- 非干部表单 -->
|
|
198
|
|
- <el-form v-loading="dialog.loading" v-if="dialog.type === 'non-cadre'" :model="nonCadreForm" ref="formRef" :rules="nonCadreRules"
|
|
199
|
|
- label-width="380px" class="form-container">
|
|
|
202
|
+ <el-form v-loading="dialog.loading" v-if="dialog.type === 'non-cadre'" :model="nonCadreForm" ref="formRef"
|
|
|
203
|
+ :rules="nonCadreRules" label-width="380px" class="form-container">
|
|
200
|
204
|
<!-- 第一部分:基础信息 -->
|
|
201
|
205
|
<el-row :gutter="20">
|
|
202
|
206
|
<el-col :span="8">
|
|
|
@@ -287,9 +291,11 @@
|
|
287
|
291
|
<div class="indicator-group-title">{{ group.title }}</div>
|
|
288
|
292
|
<div v-for="(item, itemIndex) in group.items" :key="itemIndex" class="indicator-item">
|
|
289
|
293
|
<div class="indicator-name">{{ item.indicatorName }}</div>
|
|
290
|
|
- <div class="indicator-value" v-if="item.categoryNameOne != '红线指标'">{{item.score>0?'+':''}}{{ item.score }}/次</div>
|
|
|
294
|
+ <div class="indicator-value" v-if="item.categoryNameOne != '红线指标'">{{ item.score > 0 ? '+' : '' }}{{ item.score
|
|
|
295
|
+ }}/次
|
|
|
296
|
+ </div>
|
|
291
|
297
|
<div class="indicator-count">{{ item.occurCount }}次</div>
|
|
292
|
|
- <div class="indicator-total">{{item.scoreResult>0?'+':''}}{{ item.scoreResult }}</div>
|
|
|
298
|
+ <div class="indicator-total">{{ item.scoreResult > 0 ? '+' : '' }}{{ item.scoreResult }}</div>
|
|
293
|
299
|
<div class="indicator-actions">
|
|
294
|
300
|
<el-button type="primary" link icon="Edit" @click="editIndicator(groupIndex, itemIndex)"></el-button>
|
|
295
|
301
|
<el-button type="danger" link icon="Delete" @click="deleteIndicator(groupIndex, itemIndex)"></el-button>
|
|
|
@@ -336,7 +342,8 @@
|
|
336
|
342
|
<el-row :gutter="20">
|
|
337
|
343
|
<el-col :span="12">
|
|
338
|
344
|
<el-form-item label="其他指标中的安全指标(仅含SOC/站品控检查扣分)分值">
|
|
339
|
|
- <el-input v-model="nonCadreForm.otherIndexSafetyScoreWithSocStationQcDeduction" disabled placeholder="不可编辑,各个明细的集合" />
|
|
|
345
|
+ <el-input v-model="nonCadreForm.otherIndexSafetyScoreWithSocStationQcDeduction" disabled
|
|
|
346
|
+ placeholder="不可编辑,各个明细的集合" />
|
|
340
|
347
|
</el-form-item>
|
|
341
|
348
|
</el-col>
|
|
342
|
349
|
<el-col :span="12">
|
|
|
@@ -368,7 +375,8 @@
|
|
368
|
375
|
<el-row :gutter="20">
|
|
369
|
376
|
<el-col :span="12">
|
|
370
|
377
|
<el-form-item label="SOC/站品控检查的涉及核心、安全指标扣分">
|
|
371
|
|
- <el-input v-model="nonCadreForm.socStationQcInvolvedCoreSafetyDeduction" disabled placeholder="不可编辑,各个明细的集合" />
|
|
|
378
|
+ <el-input v-model="nonCadreForm.socStationQcInvolvedCoreSafetyDeduction" disabled
|
|
|
379
|
+ placeholder="不可编辑,各个明细的集合" />
|
|
372
|
380
|
</el-form-item>
|
|
373
|
381
|
</el-col>
|
|
374
|
382
|
<el-col :span="12">
|
|
|
@@ -514,7 +522,8 @@
|
|
514
|
522
|
|
|
515
|
523
|
<el-form-item label="分值/单位" v-if="indicatorDialog.form.categoryNameOne != '红线指标'">
|
|
516
|
524
|
<div style="display: flex; align-items: center; gap: 10px;">
|
|
517
|
|
- <span style="font-size: 24px; font-weight: bold;">{{indicatorDialog.form.score>0?'+':''}}{{ indicatorDialog.form.score }}/次</span>
|
|
|
525
|
+ <span style="font-size: 24px; font-weight: bold;">{{ indicatorDialog.form.score > 0 ? '+' : '' }}{{
|
|
|
526
|
+ indicatorDialog.form.score }}/次</span>
|
|
518
|
527
|
|
|
519
|
528
|
</div>
|
|
520
|
529
|
</el-form-item>
|
|
|
@@ -592,7 +601,7 @@ import { ref, reactive, onMounted, getCurrentInstance, watch, nextTick } from 'v
|
|
592
|
601
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
593
|
602
|
|
|
594
|
603
|
// API导入(需要根据实际API路径调整)
|
|
595
|
|
-import { listCadreAssessment, generateCadreAssessment, listNonCadreAssessment, addNonCadreAssessment, updateNonCadreAssessment, deleteNonCadreAssessment, exportNonCadreAssessment, generateNonCadreAssessment, getNonCadreAssessment } from '@/api/performance/monthlyAssess.js'
|
|
|
604
|
+import { listCadreAssessment, generateCadreAssessment, listNonCadreAssessment, addNonCadreAssessment, updateNonCadreAssessment, deleteNonCadreAssessment, exportNonCadreAssessment, generateNonCadreAssessment, getNonCadreAssessment, deleteCadreAssessment } from '@/api/performance/monthlyAssess.js'
|
|
596
|
605
|
import { selectUserLeaderListByCondition, listUserPerformance } from '@/api/system/user.js'
|
|
597
|
606
|
import { listIndicator } from '@/api/system/classificationAssess.js'
|
|
598
|
607
|
import { queryAssessCategoryTreeAndIndicator } from '@/api/system/classificationAssessIndicator.js'
|
|
|
@@ -606,6 +615,7 @@ const total = ref(0)
|
|
606
|
615
|
const queryFormRef = ref()
|
|
607
|
616
|
const formRef = ref()
|
|
608
|
617
|
const currentTab = ref('non-cadre')
|
|
|
618
|
+const selectedIds = ref([])
|
|
609
|
619
|
|
|
610
|
620
|
// 监听tab切换
|
|
611
|
621
|
watch(() => currentTab.value, () => {
|
|
|
@@ -1109,6 +1119,32 @@ const resetQuery = () => {
|
|
1109
|
1119
|
getList()
|
|
1110
|
1120
|
}
|
|
1111
|
1121
|
|
|
|
1122
|
+// 批量选择
|
|
|
1123
|
+const handleSelectionChange = (selection) => {
|
|
|
1124
|
+ selectedIds.value = selection.map(item => item.id)
|
|
|
1125
|
+}
|
|
|
1126
|
+
|
|
|
1127
|
+// 批量删除
|
|
|
1128
|
+const handleBatchDelete = () => {
|
|
|
1129
|
+ if (selectedIds.value.length === 0) {
|
|
|
1130
|
+ return
|
|
|
1131
|
+ }
|
|
|
1132
|
+ proxy.$modal.confirm(`是否确认删除选中的 ${selectedIds.value.length} 条数据?`).then(async () => {
|
|
|
1133
|
+ try {
|
|
|
1134
|
+ if (currentTab.value === 'non-cadre') {
|
|
|
1135
|
+ await deleteNonCadreAssessment(selectedIds.value.join(','))
|
|
|
1136
|
+ } else {
|
|
|
1137
|
+ await deleteCadreAssessment(selectedIds.value.join(','))
|
|
|
1138
|
+ }
|
|
|
1139
|
+ ElMessage.success('删除成功')
|
|
|
1140
|
+ selectedIds.value = []
|
|
|
1141
|
+ getList()
|
|
|
1142
|
+ } catch (error) {
|
|
|
1143
|
+ console.error('删除失败:', error)
|
|
|
1144
|
+ }
|
|
|
1145
|
+ }).catch(() => { })
|
|
|
1146
|
+}
|
|
|
1147
|
+
|
|
1112
|
1148
|
// 新增
|
|
1113
|
1149
|
const handleAdd = () => {
|
|
1114
|
1150
|
dialog.visible = true
|