| | |
| | | <template> |
| | | <tr class="m-color b-font" style="text-align: center">主要危险源或有害因素</tr> |
| | | <tr class="m-color b-font required" style="text-align: center">主要危险源或有害因素</tr> |
| | | <tr> |
| | | <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>--> |
| | | <td class="w-16 m-color">序号</td> |
| | | <td class="w-16 m-color">危险源或有害因素</td> |
| | | <td class="w-16 m-color">危险特性</td> |
| | | <td class="w-16 m-color">数量</td> |
| | | <td class="w-16 m-color">其他说明</td> |
| | | <td class="w-16 m-color">操作</td> |
| | | </tr> |
| | | <tr v-for="(item,index) in dangerSourceState.dangerList" :key="index"> |
| | | <td class="w-20"> |
| | | <td class="w-16"> |
| | | {{ index + 1 }} |
| | | </td> |
| | | <td class="w-20"> |
| | | <el-input disabled v-model="item.riskSource"></el-input> |
| | | <td class="w-16"> |
| | | <el-input :disabled="dangerSourceState.disabled" v-model="item.riskSource"></el-input> |
| | | </td> |
| | | <td class="w-20"> |
| | | <el-input disabled v-model="item.riskCharacteristic"></el-input> |
| | | <td class="w-16"> |
| | | <el-input :disabled="dangerSourceState.disabled" v-model="item.riskCharacteristic"></el-input> |
| | | </td> |
| | | <td class="w-20"> |
| | | <el-input disabled type="number" v-model="item.number"></el-input> |
| | | <td class="w-16"> |
| | | <el-input :disabled="dangerSourceState.disabled" type="number" v-model="item.number"></el-input> |
| | | </td> |
| | | <td class="w-20"> |
| | | <el-input disabled v-model="item.description"></el-input> |
| | | <td class="w-16"> |
| | | <el-input :disabled="dangerSourceState.disabled" v-model="item.description"></el-input> |
| | | </td> |
| | | <!-- <td class="w-18">--> |
| | | <!-- <el-button disabled type="danger" @click="deleteDangerItem(index)">删除</el-button>--> |
| | | <!-- </td>--> |
| | | <td class="w-16"> |
| | | <el-button :disabled="dangerSourceState.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: [], |
| | | classifyList:[ |
| | | {id:1, name: '有机'}, |
| | | {id:2, name: '酸'}, |
| | | {id:3, name: '碱性'}, |
| | | {id:4, name: '固体废弃物'}, |
| | | {id:5, name: '医疗废弃物'}, |
| | | {id:6, name: '过期化学品'}, |
| | | {id:7, name: '其他'} |
| | | ], |
| | | wasteStorageList: [ |
| | | {id:1, name: '吨袋'}, |
| | | {id:2, name: '吨桶'}, |
| | | {id:3, name: '小桶'}, |
| | | {id:4, name: '托盘'}, |
| | | {id:5, name: '其他'}, |
| | | ] |
| | | dangerList: [] |
| | | }) |
| | | |
| | | watchEffect(() => { |
| | |
| | | }); |
| | | |
| | | const addDangerItem = () => { |
| | | console.log(dangerSourceState.dangerList,'list') |
| | | dangerSourceState.dangerList.push({riskSource: '', riskCharacteristic: '', number: null, description: ''}); |
| | | }; |
| | | |
| | |
| | | } |
| | | |
| | | defineExpose({ |
| | | formatList, |
| | | dataList: dangerSourceState.dangerList, |
| | | dangerSourceState |
| | | }); |
| | | |
| | | </script> |
| | |
| | | &:last-of-type { |
| | | border-bottom: none; |
| | | } |
| | | |
| | | &.required { |
| | | &::before { |
| | | content: "*"; |
| | | display: inline-block; |
| | | color: red; |
| | | } |
| | | } |
| | | td { |
| | | border-right: 1px solid #ccc; |
| | | display: inline-block; |