Your Name
2022-05-10 30e36368e54581fcc0c581a004f1f68873c1e819
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
<template>
    <div>
        <el-table :data="tasksecurity" border fit highlight-current-row style="width: 100%;" :header-cell-style="{'text-align':'center'}">
            <el-table-column type="index" label="序号" align="center" width="60"/>
            <el-table-column prop="content" label="安全措施" align="left">
                <template slot-scope="scope">
                    <div v-if="scope.row.checktype === '判断'">
                        {{scope.row.content}}
                    </div>
                    <div v-if="scope.row.checktype === '填空'">
                        <span>{{scope.row.content.split('_')[0]}}</span>
                        <el-input style="width:50px" v-model="scope.row.num"></el-input>
                        <span>{{scope.row.content.split('_')[1]}}</span>
                    </div>
                </template>
            </el-table-column>
            <el-table-column prop="checked" label="选项" align="center" width="300">
                <template slot-scope="scope">
                    <el-radio v-model="scope.row.checked" :label="1">是</el-radio>
                    <el-radio v-model="scope.row.checked" :label="0">否</el-radio>
                    <el-radio v-model="scope.row.checked" :label="2">不涉及</el-radio>
                </template>
            </el-table-column>
        </el-table>
    </div>
</template>
 
<script>
import { getSafetyActionList } from '@/api/task'
 
export default {
    props:['basicInformation'],
    name: 'index',
    data(){
        return{
            currentPage:0,
            pageSize:1000,
            tasksecurity:[],
            safetyActionData:[
                // {id:0,selected:true,action:'动火设备内部构件清理干净,蒸汽吹扫或水洗合格,达到用火条件。',type:0},
                // {id:1,selected:null,actionOne:'',actionTwo:'',type:1},
                // {id:2,selected:null,action:'动火点10m范围内及动火点下部区域严禁同时进行可燃溶剂清洗和喷漆等作业。在受限空间内进行动火作业、临时用电作业时,不得同时进行刷漆、喷漆作业或使用可燃溶剂清洗等其他可能散发易燃气体、可燃液体的作业。',type:0},
                // {id:3,selected:null,action:'动火点周围的下水井、地漏、地沟、电缆沟等已清除易燃物,并已采取覆盖、铺沙、水封等手段进行隔离。',type:0},
                // {id:4,selected:null,action:'动火点周围易燃物已清除。',type:0},
                // {id:5,selected:null,action:'罐区内动火点同一围堰内和防火间距内的储罐不同时进行脱水作业,排凝等作业。',type:0},
                // {id:6,selected:null,action:'距动火点30m内严禁排放可燃气体,15m内严禁排放各类可燃液体。',type:0},
                // {id:7,selected:null,action:'电焊回路线已接在焊件上,把线未穿过下水井或其它设备搭接。',type:0},
                // {id:8,selected:null,action:'高处作业已采取防火花飞溅措施。',type:0},
                // {id:9,selected:null,action:'乙炔气瓶(直立放置)、氧气瓶与火源间的距离大于10m,二者间距不应小于5m。',type:0},
                // {id:10,selected:null,actionOne:'',actionTwo:'',actionThree:'',actionFour:'',type:2},
                // {id:11,selected:null,actionOne:'',type:3},
                ],
        }
    },
    methods:{
        async getSafeTyAction(){
            let params = {}
            params['pageIndex'] = this.currentPage
            params['pageSize'] = this.pageSize
            params['type'] = '动火作业负责检查项'
            this.safetyActionData = []
            this.tasksecurity = []
            let res = await getSafetyActionList(params)
            if(res.data.code === '200'){
                this.safetyActionData = res.data.result
                this.tasksecurity = this.safetyActionData.map(item =>{
                    return {
                        id:item.id,
                        taskcode: this.basicInformation.code,
                        content: item.content,
                        checked: item.check,
                        num: item.number,
                        confirmedby: "test",
                        checktype:item.checktype,
                    }
                })
            }else{
                this.$message({
                    message:res.data.message,
                    type:'warning'
                })
            }
        },
        async getConstructionAction(){
            let params = {}
            params['pageIndex'] = this.currentPage
            params['pageSize'] = this.pageSize
            params['type'] = '施工单位负责检查项'
            this.safetyActionData = []
            this.tasksecurity = []
            let res = await getSafetyActionList(params)
            if(res.data.code === '200'){
                this.safetyActionData = res.data.result
                this.tasksecurity = this.safetyActionData.map(item =>{
                    return {
                        id:item.id,
                        taskcode: this.basicInformation.code,
                        content: item.content,
                        checked: item.check,
                        num: item.number,
                        confirmedby: "test",
                        checktype:item.checktype,
                    }
                })
            }else{
                this.$message({
                    message:res.data.message,
                    type:'warning'
                })
            }
        }
    }
}
</script>
 
<style scoped>
 
</style>