| | |
| | | <Modal |
| | | title="按钮·编辑" |
| | | visible={actvisible} |
| | | width={800} |
| | | width={850} |
| | | maskClosable={false} |
| | | onCancel={this.editModalCancel} |
| | | footer={[ |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Form, Row, Col, Input, Select, Radio, Tooltip, InputNumber, Cascader, Checkbox } from 'antd' |
| | | import { Form, Row, Col, Input, Select, Radio, Tooltip, InputNumber, Cascader, Checkbox, Typography } from 'antd' |
| | | import { QuestionCircleOutlined } from '@ant-design/icons' |
| | | import { formRule } from '@/utils/option.js' |
| | | |
| | |
| | | import './index.scss' |
| | | |
| | | const { TextArea } = Input |
| | | const { Paragraph } = Typography |
| | | const MkEditIcon = asyncComponent(() => import('@/components/mkIcon')) |
| | | const acTyOptions = { |
| | | pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hidden'], |
| | |
| | | </Col> |
| | | ) |
| | | }) |
| | | |
| | | if (window.debugger && this.props.card.uuid) { |
| | | fields.push( |
| | | <Col span={12} key="uuid"> |
| | | <Form.Item label="按钮ID"> |
| | | <Paragraph copyable>{this.props.card.uuid}</Paragraph> |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } |
| | | |
| | | return fields |
| | | } |
| | | |
| | |
| | | .menu-action-list-form { |
| | | min-height: 190px; |
| | | >.ant-row >.ant-col { |
| | | display: inline-block; |
| | | float: none; |
| | | vertical-align: top; |
| | | } |
| | | .superconfig { |
| | | color: #1890ff; |
| | | cursor: pointer; |
| | |
| | | this.setState({ |
| | | visible: true, |
| | | card: card, |
| | | formlist: getSearchForm(card, linkableFields) |
| | | formlist: getSearchForm(card, linkableFields, [], 'header') |
| | | }) |
| | | } |
| | | |
| | |
| | | res.fontSize = card.wrap.fontSize |
| | | res.fontWeight = card.wrap.fontWeight |
| | | |
| | | res.show = card.wrap.show || 'true' |
| | | res.advanceType = card.wrap.advanceType || 'modal' |
| | | res.advanceWidth = card.wrap.advanceWidth || 1000 |
| | | res.drawerPlacement = card.wrap.drawerPlacement || 'right' |
| | | res.searchRatio = card.wrap.searchRatio || 6 |
| | | res.searchLwidth = card.wrap.searchLwidth !== undefined ? card.wrap.searchLwidth : 33.3 |
| | | |
| | | let _card = {...card, wrap: res} |
| | | |
| | | if (res.tableType) { |
| | |
| | | res.fontSize = card.wrap.fontSize |
| | | res.fontWeight = card.wrap.fontWeight |
| | | |
| | | res.show = card.wrap.show || 'true' |
| | | res.advanceType = card.wrap.advanceType || 'modal' |
| | | res.advanceWidth = card.wrap.advanceWidth || 1000 |
| | | res.drawerPlacement = card.wrap.drawerPlacement || 'right' |
| | | res.searchRatio = card.wrap.searchRatio || 6 |
| | | res.searchLwidth = card.wrap.searchLwidth !== undefined ? card.wrap.searchLwidth : 33.3 |
| | | |
| | | this.updateComponent({...card, wrap: res}) |
| | | } |
| | | |
| | |
| | | let hasReqFields = false |
| | | |
| | | let forbid = false // header中不设置高级搜索 |
| | | let _setting = {showAdv: false} |
| | | let _setting = {showAdv: false, show: false} |
| | | |
| | | if (setting) { |
| | | _setting.show = setting.show !== 'false' |
| | |
| | | _setting.ratio = setting.searchRatio || 6 |
| | | _setting.labelwidth = setting.searchLwidth !== undefined ? setting.searchLwidth : 33.3 |
| | | _setting.style = null |
| | | } else if (config && config.wrap) { |
| | | _setting.show = config.wrap.show !== 'false' |
| | | _setting.advanceType = config.wrap.advanceType || 'modal' |
| | | _setting.advWidth = config.wrap.advanceWidth || 1000 |
| | | _setting.placement = config.wrap.drawerPlacement || 'right' |
| | | _setting.ratio = config.wrap.searchRatio || 6 |
| | | _setting.labelwidth = config.wrap.searchLwidth !== undefined ? config.wrap.searchLwidth : 33.3 |
| | | _setting.style = null |
| | | } else if (config) { |
| | | if (config.wrap) { |
| | | _setting.show = config.wrap.show !== 'false' |
| | | _setting.advanceType = config.wrap.advanceType || 'modal' |
| | | _setting.advWidth = config.wrap.advanceWidth || 1000 |
| | | _setting.placement = config.wrap.drawerPlacement || 'right' |
| | | _setting.ratio = config.wrap.searchRatio || 6 |
| | | _setting.labelwidth = config.wrap.searchLwidth !== undefined ? config.wrap.searchLwidth : 33.3 |
| | | _setting.style = null |
| | | } |
| | | |
| | | if (config.type === 'search') { |
| | | _setting.float = config.wrap.float || 'left' |
| | |
| | | </Modal> : null} |
| | | {setting.advanceType === 'drawer' ? <Drawer |
| | | title="高级搜索" |
| | | className="mk-search-drawer" |
| | | width={setting.advWidth} |
| | | height={setting.advHeight} |
| | | maskClosable={false} |
| | |
| | | text-align: right; |
| | | } |
| | | } |
| | | .mk-search-drawer { |
| | | .ant-drawer-wrapper-body { |
| | | position: relative; |
| | | } |
| | | .ant-drawer-header { |
| | | position: absolute; |
| | | top: 0; |
| | | width: 100%; |
| | | } |
| | | .ant-drawer-body { |
| | | padding-bottom: 50px; |
| | | position: relative; |
| | | min-height: calc(100% - 60px); |
| | | margin-top: 55px; |
| | | .advance-button { |
| | | background: #ffffff; |
| | | } |
| | | .advance-search { |
| | | margin-bottom: 15px; |
| | | } |
| | | } |
| | | } |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Form, Row, Col, Input, Select, Radio, Tooltip, InputNumber, Cascader } from 'antd' |
| | | import { Form, Row, Col, Input, Select, Radio, Tooltip, InputNumber, Cascader, Typography } from 'antd' |
| | | import { QuestionCircleOutlined } from '@ant-design/icons' |
| | | |
| | | import { formRule } from '@/utils/option.js' |
| | |
| | | const MkEditIcon = asyncComponent(() => import('@/components/mkIcon')) |
| | | |
| | | const { TextArea } = Input |
| | | const { Paragraph } = Typography |
| | | const actionTypeOptions = { |
| | | pop: ['label', 'position', 'OpenType', 'intertype', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'openmenu', 'output', 'tipTitle', 'hidden'], |
| | | prompt: ['label', 'position', 'OpenType', 'intertype', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'openmenu', 'output', 'tipTitle', 'hidden'], |
| | |
| | | </Col> |
| | | ) |
| | | }) |
| | | |
| | | if (window.debugger && this.props.card.uuid) { |
| | | fields.push( |
| | | <Col span={12} key="uuid"> |
| | | <Form.Item label="按钮ID"> |
| | | <Paragraph copyable>{this.props.card.uuid}</Paragraph> |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } |
| | | return fields |
| | | } |
| | | |
| | |
| | | this.setState({ |
| | | setVisible: false |
| | | }) |
| | | this.props.updatesearch({...config, setting: {...config.setting, ...res}}) |
| | | |
| | | let _config = null |
| | | |
| | | if (config.wrap) { // 自定义页面table |
| | | _config = {...config, wrap: {...config.wrap, ...res}} |
| | | } else { |
| | | _config = {...config, setting: {...config.setting, ...res}} |
| | | } |
| | | |
| | | this.props.updatesearch(_config) |
| | | }) |
| | | } |
| | | |
| | |
| | | * @param {object} card // 搜索条件对象 |
| | | * @param {Array} linkableFields // 可关联字段 |
| | | */ |
| | | export function getSearchForm (card, linkableFields, columns) { |
| | | export function getSearchForm (card, linkableFields, columns, position) { |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | | let appType = sessionStorage.getItem('appType') |
| | | if (roleList) { |
| | |
| | | label: '高级搜索', |
| | | initVal: card.advanced || 'false', |
| | | tooltip: '在高级搜索以模态框或抽屉展开时,搜索条件在开发界面占比为6,实际效果请在运行时查看。', |
| | | forbid: appType === 'mob', |
| | | forbid: appType === 'mob' || position === 'header', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |