发起变更提交参数修改

This commit is contained in:
2026-09-11 08:58:50 +08:00
parent 8e2bc84b02
commit 7030414146
8 changed files with 177 additions and 53 deletions
@@ -1,6 +1,6 @@
<!-- 变更预识别 -->
<script setup lang="ts">
import { inject, ref } from 'vue';
import { inject, watch, ref } from 'vue';
import { Icon } from '@iconify/vue'
import { useThemeStore } from '@/store/modules/theme';
import { AiError, aiApplication, aiRecognize, aiRiskPreAnalysis } from "@/service/api/ai";
@@ -8,6 +8,7 @@ import ChangeCompareTable from "./ChangeCompareTable.vue";
const themeStore = useThemeStore();
const props = defineProps(['title','currentId','currentForm'])
const emit = defineEmits(['save', 'apply-generated'])
const generalLoading = inject('generalLoading', {saveLoading: ref<boolean>(false),btnDisabled: ref<boolean>(false)})
const {saveLoading,btnDisabled} = generalLoading
@@ -113,6 +114,20 @@ const saveDraft = () => {
defineExpose({form})
watch(() => props.currentForm, (newVal:any) => {
if(newVal.severity){
preRiskShow.value = true;
}
const {
attachments,
change_id,
created_at,
id,
updated_at,
...rest
} = newVal;
form.value = rest;
})
</script>
<template>
@@ -174,7 +189,7 @@ defineExpose({form})
{{ preRiskEdit === s.key ? "完成" : "编辑" }}
</NButton>
</div>
<NInput v-model:value="form[s.key]" :readonly="preRiskEdit !== s.key" type="textarea" :bordered="false" autofocus />
<NInput v-model:value="form[s.key]" :readonly="preRiskEdit !== s.key" type="textarea" :autosize="{ minRows: 2 }" :bordered="false" autofocus />
</div>
<div class="rounded-lg bg-amber-50 px-3 py-2 text-xs leading-5 text-amber-700">
AI 风险预分析仅供参考,用于申请阶段的快速研判;正式风险识别请前往「风险分析记录表」标签页,使用 HAZOP / JSA / 检查表法开展并留存记录。