|
|
@@ -0,0 +1,600 @@
|
|
|
1
|
+<template>
|
|
|
2
|
+ <div class="app-container">
|
|
|
3
|
+ <el-card>
|
|
|
4
|
+ <!-- 查询条件 -->
|
|
|
5
|
+ <div class="filter-container">
|
|
|
6
|
+ <el-form :model="queryParams" ref="queryFormRef" :inline="true" class="search-form">
|
|
|
7
|
+ <el-form-item label="员工姓名" prop="employeeName">
|
|
|
8
|
+ <el-input v-model="queryParams.employeeName" placeholder="请输入员工姓名" clearable style="width: 200px" />
|
|
|
9
|
+ </el-form-item>
|
|
|
10
|
+
|
|
|
11
|
+ <el-form-item label="查询月份" prop="assessmentMonth">
|
|
|
12
|
+ <el-date-picker v-model="queryParams.assessmentMonth" type="month" placeholder="请选择查询月份"
|
|
|
13
|
+ value-format="YYYY-MM" style="width: 200px" />
|
|
|
14
|
+ </el-form-item>
|
|
|
15
|
+
|
|
|
16
|
+ <el-form-item>
|
|
|
17
|
+ <el-button type="primary" icon="Search" @click="handleQuery">查询</el-button>
|
|
|
18
|
+ <el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
|
19
|
+ </el-form-item>
|
|
|
20
|
+ </el-form>
|
|
|
21
|
+ </div>
|
|
|
22
|
+
|
|
|
23
|
+ <!-- 操作按钮 -->
|
|
|
24
|
+ <div class="operation-container">
|
|
|
25
|
+ <el-button type="primary" icon="Plus" @click="handleAdd">新增</el-button>
|
|
|
26
|
+ <el-button type="warning" icon="Download" @click="handleExport">导出</el-button>
|
|
|
27
|
+ </div>
|
|
|
28
|
+
|
|
|
29
|
+ <!-- 数据表格 -->
|
|
|
30
|
+ <el-table v-loading="loading" :data="assessmentList" border fit highlight-current-row style="width: 100%; margin-top: 20px;">
|
|
|
31
|
+ <el-table-column type="index" label="序号" align="center" width="60" />
|
|
|
32
|
+
|
|
|
33
|
+ <el-table-column label="员工姓名" prop="employeeName" align="center" min-width="120" />
|
|
|
34
|
+ <el-table-column label="用工形式" prop="employmentType" align="center" min-width="120" />
|
|
|
35
|
+ <el-table-column label="岗位" prop="position" align="center" min-width="120" />
|
|
|
36
|
+ <el-table-column label="考核组" prop="assessmentGroup" align="center" min-width="120" />
|
|
|
37
|
+ <el-table-column label="考核月份" prop="assessmentMonth" align="center" min-width="120" />
|
|
|
38
|
+ <el-table-column label="总分" prop="totalScore" align="center" min-width="100" sortable />
|
|
|
39
|
+ <el-table-column label="考核结果" prop="assessmentResult" align="center" min-width="120" />
|
|
|
40
|
+ <el-table-column label="应用方式" prop="applicationMethod" align="center" min-width="120" />
|
|
|
41
|
+ <el-table-column label="是否豁免" prop="isExempted" align="center" min-width="100">
|
|
|
42
|
+ <template #default="scope">
|
|
|
43
|
+ <el-tag :type="scope.row.isExempted ? 'success' : 'info'">
|
|
|
44
|
+ {{ scope.row.isExempted ? '是' : '否' }}
|
|
|
45
|
+ </el-tag>
|
|
|
46
|
+ </template>
|
|
|
47
|
+ </el-table-column>
|
|
|
48
|
+
|
|
|
49
|
+ <el-table-column label="操作" align="center" width="200" fixed="right">
|
|
|
50
|
+ <template #default="scope">
|
|
|
51
|
+ <el-button size="small" type="primary" link icon="Edit" @click="handleEdit(scope.row)">编辑</el-button>
|
|
|
52
|
+ <el-button size="small" type="danger" link icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
|
|
53
|
+ </template>
|
|
|
54
|
+ </el-table-column>
|
|
|
55
|
+ </el-table>
|
|
|
56
|
+
|
|
|
57
|
+ <!-- 分页 -->
|
|
|
58
|
+ <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
|
|
59
|
+ v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
|
60
|
+ </el-card>
|
|
|
61
|
+
|
|
|
62
|
+ <!-- 编辑/新增弹窗 -->
|
|
|
63
|
+ <el-dialog :title="dialog.title" v-model="dialog.visible" width="80%" :close-on-click-modal="false">
|
|
|
64
|
+ <el-form :model="formData" ref="formRef" :rules="rules" label-width="150px" class="form-container">
|
|
|
65
|
+ <el-row :gutter="20">
|
|
|
66
|
+ <!-- 基本信息 -->
|
|
|
67
|
+ <el-col :span="8">
|
|
|
68
|
+ <el-form-item label="员工姓名" prop="employeeName">
|
|
|
69
|
+ <el-input v-model="formData.employeeName" placeholder="请输入员工姓名" />
|
|
|
70
|
+ </el-form-item>
|
|
|
71
|
+ </el-col>
|
|
|
72
|
+ <el-col :span="8">
|
|
|
73
|
+ <el-form-item label="用工形式" prop="employmentType">
|
|
|
74
|
+ <el-select v-model="formData.employmentType" placeholder="请选择用工形式">
|
|
|
75
|
+ <el-option v-for="item in employmentTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
76
|
+ </el-select>
|
|
|
77
|
+ </el-form-item>
|
|
|
78
|
+ </el-col>
|
|
|
79
|
+ <el-col :span="8">
|
|
|
80
|
+ <el-form-item label="岗位" prop="position">
|
|
|
81
|
+ <el-input v-model="formData.position" placeholder="请输入岗位" />
|
|
|
82
|
+ </el-form-item>
|
|
|
83
|
+ </el-col>
|
|
|
84
|
+ </el-row>
|
|
|
85
|
+
|
|
|
86
|
+ <el-row :gutter="20">
|
|
|
87
|
+ <el-col :span="8">
|
|
|
88
|
+ <el-form-item label="考核组" prop="assessmentGroup">
|
|
|
89
|
+ <el-input v-model="formData.assessmentGroup" placeholder="请输入考核组" />
|
|
|
90
|
+ </el-form-item>
|
|
|
91
|
+ </el-col>
|
|
|
92
|
+ <el-col :span="8">
|
|
|
93
|
+ <el-form-item label="分管班组长" prop="teamLeader">
|
|
|
94
|
+ <el-input v-model="formData.teamLeader" placeholder="请输入分管班组长" />
|
|
|
95
|
+ </el-form-item>
|
|
|
96
|
+ </el-col>
|
|
|
97
|
+ <el-col :span="8">
|
|
|
98
|
+ <el-form-item label="分管主管" prop="supervisor">
|
|
|
99
|
+ <el-input v-model="formData.supervisor" placeholder="请输入分管主管" />
|
|
|
100
|
+ </el-form-item>
|
|
|
101
|
+ </el-col>
|
|
|
102
|
+ </el-row>
|
|
|
103
|
+
|
|
|
104
|
+ <el-row :gutter="20">
|
|
|
105
|
+ <el-col :span="8">
|
|
|
106
|
+ <el-form-item label="分管经理" prop="manager">
|
|
|
107
|
+ <el-input v-model="formData.manager" placeholder="请输入分管经理" />
|
|
|
108
|
+ </el-form-item>
|
|
|
109
|
+ </el-col>
|
|
|
110
|
+ <el-col :span="8">
|
|
|
111
|
+ <el-form-item label="考核月份" prop="assessmentMonth">
|
|
|
112
|
+ <el-date-picker v-model="formData.assessmentMonth" type="month" placeholder="请选择考核月份"
|
|
|
113
|
+ value-format="YYYY-MM" style="width: 100%" />
|
|
|
114
|
+ </el-form-item>
|
|
|
115
|
+ </el-col>
|
|
|
116
|
+ <el-col :span="8">
|
|
|
117
|
+ <el-form-item label="分管员工数量" prop="managedEmployeeCount">
|
|
|
118
|
+ <el-input-number v-model="formData.managedEmployeeCount" :min="0" controls-position="right" style="width: 100%" />
|
|
|
119
|
+ </el-form-item>
|
|
|
120
|
+ </el-col>
|
|
|
121
|
+ </el-row>
|
|
|
122
|
+
|
|
|
123
|
+ <!-- 红线指标 -->
|
|
|
124
|
+ <el-divider content-position="left">红线指标</el-divider>
|
|
|
125
|
+ <el-row :gutter="20">
|
|
|
126
|
+ <el-col :span="12">
|
|
|
127
|
+ <el-form-item label="红线指标触发次数" prop="redLineTriggerCount">
|
|
|
128
|
+ <el-input-number v-model="formData.redLineTriggerCount" :min="0" controls-position="right" style="width: 100%" />
|
|
|
129
|
+ </el-form-item>
|
|
|
130
|
+ </el-col>
|
|
|
131
|
+ <el-col :span="12">
|
|
|
132
|
+ <el-form-item label="红线指标依据" prop="redLineBasis">
|
|
|
133
|
+ <el-input v-model="formData.redLineBasis" type="textarea" :rows="2" placeholder="请输入红线指标依据" />
|
|
|
134
|
+ </el-form-item>
|
|
|
135
|
+ </el-col>
|
|
|
136
|
+ </el-row>
|
|
|
137
|
+
|
|
|
138
|
+ <!-- 核心指标 -->
|
|
|
139
|
+ <el-divider content-position="left">核心指标</el-divider>
|
|
|
140
|
+ <el-row :gutter="20">
|
|
|
141
|
+ <el-col :span="12">
|
|
|
142
|
+ <el-form-item label="核心指标分值" prop="coreIndicatorScore">
|
|
|
143
|
+ <el-input-number v-model="formData.coreIndicatorScore" :min="0" :precision="2" controls-position="right" style="width: 100%" />
|
|
|
144
|
+ </el-form-item>
|
|
|
145
|
+ </el-col>
|
|
|
146
|
+ <el-col :span="12">
|
|
|
147
|
+ <el-form-item label="核心指标依据" prop="coreIndicatorBasis">
|
|
|
148
|
+ <el-input v-model="formData.coreIndicatorBasis" type="textarea" :rows="2" placeholder="请输入核心指标依据" />
|
|
|
149
|
+ </el-form-item>
|
|
|
150
|
+ </el-col>
|
|
|
151
|
+ </el-row>
|
|
|
152
|
+
|
|
|
153
|
+ <!-- 其他指标 -->
|
|
|
154
|
+ <el-divider content-position="left">其他指标</el-divider>
|
|
|
155
|
+ <el-row :gutter="20">
|
|
|
156
|
+ <el-col :span="12">
|
|
|
157
|
+ <el-form-item label="其他指标分值" prop="otherIndicatorScore">
|
|
|
158
|
+ <el-input-number v-model="formData.otherIndicatorScore" :min="0" :precision="2" controls-position="right" style="width: 100%" />
|
|
|
159
|
+ </el-form-item>
|
|
|
160
|
+ </el-col>
|
|
|
161
|
+ <el-col :span="12">
|
|
|
162
|
+ <el-form-item label="其他指标依据" prop="otherIndicatorBasis">
|
|
|
163
|
+ <el-input v-model="formData.otherIndicatorBasis" type="textarea" :rows="2" placeholder="请输入其他指标依据" />
|
|
|
164
|
+ </el-form-item>
|
|
|
165
|
+ </el-col>
|
|
|
166
|
+ </el-row>
|
|
|
167
|
+
|
|
|
168
|
+ <!-- 安全指标(含SOC/站品控检查扣分) -->
|
|
|
169
|
+ <el-divider content-position="left">安全指标(含SOC/站品控检查扣分)</el-divider>
|
|
|
170
|
+ <el-row :gutter="20">
|
|
|
171
|
+ <el-col :span="12">
|
|
|
172
|
+ <el-form-item label="安全指标分值(含SOC)" prop="safetyIndicatorScoreWithSOC">
|
|
|
173
|
+ <el-input-number v-model="formData.safetyIndicatorScoreWithSOC" :min="0" :precision="2" controls-position="right" style="width: 100%" />
|
|
|
174
|
+ </el-form-item>
|
|
|
175
|
+ </el-col>
|
|
|
176
|
+ <el-col :span="12">
|
|
|
177
|
+ <el-form-item label="安全指标依据(含SOC)" prop="safetyIndicatorBasisWithSOC">
|
|
|
178
|
+ <el-input v-model="formData.safetyIndicatorBasisWithSOC" type="textarea" :rows="2" placeholder="请输入安全指标依据" />
|
|
|
179
|
+ </el-form-item>
|
|
|
180
|
+ </el-col>
|
|
|
181
|
+ </el-row>
|
|
|
182
|
+
|
|
|
183
|
+ <!-- 安全指标(不含SOC/站品控检查扣分) -->
|
|
|
184
|
+ <el-divider content-position="left">安全指标(不含SOC/站品控检查扣分)</el-divider>
|
|
|
185
|
+ <el-row :gutter="20">
|
|
|
186
|
+ <el-col :span="12">
|
|
|
187
|
+ <el-form-item label="安全指标分值(不含SOC)" prop="safetyIndicatorScoreWithoutSOC">
|
|
|
188
|
+ <el-input-number v-model="formData.safetyIndicatorScoreWithoutSOC" :min="0" :precision="2" controls-position="right" style="width: 100%" />
|
|
|
189
|
+ </el-form-item>
|
|
|
190
|
+ </el-col>
|
|
|
191
|
+ <el-col :span="12">
|
|
|
192
|
+ <el-form-item label="安全指标依据(不含SOC)" prop="safetyIndicatorBasisWithoutSOC">
|
|
|
193
|
+ <el-input v-model="formData.safetyIndicatorBasisWithoutSOC" type="textarea" :rows="2" placeholder="请输入安全指标依据" />
|
|
|
194
|
+ </el-form-item>
|
|
|
195
|
+ </el-col>
|
|
|
196
|
+ </el-row>
|
|
|
197
|
+
|
|
|
198
|
+ <!-- 非安全指标 -->
|
|
|
199
|
+ <el-divider content-position="left">非安全指标</el-divider>
|
|
|
200
|
+ <el-row :gutter="20">
|
|
|
201
|
+ <el-col :span="12">
|
|
|
202
|
+ <el-form-item label="非安全指标扣分" prop="nonSafetyIndicatorDeduction">
|
|
|
203
|
+ <el-input-number v-model="formData.nonSafetyIndicatorDeduction" :min="0" :precision="2" controls-position="right" style="width: 100%" />
|
|
|
204
|
+ </el-form-item>
|
|
|
205
|
+ </el-col>
|
|
|
206
|
+ <el-col :span="12">
|
|
|
207
|
+ <el-form-item label="非安全指标扣分依据" prop="nonSafetyIndicatorBasis">
|
|
|
208
|
+ <el-input v-model="formData.nonSafetyIndicatorBasis" type="textarea" :rows="2" placeholder="请输入非安全指标扣分依据" />
|
|
|
209
|
+ </el-form-item>
|
|
|
210
|
+ </el-col>
|
|
|
211
|
+ </el-row>
|
|
|
212
|
+
|
|
|
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="nonCoreSafetyCoreDeduction">
|
|
|
218
|
+ <el-input-number v-model="formData.nonCoreSafetyCoreDeduction" :min="0" :precision="2" controls-position="right" style="width: 100%" />
|
|
|
219
|
+ </el-form-item>
|
|
|
220
|
+ </el-col>
|
|
|
221
|
+ <el-col :span="12">
|
|
|
222
|
+ <el-form-item label="SOC/站品控检查涉及扣分" prop="socInspectionDeduction">
|
|
|
223
|
+ <el-input-number v-model="formData.socInspectionDeduction" :min="0" :precision="2" controls-position="right" style="width: 100%" />
|
|
|
224
|
+ </el-form-item>
|
|
|
225
|
+ </el-col>
|
|
|
226
|
+ </el-row>
|
|
|
227
|
+
|
|
|
228
|
+ <el-row :gutter="20">
|
|
|
229
|
+ <el-col :span="24">
|
|
|
230
|
+ <el-form-item label="SOC/站品控检查扣分依据" prop="socInspectionBasis">
|
|
|
231
|
+ <el-input v-model="formData.socInspectionBasis" type="textarea" :rows="2" placeholder="请输入SOC/站品控检查扣分依据" />
|
|
|
232
|
+ </el-form-item>
|
|
|
233
|
+ </el-col>
|
|
|
234
|
+ </el-row>
|
|
|
235
|
+
|
|
|
236
|
+ <!-- 统计信息 -->
|
|
|
237
|
+ <el-divider content-position="left">统计信息</el-divider>
|
|
|
238
|
+ <el-row :gutter="20">
|
|
|
239
|
+ <el-col :span="8">
|
|
|
240
|
+ <el-form-item label="扣分平均值" prop="averageDeduction">
|
|
|
241
|
+ <el-input-number v-model="formData.averageDeduction" :min="0" :precision="2" controls-position="right" style="width: 100%" />
|
|
|
242
|
+ </el-form-item>
|
|
|
243
|
+ </el-col>
|
|
|
244
|
+ <el-col :span="8">
|
|
|
245
|
+ <el-form-item label="总分" prop="totalScore">
|
|
|
246
|
+ <el-input-number v-model="formData.totalScore" :min="0" :precision="2" controls-position="right" style="width: 100%" />
|
|
|
247
|
+ </el-form-item>
|
|
|
248
|
+ </el-col>
|
|
|
249
|
+ <el-col :span="8">
|
|
|
250
|
+ <el-form-item label="奖励(元)" prop="rewardAmount">
|
|
|
251
|
+ <el-input-number v-model="formData.rewardAmount" :min="0" :precision="2" controls-position="right" style="width: 100%" />
|
|
|
252
|
+ </el-form-item>
|
|
|
253
|
+ </el-col>
|
|
|
254
|
+ </el-row>
|
|
|
255
|
+
|
|
|
256
|
+ <el-row :gutter="20">
|
|
|
257
|
+ <el-col :span="8">
|
|
|
258
|
+ <el-form-item label="扣罚(元)" prop="penaltyAmount">
|
|
|
259
|
+ <el-input-number v-model="formData.penaltyAmount" :min="0" :precision="2" controls-position="right" style="width: 100%" />
|
|
|
260
|
+ </el-form-item>
|
|
|
261
|
+ </el-col>
|
|
|
262
|
+ <el-col :span="8">
|
|
|
263
|
+ <el-form-item label="考核结果" prop="assessmentResult">
|
|
|
264
|
+ <el-select v-model="formData.assessmentResult" placeholder="请选择考核结果">
|
|
|
265
|
+ <el-option v-for="item in assessmentResultOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
266
|
+ </el-select>
|
|
|
267
|
+ </el-form-item>
|
|
|
268
|
+ </el-col>
|
|
|
269
|
+ <el-col :span="8">
|
|
|
270
|
+ <el-form-item label="应用方式" prop="applicationMethod">
|
|
|
271
|
+ <el-select v-model="formData.applicationMethod" placeholder="请选择应用方式">
|
|
|
272
|
+ <el-option v-for="item in applicationMethodOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
273
|
+ </el-select>
|
|
|
274
|
+ </el-form-item>
|
|
|
275
|
+ </el-col>
|
|
|
276
|
+ </el-row>
|
|
|
277
|
+
|
|
|
278
|
+ <!-- 备注信息 -->
|
|
|
279
|
+ <el-divider content-position="left">备注信息</el-divider>
|
|
|
280
|
+ <el-row :gutter="20">
|
|
|
281
|
+ <el-col :span="12">
|
|
|
282
|
+ <el-form-item label="奖励明细" prop="rewardDetails">
|
|
|
283
|
+ <el-input v-model="formData.rewardDetails" type="textarea" :rows="3" placeholder="请输入奖励明细" />
|
|
|
284
|
+ </el-form-item>
|
|
|
285
|
+ </el-col>
|
|
|
286
|
+ <el-col :span="12">
|
|
|
287
|
+ <el-form-item label="惩罚明细" prop="penaltyDetails">
|
|
|
288
|
+ <el-input v-model="formData.penaltyDetails" type="textarea" :rows="3" placeholder="请输入惩罚明细" />
|
|
|
289
|
+ </el-form-item>
|
|
|
290
|
+ </el-col>
|
|
|
291
|
+ </el-row>
|
|
|
292
|
+
|
|
|
293
|
+ <el-row :gutter="20">
|
|
|
294
|
+ <el-col :span="12">
|
|
|
295
|
+ <el-form-item label="考核结果备注" prop="assessmentResultRemark">
|
|
|
296
|
+ <el-input v-model="formData.assessmentResultRemark" type="textarea" :rows="2" placeholder="请输入考核结果备注" />
|
|
|
297
|
+ </el-form-item>
|
|
|
298
|
+ </el-col>
|
|
|
299
|
+ <el-col :span="12">
|
|
|
300
|
+ <el-form-item label="应用方式备注" prop="applicationMethodRemark">
|
|
|
301
|
+ <el-input v-model="formData.applicationMethodRemark" type="textarea" :rows="2" placeholder="请输入应用方式备注" />
|
|
|
302
|
+ </el-form-item>
|
|
|
303
|
+ </el-col>
|
|
|
304
|
+ </el-row>
|
|
|
305
|
+
|
|
|
306
|
+ <!-- 豁免信息 -->
|
|
|
307
|
+ <el-divider content-position="left">豁免信息</el-divider>
|
|
|
308
|
+ <el-row :gutter="20">
|
|
|
309
|
+ <el-col :span="12">
|
|
|
310
|
+ <el-form-item label="是否豁免" prop="isExempted">
|
|
|
311
|
+ <el-switch v-model="formData.isExempted" active-text="是" inactive-text="否" />
|
|
|
312
|
+ </el-form-item>
|
|
|
313
|
+ </el-col>
|
|
|
314
|
+ <el-col :span="12">
|
|
|
315
|
+ <el-form-item label="是否豁免备注" prop="exemptionRemark">
|
|
|
316
|
+ <el-input v-model="formData.exemptionRemark" type="textarea" :rows="2" placeholder="请输入豁免备注" />
|
|
|
317
|
+ </el-form-item>
|
|
|
318
|
+ </el-col>
|
|
|
319
|
+ </el-row>
|
|
|
320
|
+ </el-form>
|
|
|
321
|
+
|
|
|
322
|
+ <template #footer>
|
|
|
323
|
+ <div class="dialog-footer">
|
|
|
324
|
+ <el-button @click="dialog.visible = false">取消</el-button>
|
|
|
325
|
+ <el-button type="primary" @click="submitForm">确定</el-button>
|
|
|
326
|
+ </div>
|
|
|
327
|
+ </template>
|
|
|
328
|
+ </el-dialog>
|
|
|
329
|
+ </div>
|
|
|
330
|
+</template>
|
|
|
331
|
+
|
|
|
332
|
+<script setup>
|
|
|
333
|
+import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
|
|
|
334
|
+import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
335
|
+
|
|
|
336
|
+// API导入(需要根据实际API路径调整)
|
|
|
337
|
+import { getNonCadreMonthlyAssessList, addNonCadreMonthlyAssess, updateNonCadreMonthlyAssess, deleteNonCadreMonthlyAssess } from '@/api/performance/nonCadreMonthlyAssess.js'
|
|
|
338
|
+
|
|
|
339
|
+const { proxy } = getCurrentInstance()
|
|
|
340
|
+
|
|
|
341
|
+// 响应式数据
|
|
|
342
|
+const loading = ref(false)
|
|
|
343
|
+const total = ref(0)
|
|
|
344
|
+const queryFormRef = ref()
|
|
|
345
|
+const formRef = ref()
|
|
|
346
|
+
|
|
|
347
|
+// 查询参数
|
|
|
348
|
+const queryParams = reactive({
|
|
|
349
|
+ pageNum: 1,
|
|
|
350
|
+ pageSize: 10,
|
|
|
351
|
+ employeeName: '',
|
|
|
352
|
+ assessmentMonth: ''
|
|
|
353
|
+})
|
|
|
354
|
+
|
|
|
355
|
+// 表单数据
|
|
|
356
|
+const formData = reactive({
|
|
|
357
|
+ // 基本信息
|
|
|
358
|
+ employeeName: '',
|
|
|
359
|
+ employmentType: '',
|
|
|
360
|
+ position: '',
|
|
|
361
|
+ assessmentGroup: '',
|
|
|
362
|
+ teamLeader: '',
|
|
|
363
|
+ supervisor: '',
|
|
|
364
|
+ manager: '',
|
|
|
365
|
+ assessmentMonth: '',
|
|
|
366
|
+ managedEmployeeCount: 0,
|
|
|
367
|
+
|
|
|
368
|
+ // 红线指标
|
|
|
369
|
+ redLineTriggerCount: 0,
|
|
|
370
|
+ redLineBasis: '',
|
|
|
371
|
+
|
|
|
372
|
+ // 核心指标
|
|
|
373
|
+ coreIndicatorScore: 0,
|
|
|
374
|
+ coreIndicatorBasis: '',
|
|
|
375
|
+
|
|
|
376
|
+ // 其他指标
|
|
|
377
|
+ otherIndicatorScore: 0,
|
|
|
378
|
+ otherIndicatorBasis: '',
|
|
|
379
|
+
|
|
|
380
|
+ // 安全指标(含SOC)
|
|
|
381
|
+ safetyIndicatorScoreWithSOC: 0,
|
|
|
382
|
+ safetyIndicatorBasisWithSOC: '',
|
|
|
383
|
+
|
|
|
384
|
+ // 安全指标(不含SOC)
|
|
|
385
|
+ safetyIndicatorScoreWithoutSOC: 0,
|
|
|
386
|
+ safetyIndicatorBasisWithoutSOC: '',
|
|
|
387
|
+
|
|
|
388
|
+ // 非安全指标
|
|
|
389
|
+ nonSafetyIndicatorDeduction: 0,
|
|
|
390
|
+ nonSafetyIndicatorBasis: '',
|
|
|
391
|
+
|
|
|
392
|
+ // 综合扣分
|
|
|
393
|
+ nonCoreSafetyCoreDeduction: 0,
|
|
|
394
|
+ socInspectionDeduction: 0,
|
|
|
395
|
+ socInspectionBasis: '',
|
|
|
396
|
+
|
|
|
397
|
+ // 统计信息
|
|
|
398
|
+ averageDeduction: 0,
|
|
|
399
|
+ totalScore: 0,
|
|
|
400
|
+ rewardAmount: 0,
|
|
|
401
|
+ penaltyAmount: 0,
|
|
|
402
|
+ assessmentResult: '',
|
|
|
403
|
+ applicationMethod: '',
|
|
|
404
|
+
|
|
|
405
|
+ // 备注信息
|
|
|
406
|
+ rewardDetails: '',
|
|
|
407
|
+ penaltyDetails: '',
|
|
|
408
|
+ assessmentResultRemark: '',
|
|
|
409
|
+ applicationMethodRemark: '',
|
|
|
410
|
+
|
|
|
411
|
+ // 豁免信息
|
|
|
412
|
+ isExempted: false,
|
|
|
413
|
+ exemptionRemark: ''
|
|
|
414
|
+})
|
|
|
415
|
+
|
|
|
416
|
+// 弹窗配置
|
|
|
417
|
+const dialog = reactive({
|
|
|
418
|
+ visible: false,
|
|
|
419
|
+ title: ''
|
|
|
420
|
+})
|
|
|
421
|
+
|
|
|
422
|
+// 数据列表
|
|
|
423
|
+const assessmentList = ref([])
|
|
|
424
|
+
|
|
|
425
|
+// 选项配置
|
|
|
426
|
+const employmentTypeOptions = [
|
|
|
427
|
+ { label: '正式员工', value: 'formal' },
|
|
|
428
|
+ { label: '合同工', value: 'contract' },
|
|
|
429
|
+ { label: '临时工', value: 'temporary' },
|
|
|
430
|
+ { label: '实习生', value: 'intern' }
|
|
|
431
|
+]
|
|
|
432
|
+
|
|
|
433
|
+const assessmentResultOptions = [
|
|
|
434
|
+ { label: '优秀', value: 'excellent' },
|
|
|
435
|
+ { label: '良好', value: 'good' },
|
|
|
436
|
+ { label: '合格', value: 'qualified' },
|
|
|
437
|
+ { label: '不合格', value: 'unqualified' }
|
|
|
438
|
+]
|
|
|
439
|
+
|
|
|
440
|
+const applicationMethodOptions = [
|
|
|
441
|
+ { label: '直接应用', value: 'direct' },
|
|
|
442
|
+ { label: '加权计算', value: 'weighted' },
|
|
|
443
|
+ { label: '特殊处理', value: 'special' }
|
|
|
444
|
+]
|
|
|
445
|
+
|
|
|
446
|
+// 表单验证规则
|
|
|
447
|
+const rules = {
|
|
|
448
|
+ employeeName: [{ required: true, message: '员工姓名不能为空', trigger: 'blur' }],
|
|
|
449
|
+ employmentType: [{ required: true, message: '用工形式不能为空', trigger: 'change' }],
|
|
|
450
|
+ position: [{ required: true, message: '岗位不能为空', trigger: 'blur' }],
|
|
|
451
|
+ assessmentGroup: [{ required: true, message: '考核组不能为空', trigger: 'blur' }],
|
|
|
452
|
+ assessmentMonth: [{ required: true, message: '考核月份不能为空', trigger: 'change' }]
|
|
|
453
|
+}
|
|
|
454
|
+
|
|
|
455
|
+// 获取数据列表
|
|
|
456
|
+const getList = async () => {
|
|
|
457
|
+ loading.value = true
|
|
|
458
|
+ try {
|
|
|
459
|
+ const res = await getNonCadreMonthlyAssessList(queryParams)
|
|
|
460
|
+ assessmentList.value = res.rows || []
|
|
|
461
|
+ total.value = res.total || 0
|
|
|
462
|
+ } catch (error) {
|
|
|
463
|
+ console.error('获取数据失败:', error)
|
|
|
464
|
+ ElMessage.error('获取数据失败')
|
|
|
465
|
+ } finally {
|
|
|
466
|
+ loading.value = false
|
|
|
467
|
+ }
|
|
|
468
|
+}
|
|
|
469
|
+
|
|
|
470
|
+// 查询
|
|
|
471
|
+const handleQuery = () => {
|
|
|
472
|
+ queryParams.pageNum = 1
|
|
|
473
|
+ getList()
|
|
|
474
|
+}
|
|
|
475
|
+
|
|
|
476
|
+// 重置查询
|
|
|
477
|
+const resetQuery = () => {
|
|
|
478
|
+ queryFormRef.value?.resetFields()
|
|
|
479
|
+ queryParams.pageNum = 1
|
|
|
480
|
+ getList()
|
|
|
481
|
+}
|
|
|
482
|
+
|
|
|
483
|
+// 新增
|
|
|
484
|
+const handleAdd = () => {
|
|
|
485
|
+ dialog.visible = true
|
|
|
486
|
+ dialog.title = '新增非干部月度考核'
|
|
|
487
|
+
|
|
|
488
|
+ // 重置表单数据
|
|
|
489
|
+ Object.keys(formData).forEach(key => {
|
|
|
490
|
+ if (typeof formData[key] === 'number') {
|
|
|
491
|
+ formData[key] = 0
|
|
|
492
|
+ } else if (typeof formData[key] === 'boolean') {
|
|
|
493
|
+ formData[key] = false
|
|
|
494
|
+ } else {
|
|
|
495
|
+ formData[key] = ''
|
|
|
496
|
+ }
|
|
|
497
|
+ })
|
|
|
498
|
+}
|
|
|
499
|
+
|
|
|
500
|
+// 编辑
|
|
|
501
|
+const handleEdit = (row) => {
|
|
|
502
|
+ dialog.visible = true
|
|
|
503
|
+ dialog.title = '编辑非干部月度考核'
|
|
|
504
|
+
|
|
|
505
|
+ // 填充表单数据
|
|
|
506
|
+ Object.keys(formData).forEach(key => {
|
|
|
507
|
+ if (row[key] !== undefined) {
|
|
|
508
|
+ formData[key] = row[key]
|
|
|
509
|
+ }
|
|
|
510
|
+ })
|
|
|
511
|
+}
|
|
|
512
|
+
|
|
|
513
|
+// 删除
|
|
|
514
|
+const handleDelete = async (row) => {
|
|
|
515
|
+ try {
|
|
|
516
|
+ await ElMessageBox.confirm('确认删除该考核记录吗?', '提示', {
|
|
|
517
|
+ confirmButtonText: '确定',
|
|
|
518
|
+ cancelButtonText: '取消',
|
|
|
519
|
+ type: 'warning'
|
|
|
520
|
+ })
|
|
|
521
|
+
|
|
|
522
|
+ await deleteNonCadreMonthlyAssess(row.id)
|
|
|
523
|
+ ElMessage.success('删除成功')
|
|
|
524
|
+ getList()
|
|
|
525
|
+ } catch (error) {
|
|
|
526
|
+ if (error !== 'cancel') {
|
|
|
527
|
+ ElMessage.error('删除失败')
|
|
|
528
|
+ }
|
|
|
529
|
+ }
|
|
|
530
|
+}
|
|
|
531
|
+
|
|
|
532
|
+// 提交表单
|
|
|
533
|
+const submitForm = async () => {
|
|
|
534
|
+ const valid = await formRef.value?.validate()
|
|
|
535
|
+ if (!valid) return
|
|
|
536
|
+
|
|
|
537
|
+ try {
|
|
|
538
|
+ if (dialog.title === '新增非干部月度考核') {
|
|
|
539
|
+ await addNonCadreMonthlyAssess(formData)
|
|
|
540
|
+ ElMessage.success('新增成功')
|
|
|
541
|
+ } else {
|
|
|
542
|
+ await updateNonCadreMonthlyAssess(formData)
|
|
|
543
|
+ ElMessage.success('更新成功')
|
|
|
544
|
+ }
|
|
|
545
|
+
|
|
|
546
|
+ dialog.visible = false
|
|
|
547
|
+ getList()
|
|
|
548
|
+ } catch (error) {
|
|
|
549
|
+ ElMessage.error('操作失败')
|
|
|
550
|
+ }
|
|
|
551
|
+}
|
|
|
552
|
+
|
|
|
553
|
+// 导出
|
|
|
554
|
+const handleExport = async () => {
|
|
|
555
|
+ try {
|
|
|
556
|
+ // 导出逻辑(需要根据实际API实现)
|
|
|
557
|
+ ElMessage.success('导出功能开发中')
|
|
|
558
|
+ } catch (error) {
|
|
|
559
|
+ ElMessage.error('导出失败')
|
|
|
560
|
+ }
|
|
|
561
|
+}
|
|
|
562
|
+
|
|
|
563
|
+onMounted(() => {
|
|
|
564
|
+ getList()
|
|
|
565
|
+})
|
|
|
566
|
+</script>
|
|
|
567
|
+
|
|
|
568
|
+<style lang="less" scoped>
|
|
|
569
|
+.app-container {
|
|
|
570
|
+ padding: 20px;
|
|
|
571
|
+}
|
|
|
572
|
+
|
|
|
573
|
+.filter-container {
|
|
|
574
|
+ margin-bottom: 20px;
|
|
|
575
|
+}
|
|
|
576
|
+
|
|
|
577
|
+.search-form {
|
|
|
578
|
+ display: flex;
|
|
|
579
|
+ flex-wrap: wrap;
|
|
|
580
|
+ gap: 10px;
|
|
|
581
|
+}
|
|
|
582
|
+
|
|
|
583
|
+.operation-container {
|
|
|
584
|
+ margin-bottom: 20px;
|
|
|
585
|
+}
|
|
|
586
|
+
|
|
|
587
|
+.form-container {
|
|
|
588
|
+ max-height: 70vh;
|
|
|
589
|
+ overflow-y: auto;
|
|
|
590
|
+ padding-right: 10px;
|
|
|
591
|
+}
|
|
|
592
|
+
|
|
|
593
|
+.el-divider {
|
|
|
594
|
+ margin: 20px 0;
|
|
|
595
|
+}
|
|
|
596
|
+
|
|
|
597
|
+:deep(.el-form-item__label) {
|
|
|
598
|
+ font-weight: 500;
|
|
|
599
|
+}
|
|
|
600
|
+</style>
|