| | |
| | | <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="操作" width="150"> |
| | | <el-table-column label="操作" width="200" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" @click="onOpenDialogRef('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" text type="danger" @click="onDelSafetyRiskEvent(scope.row)">删除</el-button> |
| | | <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button> |
| | | <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" text type="danger" :icon="Delete" @click="onDelSafetyRiskEvent(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <br /> |
| | | <el-pagination |
| | | @size-change="onHandleSizeChange" |
| | | @current-change="onHandleCurrentChange" |
| | | class="page-position" |
| | | :pager-count="5" |
| | | :page-sizes="[10, 20, 30]" |
| | | v-model:current-page="safetyRiskEventData.params.pageIndex" |
| | | background |
| | | v-model:page-size="safetyRiskEventData.params.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="safetyRiskEventData.total" |
| | | > |
| | | </el-pagination> |
| | | <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="page-position" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="safetyRiskEventData.params.pageIndex" background v-model:page-size="safetyRiskEventData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="safetyRiskEventData.total"> </el-pagination> |
| | | <br /> |
| | | <br /> |
| | | </el-card> |
| | |
| | | import { safetyRiskEventApi } from '/@/api/doublePreventSystem/safetyRiskEvent/index.ts'; |
| | | import { departmentApi } from '/@/api/department'; |
| | | import { safetyRiskAnalyseUnitApi } from '/@/api/doublePreventSystem/safetyRiskAnalyseUnit'; |
| | | import { Edit, Delete, View } from '@element-plus/icons-vue'; |
| | | |
| | | // 定义接口来定义对象的类型 |
| | | interface TableData { |
| | |
| | | |
| | | export default { |
| | | name: 'productionDevice', |
| | | components: { safetyRiskEventDialog }, |
| | | components: { safetyRiskEventDialog, Edit, Delete, View }, |
| | | setup() { |
| | | const safetyRiskEventDialogRef = ref(); |
| | | const state = reactive<TableDataState>({ |
| | |
| | | const getAllSafetyRiskEventData = async () => { |
| | | let res = await safetyRiskAnalyseUnitApi().getAllSafetyRiskAnalyseUnitList(); |
| | | if (res.data.code === '200') { |
| | | state.allSafetyRiskEventData = JSON.parse(JSON.stringify(res.data.data)); |
| | | state.allSafetyRiskEventData = res.data.data; |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | }); |
| | | |
| | | return { |
| | | Edit, |
| | | Delete, |
| | | View, |
| | | handleSearch, |
| | | onOpenDialogRef, |
| | | onHandleSizeChange, |