Commit 826fa9a4 authored by 田翔's avatar 田翔

fix: 存储ID

parent 61517eb4
{
"name": "panda-xform",
"version": "5.3.7",
"description": "5.3.7 通过ID获取部门名称",
"version": "5.3.8",
"description": "5.3.8 存储ID",
"keywords": [
"panda-xform"
],
......
......@@ -32,6 +32,7 @@ const TextInput = (props) => {
const preview = sessionStorage.getItem('FormRender')
const userInfo = preview === 'preview' ? initUserInfo : window?.globalConfig?.userInfo || initUserInfo
const { value, onChange, schema, addons } = props
const [showValue, setShowValue] = useState(value)
const { title, disabled, placeholder, presetValue, addonBefore, addonAfter, maxLength, rules, uniqueVerify, tableName, fieldName, isStoreID, textDefalut } = schema
const handleChange = (e) => {
......@@ -45,7 +46,7 @@ const TextInput = (props) => {
const { code, data } = await getUserName(userID)
if (code === 0) {
if (Array.isArray(data) && data.length > 0) {
onChange(data[0])
setShowValue(data[0])
}
}
}
......@@ -54,7 +55,7 @@ const TextInput = (props) => {
const { code, data } = await getGroupName(groupIds)
if (code === 0) {
if (Array.isArray(data) && data.length > 0) {
onChange(data[0])
setShowValue(data[0])
}
}
}
......@@ -85,6 +86,7 @@ const TextInput = (props) => {
} else {
onChange(valueNext || '')
}
setShowValue(valueNext)
if (isStoreID && valueNext) {
if (textDefalut === '【本人姓名】') {
getUserInfo(valueNext)
......@@ -121,7 +123,7 @@ const TextInput = (props) => {
<Input
style={{ color: loaclPaths.includes(presetValue) ? 'blue' : '' }}
disabled={disabled}
value={value}
value={showValue}
maxLength={maxLength}
placeholder={disabled ? (placeholder || '') : (placeholder || '请输入内容')}
onChange={handleChange}
......
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