车间能级提升-智能设备管理系统
baoshiwei
2025-06-27 88e10f5656a0ad5530a9e37892fb327153d9dc8a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
<route lang="json5" type="page">
{
  layout: 'default',
  needLogin: true,
  style: { navigationBarTitleText: '保养工单', navigationStyle: 'custom' },
}
</route>
 
<template>
  <z-paging
    ref="paging"
    v-model="dataList"
    @query="queryList"
    :auto="false"
    refresher-only
    show-refresher-update-time
  >
    <template #top>
      <wd-navbar
        title="保养工单"
        left-arrow
        @click-left="goBack"
        right-text="提交"
        @click-right="handleClickRight"
        custom-style="background: #4D80F0;"
        safeAreaInsetTop
      >
        <template #right>
          <text v-if="maintSt.status === '0'" class="text-white">提交</text>
        </template>
      </wd-navbar>
      <wd-cell>
        <template #title>
          <text class="text-color-gray">设备</text>
        </template>
      </wd-cell>
      <view class="h-[2px] w-full bg-base"></view>
      <wd-card type="rectangle">
        <template #title>
          <view class="flex justify-between">
            <view class="items-center menu-title-box">
 
              <view class="flex justify-center ml-1 items-center align-center">
                <view class="menu-indicator"></view>
                <view class="ml-1"> {{ maintSt.equName }} </view>
              </view>
              <view class="text-color-gray ml-2 text-xs">{{ maintSt.assetNo }}</view>
            </view>
 
            <view class="flex items-center">
              <text class="text-color-gray text-sm">{{ maintSt.planTime }}</text>
            </view>
          </view>
        </template>
        <view class="flex" items-center>
          <image class="slot-img text-center" src="/static/images/camera.png" />
          <view class="flex-1">
            <view class="text-color-gray text-sm mt-1 flex">
              <text class="mr-3">工单总数: {{ maintSt.orderCount }}</text>
              |
              <text class="mx-3">已完成: {{ maintSt.dyzCount }}</text>
              |
              <text class="mx-3">待保养: {{ maintSt.dbyCount }}</text>
            </view>
<!--            <view class="text-color-gray text-sm mt-2 flex">-->
<!--              <text class="mr-3">待保养: {{ maintSt.dbyCount }}</text>-->
<!--              |-->
<!--              <text class="mx-3">保养中: {{ maintSt.byCount }}</text>-->
<!--&lt;!&ndash;              |&ndash;&gt;-->
<!--&lt;!&ndash;              <text class="ml-3">待验证: {{ maintSt.dyzCount }}</text>&ndash;&gt;-->
<!--            </view>-->
            <view class="text-color-gray text-sm mt-2 flex">
              <text>状态:</text>
              <template v-if="maintSt.status === '1'">
                <wd-icon class="icon-color-success" name="check-outline" size="34rpx"></wd-icon>
                <text class="ml-1">已完成</text>
              </template>
              <template v-else-if="maintSt.status === '2'">
                <wd-icon class="icon-color-warning" name="check-outline" size="34rpx"></wd-icon>
                <text class="ml-1">已确认</text>
              </template>
              <template v-else>
                <wd-icon class="icon-color-base" name="detection" size="40rpx"></wd-icon>
                <text class="ml-1">进行中</text>
              </template>
            </view>
 
            <view class="text-color-gray text-sm mt-2 flex">
              创建时间: {{ maintSt.createTime }}
            </view>
          </view>
        </view>
      </wd-card>
    </template>
 
    <view class="bg-base">
      <view class="w-full h-[24rpx]"></view>
      <wd-cell class="mb-[2px]">
        <template #title>
          <text class="text-color-gray text-sm">保养项</text>
        </template>
      </wd-cell>
 
      <wd-card type="rectangle" v-for="(item, index) in dataList" :key="item.id" :class="['status-' + item.maintFun]">
        <template #title>
          <view class="flex items-center">
            <view class="menu-indicator"></view>
            <view class="ml-1 text-sm align-center">
              <wd-text color="black" :text="item.maintName"></wd-text>
            </view>
            <!-- 新增状态显示,绑定点击事件 -->
            <view
              v-if="item.status === '2'"
              class="ml-auto text-sm"
              style="width: 60px; text-align: end"
              :style="{ color: getStatusColor(item.maintFun) }"
              @click.stop="handleUndoAction(item)"
            >
              {{ getStatusText(item.maintFun) }}
            </view>
          </view>
        </template>
 
        <!-- 按钮区域 -->
        <view v-if="item.maintFun == null" class="flex justify-around mt-2">
          <wd-button
            type="primary"
            size="small"
            class="mr-2"
            @click.stop="handleAction(item, '0')"
          >
            检查
          </wd-button>
          <wd-button
            type="success"
            size="small"
            class="mr-2"
            @click.stop="handleAction(item, '1')"
          >
            保养
          </wd-button>
          <wd-button type="warning" size="small" @click.stop="handleAction(item, '2')">
            维修
          </wd-button>
        </view>
 
        <!-- 正文区域 -->
        <view v-else class="mt-2">
          <wd-upload v-model:file-list="item.fileList" :action="VITE_UPLOAD_BASEURL" @success="handleUploadSuccess" >
            <wd-button>上传图片</wd-button>
          </wd-upload>
          <!-- 保养说明区域 -->
          <view v-if="item.maintFun === '1'" class="mt-2">
            <wd-input
              v-model="item.maintDesc"
              placeholder="请输入保养说明"
              clearable
              :maxlength="200"
            />
          </view>
 
          <!-- 维修说明区域 -->
          <view v-if="item.maintFun === '2'" class="mt-2">
            <wd-input
              v-model="item.repairDesc"
              placeholder="请输入维修说明"
              clearable
              :maxlength="200"
            />
          </view>
 
 
          <!-- 备件信息录入区域 -->
          <view v-if="item.spareParts && item.spareParts.length > 0" class="mt-2">
            <view
              v-for="(part, partIndex) in item.spareParts"
              :key="partIndex"
              class="flex justify-between mt-1"
            >
              <wd-input
                v-model="part.name"
                label="名称:"
                label-width="100rpx"
                placeholder="备件名称"
 
 
              />
              <wd-input
                v-model="part.quantity"
                label="数量:"
                label-width="100rpx"
                placeholder="数量" type="number" :maxlength="5" />
            </view>
          </view>
          <!-- 维修说明区域 -->
          <view v-if="item.maintFun === '2'" class="mt-2">
            <wd-button type="info" size="small" @click.stop="addSparePart(item, index)">
              添加备件
            </wd-button>
          </view>
 
 
          <!-- 保养人和保养时间区域 -->
          <view class="flex justify-between mt-2">
            <text>保养人: {{ item.maintUserName }}</text>
            <text>保养时间: {{ item.endTime }}</text>
          </view>
        </view>
      </wd-card>
 
      <wd-textarea
        label="特记事项"
        label-width="200rpx"
        type="textarea"
        v-model="specialNote"
        auto-height
        :maxlength="200"
        show-word-limit
        placeholder="请输入特记事项"
        clearable
      />
      <!-- 新增确认完成按钮 -->
      <view class="flex justify-around">
        <wd-button type="primary" style="margin: 20px" block v-if="maintSt.status === '0'" @click="handleClickRight">提交</wd-button>
        <wd-button type="success" style="margin: 20px" block v-if="isLeader() && maintSt.status === '1'" @click="handleComplete">确认完成</wd-button>
      </view>
    </view>
    <!-- 新增提交按钮 -->
<!--    <view class="flex justify-center mt-4">-->
<!--      <wd-button type="primary" block size="large" @click="handleClickRight">提交</wd-button>-->
<!--    </view>-->
  </z-paging>
 
  <!-- 备件选择弹出层 -->
  <wd-popup v-model="showSparePopup" position="bottom" height="33.33vh">
    <view class="flex justify-between p-2 bg-white">
      <wd-button type="text" @click="closeSparePopup">取消</wd-button>
      <wd-button type="text" @click="addOtherSparePart">其他</wd-button>
 
    </view>
    <wd-input
      v-model="searchKeyword"
      placeholder="请输入备件名称或型号"
      clearable
      @input="filterSpareParts"
    />
    <view class="p-2">
      <view
        v-for="(part, index) in sparePartsList"
        :key="index"
        class="flex justify-between items-center p-2 border-b"
        @click="selectFilteredSparePart(part)"
      >
        <text>{{ part.name }} ({{ part.code }})</text>
        <text>剩余: {{ part.actualStock }}</text>
      </view>
    </view>
  </wd-popup>
 
 
</template>
 
<script setup lang="ts">
import type { MaintStVO } from '@/service/maint.d'
import { getMaintSt, getMaintStOrderList, updateMaintOrder, updateMaintSt, updateMaintOrderBatch } from '@/service/maint'
import { ref, reactive } from 'vue'
import { useToast, useMessage } from 'wot-design-uni'
import { isLeader, isLineOrRepair } from '@/utils/RoleUtils'
import { formatDate } from '@/utils/DateUtils'
import { useUserStore } from "@/store";
import { getSpareList } from '@/service/spare'
import { getEnvBaseUploadUrl } from "@/utils";
const VITE_UPLOAD_BASEURL = `${getEnvBaseUploadUrl()}`
const message = useMessage()
const toast = useToast()
const userStore = useUserStore()
const paging = ref(null)
const dataList = ref([])
const maintStId = ref('')
const showSparePopup = ref(false)
const selectedPartIndex = ref(-1)
const sparePartsList = ref([])
const searchKeyword = ref('')
const dataChange = ref(false)
const specialNote = ref('')
interface QueryParams {
  pageNum: number
  pageSize: number
  maintCode: string
  status?: string
}
 
const maintSt = reactive<MaintStVO>({
  id: '',
  equName: '',
  assetNo: '',
  planTime: '',
  createTime: '',
  orderCount: null,
  wcCount: null,
  dbyCount: null,
  byCount: null,
  dyzCount: null,
  specialNote: '',
})
const queryList = () => {
  const params: QueryParams = {
    maintCode: maintCode.value,
  }
  getMaintStOrderList(params)
    .then((res: any) => {
      // 将每一项的picture转换为fileList数组
      res.rows.forEach((item: any) => {
        item.fileList = item.picture?.split(',').map((url: string) => {
          return {
            url: url,
          }
        })
      })
      console.log(res)
      // 请勿在网络请求回调中给dataList赋值!!只需要调用complete就可以了
      paging.value.complete(res.rows)
    })
    .catch((res) => {
      console.error(res)
      // 如果请求失败写paging.value.complete(false),会自动展示错误页面
      // 注意,每次都需要在catch中写这句话很麻烦,z-paging提供了方案可以全局统一处理
      // 在底层的网络请求抛出异常时,写uni.$emit('z-paging-error-emit');即可
      paging.value.complete(false)
    })
}
function initMaintSt(id: any) {
  getMaintSt(id)
    .then((res: any) => {
      Object.assign(maintSt, res)
      paging.value.reload()
    })
    .catch((res) => {
      console.error(res)
      toast.error(res?.data?.msg || '请求失败')
    })
}
 
function itemClick(item) {
  goToOrderDetail(item)
}
 
function goToOrderDetail(item) {
  uni.navigateTo({
    url: `/pages/maint/order-detail?id=${item.id}`,
  })
}
 
// 备件选择相关逻辑
function addSparePart(item: any, index: number) {
  if (!item.spareParts) {
    item.spareParts = []
  }
  selectedPartIndex.value = index
  // item.spareParts.push({ name: '', quantity: '' })
  selectSparePart(item)
}
 
function selectSparePart(item: any) {
  showSparePopup.value = true
 
  loadSpareParts()
}
 
function loadSpareParts(value?: string) {
  getSpareList({ name: value, pageNum: 1, pageSize: 10 }).then((res: any) => {
    sparePartsList.value = res.rows
 
  })
}
 
function filterSpareParts() {
  if (!searchKeyword.value) {
    loadSpareParts()
  } else {
    loadSpareParts(searchKeyword.value)
  }
}
 
function selectFilteredSparePart(part: any) {
  dataList.value[selectedPartIndex.value].spareParts.push({
    id: part.id,
    name: part.name,
    quantity: '',
  })
  closeSparePopup()
}
 
function closeSparePopup() {
  showSparePopup.value = false
  selectedPartIndex.value = -1
  searchKeyword.value = ''
}
 
function confirmSpareSelection() {
  closeSparePopup()
}
 
 
function addOtherSparePart() {
  dataList.value[selectedPartIndex.value].spareParts.push({
    id:  '',
    name: '',
    quantity: '',
  })
  closeSparePopup();
}
 
/**
 * 开始保养
 * @param item
 */
function handleStartMaint(item) {
  // 确认开始修改状态为1-保养中
  const data = Object.assign({}, item)
  data.status = '1'
  message
    .confirm({
      msg: '确定开始保养?',
      title: '提示',
      beforeConfirm: ({ resolve }) => {
        updateOrder(data, resolve)
      },
    })
    .then(() => {})
    .catch((error) => {
      console.log(error)
    })
}
 
 
/**
 * 一键保养
 * @param item
 */
function handleMaintFinish(item) {
  // 一键保养
  const data = Object.assign({}, item)
  data.status = '2'
  data.startTime = formatDate(new Date())
  data.endTime = formatDate(new Date())
  message
    .confirm({
      msg: '确定使用一键保养?',
      title: '提示',
      beforeConfirm: ({ resolve }) => {
        updateOrder(data, resolve)
      },
    })
    .then(() => {})
    .catch((error) => {
      console.log(error)
    })
}
 
/**
 * 更新保养工单
 * @param item
 * @param resolve
 */
function updateOrder(data: any, resolve: any) {
 
  updateMaintOrder(data)
    .then((res: any) => {
      resolve(true)
      if (res?.code === 200) {
        reloadData()
        // 保养状态才需要跳转
        if(data?.status === '1'){
          goToOrderDetail(data)
        }
      }
    })
    .catch((res) => {
      console.error(res)
    })
}
 
function handleUpdateMaintSt() {
  // if (maintSt.orderCount !== maintSt.wcCount) {
  //   toast.info('请先完成所有保养项!')
  //   return false
  // }
  // 先判断保养项是否有更改
  console.log('handleUPdateMaintst', dataChange.value)
  if (!dataChange.value) {
    message.alert('请操作后提交!')
    return false
  }
  // 过滤掉 maintFun为空的保养项
  const submitList = dataList.value.filter((item) => item.maintFun != null)
  // 如果maintFun为1的则判断保养说明不能为空,如果为2则判断维修说明不能为空
  if (submitList.some((item) => item.maintFun === '1' && !item.maintDesc)) {
    toast.info('请填写保养说明!')
    return false
  } else if (submitList.some((item) => item.maintFun === '2' && !item.repairDesc)) {
    toast.info('请填写维修说明!')
    return false
  }
 
  // 将submitList中每一项的fileList转换为以逗号分割的字符串
  submitList.forEach((item) => {
 
    console.log('item.fileList', item.fileList)
    const map = item.fileList?.map((file) => file.url)
    console.log('map', map)
    item.picture = map?.join(',')
  })
 
 
  const data: any = Object.assign(
    {},
    {
      id: maintSt.id,
      orderCount: maintSt.orderCount,
      wcCount: submitList.length,
      status: maintSt.status,
      specialNote: specialNote.value,
    },
  )
  if (data.orderCount === data.wcCount) {
    data.status = '1'
  }
  message
    .confirm({
      msg: '确定更新工单汇总数据?',
      title: '提示',
      beforeConfirm: ({ resolve }) => {
        updateMaintOrderBatch({maintOrderList:submitList})
        updateMaintSt(data)
          .then((res: any) => {
            resolve(true)
            if (res?.code === 200) {
              uni.$emit('maint-st-refresh')
              goBack()
              toastSucces()
            }
          })
          .catch((res) => {
            console.error(res)
          })
      },
    })
    .then(() => {})
    .catch((error) => {
      console.log(error)
    })
}
 
function toastSucces() {
  toast.success('操作成功')
}
 
function reloadData() {
  initMaintSt(maintStId.value)
}
 
const goBack = () => {
  uni.navigateBack()
}
 
function handleClickRight() {
 
    handleUpdateMaintSt()
 
}
 
onLoad(() => {
  uni.$on('maint-order-refresh', reloadData)
})
onUnload(() => {
  uni.$off('maint-order-refresh', reloadData)
})
 
/**
 * 查询保养明细需要的code
 */
const maintCode = computed(() => `${maintSt.equId}_${maintSt.planTime}`)
 
onLoad((options) => {
  maintStId.value = options.id
  reloadData()
})
watch(
  () => [...dataList.value, specialNote.value ], // 使用扩展运算符创建新数组以触发监听
  (newVal, oldVal) => {
    if (oldVal.length > 0) {
      console.log('dataChange',oldVal,  newVal)
      dataChange.value = true
    }
  },
  { deep: true },
)
/**
 * 处理按钮点击事件
 * @param item 保养项
 * @param action 操作类型(check/check/maintain/repair)
 */
function handleAction(item: any, action: number) {
  // 设置当前选中的操作类型
  item.maintFun = action
  item.status = '2'
  // 自动填充保养人和时间
  item.maintUserName = userStore?.userInfo?.realName || ''
  const now = new Date()
  item.endTime = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')} ${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}:${String(now.getSeconds()).padStart(2, '0')}`;
  console.log('handleAction', item)
}
 
/**
 * 撤销保养操作
 * @param item 保养项
 */
function handleUndoAction(item: any) {
  message
    .confirm({
      msg: '确定撤销当前操作?',
      title: '提示',
      beforeConfirm: ({ resolve }) => {
        // 重置状态和相关字段
        item.maintFun = null;
        item.status = '0';
        item.maintDesc = '';
        item.repairDesc = '';
        item.spareParts = [];
        item.maintUserName = '';
        item.endTime = '';
        resolve(true);
      },
    })
    .then(() => {
      toast.success('操作已撤销');
      dataChange.value = true;
    })
    .catch((error) => {
      console.log(error);
    });
}
 
/**
 * 确认完成按钮点击事件
 */
function handleComplete() {
  if (!isLeader()) {
    toast.info('无权限操作');
    return;
  }
  const now = new Date();
  const data: any = Object.assign(
    {},
    {
      id: maintSt.id,
      status: '2',
      verifyUser: userStore?.userInfo?.userId ,
      verifyTime: `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')} ${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}:${String(now.getSeconds()).padStart(2, '0')}`
    },
  )
  updateMaintSt(data)
    .then((res: any) => {
      if (res?.code === 200) {
        uni.$emit('maint-st-refresh')
        goBack()
        toastSucces()
      }
    })
    .catch((res) => {
      console.error(res)
    })
}
function handleUploadSuccess({ file, fileList }) {
  console.log('handleUploadSuccess', file)
  // 判断 file.response是不是 对象,不是对象将json字符串转换为对象
  if (typeof file.response === 'string') {
    file.response = JSON.parse(file.response)
    console.log('file.response', file.response)
    file.ossId = file.response.data.ossId
    file.url = file.response.data.url
  }
}
 
// 新增方法:获取状态文本
function getStatusText(maintFun: string): string {
  switch (maintFun) {
    case '0':
      return '已检查';
    case '1':
      return '已保养';
    case '2':
      return '已维修';
    default:
      return '';
  }
}
 
// 新增方法:获取状态颜色
function getStatusColor(maintFun: string): string {
  switch (maintFun) {
    case '0':
      return '#007bff'; // 检查按钮颜色
    case '1':
      return '#28a745'; // 保养按钮颜色
    case '2':
      return '#ffc107'; // 维修按钮颜色
    default:
      return '#000';
  }
}
 
</script>
 
<style scoped lang="scss">
.menu-title-box {
  height: 30rpx;
  line-height: 30rpx;
}
 
.slot-img {
  width: 72rpx;
  height: 72rpx;
  margin-right: 24rpx;
}
 
.text-mini {
  font-size: 24rpx;
}
 
.menu-indicator {
  width: 6rpx;
  height: 22rpx;
  border-radius: 10rpx;
  background-color: $uni-color-primary;
}
 
:deep(.wd-card__footer) {
  padding: 10rpx !important;
}
 
.col-title-box {
}
 
.bg-primary {
  background: $uni-color-primary;
}
 
:deep(.wd-navbar__text) {
  font-size: 28rpx;
  color: white;
}
 
:deep(.wd-icon-arrow-left:before),
:deep(.wd-navbar__title) {
  color: white;
  font-weight: 0;
  font-size: 34rpx;
}
 
// 新增样式:动态设置卡片背景色
:deep(.wd-card) {
  transition: background-color 0.3s ease;
  &.status-0 {
    background-color: #e6f7ff; // 检查状态背景色
  }
  &.status-1 {
    background-color: #f6ffed; // 保养状态背景色
  }
  &.status-2 {
    background-color: #fffbe6; // 维修状态背景色
  }
}
</style>