| | |
| | | ] |
| | | ] |
| | | }, |
| | | "homepage": "." |
| | | "homepage": "./build" |
| | | } |
| | |
| | | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| | | <meta name="theme-color" content="#000000" /> |
| | | <meta name="description" content="minkesoft" /> |
| | | <link rel="apple-touch-icon" href="logo.png" /> |
| | | <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> |
| | | <script src="./options.js"></script> |
| | | <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo.png" /> |
| | | <script src="%PUBLIC_URL%/options.js"></script> |
| | | <title>MinkeSoft</title> |
| | | </head> |
| | | <body> |
| | |
| | | font-family: 'anticonicon'; |
| | | src: url('../font/minkeicon.eot?httt7e'); |
| | | src: url('../font/minkeicon.eot?httt7e#iefix') format('embedded-opentype'), |
| | | url('../font/minkeicon.ttf?httt7e') format('truetype'), |
| | | url('../font/minkeicon.woff?httt7e') format('woff'), |
| | | /* url('../font/minkeicon.ttf?httt7e') format('truetype'), |
| | | url('../font/minkeicon.woff?httt7e') format('woff'), */ |
| | | url('../font/minkeicon.svg?httt7e#minkeicon') format('svg'); |
| | | font-weight: normal; |
| | | font-style: normal; |
| | |
| | | [class^="anticon-"], [class*=" anticon-"] { |
| | | /* use !important to prevent issues with browser extensions that change fonts */ |
| | | font-family: 'anticonicon' !important; |
| | | speak: none; |
| | | /* speak: none; */ |
| | | font-style: normal; |
| | | font-weight: normal; |
| | | font-variant: normal; |
| | |
| | | 'header.form.popform': '弹窗(表单)', |
| | | 'header.form.popview': '弹窗(页面)', |
| | | 'header.form.tab': '新标签页', |
| | | 'header.form.excelIn': 'Excel导入', |
| | | 'header.form.excelOut': 'Excel导出', |
| | | 'header.form.newpage': '新页面', |
| | | 'header.form.newpage.inner': '新页面(内部)', |
| | | 'header.form.newpage.outer': '新页面(外部)', |
| | |
| | | 'main.action.primarykey.required': 'Primary key not set!', |
| | | 'main.action.primarykey.repetition': 'There are multiple primary keys!', |
| | | 'main.action.primarykey.repetitionbid': 'There are multiple BID!', |
| | | 'main.column.operation': '操作', |
| | | 'form.required.input': 'Please input ', |
| | | 'form.required.select': 'Please select ' |
| | | } |
| | |
| | | 'header.form.popform': '弹窗(表单)', |
| | | 'header.form.popview': '弹窗(页面)', |
| | | 'header.form.tab': '新标签页', |
| | | 'header.form.excelIn': 'Excel导入', |
| | | 'header.form.excelOut': 'Excel导出', |
| | | 'header.form.newpage': '新页面', |
| | | 'header.form.newpage.inner': '新页面(内部)', |
| | | 'header.form.newpage.outer': '新页面(外部)', |
| | |
| | | 'main.action.primarykey.required': '未设置主键!', |
| | | 'main.action.primarykey.repetition': '存在多个主键!', |
| | | 'main.action.primarykey.repetitionbid': '存在多个BID!', |
| | | 'main.column.operation': '操作', |
| | | 'form.required.input': '请输入', |
| | | 'form.required.select': '请选择' |
| | | } |
| | |
| | | } |
| | | }) |
| | | |
| | | let _actions = config.action.filter(item => item.position === 'toolbar') |
| | | let _operation = config.action.filter(item => item.position === 'grid') |
| | | |
| | | if (_operation.length > 0) { |
| | | _columns.push({ |
| | | Align: 'center', |
| | | uuid: Utils.getuuid(), |
| | | IsSort: 'false', |
| | | Width: 120, |
| | | type: 'operation', |
| | | style: 'button', |
| | | label: this.state.dict['main.column.operation'], |
| | | operations: _operation |
| | | }) |
| | | } |
| | | |
| | | this.setState({ |
| | | config: config, |
| | | setting: config.setting, |
| | | searchlist: config.search, |
| | | actions: config.action, |
| | | actions: _actions, |
| | | columns: _columns, |
| | | arr_field: _arrField.join(','), |
| | | search: _search ? 'where (' + _search + ')' : '', |
| | |
| | | |
| | | let LText = `select top ${pageSize} ${arr_field} from (select ${arr_field} ,ROW_NUMBER() over(order by ${orderColumn} ${orderType}) as rows from ${setting.dataresource} ${search}) tmptable where rows > ${pageSize * (pageIndex - 1)} order by tmptable.rows` |
| | | let DateCount = `select count(1) as total from ${setting.dataresource} ${search}` |
| | | console.log(LText) |
| | | console.log(DateCount) |
| | | |
| | | param.LText = Utils.formatOptions(LText) |
| | | param.DateCount = Utils.formatOptions(DateCount) |
| | | let result = await Api.genericInterface(param) |
| | |
| | | }) |
| | | } else { |
| | | this.setState({ |
| | | data: [1,2,3,4,5,6,7,8,9,10].map((item, index) => { |
| | | let cell = {} |
| | | this.state.config.columns.forEach(column => { |
| | | if (!column.field) return |
| | | cell[column.field] = 'test' + item |
| | | }) |
| | | cell.key = index |
| | | return cell |
| | | }), |
| | | total: 329, |
| | | loading: false |
| | | }) |
| | | notification.error({ |
| | |
| | | } |
| | | .ant-form-item-label { |
| | | width: 100px; |
| | | text-overflow: ellipsis; |
| | | } |
| | | .daterange .ant-calendar-picker-input { |
| | | padding: 4px 20px 4px 5px; |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | // import { is, fromJS } from 'immutable' |
| | | import { Table, message, Affix } from 'antd' |
| | | import { Table, message, Affix, Button } from 'antd' |
| | | import './index.scss' |
| | | |
| | | export default class MainTable extends Component { |
| | |
| | | sorter: item.field && item.IsSort === 'true', |
| | | width: item.Width || 120, |
| | | render: (text, record) => { |
| | | let content = '' |
| | | if (item.field) { |
| | | content = record[item.field] || '' |
| | | } |
| | | return ( |
| | | <div className="content" style={{ minWidth: (item.Width || 120) + 'px' }}> |
| | | {content} |
| | | </div> |
| | | ) |
| | | return this.getContent(item, record) |
| | | // let content = '' |
| | | // if (item.field) { |
| | | // content = record[item.field] || '' |
| | | // } |
| | | // return ( |
| | | // <div className="content" style={{ minWidth: (item.Width || 120) + 'px' }}> |
| | | // {content} |
| | | // </div> |
| | | // ) |
| | | } |
| | | } |
| | | _columns.push(cell) |
| | |
| | | this.setState({columns: _columns}) |
| | | } |
| | | |
| | | getContent = (item, record) => { |
| | | if (item.type === 'operation') { |
| | | return ( |
| | | <div className={item.style} style={{ minWidth: (item.Width || 120) + 'px' }}> |
| | | {item.operations.map(btn => { |
| | | return <Button |
| | | className={'mk-btn mk-' + btn.class} |
| | | icon={btn.icon} |
| | | key={btn.uuid} |
| | | onClick={(e) => {this.actionTrigger(e, btn, record)}} |
| | | >{btn.label}</Button> |
| | | })} |
| | | </div> |
| | | ) |
| | | } else { |
| | | let content = '' |
| | | if (item.field) { |
| | | content = record[item.field] || '' |
| | | } |
| | | return ( |
| | | // <div className="content" style={{ minWidth: (item.Width || 120) + 'px' }}> |
| | | <div> |
| | | <div className={'background'}></div> |
| | | <div className="content" style={{ minWidth: (item.Width || 120) + 'px' }}> |
| | | {content} |
| | | </div> |
| | | </div> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | actionTrigger = (e, btn, record) => { |
| | | e.stopPropagation() |
| | | console.log(btn) |
| | | console.log(record) |
| | | } |
| | | |
| | | copycontent = (e, content) => { |
| | | // 表格中内容复制 |
| | | e.stopPropagation() |
| | |
| | | min-width: 60px; |
| | | max-width: 60px; |
| | | } |
| | | // .ant-table-tbody > tr td:not(.ant-table-selection-column) { |
| | | // padding: 0!important; |
| | | // } |
| | | // .ant-table-tbody > tr td .content { |
| | | // padding: 12px 8px; |
| | | // height: 100%; |
| | | // background: lightblue; |
| | | // } |
| | | .ant-table-tbody > tr.ant-table-row-selected td { |
| | | background-color: #c4ebfd; |
| | | } |
| | |
| | | border-right: 0; |
| | | } |
| | | .ant-table-tbody > tr > td.ant-table-column-has-actions { |
| | | position: relative; |
| | | .background { |
| | | position: absolute; |
| | | top: 0px; |
| | | left: 0px; |
| | | right: 0px; |
| | | bottom: 0px; |
| | | } |
| | | .background.lightblue { |
| | | background: lightblue; |
| | | } |
| | | .content { |
| | | position: relative; |
| | | z-index: 1; |
| | | word-wrap: break-word; |
| | | word-break: break-word; |
| | | } |
File was renamed from src/tabviews/datamanage/modules/action/index.jsx |
| | |
| | | } |
| | | return ( |
| | | <Modal |
| | | wrapClassName='action-modal' |
| | | wrapClassName='datamanage-action-modal' |
| | | title={this.state.execAction.MenuName || ''} |
| | | visible={this.state.visible} |
| | | width={document.body.clientWidth * this.state.execAction.PopWidth} |
| | |
| | | render() { |
| | | return ( |
| | | <Affix offsetTop={48}> |
| | | <div className="button-list" id={this.props.MenuNo + 'mainaction'}> |
| | | <div className="datamanage-button-list" id={this.props.MenuNo + 'mainaction'}> |
| | | {this.props.actions.map((item, index) => { |
| | | return ( |
| | | <Button |
File was renamed from src/tabviews/datamanage/modules/action/index.scss |
| | |
| | | .button-list { |
| | | .datamanage-button-list { |
| | | padding: 10px 20px 5px; |
| | | background: #ffffff; |
| | | button { |
| | |
| | | } |
| | | } |
| | | // 设置模态框样式,规定最大最小高度,重置滚动条 |
| | | .action-modal { |
| | | .datamanage-action-modal { |
| | | .ant-modal { |
| | | max-width: 95vw; |
| | | } |
| | |
| | | import MutilForm from '@/components/mutilform' |
| | | import {refreshTabView} from '@/store/action' |
| | | import Api from '@/api' |
| | | import DataSearch from './modules/search' |
| | | import DataAction from './modules/action' |
| | | import DataTable from './modules/table' |
| | | import DataSearch from './search' |
| | | import DataAction from './action' |
| | | import DataTable from './table' |
| | | import Loading from '@/components/loading' |
| | | import zhCN from '@/locales/zh-CN/main.js' |
| | | import enUS from '@/locales/en-US/main.js' |
File was renamed from src/tabviews/datamanage/modules/search/index.jsx |
| | |
| | | |
| | | render() { |
| | | return ( |
| | | <Form className="ant-advanced-search-form main-search" onSubmit={this.handleSearch}> |
| | | <Form className="ant-advanced-search-form datamanage-search" onSubmit={this.handleSearch}> |
| | | <Row gutter={24}>{this.getFields()}</Row> |
| | | </Form> |
| | | ) |
File was renamed from src/tabviews/datamanage/modules/search/index.scss |
| | |
| | | .ant-advanced-search-form.main-search { |
| | | .ant-advanced-search-form.datamanage-search { |
| | | padding: 0px 24px 20px; |
| | | border-bottom: 1px solid #d9d9d9; |
| | | .ant-form-item { |
| | |
| | | } |
| | | .ant-form-item-label { |
| | | width: 100px; |
| | | text-overflow: ellipsis; |
| | | } |
| | | } |
File was renamed from src/tabviews/datamanage/modules/table/index.jsx |
| | |
| | | } |
| | | } |
| | | return ( |
| | | <div className="main-table"> |
| | | <div className="datamanage-table"> |
| | | {this.state.fixed && <Affix offsetTop={105} className="fix-header"> |
| | | <Table |
| | | bordered={true} |
File was renamed from src/tabviews/datamanage/modules/table/index.scss |
| | |
| | | .main-table { |
| | | .datamanage-table { |
| | | padding: 0 20px 110px; |
| | | table { |
| | | max-width: 100%; |
| | |
| | | formlist: null, |
| | | openType: null, |
| | | interType: null, |
| | | position: null, |
| | | reqOptionSgl: [{ |
| | | MenuID: 'requiredSgl', |
| | | text: this.props.dict['header.form.requiredSgl'] |
| | |
| | | }, { |
| | | MenuID: 'requiredOnce', |
| | | text: this.props.dict['header.form.requiredOnce'] |
| | | }] |
| | | }], |
| | | // [{ |
| | | // MenuID: 'toolbar', |
| | | // text: this.state.dict['header.form.toolbar'] |
| | | // }, { |
| | | // MenuID: 'grid', |
| | | // text: this.state.dict['header.form.grid'] |
| | | // }] |
| | | } |
| | | |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | let _opentype = this.props.formlist.filter(form => form.key === 'OpenType')[0].initVal |
| | | let _intertype = this.props.formlist.filter(form => form.key === 'intertype')[0].initVal |
| | | let _position = this.props.formlist.filter(form => form.key === 'position')[0].initVal |
| | | let _options = null |
| | | if (_opentype === 'innerpage') { // 新页面(内部),可选模板 |
| | | _options = ['label', 'Ot', 'OpenType', 'pageTemplate', 'icon', 'class', 'position'] |
| | |
| | | _options = ['label', 'Ot', 'OpenType', 'url', 'icon', 'class', 'position'] |
| | | } else if (_opentype === 'blank' || _opentype === 'tab' || _opentype === 'popview') { |
| | | _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position'] |
| | | } else if (_opentype === 'excelIn' || _opentype === 'excelOut') { |
| | | if (_intertype === 'outer') { |
| | | _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError', 'method'] |
| | | } else { |
| | | _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'sql'] |
| | | } |
| | | } else { |
| | | if (_intertype === 'outer') { |
| | | _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'method'] |
| | | _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'method'] |
| | | } else { |
| | | _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql'] |
| | | } |
| | |
| | | this.setState({ |
| | | openType: _opentype, |
| | | interType: _intertype, |
| | | position: _position, |
| | | formlist: this.props.formlist.map(item => { |
| | | if (item.key === 'class') { |
| | | item.options = btnClasses |
| | | } else if (item.key === 'icon') { |
| | | item.options = btnIcons |
| | | } else if (item.key === 'Ot') { |
| | | if (_opentype === 'innerpage') { |
| | | if (_opentype === 'innerpage' || _position === 'grid') { |
| | | item.options = this.state.reqOptionSgl |
| | | } else if (['outerpage', 'blank', 'tab', 'pop', 'popview'].includes(_opentype)) { |
| | | item.options = this.state.reqOptions |
| | |
| | | }) |
| | | } |
| | | |
| | | // 打开方式或显示位置变化 |
| | | openTypeChange = (key, value) => { |
| | | if (key === 'OpenType') { |
| | | let _options = null |
| | |
| | | _options = ['label', 'Ot', 'OpenType', 'url', 'icon', 'class', 'position'] |
| | | } else if (value === 'blank' || value === 'tab' || value === 'popview') { |
| | | _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position'] |
| | | } else if (value === 'excelIn' || value === 'excelOut') { |
| | | if (this.state.interType === 'outer') { |
| | | _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError', 'method'] |
| | | } else { |
| | | _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'sql'] |
| | | } |
| | | } else { |
| | | if (this.state.interType === 'inner') { |
| | | _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql'] |
| | |
| | | } |
| | | } |
| | | if (item.key === 'Ot') { |
| | | if (value === 'innerpage') { |
| | | if (value === 'innerpage' || this.state.position === 'grid') { |
| | | item.options = this.state.reqOptionSgl |
| | | item.initVal = 'requiredSgl' |
| | | item.hidden = true |
| | |
| | | return item |
| | | }) |
| | | }, () => { |
| | | if (!['innerpage', 'outerpage', 'blank', 'tab', 'pop', 'popview'].includes(value)) return |
| | | if (['excelIn', 'excelOut'].includes(value)) return |
| | | |
| | | this.setState({ |
| | | formlist: this.state.formlist.map(item => { |
| | | if (item.key === 'Ot') { |
| | | item.hidden = false |
| | | } |
| | | return item |
| | | }) |
| | | }) |
| | | }) |
| | | } else if (key === 'position') { |
| | | this.setState({ |
| | | position: value, |
| | | formlist: this.state.formlist.map(item => { |
| | | if (item.key === 'Ot') { |
| | | if (this.state.openType === 'innerpage' || value === 'grid') { |
| | | item.options = this.state.reqOptionSgl |
| | | item.initVal = 'requiredSgl' |
| | | item.hidden = true |
| | | } else if (['outerpage', 'blank', 'tab', 'pop', 'popview'].includes(this.state.openType)) { |
| | | item.options = this.state.reqOptions |
| | | item.initVal = 'requiredSgl' |
| | | item.hidden = true |
| | | } else { |
| | | item.options = this.state.reqOptionsMutil |
| | | } |
| | | } |
| | | return item |
| | | }) |
| | | }, () => { |
| | | this.setState({ |
| | | formlist: this.state.formlist.map(item => { |
| | | if (item.key === 'Ot') { |
| | |
| | | values.id = this.props.card.id |
| | | values.uuid = this.props.card.uuid |
| | | |
| | | if (values.OpenType === 'excelIn' || values.OpenType === 'excelOut') { |
| | | values.position = 'toolbar' |
| | | values.Ot = 'notRequired' |
| | | } |
| | | |
| | | if (values.innerFunc === '' && values.sql === '') { |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | MenuID: 'tab', |
| | | text: this.state.dict['header.form.tab'] |
| | | }, { |
| | | MenuID: 'excelIn', |
| | | text: this.state.dict['header.form.excelIn'] |
| | | }, { |
| | | MenuID: 'excelOut', |
| | | text: this.state.dict['header.form.excelOut'] |
| | | }, { |
| | | MenuID: 'blank', |
| | | text: this.state.dict['header.form.blank'] |
| | | }, { |
| | |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'Ot', |
| | | label: this.state.dict['header.form.isRequired'], |
| | | initVal: card.Ot || 'requiredSgl', |
| | | required: true, |
| | | options: [] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'callbackFunc', |
| | | label: this.state.dict['header.form.callbackFunc'], |
| | |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'Ot', |
| | | label: this.state.dict['header.form.isRequired'], |
| | | initVal: card.Ot || 'requiredSgl', |
| | | required: true, |
| | | options: [] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'execSuccess', |
| | | label: this.state.dict['header.form.execSuccess'], |
| | | initVal: card.execSuccess || 'never', |
| | |
| | | background: #ffffff; |
| | | border-right: 1px solid #d9d9d9; |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | overflow-y: hidden; |
| | | // overflow-y: auto; |
| | | padding-bottom: 30px; |
| | | .ant-collapse-item { |
| | | position: relative; |
| | |
| | | .ant-collapse-header { |
| | | padding: 11px 16px 10px 40px; |
| | | border-bottom: 1px solid #d9d9d9; |
| | | background: #1890ff; |
| | | color: #ffffff; |
| | | } |
| | | .ant-collapse-content-box { |
| | | .ant-form-item { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .tools:hover { |
| | | overflow-y: auto; |
| | | } |
| | | .tools::-webkit-scrollbar { |
| | | width: 7px; |
| | | } |
| | |
| | | }, |
| | | { |
| | | type: 'action', |
| | | label: CommonDict['header.form.excelIn'], |
| | | subType: 'excelIn', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'action', |
| | | label: CommonDict['header.form.excelOut'], |
| | | subType: 'excelOut', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'action', |
| | | label: CommonDict['header.form.blank'], |
| | | subType: 'blank', |
| | | url: '' |
| | |
| | | import options from '@/store/options.js' |
| | | import Utils from '@/utils/utils.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import logourl from '../../assets/img/login-logo.png' |
| | | import logourl from '@/assets/img/login-logo.png' |
| | | import loginbg from '@/assets/img/loginbg.jpg' |
| | | import './index.scss' |
| | | |
| | | const LoginForm = asyncComponent(() => import('./loginform')) |
| | |
| | | <div className="logo"> |
| | | <img src={logourl} alt=""/> |
| | | </div> |
| | | <div className="login-middle"> |
| | | <div className="login-middle" style={{background: 'url(' + loginbg + ')'}}> |
| | | <LoginForm |
| | | dict={this.state.dict} |
| | | auth={this.state.auth} |
| | |
| | | .login-middle { |
| | | height: calc(100vh - 194px); |
| | | min-height: 420px; |
| | | background: url('../../assets/img/loginbg.jpg'); |
| | | // background: url('../../assets/img/loginbg.jpg'); |
| | | background-size: cover; |
| | | background-position: center center; |
| | | border-bottom: 2px solid #06b4f7; |
| | |
| | | .ant-btn { |
| | | font-size: 18px; |
| | | } |
| | | .anticon-eye { |
| | | color: #1890ff; |
| | | } |
| | | } |
| | | } |
| | | .login-bottom { |
| | |
| | | </Form.Item> |
| | | <Form.Item> |
| | | {getFieldDecorator('password', { |
| | | rules: [{ required: true, message: this.props.dict['login.password.empty'] }], |
| | | initialValue: localStorage.getItem('password') || '', |
| | | })( |
| | | <Input |
| | | prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} |
| | | type="password" |
| | | placeholder={this.props.dict['login.password']} |
| | | />, |
| | | )} |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.props.dict['login.password.empty'], |
| | | } |
| | | ] |
| | | })(<Input.Password placeholder={this.props.dict['login.password']} prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} />)} |
| | | </Form.Item> |
| | | <Form.Item className="minline"> |
| | | {getFieldDecorator('remember', { |