Pārlūkot izejas kodu

feat(blockingData): 增加筛选功能并调整样式

- 在数据大屏页面添加日期、主管、班组长等筛选条件
- 调整模块标题和图表标题的字体大小、颜色和对齐方式
- 修改漏检列表中的区域选择器和时间选择器配置
huoyi 2 dienas atpakaļ
vecāks
revīzija
88ec76b6d1

+ 1 - 1
src/views/blockingData/blockingDataScreen/components/ModuleContainer.vue

@@ -43,7 +43,7 @@ defineProps({
43 43
 }
44 44
 
45 45
 .module-title {
46
-  font-size: 20px;
46
+  font-size: 27px;
47 47
   font-weight: 600;
48 48
   color: #2E75B6;
49 49
   text-align: center;

+ 3 - 3
src/views/blockingData/blockingDataScreen/components/ModuleFour.vue

@@ -202,10 +202,10 @@ onMounted(() => {
202 202
 }
203 203
 
204 204
 .chart-title {
205
-  font-size: 12px;
206
-  color: #333;
205
+  font-size: 17px;
206
+  color: black;
207 207
   margin-bottom: 5px;
208
-  text-align: center;
208
+  text-align: left;
209 209
 }
210 210
 
211 211
 .echarts {

+ 4 - 5
src/views/blockingData/blockingDataScreen/components/ModuleOne.vue

@@ -553,11 +553,10 @@ onMounted(() => {
553 553
 }
554 554
 
555 555
 .chart-title {
556
-  font-size: 12px;
557
-  color: #333;
558
-  margin-bottom: 8px;
559
-  text-align: center;
560
-  font-weight: 500;
556
+  font-size: 17px;
557
+  color: black;
558
+  margin-bottom: 5px;
559
+  text-align: left;
561 560
 }
562 561
 
563 562
 .echarts {

+ 4 - 5
src/views/blockingData/blockingDataScreen/components/ModuleThree.vue

@@ -83,11 +83,10 @@ onMounted(() => {
83 83
 }
84 84
 
85 85
 .chart-title {
86
-  font-size: 12px;
87
-  color: #333;
88
-  margin-bottom: 8px;
89
-  text-align: center;
90
-  font-weight: 500;
86
+ font-size: 17px;
87
+  color: black;
88
+  margin-bottom: 5px;
89
+  text-align: left;
91 90
 }
92 91
 
93 92
 .echarts {

+ 170 - 3
src/views/blockingData/blockingDataScreen/index.vue

@@ -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>

+ 4 - 4
src/views/blockingData/missedInspectionList/index.vue

@@ -120,7 +120,7 @@
120 120
           <el-col :span="12">
121 121
             <el-form-item label="区域" prop="areaId">
122 122
               <el-select v-model="form.areaId" placeholder="请选择区域" style="width: 100%">
123
-                <el-option v-for="item in areaOptions" :key="item.code" :label="item.name" :value="item.positionId" />
123
+                <el-option v-for="item in areaOptions" :key="item.id" :label="item.name" :value="item.id" />
124 124
               </el-select>
125 125
             </el-form-item>
126 126
           </el-col>
@@ -143,7 +143,7 @@
143 143
         <el-row :gutter="20">
144 144
           <el-col :span="12">
145 145
             <el-form-item label="漏检时间" prop="missCheckTime">
146
-              <el-time-picker v-model="form.missCheckTime" placeholder="请选择漏检时间" value-format="HH:mm"
146
+              <el-date-picker v-model="form.missCheckTime" type="datetime" placeholder="请选择漏检时间" value-format="YYYY-MM-DD HH:mm"
147 147
                 style="width: 100%" />
148 148
             </el-form-item>
149 149
           </el-col>
@@ -160,8 +160,8 @@
160 160
           <el-col :span="12">
161 161
             <el-form-item label="上岗位置" prop="channelId">
162 162
               <el-select v-model="form.channelId" placeholder="请选择上岗位置" style="width: 100%">
163
-                <el-option v-for="item in channelOptions" :key="item.code" :label="item.name"
164
-                  :value="item.positionId" />
163
+                <el-option v-for="item in channelOptions" :key="item.id" :label="item.name"
164
+                  :value="item.id" />
165 165
               </el-select>
166 166
             </el-form-item>
167 167
           </el-col>