Commit 0ad1bf75 authored by 田翔's avatar 田翔

fix: 初始化调用隐藏与自动计算接口

parent 22d225f4
......@@ -333,6 +333,17 @@ export function GetTableDataInfo({ accountName, id, timeLimit }) {
});
}
//支持默认隐藏和自动计算
export function GetTableDataInfoExtend({ accountName, id, timeLimit }) {
return request({
// headers: {
// 'Civ-Site': window?.globalConfig?.userInfo?.site
// },
url: `${BASEURL}/GetTableDataInfoExtend?accountName=${accountName}&id=${id}&timeLimit=${timeLimit}`,
method: 'GET',
});
}
/**
* @Description: 保存单条数据,使用JsonToHtml去编译
* @Date: 2021/11/1
......
......@@ -18,6 +18,7 @@ import {
GetAccountTree,
GetAccountPageList,
GetTableDataInfo,
GetTableDataInfoExtend,
EditTableDataInfo,
SaveTableDataInfo,
DeleteTableDataInfo,
......@@ -115,9 +116,9 @@ const Account = (props, ref) => {
if (type === '编辑' && timeLimit) {
Limit = Number(timeLimit)
}
const { code, data, msg } = await GetTableDataInfo({ accountName: params.accountName, id: row.ID, timeLimit: Limit });
const { code, data, msg } = await GetTableDataInfoExtend({ accountName: params.accountName, id: row.ID, timeLimit: Limit });
if (code === 0) {
saveClick(editField, formJson, data, type);
saveClick(editField, data.formJson, data.value, type);
} else {
message.error(msg);
}
......@@ -251,7 +252,7 @@ const Account = (props, ref) => {
child[s].disabled = true;
}
if (field.includes(s)) {
child[s].hidden = false;
// child[s].hidden = false;
hidden = false;
} else {
child[s].hidden = true;
......
......@@ -165,7 +165,9 @@ const RelationForm = (props) => {
})
}
let relationForm = addons.getValue('relationForm') || { configs: [], data: [], table: [] }
window.configsLocal.push({ ...schema, id: schema.$id, queryWheres: queryWheres.map(v => ({ fieldName: v.field, fieldValue: v.value })) })
if (!window.configsLocal?.length || !window.configsLocal?.some(s => s.$id === schema.$id)) {
window.configsLocal.push({ ...schema, id: schema.$id, queryWheres: queryWheres.map(v => ({ fieldName: v.field, fieldValue: v.value })) })
}
addons.setValue('relationForm', {
...relationForm,
configs: window.configsLocal,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment