Your Name
2022-08-01 1621b3719092d93e6c29f7a27e401529e0454420
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));
            }