|
|
@@ -73,6 +73,7 @@
|
|
73
|
73
|
<el-table v-loading="loading" :data="nonCadreList" border fit highlight-current-row
|
|
74
|
74
|
style="width: 100%; margin-top: 20px;" @selection-change="handleSelectionChange">
|
|
75
|
75
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
76
|
+ <el-table-column label="大队" prop="brigadeName" align="center" min-width="120" />
|
|
76
|
77
|
<el-table-column label="用工形式" prop="employmentType" align="center" min-width="100">
|
|
77
|
78
|
<template #default="scope">
|
|
78
|
79
|
<dict-tag :options="employment_type" :value="scope.row.employmentType" />
|
|
|
@@ -291,8 +292,9 @@
|
|
291
|
292
|
<div class="indicator-group-title">{{ group.title }}</div>
|
|
292
|
293
|
<div v-for="(item, itemIndex) in group.items" :key="itemIndex" class="indicator-item">
|
|
293
|
294
|
<div class="indicator-name">{{ item.indicatorName }}</div>
|
|
294
|
|
- <div class="indicator-value" v-if="item.categoryNameOne != '红线指标'">{{ item.score > 0 ? '+' : '' }}{{ item.score
|
|
295
|
|
- }}/次
|
|
|
295
|
+ <div class="indicator-value" v-if="item.categoryNameOne != '红线指标'">{{ item.score > 0 ? '+' : '' }}{{
|
|
|
296
|
+ item.score
|
|
|
297
|
+ }}/次
|
|
296
|
298
|
</div>
|
|
297
|
299
|
<div class="indicator-count">{{ item.occurCount }}次</div>
|
|
298
|
300
|
<div class="indicator-total">{{ item.scoreResult > 0 ? '+' : '' }}{{ item.scoreResult }}</div>
|
|
|
@@ -537,28 +539,32 @@
|
|
537
|
539
|
</el-form-item>
|
|
538
|
540
|
|
|
539
|
541
|
<el-form-item label="记录明细">
|
|
540
|
|
- <el-table :data="indicatorDialog.form.personnelMonthlyAssessmentIndicatorRewardPunishmentDetailList" border max-height="400" >
|
|
|
542
|
+ <el-table :data="indicatorDialog.form.personnelMonthlyAssessmentIndicatorRewardPunishmentDetailList" border
|
|
|
543
|
+ max-height="400">
|
|
541
|
544
|
<el-table-column label="序号" type="index" width="60" align="center" />
|
|
542
|
545
|
<el-table-column label="日期" width="180">
|
|
543
|
546
|
<template #default="scope">
|
|
544
|
|
- <el-date-picker v-model="scope.row.recordDate" type="date" value-format="YYYY-MM-DD" placeholder="选择日期" style="width: 100%" />
|
|
|
547
|
+ <el-date-picker v-model="scope.row.recordDate" type="date" value-format="YYYY-MM-DD" placeholder="选择日期"
|
|
|
548
|
+ style="width: 100%" />
|
|
545
|
549
|
</template>
|
|
546
|
550
|
</el-table-column>
|
|
547
|
|
- <el-table-column label="检查部门" >
|
|
|
551
|
+ <el-table-column label="检查部门">
|
|
548
|
552
|
<template #default="scope">
|
|
549
|
553
|
<el-select v-model="scope.row.qcDeptType" placeholder="请选择" clearable>
|
|
550
|
|
- <el-option v-for="item in base_performance_indicator_qc_dept_type" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
554
|
+ <el-option v-for="item in base_performance_indicator_qc_dept_type" :key="item.value"
|
|
|
555
|
+ :label="item.label" :value="item.value" />
|
|
551
|
556
|
</el-select>
|
|
552
|
557
|
</template>
|
|
553
|
558
|
</el-table-column>
|
|
554
|
|
- <el-table-column label="扣罚明细" v-if="indicatorDialog.form.score < 0">
|
|
|
559
|
+ <el-table-column label="扣罚明细" v-if="indicatorDialog.form.score < 0">
|
|
555
|
560
|
<template #default="scope">
|
|
556
|
561
|
<el-input v-model="scope.row.rewardPunishmentDetail" type="textarea" :rows="1" placeholder="请输入扣罚明细" />
|
|
557
|
562
|
</template>
|
|
558
|
563
|
</el-table-column>
|
|
559
|
|
- <el-table-column label="扣罚(元)" v-if="indicatorDialog.form.score < 0">
|
|
|
564
|
+ <el-table-column label="扣罚(元)" v-if="indicatorDialog.form.score < 0">
|
|
560
|
565
|
<template #default="scope">
|
|
561
|
|
- <el-input-number v-model="scope.row.amount" :max="0" :precision="2" style="width: 170px;" @change="updateTotal" />
|
|
|
566
|
+ <el-input-number v-model="scope.row.amount" :max="0" :precision="2" style="width: 170px;"
|
|
|
567
|
+ @change="updateTotal" />
|
|
562
|
568
|
</template>
|
|
563
|
569
|
</el-table-column>
|
|
564
|
570
|
<el-table-column label="奖励明细" v-if="indicatorDialog.form.score > 0">
|
|
|
@@ -566,18 +572,19 @@
|
|
566
|
572
|
<el-input v-model="scope.row.rewardPunishmentDetail" type="textarea" :rows="1" placeholder="请输入奖励明细" />
|
|
567
|
573
|
</template>
|
|
568
|
574
|
</el-table-column>
|
|
569
|
|
- <el-table-column label="奖励(元)" v-if="indicatorDialog.form.score > 0">
|
|
|
575
|
+ <el-table-column label="奖励(元)" v-if="indicatorDialog.form.score > 0">
|
|
570
|
576
|
<template #default="scope">
|
|
571
|
|
- <el-input-number v-model="scope.row.amount" :min="0" :precision="2" style="width: 170px;" @change="updateTotal" />
|
|
|
577
|
+ <el-input-number v-model="scope.row.amount" :min="0" :precision="2" style="width: 170px;"
|
|
|
578
|
+ @change="updateTotal" />
|
|
572
|
579
|
</template>
|
|
573
|
580
|
</el-table-column>
|
|
574
|
|
- <el-table-column label="操作"align="center">
|
|
|
581
|
+ <el-table-column label="操作" align="center">
|
|
575
|
582
|
<template #default="scope">
|
|
576
|
583
|
<el-button type="danger" link icon="Delete" @click="removeRewardPunishmentDetail(scope.$index)" />
|
|
577
|
584
|
</template>
|
|
578
|
585
|
</el-table-column>
|
|
579
|
586
|
</el-table>
|
|
580
|
|
-
|
|
|
587
|
+
|
|
581
|
588
|
</el-form-item>
|
|
582
|
589
|
</el-form>
|
|
583
|
590
|
|
|
|
@@ -758,7 +765,7 @@ const indicatorDialog = reactive({
|
|
758
|
765
|
value: 'id',
|
|
759
|
766
|
label: 'name',
|
|
760
|
767
|
children: 'indicatorList',
|
|
761
|
|
- checkStrictly: false,
|
|
|
768
|
+
|
|
762
|
769
|
emitPath: false
|
|
763
|
770
|
},
|
|
764
|
771
|
rules: {
|
|
|
@@ -830,7 +837,7 @@ function transformIndicatorTree(treeData) {
|
|
830
|
837
|
|
|
831
|
838
|
if (child.indicatorList && child.indicatorList.length > 0) {
|
|
832
|
839
|
transformedChild.indicatorList = child.indicatorList.map(indicator => ({
|
|
833
|
|
- ...indicator, name: indicator.name, id: indicator.id, indicatorId: indicator.id, indicatorName: indicator.name, occurCount: 1, personnelMonthlyAssessmentIndicatorRewardPunishmentDetailList: []
|
|
|
840
|
+ ...indicator, name: indicator.name, id: indicator.id, indicatorId: indicator.indicatorId, indicatorName: indicator.name, occurCount: 1, personnelMonthlyAssessmentIndicatorRewardPunishmentDetailList: []
|
|
834
|
841
|
}))
|
|
835
|
842
|
}
|
|
836
|
843
|
|
|
|
@@ -840,7 +847,7 @@ function transformIndicatorTree(treeData) {
|
|
840
|
847
|
|
|
841
|
848
|
if (node.indicatorList && node.indicatorList.length > 0) {
|
|
842
|
849
|
transformed.indicatorList = node.indicatorList.map(indicator => ({
|
|
843
|
|
- ...indicator, name: indicator.name, id: indicator.id, indicatorId: indicator.id, indicatorName: indicator.name, occurCount: 1, personnelMonthlyAssessmentIndicatorRewardPunishmentDetailList: []
|
|
|
850
|
+ ...indicator, name: indicator.name, id: indicator.id, indicatorId: indicator.indicatorId, indicatorName: indicator.name, occurCount: 1, personnelMonthlyAssessmentIndicatorRewardPunishmentDetailList: []
|
|
844
|
851
|
}))
|
|
845
|
852
|
}
|
|
846
|
853
|
|
|
|
@@ -905,10 +912,12 @@ const showDetailModal = (title, content) => {
|
|
905
|
912
|
const formatAccordList = (list) => {
|
|
906
|
913
|
if (!list || !Array.isArray(list) || list.length === 0) return ''
|
|
907
|
914
|
return list.map(item => {
|
|
|
915
|
+ const detail = item.personnelMonthlyAssessmentIndicatorRewardPunishmentDetailList[0] || {};
|
|
|
916
|
+ const date = detail.recordDate || ''
|
|
908
|
917
|
const name = item.indicatorName || item.name || ''
|
|
909
|
918
|
const score = item.score !== undefined ? item.score : ''
|
|
910
|
919
|
const count = item.occurCount !== undefined ? item.occurCount : ''
|
|
911
|
|
- return `${name} ${score}分 x ${count}次`
|
|
|
920
|
+ return `${date} ${name} ${score}分 x ${count}次`
|
|
912
|
921
|
}).join('\n')
|
|
913
|
922
|
}
|
|
914
|
923
|
|
|
|
@@ -1261,7 +1270,7 @@ const submitForm = async () => {
|
|
1261
|
1270
|
group.items.map(item => ({
|
|
1262
|
1271
|
...item,
|
|
1263
|
1272
|
indicatorName: item.name || item.indicatorName,
|
|
1264
|
|
- indicatorId: item.id || item.indicatorId,
|
|
|
1273
|
+ indicatorId: item.indicatorId ,
|
|
1265
|
1274
|
indicatorCode: item.code || item.indicatorCode,
|
|
1266
|
1275
|
}))
|
|
1267
|
1276
|
)
|
|
|
@@ -1345,16 +1354,7 @@ const generateMonthlyAssessment = async () => {
|
|
1345
|
1354
|
}
|
|
1346
|
1355
|
}
|
|
1347
|
1356
|
|
|
1348
|
|
-// 获取考核结果文本
|
|
1349
|
|
-const getResultText = (value) => {
|
|
1350
|
|
- const map = {
|
|
1351
|
|
- 'excellent': '优秀',
|
|
1352
|
|
- 'good': '良好',
|
|
1353
|
|
- 'qualified': '合格',
|
|
1354
|
|
- 'unqualified': '不称职'
|
|
1355
|
|
- }
|
|
1356
|
|
- return map[value] || ''
|
|
1357
|
|
-}
|
|
|
1357
|
+
|
|
1358
|
1358
|
|
|
1359
|
1359
|
// 添加指标 - 打开新增模态框
|
|
1360
|
1360
|
const addIndicator = () => {
|
|
|
@@ -1379,6 +1379,7 @@ const addIndicator = () => {
|
|
1379
|
1379
|
|
|
1380
|
1380
|
// 编辑指标 - 打开编辑模态框
|
|
1381
|
1381
|
const editIndicator = async (groupIndex, itemIndex) => {
|
|
|
1382
|
+ await loadIndicatorCascaderOptions()
|
|
1382
|
1383
|
const item = nonCadreForm.indicatorGroups[groupIndex].items[itemIndex]
|
|
1383
|
1384
|
indicatorDialog.visible = true
|
|
1384
|
1385
|
indicatorDialog.title = '编辑扣分指标'
|
|
|
@@ -1386,10 +1387,11 @@ const editIndicator = async (groupIndex, itemIndex) => {
|
|
1386
|
1387
|
indicatorDialog.groupIndex = groupIndex
|
|
1387
|
1388
|
indicatorDialog.itemIndex = itemIndex
|
|
1388
|
1389
|
|
|
1389
|
|
- await loadIndicatorCascaderOptions()
|
|
1390
|
|
- await nextTick()
|
|
1391
|
1390
|
|
|
|
1391
|
+ await nextTick()
|
|
1392
|
1392
|
indicatorDialog.form = { ...item }
|
|
|
1393
|
+ console.log(indicatorDialog.form, "indicatorDialog.form")
|
|
|
1394
|
+
|
|
1393
|
1395
|
if (!indicatorDialog.form.personnelMonthlyAssessmentIndicatorRewardPunishmentDetailList) {
|
|
1394
|
1396
|
indicatorDialog.form.personnelMonthlyAssessmentIndicatorRewardPunishmentDetailList = []
|
|
1395
|
1397
|
}
|
|
|
@@ -1408,15 +1410,7 @@ const deleteIndicator = (groupIndex, itemIndex) => {
|
|
1408
|
1410
|
}).catch(() => { })
|
|
1409
|
1411
|
}
|
|
1410
|
1412
|
|
|
1411
|
|
-// 指标名称变化时更新分值
|
|
1412
|
|
-const onIndicatorNameChange = (value) => {
|
|
1413
|
|
- console.log(value, indicatorDialog.indicatorOptions, "indicatorDialog.indicatorOptions")
|
|
1414
|
|
- const selected = indicatorDialog.indicatorOptions.find(item => item.id === value)
|
|
1415
|
|
- if (selected) {
|
|
1416
|
|
- indicatorDialog.form = { ...selected, indicatorId: selected.id, indicatorName: selected.name, occurCount: 1, personnelMonthlyAssessmentIndicatorRewardPunishmentDetailList: [] }
|
|
1417
|
|
- updateTotal()
|
|
1418
|
|
- }
|
|
1419
|
|
-}
|
|
|
1413
|
+
|
|
1420
|
1414
|
|
|
1421
|
1415
|
// 更新总分
|
|
1422
|
1416
|
const updateTotal = () => {
|