| | |
| | | <div class="system-menu-dialog-container"> |
| | | <el-dialog title="管理实验现实风险" v-model="assessApplyDialogState.assessApplyDialogVisible" width="60%"> |
| | | <div> |
| | | <el-button @click="openUnitDialog('新增','', assessApplyDialogState.id, assessApplyDialogState.liabilityUserId)" type="primary" style="margin-bottom: 20px" size="default">增加风险分析单元</el-button> |
| | | <el-button @click="openUnitDialog('新增','', assessApplyDialogState.id)" type="primary" style="margin-bottom: 20px" size="default">增加风险分析单元</el-button> |
| | | </div> |
| | | <el-table ref="multipleTableRef" :data="assessApplyDialogState.riskUnitData" style="width: 100%" :header-cell-style="{ background: '#fafafa' }"> |
| | | <el-table-column prop="riskCode" label="风险单元编号"/> |
| | |
| | | <el-table-column prop="riskUnitType" label="风险单元类型"/> |
| | | <el-table-column prop="riskUnitType" label="负责人"> |
| | | <template #default="scope"> |
| | | <span>{{`${assessApplyDialogState.allPersonList.find(item =>item.id === scope.row.liabilityUserId)?.realName || ''}`}}</span> |
| | | <span>{{`${assessApplyDialogState.allPersonList.find(item =>item.id === scope.row.liabilityUserId)?.personName || ''}`}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="evaluateStatus" label="是否评价"> |
| | |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="150" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="default" text type="primary" @click="openUnitDialog('查看', scope.row, assessApplyDialogState.id, assessApplyDialogState.liabilityUserId)">查看</el-button> |
| | | <el-button size="default" text type="primary" @click="openUnitDialog('编辑', scope.row, assessApplyDialogState.id, assessApplyDialogState.liabilityUserId)">编辑</el-button> |
| | | <el-button size="default" text type="primary" @click="openUnitDialog('查看', scope.row, assessApplyDialogState.id)">查看</el-button> |
| | | <el-button size="default" text type="primary" @click="openUnitDialog('编辑', scope.row, assessApplyDialogState.id)">编辑</el-button> |
| | | <el-button size="default" text type="danger" @click="deleteUnit(scope.$index, scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | getRiskData() |
| | | }; |
| | | |
| | | const openUnitDialog = (title: string, val, id: number, userId: number) => { |
| | | riskUnitDialogRef.value.showRiskUnitDialog(title, val, id, userId, assessApplyDialogState.basicUnitList, assessApplyDialogState.allPersonList, assessApplyDialogState.allRiskTypeList); |
| | | const openUnitDialog = (title: string, val, id: number) => { |
| | | riskUnitDialogRef.value.showRiskUnitDialog(title, val, id, assessApplyDialogState.basicUnitList, assessApplyDialogState.allPersonList, assessApplyDialogState.allRiskTypeList); |
| | | }; |
| | | |
| | | const getRiskData = async () => { |
| | |
| | | }; |
| | | |
| | | const getAllPersonList = async () => { |
| | | let res = await userApi().getUserList({ |
| | | pageIndex: 1, |
| | | pageSize: 99999, |
| | | searchParams:{ |
| | | roleId: null, |
| | | name: '', |
| | | realName: '' |
| | | } |
| | | }); |
| | | if(res.data.code === 200){ |
| | | let res = await personApi().getAllPerson(); |
| | | if(res.data.code === 100){ |
| | | assessApplyDialogState.allPersonList = JSON.parse(JSON.stringify(res.data.data)); |
| | | }else{ |
| | | ElMessage({ |