| | |
| | | Api.getCloudConfig(param).then(result => { |
| | | if (result.status) { |
| | | if (!result.data || result.data.length === 0) { |
| | | this.setState({loadingAppTree: false, appTrees: []}) |
| | | this.setState({loadingAppTree: false, appTrees: [], appInitCheckKeys: null, appCheckedKeys: [], appOpenKeys: [], selectAppTrees: [], selectAppOpenKeys: []}) |
| | | } else { |
| | | this.initTrees(result.data) |
| | | } |
| | | } else { |
| | | this.setState({loadingAppTree: false, appTrees: []}) |
| | | this.setState({loadingAppTree: false, appTrees: [], appInitCheckKeys: null, appCheckedKeys: [], appOpenKeys: [], selectAppTrees: [], selectAppOpenKeys: []}) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | |
| | | |
| | | let expandedKeys = this.getExpandedKeys(trees, 0, []) |
| | | |
| | | this.setState({loadingAppTree: false, appTrees: trees, appOpenKeys: expandedKeys}, () => { |
| | | this.setState({loadingAppTree: false, appInitCheckKeys: null, appCheckedKeys: [], selectAppTrees: [], selectAppOpenKeys: [], appTrees: trees, appOpenKeys: expandedKeys}, () => { |
| | | this.getSelectAppNodeList() |
| | | }) |
| | | } |
| | |
| | | pattern: /^[a-zA-Z0-9]*$/ig, |
| | | message: formRule.input.letternummsg |
| | | }) |
| | | } else if (item.regular === 'phone') { |
| | | _rules.push({ |
| | | pattern: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/ig, |
| | | message: '请正确输入手机号' |
| | | }) |
| | | } else if (item.regular === 'funcname') { |
| | | _rules.push({ |
| | | pattern: /^[\u4E00-\u9FA50-9a-zA-Z_]*$/ig, |
| | |
| | | }, { |
| | | value: 'letter&number', |
| | | text: Formdict['header.form.letter&number'] |
| | | }, { |
| | | value: 'phone', |
| | | text: '手机号' |
| | | }] |
| | | }, |
| | | { |