style: 统一行尾符为LF(gitattributes renormalize,无代码变更)

This commit is contained in:
2026-10-12 10:14:11 +08:00
parent 7c5f0dea0b
commit 7b71038949
37 changed files with 12551 additions and 12551 deletions
+52 -52
View File
@@ -1,53 +1,53 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { useThemeStore } from '@/store/modules/theme';
import { Icon } from '@iconify/vue'
import RichTextInput from './RichTextInput.vue'
const themeStore = useThemeStore();
const props = defineProps(['formInfo'])
const emit = defineEmits(['update:data']);
const form = ref<any>(null);
watch(() => props.formInfo,
(val: any) => {
// 深度拷贝以避免直接修改 props,并确保响应式
form.value = val
},
{ immediate: true, deep: true },
)
// 编辑风险预分析
const preRiskEdit = ref<boolean>(false);
// 更新数据
const onCellChange = (key:string,val:string) => {
form.value[key] = val;
emit('update:data', key, val)
}
</script>
<template>
<div class="border" :style="{ borderRadius: themeStore.themeRadius + 'px' }">
<div class="flex items-center justify-between px-4 py-2 border-b">
<div class="flex items-center">
<Icon icon="lucide:list-checks" class="size-16px text-emerald-500" />
<span class="font-semibold text-base ml-2">风险预分析报告</span>
</div>
<NButton text type="primary" class="ml-auto text-xs hover:underline" @click="preRiskEdit = !preRiskEdit">
{{ preRiskEdit ? "完成" : "编辑" }}
</NButton>
</div>
<div class="p-4">
<div class="space-y-4">
<div v-for="s in ([{ key: 'severity', name: '危害严重性分析' }, { key: 'probability', name: '事件概率分析' }, { key: 'protection', name: '保护措施影响分析' }])" :key="s.key" class="rounded-lg border">
<div class="flex items-center gap-2 border-b bg-slate-50/60 px-4 py-2">
<span class="text-sm font-semibold text-slate-700">{{ s.name }}</span>
</div>
<RichTextInput :disabled="!preRiskEdit" :modelValue="form[s.key]" :minRows="2" :bordered="false" @update:modelValue="(v) => onCellChange(s.key,v)" />
</div>
<div class="rounded-lg bg-amber-50 px-3 py-2 text-xs leading-5 text-amber-700">
AI 风险预分析仅供参考,用于申请阶段的快速研判;正式风险识别请前往「风险分析记录表」标签页,使用 HAZOP / JSA / 检查表法开展并留存记录。
</div>
</div>
</div>
</div>
<script setup lang="ts">
import { ref, watch } from 'vue';
import { useThemeStore } from '@/store/modules/theme';
import { Icon } from '@iconify/vue'
import RichTextInput from './RichTextInput.vue'
const themeStore = useThemeStore();
const props = defineProps(['formInfo'])
const emit = defineEmits(['update:data']);
const form = ref<any>(null);
watch(() => props.formInfo,
(val: any) => {
// 深度拷贝以避免直接修改 props,并确保响应式
form.value = val
},
{ immediate: true, deep: true },
)
// 编辑风险预分析
const preRiskEdit = ref<boolean>(false);
// 更新数据
const onCellChange = (key:string,val:string) => {
form.value[key] = val;
emit('update:data', key, val)
}
</script>
<template>
<div class="border" :style="{ borderRadius: themeStore.themeRadius + 'px' }">
<div class="flex items-center justify-between px-4 py-2 border-b">
<div class="flex items-center">
<Icon icon="lucide:list-checks" class="size-16px text-emerald-500" />
<span class="font-semibold text-base ml-2">风险预分析报告</span>
</div>
<NButton text type="primary" class="ml-auto text-xs hover:underline" @click="preRiskEdit = !preRiskEdit">
{{ preRiskEdit ? "完成" : "编辑" }}
</NButton>
</div>
<div class="p-4">
<div class="space-y-4">
<div v-for="s in ([{ key: 'severity', name: '危害严重性分析' }, { key: 'probability', name: '事件概率分析' }, { key: 'protection', name: '保护措施影响分析' }])" :key="s.key" class="rounded-lg border">
<div class="flex items-center gap-2 border-b bg-slate-50/60 px-4 py-2">
<span class="text-sm font-semibold text-slate-700">{{ s.name }}</span>
</div>
<RichTextInput :disabled="!preRiskEdit" :modelValue="form[s.key]" :minRows="2" :bordered="false" @update:modelValue="(v) => onCellChange(s.key,v)" />
</div>
<div class="rounded-lg bg-amber-50 px-3 py-2 text-xs leading-5 text-amber-700">
AI 风险预分析仅供参考,用于申请阶段的快速研判;正式风险识别请前往「风险分析记录表」标签页,使用 HAZOP / JSA / 检查表法开展并留存记录。
</div>
</div>
</div>
</div>
</template>