configurationPerformance.vue
26.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
<template>
<div class="page-wrap perf-page" v-loading="loading">
<div class="layout">
<!-- 绩效规则配置管理 -->
<div class="section-card" shadow="never">
<div class="section-title">绩效规则配置管理</div>
<div class="perf-level-grid">
<div class="inner-title">等级列表</div>
<div
class="perf-row"
v-for="row in performanceLevelDetailDTOS"
:key="row.levelCode"
>
<span :class="['level-pill', levelClassMap[row.levelCode]]">
{{ levelNameMap[row.levelCode] || row.levelCode }}
</span>
<span class="inline-label">分数:</span>
<div class="level-field">
<el-input
:value="row.scoreSymbolValue"
placeholder="输入><=与数字0-200"
@input="onScoreInput(row, $event)"
clearable
/>
</div>
<span class="inline-label">系数:</span>
<div class="level-field">
<el-input
:value="row.rewardCoefficient"
:placeholder="
row.levelCode == 'B'
? '输入0-1'
: row.levelCode == 'S' ||
row.levelCode == 'A' ||
row.levelCode == 'B+'
? '输入0-10'
: '输入<1'
"
@input="onCoefficientInput(row, $event)"
clearable
>
</el-input>
</div>
<div class="stars">
<el-rate :value="starMap[row.levelCode] || 0" :max="6" disabled />
</div>
</div>
</div>
</div>
<!-- 自动评绩效规则配置 -->
<div class="section-card" shadow="never">
<div class="section-title">
自动评绩效规则配置
<el-switch
v-model="autoPerformRuleDetailDTO.status"
:active-value="1"
:inactive-value="0"
style="margin-left: 16px"
/>
</div>
<div class="auto-rule-grid">
<!-- 当月入职新员工 - 条件配置 -->
<div>
<div class="sub-title">当月入职新员工规则条件配置</div>
<el-form
:model="autoPerformRuleDetailDTO"
label-width="150px"
class="rule-form"
>
<el-form-item label="出勤天数要求">
<el-input
:disabled="
autoPerformRuleDetailDTO.status == 1 ? false : true
"
:value="autoPerformRuleDetailDTO.monthOnboardAttendanceDays"
placeholder="1-30"
@input="
(val) =>
(autoPerformRuleDetailDTO.monthOnboardAttendanceDays =
sanitizeIntRange(val, 1, 30))
"
>
<template slot="append">天(≥此天数)</template>
</el-input>
</el-form-item>
<el-form-item label="产值阈值">
<el-input
:disabled="
autoPerformRuleDetailDTO.status == 1 ? false : true
"
:value="autoPerformRuleDetailDTO.monthOnboardOutputThreshold"
placeholder="5000-20000"
@input="
(val) =>
(autoPerformRuleDetailDTO.monthOnboardOutputThreshold =
sanitizeIntDigits(val))
"
@blur="
() =>
(autoPerformRuleDetailDTO.monthOnboardOutputThreshold =
finalizeIntRange(
autoPerformRuleDetailDTO.monthOnboardOutputThreshold,
5000,
20000
))
"
>
<template slot="append">元(<此值触发规则)</template>
</el-input>
</el-form-item>
<div class="sub-title">触发规则结果</div>
<el-form-item label="绩效等级:">
<el-select
:disabled="
autoPerformRuleDetailDTO.status == 1 ? false : true
"
v-model="
autoPerformRuleDetailDTO.monthOnboardTriggerLevelCode
"
placeholder="请选择"
@change="
(code) =>
handleTriggerLevelChange('monthOnboardTrigger', code)
"
>
<el-option
v-for="opt in limitedLevelOptions"
:key="opt.levelCode"
:label="levelNameMap[opt.levelCode]"
:value="opt.levelCode"
/>
</el-select>
</el-form-item>
<el-form-item label="绩效分数:">
<span class="inline-label">{{
autoPerformRuleDetailDTO.monthOnboardTriggerScore
}}</span>
</el-form-item>
<el-form-item label="奖励系数:">
<span class="inline-label">{{
autoPerformRuleDetailDTO.monthOnboardTriggerRewardCoefficient
}}</span>
</el-form-item>
<div class="sub-title small">
除上述规则以外,当月入职的新员工绩效默认为【{{
this.autoPerformRuleDetailDTO.monthOnboardDefaultLevelCode
}}】
</div>
</el-form>
</div>
<!-- 非月入职员工 - 条件配置 -->
<div>
<div class="sub-title">非月入职员工规则条件</div>
<el-form
:model="autoPerformRuleDetailDTO"
label-width="180px"
class="rule-form"
>
<el-form-item label="产值阈值">
<el-input
:disabled="
autoPerformRuleDetailDTO.status == 1 ? false : true
"
:value="
autoPerformRuleDetailDTO.noMonthOnboardOutputThreshold
"
placeholder="5000-20000"
@input="
(val) =>
(autoPerformRuleDetailDTO.noMonthOnboardOutputThreshold =
sanitizeIntDigits(val))
"
@blur="
() =>
(autoPerformRuleDetailDTO.noMonthOnboardOutputThreshold =
finalizeIntRange(
autoPerformRuleDetailDTO.noMonthOnboardOutputThreshold,
5000,
20000
))
"
>
<template slot="append">元(<此值触发规则)</template>
</el-input>
</el-form-item>
<div class="sub-title small">触发规则结果</div>
<el-form-item label="绩效等级:">
<el-select
:disabled="
autoPerformRuleDetailDTO.status == 1 ? false : true
"
v-model="
autoPerformRuleDetailDTO.noMonthOnboardTriggerLevelCode
"
placeholder="请选择"
@change="
(code) =>
handleTriggerLevelChange('noMonthOnboardTrigger', code)
"
>
<el-option
v-for="opt in limitedLevelOptions"
:key="opt.levelCode"
:label="levelNameMap[opt.levelCode]"
:value="opt.levelCode"
/>
</el-select>
</el-form-item>
<el-form-item label="绩效分数:">
<span class="inline-label">{{
autoPerformRuleDetailDTO.noMonthOnboardTriggerScore
}}</span>
</el-form-item>
<el-form-item label="奖励系数:">
<span class="inline-label">{{
autoPerformRuleDetailDTO.noMonthOnboardTriggerRewardCoefficient
}}</span>
</el-form-item>
<div class="sub-title small">
除上述规则以外,非当月入职的新员工绩效默认为【{{
this.autoPerformRuleDetailDTO.noMonthOnboardDefaultLevelCode
}}】
</div>
</el-form>
</div>
<!-- 生效配置 -->
<div>
<el-form
:model="autoPerformRuleDetailDTO"
label-width="180px"
class="rule-form"
>
<el-form-item label="生效月份">
<el-date-picker
:disabled="
autoPerformRuleDetailDTO.status == 1 ? false : true
"
v-model="autoPerformRuleDetailDTO.effectiveMonth"
type="month"
:clearable="false"
value-format="yyyy-MM"
:picker-options="monthPickerOptions"
placeholder="请选择生效月份"
/>
</el-form-item>
</el-form>
</div>
</div>
</div>
</div>
<div class="footer">
<el-button
size="small"
:loading="btnLoding"
class="save-btn"
@click="handleSave"
>
确认
</el-button>
<el-button class="cancel-btn" size="small" @click="handleCancel"
>取消</el-button
>
</div>
</div>
</template>
<script>
import dayjs from "dayjs";
import {
getPerfRuleConfigDetail,
updatePerfRuleConfig,
} from "@/api/salaryManagement";
export default {
name: "ConfigurationPerformance",
data() {
return {
loading: true,
btnLoding: false,
// 固定等级顺序与星级映射
starMap: { S: 6, A: 5, "B+": 4, B: 3, "B-": 2, C: 1, D: 0 },
levelNameMap: {
S: "S级",
A: "A级",
"B+": "B+级",
B: "B级",
"B-": "B-级",
C: "C级",
D: "D级",
},
// 等级样式映射
levelClassMap: {
S: "level-S",
A: "level-A",
"B+": "level-Bp",
B: "level-B",
"B-": "level-Bm",
C: "level-C",
D: "level-D",
},
// 绩效等级配置列表
performanceLevelDetailDTOS: [],
// 自动评绩效规则配置
autoPerformRuleDetailDTO: {},
monthPickerOptions: {
disabledDate: (date) => dayjs(date).isBefore(dayjs(), "month"), // 仅允许当月及未来月份
},
};
},
computed: {
// 限定只可选择 B- / C / D
limitedLevelOptions() {
return this.performanceLevelDetailDTOS.filter((l) =>
["B-", "C", "D"].includes(l.levelCode)
);
},
},
created() {
this.syncAllTriggerDefaults();
},
methods: {
sanitizeIntDigits(val) {
const s = String(val == null ? "" : val).replace(/[^\d]/g, "");
return s;
},
finalizeIntRange(val, min, max) {
const s = String(val == null ? "" : val).replace(/[^\d]/g, "");
if (!s) return "";
let n = parseInt(s, 10);
if (isNaN(n)) return "";
if (n < min) n = min;
if (n > max) n = max;
return String(n);
},
sanitizeIntRange(val, min, max) {
const raw = String(val == null ? "" : val);
const s = raw.replace(/[^\d]/g, "");
if (!s) return "";
let n = parseInt(s, 10);
if (isNaN(n) || n === 0) return "";
if (n > max) n = max;
if (n < min) n = min;
return String(n);
},
// 保留:固定两位
sanitizeFloatRange(val, min, max, fixed = 2) {
const s = String(val == null ? "" : val).replace(/[^\d.]/g, "");
if (!s) return "";
let n = parseFloat(s);
if (isNaN(n)) return "";
if (n < min) n = min;
if (n > max) n = max;
return n.toFixed(fixed);
},
// 限制最多两位小数,并规范化前导零(例如 000 -> 0,000000.3 -> 0.3)
sanitizeFloatRangeLoose(val, maxDecimals = 2) {
let s = String(val == null ? "" : val).replace(/[^\d.]/g, "");
if (!s) return "";
// 仅保留第一个小数点
const firstDot = s.indexOf(".");
if (firstDot !== -1) {
const before = s.slice(0, firstDot);
const after = s.slice(firstDot + 1).replace(/\./g, "");
s = `${before}.${after}`;
}
let [intPart, decPart] = s.split(".");
// 规范化整数部分前导零:'000' -> '0','000123' -> '123'
intPart = (intPart || "").replace(/^0+(?=\d)/, "");
if (intPart === "") intPart = "0";
if (decPart != null) {
// 保留到指定小数位数;当还没输入小数位时保留尾随小数点
decPart = decPart.slice(0, maxDecimals);
s = `${intPart}.${decPart}`;
} else {
s = intPart;
}
return s;
},
parseScoreWithSymbol(val, min, max) {
const raw = String(val == null ? "" : val.trim());
const m = raw.match(/[><=]|[<>=]/);
const signRaw = m ? m[0] : "";
const sign = signRaw
? signRaw.replace("<", "<").replace(">", ">").replace("=", "=")
: "";
const body = raw.replace(/[<>=\s]|[<>=]/g, "");
let cleaned = this.sanitizeFloatRangeLoose(body, 2);
if (cleaned) {
const n = parseFloat(cleaned);
if (!isNaN(n)) {
if (n > max) cleaned = String(max);
if (n < min) cleaned = String(min);
} else {
cleaned = "";
}
}
const display = sign ? (cleaned ? `${sign}${cleaned}` : sign) : cleaned;
const numeric = cleaned;
return { sign, numeric, display };
},
handleTriggerLevelChange(place, code) {
const src = this.performanceLevelDetailDTOS.find(
(l) => l.levelCode === code
);
if (!src) return;
if (place === "monthOnboardTrigger") {
this.autoPerformRuleDetailDTO.monthOnboardTriggerScore =
src.scoreSymbolValue;
this.autoPerformRuleDetailDTO.monthOnboardTriggerRewardCoefficient =
src.rewardCoefficient;
} else if (place === "noMonthOnboardTrigger") {
this.autoPerformRuleDetailDTO.noMonthOnboardTriggerScore =
src.scoreSymbolValue;
this.autoPerformRuleDetailDTO.noMonthOnboardTriggerRewardCoefficient =
src.rewardCoefficient;
}
},
// 保存前校验:分数取数值部分;系数 0-10 且最多两位小数(由输入清洗保证)
validateBeforeSave() {
for (const r of this.performanceLevelDetailDTOS) {
// 新增:分数、系数不能为空
const scoreRaw = r.scoreNumericValue || r.scoreSymbolValue;
if (!scoreRaw && scoreRaw !== 0) {
this.$message.error(`${this.levelNameMap[r.levelCode]}分数不能为空`);
return false;
}
const coefRaw = r.rewardCoefficient;
console.log(
coefRaw,
!coefRaw,
coefRaw !== 0,
!coefRaw && coefRaw != 0,
"coefRaw"
);
if (!coefRaw && coefRaw !== 0) {
this.$message.error(
`${this.levelNameMap[r.levelCode]}奖励系数不能为空`
);
return false;
}
// 保留原有数值解析与范围校验(同时显式检查 numeric 为空)
const { numeric } = this.parseScoreWithSymbol(scoreRaw, 0, 200);
const score = Number(numeric);
const coef = Number(coefRaw);
if (numeric === "" || isNaN(score) || score < 0 || score > 200) {
this.$message.error(
`${
this.levelNameMap[r.levelCode]
}分数需为><=与数字,0-200,最多2位小数`
);
return false;
}
// B 允许 <= 1.0;B- / C / D 需 < 1.0;其他 0-10
if (r.levelCode === "B") {
if (isNaN(coef) || coef < 0 || coef > 1) {
this.$message.error(
`${
this.levelNameMap[r.levelCode]
}奖励系数需小于等于1.0,最多2位小数`
);
return false;
}
} else if (["B-", "C", "D"].includes(r.levelCode)) {
if (isNaN(coef) || coef < 0 || coef >= 1) {
this.$message.error(
`${this.levelNameMap[r.levelCode]}奖励系数需小于1.0,最多2位小数`
);
return false;
}
} else {
if (isNaN(coef) || coef < 0 || coef > 10) {
this.$message.error(
`${this.levelNameMap[r.levelCode]}奖励系数需为0-10,最多2位小数`
);
return false;
}
}
}
// 新增:自动评绩效规则配置 - 出勤天数不能为空
const aRaw = String(
this.autoPerformRuleDetailDTO.monthOnboardAttendanceDays || ""
).trim();
if (!aRaw) {
this.$message.error("出勤天数不能为空");
return false;
}
const a = Number(aRaw);
if (!Number.isInteger(a) || a < 1 || a > 30) {
this.$message.error("出勤天数需为1-30的整数");
return false;
}
// 新增:自动评绩效规则配置 - 产值阈值不能为空(当月入职)
const mOutRaw = String(
this.autoPerformRuleDetailDTO.monthOnboardOutputThreshold || ""
).trim();
if (!mOutRaw) {
this.$message.error("当月入职新员工产值阈值不能为空");
return false;
}
const mOut = Number(mOutRaw);
if (!Number.isInteger(mOut) || mOut < 5000 || mOut > 20000) {
this.$message.error("当月入职新员工产值阈值需为5000-20000的整数");
return false;
}
// 新增:自动评绩效规则配置 - 产值阈值不能为空(非月入职)
const noOutRaw = String(
this.autoPerformRuleDetailDTO.noMonthOnboardOutputThreshold || ""
).trim();
if (!noOutRaw) {
this.$message.error("非月入职员工产值阈值不能为空");
return false;
}
const noOut = Number(noOutRaw);
if (!Number.isInteger(noOut) || noOut < 5000 || noOut > 20000) {
this.$message.error("非月入职员工产值阈值需为5000-20000的整数");
return false;
}
if (!this.autoPerformRuleDetailDTO.effectiveMonth) {
this.$message.error("请输入生效月份");
return false;
}
// 新增:生效时间需 >= 当月(按月比较)
const effMonth = this.autoPerformRuleDetailDTO.effectiveMonth;
if (dayjs(effMonth).isBefore(dayjs(), "month")) {
this.$message.error("生效时间应大于等于当月");
return false;
}
// 等级选择限制
const selectedCodes = [
this.autoPerformRuleDetailDTO.monthOnboardTriggerLevelCode,
this.autoPerformRuleDetailDTO.noMonthOnboardTriggerLevelCode,
];
if (selectedCodes.some((c) => !["B-", "C", "D"].includes(c))) {
this.$message.error("自动评绩效规则的绩效等级仅可选择 B- / C / D");
return false;
}
return true;
},
handleCancel() {
this.$router.replace("/inStoreManage");
},
// 分数输入:保留符号回显,数值用于联动和校验(不自动补.00)
onScoreInput(row, val) {
const { sign, numeric, display } = this.parseScoreWithSymbol(val, 0, 200);
row.scoreSymbolSign = sign;
row.scoreNumericValue = numeric;
row.scoreSymbolValue = display.trim();
},
// 系数输入:0-10,最多两位小数,不自动补.00
onCoefficientInput(row, val) {
let cleaned = this.sanitizeFloatRangeLoose(val, 2);
if (cleaned) {
const n = parseFloat(cleaned);
if (!isNaN(n)) {
if (row.levelCode === "B") {
if (n > 1) cleaned = "1";
if (n < 0) cleaned = "0";
} else if (["B-", "C", "D"].includes(row.levelCode)) {
if (n >= 1) cleaned = "0.99";
if (n < 0) cleaned = "0";
} else {
if (n > 10) cleaned = "10";
if (n < 0) cleaned = "0";
}
} else {
cleaned = "";
}
}
row.rewardCoefficient = cleaned;
},
// 将四处联动值按当前选择初始化一次
async syncAllTriggerDefaults() {
try {
let result = await getPerfRuleConfigDetail();
if (result) {
result.autoPerformRuleDetailDTO.effectiveMonth = dayjs(
result.autoPerformRuleDetailDTO.effectiveMonth
).toDate();
this.autoPerformRuleDetailDTO = result.autoPerformRuleDetailDTO;
this.performanceLevelDetailDTOS = result.performanceLevelDetailDTOS;
// this.handleTriggerLevelChange(
// "monthOnboardTrigger",
// this.autoPerformRuleDetailDTO.monthOnboardTriggerLevelCode
// )
// this.handleTriggerLevelChange(
// "noMonthOnboardTrigger",
// this.autoPerformRuleDetailDTO.noMonthOnboardTriggerLevelCode
// )
}
} catch (e) {
} finally {
this.loading = false;
}
},
// 保存
async handleSave() {
if (!this.validateBeforeSave()) return;
const payload = {
performanceLevelUpdateDTOS: this.performanceLevelDetailDTOS.map(
(r) => ({
levelCode: r.levelCode,
scoreSymbolValue: String(r.scoreSymbolValue),
rewardCoefficient: Number(r.rewardCoefficient),
})
),
autoPerformRuleUpdateDTO: {
...this.autoPerformRuleDetailDTO,
effectiveMonth: dayjs(
this.autoPerformRuleDetailDTO.effectiveMonth
).format("YYYY-MM"),
status: this.autoPerformRuleDetailDTO.status == 1 ? 1 : 0,
},
};
try {
await updatePerfRuleConfig(payload);
this.$router.push({
path: "/inStoreManage",
});
this.$message.success("操作成功");
} catch (e) {}
},
},
};
</script>
<style lang="scss" scoped>
.page-wrap {
padding: 0 20px;
height: 100vh;
.layout {
height: calc(100% - 195px);
overflow: scroll;
&::-webkit-scrollbar {
width: 1px;
height: 1px;
}
&::-webkit-scrollbar-thumb {
background-color: transparent;
border-radius: 4px;
}
&::-webkit-scrollbar-track {
background-color: transparent;
}
&::-webkit-scrollbar-corner {
background-color: transparent;
}
// 修改滚动条样式为透明
&::-webkit-scrollbar {
width: 1px;
height: 1px;
}
&::-webkit-scrollbar-thumb {
background-color: transparent;
border-radius: 1px;
}
&::-webkit-scrollbar-track {
background-color: transparent;
}
&::-webkit-scrollbar-corner {
background-color: transparent;
}
}
.footer {
display: flex;
align-items: center;
justify-content: center;
margin-top: 20px;
.save-btn {
// width: 60px;
padding: 5px 14px;
line-height: 22px;
border-radius: 4px;
border: 1px solid #2a58ad;
background: #2a58ad;
color: #ffffff;
font-size: 14px;
height: 32px;
box-sizing: border-box;
}
.cancel-btn {
color: #666666;
font-size: 14px;
width: 56px;
height: 32px;
padding: 5px 14px;
border-radius: 4px;
background: #e8e8e8;
line-height: 22px;
box-sizing: border-box;
}
}
}
.section-card {
margin-bottom: 20px;
background: #fff;
}
.section-title {
font-weight: 600;
color: #333333;
font-size: 16px;
display: flex;
align-items: center;
justify-content: space-between;
height: 50px;
border-bottom: 1px solid #e5e5e5;
padding: 13.5px 20px;
box-sizing: border-box;
}
.perf-level-grid {
padding: 20px;
box-sizing: border-box;
.perf-row {
display: flex;
align-items: center;
margin-bottom: 13px;
}
.inner-title {
color: #222222;
font-size: 14px;
font-weight: 400;
margin-bottom: 8.5px;
}
}
.level-pill {
width: 116px;
height: 30px;
border-radius: 20px;
padding: 5px 0;
text-align: center;
display: inline-block;
color: #222222;
font-size: 14px;
font-weight: 500;
box-sizing: border-box;
}
.level-pill.level-S {
background: #e9e0fa;
}
.level-pill.level-A {
background: #d8f4d4;
}
.level-pill.level-Bp {
background: #d6f5ef;
} /* B+ */
.level-pill.level-B {
background: #e6efff;
}
.level-pill.level-Bm {
background: #d5f1fa;
} /* B- */
.level-pill.level-C {
background: #f7efcd;
}
.level-pill.level-D {
background: #f9e0e0;
}
.inline-label {
color: #666666;
font-size: 14px;
margin: 0 2px 0 12px;
}
.level-field {
width: 200px;
display: flex;
align-items: center;
height: 30px;
}
.level-field .el-input,
.level-field .el-input-number {
width: 100%;
}
.level-field .hint {
margin-left: 8px;
color: var(--hd-muted-color);
font-size: 12px;
}
/* 星级:保证尺寸与间距一致(容器占位) */
.stars {
display: inline-flex;
align-items: center;
gap: 3px;
height: 30px;
margin-left: 12px;
}
.section-switch {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 0;
border-top: 1px dashed var(--hd-border);
border-bottom: 1px dashed var(--hd-border);
margin-bottom: 16px;
}
/* 自动评绩效规则:≥1280 两列,窄屏一列 */
.auto-rule-grid {
padding: 0 48px 20px;
display: grid;
gap: var(--hd-gap-20);
.sub-title {
color: #333333;
font-size: 14px;
margin: 20px 0;
font-weight: 600;
}
.small {
padding-bottom: 20px;
border-bottom: 1px solid #e8e8ea;
}
::v-deep .el-input-group__append {
border: 0 !important;
background: #fff !important;
padding: 0 8px;
}
::v-deep .el-input-group {
width: 90px;
}
::v-deep .el-input__inner {
width: 90px;
}
::v-deep .el-select .el-input__inner {
width: 136px;
height: 30px;
line-height: 30px;
}
::v-deep .el-date-editor .el-input__inner {
width: 136px;
}
::v-deep .el-date-editor.el-input {
width: 136px;
}
.inline-label {
color: #333333;
font-size: 14px;
}
}
/* ElementUI 控件紧凑化:高度、内边距、增减器宽度 */
.perf-page .el-form-item {
margin-bottom: 12px;
}
.perf-page {
::v-deep .el-input__inner {
height: 30px;
line-height: 30px;
}
::v-deep .el-form-item__label {
color: #666666;
font-size: 14px;
}
::v-deep .el-select .el-input__inner {
height: 30px;
line-height: 30px;
}
::v-deep .el-date-editor.el-input__inner {
width: 136px;
height: 30px;
line-height: 30px;
}
}
</style>