| | |
| | | thdMenuList = JSON.parse(thdMenuList) |
| | | |
| | | let thdMenu = null |
| | | let firstId = '' |
| | | |
| | | thdMenuList.forEach(trd => { |
| | | if (MenuId === trd.MenuID) { |
| | |
| | | smenulist = item.children |
| | | } |
| | | }) |
| | | |
| | | firstId = thdMenu.FstId || '' |
| | | } |
| | | |
| | | this.props.updateConfig({...config, fstMenuId: thdMenu ? thdMenu.FstId : ''}) |
| | | if (firstId !== config.fstMenuId) { |
| | | this.props.updateConfig({...config, fstMenuId: firstId}) |
| | | } |
| | | |
| | | this.setState({ |
| | | fstMenuId: thdMenu ? thdMenu.FstId : '', |
| | | fstMenuId: firstId, |
| | | menulist, |
| | | smenulist |
| | | }, () => { |
| | | this.props.form.setFieldsValue({ |
| | | fstMenuId: thdMenu ? thdMenu.FstId : '', |
| | | fstMenuId: firstId, |
| | | parentId: thdMenu ? thdMenu.ParentId : '' |
| | | }) |
| | | }) |
| | |
| | | EasyCode: trd.EasyCode, |
| | | value: trd.MenuID, |
| | | label: trd.MenuName, |
| | | type: 'CommonTable', |
| | | type: 'CustomPage', |
| | | disabled: false |
| | | } |
| | | |
| | | if (trd.PageParam) { |
| | | try { |
| | | trd.PageParam = JSON.parse(trd.PageParam) |
| | | trdItem.type = trd.PageParam.Template || 'CommonTable' |
| | | trdItem.type = trd.PageParam.Template || 'CustomPage' |
| | | } catch (e) { |
| | | |
| | | } |
| | |
| | | }) |
| | | |
| | | let smenulist = [] |
| | | let firstId = '' |
| | | if (thdMenu) { |
| | | menulist.forEach(item => { |
| | | if (item.MenuID === thdMenu.FstId) { |
| | | smenulist = item.children |
| | | } |
| | | }) |
| | | firstId = thdMenu.FstId || '' |
| | | } |
| | | sessionStorage.setItem('fstMenuList', JSON.stringify(menulist)) |
| | | sessionStorage.setItem('thdMenuList', JSON.stringify(thdMenuList)) |
| | | this.props.updateConfig({...config, fstMenuId: thdMenu ? thdMenu.FstId : ''}) |
| | | |
| | | if (firstId !== config.fstMenuId) { |
| | | this.props.updateConfig({...config, fstMenuId: firstId}) |
| | | } |
| | | |
| | | this.setState({ |
| | | fstMenuId: thdMenu ? thdMenu.FstId : '', |
| | | fstMenuId: firstId, |
| | | menulist, |
| | | smenulist |
| | | }, () => { |
| | | this.props.form.setFieldsValue({ |
| | | fstMenuId: thdMenu ? thdMenu.FstId : '', |
| | | fstMenuId: firstId, |
| | | parentId: thdMenu ? thdMenu.ParentId : '' |
| | | }) |
| | | }) |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | {config.permission !== 'false' ? <Col span={24}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="是否检验后端sql的权限,使用后端sql脚本时有效。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | sql验证 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('sqlperm', { |
| | | initialValue: config.sqlperm || 'true' |
| | | })( |
| | | <Radio.Group onChange={(e) => {this.selectChange('sqlperm', e.target.value)}}> |
| | | <Radio value="true">使用</Radio> |
| | | <Radio value="false">不使用</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={24}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="数据会缓存到用户本地,方便页面快速呈现。"> |