From 0f069db6eeb398c65884f7fe045a68346c41cbaf Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 12 一月 2023 17:34:40 +0800 Subject: [PATCH] 2023-01-12 --- src/components/keyInterface/index.jsx | 19 ++++++++++++------- src/components/keyInterface/index.scss | 2 +- src/menu/components/card/cardcomponent/index.jsx | 4 ++-- src/menu/components/card/data-card/index.jsx | 7 ++++++- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/components/keyInterface/index.jsx b/src/components/keyInterface/index.jsx index 11a459d..1319549 100644 --- a/src/components/keyInterface/index.jsx +++ b/src/components/keyInterface/index.jsx @@ -19,6 +19,7 @@ url: '', key: '', visible: false, + apptoken: '', setting: null } @@ -104,7 +105,7 @@ return } } - this.setState({key: key, setting: _setting}) + this.setState({key: key, apptoken: values.apptoken, setting: _setting}) return } @@ -136,7 +137,7 @@ this.props.onChange(content) - this.setState({setting: message, url: values.interface, visible: false}) + this.setState({setting: message, url: values.interface, apptoken: '', visible: false}) if (this.props.type !== 'develop') { this.setState({key: ''}) @@ -153,7 +154,7 @@ if (type === 'develop') { this.setState({setting: null, url: ''}) } else { - this.setState({key: '', setting: null, url: ''}) + this.setState({key: '', apptoken: '', setting: null, url: ''}) } this.props.onChange('') @@ -163,14 +164,15 @@ const { type } = this.props if (type !== 'develop') { - this.setState({key: ''}) + this.setState({key: '', apptoken: ''}) } this.setState({visible: false}) } render() { + const { type } = this.props const { getFieldDecorator } = this.props.form - const { url, visible, setting, key } = this.state + const { url, visible, setting, key, apptoken } = this.state return ( <div className="mk-key-wrap"> @@ -191,6 +193,9 @@ > {key && setting ? <Form> + {apptoken && type !== 'develop' ? <Form.Item style={{color: 'red'}} label="姝e紡绯荤粺appkey"> + {apptoken} + </Form.Item> : null} <Form.Item label="鎺ュ彛鍦板潃"> {getFieldDecorator('interface', { initialValue: setting.interface || 'http://******/webapi/dostars', @@ -217,7 +222,7 @@ ] })(<TextArea placeholder="http://sso.mk9h.cn/cloud/webapi/dostars" rows={2}/>)} </Form.Item> - <Form.Item label="appkey"> + <Form.Item label="鐩爣绯荤粺appkey"> {getFieldDecorator('appkey', { initialValue: setting.appkey || '', rules: [ @@ -282,7 +287,7 @@ </Form.Item> </Form> : null} {!key ? <Form style={{marginTop: '20px', marginBottom: '50px'}}> - <Form.Item label="appkey"> + <Form.Item label="姝e紡绯荤粺appkey"> {getFieldDecorator('apptoken', { initialValue: '', rules: [ diff --git a/src/components/keyInterface/index.scss b/src/components/keyInterface/index.scss index baf39c1..a68404c 100644 --- a/src/components/keyInterface/index.scss +++ b/src/components/keyInterface/index.scss @@ -43,7 +43,7 @@ .ant-form-item { display: flex; .ant-form-item-label { - width: 20%; + width: 22%; } .ant-form-item-control-wrapper { width: 70%; diff --git a/src/menu/components/card/cardcomponent/index.jsx b/src/menu/components/card/cardcomponent/index.jsx index f418268..6bd283e 100644 --- a/src/menu/components/card/cardcomponent/index.jsx +++ b/src/menu/components/card/cardcomponent/index.jsx @@ -320,7 +320,7 @@ <div className="mk-popover-control"> <PlusOutlined className="plus" title="娣诲姞鍏冪礌" onClick={this.addElement} /> <PlusSquareOutlined className="plus" title="娣诲姞鎸夐挳" onClick={this.addButton} /> - <NormalForm title="鍗$墖璁剧疆" width={950} update={this.updateSetting} getForms={this.getSettingForms}> + <NormalForm title={cards.subtype === 'datacard' && card.$cardType !== 'extendCard' ? '寰幆鍗$墖璁剧疆' : '灞炴�у崱鐗囪缃�'} width={950} update={this.updateSetting} getForms={this.getSettingForms}> <EditOutlined className="edit" title="缂栬緫"/> </NormalForm> <CopyComponent type="cardcell" card={card}/> @@ -338,7 +338,7 @@ {card.setting.type === 'multi' ? <Switch size="small" onClick={this.changeSide} defaultChecked /> : null} </div> } trigger="hover"> - <ToolOutlined /> + <ToolOutlined style={cards.subtype === 'datacard' && card.$cardType === 'extendCard' ? {color: '#26C281'} : null}/> </Popover> </div> </div> diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx index 5f23b15..46d05a9 100644 --- a/src/menu/components/card/data-card/index.jsx +++ b/src/menu/components/card/data-card/index.jsx @@ -69,7 +69,12 @@ marginLeft: '8px', marginRight: '8px', marginTop: '8px', marginBottom: '8px' }, backStyle: {}, - elements: [], + elements: [{ + uuid: Utils.getuuid(), + eleType: 'text', + datatype: 'static', + value: '寰幆鍖哄煙' + }], backElements: [], menus: [] }] -- Gitblit v1.8.0