|
|
@@ -3,7 +3,62 @@
|
|
3
|
3
|
<div class="screen-header">
|
|
4
|
4
|
<div class="header-title">盛世鹰眸质控系统【查堵】(安检站)</div>
|
|
5
|
5
|
</div>
|
|
6
|
|
-
|
|
|
6
|
+
|
|
|
7
|
+ <div class="filter-section">
|
|
|
8
|
+ <div class="filter-row">
|
|
|
9
|
+ <div class="filter-item">
|
|
|
10
|
+ <span class="filter-label">日期:</span>
|
|
|
11
|
+ <el-date-picker v-model="filterParams.dateRange" type="daterange" range-separator="-" start-placeholder="开始日期"
|
|
|
12
|
+ end-placeholder="结束日期" value-format="YYYY-MM-DD HH:mm:ss" :default-time="defaultTime"
|
|
|
13
|
+ style="width: 280px" />
|
|
|
14
|
+ </div>
|
|
|
15
|
+
|
|
|
16
|
+ <div class="filter-item">
|
|
|
17
|
+ <span class="filter-label">分管主管:</span>
|
|
|
18
|
+ <el-select v-model="filterParams.supervisor" placeholder="请选择主管" filterable clearable style="width: 200px">
|
|
|
19
|
+ <el-option v-for="item in supervisorOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
20
|
+ </el-select>
|
|
|
21
|
+ </div>
|
|
|
22
|
+
|
|
|
23
|
+ <div class="filter-item">
|
|
|
24
|
+ <span class="filter-label">分管班组长:</span>
|
|
|
25
|
+ <el-select v-model="filterParams.teamLeader" placeholder="请选择班组长" filterable clearable style="width: 200px">
|
|
|
26
|
+ <el-option v-for="item in teamLeaderOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
27
|
+ </el-select>
|
|
|
28
|
+ </div>
|
|
|
29
|
+ <div class="filter-item">
|
|
|
30
|
+ <span class="filter-label">区域:</span>
|
|
|
31
|
+ <el-select v-model="filterParams.area" placeholder="请选择区域" clearable style="width: 200px">
|
|
|
32
|
+ <el-option label="整体" value="整体" />
|
|
|
33
|
+ <el-option label="T1" value="T1" />
|
|
|
34
|
+ <el-option label="T2" value="T2" />
|
|
|
35
|
+ </el-select>
|
|
|
36
|
+ </div>
|
|
|
37
|
+
|
|
|
38
|
+ <div class="filter-item">
|
|
|
39
|
+ <span class="filter-label">漏检物品:</span>
|
|
|
40
|
+ <el-select v-model="filterParams.missedItem" placeholder="请选择漏检物品" clearable style="width: 200px">
|
|
|
41
|
+ <el-option v-for="item in missedItemOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
42
|
+ </el-select>
|
|
|
43
|
+ </div>
|
|
|
44
|
+ <div class="filter-item">
|
|
|
45
|
+ <span class="filter-label">分大队:</span>
|
|
|
46
|
+ <el-select v-model="filterParams.brigade" placeholder="请选择大队" clearable style="width: 200px">
|
|
|
47
|
+ <el-option label="全站" value="全站" />
|
|
|
48
|
+ <el-option label="安检一大队" value="安检一大队" />
|
|
|
49
|
+ <el-option label="安检二大队" value="安检二大队" />
|
|
|
50
|
+ <el-option label="安检三大队" value="安检三大队" />
|
|
|
51
|
+ </el-select>
|
|
|
52
|
+ </div>
|
|
|
53
|
+ <div class="filter-actions">
|
|
|
54
|
+ <el-button type="primary" @click="handleFilter">查询</el-button>
|
|
|
55
|
+ <el-button @click="resetFilter">重置</el-button>
|
|
|
56
|
+ </div>
|
|
|
57
|
+ </div>
|
|
|
58
|
+
|
|
|
59
|
+
|
|
|
60
|
+ </div>
|
|
|
61
|
+
|
|
7
|
62
|
<div class="screen-content">
|
|
8
|
63
|
<div class="grid-layout">
|
|
9
|
64
|
<div class="grid-item">
|
|
|
@@ -24,10 +79,91 @@
|
|
24
|
79
|
</template>
|
|
25
|
80
|
|
|
26
|
81
|
<script setup>
|
|
|
82
|
+import { ref, reactive, onMounted } from 'vue'
|
|
|
83
|
+import { listDept } from '@/api/system/dept'
|
|
27
|
84
|
import ModuleOne from './components/ModuleOne.vue'
|
|
28
|
85
|
import ModuleTwo from './components/ModuleTwo.vue'
|
|
29
|
86
|
import ModuleThree from './components/ModuleThree.vue'
|
|
30
|
87
|
import ModuleFour from './components/ModuleFour.vue'
|
|
|
88
|
+
|
|
|
89
|
+// 默认时间设置
|
|
|
90
|
+const defaultTime = [
|
|
|
91
|
+ new Date(2000, 1, 1, 0, 0, 0),
|
|
|
92
|
+ new Date(2000, 1, 1, 23, 59, 59)
|
|
|
93
|
+]
|
|
|
94
|
+
|
|
|
95
|
+// 筛选参数
|
|
|
96
|
+const filterParams = reactive({
|
|
|
97
|
+ dateRange: [],
|
|
|
98
|
+ supervisor: '',
|
|
|
99
|
+ teamLeader: '',
|
|
|
100
|
+ area: '',
|
|
|
101
|
+ missedItem: '',
|
|
|
102
|
+ brigade: ''
|
|
|
103
|
+})
|
|
|
104
|
+
|
|
|
105
|
+// 选项数据
|
|
|
106
|
+const supervisorOptions = ref([])
|
|
|
107
|
+const teamLeaderOptions = ref([])
|
|
|
108
|
+const missedItemOptions = ref([
|
|
|
109
|
+ { label: '物品A', value: '1' },
|
|
|
110
|
+ { label: '物品B', value: '2' },
|
|
|
111
|
+ { label: '物品C', value: '3' }
|
|
|
112
|
+])
|
|
|
113
|
+
|
|
|
114
|
+// 获取所有用户数据并筛选主管和班组长
|
|
|
115
|
+const fetchUserData = async () => {
|
|
|
116
|
+ try {
|
|
|
117
|
+ listDept({}).then(response => {
|
|
|
118
|
+ const deptList = response.data || []
|
|
|
119
|
+
|
|
|
120
|
+ teamLeaderOptions.value = deptList.filter(item => item.deptType === 'TEAMS').map(item => ({
|
|
|
121
|
+ value: item.deptId,
|
|
|
122
|
+ label: item.deptName
|
|
|
123
|
+ }))
|
|
|
124
|
+ supervisorOptions.value = deptList.filter(item => item.deptType === 'MANAGER').map(item => ({
|
|
|
125
|
+ value: item.deptId,
|
|
|
126
|
+ label: item.deptName
|
|
|
127
|
+ }))
|
|
|
128
|
+ })
|
|
|
129
|
+ } catch (error) {
|
|
|
130
|
+ console.error('获取用户数据失败:', error)
|
|
|
131
|
+ }
|
|
|
132
|
+}
|
|
|
133
|
+
|
|
|
134
|
+// 设置默认日期范围(从年初1月1日到现在)
|
|
|
135
|
+const setDefaultDateRange = () => {
|
|
|
136
|
+ const now = new Date()
|
|
|
137
|
+ const startOfYear = new Date(now.getFullYear(), 0, 1, 0, 0, 0)
|
|
|
138
|
+ const endOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59)
|
|
|
139
|
+
|
|
|
140
|
+ filterParams.dateRange = [startOfYear, endOfToday]
|
|
|
141
|
+}
|
|
|
142
|
+
|
|
|
143
|
+// 处理筛选
|
|
|
144
|
+const handleFilter = () => {
|
|
|
145
|
+ console.log('筛选参数:', filterParams)
|
|
|
146
|
+ // 这里可以调用API或更新图表数据
|
|
|
147
|
+}
|
|
|
148
|
+
|
|
|
149
|
+// 重置筛选
|
|
|
150
|
+const resetFilter = () => {
|
|
|
151
|
+ Object.assign(filterParams, {
|
|
|
152
|
+ dateRange: [],
|
|
|
153
|
+ supervisor: '',
|
|
|
154
|
+ teamLeader: '',
|
|
|
155
|
+ area: '',
|
|
|
156
|
+ missedItem: '',
|
|
|
157
|
+ brigade: ''
|
|
|
158
|
+ })
|
|
|
159
|
+ setDefaultDateRange()
|
|
|
160
|
+}
|
|
|
161
|
+
|
|
|
162
|
+// 组件挂载时设置默认日期和获取用户数据
|
|
|
163
|
+onMounted(() => {
|
|
|
164
|
+ setDefaultDateRange()
|
|
|
165
|
+ fetchUserData()
|
|
|
166
|
+})
|
|
31
|
167
|
</script>
|
|
32
|
168
|
|
|
33
|
169
|
<style lang="less" scoped>
|
|
|
@@ -46,7 +182,7 @@ import ModuleFour from './components/ModuleFour.vue'
|
|
46
|
182
|
align-items: center;
|
|
47
|
183
|
justify-content: space-between;
|
|
48
|
184
|
padding: 0 30px;
|
|
49
|
|
-
|
|
|
185
|
+
|
|
50
|
186
|
// border-bottom: 2px solid rgba(112, 207, 231, 0.5);
|
|
51
|
187
|
}
|
|
52
|
188
|
|
|
|
@@ -57,10 +193,42 @@ import ModuleFour from './components/ModuleFour.vue'
|
|
57
|
193
|
// text-shadow: 0 0 10px rgba(112, 207, 231, 0.5);
|
|
58
|
194
|
}
|
|
59
|
195
|
|
|
|
196
|
+.filter-section {
|
|
|
197
|
+ // background: #f8f9fa;
|
|
|
198
|
+ padding: 20px 30px;
|
|
|
199
|
+ border-bottom: 1px solid #e8e8e8;
|
|
|
200
|
+}
|
|
60
|
201
|
|
|
|
202
|
+.filter-row {
|
|
|
203
|
+ display: flex;
|
|
|
204
|
+ align-items: center;
|
|
|
205
|
+ gap: 20px;
|
|
|
206
|
+ margin-bottom: 15px;
|
|
|
207
|
+
|
|
|
208
|
+ &:last-child {
|
|
|
209
|
+ margin-bottom: 0;
|
|
|
210
|
+ }
|
|
|
211
|
+}
|
|
61
|
212
|
|
|
|
213
|
+.filter-item {
|
|
|
214
|
+ display: flex;
|
|
|
215
|
+ align-items: center;
|
|
|
216
|
+ gap: 8px;
|
|
|
217
|
+}
|
|
62
|
218
|
|
|
|
219
|
+.filter-label {
|
|
|
220
|
+ font-size: 14px;
|
|
|
221
|
+ color: #606266;
|
|
|
222
|
+ font-weight: 500;
|
|
|
223
|
+ white-space: nowrap;
|
|
|
224
|
+}
|
|
63
|
225
|
|
|
|
226
|
+.filter-actions {
|
|
|
227
|
+ display: flex;
|
|
|
228
|
+ align-items: center;
|
|
|
229
|
+ gap: 10px;
|
|
|
230
|
+ margin-left: auto;
|
|
|
231
|
+}
|
|
64
|
232
|
|
|
65
|
233
|
.screen-content {
|
|
66
|
234
|
flex: 1;
|
|
|
@@ -76,7 +244,6 @@ import ModuleFour from './components/ModuleFour.vue'
|
|
76
|
244
|
}
|
|
77
|
245
|
|
|
78
|
246
|
.grid-item {
|
|
79
|
|
-
|
|
80
|
247
|
width: 100%;
|
|
81
|
248
|
}
|
|
82
|
249
|
</style>
|