Showing
1 changed file
with
10 additions
and
3 deletions
| @@ -60,7 +60,11 @@ export const UrlDialog: React.FC<UrlDialogProp> = (props) => { | @@ -60,7 +60,11 @@ export const UrlDialog: React.FC<UrlDialogProp> = (props) => { | ||
| 60 | </Draggable> | 60 | </Draggable> |
| 61 | )} | 61 | )} |
| 62 | > | 62 | > |
| 63 | - <iframe src={props.url} style={{ width: '100%', height: '500px' }} frameBorder="0" /> | 63 | + <iframe |
| 64 | + src={props.url} | ||
| 65 | + style={{ width: '100%', height: '500px' }} | ||
| 66 | + frameBorder="0" | ||
| 67 | + /> | ||
| 64 | </Modal> | 68 | </Modal> |
| 65 | </> | 69 | </> |
| 66 | ); | 70 | ); |
| @@ -135,7 +139,9 @@ const ButtonForm: React.FC<ButtonFormProps> = (props) => { | @@ -135,7 +139,9 @@ const ButtonForm: React.FC<ButtonFormProps> = (props) => { | ||
| 135 | setQuery(schemaItem.link); | 139 | setQuery(schemaItem.link); |
| 136 | const btnSchema = schemaItem; | 140 | const btnSchema = schemaItem; |
| 137 | const params = (btnSchema.link.params || []).map((item: any) => { | 141 | const params = (btnSchema.link.params || []).map((item: any) => { |
| 138 | - return `${item.name}=${getParaVal(item.value, record)}`; | 142 | + return `${item.name}=${encodeURIComponent( |
| 143 | + getParaVal(item.value, record), | ||
| 144 | + )}`; | ||
| 139 | }); | 145 | }); |
| 140 | if (btnSchema.type === 'URL') { | 146 | if (btnSchema.type === 'URL') { |
| 141 | //TODO,开发者模式下才有,不完善。 for 易才项目 from 史婷婷 | 147 | //TODO,开发者模式下才有,不完善。 for 易才项目 from 史婷婷 |
| @@ -144,7 +150,8 @@ const ButtonForm: React.FC<ButtonFormProps> = (props) => { | @@ -144,7 +150,8 @@ const ButtonForm: React.FC<ButtonFormProps> = (props) => { | ||
| 144 | if (_url) { | 150 | if (_url) { |
| 145 | try { | 151 | try { |
| 146 | const _urlArr = _url.split('?'); | 152 | const _urlArr = _url.split('?'); |
| 147 | - _urlArr[1] = params.join('&') + (_urlArr[1] ? '&' : '') + _urlArr[1]; | 153 | + _urlArr[1] = |
| 154 | + params.join('&') + (_urlArr[1] ? '&' : '') + _urlArr[1]; | ||
| 148 | setUrl(_urlArr.join('?')); | 155 | setUrl(_urlArr.join('?')); |
| 149 | setUrlDialogVisible(true); | 156 | setUrlDialogVisible(true); |
| 150 | } catch (e) { | 157 | } catch (e) { |