|
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+<template>
|
|
|
2
|
+ <div class="app-container">
|
|
|
3
|
+ <el-card>
|
|
|
4
|
+ <!-- 第一行:科室班组个人按钮组 -->
|
|
|
5
|
+ <div class="filter-container">
|
|
|
6
|
+ <div class="button-group">
|
|
|
7
|
+ <span class="button-group-label">查询范围:</span>
|
|
|
8
|
+ <el-button v-for="item in queryTypeOptions" :key="item.value"
|
|
|
9
|
+ :type="queryType === item.value ? 'primary' : 'default'"
|
|
|
10
|
+ :class="queryType === item.value ? 'active' : 'inactive'" @click="handleQueryTypeChange(item.value)">
|
|
|
11
|
+ {{ item.label }}
|
|
|
12
|
+ </el-button>
|
|
|
13
|
+ </div>
|
|
|
14
|
+
|
|
|
15
|
+ <div class="button-group" style="margin-left: 20px;">
|
|
|
16
|
+ <span class="button-group-label">时间范围:</span>
|
|
|
17
|
+ <el-button v-for="item in timeRangeOptions" :key="item.value"
|
|
|
18
|
+ :type="timeRange === item.value ? 'primary' : 'default'"
|
|
|
19
|
+ :class="timeRange === item.value ? 'active' : 'inactive'" @click="handleTimeRangeChange(item.value)">
|
|
|
20
|
+ {{ item.label }}
|
|
|
21
|
+ </el-button>
|
|
|
22
|
+
|
|
|
23
|
+ <!-- 自定义时间范围选择器 -->
|
|
|
24
|
+ <el-date-picker v-if="timeRange === 'custom'" v-model="customDateRange" type="daterange" range-separator="至"
|
|
|
25
|
+ start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYY-MM-DD"
|
|
|
26
|
+ style="margin-left: 10px; width: 240px;" @change="handleCustomDateChange" />
|
|
|
27
|
+ </div>
|
|
|
28
|
+ </div>
|
|
|
29
|
+
|
|
|
30
|
+ <!-- 第二行:查询条件 -->
|
|
|
31
|
+ <el-form :model="queryParams" ref="queryFormRef" :inline="true" class="search-form">
|
|
|
32
|
+ <!-- 大队下拉框 -->
|
|
|
33
|
+ <el-form-item label="大队" prop="brigadeId" v-if="queryType === '3' || queryType === '2' || queryType === '1'">
|
|
|
34
|
+ <el-select v-model="queryParams.brigadeId" placeholder="请选择大队" clearable style="width: 200px"
|
|
|
35
|
+ @change="handleBrigadeChange">
|
|
|
36
|
+ <el-option v-for="item in brigadeOptions" :key="item.value" :label="item.text" :value="item.value" />
|
|
|
37
|
+ </el-select>
|
|
|
38
|
+ </el-form-item>
|
|
|
39
|
+
|
|
|
40
|
+ <!-- 主管下拉框 -->
|
|
|
41
|
+ <el-form-item label="主管" prop="deptId" v-if="queryType === '3' || queryType === '2' || queryType === '1'">
|
|
|
42
|
+ <el-select v-model="queryParams.deptId" placeholder="请选择主管" clearable style="width: 200px"
|
|
|
43
|
+ @change="handleQuery">
|
|
|
44
|
+ <el-option v-for="item in departmentOptions" :key="item.value" :label="item.text" :value="item.value" />
|
|
|
45
|
+ </el-select>
|
|
|
46
|
+ </el-form-item>
|
|
|
47
|
+
|
|
|
48
|
+ <!-- 班组下拉框 -->
|
|
|
49
|
+ <el-form-item label="班组" prop="teamId" v-if="queryType === '2' || queryType === '1'">
|
|
|
50
|
+ <el-select v-model="queryParams.teamId" placeholder="请选择班组" clearable style="width: 200px"
|
|
|
51
|
+ @change="handleQuery">
|
|
|
52
|
+ <el-option v-for="item in teamOptions" :key="item.value" :label="item.text" :value="item.value" />
|
|
|
53
|
+ </el-select>
|
|
|
54
|
+ </el-form-item>
|
|
|
55
|
+
|
|
|
56
|
+ <!-- 姓名输入框 -->
|
|
|
57
|
+ <el-form-item label="姓名" prop="userName" v-if="queryType === '1'">
|
|
|
58
|
+ <el-input v-model="queryParams.userName" placeholder="请输入姓名" clearable style="width: 200px"
|
|
|
59
|
+ @input="handleQuery" />
|
|
|
60
|
+ </el-form-item>
|
|
|
61
|
+ <!-- <el-form-item>
|
|
|
62
|
+ <el-button type="primary" icon="Search" @click="handleQuery">查询</el-button>
|
|
|
63
|
+ <el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
|
64
|
+ </el-form-item> -->
|
|
|
65
|
+ </el-form>
|
|
|
66
|
+
|
|
|
67
|
+ <!-- 导出按钮 -->
|
|
|
68
|
+ <div class="export-container">
|
|
|
69
|
+ <el-button type="warning" icon="Download" @click="handleExport">导出</el-button>
|
|
|
70
|
+ </div>
|
|
|
71
|
+
|
|
|
72
|
+ <!-- 表格 -->
|
|
|
73
|
+ <el-table v-loading="loading" :data="performanceList" border fit highlight-current-row
|
|
|
74
|
+ style="width: 100%; margin-top: 20px;">
|
|
|
75
|
+ <!-- 动态列 -->
|
|
|
76
|
+ <el-table-column v-if="queryType === '4'||queryType === '3'" label="大队"
|
|
|
77
|
+ :prop="queryType === '4'?'name':'brigadeName'" align="center" min-width="120" />
|
|
|
78
|
+ <!-- 动态列 -->
|
|
|
79
|
+ <el-table-column v-if="queryType === '3' || queryType === '2' || queryType === '1'" label="主管"
|
|
|
80
|
+ :prop="queryType === '3' ? 'name' : 'deptName'" align="center" min-width="120" />
|
|
|
81
|
+
|
|
|
82
|
+ <el-table-column v-if="queryType === '2' || queryType === '1'" label="班组"
|
|
|
83
|
+ :prop="queryType === '2' ? 'name' : 'className'" align="center" min-width="120" />
|
|
|
84
|
+
|
|
|
85
|
+ <el-table-column v-if="queryType === '1'" label="姓名" prop="name" align="center" min-width="100" />
|
|
|
86
|
+
|
|
|
87
|
+ <!-- 固定列 -->
|
|
|
88
|
+ <el-table-column label="总分" prop="totalScore" align="center" min-width="100" sortable
|
|
|
89
|
+ :sort-orders="['ascending', 'descending']" @sort-change="handleSortChange('totalScore', $event)" />
|
|
|
90
|
+
|
|
|
91
|
+ <el-table-column label="查获效率" prop="seizureEfficiency" align="center" min-width="120" sortable
|
|
|
92
|
+ :sort-orders="['ascending', 'descending']" @sort-change="handleSortChange('seizureEfficiency', $event)" />
|
|
|
93
|
+
|
|
|
94
|
+ <el-table-column label="抽问抽答正确率" prop="trainingScore" align="center" min-width="100" sortable
|
|
|
95
|
+ :sort-orders="['ascending', 'descending']" @sort-change="handleSortChange('trainingScore', $event)" />
|
|
|
96
|
+
|
|
|
97
|
+ <el-table-column label="巡检合格率" prop="inspectionPassRate" align="center" min-width="120" sortable
|
|
|
98
|
+ :sort-orders="['ascending', 'descending']" @sort-change="handleSortChange('inspectionPassRate', $event)" />
|
|
|
99
|
+ </el-table>
|
|
|
100
|
+
|
|
|
101
|
+ <!-- 分页 -->
|
|
|
102
|
+ <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
|
|
103
|
+ v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
|
104
|
+ </el-card>
|
|
|
105
|
+ </div>
|
|
|
106
|
+</template>
|
|
|
107
|
+
|
|
|
108
|
+<script setup>
|
|
|
109
|
+import { ref, reactive, onMounted, getCurrentInstance, watch } from 'vue'
|
|
|
110
|
+import { getPerformanceList } from '@/api/performance/performance.js'
|
|
|
111
|
+import { listDept } from '@/api/system/dept.js'
|
|
|
112
|
+
|
|
|
113
|
+import { getDownload } from '@/utils/request.js'
|
|
|
114
|
+
|
|
|
115
|
+// 查询类型选项
|
|
|
116
|
+const queryTypeOptions = [
|
|
|
117
|
+ { label: '大队', value: '4' },
|
|
|
118
|
+ { label: '主管', value: '3' },
|
|
|
119
|
+ { label: '班组', value: '2' },
|
|
|
120
|
+ { label: '个人', value: '1' }
|
|
|
121
|
+]
|
|
|
122
|
+
|
|
|
123
|
+// 时间范围选项
|
|
|
124
|
+const timeRangeOptions = [
|
|
|
125
|
+ { label: '近三个月', value: 'threeMonths' },
|
|
|
126
|
+ { label: '近六个月', value: 'sixMonths' },
|
|
|
127
|
+ { label: '自定义', value: 'custom' }
|
|
|
128
|
+]
|
|
|
129
|
+
|
|
|
130
|
+// 响应式数据
|
|
|
131
|
+const queryType = ref('4') // 默认查询科室
|
|
|
132
|
+const timeRange = ref('threeMonths') // 默认近三个月
|
|
|
133
|
+const customDateRange = ref([])
|
|
|
134
|
+const loading = ref(false)
|
|
|
135
|
+const total = ref(0)
|
|
|
136
|
+const queryFormRef = ref()
|
|
|
137
|
+
|
|
|
138
|
+// 查询参数
|
|
|
139
|
+const queryParams = reactive({
|
|
|
140
|
+ pageNum: 1,
|
|
|
141
|
+ pageSize: 10,
|
|
|
142
|
+ brigadeId: '',
|
|
|
143
|
+ deptId: '',
|
|
|
144
|
+ teamId: '',
|
|
|
145
|
+ userName: '',
|
|
|
146
|
+ sortField: '',
|
|
|
147
|
+ sortOrder: ''
|
|
|
148
|
+})
|
|
|
149
|
+
|
|
|
150
|
+// 绩效数据列表
|
|
|
151
|
+const performanceList = ref([])
|
|
|
152
|
+
|
|
|
153
|
+// 部门数据
|
|
|
154
|
+const deptList = ref([])
|
|
|
155
|
+const brigadeOptions = ref([])
|
|
|
156
|
+const departmentOptions = ref([])
|
|
|
157
|
+const teamOptions = ref([])
|
|
|
158
|
+
|
|
|
159
|
+// 大队变化处理函数
|
|
|
160
|
+const handleBrigadeChange = (brigadeId) => {
|
|
|
161
|
+ // 清空主管和班组选项
|
|
|
162
|
+ queryParams.deptId = null
|
|
|
163
|
+ queryParams.teamId = null
|
|
|
164
|
+ teamOptions.value = []
|
|
|
165
|
+
|
|
|
166
|
+ if (brigadeId) {
|
|
|
167
|
+ // 根据大队ID获取主管列表
|
|
|
168
|
+ departmentOptions.value = deptList.value.filter(item =>
|
|
|
169
|
+ item.deptType === 'MANAGER' && item.parentId === brigadeId
|
|
|
170
|
+ ).map(item => ({
|
|
|
171
|
+ value: item.deptId,
|
|
|
172
|
+ text: item.deptName
|
|
|
173
|
+ }))
|
|
|
174
|
+ } else {
|
|
|
175
|
+ // 如果没有选择大队,显示所有主管
|
|
|
176
|
+ departmentOptions.value = deptList.value.filter(item => item.deptType === 'MANAGER').map(item => ({
|
|
|
177
|
+ value: item.deptId,
|
|
|
178
|
+ text: item.deptName
|
|
|
179
|
+ }))
|
|
|
180
|
+ }
|
|
|
181
|
+
|
|
|
182
|
+ handleQuery()
|
|
|
183
|
+}
|
|
|
184
|
+
|
|
|
185
|
+// 监听科室变化,获取对应班组
|
|
|
186
|
+watch(() => queryParams.deptId, async (newDeptId) => {
|
|
|
187
|
+ if (newDeptId) {
|
|
|
188
|
+ await fetchTeamByDept(newDeptId)
|
|
|
189
|
+ } else {
|
|
|
190
|
+ // 如果清空科室选择,重置班组选项为所有班组
|
|
|
191
|
+ teamOptions.value = deptList.value.filter(item => item.deptType === 'TEAMS').map(item => ({
|
|
|
192
|
+ value: item.deptId,
|
|
|
193
|
+ text: item.deptName
|
|
|
194
|
+ }))
|
|
|
195
|
+ queryParams.teamId = '' // 清空班组选择
|
|
|
196
|
+ }
|
|
|
197
|
+})
|
|
|
198
|
+
|
|
|
199
|
+// 获取部门数据
|
|
|
200
|
+const fetchDeptData = async () => {
|
|
|
201
|
+ try {
|
|
|
202
|
+ const response = await listDept({})
|
|
|
203
|
+ if (response.code === 200) {
|
|
|
204
|
+
|
|
|
205
|
+ deptList.value = response.data || []
|
|
|
206
|
+ // 生成大队选项
|
|
|
207
|
+ brigadeOptions.value = deptList.value.filter(item => item.deptType === 'BRIGADE').map(item => ({
|
|
|
208
|
+ value: item.deptId,
|
|
|
209
|
+ text: item.deptName
|
|
|
210
|
+ }))
|
|
|
211
|
+ // 生成主管选项
|
|
|
212
|
+ departmentOptions.value = deptList.value.filter(item => item.deptType === 'MANAGER').map(item => ({
|
|
|
213
|
+ value: item.deptId,
|
|
|
214
|
+ text: item.deptName
|
|
|
215
|
+ }))
|
|
|
216
|
+
|
|
|
217
|
+
|
|
|
218
|
+ // 生成班组选项
|
|
|
219
|
+ teamOptions.value = deptList.value.filter(item => item.deptType === 'TEAMS').map(item => ({
|
|
|
220
|
+ value: item.deptId,
|
|
|
221
|
+ text: item.deptName
|
|
|
222
|
+ }))
|
|
|
223
|
+ }
|
|
|
224
|
+ } catch (error) {
|
|
|
225
|
+ console.error('获取部门数据失败:', error)
|
|
|
226
|
+ }
|
|
|
227
|
+}
|
|
|
228
|
+
|
|
|
229
|
+// 根据科室ID获取班组列表
|
|
|
230
|
+const fetchTeamByDept = async (deptId) => {
|
|
|
231
|
+ try {
|
|
|
232
|
+ const response = await listDept({ parentId: deptId })
|
|
|
233
|
+ if (response.code === 200 && response.data) {
|
|
|
234
|
+ teamOptions.value = response.data.map(item => ({
|
|
|
235
|
+ value: item.deptId,
|
|
|
236
|
+ text: item.deptName
|
|
|
237
|
+ }))
|
|
|
238
|
+ // 清空班组选择,让用户重新选择
|
|
|
239
|
+ queryParams.teamId = ''
|
|
|
240
|
+ }
|
|
|
241
|
+ } catch (error) {
|
|
|
242
|
+ console.error('获取班组列表失败:', error)
|
|
|
243
|
+ // 如果获取失败,重置为所有班组
|
|
|
244
|
+ teamOptions.value = deptList.value.filter(item => item.deptType === 'TEAMS').map(item => ({
|
|
|
245
|
+ value: item.deptId,
|
|
|
246
|
+ text: item.deptName
|
|
|
247
|
+ }))
|
|
|
248
|
+ }
|
|
|
249
|
+}
|
|
|
250
|
+
|
|
|
251
|
+// 查询类型变化
|
|
|
252
|
+const handleQueryTypeChange = (type) => {
|
|
|
253
|
+ queryType.value = type
|
|
|
254
|
+ getList()
|
|
|
255
|
+}
|
|
|
256
|
+
|
|
|
257
|
+// 时间范围变化
|
|
|
258
|
+const handleTimeRangeChange = (range) => {
|
|
|
259
|
+ timeRange.value = range
|
|
|
260
|
+ if (range !== 'custom') {
|
|
|
261
|
+ getList()
|
|
|
262
|
+ }
|
|
|
263
|
+}
|
|
|
264
|
+
|
|
|
265
|
+// 格式化日期为 YYYY-MM-DD
|
|
|
266
|
+const formatDate = (date) => {
|
|
|
267
|
+ const year = date.getFullYear()
|
|
|
268
|
+ const month = String(date.getMonth() + 1).padStart(2, '0')
|
|
|
269
|
+ const day = String(date.getDate()).padStart(2, '0')
|
|
|
270
|
+ return `${year}-${month}-${day}`
|
|
|
271
|
+}
|
|
|
272
|
+
|
|
|
273
|
+// 计算时间范围
|
|
|
274
|
+const calculateTimeRange = (range) => {
|
|
|
275
|
+ const now = new Date()
|
|
|
276
|
+ const startTime = new Date()
|
|
|
277
|
+
|
|
|
278
|
+ switch (range) {
|
|
|
279
|
+ case 'threeMonths':
|
|
|
280
|
+ startTime.setMonth(now.getMonth() - 3)
|
|
|
281
|
+ break
|
|
|
282
|
+ case 'sixMonths':
|
|
|
283
|
+ startTime.setMonth(now.getMonth() - 6)
|
|
|
284
|
+ break
|
|
|
285
|
+ case 'custom':
|
|
|
286
|
+ if (customDateRange.value && customDateRange.value.length === 2) {
|
|
|
287
|
+ // 结束时间加一天
|
|
|
288
|
+ const endDate = new Date(customDateRange.value[1])
|
|
|
289
|
+ endDate.setDate(endDate.getDate() + 1)
|
|
|
290
|
+ return {
|
|
|
291
|
+ startTime: customDateRange.value[0],
|
|
|
292
|
+ endTime: formatDate(endDate)
|
|
|
293
|
+ }
|
|
|
294
|
+ }
|
|
|
295
|
+ return { startTime: '', endTime: '' }
|
|
|
296
|
+ default:
|
|
|
297
|
+ return { startTime: '', endTime: '' }
|
|
|
298
|
+ }
|
|
|
299
|
+
|
|
|
300
|
+ return {
|
|
|
301
|
+ startTime: formatDate(startTime),
|
|
|
302
|
+ endTime: formatDate(now)
|
|
|
303
|
+ }
|
|
|
304
|
+}
|
|
|
305
|
+
|
|
|
306
|
+// 自定义时间范围变化
|
|
|
307
|
+const handleCustomDateChange = () => {
|
|
|
308
|
+ if (customDateRange.value && customDateRange.value.length === 2) {
|
|
|
309
|
+ getList()
|
|
|
310
|
+ }
|
|
|
311
|
+}
|
|
|
312
|
+
|
|
|
313
|
+// 排序处理
|
|
|
314
|
+const handleSortChange = (field, { order }) => {
|
|
|
315
|
+ queryParams.sortField = field
|
|
|
316
|
+ queryParams.sortOrder = order === 'ascending' ? 'asc' : 'desc'
|
|
|
317
|
+ getList()
|
|
|
318
|
+}
|
|
|
319
|
+
|
|
|
320
|
+// 查询
|
|
|
321
|
+const handleQuery = () => {
|
|
|
322
|
+ queryParams.pageNum = 1
|
|
|
323
|
+ getList()
|
|
|
324
|
+}
|
|
|
325
|
+
|
|
|
326
|
+// 重置查询
|
|
|
327
|
+const resetQuery = () => {
|
|
|
328
|
+ queryFormRef.value.resetFields()
|
|
|
329
|
+ queryParams.pageNum = 1
|
|
|
330
|
+ queryParams.sortField = ''
|
|
|
331
|
+ queryParams.sortOrder = ''
|
|
|
332
|
+ getList()
|
|
|
333
|
+}
|
|
|
334
|
+
|
|
|
335
|
+// 获取绩效列表
|
|
|
336
|
+const getList = async () => {
|
|
|
337
|
+ loading.value = true
|
|
|
338
|
+
|
|
|
339
|
+ try {
|
|
|
340
|
+ // 计算时间范围
|
|
|
341
|
+ const timeRangeParams = calculateTimeRange(timeRange.value)
|
|
|
342
|
+
|
|
|
343
|
+ // 构建请求参数
|
|
|
344
|
+ const params = {
|
|
|
345
|
+ ...queryParams,
|
|
|
346
|
+ dimension: queryType.value,
|
|
|
347
|
+ ...timeRangeParams
|
|
|
348
|
+ }
|
|
|
349
|
+
|
|
|
350
|
+ // 根据查询类型清理不必要的参数
|
|
|
351
|
+ if (queryType.value === '3') {
|
|
|
352
|
+ // 主管查询:传递大队和主管参数
|
|
|
353
|
+ params.teamId = ''
|
|
|
354
|
+ params.userName = ''
|
|
|
355
|
+ } else if (queryType.value === '2') {
|
|
|
356
|
+ // 班组查询:传递大队、主管和班组参数
|
|
|
357
|
+ params.userName = ''
|
|
|
358
|
+ } else if (queryType.value === '1') {
|
|
|
359
|
+ // 个人查询:传递所有参数
|
|
|
360
|
+ } else if (queryType.value === '4') {
|
|
|
361
|
+ // 大队查询:不传递任何部门参数
|
|
|
362
|
+ params.brigadeId = ''
|
|
|
363
|
+ params.deptId = ''
|
|
|
364
|
+ params.teamId = ''
|
|
|
365
|
+ params.userName = ''
|
|
|
366
|
+ }
|
|
|
367
|
+
|
|
|
368
|
+ // 调用API
|
|
|
369
|
+ const response = await getPerformanceList(params)
|
|
|
370
|
+
|
|
|
371
|
+ if (response.code === 200) {
|
|
|
372
|
+
|
|
|
373
|
+ performanceList.value = response.data || []
|
|
|
374
|
+ total.value = response.total || 0
|
|
|
375
|
+ } else {
|
|
|
376
|
+ console.error('获取绩效列表失败:', response.msg)
|
|
|
377
|
+ performanceList.value = []
|
|
|
378
|
+ total.value = 0
|
|
|
379
|
+ }
|
|
|
380
|
+ } catch (error) {
|
|
|
381
|
+ console.error('获取绩效列表异常:', error)
|
|
|
382
|
+ performanceList.value = []
|
|
|
383
|
+ total.value = 0
|
|
|
384
|
+ } finally {
|
|
|
385
|
+ loading.value = false
|
|
|
386
|
+ }
|
|
|
387
|
+}
|
|
|
388
|
+
|
|
|
389
|
+// 获取当前实例
|
|
|
390
|
+const { proxy } = getCurrentInstance()
|
|
|
391
|
+
|
|
|
392
|
+// 导出
|
|
|
393
|
+const handleExport = () => {
|
|
|
394
|
+ try {
|
|
|
395
|
+ // 计算时间范围
|
|
|
396
|
+ const timeRangeParams = calculateTimeRange(timeRange.value)
|
|
|
397
|
+
|
|
|
398
|
+ // 构建请求参数
|
|
|
399
|
+ const params = {
|
|
|
400
|
+ ...queryParams,
|
|
|
401
|
+ dimension: queryType.value,
|
|
|
402
|
+ ...timeRangeParams
|
|
|
403
|
+ }
|
|
|
404
|
+
|
|
|
405
|
+ // 根据查询类型清理不必要的参数
|
|
|
406
|
+ if (queryType.value === '3') {
|
|
|
407
|
+ // 主管查询:传递大队和主管参数
|
|
|
408
|
+ params.teamId = ''
|
|
|
409
|
+ params.userName = ''
|
|
|
410
|
+ } else if (queryType.value === '2') {
|
|
|
411
|
+ // 班组查询:传递大队、主管和班组参数
|
|
|
412
|
+ params.userName = ''
|
|
|
413
|
+ } else if (queryType.value === '1') {
|
|
|
414
|
+ // 个人查询:传递所有参数
|
|
|
415
|
+ } else if (queryType.value === '4') {
|
|
|
416
|
+ // 大队查询:不传递任何部门参数
|
|
|
417
|
+ params.brigadeId = ''
|
|
|
418
|
+ params.deptId = ''
|
|
|
419
|
+ params.teamId = ''
|
|
|
420
|
+ params.userName = ''
|
|
|
421
|
+ }
|
|
|
422
|
+
|
|
|
423
|
+ // 使用proxy.getDownload下载文件(GET请求)
|
|
|
424
|
+ getDownload('/item/indicators/export', params, `绩效查询数据_${new Date().getTime()}.xlsx`)
|
|
|
425
|
+ } catch (error) {
|
|
|
426
|
+ console.error('导出异常:', error)
|
|
|
427
|
+ proxy.$modal.msgError('导出异常,请重试')
|
|
|
428
|
+ }
|
|
|
429
|
+}
|
|
|
430
|
+
|
|
|
431
|
+onMounted(() => {
|
|
|
432
|
+ fetchDeptData()
|
|
|
433
|
+ getList()
|
|
|
434
|
+})
|
|
|
435
|
+</script>
|
|
|
436
|
+
|
|
|
437
|
+<style lang="less" scoped>
|
|
|
438
|
+.app-container {
|
|
|
439
|
+ padding: 20px;
|
|
|
440
|
+}
|
|
|
441
|
+
|
|
|
442
|
+.filter-container {
|
|
|
443
|
+ display: flex;
|
|
|
444
|
+ align-items: center;
|
|
|
445
|
+ margin-bottom: 20px;
|
|
|
446
|
+}
|
|
|
447
|
+
|
|
|
448
|
+.button-group {
|
|
|
449
|
+ display: flex;
|
|
|
450
|
+ align-items: center;
|
|
|
451
|
+
|
|
|
452
|
+ .button-group-label {
|
|
|
453
|
+ margin-right: 10px;
|
|
|
454
|
+ font-weight: 600;
|
|
|
455
|
+ color: #606266;
|
|
|
456
|
+ }
|
|
|
457
|
+
|
|
|
458
|
+ .el-button {
|
|
|
459
|
+ margin-right: 10px;
|
|
|
460
|
+
|
|
|
461
|
+ &.active {
|
|
|
462
|
+ background-color: #409EFF;
|
|
|
463
|
+ border-color: #409EFF;
|
|
|
464
|
+ color: #fff;
|
|
|
465
|
+ }
|
|
|
466
|
+
|
|
|
467
|
+ &.inactive {
|
|
|
468
|
+ background-color: #fff;
|
|
|
469
|
+ border-color: #409EFF;
|
|
|
470
|
+ color: #409EFF;
|
|
|
471
|
+ }
|
|
|
472
|
+ }
|
|
|
473
|
+}
|
|
|
474
|
+
|
|
|
475
|
+.search-form {
|
|
|
476
|
+ margin-bottom: 20px;
|
|
|
477
|
+}
|
|
|
478
|
+
|
|
|
479
|
+.export-container {
|
|
|
480
|
+ margin-bottom: 20px;
|
|
|
481
|
+}
|
|
|
482
|
+
|
|
|
483
|
+:deep(.el-table) {
|
|
|
484
|
+ .el-table__header-wrapper {
|
|
|
485
|
+ th {
|
|
|
486
|
+ background-color: #f5f7fa;
|
|
|
487
|
+ font-weight: 600;
|
|
|
488
|
+ }
|
|
|
489
|
+ }
|
|
|
490
|
+}
|
|
|
491
|
+</style>
|