|
|
@@ -12,8 +12,8 @@
|
|
12
|
12
|
<!-- 查询条件 -->
|
|
13
|
13
|
<div class="filter-container">
|
|
14
|
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" />
|
|
|
15
|
+ <el-form-item label="姓名" prop="name">
|
|
|
16
|
+ <el-input v-model="queryParams.name" placeholder="请输入姓名" clearable style="width: 200px" />
|
|
17
|
17
|
</el-form-item>
|
|
18
|
18
|
|
|
19
|
19
|
<el-form-item label="考核月份" prop="assessmentMonth">
|
|
|
@@ -601,7 +601,7 @@ watch(() => currentTab.value, () => {
|
|
601
|
601
|
const queryParams = reactive({
|
|
602
|
602
|
pageNum: 1,
|
|
603
|
603
|
pageSize: 10,
|
|
604
|
|
- employeeName: '',
|
|
|
604
|
+ name: '',
|
|
605
|
605
|
assessmentMonth: ''
|
|
606
|
606
|
})
|
|
607
|
607
|
|
|
|
@@ -763,13 +763,23 @@ const cadreRules = {
|
|
763
|
763
|
const getList = async () => {
|
|
764
|
764
|
loading.value = true
|
|
765
|
765
|
try {
|
|
|
766
|
+ // 将 assessmentMonth 拆分为 year 和 month
|
|
|
767
|
+ let params = { ...queryParams }
|
|
|
768
|
+
|
|
|
769
|
+ if (params.assessmentMonth) {
|
|
|
770
|
+ const [year, month] = params.assessmentMonth.split('-')
|
|
|
771
|
+ params.year = parseInt(year)
|
|
|
772
|
+ params.month = parseInt(month)
|
|
|
773
|
+ delete params.assessmentMonth
|
|
|
774
|
+ }
|
|
|
775
|
+
|
|
766
|
776
|
if (currentTab.value === 'non-cadre') {
|
|
767
|
|
- // const res = await getNonCadreMonthlyAssessList(queryParams)
|
|
|
777
|
+ // const res = await getNonCadreMonthlyAssessList(params)
|
|
768
|
778
|
// nonCadreList.value = res.rows || []
|
|
769
|
779
|
// total.value = res.total || 0
|
|
770
|
780
|
} else {
|
|
771
|
781
|
// 干部数据API
|
|
772
|
|
- const res = await listCadreAssessment(queryParams)
|
|
|
782
|
+ const res = await listCadreAssessment(params)
|
|
773
|
783
|
|
|
774
|
784
|
cadreList.value = res.rows || []
|
|
775
|
785
|
total.value = res.total || 0
|
|
|
@@ -910,7 +920,13 @@ const generateMonthlyAssessment = async () => {
|
|
910
|
920
|
type: 'warning'
|
|
911
|
921
|
}).then(async () => {
|
|
912
|
922
|
loading.value = true
|
|
913
|
|
- const res = await generateCadreAssessment({ assessmentMonth: queryParams.assessmentMonth })
|
|
|
923
|
+ // 使用当前年月的日期
|
|
|
924
|
+ const now = new Date()
|
|
|
925
|
+ const params = {
|
|
|
926
|
+ year: now.getFullYear(),
|
|
|
927
|
+ month: now.getMonth() + 1
|
|
|
928
|
+ }
|
|
|
929
|
+ const res = await generateCadreAssessment(params)
|
|
914
|
930
|
ElMessage.success('生成成功')
|
|
915
|
931
|
getList()
|
|
916
|
932
|
}).catch(() => {})
|