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
| <template>
| <div>
| <el-table :data="equipmentData" 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="taskcode" label="作业编号" align="left">
| </el-table-column>
| <el-table-column prop="name" label="设备名称" align="left">
| <template slot-scope="scope">
| <el-input v-model="scope.row.name"></el-input>
| </template>
| </el-table-column>
| <el-table-column prop="type" label="设备类型" align="left">
| <template slot-scope="scope">
| <el-select v-model="scope.row.type">
| <el-option
| v-for="item in typeList"
| :key="item.id"
| :label="item.name"
| :value="item.name"
| >
| </el-option>
| </el-select>
| </template>
| </el-table-column>
| <el-table-column prop="num" label="设备数量" align="left">
| <template slot-scope="scope">
| <el-input v-model="scope.row.num"></el-input>
| </template>
| </el-table-column>
| </el-table>
| </div>
| </template>
|
| <script>
| import { getSafetyActionList } from '@/api/task'
|
| export default {
| props:['basicInformation'],
| name: 'index',
| data(){
| return{
| typeList:[{id:1,name:'安全防护设备及工具'},{id:2,name:'安全施工防护用具'},{id:3,name:'有毒有害防护设备'},{id:4,name:'个人防护设备'},{id:5,name:'安全措施设备及工器具'}],
| equipmentData:[],
| }
| },
| created(){
| },
| methods:{
| addEquipment(){
| this.equipmentData.push({
| createdat: "",
| createdby: "",
| flag: 0,
| id: 0,
| modifiedat: "",
| modifiedby: "",
| name: "",
| num: "",
| taskcode: this.basicInformation.code,
| type: ""
| })
| },
| deleteEquipment(val){
| this.equipmentData.splice(val,1)
| }
| }
| }
| </script>
|
| <style scoped>
|
| </style>
|
|