| | |
| | | { |
| | | "appId": "201912040924165801464FF1788654BC5AC73", |
| | | "appkey": "20191106103859640976D6E924E464D029CF0", |
| | | "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars", |
| | | "appId": "", |
| | | "appkey": "", |
| | | "mainSystemApi": "", |
| | | "systemType": "", |
| | | "externalDatabase": "false", |
| | | "lineColor": "", |
| | | "filter": "false", |
| | | "defaultApp": "mk", |
| | | "defaultApp": "mkindustry", |
| | | "defaultLang": "zh-CN", |
| | | "WXAppID": "", |
| | | "WXminiAppID": "", |
| | |
| | | "transfer": "false", |
| | | "keepPassword": "true", |
| | | "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], |
| | | "host": "http://qingqiumarket.cn", |
| | | "service": "MKWMS/" |
| | | "host": "https://cloud.mk9h.cn", |
| | | "service": "" |
| | | } |
New file |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | |
| | | import LostPng from '@/assets/img/lost.png' |
| | | import MKEmitter from '@/utils/events.js' |
| | | |
| | | import './index.scss' |
| | | |
| | | class MkPicture extends Component { |
| | | static propTpyes = { |
| | | style: PropTypes.object, |
| | | scale: PropTypes.bool, |
| | | url: PropTypes.string, |
| | | urls: PropTypes.array, |
| | | } |
| | | |
| | | state = { |
| | | url: '', |
| | | lost: false |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | const { url } = this.props |
| | | |
| | | if (url) { |
| | | this.setState({url: url, lost: false}) |
| | | this.checkUrl(url) |
| | | } else { |
| | | this.setState({url: LostPng, lost: true}) |
| | | } |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps (nextProps) { |
| | | if (nextProps.url) { |
| | | if (nextProps.url !== this.state.url) { |
| | | this.setState({url: nextProps.url, lost: false}) |
| | | this.checkUrl(nextProps.url) |
| | | } |
| | | } else { |
| | | this.setState({url: LostPng, lost: true}) |
| | | } |
| | | } |
| | | |
| | | checkUrl = (url) => { |
| | | let img = new Image() |
| | | img.addEventListener('error', this.loadHandler) |
| | | img.src = url |
| | | } |
| | | |
| | | loadHandler = (e) => { |
| | | this.setState({url: LostPng, lost: true}) |
| | | } |
| | | |
| | | render() { |
| | | const { style, scale, urls } = this.props |
| | | const { url, lost } = this.state |
| | | |
| | | return ( |
| | | <div |
| | | className={'ant-mk-picture' + (scale ? ' scale' : '') + (lost ? ' lost' : '')} |
| | | onClick={(e) => { |
| | | if (!scale) return |
| | | |
| | | e.stopPropagation() |
| | | |
| | | MKEmitter.emit('mkImageScale', url, urls) |
| | | }} |
| | | style={{...style, backgroundImage: `url('${url}')`}} |
| | | ></div> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default MkPicture |
New file |
| | |
| | | .ant-mk-picture { |
| | | background-size: cover; |
| | | background-position: center center; |
| | | background-repeat: no-repeat; |
| | | } |
| | | .ant-mk-picture.lost { |
| | | background-size: contain!important; |
| | | } |
| | | .ant-mk-picture.scale { |
| | | cursor: zoom-in; |
| | | } |
| | |
| | | background-size: cover; |
| | | background-position: center center; |
| | | background-repeat: no-repeat; |
| | | background-color: #f5f5f5; |
| | | } |
| | | .ant-mk-icon { |
| | | vertical-align: top; |
| | |
| | | const NormalForm = asyncIconComponent(() => import('@/components/normalform')) |
| | | const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent')) |
| | | |
| | | const Card = ({ id, card, active, moveCard, findCard, closeCard, selectCard, updateGroup }) => { |
| | | const Card = ({ id, card, sort, active, moveCard, findCard, closeCard, selectCard, updateGroup }) => { |
| | | const originalIndex = findCard(id).index |
| | | const [{ isDragging }, drag] = useDrag({ |
| | | item: { type: 'form', id, originalIndex }, |
| | |
| | | } trigger="hover"> |
| | | <div className={'page-card ' + (active ? 'active' : '')} onClick={select} style={{ opacity: opacity}}> |
| | | <div ref={node => drag(drop(node))}> |
| | | <span className="form-sort">{card.sort}</span> |
| | | <span className="form-sort">{sort}</span> |
| | | {card.setting.title} |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | return ( |
| | | <div className={'normal-form-titles ' + (tabtype || '') } > |
| | | {cards.map(card => ( |
| | | {cards.map((card, i) => ( |
| | | <Card |
| | | id={card.uuid} |
| | | key={card.uuid} |
| | | sort={i + 1} |
| | | active={card.uuid === selectId} |
| | | card={card} |
| | | moveCard={moveCard} |
| | |
| | | wrappedComponentRef={(inst) => this.settingForm = inst} |
| | | /> |
| | | </TabPane> |
| | | <TabPane tab="字段集" key="columns"> |
| | | <TabPane tab={ |
| | | <span> |
| | | 字段集 |
| | | <CopyOutlined title="以逗号拼接形式复制字段" className="mk-copy-fields" onClick={this.copyColumns}/> |
| | | </span> |
| | | } key="columns"> |
| | | <ColForm dict={this.props.dict} columnChange={this.columnChange}/> |
| | | <FieldsComponent |
| | | config={{...config, columns}} |
| | | type="fields" |
| | | updatefield={this.updatefields} |
| | | /> |
| | | <CopyOutlined title="以逗号拼接形式复制字段" onClick={this.copyColumns} style={{position: 'absolute', cursor: 'pointer', zIndex: 1, top: '-35px', right: '0px', color: '#1890ff'}} /> |
| | | <EditTable actions={['edit', 'move', 'copy', 'del', 'clear']} type="datasourcefield" wrappedComponentRef={(inst) => this.datasource = inst} data={columns} columns={colColumns} onChange={(columns) => this.setState({columns})}/> |
| | | </TabPane> |
| | | <TabPane tab={ |
| | |
| | | .ant-tabs-nav-scroll { |
| | | text-align: center; |
| | | } |
| | | .mk-copy-fields { |
| | | position: absolute; |
| | | cursor: pointer; |
| | | z-index: 1; |
| | | top: 19px; |
| | | right: -210px; |
| | | color: rgb(24, 144, 255); |
| | | display: none; |
| | | } |
| | | .ant-tabs-tab-active .mk-copy-fields { |
| | | display: inline-block; |
| | | } |
| | | .count-tip { |
| | | position: absolute; |
| | | top: 0px; |
| | |
| | | } |
| | | scripts && scripts.forEach(script => { |
| | | if (reg.test(script.sql)) { |
| | | errors.push(`自定义脚本(${script.$index})存在未替换值${item}`) |
| | | errors.push(`自定义脚本(${script.$index || ''})存在未替换值${item}`) |
| | | } |
| | | }) |
| | | }) |
| | |
| | | className="normal-view" |
| | | label={<ArrowUpOutlined title="上边距"/>} |
| | | > |
| | | <StyleInput defaultValue={config.style.paddingTop || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingTop')}/> |
| | | <StyleInput defaultValue={config.style.paddingTop || '0px'} options={['px', '%', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingTop')}/> |
| | | </Form.Item> |
| | | <Form.Item |
| | | colon={false} |
| | | className="normal-view" |
| | | label={<ArrowDownOutlined title="下边距"/>} |
| | | > |
| | | <StyleInput defaultValue={config.style.paddingBottom || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingBottom')}/> |
| | | <StyleInput defaultValue={config.style.paddingBottom || '0px'} options={['px', '%', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingBottom')}/> |
| | | </Form.Item> |
| | | <Form.Item |
| | | colon={false} |
| | | className="normal-view" |
| | | label={<ArrowLeftOutlined title="左边距"/>} |
| | | > |
| | | <StyleInput defaultValue={config.style.paddingLeft || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingLeft')}/> |
| | | <StyleInput defaultValue={config.style.paddingLeft || '0px'} options={['px', '%', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingLeft')}/> |
| | | </Form.Item> |
| | | <Form.Item |
| | | colon={false} |
| | | className="normal-view" |
| | | label={<ArrowRightOutlined title="右边距"/>} |
| | | > |
| | | <StyleInput defaultValue={config.style.paddingRight || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingRight')}/> |
| | | <StyleInput defaultValue={config.style.paddingRight || '0px'} options={['px', '%', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'paddingRight')}/> |
| | | </Form.Item> |
| | | <p className="normal-view" style={{borderBottom: '1px solid #eaeaea', color: '#40a9ff'}}>外边距</p> |
| | | <Form.Item |
| | |
| | | className="normal-view" |
| | | label={<ArrowUpOutlined title="上边距"/>} |
| | | > |
| | | <StyleInput defaultValue={config.style.marginTop || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginTop')}/> |
| | | <StyleInput defaultValue={config.style.marginTop || '0px'} options={['px', '%', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginTop')}/> |
| | | </Form.Item> |
| | | <Form.Item |
| | | colon={false} |
| | | className="normal-view" |
| | | label={<ArrowDownOutlined title="下边距"/>} |
| | | > |
| | | <StyleInput defaultValue={config.style.marginBottom || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginBottom')}/> |
| | | <StyleInput defaultValue={config.style.marginBottom || '0px'} options={['px', '%', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginBottom')}/> |
| | | </Form.Item> |
| | | <Form.Item |
| | | colon={false} |
| | | className="normal-view" |
| | | label={<ArrowLeftOutlined title="左边距"/>} |
| | | > |
| | | <StyleInput defaultValue={config.style.marginLeft || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginLeft')}/> |
| | | <StyleInput defaultValue={config.style.marginLeft || '0px'} options={['px', '%', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginLeft')}/> |
| | | </Form.Item> |
| | | <Form.Item |
| | | colon={false} |
| | | className="normal-view" |
| | | label={<ArrowRightOutlined title="右边距"/>} |
| | | > |
| | | <StyleInput defaultValue={config.style.marginRight || '0px'} options={['px', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginRight')}/> |
| | | <StyleInput defaultValue={config.style.marginRight || '0px'} options={['px', '%', 'vh', 'vw']} onChange={(val) => this.changePadding(val, 'marginRight')}/> |
| | | </Form.Item> |
| | | </Form> |
| | | </div> |
| | |
| | | * 4、positecgroup ( aHR0cHM6Ly9jbG91ZC5$mkwb3NpdGVjZ3JvdXAuY29t ) |
| | | */ |
| | | export default { |
| | | sysType: 'bG9j$mkYWw=', |
| | | sysType: 'Y2xv$mkdWQ=', |
| | | caId: 'MjAyMDAxMTYxMjMzMzU1MDd$mkGQzkyMzI1Rjk4MDY0QUNGQjQ2Mg==', |
| | | cakey: 'MjAyMDAxMTYxMjQwMDQ2NDM$mk2N0QzODE2MjExNUI0MTc4OTVDMQ==', |
| | | cdomain: 'aHR0cHM6Ly9jbG91$mkZC5tazloLmNu' |
| | |
| | | const ChartComponent = asyncSpinComponent(() => import('@/tabviews/zshare/chartcomponent')) |
| | | const PagemsgComponent = asyncComponent(() => import('@/tabviews/zshare/pageMessage')) |
| | | const AutoMatic = asyncComponent(() => import('@/tabviews/zshare/automatic')) |
| | | const DebugTable = asyncComponent(() => import('@/tabviews/debugtable')) |
| | | |
| | | const { TabPane } = Tabs |
| | | |
| | |
| | | })} |
| | | </Tabs>)) |
| | | } |
| | | {setting && window.GLOB.breakpoint ? <DebugTable /> : null} |
| | | {!window.GLOB.mkHS && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config} /> : null} |
| | | {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} |
| | | {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null} |
| | |
| | | import asyncElementComponent from '@/utils/asyncComponent' |
| | | import { getMark } from '@/utils/utils.js' |
| | | import MkIcon from '@/components/mk-icon' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import LostPng from '@/assets/img/lost.png' |
| | | import Encrypts from '@/components/encrypts' |
| | | import './index.scss' |
| | | |
| | |
| | | const QrCode = asyncElementComponent(() => import('@/components/qrcode')) |
| | | const MkProgress = asyncElementComponent(() => import('@/components/mkProgress')) |
| | | const Video = asyncComponent(() => import('@/components/video')) |
| | | const MkPicture = asyncComponent(() => import('@/components/mkPicture')) |
| | | const PicRadio = { |
| | | '4:3': '75%', '3:2': '66.67%', '16:9': '56.25%', '2:1': '50%', '3:1': '33.33%', '4:1': '25%', |
| | | '5:1': '20%', '6:1': '16.67%', '7:1': '14.29%', '8:1': '12.5%', '9:1': '11.11%', |
| | |
| | | } |
| | | |
| | | let scale = url && card.scale === 'true' |
| | | let urls = url ? url.split(',').filter(Boolean) : [LostPng] |
| | | |
| | | if (!url) { |
| | | _imagestyle = {backgroundSize: 'contain'} |
| | | } |
| | | let urls = url ? url.split(',').filter(Boolean) : [''] |
| | | |
| | | urls.forEach((u, i) => { |
| | | contents.push(<Col key={card.uuid + i} span={card.width}> |
| | | <div style={_style} onClick={(e) => {this.openNewView(e, card)}}> |
| | | <div |
| | | className={'ant-mk-picture' + (scale ? ' scale' : '')} |
| | | onClick={(e) => { |
| | | if (!scale) return |
| | | |
| | | e.stopPropagation() |
| | | |
| | | MKEmitter.emit('mkImageScale', url, urls) |
| | | }} |
| | | style={{..._imagestyle, backgroundImage: `url('${u}')`}} |
| | | ></div> |
| | | <MkPicture style={_imagestyle} scale={scale} url={u} urls={urls}/> |
| | | </div> |
| | | </Col>) |
| | | }) |
| | |
| | | } |
| | | } |
| | | } |
| | | .ant-mk-picture { |
| | | background-size: cover; |
| | | background-position: center center; |
| | | background-repeat: no-repeat; |
| | | background-color: #f5f5f5; |
| | | } |
| | | .ant-mk-picture.scale { |
| | | cursor: zoom-in; |
| | | } |
| | | .ant-mk-icon { |
| | | vertical-align: top; |
| | | line-height: inherit; |
| | |
| | | |
| | | const { Paragraph } = Typography |
| | | const CardCellComponent = asyncComponent(() => import('@/tabviews/custom/components/card/cardcellList')) |
| | | const MkPicture = asyncComponent(() => import('@/components/mkPicture')) |
| | | const PicRadio = { |
| | | '4:3': '75%', '3:2': '66.67%', '16:9': '56.25%', '2:1': '50%', '3:1': '33.33%', '4:1': '25%', |
| | | '5:1': '20%', '6:1': '16.67%', '7:1': '14.29%', '8:1': '12.5%', '9:1': '11.11%', |
| | |
| | | <div> |
| | | {photos.map((url, i) => ( |
| | | <Col key={i} span={col.span || 24}> |
| | | <div className={'ant-mk-picture' + (scale ? ' scale' : '')} onClick={() => { |
| | | if (!scale) return |
| | | MKEmitter.emit('mkImageScale', url, photos) |
| | | }} style={{paddingTop, backgroundImage: `url('${url}')`}}></div> |
| | | <MkPicture style={{paddingTop}} scale={scale} url={url} urls={photos}/> |
| | | </Col> |
| | | ))} |
| | | </div> |
| | |
| | | } |
| | | .ant-mk-picture { |
| | | position: relative; |
| | | background-position: center center; |
| | | background-size: cover; |
| | | background-repeat: no-repeat; |
| | | background-color: #f5f5f5; |
| | | margin: 2px; |
| | | } |
| | | .ant-mk-picture.scale { |
| | | cursor: zoom-in; |
| | | } |
| | | .action-col { |
| | | .ant-btn > .anticon + span { |
| | |
| | | static propTpyes = { |
| | | statFValue: PropTypes.any, // 合计字段数据 |
| | | MenuID: PropTypes.string, // 菜单Id |
| | | setting: PropTypes.object, // 表格全局设置:tableType(表格是否可选、单选、多选)、columnfixed(列固定)、actionfixed(按钮固定) |
| | | setting: PropTypes.object, // 表格全局设置:tableType(表格是否可选、单选、多选)、actionfixed(按钮固定) |
| | | columns: PropTypes.array, // 表格列 |
| | | lineMarks: PropTypes.any, // 行标记 |
| | | fields: PropTypes.array, // 组件字段集 |
| | |
| | | .card-cell-list { |
| | | color: rgba(0, 0, 0, 0.85); |
| | | } |
| | | .ant-mk-picture { |
| | | position: relative; |
| | | background-position: center center; |
| | | background-size: cover; |
| | | background-repeat: no-repeat; |
| | | background-color: #f5f5f5; |
| | | margin: 2px; |
| | | } |
| | | .ant-mk-picture.scale { |
| | | cursor: zoom-in; |
| | | } |
| | | .action-col { |
| | | .ant-btn > .anticon + span { |
| | | margin-left: 3px; |
| | |
| | | const CustomChart = asyncComponent(() => import('./components/chart/custom-chart')) |
| | | const TimeLine = asyncComponent(() => import('./components/timeline/normal-timeline')) |
| | | const Voucher = asyncComponent(() => import('./components/module/voucher')) |
| | | const DebugTable = asyncComponent(() => import('@/tabviews/debugtable')) |
| | | |
| | | class CustomPage extends Component { |
| | | static propTpyes = { |
| | |
| | | inters.push(item) |
| | | }) |
| | | |
| | | if (inters.length > 0) { |
| | | this.loadOutResource(inters) |
| | | } |
| | | // if (inters.length > 0) { |
| | | // this.loadOutResource(inters) |
| | | // } |
| | | } |
| | | |
| | | loadOutResource = (inters) => { |
| | |
| | | <div className={'custom-page-wrap ' + (loadingview || loading ? 'loading' : '')} id={this.state.ContainerId} style={config ? config.style : null}> |
| | | {(loadingview || loading) ? <Spin className="view-spin" size="large" /> : null} |
| | | <Row className="component-wrap">{this.getComponents()}</Row> |
| | | {config && window.GLOB.breakpoint ? <DebugTable /> : null} |
| | | {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} |
| | | {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null} |
| | | {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} |
| | |
| | | import React, {Component} from 'react' |
| | | import { is, fromJS } from 'immutable' |
| | | import { notification, Table} from 'antd' |
| | | import { RedoOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import UtilsDM from '@/utils/utils-datamanage.js' |
| | | |
| | | import './index.scss' |
| | | |
| | | class DebugTable extends Component { |
| | | state = { |
| | | columns: null, // 显示列 |
| | | data: [], // 列表数据集 |
| | | loading: false, // 列表数据加载中 |
| | | columns: [ |
| | | {align: 'left', dataIndex: 'Sort', sorter: false, title: 'Sort', width: 120}, |
| | | {align: 'left', dataIndex: 'CDefine1', sorter: false, title: '文本1', width: 120}, |
| | | {align: 'left', dataIndex: 'CDefine2', sorter: false, title: '文本2', width: 120}, |
| | | {align: 'left', dataIndex: 'CDefine3', sorter: false, title: '文本3', width: 120}, |
| | | {align: 'left', dataIndex: 'CDefine4', sorter: false, title: '文本4', width: 120}, |
| | | {align: 'left', dataIndex: 'CDefine5', sorter: false, title: '文本5', width: 120}, |
| | | {align: 'left', dataIndex: 'CDefine6', sorter: false, title: '文本6', width: 120}, |
| | | {align: 'left', dataIndex: 'CDefine7', sorter: false, title: '文本7', width: 120}, |
| | | ], |
| | | data: [], |
| | | loading: false, |
| | | setting: { |
| | | interType: 'system', |
| | | execute: true, |
| | | dataresource: 'select * from s_debug_value_log where createuserid=@userid@' |
| | | dataresource: '(select * from s_debug_value_log where createuserid=@userid@) tb' |
| | | }, |
| | | arr_field: 'ID,Sort,CDefine1,CDefine2,CDefine3,CDefine4,CDefine5,CDefine6,CDefine7,' |
| | | arr_field: 'ID,Sort,CDefine1,CDefine2,CDefine3,CDefine4,CDefine5,CDefine6,CDefine7' |
| | | } |
| | | |
| | | /** |
| | |
| | | loading: true |
| | | }) |
| | | |
| | | let _orderBy = 'sort' |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, [], _orderBy, 1, 9999, '') |
| | | let param = UtilsDM.getQueryDataParams(setting, arr_field, [], 'sort', 1, 9999, '') |
| | | |
| | | let result = await Api.genericInterface(param) |
| | | |
| | |
| | | data: result.data.map((item, index) => { |
| | | item.key = index |
| | | item.$$uuid = item.ID || '' |
| | | item.$$key = '' + item.key + item.$$uuid |
| | | item.$Index = start + index + '' |
| | | |
| | | return item |
| | |
| | | } |
| | | } |
| | | |
| | | refreshByButtonResult = () => { |
| | | const { loading } = this.state |
| | | |
| | | if (!loading) { |
| | | this.loadmaindata() |
| | | } |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | // 组件加载时,获取菜单数据 |
| | | this.loadmaindata() |
| | | } |
| | | |
| | | componentDidMount() { |
| | | MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult) |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult) |
| | | } |
| | | |
| | | render() { |
| | |
| | | |
| | | return ( |
| | | <div className="debugtable"> |
| | | <RedoOutlined className="mk-debug-reload" onClick={() => this.loadmaindata()}/> |
| | | <Table size="middle" columns={columns} dataSource={data} loading={loading} scroll={{ x: '100%', y: false }}/> |
| | | </div> |
| | | ) |
| | |
| | | .debugtable { |
| | | position: relative; |
| | | min-height: 200px; |
| | | margin: 20px; |
| | | |
| | | .mk-debug-reload { |
| | | color: var(--mk-sys-color); |
| | | position: absolute; |
| | | z-index: 1; |
| | | top: 5px; |
| | | right: 10px; |
| | | font-size: 16px; |
| | | } |
| | | } |
| | |
| | | import PropTypes from 'prop-types' |
| | | import md5 from 'md5' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Table, Affix, Typography, Col } from 'antd' |
| | | import { Table, Typography, Col } from 'antd' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import MKEmitter from '@/utils/events.js' |
| | |
| | | const TabButton = asyncComponent(() => import('@/tabviews/zshare/actionList/tabbutton')) |
| | | const NewPageButton = asyncComponent(() => import('@/tabviews/zshare/actionList/newpagebutton')) |
| | | const Video = asyncComponent(() => import('@/components/video')) |
| | | const MkPicture = asyncComponent(() => import('@/components/mkPicture')) |
| | | |
| | | const PicRadio = { |
| | | '4:3': '75%', '3:2': '66.67%', '16:9': '56.25%', '2:1': '50%', '3:1': '33.33%', '4:1': '25%', |
| | |
| | | return ( |
| | | <div className="picture-col"> |
| | | {photos.map((url, i) => (<Col key={i} span={item.span || 24}> |
| | | <div |
| | | className={'mk-picture' + (scale ? ' image-scale' : '')} |
| | | onClick={(e) => { |
| | | if (!scale) return |
| | | |
| | | e.stopPropagation() |
| | | |
| | | MKEmitter.emit('mkImageScale', url, photos) |
| | | }} |
| | | style={{...style, backgroundImage: `url('${url}')`}} |
| | | ></div> |
| | | <MkPicture style={style} scale={scale} url={url} urls={photos}/> |
| | | </Col>))} |
| | | </div> |
| | | ) |
| | |
| | | } |
| | | } |
| | | |
| | | // 表格头部固定于顶部时,判断距顶部高度 |
| | | let offset = null |
| | | if (this.props.tableId === 'mainTable' && setting.columnfixed) { |
| | | if (!setting.actionfixed) { |
| | | offset = 48 |
| | | } else { |
| | | let box = document.getElementById(this.props.MenuID + 'mainaction') |
| | | if (box) { |
| | | offset = 48 + box.offsetHeight |
| | | } else { |
| | | offset = 105 |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 数据收起时,过滤已选数据 |
| | | let _data = this.props.data ? this.props.data : [] |
| | | |
| | |
| | | |
| | | return ( |
| | | <div className={'normal-data-table mingke-table ' + (height ? 'fixed-height' : '')}> |
| | | {offset && <Affix offsetTop={offset} className="fix-header"> |
| | | <Table |
| | | size={setting.size || 'middle'} |
| | | style={style} |
| | | bordered={setting.bordered !== 'false'} |
| | | rowSelection={rowSelection} |
| | | columns={this.state.columns.map(column => { |
| | | return { |
| | | align: column.align, |
| | | dataIndex: column.dataIndex, |
| | | title: column.title, |
| | | width: column.width |
| | | } |
| | | })} |
| | | /> |
| | | </Affix>} |
| | | <Table |
| | | components={components} |
| | | size={setting.size || 'middle'} |
| | |
| | | >.ant-col { |
| | | padding: 5px; |
| | | } |
| | | .mk-picture { |
| | | background-color: #f5f5f5; |
| | | background-position: center center; |
| | | background-size: cover; |
| | | background-repeat: no-repeat; |
| | | } |
| | | .image-scale { |
| | | cursor: zoom-in; |
| | | } |
| | | } |
| | | .action-col { |
| | | .ant-btn > .anticon + span { |
| | |
| | | loading: false |
| | | }) |
| | | res.actionfixed = res.actionfixed === 'true' |
| | | res.columnfixed = res.columnfixed === 'true' |
| | | |
| | | this.props.updatesetting({...config, setting: res}) |
| | | |
| | |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {config.Template === 'CommonTable' ? <Col span={8}> |
| | | {/* {config.Template === 'CommonTable' ? <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title={'含有合并列或表格出现横向滚动时会显示异常,请慎用!'}> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | |
| | | <Radio value="false">{dict['model.false']}</Radio> |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Col> : null} */} |
| | | <Col span={8}> |
| | | <Form.Item label="边框"> |
| | | {getFieldDecorator('bordered', { |
| | |
| | | } |
| | | scripts && scripts.forEach(script => { |
| | | if (reg.test(script.sql)) { |
| | | errors.push(`自定义脚本(${script.$index})存在未替换值${item}`) |
| | | errors.push(`自定义脚本(${script.$index || ''})存在未替换值${item}`) |
| | | } |
| | | }) |
| | | }) |
| | |
| | | </Col> |
| | | <Col span={24} className="sql"> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title={'数据检查替换符 $check@ -> \'\'、 @check$ -> \'\',ErrorCode等于C时 $check@ -> /*、 @check$ -> */。注:1、需使用系统接口 2、行设置为“选择多行”时无效。'}> |
| | | <Tooltip placement="topLeft" title={'数据检查替换符 $check@ -> \'\'、 @check$ -> \'\',ErrorCode等于C时 $check@ -> /*、 @check$ -> */。注:1、需使用系统接口 2、行设置为“选择多行”时无效。调试替换符 /*$breakpoint_begin_xxxx@ 、@breakpoint_end_xxxx$*/'}> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | sql |
| | | </Tooltip> |
| | |
| | | */ |
| | | static getPrevQueryParams (setting, search = [], BID) { |
| | | let param = null |
| | | |
| | | if (setting.procMode !== 'inner') { |
| | | param = this.getDefaultPrevQueryParam(setting, search, BID) |
| | | } else { |
| | |
| | | if (window.GLOB.breakpoint) { |
| | | let start = new RegExp('\\/\\*\\$breakpoint_begin_' + window.GLOB.breakpoint + '@', 'ig') |
| | | let end = new RegExp('@breakpoint_end_' + window.GLOB.breakpoint + '\\$\\*\\/', 'ig') |
| | | |
| | | if (window.GLOB.breakpoint === 'all') { |
| | | start = /\/\*\$breakpoint_begin_[0-9a-z_]+@/ig |
| | | end = /@breakpoint_end_[0-9a-z_]+\$\*\//ig |
| | | } |
| | | |
| | | _sql = _sql.replace(start, '').replace(end, '') |
| | | _sql += ` |