| | |
| | | login_id_address: ipAddress |
| | | } |
| | | |
| | | // Type: 'S' 时 |
| | | let shaObj = new jsSHA('SHA-1', 'TEXT') |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | |
| | | let sys_datetime = sessionStorage.getItem('sys_datetime') |
| | |
| | | param.timestamp = moment(sys_datetime, 'YYYY-MM-DD HH:mm:ss').add(seconds, 'seconds').format('YYYY-MM-DD HH:mm:ss') |
| | | } |
| | | |
| | | // Type: 'S' 时 |
| | | let shaObj = new jsSHA('SHA-1', 'TEXT') |
| | | shaObj.update(password) |
| | | param.Password = shaObj.getHash('HEX').toUpperCase() |
| | | param.Password = md5(username + param.Password + param.timestamp) |
| | | |
| | | // Type: 'mk_' 时 |
| | | // param.Type = '公钥' |
| | | // let shaObj = new jsSHA('SHA-1', 'TEXT') |
| | | // shaObj.update(password) |
| | | // param.Password = shaObj.getHash('HEX').toUpperCase() |
| | | // param.Password = md5('私钥' + username + param.Password + param.timestamp) |
| | | |
| | | // Type: 'X' 时 |
| | | // param.Password = Utils.formatOptions(password) |
| | | |
| | | param.appkey = window.GLOB.appkey || '' |
| | | let url = '/webapi/dologon' |
| | | |
| | |
| | | state = { |
| | | selectIcon: '', |
| | | allowClear: false, |
| | | icons: [...minkeIconSystem.normal, ...minkeIconSystem.trademark, ...minkeIconSystem.data, ...minkeIconSystem.edit, ...minkeIconSystem.hint, ...minkeIconSystem.direction], |
| | | icons: [...minkeIconSystem.direction, ...minkeIconSystem.edit, ...minkeIconSystem.normal, ...minkeIconSystem.trademark, ...minkeIconSystem.data, ...minkeIconSystem.hint], |
| | | visible: false |
| | | } |
| | | |
| | |
| | | background: #efefef; |
| | | border-radius: 50%; |
| | | color: #757575; |
| | | padding: 2px; |
| | | font-size: 13px; |
| | | padding: 3px; |
| | | font-size: 10px; |
| | | opacity: 0; |
| | | transition: opacity 0.3s; |
| | | } |
| | |
| | | */ |
| | | |
| | | export function getActionForm (card, functip, tableName, usefulFields, modules) { |
| | | const isApp = sessionStorage.getItem('appType') === 'pc' |
| | | const appType = sessionStorage.getItem('appType') |
| | | let _type = '提交' |
| | | if (card.type === 'prev') { |
| | | _type = '上一步' |
| | |
| | | } |
| | | |
| | | let menulist = [] |
| | | if (isApp) { |
| | | if (appType === 'pc' || appType === 'mob') { |
| | | menulist = sessionStorage.getItem('appMenus') |
| | | if (menulist) { |
| | | try { |
| | |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: isApp ? 'select' : 'cascader', |
| | | type: (appType === 'pc' || appType === 'mob') ? 'select' : 'cascader', |
| | | key: 'linkmenu', |
| | | label: '打开菜单', |
| | | tooltip: '执行成功后需要打开的菜单。', |
| | |
| | | label: '打开方式', |
| | | initVal: card.open || 'blank', |
| | | required: false, |
| | | forbid: !isApp, |
| | | forbid: appType !== 'pc', |
| | | options: [{ |
| | | value: 'blank', |
| | | text: '新窗口' |
| | |
| | | const { MonthPicker, WeekPicker, RangePicker } = DatePicker |
| | | const { Search } = Input |
| | | const CheckCard = asyncComponent(() => import('@/templates/modalconfig/checkCard')) |
| | | const appType = sessionStorage.getItem('appType') |
| | | |
| | | const Card = ({ id, card, showField, moveCard, copyCard, findCard, editCard, delCard }) => { |
| | | const originalIndex = findCard(id).index |
| | |
| | | } |
| | | } else if (card.type === 'multiselect' || card.type === 'select' || card.type === 'link') { |
| | | formItem = (<Select value={_defaultValue}></Select>) |
| | | } else if (card.type === 'date' && appType === 'mob') { |
| | | formItem = (<div className="mob-list-item">{card.initval ? moment().subtract(card.initval, 'days').format('YYYY-MM-DD') : '请选择'}<Icon type="right" /></div>) |
| | | } else if (card.type === 'datemonth' && appType === 'mob') { |
| | | formItem = (<div className="mob-list-item">{card.initval ? moment().subtract(card.initval, 'month').format('YYYY-MM') : '请选择'}<Icon type="right" /></div>) |
| | | } else if (card.type === 'date') { |
| | | formItem = (<Input style={{marginTop: '4px'}} placeholder={card.labelShow === 'false' ? card.label : ''} value={card.initval} />) |
| | | } else if (card.type === 'dateweek') { |
| | |
| | | <Icon className="close" title="delete" type="close" onClick={() => delCard(id)} /> |
| | | </div> |
| | | } trigger="hover"> |
| | | <div className={'page-card ' + card.labelShow} style={{ opacity: opacity}}> |
| | | <div className={'page-card ' + card.labelShow + ' ' + card.type} style={{ opacity: opacity}}> |
| | | <div ref={node => drag(drop(node))}> |
| | | <Form.Item |
| | | labelCol={{xs: { span: 24 }, sm: { span: 8 }}} |
| | |
| | | width: 24, |
| | | name: card.name, |
| | | subtype: card.subtype, |
| | | wrap: { name: card.name, width: 24, show: 'true', float: 'left' }, |
| | | wrap: { name: card.name, width: 24, show: this.state.appType === 'mob' ? 'false' : 'true', float: 'left' }, |
| | | style: { |
| | | marginLeft: '8px', marginRight: '8px', marginTop: '8px', marginBottom: '8px' |
| | | }, |
| | |
| | | .check-card-edit-box { |
| | | margin-top: 5px!important; |
| | | } |
| | | .mob-list-item { |
| | | text-align: right; |
| | | line-height: 40px; |
| | | white-space: nowrap; |
| | | padding-right: 5px; |
| | | i { |
| | | margin-left: 5px; |
| | | } |
| | | } |
| | | } |
| | | .main-search-edit-list:not(.right) { |
| | | .pre-action { |
| | |
| | | } |
| | | |
| | | state = { |
| | | roleList: [] |
| | | roleList: [], |
| | | appType: sessionStorage.getItem('appType') |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | |
| | | render() { |
| | | const { wrap } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { roleList } = this.state |
| | | const { roleList, appType } = this.state |
| | | |
| | | const formItemLayout = { |
| | | labelCol: { |
| | |
| | | })(<InputNumber min={1} max={24} precision={0} onPressEnter={this.handleSubmit}/>)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | {appType !== 'mob' ? <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="高级搜索弹窗的宽度,注:当宽度值小于100时表示占窗口的百分比,大于100时表示宽度的绝对值。"> |
| | | <Icon type="question-circle" /> |
| | |
| | | initialValue: wrap.advanceWidth || 1000 |
| | | })(<InputNumber min={10} max={3000} precision={0}/>)} |
| | | </Form.Item> |
| | | </Col> |
| | | </Col> : null} |
| | | <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="右对齐时,隐藏搜索按钮。"> |
| | |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Form, Row, Col, Input, Select, Icon, Radio, notification, Tooltip, InputNumber, Cascader } from 'antd' |
| | | import { btnIcons, btnCustomClasses, formRule } from '@/utils/option.js' |
| | | import { btnCustomClasses, formRule } from '@/utils/option.js' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import './index.scss' |
| | | |
| | | const { TextArea } = Input |
| | | const MkIcon = asyncComponent(() => import('@/components/mkIcon')) |
| | | const actionTypeOptions = { |
| | | pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width'], |
| | | prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width'], |
| | | exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width'], |
| | | pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width', 'openmenu', 'open'], |
| | | prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width', 'openmenu', 'open'], |
| | | exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width', 'openmenu', 'open'], |
| | | excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width'], |
| | | excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'execSuccess', 'execError', 'syncComponent', 'resetPageIndex', 'pagination', 'search', 'width'], |
| | | popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'popClose', 'resetPageIndex', 'width'], |
| | |
| | | } else if (item.key === 'intertype') { |
| | | let iscustom = ['pop', 'prompt', 'exec'].includes(_opentype) |
| | | item.options = this.state.interTypeOptions.filter(op => (iscustom || op.value !== 'custom')) |
| | | } else if (item.key === 'icon') { |
| | | item.options = btnIcons |
| | | } else if (item.key === 'Ot') { |
| | | if (type === 'card') { |
| | | item.options = this.state.requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value)) |
| | |
| | | > |
| | | {item.options.map((option, index) => |
| | | <Select.Option id={index} key={option.value || option.field} value={option.value || option.field}> |
| | | {item.key === 'icon' && option.value ? <Icon type={option.value} /> : ''} {option.text || option.label} |
| | | {option.text || option.label} |
| | | </Select.Option> |
| | | )} |
| | | </Select> |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'icon') { // 多选 |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Form.Item label={item.label}> |
| | | {getFieldDecorator(item.key, { |
| | | initialValue: item.initVal, |
| | | rules: [ |
| | | { |
| | | required: !!item.required, |
| | | message: this.props.dict['form.required.select'] + item.label + '!' |
| | | } |
| | | ] |
| | | })( |
| | | <MkIcon allowClear/> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'mcascader') { |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | |
| | | * @param {*} type 按钮类型,用于区分可选的打开方式 |
| | | */ |
| | | export function getActionForm (card, functip, config, usefulFields, type, menulist = [], modules = []) { |
| | | let appType = sessionStorage.getItem('appType') |
| | | let setting = config.setting || {} |
| | | let columns = config.columns || [] |
| | | let appMenus = [] |
| | |
| | | { value: 'pay', text: Formdict['model.pay'] }, |
| | | { value: 'custom', text: Formdict['header.form.custom'] } |
| | | ] |
| | | const isApp = ['pc', 'mob'].includes(sessionStorage.getItem('appType')) |
| | | const isApp = ['pc', 'mob'].includes(appType) |
| | | |
| | | let funTypes = [ |
| | | { value: 'changeuser', text: Formdict['header.form.func.changeuser'] }, |
| | |
| | | options: pageTemps |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'open', |
| | | label: '链接方式', |
| | | initVal: card.open || 'blank', |
| | | required: true, |
| | | forbid: sessionStorage.getItem('appType') !== 'pc', |
| | | options: [{ |
| | | value: 'blank', |
| | | text: '新窗口' |
| | | }, { |
| | | value: 'self', |
| | | text: '当前窗口' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'linkmenu', |
| | | label: '关联菜单', |
| | | initVal: card.linkmenu || '', |
| | | required: true, |
| | | forbid: !isApp, |
| | | options: appMenus |
| | | }, |
| | | // { |
| | |
| | | text: '图标' |
| | | }, { |
| | | value: 'button', |
| | | text: '按钮' |
| | | text: '图标+文字' |
| | | }, { |
| | | value: 'link', |
| | | text: '链接' |
| | | text: '文字+图标' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | label: "滑动显示", |
| | | initVal: card.swipe || 'false', |
| | | required: false, |
| | | forbid: (type !== 'datacard' || sessionStorage.getItem('appType') !== 'mob'), |
| | | forbid: (type !== 'datacard' || appType !== 'mob'), |
| | | options: [{ |
| | | value: 'false', |
| | | text: '否' |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | type: 'icon', |
| | | key: 'icon', |
| | | label: Formdict['model.icon'], |
| | | initVal: card.icon, |
| | |
| | | key: 'class', |
| | | label: Formdict['model.form.color'], |
| | | initVal: card.class, |
| | | tooltip: '此颜色为按钮初始化颜色,可在样式调整中修改。', |
| | | required: false, |
| | | options: [] |
| | | }, |
| | |
| | | tooltip: '禁用控制字段,可根据数据控制按钮是否禁用。', |
| | | initVal: card.controlField || '', |
| | | required: false, |
| | | // forbid: card.$type !== 'tableButton', |
| | | options: [{label: '无', field: ''}, ...columns] |
| | | }, |
| | | { |
| | |
| | | label: '控制值', |
| | | tooltip: '当选择控制字段,且字段值与控制值相等时,按钮会禁用,多个值用逗号分隔。', |
| | | initVal: card.controlVal || '', |
| | | // forbid: card.$type !== 'tableButton', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'openmenu', |
| | | label: '打开菜单', |
| | | tooltip: '执行成功后需要打开的菜单。', |
| | | initVal: card.openmenu, |
| | | forbid: appType !== 'pc' && appType !== 'mob', |
| | | required: false, |
| | | options: [{value: '', text: '无'}, ...appMenus] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'open', |
| | | label: '打开方式', |
| | | initVal: card.open || 'blank', |
| | | required: true, |
| | | forbid: appType !== 'pc', |
| | | options: [{ |
| | | value: 'blank', |
| | | text: '新窗口' |
| | | }, { |
| | | value: 'self', |
| | | text: '当前窗口' |
| | | }] |
| | | } |
| | | ] |
| | | |
| | |
| | | visible: false, // 标签页控制 |
| | | triggerTime: '', // 点击时间 |
| | | calendarYear: moment().format('YYYY'), // 日历年份 |
| | | hasReqFields: false |
| | | } |
| | | |
| | | /** |
| | |
| | | config.search = Utils.initSearchVal(config.search) |
| | | |
| | | // 字段透视 |
| | | if (param && param.$searchkey) { |
| | | config.search = config.search.map(item => { |
| | | if (['text', 'select', 'link'].includes(item.type) && param.$searchkey === item.field) { |
| | | item.initval = param.$searchval |
| | | } |
| | | |
| | | return item |
| | | }) |
| | | } |
| | | let hasReqFields = false |
| | | config.search = config.search.map(item => { |
| | | if (['text', 'select', 'link'].includes(item.type) && param.$searchkey === item.field) { |
| | | item.initval = param.$searchval |
| | | } |
| | | |
| | | if (item.required) { |
| | | hasReqFields = true |
| | | } |
| | | |
| | | return item |
| | | }) |
| | | |
| | | // 数据源 |
| | | if (config.setting.interType === 'inner' && !config.setting.innerFunc) { |
| | |
| | | } |
| | | |
| | | this.setState({ |
| | | hasReqFields, |
| | | BID: param && param.$BID ? param.$BID : '', |
| | | loadingview: false, |
| | | config: config, |
| | |
| | | * @description 主表数据加载 |
| | | */ |
| | | async loadmaindata () { |
| | | const { setting, search, BID } = this.state |
| | | const { setting, search, BID, hasReqFields } = this.state |
| | | let param = '' |
| | | let requireFields = search.filter(item => item.required && item.value === '') |
| | | |
| | | if (requireFields.length > 0) { |
| | | return |
| | | if (hasReqFields) { |
| | | let requireFields = search.filter(item => item.required && item.value === '') |
| | | |
| | | if (requireFields.length > 0) { |
| | | return |
| | | } |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | |
| | | loadData = () => { |
| | | const { setting, search, BIDs, loadCustomApi, hasReqFields } = this.state |
| | | let requireFields = [] |
| | | |
| | | if (hasReqFields) { |
| | | requireFields = search.filter(item => item.required && item.value === '') |
| | | } |
| | | |
| | | this.setState({ |
| | | selectedData: [], |
| | |
| | | } |
| | | }) |
| | | |
| | | if (requireFields.length > 0) { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | return |
| | | } else if (window.GLOB.systemType === 'production' && setting.interType === 'custom' && !setting.proInterface) { |
| | | if (hasReqFields) { |
| | | let requireFields = search.filter(item => item.required && item.value === '') |
| | | |
| | | if (requireFields.length > 0) { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | return |
| | | } |
| | | } |
| | | |
| | | if (window.GLOB.systemType === 'production' && setting.interType === 'custom' && !setting.proInterface) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '未设置正式系统地址!', |
| | |
| | | |
| | | // 获取主搜索条件 |
| | | let _mainSearch = mainSearch ? fromJS(mainSearch).toJS() : [] |
| | | let isEmpty = _mainSearch.filter(item => item.required && (!item.value || item.value.length === 0)).length > 0 |
| | | let params = [] |
| | | config.components.forEach(item => { |
| | | if (item.type === 'tabs') return |
| | |
| | | if (!item.format) return |
| | | |
| | | if (item.dataName && (!item.pageable || (item.pageable && !item.setting.laypage)) && item.setting.onload === 'true' && item.setting.sync === 'true') { |
| | | if (isEmpty && item.setting.useMSearch) { |
| | | let searchlist = [] |
| | | if (item.search && item.search.length > 0) { |
| | | searchlist = Utils.initMainSearch(item.search) |
| | | } |
| | | if (item.setting.useMSearch) { |
| | | let keys = searchlist.map(item => item.key) |
| | | _mainSearch.forEach(item => { |
| | | if (!keys.includes(item.key)) { |
| | | searchlist.push(item) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | if (searchlist.filter(cell => cell.required && cell.value === '').length > 0) { |
| | | item.setting.sync = 'false' |
| | | item.setting.onload = 'false' |
| | | } else { |
| | | let searchlist = [] |
| | | if (item.search && item.search.length > 0) { |
| | | searchlist = Utils.initMainSearch(item.search) |
| | | } |
| | | |
| | | let _empty = searchlist.filter(cell => cell.required && (!cell.value || cell.value.length === 0)).length > 0 |
| | | |
| | | if (_empty) { |
| | | item.setting.sync = 'false' |
| | | item.setting.onload = 'false' |
| | | } else { |
| | | if (item.setting.useMSearch) { |
| | | let keys = searchlist.map(item => item.key) |
| | | _mainSearch.forEach(item => { |
| | | if (!keys.includes(item.key)) { |
| | | searchlist.push(item) |
| | | } |
| | | }) |
| | | } |
| | | params.push(this.getDefaultParam(item, searchlist)) |
| | | } |
| | | params.push(this.getDefaultParam(item, searchlist)) |
| | | } |
| | | } else { |
| | | item.setting.sync = 'false' |
| | |
| | | _mainSearch = fromJS(mainSearch).toJS() |
| | | } |
| | | |
| | | let isEmpty = _mainSearch.filter(item => item.required && (!item.value || item.value.length === 0)).length > 0 |
| | | |
| | | let params = [] |
| | | config.components.forEach(item => { |
| | | if (item.type === 'tabs' || item.type === 'group') return |
| | |
| | | if (!item.format) return |
| | | |
| | | if (item.dataName && (!item.pageable || (item.pageable && !item.setting.laypage)) && item.setting.onload === 'true' && item.setting.sync === 'true') { |
| | | if (isEmpty && item.setting.useMSearch) { |
| | | let searchlist = [] |
| | | if (item.search && item.search.length > 0) { |
| | | searchlist = Utils.initMainSearch(item.search) |
| | | } |
| | | if (item.setting.useMSearch) { |
| | | let keys = searchlist.map(item => item.key) |
| | | _mainSearch.forEach(item => { |
| | | if (!keys.includes(item.key)) { |
| | | searchlist.push(item) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | if (searchlist.filter(cell => cell.required && cell.value === '').length > 0) { |
| | | item.setting.sync = 'false' |
| | | item.setting.onload = 'false' |
| | | } else { |
| | | let searchlist = [] |
| | | if (item.search && item.search.length > 0) { |
| | | searchlist = Utils.initMainSearch(item.search) |
| | | } |
| | | |
| | | let _empty = searchlist.filter(cell => cell.required && (!cell.value || cell.value.length === 0)).length > 0 |
| | | |
| | | if (_empty) { |
| | | item.setting.sync = 'false' |
| | | item.setting.onload = 'false' |
| | | } else { |
| | | if (item.setting.useMSearch) { |
| | | let keys = searchlist.map(item => item.key) |
| | | _mainSearch.forEach(item => { |
| | | if (!keys.includes(item.key)) { |
| | | searchlist.push(item) |
| | | } |
| | | }) |
| | | } |
| | | params.push(this.getDefaultParam(item, searchlist)) |
| | | } |
| | | params.push(this.getDefaultParam(item, searchlist)) |
| | | } |
| | | } else { |
| | | item.setting.sync = 'false' |
| | |
| | | } else if (item.type === 'search') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <MainSearch config={item} mainSearch={mainSearch} menuType={menuType} refreshdata={this.resetSearch} /> |
| | | <MainSearch config={item} menuType={menuType} refreshdata={this.resetSearch} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'tabs') { |
| | |
| | | }) |
| | | } |
| | | |
| | | let isEmpty = mainSearch.filter(item => item.required && (!item.value || item.value.length === 0)).length > 0 |
| | | |
| | | config.components = this.formatSetting(config.components, params, mainSearch, inherit, regs, isEmpty) |
| | | config.components = this.formatSetting(config.components, params, mainSearch, inherit, regs) |
| | | |
| | | this.setState({ |
| | | BID: BID, |
| | |
| | | } |
| | | |
| | | // 格式化默认设置 |
| | | formatSetting = (components, params, mainSearch, inherit, regs, isEmpty) => { |
| | | formatSetting = (components, params, mainSearch, inherit, regs) => { |
| | | return components.map(component => { |
| | | if (component.type === 'tabs') { |
| | | component.subtabs = component.subtabs.map(tab => { |
| | |
| | | // dataName 系统生成的数据源名称 |
| | | // pageable 是否分页,组件属性,不分页的组件才可以统一查询 |
| | | if (component.floor === 1 && component.dataName && (!component.pageable || (component.pageable && !component.setting.laypage)) && component.setting.onload === 'true' && component.setting.sync === 'true') { |
| | | if (isEmpty && component.setting.useMSearch) { |
| | | let searchlist = [] |
| | | if (component.search && component.search.length > 0) { |
| | | searchlist = Utils.initMainSearch(component.search) |
| | | } |
| | | if (component.setting.useMSearch) { |
| | | let keys = searchlist.map(item => item.key) |
| | | mainSearch.forEach(item => { |
| | | if (!keys.includes(item.key)) { |
| | | searchlist.push(item) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | if (searchlist.filter(item => item.required && item.value === '').length > 0) { |
| | | component.setting.sync = 'false' |
| | | component.setting.onload = 'false' |
| | | } else { |
| | | let searchlist = [] |
| | | if (component.search && component.search.length > 0) { |
| | | searchlist = Utils.initMainSearch(component.search) |
| | | } |
| | | |
| | | let _empty = searchlist.filter(item => item.required && (!item.value || item.value.length === 0)).length > 0 |
| | | |
| | | if (_empty) { |
| | | component.setting.sync = 'false' |
| | | component.setting.onload = 'false' |
| | | } else { |
| | | if (component.setting.useMSearch) { |
| | | let keys = searchlist.map(item => item.key) |
| | | mainSearch.forEach(item => { |
| | | if (!keys.includes(item.key)) { |
| | | searchlist.push(item) |
| | | } |
| | | }) |
| | | } |
| | | params.push(this.getDefaultParam(component, searchlist)) |
| | | } |
| | | params.push(this.getDefaultParam(component, searchlist)) |
| | | } |
| | | } else if (component.floor === 1) { |
| | | component.setting.sync = 'false' |
| | |
| | | } else if (item.type === 'search') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <MainSearch config={item} data={data} BID={_bid} mainSearch={mainSearch} menuType={menuType} refreshdata={this.resetSearch} /> |
| | | <MainSearch config={item} BID={BID} menuType={menuType} refreshdata={this.resetSearch} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'tabs') { |
| | |
| | | searches = [...mainSearch, ...searches] |
| | | } |
| | | |
| | | let requireFields = [] |
| | | if (hasReqFields) { |
| | | requireFields = searches.filter(item => item.required && item.value === '') |
| | | let requireFields = searches.filter(item => item.required && item.value === '') |
| | | if (requireFields.length > 0) { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | return |
| | | } |
| | | } |
| | | |
| | | if (requireFields.length > 0) { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | return |
| | | } else if (this.props.Tab.supMenu && !BID) { // 主表ID不存在时,不查询子表 |
| | | if (this.props.Tab.supMenu && !BID) { // 主表ID不存在时,不查询子表 |
| | | this.setState({ |
| | | data: [], |
| | | selectedData: [], |
| | |
| | | searches = [...mainSearch, ...searches] |
| | | } |
| | | |
| | | let requireFields = [] |
| | | |
| | | if (hasReqFields) { |
| | | requireFields = searches.filter(item => item.required && item.value === '') |
| | | let requireFields = searches.filter(item => item.required && item.value === '') |
| | | if (requireFields.length > 0) { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | return |
| | | } |
| | | } |
| | | |
| | | if (requireFields.length > 0) { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | return |
| | | } else if (window.GLOB.systemType === 'production' && setting.interType === 'custom' && !setting.proInterface) { |
| | | if (window.GLOB.systemType === 'production' && setting.interType === 'custom' && !setting.proInterface) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '未设置正式系统地址!', |
| | |
| | | <Form.Item label="宽度(%)"> |
| | | {getFieldDecorator('width', { |
| | | initialValue: config.setting.width |
| | | })(<InputNumber min={10} max={90} precision={0} />)} |
| | | })(<InputNumber min={10} max={90} precision={0} onPressEnter={this.handleSubmit}/>)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | |
| | | key: 'advanced', |
| | | label: '高级搜索', |
| | | initVal: card.advanced || 'false', |
| | | forbid: sessionStorage.getItem('appType') === 'mob', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | |
| | | 'play-circle', |
| | | 'login', |
| | | 'logout', |
| | | 'search', |
| | | 'fullscreen', |
| | | 'fullscreen-exit' |
| | | 'fullscreen-exit', |
| | | 'download', |
| | | 'upload' |
| | | ], |
| | | hint: [ |
| | | 'question', |
| | |
| | | 'woman', |
| | | 'team', |
| | | 'poweroff', |
| | | 'search', |
| | | 'shopping-cart', |
| | | 'link' |
| | | 'link', |
| | | ] |
| | | } |
| | | |
| | |
| | | background-size: 100% 100%; |
| | | padding: 25px 13px 40px; |
| | | border-radius: 30px; |
| | | .main-search-edit-list { |
| | | .page-card > div > .ant-form-item { |
| | | display: flex; |
| | | >.ant-form-item-label { |
| | | width: 70px; |
| | | } |
| | | >.ant-form-item-control-wrapper { |
| | | flex: 1; |
| | | } |
| | | .ant-form-item-label > label::after { |
| | | content: ' '; |
| | | |
| | | } |
| | | } |
| | | .page-card.date .ant-form-item, .page-card.datemonth .ant-form-item { |
| | | // box-shadow: 0px 1px 1px #f0f0f0; |
| | | border-bottom: 1px solid #f0f0f0; |
| | | } |
| | | } |
| | | } |
| | | .menu-control { |
| | | position: fixed; |
| | |
| | | background: #959595; |
| | | padding: 50px 0px 0px; |
| | | overflow-y: auto; |
| | | .menu-shell-inner { |
| | | min-height: 100vh; |
| | | margin: 0 auto; |
| | | } |
| | | |
| | | } |
| | | .menu-body.saving { |
| | | .anticon-tool { |