啊鑫
15 小时以前 97af26e2ad64d7974367df80a900c1f680bd19c5
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
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
<template>
  <view class="container">
    <!-- 头部 -->
    <view class="header">
      <view class="title">巡检项目明细</view>
      <view class="order-number">当前检验单号: {{ billNo }}</view>
    </view>
 
    <!-- 标签栏 -->
    <view class="tabs-container">
      <scroll-view class="tabs" scroll-x="true" show-scrollbar="false">
        <view v-for="(tab, index) in tabs" :key="index" :class="{active: currentTab === index}" class="tab"
              @tap="switchTab(index, tab.id)">
          {{ tab.projName || tab.fcheckItem || '项目' + (index + 1) }}
        </view>
      </scroll-view>
    </view>
 
    <view class="tab-content">
      <!-- 基本信息 -->
      <view class="section">
        <view class="section-header">基本信息</view>
        <view class="section-body">
          <view class="info-grid">
            <view class="info-item">
              <view class="info-label">项目名称</view>
              <view class="info-value">{{ formData.projName }}</view>
            </view>
            <view class="info-item">
              <view class="info-label">质量要求</view>
              <view class="info-value">{{ formData.itemMod }}</view>
            </view>
            <view class="info-item">
              <view class="info-label">检验方法</view>
              <view class="info-value">{{ formData.inspectionMethod }}</view>
            </view>
            <view class="info-item">
              <view class="info-label">使用仪表</view>
              <view class="info-value">{{ formData.usingInstruments }}</view>
            </view>
            <view class="info-item">
              <view class="info-label">检验数</view>
              <view class="info-value">{{ formData.levelNum }}</view>
            </view>
            <view v-if="formData.minValue" class="info-item">
              <view class="info-label">下限</view>
              <view class="info-value">{{ formData.minValue }}</view>
            </view>
            <view v-if="formData.standardValue" class="info-item">
              <view class="info-label">标准值</view>
              <view class="info-value">{{ formData.standardValue }}</view>
            </view>
            <view v-if="formData.maxValue" class="info-item">
              <view class="info-label">上限</view>
              <view class="info-value">{{ formData.maxValue }}</view>
            </view>
            <view class="info-item">
              <view class="info-label">更新人</view>
              <view class="info-value">{{ formData.updater }}</view>
            </view>
            <view class="info-item">
              <view class="info-label">更新时间</view>
              <view class="info-value">{{ formData.updateTime }}</view>
            </view>
          </view>
        </view>
      </view>
 
      <!-- 检验结果 -->
      <view class="section">
        <view class="section-header">检验结果</view>
        <view class="section-body">
          <view class="info-grid">
            <view v-if="formData.result" class="info-item">
              <view class="info-label">预览结果</view>
              <view class="info-value">{{ formData.result }}</view>
            </view>
            <view v-if="formData.remarks" class="info-item">
              <view class="info-label">不合格描述</view>
              <view class="info-value danger">{{ formData.remarks }}</view>
            </view>
          </view>
        </view>
      </view>
 
      <!-- 结果录入 -->
      <view class="section">
        <view class="section-header">检验结果录入</view>
        <view class="section-body">
          <view v-if="!formData.maxValue && !formData.minValue" class="info-item edit">
            <view class="info-label" style="color: #F56C6C">提示</view>
            <view class="info-value" style="color: #F56C6C">没有最大值和最小值时填写0(未通过检验)或1(通过检验)</view>
          </view>
 
          <view class="input-group input1">
            <view class="input-wrapper">
              <input v-if="tableData.length < formData.levelNum" v-model="formData.fcheckResu" class="result-input"
                     placeholder="请输入检验结果..." type="number"/>
              <button v-if="tableData.length < formData.levelNum" class="btn primary-btn" @click="submit">保存结果
              </button>
              <button v-if="isShowImg" class="btn upload-btn" @click="previewImage">
                <uni-icons color="#fff" size="16" type="image"></uni-icons>
                查看图片
              </button>
              <button class="btn upload-btn" @click="saveRemarks">
                <uni-icons color="#fff" size="16" type="compose"></uni-icons>
                不合格描述
              </button>
            </view>
          </view>
 
          <!-- 响应式设计的第二个输入组 -->
          <view class="input-group input2">
            <view class="input-wrapper">
              <button v-if="isShowImg" class="btn upload-btn" @click="previewImage">
                <uni-icons color="#fff" size="16" type="image"></uni-icons>
                查看图片
              </button>
              <button class="btn upload-btn" @click="saveRemarks">
                <uni-icons color="#fff" size="16" type="compose"></uni-icons>
                不合格描述
              </button>
            </view>
            <view class="input-wrapper" style="margin-top: 15px;">
              <input v-if="tableData.length < formData.levelNum" v-model="formData.fcheckResu" class="result-input"
                     placeholder="请输入检验结果..." type="number"/>
              <button v-if="tableData.length < formData.levelNum" class="btn primary-btn" @click="submit">保存结果
              </button>
            </view>
          </view>
        </view>
      </view>
 
      <!-- 结果表格 -->
      <view v-if="tableData.length > 0" class="simple-table-container">
        <view class="simple-table-header">
          <view class="simple-title">检验记录 ({{ tableData.length }}/{{ formData.levelNum }})</view>
          <view :class="{'completed': !(tableData.length < formData.levelNum)}" class="simple-status">
            {{ tableData.length < formData.levelNum ? '进行中' : '已完成' }}
          </view>
        </view>
 
        <view class="simple-table">
          <view class="simple-header-row">
            <view class="simple-header-cell">编号</view>
            <view class="simple-header-cell">检验结果</view>
            <view class="simple-header-cell">操作</view>
          </view>
 
          <view v-for="(item, index) in tableData" :key="index" class="simple-data-row">
            <view class="simple-data-cell simple-index">
              {{ index + 1 }}
            </view>
            <view class="simple-data-cell simple-result">
              <!-- 数字结果样式 -->
              <view v-if="isNumber && !isNaN(parseFloat(item.fcheckResu))" class="simple-number-result">
                <view class="result-value">{{ item.fcheckResu }}</view>
                <view v-if="formData.unitName" class="result-unit">{{ formData.unitName }}</view>
                <view :class="{'pass': isInRange(item.fcheckResu), 'fail': !isInRange(item.fcheckResu)}"
                      class="result-status">
                  {{ isInRange(item.fcheckResu) ? '合格' : '不合格' }}
                </view>
              </view>
 
              <!-- NG/OK状态样式 -->
              <view v-else class="simple-status-result">
                <view :class="{'pass': item.fcheckResu === '1', 'fail': item.fcheckResu !== '1'}" class="simple-status">
                  {{ item.fcheckResu === '1' ? '合格' : '不合格' }}
                </view>
              </view>
            </view>
            <view class="simple-data-cell simple-action">
              <button v-if="!isNumber" class="simple-btn" @click="numberEdit(item)">
                {{ editResult(item.fcheckResu) }}
              </button>
              <button v-if="isNumber" class="simple-btn" @click="toDetail(item)">
                修改
              </button>
            </view>
          </view>
        </view>
      </view>
 
      <!-- 弹出层 - 不合格描述 -->
      <view v-if="remarksPopup" class="overlay">
        <view class="popup">
          <h3>修改不合格描述</h3>
          <form>
            <view class="form-group">
              <label class="form-label">不合格描述:</label>
              <input v-model="remarks" class="form-input" placeholder="请输入不合格描述" type="text"/>
            </view>
            <view class="popup-buttons">
              <button class="btn primary-btn" type="warn" @click="editRemarks">修改</button>
              <button class="btn cancel-btn" @click="remarksPopup = !remarksPopup">取消</button>
            </view>
          </form>
        </view>
      </view>
 
      <!-- 弹出层 - 修改检验结果 -->
      <view v-if="showPopup" class="overlay">
        <view class="popup">
          <h3>修改检验结果</h3>
          <form :modelValue="editData">
            <view class="form-group">
              <label class="form-label">检验结果:</label>
              <input v-model="editData.fcheckResu" class="form-input" placeholder="请输入检验结果" type="text"/>
            </view>
            <view class="popup-buttons">
              <button class="btn primary-btn" type="warn" @click="eidt">修改</button>
              <button class="btn cancel-btn" @click="showPopup = !showPopup">取消</button>
            </view>
          </form>
        </view>
      </view>
    </view>
  </view>
</template>
 
<script>
export default {
  data() {
    return {
      formData: {},
      isNumber: false,
      checkItem: "",
      id: 0,
      gid: 0,
      billNo: "",
      showPopup: false,
      editData: {},
      tableData: [],
      isShowImg: false,
      base64Image: "",
      remarks: "",
      remarksPopup: false,
      currentTab: 0,
      tabs: []
    }
  },
  methods: {
    // 切换标签页
    switchTab(index, id) {
      this.currentTab = index;
      this.id = id;
      this.refreshResult();
    },
 
    // 加载标签项
    loadTabItems() {
      this.$post({
        url: "/XJ/getJYItem",
        data: {
          pid: this.gid,
        }
      }).then(res => {
        if (res.data && res.data.tbBillList) {
          this.tabs = res.data.tbBillList;
          // 按检测结果排序,未完成的排在前面
          this.tabs.sort((a, b) => {
            if (a.result === '未完成' && b.result !== '未完成') {
              return -1;
            } else if (a.result !== '未完成' && b.result === '未完成') {
              return 1;
            } else {
              return 0;
            }
          });
        } else {
          // 没有项目时至少添加当前项目到标签
          this.tabs = [{id: this.id, projName: this.formData.projName || '当前项目'}];
        }
      });
    },
 
    previewImage() {
      uni.previewImage({
        urls: [this.base64Image],
      });
    },
    editResult(fcheckResu) {
      if (fcheckResu == '1') {
        return "改为不合格";
      } else {
        return "改为合格";
      }
    },
    submit() {
 
      let count = this.formData.levelNum;
      let fstand = "√";
 
      //有最大值和最小值就根据是否符合标准值更新判定结果,没有最大值和最小值就根据是否通过检验判定结果
      if (this.formData.maxValue && this.formData.minValue) {
 
        if (!this.formData.fcheckResu) {
          this.$showMessage("请输入检验值");
          return;
        }
 
        if (this.formData.fcheckResu >= this.formData.minValue && this.formData.fcheckResu <= this.formData
            .maxValue) {
          fstand = "√"
        } else {
          fstand = "×";
        }
        count = 1;
      } else {
 
        if (!this.formData.fcheckResu) {
          this.formData.fcheckResu = 1
        }
 
        if (this.formData.fcheckResu == 0 || this.formData.fcheckResu == 1) {
          this.formData.isPass = this.formData.fcheckResu
        } else {
          this.$showMessage("无标准值时,检验结果只能为0或1!");
          return;
        }
        count = count - this.tableData.length;
      }
 
      this.formData.updater = this.$loginInfo.account;
 
      this.$post({
        url: "/XJ/SetQSItemDetail",
        data: {
          pid: this.id,
          gid: this.gid,
          fstand: fstand,
          fcheckResu: this.formData.fcheckResu,
          updateBy: this.formData.updater,
          count: count
        }
      }).then(res => {
        this.formData.fcheckResu = null;
        this.$showMessage("保存成功");
        this.refreshResult();
      })
 
    },
    refreshResult() {
      this.$post({
        url: "/XJ/getXjDetail02ById",
        data: {
          id: this.id
        }
      }).then(res => {
        this.formData = res.data.tbBillList.itemXj01;
 
        this.tableData = res.data.tbBillList.itemXj02s;
 
        if (this.formData.imageData) {
          this.isShowImg = true;
          this.base64Image = 'data:image/jpeg;base64,' + this.formData.imageData;
        }
 
        if (this.formData.maxValue && this.formData.minValue && this.formData.standardValue) {
          this.isNumber = true;
        }
      })
    },
    toDetail(item) {
      this.showPopup = !this.showPopup;
      this.editData = item;
    },
    eidt() {
 
      if (!this.editData.fcheckResu) {
        this.$showMessage("请输入检验结果");
      }
 
      if (this.formData.fcheckResu == this.editData.fcheckResu) {
        this.$showMessage("修改成功");
        return;
      }
 
      let fstand = "√";
 
      if (this.formData.maxValue && this.formData.minValue) {
 
        if (!this.editData.fcheckResu) {
          this.$showMessage("请输入检验值");
          return;
        }
 
        if (this.editData.fcheckResu >= this.formData.minValue && this.editData.fcheckResu <= this.formData
            .maxValue) {
          this.editData.isPass = 1
        } else {
          this.editData.isPass = 0
          fstand = "×";
        }
      } else {
 
        if (!this.editData.fcheckResu) {
          this.editData.fcheckResu = 1
        }
 
        if (this.editData.fcheckResu == 0 || this.editData.fcheckResu == 1) {
          if (this.editData.fcheckResu == 0) {
            fstand = "×";
          }
        } else {
          this.$showMessage("无标准值时,检验结果只能为0或1!");
          return;
        }
      }
 
      this.editData.updater = this.$loginInfo.account;
 
      this.$post({
        url: "/XJ/UpdateQSItemDetail",
        data: {
          id: this.editData.id,
          pid: this.id,
          gid: this.gid,
          fstand: fstand,
          fcheckResu: this.editData.fcheckResu,
          updateBy: this.editData.updater,
        }
      }).then(res => {
        this.showPopup = !this.showPopup;
        this.$showMessage("修改成功");
        this.refreshResult(); //刷新页面
      })
    },
    numberEdit(item) {
 
      let fstand = "√";
      let fcheckResu = 1;
 
      if (item.fcheckResu == '1') {
        fstand = "×";
        fcheckResu = 0;
      }
 
      this.$post({
        url: "/XJ/UpdateQSItemDetail",
        data: {
          id: item.id,
          pid: item.pid,
          gid: item.gid,
          fstand: fstand,
          fcheckResu: fcheckResu,
          updateBy: this.$loginInfo.account,
        }
      }).then(res => {
        this.$showMessage("修改成功");
        this.refreshResult(); //刷新页面
      })
    },
    saveRemarks() {
      this.remarksPopup = !this.remarksPopup;
      this.remarks = this.formData.remarks;
    },
    editRemarks() {
      if (this.remarks) {
        //saveRemarksGid
        this.$post({
          url: "/XJ/saveRemarksPid",
          data: {
            pid: this.formData.id,
            remarks: this.remarks
          }
        }).then(res => {
          if (res.data.tbBillList > 0) {
            this.formData.remarks = this.remarks;
            this.remarksPopup = !this.remarksPopup;
            this.$showMessage("保存成功");
          }
        })
      }
    },
    // 判断数字是否在范围内
    isInRange(value) {
      if (!this.formData.maxValue || !this.formData.minValue) return true;
      const numValue = parseFloat(value);
      return numValue >= parseFloat(this.formData.minValue) &&
          numValue <= parseFloat(this.formData.maxValue);
    },
    // 获取数字结果的样式类
    getNumberResultClass(value) {
      if (!this.formData.maxValue || !this.formData.minValue) return 'number-normal';
      return this.isInRange(value) ? 'number-pass' : 'number-fail';
    },
    // 获取状态结果的样式类
    getStatusClass(status) {
      return status === '√' ? 'status-pass' : 'status-fail';
    }
  },
  onLoad(options) {
    //options中包含了url附带的参数
    let params = options;
 
    this.id = params["id"];
    this.billNo = params["billNo"];
    this.gid = params["gid"];
    this.currentTab = parseInt(params["index"] || 0);
 
    this.refreshResult();
    this.loadTabItems();
  }
}
</script>
 
<style lang="scss">
$primary-color: #409EFF;
$success-color: #67C23A;
$danger-color: #F56C6C;
$border-color: #DCDFE6;
$bg-color: #f5f7fa;
 
.container {
  padding: 20px;
  background-color: #fff;
}
 
.header {
  padding: 20px;
  border-bottom: 1px solid $border-color;
  background: linear-gradient(90deg, #f0f7ff, #e1f0ff);
  margin-bottom: 0; /* 调整,因为下面有tab栏 */
}
 
.header .title {
  font-size: 24px;
  color: #333;
  margin-bottom: 10px;
}
 
.header .order-number {
  color: #666;
  font-size: 14px;
}
 
/* 标签栏样式 */
.tabs-container {
  width: 100%;
  position: relative;
  background-color: $bg-color;
  border-bottom: 1px solid $border-color;
}
 
.tabs {
  display: flex;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}
 
.tabs::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}
 
.tab {
  display: inline-block;
  padding: 12px 20px;
  text-align: center;
  color: #666;
  transition: all 0.3s;
  border-right: 1px solid $border-color;
  min-width: 100px;
}
 
.tab.active {
  background-color: #fff;
  color: $primary-color;
  font-weight: bold;
  position: relative;
}
 
.tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: $primary-color;
}
 
.tab-content {
  padding-top: 20px;
}
 
.section {
  margin: 20px 0;
  border: 1px solid $border-color;
  border-radius: 4px;
 
  &-header {
    padding: 12px 16px;
    background-color: $bg-color;
    border-bottom: 1px solid $border-color;
    font-weight: bold;
  }
 
  &-body {
    padding: 16px;
  }
}
 
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
 
  .info-item {
    margin-bottom: 12px;
 
    .info-label {
      color: #909399;
      font-size: 14px;
      margin-bottom: 4px;
    }
 
    .info-value {
      color: #333;
      font-weight: 500;
    }
  }
}
 
.input-group {
  margin: 16px 0;
 
  .input-wrapper {
    display: flex;
    gap: 12px;
 
    .result-input {
      flex: 1;
      height: 45px;
      padding: 0 12px;
      border: 1px solid $border-color;
      border-radius: 4px;
      font-size: 14px;
    }
 
    .upload-btn {
      background-color: #909399;
      color: #fff;
      padding: 0 10px;
      margin: 0;
    }
  }
}
 
/* 简洁表格样式 - 适合年长用户 */
.simple-table-container {
  margin: 20px 0;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #fff;
}
 
.simple-table-header {
  padding: 15px 20px;
  background: #f5f7fa;
  border-bottom: 2px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
 
.simple-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
}
 
.simple-status {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  background: #ffc107;
  color: #333;
}
 
.simple-status.completed {
  background: #28a745;
  color: #fff;
}
 
.simple-table {
  width: 100%;
}
 
.simple-header-row {
  display: flex;
  background: #e9ecef;
  border-bottom: 2px solid #ddd;
}
 
.simple-header-cell {
  flex: 1;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: bold;
  color: #333;
  text-align: center;
  border-right: 1px solid #ddd;
}
 
.simple-header-cell:first-child {
  flex: 0 0 80px;
}
 
.simple-header-cell:last-child {
  border-right: none;
  flex: 0 0 120px;
}
 
.simple-data-row {
  display: flex;
  border-bottom: 1px solid #ddd;
}
 
.simple-data-row:nth-child(even) {
  background: #f8f9fa;
}
 
.simple-data-cell {
  flex: 1;
  padding: 15px 20px;
  text-align: center;
  border-right: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
}
 
.simple-index {
  flex: 0 0 80px;
  font-size: 18px;
  font-weight: bold;
  color: #333;
}
 
.simple-result {
  text-align: left;
  justify-content: flex-start;
}
 
.simple-action {
  border-right: none;
  flex: 0 0 120px;
}
 
.simple-number-result {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
 
.result-value {
  font-size: 20px;
  font-weight: bold;
  color: #333;
}
 
.result-unit {
  font-size: 14px;
  color: #666;
}
 
.result-status {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  margin-left: auto;
}
 
.result-status.pass {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
 
.result-status.fail {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
 
.simple-status-result {
  width: 100%;
}
 
.simple-status {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  display: inline-block;
}
 
.simple-status.pass {
  background: #28a745;
  color: #fff;
}
 
.simple-status.fail {
  background: #dc3545;
  color: #fff;
}
 
.simple-btn {
  padding: 10px 16px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  min-width: 80px;
}
 
.simple-btn:active {
  background: #0056b3;
}
 
// 新的结果显示样式
.result-display {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
 
// 数字结果样式
.number-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  min-width: 60px;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
 
  &.number-pass {
    background: linear-gradient(135deg, #e8f5e8, #f0f9f0);
    border: 2px solid #67C23A;
  }
 
  &.number-fail {
    background: linear-gradient(135deg, #fdeaea, #fef0f0);
    border: 2px solid #F56C6C;
  }
 
  &.number-normal {
    background: linear-gradient(135deg, #f5f7fa, #fafbfc);
    border: 2px solid #909399;
  }
 
  .number-value {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 2px;
  }
 
  .number-unit {
    font-size: 10px;
    color: #666;
    margin-bottom: 4px;
  }
 
  .number-status {
    position: absolute;
    top: -4px;
    right: -4px;
    background: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }
}
 
// 状态结果样式
.status-result {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
 
  &.status-pass {
    background: linear-gradient(135deg, #67C23A, #85ce61);
    color: white;
  }
 
  &.status-fail {
    background: linear-gradient(135deg, #F56C6C, #f78989);
    color: white;
  }
 
  .status-icon {
    margin-right: 6px;
    display: flex;
    align-items: center;
  }
 
  .status-text {
    font-size: 14px;
    letter-spacing: 0.5px;
  }
 
  &:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }
}
 
// 保留原有样式作为备用
.result-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
 
  &.OK {
    background-color: rgba($success-color, 0.1);
    color: $success-color;
  }
 
  &.NG {
    background-color: rgba($danger-color, 0.1);
    color: $danger-color;
  }
}
 
.btn {
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1;
 
  &.primary-btn {
    background-color: $primary-color;
    color: #fff;
  }
 
  &.danger-btn {
    background-color: $danger-color;
    color: #fff;
  }
 
  &.cancel-btn {
    background-color: #909399;
    color: #fff;
  }
}
 
.danger {
  color: $danger-color;
}
 
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
 
.popup {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  width: 80%;
  max-width: 500px;
 
  h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
  }
 
  .form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
  }
 
  .form-label {
    margin-bottom: 5px;
    font-weight: bold;
  }
 
  .form-input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
  }
 
  .popup-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
  }
}
 
.input1 {
  display: block;
}
 
.input2 {
  display: none;
}
 
/* 响应式设计 */
@media (max-width: 500px) {
  .input1 {
    display: none;
  }
 
  .input2 {
    display: block;
  }
 
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
 
@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
 
  .simple-table-header {
    padding: 12px 16px;
  }
 
  .simple-title {
    font-size: 16px;
  }
 
  .simple-header-cell,
  .simple-data-cell {
    padding: 12px 16px;
    font-size: 14px;
  }
 
  .simple-index {
    flex: 0 0 60px;
  }
 
  .simple-action {
    flex: 0 0 100px;
  }
 
  .result-value {
    font-size: 18px;
  }
}
</style>