Fixiaobai
2023-11-16 5676e658cf19f371ca059104889c33685a6416b9
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
<template>
    <el-dialog title="检测项目" :close-on-click-modal="false" :visible.sync="visible">
        <el-table
          stripe
          ref="paramValues"
          :data="paramValues"
          height="100%"
          :row-style="{ height: '26px' }"
          :cell-style="{ padding: '0' }"
        >
          <el-table-column
            prop="sort"
            label="序号"
            align="center"
            min-width="75px"
          />
          <el-table-column
            prop="itemCode"
            label="编号"
            align="center"
            min-width="75px"
          />
          <el-table-column
            prop="itemName"
            label="检测项目"
            align="center"
            min-width="75px"
          />
          <el-table-column
            prop="itemReference"
            label="要求范围"
            align="center"
            min-width="75px"
          />
          <el-table-column
            prop="itemValue"
            label="值"
            align="center"
            min-width="75px"
          >
          </el-table-column>
          <el-table-column
            prop="isQualified"
            label="合格"
            align="center"
            min-width="60px"
          >
            <template slot-scope="scope">
              <span>{{scope.row.isQualified == false ? '否' : scope.row.isQualified ? '是': ''}}</span>
            </template>
          </el-table-column>
          <el-table-column
            prop="remark"
            label="备注"
            align="center"
            min-width="90px"
          >
          </el-table-column>
        </el-table>
        <span slot="footer" class="dialog-footer">
            <el-button @click="visible = false">取消</el-button>
        </span>
    </el-dialog>
</template>
 
<script>
import {
  getSampleItems
} from '@/api/quality/result'
 
export default {
  data() {
      return {
          visible: false,
          paramValues:[]
      }
  },
  created() {},
  methods: {
      init(id) {
          let obj = {
            id:id
          }
          getSampleItems(obj).then((result) => {
            this.paramValues = result.data.data;
            if(result.data.data.length>0){
              this.visible = true
            }else{
              this.$message.warning('暂无检测数据!')
            }
          }).catch((err) => {
            
          });
      },
  }
}
 
</script>