| | |
| | | if (oripassword && values.password === '*********') { |
| | | values.password = oripassword |
| | | } |
| | | |
| | | values.username = values.username.replace(/\t*|\v*|\s*/g, '') |
| | | values.password = values.password.replace(/\t*|\v*|\s*/g, '') |
| | | |
| | | resolve(values) |
| | | } else { |
| | | reject(err) |
| | |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import { getMark } from '@/utils/utils.js' |
| | | import MkIcon from '@/components/mk-icon' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import Encrypts from '@/components/encrypts' |
| | | import './index.scss' |
| | | |
| | | const { Paragraph } = Typography |
| | | const Video = asyncComponent(() => import('@/components/video')) |
| | | const MkIcon = asyncComponent(() => import('@/components/mk-icon')) |
| | | const MkPicture = asyncComponent(() => import('@/components/mkPicture')) |
| | | const CardCellComponent = asyncComponent(() => import('@/tabviews/custom/components/card/cardcellList')) |
| | | const PicRadio = { |
| | |
| | | * 含有初始不加载的页面,修改设置 |
| | | */ |
| | | refreshbysearch = (searches) => { |
| | | const { setting } = this.state |
| | | |
| | | if (setting.onload === 'false') { |
| | | this.setState({ |
| | | pageIndex: 1, |
| | | search: searches, |
| | | setting: {...setting, onload: 'true'} |
| | | }, () => { |
| | | this.loadmaindata() |
| | | this.getStatFieldsValue() |
| | | }) |
| | | } else { |
| | | this.setState({ |
| | | pageIndex: 1, |
| | | search: searches |
| | |
| | | this.loadmaindata(true, 'true') |
| | | this.getStatFieldsValue() |
| | | }) |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | pageIndex: 1, // 页码 |
| | | pageSize: 10, // 每页数据条数 |
| | | orderBy: '', // 排序 |
| | | search: '', // 搜索条件数组,使用时需分场景处理 |
| | | search: '' // 搜索条件数组,使用时需分场景处理 |
| | | } |
| | | |
| | | /** |
| | |
| | | }) |
| | | } |
| | | |
| | | try { |
| | | data = data.map(item => { |
| | | if (item.$$uuid === _data.$$uuid) { |
| | | _data.key = item.key |
| | |
| | | } |
| | | return item |
| | | }) |
| | | } catch (e) { |
| | | console.warn('数据查询错误') |
| | | } |
| | | |
| | | MKEmitter.emit('transferData', config.uuid, _data, 'line') |
| | | MKEmitter.emit('resetSelectLine', config.uuid, _data.$$uuid, _data) |
| | |
| | | * 含有初始不加载的页面,修改设置 |
| | | */ |
| | | refreshbysearch = (searches) => { |
| | | const { setting } = this.state |
| | | |
| | | if (setting.onload === 'false') { |
| | | this.setState({ |
| | | pageIndex: 1, |
| | | search: searches, |
| | | setting: {...setting, onload: 'true'} |
| | | }, () => { |
| | | this.loadmaindata() |
| | | }) |
| | | } else { |
| | | this.setState({ |
| | | pageIndex: 1, |
| | | search: searches |
| | | }, () => { |
| | | this.loadmaindata(true, 'true') |
| | | }) |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | import Api from '@/api' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import Utils, { getEditTableSql, getMark } from '@/utils/utils.js' |
| | | import MkIcon from '@/components/mk-icon' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import zhCN from '@/locales/zh-CN/main.js' |
| | | import enUS from '@/locales/en-US/main.js' |
| | | import CusSwitch from './cusSwitch' |
| | | import Encrypts from '@/components/encrypts' |
| | | import './index.scss' |
| | | |
| | | const { Paragraph } = Typography |
| | | const MkIcon = asyncComponent(() => import('@/components/mk-icon')) |
| | | const CardCellComponent = asyncComponent(() => import('@/tabviews/custom/components/card/cardcellList')) |
| | | |
| | | class BodyRow extends React.Component { |
| | |
| | | } |
| | | |
| | | state = { |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | edData: [], |
| | | selectedRowKeys: [], // 表格中选中行 |
| | | tableId: '', // 表格ID |
| | |
| | | |
| | | this.setState({edData: _data}) |
| | | } |
| | | MKEmitter.emit('reloadData', this.props.MenuID, item.$$uuid, item) |
| | | MKEmitter.emit('reloadData', this.props.MenuID, item.$$uuid) |
| | | } |
| | | |
| | | execSuccess = (res) => { |
| | |
| | | if (res && res.ErrCode === 'S') { // 执行成功 |
| | | notification.success({ |
| | | top: 92, |
| | | message: res.ErrMesg || this.state.dict['main.action.confirm.success'], |
| | | message: res.ErrMesg || '执行成功', |
| | | duration: submit.stime ? submit.stime : 2 |
| | | }) |
| | | } else if (res && res.ErrCode === 'Y') { // 执行成功 |
| | | Modal.success({ |
| | | title: res.ErrMesg || this.state.dict['main.action.confirm.success'] |
| | | title: res.ErrMesg || '执行成功' |
| | | }) |
| | | } else if (res && res.ErrCode === '-1') { // 完成后不提示 |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | let _footer = '' |
| | | |
| | | let height = setting.height || false |
| | | if (height && height <= 100) { |
| | | height = height + 'vh' |
| | |
| | | onChange={this.changeTable} |
| | | pagination={_pagination} |
| | | /> |
| | | {_footer ? <div className={'normal-table-footer ' + (_pagination ? 'pagination' : '')}>{_footer}</div> : null} |
| | | {_data.length > 10 ? <Button style={submit.style} onClick={() => setTimeout(() => {this.submit()}, 10)} loading={loading} className="submit-footer-table" type="link">提交</Button> : null} |
| | | </div> |
| | | </> |
| | |
| | | --mk-table-font-size: 14px; |
| | | --mk-table-font-weight: normal; |
| | | |
| | | .normal-table-footer { |
| | | padding: 10px 0px; |
| | | color: rgba(0, 0, 0, 0.65); |
| | | } |
| | | .normal-table-footer.pagination { |
| | | position: absolute; |
| | | bottom: 10px; |
| | | } |
| | | >.ant-table-wrapper { |
| | | position: relative; |
| | | z-index: 1; |
| | |
| | | * 含有初始不加载的页面,修改设置 |
| | | */ |
| | | refreshbysearch = (searches) => { |
| | | const { setting } = this.state |
| | | |
| | | if (setting.onload === 'false') { |
| | | this.setState({ |
| | | pageIndex: 1, |
| | | search: searches, |
| | | setting: {...setting, onload: 'true'} |
| | | }, () => { |
| | | this.loadmaindata() |
| | | this.getStatFieldsValue() |
| | | }) |
| | | } else { |
| | | this.setState({ |
| | | pageIndex: 1, |
| | | search: searches |
| | |
| | | this.loadmaindata(true, 'true') |
| | | this.getStatFieldsValue() |
| | | }) |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | return new Promise((resolve, reject) => { |
| | | this.props.form.validateFieldsAndScroll((err, values) => { |
| | | if (!err) { |
| | | values.cloudusername = values.cloudusername.replace(/\t*|\v*|\s*/g, '') |
| | | values.cloudpassword = values.cloudpassword.replace(/\t*|\v*|\s*/g, '') |
| | | resolve(values) |
| | | } else { |
| | | reject(err) |
| | |
| | | return new Promise((resolve, reject) => { |
| | | this.props.form.validateFieldsAndScroll((err, values) => { |
| | | if (!err) { |
| | | if (activeKey === 'uname_pwd') { |
| | | values.username = values.username.replace(/\t*|\v*|\s*/g, '') |
| | | values.password = values.password.replace(/\t*|\v*|\s*/g, '') |
| | | } else if (activeKey === 'sms_vcode') { |
| | | values.phone = values.phone.replace(/\t*|\v*|\s*/g, '') |
| | | values.vercode = values.vercode.replace(/\t*|\v*|\s*/g, '') |
| | | } |
| | | resolve({type: activeKey, ...values}) |
| | | } else { |
| | | reject(err) |