郑永安
2023-06-19 2befd4a5d3733520b69ed97da88e675b6b086a3c
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
<template>
    <div class="app-container">
        <div class="filter-container">
            <div style="margin-bottom: 10px;">
                <img src="../../../assets/back.svg" style="width:30px;height:30px;margin-bottom: 10px;" @click="goBefore()" align="left"></img>
            </div>
        </div>
        <div class="table_content">
            <el-table
                v-loading="listLoading"
                :key="tableKey"
                :data="tableData"
                border
                fit
                highlight-current-row
                style="width: 100%;"
            >
                <el-table-column label="序号" type="index" align="center" width="60"/>
                <el-table-column label="自查标准" prop="checkcriteria" align="center">
                </el-table-column>
                <el-table-column label="隐患级别" prop="level" align="center">
                    <template slot-scope="scope">
                        <div v-for="item in levelList">
                            <div v-if="scope.row.answer.level === item.code">
                                <span :class="scope.row.unqualified == true ? 'unqualifiedClass' : 'qualifiedClass'">
                                  {{ item.name}}
                                </span>
                            </div>
                        </div>
                    </template>
                </el-table-column>
                <el-table-column label="发现日期" prop="findtime" align="center">
                    <template slot-scope="scope" >
                        {{ scope.row.answer.findtime}}
                    </template>
                </el-table-column>
                <el-table-column label="隐患描述" prop="memo" align="center">
                    <template slot-scope="scope">
                        {{ scope.row.memo}}
                    </template>
                </el-table-column>
                <el-table-column label="是否整改" prop="rectifystatus" align="center">
                    <template slot-scope="scope">
                        <div v-for="item in rectifystatusList">
                            <div v-if="scope.row.answer.rectifystatus === item.code">
                                {{ item.name}}
                            </div>
                        </div>
                    </template>
                </el-table-column>
                <el-table-column label="整改期限" prop="rectifydeadline" align="center">
                    <template slot-scope="scope">
                        {{ scope.row.answer.rectifydeadline}}
                    </template>
                </el-table-column>
                <el-table-column label="整改完成日期" prop="rectifycompletedate" align="center">
                    <template slot-scope="scope">
                        {{ scope.row.answer.rectifycompletedate}}
                    </template>
                </el-table-column>
                <el-table-column label="整改措施" prop="rectifyprincipal" align="center">
                    <template slot-scope="scope">
                        {{ scope.row.answer.rectifymeasure}}
                    </template>
                </el-table-column>
                <el-table-column label="整改负责人" prop="enterprisesize" align="center">
                    <template slot-scope="scope">
                        {{ scope.row.answer.rectifyprincipal}}
                    </template>
                </el-table-column>
            </el-table>
        </div>
    </div>
</template>
 
<script>
import { lookSelfExamData } from "../../../api/selfExam";
export default {
    name: "addSelfExam",
    data(){
        return{
            tableKey:'',
            id:"",
            level:"",
            test:"1",
            updateId:'',
            MenuList:[],
            dataList:[],
            tableData:[],
            rectifystatusList:[
                {code:null,name:''},
                {code:1,name:'正在整改'},
                {code:2,name:'整改完成'},
            ],
            levelList:[
                {code:null,name:'无隐患'},
                {code:1,name:'一般隐患'},
                {code:2,name:'重大隐患'}
            ]
        }
    },
    created() {
        this.getSelfExamList()
    },
    watch: {
    },
    methods:{
        async getSelfExamList(){
            this.listLoading = true
            let res = await lookSelfExamData(this.$route.query.code)
            if(res.data.code === "200"){
                this.tableData = res.data.result
            }else{
                this.$message({
                    type:'warning',
                    message:res.data.message
                })
            }
            this.listLoading = false
        },
        goBefore(){
            this.$router.go(-1)
        }
    }
}
</script>
 
<style scoped>
.unqualifiedClass{
    color:red;
}
.qualifiedClass{
 
}
</style>