Merge branch 'master' into bms
| | |
| | | const { cards, cardCell } = this.props |
| | | |
| | | if (!ids || ids.length !== 2 || ids[0] !== cards.uuid || ids[1] !== cardCell.uuid) return |
| | | if (window.GLOB.$lock) return |
| | | |
| | | window.GLOB.$lock = true |
| | | setTimeout(() => { |
| | | window.GLOB.$lock = false |
| | | }, 200) |
| | | |
| | | const { elements } = this.state |
| | | |
| | |
| | | field: 'click', |
| | | label: '点击事件', |
| | | initval: setting.click || '', |
| | | tooltip: '当选择触发按钮时,只有当卡片中只存在一个按钮时有效。', |
| | | tooltip: '当绑定点击事件时,卡片的切换功能将失效。', |
| | | required: false, |
| | | options: [ |
| | | {value: '', label: '无'}, |
| | |
| | | newcard.padding = '5px' |
| | | newcard.align = 'left' |
| | | |
| | | window.GLOB.$lock = false |
| | | |
| | | // 注册事件-添加元素 |
| | | MKEmitter.emit('cardAddElement', [cards.uuid, card.uuid], newcard) |
| | | } |
| | |
| | | field: 'pagestyle', |
| | | label: '分页风格', |
| | | initval: wrap.pagestyle || 'page', |
| | | tooltip: '数据源选择分页时有效。', |
| | | tooltip: '数据源选择分页时有效。注:滑动加载只有第一个有效', |
| | | required: false, |
| | | options: [ |
| | | {value: 'page', label: '页码'}, |
| | |
| | | {value: 'true', label: '是'}, |
| | | {value: 'false', label: '否'}, |
| | | ], |
| | | forbid: appType !== 'mob' |
| | | forbid: true // v5 不支持垂直显示 |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | } |
| | | } else if (card.type === 'daterange') { |
| | | _defaultValue = [null, null] |
| | | if (card.initval) { |
| | | if (card.initval === 'week') { |
| | | _defaultValue = [moment().startOf('week'), moment().endOf('week')] |
| | | } else if (card.initval === 'month') { |
| | | _defaultValue = [moment().startOf('month'), moment().endOf('month')] |
| | | } else if (card.initval) { |
| | | try { |
| | | let _initval = JSON.parse(card.initval) |
| | | _defaultValue = [moment().subtract(_initval[0], 'days'), moment().subtract(_initval[1], 'days')] |
| | |
| | | const { TextArea } = Input |
| | | const MkIcon = asyncComponent(() => import('@/components/mkIcon')) |
| | | const actionTypeOptions = { |
| | | pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab'], |
| | | prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab'], |
| | | exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab'], |
| | | pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'], |
| | | prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'], |
| | | exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'output', 'refreshTab', 'reload'], |
| | | excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width'], |
| | | excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'resetPageIndex', 'pagination', 'search', 'width'], |
| | | popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'popClose', 'resetPageIndex', 'width', 'display', 'ratio', 'placement'], |
| | |
| | | item.options = btnCustomClasses |
| | | } else if (item.key === 'innerFunc' && _procMode === 'inner') { |
| | | item.required = true |
| | | } else if (item.key === 'linkmenu') { |
| | | if (_opentype === 'funcbutton' && _funcType === 'scan') { |
| | | item.required = false |
| | | item.tooltip = '使用扫码登录功能或菜单跳转功能时,需选择跳转的菜单。' |
| | | } else { |
| | | item.tooltip = '' |
| | | item.required = true |
| | | } |
| | | } else if (item.key === 'intertype') { |
| | | let iscustom = ['pop', 'prompt', 'exec'].includes(_opentype) |
| | | item.options = this.state.interTypeOptions.filter(op => (iscustom || op.value !== 'custom')) |
| | |
| | | _options.push('execSuccess', 'execError') |
| | | } else if (_funcType === 'closetab') { |
| | | _options.push('refreshTab') |
| | | } else if (_funcType === 'scan') { |
| | | _options.push('linkmenu') |
| | | } else if (_funcType === 'goBack') { |
| | | _options.push('reload') |
| | | } |
| | | } else if (_opentype !== 'popview' && _opentype !== 'tab') { |
| | | if (_intertype === 'custom') { |
| | |
| | | _fieldval.sqlType = '' |
| | | } else if (item.key === 'pageTemplate') { |
| | | item.initVal = '' |
| | | } else if (item.key === 'linkmenu') { |
| | | if (value === 'funcbutton' && this.state.funcType === 'scan') { |
| | | item.required = false |
| | | item.tooltip = '使用扫码登录功能或菜单跳转功能时,需选择跳转的菜单。' |
| | | } else { |
| | | item.tooltip = '' |
| | | item.required = true |
| | | } |
| | | } |
| | | |
| | | return item |
| | |
| | | } else { |
| | | item.options = this.state.requireOptions |
| | | } |
| | | } else if (item.key === 'linkmenu') { |
| | | if (value === 'scan') { |
| | | item.required = false |
| | | item.tooltip = '使用扫码登录功能或菜单跳转功能时,需选择跳转的菜单。' |
| | | } else { |
| | | item.tooltip = '' |
| | | item.required = true |
| | | } |
| | | } |
| | | |
| | | return item |
| | |
| | | if (appType === 'mob') { |
| | | opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'innerpage', 'funcbutton'].includes(item.value)) |
| | | funTypes = [ |
| | | { value: 'scan', text: '扫码' }, |
| | | { value: 'logout', text: '退出' }, |
| | | { value: 'mkBinding', text: '开通扫码登录' }, |
| | | { value: 'mkUnBinding', text: '用户解绑' }, |
| | | { value: 'reAuth', text: '重新授权' }, |
| | | { value: 'reAuth', text: '切换系统' }, |
| | | { value: 'goBack', text: '返回' }, |
| | | ] |
| | | pageTemps = [ |
| | |
| | | text: '下侧' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'reload', |
| | | label: '返回后', |
| | | initVal: card.reload || 'false', |
| | | tooltip: '按钮成功后返回上一页面或使用功能按钮-返回功能时,返回后是否刷新数据。注:在明科云app中(应用模式为app)有效。', |
| | | forbid: appType !== 'mob', |
| | | options: [{ |
| | | value: 'false', |
| | | text: '不刷新' |
| | | }, { |
| | | value: 'true', |
| | | text: '刷新' |
| | | }] |
| | | }, |
| | | ] |
| | | |
| | | return forms |
| | |
| | | } |
| | | } else if (card.type === 'daterange') { |
| | | _defaultValue = [null, null] |
| | | if (card.initval) { |
| | | if (card.initval === 'week') { |
| | | _defaultValue = [moment().startOf('week'), moment().endOf('week')] |
| | | } else if (card.initval === 'month') { |
| | | _defaultValue = [moment().startOf('month'), moment().endOf('month')] |
| | | } else if (card.initval) { |
| | | try { |
| | | let _initval = JSON.parse(card.initval) |
| | | _defaultValue = [moment().subtract(_initval[0], 'days'), moment().subtract(_initval[1], 'days')] |
| | |
| | | font-size: 16px; |
| | | flex: 1 1; |
| | | text-align: right; |
| | | padding-right: 15px; |
| | | } |
| | | .am-input-control.left { |
| | | text-align: left; |
| | |
| | | line-height: 24px; |
| | | } |
| | | .am-list-extra { |
| | | display: none; |
| | | position: absolute; |
| | | top: 30px; |
| | | right: 10px; |
| | | } |
| | | } |
| | | } |
| | |
| | | precision: 0, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'select', |
| | | field: 'position', |
| | | label: '标签位置', |
| | | initval: setting.position || 'top', |
| | | required: true, |
| | | options: [ |
| | | {value: 'top', label: 'top'}, |
| | | {value: 'bottom', label: 'bottom'}, |
| | | {value: 'left', label: 'left'}, |
| | | {value: 'right', label: 'right'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'display', values: ['top', 'bottom']}, |
| | | ] |
| | | }, |
| | | // { |
| | | // type: 'select', |
| | | // field: 'position', |
| | | // label: '标签位置', |
| | | // initval: setting.position || 'top', |
| | | // required: true, |
| | | // options: [ |
| | | // {value: 'top', label: 'top'}, |
| | | // {value: 'bottom', label: 'bottom'}, |
| | | // {value: 'left', label: 'left'}, |
| | | // {value: 'right', label: 'right'}, |
| | | // ], |
| | | // controlFields: [ |
| | | // {field: 'display', values: ['top', 'bottom']}, |
| | | // ] |
| | | // }, |
| | | { |
| | | type: 'radio', |
| | | field: 'display', |
| | |
| | | options: [ |
| | | {value: 'true', label: '显示'}, |
| | | {value: 'false', label: '隐藏'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'reload', values: ['true']}, |
| | | ] |
| | | }, |
| | | { |
| | |
| | | required: false, |
| | | options: menulist |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'reload', |
| | | label: '返回后', |
| | | initval: wrap.reload || 'false', |
| | | tooltip: '返回后是否刷新数据。注:在明科云app中(应用模式为app)有效。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'false', |
| | | label: '不刷新' |
| | | }, { |
| | | value: 'true', |
| | | label: '刷新' |
| | | }] |
| | | }, |
| | | ] |
| | | |
| | | return topbarWrapForm |
| | |
| | | let _config = fromJS(this.state.config).toJS() |
| | | |
| | | if (list.length > _config.fields.length) { |
| | | _config.fields = list |
| | | this.setState({ |
| | | config: _config |
| | | }, () => { |
| | |
| | | <div className="mob-shell" style={{width: window.GLOB.shellWidth, height: window.GLOB.shellHeight}}> |
| | | <div className="mob-shell-inner"> |
| | | <div className="am-navbar"> |
| | | <Icon type="close" /> |
| | | <Icon type="left" /> |
| | | <div className="am-navbar-title">{config.setting.title}</div> |
| | | {config.setting.btnPosition === 'top' ? <Button className="modal-submit-top">{config.setting.btnName || '确定'}</Button> : null} |
| | | </div> |
| | | <DragElement |
| | | list={config.fields} |
| | |
| | | handleForm={this.handleForm} |
| | | closeForm={this.closeForm} |
| | | /> |
| | | <div className="modal-btns"> |
| | | {config.setting.btnPosition !== 'top' ? <div className="modal-btns"> |
| | | <Button className="modal-reset" type="default">重置</Button> |
| | | <Button className="modal-submit" type="primary">{config.setting.btnName || '确定'}</Button> |
| | | </div> |
| | | </div> : null} |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | position: relative; |
| | | border-bottom: 1px solid #f0f0f0; |
| | | margin-bottom: 10px; |
| | | .anticon-close { |
| | | .anticon-left { |
| | | position: absolute; |
| | | line-height: 45px; |
| | | font-size: 18px; |
| | | right: 10px; |
| | | left: 10px; |
| | | } |
| | | .am-navbar-title { |
| | | font-size: 16px; |
| | | text-align: center; |
| | | } |
| | | .modal-submit-top { |
| | | position: absolute; |
| | | top: 7px; |
| | | right: 5px; |
| | | color: #1890ff; |
| | | border: none; |
| | | box-shadow: none; |
| | | font-size: 16px; |
| | | } |
| | | } |
| | | .modal-btns { |
| | | display: flex; |
| | |
| | | }, |
| | | { |
| | | type: 'form', |
| | | label: CommonDict['model.form.select'], |
| | | label: '选择器', |
| | | subType: 'select', |
| | | url: '' |
| | | }, |
| | |
| | | </div>) |
| | | } else if (card.type === 'daterange') { |
| | | let value = '请选择' |
| | | if (card.initval) { |
| | | if (card.initval === 'week') { |
| | | value = [moment().startOf('week').format('YYYY-MM-DD'), moment().endOf('week').format('YYYY-MM-DD')].join(' ~ ') |
| | | } else if (card.initval === 'month') { |
| | | value = [moment().startOf('month').format('YYYY-MM-DD'), moment().endOf('month').format('YYYY-MM-DD')].join(' ~ ') |
| | | } else if (card.initval) { |
| | | try { |
| | | let _initval = JSON.parse(card.initval) |
| | | value = [moment().subtract(_initval[0], 'days').format('YYYY-MM-DD'), moment().subtract(_initval[1], 'days').format('YYYY-MM-DD')].join(' ~ ') |
| | |
| | | |
| | | this.state = { |
| | | value, |
| | | minDate: config.minDate ? moment().add(config.minDate, 'days').endOf('day') : '', |
| | | maxDate: config.maxDate ? moment().add(config.maxDate, 'days').endOf('day') : '', |
| | | mode, |
| | | format |
| | | } |
| | |
| | | this.props.onChange(val ? moment(val).format(format) : '') |
| | | } |
| | | |
| | | disabledDate = (current) => { |
| | | const { minDate, maxDate } = this.state |
| | | |
| | | if (!current || (!maxDate && !minDate)) { |
| | | return false |
| | | } |
| | | |
| | | if (!maxDate) { |
| | | return current < minDate |
| | | } else if (!minDate) { |
| | | return current > maxDate |
| | | } else { |
| | | return current < minDate || current > maxDate |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { config } = this.props |
| | | const { value, mode } = this.state |
| | | |
| | | if (mode === 'date') { |
| | | return <DatePicker defaultValue={value} disabled={config.readonly} onChange={this.onChange}/> |
| | | return <DatePicker defaultValue={value} disabledDate={this.disabledDate} disabled={config.readonly} onChange={this.onChange}/> |
| | | } else if (mode === 'month') { |
| | | return <MonthPicker defaultValue={value} disabled={config.readonly} onChange={this.onChange}/> |
| | | } else if (mode === 'datetime') { |
| | | return <DatePicker defaultValue={value} showTime disabled={config.readonly} onChange={this.onChange}/> |
| | | return <DatePicker defaultValue={value} disabledDate={this.disabledDate} showTime disabled={config.readonly} onChange={this.onChange}/> |
| | | } |
| | | } |
| | | } |
| | |
| | | value: values[item.datefield] || '', |
| | | label: item.label, |
| | | match: 'between', |
| | | required: item.required |
| | | required: item.required, |
| | | forbid: item.$forbid |
| | | }, { |
| | | type: 'group', |
| | | key: item.field, |
| | |
| | | value: val, |
| | | label: item.label, |
| | | match: item.match, |
| | | required: item.required |
| | | required: item.required, |
| | | forbid: item.$forbid |
| | | }) |
| | | } |
| | | }) |
| | |
| | | } |
| | | } else if (type === 'search' && card.type === 'daterange') { |
| | | _defaultValue = [null, null] |
| | | if (card.initval) { |
| | | if (card.initval === 'week') { |
| | | _defaultValue = [moment().startOf('week'), moment().endOf('week')] |
| | | } else if (card.initval === 'month') { |
| | | _defaultValue = [moment().startOf('month'), moment().endOf('month')] |
| | | } else if (card.initval) { |
| | | try { |
| | | let _initval = JSON.parse(card.initval) |
| | | _defaultValue = [moment().subtract(_initval[0], 'days'), moment().subtract(_initval[1], 'days')] |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={12}> |
| | | {appType !== 'mob' ? <Col span={12}> |
| | | <Form.Item label="点击空白处"> |
| | | {getFieldDecorator('clickouter', { |
| | | initialValue: config.setting.clickouter || 'unclose' |
| | |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | </Col> : null} |
| | | <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="需要通过数据源查询的选项,是否使用缓存。"> |
| | |
| | | })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {appType === 'mob' ? <Col span={12}> |
| | | <Form.Item label="按钮位置"> |
| | | {getFieldDecorator('btnPosition', { |
| | | initialValue: config.setting.btnPosition || 'bottom' |
| | | })( |
| | | <Radio.Group style={{whiteSpace: 'nowrap'}}> |
| | | <Radio value="bottom">下侧</Radio> |
| | | <Radio value="top">上侧</Radio> |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Row> |
| | | </Form> |
| | | ) |
| | |
| | | } |
| | | } else if (card.type === 'daterange') { |
| | | _defaultValue = [null, null] |
| | | if (card.initval) { |
| | | if (card.initval === 'week') { |
| | | _defaultValue = [moment().startOf('week'), moment().endOf('week')] |
| | | } else if (card.initval === 'month') { |
| | | _defaultValue = [moment().startOf('month'), moment().endOf('month')] |
| | | } else if (card.initval) { |
| | | try { |
| | | let _initval = JSON.parse(card.initval) |
| | | _defaultValue = [moment().subtract(_initval[0], 'days'), moment().subtract(_initval[1], 'days')] |
| | |
| | | ] |
| | | |
| | | const searchTypeOptions = { |
| | | text: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'inputType', 'advanced'], |
| | | select: ['label', 'field', 'resourceType', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'setAll', 'dropdown'], |
| | | multiselect: ['label', 'field', 'resourceType', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced'], |
| | | link: ['label', 'field', 'resourceType', 'initval', 'type', 'linkField', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'setAll', 'dropdown'], |
| | | date: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced'], |
| | | checkcard: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'resourceType', 'display', 'width', 'multiple', 'borderColor', 'required', 'Hide', 'labelShow', 'advanced'], |
| | | dateweek: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced'], |
| | | datemonth: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced'], |
| | | daterange: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced'], |
| | | group: ['label', 'type', 'field', 'datefield', 'initval', 'blacklist', 'ratio', 'items', 'required', 'labelShow'], |
| | | range: ['label', 'type', 'field', 'initval', 'match', 'blacklist', 'Hide', 'required', 'maxValue', 'minValue', 'step', 'labelShow'] |
| | | text: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'inputType', 'advanced', 'query'], |
| | | select: ['label', 'field', 'resourceType', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'setAll', 'dropdown', 'query'], |
| | | multiselect: ['label', 'field', 'resourceType', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'query'], |
| | | link: ['label', 'field', 'resourceType', 'initval', 'type', 'linkField', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'setAll', 'dropdown', 'query'], |
| | | date: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'query'], |
| | | checkcard: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'resourceType', 'display', 'width', 'multiple', 'borderColor', 'required', 'Hide', 'labelShow', 'advanced', 'query'], |
| | | dateweek: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'query'], |
| | | datemonth: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'query'], |
| | | daterange: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'required', 'Hide', 'labelShow', 'advanced', 'query'], |
| | | group: ['label', 'type', 'field', 'datefield', 'initval', 'blacklist', 'ratio', 'items', 'required', 'labelShow', 'query'], |
| | | range: ['label', 'type', 'field', 'initval', 'match', 'blacklist', 'Hide', 'required', 'maxValue', 'minValue', 'step', 'labelShow', 'query'] |
| | | } |
| | | |
| | | class MainSearch extends Component { |
| | |
| | | text: Formdict['model.false'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'query', |
| | | label: '参与查询', |
| | | initVal: card.query || 'true', |
| | | tooltip: '是否作为 where 条件,参与数据查询。', |
| | | options: [{ |
| | | value: 'true', |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: '否' |
| | | }] |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // key: 'transfer', |
| | |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'minDate', |
| | | label: '最小值', |
| | | initVal: card.minDate || '', |
| | | required: false, |
| | | options: [{ |
| | | value: '', |
| | | text: '无' |
| | | }, { |
| | | value: '0', |
| | | text: '当天' |
| | | }, { |
| | | value: '-1', |
| | | text: '前一天' |
| | | }, { |
| | | value: '-2', |
| | | text: '前两天' |
| | | }, { |
| | | value: '-3', |
| | | text: '前三天' |
| | | }, { |
| | | value: '-7', |
| | | text: '前七天' |
| | | }, { |
| | | value: '-30', |
| | | text: '前30天' |
| | | }, { |
| | | value: '-90', |
| | | text: '前90天' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'maxDate', |
| | | label: '最大值', |
| | | initVal: card.maxDate || '', |
| | | required: false, |
| | | options: [{ |
| | | value: '', |
| | | text: '无' |
| | | }, { |
| | | value: '0', |
| | | text: '当天' |
| | | }, { |
| | | value: '1', |
| | | text: '后一天' |
| | | }, { |
| | | value: '2', |
| | | text: '后两天' |
| | | }, { |
| | | value: '3', |
| | | text: '后三天' |
| | | }, { |
| | | value: '7', |
| | | text: '后七天' |
| | | }, { |
| | | value: '30', |
| | | text: '后30天' |
| | | }, { |
| | | value: '90', |
| | | text: '后90天' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'fieldlength', |
| | | min: 1, |
| | |
| | | key: 'place', |
| | | label: '排列', |
| | | initVal: card.place || 'left_right', |
| | | tooltip: '提示文字与输入框的位置关系。注:上下排列是会禁用扫码功能。', |
| | | tooltip: '提示文字与输入框的位置关系。', |
| | | forbid: appType !== 'mob', |
| | | options: [{ |
| | | value: 'left_right', |
| | |
| | | link: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkField', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom'], |
| | | fileupload: ['readonly', 'required', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'compress', 'splitline', 'marginTop', 'marginBottom'], |
| | | switch: ['initval', 'openVal', 'closeVal', 'openText', 'closeText', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom'], |
| | | date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom'], |
| | | date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom', 'minDate', 'maxDate'], |
| | | datemonth: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'splitline', 'marginTop', 'marginBottom'], |
| | | datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom'], |
| | | datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom', 'minDate', 'maxDate'], |
| | | textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'span', 'labelwidth', 'maxRows', 'encryption', 'interception', 'tooltip', 'extra', 'count', 'placeholder', 'marginTop', 'marginBottom'], |
| | | color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom'], |
| | | hint: ['label', 'type', 'blacklist', 'message', 'span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], |
| | |
| | | {value: '[30, -30]', text: '前后30天'}, |
| | | {value: '[90, -90]', text: '前后90天'}, |
| | | {value: '[-1, -1]', text: '明天'}, |
| | | {value: '[-2, -2]', text: '后天'} |
| | | {value: '[-2, -2]', text: '后天'}, |
| | | {value: 'week', text: '本周'}, |
| | | {value: 'month', text: '本月'}, |
| | | ], |
| | | datetime: [ |
| | | {value: '', text: _dict['model.empty']}, |
| | |
| | | 'up', |
| | | 'left', |
| | | 'right', |
| | | 'caret-up', |
| | | 'caret-down', |
| | | 'caret-left', |
| | | 'caret-right', |
| | | // 'caret-up', |
| | | // 'caret-down', |
| | | // 'caret-left', |
| | | // 'caret-right', |
| | | 'step-backward', |
| | | 'step-forward', |
| | | 'fast-backward', |
| | | 'fast-forward', |
| | | // 'fast-backward', |
| | | // 'fast-forward', |
| | | 'double-right', |
| | | 'double-left', |
| | | 'forward', |
| | | 'backward', |
| | | // 'forward', |
| | | // 'backward', |
| | | 'rollback', |
| | | 'enter', |
| | | 'retweet', |
| | | 'swap', |
| | | 'swap-left', |
| | | 'swap-right', |
| | | // 'swap-left', |
| | | // 'swap-right', |
| | | 'play-circle', |
| | | 'login', |
| | | 'logout', |
| | |
| | | 'audio', |
| | | 'bank', |
| | | 'bell', |
| | | 'scan', |
| | | 'bug', |
| | | 'calendar', |
| | | 'camera', |
| | |
| | | item.hidden = item.Hide === 'true' |
| | | item.required = !item.hidden && item.required === 'true' |
| | | item.advanced = item.advanced === 'true' |
| | | item.$forbid = item.query === 'false' |
| | | |
| | | if (item.type === 'date') { // 时间搜索 |
| | | item.initval = item.initval ? moment().subtract(item.initval, 'days').format('YYYY-MM-DD') : '' |
| | |
| | | } else if (item.type === 'dateweek') { |
| | | item.initval = item.initval ? moment().subtract(item.initval * 7, 'days').format('YYYY-MM-DD') : '' |
| | | } else if (item.type === 'daterange') { |
| | | if (item.initval) { |
| | | if (item.initval === 'week') { |
| | | item.initval = [moment().startOf('week').format('YYYY-MM-DD'), moment().endOf('week').format('YYYY-MM-DD')].join(',') |
| | | } else if (item.initval === 'month') { |
| | | item.initval = [moment().startOf('month').format('YYYY-MM-DD'), moment().endOf('month').format('YYYY-MM-DD')].join(',') |
| | | } else if (item.initval) { |
| | | try { |
| | | let _initval = JSON.parse(item.initval) |
| | | let _vals = [moment().subtract(_initval[0], 'days').format('YYYY-MM-DD'), moment().subtract(_initval[1], 'days').format('YYYY-MM-DD')] |
| | |
| | | type: cell.type, |
| | | label: cell.label, |
| | | value: cell.initval, |
| | | required: cell.required |
| | | required: cell.required, |
| | | forbid: cell.$forbid |
| | | } |
| | | |
| | | if (cell.type === 'multiselect' || (cell.type === 'checkcard' && cell.multiple === 'true')) { |
| | |
| | | }) |
| | | |
| | | // 需要声明的变量集 |
| | | let _vars = ['tbid', 'errorcode', 'retmsg', 'billcode', 'bvoucher', 'fibvoucherdate', 'fiyear', 'username', 'fullname', 'modulardetailcode', 'roleid', 'mk_departmentcode', 'mk_organization', 'login_city'] |
| | | let _vars = ['tbid', 'errorcode', 'retmsg', 'billcode', 'bvoucher', 'fibvoucherdate', 'fiyear', 'username', 'fullname', 'modulardetailcode', 'roleid', 'mk_departmentcode', 'mk_organization', 'login_city', 'bid'] |
| | | |
| | | // 主键字段 |
| | | let primaryKey = setting.primaryKey || 'id' |
| | |
| | | _declarefields = ',' + _declarefields |
| | | } |
| | | _sql = `/* 系统生成 */ |
| | | Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@ModularDetailCode nvarchar(50)${_declarefields} |
| | | Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@bid nvarchar(50),@ModularDetailCode nvarchar(50)${_declarefields} |
| | | ` |
| | | |
| | | // 表单变量赋值 |
| | |
| | | cell.logo = _param.logo || '' |
| | | cell.apptype = _param.apptype || '' |
| | | cell.delay = _param.delay || 0 |
| | | cell.statusBarColor = _param.statusBarColor || 'black' |
| | | } |
| | | |
| | | return cell |
| | |
| | | sublist = sublist.filter(item => item.ID !== record.ID) |
| | | |
| | | // param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','${item.link_type || 'true'}','${item.role_type || 'true'}','${item.lang || 'zh-CN'}'`) |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0})))}'`) |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black'})))}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | |
| | |
| | | |
| | | if (visible === 'edit') { |
| | | // param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','${item.link_type || 'true'}','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}'`) |
| | | param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0})))}'`) |
| | | param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black'})))}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | } |
| | |
| | | } |
| | | |
| | | // param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','${item.login_types || 'true'}','${item.link_type || 'true'}','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}'`) |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0})))}'`) |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || ''}','${item.sms_id || ''}','${window.btoa(window.encodeURIComponent(JSON.stringify({copyright: item.copyright || '', logo: item.logo || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black'})))}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | |
| | |
| | | })(<InputNumber min={0} max={5000} precision={0} onPressEnter={this.handleSubmit}/>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {typename !== 'pc' ? <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="在使用明科云APP时,状态栏的字体颜色。"> |
| | | <Icon type="question-circle" /> |
| | | 状态栏 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('statusBarColor', { |
| | | initialValue: card ? card.statusBarColor || 'black' : 'black' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="black">黑色</Radio> |
| | | <Radio value="white">白色</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Row> |
| | | </Form> |
| | | ) |
| | |
| | | import './index.scss' |
| | | |
| | | const { TextArea } = Input |
| | | const ColorSketch = asyncComponent(() => import('@/mob/colorsketch')) |
| | | const SourceComponent = asyncComponent(() => import('@/menu/components/share/sourcecomponent')) |
| | | |
| | | class CustomMenuForm extends Component { |
| | |
| | | this.props.updateConfig({...config, advertUrl: value}) |
| | | } else if (key === 'advertTime') { |
| | | this.props.updateConfig({...config, advertTime: value}) |
| | | } else if (key === 'pullRefresh') { |
| | | this.props.updateConfig({...config, pullRefresh: value}) |
| | | } else if (key === 'statusBarbgColor') { |
| | | this.props.updateConfig({...config, statusBarbgColor: value}) |
| | | } |
| | | } |
| | | |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item label="下拉刷新"> |
| | | {getFieldDecorator('pullRefresh', { |
| | | initialValue: config.pullRefresh || 'false' |
| | | })( |
| | | <Radio.Group onChange={(e) => {this.selectChange('pullRefresh', e.target.value)}}> |
| | | <Radio value="false">关闭</Radio> |
| | | <Radio value="true">开启</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |
| | | <Form.Item className="status-bar" label={ |
| | | <Tooltip placement="topLeft" title="在明科云APP中,状态栏的背景色。"> |
| | | <Icon type="question-circle" /> |
| | | 状态栏 |
| | | </Tooltip> |
| | | }> |
| | | <ColorSketch value={config.statusBarbgColor || '#ffffff'} onChange={(val) => {this.selectChange('statusBarbgColor', val)}} /> |
| | | </Form.Item> |
| | | </Col> |
| | | {config.advertUrl ? <Col span={24}> |
| | | <Form.Item label="停留(s)"> |
| | | {getFieldDecorator('advertTime', { |
| | |
| | | .mk-source-wrap .mk-source-item-info .anticon-delete { |
| | | color: #ff4d4f; |
| | | } |
| | | .status-bar { |
| | | .ant-form-item-control { |
| | | padding-top: 7px; |
| | | .color-sketch-block-box { |
| | | width: calc(100% - 140px); |
| | | } |
| | | .color-sketch-value { |
| | | width: 140px; |
| | | } |
| | | } |
| | | } |
| | | } |