马宇豪
2023-10-31 f1f40e9a28fafab5d884630b8900b11060ebe9fc
src/views/experiment/developing/index.vue
@@ -64,14 +64,19 @@
                        <el-table-column prop="stage" label="评估状态">
                          <template #default="scope">
                            <el-tag :type="scope.row.stage == 4?'success':scope.row.stage == 1?'info':''">
                              {{scope.row.stage == 1?'未评估':scope.row.status == 2?'评估中':scope.row.status == 3?'评估完成':scope.row.status == 4?'生成报告':'--'}}
                              {{scope.row.stage == 1?'未评估':scope.row.stage == 2?'评估中':scope.row.stage == 3?'评估完成':scope.row.stage == 4?'生成报告':'--'}}
                            </el-tag>
                          </template>
                        </el-table-column>
                        <el-table-column prop="status" label="最近评估时间" show-overflow-tooltip>
                          <template #default="scope">
                            <span>{{scope.row.experimentAssessLogs?scope.row.experimentAssessLogs.map(i=>i.assessEndTime.substring(0,16)).join(','): ''}}</span>
                          </template>
                        </el-table-column>
                        <el-table-column prop="assessLevel" label="风险等级">
                          <template #default="scope">
                            <el-tag :type="scope.row.assessLevel == 4?'danger':scope.row.assessLevel == 3 || scope.row.assessLevel == 2?'warning':''">
                              {{scope.row.assessLevel == 1?'低风险':scope.row.assessLevel == 2?'一般风险':scope.row.assessLevel == 3?'较大风险':scope.row.assessLevel == 4?'重大风险':'--'}}
                              {{scope.row.assessLevel == 1?'重大风险':scope.row.assessLevel == 2?'较大风险':scope.row.assessLevel == 3?'一般风险':scope.row.assessLevel == 4?'低风险':'--'}}
                            </el-tag>
                          </template>
                        </el-table-column>
@@ -82,7 +87,8 @@
                        <el-table-column label="操作" width="250" fixed="right">
                            <template #default="scope">
                                <el-button size="small" text type="primary" :icon="View" @click="openProjectDialog('查看', scope.row)">查看</el-button>
                                <el-button size="small" :disabled="scope.row.status == 2 ? true : false" text type="primary" :icon="Edit" @click="applyAccess( scope.row)">申请评估</el-button>
                                <el-button size="small" text type="primary" :icon="View" v-if="scope.row.stage == 4" @click="openReportDialog('查看',scope.row)">查看评估报告</el-button>
                                <el-button size="small" :disabled="scope.row.stage == 2 ? true : false" text type="primary" :icon="Edit" @click="applyAccess( scope.row)">申请评估</el-button>
                                <el-button size="small" :disabled="(scope.row.status == 2 && scope.row.stage == 1) ? false : true" text type="warning" :icon="RefreshLeft" @click="cancelAccess( scope.row)">撤销评估</el-button>
                                <el-button size="small" type="warning" v-if="scope.row.rectifyStatus == 1" text :icon="Edit" @click="openProjectDialog('整改', scope.row)">整改</el-button>
                            </template>
@@ -97,6 +103,7 @@
        <develop-dialog ref="DevelopDialogRef" @refresh="getdevelopData"></develop-dialog>
<!--        <apply-start ref="ApplyStartRef"></apply-start>-->
        <test ref="ApplyStartRef" @refresh="getdevelopData"></test>
        <report-dialog ref="ReportDialogRef"></report-dialog>
    </div>
</template>
@@ -106,13 +113,13 @@
import {ElMessage, ElMessageBox} from "element-plus";
import { View,Edit, Plus, RefreshLeft } from '@element-plus/icons-vue';
import {roomApi} from "/@/api/basic/room";
const ReportDialog = defineAsyncComponent(() => import('../../analyse/assessApply/components/reportDialog.vue'));
const DevelopDialog = defineAsyncComponent(() => import('./components/developDialog.vue'));
const Test = defineAsyncComponent(() => import('./components/applyDialog.vue'))
const DevelopDialogRef = ref();
const ApplyStartRef = ref();
const DevelopDialogRef = ref()
const ApplyStartRef = ref()
const ReportDialogRef = ref()
const developState = reactive<ProjectStateType>({
    developData: [],
    searchQuery: {
@@ -152,6 +159,10 @@
    DevelopDialogRef.value.showDevelopDialog(title, value, developState.allRoomList);
};
const openReportDialog = (title: string,value: ProjectType) =>{
  ReportDialogRef.value.showReportDialog(title, value, developState.allRoomList);
}
const applyAccess = (val: ProjectType) => {
    ElMessageBox.confirm(`此操作将申请评估该实验:“${val.experimentName}”,是否继续?`, '提示', {
        confirmButtonText: '确认',