| | |
| | | const PasteController = asyncComponent(() => import('@/menu/pastecontroller')) |
| | | const PaddingController = asyncComponent(() => import('@/menu/padcontroller')) |
| | | const StyleController = asyncComponent(() => import('@/menu/stylecontroller')) |
| | | // const PictureController = asyncComponent(() => import('@/menu/picturecontroller')) |
| | | const PictureController = asyncComponent(() => import('@/menu/picturecontroller')) |
| | | const StyleCombController = asyncComponent(() => import('@/menu/stylecombcontroller')) |
| | | const StyleCombControlButton = asyncComponent(() => import('@/menu/stylecombcontrolbutton')) |
| | | const ModalController = asyncComponent(() => import('@/menu/modalconfig/controller')) |
| | |
| | | MKEmitter.addListener('changePopview', this.initPopview) |
| | | MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle) |
| | | MKEmitter.addListener('updateCustomComponent', this.updateCustomComponent) |
| | | this.updateCustomComponent() |
| | | // this.getAppPictures() |
| | | setTimeout(() => { |
| | | this.updateCustomComponent() |
| | | this.getAppPictures() |
| | | }, 1000) |
| | | } |
| | | |
| | | /** |
| | |
| | | MKEmitter.removeListener('updateCustomComponent', this.updateCustomComponent) |
| | | } |
| | | |
| | | // getAppPictures = () => { |
| | | // Api.getSystemConfig({ |
| | | // func: 's_url_db_adduptdel', |
| | | // id: '', |
| | | // PageIndex: 0, // 0 代表全部 |
| | | // PageSize: 0, // 0 代表全部 |
| | | // typecharone: 'image', |
| | | // type: 'search' |
| | | // }).then(res => { |
| | | getAppPictures = () => { |
| | | Api.getSystemConfig({ |
| | | func: 's_url_db_adduptdel', |
| | | PageIndex: 0, // 0 代表全部 |
| | | PageSize: 0, // 0 代表全部 |
| | | typecharone: 'image', |
| | | type: 'search' |
| | | }).then(res => { |
| | | if (res.status) { |
| | | sessionStorage.setItem('app_pictures', JSON.stringify(res.data || [])) |
| | | } |
| | | |
| | | // }) |
| | | // } |
| | | Api.getSystemConfig({ |
| | | func: 's_url_db_adduptdel', |
| | | PageIndex: 0, // 0 代表全部 |
| | | PageSize: 0, // 0 代表全部 |
| | | typecharone: 'video', |
| | | type: 'search' |
| | | }).then(res => { |
| | | if (res.status) { |
| | | sessionStorage.setItem('app_videos', JSON.stringify(res.data || [])) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | updateCustomComponent = () => { |
| | | Api.getSystemConfig({ |
| | |
| | | }) |
| | | } |
| | | this.setState({customComponents: coms}) |
| | | this.getRoleFields() |
| | | }) |
| | | } |
| | | |
| | |
| | | }) |
| | | |
| | | this.props.modifyCustomMenu(config) |
| | | this.getRoleFields() |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | onEnabledChange = () => { |
| | | const { config } = this.state |
| | | |
| | | if (!config.enabled && this.verifyConfig(true)) { |
| | | if (!config || (!config.enabled && this.verifyConfig(true))) { |
| | | return |
| | | } |
| | | |
| | |
| | | <div> {config && config.MenuName} </div> |
| | | } bordered={false} extra={ |
| | | <div> |
| | | {/* <PictureController/> */} |
| | | <PictureController/> |
| | | <StyleCombControlButton menu={config} /> |
| | | <PasteController type="menu" Tab={null} insert={this.insert} /> |
| | | {config ? <Switch className="big" checkedChildren={dict['mob.enable']} unCheckedChildren={dict['mob.disable']} checked={config.enabled} onChange={this.onEnabledChange} /> : null} |
| | | <Switch className="big" checkedChildren={dict['mob.enable']} unCheckedChildren={dict['mob.disable']} checked={config && config.enabled} onChange={this.onEnabledChange} /> |
| | | <Button type="primary" onClick={this.submitConfig} loading={menuloading}>{dict['mob.save']}</Button> |
| | | <Button type="default" onClick={this.closeView}>{dict['mob.return']}</Button> |
| | | </div> |