| | |
| | | </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="onDelRiskControlMeasure(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="onDelRiskControlMeasure(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="riskControlMeasureData.params.pageIndex" |
| | | background |
| | | v-model:page-size="riskControlMeasureData.params.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="riskControlMeasureData.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="riskControlMeasureData.params.pageIndex" background v-model:page-size="riskControlMeasureData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="riskControlMeasureData.total"> </el-pagination> |
| | | <br /> |
| | | <br /> |
| | | </el-card> |
| | |
| | | import riskControlMeasureDialog from './components/riskControlMeasureDialog.vue'; |
| | | import { riskControlMeasureApi } from '/@/api/doublePreventSystem/riskControlMeasure/index.ts'; |
| | | import { safetyRiskEventApi } from '/@/api/doublePreventSystem/safetyRiskEvent'; |
| | | import { Edit, Delete, View } from '@element-plus/icons-vue'; |
| | | |
| | | // 定义接口来定义对象的类型 |
| | | interface TableData { |
| | |
| | | |
| | | export default { |
| | | name: 'riskControlMeasure', |
| | | components: { riskControlMeasureDialog }, |
| | | components: { riskControlMeasureDialog, Edit, Delete, View }, |
| | | setup() { |
| | | const riskControlMeasureDialogRef = ref(); |
| | | const state = reactive<TableDataState>({ |
| | |
| | | |
| | | const dateFormat = (fmt: any, date: any) => { |
| | | date = new Date(date); |
| | | fmt = |
| | | date.getFullYear() + |
| | | '-' + |
| | | (date.getMonth() + 1) + |
| | | '-' + |
| | | date.getDate() + |
| | | ' ' + |
| | | date.getHours().toString() + |
| | | ':' + |
| | | (date.getMinutes().toString() === '0' ? '00' : date.getMinutes().toString()) + |
| | | ':' + |
| | | (date.getSeconds().toString() === '0' ? '00' : date.getMinutes().toString()); |
| | | fmt = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + ' ' + date.getHours().toString() + ':' + (date.getMinutes().toString() === '0' ? '00' : date.getMinutes().toString()) + ':' + (date.getSeconds().toString() === '0' ? '00' : date.getMinutes().toString()); |
| | | return fmt; |
| | | }; |
| | | |
| | |
| | | |
| | | // 打开生产装置弹窗 |
| | | const onOpenDialogRef = (type: string, value: any) => { |
| | | riskControlMeasureDialogRef.value.openSafetyRiskEventDialog( |
| | | type, |
| | | value, |
| | | state.allSafetyRiskEventData, |
| | | state.classifyOneList, |
| | | state.classifyTwoList |
| | | ); |
| | | riskControlMeasureDialogRef.value.openSafetyRiskEventDialog(type, value, state.allSafetyRiskEventData, state.classifyOneList, state.classifyTwoList); |
| | | }; |
| | | |
| | | // 删除角色 |
| | |
| | | }); |
| | | |
| | | return { |
| | | Edit, |
| | | Delete, |
| | | View, |
| | | dateFormat, |
| | | handleSearch, |
| | | parseNumber, |