|
@@ -8,7 +8,7 @@
|
|
|
/>
|
|
/>
|
|
|
<main class="safety-platform-container__main">
|
|
<main class="safety-platform-container__main">
|
|
|
|
|
|
|
|
- <el-form label-width="150px" :model="ruleFormData" :rules="isViewMode ? undefined : formRules" ref="basicFormRef">
|
|
|
|
|
|
|
+ <el-form label-width="150px" :model="ruleFormData" :rules="formRules" ref="basicFormRef">
|
|
|
<el-form-item label="隐患类别:" prop="typeId">
|
|
<el-form-item label="隐患类别:" prop="typeId">
|
|
|
<el-select
|
|
<el-select
|
|
|
v-model="ruleFormData.typeId"
|
|
v-model="ruleFormData.typeId"
|
|
@@ -92,12 +92,12 @@
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
- <el-form-item label="整改日期:" prop="rectificationDeadline">
|
|
|
|
|
|
|
+ <el-form-item label="整改期限:" prop="rectificationDeadline">
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
v-model="ruleFormData.rectificationDeadline"
|
|
v-model="ruleFormData.rectificationDeadline"
|
|
|
type="date"
|
|
type="date"
|
|
|
value-format="YYYY-MM-DD"
|
|
value-format="YYYY-MM-DD"
|
|
|
- placeholder="请选择整改日期"
|
|
|
|
|
|
|
+ placeholder="请选择整改期限"
|
|
|
:disabled="isViewMode"
|
|
:disabled="isViewMode"
|
|
|
style="width: 450px"
|
|
style="width: 450px"
|
|
|
/>
|
|
/>
|
|
@@ -248,7 +248,7 @@
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else-if="isRectifyMode">
|
|
<template v-else-if="isRectifyMode">
|
|
|
- <el-button type="primary" @click="handleRectifySubmitDirect">整改</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" @click="handleRectifySubmitDirect">提交</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
<!-- 纯查看时仅保留上面的返回,不显示其他按钮 -->
|
|
<!-- 纯查看时仅保留上面的返回,不显示其他按钮 -->
|
|
|
</footer>
|
|
</footer>
|
|
@@ -381,7 +381,7 @@
|
|
|
import type { DeptTree } from '@/types/dept/type';
|
|
import type { DeptTree } from '@/types/dept/type';
|
|
|
import { queryAvailableUserList } from '@/api/production-safety/responsibility-implementation';
|
|
import { queryAvailableUserList } from '@/api/production-safety/responsibility-implementation';
|
|
|
import PreviewOnline from '@/views/disaster/components/PreviewOnline.vue';
|
|
import PreviewOnline from '@/views/disaster/components/PreviewOnline.vue';
|
|
|
- import { ru } from 'element-plus/es/locale';
|
|
|
|
|
|
|
+
|
|
|
import {
|
|
import {
|
|
|
queryDangerTypePage
|
|
queryDangerTypePage
|
|
|
} from '@/api/production-safety';
|
|
} from '@/api/production-safety';
|
|
@@ -396,9 +396,9 @@
|
|
|
const isEditMode = computed(() => operate.value === 'hidden-trouble-account-edit');
|
|
const isEditMode = computed(() => operate.value === 'hidden-trouble-account-edit');
|
|
|
const isViewMode = computed(
|
|
const isViewMode = computed(
|
|
|
() =>
|
|
() =>
|
|
|
- operate.value === 'hidden-trouble-account-view' ||
|
|
|
|
|
- operate.value === 'hidden-trouble-account-rectify' ||
|
|
|
|
|
- operate.value === 'hidden-trouble-account-review',
|
|
|
|
|
|
|
+ operate.value === 'hidden-trouble-account-view' || // 查看
|
|
|
|
|
+ operate.value === 'hidden-trouble-account-rectify' || // 整改
|
|
|
|
|
+ operate.value === 'hidden-trouble-account-review', // 复查
|
|
|
);
|
|
);
|
|
|
const isRectifyMode = computed(() => operate.value === 'hidden-trouble-account-rectify');
|
|
const isRectifyMode = computed(() => operate.value === 'hidden-trouble-account-rectify');
|
|
|
const isReviewMode = computed(() => operate.value === 'hidden-trouble-account-review');
|
|
const isReviewMode = computed(() => operate.value === 'hidden-trouble-account-review');
|
|
@@ -661,7 +661,7 @@ const attachmentsFileList = ref([]) as any
|
|
|
ElMessage.success('保存成功');
|
|
ElMessage.success('保存成功');
|
|
|
}
|
|
}
|
|
|
router.back();
|
|
router.back();
|
|
|
- } catch (e) {
|
|
|
|
|
|
|
+ } catch (e:any) {
|
|
|
console.error('保存隐患台账失败:', e);
|
|
console.error('保存隐患台账失败:', e);
|
|
|
ElMessage.error(e?.message || e?.data || '保存失败,请重试');
|
|
ElMessage.error(e?.message || e?.data || '保存失败,请重试');
|
|
|
}
|
|
}
|
|
@@ -669,10 +669,11 @@ const attachmentsFileList = ref([]) as any
|
|
|
|
|
|
|
|
// ---------- 整改(详情页直接提交,无弹窗) ----------
|
|
// ---------- 整改(详情页直接提交,无弹窗) ----------
|
|
|
async function handleRectifySubmitDirect() {
|
|
async function handleRectifySubmitDirect() {
|
|
|
|
|
+ const ok = await handleValidate();
|
|
|
|
|
+ if (!ok) return;
|
|
|
if (!currentId.value) return;
|
|
if (!currentId.value) return;
|
|
|
try {
|
|
try {
|
|
|
|
|
|
|
|
-
|
|
|
|
|
const uploadedFileList = await formatAttachmentList(attachmentsFileList.value);
|
|
const uploadedFileList = await formatAttachmentList(attachmentsFileList.value);
|
|
|
|
|
|
|
|
await rectifyHiddenDanger({
|
|
await rectifyHiddenDanger({
|