| | |
| | | |
| | | const cardTypeOptions = { |
| | | sequence: ['eleType', 'width'], |
| | | text: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix', 'link', 'anchors', 'noValue', 'bgImage', 'fixStyle'], |
| | | text: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix', 'link', 'anchors', 'noValue', 'bgImage', 'fixStyle', 'copyable'], |
| | | number: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix', 'noValue', 'fixStyle'], |
| | | picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'maxWidth', 'link', 'noValue'], |
| | | video: ['eleType', 'datatype', 'width', 'aspectRatio', 'autoPlay', 'loop', 'startTime', 'noValue', 'posterType'], |
| | |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'copyable', |
| | | label: '可复制', |
| | | initVal: card.copyable || 'false', |
| | | tooltip: '元素是否可复制,复制内容包括前缀与后缀。', |
| | | required: false, |
| | | options: [ |
| | | { value: 'true', text: '是' }, |
| | | { value: 'false', text: '否' } |
| | | ] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'fixSize', |
| | | min: 10, |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Col, Tooltip, notification } from 'antd' |
| | | import { Col, Tooltip, notification, Typography } from 'antd' |
| | | import moment from 'moment' |
| | | |
| | | // import Api from '@/api' |
| | |
| | | import LostPng from '@/assets/img/lost.png' |
| | | import './index.scss' |
| | | |
| | | const { Paragraph } = Typography |
| | | const NormalButton = asyncComponent(() => import('@/tabviews/zshare/actionList/normalbutton')) |
| | | const ExcelInButton = asyncComponent(() => import('@/tabviews/zshare/actionList/excelInbutton')) |
| | | const ExcelOutButton = asyncComponent(() => import('@/tabviews/zshare/actionList/exceloutbutton')) |
| | |
| | | if (val !== '') { |
| | | if (card.fixStyle === 'alone') { |
| | | let _s = {fontSize: card.fixSize, color: card.fixColor, marginLeft: card.fixLeft, marginRight: card.fixRight} |
| | | val = <><span style={_s}>{card.prefix || ''}</span>{val}<span style={_s}>{card.postfix || ''}</span></> |
| | | if (card.copyable === 'true') { |
| | | val = <><span style={_s}>{card.prefix || ''}</span><Paragraph copyable={{ text: `${card.prefix || ''}${val}${card.postfix || ''}` }}>{val}</Paragraph><span style={_s}>{card.postfix || ''}</span></> |
| | | } else { |
| | | val = <><span style={_s}>{card.prefix || ''}</span>{val}<span style={_s}>{card.postfix || ''}</span></> |
| | | } |
| | | } else if (card.copyable === 'true') { |
| | | val = `${card.prefix || ''}${val}${card.postfix || ''}` |
| | | val = <Paragraph copyable={{ text: val }}>{val}</Paragraph> |
| | | } else { |
| | | val = `${card.prefix || ''}${val}${card.postfix || ''}` |
| | | } |
| | |
| | | .ant-btn { |
| | | padding: 0; |
| | | } |
| | | .ant-typography { |
| | | margin: 0; |
| | | padding: 0; |
| | | font-style: inherit; |
| | | font-weight: inherit; |
| | | text-decoration: inherit; |
| | | color: inherit; |
| | | .anticon-copy { |
| | | color: var(--antd-wave-shadow-color); |
| | | } |
| | | } |
| | | .ant-mk-text { |
| | | font-style: inherit; |
| | | font-weight: inherit; |
| | |
| | | |
| | | async loadData () { |
| | | const { mainSearch, menuType } = this.props |
| | | const { config, arr_field, BID, group } = this.state |
| | | const { config, arr_field, BID } = this.state |
| | | |
| | | if (config.wrap.datatype === 'static' || (config.setting.supModule && !BID)) { |
| | | this.setState({ |
| | |
| | | if (result.status) { |
| | | let _data = result.data && result.data[0] ? result.data[0] : {$$empty: true} |
| | | |
| | | let _group = group |
| | | |
| | | this.setState({ |
| | | group: null, |
| | | data: _data || {$$empty: true}, |
| | | data: null, |
| | | loading: false |
| | | }, () => { |
| | | this.setState({group: _group}) |
| | | this.setState({data: _data}) |
| | | }) |
| | | } else { |
| | | this.setState({ |
| | |
| | | |
| | | this.state = { |
| | | value, |
| | | minDate: config.minDate ? moment().add(config.minDate, 'days').endOf('day') : '', |
| | | minDate: config.minDate ? moment().add(config.minDate, 'days').startOf('day') : '', |
| | | maxDate: config.maxDate ? moment().add(config.maxDate, 'days').endOf('day') : '', |
| | | mode, |
| | | format |
| | |
| | | if (!current || (!maxDate && !minDate)) { |
| | | return false |
| | | } |
| | | |
| | | |
| | | if (!maxDate) { |
| | | return current < minDate |
| | | } else if (!minDate) { |
| | |
| | | |
| | | this.viewList = {} |
| | | |
| | | this.setState({sublist, appId, subAppId}) |
| | | this.setState({sublist, appId, subAppId}, () => { |
| | | this.getViews() |
| | | }) |
| | | } |
| | | |
| | | /** |