Commit 27323fad authored by 田翔's avatar 田翔

fix: 站点选择器回显问题

parent 727db353
{
"name": "panda-xform",
"version": "2.6.1",
"description": "2.6.1: 人员选择器分组形态BUG修复",
"version": "2.6.2",
"description": "2.6.2: 站点选择器回显问题",
"keywords": [
"panda-xform"
],
......
......@@ -96,20 +96,30 @@ const ComboBox = (props) => {
}
}
if (sourceType === '站点') {
const { code, data, msg } = await getStationIDListByUserID(userID, !isMySite)
if (code === 0) {
if (Array.isArray(data)) {
setSite(data)
} else {
setSite([])
}
} else {
message.error(msg)
}
getStation()
}
}
}
const getStation = async () => {
const { code, data, msg } = await getStationIDListByUserID(userID, !isMySite)
if (code === 0) {
if (Array.isArray(data)) {
setSite(data)
} else {
setSite([])
}
} else {
message.error(msg)
}
}
useEffect(async () => {
if (sourceType === '站点' && isStoreID) {
getStation()
}
}, [])
return (
<Select
onFocus={onFocus}
......
......@@ -60,14 +60,16 @@ const HiddenCondition = (props) => {
if (rule) {
const { code, data } = await getFormFieldHideDtos({ formula: rule })
if (data) {
addons.setValue('hiddenRules', data)
onChange(rule)
setVisible(false)
addons.setValue('hiddenRules', data)
} else {
addons.setValue('hiddenRules', [])
message.error('校验不通过!')
return message.error('校验不通过!')
}
} else {
onChange('')
addons.setValue('hiddenRules', [])
}
setVisible(false)
}
const onCancel = () => {
......
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