Merge pull request '修复添加打印模板时json数据处理' (#154) from 616036448/Admin.NET.Pro:main into main

Reviewed-on: http://101.43.53.74:3000/Admin.NET/Admin.NET.Pro/pulls/154
This commit is contained in:
zuohuaijun 2024-10-10 14:09:52 +08:00
commit b7570fcc1a

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();