Admin
2022-11-24 f330cf8c266964baff0817c11227dae2f2e5ac83
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
<template>
    <el-dialog
        :visible.sync="dialogVisible"
        append-to-body
        :close-on-click-modal="false"
        width="80%"
        center
    >
        <div class="table_cont">
 
            <el-table
                :key="tableKey"
                :data="checkList"
                border
                fit
                highlight-current-row
                style="width: 100%;"
            >
 
                <el-table-column type="index" label="序号" align="center" width="80"/>
                <el-table-column label="检查单位" prop="checkUnitName" align="center"></el-table-column>
                <el-table-column label="检查层级" prop="checkUnitType" align="center">
                    <template slot-scope="scope">
                        <span>{{ scope.row.checkUnitType ==1?'省级':(scope.row.checkUnitType ==2?'市级':(scope.row.checkUnitType ==3?'区县级':'自查')) }}</span>
                    </template>
                </el-table-column>
                <el-table-column label="隐患总数" prop="hiddendangerSum" align="center"></el-table-column>
                <el-table-column label="重大隐患总数" prop="majorHiddendangerNum" align="center"></el-table-column>
                <el-table-column label="整改数量" prop="completedRectifyHiddendangerSum" width="130" align="center" sortable></el-table-column>
                <el-table-column label="重大隐患整改数量" prop="completedRectifyMajorHiddendangerNum" align="center"></el-table-column>
                <el-table-column label="是否外埠检查" align="center">否</el-table-column>
                <el-table-column label="检查时间" prop="checkTime" align="center"></el-table-column>
                <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
                    <template slot-scope="scope">
                        <el-button type="text" @click="toCheck(scope.row)">查看</el-button>
                    </template>
                </el-table-column>
            </el-table>
        </div>
        <span slot="footer" class="dialog-footer">
          <el-button type="primary" @click="dialogVisible = false">确认</el-button>
        </span>
        <check-details ref="report"></check-details>
        <supervision-details ref="detail"></supervision-details>
    </el-dialog>
</template>
 
<script>
    import {computePageCount} from "@/utils";
    import { getSpotCheckRecord } from "@/api/specialCheck";
    import checkDetails from "../../selfCheck/components/checkDetails"
    import supervisionDetails from "../../selfCheck/components/supervisionDetails";
 
    export default {
        name: "areaEnterprises",
        components: {
            supervisionDetails,
            checkDetails
        },
        data(){
            return{
                tableKey: 0,
                enterpriseType: null,
                dialogVisible:false,
                checkList:[]
            }
        },
        created() {
 
        },
        watch: {
        },
        methods:{
            toCheck(row){
                const t = this
                console.log(row.checkUnitType,'type')
                if(row.checkUnitType == 4){
                    t.$refs.report.id = row.id
                    t.$refs.report.enterpriseType = t.enterpriseType
                    t.$refs.report.getEnterpriseInfo()
                    t.$refs.report.dialogVisible = true
                }else{
                    t.$refs.detail.id = row.id
                    t.$refs.detail.unitType = row.checkUnitType
                    t.$refs.detail.enterpriseType = t.enterpriseType
                    t.$refs.detail.getEnterpriseInfo()
                    t.$refs.detail.dialogVisible = true
                }
            }
        },
    }
</script>
 
<style lang="scss" scoped>
    .input-with-select .el-select {
        width: 120px;
    }
 
    .el-date-editor.el-input{
        width: 100%;
    }
 
    .el-divider__text{
        background-color: #fafafa;
        color: #034EA2;
    }
 
    .table_cont{
        width: 100%;
    }
</style>