zjh
3 天以前 d123ca35bb3ec4982af44aeb1ffffa8a3569a21b
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
<template>
  <view class="inspection-sheet">
    <!-- 不良描述表格 -->
    <view class="inspection-table">
      <table>
        <thead>
          <tr>
            <th width="35%" style="text-align: center;">检验项目</th>
            <th width="50%" style="text-align: center;">不良描述</th>
          </tr>
        </thead>
        <tbody>
          <tr v-for="(item, index) in tableData" :key="index">
            <td>{{ item.fchecK_ITEM }}</td>
            <td>
              <view class="description-text">{{ item.funit }}</view>
            </td>
          </tr>
        </tbody>
      </table>
    </view>
  </view>
</template>
 
<script>
export default {
  data() {
    return {
      formData: {
        id: ""
      },
      tableData: []
    }
  },
  onLoad(options) {
    let params = options;
    this.formData.id = params["id"];
  },
  methods: {
    onShow() {
      if (this.formData.id) {
        this.init();
      }
    },
    init() {
      let userName = this.$loginInfo.account;
      this.$post({
        url: "/LLJ/getJYBlmsItem",
        data: {
          id: this.formData.id
        }
      }).then(res => {
         this.tableData=res.data;
      });
    } 
  }
}
</script>
 
<style>
.inspection-sheet {
  font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
 
.inspection-table {
  margin: 25px 0;
}
 
.inspection-table table {
  width: 100%;
  border-collapse: collapse;
}
 
.inspection-table th, .inspection-table td {
  padding: 12px 15px;
  border: 1px solid #ddd;
  text-align: left;
}
 
.inspection-table th {
  background-color: #f8f9fa;
  font-weight: bold;
  color: #34495e;
}
 
.inspection-table tr:nth-child(even) {
  background-color: #f9f9f9;
}
 
.inspection-table tr:hover {
  background-color: #f1f5f9;
}
 
.description-text {
  position: relative;
  z-index: 2;
  padding: 25px;
  background-color: rgba(255, 255, 255, 0.7);
}
 
@media (max-width: 500px) {
  .inspection-table table {
    display: block;
    overflow-x: auto;
  }
}
</style>