发起变更审批流程弹框板块修改
This commit is contained in:
@@ -13,16 +13,8 @@ import { matrixConfigApi } from "@/service/api/system";
|
||||
|
||||
const themeStore = useThemeStore();
|
||||
|
||||
const props = defineProps(['type','isAiOpen','title','currentId','formInfo', 'currentForm', 'confirmed','members'])
|
||||
const emit = defineEmits(['save','submit','confirmTab']);
|
||||
|
||||
watch(() => props.currentForm, (newVal:any) => {
|
||||
const omit = (obj:any, fields: string[]) => Object.fromEntries(Object.entries(obj).filter(([k]) => !fields.includes(k)));
|
||||
const result = newVal?.records.map((item:any) => omit(item, [
|
||||
'created_at', 'updated_at', 'change_id', 'source_row_id'
|
||||
]));
|
||||
riskRecords.value = result || [];
|
||||
})
|
||||
const props = defineProps(['type','isAiOpen','title','currentId','formInfo', 'currentForm', 'confirmed','members','steps']);
|
||||
const emit = defineEmits(['save','submit','confirmTab','update:steps']);
|
||||
|
||||
const hazopRiskMatrixConfig = ref<any>(null);
|
||||
const fmeaRiskMatrixConfig = ref<any>(null);
|
||||
@@ -39,6 +31,14 @@ const riskRecords = ref<any>([]);
|
||||
const pluginDrawer = ref<boolean>(false);
|
||||
const currentPlugin = ref<string>('');
|
||||
|
||||
watch(() => props.currentForm, (newVal:any) => {
|
||||
const omit = (obj:any, fields: string[]) => Object.fromEntries(Object.entries(obj).filter(([k]) => !fields.includes(k)));
|
||||
const result = newVal?.records.map((item:any) => omit(item, [
|
||||
'created_at', 'updated_at', 'change_id', 'source_row_id'
|
||||
]));
|
||||
riskRecords.value = result || [];
|
||||
}, { immediate: true })
|
||||
|
||||
// 风险识别分析记录表
|
||||
const TOOL_CARDS = [
|
||||
{ key: "RISK", name: "风险预分析" },
|
||||
@@ -156,6 +156,11 @@ const confirmTab = (tab:string, val:boolean) => {
|
||||
emit('confirmTab', tab, val);
|
||||
}
|
||||
|
||||
// 更新审批流程
|
||||
const updateSteps = (steps:any[]) => {
|
||||
emit('update:steps', steps);
|
||||
}
|
||||
|
||||
// 获取JSA风险矩阵配置
|
||||
const getRiskMatrixConfig = async () => {
|
||||
const {data,error} = await matrixConfigApi();
|
||||
@@ -455,9 +460,11 @@ onMounted(() => {
|
||||
:currentForm="formInfo"
|
||||
:confirmed="props.confirmed"
|
||||
:members="props.members"
|
||||
:steps="props.steps"
|
||||
@save="saveDraft"
|
||||
@submit="submitConfirm"
|
||||
@confirmTab="confirmTab"
|
||||
@update:steps="updateSteps"
|
||||
/>
|
||||
<!-- 插件抽屉 -->
|
||||
<NDrawer v-model:show="pluginDrawer" width="100%" placement="right">
|
||||
|
||||
Reference in New Issue
Block a user