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

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

parent 22d225f4
...@@ -333,6 +333,17 @@ export function GetTableDataInfo({ accountName, id, timeLimit }) { ...@@ -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去编译 * @Description: 保存单条数据,使用JsonToHtml去编译
* @Date: 2021/11/1 * @Date: 2021/11/1
......
...@@ -18,6 +18,7 @@ import { ...@@ -18,6 +18,7 @@ import {
GetAccountTree, GetAccountTree,
GetAccountPageList, GetAccountPageList,
GetTableDataInfo, GetTableDataInfo,
GetTableDataInfoExtend,
EditTableDataInfo, EditTableDataInfo,
SaveTableDataInfo, SaveTableDataInfo,
DeleteTableDataInfo, DeleteTableDataInfo,
...@@ -115,9 +116,9 @@ const Account = (props, ref) => { ...@@ -115,9 +116,9 @@ const Account = (props, ref) => {
if (type === '编辑' && timeLimit) { if (type === '编辑' && timeLimit) {
Limit = Number(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) { if (code === 0) {
saveClick(editField, formJson, data, type); saveClick(editField, data.formJson, data.value, type);
} else { } else {
message.error(msg); message.error(msg);
} }
...@@ -251,7 +252,7 @@ const Account = (props, ref) => { ...@@ -251,7 +252,7 @@ const Account = (props, ref) => {
child[s].disabled = true; child[s].disabled = true;
} }
if (field.includes(s)) { if (field.includes(s)) {
child[s].hidden = false; // child[s].hidden = false;
hidden = false; hidden = false;
} else { } else {
child[s].hidden = true; child[s].hidden = true;
......
...@@ -165,7 +165,9 @@ const RelationForm = (props) => { ...@@ -165,7 +165,9 @@ const RelationForm = (props) => {
}) })
} }
let relationForm = addons.getValue('relationForm') || { configs: [], data: [], table: [] } 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', { addons.setValue('relationForm', {
...relationForm, ...relationForm,
configs: window.configsLocal, 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