Your Name
2022-08-01 1621b3719092d93e6c29f7a27e401529e0454420
双重预防
已重命名11个文件
已修改10个文件
已添加2个文件
已删除12个文件
3561 ■■■■ 文件已修改
src/api/doublePreventSystem/check/index.ts 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/checkTaskManage/work/components/workDialog.vue 309 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/hiddenInvestigate/checkTaskManage/record/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/hiddenInvestigate/checkTaskManage/work/components/inspectionTaskDialog.vue 275 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/hiddenInvestigate/checkTaskManage/work/index.vue 231 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/hiddenInvestigate/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/hiddenInvestigate/record/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/hiddenInvestigate/work/components/inspectionTaskDialog.vue 275 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/hiddenInvestigate/work/index.vue 231 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/hiddenManage/hiddenCheck/components/checkDialog.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskCheckManage/checkTaskManage/checkTask/components/recordDialog.vue 186 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskCheckManage/checkTaskManage/checkTask/index.vue 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskCheckManage/checkTaskManage/checkWork/components/workDialog.vue 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskCheckManage/checkTaskManage/checkWork/index.vue 80 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskCheckManage/hiddenManagement/hiddenCheck/components/checkDialog.vue 185 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskCheckManage/hiddenManagement/hiddenCheck/index.vue 78 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskCheckManage/hiddenManagement/hiddenRectify/components/rectifyDialog.vue 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskCheckManage/hiddenManagement/hiddenRectify/index.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskCheckManage/hiddenManagement/hiddenReport/components/reportDialog.vue 132 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskCheckManage/hiddenManagement/hiddenReport/index.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskLevel/action/components/riskControlMeasureDialog.vue 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskLevel/action/index.vue 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskLevel/check/components/selectMeasureControlDialog.vue 219 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskLevel/checkUnit/components/checkUnitDialog.vue 227 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskLevel/checkUnit/index.vue 195 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskLevel/device/components/productionDeviceDialog.vue 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskLevel/device/index.vue 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskLevel/event/components/safetyRiskEventDialog.vue 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskLevel/event/index.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskLevel/map/components/rectifyDialog.vue 92 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskLevel/riskCheckUnit/components/checkUnitDialog.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskLevel/riskCheckUnit/components/selectMeasureControlDialog.vue 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskLevel/riskCheckUnit/index.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskLevel/unit/components/safetyRiskAnalyseUnitDialog.vue 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doublePrevent/riskLevel/unit/index.vue 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/doublePreventSystem/check/index.ts
@@ -5,31 +5,15 @@
        // v1
        getHiddenCheckList: (data: object) => {
            return request({
                url: `/prevent/dangerRectify/select/getDangerRectifyPage`,
                url: `/prevent/dangerRectify/select/getRectifyOverPage`,
                method: 'post',
                data: data
            });
        },
        // v1
        addHiddenCheck: (data: object) => {
        submitHiddenCheck: (data: object) => {
            return request({
                url: `/prevent/dangerManage/select/saveDangerManage`,
                method: 'post',
                data: data
            });
        },
        // v1
        modHiddenCheck: (data: object) => {
            return request({
                url: `/prevent/dangerRectify/update/updateDangerRectify`,
                method: 'post',
                data: data
            });
        },
        // v1
        deleteHiddenCheck: (data: object) => {
            return request({
                url: `/prevent/dangerRectify/delete/deleteDangerRectify`,
                url: `/prevent/dangerRectify/update/reportRectify`,
                method: 'post',
                data: data
            });
src/views/doublePrevent/checkTaskManage/work/components/workDialog.vue
文件已删除
src/views/doublePrevent/hiddenInvestigate/checkTaskManage/record/index.vue
文件已删除
src/views/doublePrevent/hiddenInvestigate/checkTaskManage/work/components/inspectionTaskDialog.vue
文件已删除
src/views/doublePrevent/hiddenInvestigate/checkTaskManage/work/index.vue
文件已删除
src/views/doublePrevent/hiddenInvestigate/index.vue
文件已删除
src/views/doublePrevent/hiddenInvestigate/record/index.vue
文件已删除
src/views/doublePrevent/hiddenInvestigate/work/components/inspectionTaskDialog.vue
文件已删除
src/views/doublePrevent/hiddenInvestigate/work/index.vue
文件已删除
src/views/doublePrevent/hiddenManage/hiddenCheck/components/checkDialog.vue
文件已删除
src/views/doublePrevent/riskCheckManage/checkTaskManage/checkTask/components/recordDialog.vue
对比新文件
@@ -0,0 +1,186 @@
<template>
    <div class="system-add-menu-container">
        <el-dialog :title="title" v-model="isShowRecordDialog" append-to-body :close-on-click-modal="false" width="600px">
            <div class="record-form">
                <el-form :model="recordForm" ref="recordFormRef" size="default" label-width="100px">
                    <el-row :gutter="35">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                            <el-form-item label="检查内容" prop="checkContent">
                                <el-input class="input-length" type="textarea" :rows="3" v-model.trim="recordForm.checkContent" placeholder="检查内容"> </el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                </el-form>
            </div>
        </el-dialog>
        <el-dialog :title="title" v-model="isShowSubmitDialog" width="600px">
            <el-form :model="submitForm" ref="rectifyFormRef" 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="checkResult">
                            <el-select class="input-add" v-model="checkResults.checkResult" placeholder="请输入处理结果">
                                <el-option v-for="item in resultList" :label="item.name" :key="item.id" :value="item.id"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
            <template #footer>
                <span class="dialog-footer">
                    <el-button @click="isShowSubmitDialog = !isShowSubmitDialog" size="default">取 消</el-button>
                    <el-button type="primary" @click="submitRecord" v-throttle size="default">确 实</el-button>
                </span>
            </template>
        </el-dialog>
    </div>
</template>
<script lang="ts">
import { getUserByDepartment } from '/@/assets/methods';
interface stateType {
    isShowRecordDialog: Boolean;
    isShowSubmitDialog: Boolean;
    recordForm: {
        taskCode: string | null;
        checkContent: string | null;
        checkResult: string | null;
        checkTaskId: number | null;
        classify1: number | null;
        classify2: number | null;
        classify3: string | null;
        controlMeasureCode: string | null;
        controlMeasureId: number | null;
        controlType: number | null;
        measureDesc: string | null;
    };
    title: string;
    submitForm: {
        execUserId: number | null;
        id: number | null;
        checkResults: Array<checkResults>;
    };
    checkResults: {
        id: number | null;
        controlMeasureId: number | null;
        checkResult: number | null;
    };
    resultList: Array<result>;
}
interface result {
    id: number;
    name: string;
}
interface checkResults {
    id: number | null;
    controlMeasureId: number | null;
    checkResult: number | null;
}
import { reactive, toRefs, ref } from 'vue';
import { recordApi } from '/@/api/doublePreventSystem/record';
import { ElMessage } from 'element-plus';
export default {
    name: 'recordDialog',
    setup(props: any, context: any) {
        const recordFormRef = ref();
        const state = reactive<stateType>({
            title: '查看',
            isShowSubmitDialog: false,
            isShowRecordDialog: false,
            recordForm: {
                taskCode: null,
                checkContent: null,
                checkResult: null,
                checkTaskId: null,
                classify1: null,
                classify2: null,
                classify3: null,
                controlMeasureCode: null,
                controlMeasureId: null,
                controlType: null,
                measureDesc: null
            },
            submitForm: {
                id: null,
                execUserId: null,
                checkResults: []
            },
            checkResults: {
                id: null,
                controlMeasureId: null,
                checkResult: null
            },
            resultList: [
                { id: 1, name: '正常' },
                { id: 2, name: '不正常' }
            ]
        });
        //打开模态框
        const openRecordDialog = async (type: string, value: object) => {
            if (type === '查看') {
                state.title = '查看';
                state.isShowRecordDialog = true;
                let recordFormValue = JSON.parse(JSON.stringify(value));
                state.recordForm.taskCode = recordFormValue.taskCode;
                state.recordForm.checkContent = recordFormValue.checkContent;
            } else {
                state.title = '提交';
                state.isShowSubmitDialog = true;
                state.submitForm.id = JSON.parse(JSON.stringify(value)).checkTaskId;
                state.checkResults.id = JSON.parse(JSON.stringify(value)).id;
                state.checkResults.controlMeasureId = JSON.parse(JSON.stringify(value)).controlMeasureId;
            }
        };
        //新增修改提交
        const submitRecord = async () => {
            if (state.checkResults.checkResult !== null) {
                if (state.title === '提交') {
                    state.submitForm.checkResults.push(state.checkResults);
                    let res = await recordApi().submitRecord(state.submitForm);
                    if (res.data.code === '200') {
                        ElMessage({
                            type: 'success',
                            message: '排查记录新增成功',
                            duration: 2000
                        });
                        state.isShowRecordDialog = false;
                        context.emit('refreshRecord');
                    } else {
                        ElMessage({
                            type: 'warning',
                            message: res.data.msg
                        });
                    }
                }
            } else {
                ElMessage({
                    type: 'warning',
                    message: '请完善基本信息'
                });
            }
        };
        return {
            ...toRefs(state),
            recordFormRef,
            submitRecord,
            openRecordDialog
        };
    }
};
</script>
<style scoped>
::v-deep.el-divider--horizontal {
    margin-top: 0px !important;
}
::v-deep.el-dialog__body {
    padding-top: 10px !important;
}
.filter-container {
    padding: 10px 0px;
}
</style>
src/views/doublePrevent/riskCheckManage/checkTaskManage/checkTask/index.vue
文件名从 src/views/doublePrevent/checkTaskManage/record/index.vue 修改
@@ -29,41 +29,34 @@
                </el-button>
            </div>
            <el-table :data="recordData.data" style="width: 100%">
                <el-table-column type="index" label="序号" width="60" />
                <el-table-column prop="checkRecordName" label="排查名称" show-overflow-tooltip></el-table-column>
                <el-table-column prop="checkRecordType" label="排查类型" show-overflow-tooltip>
                <el-table-column type="expand">
                    <template #default="scope">
                        {{ parseNumber(scope.row.checkRecordType, '排查类型') }}
                        <el-table :data="scope.row.checkContent" style="width: 100%">
                            <el-table-column label="序号" type="index" width="150" align="center"> </el-table-column>
                            <el-table-column label="检查内容" prop="checkContent" align="center"> </el-table-column>
                            <el-table-column label="操作" align="center" width="280" class-name="small-padding fixed-width">
                                <template #default="scope">
                                    <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button>
                                    <el-button size="small" text type="primary" :icon="Check" @click="onOpenDialogRef('整改', scope.row)">提交</el-button>
                                </template>
                            </el-table-column>
                        </el-table>
                    </template>
                </el-table-column>
                <el-table-column prop="riskLevel" label="风险等级" show-overflow-tooltip></el-table-column>
                <el-table-column prop="location" label="区域位置" show-overflow-tooltip></el-table-column>
                <el-table-column prop="status" label="状态" show-overflow-tooltip> </el-table-column>
                <el-table-column type="index" label="序号" width="60" />
                <el-table-column prop="taskCode" label="排查名称" show-overflow-tooltip></el-table-column>
                <el-table-column prop="taskStatus" label="状态" show-overflow-tooltip>
                    <template #default="scope">
                        {{ parseNumber(scope.row.taskStatus, '状态') }}
                    </template>
                </el-table-column>
                <el-table-column prop="createUserName" label="创建人" show-overflow-tooltip></el-table-column>
                <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column>
                <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column>
                <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column>
                <el-table-column label="操作" width="150">
                    <template #default="scope">
                        <el-button size="small" text type="primary" @click="onOpenDialogRef('修改', scope.row)">修改</el-button>
                        <el-button size="small" text type="danger" @click="onDelrecord(scope.row)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <br />
            <el-pagination
                @size-change="onHandleSizeChange"
                @current-change="onHandleCurrentChange"
                :pager-count="5"
                :page-sizes="[10, 20, 30]"
                v-model:current-page="recordData.params.pageIndex"
                background
                v-model:page-size="recordData.params.pageSize"
                layout="total, sizes, prev, pager, next, jumper"
                :total="recordData.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="recordData.params.pageIndex" background v-model:page-size="recordData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="recordData.total" class="page-position"> </el-pagination>
            <br />
            <br />
        </el-card>
@@ -78,6 +71,7 @@
import { recordApi } from '/@/api/doublePreventSystem/record/index.ts';
import { departmentApi } from '/@/api/department';
import { checkUnitApi } from '/@/api/doublePreventSystem/checkUnit';
import { View, Check } from '@element-plus/icons-vue';
// 定义接口来定义对象的类型
interface TableData {
@@ -115,7 +109,7 @@
export default defineComponent({
    name: 'record',
    components: { recordDialog },
    components: { recordDialog, View, Check },
    setup() {
        const recordDialogRef = ref();
        const state = reactive<TableDataState>({
@@ -191,7 +185,7 @@
        // 打开生产装置弹窗
        const onOpenDialogRef = (type: string, value: any) => {
            recordDialogRef.value.openRecordDialog(type, value, state.departmentList, state.checkRecordTypeList, state.taskUnitList);
            recordDialogRef.value.openRecordDialog(type, value);
        };
        // 删除角色
        const onDelRecord = (row: any) => {
@@ -219,8 +213,6 @@
                .catch(() => {});
        };
        const parseNumber = (value: string | number, type: string) => {};
        const handleSearch = () => {
            initRecordTableData();
        };
@@ -234,6 +226,13 @@
            state.recordData.params.pageIndex = val;
            initRecordTableData();
        };
        const parseNumber = (value: string | number, type: string) => {
            if (type === '状态') {
                return state.taskStatusList.find((item) => item.id === value)?.name;
            }
        };
        // 页面加载时
        onMounted(() => {
            initRecordTableData();
@@ -242,11 +241,13 @@
        });
        return {
            View,
            Check,
            parseNumber,
            handleSearch,
            onOpenDialogRef,
            onHandleSizeChange,
            onDelRecord,
            parseNumber,
            onHandleCurrentChange,
            recordDialog,
            recordDialogRef,
src/views/doublePrevent/riskCheckManage/checkTaskManage/checkWork/components/workDialog.vue
文件名从 src/views/doublePrevent/checkTaskManage/record/components/recordDialog.vue 修改
@@ -6,9 +6,7 @@
                    <el-row :gutter="35">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="排查类型" prop="checkWorkType">
                                <el-select class="input-add" v-model="workForm.checkWorkType" placeholder="请输入排查类型" clearable>
                                    <el-option v-for="item in checkWorkTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option
                                ></el-select>
                                <el-select class="input-add" v-model="workForm.checkWorkType" placeholder="请输入排查类型" clearable> <el-option v-for="item in checkWorkTypeList" :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="12" class="mb20">
@@ -18,17 +16,7 @@
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="整改部门" prop="depId">
                                <el-cascader
                                    @change="achieveUserList"
                                    :options="departmentList"
                                    :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }"
                                    placeholder="请选择部门"
                                    clearable
                                    filterable
                                    class="input-add"
                                    v-model="workForm.depId"
                                >
                                </el-cascader>
                                <el-cascader @change="achieveUserList" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-add" v-model="workForm.depId"> </el-cascader>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
@@ -40,13 +28,7 @@
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="排查周期" prop="checkCycle">
                                <el-input
                                    class="input-add"
                                    type="number"
                                    v-model.trim="workForm.checkCycle"
                                    placeholder="请输入排查周期"
                                    clearable
                                ></el-input>
                                <el-input class="input-add" type="number" v-model.trim="workForm.checkCycle" placeholder="请输入排查周期" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
@@ -58,13 +40,7 @@
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="有效时间" prop="validTime">
                                <el-input
                                    class="input-add"
                                    type="number"
                                    v-model.trim="workForm.validTime"
                                    placeholder="请输入有效时间"
                                    clearable
                                ></el-input>
                                <el-input class="input-add" type="number" v-model.trim="workForm.validTime" placeholder="请输入有效时间" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
@@ -76,13 +52,7 @@
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="提醒时间" prop="noticeTime">
                                <el-input
                                    class="input-add"
                                    type="number"
                                    v-model.trim="workForm.noticeTime"
                                    placeholder="请输入提醒时间"
                                    clearable
                                ></el-input>
                                <el-input class="input-add" type="number" v-model.trim="workForm.noticeTime" placeholder="请输入提醒时间" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
@@ -101,14 +71,7 @@
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="首次任务开始时间" prop="firstStartTime">
                                <el-date-picker
                                    class="input-add"
                                    type="datetime"
                                    value-format="YYYY-MM-DD HH:mm:ss"
                                    v-model="workForm.firstStartTime"
                                    placeholder="请选择首次任务开始时间"
                                    clearable
                                ></el-date-picker>
                                <el-date-picker class="input-add" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" v-model="workForm.firstStartTime" placeholder="请选择首次任务开始时间" clearable></el-date-picker>
                            </el-form-item>
                        </el-col>
                    </el-row>
@@ -116,7 +79,7 @@
            </div>
            <template #footer>
                <span class="dialog-footer">
                <span class="dialog-footer" v-show="disabled">
                    <el-button @click="isShowWorkDialog = !isShowWorkDialog" size="default">取 消</el-button>
                    <el-button type="primary" @click="submitWork" v-throttle size="default">确 实</el-button>
                </span>
@@ -129,6 +92,7 @@
import { getUserByDepartment } from '/@/assets/methods';
interface stateType {
    disabled: Boolean;
    isShowWorkDialog: Boolean;
    workForm: {
        checkWorkType: number | null;
@@ -166,12 +130,14 @@
        const workFormRef = ref();
        const state = reactive<stateType>({
            title: '',
            disabled: false,
            activeName: 'inspectionPoint',
            checkWorkTypeList: [],
            departmentList: [],
            taskUnitList: [],
            userList: [],
            timeType: [
                { id: 1, name: '分' },
                { id: 2, name: '小时' },
                { id: 3, name: '日' },
                { id: 4, name: '月' },
@@ -193,15 +159,23 @@
                depId: null
            },
            workFormRules: {
                produceDeviceName: [{ required: true, message: '请填写生产装置名称', trigger: 'blur' }],
                depId: [{ required: true, message: '请选择部门', trigger: 'change' }],
                riskLevel: [{ required: true, message: '请选择风险等级', trigger: 'change' }],
                location: [{ required: true, message: '请填写区域位置', trigger: 'blur' }]
                checkWorkType: [{ required: true, message: '请填写排查作业类型', trigger: 'change' }],
                checkWorkName: [{ required: true, message: '请选择排查作业名称', trigger: 'blur' }],
                taskUnitId: [{ required: true, message: '请选择任务单元', trigger: 'change' }],
                execUserId: [{ required: true, message: '请选择执行人', trigger: 'change' }],
                checkCycle: [{ required: true, message: '请填写排查周期', trigger: 'blur' }],
                checkCycleUnit: [{ required: true, message: '请选择时间单位', trigger: 'change' }],
                validTime: [{ required: true, message: '请填写有效时间', trigger: 'blur' }],
                validTimeUnit: [{ required: true, message: '请选择时间单位', trigger: 'change' }],
                noticeTime: [{ required: true, message: '请填写提醒时间', trigger: 'blur' }],
                noticeTimeUnit: [{ required: true, message: '请选择时间单位', trigger: 'change' }],
                firstStartTime: [{ required: true, message: '请填写首次排查任务开始时间', trigger: 'blur' }],
                depId: [{ required: true, message: '请选择部门', trigger: 'change' }]
            }
        });
        //打开模态框
        const openWorkDialog = (type: string, value: object, department: [], checkWorkTypeList: [], taskUnitList: []) => {
        const openWorkDialog = async (type: string, value: object, department: [], checkWorkTypeList: [], taskUnitList: []) => {
            state.isShowWorkDialog = true;
            state.departmentList = department;
            state.taskUnitList = JSON.parse(JSON.stringify(taskUnitList));
@@ -210,7 +184,8 @@
                workFormRef.value.clearValidate();
            });
            if (type === '新增') {
                state.title = '新增生产装置';
                state.disabled = true;
                state.title = '新增排查任务';
                state.workForm = {
                    checkWorkType: null,
                    checkWorkName: null,
@@ -225,8 +200,17 @@
                    firstStartTime: null,
                    depId: null
                };
            } else if (type === '查看') {
                state.disabled = false;
                state.title = '查看排查任务';
                state.workForm.depId = JSON.parse(JSON.stringify(value)).depId;
                await achieveUserList();
                state.workForm = JSON.parse(JSON.stringify(value));
            } else {
                state.title = '修改生产装置';
                state.disabled = true;
                state.title = '修改排查任务';
                state.workForm.depId = JSON.parse(JSON.stringify(value)).depId;
                await achieveUserList();
                state.workForm = JSON.parse(JSON.stringify(value));
            }
        };
@@ -235,12 +219,12 @@
        const submitWork = async () => {
            workFormRef.value.validate(async (valid: Boolean) => {
                if (valid) {
                    if (state.title === '新增生产装置') {
                    if (state.title === '新增排查任务') {
                        let res = await workApi().addWork(state.workForm);
                        if (res.data.code === '200') {
                            ElMessage({
                                type: 'success',
                                message: '生产装置新增成功',
                                message: '排查任务新增成功',
                                duration: 2000
                            });
                            state.isShowWorkDialog = false;
@@ -256,7 +240,7 @@
                        if (res.data.code === '200') {
                            ElMessage({
                                type: 'success',
                                message: '生产装置修改成功',
                                message: '排查任务修改成功',
                                duration: 2000
                            });
                            state.isShowWorkDialog = false;
src/views/doublePrevent/riskCheckManage/checkTaskManage/checkWork/index.vue
文件名从 src/views/doublePrevent/checkTaskManage/work/index.vue 修改
@@ -40,34 +40,42 @@
                        {{ parseNumber(scope.row.checkWorkType, '排查类型') }}
                    </template>
                </el-table-column>
                <el-table-column prop="riskLevel" label="风险等级" show-overflow-tooltip></el-table-column>
                <el-table-column prop="location" label="区域位置" show-overflow-tooltip></el-table-column>
                <el-table-column prop="status" label="状态" show-overflow-tooltip> </el-table-column>
                <el-table-column prop="taskUnitName" label="任务单元" show-overflow-tooltip></el-table-column>
                <el-table-column prop="execUserName" label="执行人" show-overflow-tooltip></el-table-column>
                <el-table-column prop="checkCycle" label="排查周期" show-overflow-tooltip>
                    <template #default="scope">
                        <span>
                            {{ scope.row.checkCycle }}
                        </span>
                        <span>
                            {{ parseNumber(scope.row.checkWorkType, '排查周期') }}
                        </span>
                    </template>
                </el-table-column>
                <el-table-column prop="validTime" label="排查周期" show-overflow-tooltip>
                    <template #default="scope">
                        <span>
                            {{ scope.row.validTime }}
                        </span>
                        <span>
                            {{ parseNumber(scope.row.validTimeUnit, '排查周期') }}
                        </span>
                    </template>
                </el-table-column>
                <el-table-column prop="createByUserName" label="创建人" show-overflow-tooltip></el-table-column>
                <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column>
                <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column>
                <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column>
                <el-table-column label="操作" width="150">
                <el-table-column label="操作" width="200" align="center">
                    <template #default="scope">
                        <el-button size="small" text type="primary" @click="onOpenDialogRef('修改', scope.row)">修改</el-button>
                        <el-button size="small" text type="danger" @click="onDelWork(scope.row)">删除</el-button>
                        <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button>
                        <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('修改', scope.row)">修改</el-button>
                        <el-button size="small" text type="danger" :icon="Delete" @click="onDelWork(scope.row)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <br />
            <el-pagination
                @size-change="onHandleSizeChange"
                @current-change="onHandleCurrentChange"
                :pager-count="5"
                :page-sizes="[10, 20, 30]"
                v-model:current-page="workData.params.pageIndex"
                background
                v-model:page-size="workData.params.pageSize"
                layout="total, sizes, prev, pager, next, jumper"
                :total="workData.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="workData.params.pageIndex" background v-model:page-size="workData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="workData.total" class="page-position"> </el-pagination>
            <br />
            <br />
        </el-card>
@@ -81,7 +89,7 @@
import workDialog from './components/workDialog.vue';
import { workApi } from '/@/api/doublePreventSystem/work/index.ts';
import { departmentApi } from '/@/api/department';
import { userApi } from '/@/api/user';
import { Edit, Delete, View } from '@element-plus/icons-vue';
import { checkUnitApi } from '/@/api/doublePreventSystem/checkUnit';
// 定义接口来定义对象的类型
@@ -106,17 +114,25 @@
            checkWorkName: string | null;
        };
    };
    taskUnitList: [];
    timeType: Array<levelListState>;
    taskUnitList: Array<taskUnit>;
    departmentList: Array<DepartmentState>;
    checkWorkTypeList: Array<levelListState>;
    checkWorkStatusList: Array<levelListState>;
}
interface levelListState {}
interface levelListState {
    id: number;
    name: string;
}
interface DepartmentState {}
interface taskUnit {
    id: number;
    taskUnitName: string;
}
export default defineComponent({
    name: 'work',
    components: { workDialog },
    components: { workDialog, Edit, Delete, View },
    setup() {
        const workDialogRef = ref();
        const state = reactive<TableDataState>({
@@ -142,6 +158,13 @@
                { id: 1, name: '开启' },
                { id: 2, name: '关闭' },
                { id: 2, name: '过期' }
            ],
            timeType: [
                { id: 1, name: '分' },
                { id: 2, name: '小时' },
                { id: 3, name: '日' },
                { id: 4, name: '月' },
                { id: 5, name: '年' }
            ]
        });
        // 初始化表格数据
@@ -213,7 +236,13 @@
                .catch(() => {});
        };
        const parseNumber = (value: string | number, type: string) => {};
        const parseNumber = (value: string | number, type: string) => {
            if (type === '排查类型') {
                return state.checkWorkTypeList.find((item) => item.id === value)?.name;
            } else if (type === '排查周期') {
                return state.timeType.find((item) => item.id == value)?.name;
            }
        };
        const handleSearch = () => {
            initWorkTableData();
@@ -236,6 +265,9 @@
        });
        return {
            Edit,
            Delete,
            View,
            handleSearch,
            onOpenDialogRef,
            onHandleSizeChange,
src/views/doublePrevent/riskCheckManage/hiddenManagement/hiddenCheck/components/checkDialog.vue
对比新文件
@@ -0,0 +1,185 @@
<template>
    <div class="system-add-menu-container">
        <el-dialog :title="title" v-model="isShowCheckDialog" width="600px">
            <el-form :model="checkForm" :rules="checkFormRules" ref="checkFormRef" 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="checkInfo">
                            <el-input class="input-add" type="textarea" :rows="2" v-model.trim="checkForm.checkAcceptDesc" placeholder="请输入验收意见" clearable></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
            <template #footer>
                <span class="dialog-footer">
                    <el-button @click="isShowCheckDialog = !isShowCheckDialog" size="default">取 消</el-button>
                    <el-button type="primary" @click="submitCheck" v-throttle size="default">确 实</el-button>
                </span>
            </template>
        </el-dialog>
        <el-dialog :title="title" v-model="isShowCheckInfoDialog" width="600px">
            <el-form :model="checkInfoForm" ref="checkFormRef" 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="rectifyDesc">
                            <el-input class="input-add" type="textarea" :rows="2" v-model.trim="checkInfoForm.rectifyDesc" 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="整改类型" prop="rectifyType">
                            <el-select class="input-add" v-model="checkInfoForm.rectifyType" readonly>
                                <el-option v-for="item in rectifyTypeList" :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="rectifyDepId">
                            <el-cascader @change="achieveUserList" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-add" v-model="checkInfoForm.rectifyDepId" readonly> </el-cascader>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="整改责任人" prop="liablePersonId">
                            <el-select class="input-add" v-model="checkInfoForm.liablePersonId" clearable filterable readonly>
                                <el-option v-for="item in userList" :key="item.uid" :label="item.username" :value="item.uid"></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="dangerResult">
                            <el-input class="input-add" type="number" v-model="checkInfoForm.cost" readonly> </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
        </el-dialog>
    </div>
</template>
<script lang="ts">
import { getUserByDepartment } from '/@/assets/methods';
interface stateType {
    isShowCheckDialog: Boolean;
    isShowCheckInfoDialog: Boolean;
    checkForm: {
        id: number | null;
        dangerManagerId: number | null;
        checkAcceptDesc: string | null;
    };
    departmentList: [];
    userList: [];
    rectifyTypeList: Array<rectifyType>;
    checkInfoForm: {
        rectifyDepId: number | null;
        liablePersonId: number | null;
    };
    title: string;
    checkTypeList: Array<checkTypeState>;
    checkFormRules: {};
}
interface checkTypeState {
    regionType: string;
    id: number;
}
interface rectifyType {
    id: number;
    name: string;
}
import { reactive, toRefs, ref } from 'vue';
import { ElMessage } from 'element-plus';
import { hiddenCheckApi } from '/@/api/doublePreventSystem/check';
export default {
    name: 'hiddenCheckDialog',
    setup(props: any, context: any) {
        const checkFormRef = ref();
        const state = reactive<stateType>({
            title: '',
            checkTypeList: [],
            rectifyTypeList: [
                { id: 1, name: '即查即改' },
                { id: 2, name: '限期整改' }
            ],
            departmentList: [],
            userList: [],
            isShowCheckDialog: false,
            isShowCheckInfoDialog: false,
            checkForm: {
                id: null,
                dangerManagerId: null,
                checkAcceptDesc: null
            },
            checkInfoForm: {
                rectifyDepId: null,
                liablePersonId: null
            },
            checkFormRules: {
                checkAcceptDesc: [{ required: true, message: '请填写整改说明', trigger: 'blur' }]
            }
        });
        //打开模态框
        const openCheckDialog = async (type: string, value: object, departmentList: []) => {
            state.departmentList = departmentList;
            if (type === '验收') {
                state.title = '验收';
                state.isShowCheckDialog = true;
                const checkForm = JSON.parse(JSON.stringify(value));
                state.checkForm.id = checkForm.id;
                state.checkForm.dangerManagerId = checkForm.dangerManagerId;
            } else {
                state.title = '查看';
                state.isShowCheckInfoDialog = true;
                state.checkInfoForm.rectifyDepId = JSON.parse(JSON.stringify(value)).rectifyDepId;
                await achieveUserList();
                state.checkInfoForm = JSON.parse(JSON.stringify(value));
            }
        };
        //提交整改
        const submitCheck = async () => {
            checkFormRef.value.validate(async (valid: Boolean) => {
                if (valid) {
                    let res = await hiddenCheckApi().submitHiddenCheck(state.checkForm);
                    if (res.data.code === '200') {
                        ElMessage({
                            type: 'success',
                            message: '整改提交成功',
                            duration: 2000
                        });
                        state.isShowCheckDialog = false;
                        context.emit('refreshCheck');
                    } else {
                        ElMessage({
                            type: 'warning',
                            message: res.data.msg
                        });
                    }
                } else {
                    ElMessage({
                        type: 'warning',
                        message: '请完善基本信息'
                    });
                }
            });
        };
        const achieveUserList = async () => {
            state.checkInfoForm.liablePersonId = null;
            const user: unknown = await getUserByDepartment(state.checkInfoForm.rectifyDepId);
            state.userList = user as [];
        };
        return {
            ...toRefs(state),
            checkFormRef,
            submitCheck,
            openCheckDialog
        };
    }
};
</script>
<style scoped></style>
src/views/doublePrevent/riskCheckManage/hiddenManagement/hiddenCheck/index.vue
文件名从 src/views/doublePrevent/hiddenManage/hiddenCheck/index.vue 修改
@@ -10,16 +10,7 @@
                </div>
                <div class="basic-line">
                    <span>整改部门:</span>
                    <el-cascader
                        :options="departmentList"
                        :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }"
                        placeholder="请选择部门"
                        clearable
                        filterable
                        class="input-box"
                        v-model="checkData.params.rectifyDepId"
                    >
                    </el-cascader>
                    <el-cascader :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-box" v-model="checkData.params.rectifyDepId"> </el-cascader>
                </div>
                <el-button size="default" type="primary" class="ml10" v-throttle @click="handleSearch">
@@ -40,28 +31,23 @@
                </el-table-column>
                <el-table-column prop="liablePerson" label="整改责任人" show-overflow-tooltip min-width="150px"></el-table-column>
                <el-table-column prop="cost" label="整改资金" show-overflow-tooltip min-width="150px"></el-table-column>
                <el-table-column prop="cost" label="验收状态" show-overflow-tooltip min-width="150px"></el-table-column>
                <el-table-column prop="dangerStatus" label="验收状态" show-overflow-tooltip min-width="150px" align="center">
                    <template #default="scope">
                        <el-tag :type="scope.row.dangerStatus === 0 ? 'info' : scope.row.dangerStatus === 1 ? 'primary' : scope.row.dangerStatus === 2 ? 'warning' : scope.row.dangerStatus === 4 ? 'danger' : 'success'">
                            {{ parseNumber(scope.row.dangerStatus, '隐患整改状态') }}
                        </el-tag>
                    </template>
                </el-table-column>
                <el-table-column prop="checkAcceptPerson" label="验收人" show-overflow-tooltip min-width="150px"></el-table-column>
                <el-table-column label="操作" width="250" fixed="right" align="center">
                    <template #default="scope">
                        <el-button size="small" text type="primary" :icon="Check" @click="onOpenDialogRef('验收', scope.row)">验收</el-button>
                        <el-button size="small" text type="danger" :icon="Delete" @click="onDelProductionDevice(scope.row)">删除</el-button>
                        <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button>
                        <el-button size="small" text type="primary" :icon="Check" v-show="scope.row.dangerStatus === 1" @click="onOpenDialogRef('验收', scope.row)">验收</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <br />
            <el-pagination
                @size-change="onHandleSizeChange"
                @current-change="onHandleCurrentChange"
                :pager-count="5"
                :page-sizes="[10, 20, 30]"
                v-model:current-page="checkData.params.pageIndex"
                background
                v-model:page-size="checkData.params.pageSize"
                layout="total, sizes, prev, pager, next, jumper"
                :total="checkData.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="checkData.params.pageIndex" background v-model:page-size="checkData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="checkData.total" class="page-position"> </el-pagination>
            <br />
            <br />
        </el-card>
@@ -73,11 +59,9 @@
import { toRefs, reactive, onMounted, ref, defineComponent } from 'vue';
import { ElMessageBox, ElMessage } from 'element-plus';
import checkDialog from './components/checkDialog.vue';
import { Check, Delete } from '@element-plus/icons-vue';
import { Check, Delete, View } from '@element-plus/icons-vue';
import { departmentApi } from '/@/api/department';
import { productionDeviceApi } from '/@/api/doublePreventSystem/productionDevice';
import { hiddenReportApi } from '/@/api/doublePreventSystem/report';
import { hiddenRectifyApi } from '/@/api/doublePreventSystem/rectify';
import { hiddenCheckApi } from '/@/api/doublePreventSystem/check';
// 定义接口来定义对象的类型
interface TableData {
@@ -113,7 +97,7 @@
export default defineComponent({
    name: 'check',
    components: { checkDialog, Check, Delete },
    components: { checkDialog, Check, Delete, View },
    setup() {
        const checkDialogRef = ref();
        const state = reactive<TableDataState>({
@@ -142,9 +126,10 @@
                { id: 9, name: '已验收' }
            ]
        });
        // 初始化表格数据
        const initCheckTableData = async () => {
            let res = await hiddenRectifyApi().getHiddenRectifyList(state.checkData.params);
            let res = await hiddenCheckApi().getHiddenCheckList(state.checkData.params);
            if (res.data.code === '200') {
                state.checkData.data = res.data.data;
                state.checkData.total = res.data.count;
@@ -171,32 +156,7 @@
        // 打开弹窗
        const onOpenDialogRef = (type: string, value: any) => {
            checkDialogRef.value.opencheckDialog(type, value, state.departmentList);
        };
        // 删除
        const onDelProductionDevice = (row: any) => {
            ElMessageBox.confirm(`此操作将永久删除该巡检点:“${row.code}”,是否继续?`, '提示', {
                confirmButtonText: '确认',
                cancelButtonText: '取消',
                type: 'warning'
            })
                .then(async () => {
                    let res = await hiddencheckApi().deleteHiddencheck({ id: row.id });
                    if (res.data.code === '200') {
                        ElMessage({
                            type: 'success',
                            duration: 2000,
                            message: '删除成功'
                        });
                        await initCheckTableData();
                    } else {
                        ElMessage({
                            type: 'warning',
                            message: res.data.msg
                        });
                    }
                })
                .catch(() => {});
            checkDialogRef.value.openCheckDialog(type, value, state.departmentList);
        };
        const parseNumber = (value: string | number, type: string) => {
@@ -229,11 +189,11 @@
        return {
            Check,
            Delete,
            View,
            parseNumber,
            handleSearch,
            onOpenDialogRef,
            onHandleSizeChange,
            onDelProductionDevice,
            onHandleCurrentChange,
            checkDialog,
            checkDialogRef,
src/views/doublePrevent/riskCheckManage/hiddenManagement/hiddenRectify/components/rectifyDialog.vue
文件名从 src/views/doublePrevent/hiddenManage/hiddenRectify/components/rectifyDialog.vue 修改
@@ -5,27 +5,12 @@
                <el-row :gutter="35">
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="整改说明" prop="rectifyInfo">
                            <el-input
                                class="input-add"
                                type="textarea"
                                :rows="2"
                                v-model.trim="rectifyForm.rectifyInfo"
                                placeholder="请输入整改说明"
                                clearable
                            ></el-input>
                            <el-input class="input-add" type="textarea" :rows="2" v-model.trim="rectifyForm.rectifyInfo" 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="applyTime">
                            <el-date-picker
                                type="datetime"
                                value-format="YYYY-MM-DD HH:mm:ss"
                                class="input-add"
                                v-model="rectifyForm.applyTime"
                                placeholder="请选择整改时间"
                                clearable
                            >
                            </el-date-picker>
                            <el-date-picker type="datetime" value-format="YYYY-MM-DD HH:mm:ss" class="input-add" v-model="rectifyForm.applyTime" placeholder="请选择整改时间" clearable> </el-date-picker>
                        </el-form-item>
                    </el-col>
                </el-row>
@@ -42,45 +27,71 @@
                <el-row :gutter="35">
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="延期说明" prop="timeOutDesc">
                            <el-input
                                class="input-add"
                                type="textarea"
                                :rows="2"
                                v-model.trim="delayForm.timeOutDesc"
                                placeholder="请输入延期说明"
                                clearable
                            ></el-input>
                            <el-input class="input-add" type="textarea" :rows="2" v-model.trim="delayForm.timeOutDesc" 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="rectifyTime">
                            <el-date-picker
                                type="datetime"
                                value-format="YYYY-MM-DD HH:mm:ss"
                                class="input-add"
                                v-model="delayForm.rectifyTime"
                                placeholder="请选择整改期限"
                                clearable
                            >
                            </el-date-picker>
                            <el-date-picker type="datetime" value-format="YYYY-MM-DD HH:mm:ss" class="input-add" v-model="delayForm.rectifyTime" placeholder="请选择整改期限" clearable> </el-date-picker>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
            <template #footer>
                <span class="dialog-footer">
                <span class="dialog-footer" v-show="disabled">
                    <el-button @click="isShowDelayDialog = !isShowDelayDialog" size="default">取 消</el-button>
                    <el-button type="primary" @click="submitDelay" v-throttle size="default">确 实</el-button>
                </span>
            </template>
        </el-dialog>
        <el-dialog :title="title" v-model="isShowCheckInfoDialog" width="600px">
            <el-form :model="checkInfoForm" ref="checkFormRef" 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="rectifyDesc">
                            <el-input class="input-add" type="textarea" :rows="2" v-model.trim="checkInfoForm.rectifyDesc" 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="整改类型" prop="rectifyType">
                            <el-select class="input-add" v-model="checkInfoForm.rectifyType" readonly>
                                <el-option v-for="item in rectifyTypeList" :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="rectifyDepId">
                            <el-cascader @change="achieveUserList" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-add" v-model="checkInfoForm.rectifyDepId" readonly> </el-cascader>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="整改责任人" prop="liablePersonId">
                            <el-select class="input-add" v-model="checkInfoForm.liablePersonId" clearable filterable readonly>
                                <el-option v-for="item in userList" :key="item.uid" :label="item.username" :value="item.uid"></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="dangerResult">
                            <el-input class="input-add" type="number" v-model="checkInfoForm.cost" readonly> </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
        </el-dialog>
    </div>
</template>
<script lang="ts">
import { getUserByDepartment } from '/@/assets/methods';
interface stateType {
    disabled: Boolean;
    isShowRectifyDialog: Boolean;
    isShowDelayDialog: Boolean;
    isShowCheckInfoDialog: Boolean;
    rectifyForm: {
        id: number | null;
        dangerManagerId: number | null;
@@ -94,9 +105,15 @@
        timeOutDesc: string | null;
    };
    title: string;
    departmentList: [];
    userList: [];
    rectifyTypeList: Array<rectifyTypeState>;
    rectifyFormRules: {};
    delayFormRules: {};
    checkInfoForm: {
        rectifyDepId: number | null;
        liablePersonId: number | null;
    };
}
interface rectifyTypeState {
    regionType: string;
@@ -112,7 +129,15 @@
        const rectifyFormRef = ref();
        const state = reactive<stateType>({
            title: '',
            disabled: false,
            rectifyTypeList: [],
            departmentList: [],
            userList: [],
            isShowCheckInfoDialog: false,
            checkInfoForm: {
                rectifyDepId: null,
                liablePersonId: null
            },
            isShowDelayDialog: false,
            isShowRectifyDialog: false,
            rectifyForm: {
@@ -138,16 +163,25 @@
        });
        //打开模态框
        const openRectifyDialog = (type: string, value: object) => {
        const openRectifyDialog = async (type: string, value: object, departmentList: []) => {
            state.departmentList = departmentList;
            if (type === '延期') {
                state.title = '延期';
                state.disabled = true;
                state.isShowDelayDialog = true;
                const delayForm = JSON.parse(JSON.stringify(value));
                state.delayForm.id = delayForm.id;
                state.delayForm.dangerManagerId = delayForm.dangerManagerId;
                state.delayForm.timeOutDesc = null;
                state.delayForm.rectifyTime = null;
            } else if (type === '查看') {
                state.title = '查看';
                state.isShowCheckInfoDialog = true;
                state.checkInfoForm.rectifyDepId = JSON.parse(JSON.stringify(value)).rectifyDepId;
                await achieveUserList();
                state.checkInfoForm = JSON.parse(JSON.stringify(value));
            } else {
                state.disabled = true;
                state.title = '整改';
                state.isShowRectifyDialog = true;
                const rectifyForm = JSON.parse(JSON.stringify(value));
@@ -214,10 +248,17 @@
            });
        };
        const achieveUserList = async () => {
            state.checkInfoForm.liablePersonId = null;
            const user: unknown = await getUserByDepartment(state.checkInfoForm.rectifyDepId);
            state.userList = user as [];
        };
        return {
            ...toRefs(state),
            rectifyFormRef,
            submitDelay,
            achieveUserList,
            submitRectify,
            openRectifyDialog
        };
@@ -225,8 +266,4 @@
};
</script>
<style scoped>
.input-length {
    width: 85%;
}
</style>
<style scoped></style>
src/views/doublePrevent/riskCheckManage/hiddenManagement/hiddenRectify/index.vue
文件名从 src/views/doublePrevent/hiddenManage/hiddenRectify/index.vue 修改
@@ -37,7 +37,7 @@
                </el-table-column>
                <el-table-column prop="liablePerson" label="整改责任人" show-overflow-tooltip min-width="150px"></el-table-column>
                <el-table-column prop="cost" label="整改资金" show-overflow-tooltip min-width="150px"></el-table-column>
                <el-table-column prop="dangerStatus" label="隐患整改状态" show-overflow-tooltip min-width="150px">
                <el-table-column prop="dangerStatus" label="隐患整改状态" show-overflow-tooltip min-width="150px" align="center">
                    <template #default="scope">
                        <el-tag :type="scope.row.dangerStatus === 0 ? 'info' : scope.row.dangerStatus === 1 ? 'primary' : scope.row.dangerStatus === 2 ? 'warning' : scope.row.dangerStatus === 4 ? 'danger' : 'success'">
                            {{ parseNumber(scope.row.dangerStatus, '隐患整改状态') }}
@@ -50,8 +50,9 @@
                <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip min-width="200px"></el-table-column>
                <el-table-column label="操作" width="250" fixed="right" align="center">
                    <template #default="scope">
                        <el-button size="small" text type="primary" :icon="Check" v-show="scope.row.dangerStatus === 0" @click="onOpenDialogRef('整改', scope.row)">整改</el-button>
                        <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('延期', scope.row)">延期</el-button>
                        <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button>
                        <el-button size="small" text type="primary" :icon="Check" v-show="scope.row.dangerStatus === 0 || scope.row.dangerStatus === 2" @click="onOpenDialogRef('整改', scope.row)">整改</el-button>
                        <el-button size="small" text type="primary" :icon="Edit" v-show="scope.row.dangerStatus === 0 || scope.row.dangerStatus === 2" @click="onOpenDialogRef('延期', scope.row)">延期</el-button>
                        <el-button size="small" text type="danger" :icon="Delete" @click="onDelHiddenRectify(scope.row)">删除</el-button>
                    </template>
                </el-table-column>
@@ -69,7 +70,7 @@
import { toRefs, reactive, onMounted, ref, defineComponent } from 'vue';
import { ElMessageBox, ElMessage } from 'element-plus';
import rectifyDialog from './components/rectifyDialog.vue';
import { Edit, Delete, Check } from '@element-plus/icons-vue';
import { Edit, Delete, Check, View } from '@element-plus/icons-vue';
import { hiddenRectifyApi } from '/@/api/doublePreventSystem/rectify';
import { departmentApi } from '/@/api/department';
import { productionDeviceApi } from '/@/api/doublePreventSystem/productionDevice';
@@ -108,7 +109,7 @@
export default defineComponent({
    name: 'rectify',
    components: { rectifyDialog, Edit, Delete },
    components: { rectifyDialog, Edit, Delete, View },
    setup() {
        const rectifyDialogRef = ref();
        const state = reactive<TableDataState>({
@@ -167,7 +168,7 @@
        // 打开弹窗
        const onOpenDialogRef = (type: string, value: any) => {
            rectifyDialogRef.value.openRectifyDialog(type, value);
            rectifyDialogRef.value.openRectifyDialog(type, value, state.departmentList);
        };
        // 删除
        const onDelHiddenRectify = (row: any) => {
@@ -224,6 +225,7 @@
        return {
            Edit,
            View,
            Check,
            Delete,
            parseNumber,
src/views/doublePrevent/riskCheckManage/hiddenManagement/hiddenReport/components/reportDialog.vue
文件名从 src/views/doublePrevent/hiddenManage/hiddenReport/components/reportDialog.vue 修改
@@ -7,72 +7,30 @@
                        <el-row :gutter="25">
                            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                                <el-form-item label="隐患描述" prop="dangerDesc">
                                    <el-input
                                        class="input-add"
                                        v-model.trim="reportForm.dangerDesc"
                                        placeholder="请输入隐患情况描述"
                                        clearable
                                    ></el-input>
                                    <el-input class="input-add" v-model.trim="reportForm.dangerDesc" placeholder="请输入隐患情况描述" clearable></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                                <el-form-item label="隐患名称" prop="dangerCode">
                                    <el-input
                                        class="input-add"
                                        v-model.trim="reportForm.dangerCode"
                                        placeholder="请输入隐患名称"
                                        clearable
                                    ></el-input>
                                    <el-input class="input-add" v-model.trim="reportForm.dangerCode" placeholder="请输入隐患名称" clearable></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                                <el-form-item label="隐患所属部门" prop="depId">
                                    <el-cascader
                                        :options="departmentList"
                                        :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }"
                                        placeholder="请选择部门"
                                        clearable
                                        filterable
                                        class="input-add"
                                        v-model="reportForm.depId"
                                    >
                                    </el-cascader>
                                    <el-cascader :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-add" v-model="reportForm.depId"> </el-cascader>
                                </el-form-item>
                            </el-col>
                            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                                <el-form-item label="生产装置" prop="produceDeviceId">
                                    <el-select
                                        class="input-add"
                                        v-model="reportForm.produceDeviceId"
                                        placeholder="请输入生产装置"
                                        clearable
                                        filterable
                                        @change="changeUnit"
                                    >
                                        <el-option
                                            v-for="item in allProduceDeviceData"
                                            :key="item.id"
                                            :label="item.produceDeviceName"
                                            :value="item.id"
                                        ></el-option>
                                    <el-select class="input-add" v-model="reportForm.produceDeviceId" placeholder="请输入生产装置" clearable filterable @change="changeUnit">
                                        <el-option v-for="item in allProduceDeviceData" :key="item.id" :label="item.produceDeviceName" :value="item.id"></el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                                <el-form-item label="风险分析单元" prop="riskUnitId">
                                    <el-select
                                        class="input-add"
                                        v-model.trim="reportForm.riskUnitId"
                                        placeholder="请输入风险分析单元"
                                        clearable
                                        filterable
                                    >
                                        <el-option
                                            v-for="item in safetyRiskUnitData"
                                            :key="item.id"
                                            :label="item.riskUnitName"
                                            :value="item.id"
                                        ></el-option>
                                    <el-select class="input-add" v-model.trim="reportForm.riskUnitId" placeholder="请输入风险分析单元" clearable filterable>
                                        <el-option v-for="item in safetyRiskUnitData" :key="item.id" :label="item.riskUnitName" :value="item.id"></el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
@@ -100,27 +58,14 @@
                            </el-col>
                            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                                <el-form-item label="隐患可能后果" prop="dangerResult">
                                    <el-select
                                        class="input-add"
                                        v-model="reportForm.dangerResult"
                                        placeholder="请选择隐患可能后果"
                                        clearable
                                        filterable
                                    >
                                    <el-select class="input-add" v-model="reportForm.dangerResult" placeholder="请选择隐患可能后果" clearable filterable>
                                        <el-option v-for="item in dangerResultList" :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="12">
                                <el-form-item label="隐患产生原因" prop="dangerReason">
                                    <el-input
                                        class="input-add"
                                        type="textarea"
                                        :rows="2"
                                        style="padding-bottom: 10px"
                                        v-model.trim="reportForm.dangerReason"
                                        placeholder="请输入隐患产生原因"
                                    ></el-input>
                                    <el-input class="input-add" type="textarea" :rows="2" style="padding-bottom: 10px" v-model.trim="reportForm.dangerReason" placeholder="请输入隐患产生原因"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
@@ -135,51 +80,23 @@
                            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                                <el-form-item label="整改类型" prop="rectifyType">
                                    <el-select class="input-add" v-model="reportForm.rectifyType" placeholder="请选择整改类型" clearable filterable>
                                        <el-option
                                            v-for="item in rectifyTypeList"
                                            :key="item.id"
                                            :label="item.name"
                                            :value="item.id"
                                        ></el-option> </el-select
                                ></el-form-item>
                                        <el-option v-for="item in rectifyTypeList" :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="12" class="mb20">
                                <el-form-item label="整改期限" prop="rectifyTime">
                                    <el-date-picker
                                        type="datetime"
                                        value-format="YYYY-MM-DD HH:mm:ss"
                                        class="input-add"
                                        v-model="reportForm.rectifyTime"
                                        placeholder="请选择整改期限"
                                        clearable
                                    >
                                    </el-date-picker>
                                    <el-date-picker type="datetime" value-format="YYYY-MM-DD HH:mm:ss" class="input-add" v-model="reportForm.rectifyTime" placeholder="请选择整改期限" clearable> </el-date-picker>
                                </el-form-item>
                            </el-col>
                            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                                <el-form-item label="整改部门" prop="rectifyDepId">
                                    <el-cascader
                                        @change="achieveUserList"
                                        :options="departmentList"
                                        :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }"
                                        placeholder="请选择部门"
                                        clearable
                                        filterable
                                        class="input-add"
                                        v-model="reportForm.rectifyDepId"
                                    >
                                    </el-cascader>
                                    <el-cascader @change="achieveUserList" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-add" v-model="reportForm.rectifyDepId"> </el-cascader>
                                </el-form-item>
                            </el-col>
                            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                                <el-form-item label="整改责任人" prop="liablePersonId">
                                    <el-select
                                        class="input-add"
                                        v-model="reportForm.liablePersonId"
                                        placeholder="请选择整改责任人"
                                        clearable
                                        filterable
                                    >
                                    <el-select class="input-add" v-model="reportForm.liablePersonId" placeholder="请选择整改责任人" clearable filterable>
                                        <el-option v-for="item in userList" :key="item.uid" :label="item.username" :value="item.uid"></el-option>
                                    </el-select>
                                </el-form-item>
@@ -192,14 +109,7 @@
                            </el-col>
                            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
                                <el-form-item label="整改措施" prop="rectifyDesc">
                                    <el-input
                                        class="input-add"
                                        type="textarea"
                                        :rows="2"
                                        style="padding-bottom: 10px"
                                        v-model.trim="reportForm.rectifyDesc"
                                        placeholder="请输入整改措施"
                                    ></el-input>
                                    <el-input class="input-add" type="textarea" :rows="2" style="padding-bottom: 10px" v-model.trim="reportForm.rectifyDesc" placeholder="请输入整改措施"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
@@ -207,7 +117,7 @@
                </el-tabs>
            </el-form>
            <template #footer>
                <span class="dialog-footer">
                <span class="dialog-footer" v-show="disabled">
                    <el-button @click="isShowReportDialog = !isShowReportDialog" size="default">取 消</el-button>
                    <el-button type="primary" @click="submitReport" v-throttle size="default">确 实</el-button>
                </span>
@@ -364,7 +274,7 @@
                reportFormRef.value.clearValidate();
            });
            if (type === '新增') {
                state.disabled = false;
                state.disabled = true;
                state.title = '新增隐患';
                state.reportForm = {
                    dangerDesc: null,
@@ -384,6 +294,12 @@
                    cost: null,
                    rectifyDesc: null
                };
            } else if (type === '查看') {
                state.title = '修改隐患';
                state.disabled = false;
                state.reportForm.rectifyDepId = JSON.parse(JSON.stringify(value)).rectifyDepId;
                achieveUserList();
                state.reportForm = JSON.parse(JSON.stringify(value));
            } else {
                state.title = '修改隐患';
                state.disabled = true;
src/views/doublePrevent/riskCheckManage/hiddenManagement/hiddenReport/index.vue
文件名从 src/views/doublePrevent/hiddenManage/hiddenReport/index.vue 修改
@@ -50,7 +50,7 @@
                        {{ parseNumber(scope.row.dangerSource, '隐患来源') }}
                    </template>
                </el-table-column>
                <el-table-column prop="dangerLevel" label="隐患等级" show-overflow-tooltip min-width="150px">
                <el-table-column prop="dangerLevel" label="隐患等级" show-overflow-tooltip min-width="150px" align="center">
                    <template #default="scope">
                        <el-tag :type="scope.row.dangerLevel === 1 ? 'warning' : 'danger'">
                            {{ parseNumber(scope.row.dangerLevel, '隐患等级') }}
@@ -63,7 +63,7 @@
                    </template>
                </el-table-column>
                <el-table-column prop="dangerReason" label="隐患产生原因分析" show-overflow-tooltip min-width="150px"></el-table-column>
                <el-table-column prop="dangerResult" label="隐患可能导致后果" show-overflow-tooltip min-width="150px">
                <el-table-column prop="dangerResult" label="隐患可能导致后果" show-overflow-tooltip min-width="150px" align="center">
                    <template #default="scope">
                        <el-tag :type="scope.row.dangerResult === 1 ? 'success' : scope.row.dangerResult === 2 ? 'info' : scope.row.dangerResult === 3 ? 'warning' : 'danger'"> {{ parseNumber(scope.row.dangerResult, '隐患可能导致后果') }}</el-tag>
                    </template>
@@ -74,6 +74,7 @@
                <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip min-width="200px"></el-table-column>
                <el-table-column label="操作" width="250" fixed="right" align="center">
                    <template #default="scope">
                        <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button>
                        <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('修改', scope.row)">修改</el-button>
                        <el-button size="small" text type="danger" :icon="Delete" @click="onDelProductionDevice(scope.row)">删除</el-button>
                    </template>
@@ -92,7 +93,7 @@
import { toRefs, reactive, onMounted, ref, defineComponent } from 'vue';
import { ElMessageBox, ElMessage } from 'element-plus';
import reportDialog from './components/reportDialog.vue';
import { Edit, Delete } from '@element-plus/icons-vue';
import { Edit, Delete, View } from '@element-plus/icons-vue';
import { hiddenReportApi } from '/@/api/doublePreventSystem/report';
import { departmentApi } from '/@/api/department';
import { productionDeviceApi } from '/@/api/doublePreventSystem/productionDevice';
@@ -138,7 +139,7 @@
export default defineComponent({
    name: 'report',
    components: { reportDialog, Edit, Delete },
    components: { reportDialog, Edit, Delete, View },
    setup() {
        const reportDialogRef = ref();
        const state = reactive<TableDataState>({
@@ -318,6 +319,7 @@
        return {
            Edit,
            View,
            Delete,
            parseNumber,
            handleSearch,
src/views/doublePrevent/riskLevel/action/components/riskControlMeasureDialog.vue
@@ -1,33 +1,18 @@
<template>
    <div class="system-add-menu-container">
        <el-dialog :title="title" v-model="isRiskControlMeasureDialog" width="600px">
            <el-form
                :model="riskControlMeasureForm"
                :rules="riskControlMeasureFormRules"
                ref="riskControlMeasureFormRef"
                size="default"
                label-width="160px"
            >
            <el-form :model="riskControlMeasureForm" :rules="riskControlMeasureFormRules" ref="riskControlMeasureFormRef" 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="riskEventId">
                            <el-select class="input-length" v-model="riskControlMeasureForm.riskEventId" placeholder="请选择风险事件" clearable>
                                <el-option
                                    v-for="item in allSafetyRiskEventData"
                                    :key="item.id"
                                    :label="item.riskEventName"
                                    :value="item.id"
                                ></el-option>
                                <el-option v-for="item in allSafetyRiskEventData" :key="item.id" :label="item.riskEventName" :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="controlMeasureCode">
                            <el-input
                                class="input-length"
                                v-model.trim="riskControlMeasureForm.controlMeasureCode"
                                placeholder="请输入风险措施编码"
                            ></el-input>
                            <el-input class="input-length" v-model.trim="riskControlMeasureForm.controlMeasureCode" placeholder="请输入风险措施编码"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
@@ -39,26 +24,12 @@
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="管控内容" prop="checkContent">
                            <el-input
                                class="input-length"
                                type="textarea"
                                :rows="3"
                                v-model.trim="riskControlMeasureForm.checkContent"
                                placeholder="请输入管控内容"
                                clearable
                            >
                            </el-input>
                            <el-input class="input-length" type="textarea" :rows="3" v-model.trim="riskControlMeasureForm.checkContent" 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="管控措施分类1" prop="classify1">
                            <el-select
                                class="input-length"
                                v-model.trim="riskControlMeasureForm.classify1"
                                @change="changeClassifyTwoList"
                                placeholder="请选择管控方式"
                                clearable
                            >
                            <el-select class="input-length" v-model.trim="riskControlMeasureForm.classify1" @change="changeClassifyTwoList" placeholder="请选择管控方式" clearable>
                                <el-option v-for="item in classifyOneList" :key="item.id" :label="item.riskMeasureName" :value="item.id"></el-option>
                            </el-select>
                        </el-form-item>
@@ -72,27 +43,18 @@
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="管控措施分类3" prop="classify3">
                            <el-input class="input-length" v-model.trim="riskControlMeasureForm.classify3" placeholder="请选择管控方式" clearable>
                            </el-input>
                            <el-input class="input-length" v-model.trim="riskControlMeasureForm.classify3" 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="measureDesc">
                            <el-input
                                class="input-length"
                                type="textarea"
                                :rows="3"
                                v-model.trim="riskControlMeasureForm.measureDesc"
                                placeholder="请输入措施说明"
                                clearable
                            >
                            </el-input>
                            <el-input class="input-length" type="textarea" :rows="3" v-model.trim="riskControlMeasureForm.measureDesc" placeholder="请输入措施说明" clearable> </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
            <template #footer>
                <span class="dialog-footer">
                <span class="dialog-footer" v-show="disabled">
                    <el-button @click="isRiskControlMeasureDialog = !isRiskControlMeasureDialog" size="default">取 消</el-button>
                    <el-button type="primary" @click="submitRiskControlMeasureDialog" v-throttle size="default">确 实</el-button>
                </span>
@@ -104,6 +66,7 @@
<script lang="ts">
interface stateType {
    isRiskControlMeasureDialog: Boolean;
    disabled: Boolean;
    riskControlMeasureForm: {
        riskEventId: number | null;
        controlMeasureCode: string | null;
@@ -137,6 +100,7 @@
        const riskControlMeasureFormRef = ref();
        const state = reactive<stateType>({
            title: '',
            disabled: false,
            controlTypeList: [
                { id: 1, name: '自动化监控' },
                { id: 2, name: '隐患排查' }
@@ -176,6 +140,7 @@
                riskControlMeasureFormRef.value.clearValidate();
            });
            if (type === '新增') {
                state.disabled = true;
                state.title = '新增风险管控措施';
                state.riskControlMeasureForm = {
                    riskEventId: null,
@@ -187,7 +152,12 @@
                    classify3: null,
                    measureDesc: null
                };
            } else if (type === '查看') {
                state.disabled = false;
                state.title = '修改风险管控措施';
                state.riskControlMeasureForm = JSON.parse(JSON.stringify(value));
            } else {
                state.disabled = true;
                state.title = '修改风险管控措施';
                state.riskControlMeasureForm = JSON.parse(JSON.stringify(value));
            }
src/views/doublePrevent/riskLevel/action/index.vue
@@ -57,27 +57,16 @@
                </el-table-column>
                <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column>
                <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column>
                <el-table-column label="操作" width="150">
                <el-table-column label="操作" width="200" align="center">
                    <template #default="scope">
                        <el-button size="small" text type="primary" @click="onOpenDialogRef('修改', scope.row)">修改</el-button>
                        <el-button size="small" text type="danger" @click="onDelRiskControlMeasure(scope.row)">删除</el-button>
                        <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button>
                        <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('修改', scope.row)">修改</el-button>
                        <el-button size="small" text type="danger" :icon="Delete" @click="onDelRiskControlMeasure(scope.row)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <br />
            <el-pagination
                @size-change="onHandleSizeChange"
                @current-change="onHandleCurrentChange"
                class="page-position"
                :pager-count="5"
                :page-sizes="[10, 20, 30]"
                v-model:current-page="riskControlMeasureData.params.pageIndex"
                background
                v-model:page-size="riskControlMeasureData.params.pageSize"
                layout="total, sizes, prev, pager, next, jumper"
                :total="riskControlMeasureData.total"
            >
            </el-pagination>
            <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="page-position" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="riskControlMeasureData.params.pageIndex" background v-model:page-size="riskControlMeasureData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="riskControlMeasureData.total"> </el-pagination>
            <br />
            <br />
        </el-card>
@@ -91,6 +80,7 @@
import riskControlMeasureDialog from './components/riskControlMeasureDialog.vue';
import { riskControlMeasureApi } from '/@/api/doublePreventSystem/riskControlMeasure/index.ts';
import { safetyRiskEventApi } from '/@/api/doublePreventSystem/safetyRiskEvent';
import { Edit, Delete, View } from '@element-plus/icons-vue';
// 定义接口来定义对象的类型
interface TableData {
@@ -162,7 +152,7 @@
export default {
    name: 'riskControlMeasure',
    components: { riskControlMeasureDialog },
    components: { riskControlMeasureDialog, Edit, Delete, View },
    setup() {
        const riskControlMeasureDialogRef = ref();
        const state = reactive<TableDataState>({
@@ -204,18 +194,7 @@
        const dateFormat = (fmt: any, date: any) => {
            date = new Date(date);
            fmt =
                date.getFullYear() +
                '-' +
                (date.getMonth() + 1) +
                '-' +
                date.getDate() +
                ' ' +
                date.getHours().toString() +
                ':' +
                (date.getMinutes().toString() === '0' ? '00' : date.getMinutes().toString()) +
                ':' +
                (date.getSeconds().toString() === '0' ? '00' : date.getMinutes().toString());
            fmt = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + ' ' + date.getHours().toString() + ':' + (date.getMinutes().toString() === '0' ? '00' : date.getMinutes().toString()) + ':' + (date.getSeconds().toString() === '0' ? '00' : date.getMinutes().toString());
            return fmt;
        };
@@ -248,13 +227,7 @@
        // 打开生产装置弹窗
        const onOpenDialogRef = (type: string, value: any) => {
            riskControlMeasureDialogRef.value.openSafetyRiskEventDialog(
                type,
                value,
                state.allSafetyRiskEventData,
                state.classifyOneList,
                state.classifyTwoList
            );
            riskControlMeasureDialogRef.value.openSafetyRiskEventDialog(type, value, state.allSafetyRiskEventData, state.classifyOneList, state.classifyTwoList);
        };
        // 删除角色
@@ -317,6 +290,9 @@
        });
        return {
            Edit,
            Delete,
            View,
            dateFormat,
            handleSearch,
            parseNumber,
src/views/doublePrevent/riskLevel/check/components/selectMeasureControlDialog.vue
文件已删除
src/views/doublePrevent/riskLevel/checkUnit/components/checkUnitDialog.vue
文件已删除
src/views/doublePrevent/riskLevel/checkUnit/index.vue
文件已删除
src/views/doublePrevent/riskLevel/device/components/productionDeviceDialog.vue
@@ -1,67 +1,35 @@
<template>
    <div class="system-add-menu-container">
        <el-dialog :title="title" v-model="isShowProductionDeviceDialog" width="600px">
            <el-form
                :model="productionDeviceForm"
                :rules="productionDeviceFormRules"
                ref="productionDeviceFormRef"
                size="default"
                label-width="120px"
            >
        <el-dialog :title="title" v-model="isShowProductionDeviceDialog" width="600px" :close-on-click-modal="false">
            <el-form :model="productionDeviceForm" :rules="productionDeviceFormRules" ref="productionDeviceFormRef" 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="produceDeviceName">
                            <el-input
                                class="input-length"
                                v-model.trim="productionDeviceForm.produceDeviceName"
                                placeholder="请输入生产装置名称"
                                clearable
                            ></el-input>
                            <el-input class="input-length" v-model.trim="productionDeviceForm.produceDeviceName" 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="depId">
                            <el-cascader
                                :options="departmentList"
                                :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }"
                                placeholder="请选择部门"
                                clearable
                                filterable
                                style="width: 85%"
                                v-model="productionDeviceForm.depId"
                            >
                            </el-cascader>
                            <el-cascader :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable style="width: 85%" v-model="productionDeviceForm.depId"> </el-cascader>
                            <!--                            <el-select class="input-length" v-model="productionDeviceForm.depName" placeholder="请选择所属部门" clearable filterable></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"
                                v-model="productionDeviceForm.riskLevel"
                                placeholder="请选择风险等级"
                                clearable
                                filterable
                            >
                            <el-select class="input-length" v-model="productionDeviceForm.riskLevel" placeholder="请选择风险等级" clearable filterable>
                                <el-option v-for="item in levelList" :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="location">
                            <el-input
                                class="input-length"
                                v-model.trim="productionDeviceForm.location"
                                type="textarea"
                                placeholder="请输入区域位置"
                                maxlength="150"
                            ></el-input>
                            <el-input class="input-length" v-model.trim="productionDeviceForm.location" type="textarea" placeholder="请输入区域位置" maxlength="150"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
            <template #footer>
                <span class="dialog-footer">
                <span class="dialog-footer" v-show="disabled">
                    <el-button @click="isShowProductionDeviceDialog = !isShowProductionDeviceDialog" size="default">取 消</el-button>
                    <el-button type="primary" @click="submitProductionDevice" v-throttle size="default">确 实</el-button>
                </span>
@@ -73,6 +41,7 @@
<script lang="ts">
interface stateType {
    isShowProductionDeviceDialog: Boolean;
    disabled: Boolean;
    productionDeviceForm: {
        produceDeviceName: string;
        depId: number | null;
@@ -94,6 +63,7 @@
        const productionDeviceFormRef = ref();
        const state = reactive<stateType>({
            title: '',
            disabled: false,
            departmentList: [],
            isShowProductionDeviceDialog: false,
            levelList: [
@@ -124,6 +94,7 @@
                productionDeviceFormRef.value.clearValidate();
            });
            if (type === '新增') {
                state.disabled = true;
                state.title = '新增生产装置';
                state.productionDeviceForm = {
                    produceDeviceName: '',
@@ -131,7 +102,12 @@
                    riskLevel: null,
                    location: ''
                };
            } else if (type === '查看') {
                state.disabled = false;
                state.title = '查看生产装置';
                state.productionDeviceForm = JSON.parse(JSON.stringify(value));
            } else {
                state.disabled = true;
                state.title = '修改生产装置';
                state.productionDeviceForm = JSON.parse(JSON.stringify(value));
            }
src/views/doublePrevent/riskLevel/device/index.vue
@@ -10,16 +10,7 @@
                </div>
                <div class="basic-line">
                    <span>部门:</span>
                    <el-cascader
                        :options="departmentList"
                        :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }"
                        placeholder="请选择部门"
                        clearable
                        filterable
                        class="input-box"
                        v-model="productionDeviceData.params.depId"
                    >
                    </el-cascader>
                    <el-cascader :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-box" v-model="productionDeviceData.params.depId"> </el-cascader>
                </div>
                <el-button size="default" type="primary" class="ml10" v-throttle @click="handleSearch">
                    <el-icon>
@@ -38,34 +29,35 @@
                <el-table-column type="index" label="序号" width="60" />
                <el-table-column prop="produceDeviceName" label="生产装置名称" show-overflow-tooltip></el-table-column>
                <el-table-column prop="depName" label="所属部门" show-overflow-tooltip></el-table-column>
                <el-table-column prop="riskLevel" label="风险等级" show-overflow-tooltip></el-table-column>
                <el-table-column prop="riskLevel" label="风险等级" show-overflow-tooltip>
                    <template #default="scope">
                        <el-tag :type="scope.row.riskLevel === 1 ? 'success' : scope.row.riskLevel === 2 ? 'info' : scope.row.riskLevel === 3 ? 'warning' : 'danger'">
                            {{ parseNumber(scope.row.riskLevel, '风险等级') }}
                        </el-tag>
                    </template>
                </el-table-column>
                <el-table-column prop="location" label="区域位置" show-overflow-tooltip></el-table-column>
                <el-table-column prop="status" label="状态" show-overflow-tooltip> </el-table-column>
                <el-table-column prop="status" label="状态" show-overflow-tooltip>
                    <template #default="scope">
                        <el-tag :type="scope.row.status === 1 ? 'primary' : 'warning'">
                            {{ parseNumber(scope.row.status, '状态') }}
                        </el-tag>
                    </template>
                </el-table-column>
                <el-table-column prop="createByUserName" label="创建人" show-overflow-tooltip></el-table-column>
                <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column>
                <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column>
                <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column>
                <el-table-column label="操作" width="150">
                <el-table-column label="操作" width="200" align="center">
                    <template #default="scope">
                        <el-button size="small" text type="primary" @click="onOpenDialogRef('修改', scope.row)">修改</el-button>
                        <el-button size="small" text type="danger" @click="onDelProductionDevice(scope.row)">删除</el-button>
                        <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button>
                        <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('修改', scope.row)">修改</el-button>
                        <el-button size="small" text type="danger" :icon="Delete" @click="onDelProductionDevice(scope.row)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <br />
            <el-pagination
                @size-change="onHandleSizeChange"
                @current-change="onHandleCurrentChange"
                :pager-count="5"
                :page-sizes="[10, 20, 30]"
                v-model:current-page="productionDeviceData.params.pageIndex"
                background
                v-model:page-size="productionDeviceData.params.pageSize"
                layout="total, sizes, prev, pager, next, jumper"
                :total="productionDeviceData.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="productionDeviceData.params.pageIndex" background v-model:page-size="productionDeviceData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="productionDeviceData.total" class="page-position"> </el-pagination>
            <br />
            <br />
        </el-card>
@@ -79,6 +71,7 @@
import productionDeviceDialog from './components/productionDeviceDialog.vue';
import { productionDeviceApi } from '/@/api/doublePreventSystem/productionDevice/index.ts';
import { departmentApi } from '/@/api/department';
import { Edit, Delete, View } from '@element-plus/icons-vue';
// 定义接口来定义对象的类型
interface TableData {
@@ -105,14 +98,18 @@
        };
    };
    departmentList: Array<DepartmentState>;
    stateList: Array<levelListState>;
    levelList: Array<levelListState>;
}
interface levelListState {}
interface levelListState {
    id: number;
    name: string;
}
interface DepartmentState {}
export default {
    name: 'productionDevice',
    components: { productionDeviceDialog },
    components: { productionDeviceDialog, Edit, Delete, View },
    setup() {
        const productionDeviceDialogRef = ref();
        const state = reactive<TableDataState>({
@@ -136,6 +133,10 @@
                { id: 2, name: '一般风险' },
                { id: 3, name: '较大风险' },
                { id: 4, name: '重大风险' }
            ],
            stateList: [
                { id: 1, name: '使用中' },
                { id: 2, name: '已弃用' }
            ]
        });
        // 初始化表格数据
@@ -213,7 +214,19 @@
            getDepartmentData();
        });
        const parseNumber = (value: string | number, type: string) => {
            if (type === '风险等级') {
                return state.levelList.find((item) => item.id === value)?.name;
            } else if (type === '状态') {
                return state.stateList.find((item) => item.id === value)?.name;
            }
        };
        return {
            Edit,
            Delete,
            View,
            parseNumber,
            handleSearch,
            onOpenDialogRef,
            onHandleSizeChange,
src/views/doublePrevent/riskLevel/event/components/safetyRiskEventDialog.vue
@@ -1,40 +1,24 @@
<template>
    <div class="system-add-menu-container">
        <el-dialog :title="title" v-model="isSafetyRiskEventDialog" width="600px">
            <el-form
                :model="safetyRiskEventForm"
                :rules="safetyRiskEventFormRules"
                ref="safetyRiskAnalyseUnitFormRef"
                size="default"
                label-width="180px"
            >
        <el-dialog :title="title" v-model="isSafetyRiskEventDialog" width="600px" :close-on-click-modal="false">
            <el-form :model="safetyRiskEventForm" :rules="safetyRiskEventFormRules" ref="safetyRiskAnalyseUnitFormRef" size="default" label-width="180px">
                <el-row :gutter="35">
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="安全风险分析单元名称" prop="riskUnitId">
                            <el-select class="input-length" v-model="safetyRiskEventForm.riskUnitId" placeholder="请输入安全风险分析单元名称">
                                <el-option
                                    v-for="item in allSafetyRiskEventData"
                                    :key="item.id"
                                    :label="item.riskUnitName"
                                    :value="item.id"
                                ></el-option>
                                <el-option v-for="item in allSafetyRiskEventData" :key="item.id" :label="item.riskUnitName" :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="riskEventName">
                            <el-input
                                class="input-length"
                                v-model.trim="safetyRiskEventForm.riskEventName"
                                placeholder="请输入生产装置名称"
                                clearable
                            ></el-input>
                            <el-input class="input-length" v-model.trim="safetyRiskEventForm.riskEventName" placeholder="请输入生产装置名称" clearable></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
            <template #footer>
                <span class="dialog-footer">
                <span class="dialog-footer" v-show="disabled">
                    <el-button @click="isSafetyRiskEventDialog = !isSafetyRiskEventDialog" size="default">取 消</el-button>
                    <el-button type="primary" @click="submitSafetyRiskEventDialog" v-throttle size="default">确 实</el-button>
                </span>
@@ -46,6 +30,7 @@
<script lang="ts">
interface stateType {
    isSafetyRiskEventDialog: Boolean;
    disabled: Boolean;
    safetyRiskEventForm: {
        riskEventName: string | null;
        riskUnitId: number | null;
@@ -64,6 +49,7 @@
        const safetyRiskAnalyseUnitFormRef = ref();
        const state = reactive<stateType>({
            title: '',
            disabled: false,
            departmentList: [],
            allSafetyRiskEventData: [],
            isSafetyRiskEventDialog: false,
@@ -78,20 +64,25 @@
        });
        //打开模态框
        const openSafetyRiskEventDialog = (type: string, value: object, department: [], allSafetyRiskEventData: []) => {
        const openSafetyRiskEventDialog = (type: string, value: object, allSafetyRiskEventData: []) => {
            state.isSafetyRiskEventDialog = true;
            state.allSafetyRiskEventData = JSON.parse(JSON.stringify(allSafetyRiskEventData));
            state.departmentList = department;
            setTimeout(() => {
                safetyRiskAnalyseUnitFormRef.value.clearValidate();
            });
            if (type === '新增') {
                state.disabled = true;
                state.title = '新增风险事件';
                state.safetyRiskEventForm = {
                    riskEventName: null,
                    riskUnitId: null
                };
            } else if (type === '查看') {
                state.disabled = false;
                state.title = '查看风险事件';
                state.safetyRiskEventForm = JSON.parse(JSON.stringify(value));
            } else {
                state.disabled = true;
                state.title = '修改风险事件';
                state.safetyRiskEventForm = JSON.parse(JSON.stringify(value));
            }
src/views/doublePrevent/riskLevel/event/index.vue
@@ -31,27 +31,16 @@
                <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column>
                <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column>
                <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column>
                <el-table-column label="操作" width="150">
                <el-table-column label="操作" width="200" align="center">
                    <template #default="scope">
                        <el-button size="small" text type="primary" @click="onOpenDialogRef('修改', scope.row)">修改</el-button>
                        <el-button size="small" text type="danger" @click="onDelSafetyRiskEvent(scope.row)">删除</el-button>
                        <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button>
                        <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('修改', scope.row)">修改</el-button>
                        <el-button size="small" text type="danger" :icon="Delete" @click="onDelSafetyRiskEvent(scope.row)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <br />
            <el-pagination
                @size-change="onHandleSizeChange"
                @current-change="onHandleCurrentChange"
                class="page-position"
                :pager-count="5"
                :page-sizes="[10, 20, 30]"
                v-model:current-page="safetyRiskEventData.params.pageIndex"
                background
                v-model:page-size="safetyRiskEventData.params.pageSize"
                layout="total, sizes, prev, pager, next, jumper"
                :total="safetyRiskEventData.total"
            >
            </el-pagination>
            <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="page-position" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="safetyRiskEventData.params.pageIndex" background v-model:page-size="safetyRiskEventData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="safetyRiskEventData.total"> </el-pagination>
            <br />
            <br />
        </el-card>
@@ -66,6 +55,7 @@
import { safetyRiskEventApi } from '/@/api/doublePreventSystem/safetyRiskEvent/index.ts';
import { departmentApi } from '/@/api/department';
import { safetyRiskAnalyseUnitApi } from '/@/api/doublePreventSystem/safetyRiskAnalyseUnit';
import { Edit, Delete, View } from '@element-plus/icons-vue';
// 定义接口来定义对象的类型
interface TableData {
@@ -93,7 +83,7 @@
export default {
    name: 'productionDevice',
    components: { safetyRiskEventDialog },
    components: { safetyRiskEventDialog, Edit, Delete, View },
    setup() {
        const safetyRiskEventDialogRef = ref();
        const state = reactive<TableDataState>({
@@ -127,7 +117,7 @@
        const getAllSafetyRiskEventData = async () => {
            let res = await safetyRiskAnalyseUnitApi().getAllSafetyRiskAnalyseUnitList();
            if (res.data.code === '200') {
                state.allSafetyRiskEventData = JSON.parse(JSON.stringify(res.data.data));
                state.allSafetyRiskEventData = res.data.data;
            } else {
                ElMessage({
                    type: 'warning',
@@ -190,6 +180,9 @@
        });
        return {
            Edit,
            Delete,
            View,
            handleSearch,
            onOpenDialogRef,
            onHandleSizeChange,
src/views/doublePrevent/riskLevel/map/components/rectifyDialog.vue
@@ -7,62 +7,25 @@
                        <el-row :gutter="25">
                            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                                <el-form-item label="隐患描述" prop="dangerDesc">
                                    <el-input
                                        class="input-add"
                                        v-model.trim="reportForm.dangerDesc"
                                        placeholder="请输入隐患情况描述"
                                        clearable
                                    ></el-input>
                                    <el-input class="input-add" v-model.trim="reportForm.dangerDesc" placeholder="请输入隐患情况描述" clearable></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                                <el-form-item label="隐患所属部门" prop="depId">
                                    <el-cascader
                                        :options="departmentList"
                                        :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }"
                                        placeholder="请选择部门"
                                        clearable
                                        filterable
                                        class="input-add"
                                        v-model="reportForm.depId"
                                    >
                                    </el-cascader>
                                    <el-cascader :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-add" v-model="reportForm.depId"> </el-cascader>
                                </el-form-item>
                            </el-col>
                            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                                <el-form-item label="生产装置" prop="produceDeviceId">
                                    <el-select
                                        class="input-add"
                                        v-model="reportForm.produceDeviceId"
                                        placeholder="请输入生产装置"
                                        clearable
                                        filterable
                                        @change="changeUnit"
                                    >
                                        <el-option
                                            v-for="item in allProduceDeviceData"
                                            :key="item.id"
                                            :label="item.produceDeviceName"
                                            :value="item.id"
                                        ></el-option>
                                    <el-select class="input-add" v-model="reportForm.produceDeviceId" placeholder="请输入生产装置" clearable filterable @change="changeUnit">
                                        <el-option v-for="item in allProduceDeviceData" :key="item.id" :label="item.produceDeviceName" :value="item.id"></el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                                <el-form-item label="风险分析单元" prop="riskUnitId">
                                    <el-select
                                        class="input-add"
                                        v-model.trim="reportForm.riskUnitId"
                                        placeholder="请输入风险分析单元"
                                        clearable
                                        filterable
                                    >
                                        <el-option
                                            v-for="item in safetyRiskUnitData"
                                            :key="item.id"
                                            :label="item.riskUnitName"
                                            :value="item.id"
                                        ></el-option>
                                    <el-select class="input-add" v-model.trim="reportForm.riskUnitId" placeholder="请输入风险分析单元" clearable filterable>
                                        <el-option v-for="item in safetyRiskUnitData" :key="item.id" :label="item.riskUnitName" :value="item.id"></el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
@@ -89,27 +52,14 @@
                            </el-col>
                            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                                <el-form-item label="隐患可能后果" prop="dangerResult">
                                    <el-select
                                        class="input-add"
                                        v-model="reportForm.dangerResult"
                                        placeholder="请选择隐患可能后果"
                                        clearable
                                        filterable
                                    >
                                    <el-select class="input-add" v-model="reportForm.dangerResult" placeholder="请选择隐患可能后果" clearable filterable>
                                        <el-option v-for="item in dangerResultList" :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="12">
                                <el-form-item label="隐患产生原因" prop="dangerReason">
                                    <el-input
                                        class="input-add"
                                        type="textarea"
                                        :rows="2"
                                        style="padding-bottom: 10px"
                                        v-model.trim="reportForm.dangerReason"
                                        placeholder="请输入隐患产生原因"
                                    ></el-input>
                                    <el-input class="input-add" type="textarea" :rows="2" style="padding-bottom: 10px" v-model.trim="reportForm.dangerReason" placeholder="请输入隐患产生原因"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
@@ -123,23 +73,11 @@
                        <el-row>
                            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                                <el-form-item label="整改类型" prop="dangerResult">
                                    <el-select class="input-add" v-model="reportForm.dangerResult" placeholder="请选择整改类型" clearable filterable>
                                        <el-option
                                            v-for="item in RFIDList"
                                            :key="item.id"
                                            :label="item.rfidName"
                                            :value="item.id"
                                        ></el-option> </el-select
                                    <el-select class="input-add" v-model="reportForm.dangerResult" placeholder="请选择整改类型" clearable filterable> <el-option v-for="item in RFIDList" :key="item.id" :label="item.rfidName" :value="item.id"></el-option> </el-select
                                ></el-form-item> </el-col
                            ><el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                                <el-form-item label="整改责任人" prop="dangerResult">
                                    <el-select
                                        class="input-add"
                                        v-model="reportForm.dangerResult"
                                        placeholder="请选择整改责任人"
                                        clearable
                                        filterable
                                    >
                                    <el-select class="input-add" v-model="reportForm.dangerResult" placeholder="请选择整改责任人" clearable filterable>
                                        <el-option v-for="item in RFIDList" :key="item.id" :label="item.rfidName" :value="item.id"></el-option>
                                    </el-select>
                                </el-form-item>
@@ -158,14 +96,7 @@
                            </el-col>
                            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
                                <el-form-item label="整改内容" prop="rectifyDesc">
                                    <el-input
                                        class="input-add"
                                        type="textarea"
                                        :rows="2"
                                        style="padding-bottom: 10px"
                                        v-model.trim="reportForm.rectifyDesc"
                                        placeholder="请输入整改内容"
                                    ></el-input>
                                    <el-input class="input-add" type="textarea" :rows="2" style="padding-bottom: 10px" v-model.trim="reportForm.rectifyDesc" placeholder="请输入整改内容"></el-input>
                                </el-form-item>
                            </el-col>
                        </el-row>
@@ -374,7 +305,6 @@
        };
        const changeUnit = () => {
            debugger;
            state.reportForm.riskUnitId = null;
            state.safetyRiskUnitData = state.allSafetyRiskUnitData.filter((item) => item.produceDeviceId === state.reportForm.produceDeviceId);
        };
src/views/doublePrevent/riskLevel/riskCheckUnit/components/checkUnitDialog.vue
文件名从 src/views/doublePrevent/riskLevel/check/components/checkUnitDialog.vue 修改
@@ -7,22 +7,12 @@
                    <el-row :gutter="35">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="任务单元名称" prop="taskUnitName">
                                <el-input
                                    class="input-length"
                                    v-model.trim="checkUnitForm.taskUnitName"
                                    placeholder="请输入任务单元名称"
                                    clearable
                                ></el-input>
                                <el-input class="input-length" v-model.trim="checkUnitForm.taskUnitName" placeholder="请输入任务单元名称" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="任务单元说明" prop="note">
                                <el-input
                                    class="input-length"
                                    v-model.trim="checkUnitForm.note"
                                    placeholder="请输入任务单元说明"
                                    clearable
                                ></el-input>
                                <el-input class="input-length" v-model.trim="checkUnitForm.note" placeholder="请输入任务单元说明" clearable></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
@@ -55,28 +45,26 @@
            </div>
            <template #footer>
                <span class="dialog-footer">
                <span class="dialog-footer" v-show="disabled">
                    <el-button @click="isShowCheckUnitDialog = !isShowCheckUnitDialog" size="default">取 消</el-button>
                    <el-button type="primary" @click="submitCheckUnit" v-throttle size="default">确 实</el-button>
                </span>
            </template>
        </el-dialog>
        <el-dialog title="选择风险管控措施" v-model="isShowSelectMeasureControlDialog" append-to-body :close-on-click-modal="false" width="70%">
            <select-measure-control-dialog
                ref="SelectMeasureControlDialogRef"
                @receiveRiskControlId="receiveRiskControlId"
            ></select-measure-control-dialog>
            <select-measure-control-dialog ref="SelectMeasureControlDialogRef" @receiveRiskControlId="receiveRiskControlId"></select-measure-control-dialog>
        </el-dialog>
    </div>
</template>
<script lang="ts">
import SelectMeasureControlDialog from '/@/views/doublePrevent/riskLevel/checkUnit/components/selectMeasureControlDialog.vue';
import SelectMeasureControlDialog from '/@/views/doublePrevent/riskLevel/riskCheckUnit/components/selectMeasureControlDialog.vue';
import { reactive, toRefs, ref } from 'vue';
import { checkUnitApi } from '/@/api/doublePreventSystem/checkUnit';
import { ElMessage } from 'element-plus';
interface stateType {
    isShowCheckUnitDialog: Boolean;
    disabled: Boolean;
    isShowSelectMeasureControlDialog: Boolean;
    checkUnitForm: {
        taskUnitName: string | null;
@@ -98,6 +86,7 @@
        const riskControlMeasureDialogRef = ref();
        const state = reactive<stateType>({
            title: '',
            disabled: false,
            activeName: 'checkUnit',
            measureData: [],
            checkUnitData: [],
@@ -121,13 +110,19 @@
                checkUnitFormRef.value.clearValidate();
            });
            if (type === '新增') {
                state.disabled = true;
                state.title = '新增隐患排查单元';
                state.checkUnitForm = {
                    taskUnitName: null,
                    note: null,
                    measureList: []
                };
            } else if (type === '查看') {
                state.disabled = false;
                state.title = '查看隐患排查单元';
                state.checkUnitForm = JSON.parse(JSON.stringify(value));
            } else {
                state.disabled = true;
                state.title = '修改隐患排查单元';
                state.checkUnitForm = JSON.parse(JSON.stringify(value));
            }
src/views/doublePrevent/riskLevel/riskCheckUnit/components/selectMeasureControlDialog.vue
src/views/doublePrevent/riskLevel/riskCheckUnit/index.vue
文件名从 src/views/doublePrevent/riskLevel/check/index.vue 修改
@@ -10,16 +10,7 @@
                </div>
                <div class="basic-line">
                    <span>部门:</span>
                    <el-cascader
                        :options="departmentList"
                        :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }"
                        placeholder="请选择部门"
                        clearable
                        filterable
                        class="input-box"
                        v-model="checkUnitData.params.depId"
                    >
                    </el-cascader>
                    <el-cascader :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-box" v-model="checkUnitData.params.depId"> </el-cascader>
                </div>
                <el-button size="default" type="primary" class="ml10" v-throttle @click="handleSearch">
                    <el-icon>
@@ -42,27 +33,16 @@
                <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column>
                <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column>
                <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column>
                <el-table-column label="操作" width="150">
                <el-table-column label="操作" width="200" align="center">
                    <template #default="scope">
                        <el-button size="small" text type="primary" @click="onOpenDialogRef('修改', scope.row)">修改</el-button>
                        <el-button size="small" text type="danger" @click="onDelcheckUnit(scope.row)">删除</el-button>
                        <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button>
                        <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('修改', scope.row)">修改</el-button>
                        <el-button size="small" text type="danger" :icon="Delete" @click="onDelcheckUnit(scope.row)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <br />
            <el-pagination
                @size-change="onHandleSizeChange"
                @current-change="onHandleCurrentChange"
                :pager-count="5"
                :page-sizes="[10, 20, 30]"
                v-model:current-page="checkUnitData.params.pageIndex"
                background
                v-model:page-size="checkUnitData.params.pageSize"
                layout="total, sizes, prev, pager, next, jumper"
                :total="checkUnitData.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="checkUnitData.params.pageIndex" background v-model:page-size="checkUnitData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="checkUnitData.total" class="page-position"> </el-pagination>
            <br />
            <br />
        </el-card>
@@ -75,6 +55,7 @@
import { ElMessageBox, ElMessage } from 'element-plus';
import checkUnitDialog from './components/checkUnitDialog.vue';
import { checkUnitApi } from '/@/api/doublePreventSystem/checkUnit/index.ts';
import { Edit, Delete, View } from '@element-plus/icons-vue';
// 定义接口来定义对象的类型
interface TableData {
@@ -99,8 +80,8 @@
}
export default defineComponent({
    name: 'checkUnit',
    components: { checkUnitDialog },
    name: 'index',
    components: { checkUnitDialog, Edit, Delete, View },
    setup() {
        const checkUnitDialogRef = ref();
        const state = reactive<TableDataState>({
@@ -178,6 +159,9 @@
        });
        return {
            Edit,
            Delete,
            View,
            handleSearch,
            onOpenDialogRef,
            onHandleSizeChange,
src/views/doublePrevent/riskLevel/unit/components/safetyRiskAnalyseUnitDialog.vue
@@ -1,73 +1,33 @@
<template>
    <div class="system-add-menu-container">
        <el-dialog :title="title" v-model="isSafetyRiskAnalyseUnitDialog" width="600px">
            <el-form
                :model="safetyRiskAnalyseUnitForm"
                :rules="safetyRiskAnalyseUnitFormRules"
                ref="safetyRiskAnalyseUnitFormRef"
                size="default"
                label-width="180px"
            >
        <el-dialog :title="title" v-model="isSafetyRiskAnalyseUnitDialog" width="600px" :close-on-click-modal="false">
            <el-form :model="safetyRiskAnalyseUnitForm" :rules="safetyRiskAnalyseUnitFormRules" ref="safetyRiskAnalyseUnitFormRef" size="default" label-width="180px">
                <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
                                class="input-length"
                                v-model.trim="safetyRiskAnalyseUnitForm.riskCode"
                                placeholder="请输入安全风险分析对象编码"
                            ></el-input>
                            <el-input class="input-length" v-model.trim="safetyRiskAnalyseUnitForm.riskCode" placeholder="请输入安全风险分析对象编码"></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="riskUnitName">
                            <el-input
                                class="input-length"
                                v-model.trim="safetyRiskAnalyseUnitForm.riskUnitName"
                                placeholder="请输入安全风险分析单元名称"
                            ></el-input>
                            <el-input class="input-length" v-model.trim="safetyRiskAnalyseUnitForm.riskUnitName" placeholder="请输入安全风险分析单元名称"></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="produceDeviceId">
                            <el-select
                                class="input-length"
                                v-model="safetyRiskAnalyseUnitForm.produceDeviceId"
                                placeholder="请输入生产装置名称"
                                clearable
                            >
                                <el-option
                                    v-for="item in allProduceDeviceData"
                                    :key="item.id"
                                    :label="item.produceDeviceName"
                                    :value="item.id"
                                ></el-option>
                            <el-select class="input-length" v-model="safetyRiskAnalyseUnitForm.produceDeviceId" placeholder="请输入生产装置名称" clearable>
                                <el-option v-for="item in allProduceDeviceData" :key="item.id" :label="item.produceDeviceName" :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="liableDepId">
                            <el-cascader
                                @change="achieveUserList"
                                :options="departmentList"
                                :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }"
                                placeholder="请选择部门"
                                clearable
                                filterable
                                style="width: 85%"
                                v-model="safetyRiskAnalyseUnitForm.liableDepId"
                            >
                            </el-cascader>
                            <el-cascader @change="achieveUserList" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable style="width: 85%" v-model="safetyRiskAnalyseUnitForm.liableDepId"> </el-cascader>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
                        <el-form-item label="责任人" prop="liablePersonId">
                            <el-select
                                class="input-length"
                                v-model="safetyRiskAnalyseUnitForm.liablePersonId"
                                placeholder="请选择责任人"
                                clearable
                                filterable
                            >
                            <el-select class="input-length" v-model="safetyRiskAnalyseUnitForm.liablePersonId" placeholder="请选择责任人" clearable filterable>
                                <el-option v-for="item in userList" :key="item.uid" :label="item.realName" :value="item.uid"></el-option>
                            </el-select>
                        </el-form-item>
@@ -75,7 +35,7 @@
                </el-row>
            </el-form>
            <template #footer>
                <span class="dialog-footer">
                <span class="dialog-footer" v-show="disabled">
                    <el-button @click="isSafetyRiskAnalyseUnitDialog = !isSafetyRiskAnalyseUnitDialog" size="default">取 消</el-button>
                    <el-button type="primary" @click="submitSafetyRiskAnalyseUnitDialog" v-throttle size="default">确 实</el-button>
                </span>
@@ -87,6 +47,7 @@
<script lang="ts">
interface stateType {
    isSafetyRiskAnalyseUnitDialog: Boolean;
    disabled: Boolean;
    safetyRiskAnalyseUnitForm: {
        riskCode: string | null;
        riskUnitName: string | null;
@@ -111,6 +72,7 @@
        const safetyRiskAnalyseUnitFormRef = ref();
        const state = reactive<stateType>({
            title: '',
            disabled: false,
            userList: [],
            departmentList: [],
            allProduceDeviceData: [],
@@ -141,6 +103,7 @@
                safetyRiskAnalyseUnitFormRef.value.clearValidate();
            });
            if (type === '新增') {
                state.disabled = true;
                state.title = '新增风险分析单元';
                state.safetyRiskAnalyseUnitForm = {
                    riskCode: null,
@@ -149,7 +112,12 @@
                    liableDepId: null,
                    produceDeviceId: null
                };
            } else if (type === '查看') {
                state.disabled = false;
                state.title = '查看风险分析单元';
                state.safetyRiskAnalyseUnitForm = JSON.parse(JSON.stringify(value));
            } else {
                state.disabled = true;
                state.title = '修改风险分析单元';
                state.safetyRiskAnalyseUnitForm = JSON.parse(JSON.stringify(value));
            }
src/views/doublePrevent/riskLevel/unit/index.vue
@@ -4,17 +4,7 @@
            <div class="system-user-search mb15">
                <div class="basic-line">
                    <span>责任部门:</span>
                    <el-cascader
                        @change="achieveUserList"
                        :options="departmentList"
                        :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }"
                        placeholder="责任部门"
                        clearable
                        filterable
                        class="input-box"
                        v-model="safetyRiskAnalyseUnitData.params.liableDepId"
                    >
                    </el-cascader>
                    <el-cascader @change="achieveUserList" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="责任部门" clearable filterable class="input-box" v-model="safetyRiskAnalyseUnitData.params.liableDepId"> </el-cascader>
                </div>
                <div class="basic-line">
                    <span>责任人:</span>
@@ -24,8 +14,7 @@
                </div>
                <div class="basic-line">
                    <span>单元名称:</span>
                    <el-input v-model="safetyRiskAnalyseUnitData.params.riskUnitName" clearable filterable class="input-box" placeholder="单元名称">
                    </el-input>
                    <el-input v-model="safetyRiskAnalyseUnitData.params.riskUnitName" clearable filterable class="input-box" placeholder="单元名称"> </el-input>
                </div>
                <el-button size="default" type="primary" class="ml10" v-throttle @click="handleSearch">
                    <el-icon>
@@ -51,27 +40,16 @@
                <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column>
                <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column>
                <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column>
                <el-table-column label="操作" width="150">
                <el-table-column label="操作" width="200" align="center">
                    <template #default="scope">
                        <el-button size="small" text type="primary" @click="onOpenDialogRef('修改', scope.row)">修改</el-button>
                        <el-button size="small" text type="danger" @click="onDelProductionDevice(scope.row)">删除</el-button>
                        <el-button size="small" text type="primary" :icon="View" @click="onOpenDialogRef('查看', scope.row)">查看</el-button>
                        <el-button size="small" text type="primary" :icon="Edit" @click="onOpenDialogRef('修改', scope.row)">修改</el-button>
                        <el-button size="small" text type="danger" :icon="Delete" @click="onDelRiskUnit(scope.row)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <br />
            <el-pagination
                @size-change="onHandleSizeChange"
                @current-change="onHandleCurrentChange"
                class="page-position"
                :pager-count="5"
                :page-sizes="[10, 20, 30]"
                v-model:current-page="safetyRiskAnalyseUnitData.params.pageIndex"
                background
                v-model:page-size="safetyRiskAnalyseUnitData.params.pageSize"
                layout="total, sizes, prev, pager, next, jumper"
                :total="safetyRiskAnalyseUnitData.total"
            >
            </el-pagination>
            <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="page-position" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="safetyRiskAnalyseUnitData.params.pageIndex" background v-model:page-size="safetyRiskAnalyseUnitData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="safetyRiskAnalyseUnitData.total"> </el-pagination>
            <br />
            <br />
        </el-card>
@@ -87,6 +65,7 @@
import { departmentApi } from '/@/api/department';
import { userApi } from '/@/api/user';
import { productionDeviceApi } from '/@/api/doublePreventSystem/productionDevice';
import { Edit, Delete, View } from '@element-plus/icons-vue';
// 定义接口来定义对象的类型
interface TableData {
@@ -120,7 +99,7 @@
export default {
    name: 'productionDevice',
    components: { safetyRiskAnalyseUnitDialog },
    components: { safetyRiskAnalyseUnitDialog, Edit, Delete, View },
    setup() {
        const safetyRiskAnalyseUnitDialogRef = ref();
        const state = reactive<TableDataState>({
@@ -205,7 +184,7 @@
        };
        // 删除角色
        const onDelProductionDevice = (row: any) => {
        const onDelRiskUnit = (row: any) => {
            ElMessageBox.confirm(`此操作将永久删除该条安全风险分析单元:“${row.riskUnitName}”,是否继续?`, '提示', {
                confirmButtonText: '确认',
                cancelButtonText: '取消',
@@ -254,11 +233,14 @@
        });
        return {
            Edit,
            Delete,
            View,
            handleSearch,
            achieveUserList,
            onOpenDialogRef,
            onHandleSizeChange,
            onDelProductionDevice,
            onDelRiskUnit,
            onHandleCurrentChange,
            safetyRiskAnalyseUnitDialog,
            safetyRiskAnalyseUnitDialogRef,