ソースを参照

Merge branch 'personnelPerformance' into dev

# Conflicts:
#	src/api/system/user.js
huoyi 1 ヶ月 前
コミット
dfee695fea

+ 28 - 0
src/api/examManage/monthlyAssessPerformance.js

@@ -0,0 +1,28 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询月考成绩列表
4
+export function listMonthlyScore(query) {
5
+  return request({
6
+    url: '/exam/monthlyScore/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 下载导入模板
13
+export function downloadTemplate() {
14
+  return request({
15
+    url: '/exam/monthlyScore/importTemplate',
16
+    method: 'post',
17
+    responseType: 'blob'
18
+  })
19
+}
20
+
21
+// 导入月考成绩数据
22
+export function importData(data) {
23
+  return request({
24
+    url: '/exam/monthlyScore/importData',
25
+    method: 'post',
26
+    data: data
27
+  })
28
+}

+ 74 - 0
src/api/performance/monthlyAssess.js

@@ -0,0 +1,74 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询干部月度考核列表
4
+export function listCadreAssessment(query) {
5
+  return request({
6
+    url: '/personnel/cadre-assessment/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 生成本月考核数据
13
+export function generateCadreAssessment(data) {
14
+  return request({
15
+    url: '/personnel/cadre-assessment/generate',
16
+    method: 'post',
17
+    data: data
18
+  })
19
+}
20
+
21
+//查询非干部月度考核列表
22
+export function listNonCadreAssessment(query) {
23
+  return request({
24
+    url: '/personnel/assessment/list',
25
+    method: 'get',
26
+    params: query
27
+  })
28
+}
29
+//新增非干部月度考核
30
+export function addNonCadreAssessment(data) {
31
+  return request({
32
+    url: '/personnel/assessment',
33
+    method: 'post',
34
+    data: data
35
+  })
36
+}
37
+//修改非干部月度考核
38
+export function updateNonCadreAssessment(data) {
39
+  return request({
40
+    url: '/personnel/assessment',
41
+    method: 'put',
42
+    data: data
43
+  })
44
+}
45
+//删除非干部月度考核
46
+export function deleteNonCadreAssessment(ids) {
47
+  return request({
48
+    url: `/personnel/assessment/${ids}`,
49
+    method: 'delete',
50
+  })
51
+}
52
+//导出非干部月度考核列表
53
+export function exportNonCadreAssessment(data) {
54
+  return request({
55
+    url: '/personnel/assessment/export',
56
+    method: 'post',
57
+    data: data
58
+  })
59
+}
60
+//获取非干部月度考核详细信息
61
+export function getNonCadreAssessment(id) {
62
+  return request({
63
+    url: `/personnel/assessment/${id}`,
64
+    method: 'get'
65
+  })
66
+}
67
+
68
+//自动生成指定月份非干部月度考核数据
69
+export function generateNonCadreAssessment(query) {
70
+  return request({
71
+    url: `/personnel/assessment/autoGenerate/${query.month}`,
72
+    method: 'get',
73
+  })
74
+}

+ 113 - 0
src/api/performance/monthlyAssessSum.js

@@ -0,0 +1,113 @@
1
+import request from '@/utils/request'
2
+
3
+export function getScoreDistribution(query) {
4
+  return request({
5
+    url: '/personnel/non-cadre-assessment/score-summary/score-distribution',
6
+    method: 'get',
7
+    params: query
8
+  })
9
+}
10
+
11
+export function getDeptParticipation(query) {
12
+  return request({
13
+    url: '/personnel/non-cadre-assessment/score-summary/dept-participation',
14
+    method: 'get',
15
+    params: query
16
+  })
17
+}
18
+
19
+export function getDeptScoreDistribution(query) {
20
+  return request({
21
+    url: '/personnel/non-cadre-assessment/score-summary/dept-score-distribution',
22
+    method: 'get',
23
+    params: query
24
+  })
25
+}
26
+
27
+export function getAssessmentSummary(query) {
28
+  return request({
29
+    url: '/personnel/non-cadre-assessment/score-summary/assessment-summary',
30
+    method: 'get',
31
+    params: query
32
+  })
33
+}
34
+
35
+export function getActualImprovementDistribution(query) {
36
+  return request({
37
+    url: '/personnel/non-cadre-assessment/score-summary/actual-improvement-distribution',
38
+    method: 'get',
39
+    params: query
40
+  })
41
+}
42
+
43
+export function getActualIncompetentDistribution(query) {
44
+  return request({
45
+    url: '/personnel/non-cadre-assessment/score-summary/actual-incompetent-distribution',
46
+    method: 'get',
47
+    params: query
48
+  })
49
+}
50
+
51
+export function getAssessmentTeamImprovementDistribution(query) {
52
+  return request({
53
+    url: '/personnel/non-cadre-assessment/score-summary/assessment-team-improvement-distribution',
54
+    method: 'get',
55
+    params: query
56
+  })
57
+}
58
+
59
+export function getAssessmentTeamIncompetentDistribution(query) {
60
+  return request({
61
+    url: '/personnel/non-cadre-assessment/score-summary/assessment-team-incompetent-distribution',
62
+    method: 'get',
63
+    params: query
64
+  })
65
+}
66
+
67
+export function getDeptAssessmentTeamStatistics(query) {
68
+  return request({
69
+    url: '/personnel/non-cadre-assessment/score-summary/dept-assessment-team-statistics',
70
+    method: 'get',
71
+    params: query
72
+  })
73
+}
74
+
75
+export function getBrigadeImprovementDistribution(query) {
76
+  return request({
77
+    url: '/personnel/non-cadre-assessment/score-summary/brigade-improvement-distribution',
78
+    method: 'get',
79
+    params: query
80
+  })
81
+}
82
+
83
+export function getBrigadeIncompetentDistribution(query) {
84
+  return request({
85
+    url: '/personnel/non-cadre-assessment/score-summary/brigade-incompetent-distribution',
86
+    method: 'get',
87
+    params: query
88
+  })
89
+}
90
+
91
+export function getFunctionalDeptSummary(query) {
92
+  return request({
93
+    url: '/personnel/non-cadre-assessment/score-summary/functional-dept-summary',
94
+    method: 'get',
95
+    params: query
96
+  })
97
+}
98
+
99
+export function getFunctionalDeptPersonnelDistribution(query) {
100
+  return request({
101
+    url: '/personnel/non-cadre-assessment/score-summary/functional-dept-personnel-distribution',
102
+    method: 'get',
103
+    params: query
104
+  })
105
+}
106
+
107
+export function getFunctionalDeptDistributionPie(query) {
108
+  return request({
109
+    url: '/personnel/non-cadre-assessment/score-summary/functional-dept-distribution-pie',
110
+    method: 'get',
111
+    params: query
112
+  })
113
+}

+ 0 - 70
src/api/performance/nonCadreMonthlyAssess.js

@@ -1,70 +0,0 @@
1
-import request from '@/utils/request'
2
-
3
-// 获取非干部月度考核列表
4
-export function getNonCadreMonthlyAssessList(query) {
5
-  return request({
6
-    url: '/performance/non-cadre-monthly-assess/list',
7
-    method: 'get',
8
-    params: query
9
-  })
10
-}
11
-
12
-// 新增非干部月度考核
13
-export function addNonCadreMonthlyAssess(data) {
14
-  return request({
15
-    url: '/performance/non-cadre-monthly-assess',
16
-    method: 'post',
17
-    data: data
18
-  })
19
-}
20
-
21
-// 更新非干部月度考核
22
-export function updateNonCadreMonthlyAssess(data) {
23
-  return request({
24
-    url: '/performance/non-cadre-monthly-assess',
25
-    method: 'put',
26
-    data: data
27
-  })
28
-}
29
-
30
-// 删除非干部月度考核
31
-export function deleteNonCadreMonthlyAssess(id) {
32
-  return request({
33
-    url: `/performance/non-cadre-monthly-assess/${id}`,
34
-    method: 'delete'
35
-  })
36
-}
37
-
38
-// 导出非干部月度考核数据
39
-export function exportNonCadreMonthlyAssess(query) {
40
-  return request({
41
-    url: '/performance/non-cadre-monthly-assess/export',
42
-    method: 'get',
43
-    params: query,
44
-    responseType: 'blob'
45
-  })
46
-}
47
-
48
-// 获取用工形式选项
49
-export function getEmploymentTypeOptions() {
50
-  return request({
51
-    url: '/performance/non-cadre-monthly-assess/employment-type-options',
52
-    method: 'get'
53
-  })
54
-}
55
-
56
-// 获取考核结果选项
57
-export function getAssessmentResultOptions() {
58
-  return request({
59
-    url: '/performance/non-cadre-monthly-assess/assessment-result-options',
60
-    method: 'get'
61
-  })
62
-}
63
-
64
-// 获取应用方式选项
65
-export function getApplicationMethodOptions() {
66
-  return request({
67
-    url: '/performance/non-cadre-monthly-assess/application-method-options',
68
-    method: 'get'
69
-  })
70
-}

+ 0 - 20
src/api/performance/nonCadreMonthlyAssessSummary.js

@@ -1,20 +0,0 @@
1
-import request from '@/utils/request'
2
-
3
-// 获取非干部月度考核汇总数据
4
-export function getNonCadreMonthlyAssessSummary(query) {
5
-  return request({
6
-    url: '/performance/non-cadre-monthly-assess-summary',
7
-    method: 'get',
8
-    params: query
9
-  })
10
-}
11
-
12
-// 导出非干部月度考核汇总数据
13
-export function exportNonCadreMonthlyAssessSummary(query) {
14
-  return request({
15
-    url: '/performance/non-cadre-monthly-assess-summary/export',
16
-    method: 'get',
17
-    params: query,
18
-    responseType: 'blob'
19
-  })
20
-}

+ 0 - 83
src/api/performance/nonCadreMonthlyScoreSum.js

@@ -1,83 +0,0 @@
1
-import request from '@/utils/request'
2
-
3
-// 获取非干部月度考核分数汇总数据
4
-export function getNonCadreMonthlyScoreSum(query) {
5
-  return request({
6
-    url: '/performance/non-cadre-monthly-score-sum',
7
-    method: 'get',
8
-    params: query
9
-  })
10
-}
11
-
12
-// 导出非干部月度考核分数汇总文档
13
-export function exportNonCadreMonthlyScoreSum(query) {
14
-  return request({
15
-    url: '/performance/non-cadre-monthly-score-sum/export',
16
-    method: 'get',
17
-    params: query,
18
-    responseType: 'blob'
19
-  })
20
-}
21
-
22
-// 获取整体分支分布数据
23
-export function getOverallScoreDistribution(query) {
24
-  return request({
25
-    url: '/performance/non-cadre-monthly-score-sum/overall-distribution',
26
-    method: 'get',
27
-    params: query
28
-  })
29
-}
30
-
31
-// 获取参与人数占比数据
32
-export function getParticipantRatio(query) {
33
-  return request({
34
-    url: '/performance/non-cadre-monthly-score-sum/participant-ratio',
35
-    method: 'get',
36
-    params: query
37
-  })
38
-}
39
-
40
-// 获取各部门分支分布对比数据
41
-export function getDepartmentComparison(query) {
42
-  return request({
43
-    url: '/performance/non-cadre-monthly-score-sum/department-comparison',
44
-    method: 'get',
45
-    params: query
46
-  })
47
-}
48
-
49
-// 获取汇总表数据
50
-export function getSummaryTableData(query) {
51
-  return request({
52
-    url: '/performance/non-cadre-monthly-score-sum/summary-table',
53
-    method: 'get',
54
-    params: query
55
-  })
56
-}
57
-
58
-// 获取分类结果汇总数据
59
-export function getClassificationSummary(query) {
60
-  return request({
61
-    url: '/performance/non-cadre-monthly-score-sum/classification-summary',
62
-    method: 'get',
63
-    params: query
64
-  })
65
-}
66
-
67
-// 获取大队分布统计数据
68
-export function getBrigadeDistribution(query) {
69
-  return request({
70
-    url: '/performance/non-cadre-monthly-score-sum/brigade-distribution',
71
-    method: 'get',
72
-    params: query
73
-  })
74
-}
75
-
76
-// 获取岗位分布统计数据
77
-export function getPositionDistribution(query) {
78
-  return request({
79
-    url: '/performance/non-cadre-monthly-score-sum/position-distribution',
80
-    method: 'get',
81
-    params: query
82
-  })
83
-}

+ 8 - 0
src/api/system/user.js

@@ -159,4 +159,12 @@ export function selectUserLeaderListByCondition(data) {
159
     method: 'post',
159
     method: 'post',
160
     data: data
160
     data: data
161
   })
161
   })
162
+}
163
+//查询人事绩效用户列表
164
+export function listUserPerformance(data) {
165
+  return request({
166
+    url: '/system/user/selectPersonnelUserList',
167
+    method: 'post',
168
+    data: data
169
+  })
162
 }
170
 }

+ 191 - 0
src/views/examManage/monthlyAssessPerformance/index.vue

@@ -0,0 +1,191 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
4
+      <el-form-item label="年月" prop="yearMonth">
5
+        <el-date-picker v-model="queryParams.yearMonth" type="month" placeholder="请选择年月" value-format="YYYY-MM" style="width: 200px" />
6
+      </el-form-item>
7
+      <el-form-item label="姓名" prop="studentName">
8
+        <el-input v-model="queryParams.studentName" placeholder="请输入姓名" clearable style="width: 200px" />
9
+      </el-form-item>
10
+      <el-form-item label="科队" prop="team">
11
+        <el-select v-model="queryParams.team" placeholder="请选择科队" clearable style="width: 200px">
12
+          <el-option v-for="dict in exam_team" :key="dict.value" :label="dict.label" :value="dict.value" />
13
+        </el-select>
14
+      </el-form-item>
15
+      <el-form-item label="岗位" prop="jobPosition">
16
+        <el-input v-model="queryParams.jobPosition" placeholder="请输入岗位" clearable style="width: 200px" />
17
+      </el-form-item>
18
+      <el-form-item>
19
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
20
+        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
21
+      </el-form-item>
22
+    </el-form>
23
+
24
+    <el-row :gutter="10" class="mb8">
25
+      <el-col :span="1.5">
26
+        <el-button type="info" plain icon="Upload" @click="handleImport">导入</el-button>
27
+      </el-col>
28
+      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
29
+    </el-row>
30
+
31
+    <el-table v-loading="loading" :data="trainingPerformanceList" >
32
+      <el-table-column label="年月" align="center" prop="yearMonth" />
33
+      <el-table-column label="学生" align="center" prop="studentName" />
34
+      <el-table-column label="科队" align="center" prop="team">
35
+        <template #default="scope">
36
+          <dict-tag :options="exam_team" :value="scope.row.team" />
37
+        </template>
38
+      </el-table-column>
39
+      <el-table-column label="岗位" align="center" prop="jobPosition">
40
+       
41
+      </el-table-column>
42
+      <el-table-column label="综合成绩" align="center" prop="comprehensiveScore" />
43
+      <el-table-column label="综合用时" align="center" prop="comprehensiveTime" />
44
+      <el-table-column label="专项成绩" align="center" prop="specialScore" />
45
+      <el-table-column label="专项用时" align="center" prop="specialTime" />
46
+    </el-table>
47
+
48
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
49
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
50
+
51
+    <!-- 导入对话框 -->
52
+    <el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body>
53
+      <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
54
+        :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
55
+        :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
56
+        <el-icon class="el-icon--upload"><upload-filled /></el-icon>
57
+        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
58
+        <template #tip>
59
+          <div class="el-upload__tip text-center">
60
+              <span>仅允许导入xls、xlsx格式文件。</span>
61
+              <el-link type="primary" :underline="false" style="font-size:16px;vertical-align: baseline;" @click="handleDownloadTemplate">下载模板</el-link>
62
+            </div>
63
+        </template>
64
+      </el-upload>
65
+      <template #footer>
66
+        <div class="dialog-footer">
67
+          <el-button type="primary" @click="submitFileForm">确 定</el-button>
68
+          <el-button @click="upload.open = false">取 消</el-button>
69
+        </div>
70
+      </template>
71
+    </el-dialog>
72
+  </div>
73
+</template>
74
+
75
+<script setup name="TrainingPerformance">
76
+import { listMonthlyScore, downloadTemplate, importData } from "@/api/examManage/monthlyAssessPerformance"
77
+import request from '@/utils/request'
78
+import { getToken } from "@/utils/auth"
79
+import { addDateRange, parseTime } from "@/utils/ruoyi"
80
+import { UploadFilled } from '@element-plus/icons-vue'
81
+
82
+const { proxy } = getCurrentInstance()
83
+const { exam_team, post } = proxy.useDict('exam_team', 'post')
84
+
85
+const trainingPerformanceList = ref([])
86
+const loading = ref(true)
87
+const showSearch = ref(true)
88
+const ids = ref([])
89
+const single = ref(true)
90
+const multiple = ref(true)
91
+const total = ref(0)
92
+const dateRange = ref([])
93
+
94
+// 导入参数
95
+const upload = reactive({
96
+  // 是否显示弹出层
97
+  open: false,
98
+  // 弹出层标题
99
+  title: "",
100
+  // 是否禁用上传
101
+  isUploading: false,
102
+  // 是否更新已经存在的用户数据
103
+  updateSupport: 0,
104
+  // 设置上传的请求头部
105
+  headers: { Authorization: "Bearer " + getToken() },
106
+  // 上传的地址
107
+  url: import.meta.env.VITE_APP_BASE_API + "/exam/monthlyScore/importData"
108
+})
109
+
110
+const data = reactive({
111
+  queryParams: {
112
+    pageNum: 1,
113
+    pageSize: 10,
114
+    yearMonth: undefined,
115
+    studentName: undefined,
116
+    team: undefined,
117
+    position: undefined
118
+  }
119
+})
120
+
121
+const { queryParams } = toRefs(data)
122
+
123
+/** 查询月考成绩列表 */
124
+function getList() {
125
+  loading.value = true;
126
+  let params = {
127
+    ...queryParams.value,
128
+  }
129
+  listMonthlyScore(params).then(response => {
130
+    trainingPerformanceList.value = response.rows
131
+    total.value = response.total
132
+    loading.value = false
133
+  })
134
+}
135
+
136
+/** 搜索按钮操作 */
137
+function handleQuery() {
138
+  queryParams.value.pageNum = 1
139
+  getList()
140
+}
141
+
142
+/** 重置按钮操作 */
143
+function resetQuery() {
144
+  dateRange.value = []
145
+  proxy.resetForm("queryRef")
146
+  handleQuery()
147
+}
148
+
149
+/** 多选框选中数据 */
150
+function handleSelectionChange(selection) {
151
+  ids.value = selection.map(item => item.id)
152
+  single.value = selection.length != 1
153
+  multiple.value = !selection.length
154
+}
155
+
156
+/** 导入按钮操作 */
157
+function handleImport() {
158
+  upload.title = "导入"
159
+  upload.open = true
160
+}
161
+
162
+/** 下载模板操作 */
163
+function handleDownloadTemplate() {
164
+  proxy.download("/exam/monthlyScore/importTemplate", {}, `monthly_score_template_${new Date().getTime()}.xlsx`, 'post')
165
+}
166
+
167
+/**文件上传中处理 */
168
+const handleFileUploadProgress = (event, file, fileList) => {
169
+  upload.isUploading = true
170
+}
171
+
172
+/** 文件上传成功处理 */
173
+const handleFileSuccess = (response, file, fileList) => {
174
+  upload.open = false
175
+  upload.isUploading = false
176
+  proxy.$refs["uploadRef"].handleRemove(file)
177
+  if (response.code === 200) {
178
+    proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true })
179
+    getList()
180
+  } else {
181
+    proxy.$modal.msgError(response.msg)
182
+  }
183
+}
184
+
185
+/** 提交上传文件 */
186
+function submitFileForm() {
187
+  proxy.$refs["uploadRef"].submit()
188
+}
189
+
190
+getList()
191
+</script>

File diff suppressed because it is too large
+ 813 - 519
src/views/performanceManage/monthlyAssess/index.vue


File diff suppressed because it is too large
+ 797 - 95
src/views/performanceManage/monthlyAssessSum/index.vue


+ 8 - 0
src/views/system/dept/index.vue

@@ -138,6 +138,14 @@
138
                   </el-form-item>
138
                   </el-form-item>
139
                </el-col>
139
                </el-col>
140
                <el-col :span="12">
140
                <el-col :span="12">
141
+                  <el-form-item label="职能部门" prop="isFunctionalDept">
142
+                     <el-select v-model="form.isFunctionalDept" placeholder="请选择">
143
+                        <el-option :label="'是'" :value="'1'" />
144
+                        <el-option :label="'否'" :value="'0'" />
145
+                     </el-select>
146
+                  </el-form-item>
147
+               </el-col>
148
+               <el-col :span="12">
141
                   <el-form-item label="显示排序" prop="orderNum">
149
                   <el-form-item label="显示排序" prop="orderNum">
142
                      <el-input-number v-model="form.orderNum" controls-position="right" :min="0" />
150
                      <el-input-number v-model="form.orderNum" controls-position="right" :min="0" />
143
                   </el-form-item>
151
                   </el-form-item>