| | |
| | | 'header.close': 'Close', |
| | | 'header.notclose': 'not close', |
| | | 'header.reset': 'Reset', |
| | | 'model.enable': 'Enable', |
| | | 'model.disable': 'Disable', |
| | | 'model.switch.open': 'Open', |
| | | 'model.switch.close': 'Close', |
| | | 'model.menu.level1': 'Level 1 menu', |
| | | 'model.menu.level2': 'Level 2 menu', |
| | | 'header.menu.basemsg': 'Please complete the basic information !', |
| | | 'header.menu.template.change': 'Switch the template', |
| | | 'header.menu.addtitle': 'The new menu', |
| | |
| | | 'header.menu.table.add': 'Add tables', |
| | | 'header.menu.table.placeholder': 'Please select a table', |
| | | 'header.menu.config.placeholder': 'Configuration has been modified, do you want to save configuration information ?', |
| | | 'header.menu.config.notsave': '菜单尚未保存,请保存菜单配置!', |
| | | 'header.menu.config.update': '菜单配置已修改,请保存!', |
| | | 'header.menu.config.notsave': 'The menu has not been saved, please save the menu configuration first!', |
| | | 'header.menu.config.update': 'Menu configuration has been modified, please save!', |
| | | 'header.menu.form': 'The form', |
| | | 'header.menu.form.add': 'Add form', |
| | | 'header.menu.form.configurable': 'Configuration of forms', |
| | | 'header.menu.group.add': '添加分组', |
| | | 'header.menu.group.manage': '分组管理', |
| | | 'header.menu.group.add': 'Add a group', |
| | | 'header.menu.group.manage': 'Group management', |
| | | 'header.menu.search': 'Search', |
| | | 'header.menu.search.add': 'Add searches', |
| | | 'header.menu.action': 'Button', |
| | |
| | | 'header.menu.page.configurable': 'Configuration Page', |
| | | 'header.menu.menuID': 'Menu ID', |
| | | 'header.menu.menuName': 'Menu Name', |
| | | 'header.menu.viewName': '页面名称', |
| | | 'header.menu.tabName': '标签名称', |
| | | 'header.menu.Remark': '备注', |
| | | 'header.menu.viewName': 'The name of the page', |
| | | 'header.menu.tabName': 'Tag name', |
| | | 'header.menu.Remark': 'Note', |
| | | 'header.menu.menuNo': 'Menu Parameter', |
| | | 'header.menu.supMenu': 'Superior Menu', |
| | | 'header.menu.icon': 'Icon', |
| | |
| | | 'header.menu.openType.menu': 'Menu', |
| | | 'header.menu.openType.newWindow': 'A new window', |
| | | 'header.menu.newpage.service': 'Customer Service', |
| | | 'header.menu.func.create': '创建存储过程', |
| | | 'header.menu.interface.create': '创建接口', |
| | | 'header.menu.tab': '标签页', |
| | | 'header.menu.tab.subtable': '子表', |
| | | 'header.menu.datasource': '数据来源', |
| | | 'header.menu.maintable': '主表', |
| | | 'header.menu.query': '查询', |
| | | 'header.menu.printTemplate': '打印模板', |
| | | 'header.form.tabType': '标签类型', |
| | | 'header.menu.func.create': 'Create stored procedures', |
| | | 'header.menu.interface.create': 'Create the interface', |
| | | 'header.menu.tab': 'Tab', |
| | | 'header.menu.tab.subtable': 'Child table', |
| | | 'header.menu.datasource': 'The data source', |
| | | 'header.menu.maintable': 'The main table', |
| | | 'header.menu.query': 'The query', |
| | | 'header.menu.printTemplate': 'Printed template', |
| | | 'header.form.tabType': 'The tag type', |
| | | 'header.form.search.placeholder': 'Please add search criteria', |
| | | 'header.form.modal.placeholder': 'Please add the form', |
| | | 'header.form.action.placeholder': 'Please add buttons', |
| | | 'header.form.tab.placeholder': '请添加标签页', |
| | | 'header.form.tab.placeholder': 'Please add tabs', |
| | | 'header.form.column.placeholder': 'Please add columns', |
| | | 'header.form.column.source': 'Columns', |
| | | 'header.form.column.target': '已添加', |
| | | 'header.form.column.target': 'Have been added', |
| | | 'header.form.column.itemUnit': 'Item', |
| | | 'header.form.column.itemsUnit': 'Items', |
| | | 'header.form.column.action': 'Action', |
| | | 'header.form.name': 'Name', |
| | | 'header.form.title': 'Title', |
| | | 'header.form.field': 'Field', |
| | | 'header.form.field.placeholder': '请输入字段名', |
| | | 'header.form.field.placeholder': 'Please enter a field name', |
| | | 'header.form.innerFunc': 'Internal function', |
| | | 'header.form.outerFunc': 'External function', |
| | | 'header.form.callbackFunc': 'Callback function', |
| | | 'header.form.position': 'Position', |
| | | 'header.form.execSuccess': 'Success', |
| | | 'header.form.execError': 'Failure', |
| | | 'header.form.messageTip': '信息提示', |
| | | 'header.form.errorTime': '停留时间', |
| | | 'header.form.refresh': '刷新', |
| | | 'header.form.messageTip': 'Message', |
| | | 'header.form.errorTime': 'Residence time', |
| | | 'header.form.refresh': 'Refresh', |
| | | 'header.form.refresh.never': 'Don\'t refresh', |
| | | 'header.form.refresh.view': 'Refresh the page', |
| | | 'header.form.refresh.grid': 'Refresh the table', |
| | | 'header.form.refresh.maingrid': '刷新主表', |
| | | 'header.form.refresh.mainline': '刷新主表(行)', |
| | | 'header.form.refresh.equaltab': '刷新同级标签', |
| | | 'header.form.refresh.subgrid': '刷新子表', |
| | | 'header.form.popClose': '标签关闭', |
| | | 'header.form.refresh.maingrid': 'Refresh the main table', |
| | | 'header.form.refresh.mainline': 'Refresh the main table (rows)', |
| | | 'header.form.refresh.equaltab': 'Refresh sibling tag', |
| | | 'header.form.refresh.subgrid': 'Refresh the child table', |
| | | 'header.form.popClose': 'Label closing', |
| | | 'header.form.toolbar': 'The toolbar', |
| | | 'header.form.grid': 'Table', |
| | | 'header.form.intertype': 'The interface type', |
| | | 'header.form.interface': '接口地址', |
| | | 'header.form.sysInterface': '系统接口', |
| | | 'header.form.interface.inner': '内部', |
| | | 'header.form.interface.outer': '外部', |
| | | 'header.form.pageTemplate': '页面模板', |
| | | 'header.form.interface': 'Address of the interface', |
| | | 'header.form.sysInterface': 'The system interface', |
| | | 'header.form.interface.inner': 'Internal', |
| | | 'header.form.interface.outer': 'External', |
| | | 'header.form.pageTemplate': 'The page template', |
| | | 'header.form.type': 'Type', |
| | | 'header.form.text': 'Text', |
| | | 'header.form.description': '描述', |
| | |
| | | 'header.form.blacklist': '黑名单', |
| | | 'header.form.linkmenu': '关联菜单', |
| | | 'header.form.clickscale': '点击缩放', |
| | | 'header.form.easyCode': '助记码', |
| | | 'header.form.easyCode': 'EasyCode', |
| | | 'header.modal.form.edit': '表单-编辑', |
| | | 'model.searchCriteria': 'Search Criteria', |
| | | 'model.action': '按钮', |
| | |
| | | 'header.close': '关闭', |
| | | 'header.notclose': '不关闭', |
| | | 'header.reset': '重置', |
| | | 'model.enable': '启', |
| | | 'model.disable': '停', |
| | | 'model.switch.open': '开', |
| | | 'model.switch.close': '关', |
| | | 'model.menu.level1': '一级菜单', |
| | | 'model.menu.level2': '二级菜单', |
| | | 'header.menu.basemsg': '请完善菜单基本信息!', |
| | | 'header.menu.template.change': '切换模板', |
| | | 'header.menu.addtitle': '新建菜单', |
| | |
| | | 'header.menu.table.add': '添加表名', |
| | | 'header.menu.table.placeholder': '请选择表名', |
| | | 'header.menu.config.placeholder': '配置已修改,是否保存配置信息?', |
| | | 'header.menu.config.notsave': '菜单尚未保存,请保存菜单配置!', |
| | | 'header.menu.config.notsave': '菜单尚未保存,请先保存菜单配置!', |
| | | 'header.menu.config.update': '菜单配置已修改,请保存!', |
| | | 'header.menu.form': '表单', |
| | | 'header.menu.form.add': '添加表单', |
| | |
| | | import React, {Component} from 'react' |
| | | // import PropTypes from 'prop-types' |
| | | // import { is, fromJS } from 'immutable' |
| | | import { InputItem, Icon, Checkbox, Picker, List, Button } from 'antd-mobile' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { InputItem, Icon, Checkbox, List, Button } from 'antd-mobile' |
| | | import { createForm } from 'rc-form' |
| | | |
| | | import zhCN from '@/locales/zh-CN/mob.js' |
| | | import enUS from '@/locales/en-US/mob.js' |
| | | import mklogo from '@/assets/mobimg/mklogo.png' |
| | | // import mklogo from '@/assets/mobimg/mklogo.png' |
| | | import './index.scss' |
| | | |
| | | const CheckboxItem = Checkbox.CheckboxItem |
| | | const langs = [ |
| | | { |
| | | label: 'zh-CN', |
| | | value: '中文简体', |
| | | }, |
| | | { |
| | | label: 'en-US', |
| | | value: 'English', |
| | | } |
| | | ] |
| | | |
| | | class MobLogin extends Component { |
| | | // static propTpyes = { |
| | | // collapse: PropTypes.bool, |
| | | // } |
| | | static propTpyes = { |
| | | card: PropTypes.object, |
| | | triggerEdit: PropTypes.func, |
| | | onDoubleClick: PropTypes.func |
| | | } |
| | | |
| | | state = { |
| | | dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | lang: ['zh-CN'], |
| | | rember: true, |
| | | param: { |
| | | background: {color: '#000000', image: ''}, |
| | |
| | | } |
| | | } |
| | | |
| | | onChange = () => { |
| | | UNSAFE_componentWillMount () { |
| | | |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | onChange = (e) => { |
| | | const { rember } = this.state |
| | | e.stopPropagation() |
| | | |
| | | this.setState({ |
| | | rember: !rember |
| | |
| | | }) |
| | | } |
| | | |
| | | editLogo = (e) => { |
| | | e.stopPropagation() |
| | | } |
| | | |
| | | editTitle = (e) => { |
| | | e.stopPropagation() |
| | | } |
| | | |
| | | editMsg = (e) => { |
| | | e.stopPropagation() |
| | | } |
| | | |
| | | editBox = (e) => { |
| | | e.stopPropagation() |
| | | } |
| | | |
| | | render () { |
| | | const { card } = this.props |
| | | const { getFieldProps } = this.props.form |
| | | const { lang, rember } = this.state |
| | | const { rember } = this.state |
| | | |
| | | return ( |
| | | <div className="mob-login"> |
| | | <div className="logo" style={{marginTop: `calc(17vh - 10px)`}}> |
| | | <img src={mklogo} alt=""/> |
| | | <div className="mob-login" onClick={this.editBox} style={{paddingTop: `calc(17vh - 10px)`}}> |
| | | <div className="logo" onClick={this.editLogo}> |
| | | <img src={card.logo.content} alt=""/> |
| | | </div> |
| | | <div className="plat-name">明科商业智能开放平台</div> |
| | | <div className="plat-name" onClick={this.editTitle}>明科商业智能开放平台</div> |
| | | <InputItem |
| | | placeholder="UserName" |
| | | prefixListCls="mk-login-item am-list" |
| | | {...getFieldProps('userName', { |
| | | initialValue: '8888', |
| | | initialValue: 'admin', |
| | | })} |
| | | disabled={true} |
| | | > |
| | | <Icon type="check-circle-o" /> |
| | | </InputItem> |
| | |
| | | placeholder="Password" |
| | | prefixListCls="mk-login-item am-list" |
| | | {...getFieldProps('password', { |
| | | initialValue: '8888', |
| | | initialValue: '123456', |
| | | })} |
| | | type={'password'} |
| | | disabled={true} |
| | | > |
| | | <Icon type="check-circle-o" /> |
| | | <Icon type="check-circle" /> |
| | | </InputItem> |
| | | <div className="other-setting"> |
| | | <CheckboxItem checked={rember} onChange={this.onChange}> |
| | | <span onClick={this.onChange}>记住密码</span> |
| | | </CheckboxItem> |
| | | <Picker data={langs} value={lang} cols={1} onChange={this.onChangeLang} className="forss"> |
| | | {/* <Picker data={langs} value={lang} cols={1} onChange={this.onChangeLang} className="forss"> |
| | | <List.Item>{lang}</List.Item> |
| | | </Picker> |
| | | </Picker> */} |
| | | <List.Item className="lang">中文简体</List.Item> |
| | | <div className="clear-both"></div> |
| | | </div> |
| | | <Button type="primary">登录</Button> |
| | | <div className="company-msg"> |
| | | <Button type="primary" onDoubleClick={() => this.props.doubleClickCard(card.login)}>登录</Button> |
| | | <div className="company-msg" onClick={this.editMsg}> |
| | | <p>Copyright©2017 所有相关版权归 北京明科普华信息技术有限公司</p> |
| | | </div> |
| | | </div> |
| | |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: hidden; |
| | | background: linear-gradient(#378DBE, #46C29E, #48A9D6, yellow); |
| | | background: linear-gradient(#378DBE, #46C29E, #48A9D6); |
| | | |
| | | .logo { |
| | | max-width: 280px; |
| | | min-height: 10px; |
| | | margin: 0 auto; |
| | | margin-top: calc(15vh); |
| | | text-align: center; |
| | | |
| | | border: 1px dotted transparent; |
| | | img { |
| | | max-width: 100%; |
| | | } |
| | | } |
| | | .logo:hover { |
| | | border-color: #535353; |
| | | } |
| | | .plat-name { |
| | | max-width: 280px; |
| | | min-height: 10px; |
| | | margin: 0 auto; |
| | | margin-top: 15px; |
| | | margin-bottom: 30px; |
| | |
| | | font-size: 20px; |
| | | color: #ffffff; |
| | | font-weight: bold; |
| | | border: 1px dotted transparent; |
| | | } |
| | | .plat-name:hover { |
| | | border-color: #535353; |
| | | } |
| | | .mk-login-item.am-list-item { |
| | | position: relative; |
| | | z-index: 1; |
| | | width: 245px; |
| | | max-width: 270px; |
| | | margin: 0 auto; |
| | |
| | | input:-ms-input-placeholder { |
| | | color: #ffffff; |
| | | } |
| | | |
| | | .am-input-control input:disabled { |
| | | background-color: transparent; |
| | | } |
| | | } |
| | | .am-list-item:not(:last-child) .am-list-line { |
| | | border: none; |
| | | } |
| | | .other-setting { |
| | | position: relative; |
| | | z-index: 1; |
| | | width: 245px; |
| | | max-width: 270px; |
| | | margin: 0 auto; |
| | |
| | | padding: 0; |
| | | .am-list-thumb:first-child { |
| | | margin-right: 5px; |
| | | cursor: pointer; |
| | | |
| | | .am-checkbox-inner { |
| | | width: 18px; |
| | |
| | | .am-list-line .am-list-content { |
| | | font-size: 14px; |
| | | color: #fafafa; |
| | | cursor: pointer; |
| | | } |
| | | .am-list-extra { |
| | | display: none; |
| | | } |
| | | } |
| | | > div:not(.am-list-item) { |
| | | |
| | | .am-list-item.lang { |
| | | float: right; |
| | | background: transparent; |
| | | padding: 0; |
| | | .am-list-item { |
| | | width: 100%; |
| | | .am-list-line { |
| | | padding-right: 10px; |
| | | .am-list-content { |
| | | text-align: right; |
| | | cursor: default; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | >.am-button { |
| | | position: relative; |
| | | z-index: 1; |
| | | width: 245px; |
| | | max-width: 270px; |
| | | margin: 0 auto; |
| | | border-radius: 30px; |
| | | border: 1px dotted transparent; |
| | | } |
| | | >.am-button:hover { |
| | | color: #fff; |
| | | border-color: #535353; |
| | | } |
| | | .company-msg { |
| | | position: absolute; |
| | | width: 100%; |
| | | width: 88%; |
| | | min-height: 10px; |
| | | bottom: 20px; |
| | | padding: 0 20px; |
| | | bottom: 20px; |
| | | left: 6%; |
| | | font-size: 12px; |
| | | color: #fafafa; |
| | | text-align: center; |
| | | border: 1px dotted transparent; |
| | | } |
| | | .company-msg:hover { |
| | | border-color: #535353; |
| | | } |
| | | } |
| | | .am-picker-popup-wrap { |
| | |
| | | import React from 'react' |
| | | import { useDrag, useDrop } from 'react-dnd' |
| | | // import { Icon } from 'antd' |
| | | import { Icon } from 'antd' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | |
| | |
| | | }, |
| | | }) |
| | | |
| | | console.log(card) |
| | | const style = isDragging ? { opacity: 0.3} : { opacity: 1} |
| | | let style = { opacity: 1} |
| | | if (isDragging && card.type !== 'login') { |
| | | style = { opacity: 0.3} |
| | | } |
| | | if (card.type === 'login') { |
| | | style.height = '100%' |
| | | } |
| | | |
| | | const getCardComponent = () => { |
| | | if (card.type === 'login') { |
| | | if (card.subtype === 'mob-login-1') { |
| | | return (<Login card={card} triggerEdit={editCard} onDoubleClick={doubleClickCard} />) |
| | | } |
| | | } |
| | | } |
| | | |
| | | return ( |
| | | <div ref={node => drag(drop(node))} style={style}> |
| | | <Login /> |
| | | {/* <div className="page-card"> |
| | | <Button |
| | | className={'mk-btn mk-' + card.class} |
| | | icon={card.icon} |
| | | key={card.uuid} |
| | | onDoubleClick={() => doubleClickCard(id)} |
| | | > |
| | | {card.label}{card.position === 'grid' && <Icon type="table" />} |
| | | </Button> |
| | | </div> */} |
| | | {/* <Icon className="edit" title="edit" type="edit" onClick={() => editCard(id)} /> |
| | | <Icon className="edit close" title="close" type="close" onClick={() => delCard(id)} /> */} |
| | | <div className="mk-component-card" ref={node => drag(drop(node))} style={style}> |
| | | {getCardComponent()} |
| | | <Icon className="remove-component" title="delete" type="delete" onClick={() => delCard(id)} /> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | import Card from './card' |
| | | import './index.scss' |
| | | |
| | | const Container = ({config, handleList, handleMenu, deleteMenu, doubleClickCard }) => { |
| | | const Container = ({config, handleList, editCard, deleteCard, doubleClickCard }) => { |
| | | let target = null |
| | | |
| | | const [cards, setCards] = useState(config.components) |
| | |
| | | const { card, index } = findCard(id) |
| | | const _cards = update(cards, { $splice: [[index, 1], [atIndex, 0, card]] }) |
| | | handleList({...config, components: _cards}) |
| | | console.log(_cards) |
| | | } |
| | | |
| | | if (!is(fromJS(cards), fromJS(config.components))) { |
| | |
| | | } |
| | | |
| | | let newcard = fromJS(item.param).toJS() |
| | | Object.keys(newcard).forEach(key => { |
| | | if (newcard[key].editable) { |
| | | newcard[key].uuid = Utils.getuuid() |
| | | } |
| | | }) |
| | | newcard.uuid = Utils.getuuid() |
| | | |
| | | let targetId = cards.length > 0 ? cards[cards.length - 1].uuid : 0 |
| | |
| | | key={card.uuid} |
| | | card={card} |
| | | moveCard={moveCard} |
| | | // editCard={editCard} |
| | | // delCard={delCard} |
| | | editCard={editCard} |
| | | delCard={deleteCard} |
| | | findCard={findCard} |
| | | hasDrop={hasDrop} |
| | | // doubleClickCard={doubleClickBtn} |
| | |
| | | .common-drawarea-placeholder { |
| | | width: 100%; |
| | | line-height: 65px; |
| | | text-align: center; |
| | | color: #bcbcbc; |
| | | .mob-shell-inner { |
| | | .mk-component-card { |
| | | position: relative; |
| | | .remove-component { |
| | | position: absolute; |
| | | right: 2px; |
| | | top: 50%; |
| | | background: #2f54eb; |
| | | border-radius: 2px; |
| | | padding: 4px; |
| | | color: #ffffff; |
| | | cursor: pointer; |
| | | display: none; |
| | | } |
| | | } |
| | | .mk-component-card:hover { |
| | | .remove-component { |
| | | display: inline-block; |
| | | } |
| | | } |
| | | } |
| | |
| | | import zhCN from '@/locales/zh-CN/mob.js' |
| | | import enUS from '@/locales/en-US/mob.js' |
| | | import mobLogin1 from '@/assets/mobimg/mob-login1.png' |
| | | import mklogo from '@/assets/mobimg/mklogo.png' |
| | | |
| | | const _dict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS |
| | | |
| | |
| | | title: _dict['mob.login'], |
| | | sourceType: 'login', |
| | | options: [ |
| | | {sourceType: 'mob-login-1', type: 'mob', url: mobLogin1, style: {}, param: { |
| | | type: 'login', subtype: 'mob-login-1', components: [ |
| | | {} |
| | | ] |
| | | }}, |
| | | {sourceType: 'mob-login-1', type: 'mob', url: mobLogin1, style: {}, |
| | | param: { |
| | | type: 'login', subtype: 'mob-login-1', |
| | | box: { editable: true, paddingTop: '17vh', background: '', color: '#ffffff' }, |
| | | logo: { editable: true, content: mklogo }, |
| | | title: { editable: true, content: '明科商业智能开放平台', fontSize: '20px', fontWeight: 'bold', color: '#ffffff' }, |
| | | login: { editable: true, content: '登录', fontSize: '20px', fontWeight: 'bold', color: '#ffffff' }, |
| | | copyright: { editable: true, content: 'Copyright©2017 所有相关版权归 北京明科普华信息技术有限公司', fontSize: '12px', color: '#ffffff' } |
| | | } |
| | | }, |
| | | ] |
| | | }] |
| | |
| | | } |
| | | |
| | | if (plot.subelement.includes('avatar')) { |
| | | card.avatar = { type: plot.avatar.type } |
| | | card.avatar = { type: plot.avatar.type, display: plot.avatar.display || 'inline' } |
| | | if (card.avatar.type === 'icon' && colMap.get(plot.avatar.field)) { |
| | | let col = fromJS(colMap.get(plot.avatar.field)).toJS() |
| | | let _marks = [] |
| | |
| | | _cardWidth = Math.floor(_outWidth * plot.cardWidth / 24 - 20) |
| | | } |
| | | |
| | | if (card.avatar.widthType === 'ratio') { |
| | | if (card.avatar.widthType === 'ratio' && card.avatar.display !== 'block') { |
| | | if (card.avatar.width < 90) { |
| | | _flex = true |
| | | } |
| | | } else if (card.avatar.width < _cardWidth * 0.9) { |
| | | } else if (card.avatar.width < _cardWidth * 0.9 && card.avatar.display !== 'block') { |
| | | _flex = true |
| | | } |
| | | |
| | |
| | | let deffers = [] |
| | | |
| | | formlist.forEach(item => { |
| | | if (!['select', 'link', 'multiselect'].includes(item.type) || item.resourceType !== '1') return |
| | | if ( |
| | | !['select', 'link', 'multiselect'].includes(item.type) || |
| | | item.resourceType !== '1' || |
| | | (item.type !== 'link' && item.hidden === 'true') |
| | | ) return |
| | | |
| | | let param = { |
| | | func: 'sPC_Get_SelectedList', |
| | |
| | | imgShow: false, // 图片放大模态框 |
| | | imgSrc: '', // 图片路径 |
| | | lineMarks: null, // 行标记 |
| | | colMap: null // 列信息(全部) |
| | | colMap: null, // 列信息(全部) |
| | | activeIndex: null // 标记当前选中行 |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | |
| | | * |
| | | */ |
| | | onSelectChange = selectedRowKeys => { |
| | | const { setting } = this.props |
| | | |
| | | let index = '' |
| | | let _activeIndex = null |
| | | if (selectedRowKeys.length > 0) { |
| | | index = selectedRowKeys[selectedRowKeys.length - 1] |
| | | } |
| | | |
| | | if (setting.tableType === 'checkbox') { |
| | | _activeIndex = index === '' ? null : index |
| | | } |
| | | |
| | | this.changedata(index) |
| | | |
| | | this.setState({ selectedRowKeys }) |
| | | this.setState({ selectedRowKeys, activeIndex: _activeIndex }) |
| | | |
| | | let selects = [] |
| | | selectedRowKeys.forEach(item => { |
| | |
| | | this.changedata(index) |
| | | this.setState({ selectedRowKeys: newkeys }) |
| | | } else { |
| | | let _re = newkeys.includes(index) |
| | | if (_re) { |
| | | let _index = '' |
| | | if (newkeys.includes(index)) { |
| | | newkeys = newkeys.filter(item => item !== index) |
| | | this.changedata('') |
| | | if (newkeys.length > 0) { |
| | | _index = newkeys[newkeys.length - 1] |
| | | } |
| | | this.changedata(_index) |
| | | } else { |
| | | _index = index |
| | | newkeys.push(index) |
| | | this.changedata(index) |
| | | } |
| | | |
| | | this.setState({ selectedRowKeys: newkeys }) |
| | | this.setState({ selectedRowKeys: newkeys, activeIndex: _index !== '' ? _index : null }) |
| | | } |
| | | |
| | | let selects = [] |
| | |
| | | this.setState({ |
| | | pageIndex: pagination.current, |
| | | pageSize: pagination.pageSize, |
| | | selectedRowKeys: [] |
| | | selectedRowKeys: [], |
| | | activeIndex: null |
| | | }) |
| | | this.props.refreshdata(pagination, filters, sorter) |
| | | } |
| | |
| | | resetTable = () => { |
| | | this.setState({ |
| | | pageIndex: 1, |
| | | selectedRowKeys: [] |
| | | selectedRowKeys: [], |
| | | activeIndex: null |
| | | }) |
| | | } |
| | | |
| | | render() { |
| | | const { setting, pickup } = this.props |
| | | const { selectedRowKeys, lineMarks, colMap } = this.state |
| | | const { selectedRowKeys, lineMarks, colMap, activeIndex } = this.state |
| | | |
| | | // 设置表格选择属性:单选、多选、不可选 |
| | | let rowSelection = null |
| | |
| | | columns={this.state.columns} |
| | | dataSource={_data} |
| | | rowClassName={(record) => { |
| | | if (lineMarks.length === 0) return '' |
| | | |
| | | let className = '' |
| | | if (setting.tableType === 'checkbox' && record.key === activeIndex) { |
| | | className = 'mk-row-active ' |
| | | } |
| | | |
| | | if (lineMarks.length === 0) return className |
| | | |
| | | lineMarks.some(mark => { |
| | | let originType = colMap.get(mark.field).type |
| | |
| | | .ant-table-tbody > tr.background td { |
| | | background-color: unset!important; |
| | | } |
| | | .ant-table-tbody > tr.mk-row-active:not(.background) td { |
| | | background-color: #91d5ff; |
| | | } |
| | | .ant-table-tbody > tr.ant-table-row-selected.mk-row-active:not(.background):hover .ant-table-column-sort { |
| | | background-color: #91d5ff; |
| | | } |
| | | .ant-table-tbody > tr td .anticon.font { |
| | | background-color: unset; |
| | | } |
| | |
| | | img { |
| | | max-width: 100%; |
| | | display: block; |
| | | float: right; |
| | | } |
| | | img + img { |
| | | margin-top: 10px; |
| | |
| | | import ColumnComponent from '@/templates/sharecomponent/columncomponent' |
| | | |
| | | import MenuForm from '@/templates/zshare/menuform' |
| | | import EditComponent from '@/templates/zshare/editcomponent' |
| | | import SourceElement from '@/templates/zshare/dragsource' |
| | | import Source from './source' |
| | | import './index.scss' |
| | | |
| | | const { Panel } = Collapse |
| | | const { confirm } = Modal |
| | | const EditComponent = asyncComponent(() => import('@/templates/zshare/editcomponent')) |
| | | const SettingComponent = asyncComponent(() => import('@/templates/sharecomponent/settingcomponent')) |
| | | const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent')) |
| | | const FieldsComponent = asyncComponent(() => import('@/templates/sharecomponent/fieldscomponent')) |
| | |
| | | } bordered={false} extra={ |
| | | <div> |
| | | <EditComponent dict={this.state.dict} type="maintable" config={this.state.config} MenuID={this.props.menu.MenuID} thawButtons={this.state.thawButtons} refresh={this.editConfig}/> |
| | | <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={this.state.config.enabled} onChange={this.onEnabledChange} /> |
| | | <Switch className="big" checkedChildren={this.state.dict['model.enable']} unCheckedChildren={this.state.dict['model.disable']} checked={this.state.config.enabled} onChange={this.onEnabledChange} /> |
| | | <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['header.save']}</Button> |
| | | <Button onClick={this.cancelConfig}>{this.state.dict['header.return']}</Button> |
| | | </div> |
| | |
| | | |
| | | if (card.avatar.type === 'picture') { |
| | | if (card.avatar.widthType === 'ratio') { |
| | | if (card.avatar.width < 90) { |
| | | if (card.avatar.width < 90 && card.avatar.display !== 'block') { |
| | | metastyle.display = 'flex' |
| | | } |
| | | } else { |
| | | if (card.avatar.width < _cardWidth * 0.9) { |
| | | if (card.avatar.width < _cardWidth * 0.9 && card.avatar.display !== 'block') { |
| | | metastyle.display = 'flex' |
| | | } |
| | | } |
| | | } else { |
| | | if (card.avatar.size < _cardWidth * 0.9) { |
| | | if (card.avatar.size < _cardWidth * 0.9 && card.avatar.display !== 'block') { |
| | | metastyle.display = 'flex' |
| | | } |
| | | } |
| | |
| | | widthType: 'ratio', |
| | | width: 32, |
| | | avatarWidth: 32, |
| | | radius: 'true' |
| | | radius: 'true', |
| | | display: 'inline' |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | state = { |
| | | dict: (!localStorage.getItem('lang') || localStorage.getItem('lang') === 'zh-CN') ? zhCN : enUS, |
| | | dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | chartlist: null, // 图表集 |
| | | card: null, // 编辑中元素 |
| | | formlist: null, // 表单信息 |
| | |
| | | {columnlist && columnlist.length > 0 ? |
| | | <Icon className="column-copy" title="copy" type="copy" onClick={this.copycolumn} /> : null |
| | | } |
| | | <Switch checkedChildren="开" unCheckedChildren="关" defaultChecked={this.state.showField} onChange={this.onFieldChange} /> |
| | | <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={this.onFieldChange} /> |
| | | <DragElement |
| | | list={columnlist} |
| | | setting={config.setting} |
| | |
| | | .column-copy { |
| | | position: absolute; |
| | | font-size: 16px; |
| | | right: 75px; |
| | | right: 85px; |
| | | top: -7px; |
| | | color: #26C281; |
| | | } |
| | |
| | | import Api from '@/api' |
| | | import PasteForm from '@/templates/zshare/pasteform' |
| | | import TransferForm from '@/templates/zshare/basetransferform' |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import './index.scss' |
| | | |
| | | class editComponent extends Component { |
| | |
| | | } |
| | | |
| | | state = { |
| | | dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | thawVisible: false, |
| | | thawbtnlist: null, |
| | | pasteVisible: false |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { dict } = this.state |
| | | const menu = ( |
| | | <Menu onClick={this.handleMenuClick}> |
| | | {this.props.type !== 'TreePage' ? <Menu.Item key="thaw"><Icon type="unlock" />{this.props.dict['header.form.thawbutton']}</Menu.Item> : null} |
| | |
| | | <div style={{display: 'inline-block'}}> |
| | | <Dropdown overlay={menu} overlayClassName="edit-component-box"> |
| | | <span style={{color: '#1890ff', display: 'inline-block', height: 25}}> |
| | | 编辑 <Icon type="down" /> |
| | | {dict['model.edit']} <Icon type="down" /> |
| | | </span> |
| | | </Dropdown> |
| | | {/* 解冻按钮模态框 */} |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'fstMenuId', |
| | | label: '一级菜单', |
| | | label: Formdict['model.menu.level1'], |
| | | initVal: menu.fstMenuId, |
| | | required: true, |
| | | readonly: false, |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'parentId', |
| | | label: '二级菜单', |
| | | label: Formdict['model.menu.level2'], |
| | | initVal: menu.ParentID, |
| | | required: true, |
| | | readonly: false, |
| | |
| | | value: 'all', |
| | | text: '全部' |
| | | }] |
| | | } |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'display', |
| | | label: '显示', |
| | | initVal: card.display || 'inline', |
| | | required: false, |
| | | forbid: !['avatar'].includes(_type), |
| | | options: [{ |
| | | value: 'block', |
| | | text: '整行' |
| | | }, { |
| | | value: 'inline', |
| | | text: '自动' |
| | | }] |
| | | }, |
| | | ] |
| | | } |
| | |
| | | _fields.push(...group.sublist) |
| | | }) |
| | | |
| | | let _usefulfields = ['BID', 'ID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey', 'UserName', 'FullName'] |
| | | let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)'] |
| | | let _select = ['@UserName=\'\'', '@FullName=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\''] |
| | | let _usefulfields = ['BID', 'ID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey', 'UserName', 'FullName', 'BillCode', 'BVoucher', 'FIBVoucherDate', 'FiYear', 'ModularDetailCode'] |
| | | let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)', '@BillCode nvarchar(50)', '@BVoucher nvarchar(50)', '@FIBVoucherDate nvarchar(50)', '@FiYear nvarchar(50)', '@ModularDetailCode nvarchar(50)'] |
| | | let _select = ['@UserName=\'\'', '@FullName=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\'', '@BillCode=\'\'', '@BVoucher=\'\'', '@FIBVoucherDate=\'\'', '@FiYear=\'\'', '@ModularDetailCode=\'\''] |
| | | let fieldArr = _usefulfields.map(_f => _f.toLowerCase()) |
| | | |
| | | _fields.forEach(_f => { |
| | |
| | | _fields = _LongParam.fields |
| | | } |
| | | |
| | | let _usefulfields = ['BID', 'ID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey', 'UserName', 'FullName'] |
| | | let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)'] |
| | | let _select = ['@UserName=\'\'', '@FullName=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\''] |
| | | let _usefulfields = ['BID', 'ID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey', 'UserName', 'FullName', 'BillCode', 'BVoucher', 'FIBVoucherDate', 'FiYear', 'ModularDetailCode'] |
| | | let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)', '@BillCode nvarchar(50)', '@BVoucher nvarchar(50)', '@FIBVoucherDate nvarchar(50)', '@FiYear nvarchar(50)', '@ModularDetailCode nvarchar(50)'] |
| | | let _select = ['@UserName=\'\'', '@FullName=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\'', '@BillCode=\'\'', '@BVoucher=\'\'', '@FIBVoucherDate=\'\'', '@FiYear=\'\'', '@ModularDetailCode=\'\''] |
| | | let hasBid = false |
| | | let fieldArr = _usefulfields.map(_f => _f.toLowerCase()) |
| | | let _defaultfields = fromJS(_fields).toJS() |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | let _usefulfields = ['BID', 'ID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey', 'UserName', 'FullName'] |
| | | let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)'] |
| | | let _select = ['@UserName=\'\'', '@FullName=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\''] |
| | | let _usefulfields = ['BID', 'ID', 'LoginUID', 'SessionUid', 'UserID', 'Appkey', 'UserName', 'FullName', 'BillCode', 'BVoucher', 'FIBVoucherDate', 'FiYear', 'ModularDetailCode'] |
| | | let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)', '@BillCode nvarchar(50)', '@BVoucher nvarchar(50)', '@FIBVoucherDate nvarchar(50)', '@FiYear nvarchar(50)', '@ModularDetailCode nvarchar(50)'] |
| | | let _select = ['@UserName=\'\'', '@FullName=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\'', '@BillCode=\'\'', '@BVoucher=\'\'', '@FIBVoucherDate=\'\'', '@FiYear=\'\'', '@ModularDetailCode=\'\''] |
| | | let fieldArr = _usefulfields.map(_f => _f.toLowerCase()) |
| | | |
| | | if (columns && columns.length > 0 && this.props.card.Ot !== 'notRequired') { |
| | |
| | | // 初始化凭证及用户信息字段 |
| | | _sql += ` |
| | | /* 凭证及用户信息初始化赋值 */ |
| | | select @BVoucher='',@FIBVoucherDate='',@FiYear='',@ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}' |
| | | select @BVoucher='',@FIBVoucherDate='',@FiYear='',@ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @BillCode='', @ModularDetailCode='' |
| | | ` |
| | | |
| | | if (_initCustomScript) { |
| | |
| | | import { fromJS } from 'immutable' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { SketchPicker } from 'react-color' |
| | | import { Icon, Tabs, notification } from 'antd' |
| | | import { Icon, Tabs, notification, Modal } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | | import zhCN from '@/locales/zh-CN/mob.js' |
| | |
| | | import './index.scss' |
| | | |
| | | const { TabPane } = Tabs |
| | | const { confirm } = Modal |
| | | |
| | | const Header = asyncComponent(() => import('@/mob/header')) |
| | | const MobShell = asyncComponent(() => import('@/mob/mobshell')) |
| | |
| | | }) |
| | | } |
| | | |
| | | |
| | | deleteCard = (id) => { |
| | | let _this = this |
| | | let config = fromJS(this.state.config).toJS() |
| | | |
| | | confirm({ |
| | | title: '确定删除元素吗?', |
| | | content: '', |
| | | okText: this.state.dict['mob.confirm'], |
| | | cancelText: this.state.dict['mob.cancel'], |
| | | onOk() { |
| | | config.components = config.components.filter(item => item.uuid !== id) |
| | | |
| | | _this.setState({ |
| | | config: config |
| | | }) |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | | } |
| | | |
| | | editCard = (element) => { |
| | | console.log(element) |
| | | } |
| | | |
| | | updateConfig = (config) => { |
| | | this.setState({ |
| | |
| | | </div> |
| | | {appType === 'mob' && config ? |
| | | <div className="mob-shell"> |
| | | <MobShell config={config} handleList={this.updateConfig} /> |
| | | <MobShell config={config} deleteCard={this.deleteCard} editCard={this.editCard} handleList={this.updateConfig} /> |
| | | </div> : null |
| | | } |
| | | <div className="mob-setting"> |