From 1b9fea7d4af68d8f933b2dc42bf6084b9646f64c Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期二, 04 三月 2025 08:39:55 +0800 Subject: [PATCH] 修改作业等级名称 --- src/views/doublePrevent/riskLevel/riskCheckUnit/components/checkUnitDialog.vue | 52 +++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 45 insertions(+), 7 deletions(-) diff --git a/src/views/doublePrevent/riskLevel/riskCheckUnit/components/checkUnitDialog.vue b/src/views/doublePrevent/riskLevel/riskCheckUnit/components/checkUnitDialog.vue index 99671b4..81ab0c6 100644 --- a/src/views/doublePrevent/riskLevel/riskCheckUnit/components/checkUnitDialog.vue +++ b/src/views/doublePrevent/riskLevel/riskCheckUnit/components/checkUnitDialog.vue @@ -7,12 +7,32 @@ <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-add" :disabled="!disabled" 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-add" :disabled="!disabled" v-model.trim="checkUnitForm.note" placeholder="请输入任务单元说明" clearable></el-input> + </el-form-item> + </el-col> + <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20" v-show="personTime"> + <el-form-item label="创建人" prop="location"> + <el-input class="input-add" :disabled="!disabled" v-model.trim="checkUnitForm.createByUserName" placeholder="请输入区域位置"></el-input> + </el-form-item> + </el-col> + <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20" v-show="personTime"> + <el-form-item label="创建时间" prop="location"> + <el-input class="input-add" :disabled="!disabled" v-model.trim="checkUnitForm.gmtCreate" placeholder="请输入区域位置"></el-input> + </el-form-item> + </el-col> + <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20" v-show="personTime"> + <el-form-item label="最后修改人" prop="location"> + <el-input class="input-add" :disabled="!disabled" v-model.trim="checkUnitForm.lastEditUserName" placeholder="请输入区域位置"></el-input> + </el-form-item> + </el-col> + <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20" v-show="personTime"> + <el-form-item label="最后修改时间" prop="location"> + <el-input class="input-add" :disabled="!disabled" v-model.trim="checkUnitForm.gmtModitify" placeholder="请输入区域位置"></el-input> </el-form-item> </el-col> </el-row> @@ -23,7 +43,7 @@ <el-tabs class="active" v-model="activeName"> <el-tab-pane label="检查项信息" name="checkUnit"> <div class="filter-container"> - <el-button size="default" type="success" @click="onOpenDialogRef('新增', '')"> + <el-button size="default" :disabled="!disabled" type="success" @click="onOpenDialogRef('新增', '')"> <el-icon> <ele-FolderAdd /> </el-icon> @@ -36,7 +56,7 @@ <el-table-column prop="checkContent" label="管控内容" show-overflow-tooltip align="center"></el-table-column> <el-table-column label="操作" width="150" align="center"> <template #default="scope"> - <el-button size="small" text type="danger" @click="onDelCheckUnit(scope.$index, scope.row)">删除</el-button> + <el-button size="small" text :disabled="!disabled" type="danger" @click="onDelCheckUnit(scope.$index, scope.row)">删除</el-button> </template> </el-table-column> </el-table> @@ -47,7 +67,7 @@ <template #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> + <el-button type="primary" @click="submitCheckUnit" v-throttle size="default">确 定</el-button> </span> </template> </el-dialog> @@ -58,13 +78,14 @@ </template> <script lang="ts"> -import SelectMeasureControlDialog from '/@/views/doublePrevent/riskLevel/riskCheckUnit/components/selectMeasureControlDialog.vue'; +import SelectMeasureControlDialog from './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; + personTime: Boolean; isShowSelectMeasureControlDialog: Boolean; checkUnitForm: { taskUnitName: string | null; @@ -87,6 +108,7 @@ const state = reactive<stateType>({ title: '', disabled: false, + personTime: false, activeName: 'checkUnit', measureData: [], checkUnitData: [], @@ -104,14 +126,16 @@ }); //打开模态框 - const openCheckUnitDialog = (type: string, value: object, department: []) => { + const openCheckUnitDialog = (type: string, value: object) => { state.isShowCheckUnitDialog = true; setTimeout(() => { checkUnitFormRef.value.clearValidate(); }); if (type === '新增') { state.disabled = true; + state.personTime = false; state.title = '新增隐患排查单元'; + state.measureData = []; state.checkUnitForm = { taskUnitName: null, note: null, @@ -119,12 +143,16 @@ }; } else if (type === '查看') { state.disabled = false; + state.personTime = true; state.title = '查看隐患排查单元'; state.checkUnitForm = JSON.parse(JSON.stringify(value)); + state.measureData = state.checkUnitForm.measureList; } else { state.disabled = true; + state.personTime = false; state.title = '修改隐患排查单元'; state.checkUnitForm = JSON.parse(JSON.stringify(value)); + state.measureData = state.checkUnitForm.measureList; } }; @@ -219,4 +247,14 @@ .filter-container { padding: 10px 0px; } +:deep(.el-textarea.is-disabled .el-textarea__inner) { + background-color: var(--el-card-bg-color); + color: var(--el-input-text-color, var(--el-text-color-regular)); +} +:deep(.el-input.is-disabled .el-input__inner) { + color: var(--el-input-text-color, var(--el-text-color-regular)); +} +:deep(.el-input.is-disabled .el-input__wrapper) { + background-color: var(--el-card-bg-color); +} </style> -- Gitblit v1.9.2