|
|
@@ -0,0 +1,847 @@
|
|
|
1
|
+<template>
|
|
|
2
|
+ <div class="app-container">
|
|
|
3
|
+ <el-card>
|
|
|
4
|
+ <!-- 顶部切换 -->
|
|
|
5
|
+ <div class="tab-container">
|
|
|
6
|
+ <el-radio-group v-model="currentTab" size="large">
|
|
|
7
|
+ <el-radio-button value="non-cadre">非干部</el-radio-button>
|
|
|
8
|
+ <el-radio-button value="cadre">干部</el-radio-button>
|
|
|
9
|
+ </el-radio-group>
|
|
|
10
|
+ </div>
|
|
|
11
|
+
|
|
|
12
|
+ <!-- 查询条件 -->
|
|
|
13
|
+ <div class="filter-container">
|
|
|
14
|
+ <el-form :model="queryParams" ref="queryFormRef" :inline="true" class="search-form">
|
|
|
15
|
+ <el-form-item label="姓名" prop="employeeName">
|
|
|
16
|
+ <el-input v-model="queryParams.employeeName" placeholder="请输入姓名" clearable style="width: 200px" />
|
|
|
17
|
+ </el-form-item>
|
|
|
18
|
+
|
|
|
19
|
+ <el-form-item label="考核月份" prop="assessmentMonth">
|
|
|
20
|
+ <el-date-picker v-model="queryParams.assessmentMonth" type="month" placeholder="请选择考核月份"
|
|
|
21
|
+ value-format="YYYY-MM" style="width: 200px" />
|
|
|
22
|
+ </el-form-item>
|
|
|
23
|
+
|
|
|
24
|
+ <el-form-item>
|
|
|
25
|
+ <el-button type="primary" icon="Search" @click="handleQuery">查询</el-button>
|
|
|
26
|
+ <el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
|
27
|
+ </el-form-item>
|
|
|
28
|
+ </el-form>
|
|
|
29
|
+ </div>
|
|
|
30
|
+
|
|
|
31
|
+ <!-- 操作按钮 -->
|
|
|
32
|
+ <div class="operation-container">
|
|
|
33
|
+ <!-- 非干部操作按钮 -->
|
|
|
34
|
+ <div v-if="currentTab === 'non-cadre'" class="left-buttons">
|
|
|
35
|
+ <el-button type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
|
|
|
36
|
+ <el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
|
|
37
|
+ </div>
|
|
|
38
|
+ <!-- 干部模式时显示空白占位 -->
|
|
|
39
|
+ <div v-else class="left-buttons"></div>
|
|
|
40
|
+
|
|
|
41
|
+ <div class="right-buttons">
|
|
|
42
|
+ <el-button type="primary" @click="generateMonthlyAssessment">生成本月考核表</el-button>
|
|
|
43
|
+ </div>
|
|
|
44
|
+ </div>
|
|
|
45
|
+
|
|
|
46
|
+ <!-- 非干部数据表格 -->
|
|
|
47
|
+ <div v-if="currentTab === 'non-cadre'">
|
|
|
48
|
+ <el-table v-loading="loading" :data="nonCadreList" border fit highlight-current-row style="width: 100%; margin-top: 20px;">
|
|
|
49
|
+ <el-table-column label="大队" prop="brigade" align="center" min-width="100" />
|
|
|
50
|
+ <el-table-column label="用工形式" prop="employmentType" align="center" min-width="100" />
|
|
|
51
|
+ <el-table-column label="员工编号" prop="employeeCode" align="center" min-width="120" />
|
|
|
52
|
+ <el-table-column label="员工姓名" prop="employeeName" align="center" min-width="120" />
|
|
|
53
|
+ <el-table-column label="考核组" prop="assessmentGroup" align="center" min-width="100" />
|
|
|
54
|
+ <el-table-column label="分管班组长" prop="teamLeader" align="center" min-width="120" />
|
|
|
55
|
+ <el-table-column label="分管主管" prop="supervisor" align="center" min-width="120" />
|
|
|
56
|
+ <el-table-column label="红线指标触发次数" prop="redLineTriggerCount" align="center" min-width="140" />
|
|
|
57
|
+ <el-table-column label="红线指标依据" prop="redLineBasis" align="center" min-width="120" show-overflow-tooltip />
|
|
|
58
|
+ <el-table-column label="核心指标分值" prop="coreIndicatorScore" align="center" min-width="120" />
|
|
|
59
|
+ <el-table-column label="核心指标依据" prop="coreIndicatorBasis" align="center" min-width="120" show-overflow-tooltip />
|
|
|
60
|
+ <el-table-column label="其他指标分值" prop="otherIndicatorScore" align="center" min-width="120" />
|
|
|
61
|
+ <el-table-column label="其他指标依据" prop="otherIndicatorBasis" align="center" min-width="120" show-overflow-tooltip />
|
|
|
62
|
+
|
|
|
63
|
+ <el-table-column label="其他指标中的安全(仅含SOC/站品控检查扣分)分值" prop="safetyWithSocScore" align="center" min-width="200" show-overflow-tooltip />
|
|
|
64
|
+ <el-table-column label="其他指标中的安全(仅含SOC/站品控检查扣分)依据" prop="safetyWithSocBasis" align="center" min-width="200" show-overflow-tooltip />
|
|
|
65
|
+
|
|
|
66
|
+ <el-table-column label="其他指标中的安全(不含SOC/站品控检查扣分)分值" prop="safetyWithoutSocScore" align="center" min-width="200" show-overflow-tooltip />
|
|
|
67
|
+ <el-table-column label="其他指标中的安全(不含SOC/站品控检查扣分)依据" prop="safetyWithoutSocBasis" align="center" min-width="200" show-overflow-tooltip />
|
|
|
68
|
+
|
|
|
69
|
+ <el-table-column label="其他指标中的非安全指标扣分" prop="nonSafetyDeduction" align="center" min-width="160" show-overflow-tooltip />
|
|
|
70
|
+ <el-table-column label="其他指标中的非安全指标扣分依据" prop="nonSafetyDeductionBasis" align="center" min-width="160" show-overflow-tooltip />
|
|
|
71
|
+
|
|
|
72
|
+ <el-table-column label="非核心安全+核心扣分" prop="nonCoreSafetyCoreDeduction" align="center" min-width="140" />
|
|
|
73
|
+ <el-table-column label="SOC/站品控检查的涉及核心、安全指标扣分" prop="socSafetyCoreDeduction" align="center" min-width="200" show-overflow-tooltip />
|
|
|
74
|
+ <el-table-column label="SOC/站品控检查的涉及核心、安全指标扣分依据" prop="socSafetyCoreDeductionBasis" align="center" min-width="200" show-overflow-tooltip />
|
|
|
75
|
+
|
|
|
76
|
+ <el-table-column label="分管员工数量" prop="managedEmployeeCount" align="center" min-width="120" />
|
|
|
77
|
+ <el-table-column label="扣分平均值" prop="averageDeduction" align="center" min-width="100" />
|
|
|
78
|
+ <el-table-column label="总分" prop="totalScore" align="center" min-width="100" sortable />
|
|
|
79
|
+ <el-table-column label="奖励明细" prop="rewardDetails" align="center" min-width="120" show-overflow-tooltip />
|
|
|
80
|
+ <el-table-column label="惩罚明细" prop="penaltyDetails" align="center" min-width="120" show-overflow-tooltip />
|
|
|
81
|
+ <el-table-column label="奖励(元)" prop="rewardAmount" align="center" min-width="100" />
|
|
|
82
|
+ <el-table-column label="扣罚(元)" prop="penaltyAmount" align="center" min-width="100" />
|
|
|
83
|
+ <el-table-column label="考核结果" prop="assessmentResult" align="center" min-width="100" />
|
|
|
84
|
+ <el-table-column label="考核结果备注" prop="assessmentResultRemark" align="center" min-width="140" show-overflow-tooltip />
|
|
|
85
|
+ <el-table-column label="应用方式" prop="applicationMethod" align="center" min-width="100" />
|
|
|
86
|
+ <el-table-column label="应用方式备注" prop="applicationMethodRemark" align="center" min-width="140" show-overflow-tooltip />
|
|
|
87
|
+ <el-table-column label="是否豁免" prop="isExempted" align="center" min-width="100">
|
|
|
88
|
+ <template #default="scope">
|
|
|
89
|
+ <el-tag :type="scope.row.isExempted ? 'success' : 'info'">
|
|
|
90
|
+ {{ scope.row.isExempted ? '是' : '否' }}
|
|
|
91
|
+ </el-tag>
|
|
|
92
|
+ </template>
|
|
|
93
|
+ </el-table-column>
|
|
|
94
|
+ <el-table-column label="是否豁免备注" prop="exemptionRemark" align="center" min-width="140" show-overflow-tooltip />
|
|
|
95
|
+ <el-table-column label="考核月份" prop="assessmentMonth" align="center" min-width="120" />
|
|
|
96
|
+
|
|
|
97
|
+ <el-table-column label="操作" align="center" width="150" fixed="right">
|
|
|
98
|
+ <template #default="scope">
|
|
|
99
|
+ <el-button size="small" type="primary" link @click="handleEdit(scope.row, 'non-cadre')">修改</el-button>
|
|
|
100
|
+ <el-button size="small" type="danger" link @click="handleDelete(scope.row)">删除</el-button>
|
|
|
101
|
+ </template>
|
|
|
102
|
+ </el-table-column>
|
|
|
103
|
+ </el-table>
|
|
|
104
|
+ </div>
|
|
|
105
|
+
|
|
|
106
|
+ <!-- 干部数据表格 -->
|
|
|
107
|
+ <div v-else>
|
|
|
108
|
+ <el-table v-loading="loading" :data="cadreList" border fit highlight-current-row style="width: 100%; margin-top: 20px;">
|
|
|
109
|
+ <el-table-column label="员工姓名" prop="employeeName" align="center" min-width="120" />
|
|
|
110
|
+ <el-table-column label="岗位" prop="position" align="center" min-width="120" />
|
|
|
111
|
+ <el-table-column label="区域" prop="area" align="center" min-width="100" />
|
|
|
112
|
+ <el-table-column label="红线扣分" prop="redLineDeduction" align="center" min-width="100" />
|
|
|
113
|
+ <el-table-column label="红线扣分豁免情况" prop="redLineExemption" align="center" min-width="140" show-overflow-tooltip />
|
|
|
114
|
+ <el-table-column label="违规排名扣分" prop="violationRankingDeduction" align="center" min-width="140" />
|
|
|
115
|
+ <el-table-column label="违规排名扣分豁免情况" prop="violationRankingExemption" align="center" min-width="180" show-overflow-tooltip />
|
|
|
116
|
+ <el-table-column label="技能排名扣分" prop="skillRankingDeduction" align="center" min-width="140" />
|
|
|
117
|
+ <el-table-column label="技能排名扣分豁免情况" prop="skillRankingExemption" align="center" min-width="180" show-overflow-tooltip />
|
|
|
118
|
+ <el-table-column label="总分" prop="totalScore" align="center" min-width="100" sortable />
|
|
|
119
|
+ <el-table-column label="考核结果" prop="assessmentResult" align="center" min-width="120" />
|
|
|
120
|
+ <el-table-column label="考核结果备注" prop="assessmentResultRemark" align="center" min-width="140" show-overflow-tooltip />
|
|
|
121
|
+ <el-table-column label="考核月份" prop="assessmentMonth" align="center" min-width="120" />
|
|
|
122
|
+ <el-table-column label="应用方式" prop="applicationMethod" align="center" min-width="120" />
|
|
|
123
|
+ <el-table-column label="应用方式备注" prop="applicationMethodRemark" align="center" min-width="160" show-overflow-tooltip />
|
|
|
124
|
+
|
|
|
125
|
+ <el-table-column label="操作" align="center" width="150" fixed="right">
|
|
|
126
|
+ <template #default="scope">
|
|
|
127
|
+ <el-button size="small" type="primary" link @click="handleEdit(scope.row, 'cadre')">修改</el-button>
|
|
|
128
|
+ <el-button size="small" type="danger" link @click="handleDelete(scope.row)">删除</el-button>
|
|
|
129
|
+ </template>
|
|
|
130
|
+ </el-table-column>
|
|
|
131
|
+ </el-table>
|
|
|
132
|
+ </div>
|
|
|
133
|
+
|
|
|
134
|
+ <!-- 分页 -->
|
|
|
135
|
+ <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
|
|
136
|
+ v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
|
137
|
+ </el-card>
|
|
|
138
|
+
|
|
|
139
|
+ <!-- 编辑/新增弹窗 -->
|
|
|
140
|
+ <el-dialog :title="dialog.title" v-model="dialog.visible" width="80%" :close-on-click-modal="false">
|
|
|
141
|
+ <!-- 非干部表单 -->
|
|
|
142
|
+ <el-form v-if="dialog.type === 'non-cadre'" :model="nonCadreForm" ref="formRef" :rules="nonCadreRules" label-width="180px" class="form-container">
|
|
|
143
|
+ <el-row :gutter="20">
|
|
|
144
|
+ <el-col :span="8">
|
|
|
145
|
+ <el-form-item label="大队" prop="brigade">
|
|
|
146
|
+ <el-input v-model="nonCadreForm.brigade" placeholder="请输入大队" />
|
|
|
147
|
+ </el-form-item>
|
|
|
148
|
+ </el-col>
|
|
|
149
|
+ <el-col :span="8">
|
|
|
150
|
+ <el-form-item label="用工形式" prop="employmentType">
|
|
|
151
|
+ <el-select v-model="nonCadreForm.employmentType" placeholder="请选择用工形式" style="width: 100%">
|
|
|
152
|
+ <el-option v-for="item in employmentTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
153
|
+ </el-select>
|
|
|
154
|
+ </el-form-item>
|
|
|
155
|
+ </el-col>
|
|
|
156
|
+ <el-col :span="8">
|
|
|
157
|
+ <el-form-item label="员工编号" prop="employeeCode">
|
|
|
158
|
+ <el-input v-model="nonCadreForm.employeeCode" placeholder="请输入员工编号" />
|
|
|
159
|
+ </el-form-item>
|
|
|
160
|
+ </el-col>
|
|
|
161
|
+ </el-row>
|
|
|
162
|
+
|
|
|
163
|
+ <el-row :gutter="20">
|
|
|
164
|
+ <el-col :span="8">
|
|
|
165
|
+ <el-form-item label="员工姓名" prop="employeeName">
|
|
|
166
|
+ <el-input v-model="nonCadreForm.employeeName" placeholder="请输入员工姓名" />
|
|
|
167
|
+ </el-form-item>
|
|
|
168
|
+ </el-col>
|
|
|
169
|
+ <el-col :span="8">
|
|
|
170
|
+ <el-form-item label="考核组" prop="assessmentGroup">
|
|
|
171
|
+ <el-input v-model="nonCadreForm.assessmentGroup" placeholder="请输入考核组" />
|
|
|
172
|
+ </el-form-item>
|
|
|
173
|
+ </el-col>
|
|
|
174
|
+ <el-col :span="8">
|
|
|
175
|
+ <el-form-item label="考核月份" prop="assessmentMonth">
|
|
|
176
|
+ <el-date-picker v-model="nonCadreForm.assessmentMonth" type="month" placeholder="请选择考核月份"
|
|
|
177
|
+ value-format="YYYY-MM" style="width: 100%" />
|
|
|
178
|
+ </el-form-item>
|
|
|
179
|
+ </el-col>
|
|
|
180
|
+ </el-row>
|
|
|
181
|
+
|
|
|
182
|
+ <el-row :gutter="20">
|
|
|
183
|
+ <el-col :span="8">
|
|
|
184
|
+ <el-form-item label="分管班组长" prop="teamLeader">
|
|
|
185
|
+ <el-input v-model="nonCadreForm.teamLeader" placeholder="请输入分管班组长" />
|
|
|
186
|
+ </el-form-item>
|
|
|
187
|
+ </el-col>
|
|
|
188
|
+ <el-col :span="8">
|
|
|
189
|
+ <el-form-item label="分管主管" prop="supervisor">
|
|
|
190
|
+ <el-input v-model="nonCadreForm.supervisor" placeholder="请输入分管主管" />
|
|
|
191
|
+ </el-form-item>
|
|
|
192
|
+ </el-col>
|
|
|
193
|
+ <el-col :span="8">
|
|
|
194
|
+ <el-form-item label="分管员工数量" prop="managedEmployeeCount">
|
|
|
195
|
+ <el-input-number v-model="nonCadreForm.managedEmployeeCount" :min="0" style="width: 100%" />
|
|
|
196
|
+ </el-form-item>
|
|
|
197
|
+ </el-col>
|
|
|
198
|
+ </el-row>
|
|
|
199
|
+
|
|
|
200
|
+ <el-divider content-position="left">红线指标</el-divider>
|
|
|
201
|
+ <el-row :gutter="20">
|
|
|
202
|
+ <el-col :span="12">
|
|
|
203
|
+ <el-form-item label="红线指标触发次数" prop="redLineTriggerCount">
|
|
|
204
|
+ <el-input-number v-model="nonCadreForm.redLineTriggerCount" :min="0" style="width: 100%" />
|
|
|
205
|
+ </el-form-item>
|
|
|
206
|
+ </el-col>
|
|
|
207
|
+ <el-col :span="12">
|
|
|
208
|
+ <el-form-item label="红线指标依据" prop="redLineBasis">
|
|
|
209
|
+ <el-input v-model="nonCadreForm.redLineBasis" type="textarea" :rows="2" placeholder="请输入红线指标依据" />
|
|
|
210
|
+ </el-form-item>
|
|
|
211
|
+ </el-col>
|
|
|
212
|
+ </el-row>
|
|
|
213
|
+
|
|
|
214
|
+ <el-divider content-position="left">核心指标</el-divider>
|
|
|
215
|
+ <el-row :gutter="20">
|
|
|
216
|
+ <el-col :span="12">
|
|
|
217
|
+ <el-form-item label="核心指标分值" prop="coreIndicatorScore">
|
|
|
218
|
+ <el-input-number v-model="nonCadreForm.coreIndicatorScore" :min="0" :precision="2" style="width: 100%" />
|
|
|
219
|
+ </el-form-item>
|
|
|
220
|
+ </el-col>
|
|
|
221
|
+ <el-col :span="12">
|
|
|
222
|
+ <el-form-item label="核心指标依据" prop="coreIndicatorBasis">
|
|
|
223
|
+ <el-input v-model="nonCadreForm.coreIndicatorBasis" type="textarea" :rows="2" placeholder="请输入核心指标依据" />
|
|
|
224
|
+ </el-form-item>
|
|
|
225
|
+ </el-col>
|
|
|
226
|
+ </el-row>
|
|
|
227
|
+
|
|
|
228
|
+ <el-divider content-position="left">其他指标</el-divider>
|
|
|
229
|
+ <el-row :gutter="20">
|
|
|
230
|
+ <el-col :span="12">
|
|
|
231
|
+ <el-form-item label="其他指标分值" prop="otherIndicatorScore">
|
|
|
232
|
+ <el-input-number v-model="nonCadreForm.otherIndicatorScore" :min="0" :precision="2" style="width: 100%" />
|
|
|
233
|
+ </el-form-item>
|
|
|
234
|
+ </el-col>
|
|
|
235
|
+ <el-col :span="12">
|
|
|
236
|
+ <el-form-item label="其他指标依据" prop="otherIndicatorBasis">
|
|
|
237
|
+ <el-input v-model="nonCadreForm.otherIndicatorBasis" type="textarea" :rows="2" placeholder="请输入其他指标依据" />
|
|
|
238
|
+ </el-form-item>
|
|
|
239
|
+ </el-col>
|
|
|
240
|
+ </el-row>
|
|
|
241
|
+
|
|
|
242
|
+ <el-divider content-position="left">其他指标中的安全(仅含SOC/站品控检查扣分)</el-divider>
|
|
|
243
|
+ <el-row :gutter="20">
|
|
|
244
|
+ <el-col :span="12">
|
|
|
245
|
+ <el-form-item label="分值" prop="safetyWithSocScore">
|
|
|
246
|
+ <el-input-number v-model="nonCadreForm.safetyWithSocScore" :min="0" :precision="2" style="width: 100%" />
|
|
|
247
|
+ </el-form-item>
|
|
|
248
|
+ </el-col>
|
|
|
249
|
+ <el-col :span="12">
|
|
|
250
|
+ <el-form-item label="依据" prop="safetyWithSocBasis">
|
|
|
251
|
+ <el-input v-model="nonCadreForm.safetyWithSocBasis" type="textarea" :rows="2" placeholder="请输入依据" />
|
|
|
252
|
+ </el-form-item>
|
|
|
253
|
+ </el-col>
|
|
|
254
|
+ </el-row>
|
|
|
255
|
+
|
|
|
256
|
+ <el-divider content-position="left">其他指标中的安全(不含SOC/站品控检查扣分)</el-divider>
|
|
|
257
|
+ <el-row :gutter="20">
|
|
|
258
|
+ <el-col :span="12">
|
|
|
259
|
+ <el-form-item label="分值" prop="safetyWithoutSocScore">
|
|
|
260
|
+ <el-input-number v-model="nonCadreForm.safetyWithoutSocScore" :min="0" :precision="2" style="width: 100%" />
|
|
|
261
|
+ </el-form-item>
|
|
|
262
|
+ </el-col>
|
|
|
263
|
+ <el-col :span="12">
|
|
|
264
|
+ <el-form-item label="依据" prop="safetyWithoutSocBasis">
|
|
|
265
|
+ <el-input v-model="nonCadreForm.safetyWithoutSocBasis" type="textarea" :rows="2" placeholder="请输入依据" />
|
|
|
266
|
+ </el-form-item>
|
|
|
267
|
+ </el-col>
|
|
|
268
|
+ </el-row>
|
|
|
269
|
+
|
|
|
270
|
+ <el-divider content-position="left">其他指标中的非安全指标扣分</el-divider>
|
|
|
271
|
+ <el-row :gutter="20">
|
|
|
272
|
+ <el-col :span="12">
|
|
|
273
|
+ <el-form-item label="扣分" prop="nonSafetyDeduction">
|
|
|
274
|
+ <el-input-number v-model="nonCadreForm.nonSafetyDeduction" :min="0" :precision="2" style="width: 100%" />
|
|
|
275
|
+ </el-form-item>
|
|
|
276
|
+ </el-col>
|
|
|
277
|
+ <el-col :span="12">
|
|
|
278
|
+ <el-form-item label="依据" prop="nonSafetyDeductionBasis">
|
|
|
279
|
+ <el-input v-model="nonCadreForm.nonSafetyDeductionBasis" type="textarea" :rows="2" placeholder="请输入依据" />
|
|
|
280
|
+ </el-form-item>
|
|
|
281
|
+ </el-col>
|
|
|
282
|
+ </el-row>
|
|
|
283
|
+
|
|
|
284
|
+ <el-divider content-position="left">综合扣分</el-divider>
|
|
|
285
|
+ <el-row :gutter="20">
|
|
|
286
|
+ <el-col :span="12">
|
|
|
287
|
+ <el-form-item label="非核心安全+核心扣分" prop="nonCoreSafetyCoreDeduction">
|
|
|
288
|
+ <el-input-number v-model="nonCadreForm.nonCoreSafetyCoreDeduction" :min="0" :precision="2" style="width: 100%" />
|
|
|
289
|
+ </el-form-item>
|
|
|
290
|
+ </el-col>
|
|
|
291
|
+ <el-col :span="12">
|
|
|
292
|
+ <el-form-item label="SOC/站品控检查的涉及核心、安全指标扣分" prop="socSafetyCoreDeduction">
|
|
|
293
|
+ <el-input-number v-model="nonCadreForm.socSafetyCoreDeduction" :min="0" :precision="2" style="width: 100%" />
|
|
|
294
|
+ </el-form-item>
|
|
|
295
|
+ </el-col>
|
|
|
296
|
+ </el-row>
|
|
|
297
|
+
|
|
|
298
|
+ <el-row :gutter="20">
|
|
|
299
|
+ <el-col :span="24">
|
|
|
300
|
+ <el-form-item label="SOC/站品控检查的涉及核心、安全指标扣分依据" prop="socSafetyCoreDeductionBasis">
|
|
|
301
|
+ <el-input v-model="nonCadreForm.socSafetyCoreDeductionBasis" type="textarea" :rows="2" placeholder="请输入依据" />
|
|
|
302
|
+ </el-form-item>
|
|
|
303
|
+ </el-col>
|
|
|
304
|
+ </el-row>
|
|
|
305
|
+
|
|
|
306
|
+ <el-divider content-position="left">统计信息</el-divider>
|
|
|
307
|
+ <el-row :gutter="20">
|
|
|
308
|
+ <el-col :span="8">
|
|
|
309
|
+ <el-form-item label="扣分平均值" prop="averageDeduction">
|
|
|
310
|
+ <el-input-number v-model="nonCadreForm.averageDeduction" :min="0" :precision="2" style="width: 100%" />
|
|
|
311
|
+ </el-form-item>
|
|
|
312
|
+ </el-col>
|
|
|
313
|
+ <el-col :span="8">
|
|
|
314
|
+ <el-form-item label="总分" prop="totalScore">
|
|
|
315
|
+ <el-input-number v-model="nonCadreForm.totalScore" :min="0" :precision="2" style="width: 100%" />
|
|
|
316
|
+ </el-form-item>
|
|
|
317
|
+ </el-col>
|
|
|
318
|
+ <el-col :span="8">
|
|
|
319
|
+ <el-form-item label="奖励(元)" prop="rewardAmount">
|
|
|
320
|
+ <el-input-number v-model="nonCadreForm.rewardAmount" :min="0" :precision="2" style="width: 100%" />
|
|
|
321
|
+ </el-form-item>
|
|
|
322
|
+ </el-col>
|
|
|
323
|
+ </el-row>
|
|
|
324
|
+
|
|
|
325
|
+ <el-row :gutter="20">
|
|
|
326
|
+ <el-col :span="8">
|
|
|
327
|
+ <el-form-item label="扣罚(元)" prop="penaltyAmount">
|
|
|
328
|
+ <el-input-number v-model="nonCadreForm.penaltyAmount" :min="0" :precision="2" style="width: 100%" />
|
|
|
329
|
+ </el-form-item>
|
|
|
330
|
+ </el-col>
|
|
|
331
|
+ <el-col :span="8">
|
|
|
332
|
+ <el-form-item label="考核结果" prop="assessmentResult">
|
|
|
333
|
+ <el-select v-model="nonCadreForm.assessmentResult" placeholder="请选择考核结果" style="width: 100%">
|
|
|
334
|
+ <el-option v-for="item in assessmentResultOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
335
|
+ </el-select>
|
|
|
336
|
+ </el-form-item>
|
|
|
337
|
+ </el-col>
|
|
|
338
|
+ <el-col :span="8">
|
|
|
339
|
+ <el-form-item label="应用方式" prop="applicationMethod">
|
|
|
340
|
+ <el-select v-model="nonCadreForm.applicationMethod" placeholder="请选择应用方式" style="width: 100%">
|
|
|
341
|
+ <el-option v-for="item in applicationMethodOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
342
|
+ </el-select>
|
|
|
343
|
+ </el-form-item>
|
|
|
344
|
+ </el-col>
|
|
|
345
|
+ </el-row>
|
|
|
346
|
+
|
|
|
347
|
+ <el-row :gutter="20">
|
|
|
348
|
+ <el-col :span="12">
|
|
|
349
|
+ <el-form-item label="奖励明细" prop="rewardDetails">
|
|
|
350
|
+ <el-input v-model="nonCadreForm.rewardDetails" type="textarea" :rows="2" placeholder="请输入奖励明细" />
|
|
|
351
|
+ </el-form-item>
|
|
|
352
|
+ </el-col>
|
|
|
353
|
+ <el-col :span="12">
|
|
|
354
|
+ <el-form-item label="惩罚明细" prop="penaltyDetails">
|
|
|
355
|
+ <el-input v-model="nonCadreForm.penaltyDetails" type="textarea" :rows="2" placeholder="请输入惩罚明细" />
|
|
|
356
|
+ </el-form-item>
|
|
|
357
|
+ </el-col>
|
|
|
358
|
+ </el-row>
|
|
|
359
|
+
|
|
|
360
|
+ <el-row :gutter="20">
|
|
|
361
|
+ <el-col :span="12">
|
|
|
362
|
+ <el-form-item label="考核结果备注" prop="assessmentResultRemark">
|
|
|
363
|
+ <el-input v-model="nonCadreForm.assessmentResultRemark" type="textarea" :rows="2" placeholder="请输入考核结果备注" />
|
|
|
364
|
+ </el-form-item>
|
|
|
365
|
+ </el-col>
|
|
|
366
|
+ <el-col :span="12">
|
|
|
367
|
+ <el-form-item label="应用方式备注" prop="applicationMethodRemark">
|
|
|
368
|
+ <el-input v-model="nonCadreForm.applicationMethodRemark" type="textarea" :rows="2" placeholder="请输入应用方式备注" />
|
|
|
369
|
+ </el-form-item>
|
|
|
370
|
+ </el-col>
|
|
|
371
|
+ </el-row>
|
|
|
372
|
+
|
|
|
373
|
+ <el-divider content-position="left">豁免信息</el-divider>
|
|
|
374
|
+ <el-row :gutter="20">
|
|
|
375
|
+ <el-col :span="12">
|
|
|
376
|
+ <el-form-item label="是否豁免" prop="isExempted">
|
|
|
377
|
+ <el-switch v-model="nonCadreForm.isExempted" active-text="是" inactive-text="否" />
|
|
|
378
|
+ </el-form-item>
|
|
|
379
|
+ </el-col>
|
|
|
380
|
+ <el-col :span="12">
|
|
|
381
|
+ <el-form-item label="是否豁免备注" prop="exemptionRemark">
|
|
|
382
|
+ <el-input v-model="nonCadreForm.exemptionRemark" type="textarea" :rows="2" placeholder="请输入豁免备注" />
|
|
|
383
|
+ </el-form-item>
|
|
|
384
|
+ </el-col>
|
|
|
385
|
+ </el-row>
|
|
|
386
|
+ </el-form>
|
|
|
387
|
+
|
|
|
388
|
+ <!-- 干部表单 -->
|
|
|
389
|
+ <el-form v-else :model="cadreForm" ref="formRef" :rules="cadreRules" label-width="180px" class="form-container">
|
|
|
390
|
+ <el-row :gutter="20">
|
|
|
391
|
+ <el-col :span="8">
|
|
|
392
|
+ <el-form-item label="员工姓名" prop="employeeName">
|
|
|
393
|
+ <el-input v-model="cadreForm.employeeName" placeholder="请输入员工姓名" />
|
|
|
394
|
+ </el-form-item>
|
|
|
395
|
+ </el-col>
|
|
|
396
|
+ <el-col :span="8">
|
|
|
397
|
+ <el-form-item label="岗位" prop="position">
|
|
|
398
|
+ <el-input v-model="cadreForm.position" placeholder="请输入岗位" />
|
|
|
399
|
+ </el-form-item>
|
|
|
400
|
+ </el-col>
|
|
|
401
|
+ <el-col :span="8">
|
|
|
402
|
+ <el-form-item label="区域" prop="area">
|
|
|
403
|
+ <el-input v-model="cadreForm.area" placeholder="请输入区域" />
|
|
|
404
|
+ </el-form-item>
|
|
|
405
|
+ </el-col>
|
|
|
406
|
+ </el-row>
|
|
|
407
|
+
|
|
|
408
|
+ <el-row :gutter="20">
|
|
|
409
|
+ <el-col :span="8">
|
|
|
410
|
+ <el-form-item label="考核月份" prop="assessmentMonth">
|
|
|
411
|
+ <el-date-picker v-model="cadreForm.assessmentMonth" type="month" placeholder="请选择考核月份"
|
|
|
412
|
+ value-format="YYYY-MM" style="width: 100%" />
|
|
|
413
|
+ </el-form-item>
|
|
|
414
|
+ </el-col>
|
|
|
415
|
+ <el-col :span="8">
|
|
|
416
|
+ <el-form-item label="考核结果" prop="assessmentResult">
|
|
|
417
|
+ <el-select v-model="cadreForm.assessmentResult" placeholder="请选择考核结果" style="width: 100%">
|
|
|
418
|
+ <el-option v-for="item in assessmentResultOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
419
|
+ </el-select>
|
|
|
420
|
+ </el-form-item>
|
|
|
421
|
+ </el-col>
|
|
|
422
|
+ <el-col :span="8">
|
|
|
423
|
+ <el-form-item label="应用方式" prop="applicationMethod">
|
|
|
424
|
+ <el-select v-model="cadreForm.applicationMethod" placeholder="请选择应用方式" style="width: 100%">
|
|
|
425
|
+ <el-option v-for="item in applicationMethodOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
426
|
+ </el-select>
|
|
|
427
|
+ </el-form-item>
|
|
|
428
|
+ </el-col>
|
|
|
429
|
+ </el-row>
|
|
|
430
|
+
|
|
|
431
|
+ <el-divider content-position="left">红线扣分</el-divider>
|
|
|
432
|
+ <el-row :gutter="20">
|
|
|
433
|
+ <el-col :span="12">
|
|
|
434
|
+ <el-form-item label="红线扣分" prop="redLineDeduction">
|
|
|
435
|
+ <el-input-number v-model="cadreForm.redLineDeduction" :min="0" :precision="2" style="width: 100%" />
|
|
|
436
|
+ </el-form-item>
|
|
|
437
|
+ </el-col>
|
|
|
438
|
+ <el-col :span="12">
|
|
|
439
|
+ <el-form-item label="红线扣分豁免情况" prop="redLineExemption">
|
|
|
440
|
+ <el-input v-model="cadreForm.redLineExemption" type="textarea" :rows="2" placeholder="请输入豁免情况" />
|
|
|
441
|
+ </el-form-item>
|
|
|
442
|
+ </el-col>
|
|
|
443
|
+ </el-row>
|
|
|
444
|
+
|
|
|
445
|
+ <el-divider content-position="left">违规排名扣分</el-divider>
|
|
|
446
|
+ <el-row :gutter="20">
|
|
|
447
|
+ <el-col :span="12">
|
|
|
448
|
+ <el-form-item label="违规排名扣分" prop="violationRankingDeduction">
|
|
|
449
|
+ <el-input-number v-model="cadreForm.violationRankingDeduction" :min="0" :precision="2" style="width: 100%" />
|
|
|
450
|
+ </el-form-item>
|
|
|
451
|
+ </el-col>
|
|
|
452
|
+ <el-col :span="12">
|
|
|
453
|
+ <el-form-item label="违规排名扣分豁免情况" prop="violationRankingExemption">
|
|
|
454
|
+ <el-input v-model="cadreForm.violationRankingExemption" type="textarea" :rows="2" placeholder="请输入豁免情况" />
|
|
|
455
|
+ </el-form-item>
|
|
|
456
|
+ </el-col>
|
|
|
457
|
+ </el-row>
|
|
|
458
|
+
|
|
|
459
|
+ <el-divider content-position="left">技能排名扣分</el-divider>
|
|
|
460
|
+ <el-row :gutter="20">
|
|
|
461
|
+ <el-col :span="12">
|
|
|
462
|
+ <el-form-item label="技能排名扣分" prop="skillRankingDeduction">
|
|
|
463
|
+ <el-input-number v-model="cadreForm.skillRankingDeduction" :min="0" :precision="2" style="width: 100%" />
|
|
|
464
|
+ </el-form-item>
|
|
|
465
|
+ </el-col>
|
|
|
466
|
+ <el-col :span="12">
|
|
|
467
|
+ <el-form-item label="技能排名扣分豁免情况" prop="skillRankingExemption">
|
|
|
468
|
+ <el-input v-model="cadreForm.skillRankingExemption" type="textarea" :rows="2" placeholder="请输入豁免情况" />
|
|
|
469
|
+ </el-form-item>
|
|
|
470
|
+ </el-col>
|
|
|
471
|
+ </el-row>
|
|
|
472
|
+
|
|
|
473
|
+ <el-divider content-position="left">统计信息</el-divider>
|
|
|
474
|
+ <el-row :gutter="20">
|
|
|
475
|
+ <el-col :span="12">
|
|
|
476
|
+ <el-form-item label="总分" prop="totalScore">
|
|
|
477
|
+ <el-input-number v-model="cadreForm.totalScore" :min="0" :precision="2" style="width: 100%" />
|
|
|
478
|
+ </el-form-item>
|
|
|
479
|
+ </el-col>
|
|
|
480
|
+ </el-row>
|
|
|
481
|
+
|
|
|
482
|
+ <el-row :gutter="20">
|
|
|
483
|
+ <el-col :span="12">
|
|
|
484
|
+ <el-form-item label="考核结果备注" prop="assessmentResultRemark">
|
|
|
485
|
+ <el-input v-model="cadreForm.assessmentResultRemark" type="textarea" :rows="2" placeholder="请输入考核结果备注" />
|
|
|
486
|
+ </el-form-item>
|
|
|
487
|
+ </el-col>
|
|
|
488
|
+ <el-col :span="12">
|
|
|
489
|
+ <el-form-item label="应用方式备注" prop="applicationMethodRemark">
|
|
|
490
|
+ <el-input v-model="cadreForm.applicationMethodRemark" type="textarea" :rows="2" placeholder="请输入应用方式备注" />
|
|
|
491
|
+ </el-form-item>
|
|
|
492
|
+ </el-col>
|
|
|
493
|
+ </el-row>
|
|
|
494
|
+ </el-form>
|
|
|
495
|
+
|
|
|
496
|
+ <template #footer>
|
|
|
497
|
+ <div class="dialog-footer">
|
|
|
498
|
+ <el-button @click="dialog.visible = false">取消</el-button>
|
|
|
499
|
+ <el-button type="primary" @click="submitForm">确定</el-button>
|
|
|
500
|
+ </div>
|
|
|
501
|
+ </template>
|
|
|
502
|
+ </el-dialog>
|
|
|
503
|
+ </div>
|
|
|
504
|
+</template>
|
|
|
505
|
+
|
|
|
506
|
+<script setup>
|
|
|
507
|
+import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
|
|
|
508
|
+import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
509
|
+
|
|
|
510
|
+// API导入(需要根据实际API路径调整)
|
|
|
511
|
+import { getNonCadreMonthlyAssessList, addNonCadreMonthlyAssess, updateNonCadreMonthlyAssess, deleteNonCadreMonthlyAssess } from '@/api/performance/nonCadreMonthlyAssess.js'
|
|
|
512
|
+
|
|
|
513
|
+const { proxy } = getCurrentInstance()
|
|
|
514
|
+
|
|
|
515
|
+// 响应式数据
|
|
|
516
|
+const loading = ref(false)
|
|
|
517
|
+const total = ref(0)
|
|
|
518
|
+const queryFormRef = ref()
|
|
|
519
|
+const formRef = ref()
|
|
|
520
|
+const currentTab = ref('non-cadre')
|
|
|
521
|
+
|
|
|
522
|
+// 查询参数
|
|
|
523
|
+const queryParams = reactive({
|
|
|
524
|
+ pageNum: 1,
|
|
|
525
|
+ pageSize: 10,
|
|
|
526
|
+ employeeName: '',
|
|
|
527
|
+ assessmentMonth: ''
|
|
|
528
|
+})
|
|
|
529
|
+
|
|
|
530
|
+// 非干部表单数据
|
|
|
531
|
+const nonCadreForm = reactive({
|
|
|
532
|
+ brigade: '',
|
|
|
533
|
+ employmentType: '',
|
|
|
534
|
+ employeeCode: '',
|
|
|
535
|
+ employeeName: '',
|
|
|
536
|
+ assessmentGroup: '',
|
|
|
537
|
+ teamLeader: '',
|
|
|
538
|
+ supervisor: '',
|
|
|
539
|
+ managedEmployeeCount: 0,
|
|
|
540
|
+ assessmentMonth: '',
|
|
|
541
|
+ redLineTriggerCount: 0,
|
|
|
542
|
+ redLineBasis: '',
|
|
|
543
|
+ coreIndicatorScore: 0,
|
|
|
544
|
+ coreIndicatorBasis: '',
|
|
|
545
|
+ otherIndicatorScore: 0,
|
|
|
546
|
+ otherIndicatorBasis: '',
|
|
|
547
|
+ safetyWithSocScore: 0,
|
|
|
548
|
+ safetyWithSocBasis: '',
|
|
|
549
|
+ safetyWithoutSocScore: 0,
|
|
|
550
|
+ safetyWithoutSocBasis: '',
|
|
|
551
|
+ nonSafetyDeduction: 0,
|
|
|
552
|
+ nonSafetyDeductionBasis: '',
|
|
|
553
|
+ nonCoreSafetyCoreDeduction: 0,
|
|
|
554
|
+ socSafetyCoreDeduction: 0,
|
|
|
555
|
+ socSafetyCoreDeductionBasis: '',
|
|
|
556
|
+ averageDeduction: 0,
|
|
|
557
|
+ totalScore: 0,
|
|
|
558
|
+ rewardAmount: 0,
|
|
|
559
|
+ penaltyAmount: 0,
|
|
|
560
|
+ assessmentResult: '',
|
|
|
561
|
+ applicationMethod: '',
|
|
|
562
|
+ rewardDetails: '',
|
|
|
563
|
+ penaltyDetails: '',
|
|
|
564
|
+ assessmentResultRemark: '',
|
|
|
565
|
+ applicationMethodRemark: '',
|
|
|
566
|
+ isExempted: false,
|
|
|
567
|
+ exemptionRemark: ''
|
|
|
568
|
+})
|
|
|
569
|
+
|
|
|
570
|
+// 干部表单数据
|
|
|
571
|
+const cadreForm = reactive({
|
|
|
572
|
+ employeeName: '',
|
|
|
573
|
+ position: '',
|
|
|
574
|
+ area: '',
|
|
|
575
|
+ assessmentMonth: '',
|
|
|
576
|
+ redLineDeduction: 0,
|
|
|
577
|
+ redLineExemption: '',
|
|
|
578
|
+ violationRankingDeduction: 0,
|
|
|
579
|
+ violationRankingExemption: '',
|
|
|
580
|
+ skillRankingDeduction: 0,
|
|
|
581
|
+ skillRankingExemption: '',
|
|
|
582
|
+ totalScore: 0,
|
|
|
583
|
+ assessmentResult: '',
|
|
|
584
|
+ applicationMethod: '',
|
|
|
585
|
+ assessmentResultRemark: '',
|
|
|
586
|
+ applicationMethodRemark: ''
|
|
|
587
|
+})
|
|
|
588
|
+
|
|
|
589
|
+// 弹窗配置
|
|
|
590
|
+const dialog = reactive({
|
|
|
591
|
+ visible: false,
|
|
|
592
|
+ title: '',
|
|
|
593
|
+ type: 'non-cadre'
|
|
|
594
|
+})
|
|
|
595
|
+
|
|
|
596
|
+// 数据列表
|
|
|
597
|
+const nonCadreList = ref([])
|
|
|
598
|
+const cadreList = ref([])
|
|
|
599
|
+
|
|
|
600
|
+// 选项配置
|
|
|
601
|
+const employmentTypeOptions = [
|
|
|
602
|
+ { label: '正式员工', value: 'formal' },
|
|
|
603
|
+ { label: '合同工', value: 'contract' },
|
|
|
604
|
+ { label: '临时工', value: 'temporary' },
|
|
|
605
|
+ { label: '实习生', value: 'intern' }
|
|
|
606
|
+]
|
|
|
607
|
+
|
|
|
608
|
+const assessmentResultOptions = [
|
|
|
609
|
+ { label: '优秀', value: 'excellent' },
|
|
|
610
|
+ { label: '良好', value: 'good' },
|
|
|
611
|
+ { label: '合格', value: 'qualified' },
|
|
|
612
|
+ { label: '不合格', value: 'unqualified' }
|
|
|
613
|
+]
|
|
|
614
|
+
|
|
|
615
|
+const applicationMethodOptions = [
|
|
|
616
|
+ { label: '直接应用', value: 'direct' },
|
|
|
617
|
+ { label: '加权计算', value: 'weighted' },
|
|
|
618
|
+ { label: '特殊处理', value: 'special' }
|
|
|
619
|
+]
|
|
|
620
|
+
|
|
|
621
|
+// 非干部表单验证规则
|
|
|
622
|
+const nonCadreRules = {
|
|
|
623
|
+ employeeName: [{ required: true, message: '员工姓名不能为空', trigger: 'blur' }],
|
|
|
624
|
+ employmentType: [{ required: true, message: '用工形式不能为空', trigger: 'change' }],
|
|
|
625
|
+ assessmentGroup: [{ required: true, message: '考核组不能为空', trigger: 'blur' }],
|
|
|
626
|
+ assessmentMonth: [{ required: true, message: '考核月份不能为空', trigger: 'change' }]
|
|
|
627
|
+}
|
|
|
628
|
+
|
|
|
629
|
+// 干部表单验证规则
|
|
|
630
|
+const cadreRules = {
|
|
|
631
|
+ employeeName: [{ required: true, message: '员工姓名不能为空', trigger: 'blur' }],
|
|
|
632
|
+ position: [{ required: true, message: '岗位不能为空', trigger: 'blur' }],
|
|
|
633
|
+ assessmentMonth: [{ required: true, message: '考核月份不能为空', trigger: 'change' }],
|
|
|
634
|
+ assessmentResult: [{ required: true, message: '考核结果不能为空', trigger: 'change' }]
|
|
|
635
|
+}
|
|
|
636
|
+
|
|
|
637
|
+// 获取数据列表
|
|
|
638
|
+const getList = async () => {
|
|
|
639
|
+ loading.value = true
|
|
|
640
|
+ try {
|
|
|
641
|
+ if (currentTab.value === 'non-cadre') {
|
|
|
642
|
+ const res = await getNonCadreMonthlyAssessList(queryParams)
|
|
|
643
|
+ nonCadreList.value = res.rows || []
|
|
|
644
|
+ total.value = res.total || 0
|
|
|
645
|
+ } else {
|
|
|
646
|
+ // 干部数据API(待实现)
|
|
|
647
|
+ cadreList.value = []
|
|
|
648
|
+ total.value = 0
|
|
|
649
|
+ }
|
|
|
650
|
+ } catch (error) {
|
|
|
651
|
+ console.error('获取数据失败:', error)
|
|
|
652
|
+ ElMessage.error('获取数据失败')
|
|
|
653
|
+ } finally {
|
|
|
654
|
+ loading.value = false
|
|
|
655
|
+ }
|
|
|
656
|
+}
|
|
|
657
|
+
|
|
|
658
|
+// 查询
|
|
|
659
|
+const handleQuery = () => {
|
|
|
660
|
+ queryParams.pageNum = 1
|
|
|
661
|
+ getList()
|
|
|
662
|
+}
|
|
|
663
|
+
|
|
|
664
|
+// 重置查询
|
|
|
665
|
+const resetQuery = () => {
|
|
|
666
|
+ queryFormRef.value?.resetFields()
|
|
|
667
|
+ queryParams.pageNum = 1
|
|
|
668
|
+ getList()
|
|
|
669
|
+}
|
|
|
670
|
+
|
|
|
671
|
+// 新增
|
|
|
672
|
+const handleAdd = () => {
|
|
|
673
|
+ dialog.visible = true
|
|
|
674
|
+ dialog.type = currentTab.value
|
|
|
675
|
+ dialog.title = currentTab.value === 'non-cadre' ? '新增非干部月度考核' : '新增干部月度考核'
|
|
|
676
|
+
|
|
|
677
|
+ // 重置表单数据
|
|
|
678
|
+ if (currentTab.value === 'non-cadre') {
|
|
|
679
|
+ Object.keys(nonCadreForm).forEach(key => {
|
|
|
680
|
+ if (typeof nonCadreForm[key] === 'number') {
|
|
|
681
|
+ nonCadreForm[key] = 0
|
|
|
682
|
+ } else if (typeof nonCadreForm[key] === 'boolean') {
|
|
|
683
|
+ nonCadreForm[key] = false
|
|
|
684
|
+ } else {
|
|
|
685
|
+ nonCadreForm[key] = ''
|
|
|
686
|
+ }
|
|
|
687
|
+ })
|
|
|
688
|
+ } else {
|
|
|
689
|
+ Object.keys(cadreForm).forEach(key => {
|
|
|
690
|
+ if (typeof cadreForm[key] === 'number') {
|
|
|
691
|
+ cadreForm[key] = 0
|
|
|
692
|
+ } else if (typeof cadreForm[key] === 'boolean') {
|
|
|
693
|
+ cadreForm[key] = false
|
|
|
694
|
+ } else {
|
|
|
695
|
+ cadreForm[key] = ''
|
|
|
696
|
+ }
|
|
|
697
|
+ })
|
|
|
698
|
+ }
|
|
|
699
|
+}
|
|
|
700
|
+
|
|
|
701
|
+// 编辑
|
|
|
702
|
+const handleEdit = (row, type) => {
|
|
|
703
|
+ dialog.visible = true
|
|
|
704
|
+ dialog.type = type
|
|
|
705
|
+ dialog.title = type === 'non-cadre' ? '编辑非干部月度考核' : '编辑干部月度考核'
|
|
|
706
|
+
|
|
|
707
|
+ // 填充表单数据
|
|
|
708
|
+ if (type === 'non-cadre') {
|
|
|
709
|
+ Object.keys(nonCadreForm).forEach(key => {
|
|
|
710
|
+ if (row[key] !== undefined) {
|
|
|
711
|
+ nonCadreForm[key] = row[key]
|
|
|
712
|
+ }
|
|
|
713
|
+ })
|
|
|
714
|
+ } else {
|
|
|
715
|
+ Object.keys(cadreForm).forEach(key => {
|
|
|
716
|
+ if (row[key] !== undefined) {
|
|
|
717
|
+ cadreForm[key] = row[key]
|
|
|
718
|
+ }
|
|
|
719
|
+ })
|
|
|
720
|
+ }
|
|
|
721
|
+}
|
|
|
722
|
+
|
|
|
723
|
+// 删除
|
|
|
724
|
+const handleDelete = async (row) => {
|
|
|
725
|
+ try {
|
|
|
726
|
+ await ElMessageBox.confirm('确认删除该考核记录吗?', '提示', {
|
|
|
727
|
+ confirmButtonText: '确定',
|
|
|
728
|
+ cancelButtonText: '取消',
|
|
|
729
|
+ type: 'warning'
|
|
|
730
|
+ })
|
|
|
731
|
+
|
|
|
732
|
+ await deleteNonCadreMonthlyAssess(row.id)
|
|
|
733
|
+ ElMessage.success('删除成功')
|
|
|
734
|
+ getList()
|
|
|
735
|
+ } catch (error) {
|
|
|
736
|
+ if (error !== 'cancel') {
|
|
|
737
|
+ ElMessage.error('删除失败')
|
|
|
738
|
+ }
|
|
|
739
|
+ }
|
|
|
740
|
+}
|
|
|
741
|
+
|
|
|
742
|
+// 提交表单
|
|
|
743
|
+const submitForm = async () => {
|
|
|
744
|
+ const valid = await formRef.value?.validate()
|
|
|
745
|
+ if (!valid) return
|
|
|
746
|
+
|
|
|
747
|
+ try {
|
|
|
748
|
+ if (dialog.type === 'non-cadre') {
|
|
|
749
|
+ if (dialog.title === '新增非干部月度考核') {
|
|
|
750
|
+ await addNonCadreMonthlyAssess(nonCadreForm)
|
|
|
751
|
+ ElMessage.success('新增成功')
|
|
|
752
|
+ } else {
|
|
|
753
|
+ await updateNonCadreMonthlyAssess(nonCadreForm)
|
|
|
754
|
+ ElMessage.success('更新成功')
|
|
|
755
|
+ }
|
|
|
756
|
+ } else {
|
|
|
757
|
+ // 干部数据API(待实现)
|
|
|
758
|
+ ElMessage.success('操作成功')
|
|
|
759
|
+ }
|
|
|
760
|
+
|
|
|
761
|
+ dialog.visible = false
|
|
|
762
|
+ getList()
|
|
|
763
|
+ } catch (error) {
|
|
|
764
|
+ ElMessage.error('操作失败')
|
|
|
765
|
+ }
|
|
|
766
|
+}
|
|
|
767
|
+
|
|
|
768
|
+// 导出
|
|
|
769
|
+const handleExport = async () => {
|
|
|
770
|
+ try {
|
|
|
771
|
+ ElMessage.success('导出功能开发中')
|
|
|
772
|
+ } catch (error) {
|
|
|
773
|
+ ElMessage.error('导出失败')
|
|
|
774
|
+ }
|
|
|
775
|
+}
|
|
|
776
|
+
|
|
|
777
|
+// 生成本月考核表
|
|
|
778
|
+const generateMonthlyAssessment = async () => {
|
|
|
779
|
+ try {
|
|
|
780
|
+ ElMessage.success('生成本月考核表功能开发中')
|
|
|
781
|
+ } catch (error) {
|
|
|
782
|
+ ElMessage.error('生成失败')
|
|
|
783
|
+ }
|
|
|
784
|
+}
|
|
|
785
|
+
|
|
|
786
|
+// 监听Tab切换
|
|
|
787
|
+const handleTabChange = () => {
|
|
|
788
|
+ queryParams.pageNum = 1
|
|
|
789
|
+ getList()
|
|
|
790
|
+}
|
|
|
791
|
+
|
|
|
792
|
+onMounted(() => {
|
|
|
793
|
+ getList()
|
|
|
794
|
+})
|
|
|
795
|
+</script>
|
|
|
796
|
+
|
|
|
797
|
+<style lang="less" scoped>
|
|
|
798
|
+.app-container {
|
|
|
799
|
+ padding: 20px;
|
|
|
800
|
+}
|
|
|
801
|
+
|
|
|
802
|
+.tab-container {
|
|
|
803
|
+ margin-bottom: 20px;
|
|
|
804
|
+ text-align: left;
|
|
|
805
|
+}
|
|
|
806
|
+
|
|
|
807
|
+.filter-container {
|
|
|
808
|
+// margin-bottom: 20px;
|
|
|
809
|
+}
|
|
|
810
|
+
|
|
|
811
|
+.search-form {
|
|
|
812
|
+ display: flex;
|
|
|
813
|
+ flex-wrap: wrap;
|
|
|
814
|
+ gap: 10px;
|
|
|
815
|
+}
|
|
|
816
|
+
|
|
|
817
|
+.operation-container {
|
|
|
818
|
+ margin-bottom: 20px;
|
|
|
819
|
+ display: flex;
|
|
|
820
|
+ justify-content: space-between;
|
|
|
821
|
+ align-items: center;
|
|
|
822
|
+}
|
|
|
823
|
+
|
|
|
824
|
+.left-buttons {
|
|
|
825
|
+ display: flex;
|
|
|
826
|
+ gap: 10px;
|
|
|
827
|
+}
|
|
|
828
|
+
|
|
|
829
|
+.right-buttons {
|
|
|
830
|
+ display: flex;
|
|
|
831
|
+ gap: 10px;
|
|
|
832
|
+}
|
|
|
833
|
+
|
|
|
834
|
+.form-container {
|
|
|
835
|
+ max-height: 70vh;
|
|
|
836
|
+ overflow-y: auto;
|
|
|
837
|
+ padding-right: 10px;
|
|
|
838
|
+}
|
|
|
839
|
+
|
|
|
840
|
+.el-divider {
|
|
|
841
|
+ margin: 20px 0;
|
|
|
842
|
+}
|
|
|
843
|
+
|
|
|
844
|
+:deep(.el-form-item__label) {
|
|
|
845
|
+ font-weight: 500;
|
|
|
846
|
+}
|
|
|
847
|
+</style>
|