修复添加打印模板时json数据处理

This commit is contained in:
轻风2016 2024-10-10 12:05:06 +08:00
parent 86f8356ef4
commit 5aeae0d556

View File

@ -112,8 +112,10 @@ onMounted(async () => {});
//
const openDialog = (row: any) => {
state.ruleForm = JSON.parse(JSON.stringify(row));
let templateJson = JSON.parse(state.ruleForm.template);
mode.value = templateJson.panels[0].index;
if (JSON.stringify(state.ruleForm) !== '{}') {
let templateJson = JSON.parse(state.ruleForm.template);
mode.value = templateJson.panels[0].index;
}
state.isShowDialog = true;
ruleFormRef.value?.resetFields();