Commit c5ca9198 authored by 田翔's avatar 田翔

fix: 文本唯一值校验

parent 0d23e131
{
"name": "panda-xform",
"version": "6.8.9",
"description": "6.8.9 绘制区域颜色高亮",
"version": "6.8.10",
"description": "6.8.10 文本唯一值校验",
"keywords": [
"panda-xform"
],
......
......@@ -53,7 +53,17 @@ const Account = (props, ref) => {
getTableColumns,
}));
const { accountName, parentConfig, notUse, superAccount, siteLevel, fieldSearch, timeLimit, getDeleted } = props;
const {
accountName,
parentConfig,
notUse,
superAccount,
siteLevel,
fieldSearch,
timeLimit,
getDeleted,
accountId,
} = props;
const userID = window?.globalConfig?.userInfo?.OID || 1;
let initParams = {
user: userID,
......@@ -74,7 +84,7 @@ const Account = (props, ref) => {
const [treeShow, setTreeShow] = useState(true);
const [treeData, setTreeData] = useState([]);
const [expandedKeys, setExpandedKeys] = useState([]);
const [detailShow, setDetailShow] = useState(false);
const [detailShow, setDetailShow] = useState(Boolean(accountId));
const [params, setParams] = useState(initParams);
const [loading, setLoading] = useState(false);
const [dataSource, setDataSource] = useState([]);
......@@ -395,6 +405,10 @@ const Account = (props, ref) => {
setConfig(parentConfig);
getDataSource({ siteFilter: Boolean(parentConfig.enableSiteFilter) });
} else {
//如果传入该值
if (accountId) {
btnsClick({ type: notUse?.includes('edit') ? '详情' : '编辑', row: { ID: accountId } })
}
getConfig({ accountName });
}
if (superAccount) {
......
......@@ -128,7 +128,7 @@ const TextInput = (props) => {
if (addons) {
let getValue = async (params) => {
const [rule, value, callback] = params
const { code, data, msg } = await GetFieldValueFromTable(tableName, fieldName, `${fieldName}=${value}`)
const { code, data, msg } = await GetFieldValueFromTable(tableName, fieldName, `${fieldName}='${value}'`)
if (Array.isArray(data) && data.length) {
callback(new Error(`${title}已重复,请重新输入`));
} else {
......
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