| | |
| | | <template> |
| | | <tr class="m-color b-font" style="text-align: center">主要危险源或有害因素</tr> |
| | | <tr> |
| | | <td class="w-18 m-color">序号</td> |
| | | <td class="w-18 m-color required">危险源或有害因素</td> |
| | | <td class="w-18 m-color required">危险特性</td> |
| | | <td class="w-18 m-color required">数量</td> |
| | | <td class="w-18 m-color required">其他说明</td> |
| | | <td class="w-18 m-color">操作</td> |
| | | <td class="w-20 m-color">序号</td> |
| | | <td class="w-20 m-color">危险源或有害因素</td> |
| | | <td class="w-20 m-color">危险特性</td> |
| | | <td class="w-20 m-color">数量</td> |
| | | <td class="w-20 m-color">其他说明</td> |
| | | <!-- <td class="w-18 m-color">操作</td>--> |
| | | </tr> |
| | | <tr v-for="(item,index) in dangerSourceState.dangerList" :key="index"> |
| | | <td class="w-18"> |
| | | <td class="w-20"> |
| | | {{ index + 1 }} |
| | | </td> |
| | | <td class="w-18"> |
| | | <el-input :disabled="dangerSourceState.disabled" v-model="item.dangerFactor"></el-input> |
| | | <td class="w-20"> |
| | | <el-input disabled v-model="item.riskSource"></el-input> |
| | | </td> |
| | | <td class="w-18"> |
| | | <el-input :disabled="dangerSourceState.disabled" v-model="item.feature"></el-input> |
| | | <td class="w-20"> |
| | | <el-input disabled v-model="item.riskCharacteristic"></el-input> |
| | | </td> |
| | | <td class="w-18"> |
| | | <el-input :disabled="dangerSourceState.disabled" type="number" v-model="item.amount"></el-input> |
| | | <td class="w-20"> |
| | | <el-input disabled type="number" v-model="item.number"></el-input> |
| | | </td> |
| | | <td class="w-18"> |
| | | <el-input :disabled="dangerSourceState.disabled" v-model="item.info"></el-input> |
| | | <td class="w-20"> |
| | | <el-input disabled v-model="item.description"></el-input> |
| | | </td> |
| | | <td class="w-18"> |
| | | <el-button :disabled="dangerSourceState.disabled" type="danger" @click="deleteDangerItem(index)">删除</el-button> |
| | | </td> |
| | | <!-- <td class="w-18">--> |
| | | <!-- <el-button disabled type="danger" @click="deleteDangerItem(index)">删除</el-button>--> |
| | | <!-- </td>--> |
| | | </tr> |
| | | <tr style="text-align: center"> |
| | | <el-button :disabled="dangerSourceState.disabled" type="primary" shape="round" @click="addDangerItem()"> |
| | | 添加行 |
| | | </el-button> |
| | | </tr> |
| | | <!-- <tr style="text-align: center">--> |
| | | <!-- <el-button :disabled="dangerSourceState.disabled" type="primary" shape="round" @click="addDangerItem()">--> |
| | | <!-- 添加行--> |
| | | <!-- </el-button>--> |
| | | <!-- </tr>--> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | |
| | | |
| | | const dangerSourceState = reactive<DangerSourceType>({ |
| | | disabled: false, |
| | | dangerList: [ |
| | | ], |
| | | dangerList: [], |
| | | classifyList:[ |
| | | {id:1, name: '有机'}, |
| | | {id:2, name: '酸'}, |
| | |
| | | }); |
| | | |
| | | const addDangerItem = () => { |
| | | dangerSourceState.dangerList.push({dangerFactor: '', feature: '', amount: null, info: ''}); |
| | | dangerSourceState.dangerList.push({riskSource: '', riskCharacteristic: '', number: null, description: ''}); |
| | | }; |
| | | |
| | | const deleteDangerItem = (index: number) => { |