Explorar o código

feat(rateList): 添加下载导入模板功能

feat: 新增开机人员年限分布API和页面功能

refactor(experienceDistributionStartupPerson): 重构年限分布页面对接后端API

refactor(dailyLuggageCheckInList): 调整上传组件结构

refactor(dailyLuggageInspectionScheduleByTime): 调整上传组件结构

feat(missedInspectionList): 完善漏检列表表单字段和选项
huoyi hai 2 días
pai
achega
033513b801

+ 19 - 0
src/api/blockingData/experienceDistributionStartupPerson.js

@@ -0,0 +1,19 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询开机人员年限分布列表全量
4
+export function getTenurelistAll(query) {
5
+  return request({
6
+    url: '/blocked/tenure/listAll',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+//修改开机人员年限分布
13
+export function editTenure(data) {
14
+  return request({
15
+    url: '/blocked/tenure/edit',
16
+    method: 'post',
17
+    data: data
18
+  })
19
+}

+ 10 - 0
src/api/blockingData/rateList.js

@@ -49,4 +49,14 @@ export function exportRate() {
49 49
     url: `/blocked/rate/export`,
50 50
     method: 'post',
51 51
   })
52
+}
53
+
54
+
55
+// 下载导入模板
56
+export function downloadTemplate() {
57
+  return request({
58
+    url: '/blocked/rate/importTemplate',
59
+    method: 'get',
60
+    responseType: 'blob'
61
+  })
52 62
 }

+ 3 - 2
src/views/blockingData/dailyLuggageCheckInList/index.vue

@@ -287,12 +287,13 @@
287 287
       <el-upload ref="uploadRef" :auto-upload="false" :on-change="handleFileChange" :show-file-list="false"
288 288
         accept=".xlsx,.xls">
289 289
         <el-button type="primary">选取文件</el-button>
290
-        <div class="el-upload__tip">只能上传xls/xlsx文件</div>
290
+        
291
+      </el-upload>
292
+      <div class="el-upload__tip">只能上传xls/xlsx文件</div>
291 293
         <div class="el-upload__tip">
292 294
           <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
293 295
             @click="importTemplate">下载模板</el-link>
294 296
         </div>
295
-      </el-upload>
296 297
       <template #footer>
297 298
         <div class="dialog-footer">
298 299
           <el-button type="primary" @click="submitImport">确 定</el-button>

+ 3 - 2
src/views/blockingData/dailyLuggageInspectionScheduleByTime/index.vue

@@ -171,12 +171,13 @@
171 171
       <el-upload ref="uploadRef" :auto-upload="false" :on-change="handleFileChange" :show-file-list="false"
172 172
         accept=".xlsx,.xls">
173 173
         <el-button type="primary">选取文件</el-button>
174
-        <div class="el-upload__tip">只能上传xls/xlsx文件</div>
174
+       
175
+      </el-upload>
176
+       <div class="el-upload__tip">只能上传xls/xlsx文件</div>
175 177
         <div class="el-upload__tip">
176 178
           <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
177 179
             @click="importTemplate">下载模板</el-link>
178 180
         </div>
179
-      </el-upload>
180 181
       <template #footer>
181 182
         <div class="dialog-footer">
182 183
           <el-button type="primary" @click="submitImport">确 定</el-button>

+ 76 - 105
src/views/blockingData/experienceDistributionStartupPerson/index.vue

@@ -1,101 +1,60 @@
1 1
 <template>
2 2
   <div class="experience-distribution">
3 3
     <h1 class="page-title">开机人员年限分布</h1>
4
-    
4
+
5 5
     <div class="table-container">
6
-      <el-table 
7
-        :data="teams" 
8
-        border 
9
-        stripe
10
-        class="distribution-table"
11
-        :header-cell-style="{ background: '#f5f7fa', color: '#606266' }"
12
-      >
13
-        <el-table-column prop="name" label="业务大队"  align="center">
6
+      <el-table :data="teams" border stripe class="distribution-table"
7
+        :header-cell-style="{ background: '#f5f7fa', color: '#606266' }">
8
+        <el-table-column prop="brigadeName" label="业务大队" align="center">
14 9
           <template #default="{ row }">
15
-            <span class="team-name">{{ row.name }}</span>
10
+            <span class="team-name">{{ row.brigadeName }}</span>
16 11
           </template>
17 12
         </el-table-column>
18
-        
19
-        <el-table-column label="5年及5年以上人员数"  align="center">
13
+
14
+        <el-table-column label="5年及5年以上人员数" align="center">
20 15
           <template #default="{ row }">
21
-            <el-input-number
22
-              v-model="row.fiveYearsPlus"
23
-              :min="0"
24
-              :controls="false"
25
-              size="small"
26
-              placeholder="0"
27
-              class="number-input"
28
-            />
16
+            <el-input-number v-model="row.cntGe5Year" :min="0" :controls="false" size="small" placeholder="0"
17
+              class="number-input" />
29 18
           </template>
30 19
         </el-table-column>
31
-        
32
-        <el-table-column label="4年人员数"  align="center">
20
+
21
+        <el-table-column label="4年人员数" align="center">
33 22
           <template #default="{ row }">
34
-            <el-input-number
35
-              v-model="row.fourYears"
36
-              :min="0"
37
-              :controls="false"
38
-              size="small"
39
-              placeholder="0"
40
-              class="number-input"
41
-            />
23
+            <el-input-number v-model="row.cnt4Years" :min="0" :controls="false" size="small" placeholder="0"
24
+              class="number-input" />
42 25
           </template>
43 26
         </el-table-column>
44
-        
45
-        <el-table-column label="3年人员数"  align="center">
27
+
28
+        <el-table-column label="3年人员数" align="center">
46 29
           <template #default="{ row }">
47
-            <el-input-number
48
-              v-model="row.threeYears"
49
-              :min="0"
50
-              :controls="false"
51
-              size="small"
52
-              placeholder="0"
53
-              class="number-input"
54
-            />
30
+            <el-input-number v-model="row.cnt3Years" :min="0" :controls="false" size="small" placeholder="0"
31
+              class="number-input" />
55 32
           </template>
56 33
         </el-table-column>
57
-        
58
-        <el-table-column label="2年人员数"  align="center">
34
+
35
+        <el-table-column label="2年人员数" align="center">
59 36
           <template #default="{ row }">
60
-            <el-input-number
61
-              v-model="row.twoYears"
62
-              :min="0"
63
-              :controls="false"
64
-              size="small"
65
-              placeholder="0"
66
-              class="number-input"
67
-            />
37
+            <el-input-number v-model="row.cnt2Years" :min="0" :controls="false" size="small" placeholder="0"
38
+              class="number-input" />
68 39
           </template>
69 40
         </el-table-column>
70
-        
71
-        <el-table-column label="1年人员数"  align="center">
41
+
42
+        <el-table-column label="1年人员数" align="center">
72 43
           <template #default="{ row }">
73
-            <el-input-number
74
-              v-model="row.oneYear"
75
-              :min="0"
76
-              :controls="false"
77
-              size="small"
78
-              placeholder="0"
79
-              class="number-input"
80
-            />
44
+            <el-input-number v-model="row.cnt1Years" :min="0" :controls="false" size="small" placeholder="0"
45
+              class="number-input" />
81 46
           </template>
82 47
         </el-table-column>
83
-        
48
+
84 49
         <el-table-column label="不足1年人员数" width="130" align="center">
85 50
           <template #default="{ row }">
86
-            <el-input-number
87
-              v-model="row.lessThanOneYear"
88
-              :min="0"
89
-              :controls="false"
90
-              size="small"
91
-              placeholder="0"
92
-              class="number-input"
93
-            />
51
+            <el-input-number v-model="row.cntLt1Year" :min="0" :controls="false" size="small" placeholder="0"
52
+              class="number-input" />
94 53
           </template>
95 54
         </el-table-column>
96 55
       </el-table>
97 56
     </div>
98
-    
57
+
99 58
     <div class="button-container">
100 59
       <el-button type="primary" size="medium" @click="handleConfirm" class="confirm-button">确定</el-button>
101 60
     </div>
@@ -103,48 +62,60 @@
103 62
 </template>
104 63
 
105 64
 <script>
65
+import { getTenurelistAll, editTenure } from '@/api/blockingData/experienceDistributionStartupPerson'
106 66
 export default {
107 67
   name: 'ExperienceDistributionStartupPerson',
108 68
   data() {
109 69
     return {
110
-      teams: [
111
-        {
112
-          id: 1,
113
-          name: '安检一大队',
114
-          fiveYearsPlus: 0,
115
-          fourYears: 0,
116
-          threeYears: 0,
117
-          twoYears: 0,
118
-          oneYear: 0,
119
-          lessThanOneYear: 0
120
-        },
121
-        {
122
-          id: 2,
123
-          name: '安检二大队',
124
-          fiveYearsPlus: 0,
125
-          fourYears: 0,
126
-          threeYears: 0,
127
-          twoYears: 0,
128
-          oneYear: 0,
129
-          lessThanOneYear: 0
130
-        },
131
-        {
132
-          id: 3,
133
-          name: '安检三大队',
134
-          fiveYearsPlus: 0,
135
-          fourYears: 0,
136
-          threeYears: 0,
137
-          twoYears: 0,
138
-          oneYear: 0,
139
-          lessThanOneYear: 0
140
-        }
141
-      ]
70
+      teams: []
142 71
     }
143 72
   },
73
+  mounted() {
74
+    this.fetchData()
75
+  },
144 76
   methods: {
145
-    handleConfirm() {
146
-      console.log('提交数据:', this.teams)
147
-      this.$message.success('数据提交成功!')
77
+    async fetchData() {
78
+      try {
79
+        const response = await getTenurelistAll()
80
+        if (response.code === 200) {
81
+          this.teams = response.data || []
82
+        } else {
83
+          this.$message.error('获取数据失败:' + response.msg)
84
+        }
85
+      } catch (error) {
86
+        console.error('获取数据失败:', error)
87
+        this.$message.error('获取数据失败')
88
+      }
89
+    },
90
+    async handleConfirm() {
91
+      try {
92
+        const savePromises = this.teams.map(row => {
93
+          const saveData = {
94
+            id: row.id,
95
+            brigadeId: row.brigadeId,
96
+            brigadeName: row.brigadeName,
97
+            cntGe5Year: row.cntGe5Year || 0,
98
+            cnt4Years: row.cnt4Years || 0,
99
+            cnt3Years: row.cnt3Years || 0,
100
+            cnt2Years: row.cnt2Years || 0,
101
+            cnt1Years: row.cnt1Years || 0,
102
+            cntLt1Year: row.cntLt1Year || 0
103
+          }
104
+          return editTenure(saveData)
105
+        })
106
+        
107
+        const results = await Promise.all(savePromises)
108
+        const allSuccess = results.every(result => result.code === 200)
109
+        
110
+        if (allSuccess) {
111
+          this.$message.success('数据保存成功!')
112
+        } else {
113
+          this.$message.error('部分数据保存失败,请检查后重试')
114
+        }
115
+      } catch (error) {
116
+        console.error('保存数据失败:', error)
117
+        this.$message.error('保存数据失败')
118
+      }
148 119
     }
149 120
   }
150 121
 }

+ 115 - 25
src/views/blockingData/missedInspectionList/index.vue

@@ -118,8 +118,10 @@
118 118
             </el-form-item>
119 119
           </el-col>
120 120
           <el-col :span="12">
121
-            <el-form-item label="区域" prop="areaName">
122
-              <el-input v-model="form.areaName" placeholder="请输入区域" />
121
+            <el-form-item label="区域" prop="areaId">
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" />
124
+              </el-select>
123 125
             </el-form-item>
124 126
           </el-col>
125 127
         </el-row>
@@ -141,25 +143,33 @@
141 143
         <el-row :gutter="20">
142 144
           <el-col :span="12">
143 145
             <el-form-item label="漏检时间" prop="missCheckTime">
144
-              <el-input v-model="form.missCheckTime" placeholder="请输入漏检时间" />
146
+              <el-time-picker v-model="form.missCheckTime" placeholder="请选择漏检时间" value-format="HH:mm"
147
+                style="width: 100%" />
145 148
             </el-form-item>
146 149
           </el-col>
147 150
           <el-col :span="12">
148 151
             <el-form-item label="漏检时间段" prop="missCheckTimePeriod">
149
-              <el-input v-model="form.missCheckTimePeriod" placeholder="请输入漏检时间段" />
152
+              <el-select v-model="form.missCheckTimePeriod" placeholder="请选择漏检时间段" style="width: 100%">
153
+                <el-option v-for="item in blocked_time_period" :key="item.value" :label="item.label"
154
+                  :value="item.value" />
155
+              </el-select>
150 156
             </el-form-item>
151 157
           </el-col>
152 158
         </el-row>
153 159
         <el-row :gutter="20">
154 160
           <el-col :span="12">
155
-            <el-form-item label="上岗位置" prop="channelName">
156
-              <el-input v-model="form.channelName" placeholder="请输入上岗位置" />
161
+            <el-form-item label="上岗位置" prop="channelId">
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" />
165
+              </el-select>
157 166
             </el-form-item>
158 167
           </el-col>
159 168
           <el-col :span="12">
160 169
             <el-form-item label="分管主管" prop="supervisorId">
161 170
               <el-select v-model="form.supervisorId" placeholder="请选择分管主管" style="width: 100%">
162
-                <el-option v-for="item in supervisorOptions" :key="item.value" :label="item.label" :value="item.value" />
171
+                <el-option v-for="item in supervisorOptions" :key="item.value" :label="item.label"
172
+                  :value="item.value" />
163 173
               </el-select>
164 174
             </el-form-item>
165 175
           </el-col>
@@ -168,14 +178,16 @@
168 178
           <el-col :span="12">
169 179
             <el-form-item label="代管主管" prop="actingSupervisorId">
170 180
               <el-select v-model="form.actingSupervisorId" placeholder="请选择代管主管" style="width: 100%">
171
-                <el-option v-for="item in supervisorOptions" :key="item.value" :label="item.label" :value="item.value" />
181
+                <el-option v-for="item in supervisorOptions" :key="item.value" :label="item.label"
182
+                  :value="item.value" />
172 183
               </el-select>
173 184
             </el-form-item>
174 185
           </el-col>
175 186
           <el-col :span="12">
176 187
             <el-form-item label="分管班组长" prop="teamLeaderId">
177 188
               <el-select v-model="form.teamLeaderId" placeholder="请选择分管班组长" style="width: 100%">
178
-                <el-option v-for="item in teamLeaderOptions" :key="item.value" :label="item.label" :value="item.value" />
189
+                <el-option v-for="item in teamLeaderOptions" :key="item.value" :label="item.label"
190
+                  :value="item.value" />
179 191
               </el-select>
180 192
             </el-form-item>
181 193
           </el-col>
@@ -183,7 +195,10 @@
183 195
         <el-row :gutter="20">
184 196
           <el-col :span="12">
185 197
             <el-form-item label="物品位置" prop="itemLocation">
186
-              <el-input v-model="form.itemLocation" placeholder="请输入物品位置" />
198
+              <el-select v-model="form.itemLocation" placeholder="请选择物品位置" style="width: 100%">
199
+                <el-option v-for="item in blocked_item_position" :key="item.value" :label="item.label"
200
+                  :value="item.value" />
201
+              </el-select>
187 202
             </el-form-item>
188 203
           </el-col>
189 204
           <el-col :span="12">
@@ -206,7 +221,8 @@
206 221
           <el-col :span="12">
207 222
             <el-form-item label="判别类型" prop="discriminationType">
208 223
               <el-select v-model="form.discriminationType" placeholder="请选择判别类型" style="width: 100%">
209
-                <el-option v-for="item in discrimination_type" :key="item.value" :label="item.label" :value="item.value" />
224
+                <el-option v-for="item in discrimination_type" :key="item.value" :label="item.label"
225
+                  :value="item.value" />
210 226
               </el-select>
211 227
             </el-form-item>
212 228
           </el-col>
@@ -222,18 +238,17 @@
222 238
           </el-col>
223 239
           <el-col :span="12">
224 240
             <el-form-item label="开机年限" prop="machineOperatingYears">
225
-              <el-input v-model="form.machineOperatingYears" placeholder="请输入开机年限" />
241
+              <el-select v-model="form.machineOperatingYears" placeholder="请选择开机年限" style="width: 100%">
242
+                <el-option v-for="item in blocked_operating_years" :key="item.value" :label="item.label"
243
+                  :value="item.value" />
244
+              </el-select>
226 245
             </el-form-item>
227 246
           </el-col>
228 247
         </el-row>
229 248
         <el-row :gutter="20">
230 249
           <el-col :span="12">
231 250
             <el-form-item label="证书级别" prop="certificateLevel">
232
-              <el-select v-model="form.certificateLevel" placeholder="请选择证书级别" style="width: 100%">
233
-                <el-option label="初级" value="初级" />
234
-                <el-option label="中级" value="中级" />
235
-                <el-option label="高级" value="高级" />
236
-              </el-select>
251
+              <el-input v-model="form.certificateLevel" placeholder="请输入证书级别" />
237 252
             </el-form-item>
238 253
           </el-col>
239 254
           <el-col :span="12">
@@ -248,12 +263,18 @@
248 263
         <el-row :gutter="20">
249 264
           <el-col :span="12">
250 265
             <el-form-item label="漏检原因分类" prop="missCheckReasonCategory">
251
-              <el-input v-model="form.missCheckReasonCategory" placeholder="请输入漏检原因分类" />
266
+              <el-select v-model="form.missCheckReasonCategory" placeholder="请选择漏检原因分类" style="width: 100%">
267
+                <el-option v-for="item in blocked_miss_check_reason" :key="item.value" :label="item.label"
268
+                  :value="item.value" />
269
+              </el-select>
252 270
             </el-form-item>
253 271
           </el-col>
254 272
           <el-col :span="12">
255 273
             <el-form-item label="月考成绩" prop="monthlyAssessment">
256
-              <el-input v-model="form.monthlyAssessment" placeholder="请输入月考成绩" />
274
+              <el-select v-model="form.monthlyAssessment" placeholder="请选择月考成绩" style="width: 100%">
275
+                <el-option v-for="item in blocked_monthly_exam_result" :key="item.value" :label="item.label"
276
+                  :value="item.value" />
277
+              </el-select>
257 278
             </el-form-item>
258 279
           </el-col>
259 280
         </el-row>
@@ -286,12 +307,13 @@
286 307
       <el-upload ref="uploadRef" :auto-upload="false" :on-change="handleFileChange" :show-file-list="false"
287 308
         accept=".xlsx,.xls">
288 309
         <el-button type="primary">选取文件</el-button>
289
-        <div class="el-upload__tip">只能上传xls/xlsx文件</div>
290
-        <div class="el-upload__tip">
291
-          <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
292
-            @click="importTemplate">下载模板</el-link>
293
-        </div>
310
+
294 311
       </el-upload>
312
+      <div class="el-upload__tip">只能上传xls/xlsx文件</div>
313
+      <div class="el-upload__tip">
314
+        <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
315
+          @click="importTemplate">下载模板</el-link>
316
+      </div>
295 317
       <template #footer>
296 318
         <div class="dialog-footer">
297 319
           <el-button type="primary" @click="submitImport">确 定</el-button>
@@ -304,6 +326,7 @@
304 326
 
305 327
 <script setup>
306 328
 import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
329
+import { listPosition } from '@/api/system/position'
307 330
 import { listMissedInspection, getMissedInspection, delMissedInspection, addMissedInspection, updateMissedInspection, exportMissedInspection, downloadTemplate } from '@/api/blockingData/missedInspection'
308 331
 import { listDept } from '@/api/system/dept'
309 332
 import { listUser } from '@/api/system/user'
@@ -358,7 +381,7 @@ const rules = {
358 381
 }
359 382
 
360 383
 // 字典数据
361
-const { discrimination_type } = useDict('discrimination_type')
384
+const { discrimination_type, blocked_time_period, blocked_item_position, blocked_monthly_exam_result, blocked_operating_years, blocked_miss_check_reason } = useDict('discrimination_type', 'blocked_time_period', 'blocked_item_position', 'blocked_monthly_exam_result', 'blocked_operating_years', 'blocked_miss_check_reason')
362 385
 
363 386
 // 大队选项
364 387
 const brigadeOptions = ref([])
@@ -368,7 +391,23 @@ const personOptions = ref([])
368 391
 const teamLeaderOptions = ref([])
369 392
 // 主管选项
370 393
 const supervisorOptions = ref([])
394
+// 区域选项
395
+const areaOptions = ref([])
396
+// 上岗位置选项
397
+const channelOptions = ref([])
398
+
399
+/** 获取职位列表 */
400
+function getPositionList() {
401
+  // 获取区域选项
402
+  listPosition({ positionType: 'REGIONAL' }).then(response => {
403
+    areaOptions.value = response.data || []
404
+  })
371 405
 
406
+  // 获取上岗位置选项
407
+  listPosition({ positionType: 'TERMINL' }).then(response => {
408
+    channelOptions.value = response.data || []
409
+  })
410
+}
372 411
 
373 412
 /** 查询漏检列表 */
374 413
 function getList() {
@@ -427,11 +466,13 @@ function reset() {
427 466
   Object.assign(form, {
428 467
     id: null,
429 468
     brigadeId: null,
469
+    areaId: null,
430 470
     areaName: null,
431 471
     reviewedUserId: null,
432 472
     reviewDate: null,
433 473
     missCheckTime: null,
434 474
     missCheckTimePeriod: null,
475
+    channelId: null,
435 476
     channelName: null,
436 477
     supervisorId: null,
437 478
     actingSupervisorId: null,
@@ -494,6 +535,54 @@ function handleUpdate(row) {
494 535
 function submitForm() {
495 536
   proxy.$refs.missedInspectionRef.validate(valid => {
496 537
     if (valid) {
538
+      // 处理大队ID和名称映射
539
+      if (form.brigadeId) {
540
+        const brigade = brigadeOptions.value.find(item => item.value === form.brigadeId)
541
+        form.brigadeName = brigade ? brigade.label : null
542
+      }
543
+
544
+      // 处理区域ID和名称映射
545
+      if (form.areaId) {
546
+        const area = areaOptions.value.find(item => item.positionId === form.areaId)
547
+        form.areaName = area ? area.positionName : null
548
+      }
549
+
550
+      // 处理被回查人ID和名称映射
551
+      if (form.reviewedUserId) {
552
+        const reviewedUser = personOptions.value.find(item => item.value === form.reviewedUserId)
553
+        form.reviewedUserName = reviewedUser ? reviewedUser.label : null
554
+      }
555
+
556
+      // 处理上岗位置ID和名称映射
557
+      if (form.channelId) {
558
+        const channel = channelOptions.value.find(item => item.positionId === form.channelId)
559
+        form.channelName = channel ? channel.positionName : null
560
+      }
561
+
562
+      // 处理分管主管ID和名称映射
563
+      if (form.supervisorId) {
564
+        const supervisor = supervisorOptions.value.find(item => item.value === form.supervisorId)
565
+        form.supervisorName = supervisor ? supervisor.label : null
566
+      }
567
+
568
+      // 处理代管主管ID和名称映射
569
+      if (form.actingSupervisorId) {
570
+        const actingSupervisor = supervisorOptions.value.find(item => item.value === form.actingSupervisorId)
571
+        form.actingSupervisorName = actingSupervisor ? actingSupervisor.label : null
572
+      }
573
+
574
+      // 处理分管班组长ID和名称映射
575
+      if (form.teamLeaderId) {
576
+        const teamLeader = teamLeaderOptions.value.find(item => item.value === form.teamLeaderId)
577
+        form.teamLeaderName = teamLeader ? teamLeader.label : null
578
+      }
579
+
580
+      // 处理回查人ID和名称映射
581
+      if (form.reviewUserId) {
582
+        const reviewUser = personOptions.value.find(item => item.value === form.reviewUserId)
583
+        form.reviewUserName = reviewUser ? reviewUser.label : null
584
+      }
585
+
497 586
       if (form.id != null) {
498 587
         updateMissedInspection(form).then(response => {
499 588
           proxy.$modal.msgSuccess('修改成功')
@@ -564,6 +653,7 @@ onMounted(() => {
564 653
   getList()
565 654
   getDeptList()
566 655
   getUserList()
656
+  getPositionList()
567 657
 })
568 658
 </script>
569 659
 

+ 10 - 1
src/views/blockingData/rateList/index.vue

@@ -149,6 +149,10 @@
149 149
         accept=".xlsx,.xls">
150 150
         <el-button type="primary">选取文件</el-button>
151 151
         <div class="el-upload__tip">只能上传xls/xlsx文件</div>
152
+        <div class="el-upload__tip">
153
+          <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
154
+            @click="importTemplate">下载模板</el-link>
155
+        </div>
152 156
       </el-upload>
153 157
       <template #footer>
154 158
         <div class="dialog-footer">
@@ -162,7 +166,7 @@
162 166
 
163 167
 <script setup>
164 168
 import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
165
-import { listRate, getRate, delRate, addRate, updateRate, exportRate } from '@/api/blockingData/rateList'
169
+import { listRate, getRate, delRate, addRate, updateRate, exportRate,downloadTemplate } from '@/api/blockingData/rateList'
166 170
 import { listDept } from '@/api/system/dept'
167 171
 
168 172
 const { proxy } = getCurrentInstance()
@@ -316,6 +320,11 @@ function handleFileChange(file) {
316 320
   importFile.value = file.raw
317 321
 }
318 322
 
323
+/** 下载模板操作 */
324
+function importTemplate() {
325
+  proxy.download('rateList/importTemplate', {}, `rate_list_template_${new Date().getTime()}.xlsx`)
326
+}
327
+
319 328
 function submitImport() {
320 329
   if (!importFile.value) {
321 330
     proxy.$modal.msgWarning('请选择要导入的文件')