From 6afb82b92c7de7a3d5551e721b4c8de39bd7de9d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 30 十二月 2022 13:25:28 +0800 Subject: [PATCH] 2022-12-30 --- public/options.json | 10 ++-- src/components/keyInterface/index.jsx | 8 ++-- src/tabviews/custom/components/module/voucher/voucherTable/index.jsx | 3 + src/tabviews/custom/components/iframe/index.scss | 23 +++++++++++ src/mob/mobshell/index.jsx | 1 src/tabviews/custom/components/iframe/index.jsx | 37 +++++++++++------- src/pc/menushell/index.jsx | 3 + 7 files changed, 60 insertions(+), 25 deletions(-) diff --git a/public/options.json b/public/options.json index bedcbee..4e405d0 100644 --- a/public/options.json +++ b/public/options.json @@ -1,12 +1,12 @@ { - "appId": "202108312122504607B107A83F55B40C98CCF", - "appkey": "20210831212235413F287EC3BF489424496C8", + "appId": "201912040924165801464FF1788654BC5AC73", + "appkey": "20191106103859640976D6E924E464D029CF0", "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars", "systemType": "", "externalDatabase": "", "lineColor": "", "filter": "false", - "defaultApp": "mkindustry", + "defaultApp": "mk", "defaultLang": "zh-CN", "WXAppID": "", "WXminiAppID": "", @@ -17,6 +17,6 @@ "transfer": "false", "keepPassword": "true", "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], - "host": "http://demo.mk9h.cn", - "service": "erp_new/" + "host": "http://qingqiumarket.cn", + "service": "MKWMS/" } \ No newline at end of file diff --git a/src/components/keyInterface/index.jsx b/src/components/keyInterface/index.jsx index 517b091..11a459d 100644 --- a/src/components/keyInterface/index.jsx +++ b/src/components/keyInterface/index.jsx @@ -57,7 +57,7 @@ } } - this.setState({visible: true, setting: _setting || {}}) + this.setState({visible: true, setting: _setting || {ssoInterface: 'http://sso.mk9h.cn/cloud/webapi/dostars'}}) } decrypt = (token, value) => { @@ -193,7 +193,7 @@ <Form> <Form.Item label="鎺ュ彛鍦板潃"> {getFieldDecorator('interface', { - initialValue: setting.interface, + initialValue: setting.interface || 'http://******/webapi/dostars', rules: [ { required: true, @@ -204,7 +204,7 @@ message: '鍙彲浣跨敤鑻辨枃銆佹暟瀛椾互鍙�:_./' } ] - })(<TextArea rows={2}/>)} + })(<TextArea placeholder="http://******/webapi/dostars" rows={2}/>)} </Form.Item> <Form.Item label="sso鍦板潃"> {getFieldDecorator('ssoInterface', { @@ -215,7 +215,7 @@ message: '鍙彲浣跨敤鑻辨枃銆佹暟瀛椾互鍙�:_./' } ] - })(<TextArea rows={2}/>)} + })(<TextArea placeholder="http://sso.mk9h.cn/cloud/webapi/dostars" rows={2}/>)} </Form.Item> <Form.Item label="appkey"> {getFieldDecorator('appkey', { diff --git a/src/mob/mobshell/index.jsx b/src/mob/mobshell/index.jsx index 028e209..0063894 100644 --- a/src/mob/mobshell/index.jsx +++ b/src/mob/mobshell/index.jsx @@ -143,6 +143,7 @@ timeline: '鏃堕棿杞�', officialAccount: '鍏虫敞鍏紬鍙�', sharecode: '鍒嗕韩鐮�', + iframe: 'iframe', login: '鐧诲綍' } let i = 1 diff --git a/src/pc/menushell/index.jsx b/src/pc/menushell/index.jsx index 64d7e2f..3bd54a3 100644 --- a/src/pc/menushell/index.jsx +++ b/src/pc/menushell/index.jsx @@ -114,7 +114,8 @@ balcony: '娴姩鍗�', timeline: '鏃堕棿杞�', antvG6: '鏍戝浘', - login: '鐧诲綍' + login: '鐧诲綍', + iframe: 'iframe' } let i = 1 diff --git a/src/tabviews/custom/components/iframe/index.jsx b/src/tabviews/custom/components/iframe/index.jsx index 22e48c4..62981a9 100644 --- a/src/tabviews/custom/components/iframe/index.jsx +++ b/src/tabviews/custom/components/iframe/index.jsx @@ -1,7 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Input, Modal, notification, Empty } from 'antd' +import { Input, Modal, notification, Empty, Spin } from 'antd' import Api from '@/api' import UtilsDM from '@/utils/utils-datamanage.js' @@ -192,13 +192,9 @@ this.setState({ linkUrl: _data[config.wrap.linkField] || '', - data: _data, - loading: false + data: _data }) } else { - this.setState({ - loading: false - }) if (result.ErrCode === 'N') { Modal.error({ title: result.message, @@ -224,30 +220,43 @@ } if (submit) { - this.setState({linkUrl: val}, () => { - let node = document.getElementById(this.state.config.uuid) - node && node.select && node.select() + this.setState({linkUrl: '', loading: true}, () => { + this.setState({linkUrl: val}) }) + + setTimeout(() => { + this.setState({loading: false}, () => { + let node = document.getElementById(this.state.config.uuid) + node && node.select && node.select() + }) + }, 500) } } enterUrl = (val) => { - this.setState({linkUrl: val}, () => { - let node = document.getElementById(this.state.config.uuid) - node && node.select && node.select() + this.setState({linkUrl: '', loading: true}, () => { + this.setState({linkUrl: val}) }) + + setTimeout(() => { + this.setState({loading: false}, () => { + let node = document.getElementById(this.state.config.uuid) + node && node.select && node.select() + }) + }, 500) } render() { - const { config, linkUrl } = this.state + const { config, linkUrl, loading } = this.state return ( <div className="menu-iframe-box" style={config.style}> {config.wrap.title || config.wrap.linkType === 'input' ? <div className="iframe-header" style={config.headerStyle}> <span className="title">{config.wrap.title}</span> - {config.wrap.linkType === 'input' ? <Search id={config.uuid} placeholder="璇疯緭鍏ュ湴鍧�" onChange={this.inputUrl} onSearch={this.enterUrl} enterButton="纭畾"/> : null} + {config.wrap.linkType === 'input' ? <Search id={config.uuid} disabled={loading} placeholder="璇疯緭鍏ュ湴鍧�" onChange={this.inputUrl} onSearch={this.enterUrl} enterButton="纭畾"/> : null} </div> : null} <div className="iframe-wrap" style={{height: config.wrap.height}}> + {loading ? <div className="mask"><Spin size="large" /></div> : null} {linkUrl ? <iframe title="mk" className="iframe" src={linkUrl} frameBorder="0"></iframe> : <Empty description={false}/>} </div> </div> diff --git a/src/tabviews/custom/components/iframe/index.scss b/src/tabviews/custom/components/iframe/index.scss index 88f3569..3e97448 100644 --- a/src/tabviews/custom/components/iframe/index.scss +++ b/src/tabviews/custom/components/iframe/index.scss @@ -35,6 +35,13 @@ margin-top: 5px; width: 65%; float: right; + + .ant-btn[disabled] { + background-color: var(--mk-sys-color)!important; + border-color: var(--mk-sys-color)!important; + color: #ffffff!important; + opacity: 0.5; + } } } @@ -56,5 +63,21 @@ vertical-align: top; margin-top: 0px; } + + .mask { + position: absolute; + width: 100%; + height: 100%; + left: 0px; + top: 0px; + background: #ffffff; + z-index: 1; + + .ant-spin { + position: absolute; + left: calc(50% - 16px); + top: calc(50% - 16px); + } + } } } diff --git a/src/tabviews/custom/components/module/voucher/voucherTable/index.jsx b/src/tabviews/custom/components/module/voucher/voucherTable/index.jsx index c7d0383..2bcbd81 100644 --- a/src/tabviews/custom/components/module/voucher/voucherTable/index.jsx +++ b/src/tabviews/custom/components/module/voucher/voucherTable/index.jsx @@ -146,9 +146,10 @@ filterOption={(input, option) => option.props.children.indexOf(input) > -1} onSelect={this.complete} defaultValue={val} + onChange={(val) => this.onChange(val)} defaultOpen={true} > - <Input.TextArea id={col.uuid + record.uuid} autoSize={false} defaultValue={val} onChange={(e) => this.onChange(e.target.value)} onPressEnter={this.enterPress} onBlur={this.onBlur}/> + <Input.TextArea id={col.uuid + record.uuid} autoSize={false} defaultValue={val} onPressEnter={this.enterPress} onBlur={this.onBlur}/> </AutoComplete> } else { children = <div className="content-wrap" onClick={this.focus}>{val}</div> -- Gitblit v1.8.0