马宇豪
2023-04-12 8d14fec97344df49d58db115852c03b466482bc6
设备、场所、部门接口
已修改30个文件
已添加9个文件
已删除1个文件
6008 ■■■■ 文件已修改
src/api/analyse/assessApply/index.ts 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/analyse/evaluate/index.ts 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/analyse/identify/index.ts 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/analyse/plan/index.ts 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/basic/unit/index.ts 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/experiment/project/index.ts 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/navBars/breadcrumb/user.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/navBars/tagsView/tagsView.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/assessApply/components/reportDialog.vue 496 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/assessApply/components/riskDialog.vue 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/assessApply/components/riskUnitDialog.vue 195 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/assessApply/components/selectDanger.vue 192 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/assessApply/index.ts 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/assessApply/index.vue 352 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/evaluate/components/evaluateDialog.vue 1092 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/evaluate/index.ts 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/evaluate/index.vue 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/identify/components/identifyDialog.vue 497 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/identify/components/identifyQuery.vue 167 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/identify/index.ts 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/identify/index.vue 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/plan/components/planDialog.vue 67 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/plan/index.ts 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/plan/index.vue 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/riskUnit/components/riskUnitDialog.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/riskUnit/index.ts 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analyse/riskUnit/index.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/developing/components/developDialog.vue 638 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/developing/components/projectDialog.vue 533 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/developing/index.vue 145 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/project/components/applyDialog.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/project/components/projectDialog.vue 251 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/project/components/selectDanger.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/project/components/selectEquipment.vue 75 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/project/components/selectMaterial.vue 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/project/components/selectPerson.vue 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/project/components/selectRoom.vue 268 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/project/index.ts 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/project/index.vue 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/loginPage/component/accountLogin.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/analyse/assessApply/index.ts
对比新文件
@@ -0,0 +1,13 @@
import request from '/@/utils/request';
export function assessApplyApi() {
    return {
        getData: (params: object) => {
            return request({
                url: import.meta.env.VITE_API_URL + '/experimentInfo/list/page/apply/evaluation',
                method: 'post',
                data: params
            });
        },
    };
}
src/api/analyse/evaluate/index.ts
@@ -19,6 +19,14 @@
            });
        },
        modEvaluateMethod: (params: object) => {
            return request({
                url: import.meta.env.VITE_API_URL + '/risk/update/evaluateUpdateMethod',
                method: 'post',
                data: params
            });
        },
        deleteEvaluateById: (params: object) => {
            return request({
                url: import.meta.env.VITE_API_URL + '/risk/delete/deleteIdentification',
@@ -35,5 +43,74 @@
            });
        },
        getListLecL: () => {
            return request({
                url: import.meta.env.VITE_API_URL + '/basic/select/listLecL',
                method: 'get'
            });
        },
        getListLecE: () => {
            return request({
                url: import.meta.env.VITE_API_URL + '/basic/select/listLecE',
                method: 'get'
            });
        },
        getListLecC: () => {
            return request({
                url: import.meta.env.VITE_API_URL + '/basic/select/listLecC',
                method: 'get'
            });
        },
        getListLsL: () => {
            return request({
                url: import.meta.env.VITE_API_URL + '/basic/select/listLsL',
                method: 'get'
            });
        },
        getListLsS: () => {
            return request({
                url: import.meta.env.VITE_API_URL + '/basic/select/listLsS',
                method: 'get'
            });
        },
        getListRsR: () => {
            return request({
                url: import.meta.env.VITE_API_URL + '/basic/select/listRsR',
                method: 'get'
            });
        },
        getListRsS: () => {
            return request({
                url: import.meta.env.VITE_API_URL + '/basic/select/listRsS',
                method: 'get'
            });
        },
        getListMesM: () => {
            return request({
                url: import.meta.env.VITE_API_URL + '/basic/select/listMesM',
                method: 'get'
            });
        },
        getListMesE: () => {
            return request({
                url: import.meta.env.VITE_API_URL + '/basic/select/listMesE',
                method: 'get'
            });
        },
        getListMesS: () => {
            return request({
                url: import.meta.env.VITE_API_URL + '/basic/select/listMesS',
                method: 'get'
            });
        },
    };
}
src/api/analyse/identify/index.ts
@@ -18,7 +18,6 @@
            });
        },
        modIdentify: (params: object) => {
            return request({
                url: import.meta.env.VITE_API_URL + '/risk/update/updateIdentification',
@@ -27,6 +26,16 @@
            });
        },
        // 修改辨识方法
        UpdateIdentifyMethod: (params: object) => {
            return request({
                url: import.meta.env.VITE_API_URL + '/risk/update/identificationUpdateMethod',
                method: 'post',
                data: params
            });
        },
        deleteIdentifyById: (params: object) => {
            return request({
                url: import.meta.env.VITE_API_URL + '/risk/delete/deleteIdentification',
src/api/analyse/plan/index.ts
@@ -49,5 +49,29 @@
                method: 'get',
            });
        },
        refuseIdentify: (params: object)=>{
            return request({
                url: import.meta.env.VITE_API_URL + '/risk/update/identificationRefuse',
                method: 'post',
                data: params
            });
        },
        refuseEvaluate: (params: object)=>{
            return request({
                url: import.meta.env.VITE_API_URL + '/risk/update/evaluateRefuse',
                method: 'post',
                data: params
            });
        },
        refuseScene: (params: object)=>{
            return request({
                url: import.meta.env.VITE_API_URL + '/risk/update/sceneRefuse',
                method: 'post',
                data: params
            });
        }
    };
}
src/api/basic/unit/index.ts
@@ -41,5 +41,12 @@
            });
        },
        getAllUnitType: () => {
            return request({
                url: import.meta.env.VITE_API_URL + '/basic/select/listRiskUnitType',
                method: 'get',
            });
        },
    };
}
src/api/experiment/project/index.ts
@@ -10,6 +10,14 @@
            });
        },
        getDevelopByList: (params: object) => {
            return request({
                url: import.meta.env.VITE_API_URL + '/experimentInfo/list/page/develop',
                method: 'post',
                data: params
            });
        },
        addProject: (params: object) => {
            return request({
                url: import.meta.env.VITE_API_URL + '/experimentInfo/save',
@@ -18,9 +26,17 @@
            });
        },
        addDevelop: (params: object) => {
            return request({
                url: import.meta.env.VITE_API_URL + '/experimentInfo/develop/save',
                method: 'post',
                data: params
            });
        },
        modProject: (params: object) => {
            return request({
                url: import.meta.env.VITE_API_URL + '/experimentInfo/mod',
                url: import.meta.env.VITE_API_URL + '/experimentInfo/rectify/save',
                method: 'post',
                data: params
            });
@@ -42,6 +58,14 @@
            });
        },
        cancelProject: (params: object) => {
            return request({
                url: import.meta.env.VITE_API_URL + '/experimentInfo/update/revoke/apply/evaluation',
                method: 'post',
                data: params
            });
        },
        deleteProjectById: (params: object) => {
            return request({
                url: import.meta.env.VITE_API_URL + '/experimentInfo/delete',
src/layout/navBars/breadcrumb/user.vue
@@ -1,8 +1,9 @@
<template>
    <div class="layout-navbars-breadcrumb-user pr15" :style="{ flex: layoutUserFlexNum }">
        <div class="logo">
            <img @click="toHome" src="../../../assets/menu/company.png" />
            <span>{{ systemName }}</span>
<!--            <img @click="toHome" src="../../../assets/menu/company.png" />-->
            <img src="../../../assets/menu/company.png" />
<!--            <span>{{ systemName }}</span>-->
        </div>
        <div style="display: flex; align-items: center; padding-right: 5px">
<!--            <div @click="backToMenu()" class="backBtn">返回首页</div>-->
@@ -301,7 +302,7 @@
        .logo{
            img {
                height: 100%;
                cursor: pointer;
                //cursor: pointer;
            }
            span{
                font-size: 32px;
@@ -326,7 +327,7 @@
        .logo{
            img {
                height: 90%;
                cursor: pointer;
                //cursor: pointer;
            }
            span{
                font-size: 28px;
@@ -352,7 +353,7 @@
            img {
                width: 60%;
                height: auto;
                cursor: pointer;
                //cursor: pointer;
            }
            span{
                font-size: 22px;
src/layout/navBars/tagsView/tagsView.vue
@@ -530,7 +530,7 @@
            // 监听布局配置开启 TagsView 共用,为了演示还原默认值
            proxy.mittBus.on('openShareTagsView', () => {
                if (getThemeConfig.value.isShareTagsView) {
                    router.push('/home');
                    router.push('/project');
                    state.tagsViewList = [];
                    state.tagsViewRoutesList.map((v: any) => {
                        if (v.meta.isAffix && !v.meta.isHide) {
src/views/analyse/assessApply/components/reportDialog.vue
对比新文件
@@ -0,0 +1,496 @@
<template>
    <div class="system-menu-dialog-container">
        <el-dialog :title="reportDialogState.title" v-model="reportDialogState.reportDialogVisible" width="80%">
            <el-form ref="reportFormRef" :rules="reportDialogState.reportFormRules" :model="reportDialogState.reportForm" size="default" label-width="0">
                <table class="report-table">
                    <th class="m-color b-font" style="text-align: center">实验基本信息</th>
                    <tr>
                        <td class="w-25 m-color required">实验名称</td>
                        <td class="w-75 m-color">
                            <el-form-item prop="experimentName">
                                <el-input readonly v-model="reportDialogState.reportForm.experimentName" placeholder="请输入实验名称" />
                            </el-form-item>
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color required">实验类型</td>
                        <td class="w-75 m-color">
                            <el-radio-group style="text-align: center" disabled v-model="reportDialogState.reportForm.experimentType">
                                <el-radio :label="1">化学类</el-radio>
                                <el-radio :label="2">生物类</el-radio>
                                <el-radio :label="3">辐射类</el-radio>
                                <el-radio :label="4">机电类</el-radio>
                                <el-radio :label="5">特种设备类</el-radio>
                                <el-radio :label="6">其他类</el-radio>
                            </el-radio-group>
                        </td>
                    </tr>
                    <tr>
                      <td class="w-25 m-color required">负责人</td>
                      <td class="w-25 m-color">
                        <el-select style="width: 100%" disabled v-model="reportDialogState.reportForm.liabilityUserId" clearable filterable @change="getLiabilityUserPhone($event)">
                          <el-option
                              v-for="item in reportDialogState.systemPersonList"
                              :key="item.id"
                              :value="item.id"
                              :label="item.realName"
                          ></el-option>
                        </el-select>
                      </td>
                      <td class="w-25 m-color required">电话</td>
                      <td class="w-25 m-color">
                        <el-input readonly v-model="reportDialogState.reportForm.liabilityUserPhone" />
                      </td>
                    </tr>
                    <tr>
                      <td class="w-25 m-color required">安全负责人</td>
                      <td class="w-25 m-color">
                        <el-select v-if="reportDialogState.reportForm.safeLiabilityUserId" style="width: 100%" disabled v-model="reportDialogState.reportForm.safeLiabilityUserId" @change="getSafeLiabilityUserPhone($event)" clearable filterable>
                          <el-option
                              v-for="item in reportDialogState.allPersonList"
                              :key="item.id"
                              :value="item.id"
                              :label="item.personName"
                          ></el-option>
                        </el-select>
                        <el-input v-else disabled v-model="reportDialogState.reportForm.safeLiabilityUser" />
                      </td>
                      <td class="w-25 m-color required">电话</td>
                      <td class="w-25 m-color">
                        <el-input readonly v-model="reportDialogState.reportForm.safeLiabilityUserPhone" />
                      </td>
                    </tr>
                    <tr>
                      <td class="w-25 m-color required">部门</td>
                      <td class="w-75 m-color">
                        <el-input readonly v-model="reportDialogState.reportForm.dep" />
                      </td>
                    </tr>
                    <tr class="m-color b-font" style="text-align: center">实验场所</tr>
                    <tr>
                      <td class="w-14 m-color required">场所名称</td>
                      <td class="w-14 m-color">所在楼栋</td>
                      <td class="w-14 m-color">房间</td>
                      <td class="w-14 m-color">有无消防设施</td>
                      <td class="w-14 m-color">有无隔断</td>
                      <td class="w-14 m-color">场所性质</td>
                    </tr>
                    <tr v-for="(item,index) in reportDialogState.reportForm.siteList" :key="index">
                      <td class="w-14">
                        <el-select disabled filterable v-model="item.siteId">
                          <el-option
                              v-for="item in reportDialogState.allRoomList"
                              :key="item.id"
                              :value="item.id"
                              :label="item.siteName"
                          >
                          </el-option>
                        </el-select>
                      </td>
                      <td class="w-14">
                        <el-input disabled v-model="item.floor" />
                      </td>
                      <td class="w-14">
                        <el-input disabled v-model="item.room" />
                      </td>
                      <td class="w-14">
                        <div>{{item.fireFacilities== 1 ? '有' : item.fireFacilities== 2 ? '无' : ''}}</div>
                      </td>
                      <td class="w-14">
                        <div>{{item.partitionStatus == 1 ? '有' : item.partitionStatus == 2 ? '无' : ''}}</div>
                      </td>
                      <td class="w-14">
                        <div>{{item.siteType}}</div>
                      </td>
                    </tr>
                    <tr>
                      <td class="w-25 m-color required">评估人</td>
                      <td class="w-25 m-color">
                        <el-select style="width: 100%" :disabled="reportDialogState.disabled" v-model="reportDialogState.reportForm.assessUserId" clearable filterable>
                          <el-option
                              v-for="item in reportDialogState.allPersonList"
                              :key="item.id"
                              :value="item.id"
                              :label="item.personName"
                          ></el-option>
                        </el-select>
                      </td>
                      <td class="w-25 m-color required">评估时间</td>
                      <td class="w-25 m-color">
                        <el-date-picker :disabled="reportDialogState.disabled"  type="datetime" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" v-model="reportDialogState.reportForm.assessTime" />
                      </td>
                    </tr>
                    <tr class="m-color b-font" style="text-align: center">实验概况</tr>
                    <tr>
                        <el-input type="textarea" :autosize="{ minRows: 3}" :disabled="reportDialogState.disabled" v-model="reportDialogState.reportForm.experimentDesc" placeholder="(简要描述实验原理、实验步骤、所用试剂或材料设备等)" />
                    </tr>
                    <tr class="m-color b-font" style="text-align: center">实验涉及的危险源</tr>
                    <tr>
                      <td class="w-25 m-color required">危险源种类</td>
                      <td class="w-75 m-color">
                        <el-radio-group :disabled="reportDialogState.disabled"  v-model="reportDialogState.reportForm.dangerSource">
                          <el-radio :label="1">化学安全</el-radio>
                          <el-radio :label="2">辐射安全</el-radio>
                          <el-radio :label="3">特种设备安全</el-radio>
                          <el-radio :label="4">机电安全</el-radio>
                          <el-radio :label="5">电气安全</el-radio>
                          <el-radio :label="6">生物安全</el-radio>
                          <el-radio :label="7">激光安全</el-radio>
                          <el-radio :label="8">其他安全</el-radio>
                        </el-radio-group>
                      </td>
                    </tr>
                    <select-danger ref="selectDangerRef" v-model:data="reportDialogState.reportForm.riskSource" v-model:disabled="reportDialogState.disabled"></select-danger>
                    <tr class="m-color b-font" style="text-align: center">安全风险分析(总结)</tr>
                    <tr>
                      <el-input type="textarea" :autosize="{ minRows: 3}" :disabled="reportDialogState.disabled" v-model="reportDialogState.reportForm.safeRiskAnalysis" placeholder="1.实验过程中是否有爆炸、火灾、腐蚀、中毒风险、产生危险废弃物等(根据危险源清单,分析实验过程中可能对人身安全、人体健康、实验室环境和周边环境等带来的负面影响)" />
                    </tr>
                    <tr class="m-color b-font" style="text-align: center">拟采取的防护和应急措施</tr>
                    <tr>
                      <el-input type="textarea" :autosize="{ minRows: 3}" :disabled="reportDialogState.disabled" v-model="reportDialogState.reportForm.emergencyMeasure" placeholder="" />
                    </tr>
                    <tr class="m-color b-font" style="text-align: center">实验和实验项目综合风险等级评定</tr>
                    <tr>
                      <td class="m-color" style="width: 100%">
                        <el-radio-group :disabled="reportDialogState.disabled"  v-model="reportDialogState.reportForm.assessLevel">
                          <el-radio :label="4">重大风险(一级)</el-radio>
                          <el-radio :label="3">较大风险(二级)</el-radio>
                          <el-radio :label="2">一般风险(三级)</el-radio>
                          <el-radio :label="1">低风险(四级)</el-radio>
                        </el-radio-group>
                      </td>
                    </tr>
                    <tr>
                      <el-input type="textarea" :autosize="{ minRows: 3}" :disabled="reportDialogState.disabled" v-model="reportDialogState.reportForm.reskLevelReason" placeholder="请输入评定依据" />
                    </tr>
                </table>
            </el-form>
            <template #footer>
              <span class="dialog-footer" style="padding-top:10px;text-align: center !important;">
                <el-button @click="reportDialogState.reportDialogVisible = !reportDialogState.reportDialogVisible" size="default">取 消</el-button>
                <el-button type="primary" v-if="!reportDialogState.disabled" @click="onSubmitProject" size="default">提交审批</el-button>
              </span>
            </template>
        </el-dialog>
    </div>
</template>
<script setup lang="ts">
import {defineAsyncComponent, nextTick, onMounted, reactive, ref} from "vue";
import {ElMessage} from "element-plus";
import {projectApi} from "/@/api/experiment/project";
import {personApi} from "/@/api/basic/person";
import {userApi} from "/@/api/systemManage/user";
import {roomApi} from "/@/api/basic/room";
const SelectDanger = defineAsyncComponent(() => import('./selectDanger.vue'))
const selectDangerRef = ref()
const reportFormRef = ref()
const reportDialogState = reactive<ReportDialogType>({
    title: '',
    disabled: false,
    reportDialogVisible: false,
    reportForm:   {
        id: null,
        experimentName: "",
        experimentType: null,
        liabilityUserId: null,
        liabilityUserPhone: '',
        safeLiabilityUserId: null,
        safeLiabilityUser: '',
        safeLiabilityUserPhone: '',
        dep: "",
        siteList: [],
        experimentDesc: '',
        safeRiskAnalysis: '',
        emergencyMeasure: '',
        assessLevel:null,
        riskSource: []
    },
    reportFormRules: {},
    allPersonList: [],
    allRoomList: [],
    systemPersonList: [],
})
const showReportDialog = (title: string, value: ProjectType, allRoomList: RoomType []) => {
    reportDialogState.reportDialogVisible = true;
    reportDialogState.allRoomList = allRoomList
    setTimeout(() => {
        reportFormRef.value.clearValidate();
    });
    if(title === '提交'){
      reportDialogState.title = '提交报告';
      reportDialogState.disabled = false
      for(let i in reportDialogState.reportForm) {
        if(isValidKey(i, reportDialogState.reportForm)) {
          reportDialogState.reportForm[i] = value[i];
        }
      }
    }else{
        reportDialogState.title = '查看';
        reportDialogState.disabled = true
        for(let i in reportDialogState.reportForm) {
            if(isValidKey(i, reportDialogState.reportForm)) {
                reportDialogState.reportForm[i] = value[i];
            }
        }
    }
};
const isValidKey = (key: string | number | symbol, object:object): key is keyof typeof object =>{
    return key in object;
};
const getLiabilityUserPhone = (value: number)=>{
  const data = reportDialogState.systemPersonList.find(item => item.id === value) as AllPersonListType
  reportDialogState.reportForm.liabilityUserPhone = data.phone
}
const getSafeLiabilityUserPhone = (value: number)=>{
  const data = reportDialogState.allPersonList.find(item => item.id === value) as AllPersonListType
  reportDialogState.reportForm.safeLiabilityUserPhone = data.phone
}
const hasSafeSystem = (value: number) =>{
  if(value == 2){
    reportDialogState.reportForm.safeInformationSystem = ''
  }
}
const onSubmitProject = () => {
    reportFormRef.value.validate(async(valid: boolean) => {
        if(valid){
            if(reportDialogState.title === '新增'){
                let res = await projectApi().addDevelop(reportDialogState.reportForm);
                if(res.data.code === 100){
                    emit('refresh')
                    reportDialogState.reportDialogVisible = false;
                    ElMessage({
                        type: 'success',
                        message: '新增成功'
                    })
                }else{
                    ElMessage({
                        type: 'warning',
                        message: res.data.msg,
                    });
                }
            }else{
                let res = await projectApi().modProject(reportDialogState.reportForm)
                if(res.data.code === 100){
                  emit('refresh')
                  reportDialogState.reportDialogVisible = false;
                  ElMessage({
                    type: 'success',
                    message: '整改已提交'
                  })
                }else{
                  ElMessage({
                    type: 'warning',
                    message: res.data.msg,
                  });
                }
            }
        }else{
            ElMessage({
                type: 'warning',
                message: '请完善基本信息',
            });
        }
    })
};
const getPersonList = async () => {
    let res = await userApi().getUserList({
        roleId: 1,
        usePage: false,
        pageIndex: 1,
        pageSize: 10
    });
    if(res.data.code === 100){
        reportDialogState.systemPersonList = JSON.parse(JSON.stringify(res.data.data));
    }else{
        ElMessage({
            type: 'warning',
            message: res.data.msg
        })
    }
};
const getAllPersonList = async () => {
    let res = await personApi().getAllPerson();
    if(res.data.code === 100){
        reportDialogState.allPersonList = JSON.parse(JSON.stringify(res.data.data));
    }else{
        ElMessage({
            type: 'warning',
            message: res.data.msg
        })
    }
};
const emit = defineEmits(['refresh']);
defineExpose({
    showReportDialog,
});
onMounted(() => {
    getAllPersonList();
    getPersonList()
});
</script>
<style scoped lang="scss">
.site-layout-background {
    background: #fff;
}
.report-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #337ecc;
    margin: 20px 0;
th {
    padding: 10px 0;
    border: 1px solid #337ecc;
    border-left: none;
}
tr {
    width: 100%;
    height: 44px;
    line-height: 42px;
    border-bottom: 1px solid #ccc;
&:last-of-type {
     border-bottom: none;
 }
td {
    border-right: 1px solid #ccc;
    display: inline-block;
    height: 44px;
    vertical-align: middle;
    text-align: center;
    line-height: 42px;
  :deep(.el-input__wrapper ){
    box-shadow: none;
    margin-top: 6px;
  }
&:last-of-type {
     border-right: none;
 }
&.required {
  &::before {
    content: "*";
    display: inline-block;
    color: red;
  }
}
&.w-14 {
     width: calc((100/7)/100 * 100%);
 }
&.w-16 {
     width: calc((100/6)/100 * 100%);
 }
&.w-18 {
     width: 16.59%;
 }
&.w-20 {
     width: 20%;
 }
&.w-25 {
     width: 25%;
 }
&.w-50 {
     width: 50%;
 }
&.w-75 {
     width: 75%;
 }
.ant-input {
    height: 100%;
    border: none;
    background: #f5f7fa;
}
.ant-picker {
    width: 100%;
    height: 100%;
}
}
}
.b-font {
    font-size: 16px;
    font-weight: bolder;
}
}
.m-color {
    color: #0c4995;
}
.roomSelect{
  ::v-deep(.el-popper){
    .el-select-dropdown__item{
      height: auto;
      padding: 0;
      .roomTable{
        width: 100%;
        display: flex;
        border-bottom: 1px solid #ebeef5;
        &:last-of-type{
          border-bottom: none;
        }
        &>div{
          width: 25%;
          border-right: 1px dashed #ebeef5;
          &:last-of-type{
            border-right: none;
          }
          div{
            width: 100%;
          }
          .roomTit{
            border-bottom: 1px solid #ebeef5;
          }
        }
      }
    }
    .el-select-dropdown__item.selected{
      .roomTit{
        color: #606266;
        font-weight: normal;
      }
    }
  }
}
:deep(.el-dialog__footer){
    padding-top: 20px;
    display: flex;
    justify-content: center;
}
</style>
src/views/analyse/assessApply/components/riskDialog.vue
对比新文件
@@ -0,0 +1,137 @@
<template>
    <div class="system-menu-dialog-container">
        <el-dialog title="管理实验现实风险" v-model="assessApplyDialogState.assessApplyDialogVisible" width="60%">
          <div>
            <el-button @click="addUnit()" 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="riskName" label="风险单元名称"/>
            <el-table-column prop="riskType" label="风险类型">
              <template #default="scope">
                <span>{{`${assessApplyDialogState.riskList.find(item =>item.id === scope.row.riskType)?.name || ''}`}}</span>
              </template>
            </el-table-column>
            <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)?.personName || ''}`}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="evaluateStatus" label="是否评价">
              <template #default="scope">
                <span>{{scope.row.evaluateStatus == 1?'未评价':scope.row.evaluateStatus == 2?'已评价':'--'}}</span>
              </template>
            </el-table-column>
          </el-table>
          <template #footer>
            <span class="dialog-footer">
              <el-button @click="assessApplyDialogState.assessApplyDialogVisible = !assessApplyDialogState.assessApplyDialogVisible" type="primary" size="default">确定</el-button>
            </span>
          </template>
          <risk-unit-dialog ref="riskUnitDialogRef" @refresh="getRiskData"></risk-unit-dialog>
        </el-dialog>
    </div>
</template>
<script setup lang="ts">
import {defineAsyncComponent, onMounted, reactive, ref} from "vue";
import {ElMessage} from "element-plus";
import {projectApi} from "/@/api/experiment/project";
import {personApi} from "/@/api/basic/person";
import {riskUnitApi} from "/@/api/analyse/riskUnit";
import {unitApi} from "/@/api/basic/unit";
const RiskUnitDialog = defineAsyncComponent(() => import('./riskUnitDialog.vue'));
const assessApplyDialogState = reactive<AssessApplyDialogStateType>({
    title: '',
    riskUnitData: [],
    assessApplyDialogVisible: false,
    id: null,
    liabilityUserId: null,
    riskList: [
      {id: 1, name: '固有风险'},
      {id:2, name: '实验风险'}
    ],
    basicUnitList: [],
    allPersonList: [],
    allRiskTypeList: []
})
const riskUnitDialogRef = ref()
const showRiskDialog = (value: ProjectType) => {
    assessApplyDialogState.assessApplyDialogVisible = true;
    assessApplyDialogState.id = <number>value.id
    assessApplyDialogState.liabilityUserId = <number>value.liabilityUserId
    getRiskData(<number>value.id)
};
const addUnit = (id: number, value: RiskUnitType) => {
  riskUnitDialogRef.value.showRiskUnitDialog(assessApplyDialogState.id, assessApplyDialogState.liabilityUserId, assessApplyDialogState.basicUnitList, assessApplyDialogState.allPersonList, assessApplyDialogState.allRiskTypeList);
};
const getRiskData = async (id: number|null) => {
  let res = await riskUnitApi().getRiskUnitByList({pageIndex: 1,pageSize: 9999,riskCode: '',riskName: '',experimentId: id});
  if(res.data.code === 100){
    assessApplyDialogState.riskUnitData = JSON.parse(JSON.stringify(res.data.data));
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg
    })
  }
};
const getAllBasicUnitList = async () => {
  let res = await unitApi().getAllUnit();
  if(res.data.code === 100){
    assessApplyDialogState.basicUnitList = JSON.parse(JSON.stringify(res.data.data));
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg
    })
  }
};
const getAllPersonList = async () => {
  let res = await personApi().getAllPerson();
  if(res.data.code === 100){
    assessApplyDialogState.allPersonList = JSON.parse(JSON.stringify(res.data.data));
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg
    })
  }
};
const getAllTypeList = async () =>{
  let res = await unitApi().getAllUnitType()
  if(res.data.code === 100){
    assessApplyDialogState.allRiskTypeList = JSON.parse(JSON.stringify(res.data.data));
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg
    })
  }
}
const emit = defineEmits(['refresh'])
defineExpose({
    showRiskDialog
})
onMounted(() => {
  getAllBasicUnitList()
  getAllPersonList()
  getAllTypeList()
})
</script>
<style scoped>
</style>
src/views/analyse/assessApply/components/riskUnitDialog.vue
对比新文件
@@ -0,0 +1,195 @@
<template>
    <div class="system-menu-dialog-container">
        <el-dialog :title="riskUnitDialogState.title" v-model="riskUnitDialogState.riskUnitDialogVisible" width="600px">
            <el-form ref="riskUnitFormRef" :rules="riskUnitDialogState.riskUnitFormRules" :model="riskUnitDialogState.riskUnitForm" size="default" label-width="120px">
                <el-row :gutter="35">
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="风险单元编号" prop="riskCode">
                            <el-input v-model="riskUnitDialogState.riskUnitForm.riskCode" placeholder="风险单元编号" clearable class="input-length"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="风险单元名称" prop="riskName">
                            <el-input v-model="riskUnitDialogState.riskUnitForm.riskName" placeholder="风险单元名称" clearable class="input-length"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                      <el-form-item label="风险单元类型" prop="riskUnitTypeId">
                        <el-select v-model="riskUnitDialogState.riskUnitForm.riskUnitTypeId" placeholder="风险单元类型" clearable class="input-length">
                          <el-option v-for="item in riskUnitDialogState.riskTypeList" :key="item.id" :label="item.riskType" :value="item.id"></el-option>
                        </el-select>
                      </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="负责人" prop="liabilityUserId">
                            <el-select v-model="riskUnitDialogState.riskUnitForm.liabilityUserId" placeholder="负责人" clearable class="input-length">
                                <el-option v-for="item in riskUnitDialogState.allPersonList" :key="item.id" :label="item.personName" :value="item.id"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="负责部门" prop="liabilityDep">
                            <el-input v-model="riskUnitDialogState.riskUnitForm.liabilityDep" placeholder="负责部门" clearable class="input-length"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" v-if="riskUnitDialogState.experimentType === 1">
                      <el-form-item label="基础风险单元" prop="basicRiskUnitId">
                        <el-select v-model="riskUnitDialogState.riskUnitForm.basicRiskUnitId" placeholder="基础风险单元" clearable class="input-length">
                          <el-option v-for="item in riskUnitDialogState.basicUnitList" :key="item.id" :label="item.riskName" :value="item.id"></el-option>
                        </el-select>
                      </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="风险单元描述">
                            <el-input type="textarea" :rows="3" v-model="riskUnitDialogState.riskUnitForm.description" placeholder="风险单元描述" clearable class="input-length"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
            <template #footer>
                <span class="dialog-footer">
                    <el-button @click="riskUnitDialogState.riskUnitDialogVisible = !riskUnitDialogState.riskUnitDialogVisible" size="default">取 消</el-button>
                    <el-button type="primary" @click="onSubmitRiskUnit" size="default">确定</el-button>
                </span>
            </template>
        </el-dialog>
    </div>
</template>
<script setup lang="ts">
import { reactive, ref } from "vue";
import { isValidKey } from "/@/utils/methods";
import {ElMessage} from "element-plus";
import {riskUnitApi} from "/@/api/analyse/riskUnit";
const riskUnitFormRef = ref()
const riskUnitDialogState = reactive<RiskUnitDialogType>({
    title: '新增',
    experimentType: 2,
    riskUnitDialogVisible: false,
    riskUnitForm: {
        experimentId: null,
        riskCode: '',
        riskName: '',
        riskUnitTypeId: null,
        liabilityUserId: null,
        liabilityDep: '',
        description: '',
        basicRiskUnitId: null,
    },
    riskUnitFormRules: {
        riskCode: [{ required: true, message: '请填写风险单元编号', trigger: 'blur' }],
        riskName: [{ required: true, message: '请填写风险单元名称', trigger: 'blur' }],
        riskUnitTypeId: [{ required: true, message: '请选择风险单元类型', trigger: 'blur' }],
        liabilityUserId: [{ required: true, message: '请选择负责人', trigger: 'change' }],
        basicRiskUnitId: [{ required: true, message: '请选择基础风险单元', trigger: 'change' }]
    },
    specialDeviceList: [],
    deviceUnitList: [
        {id:1, name: '台'},
        {id:2, name: '个'},
        {id:3, name: '件'}
    ],
    riskTypeList: [],
    basicUnitList: [],
    allPersonList: [],
    allExperimentList: [],
    experimentTypeList: [
        {id: 2, name: '实验风险'},
        {id: 1, name: '固有风险'},
    ],
})
const showRiskUnitDialog = (id: number, liabilityUserId: number, basicUnitList: UnitType [], allPersonList: AllPersonListType [], allRiskTypeList: RiskType []) => {
    riskUnitDialogState.riskUnitDialogVisible = true;
    riskUnitDialogState.basicUnitList = basicUnitList
    riskUnitDialogState.allPersonList = allPersonList
    riskUnitDialogState.riskTypeList = allRiskTypeList
    setTimeout(() => {
        riskUnitFormRef.value.clearValidate();
    });
    riskUnitDialogState.riskUnitForm = {
        experimentId: id,
        riskCode: '',
        riskName: '',
        riskUnitTypeId: null,
        liabilityUserId: liabilityUserId,
        liabilityDep: '',
        description: '',
        basicRiskUnitId: null,
    };
};
const onSubmitRiskUnit = () => {
    riskUnitFormRef.value.validate(async(valid: boolean) => {
        if(valid){
            if(riskUnitDialogState.title === '新增' && riskUnitDialogState.experimentType === 1){
                let { experimentId,basicRiskUnitId} = riskUnitDialogState.riskUnitForm
                let query = { experimentId,basicRiskUnitId }
                let res = await riskUnitApi().addBasicRiskUnit(query);
                if(res.data.code === 100){
                    emit('refresh')
                    riskUnitDialogState.riskUnitDialogVisible = false;
                    ElMessage({
                        type: 'success',
                        message: '新增成功'
                    })
                }else{
                    ElMessage({
                        type: 'warning',
                        message: res.data.msg,
                    });
                }
            }else if(riskUnitDialogState.title === '新增' && riskUnitDialogState.experimentType === 2){
                let { basicRiskUnitId, ...query} = riskUnitDialogState.riskUnitForm
                let res = await riskUnitApi().addRiskUnit(query);
                if(res.data.code === 100){
                    emit('refresh')
                    riskUnitDialogState.riskUnitDialogVisible = false;
                    ElMessage({
                        type: 'success',
                        message: '新增成功'
                    })
                }else{
                    ElMessage({
                        type: 'warning',
                        message: res.data.msg,
                    });
                }
            }else{
                let res = await riskUnitApi().modRiskUnit(riskUnitDialogState.riskUnitForm)
                if(res.data.code === 100){
                    emit('refresh')
                    riskUnitDialogState.riskUnitDialogVisible = false;
                    ElMessage({
                        type: 'success',
                        message: '编辑成功'
                    })
                }else{
                    ElMessage({
                        type: 'warning',
                        message: res.data.msg,
                    });
                }
            }
        }else{
            ElMessage({
                type: 'warning',
                message: '请完善基本信息',
            });
        }
    })
}
const emit = defineEmits(['refresh'])
defineExpose({
    showRiskUnitDialog
})
</script>
<style scoped>
</style>
src/views/analyse/assessApply/components/selectDanger.vue
对比新文件
@@ -0,0 +1,192 @@
<template>
    <tr class="m-color b-font" style="text-align: center">主要危险源或有害因素</tr>
    <tr>
        <td class="w-18 m-color">序号</td>
        <td class="w-18 m-color required">危险源或有害因素</td>
        <td class="w-18 m-color required">危险特性</td>
        <td class="w-18 m-color required">数量</td>
        <td class="w-18 m-color required">其他说明</td>
        <td class="w-18 m-color">操作</td>
    </tr>
    <tr v-for="(item,index) in dangerSourceState.dangerList" :key="index">
        <td class="w-18">
            {{ index + 1 }}
        </td>
        <td class="w-18">
          <el-input :disabled="dangerSourceState.disabled" v-model="item.dangerFactor"></el-input>
        </td>
        <td class="w-18">
          <el-input :disabled="dangerSourceState.disabled" v-model="item.feature"></el-input>
        </td>
        <td class="w-18">
            <el-input :disabled="dangerSourceState.disabled" type="number" v-model="item.amount"></el-input>
        </td>
        <td class="w-18">
          <el-input :disabled="dangerSourceState.disabled" v-model="item.info"></el-input>
        </td>
        <td class="w-18">
            <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>
</template>
<script setup lang="ts">
import {reactive, watchEffect} from "vue";
let props = defineProps({
    disabled: Boolean,
    data: Array<DangerListType>
});
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: '其他'},
    ]
})
watchEffect(() => {
    dangerSourceState.dangerList = props.data as Array<DangerListType>
    dangerSourceState.disabled = props.disabled
});
const addDangerItem = () => {
    dangerSourceState.dangerList.push({dangerFactor: '', feature: '', amount: null, info: ''});
};
const deleteDangerItem = (index: number) => {
    dangerSourceState.dangerList.splice(index,1);
};
const formatList = (formatList: Array<DangerListType>) => {
    dangerSourceState.dangerList = formatList
}
defineExpose({
    formatList,
    dataList: dangerSourceState.dangerList,
});
</script>
<style scoped lang="scss">
.site-layout-background {
    background: #fff;
}
.report-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #337ecc;
    margin: 20px 0;
    th {
        padding: 10px 0;
        border: 1px solid #337ecc;
        border-left: none;
    }
    tr {
        width: 100%;
        height: 44px;
        line-height: 42px;
        border-bottom: 1px solid #ccc;
        &:last-of-type {
            border-bottom: none;
        }
        td {
            border-right: 1px solid #ccc;
            display: inline-block;
            height: 44px;
            vertical-align: middle;
            text-align: center;
            line-height: 42px;
            &:last-of-type {
                border-right: none;
            }
            &.required {
              &::before {
                content: "*";
                display: inline-block;
                color: red;
              }
            }
            &.w-14 {
                width: calc((100/7)/100 * 100%);
            }
            &.w-16 {
                width: calc((100/6)/100 * 100%);
            }
            &.w-18 {
                width: 16.59%;
            }
            &.w-20 {
                width: 20%;
            }
            &.w-25 {
                width: 25%;
            }
            &.w-50 {
                width: 50%;
            }
            &.w-75 {
                width: 75%;
            }
            .ant-input {
                height: 100%;
                border: none;
                background: #f5f7fa;
            }
            .ant-picker {
                width: 100%;
                height: 100%;
            }
        }
    }
    .b-font {
        font-size: 16px;
        font-weight: bolder;
    }
}
.m-color {
    color: #0c4995;
}
:deep(.el-input__wrapper ){
    box-shadow: none;
}
</style>
src/views/analyse/assessApply/index.ts
对比新文件
@@ -0,0 +1,46 @@
declare interface ReportStateType {
}
declare interface ReportDialogType {
    title: string
    disabled: boolean
    reportDialogVisible: boolean
    reportForm: object
    reportFormRules: object
    allPersonList: Array<AllPersonListType>
    systemPersonList: Array<AllPersonListType>
    allRoomList: Array<RoomType>
}
declare interface DangerSourceType {
    disabled: boolean
    dangerList: Array<DangerListType>
    classifyList: Array<Type>
    wasteStorageList: Array<Type>
}
declare interface DangerListType {
    dangerFactor: string
    feature: string
    amount: null | number
    info: string
}
declare interface AssessApplyDialogStateType {
    title: string,
    assessApplyDialogVisible: boolean,
    id: number | null,
    liabilityUserId: number | null,
    riskUnitData: Array<any>,
    riskList: Array<type>,
    basicUnitList: Array<UnitType>
    allPersonList: Array<AllPersonListType>
    allRiskTypeList: Array<RiskType>
}
declare interface type {
    id: number,
    name: string
}
src/views/analyse/assessApply/index.vue
对比新文件
@@ -0,0 +1,352 @@
<template>
    <div class="home-container">
        <div style="height: 100%">
            <el-row class="homeCard">
                <div class="basic-line">
                    <span>实验名称:</span>
                    <el-input v-model="developState.searchQuery.searchParams.experimentName" clearable filterable class="input-box" placeholder="实验名称">
                    </el-input>
                </div>
                <div class="basic-line">
                    <span>实验类型:</span>
                    <el-select v-model="developState.searchQuery.searchParams.experimentType" clearable filterable class="input-box" placeholder="实验类型">
                        <el-option v-for="item in developState.experimentTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                    </el-select>
                </div>
                <div style="padding-bottom: 10px">
                    <el-button type="primary" @click="getAssessData">查询</el-button>
                    <el-button plain @click="reset">重置</el-button>
                </div>
            </el-row>
            <div class="homeCard">
                <div class="main-card">
                    <el-row class="cardTop">
                    </el-row>
                    <el-table ref="multipleTableRef" :data="developState.developData" style="width: 100%" height="calc(100% - 100px)" :header-cell-style="{ background: '#fafafa' }">
                        <el-table-column prop="experimentCode" label="实验编号"/>
                        <el-table-column prop="experimentName" label="实验名称"/>
                        <el-table-column prop="createExperimentTime" label="立项时间">
                          <template #default="scope">
                            <span>{{scope.row.createExperimentTime?scope.row.createExperimentTime.substring(0,16):'--'}}</span>
                          </template>
                        </el-table-column>
                        <el-table-column prop="startTime" label="开展时间" show-overflow-tooltip>
                          <template #default="scope">
                            <span>{{scope.row.startTime?scope.row.startTime.substring(0,16):'--'}}</span>
                          </template>
                        </el-table-column>
                        <el-table-column prop="siteList" label="实验场所" show-overflow-tooltip>
                          <template #default="scope">
                            <span>{{scope.row.siteList.map(i=>i.siteName).join(',')}}</span>
                          </template>
                        </el-table-column>
                        <el-table-column prop="experimentType" label="实验类别">
                          <template #default="scope">
                            <span>{{developState.experimentTypeList.find(i=>i.id == scope.row.experimentType)?.name}}</span>
                          </template>
                        </el-table-column>
                        <el-table-column prop="status" label="评估申请">
                          <template #default="scope">
                            <span>{{scope.row.status == 1?'未申请':scope.row.status == 2?'已申请':'--'}}</span>
                          </template>
                        </el-table-column>
                        <el-table-column prop="status" label="评估申请时间" show-overflow-tooltip>
                          <template #default="scope">
                            <span>{{scope.row.assessApplyTime?scope.row.assessApplyTime.substring(0,16):'--'}}</span>
                          </template>
                        </el-table-column>
                        <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?'生成报告':'--'}}
                            </el-tag>
                          </template>
                        </el-table-column>
                        <el-table-column label="操作" width="250" fixed="right">
                            <template #default="scope">
                                <el-button size="small" text type="primary" :icon="Edit" @click="openRiskDialog(scope.row)">管理实验现实风险</el-button>
                                <el-button size="small" text type="primary" :icon="View" @click="openReportDialog('提交', scope.row)">提交综合评估报告审批</el-button>
                                <el-button size="small" :disabled="scope.row.status == 2 ? true : false" text type="primary" :icon="Edit" @click="openReportDialog('查看',scope.row)">查看评估报告</el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                    <div class="pageBtn">
                        <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="developState.searchQuery.pageIndex" background v-model:page-size="developState.searchQuery.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="developState.total" class="page-position"> </el-pagination>
                    </div>
                </div>
            </div>
        </div>
        <risk-dialog ref="RiskDialogRef" @refresh="getAssessData"></risk-dialog>
        <report-dialog ref="ReportDialogRef" @refresh="getAssessData"></report-dialog>
    </div>
</template>
<script setup lang="ts">
import {defineAsyncComponent, onMounted, reactive, ref} from "vue";
import {projectApi} from "/@/api/experiment/project";
import {ElMessage, ElMessageBox} from "element-plus";
import { View,Edit, Plus, RefreshLeft } from '@element-plus/icons-vue';
import {roomApi} from "/@/api/basic/room";
import {assessApplyApi} from "/@/api/analyse/assessApply";
const RiskDialog = defineAsyncComponent(() => import('./components/riskDialog.vue'));
const ReportDialog = defineAsyncComponent(() => import('./components/reportDialog.vue'));
const RiskDialogRef = ref();
const ReportDialogRef = ref();
const developState = reactive<ProjectStateType>({
    developData: [],
    searchQuery: {
        pageIndex: 1,
        pageSize: 10,
        searchParams: {
            experimentName: '',
            experimentType: null,
        }
    },
    total: 0,
    experimentTypeList: [
        {id: 1, name: '化学类'},
        {id: 2, name: '生物类'},
        {id: 3, name: '辐射类'},
        {id: 4, name: '机电类'},
        {id: 5, name: '特种设备类'},
        {id: 6, name: '其它类'},
    ],
    allRoomList: []
})
const getAssessData = async () => {
    let res = await assessApplyApi().getData(developState.searchQuery);
    if(res.data.code === 100){
        developState.developData = res.data.data;
        developState.total = res.data.total;
    }else{
        ElMessage({
            type: 'warning',
            message: res.data.msg
        });
    }
};
const getAllRoom = async () => {
  let res = await roomApi().getAllRoom();
  if(res.data.code === 100){
    developState.allRoomList = JSON.parse(JSON.stringify(res.data.data));
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg
    })
  }
};
const openRiskDialog = (value: ProjectType) => {
    RiskDialogRef.value.showRiskDialog(value);
};
const openReportDialog = (title: string,value: ProjectType) =>{
  ReportDialogRef.value.showReportDialog(title, value, developState.allRoomList);
}
const onDelProject = (val: ProjectType) => {
    ElMessageBox.confirm(`此操作将永久删除该实验:“${val.experimentCode}”,是否继续?`, '提示', {
        confirmButtonText: '确认',
        cancelButtonText: '取消',
        type: 'warning'
    })
        .then(async () => {
            debugger
            let res = await projectApi().deleteProjectById({ id: val.id });
            if (res.data.code === 100) {
                ElMessage({
                    type: 'success',
                    duration: 2000,
                    message: '删除成功'
                });
                await getAssessData();
            } else {
                ElMessage({
                    type: 'warning',
                    message: res.data.msg
                });
            }
        })
        .catch((error) => {
        });
}
const onHandleSizeChange = (val: number) => {
    developState.searchQuery.pageSize = val;
    getAssessData();
};
const onHandleCurrentChange = (val: number) => {
    developState.searchQuery.pageIndex = val;
    getAssessData();
};
const reset = () => {
    developState.searchQuery = {
        pageIndex: 1,
        pageSize: 10,
        searchParams: {
            experimentName: '',
            experimentType: null,
        }
    }
};
onMounted(() => {
    getAssessData()
    getAllRoom()
})
</script>
<style scoped lang="scss">
$homeNavLengh: 8;
.home-container {
    height: calc(100vh - 144px);
    box-sizing: border-box;
    overflow: hidden;
    .homeCard {
        width: 100%;
        padding: 20px;
        box-sizing: border-box;
        background: #fff;
        border-radius: 4px;
        .main-card {
            width: 100%;
            height: 100%;
            .cardTop {
                display: flex;
                align-items: center;
                justify-content: space-between;
                margin-bottom: 20px;
                .mainCardBtn {
                    margin: 0;
                }
            }
            .pageBtn {
                height: 60px;
                display: flex;
                align-items: center;
                justify-content: right;
                .demo-pagination-block + .demo-pagination-block {
                    margin-top: 10px;
                }
                .demo-pagination-block .demonstration {
                    margin-bottom: 16px;
                }
            }
        }
        &:last-of-type {
            height: calc(100% - 100px);
        }
    }
    .el-row {
        display: flex;
        align-items: center;
        margin-bottom: 20px;
        &:last-child {
            margin-bottom: 0;
        }
        .grid-content {
            align-items: center;
            min-height: 36px;
        }
        .topInfo {
            display: flex;
            align-items: center;
            font-size: 16px;
            font-weight: bold;
            & > div {
                white-space: nowrap;
                margin-right: 20px;
            }
        }
    }
}
.stepItem {
    width: 100%;
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    margin-left: 30px;
    padding-bottom: 30px;
    border-left: 2px solid #ccc;
    &:first-of-type {
        margin-top: 30px;
    }
    &:last-of-type {
        margin-bottom: 0;
        border-left: none;
    }
    .stepNum {
        width: 30px;
        height: 30px;
        border-radius: 15px;
        box-sizing: border-box;
        color: #333;
        border: 1px solid #999;
        line-height: 28px;
        text-align: center;
        margin-right: 10px;
        margin-left: -16px;
        margin-top: -30px;
    }
    .stepCard {
        width: 100%;
        margin-top: -30px;
        .box-card {
            width: 100%;
            &:deep(.el-card__header) {
                padding: 10px 15px;
            }
            .card-header {
                width: 100%;
                display: flex;
                justify-content: space-between;
                align-items: center;
                & > div:first-of-type {
                    margin-right: 80px;
                    font-size: 18px;
                    font-weight: bold;
                }
            }
        }
    }
    &:hover .card-header {
        color: #0098f5;
    }
    &:hover .stepNum {
        border: 2px solid #0098f5;
        color: #0098f5;
    }
}
:deep(.el-date-editor) {
    width: 100%;
}
.el-select {
    width: 100%;
}
:deep(.el-textarea.is-disabled .el-textarea__inner) {
    background-color: var(--el-card-bg-color);
    color: var(--el-input-text-color, var(--el-text-color-regular));
}
:deep(.el-input.is-disabled .el-input__inner) {
    color: var(--el-input-text-color, var(--el-text-color-regular));
}
:deep(.el-input.is-disabled .el-input__wrapper) {
    background-color: var(--el-card-bg-color);
    box-shadow: none;
}
</style>
src/views/analyse/evaluate/components/evaluateDialog.vue
@@ -1,6 +1,6 @@
<template>
    <div class="system-menu-dialog-container">
        <el-dialog :title="evaluateDialogState.title" v-model="evaluateDialogState.evaluateDialogVisible" width="600px">
        <el-dialog :title="evaluateDialogState.title" v-model="evaluateDialogState.evaluateDialogVisible" width="70%">
            <el-form ref="evaluateFormRef" :rules="evaluateDialogState.evaluateFormRules" :model="evaluateDialogState.evaluateForm" size="default" label-width="140px">
                <el-row :gutter="35">
<!--                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">-->
@@ -16,126 +16,608 @@
<!--                            </el-input>-->
<!--                        </el-form-item>-->
<!--                    </el-col>-->
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="风险等级" prop="riskLevelValue">
                            <el-select class="input-length" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.riskLevelValue" style="width:100%" placeholder="风险等级" clearable>
                                <el-option v-for="item in evaluateDialogState.riskLevelValueList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="风险级别" prop="riskLevel">
                            <el-select class="input-length" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.riskLevel" style="width:100%" placeholder="风险级别" clearable>
                                <el-option v-for="item in evaluateDialogState.riskLevelList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="风险色" prop="riskColor">
                            <el-select class="input-length" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.riskColor" style="width:100%" placeholder="风险色" clearable>
                                <el-option v-for="item in evaluateDialogState.riskColorList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="管理层级" prop="manageLevel">
                            <el-select class="input-length" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.manageLevel" style="width:100%" placeholder="管理层级" clearable>
                                <el-option v-for="item in evaluateDialogState.manageLevelList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="评价方法" prop="identificationMethod">
                            <el-select class="input-length" :disabled="true" v-model="evaluateDialogState.evaluateMethod" style="width:100%" placeholder="评价方法" clearable>
                                <el-option v-for="item in evaluateDialogState.evaluateMethodList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <div style="width: 100%" v-if="evaluateDialogState.evaluateMethod === 1">
                    <div class="evaluateCard">
                      <div class="cardTit">
                        <span v-if="evaluateDialogState.evaluateForm.identificationMethod === 1">PHA辨识法</span>
                        <span v-if="evaluateDialogState.evaluateForm.identificationMethod === 2">JHA辨识法</span>
                        <span v-if="evaluateDialogState.evaluateForm.identificationMethod === 3">SCL辨识法</span>
                        <span v-if="evaluateDialogState.evaluateForm.identificationMethod === 4">HAZOP辨识法</span>
                        <span v-if="evaluateDialogState.evaluateForm.identificationMethod === 5">类比辨识法</span>
                      </div>
                      <div v-if="evaluateDialogState.evaluateForm.identificationMethod === 1">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="LEC_L" prop="lecL">
                                <el-input type="number" class="input-length" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.lecL" placeholder="LEC_L" clearable></el-input>
                            </el-form-item>
                          <el-form-item label="检查项目">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.phaCheckItem" placeholder="检查项目" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="LEC_E" prop="lecE">
                                <el-input type="number" class="input-length" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.lecE" placeholder="LEC_E" clearable></el-input>
                            </el-form-item>
                          <el-form-item label="存在风险因素">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.phaRiskFactor" placeholder="存在风险因素" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="LEC_C" prop="lecC">
                                <el-input type="number" class="input-length" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.lecC" placeholder="LEC_C" clearable></el-input>
                            </el-form-item>
                          <el-form-item label="可能产生的后果">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.phaResult" placeholder="可能产生的后果" clearable></el-input>
                          </el-form-item>
                        </el-col>
                      </div>
                      <div v-if="evaluateDialogState.evaluateForm.identificationMethod === 2">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="作业步骤">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.jhaCheckItem" placeholder="作业步骤" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="危险源或潜在事件">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.jhaRiskFactor" placeholder="危险源或潜在事件" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="可能产生的后果">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.jhaResult" placeholder="可能产生的后果" clearable></el-input>
                          </el-form-item>
                        </el-col>
                      </div>
                      <div v-if="evaluateDialogState.evaluateForm.identificationMethod === 3">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="检查项目">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.sclCheckItem" placeholder="检查项目" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="检查标准">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.sclCheckStandard" placeholder="检查标准" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="不符合标准情况">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.sclCheckUnstandard" placeholder="不符合标准情况" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="主要后果">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.sclCheckResult" placeholder="主要后果" clearable></el-input>
                          </el-form-item>
                        </el-col>
                      </div>
                      <div v-if="evaluateDialogState.evaluateForm.identificationMethod === 4">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="节点">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.hazopNode" placeholder="HAZOP_节点" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="参数">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.hazopParam" placeholder="HAZOP_参数" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="参数描述">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.hazopParamDesc" placeholder="HAZOP_参数描述" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="引导词">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.hazopGuide" placeholder="HAZOP_引导词" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="偏差">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.hazopDeviation" placeholder="HAZOP_偏差" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="可能原因">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.hazopPossibleCauses" placeholder="HAZOP_可能原因" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="主要后果">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.hazopResult" placeholder="HAZOP_主要后果" clearable></el-input>
                          </el-form-item>
                        </el-col>
                      </div>
                      <div v-if="evaluateDialogState.evaluateForm.identificationMethod === 5">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="检查项目" prop="analogyCheckItem">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.analogyCheckItem" placeholder="检查项目" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="类比参照" prop="analogyReference">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.analogyReference" placeholder="类比参照" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="存在风险因素" prop="analogyRiskFactor">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.analogyRiskFactor" placeholder="存在风险因素" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="可能产生的后果" prop="analogyResult">
                            <el-input class="input-length" disabled v-model="evaluateDialogState.evaluateInfo.analogyResult" placeholder="可能产生的后果" clearable></el-input>
                          </el-form-item>
                        </el-col>
                      </div>
                    </div>
                    <div style="width: 100%" v-if="evaluateDialogState.evaluateMethod === 2">
                    <el-col style="display: flex;align-items: center" :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                      <el-form-item label="评价方法" style="width: 80% !important;">
                        <el-select class="input-length" disabled v-model="evaluateDialogState.evaluateForm.evaluateMethod" style="width:100%" placeholder="评价方法" clearable>
                          <el-option v-for="item in evaluateDialogState.evaluateMethodList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                        </el-select>
                      </el-form-item>
                      <el-button size="default" type="primary" @click="openChangeMethod()">修改评价方法</el-button>
                    </el-col>
                    <div class="evaluateCard">
                      <div class="cardTit">
                        <span>固有风险评分</span>
                      </div>
                      <div class="valueSelect" v-if="evaluateDialogState.evaluateMethod === 1">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="LS_L" prop="lsL">
                                <el-input type="number" class="input-length" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.lsL" placeholder="LS_L    " clearable></el-input>
                            </el-form-item>
                          <el-form-item label="LEC_L" prop="originalLecL">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.originalLecL" @change="calcOriginScore('lec')" style="width:100%" placeholder="LEC_L的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listLecL" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div><div>分值:</div><span>{{item.value}}</span></div>
                                  <div><div>标准:</div><span>{{item.desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="LS_S" prop="lsS">
                                <el-input type="number" class="input-length" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.lsS" placeholder="LS_S" clearable></el-input>
                            </el-form-item>
                          <el-form-item label="LEC_E" prop="originalLecE">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.originalLecE" @change="calcOriginScore('lec')" style="width:100%" placeholder="LEC_E的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listLecE" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div><div>分值:</div><span>{{item.value}}</span></div>
                                  <div><div>标准:</div><span>{{item.desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="LEC_C" prop="originalLecC">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.originalLecC" @change="calcOriginScore('lec')" style="width:100%" placeholder="LEC_C的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listLecC" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div class="longTit"><div>分值:</div><span>{{item.value}}</span></div>
                                  <div class="longTit"><div>人员伤亡:</div><span>{{item.person}}</span></div>
                                  <div class="longTit"><div>直接经济损失:</div><span>{{item.money}}</span></div>
                                  <div class="longTit"><div>停工情况:</div><span>{{item.stopWork}}</span></div>
                                  <div class="longTit"><div>企业形象:</div><span>{{item.company}}</span></div>
                                  <div class="longTit"><div>法律,法规及其它要求:</div><span>{{item.desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                      </div>
                      <div class="valueSelect" v-if="evaluateDialogState.evaluateMethod === 2">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="LS_L" prop="originalLsL">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.originalLsL" @change="calcOriginScore('ls')" style="width:100%" placeholder="LS_L的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listLsL" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div><div>分值:</div><span>{{item.value}}</span></div>
                                  <div><div>标准:</div><span>{{item.desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="LS_S" prop="originalLsS">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.originalLsS" @change="calcOriginScore('ls')" style="width:100%" placeholder="LS_S的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listLsS" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div class="longTit"><div>分值:</div><span>{{item.value}}</span></div>
                                  <div class="longTit"><div>人员伤亡:</div><span>{{item.person}}</span></div>
                                  <div class="longTit"><div>直接经济损失:</div><span>{{item.money}}</span></div>
                                  <div class="longTit"><div>停工情况:</div><span>{{item.stopWork}}</span></div>
                                  <div class="longTit"><div>企业形象:</div><span>{{item.company}}</span></div>
                                  <div class="longTit"><div>法律,法规及其它要求:</div><span>{{item.desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                      </div>
                      <div class="valueSelect" v-if="evaluateDialogState.evaluateMethod === 3">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="MES_M" prop="originalMesM">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.originalMesM" @change="calcOriginScore('mes')" style="width:100%" placeholder="MES_M的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listMesM" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div><div>分值:</div><span>{{item.value}}</span></div>
                                  <div><div>标准:</div><span>{{item.desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="MES_E" prop="originalMesE">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.originalMesE" @change="calcOriginScore('mes')" style="width:100%" placeholder="MES_E的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listMesE" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div><div>分值:</div><span>{{item.value}}</span></div>
                                  <div><div>e1标准:</div><span>{{item.e1Desc}}</span></div>
                                  <div><div>e2标准:</div><span>{{item.e2Desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="MES_S" prop="originalMesS">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.originalMesS" @change="calcOriginScore('mes')" style="width:100%" placeholder="MES_S的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listMesS" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div class="longTit"><div>分值:</div><span>{{item.value}}</span></div>
                                  <div class="longTit"><div>人员伤亡:</div><span>{{item.person}}</span></div>
                                  <div class="longTit"><div>直接经济损失:</div><span>{{item.money}}</span></div>
                                  <div class="longTit"><div>停工情况:</div><span>{{item.stopWork}}</span></div>
                                  <div class="longTit"><div>法律,法规及其它要求:</div><span>{{item.desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                      </div>
                      <div class="valueSelect" v-if="evaluateDialogState.evaluateMethod === 4">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="RS_R" prop="originalRsR">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.originalRsR" @change="calcOriginScore('rs')" style="width:100%" placeholder="RS_R的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listRsR" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div class="longTit"><div>分值:</div><span>{{item.value}}</span></div>
                                  <div class="longTit"><div>区间,定量描述:</div><span>{{item.section}}</span></div>
                                  <div class="longTit"><div>标准:</div><span>{{item.desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="RS_S" prop="originalRsS">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.originalRsS" @change="calcOriginScore('rs')" style="width:100%" placeholder="RS_S的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listRsS" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div><div>分值:</div><span>{{item.value}}</span></div>
                                  <div><div>人员伤亡:</div><span>{{item.person}}</span></div>
                                  <div><div>直接经济损失:</div><span>{{item.money}}</span></div>
                                  <div><div>标准:</div><span>{{item.desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                      </div>
                    </div>
                    <div style="width: 100%" v-if="evaluateDialogState.evaluateMethod === 3">
                    <div class="evaluateCard">
                      <div class="cardTit">
                        <span>固有风险分值</span>
                      </div>
                      <div>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="MES_M" prop="mesM">
                                <el-input type="number" class="input-length" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.mesM" placeholder="MES_M" clearable></el-input>
                            </el-form-item>
                          <el-form-item label="风险值" prop="originalRiskValue">
                            <el-input type="number" class="input-length" disabled v-model="evaluateDialogState.evaluateForm.originalRiskValue" placeholder="风险数值" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="MES_E" prop="mesE">
                                <el-input type="number" class="input-length" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.mesE" placeholder="MES_E" clearable></el-input>
                            </el-form-item>
                          <el-form-item label="风险等级值" prop="originalRiskLevelValue">
                            <el-select class="input-length" disabled v-model="evaluateDialogState.evaluateForm.originalRiskLevelValue" style="width:100%" placeholder="风险等级值" clearable>
                              <el-option v-for="item in evaluateDialogState.riskLevelValueList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="MES_S" prop="mesS">
                                <el-input type="number" class="input-length" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.mesS" placeholder="MES_S" clearable></el-input>
                            </el-form-item>
                          <el-form-item label="风险级别" prop="originalRiskLevel">
                            <el-select class="input-length" disabled v-model="evaluateDialogState.evaluateForm.originalRiskLevel" style="width:100%" placeholder="风险级别" clearable>
                              <el-option v-for="item in evaluateDialogState.riskLevelList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="风险色" prop="originalRiskColor">
                            <el-select class="input-length" disabled v-model="evaluateDialogState.evaluateForm.originalRiskColor" style="width:100%" placeholder="风险色" clearable>
                              <el-option v-for="item in evaluateDialogState.riskColorList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                      </div>
                    </div>
                    <div style="width: 100%" v-if="evaluateDialogState.evaluateMethod === 4">
                    <div class="evaluateCard">
                      <div class="cardTit">
                        <span>现有措施</span>
                      </div>
                      <div>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="RS_R" prop="rsR">
                                <el-input type="number" class="input-length" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.rsR" placeholder="RS_R" clearable></el-input>
                            </el-form-item>
                          <el-form-item label="技术措施" prop="technologyMeasure">
                            <el-input type="textarea" class="input-length" :autosize="{ minRows:1 }" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.technologyMeasure" placeholder="技术措施" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="RS_S" prop="rsS">
                                <el-input type="number" class="input-length" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.rsS" placeholder="RS_S" clearable></el-input>
                            </el-form-item>
                          <el-form-item label="管理措施" prop="manageMeasure">
                            <el-input type="textarea" class="input-length" :autosize="{ minRows:1 }" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.manageMeasure" placeholder="管理措施" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="教育措施" prop="educationMeasure">
                            <el-input type="textarea" class="input-length" :autosize="{ minRows:1 }" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.educationMeasure" placeholder="教育措施" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="个体防护措施" prop="personalProtectionMeasure">
                            <el-input type="textarea" class="input-length" :autosize="{ minRows:1 }" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.personalProtectionMeasure" placeholder="个体防护措施" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="应急措施" prop="emergencyMeasure">
                            <el-input type="textarea" class="input-length" :autosize="{ minRows:1 }" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.emergencyMeasure" placeholder="应急措施" clearable></el-input>
                          </el-form-item>
                        </el-col>
                      </div>
                    </div>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="风险数值" prop="rsS">
                            <el-input type="number" class="input-length" :disabled="true" v-model="numValue" placeholder="风险数值" clearable></el-input>
                        </el-form-item>
                    <div class="evaluateCard">
                      <div class="cardTit">
                        <span>现有风险评分</span>
                      </div>
                      <div class="valueSelect" v-if="evaluateDialogState.evaluateMethod === 1">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="LEC_L" prop="lecL">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.lecL" @change="calcScore('lec')" style="width:100%" placeholder="LEC_L的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listLecL" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div><div>分值:</div><span>{{item.value}}</span></div>
                                  <div><div>标准:</div><span>{{item.desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="LEC_E" prop="lecE">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.lecE" @change="calcScore('lec')" style="width:100%" placeholder="LEC_E的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listLecE" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div><div>分值:</div><span>{{item.value}}</span></div>
                                  <div><div>标准:</div><span>{{item.desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="LEC_C" prop="lecC">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.lecC" @change="calcScore('lec')" style="width:100%" placeholder="LEC_C的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listLecC" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div class="longTit"><div>分值:</div><span>{{item.value}}</span></div>
                                  <div class="longTit"><div>人员伤亡:</div><span>{{item.person}}</span></div>
                                  <div class="longTit"><div>直接经济损失:</div><span>{{item.money}}</span></div>
                                  <div class="longTit"><div>停工情况:</div><span>{{item.stopWork}}</span></div>
                                  <div class="longTit"><div>企业形象:</div><span>{{item.company}}</span></div>
                                  <div class="longTit"><div>法律,法规及其它要求:</div><span>{{item.desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                      </div>
                      <div class="valueSelect" v-if="evaluateDialogState.evaluateMethod === 2">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="LS_L" prop="lsL">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.lsL" @change="calcScore('ls')" style="width:100%" placeholder="LS_L的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listLsL" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div><div>分值:</div><span>{{item.value}}</span></div>
                                  <div><div>标准:</div><span>{{item.desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="LS_S" prop="lsS">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.lsS" @change="calcScore('ls')" style="width:100%" placeholder="LS_S的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listLsS" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div class="longTit"><div>分值:</div><span>{{item.value}}</span></div>
                                  <div class="longTit"><div>人员伤亡:</div><span>{{item.person}}</span></div>
                                  <div class="longTit"><div>直接经济损失:</div><span>{{item.money}}</span></div>
                                  <div class="longTit"><div>停工情况:</div><span>{{item.stopWork}}</span></div>
                                  <div class="longTit"><div>企业形象:</div><span>{{item.company}}</span></div>
                                  <div class="longTit"><div>法律,法规及其它要求:</div><span>{{item.desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                      </div>
                      <div class="valueSelect" v-if="evaluateDialogState.evaluateMethod === 3">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="MES_M" prop="mesM">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.mesM" @change="calcScore('mes')" style="width:100%" placeholder="MES_M的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listMesM" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div><div>分值:</div><span>{{item.value}}</span></div>
                                  <div><div>标准:</div><span>{{item.desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="MES_E" prop="mesE">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.mesE" @change="calcScore('mes')" style="width:100%" placeholder="MES_E的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listMesE" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div><div>分值:</div><span>{{item.value}}</span></div>
                                  <div><div>e1标准:</div><span>{{item.e1Desc}}</span></div>
                                  <div><div>e2标准:</div><span>{{item.e2Desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="MES_S" prop="mesS">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.mesS" @change="calcScore('mes')" style="width:100%" placeholder="MES_S的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listMesS" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div class="longTit"><div>分值:</div><span>{{item.value}}</span></div>
                                  <div class="longTit"><div>人员伤亡:</div><span>{{item.person}}</span></div>
                                  <div class="longTit"><div>直接经济损失:</div><span>{{item.money}}</span></div>
                                  <div class="longTit"><div>停工情况:</div><span>{{item.stopWork}}</span></div>
                                  <div class="longTit"><div>法律,法规及其它要求:</div><span>{{item.desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                      </div>
                      <div class="valueSelect" v-if="evaluateDialogState.evaluateMethod === 4">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="RS_R" prop="rsR">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.rsR" @change="calcScore('rs')" style="width:100%" placeholder="RS_R的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listRsR" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div class="longTit"><div>分值:</div><span>{{item.value}}</span></div>
                                  <div class="longTit"><div>区间,定量描述:</div><span>{{item.section}}</span></div>
                                  <div class="longTit"><div>标准:</div><span>{{item.desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="RS_S" prop="rsS">
                            <el-select class="input-length" :teleported="false" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.rsS" @change="calcScore('rs')" style="width:100%" placeholder="RS_S的数值" clearable>
                              <el-option v-for="item in evaluateDialogState.listRsS" :key="item.value" :label="item.value" :value="item.value">
                                <div class="valueTable">
                                  <div><div>分值:</div><span>{{item.value}}</span></div>
                                  <div><div>人员伤亡:</div><span>{{item.person}}</span></div>
                                  <div><div>直接经济损失:</div><span>{{item.money}}</span></div>
                                  <div><div>标准:</div><span>{{item.desc}}</span></div>
                                </div>
                              </el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                      </div>
                    </div>
                    <div class="evaluateCard">
                      <div class="cardTit">
                        <span>现有风险分值</span>
                      </div>
                      <div>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="风险值" prop="riskValue">
                            <el-input type="number" class="input-length" disabled v-model="evaluateDialogState.evaluateForm.riskValue" placeholder="风险数值" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="风险等级值" prop="riskLevelValue">
                            <el-select class="input-length" disabled v-model="evaluateDialogState.evaluateForm.riskLevelValue" style="width:100%" placeholder="风险等级值" clearable>
                              <el-option v-for="item in evaluateDialogState.riskLevelValueList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="风险级别" prop="riskLevel">
                            <el-select class="input-length" disabled v-model="evaluateDialogState.evaluateForm.riskLevel" style="width:100%" placeholder="风险级别" clearable>
                              <el-option v-for="item in evaluateDialogState.riskLevelList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="风险色" prop="riskColor">
                            <el-select class="input-length" disabled v-model="evaluateDialogState.evaluateForm.riskColor" style="width:100%" placeholder="风险色" clearable>
                              <el-option v-for="item in evaluateDialogState.riskColorList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                            </el-select>
                          </el-form-item>
                        </el-col>
                      </div>
                    </div>
                    <div class="evaluateCard">
                      <div class="cardTit">
                        <span>建议措施</span>
                      </div>
                      <div>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="技术措施" prop="adviseTechnologyMeasure">
                            <el-input type="textarea" class="input-length" :autosize="{ minRows:1 }" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.adviseTechnologyMeasure" placeholder="技术措施" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="管理措施" prop="adviseManageMeasure">
                            <el-input type="textarea" class="input-length" :autosize="{ minRows:1 }" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.adviseManageMeasure" placeholder="管理措施" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="教育措施" prop="adviseEducationMeasure">
                            <el-input type="textarea" class="input-length" :autosize="{ minRows:1 }" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.adviseEducationMeasure" placeholder="教育措施" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="个体防护措施" prop="advisePersonalProtectionMeasure">
                            <el-input type="textarea" class="input-length" :autosize="{ minRows:1 }" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.advisePersonalProtectionMeasure" placeholder="个体防护措施" clearable></el-input>
                          </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                          <el-form-item label="应急措施" prop="adviseEmergencyMeasure">
                            <el-input type="textarea" class="input-length" :autosize="{ minRows:1 }" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.adviseEmergencyMeasure" placeholder="应急措施" clearable></el-input>
                          </el-form-item>
                        </el-col>
                      </div>
                    </div>
                    <el-col style="display: flex;align-items: center" :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                      <el-form-item label="评价专家意见" prop="evaluateDesc" style="width: 100% !important;">
                        <el-input type="textarea" class="input-length" :autosize="{ minRows:2 }" :disabled="evaluateDialogState.disabled" v-model="evaluateDialogState.evaluateForm.evaluateDesc" placeholder="评价专家意见" clearable></el-input>
                      </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
            <el-dialog title="修改评价方法" v-model="evaluateDialogState.evaluateMethodVisible" width="30%">
              <el-select class="input-length" v-model="evaluateDialogState.evaluateForm.evaluateMethod" style="width:100%" placeholder="评价方法" clearable>
                <el-option v-for="item in evaluateDialogState.evaluateMethodList" :key="item.id" :label="item.name" :value="item.id"></el-option>
              </el-select>
              <template #footer>
              <span class="Query-footer">
                <el-button @click="evaluateDialogState.evaluateMethodVisible = false" size="default">取 消</el-button>
                <el-button type="primary" @click="conFirmChange()" size="default">确定</el-button>
              </span>
              </template>
            </el-dialog>
            <template #footer>
                <span class="dialog-footer">
                    <el-button @click="evaluateDialogState.evaluateDialogVisible = !evaluateDialogState.evaluateDialogVisible" size="default">取 消</el-button>
                    <el-button v-if="!evaluateDialogState.disabled" type="primary" @click="onSubmitEvaluate" size="default">确定</el-button>
                </span>
              <span class="dialog-footer">
                <el-button @click="evaluateDialogState.evaluateDialogVisible = !evaluateDialogState.evaluateDialogVisible" size="default">取 消</el-button>
                <el-button v-if="!evaluateDialogState.disabled" type="primary" @click="onSubmitEvaluate" size="default">提交</el-button>
              </span>
            </template>
        </el-dialog>
    </div>
</template>
<script setup lang="ts">
import {computed, reactive, ref} from "vue";
import {computed, onMounted, reactive, ref} from "vue";
import {ElMessage} from "element-plus";
import {evaluateApi} from "/@/api/analyse/evaluate";
import {isValidKey, numFloat} from "/@/utils/methods";
import { BigNumber } from 'bignumber.js';
import {identifyApi} from "/@/api/analyse/identify";
const evaluateFormRef = ref()
@@ -144,15 +626,51 @@
    time:[],
    disabled: false,
    evaluateDialogVisible: false,
    evaluateMethod: 1,
    evaluateMethodVisible:false,
    evaluateMethod: null,
    evaluateInfo: {
      id: null,
      identificationMethod: null,
      result: null,
      identificationDesc: '',
      analogyCheckItem: '',
      analogyRiskFactor: '',
      analogyResult: '',
      analogyReference: '',
      hazopNode: '',
      hazopParam: '',
      hazopParamDesc: '',
      hazopGuide: '',
      hazopDeviation: '',
      hazopPossibleCauses: '',
      hazopResult: '',
      jhaCheckItem: '',
      jhaRiskFactor: '',
      jhaResult: '',
      phaCheckItem: '',
      phaRiskFactor: '',
      phaResult: '',
      sclCheckItem: '',
      sclCheckStandard: '',
      sclCheckUnstandard: '',
      sclCheckResult: '',
      hazopId: null,
      jhaId: null,
      phaId: null,
      sclId: null,
      analogyId: null
    },
    evaluateForm: {
        id: null,
        evaluateMethod: null,
        identificationMethod: null,
        identificationId: null,
        manageLevel: 1,
        originalManageLevel: 1,
        riskValue: null,
        riskLevelValue: null,
        riskLevel: null,
        riskColor: null,
        manageLevel: null,
        lecL: null,
        lecE: null,
        lecC: null,
@@ -167,10 +685,45 @@
        lsId: null,
        mesId: null,
        rsId: null,
        originalLecL: null,
        originalLecE: null,
        originalLecC: null,
        originalLsL: null,
        originalLsS: null,
        originalMesM: null,
        originalMesE: null,
        originalMesS: null,
        originalRsR: null,
        originalRsS: null,
        originalRiskValue: null,
        originalRiskLevelValue: null,
        originalRiskLevel: null,
        originalRiskColor: null,
        technologyMeasure: '',
        manageMeasure: '',
        educationMeasure: '',
        personalProtectionMeasure: '',
        emergencyMeasure: '',
        adviseTechnologyMeasure: '',
        adviseManageMeasure: '',
        adviseEducationMeasure: '',
        advisePersonalProtectionMeasure: '',
        adviseEmergencyMeasure: '',
        evaluateDesc: ''
    },
    evaluateFormRules: {
    },
    listLecL: [],
    listLecE: [],
    listLecC: [],
    listLsL:[],
    listLsS:[],
    listRsR:[],
    listRsS:[],
    listMesM:[],
    listMesE:[],
    listMesS:[],
    manageLevelList: [
        {id:1, name: '院所级'},
        {id:2, name: '部门级'},
@@ -210,28 +763,45 @@
    ]
})
const numValue = computed( () => {
const numOriginValue = computed( () => {
    return numFloat(
        evaluateDialogState.evaluateForm.lecE,
        evaluateDialogState.evaluateForm.lecL,
        evaluateDialogState.evaluateForm.lecC,
        evaluateDialogState.evaluateForm.mesE,
        evaluateDialogState.evaluateForm.mesM,
        evaluateDialogState.evaluateForm.mesS,
        evaluateDialogState.evaluateForm.rsS,
        evaluateDialogState.evaluateForm.rsR,
        evaluateDialogState.evaluateForm.lsS,
        evaluateDialogState.evaluateForm.lsL)
        evaluateDialogState.evaluateForm.originalLecL,
        evaluateDialogState.evaluateForm.originalLecE,
        evaluateDialogState.evaluateForm.originalLecC,
        evaluateDialogState.evaluateForm.originalLsL,
        evaluateDialogState.evaluateForm.originalLsS,
        evaluateDialogState.evaluateForm.originalMesM,
        evaluateDialogState.evaluateForm.originalMesE,
        evaluateDialogState.evaluateForm.originalMesS,
        evaluateDialogState.evaluateForm.originalRsR,
        evaluateDialogState.evaluateForm.originalRsS
    )
})
const showEvaluateDialog = (title: string, value: EvaluateType ) => {
const numValue = computed( () => {
  return numFloat(
      evaluateDialogState.evaluateForm.lecL,
      evaluateDialogState.evaluateForm.lecE,
      evaluateDialogState.evaluateForm.lecC,
      evaluateDialogState.evaluateForm.lsL,
      evaluateDialogState.evaluateForm.lsS,
      evaluateDialogState.evaluateForm.mesM,
      evaluateDialogState.evaluateForm.mesE,
      evaluateDialogState.evaluateForm.mesS,
      evaluateDialogState.evaluateForm.rsR,
      evaluateDialogState.evaluateForm.rsS
  )
})
const showEvaluateDialog = (title: string, value: IdentifyType ) => {
    evaluateDialogState.evaluateDialogVisible = true;
    evaluateDialogState.disabled = false
    evaluateDialogState.evaluateMethod = value.evaluateMethod as number
    evaluateDialogState.evaluateInfo = value
    setTimeout(() => {
        evaluateFormRef.value.clearValidate();
    });
    if( value.lecId || value.lsId || value.mesId || value.rsId){
    if( value.riskValue){
        evaluateDialogState.title = '编辑评价';
        for(let i in evaluateDialogState.evaluateForm){
            if(isValidKey(i, evaluateDialogState.evaluateForm)){
@@ -246,41 +816,97 @@
            }
        }
    }else{
        evaluateDialogState.title = '评价';
        evaluateDialogState.title = '评价'
        evaluateDialogState.evaluateForm = {
            id: null,
            identificationId: null,
            riskValue: null,
            riskLevelValue: null,
            riskLevel: null,
            riskColor: null,
            manageLevel: null,
            lecL: null,
            lecE: null,
            lecC: null,
            lsL: null,
            lsS: null,
            mesM: null,
            mesE: null,
            mesS: null,
            rsR: null,
            rsS: null,
            lecId: null,
            lsId: null,
            mesId: null,
            rsId: null,
          id: null,
          evaluateMethod: null,
          identificationMethod: null,
          identificationId: null,
          manageLevel: 1,
          originalManageLevel: 1,
          riskValue: null,
          riskLevelValue: null,
          riskLevel: null,
          riskColor: null,
          lecL: null,
          lecE: null,
          lecC: null,
          lsL: null,
          lsS: null,
          mesM: null,
          mesE: null,
          mesS: null,
          rsR: null,
          rsS: null,
          lecId: null,
          lsId: null,
          mesId: null,
          rsId: null,
          originalLecL: null,
          originalLecE: null,
          originalLecC: null,
          originalLsL: null,
          originalLsS: null,
          originalMesM: null,
          originalMesE: null,
          originalMesS: null,
          originalRsR: null,
          originalRsS: null,
          originalRiskValue: null,
          originalRiskLevelValue: null,
          originalRiskLevel: null,
          originalRiskColor: null,
          technologyMeasure: '',
          manageMeasure: '',
          educationMeasure: '',
          personalProtectionMeasure: '',
          emergencyMeasure: '',
          adviseTechnologyMeasure: '',
          adviseManageMeasure: '',
          adviseEducationMeasure: '',
          advisePersonalProtectionMeasure: '',
          adviseEmergencyMeasure: '',
          evaluateDesc: ''
        };
    }
    evaluateDialogState.evaluateForm.id = value.id as number
    evaluateDialogState.evaluateForm.evaluateMethod = value.evaluateMethod as number
    evaluateDialogState.evaluateForm.identificationMethod = value.phaId?1:value.jhaId?2:value.sclId?3:value.hazopId?4:5
    evaluateDialogState.evaluateForm.identificationId = (value.hazopId || value.jhaId || value.phaId || value.sclId || value.analogyId) as number
};
const openChangeMethod = ()=>{
  evaluateDialogState.evaluateMethodVisible = true
}
const conFirmChange = async () =>{
  let res = await evaluateApi().modEvaluateMethod({
    id: evaluateDialogState.evaluateForm.id,
    evaluateMethodId: evaluateDialogState.evaluateForm.evaluateMethod
  });
  if(res.data.code === 100){
    ElMessage({
      type: 'success',
      message: '评价方法修改成功'
    })
    emit('refresh')
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg
    })
  }
  evaluateDialogState.evaluateMethodVisible = false
  evaluateDialogState.evaluateDialogVisible = false
}
const onSubmitEvaluate = () => {
    evaluateFormRef.value.validate(async(valid: boolean) => {
        if(valid){
            evaluateDialogState.evaluateForm.riskValue = Number(numValue.value)
            // evaluateDialogState.evaluateForm.riskValue = Number(numOriginValue.value)
            if(evaluateDialogState.title === '评价'){
                let { lecId, lsId, mesId, rsId, ...data} = evaluateDialogState.evaluateForm
                console.log(data,'要评价')
                let res = await evaluateApi().addEvaluate(data);
                if(res.data.code === 100){
                    emit('refresh')
@@ -296,6 +922,7 @@
                    });
                }
            }else{
              console.log(evaluateDialogState.evaluateForm,'要编辑')
                let res = await evaluateApi().modEvaluate(evaluateDialogState.evaluateForm)
                if(res.data.code === 100){
                    emit('refresh')
@@ -320,13 +947,240 @@
    })
}
const getListLecL = async() =>{
  let res = await evaluateApi().getListLecL()
  if(res.data.code === 100){
    evaluateDialogState.listLecL = res.data.data
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg,
    });
  }
}
const getListLecE = async() =>{
  let res = await evaluateApi().getListLecE()
  if(res.data.code === 100){
    evaluateDialogState.listLecE = res.data.data
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg,
    });
  }
}
const getListLecC = async() =>{
  let res = await evaluateApi().getListLecC()
  if(res.data.code === 100){
    evaluateDialogState.listLecC = res.data.data
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg,
    });
  }
}
const getListLsL = async() =>{
  let res = await evaluateApi().getListLsL()
  if(res.data.code === 100){
    evaluateDialogState.listLsL = res.data.data
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg,
    });
  }
}
const getListLsS = async() =>{
  let res = await evaluateApi().getListLsS()
  if(res.data.code === 100){
    evaluateDialogState.listLsS = res.data.data
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg,
    });
  }
}
const getListRsR = async() =>{
  let res = await evaluateApi().getListRsR()
  if(res.data.code === 100){
    evaluateDialogState.listRsR = res.data.data
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg,
    });
  }
}
const getListRsS = async() =>{
  let res = await evaluateApi().getListRsS()
  if(res.data.code === 100){
    evaluateDialogState.listRsS = res.data.data
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg,
    });
  }
}
const getListMesM = async() =>{
  let res = await evaluateApi().getListMesM()
  if(res.data.code === 100){
    evaluateDialogState.listMesM = res.data.data
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg,
    });
  }
}
const getListMesE = async() =>{
  let res = await evaluateApi().getListMesE()
  if(res.data.code === 100){
    evaluateDialogState.listMesE = res.data.data
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg,
    });
  }
}
const getListMesS = async() =>{
  let res = await evaluateApi().getListMesS()
  if(res.data.code === 100){
    evaluateDialogState.listMesS = res.data.data
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg,
    });
  }
}
const calcOriginScore=(i:string)=>{
  if((i == 'lec' && (evaluateDialogState.evaluateForm.originalLecL && evaluateDialogState.evaluateForm.originalLecE && evaluateDialogState.evaluateForm.originalLecC))||(i == 'ls' && (evaluateDialogState.evaluateForm.originalLsL && evaluateDialogState.evaluateForm.originalLsS))||(i == 'mes' &&(evaluateDialogState.evaluateForm.originalMesM && evaluateDialogState.evaluateForm.originalMesE && evaluateDialogState.evaluateForm.originalMesS))||(i == 'rs' && (evaluateDialogState.evaluateForm.originalRsR && evaluateDialogState.evaluateForm.originalRsS))){
      evaluateDialogState.evaluateForm.originalRiskValue = Number(numOriginValue.value)
      if(evaluateDialogState.evaluateForm.originalRiskValue<=0.5){
        evaluateDialogState.evaluateForm.originalRiskLevelValue = 1
        evaluateDialogState.evaluateForm.originalRiskLevel = 1
        evaluateDialogState.evaluateForm.originalRiskColor = 1
      }else if(evaluateDialogState.evaluateForm.originalRiskValue>0.5&&evaluateDialogState.evaluateForm.originalRiskValue<1){
        evaluateDialogState.evaluateForm.originalRiskLevelValue = 2
        evaluateDialogState.evaluateForm.originalRiskLevel = 2
        evaluateDialogState.evaluateForm.originalRiskColor = 2
      }else{
        evaluateDialogState.evaluateForm.originalRiskLevelValue = 3
        evaluateDialogState.evaluateForm.originalRiskLevel = 3
        evaluateDialogState.evaluateForm.originalRiskColor = 3
      }
  }
}
const calcScore=(i:string)=>{
  if((i == 'lec' && (evaluateDialogState.evaluateForm.lecL && evaluateDialogState.evaluateForm.lecE && evaluateDialogState.evaluateForm.lecC))||(i == 'ls' && (evaluateDialogState.evaluateForm.lsL && evaluateDialogState.evaluateForm.lsS))||(i == 'mes' &&(evaluateDialogState.evaluateForm.mesM && evaluateDialogState.evaluateForm.mesE && evaluateDialogState.evaluateForm.mesS))||(i == 'rs' && (evaluateDialogState.evaluateForm.rsR && evaluateDialogState.evaluateForm.rsS))){
    evaluateDialogState.evaluateForm.riskValue = Number(numValue.value)
    if(evaluateDialogState.evaluateForm.riskValue<=0.5){
      evaluateDialogState.evaluateForm.riskLevelValue = 1
      evaluateDialogState.evaluateForm.riskLevel = 1
      evaluateDialogState.evaluateForm.riskColor = 1
    }else if(evaluateDialogState.evaluateForm.riskValue>0.5&&evaluateDialogState.evaluateForm.riskValue<1){
      evaluateDialogState.evaluateForm.riskLevelValue = 2
      evaluateDialogState.evaluateForm.riskLevel = 2
      evaluateDialogState.evaluateForm.riskColor = 2
    }else{
      evaluateDialogState.evaluateForm.riskLevelValue = 3
      evaluateDialogState.evaluateForm.riskLevel = 3
      evaluateDialogState.evaluateForm.riskColor = 3
    }
  }
}
const emit = defineEmits(['refresh']);
onMounted(()=>{
  getListLecL()
  getListLecE()
  getListLecC()
  getListLsL()
  getListLsS()
  getListRsR()
  getListRsS()
  getListMesM()
  getListMesE()
  getListMesS()
})
defineExpose({
    showEvaluateDialog
});
</script>
<style scoped>
<style lang="scss" scoped>
.evaluateCard{
  width: 100%;
  margin: 0 40px 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  .cardTit{
    width: 100%;
    padding: 10px 20px;
    background: #f5f5f5;
    border-bottom: 1px solid #ccc;
    margin-bottom: 20px;
  }
  .valueSelect{
    ::v-deep(.el-popper){
      .el-select-dropdown__item{
        width: 100%;
        height: auto;
        white-space: normal;
        word-break: break-all;
        word-wrap: break-word;
        overflow: auto;
        padding: 10px 25px;
        border-bottom: 1px solid #ccc;
        .valueTable{
          &>div{
            line-height: 1.5;
            margin-bottom: 6px;
            padding-bottom: 6px;
            display: flex;
            align-items: center;
            div{
              width: 8%;
            }
            span{
              width: 92%;
            }
            &:last-of-type{
              margin-bottom: 0;
            }
          }
          .longTit{
            div{
              width: 15%;
            }
            span{
              width: 85%;
            }
          }
        }
      }
    }
  }
}
</style>
src/views/analyse/evaluate/index.ts
@@ -6,6 +6,7 @@
        assessPlanName: string,
        experimentName: string,
        tag: number,
        planExecStatus: number | null
    }
    total: number
    identificationMethodList: Array<Type>,
@@ -19,7 +20,8 @@
    riskLevelValue: null | number,
    riskLevel: null | number,
    riskColor: null | number,
    manageLevel: null | number,
    manageLevel?: null | number,
    originalManageLevel?: null | number,
    identificationId: null | number,
    lecL: null | number,
    lecE: null | number,
@@ -37,6 +39,32 @@
    rsId: null | number,
    evaluateMethod?: null | number,
    evaluateStatus?: null | number,
    identificationMethod: null | number,
    originalLecL: null | number,
    originalLecE: null | number,
    originalLecC: null | number,
    originalLsL: null | number,
    originalLsS: null | number,
    originalMesM: null | number,
    originalMesE: null | number,
    originalMesS: null | number,
    originalRsR: null | number,
    originalRsS: null | number,
    originalRiskValue: null | number,
    originalRiskLevelValue: null | number,
    originalRiskLevel: null | number,
    originalRiskColor: null | number,
    technologyMeasure: string,
    manageMeasure: string,
    educationMeasure: string,
    personalProtectionMeasure: string,
    emergencyMeasure: string,
    adviseTechnologyMeasure: string,
    adviseManageMeasure: string,
    adviseEducationMeasure: string,
    advisePersonalProtectionMeasure: string,
    adviseEmergencyMeasure: string,
    evaluateDesc: string
}
declare interface EvaluateDialogType {
@@ -44,7 +72,9 @@
    time: string [],
    disabled: boolean,
    evaluateDialogVisible: boolean,
    evaluateMethod: number,
    evaluateMethodVisible:boolean
    evaluateMethod: number | null,
    evaluateInfo: IdentifyType,
    evaluateForm: EvaluateType,
    evaluateFormRules: {
@@ -55,4 +85,20 @@
    riskLevelList: Array<Type>
    riskColorList: Array<Type>
    manageLevelList: Array<Type>
    listLecL: Array<evaluateSelectType>
    listLecE: Array<evaluateSelectType>
    listLecC: Array<evaluateSelectType>
    listLsL: Array<evaluateSelectType>
    listLsS: Array<evaluateSelectType>
    listRsR: Array<evaluateSelectType>
    listRsS: Array<evaluateSelectType>
    listMesM: Array<evaluateSelectType>
    listMesE: Array<evaluateSelectType>
    listMesS: Array<evaluateSelectType>
}
declare interface evaluateSelectType {
    id: number | null
    value: number | null
    desc: string
}
src/views/analyse/evaluate/index.vue
@@ -28,32 +28,40 @@
                        <el-table-column type="expand">
                            <template #default="scope">
                                <el-table :data="scope.row.factorQueryDTOList" style="width: 100%">
                                    <el-table-column type="index" label="序号" width="80" />
                                    <el-table-column prop="technologyMeasure" label="技术措施" show-overflow-tooltip align="center"></el-table-column>
                                    <el-table-column prop="manageMeasure" label="管理措施" show-overflow-tooltip align="center"></el-table-column>
                                    <el-table-column prop="educationMeasure" label="教育措施" show-overflow-tooltip align="center"></el-table-column>
                                    <el-table-column prop="personalProtectionMeasure" label="防护措施" show-overflow-tooltip align="center"></el-table-column>
                                    <el-table-column prop="evaluateStatus" label="防护措施" show-overflow-tooltip align="center">
                                        <template #default="scope">
                                            <div>
                                                <div v-if="scope.row.evaluateStatus === 0">
                                                    <el-tag :type="'info'">
                                                        {{ '未评价' }}
                                                    </el-tag>
                                                </div>
                                                <div v-if="scope.row.evaluateStatus === 1">
                                                    <el-tag :type="'success'">
                                                        {{ '已评价' }}
                                                    </el-tag>
                                                </div>
                                            </div>
                                        </template>
                                    </el-table-column>
                                    <el-table-column label="操作" width="250">
                                        <template #default="scope">
                                            <el-button size="small" text type="primary" :icon="Plus" @click="openEvaluateDialog('评价', scope.row)">评价</el-button>
                                        </template>
                                    </el-table-column>
                                  <el-table-column type="index" label="序号" width="80" />
                                  <el-table-column prop="evaluateMethod" label="评价方法" align="center">
                                    <template #default="scope">
                                      {{ evaluateState.evaluateMethodList.find(i=>i.id === scope.row.evaluateMethod)?.name }}
                                    </template>
                                  </el-table-column>
                                  <el-table-column prop="itemIdentificationTime" label="辨识添加时间" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 1" prop="phaCheckItem" label="检查项目" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 1" prop="phaRiskFactor" label="存在风险因素" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 1" prop="phaResult" label="可能存在后果" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 2" prop="jhaCheckItem" label="作业步骤" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 2" prop="jhaRiskFactor" label="存在风险因素" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 2" prop="jhaResult" label="可能存在后果" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 3" prop="sclCheckItem" label="检查项目" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 3" prop="sclCheckStandard" label="检查标准" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 3" prop="sclCheckUnstandard" label="不符合标准情况" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 3" prop="sclCheckResult" label="主要后果" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 4" prop="hazopNode" label="节点" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 4" prop="hazopParam" label="参数" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 4" prop="hazopParamDesc" label="参数描述" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 4" prop="hazopNode" label="节点" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 4" prop="hazopGuide" label="引导词" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 4" prop="hazopDeviation" label="偏差" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 4" prop="hazopPossibleCauses" label="可能原因" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 4" prop="hazopResult" label="可能存在后果" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 5" prop="analogyCheckItem" label="检查项目" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 5" prop="analogyReference" label="类比参照" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 5" prop="analogyRiskFactor" label="存在风险因素" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column v-if="scope.row.identificationMethod == 5" prop="analogyResult" label="可能存在后果" show-overflow-tooltip align="center"></el-table-column>
                                  <el-table-column label="操作" width="250">
                                      <template #default="scope">
                                          <el-button size="small" text type="primary" :icon="Plus" @click="openEvaluateDialog('评价', scope.row)">评价</el-button>
                                      </template>
                                  </el-table-column>
                                </el-table>
                            </template>
                        </el-table-column>
@@ -64,32 +72,43 @@
                                <span>{{`${evaluateState.identificationMethodList.find(item =>item.id === scope.row.identificationMethod)?.name}`}}</span>
                            </template>
                        </el-table-column>
                        <el-table-column prop="riskUnitName" label="风险单元" />
                        <el-table-column prop="identificationUser" label="计划负责人" />
                        <el-table-column prop="evaluateUser" label="评价专家" />
                        <el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column>
                        <el-table-column prop="createByUserName" label="创建人" show-overflow-tooltip></el-table-column>
                        <el-table-column prop="updateTime" label="最后修改时间" show-overflow-tooltip></el-table-column>
                        <el-table-column prop="updateByUserName" label="最后修改人" show-overflow-tooltip></el-table-column>
                        <el-table-column prop="planExecStatus" label="状态" show-overflow-tooltip>
                            <template #default="scope">
                                <div>
                                    <div v-if="scope.row.planExecStatus === 3">
                                        <el-tag :type="'info'">
                                            {{ '未提交' }}
                                        </el-tag>
                                    </div>
                                    <div v-if="scope.row.planExecStatus === 4">
                                        <el-tag :type="'success'">
                                            {{ '已提交' }}
                                        </el-tag>
                                    </div>
                                </div>
                            </template>
                        <el-table-column prop="evaluateStatus" label="执行状态" show-overflow-tooltip align="center">
                          <template #default="scope">
                            <div>
                              <div v-if="scope.row.planExecStatus === 1">
                                <el-tag :type="'info'">
                                  {{ '未开始' }}
                                </el-tag>
                              </div>
                              <div v-if="scope.row.planExecStatus === 2">
                                <el-tag :type="'info'">
                                  {{ '辨识阶段' }}
                                </el-tag>
                              </div>
                              <div v-if="scope.row.planExecStatus === 3">
                                <el-tag :type="'primary'">
                                  {{ '评价阶段' }}
                                </el-tag>
                              </div>
                              <div v-if="scope.row.planExecStatus === 4">
                                <el-tag :type="'success'">
                                  {{ '完成阶段' }}
                                </el-tag>
                              </div>
                            </div>
                          </template>
                        </el-table-column>
                        <el-table-column label="操作" width="250">
                            <template #default="scope">
                                <el-button size="small" text type="primary" @click="accessEvaluate(scope.row)">提交</el-button>
                            </template>
                          <template #default="scope">
                            <el-button size="small" v-if="scope.row.planExecStatus===3" text type="primary" @click="accessEvaluate(scope.row)">提交</el-button>
                          </template>
                        </el-table-column>
                    </el-table>
                    <div class="pageBtn">
@@ -123,6 +142,7 @@
        assessPlanName: '',
        experimentName: '',
        tag: 2,
        planExecStatus: 5
    },
    total: 0,
    planList: [
@@ -221,7 +241,7 @@
};
const accessEvaluate = (val: IdentifyType) => {
    ElMessageBox.confirm(`此操作将派发该计划:“${val.assessPlanName}”,是否继续?`, '提示', {
    ElMessageBox.confirm(`此操作将提交该评价计划:“${val.assessPlanName}”,是否继续?`, '提示', {
        confirmButtonText: '确认',
        cancelButtonText: '取消',
        type: 'warning'
@@ -263,6 +283,7 @@
        assessPlanName: '',
        experimentName: '',
        tag: 2,
        planExecStatus: 5
    }
};
src/views/analyse/identify/components/identifyDialog.vue
@@ -1,158 +1,294 @@
<template>
    <div class="system-menu-dialog-container">
        <el-dialog :title="identifyDialogState.title" v-model="identifyDialogState.identifyDialogVisible" width="600px">
            <el-form ref="identifyFormRef" :rules="identifyDialogState.identifyFormRules" :model="identifyDialogState.identifyForm" size="default" label-width="140px">
            <el-form ref="identifyFormRef" :rules="identifyDialogState.identifyFormRules" :model="identifyDialogState.identifyForm" size="default" label-width="160px">
                <el-row :gutter="35">
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="技术措施" prop="technologyMeasure">
                            <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.technologyMeasure" placeholder="技术措施" clearable></el-input>
<!--                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">-->
<!--                        <el-form-item label="辨识方法" prop="identificationMethod">-->
<!--                            <el-select class="input-length" :disabled="true" v-model="identifyDialogState.identifyForm.identificationMethod" style="width:100%" placeholder="辨识方法" clearable>-->
<!--                                <el-option v-for="item in identifyDialogState.identificationMethodList" :key="item.id" :label="item.name" :value="item.id"></el-option>-->
<!--                            </el-select>-->
<!--                        </el-form-item>-->
<!--                    </el-col>-->
                    <div style="width: 100%" v-if="identifyDialogState.method === 1">
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="PHA_检查项目" prop="phaCheckItem">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.phaCheckItem" placeholder="检查项目" clearable></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="管理措施" prop="manageMeasure">
                            <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.manageMeasure" placeholder="管理措施" clearable></el-input>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="PHA_存在风险因素" prop="phaRiskFactor">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.phaRiskFactor" placeholder="存在风险因素" clearable></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="教育措施" prop="educationMeasure">
                            <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.educationMeasure" placeholder="教育措施" clearable></el-input>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="PHA_可能产生的后果" prop="phaResult">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.phaResult" placeholder="可能产生的后果" clearable></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="防护措施" prop="personalProtectionMeasure">
                            <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.personalProtectionMeasure" placeholder="防护措施" clearable></el-input>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="分配评价方法">
                          <el-select disabled class="input-length" v-model="identifyDialogState.evaluateMethod" style="width:100%" placeholder="" clearable>
                            <el-option v-for="item in identifyDialogState.evaluateMethodList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                          </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="应急措施" prop="emergencyMeasure">
                            <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.emergencyMeasure" placeholder="应急措施" clearable></el-input>
                      </el-col>
<!--                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">-->
<!--                        <el-form-item label="评价专家" prop="phaEvaluateUser">-->
<!--                          <el-select class="input-length" v-model="identifyDialogState.identifyForm.phaEvaluateUser" style="width:100%" placeholder="" clearable>-->
<!--                            <el-option v-for="item in identifyDialogState.personList" :key="item.id" :label="item.name" :value="item.id"></el-option>-->
<!--                          </el-select>-->
<!--                        </el-form-item>-->
<!--                      </el-col>-->
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="评价专家">
                          <el-input class="input-length" disabled v-model="identifyDialogState.evaluateUser" placeholder="暂无评价专家" clearable></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="辨识方法" prop="identificationMethod">
                            <el-select class="input-length" :disabled="true" v-model="identifyDialogState.identifyForm.identificationMethod" style="width:100%" placeholder="辨识方法" clearable>
                                <el-option v-for="item in identifyDialogState.identificationMethodList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                            </el-select>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="辨识结果" prop="result">
                          <el-radio-group v-model="identifyDialogState.identifyForm.result" :disabled="identifyDialogState.disabled">
                            <el-radio :label="1">有风险</el-radio>
                            <el-radio :label="2">无风险</el-radio>
                          </el-radio-group>
                        </el-form-item>
                    </el-col>
                    <div style="width: 100%" v-if="identifyDialogState.identifyForm.identificationMethod === 5">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="检查项目" prop="analogyCheckItem">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.analogyCheckItem" placeholder="检查项目" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="存在风险因素" prop="analogyRiskFactor">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.analogyRiskFactor" placeholder="存在风险因素" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="可能产生的后果" prop="analogyResult">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.analogyResult" placeholder="可能产生的后果" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="类比参照" prop="analogyReference">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.analogyReference" placeholder="类比参照" clearable></el-input>
                            </el-form-item>
                        </el-col>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="辨识专家建议" prop="identificationDesc">
                          <el-input class="input-length" type="textarea" :autosize="{ minRows: 3}" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.identificationDesc" placeholder="辨识专家建议" clearable></el-input>
                        </el-form-item>
                      </el-col>
                    </div>
                    <div style="width: 100%" v-if="identifyDialogState.identifyForm.identificationMethod === 4">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="节点" prop="hazopNode">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.hazopNode" placeholder="节点" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="参数" prop="hazopParam">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.hazopParam" placeholder="参数" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="参数描述" prop="hazopParamDesc">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.hazopParamDesc" placeholder="参数描述" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="引导词" prop="hazopGuide">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.hazopGuide" placeholder="引导词" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="偏差" prop="hazopDeviation">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.hazopDeviation" placeholder="偏差" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="可能原因" prop="hazopPossibleCauses">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.hazopPossibleCauses" placeholder="可能原因" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="主要后果" prop="hazopResult">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.hazopResult" placeholder="主要后果" clearable></el-input>
                            </el-form-item>
                        </el-col>
                    <div style="width: 100%" v-if="identifyDialogState.method === 2">
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="JHA_作业步骤" prop="jhaCheckItem">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.jhaCheckItem" placeholder="作业步骤" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="JHA_危险源或潜在事件" prop="jhaRiskFactor">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.jhaRiskFactor" placeholder="危险源或潜在事件" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="JHA_可能产生的后果" prop="jhaResult">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.jhaResult" placeholder="可能产生的后果" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="分配评价方法">
                          <el-select disabled class="input-length" v-model="identifyDialogState.evaluateMethod" style="width:100%" placeholder="" clearable>
                            <el-option v-for="item in identifyDialogState.evaluateMethodList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
<!--                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">-->
<!--                        <el-form-item label="评价专家" prop="jhaEvaluateUser">-->
<!--                          <el-select class="input-length" v-model="identifyDialogState.identifyForm.jhaEvaluateUser" style="width:100%" placeholder="" clearable>-->
<!--                            <el-option v-for="item in identifyDialogState.personList" :key="item.id" :label="item.name" :value="item.id"></el-option>-->
<!--                          </el-select>-->
<!--                        </el-form-item>-->
<!--                      </el-col>-->
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="评价专家">
                          <el-input class="input-length" disabled v-model="identifyDialogState.evaluateUser" placeholder="暂无评价专家" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="辨识结果" prop="result">
                          <el-radio-group v-model="identifyDialogState.identifyForm.result" :disabled="identifyDialogState.disabled">
                            <el-radio :label="1">有风险</el-radio>
                            <el-radio :label="2">无风险</el-radio>
                          </el-radio-group>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="辨识专家建议" prop="identificationDesc">
                          <el-input class="input-length" type="textarea" :autosize="{ minRows: 3}" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.identificationDesc" placeholder="辨识专家建议" clearable></el-input>
                        </el-form-item>
                      </el-col>
                    </div>
                    <div style="width: 100%" v-if="identifyDialogState.identifyForm.identificationMethod === 2">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="作业步骤" prop="jhaCheckItem">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.jhaCheckItem" placeholder="作业步骤" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="危险源或潜在事件" prop="jhaRiskFactor">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.jhaRiskFactor" placeholder="危险源或潜在事件" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="可能发生的事故" prop="jhaResult">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.jhaResult" placeholder="可能发生的事故" clearable></el-input>
                            </el-form-item>
                        </el-col>
                    <div style="width: 100%" v-if="identifyDialogState.method === 3">
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="SCL_检查项目" prop="sclCheckItem">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.sclCheckItem" placeholder="检查项目" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="SCL_检查标准" prop="sclCheckStandard">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.sclCheckStandard" placeholder="检查标准" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="SCL_不符合标准情况" prop="sclCheckUnstandard">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.sclCheckUnstandard" placeholder="不符合标准情况" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="SCL_主要后果" prop="sclCheckResult">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.sclCheckResult" placeholder="主要后果" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="分配评价方法">
                          <el-select disabled class="input-length" v-model="identifyDialogState.evaluateMethod" style="width:100%" placeholder="" clearable>
                            <el-option v-for="item in identifyDialogState.evaluateMethodList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
<!--                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">-->
<!--                        <el-form-item label="评价专家" prop="sclEvaluateUser">-->
<!--                          <el-select class="input-length" v-model="identifyDialogState.identifyForm.sclEvaluateUser" style="width:100%" placeholder="" clearable>-->
<!--                            <el-option v-for="item in identifyDialogState.personList" :key="item.id" :label="item.name" :value="item.id"></el-option>-->
<!--                          </el-select>-->
<!--                        </el-form-item>-->
<!--                      </el-col>-->
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="评价专家">
                          <el-input class="input-length" disabled v-model="identifyDialogState.evaluateUser" placeholder="暂无评价专家" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="辨识结果" prop="result">
                          <el-radio-group v-model="identifyDialogState.identifyForm.result" :disabled="identifyDialogState.disabled">
                            <el-radio :label="1">有风险</el-radio>
                            <el-radio :label="2">无风险</el-radio>
                          </el-radio-group>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="辨识专家建议" prop="identificationDesc">
                          <el-input class="input-length" type="textarea" :autosize="{ minRows: 3}" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.identificationDesc" placeholder="辨识专家建议" clearable></el-input>
                        </el-form-item>
                      </el-col>
                    </div>
                    <div style="width: 100%" v-if="identifyDialogState.identifyForm.identificationMethod === 1">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="检查项目" prop="phaCheckItem">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.phaCheckItem" placeholder="检查项目" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="存在风险因素" prop="phaRiskFactor">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.phaRiskFactor" placeholder="存在风险因素" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="可能产生的后果" prop="phaResult">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.phaResult" placeholder="可能产生的后果" clearable></el-input>
                            </el-form-item>
                        </el-col>
                    <div style="width: 100%" v-if="identifyDialogState.method === 4">
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="HAZOP_节点" prop="hazopNode">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.hazopNode" placeholder="HAZOP_节点" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="HAZOP_参数" prop="hazopParam">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.hazopParam" placeholder="HAZOP_参数" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="HAZOP_参数描述" prop="hazopParamDesc">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.hazopParamDesc" placeholder="HAZOP_参数描述" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="HAZOP_引导词" prop="hazopGuide">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.hazopGuide" placeholder="HAZOP_引导词" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="HAZOP_偏差" prop="hazopDeviation">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.hazopDeviation" placeholder="HAZOP_偏差" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="HAZOP_可能原因" prop="hazopPossibleCauses">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.hazopPossibleCauses" placeholder="HAZOP_可能原因" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="HAZOP_主要后果" prop="hazopResult">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.hazopResult" placeholder="HAZOP_主要后果" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="分配评价方法">
                          <el-select disabled class="input-length" v-model="identifyDialogState.evaluateMethod" style="width:100%" placeholder="" clearable>
                            <el-option v-for="item in identifyDialogState.evaluateMethodList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
<!--                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">-->
<!--                        <el-form-item label="评价专家" prop="hazopEvaluateUser">-->
<!--                          <el-select class="input-length" v-model="identifyDialogState.identifyForm.hazopEvaluateUser" style="width:100%" placeholder="" clearable>-->
<!--                            <el-option v-for="item in identifyDialogState.personList" :key="item.id" :label="item.name" :value="item.id"></el-option>-->
<!--                          </el-select>-->
<!--                        </el-form-item>-->
<!--                      </el-col>-->
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="评价专家">
                          <el-input class="input-length" disabled v-model="identifyDialogState.evaluateUser" placeholder="暂无评价专家" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="辨识结果" prop="result">
                          <el-radio-group v-model="identifyDialogState.identifyForm.result" :disabled="identifyDialogState.disabled">
                            <el-radio :label="1">有风险</el-radio>
                            <el-radio :label="2">无风险</el-radio>
                          </el-radio-group>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="辨识专家建议" prop="identificationDesc">
                          <el-input class="input-length" type="textarea" :autosize="{ minRows: 3}" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.identificationDesc" placeholder="辨识专家建议" clearable></el-input>
                        </el-form-item>
                      </el-col>
                    </div>
                    <div style="width: 100%" v-if="identifyDialogState.identifyForm.identificationMethod === 3">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="检查项目" prop="sclCheckItem">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.sclCheckItem" placeholder="检查项目" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="检查标准" prop="sclCheckStandard">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.sclCheckStandard" placeholder="检查标准" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="不符合标准情况" prop="sclCheckUnstandard">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.sclCheckUnstandard" placeholder="不符合标准情况" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="主要后果" prop="sclCheckResult">
                                <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.sclCheckResult" placeholder="主要后果" clearable></el-input>
                            </el-form-item>
                        </el-col>
                    <div style="width: 100%" v-if="identifyDialogState.method === 5">
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="类比法_检查项目" prop="analogyCheckItem">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.analogyCheckItem" placeholder="检查项目" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="类比法_类比参照" prop="analogyReference">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.analogyReference" placeholder="类比参照" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="类比法_存在风险因素" prop="analogyRiskFactor">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.analogyRiskFactor" placeholder="存在风险因素" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="类比法_可能产生的后果" prop="analogyResult">
                          <el-input class="input-length" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.analogyResult" placeholder="可能产生的后果" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="分配评价方法">
                          <el-select disabled class="input-length" v-model="identifyDialogState.evaluateMethod" style="width:100%" placeholder="" clearable>
                            <el-option v-for="item in identifyDialogState.evaluateMethodList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                          </el-select>
                        </el-form-item>
                      </el-col>
<!--                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">-->
<!--                        <el-form-item label="评价专家" prop="analogyEvaluateUser">-->
<!--                          <el-select class="input-length" v-model="identifyDialogState.identifyForm.analogyEvaluateUser" style="width:100%" placeholder="" clearable>-->
<!--                            <el-option v-for="item in identifyDialogState.personList" :key="item.id" :label="item.name" :value="item.id"></el-option>-->
<!--                          </el-select>-->
<!--                        </el-form-item>-->
<!--                      </el-col>-->
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="评价专家">
                          <el-input class="input-length" disabled v-model="identifyDialogState.evaluateUser" placeholder="暂无评价专家" clearable></el-input>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="辨识结果" prop="result">
                          <el-radio-group v-model="identifyDialogState.identifyForm.result" :disabled="identifyDialogState.disabled">
                            <el-radio :label="1">有风险</el-radio>
                            <el-radio :label="2">无风险</el-radio>
                          </el-radio-group>
                        </el-form-item>
                      </el-col>
                      <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="辨识专家建议" prop="identificationDesc">
                          <el-input class="input-length" type="textarea" :autosize="{ minRows: 3}" :disabled="identifyDialogState.disabled" v-model="identifyDialogState.identifyForm.identificationDesc" placeholder="辨识专家建议" clearable></el-input>
                        </el-form-item>
                      </el-col>
                    </div>
                </el-row>
            </el-form>
@@ -176,17 +312,17 @@
const identifyDialogState = reactive<IdentifyDialogType>({
    title: '',
    method: null,
    time:[],
    disabled: false,
    evaluateMethod: null,
    evaluateUser: '',
    identifyDialogVisible: false,
    identifyForm: {
        id: null,
        technologyMeasure: '',
        manageMeasure: '',
        educationMeasure: '',
        personalProtectionMeasure: '',
        emergencyMeasure: '',
        identificationMethod: null,
        result: null,
        identificationDesc: '',
        analogyCheckItem: '',
        analogyRiskFactor: '',
        analogyResult: '',
@@ -212,18 +348,32 @@
        jhaId: null,
        phaId: null,
        sclId: null,
        analogyId: null,
        analogyId: null
    },
    identifyFormRules: {
        deviceCode: [{ required: true, message: '请填写设备编号', trigger: 'blur' }],
        deviceName: [{ required: true, message: '请填写设备名称', trigger: 'blur' }],
        devicePower: [{ required: true, message: '请填写设备功率', trigger: 'blur' }],
        riskUnitId: [{ required: true, message: '请选择风险分析单元', trigger: 'change' }],
        identifyUserId: [{ required: true, message: '请选择计划制定人', trigger: 'change' }],
        identificationMethod: [{ required: true, message: '请选择辨识方法', trigger: 'change' }],
        identificationUserId: [{ required: true, message: '请选择负责人', trigger: 'change' }],
        evaluateMethod: [{ required: true, message: '请选择推荐评价方法', trigger: 'change' }],
        evaluateUserId: [{ required: true, message: '请选择评价专家', trigger: 'change' }],
        result: [{ required: true, message: '请选择辨识结果', trigger: 'blur' }],
        identificationDesc: [{ required: true, message: '请输入辨识专家建议', trigger: 'blur' }],
        analogyCheckItem: [{ required: true, message: '请输入检查项目', trigger: 'blur' }],
        analogyRiskFactor: [{ required: true, message: '请输入存在风险因素', trigger: 'blur' }],
        analogyResult: [{ required: true, message: '请输入可能产生的后果', trigger: 'blur' }],
        analogyReference: [{ required: true, message: '请输入类比参照', trigger: 'blur' }],
        hazopNode: [{ required: true, message: '请输入节点', trigger: 'blur' }],
        hazopParam: [{ required: true, message: '请输入参数', trigger: 'blur' }],
        hazopParamDesc: [{ required: true, message: '请输入参数描述', trigger: 'blur' }],
        hazopGuide: [{ required: true, message: '请输入引导词', trigger: 'blur' }],
        hazopDeviation: [{ required: true, message: '请输入偏差', trigger: 'blur' }],
        hazopPossibleCauses: [{ required: true, message: '请输入可能原因', trigger: 'blur' }],
        hazopResult: [{ required: true, message: '请输入主要后果', trigger: 'blur' }],
        jhaCheckItem: [{ required: true, message: '请输入作业步骤', trigger: 'blur' }],
        jhaRiskFactor: [{ required: true, message: '请输入危险源或潜在事件', trigger: 'blur' }],
        jhaResult: [{ required: true, message: '请输入可能产生的后果', trigger: 'blur' }],
        phaCheckItem: [{ required: true, message: '请输入检查项目', trigger: 'blur' }],
        phaRiskFactor: [{ required: true, message: '请输入存在风险因素', trigger: 'blur' }],
        phaResult: [{ required: true, message: '请输入可能产生的后果', trigger: 'blur' }],
        sclCheckItem: [{ required: true, message: '请输入检查项目', trigger: 'blur' }],
        sclCheckStandard: [{ required: true, message: '请输入检查标准', trigger: 'blur' }],
        sclCheckUnstandard: [{ required: true, message: '请输入不符合标准情况', trigger: 'blur' }],
        sclCheckResult: [{ required: true, message: '请输入主要后果', trigger: 'blur' }]
    },
    planList: [],
    personList: [],
@@ -242,22 +392,23 @@
    ]
})
const showIdentifyDialog = (title: string, value: IdentifyType, identifyQueryForm: IdentifyType) => {
const showIdentifyDialog = (title: string, value: IdentifyType, identifyQueryForm: identifyQueryFormType,idenForm: IdentifyType,personList: Array<NewPersonListType>) => {
    identifyDialogState.method = identifyQueryForm.identificationMethod
    identifyDialogState.identifyDialogVisible = true;
    identifyDialogState.disabled = false
    identifyDialogState.evaluateMethod = idenForm.evaluateMethod
    identifyDialogState.evaluateUser = idenForm.evaluateUser
    identifyDialogState.personList = personList
    setTimeout(() => {
        identifyFormRef.value.clearValidate();
    });
    if(title === '新增'){
        identifyDialogState.title = '新增';
        identifyDialogState.identifyForm = {
            id: null,
            technologyMeasure: '',
            manageMeasure: '',
            educationMeasure: '',
            personalProtectionMeasure: '',
            emergencyMeasure: '',
            identificationMethod: null,
            id: identifyQueryForm.id,
            identificationMethod: identifyQueryForm.identificationMethod,
            result: null,
            identificationDesc: '',
            analogyCheckItem: '',
            analogyRiskFactor: '',
            analogyResult: '',
@@ -287,27 +438,28 @@
        };
    }else if(title === '查看'){
        identifyDialogState.title = '查看';
        console.log(value,'value')
        identifyDialogState.disabled = true
        for(let i in identifyDialogState.identifyForm){
            if(isValidKey(i, identifyDialogState.identifyForm)){
                identifyDialogState.identifyForm[i] = identifyQueryForm[i];
                identifyDialogState.identifyForm[i] = value[i];
            }
        }
    }else{
        identifyDialogState.title = '编辑';
        identifyDialogState.identifyForm.hazopId = identifyQueryForm.hazopId;
        identifyDialogState.identifyForm.jhaId = identifyQueryForm.jhaId;
        identifyDialogState.identifyForm.phaId = identifyQueryForm.phaId;
        identifyDialogState.identifyForm.sclId = identifyQueryForm.sclId;
        identifyDialogState.identifyForm.analogyId = identifyQueryForm.analogyId;
        // identifyDialogState.identifyForm.hazopId = identifyQueryForm.hazopId;
        // identifyDialogState.identifyForm.jhaId = identifyQueryForm.jhaId;
        // identifyDialogState.identifyForm.phaId = identifyQueryForm.phaId;
        // identifyDialogState.identifyForm.sclId = identifyQueryForm.sclId;
        // identifyDialogState.identifyForm.analogyId = identifyQueryForm.analogyId;
        for(let i in identifyDialogState.identifyForm){
            if(isValidKey(i, identifyDialogState.identifyForm)){
                identifyDialogState.identifyForm[i] = identifyQueryForm[i];
            }
              if(isValidKey(i, identifyDialogState.identifyForm)){
                  identifyDialogState.identifyForm[i] = value[i];
              }
        }
        identifyDialogState.identifyForm.identificationMethod = identifyQueryForm.identificationMethod
        console.log(identifyDialogState.identifyForm,'identifyDialogState.identifyForm')
    }
    identifyDialogState.identifyForm.id = value.id;
    identifyDialogState.identifyForm.identificationMethod = value.identificationMethod;
};
const onSubmitIdentify = () => {
@@ -323,6 +475,7 @@
                        type: 'success',
                        message: '新增成功'
                    })
                }else{
                    ElMessage({
                        type: 'warning',
@@ -330,9 +483,11 @@
                    });
                }
            }else{
                console.log(identifyDialogState.identifyForm,'identifyDialogState.identifyForm')
                let res = await identifyApi().modIdentify(identifyDialogState.identifyForm)
                if(res.data.code === 100){
                    emit('refresh',2,identifyDialogState.identifyForm)
                    identifyDialogState.identifyDialogVisible = false;
                    ElMessage({
                        type: 'success',
src/views/analyse/identify/components/identifyQuery.vue
@@ -1,21 +1,37 @@
<template>
    <div class="system-menu-dialog-container">
        <el-dialog :title="identifyQueryState.title" v-model="identifyQueryState.identifyQueryVisible" :close-on-click-modal="false" width="800px">
            <el-form ref="identifyFormRef" :rules="identifyQueryState.identifyFormRules" :model="identifyQueryState.identifyQueryForm" size="default" label-width="100px">
        <el-dialog :title="identifyQueryState.title" v-model="identifyQueryState.identifyQueryVisible" :close-on-click-modal="false" width="800px" @close="resetData()">
            <el-form ref="identifyFormRef" :model="identifyQueryState.identifyQueryForm" size="default" label-width="160px">
                <el-row :gutter="35">
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="评估计划" prop="id">
                            <el-select class="input-length" :disabled="true" v-model="identifyQueryState.identifyQueryForm.id" style="width:100%" placeholder="评估计划" clearable>
                        <el-form-item label="风险评价计划名称" prop="id">
                            <el-select class="input-length" :disabled="true" v-model="identifyQueryState.identifyQueryForm.id" style="width:100%" placeholder="风险评价计划名称" clearable>
                                <el-option v-for="item in identifyQueryState.planList" :key="item.id" :label="item.assessPlanName" :value="item.id"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
<!--                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">-->
<!--                      <el-form-item label="评价类型">-->
<!--                        <el-input v-model="identifyQueryState.identifyQueryForm.assessType" readonly></el-input>-->
<!--                      </el-form-item>-->
<!--                    </el-col>-->
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                      <el-form-item label="计划开始评价时间">
                        <el-input v-model="identifyQueryState.identifyQueryForm.assessStartTime" readonly></el-input>
                      </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                      <el-form-item label="评价风险分析单元">
                        <el-input v-model="identifyQueryState.identifyQueryForm.riskUnitName" readonly placeholder="暂无风险分析单元"></el-input>
                      </el-form-item>
                    </el-col>
                    <el-col style="display: flex;align-items: center" :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="辨识方法" prop="identificationMethod">
                            <el-select class="input-length" :disabled="identifyQueryState.disabled" v-model="identifyQueryState.identifyQueryForm.identificationMethod" style="width:100%" placeholder="辨识方法" clearable>
                            <el-select class="input-length" disabled v-model="identifyQueryState.identifyQueryForm.identificationMethod" style="width:100%" placeholder="辨识方法" clearable>
                                <el-option v-for="item in identifyQueryState.identificationMethodList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-button size="default" v-if="identifyQueryState.identifyForm.planExecStatus == 2" type="primary" @click="openChangeMethod()">修改辨识方法</el-button>
                    </el-col>
                </el-row>
            </el-form>
@@ -33,10 +49,33 @@
                        <el-table :data="identifyQueryState.list" border fit highlight-current-row style="width: 100%">
                            <el-table-column type="index" label="序号" width="80" />
                            <el-table-column prop="technologyMeasure" label="技术措施" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column prop="manageMeasure" label="管理措施" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column prop="educationMeasure" label="教育措施" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column prop="personalProtectionMeasure" label="防护措施" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 1" prop="phaCheckItem" label="检查项目" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 1" prop="phaRiskFactor" label="存在风险因素" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 1" prop="phaResult" label="可能存在后果" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 2" prop="jhaCheckItem" label="作业步骤" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 2" prop="jhaRiskFactor" label="存在风险因素" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 2" prop="jhaResult" label="可能存在后果" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 3" prop="sclCheckItem" label="检查项目" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 3" prop="sclCheckStandard" label="检查标准" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 3" prop="sclCheckUnstandard" label="不符合标准情况" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 3" prop="sclCheckResult" label="主要后果" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 4" prop="hazopNode" label="节点" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 4" prop="hazopParam" label="参数" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 4" prop="hazopParamDesc" label="参数描述" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 4" prop="hazopNode" label="节点" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 4" prop="hazopGuide" label="引导词" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 4" prop="hazopDeviation" label="偏差" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 4" prop="hazopPossibleCauses" label="可能原因" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 4" prop="hazopResult" label="可能存在后果" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 5" prop="analogyCheckItem" label="检查项目" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 5" prop="analogyReference" label="类比参照" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 5" prop="analogyRiskFactor" label="存在风险因素" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column v-if="identifyQueryState.identifyForm.identificationMethod == 5" prop="analogyResult" label="可能存在后果" show-overflow-tooltip align="center"></el-table-column>
                            <el-table-column prop="result" label="辨识结果" show-overflow-tooltip align="center">
                                <template #default="scope">
                                    <span>{{scope.row.result == 1?'有风险':scope.row.result == 2?'无风险':'--'}}</span>
                                </template>
                            </el-table-column>
                            <el-table-column label="操作" width="150" align="center">
                                <template #default="scope">
                                    <el-button size="default" text  type="primary"  @click="openIdentifyDialog('查看', scope.row)">查看</el-button>
@@ -49,13 +88,24 @@
                </el-tabs>
            </div>
            <template #footer>
                <span class="Query-footer">
                    <el-button @click="identifyQueryState.identifyQueryVisible = !identifyQueryState.identifyQueryVisible" size="default">取 消</el-button>
                    <el-button v-if="identifyQueryState.identifyForm.planExecStatus === 2" type="primary" @click="identifyQueryState.identifyQueryVisible = !identifyQueryState.identifyQueryVisible" size="default">确定</el-button>
                </span>
            <span class="Query-footer">
              <el-button @click="identifyQueryState.identifyQueryVisible = !identifyQueryState.identifyQueryVisible" size="default">取 消</el-button>
              <el-button v-if="identifyQueryState.identifyForm.planExecStatus === 2" type="primary" @click="identifyQueryState.identifyQueryVisible = !identifyQueryState.identifyQueryVisible" size="default">确定</el-button>
            </span>
            </template>
        </el-dialog>
        <identify-dialog ref="identifyDialogRef" @refresh="refreshList"></identify-dialog>
        <el-dialog title="修改辨识方法" v-model="identifyQueryState.identifyMethodVisible" width="30%">
          <el-select class="input-length" v-model="identifyQueryState.currentMethod" style="width:100%" placeholder="辨识方法" clearable>
            <el-option v-for="item in identifyQueryState.identificationMethodList" :key="item.id" :label="item.name" :value="item.id"></el-option>
          </el-select>
          <template #footer>
            <span class="Query-footer">
              <el-button @click="identifyQueryState.identifyMethodVisible = false" size="default">取 消</el-button>
              <el-button type="primary" @click="conFirmChange()" size="default">确定</el-button>
            </span>
          </template>
        </el-dialog>
        <identify-dialog ref="identifyDialogRef" @refresh="getIdentifyData"></identify-dialog>
    </div>
</template>
@@ -64,6 +114,7 @@
import {ElMessage, ElMessageBox} from "element-plus";
import {identifyApi} from "/@/api/analyse/identify";
import {isValidKey} from "/@/utils/methods";
import {userApi} from "/@/api/systemManage/user";
const identifyDialogRef = ref()
const IdentifyDialog = defineAsyncComponent(() => import('./identifyDialog.vue'))
@@ -73,9 +124,14 @@
    activeName: 'identify',
    list: [],
    identifyQueryVisible: false,
    identifyMethodVisible: false,
    currentMethod: null,
    identifyQueryForm: {
        id: null,
        identificationMethod: null,
        assessType: null,
        assessStartTime: '',
        riskUnitName: ''
    },
    identifyForm: {},
    identificationMethodList: [
@@ -86,38 +142,101 @@
        {id:5, name: '类比法'},
    ],
    planList: [],
    personList: []
})
const showIdentifyQuery = (title: string, value: IdentifyType, planList: PlanType [], personList: SystemPersonType []) => {
// const getAssessInfo =(value: number|null)=>{
//   const data = identifyQueryState.planList.find(item => item.id === value) as PlanType
// }
const showIdentifyQuery = (title: string, value: IdentifyType, planList: PlanType [], personList: AllPersonListType []) => {
    identifyQueryState.identifyQueryVisible = true;
    identifyQueryState.identifyForm = value;
    identifyQueryState.list = value.factorQueryDTOList
    identifyQueryState.planList = planList;
    identifyQueryState.personList = personList
    identifyQueryState.list = value.factorQueryDTOList;
    // getAssessInfo(identifyQueryState.identifyQueryForm.id);
    for(let i in identifyQueryState.identifyQueryForm){
        if(isValidKey(i, identifyQueryState.identifyQueryForm)){
            identifyQueryState.identifyQueryForm[i] = value[i]
        }
    }
    if(title === '编辑'){
        identifyQueryState.title = '编辑';
    if(title === '辨识'){
        identifyQueryState.title = '辨识';
    }else {
        identifyQueryState.title = '查看';
    }
};
const openIdentifyDialog = (title: string, value: IdentifyType) => {
    identifyDialogRef.value.showIdentifyDialog(title, identifyQueryState.identifyForm, value);
    identifyDialogRef.value.showIdentifyDialog(title, value, identifyQueryState.identifyQueryForm,identifyQueryState.identifyForm, identifyQueryState.personList);
};
const refreshList = (type: number, data: IdentifyType) => {
    if(type === 1){
        identifyQueryState.list?.push(data)
    }else{
        (<Array<IdentifyType>>identifyQueryState.list)[identifyQueryState.list?.findIndex(item => item.id === data.id) as number] = data
    }
const openChangeMethod = ()=>{
  identifyQueryState.currentMethod = identifyQueryState.identifyQueryForm.identificationMethod
  identifyQueryState.identifyMethodVisible = true
}
const conFirmChange = async () =>{
  let res = await identifyApi().UpdateIdentifyMethod({
    id: identifyQueryState.identifyQueryForm.id,
    identificationMethodId: identifyQueryState.currentMethod
  });
  if(res.data.code === 100){
    ElMessage({
      type: 'success',
      message: '辨识方法修改成功'
    })
    identifyQueryState.identifyQueryForm.identificationMethod = identifyQueryState.currentMethod,
    identifyQueryState.currentMethod = identifyQueryState.currentMethod,
    emit('refresh')
    getIdentifyData()
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg
    })
  }
  identifyQueryState.identifyMethodVisible = false
}
const resetData = ()=>{
  emit('refresh')
}
// const refreshList = (type: number, data: IdentifyType) => {
//     if(type === 1){
//         identifyQueryState.list?.push(data)
//     }else{
//         (<Array<IdentifyType>>identifyQueryState.list)[identifyQueryState.list?.findIndex(item => item.id === data.id) as number] = data
//     }
// };
const getIdentifyData = async () => {
  let res = await identifyApi().getIdentifyByList(
{
        pageIndex: 1,
        pageSize: 10,
        assessPlanName: '',
        experimentName: '',
        tag: 1,
        assessPlanId: identifyQueryState.identifyForm.id
      }
    );
  if(res.data.code === 100){
    identifyQueryState.list = res.data.data[0].factorQueryDTOList
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg
    });
  }
};
const onDelIdentifyQuery = (index: number, val: IdentifyType) => {
  console.log(val,'val')
    ElMessageBox.confirm(`此操作将永久删除该辨识,是否继续?`, '提示', {
        confirmButtonText: '确认',
        cancelButtonText: '取消',
src/views/analyse/identify/index.ts
@@ -19,28 +19,32 @@
    activeName: string,
    list?: IdentifyType [],
    identifyQueryVisible: boolean,
    identifyQueryForm: {
        id: null | number,
        identificationMethod: null | number,
    },
    identifyForm: {},
    identifyMethodVisible: boolean
    currentMethod: number | null
    identifyQueryForm: identifyQueryFormType,
    identifyForm: IdentifyType,
    identificationMethodList: Array<Type>,
    planList: Array<PlanType>
    personList: Array<AllPersonListType>
}
declare  interface SystemPersonType {
    id: number,
    realName: string,
declare interface identifyQueryFormType {
    id: null | number,
    identificationMethod: null | number,
    assessType: null | number,
    assessStartTime: string,
    riskUnitName: string
}
declare interface IdentifyType {
    id: number | null,
    technologyMeasure: string,
    assessPlanName: string,
    manageMeasure: string,
    educationMeasure: string,
    personalProtectionMeasure: string,
    emergencyMeasure: string,
    technologyMeasure?: string,
    assessPlanName?: string,
    manageMeasure?: string,
    educationMeasure?: string,
    personalProtectionMeasure?: string,
    emergencyMeasure?: string,
    identificationMethod: number | null,
    hazopId?: number | null,
    jhaId?: number | null,
@@ -68,9 +72,12 @@
    sclCheckStandard: string,
    sclCheckUnstandard: string,
    sclCheckResult: string,
    planExecStatus: number,
    evaluateMethod: number,
    planExecStatus?: number,
    evaluateMethod?: number,
    factorQueryDTOList?: IdentifyType [],
    evaluateUser?: string,
    result?: number | null,
    identificationDesc: string
}
declare interface Type {
@@ -80,17 +87,17 @@
declare interface IdentifyDialogType {
    title: string,
    method: null | number,
    evaluateMethod: null | number,
    evaluateUser?: string,
    time: string [],
    disabled: boolean,
    identifyDialogVisible: boolean,
    identifyForm: {
        id: number | null,
        technologyMeasure: string,
        manageMeasure: string,
        educationMeasure: string,
        personalProtectionMeasure: string,
        emergencyMeasure: string,
        identificationMethod: number | null,
        result: null | number,
        identificationDesc: string,
        hazopId?: number | null,
        jhaId?: number | null,
        phaId?: number | null,
@@ -124,5 +131,5 @@
    identificationMethodList: Array<Type>,
    evaluateMethodList: Array<Type>
    planList: Array<PlanType>
    personList: Array<SystemPersonType>
    personList?: Array<NewPersonListType>
}
src/views/analyse/identify/index.vue
@@ -39,18 +39,28 @@
                        <el-table-column prop="createByUserName" label="创建人" show-overflow-tooltip></el-table-column>
                        <el-table-column prop="updateTime" label="最后修改时间" show-overflow-tooltip></el-table-column>
                        <el-table-column prop="updateByUserName" label="最后修改人" show-overflow-tooltip></el-table-column>
                        <el-table-column prop="planExecStatus" label="状态" show-overflow-tooltip>
                        <el-table-column prop="planExecStatus" label="执行状态" show-overflow-tooltip>
                            <template #default="scope">
                                <div>
                                    <div v-if="scope.row.planExecStatus === 1">
                                      <el-tag :type="'info'">
                                        {{ '未开始' }}
                                      </el-tag>
                                    </div>
                                    <div v-if="scope.row.planExecStatus === 2">
                                        <el-tag :type="'info'">
                                            {{ '未辨识' }}
                                            {{ '辨识阶段' }}
                                        </el-tag>
                                    </div>
                                    <div v-if="scope.row.planExecStatus === 3">
                                        <el-tag :type="'success'">
                                            {{ '已辨识' }}
                                        <el-tag :type="'primary'">
                                            {{ '评价阶段' }}
                                        </el-tag>
                                    </div>
                                    <div v-if="scope.row.planExecStatus === 4">
                                      <el-tag :type="'success'">
                                        {{ '完成阶段' }}
                                      </el-tag>
                                    </div>
                                </div>
                            </template>
@@ -58,9 +68,9 @@
                        <el-table-column label="操作" width="250">
                            <template #default="scope">
                                <el-button size="small" text type="primary" v-if="scope.row.planExecStatus === 2" @click="accessIdentify(scope.row)">提交</el-button>
                                <el-button size="small" text type="primary" :icon="View" @click="openIdentifyQuery('查看', scope.row)">查看</el-button>
                                <el-button size="small" text type="primary" v-if="scope.row.planExecStatus === 2" :icon="Edit" @click="openIdentifyQuery('编辑', scope.row)">编辑</el-button>
                                <el-button size="small" text type="danger" :icon="Delete" @click="onDelIdentify(scope.row)">删除</el-button>
                                <el-button size="small" text type="primary" v-if="scope.row.planExecStatus === 3 || scope.row.planExecStatus === 4" :icon="View" @click="openIdentifyQuery('查看', scope.row)">查看</el-button>
                                <el-button size="small" text type="primary" v-if="scope.row.planExecStatus === 2" :icon="Edit" @click="openIdentifyQuery('辨识', scope.row)">辨识</el-button>
<!--                                <el-button size="small" text type="primary" v-if="scope.row.planExecStatus === 2" :icon="Edit" @click="openIdentifyQuery('编辑', scope.row)">编辑</el-button>-->
                            </template>
                        </el-table-column>
                    </el-table>
@@ -192,29 +202,36 @@
};
const accessIdentify = (val: IdentifyType) => {
    ElMessageBox.confirm(`此操作将派发该计划:“${val.assessPlanName}”,是否继续?`, '提示', {
    if(val.factorQueryDTOList?.length > 0){
      ElMessageBox.confirm(`此操作将派发该计划:“${val.assessPlanName}”,是否继续?`, '提示', {
        confirmButtonText: '确认',
        cancelButtonText: '取消',
        type: 'warning'
    })
        .then(async () => {
      })
          .then(async () => {
            let res = await identifyApi().submitIdentify({ id: val.id});
            if (res.data.code === 100) {
                ElMessage({
                    type: 'success',
                    duration: 2000,
                    message: '提交成功'
                });
                await getIdentifyData();
              ElMessage({
                type: 'success',
                duration: 2000,
                message: '提交成功'
              });
              await getIdentifyData();
            } else {
                ElMessage({
                    type: 'warning',
                    message: res.data.msg
                });
              ElMessage({
                type: 'warning',
                message: res.data.msg
              });
            }
        })
        .catch((error) => {
        });
          })
          .catch((error) => {
          });
    }else{
      ElMessage({
        type: 'warning',
        message: '请先添加辨识信息'
      });
    }
};
const onHandleSizeChange = (val: number) => {
src/views/analyse/plan/components/planDialog.vue
@@ -23,11 +23,11 @@
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="评估时间" prop="assessPlanName">
                        <el-form-item label="评估时间" prop="assessTime">
                            <el-date-picker
                                :disabled="planDialogState.disabled"
                                type="datetimerange"
                                v-model="planDialogState.time"
                                v-model="planDialogState.planForm.assessTime"
                                start-placeholder="开始时间"
                                end-placeholder="结束时间"
                                format="YYYY-MM-DD HH:mm:ss"
@@ -37,23 +37,9 @@
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="辨识方法" prop="identificationMethod">
                            <el-select :disabled="planDialogState.disabled" v-model="planDialogState.planForm.identificationMethod" style="width:100%" placeholder="辨识方法" clearable>
                                <el-option v-for="item in planDialogState.identificationMethodList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="负责人" prop="identificationUserId">
                        <el-form-item label="辨识专家" prop="identificationUserId">
                            <el-select :disabled="planDialogState.disabled" v-model="planDialogState.planForm.identificationUserId" style="width:100%"  placeholder="负责人" clearable>
                                <el-option v-for="item in planDialogState.personList" :key="item.id" :label="item.realName" :value="item.id"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="推荐评价方法" prop="evaluateMethod">
                            <el-select :disabled="planDialogState.disabled" v-model="planDialogState.planForm.evaluateMethod" style="width:100%"  placeholder="推荐评价方法" clearable>
                                <el-option v-for="item in planDialogState.evaluateMethodList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
@@ -77,7 +63,7 @@
</template>
<script setup lang="ts">
import { reactive, ref } from "vue";
import { reactive, ref, getCurrentInstance } from "vue";
import {ElMessage} from "element-plus";
import {planApi} from "/@/api/analyse/plan";
import {isValidKey} from "/@/utils/methods";
@@ -86,46 +72,29 @@
const planDialogState = reactive<PlanDialogType>({
    title: '',
    time:[],
    disabled: false,
    planDialogVisible: false,
    planForm: {
        riskUnitId: null,
        planUserId: null,
        assessPlanName: '',
        assessTime: [],
        assessStartTime: '',
        assessEndTime: '',
        identificationMethod: null,
        identificationUserId: null,
        evaluateMethod: null,
        evaluateUserId: null,
        riskType: 2
    },
    planFormRules: {
        deviceCode: [{ required: true, message: '请填写设备编号', trigger: 'blur' }],
        deviceName: [{ required: true, message: '请填写设备名称', trigger: 'blur' }],
        devicePower: [{ required: true, message: '请填写设备功率', trigger: 'blur' }],
        riskUnitId: [{ required: true, message: '请选择风险分析单元', trigger: 'change' }],
        assessPlanName: [{ required: true, message: '请填写评估计划名称', trigger: 'blur' }],
        assessTime: [{ required: true, message: '请选择评估时间', trigger: 'blur' }],
        planUserId: [{ required: true, message: '请选择计划制定人', trigger: 'change' }],
        identificationMethod: [{ required: true, message: '请选择辨识方法', trigger: 'change' }],
        identificationUserId: [{ required: true, message: '请选择负责人', trigger: 'change' }],
        evaluateMethod: [{ required: true, message: '请选择推荐评价方法', trigger: 'change' }],
        identificationUserId: [{ required: true, message: '请选择辨识专家', trigger: 'change' }],
        evaluateUserId: [{ required: true, message: '请选择评价专家', trigger: 'change' }],
    },
    riskUnitList: [],
    personList: [],
    identificationMethodList: [
        {id:1, name: 'PHA'},
        {id:2, name: 'JHA'},
        {id:3, name: 'SCL'},
        {id:4, name: 'HAZOP'},
        {id:5, name: '类比法'},
    ],
    evaluateMethodList: [
        {id:1, name: 'LEC'},
        {id:2, name: 'LS'},
        {id:3, name: 'MES'},
        {id:4, name: 'RS'},
    ]
    personList: []
})
const showPlanDialog = (title: string, value: PlanType, riskUnitList: RiskUnitType [], personList: SystemPersonType []) => {
@@ -142,17 +111,17 @@
            riskUnitId: null,
            planUserId: null,
            assessPlanName: '',
            assessTime: [],
            assessStartTime: '',
            assessEndTime: '',
            identificationMethod: null,
            identificationUserId: null,
            evaluateMethod: null,
            evaluateUserId: null,
            riskType: 2
        };
    }else if(title === '查看'){
        planDialogState.title = '查看';
        planDialogState.disabled = true
        planDialogState.time = [value.assessStartTime, value.assessEndTime]
        planDialogState.planForm.assessTime = [value.assessStartTime, value.assessEndTime]
        for(let i in planDialogState.planForm){
            if(isValidKey(i, planDialogState.planForm)){
                planDialogState.planForm[i] = value[i]
@@ -161,7 +130,10 @@
    }else{
        planDialogState.title = '编辑';
        planDialogState.planForm.id = value.id
        planDialogState.time = [value.assessStartTime, value.assessEndTime]
        planDialogState.planForm.assessTime=[value.assessStartTime, value.assessEndTime]
        console.log(planDialogState.planForm.assessTime,'5')
        formatTime()
        console.log(planDialogState.planForm.assessTime,'6 ')
        for(let i in planDialogState.planForm){
            if(isValidKey(i, planDialogState.planForm)){
                planDialogState.planForm[i] = value[i]
@@ -171,13 +143,14 @@
};
const formatTime = () => {
    planDialogState.planForm.assessStartTime = planDialogState.time === null ? '' : planDialogState.time[0]
    planDialogState.planForm.assessEndTime = planDialogState.time === null ? '' : planDialogState.time[1]
    planDialogState.planForm.assessStartTime = planDialogState.planForm.assessTime === null ? '' : planDialogState.planForm.assessTime[0]
    planDialogState.planForm.assessEndTime = planDialogState.planForm.assessTime === null ? '' : planDialogState.planForm.assessTime[1]
};
const onSubmitPlan = () => {
    planFormRef.value.validate(async(valid: boolean) => {
        if(valid){
            delete planDialogState.planForm.assessTime
            if(planDialogState.title === '新增'){
                let res = await planApi().addPlan(planDialogState.planForm);
                if(res.data.code === 100){
src/views/analyse/plan/index.ts
@@ -1,5 +1,6 @@
declare interface PlanStateType {
    planData: Array<PlanType>
    user: number | null,
    searchQuery: {
        pageIndex: number,
        pageSize: number,
@@ -38,7 +39,6 @@
declare interface PlanDialogType {
    title: string,
    time: string [],
    disabled: boolean,
    planDialogVisible: boolean,
    planForm: {
@@ -46,18 +46,16 @@
        riskUnitId: number | null,
        planUserId: number | null,
        assessPlanName: string,
        assessTime?: string[],
        assessStartTime: string,
        assessEndTime: string,
        identificationMethod: number | null,
        identificationUserId: number | null,
        evaluateMethod: number | null,
        evaluateUserId: number | null,
        riskType: number | null
    },
    planFormRules: {
    },
    identificationMethodList: Array<Type>,
    evaluateMethodList: Array<Type>
    riskUnitList: Array<RiskUnitType>
    personList: Array<SystemPersonType>
}
src/views/analyse/plan/index.vue
@@ -30,18 +30,19 @@
                        <el-table-column prop="assessPlanName" label="评估计划名称"/>
                        <el-table-column prop="riskUnitName" label="风险单元名称" />
                        <el-table-column prop="planUserName" label="计划制定人" />
                        <el-table-column prop="identificationMethod" label="辨识方法" show-overflow-tooltip>
                            <template #default="scope">
                                <span>{{`${planState.identificationMethodList.find(item =>item.id === scope.row.identificationMethod)?.name}`}}</span>
                            </template>
                        <el-table-column prop="assessStartTime" label="评估开始时间">
                          <template #default="scope">
                            <span>{{scope.row.assessStartTime?scope.row.assessStartTime.substring(0,16):'--'}}</span>
                          </template>
                        </el-table-column>
                        <el-table-column prop="identificationUser" label="计划负责人" />
                        <el-table-column prop="evaluateMethod" label="推荐评价方法" show-overflow-tooltip>
                            <template #default="scope">
                                <span>{{`${planState.evaluateMethodList.find(item =>item.id === scope.row.evaluateMethod)?.name}`}}</span>
                            </template>
                        <el-table-column prop="assessEndTime" label="评估结束时间">
                          <template #default="scope">
                            <span>{{scope.row.assessEndTime?scope.row.assessEndTime.substring(0,16):'--'}}</span>
                          </template>
                        </el-table-column>
                        <el-table-column prop="identificationUser" label="辨识专家" />
                        <el-table-column prop="evaluateUser" label="评价专家" />
                        <el-table-column prop="sceneUser" label="现场专家" />
                        <el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column>
                        <el-table-column prop="createByUserName" label="创建人" show-overflow-tooltip></el-table-column>
                        <el-table-column prop="updateTime" label="最后修改时间" show-overflow-tooltip></el-table-column>
@@ -64,9 +65,12 @@
                        </el-table-column>
                        <el-table-column label="操作" width="250">
                            <template #default="scope">
                                <el-button size="small" text type="primary" @click="accessPlan(scope.row)">派发</el-button>
                                <el-button size="small" text type="primary" v-if="scope.row.planSellStatus === 1" @click="accessPlan(scope.row)">派发</el-button>
                                <el-button size="small" text type="primary" :icon="View" @click="openPlanDialog('查看', scope.row)">查看</el-button>
                                <el-button v-if="scope.row.planSellStatus === 1" size="small" text type="primary" :icon="Edit" @click="openPlanDialog('修改', scope.row)">编辑</el-button>
                                <el-button v-if="scope.row.identificationUserId == planState.user" size="small" text type="primary" :icon="Edit" @click="refuseIdentify(scope.row)">拒绝辨识</el-button>
                                <el-button v-if="scope.row.evaluateUserId == planState.user" size="small" text type="primary" :icon="Edit" @click="refuseEvaluate(scope.row)">拒绝评价</el-button>
                                <el-button v-if="scope.row.sceneUserId == planState.user" size="small" text type="primary" :icon="Edit" @click="refuseScene(scope.row)">拒绝现场</el-button>
                                <el-button v-if="scope.row.planSellStatus === 1" size="small" text type="danger" :icon="Delete" @click="onDelPlan(scope.row)">删除</el-button>
                            </template>
                        </el-table-column>
@@ -89,14 +93,19 @@
import {riskUnitApi} from "/@/api/analyse/riskUnit";
import {personApi} from "/@/api/basic/person";
import {useUserInfo} from "/@/stores/userInfo";
import { storeToRefs } from 'pinia';
import {userApi} from "/@/api/systemManage/user";
const PlanDialog = defineAsyncComponent(() => import('./components/planDialog.vue'));
const planDialogRef = ref();
const userInfo = useUserInfo();
const { userInfos } = storeToRefs(userInfo);
const planState = reactive<PlanStateType>({
    planData: [],
    user: null,
    searchQuery: {
        pageIndex: 1,
        pageSize: 10,
@@ -173,6 +182,57 @@
    planDialogRef.value.showPlanDialog(title, value, planState.riskUnitList, planState.personList);
};
const refuseIdentify = async(val: PlanType)=>{
  let res = await planApi().refuseIdentify({ id: val.id });
  if (res.data.code === 100) {
    ElMessage({
      type: 'success',
      duration: 2000,
      message: '拒绝成功'
    });
    await getPlanData();
  } else {
    ElMessage({
      type: 'warning',
      message: res.data.msg
    });
  }
}
const refuseEvaluate = async(val: PlanType)=>{
  let res = await planApi().refuseEvaluate({ id: val.id });
  if (res.data.code === 100) {
    ElMessage({
      type: 'success',
      duration: 2000,
      message: '拒绝成功'
    });
    await getPlanData();
  } else {
    ElMessage({
      type: 'warning',
      message: res.data.msg
    });
  }
}
const refuseScene = async(val: PlanType)=>{
  let res = await planApi().refuseScene({ id: val.id });
  if (res.data.code === 100) {
    ElMessage({
      type: 'success',
      duration: 2000,
      message: '拒绝成功'
    });
    await getPlanData();
  } else {
    ElMessage({
      type: 'warning',
      message: res.data.msg
    });
  }
}
const onDelPlan = (val: PlanType) => {
    ElMessageBox.confirm(`此操作将永久删除该计划:“${val.assessPlanName}”,是否继续?`, '提示', {
        confirmButtonText: '确认',
@@ -248,6 +308,7 @@
    getPlanData();
    getAllRiskUnitList();
    getPersonList();
    planState.user = userInfos.value.uid
})
</script>
src/views/analyse/riskUnit/components/riskUnitDialog.vue
@@ -28,6 +28,13 @@
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" v-if="riskUnitDialogState.experimentType === 2">
                      <el-form-item label="风险单元类型" prop="experimentId">
                        <el-select v-model="riskUnitDialogState.riskUnitForm.riskUnitTypeId" placeholder="风险单元类型" clearable class="input-length">
                          <el-option v-for="item in riskUnitDialogState.riskTypeList" :key="item.id" :label="item.riskType" :value="item.id"></el-option>
                        </el-select>
                      </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" v-if="riskUnitDialogState.experimentType === 2">
                        <el-form-item label="负责人" prop="liabilityUserId">
                            <el-select v-model="riskUnitDialogState.riskUnitForm.liabilityUserId" placeholder="负责人" clearable class="input-length">
                                <el-option v-for="item in riskUnitDialogState.allPersonList" :key="item.id" :label="item.personName" :value="item.id"></el-option>
@@ -79,6 +86,7 @@
        experimentId: null,
        riskCode: '',
        riskName: '',
        riskUnitTypeId: null,
        liabilityUserId: null,
        liabilityDep: '',
        description: '',
@@ -88,6 +96,7 @@
        experimentId: [{ required: true, message: '请选择实验', trigger: 'change' }],
        riskCode: [{ required: true, message: '请填写风险单元编号', trigger: 'blur' }],
        riskName: [{ required: true, message: '请填写风险单元名称', trigger: 'blur' }],
        riskUnitTypeId: [{ required: true, message: '请选择风险单元类型', trigger: 'blur' }],
        liabilityUserId: [{ required: true, message: '请选择负责人', trigger: 'change' }],
        basicRiskUnitId: [{ required: true, message: '请选择基础风险单元', trigger: 'change' }]
    },
@@ -97,6 +106,7 @@
        {id:2, name: '个'},
        {id:3, name: '件'}
    ],
    riskTypeList: [],
    basicUnitList: [],
    allPersonList: [],
    allExperimentList: [],
@@ -106,11 +116,12 @@
    ],
})
const showRiskUnitDialog = (title: string, value: RiskUnitType, basicUnitList: UnitType [], allPersonList: AllPersonListType [], allExperimentList: ProjectType []) => {
const showRiskUnitDialog = (title: string, value: RiskUnitType, basicUnitList: UnitType [], allPersonList: AllPersonListType [], allExperimentList: ProjectType [],allRiskTypeList: RiskType []) => {
    riskUnitDialogState.riskUnitDialogVisible = true;
    riskUnitDialogState.basicUnitList = basicUnitList
    riskUnitDialogState.allPersonList = allPersonList
    riskUnitDialogState.allExperimentList = allExperimentList
    riskUnitDialogState.riskTypeList = allRiskTypeList
    setTimeout(() => {
        riskUnitFormRef.value.clearValidate();
    });
@@ -120,6 +131,7 @@
            experimentId: null,
            riskCode: '',
            riskName: '',
            riskUnitTypeId: null,
            liabilityUserId: null,
            liabilityDep: '',
            description: '',
@@ -141,8 +153,9 @@
    riskUnitFormRef.value.validate(async(valid: boolean) => {
        if(valid){
            if(riskUnitDialogState.title === '新增' && riskUnitDialogState.experimentType === 1){
                let { basicRiskUnitId, ...query} = riskUnitDialogState.riskUnitForm
                let res = await riskUnitApi().addRiskUnit(query);
                let { experimentId,basicRiskUnitId} = riskUnitDialogState.riskUnitForm
                let query = { experimentId,basicRiskUnitId }
                let res = await riskUnitApi().addBasicRiskUnit(query);
                if(res.data.code === 100){
                    emit('refresh')
                    riskUnitDialogState.riskUnitDialogVisible = false;
@@ -157,8 +170,8 @@
                    });
                }
            }else if(riskUnitDialogState.title === '新增' && riskUnitDialogState.experimentType === 2){
                let { riskCode, riskName, liabilityUserId, liabilityDep, description, ...query} = riskUnitDialogState.riskUnitForm
                let res = await riskUnitApi().addBasicRiskUnit(query);
                let { basicRiskUnitId, ...query} = riskUnitDialogState.riskUnitForm
                let res = await riskUnitApi().addRiskUnit(query);
                if(res.data.code === 100){
                    emit('refresh')
                    riskUnitDialogState.riskUnitDialogVisible = false;
src/views/analyse/riskUnit/index.ts
@@ -7,6 +7,7 @@
        riskName: string,
    }
    total: number
    allRiskTypeList: Array<RiskType>
    riskList: Array<Type>,
    riskSourceList: Array<Type>
    evaluateStatusList: Array<Type>
@@ -32,6 +33,11 @@
    name: string,
}
declare interface RiskType {
    id: number,
    riskType: string
}
declare interface RiskUnitDialogType {
    title: string,
    experimentType: number | null,
@@ -41,6 +47,7 @@
        experimentId: number | null,
        riskCode: string,
        riskName: string,
        riskUnitTypeId: number | null,
        liabilityDep: string,
        liabilityUserId: number | null,
        description: string,
@@ -50,6 +57,7 @@
    riskUnitFormRules: {
    },
    riskTypeList: Array<RiskType>,
    specialDeviceList: Array<Type>,
    deviceUnitList: Array<Type>,
    basicUnitList: Array<UnitType>,
src/views/analyse/riskUnit/index.vue
@@ -39,6 +39,7 @@
                                <span>{{`${riskUnitState.riskList.find(item =>item.id === scope.row.riskType)?.name || ''}`}}</span>
                            </template>
                        </el-table-column>
                        <el-table-column prop="riskUnitType" label="风险单元类型"/>
                        <el-table-column prop="evaluateStatus" label="是否评价" show-overflow-tooltip>
                            <template #default="scope">
                                <span>{{`${riskUnitState.evaluateStatusList.find(item =>item.id === scope.row.evaluateStatus)?.name}`}}</span>
@@ -100,6 +101,7 @@
        {id:2, name: '设施设备'},
        {id:3, name: '固定工艺节点'}
    ],
    allRiskTypeList: [],
    basicUnitList: [],
    allPersonList: [],
    allExperimentList: [],
@@ -142,6 +144,18 @@
    }
};
const getAllTypeList = async () =>{
  let res = await unitApi().getAllUnitType()
  if(res.data.code === 100){
    riskUnitState.allRiskTypeList = JSON.parse(JSON.stringify(res.data.data));
  }else{
    ElMessage({
      type: 'warning',
      message: res.data.msg
    })
  }
}
const getAllExperimentList = async () => {
    let res = await projectApi().getAllExperiment()
    if(res.data.code === 100){
@@ -155,7 +169,7 @@
};
const openRiskUnitDialog = (title: string, value: RiskUnitType) => {
    riskUnitDialogRef.value.showRiskUnitDialog(title, value, riskUnitState.basicUnitList, riskUnitState.allPersonList, riskUnitState.allExperimentList);
    riskUnitDialogRef.value.showRiskUnitDialog(title, value, riskUnitState.basicUnitList, riskUnitState.allPersonList, riskUnitState.allExperimentList, riskUnitState.allRiskTypeList);
};
const onDelRiskUnit = (val: RiskUnitType) => {
@@ -207,6 +221,7 @@
    getRiskUnitData();
    getAllBasicUnitList();
    getAllPersonList();
    getAllTypeList();
    getAllExperimentList();
})
src/views/experiment/developing/components/developDialog.vue
对比新文件
@@ -0,0 +1,638 @@
<template>
    <div class="system-menu-dialog-container">
        <el-dialog :title="projectDialogState.title" v-model="projectDialogState.projectDialogVisible" width="80%">
            <el-form ref="ProjectFormRef" :rules="projectDialogState.projectFormRules" :model="projectDialogState.projectForm" size="default" label-width="0">
                <table class="report-table">
                    <th class="m-color b-font" style="text-align: center">***研究所/***大学<br />科学研究实验项目安全风险基础信息录入表(已开展
                      )(带*为必填项)</th>
                    <tr>
                        <td class="w-25 m-color required">实验名称</td>
                        <td class="w-75 m-color">
                            <el-form-item prop="experimentName">
                                <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.experimentName" placeholder="请输入实验名称" />
                            </el-form-item>
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color required">实验类型</td>
                        <td class="w-75 m-color">
                            <el-radio-group style="text-align: center" :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.experimentType">
                                <el-radio :label="1">化学类</el-radio>
                                <el-radio :label="2">生物类</el-radio>
                                <el-radio :label="3">辐射类</el-radio>
                                <el-radio :label="4">机电类</el-radio>
                                <el-radio :label="5">特种设备类</el-radio>
                                <el-radio :label="6">其他类</el-radio>
                            </el-radio-group>
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color required">部门</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.dep" />
                        </td>
                    </tr>
                    <tr>
                      <td class="w-25 m-color required">负责人</td>
                      <td class="w-25 m-color">
                        <el-select style="width: 100%" disabled v-model="projectDialogState.projectForm.liabilityUserId" clearable filterable>
                          <el-option :key="userInfos.uid" :value="userInfos.uid" :label="userInfos.userName"></el-option>
                        </el-select>
                        <!--                        <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.liabilityUserId"/>-->
                      </td>
                      <td class="w-25 m-color required">电话</td>
                      <td class="w-25 m-color">
                        <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.liabilityUserPhone" />
                      </td>
                    </tr>
                    <tr>
                      <td class="w-25 m-color required">安全负责人</td>
                      <td class="w-25 m-color">
<!--                        <el-select style="width: 100%" :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.safeLiabilityUser" @change="getSafeLiabilityUserPhone($event)" clearable filterable>-->
<!--                          <el-option-->
<!--                              v-for="item in projectDialogState.allPersonList"-->
<!--                              :key="item.id"-->
<!--                              :value="item.id"-->
<!--                              :label="item.personName"-->
<!--                          ></el-option>-->
<!--                        </el-select>-->
                        <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.safeLiabilityUser"/>
                      </td>
                      <td class="w-25 m-color required">电话</td>
                      <td class="w-25 m-color">
                        <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.safeLiabilityUserPhone" />
                      </td>
                    </tr>
                    <tr>
                      <td class="w-25 m-color required">立项时间</td>
                      <td class="w-25 m-color">
                        <el-date-picker :disabled="projectDialogState.disabled"  type="datetime" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" v-model="projectDialogState.projectForm.createExperimentTime" />
                      </td>
                      <td class="w-25 m-color required">开展时间</td>
                      <td class="w-25 m-color">
                          <el-date-picker :disabled="projectDialogState.disabled"  type="datetime" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" v-model="projectDialogState.projectForm.startTime" />
                      </td>
                    </tr>
                    <tr>
                      <td class="w-25 m-color required">是否是安全化信息系统</td>
                      <td class="w-25 m-color">
                        <el-radio-group :disabled="projectDialogState.disabled"  v-model="projectDialogState.projectForm.sisStatus" @change="hasSafeSystem">
                          <el-radio :label="1">是</el-radio>
                          <el-radio :label="2">否</el-radio>
                        </el-radio-group>
                      </td>
                      <td class="w-25 m-color" :class="projectDialogState.projectForm.sisStatus==1?'required':''">安全信息化系统</td>
                      <td class="w-25 m-color">
                        <el-input :disabled="projectDialogState.disabled" :readonly="projectDialogState.projectForm.sisStatus!==1" v-model="projectDialogState.projectForm.safeInformationSystem" />
                      </td>
                    </tr>
                    <select-room ref="selectRoomRef" v-model:disabled="projectDialogState.disabled" v-model:data="projectDialogState.projectForm.siteList"></select-room>
                    <select-material ref="selectMaterialRef" v-model:disabled="projectDialogState.disabled" v-model:data="projectDialogState.projectForm.stuffList"></select-material>
                    <select-equipment ref="selectEquipmentRef" v-model:disabled="projectDialogState.disabled" v-model:data="projectDialogState.projectForm.deviceList"></select-equipment>
                    <tr>
                        <td class="w-25 m-color required">实验步骤</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.experimentStep" placeholder="请输入实验步骤" />
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color required">操作方法</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.experimentMethod" placeholder="请输入操作方法" />
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color required">工艺过程</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.process" placeholder="请输入工艺过程" />
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color required">特殊/关键过程</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.keyProcess" placeholder="请输入特殊/关键过程" />
                        </td>
                    </tr>
                    <tr>
                      <td class="w-25 m-color required">预防措施</td>
                      <td class="w-75 m-color">
                        <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.measure" placeholder="请输入预防措施" />
                      </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color required">是否存在过夜、老化实验</td>
                        <td class="w-25 m-color">
                            <el-radio-group :disabled="projectDialogState.disabled"  v-model="projectDialogState.projectForm.timeout">
                                <el-radio :label="1">存在</el-radio>
                                <el-radio :label="2">不存在</el-radio>
                            </el-radio-group>
                        </td>
                        <td class="w-25 m-color required">过夜、老化保障措施</td>
                        <td class="w-25 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.timeoutManager" />
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color required">是否在封闭条件下</td>
                        <td class="w-25 m-color">
                            <el-radio-group :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.closed">
                                <el-radio :label="1">存在</el-radio>
                                <el-radio :label="2">不存在</el-radio>
                            </el-radio-group>
                        </td>
                        <td class="w-25 m-color required">封闭条件保障措施</td>
                        <td class="w-25 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.unclosedManager" />
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color required">实验场所防爆措施条件和设施情况</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.explosionProof" placeholder="请输入" />
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color required">实验场所防火措施条件和设施情况</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.fireProof" placeholder="请输入" />
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color required">实验场所防中毒措施条件和设施情况</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.poisonProof" placeholder="请输入" />
                        </td>
                    </tr>
                    <select-danger ref="selectDangerRef" v-model:data="projectDialogState.projectForm.hazardousWasteList" v-model:disabled="projectDialogState.disabled"></select-danger>
                    <select-person ref="selectPersonRef" v-model:data="projectDialogState.projectForm.persons" v-model:disabled="projectDialogState.disabled"></select-person>
                    <tr>
                        <td class="w-25 m-color required">安全管理制度</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.safeManagerMethod" placeholder="请输入" />
                        </td>
                    </tr>
                    <tr class="m-color b-font" style="text-align: center">应急预案/应急演练</tr>
                    <tr>
                        <td class="w-25 m-color required">有无预案</td>
                        <td class="w-25 m-color required">预案名称</td>
                        <td class="w-25 m-color required">是否演练</td>
                        <td class="w-25 m-color required">演练情况</td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.emergencyPlan" />
                        </td>
                        <td class="w-25 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.emergencyPlanName" />
                        </td>
                        <td class="w-25 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.emergencyDrillStatus" />
                        </td>
                        <td class="w-25 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.emergencyDrill" />
                        </td>
                    </tr>
                    <tr class="m-color b-font" style="  text-align: center">其他信息</tr>
                    <tr>
                        <td class="w-25 m-color required">实验场所是否需要分区隔断</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.partitionCondition" placeholder="请输入" />
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color">其它基础信息(详细描述)</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.note" placeholder="请输入" />
                        </td>
                    </tr>
                </table>
            </el-form>
            <template #footer>
                <span class="dialog-footer" style="padding-top:10px;text-align: center !important;">
                    <el-button @click="projectDialogState.projectDialogVisible = !projectDialogState.projectDialogVisible" size="default">取 消</el-button>
                    <el-button type="primary" v-if="!projectDialogState.disabled" @click="onSubmitProject" size="default">确定</el-button>
                </span>
            </template>
        </el-dialog>
    </div>
</template>
<script setup lang="ts">
import {defineAsyncComponent, nextTick, onMounted, reactive, ref} from "vue";
import {ElMessage} from "element-plus";
import {projectApi} from "/@/api/experiment/project";
import {personApi} from "/@/api/basic/person";
import {userApi} from "/@/api/systemManage/user";
import SelectRoom from "/@/views/experiment/project/components/selectRoom.vue";
import {useUserInfo} from "/@/stores/userInfo";
import {storeToRefs} from "pinia";
const SelectEquipment = defineAsyncComponent(() => import('../../project/components/selectEquipment.vue'))
const SelectMaterial = defineAsyncComponent(() => import('../../project/components/selectMaterial.vue'))
const SelectDanger = defineAsyncComponent(() => import('../../project/components/selectDanger.vue'))
const SelectPerson = defineAsyncComponent(() => import('../../project/components/selectPerson.vue'))
const ProjectFormRef = ref()
const selectPersonRef = ref()
const selectEquipmentRef = ref()
const selectRoomRef = ref()
const selectMaterialRef = ref()
const selectDangerRef = ref()
const userInfo = useUserInfo();
const { userInfos } = storeToRefs(userInfo);
const projectDialogState = reactive<ProjectDialogType>({
    title: '',
    disabled: false,
    projectDialogVisible: false,
    projectForm:   {
        id: null,
        experimentName: "",
        experimentType: null,
        liabilityUserId: Number(userInfos.value.uid),
        liabilityUserPhone: '',
        safeLiabilityUser: '',
        safeLiabilityUserPhone: '',
        sisStatus: null,
        safeInformationSystem: '',
        dep: "",
        experimentStep: "",
        experimentMethod: "",
        process: "",
        keyProcess: "",
        measure: "",
        timeout: null,
        timeoutManager: "",
        closed: null,
        unclosedManager: "",
        explosionProof: "",
        fireProof: "",
        poisonProof: "",
        hazardousWaste: null,
        safeManagerMethod: "",
        emergencyPlan: "",
        emergencyDrill: "",
        emergencyPlanName: "",
        emergencyDrillStatus: "",
        partitionCondition: "",
        note: "",
        createExperimentTime: '',
        startTime: '',
        persons: [
        ],
        siteList: [],
        deviceList: [
        ],
        stuffList: [
        ],
        hazardousWasteList: [
        ]
    },
    projectFormRules: {
        experimentName: [{ required: true, message: '请填写设备编号', trigger: 'blur' }],
        deviceName: [{ required: true, message: '请填写设备名称', trigger: 'blur' }],
        devicePower: [{ required: true, message: '请填写设备功率', trigger: 'blur' }],
        deviceUnit: [{ required: true, message: '请选择计量单位', trigger: 'change' }]
    },
    allPersonList: [],
    allRoomList: [],
    systemPersonList: [],
})
const showDevelopDialog = (title: string, value: ProjectType, allRoomList: RoomType []) => {
    projectDialogState.projectDialogVisible = true;
    projectDialogState.allRoomList = allRoomList
    setTimeout(() => {
        ProjectFormRef.value.clearValidate();
    });
    if(title === '新增'){
        projectDialogState.disabled = false
        projectDialogState.title = '新增';
        projectDialogState.projectForm = {
            id: null,
            experimentName: "",
            experimentType: null,
            liabilityUserId: Number(userInfos.value.uid),
            liabilityUserPhone: '',
            safeLiabilityUser: '',
            safeLiabilityUserPhone: '',
            sisStatus: null,
            safeInformationSystem: '',
            dep: "",
            experimentStep: "",
            experimentMethod: "",
            process: "",
            keyProcess: "",
            measure: "",
            timeout: null,
            timeoutManager: "",
            closed: null,
            unclosedManager: "",
            explosionProof: "",
            fireProof: "",
            poisonProof: "",
            hazardousWaste: 1,
            safeManagerMethod: "",
            emergencyPlan: "",
            emergencyDrill: "",
            emergencyPlanName: "",
            emergencyDrillStatus: "",
            partitionCondition: "",
            note: "",
            createExperimentTime: '',
            startTime: '',
            persons: [
            ],
            siteList: [],
            deviceList: [
            ],
            stuffList: [
            ],
            hazardousWasteList: [
            ]
        };
    }else if(title === '整改'){
      projectDialogState.title = '整改';
      projectDialogState.disabled = false
      for(let i in projectDialogState.projectForm) {
        if(isValidKey(i, projectDialogState.projectForm)) {
          projectDialogState.projectForm[i] = value[i];
        }
      }
    }else{
        projectDialogState.title = '查看';
        projectDialogState.disabled = true
        for(let i in projectDialogState.projectForm) {
            if(isValidKey(i, projectDialogState.projectForm)) {
                projectDialogState.projectForm[i] = value[i];
            }
        }
    }
};
const isValidKey = (key: string | number | symbol, object:object): key is keyof typeof object =>{
    return key in object;
};
const getLiabilityUserPhone = (value: number)=>{
  const data = projectDialogState.systemPersonList.find(item => item.id === value) as AllPersonListType
  projectDialogState.projectForm.liabilityUserPhone = data.phone
}
const getSafeLiabilityUserPhone = (value: number)=>{
  const data = projectDialogState.allPersonList.find(item => item.id === value) as AllPersonListType
  projectDialogState.projectForm.safeLiabilityUserPhone = data.phone
}
const hasSafeSystem = (value: number) =>{
  if(value == 2){
    projectDialogState.projectForm.safeInformationSystem = ''
  }
}
const onSubmitProject = () => {
    ProjectFormRef.value.validate(async(valid: boolean) => {
        if(valid){
            if(projectDialogState.title === '新增'){
                projectDialogState.projectForm.persons = selectPersonRef.value.dataList
                projectDialogState.projectForm.hazardousWasteList = selectDangerRef.value.dataList
                projectDialogState.projectForm.siteList = selectRoomRef.value.dataList.map(({siteId}) => ({siteId}))
                projectDialogState.projectForm.stuffList = selectMaterialRef.value.dataList
                projectDialogState.projectForm.deviceList = selectEquipmentRef.value.dataList
                let res = await projectApi().addDevelop(projectDialogState.projectForm);
                if(res.data.code === 100){
                    emit('refresh')
                    projectDialogState.projectDialogVisible = false;
                    ElMessage({
                        type: 'success',
                        message: '新增成功'
                    })
                }else{
                    ElMessage({
                        type: 'warning',
                        message: res.data.msg,
                    });
                }
            }else{
                projectDialogState.projectForm.siteList = selectRoomRef.value.dataList.map(({siteId}) => ({siteId}))
                projectDialogState.projectForm.hazardousWasteList = selectDangerRef.value.dataList.map(obj => ({classify:obj.classify,wasteStorage:obj.wasteStorage,handAmount:obj.handAmount}))
                let res = await projectApi().modProject(projectDialogState.projectForm)
                if(res.data.code === 100){
                  emit('refresh')
                  projectDialogState.projectDialogVisible = false;
                  ElMessage({
                    type: 'success',
                    message: '整改已提交'
                  })
                }else{
                  ElMessage({
                    type: 'warning',
                    message: res.data.msg,
                  });
                }
            }
        }else{
            ElMessage({
                type: 'warning',
                message: '请完善基本信息',
            });
        }
    })
};
const getPersonList = async () => {
    let res = await userApi().getUserList({
        roleId: 1,
        usePage: false,
        pageIndex: 1,
        pageSize: 10
    });
    if(res.data.code === 100){
        projectDialogState.systemPersonList = JSON.parse(JSON.stringify(res.data.data));
    }else{
        ElMessage({
            type: 'warning',
            message: res.data.msg
        })
    }
};
const getAllPersonList = async () => {
    let res = await personApi().getAllPerson();
    if(res.data.code === 100){
        projectDialogState.allPersonList = JSON.parse(JSON.stringify(res.data.data));
    }else{
        ElMessage({
            type: 'warning',
            message: res.data.msg
        })
    }
};
const emit = defineEmits(['refresh']);
defineExpose({
    showDevelopDialog,
});
onMounted(() => {
    getAllPersonList();
    getPersonList();
});
</script>
<style scoped lang="scss">
.site-layout-background {
    background: #fff;
}
.report-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #337ecc;
    margin: 20px 0;
th {
    padding: 10px 0;
    border: 1px solid #337ecc;
    border-left: none;
}
tr {
    width: 100%;
    height: 44px;
    line-height: 42px;
    border-bottom: 1px solid #ccc;
&:last-of-type {
     border-bottom: none;
 }
td {
    border-right: 1px solid #ccc;
    display: inline-block;
    height: 44px;
    vertical-align: middle;
    text-align: center;
    line-height: 42px;
  :deep(.el-input__wrapper ){
    box-shadow: none;
    margin-top: 6px;
  }
&:last-of-type {
     border-right: none;
 }
&.required {
  &::before {
    content: "*";
    display: inline-block;
    color: red;
  }
}
&.w-14 {
     width: calc((100/7)/100 * 100%);
 }
&.w-16 {
     width: calc((100/6)/100 * 100%);
 }
&.w-18 {
     width: 16.59%;
 }
&.w-20 {
     width: 20%;
 }
&.w-25 {
     width: 25%;
 }
&.w-50 {
     width: 50%;
 }
&.w-75 {
     width: 75%;
 }
.ant-input {
    height: 100%;
    border: none;
    background: #f5f7fa;
}
.ant-picker {
    width: 100%;
    height: 100%;
}
}
}
.b-font {
    font-size: 16px;
    font-weight: bolder;
}
}
.m-color {
    color: #0c4995;
}
.roomSelect{
  ::v-deep(.el-popper){
    .el-select-dropdown__item{
      height: auto;
      padding: 0;
      .roomTable{
        width: 100%;
        display: flex;
        border-bottom: 1px solid #ebeef5;
        &:last-of-type{
          border-bottom: none;
        }
        &>div{
          width: 25%;
          border-right: 1px dashed #ebeef5;
          &:last-of-type{
            border-right: none;
          }
          div{
            width: 100%;
          }
          .roomTit{
            border-bottom: 1px solid #ebeef5;
          }
        }
      }
    }
    .el-select-dropdown__item.selected{
      .roomTit{
        color: #606266;
        font-weight: normal;
      }
    }
  }
}
:deep(.el-dialog__footer){
    padding-top: 20px;
    display: flex;
    justify-content: center;
}
</style>
src/views/experiment/developing/components/projectDialog.vue
文件已删除
src/views/experiment/developing/index.vue
@@ -4,17 +4,17 @@
            <el-row class="homeCard">
                <div class="basic-line">
                    <span>实验名称:</span>
                    <el-input v-model="projectState.searchQuery.searchParams.experimentName" clearable filterable class="input-box" placeholder="实验名称">
                    <el-input v-model="developState.searchQuery.searchParams.experimentName" clearable filterable class="input-box" placeholder="实验名称">
                    </el-input>
                </div>
                <div class="basic-line">
                    <span>实验类型:</span>
                    <el-select v-model="projectState.searchQuery.searchParams.experimentType" clearable filterable class="input-box" placeholder="实验类型">
                        <el-option v-for="item in projectState.experimentTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                    <el-select v-model="developState.searchQuery.searchParams.experimentType" clearable filterable class="input-box" placeholder="实验类型">
                        <el-option v-for="item in developState.experimentTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                    </el-select>
                </div>
                <div style="padding-bottom: 10px">
                    <el-button type="primary" @click="getProjectData">查询</el-button>
                    <el-button type="primary" @click="getdevelopData">查询</el-button>
                    <el-button plain @click="reset">重置</el-button>
                </div>
            </el-row>
@@ -22,35 +22,81 @@
                <div class="main-card">
                    <el-row class="cardTop">
                        <el-col :span="12" class="mainCardBtn">
                            <el-button type="primary" :icon="Plus" size="default" @click="openProjectDialog('新增', {})">新增</el-button>
                            <el-button type="primary" :icon="Plus" size="default" @click="openProjectDialog('新增', {})">录入实验信息</el-button>
                            <!--                            <el-button type="danger" :icon="Delete" size="default" plain>删除</el-button>-->
                        </el-col>
<!--                        <el-button type="primary" :icon="Refresh" size="default" />-->
                    </el-row>
                    <el-table ref="multipleTableRef" :data="projectState.projectData" style="width: 100%" height="calc(100% - 100px)" :header-cell-style="{ background: '#fafafa' }">
                    <el-table ref="multipleTableRef" :data="developState.developData" style="width: 100%" height="calc(100% - 100px)" :header-cell-style="{ background: '#fafafa' }">
                        <el-table-column prop="experimentCode" label="实验编号"/>
                        <el-table-column prop="expectStartTime" label="立项时间" />
                        <el-table-column prop="experimentName" label="实验名称"/>
                        <el-table-column prop="createExperimentTime" label="立项时间">
                          <template #default="scope">
                            <span>{{scope.row.createExperimentTime?scope.row.createExperimentTime.substring(0,16):'--'}}</span>
                          </template>
                        </el-table-column>
                        <el-table-column prop="startTime" label="开展时间" show-overflow-tooltip>
                          <template #default="scope">
                            <span>{{scope.row.startTime?scope.row.startTime.substring(0,16):'--'}}</span>
                          </template>
                        </el-table-column>
                        <el-table-column prop="liabilityUser" label="负责人"/>
                        <el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column>
                        <el-table-column prop="createByUserName" label="创建人" show-overflow-tooltip></el-table-column>
                        <el-table-column prop="updateTime" label="最后修改时间" show-overflow-tooltip></el-table-column>
                        <el-table-column prop="updateByUserName" label="最后修改人" show-overflow-tooltip></el-table-column>
                        <el-table-column label="操作" width="250">
                        <el-table-column prop="siteList" label="实验场所" show-overflow-tooltip>
                          <template #default="scope">
                            <span>{{scope.row.siteList.map(i=>i.siteName).join(',')}}</span>
                          </template>
                        </el-table-column>
                        <el-table-column prop="experimentType" label="实验类别">
                          <template #default="scope">
                            <span>{{developState.experimentTypeList.find(i=>i.id == scope.row.experimentType)?.name}}</span>
                          </template>
                        </el-table-column>
                        <el-table-column prop="status" label="评估申请">
                          <template #default="scope">
                            <span>{{scope.row.status == 1?'未申请':scope.row.status == 2?'已申请':'--'}}</span>
                          </template>
                        </el-table-column>
                        <el-table-column prop="status" label="评估申请时间" show-overflow-tooltip>
                          <template #default="scope">
                            <span>{{scope.row.assessApplyTime?scope.row.assessApplyTime.substring(0,16):'--'}}</span>
                          </template>
                        </el-table-column>
                        <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?'生成报告':'--'}}
                            </el-tag>
                          </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?'重大风险':'--'}}
                            </el-tag>
                          </template>
                        </el-table-column>
<!--                        <el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column>-->
<!--                        <el-table-column prop="createByUserName" label="创建人" show-overflow-tooltip></el-table-column>-->
<!--                        <el-table-column prop="updateTime" label="最后修改时间" show-overflow-tooltip></el-table-column>-->
<!--                        <el-table-column prop="updateByUserName" label="最后修改人" show-overflow-tooltip></el-table-column>-->
                        <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" text type="primary" :icon="Edit" @click="applyAccess( 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" :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>
                        </el-table-column>
                    </el-table>
                    <div class="pageBtn">
                        <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="projectState.searchQuery.pageIndex" background v-model:page-size="projectState.searchQuery.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="projectState.total" class="page-position"> </el-pagination>
                        <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="developState.searchQuery.pageIndex" background v-model:page-size="developState.searchQuery.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="developState.total" class="page-position"> </el-pagination>
                    </div>
                </div>
            </div>
        </div>
        <project-dialog ref="ProjectDialogRef" @refresh="getProjectData"></project-dialog>
        <develop-dialog ref="DevelopDialogRef" @refresh="getdevelopData"></develop-dialog>
<!--        <apply-start ref="ApplyStartRef"></apply-start>-->
        <test ref="ApplyStartRef" @refresh="getProjectData"></test>
        <test ref="ApplyStartRef" @refresh="getdevelopData"></test>
    </div>
</template>
@@ -58,17 +104,17 @@
import {defineAsyncComponent, onMounted, reactive, ref} from "vue";
import {projectApi} from "/@/api/experiment/project";
import {ElMessage, ElMessageBox} from "element-plus";
import { View,Edit, Plus, Delete } from '@element-plus/icons-vue';
import { View,Edit, Plus, RefreshLeft } from '@element-plus/icons-vue';
import {roomApi} from "/@/api/basic/room";
const ProjectDialog = defineAsyncComponent(() => import('./components/projectDialog.vue'));
const DevelopDialog = defineAsyncComponent(() => import('./components/developDialog.vue'));
const Test = defineAsyncComponent(() => import('./components/applyDialog.vue'))
const ProjectDialogRef = ref();
const DevelopDialogRef = ref();
const ApplyStartRef = ref();
const projectState = reactive<ProjectStateType>({
    projectData: [],
const developState = reactive<ProjectStateType>({
    developData: [],
    searchQuery: {
        pageIndex: 1,
        pageSize: 10,
@@ -89,11 +135,11 @@
    allRoomList: []
})
const getProjectData = async () => {
    let res = await projectApi().getProjectByList(projectState.searchQuery);
const getdevelopData = async () => {
    let res = await projectApi().getDevelopByList(developState.searchQuery);
    if(res.data.code === 100){
        projectState.projectData = res.data.data;
        projectState.total = res.data.total;
        developState.developData = res.data.data;
        developState.total = res.data.total;
    }else{
        ElMessage({
            type: 'warning',
@@ -103,12 +149,11 @@
};
const openProjectDialog = (title: string, value: ProjectType) => {
    ProjectDialogRef.value.showProjectDialog(title, value, projectState.allRoomList);
    DevelopDialogRef.value.showDevelopDialog(title, value, developState.allRoomList);
};
const applyAccess = (val: ProjectType) => {
    debugger
    ElMessageBox.confirm(`此操作将申请评估该实验:“${val.experimentCode}”,是否继续?`, '提示', {
    ElMessageBox.confirm(`此操作将申请评估该实验:“${val.experimentName}”,是否继续?`, '提示', {
        confirmButtonText: '确认',
        cancelButtonText: '取消',
        type: 'warning'
@@ -121,7 +166,7 @@
                    duration: 2000,
                    message: '申请成功'
                });
                await getProjectData();
                await getdevelopData();
            } else {
                ElMessage({
                    type: 'warning',
@@ -131,6 +176,32 @@
        })
        .catch((error) => {
        });
}
const cancelAccess = (val: ProjectType) => {
  ElMessageBox.confirm(`此操作将撤销评估该实验:“${val.experimentName}”,是否继续?`, '提示', {
    confirmButtonText: '确认',
    cancelButtonText: '取消',
    type: 'warning'
  })
      .then(async () => {
        let res = await projectApi().cancelProject([val.id]);
        if (res.data.code === 100) {
          ElMessage({
            type: 'success',
            duration: 2000,
            message: '撤销成功'
          });
          await getdevelopData();
        } else {
          ElMessage({
            type: 'warning',
            message: res.data.msg
          });
        }
      })
      .catch((error) => {
      });
}
const onDelProject = (val: ProjectType) => {
@@ -148,7 +219,7 @@
                    duration: 2000,
                    message: '删除成功'
                });
                await getProjectData();
                await getdevelopData();
            } else {
                ElMessage({
                    type: 'warning',
@@ -161,17 +232,17 @@
}
const onHandleSizeChange = (val: number) => {
    projectState.searchQuery.pageSize = val;
    getProjectData();
    developState.searchQuery.pageSize = val;
    getdevelopData();
};
const onHandleCurrentChange = (val: number) => {
    projectState.searchQuery.pageIndex = val;
    getProjectData();
    developState.searchQuery.pageIndex = val;
    getdevelopData();
};
const reset = () => {
    projectState.searchQuery = {
    developState.searchQuery = {
        pageIndex: 1,
        pageSize: 10,
        searchParams: {
@@ -184,7 +255,7 @@
const getRoomData = async () => {
    let res = await roomApi().getAllRoom();
    if(res.data.code === 100){
        projectState.allRoomList = JSON.parse(JSON.stringify(res.data.data));
        developState.allRoomList = JSON.parse(JSON.stringify(res.data.data));
    }else{
        ElMessage({
            type: 'warning',
@@ -194,7 +265,7 @@
};
onMounted(() => {
    getProjectData();
    getdevelopData();
    getRoomData();
})
src/views/experiment/project/components/applyDialog.vue
@@ -16,7 +16,7 @@
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" v-if="applyStartDialogState.applyStartForm.sisStatus==1">
                        <el-form-item label="安全信息化系统" prop="safeInformationSystem">
                            <el-input v-model="applyStartDialogState.applyStartForm.safeInformationSystem" placeholder="材料类型" class="input-length">
                            </el-input>
@@ -42,7 +42,7 @@
const applyStartFormRef = ref()
const applyStartDialogState = reactive<ApplyStartDialogType>({
    title: '',
    title: '申请开展',
    applyStartDialogVisible: false,
    applyStartForm: {
        id: null,
@@ -57,12 +57,21 @@
const showApplyStartDialog = (value: ProjectType) => {
    applyStartDialogState.applyStartDialogVisible = true;
    applyStartDialogState.applyStartForm = {
      id: null,
      sisStatus: null,
      safeInformationSystem: '',
      startTime: ''
    },
    applyStartDialogState.applyStartForm.id = <number>value.id
};
const onSubmitApplyStart = () => {
    applyStartFormRef.value.validate(async(valid: boolean) => {
        if(valid){
            if(applyStartDialogState.applyStartForm.sisStatus == 2){
              applyStartDialogState.applyStartForm.safeInformationSystem = ''
            }
            let res = await projectApi().applyProject([applyStartDialogState.applyStartForm]);
            if(res.data.code === 100){
                emit('refresh')
src/views/experiment/project/components/projectDialog.vue
@@ -1,11 +1,11 @@
<template>
    <div class="system-menu-dialog-container">
        <el-dialog :title="projectDialogState.title" v-model="projectDialogState.projectDialogVisible" width="70%">
        <el-dialog :title="projectDialogState.title" v-model="projectDialogState.projectDialogVisible" width="80%">
            <el-form ref="ProjectFormRef" :rules="projectDialogState.projectFormRules" :model="projectDialogState.projectForm" size="default" label-width="0">
                <table class="report-table">
                    <th class="m-color b-font" style="text-align: center">***研究所/***大学<br />科学研究实验项目安全风险基础信息录入表(已开展B)</th>
                    <th class="m-color b-font" style="text-align: center">***研究所/***大学<br />科学研究实验项目安全风险基础信息录入表(新立项)(带*为必填项)</th>
                    <tr>
                        <td class="w-25 m-color">实验名称</td>
                        <td class="w-25 m-color required">实验名称</td>
                        <td class="w-75 m-color">
                            <el-form-item prop="experimentName">
                                <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.experimentName" placeholder="请输入实验名称" />
@@ -13,7 +13,7 @@
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color">实验类型</td>
                        <td class="w-25 m-color required">实验类型</td>
                        <td class="w-75 m-color">
                            <el-radio-group style="text-align: center" :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.experimentType">
@@ -29,130 +29,119 @@
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color">部门</td>
                        <td class="w-25 m-color required">部门</td>
                        <td class="w-25 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.dep" />
                        </td>
                        <td class="w-25 m-color">负责人</td>
                        <td class="w-16 m-color">
                            <el-select :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.liabilityUserId" clearable filterable>
                                <el-option
                                    v-for="item in projectDialogState.systemPersonList"
                                    :key="item.id"
                                    :value="item.id"
                                    :label="item.realName"
                                ></el-option>
                            </el-select>
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color">立项时间</td>
                        <td class="w-25 m-color required">立项时间</td>
                        <td class="w-25 m-color">
                            <el-date-picker :disabled="projectDialogState.disabled"  type="datetime" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" v-model="projectDialogState.projectForm.expectStartTime" />
                        </td>
<!--                        <td class="w-16 m-color">开展时间</td>-->
<!--                        <td class="w-16 m-color">-->
<!--                            <el-date-picker v-model="projectDialogState.projectForm.startTime" />-->
<!--                        </td>-->
                        <td class="w-25 m-color">安全负责人</td>
                        <td class="w-16 m-color">
                            <el-select :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.safeLiabilityUserId" clearable filterable>
                                <el-option
                                v-for="item in projectDialogState.allPersonList"
                                :key="item.id"
                                :value="item.id"
                                :label="item.personName"
                                ></el-option>
                            </el-select>
                          <el-date-picker :disabled="projectDialogState.disabled"  type="datetime" format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" v-model="projectDialogState.projectForm.createExperimentTime" />
                        </td>
                    </tr>
                    <tr class="m-color b-font" style="text-align: center">实验场所</tr>
<!--                    <tr>-->
<!--                        <td class="w-25 m-color">楼宇</td>-->
<!--                        <td class="w-75 m-color">-->
<!--                            <el-input v-model="projectDialogState.projectForm.building" placeholder="请输入楼栋名称" />-->
<!--                        </td>-->
<!--                    </tr>-->
                    <tr>
                        <td class="w-25 m-color">房间号</td>
<!--                        <td class="w-75 m-color">-->
                        <td class="w-16 m-color">
                            <el-select :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.siteId" placeholder="请输入房间号" >
                                <el-option
                                    v-for="item in projectDialogState.allRoomList"
                                    :key="item.id"
                                    :value="item.id"
                                    :label="item.room"
                                ></el-option>
                            </el-select>
                        </td>
                      <td class="w-25 m-color required">负责人</td>
                      <td class="w-25 m-color">
                        <el-select style="width: 100%" disabled v-model="projectDialogState.projectForm.liabilityUserId" clearable filterable>
                          <el-option :key="userInfos.uid" :value="userInfos.uid" :label="userInfos.userName"></el-option>
                        </el-select>
<!--                        <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.liabilityUserId"/>-->
                      </td>
                      <td class="w-25 m-color required">电话</td>
                      <td class="w-25 m-color">
                        <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.liabilityUserPhone" />
                      </td>
                    </tr>
                    <tr>
                      <td class="w-25 m-color required">安全负责人</td>
                      <td class="w-25 m-color">
<!--                        <el-select style="width: 100%" :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.safeLiabilityUser" @change="getSafeLiabilityUserPhone($event)" clearable filterable>-->
<!--                          <el-option-->
<!--                              v-for="item in projectDialogState.allPersonList"-->
<!--                              :key="item.id"-->
<!--                              :value="item.id"-->
<!--                              :label="item.personName"-->
<!--                          ></el-option>-->
<!--                        </el-select>-->
                        <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.safeLiabilityUser" />
                      </td>
                      <td class="w-25 m-color required">电话</td>
                      <td class="w-25 m-color">
                        <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.safeLiabilityUserPhone" />
                      </td>
                    </tr>
                    <select-room ref="selectRoomRef" v-model:disabled="projectDialogState.disabled" v-model:data="projectDialogState.projectForm.siteList"></select-room>
                    <select-material ref="selectMaterialRef" v-model:disabled="projectDialogState.disabled" v-model:data="projectDialogState.projectForm.stuffList"></select-material>
                    <select-equipment ref="selectEquipmentRef" v-model:disabled="projectDialogState.disabled" v-model:data="projectDialogState.projectForm.deviceList"></select-equipment>
                    <tr>
                        <td class="w-25 m-color">实验步骤</td>
                        <td class="w-25 m-color required">实验步骤</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.experimentStep" placeholder="请输入实验步骤" />
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color">操作方法</td>
                        <td class="w-25 m-color required">操作方法</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.experimentMethod" placeholder="请输入操作方法" />
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color">工艺过程</td>
                        <td class="w-25 m-color required">工艺过程</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.process" placeholder="请输入工艺过程" />
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color">特殊/关键过程</td>
                        <td class="w-25 m-color required">特殊/关键过程</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.keyProcess" placeholder="请输入特殊/关键过程" />
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color">是否存在过夜、老化实验</td>
                      <td class="w-25 m-color required">预防措施</td>
                      <td class="w-75 m-color">
                        <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.measure" placeholder="请输入预防措施" />
                      </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color required">是否存在过夜、老化实验</td>
                        <td class="w-25 m-color">
                            <el-radio-group :disabled="projectDialogState.disabled"  v-model="projectDialogState.projectForm.timeout">
                                <el-radio :label="1">存在</el-radio>
                                <el-radio :label="2">不存在</el-radio>
                            </el-radio-group>
                        </td>
                        <td class="w-25 m-color">过夜、老化保障措施</td>
                        <td class="w-25 m-color required">过夜、老化保障措施</td>
                        <td class="w-25 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.timeoutManager" />
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color">是否在封闭条件下</td>
                        <td class="w-25 m-color required">是否在封闭条件下</td>
                        <td class="w-25 m-color">
                            <el-radio-group :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.closed">
                                <el-radio :label="1">存在</el-radio>
                                <el-radio :label="2">不存在</el-radio>
                            </el-radio-group>
                        </td>
                        <td class="w-25 m-color">封闭条件保障措施</td>
                        <td class="w-25 m-color required">封闭条件保障措施</td>
                        <td class="w-25 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.unclosedManager" />
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color">实验场所防爆措施条件和设施情况</td>
                        <td class="w-25 m-color required">实验场所防爆措施条件和设施情况</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.explosionProof" placeholder="请输入" />
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color">实验场所防火措施条件和设施情况</td>
                        <td class="w-25 m-color required">实验场所防火措施条件和设施情况</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.fireProof" placeholder="请输入" />
                        </td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color">实验场所防中毒措施条件和设施情况</td>
                        <td class="w-25 m-color required">实验场所防中毒措施条件和设施情况</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.poisonProof" placeholder="请输入" />
                        </td>
@@ -177,21 +166,17 @@
<!--                        </td>-->
<!--                    </tr>-->
                    <tr>
                        <td class="w-25 m-color">安全管理制度</td>
                        <td class="w-25 m-color required">安全管理制度</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.safeManagerMethod" placeholder="请输入" />
                        </td>
                    </tr>
                    <tr class="m-color b-font" style="text-align: center">应急预案/应急演练</tr>
                    <tr>
                        <td class="w-25 m-color">有无预案</td>
                        <td class="w-25 m-color">
                            预案名称
                        </td>
                        <td class="w-25 m-color">是否演练</td>
                        <td class="w-25 m-color">
                            演练情况
                        </td>
                        <td class="w-25 m-color required">有无预案</td>
                        <td class="w-25 m-color required">预案名称</td>
                        <td class="w-25 m-color required">是否演练</td>
                        <td class="w-25 m-color required">演练情况</td>
                    </tr>
                    <tr>
                        <td class="w-25 m-color">
@@ -207,9 +192,9 @@
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.emergencyDrill" />
                        </td>
                    </tr>
                    <tr class="m-color b-font" style="  text-align: center">实验人员</tr>
                    <tr class="m-color b-font" style="  text-align: center">其他信息</tr>
                    <tr>
                        <td class="w-25 m-color">实验场所是否需要分区隔断</td>
                        <td class="w-25 m-color required">实验场所是否需要分区隔断</td>
                        <td class="w-75 m-color">
                            <el-input :disabled="projectDialogState.disabled" v-model="projectDialogState.projectForm.partitionCondition" placeholder="请输入" />
                        </td>
@@ -238,6 +223,9 @@
import {projectApi} from "/@/api/experiment/project";
import {personApi} from "/@/api/basic/person";
import {userApi} from "/@/api/systemManage/user";
import SelectRoom from "/@/views/experiment/project/components/selectRoom.vue";
import {useUserInfo} from "/@/stores/userInfo";
import {storeToRefs} from "pinia";
const SelectEquipment = defineAsyncComponent(() => import('./selectEquipment.vue'))
const SelectMaterial = defineAsyncComponent(() => import('./selectMaterial.vue'))
@@ -246,8 +234,12 @@
const ProjectFormRef = ref()
const selectPersonRef = ref()
const selectEquipmentRef = ref()
const selectRoomRef = ref()
const selectMaterialRef = ref()
const selectDangerRef = ref()
const userInfo = useUserInfo();
const { userInfos } = storeToRefs(userInfo);
const projectDialogState = reactive<ProjectDialogType>({
    title: '',
@@ -257,14 +249,16 @@
        id: null,
        experimentName: "",
        experimentType: null,
        liabilityUserId: null,
        safeLiabilityUserId: null,
        liabilityUserId: Number(userInfos.value.uid),
        liabilityUserPhone: '',
        safeLiabilityUser: '',
        safeLiabilityUserPhone: '',
        dep: "",
        siteId: null,
        experimentStep: "",
        experimentMethod: "",
        process: "",
        keyProcess: "",
        measure: "",
        timeout: null,
        timeoutManager: "",
        closed: null,
@@ -280,9 +274,10 @@
        emergencyDrillStatus: "",
        partitionCondition: "",
        note: "",
        expectStartTime: null,
        createExperimentTime: '',
        persons: [
        ],
        siteList: [],
        deviceList: [
        ],
        stuffList: [
@@ -291,15 +286,22 @@
        ]
    },
    projectFormRules: {
        experimentName: [{ required: true, message: '请填写设备编号', trigger: 'blur' }],
        deviceName: [{ required: true, message: '请填写设备名称', trigger: 'blur' }],
        devicePower: [{ required: true, message: '请填写设备功率', trigger: 'blur' }],
        deviceUnit: [{ required: true, message: '请选择计量单位', trigger: 'change' }]
    },
    allPersonList: [],
    allRoomList: [],
    systemPersonList: [],
})
const getLiabilityUserPhone = (value: number)=>{
  const data = projectDialogState.systemPersonList.find(item => item.id === value) as AllPersonListType
  projectDialogState.projectForm.liabilityUserPhone = data.phone
}
const getSafeLiabilityUserPhone = (value: number)=>{
  const data = projectDialogState.allPersonList.find(item => item.id === value) as AllPersonListType
  projectDialogState.projectForm.safeLiabilityUserPhone = data.phone
}
const showProjectDialog = (title: string, value: ProjectType, allRoomList: RoomType []) => {
    projectDialogState.projectDialogVisible = true;
@@ -314,14 +316,16 @@
            id: null,
            experimentName: "",
            experimentType: null,
            liabilityUserId: null,
            safeLiabilityUserId: null,
            liabilityUserId: Number(userInfos.value.uid),
            liabilityUserPhone: '',
            safeLiabilityUser: '',
            safeLiabilityUserPhone: '',
            dep: "",
            siteId: null,
            experimentStep: "",
            experimentMethod: "",
            process: "",
            keyProcess: "",
            measure: "",
            timeout: null,
            timeoutManager: "",
            closed: null,
@@ -337,9 +341,10 @@
            emergencyDrillStatus: "",
            partitionCondition: "",
            note: "",
            expectStartTime: null,
            createExperimentTime: '',
            persons: [
            ],
            siteList: [],
            deviceList: [
            ],
            stuffList: [
@@ -347,6 +352,14 @@
            hazardousWasteList: [
            ]
        };
    }else if(title === '整改'){
      projectDialogState.title = '整改';
      projectDialogState.disabled = false
      for(let i in projectDialogState.projectForm) {
        if(isValidKey(i, projectDialogState.projectForm)) {
          projectDialogState.projectForm[i] = value[i];
        }
      }
    }else{
        projectDialogState.title = '查看';
        projectDialogState.disabled = true
@@ -368,6 +381,7 @@
            if(projectDialogState.title === '新增'){
                projectDialogState.projectForm.persons = selectPersonRef.value.dataList
                projectDialogState.projectForm.hazardousWasteList = selectDangerRef.value.dataList
                projectDialogState.projectForm.siteList = selectRoomRef.value.dataList.map(({siteId}) => ({siteId}))
                projectDialogState.projectForm.stuffList = selectMaterialRef.value.dataList
                projectDialogState.projectForm.deviceList = selectEquipmentRef.value.dataList
                let res = await projectApi().addProject(projectDialogState.projectForm);
@@ -385,13 +399,15 @@
                    });
                }
            }else{
                projectDialogState.projectForm.siteList = selectRoomRef.value.dataList.map(({siteId}) => ({siteId}))
                projectDialogState.projectForm.hazardousWasteList = selectDangerRef.value.dataList.map(obj => ({classify:obj.classify,wasteStorage:obj.wasteStorage,handAmount:obj.handAmount}))
                let res = await projectApi().modProject(projectDialogState.projectForm)
                if(res.data.code === 100){
                    emit('refresh')
                    projectDialogState.projectDialogVisible = false;
                    ElMessage({
                        type: 'success',
                        message: '编辑成功'
                        message: '整改已提交'
                    })
                }else{
                    ElMessage({
@@ -447,6 +463,7 @@
onMounted(() => {
    getAllPersonList();
    getPersonList();
    console.log(userInfos.value,typeof userInfos.value.uid,'u')
});
</script>
@@ -485,9 +502,22 @@
    text-align: center;
    line-height: 42px;
  :deep(.el-input__wrapper ){
    box-shadow: none;
    margin-top: 6px;
  }
&:last-of-type {
     border-right: none;
 }
&.required {
  &::before {
    content: "*";
    display: inline-block;
    color: red;
  }
}
&.w-14 {
     width: calc((100/7)/100 * 100%);
@@ -539,10 +569,47 @@
.m-color {
    color: #0c4995;
}
:deep(.el-input__wrapper ){
    box-shadow: none;
    margin-top: 6px;
.roomSelect{
  ::v-deep(.el-popper){
    .el-select-dropdown__item{
      height: auto;
      padding: 0;
      .roomTable{
        width: 100%;
        display: flex;
        border-bottom: 1px solid #ebeef5;
        &:last-of-type{
          border-bottom: none;
        }
        &>div{
          width: 25%;
          border-right: 1px dashed #ebeef5;
          &:last-of-type{
            border-right: none;
          }
          div{
            width: 100%;
          }
          .roomTit{
            border-bottom: 1px solid #ebeef5;
          }
        }
      }
    }
    .el-select-dropdown__item.selected{
      .roomTit{
        color: #606266;
        font-weight: normal;
      }
    }
  }
}
:deep(.el-dialog__footer){
    padding-top: 20px;
    display: flex;
src/views/experiment/project/components/selectDanger.vue
@@ -2,9 +2,9 @@
    <tr class="m-color b-font" 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 required">废弃物分类</td>
        <td class="w-20 m-color required">存储方式</td>
        <td class="w-20 m-color required">预估处理量</td>
        <td class="w-20 m-color">操作</td>
    </tr>
    <tr v-for="(item,index) in selectDangerState.wasteList" :key="index">
@@ -128,6 +128,14 @@
                border-right: none;
            }
            &.required {
              &::before {
                content: "*";
                display: inline-block;
                color: red;
              }
            }
            &.w-14 {
                width: calc((100/7)/100 * 100%);
            }
src/views/experiment/project/components/selectEquipment.vue
@@ -1,16 +1,16 @@
<template>
    <tr class="m-color b-font" style="text-align: center">实验所用的仪器/设备</tr>
    <tr>
        <td class="w-16 m-color">设备名称</td>
        <td class="w-16 m-color required">设备名称</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 required">设备数量</td>
        <td class="w-16 m-color">操作</td>
    </tr>
    <tr v-for="(item,index) in selectEquipmentState.equipmentList" :key="index">
        <td class="w-16">
            <el-select :disabled="selectEquipmentState.disabled" filterable v-model="item.deviceId" @change="giveOtherEquipmentValue($event, index)">
            <el-select :disabled="selectEquipmentState.disabled" filterable v-model="item.deviceId" @change="giveOtherEquipmentValue($event, index)" @focus="checkAllEquipment($event, index)">
                <el-option
                    v-for="item in selectEquipmentState.allEquipmentList"
                    :key="item.id"
@@ -21,19 +21,20 @@
            </el-select>
        </td>
        <td class="w-16">
            <el-input :disabled="selectEquipmentState.disabled" v-model="item.deviceCode" placeholder="请输入数量" />
            <el-input disabled v-model="item.deviceCode"/>
        </td>
        <td class="w-16">
            <el-input :disabled="selectEquipmentState.disabled" v-model="item.devicePower" />
            <el-input disabled v-model="item.devicePower" />
        </td>
        <td class="w-16">
            <el-radio-group :disabled="selectEquipmentState.disabled" v-model="item.specialDevice">
                <el-radio :label="1">是</el-radio>
                <el-radio :label="2">否</el-radio>
            </el-radio-group>
<!--            <el-radio-group disabled v-model="item.specialDevice">-->
<!--                <el-radio :label="1">是</el-radio>-->
<!--                <el-radio :label="2">否</el-radio>-->
<!--            </el-radio-group>-->
          <div>{{item.specialDevice == 1 ? '是' : item.specialDevice == 2 ? '否' : ''}}</div>
        </td>
        <td class="w-16">
            <el-input type="number" v-model="item.deviceUseCount" />
            <el-input :disabled="selectEquipmentState.disabled" type="number" v-model="item.deviceUseCount" />
        </td>
        <td class="w-16">
            <el-button :disabled="selectEquipmentState.disabled" type="danger" @click="deleteEquipmentItem(index)">删除</el-button>
@@ -41,13 +42,17 @@
    </tr>
    <tr style="text-align: center">
        <el-button :disabled="selectEquipmentState.disabled" type="primary" shape="round" @click="addEquipmentItem()">
            选择实验仪器
            添加现有实验仪器/设备
        </el-button>
        <el-button :disabled="selectEquipmentState.disabled" shape="round" @click="addNewEquipment('新增', {})">
            新增实验仪器/设备配置
        </el-button>
    </tr>
    <equipment-dialog ref="equipmentDialogRef" :equipmentTypeList="selectEquipmentState.equipmentTypeList"></equipment-dialog>
</template>
<script setup lang="ts">
import {onMounted, reactive, watchEffect} from "vue";
import {defineAsyncComponent, onMounted, reactive, ref, watchEffect} from "vue";
import {ElMessage} from "element-plus";
import { equipmentApi } from "/@/api/basic/equipement";
@@ -55,11 +60,16 @@
    disabled: Boolean,
    data: Array<AllEquipmentListType>
});
const equipmentDialog = defineAsyncComponent(() => import('/@/views/basic/equipment/components/equipmentDialog.vue'));
const selectEquipmentState = reactive<SelectEquipmentType>({
    disabled: false,
    equipmentList: [],
    allEquipmentList: [],
    equipmentTypeList: [],
    specialDeviceList: [
      {id: 1, name: '是'},
      {id:2, name: '否'}
    ]
});
watchEffect(() => {
@@ -67,9 +77,26 @@
    selectEquipmentState.disabled = props.disabled
});
const equipmentDialogRef = ref();
const getAllType = async ()=>{
  const res = await equipmentApi().getAllType();
  if(res.data.code === 100){
    selectEquipmentState.equipmentTypeList = res.data.data
  }
}
const checkAllEquipment = () => {
  getAllEquipmentList()
}
const addEquipmentItem = () => {
    selectEquipmentState.equipmentList.push({deviceId: null, deviceUseCount: null, deviceCode: '', deviceName: '', devicePower: '', specialDevice: '',});
    selectEquipmentState.equipmentList.push({deviceId: null, deviceUseCount: null, deviceCode: '', deviceName: '', devicePower: '', specialDevice: '',deviceUnit: null, safeProtect: null});
};
const addNewEquipment = (title: string, value: EquipmentType) => {
  equipmentDialogRef.value.showEquipmentDialog(title, value, selectEquipmentState.specialDeviceList);
}
const deleteEquipmentItem = (index: number) => {
    selectEquipmentState.equipmentList.splice(index,1);
@@ -95,7 +122,9 @@
        deviceCode: data.deviceCode,
        deviceName: data.deviceName,
        devicePower: data.devicePower,
        specialDevice: data.specialDevice
        specialDevice: data.specialDevice,
        deviceUnit: data.deviceUnit,
        safeProtect: data.safeProtect,
    }
};
@@ -109,6 +138,7 @@
});
onMounted(() => {
    getAllType();
    getAllEquipmentList();
});
</script>
@@ -148,8 +178,20 @@
            text-align: center;
            line-height: 42px;
            :deep(.el-input__wrapper ){
              box-shadow: none;
            }
            &:last-of-type {
                border-right: none;
            }
            &.required {
              &::before {
                content: "*";
                display: inline-block;
                color: red;
              }
            }
            &.w-14 {
@@ -201,8 +243,5 @@
.m-color {
    color: #0c4995;
}
:deep(.el-input__wrapper ){
    box-shadow: none;
}
</style>
src/views/experiment/project/components/selectMaterial.vue
@@ -1,17 +1,17 @@
<template>
    <tr class="m-color b-font" style="text-align: center">实验所用的试剂或材料</tr>
    <tr>
        <td class="w-14 m-color">实验材料</td>
        <td class="w-14 m-color required">实验材料</td>
        <td class="w-14 m-color">耗材ID</td>
        <td class="w-14 m-color">材料类型</td>
        <td class="w-14 m-color">材料储存</td>
        <td class="w-14 m-color">计量单位</td>
        <td class="w-14 m-color">使用数量</td>
        <td class="w-14 m-color required">使用数量</td>
        <td class="w-14 m-color">操作</td>
    </tr>
    <tr v-for="(item,index) in selectMaterialState.materialList" :key="index">
        <td class="w-14">
            <el-select :disabled="selectMaterialState.disabled" filterable v-model="item.stuffId" @change="giveOtherMaterialValue($event, index)">
            <el-select :disabled="selectMaterialState.disabled" filterable v-model="item.stuffId" @change="giveOtherMaterialValue($event, index)" @focus="checkAllMaterial($event, index)">
                <el-option
                    v-for="item in selectMaterialState.allMaterialList"
                    :key="item.id"
@@ -22,19 +22,22 @@
            </el-select>
        </td>
        <td class="w-14">
            <el-input :disabled="selectMaterialState.disabled" v-model="item.stuffCode" />
            <el-input disabled v-model="item.stuffCode" />
        </td>
        <td class="w-14">
            <el-input :disabled="selectMaterialState.disabled" v-model="item.stuffType" />
<!--            <el-input :disabled="selectMaterialState.disabled" v-model="item.stuffType" />-->
            <div>{{selectMaterialState.stuffTypeList.find(i=>i.id == item.stuffType)?.name}}</div>
        </td>
        <td class="w-14">
            <el-input :disabled="selectMaterialState.disabled" v-model="item.stuffStorage" />
<!--            <el-input :disabled="selectMaterialState.disabled" v-model="item.stuffStorage" />-->
            <div>{{selectMaterialState.stuffStorageList.find(i=>i.id == item.stuffStorage)?.name}}</div>
        </td>
        <td class="w-14">
            <el-input :disabled="selectMaterialState.disabled" v-model="item.stuffUnit" />
<!--            <el-input :disabled="selectMaterialState.disabled" v-model="item.stuffUnit" />-->
            <div>{{selectMaterialState.stuffUnitList.find(i=>i.id == item.stuffUnit)?.name}}</div>
        </td>
        <td class="w-14">
            <el-input type="number" v-model="item.stuffUseCount" />
            <el-input type="number" :disabled="selectMaterialState.disabled" v-model="item.stuffUseCount" />
        </td>
        <td class="w-14">
            <el-button type="danger" :disabled="selectMaterialState.disabled" @click="deleteMaterialItem(index)">删除</el-button>
@@ -42,31 +45,51 @@
    </tr>
    <tr style="text-align: center">
        <el-button :disabled="selectMaterialState.disabled" type="primary" shape="round" @click="addMaterialItem()">
            选择实验材料
            添加现有实验材料
        </el-button>
        <el-button :disabled="selectMaterialState.disabled" shape="round" @click="addNewMaterial('新增', {})">
            新增实验材料配置
        </el-button>
    </tr>
    <material-dialog ref="materialDialogRef"></material-dialog>
</template>
<script setup lang="ts">
import {onMounted, reactive, watchEffect} from "vue";
import {defineAsyncComponent, onMounted, reactive, ref, watchEffect} from "vue";
import { materialApi } from "/@/api/basic/material";
import {ElMessage} from "element-plus";
let props = defineProps({
    disabled: Boolean,
    data: Array<AllMaterialListType>
});
const MaterialDialog = defineAsyncComponent(() => import('/@/views/basic/material/components/materialDialog.vue'));
const selectMaterialState = reactive<SelectMaterialType>({
    disabled: false,
    materialList: [],
    allMaterialList: [],
    stuffTypeList: [
      {id: 1, name: '化学试剂'},
      {id:2, name: '基础材料'}
    ],
    stuffStorageList: [
      {id:1, name: '智能试剂柜'},
      {id:2, name: '普通储存柜'},
    ],
    stuffUnitList: [
      {id:1, name: 'g'},
      {id:2, name: 'kg'},
      {id:3, name: 'ml'},
      {id:4, name: 'l'},
    ]
})
const materialDialogRef = ref();
const addMaterialItem = () => {
    selectMaterialState.materialList.push({stuffId: null, stuffUseCount: null, stuffName: '',stuffCode:'',stuffType: '', stuffStorage: '', stuffUnit: ''});
};
watchEffect(() => {
    console.log(selectMaterialState.materialList,'selectMaterialState.materialList')
    selectMaterialState.materialList = props.data as Array<AllMaterialListType>
    selectMaterialState.disabled = props.disabled
});
@@ -75,7 +98,15 @@
    selectMaterialState.materialList.splice(index,1);
};
const getAllPersonList = async () => {
const addNewMaterial = (title: string, value: MaterialType) => {
  materialDialogRef.value.showMaterialDialog(title, value);
}
const checkAllMaterial = () => {
  getAllMaterial()
}
const getAllMaterial = async () => {
    let res = await materialApi().getAllMaterial();
    if(res.data.code === 100){
        selectMaterialState.allMaterialList = JSON.parse(JSON.stringify(res.data.data));
@@ -111,7 +142,7 @@
onMounted(() => {
    getAllPersonList();
    getAllMaterial();
});
</script>
@@ -154,6 +185,14 @@
                border-right: none;
            }
            &.required {
              &::before {
                content: "*";
                display: inline-block;
                color: red;
              }
            }
            &.w-14 {
                width: calc((100/7)/100 * 100%);
            }
@@ -192,6 +231,9 @@
                width: 100%;
                height: 100%;
            }
            :deep(.el-input__wrapper ){
              box-shadow: none;
            }
        }
    }
@@ -203,8 +245,5 @@
.m-color {
    color: #0c4995;
}
:deep(.el-input__wrapper ){
    box-shadow: none;
}
</style>
src/views/experiment/project/components/selectPerson.vue
@@ -1,7 +1,7 @@
<template>
    <tr class="m-color b-font" style="text-align: center">实验人员</tr>
    <tr>
        <td class="w-14 m-color">姓名</td>
        <td class="w-14 m-color required">姓名</td>
        <td class="w-14 m-color">年龄</td>
        <td class="w-14 m-color">性别</td>
        <td class="w-14 m-color">专业</td>
@@ -11,7 +11,7 @@
    </tr>
    <tr v-for="(item,index) in selectPersonState.personList" :key="index">
        <td class="w-14">
            <el-select filterable :disabled="selectPersonState.disabled" v-model="item.personId" @change="giveOtherPersonValue($event, index)">
            <el-select filterable :disabled="selectPersonState.disabled" v-model="item.personId" @change="giveOtherPersonValue($event, index)" @focus="checkAllPerson($event, index)">
                <el-option
                v-for="item in selectPersonState.allPersonList"
                :key="item.id"
@@ -22,19 +22,20 @@
            </el-select>
        </td>
        <td class="w-14">
            <el-input :disabled="selectPersonState.disabled" v-model="item.personAge" />
            <el-input disabled v-model="item.personAge" />
        </td>
        <td class="w-14">
            <el-input :disabled="selectPersonState.disabled" v-model="item.personGender" />
<!--            <el-input disabled v-model="item.personGender" />-->
          <div>{{item.personGender == 1 ? '男' : item.personGender == 2 ? '女' : ''}}</div>
        </td>
        <td class="w-14">
            <el-input :disabled="selectPersonState.disabled" v-model="item.personMajor" />
            <el-input disabled v-model="item.personMajor" />
        </td>
        <td class="w-14">
            <el-input :disabled="selectPersonState.disabled" v-model="item.depName" />
            <el-input disabled v-model="item.depName" />
        </td>
        <td class="w-14">
            <el-input :disabled="selectPersonState.disabled" v-model="item.aptitude" />
            <el-input disabled v-model="item.aptitude" />
        </td>
        <td class="w-14">
            <el-button type="danger" :disabled="selectPersonState.disabled" @click="deletePersonItem(index)">删除</el-button>
@@ -42,13 +43,17 @@
    </tr>
    <tr style="text-align: center">
        <el-button :disabled="selectPersonState.disabled" type="primary" shape="round" @click="addPersonItem()">
            选择实验人员
            添加现有实验人员
        </el-button>
        <el-button :disabled="selectPersonState.disabled" shape="round" @click="addNewPerson('新增', {})">
            新增实验人员配置
        </el-button>
    </tr>
    <person-dialog ref="personDialogRef"></person-dialog>
</template>
<script setup lang="ts">
import {nextTick, onMounted, reactive, watchEffect} from "vue";
import {defineAsyncComponent, nextTick, onMounted, reactive, ref, watchEffect} from "vue";
import { personApi } from "/@/api/basic/person";
import {ElMessage} from "element-plus";
@@ -58,12 +63,16 @@
});
const personDialog = defineAsyncComponent(() => import('/@/views/basic/person/components/personDialog.vue'));
const selectPersonState = reactive<SelectPersonType>({
    disabled: false,
    personList: [],
    allPersonList: [
    ],
});
const personDialogRef = ref();
watchEffect(() => {
    selectPersonState.personList = props.data as Array<AllPersonListType>
@@ -73,6 +82,14 @@
const addPersonItem = () => {
    selectPersonState.personList.push({personId: null, personName: null, personAge: null, personGender:'',personMajor:'',depName:'',phone:'',aptitude:'',training:''});
};
const addNewPerson = (title: string, value: PersonType) => {
  personDialogRef.value.showPersonDialog(title, value);
}
const checkAllPerson = () => {
  getAllPersonList()
}
const deletePersonItem = (index: number) => {
    selectPersonState.personList.splice(index,1);
@@ -162,6 +179,18 @@
                border-right: none;
            }
            &.required {
              &::before {
                content: "*";
                display: inline-block;
                color: red;
              }
            }
            :deep(.el-input__wrapper ){
              box-shadow: none;
            }
            &.w-14 {
                width: calc((100/7)/100 * 100%);
            }
@@ -211,8 +240,5 @@
.m-color {
    color: #0c4995;
}
:deep(.el-input__wrapper ){
    box-shadow: none;
}
</style>
src/views/experiment/project/components/selectRoom.vue
对比新文件
@@ -0,0 +1,268 @@
<template>
    <tr class="m-color b-font" style="text-align: center">实验场所</tr>
    <tr>
        <td class="w-14 m-color required">场所名称</td>
        <td class="w-14 m-color">所在楼栋</td>
        <td class="w-14 m-color">房间</td>
        <td class="w-14 m-color">有无消防设施</td>
        <td class="w-14 m-color">有无隔断</td>
        <td class="w-14 m-color">场所性质</td>
        <td class="w-14 m-color">操作</td>
    </tr>
    <tr v-for="(item,index) in selectRoomState.roomList" :key="index">
        <td class="w-14">
            <el-select :disabled="selectRoomState.disabled" filterable v-model="item.siteId" @change="giveOtherMaterialValue($event, index)" @focus="checkAllRoom($event, index)">
                <el-option
                    v-for="item in selectRoomState.allRoomList"
                    :key="item.id"
                    :value="item.id"
                    :label="item.siteName"
                >
                </el-option>
            </el-select>
        </td>
        <td class="w-14">
            <el-input disabled v-model="item.floor" />
        </td>
        <td class="w-14">
            <el-input disabled v-model="item.room" />
        </td>
        <td class="w-14">
<!--            <el-input :disabled="selectRoomState.disabled" v-model="item.stuffStorage" />-->
            <div>{{item.fireFacilities== 1 ? '有' : item.fireFacilities== 2 ? '无' : ''}}</div>
        </td>
        <td class="w-14">
<!--            <el-input :disabled="selectRoomState.disabled" v-model="item.stuffUnit" />-->
            <div>{{item.partitionStatus == 1 ? '有' : item.partitionStatus == 2 ? '无' : ''}}</div>
        </td>
        <td class="w-14">
<!--            <el-input type="number" :disabled="selectRoomState.disabled" v-model="item.stuffUseCount" />-->
            <div>{{item.siteType}}</div>
        </td>
        <td class="w-14">
            <el-button type="danger" :disabled="selectRoomState.disabled" @click="deleteRoomItem(index)">删除</el-button>
        </td>
    </tr>
    <tr style="text-align: center">
        <el-button :disabled="selectRoomState.disabled" type="primary" shape="round" @click="addMaterialItem()">
            添加现有实验场所
        </el-button>
        <el-button :disabled="selectRoomState.disabled" shape="round" @click="addNewRoom('新增', {})">
            新增实验场所配置
        </el-button>
    </tr>
    <room-dialog ref="roomDialogRef" :memberList="selectRoomState.memberList" :typeList="selectRoomState.typeList"></room-dialog>
</template>
<script setup lang="ts">
import {defineAsyncComponent, onMounted, reactive, ref, watchEffect} from "vue";
import { materialApi } from "/@/api/basic/material";
import {ElMessage} from "element-plus";
import {roomApi} from "/@/api/basic/room";
import {personApi} from "/@/api/basic/person";
let props = defineProps({
    disabled: Boolean,
    data: Array<roomListType>
});
const roomDialog = defineAsyncComponent(() => import('/@/views/basic/room/components/roomDialog.vue'));
const selectRoomState = reactive<SelectRoomType>({
    disabled: false,
    roomList: [],
    allRoomList: [],
    memberList: [],
    typeList: [],
    specialDeviceList: [
      {id: 1, name: '是'},
      {id:2, name: '否'}
    ],
    stuffStorageList: [
      {id:1, name: '智能试剂柜'},
      {id:2, name: '普通储存柜'},
    ],
    stuffUnitList: [
      {id:1, name: 'g'},
      {id:2, name: 'kg'},
      {id:3, name: 'ml'},
      {id:4, name: 'l'},
    ]
})
const roomDialogRef = ref();
const getAllMember = async ()=>{
  const res = await personApi().getAllPerson();
  if(res.data.code === 100){
    selectRoomState.memberList = res.data.data
  }
}
const getAllType = async ()=>{
  const res = await roomApi().getAllType();
  if(res.data.code === 100){
    selectRoomState.typeList = res.data.data
  }
}
const addMaterialItem = () => {
    selectRoomState.roomList.push({siteId: null, siteName: '', floor: '',room:'',fireFacilities: null, partitionStatus: null, siteType: ''});
};
watchEffect(() => {
    selectRoomState.roomList = props.data as Array<roomListType>
    selectRoomState.disabled = props.disabled
});
const deleteRoomItem = (index: number) => {
    selectRoomState.roomList.splice(index,1);
};
const addNewRoom = (title: string, value: RoomType) => {
  roomDialogRef.value.showroomDialog(title, value, selectRoomState.specialDeviceList);
}
const checkAllRoom = () => {
  getAllRoom()
}
const getAllRoom = async () => {
    let res = await roomApi().getAllRoom();
    if(res.data.code === 100){
        selectRoomState.allRoomList = JSON.parse(JSON.stringify(res.data.data));
    }else{
        ElMessage({
            type: 'warning',
            message: res.data.msg
        })
    }
};
const giveOtherMaterialValue = (value: number, index:number) => {
    const data = selectRoomState.allRoomList.find(item => item.id === value) as roomListType
    selectRoomState.roomList[index] = {
        siteId: data.id,
        siteName: data.siteName,
        floor: data.floor,
        room: data.room,
        fireFacilities: data.fireFacilities,
        partitionStatus: data.partitionStatus,
        siteType: data.siteType
    };
};
const formatList = (formatList: Array<roomListType>) => {
    selectRoomState.roomList = formatList
};
defineExpose({
    dataList: selectRoomState.roomList,
    formatList
});
onMounted(() => {
    getAllMember()
    getAllType()
    getAllRoom()
});
</script>
<style scoped lang="scss">
.site-layout-background {
    background: #fff;
}
.report-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #337ecc;
    margin: 20px 0;
    th {
        padding: 10px 0;
        border: 1px solid #337ecc;
        border-left: none;
    }
    tr {
        width: 100%;
        height: 44px;
        line-height: 42px;
        border-bottom: 1px solid #ccc;
        &:last-of-type {
            border-bottom: none;
        }
        td {
            border-right: 1px solid #ccc;
            display: inline-block;
            height: 44px;
            vertical-align: middle;
            text-align: center;
            line-height: 42px;
            &:last-of-type {
                border-right: none;
            }
            &.required {
              &::before {
                content: "*";
                display: inline-block;
                color: red;
              }
            }
            &.w-14 {
                width: calc((100/7)/100 * 100%);
            }
            &.w-16 {
                width: calc((100/6)/100 * 100%);
            }
            &.w-18 {
                width: 16.59%;
            }
            &.w-20 {
                width: 20%;
            }
            &.w-25 {
                width: 25%;
            }
            &.w-50 {
                width: 50%;
            }
            &.w-75 {
                width: 75%;
            }
            .ant-input {
                height: 100%;
                border: none;
                background: #f5f7fa;
            }
            .ant-picker {
                width: 100%;
                height: 100%;
            }
            :deep(.el-input__wrapper ){
              box-shadow: none;
            }
        }
    }
    .b-font {
        font-size: 16px;
        font-weight: bolder;
    }
}
.m-color {
    color: #0c4995;
}
</style>
src/views/experiment/project/index.ts
@@ -1,5 +1,6 @@
declare interface ProjectStateType {
    projectData: Array<ProjectType>
    projectData?: Array<ProjectType>
    developData?: Array<ProjectType>
    searchQuery: {
        pageIndex: number,
        pageSize: number,
@@ -15,6 +16,7 @@
declare interface ProjectType {
    id?: number | null,
    liabilityUserId?: number | null,
    experimentCode: string,
    experimentName: string,
}
@@ -34,13 +36,17 @@
        experimentName: string,
        experimentType: null | number,
        liabilityUserId: null | number,
        safeLiabilityUserId: null | number,
        safeLiabilityUser: string
        liabilityUserPhone: string,
        safeLiabilityUserPhone: string,
        sisStatus?: null | number,
        safeInformationSystem?: string,
        dep: string,
        siteId: null | number,
        experimentStep: string,
        experimentMethod: string,
        process: string,
        keyProcess: string,
        measure: string,
        timeout: null | number,
        timeoutManager: string,
        closed: null | number,
@@ -56,8 +62,10 @@
        emergencyDrillStatus: string,
        partitionCondition: string,
        note: string,
        expectStartTime: null | number,
        startTime?: string,
        createExperimentTime: string
        persons: SelectPersonType [],
        siteList: SelectRoomType [],
        deviceList: SelectEquipmentType [],
        stuffList: SelectMaterialType [],
        hazardousWasteList: SelectDangerType []
@@ -66,7 +74,7 @@
    },
    allPersonList: Array<AllPersonListType>
    systemPersonList: Array<SystemPersonType>
    systemPersonList: Array<AllPersonListType>
    allRoomList: Array<RoomType>
}
@@ -91,7 +99,7 @@
}
declare interface AllPersonListType {
    id: null | number,
    id?: null | number,
    personId?: null | number,
    personName: null,
    personAge: null,
@@ -103,10 +111,23 @@
    training:''
}
declare interface NewPersonListType {
    depId: number | null
    depName: string
    id: number
    idSerial: string
    idType: number | null
    name: string
    phone: string
    realName: string
}
declare interface SelectEquipmentType {
    disabled: boolean
    equipmentList: Array<AllEquipmentListType>,
    allEquipmentList: Array<AllEquipmentListType>,
    equipmentTypeList: Array<any>,
    specialDeviceList: Array<Type>
}
declare interface AllEquipmentListType {
@@ -117,6 +138,8 @@
    deviceName: string,
    devicePower: string,
    specialDevice: string,
    deviceUnit?: null | number,
    safeProtect?: null | number
}
@@ -124,6 +147,35 @@
    disabled: boolean
    materialList: Array<AllMaterialListType>,
    allMaterialList: Array<AllMaterialListType>,
    stuffTypeList: Array<stuffType>
    stuffStorageList: Array<stuffType>
    stuffUnitList: Array<stuffType>
}
declare interface SelectRoomType {
    disabled: boolean
    roomList: Array<roomListType>,
    allRoomList: Array<roomListType>,
    specialDeviceList: Array<stuffType>
    memberList: Array<any>
    typeList: Array<any>
    stuffStorageList: Array<stuffType>
    stuffUnitList: Array<stuffType>
}
declare interface roomListType {
    siteId?: null | number,
    siteName?: string,
    floor?: string,
    room?: string,
    fireFacilities?: null | number,
    partitionStatus?: null | number,
    siteType?: string,
}
declare interface stuffType {
    id: null | number,
    name: string
}
declare interface AllMaterialListType {
src/views/experiment/project/index.vue
@@ -22,7 +22,7 @@
                <div class="main-card">
                    <el-row class="cardTop">
                        <el-col :span="12" class="mainCardBtn">
                            <el-button type="primary" :icon="Plus" size="default" @click="openProjectDialog('新增', {})">新增</el-button>
                            <el-button type="primary" :icon="Plus" size="default" @click="openProjectDialog('新增', {})">录入实验信息</el-button>
                            <!--                            <el-button type="danger" :icon="Delete" size="default" plain>删除</el-button>-->
                        </el-col>
<!--                        <el-button type="primary" :icon="Refresh" size="default" />-->
@@ -30,16 +30,60 @@
                    <el-table ref="multipleTableRef" :data="projectState.projectData" style="width: 100%" height="calc(100% - 100px)" :header-cell-style="{ background: '#fafafa' }">
                        <el-table-column prop="experimentCode" label="实验编号"/>
                        <el-table-column prop="experimentName" label="实验名称"/>
                        <el-table-column prop="expectStartTime" label="立项时间" />
                        <el-table-column prop="createExperimentTime" label="立项时间" show-overflow-tooltip>
                          <template #default="scope">
                            <span>{{scope.row.createExperimentTime?scope.row.createExperimentTime.substring(0,16):'--'}}</span>
                          </template>
                        </el-table-column>
<!--                        <el-table-column prop="startTime" label="开展时间" show-overflow-tooltip>-->
<!--                          <template #default="scope">-->
<!--                            <span>{{scope.row.startTime?scope.row.startTime.substring(0,16):'&#45;&#45;'}}</span>-->
<!--                          </template>-->
<!--                        </el-table-column>-->
                        <el-table-column prop="liabilityUser" label="负责人"/>
                        <el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column>
                        <el-table-column prop="createByUserName" label="创建人" show-overflow-tooltip></el-table-column>
                        <el-table-column prop="updateTime" label="最后修改时间" show-overflow-tooltip></el-table-column>
                        <el-table-column prop="updateByUserName" label="最后修改人" show-overflow-tooltip></el-table-column>
                        <el-table-column label="操作" width="250">
                        <el-table-column prop="siteList" label="实验场所" show-overflow-tooltip>
                          <template #default="scope">
                            <span>{{scope.row.siteList.map(i=>i.siteName).join(',')}}</span>
                          </template>
                        </el-table-column>
                        <el-table-column prop="experimentType" label="实验类别">
                          <template #default="scope">
                            <span>{{projectState.experimentTypeList.find(i=>i.id == scope.row.experimentType)?.name}}</span>
                          </template>
                        </el-table-column>
                        <el-table-column prop="status" label="评估申请">
                          <template #default="scope">
                            <span>{{scope.row.status == 1?'未申请':scope.row.status == 2?'已申请':'--'}}</span>
                          </template>
                        </el-table-column>
                        <el-table-column prop="status" label="评估申请时间" show-overflow-tooltip>
                          <template #default="scope">
                            <span>{{scope.row.assessApplyTime?scope.row.assessApplyTime.substring(0,16):'--'}}</span>
                          </template>
                        </el-table-column>
                        <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?'生成报告':'--'}}
                            </el-tag>
                          </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?'重大风险':'--'}}
                            </el-tag>
                          </template>
                        </el-table-column>
<!--                        <el-table-column prop="createTime" label="创建时间" show-overflow-tooltip></el-table-column>-->
<!--                        <el-table-column prop="createByUserName" label="创建人" show-overflow-tooltip></el-table-column>-->
<!--                        <el-table-column prop="updateTime" label="最后修改时间" show-overflow-tooltip></el-table-column>-->
<!--                        <el-table-column prop="updateByUserName" label="最后修改人" show-overflow-tooltip></el-table-column>-->
                        <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" text type="primary" :icon="Edit" @click="applyStart('申请开展', 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>
                                <el-button size="small" text type="danger" :icon="Delete" @click="onDelProject(scope.row)">删除</el-button>
                            </template>
                        </el-table-column>
@@ -113,7 +157,7 @@
};
const onDelProject = (val: ProjectType) => {
    ElMessageBox.confirm(`此操作将永久删除该实验:“${val.experimentCode}”,是否继续?`, '提示', {
    ElMessageBox.confirm(`此操作将永久删除该实验:“${val.experimentName}”,是否继续?`, '提示', {
        confirmButtonText: '确认',
        cancelButtonText: '取消',
        type: 'warning'
src/views/loginPage/component/accountLogin.vue
@@ -233,7 +233,7 @@
            // 登录成功,跳到转首页
            // 如果是复制粘贴的路径,非首页/登录页,那么登录成功后重定向到对应的路径中
            // if (route.json.query?.redirect) {
            router.push('/home');
            router.push('/project');
            // router.push({
            //     path: <string>route.json.query?.redirect,
            //     query: Object.keys(<string>route.json.query?.params).length > 0 ? JSON.parse(<string>route.json.query?.params) : '',