12 文件已重命名
25个文件已修改
1个文件已添加
| | |
| | | window.GLOB = { |
| | | service: 'mkwms', |
| | | appkey: '20191106103859640976D6E924E464D029CF0', |
| | | mainSystemApi: '', |
| | | mainSystemApi: 'http://qingqiumarket.cn/mkwms/webapi/dostar', |
| | | title: '', |
| | | platName: '', |
| | | logo: '', |
| | |
| | | import axios from 'axios' |
| | | import qs from 'qs' |
| | | import {notification } from 'antd' |
| | | import options from '@/store/options.js' |
| | | |
| | | // axios.defaults.baseURL = 'http://qingqiumarket.cn' |
| | | axios.defaults.crossDomain = true |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 重置密码 |
| | | */ |
| | | resetpassword (originpwd, newpwd) { |
| | | return axios({ |
| | | url: '/local/dostar', |
| | | data: { |
| | | func: 's_PwdUpt', |
| | | userid: sessionStorage.getItem('UserID'), |
| | | OriginPwd: originpwd, |
| | | NewPwd: newpwd |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 获取或修改系统配置,增加appkey |
| | |
| | | param.SessionUid = sessionStorage.getItem('SessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | param.appkey = window.GLOB.appkey || '' |
| | | if (window.GLOB.mainSystemApi) { |
| | | |
| | | if (sessionStorage.getItem('isEditState') && options.cloudServiceApi) { // 编辑状态,且存在云端地址 |
| | | param.rduri = options.cloudServiceApi |
| | | param.userid = sessionStorage.getItem('CloudUserID') |
| | | param.SessionUid = sessionStorage.getItem('CloudSessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('CloudLoginUID') || '' |
| | | } else if (window.GLOB.mainSystemApi) { |
| | | param.rduri = window.GLOB.mainSystemApi |
| | | } |
| | | |
| | |
| | | param.lang = localStorage.getItem('lang') || '' |
| | | param.SessionUid = sessionStorage.getItem('SessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | |
| | | |
| | | if (param.func === 'RolesAdd') { // 角色添加时,传appkey |
| | | param.appkey = window.GLOB.appkey || '' |
| | | } |
| | | |
| | | return axios({ |
| | | url: '/webapi/dostar', |
| | | data: param |
| | |
| | | } |
| | | |
| | | /** |
| | | * @description 获取页面配置信息 |
| | | * @param {String} MenuNo 页面菜单参数 |
| | | */ |
| | | getMainConfigsData (MenuNo) { |
| | | return axios({ |
| | | url: '/local/dostar', |
| | | data: { |
| | | func: 'GetMainConfigs', |
| | | userid: sessionStorage.getItem('UserID'), |
| | | MenuNo: MenuNo |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 获取页面列表数据 |
| | | * @param {String} MenuNo 页面菜单参数 |
| | | */ |
| | | getMainTableData (MenuNo, pageIndex = 1, pageSize = 10, orderColumn = '', orderType = '', search) { |
| | | return axios({ |
| | | url: '/local/dostar', |
| | | data: { |
| | | func: 'GetMainData', |
| | | userid: sessionStorage.getItem('UserID'), |
| | | MenuNo: MenuNo, |
| | | PageIndex: pageIndex, |
| | | PageSize: pageSize, |
| | | orderColumn: orderColumn, |
| | | orderType: orderType, |
| | | search: search |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 获取页面配置信息 |
| | | * @param {String} MenuNo 页面菜单参数 |
| | | */ |
| | | getModelFormData (MenuNo) { |
| | | return axios({ |
| | | url: '/local/dostar', |
| | | data: { |
| | | func: 'getModelFormData', |
| | | userid: sessionStorage.getItem('UserID'), |
| | | MenuNo: MenuNo |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 获取页面列表数据 |
| | | * @param {String} param 提交参数 |
| | | */ |
| | | setActionSubmit (param) { |
| | | param.userid = sessionStorage.getItem('UserID') |
| | | return axios({ |
| | | url: '/local/dostar', |
| | | data: param |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 通用接口 |
| | | * @description 通用接口(数据管理) |
| | | * @param {Object} param 查询及提交参数 |
| | | */ |
| | | commonInterface (param) { |
| | |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | param.BID = param.BID || '' |
| | | param.debug = param.debug || '' |
| | | |
| | | return axios({ |
| | | url: '/webapi/dostar', |
| | | data: param |
| | |
| | | } |
| | | |
| | | /** |
| | | * @description 通用接口(提交) |
| | | * @description 通用接口(提交)(数据管理) |
| | | * @param {Object} param 查询及提交参数 |
| | | */ |
| | | submitInterface (param) { |
| | |
| | | param.lang = localStorage.getItem('lang') || '' |
| | | param.SessionUid = sessionStorage.getItem('SessionUid') || '' |
| | | param.LoginUID = sessionStorage.getItem('LoginUID') || '' |
| | | |
| | | return axios({ |
| | | url: '/webapi/dostar', |
| | | data: param |
| | | }) |
| | | } |
| | | |
| | | // /** |
| | | // * @description 登出系统 |
| | | // */ |
| | | // logoutsystem () { |
| | | // return axios({ |
| | | // url: '/local/dostar', |
| | | // data: { |
| | | // func: 'logout', |
| | | // userid: sessionStorage.getItem('UserID') |
| | | // } |
| | | // }) |
| | | // } |
| | | } |
| | | |
| | | export default new Api() |
| | |
| | | import logourl from '@/assets/img/main-logo.png' |
| | | import avatar from '@/assets/img/avatar.jpg' |
| | | import Resetpwd from './resetpwd' |
| | | import LoginForm from './loginform' |
| | | import './index.scss' |
| | | |
| | | const EditMenu = asyncComponent(() => import('./editmenu')) |
| | |
| | | dict: (!localStorage.getItem('lang') || localStorage.getItem('lang') === 'zh-CN') ? zhCN : enUS, |
| | | confirmLoading: false, |
| | | userName: sessionStorage.getItem('User_Name'), |
| | | logourl: window.GLOB.mainlogo || logourl |
| | | logourl: window.GLOB.mainlogo || logourl, |
| | | loginVisible: false, |
| | | loginLoading: false, |
| | | systems: [] |
| | | } |
| | | |
| | | handleCollapse = () => { |
| | |
| | | _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000' // 时间戳 |
| | | _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) // md5密钥 |
| | | |
| | | let result = await Api.getSystemConfig(_param) |
| | | if (result.status) { |
| | | let localResult = await Api.getLocalConfig(_param) |
| | | let result = {status: true} |
| | | |
| | | if (window.GLOB.mainSystemApi && window.GLOB.subSystemApi !== window.GLOB.mainSystemApi) { |
| | | result = await Api.getSystemConfig(_param) |
| | | } |
| | | |
| | | if (result.status && localResult.status) { |
| | | this.setState({ |
| | | visible: false, |
| | | confirmLoading: false |
| | |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | message: result.message || localResult.message, |
| | | duration: 10 |
| | | }) |
| | | this.setState({ |
| | |
| | | item.PageParam = {OpenType: 'menu', linkUrl: ''} |
| | | } |
| | | return item |
| | | }) |
| | | }), |
| | | systems: result.Systems.filter(sys => sys.LinkUrl1) |
| | | }) |
| | | } else { |
| | | notification.error({ |
| | |
| | | |
| | | changeEditState = (state) => { |
| | | // 修改编辑状态 |
| | | this.props.resetEditState(state) |
| | | let UserID = sessionStorage.getItem('CloudUserID') |
| | | let LoginUID = sessionStorage.getItem('CloudLoginUID') |
| | | |
| | | sessionStorage.setItem('isEditState', state) |
| | | if (state && (!UserID || !LoginUID)) { |
| | | this.setState({ |
| | | loginVisible: true |
| | | }) |
| | | } else { |
| | | this.setState({ |
| | | menulist: null |
| | | }) |
| | | this.loadmenu() |
| | | this.props.resetEditState(state) |
| | | } |
| | | } |
| | | |
| | | loginSubmit = () => { |
| | | this.setState({ |
| | | loginLoading: true |
| | | }) |
| | | this.loginRef.handleConfirm().then(param => { |
| | | Api.getusermsg(param.username, param.password).then(res => { |
| | | if (res.status) { |
| | | sessionStorage.setItem('CloudUserID', res.UserID) |
| | | sessionStorage.setItem('CloudSessionUid', Utils.getuuid()) |
| | | sessionStorage.setItem('CloudLoginUID', res.LoginUID) |
| | | |
| | | this.setState({ |
| | | menulist: null, |
| | | loginVisible: false, |
| | | loginLoading: false |
| | | }) |
| | | this.loadmenu() |
| | | this.props.resetEditState(true) |
| | | } else { |
| | | notification.error({ |
| | | top: 92, |
| | | message: res.message, |
| | | duration: 15 |
| | | }) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | enterEdit = () => { |
| | |
| | | exitEdit = () => { |
| | | // 退出编辑状态 |
| | | this.props.resetEditLevel(false) |
| | | } |
| | | |
| | | changeSystem = (system) => { |
| | | console.log(system) |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | |
| | | <Menu overlayclassname="header-dropdown"> |
| | | {this.props.debug && <Menu.Item key="0"> |
| | | {this.state.dict['header.edit']} |
| | | <Switch size="small" className="edit-switch" disabled={!!this.props.editLevel} onChange={this.changeEditState} /> |
| | | <Switch size="small" className="edit-switch" disabled={!!this.props.editLevel} checked={this.props.editState} onChange={this.changeEditState} /> |
| | | </Menu.Item>} |
| | | <Menu.Item key="1" onClick={this.changePassword}>{this.state.dict['header.password']}</Menu.Item> |
| | | {!this.props.editState ? <Menu.Item key="1" onClick={this.changePassword}>{this.state.dict['header.password']}</Menu.Item> : null} |
| | | <Menu.SubMenu title="切换系统"> |
| | | {this.state.systems.map((system, index) => ( |
| | | <Menu.Item className="header-subSystem" key={'sub' + index} onClick={() => {this.changeSystem(system)}}> {system.AppName} </Menu.Item> |
| | | ))} |
| | | </Menu.SubMenu> |
| | | <Menu.Item key="2" onClick={this.logout}>{this.state.dict['header.logout']}</Menu.Item> |
| | | </Menu> |
| | | ) |
| | |
| | | > |
| | | <Resetpwd dict={this.state.dict} wrappedComponentRef={(inst) => this.formRef = inst} resetPwdSubmit={this.resetPwdSubmit}/> |
| | | </Modal> |
| | | {/* 编辑状态登录 */} |
| | | <Modal |
| | | title={this.state.dict['header.login.develop']} |
| | | okText={this.state.dict['header.confirm']} |
| | | cancelText={this.state.dict['header.cancel']} |
| | | visible={this.state.loginVisible} |
| | | onOk={this.loginSubmit} |
| | | width={'430px'} |
| | | confirmLoading={this.state.loginLoading} |
| | | onCancel={() => {this.setState({ loginVisible: false, loginLoading: false })}} |
| | | destroyOnClose |
| | | > |
| | | <LoginForm handleSubmit={() => this.loginSubmit()} wrappedComponentRef={(inst) => this.loginRef = inst}/> |
| | | </Modal> |
| | | </header> |
| | | ) |
| | | } |
| | |
| | | padding: 5px 25px; |
| | | } |
| | | } |
| | | .header-subSystem { |
| | | min-width: 100px; |
| | | } |
| | | .edit-switch { |
| | | margin-left: 10px; |
| | | } |
New file |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Icon, Input } from 'antd' |
| | | import zhCN from '@/locales/zh-CN/login.js' |
| | | import enUS from '@/locales/en-US/login.js' |
| | | import './index.scss' |
| | | |
| | | class HeaderLoginForm extends Component { |
| | | static propTpyes = { |
| | | handleSubmit: PropTypes.func |
| | | } |
| | | |
| | | state = { |
| | | dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS |
| | | } |
| | | |
| | | handleConfirm = () => { |
| | | // 表单提交时检查输入值是否正确 |
| | | return new Promise((resolve, reject) => { |
| | | this.props.form.validateFieldsAndScroll((err, values) => { |
| | | if (!err) { |
| | | resolve(values) |
| | | } else { |
| | | reject(err) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | handleSubmit = e => { |
| | | // 登录参数检验 |
| | | e.preventDefault() |
| | | this.props.handleSubmit() |
| | | } |
| | | |
| | | componentDidMount () { |
| | | const input = document.getElementById('username') |
| | | if (input) { |
| | | input.focus() |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { getFieldDecorator } = this.props.form |
| | | |
| | | return ( |
| | | <Form style={{margin: '0px 10px'}}> |
| | | <Form.Item> |
| | | {getFieldDecorator('username', { |
| | | rules: [{ required: true, message: this.state.dict['login.username.empty'] }], |
| | | initialValue: '', |
| | | })( |
| | | <Input |
| | | prefix={<Icon type="user" style={{ color: 'rgba(0,0,0,.25)' }} />} |
| | | placeholder={this.state.dict['login.username']} |
| | | autoComplete="off" |
| | | onPressEnter={this.handleSubmit} |
| | | /> |
| | | )} |
| | | </Form.Item> |
| | | <Form.Item> |
| | | {getFieldDecorator('password', { |
| | | initialValue: '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: this.state.dict['login.password.empty'], |
| | | } |
| | | ] |
| | | })(<Input.Password onPressEnter={this.handleSubmit} placeholder={this.state.dict['login.password']} prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} />)} |
| | | </Form.Item> |
| | | </Form> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default Form.create()(HeaderLoginForm) |
| | |
| | | import './index.scss' |
| | | |
| | | const ComTableConfig = asyncLoadComponent(() => import('@/templates/comtableconfig')) |
| | | const FormTabConfig = asyncLoadComponent(() => import('@/templates/formtabconfig')) |
| | | const ModalConfig = asyncLoadComponent(() => import('@/templates/modalconfig')) |
| | | const SubTable = asyncLoadComponent(() => import('@/templates/subtableconfig')) |
| | | |
| | |
| | | } |
| | | |
| | | handleSubConfig = (item, originMenu, config, type) => { |
| | | if (type === 'button') { |
| | | if (type === 'button') { // 三级菜单页面,按钮配置 |
| | | if (item.OpenType === 'pop') { |
| | | let pageParam = '' |
| | | if (config && config.type === 'Modal') { |
| | |
| | | tabview: 'Modal' |
| | | }) |
| | | } |
| | | } else if (type === 'tab') { |
| | | } else if (type === 'tab') { // 三级菜单页面,标签配置 |
| | | if (item.type === 'SubTable' || item.tabType === 'SubTable') { |
| | | this.setState({ |
| | | editMenu: originMenu, |
| | |
| | | tabview: 'SubTable' |
| | | }) |
| | | } |
| | | } else if (type === 'tabButton') { |
| | | } else if (type === 'tabButton') { // 三级菜单下,标签下,按钮配置 |
| | | let pageParam = '' |
| | | if (config && config.type === 'Modal') { |
| | | pageParam = config |
| | |
| | | editAction: item, |
| | | btnParam: pageParam, |
| | | tabview: 'Modal' |
| | | }) |
| | | } else if (type === 'tabview') { // 三级菜单下,打开新标签页或当前页跳转,类型的按钮配置 |
| | | let pageParam = '' |
| | | if (config && config.type === 'formTab') { |
| | | pageParam = config |
| | | } |
| | | |
| | | this.setState({ |
| | | editMenu: originMenu, |
| | | editAction: item, |
| | | btnParam: pageParam, |
| | | tabview: 'FormTab' |
| | | }) |
| | | } |
| | | } |
| | |
| | | handleSubConfig={this.handleSubConfig} |
| | | /> |
| | | } |
| | | {this.state.tabview === 'FormTab' && |
| | | <FormTabConfig |
| | | menu={this.state.editMenu} |
| | | config={this.state.btnParam} |
| | | editAction={this.state.editAction} |
| | | handleConfig={this.handleConfig} |
| | | handleSubConfig={this.handleSubConfig} |
| | | /> |
| | | } |
| | | {/* 图片预览 */} |
| | | <Preview cancel={this.cancelPrePicture} preview={this.state.preview} template={this.state.pretemplate} confirm={this.useTemplate}/> |
| | | {/* 解冻菜单模态框 */} |
| | |
| | | } |
| | | |
| | | changemenu(e) { |
| | | if (this.props.editState) { |
| | | e.preventDefault() |
| | | return |
| | | } |
| | | |
| | | let menu = JSON.parse(e.target.dataset.item) |
| | | if (menu.Ot === 'NewPage') { |
| | | window.open(menu.src) |
| | |
| | | ) |
| | | } |
| | | |
| | | document.title = (window.GLOB && window.GLOB.title) || 'MinkeSoft' |
| | | window.GLOB = window.GLOB || {} |
| | | |
| | | document.title = window.GLOB.title || 'MinkeSoft' |
| | | |
| | | const option = { |
| | | white: 'mk-white' |
| | | } |
| | | |
| | | if (window.GLOB && window.GLOB.style && option[window.GLOB.style]) { |
| | | if (window.GLOB.style && option[window.GLOB.style]) { |
| | | document.getElementById('root').className = option[window.GLOB.style] |
| | | } |
| | | |
| | | if (process.env.NODE_ENV === 'production') { |
| | | let service = window.GLOB.service ? (/\/$/.test(window.GLOB.service) ? window.GLOB.service : window.GLOB.service + '/') : '' |
| | | window.GLOB.subSystemApi = document.location.origin + '/' + service + 'webapi/dostar' |
| | | } else { |
| | | window.GLOB.subSystemApi = 'http://qingqiumarket.cn/mkwms/webapi/dostar' |
| | | } |
| | | |
| | | |
| | | sessionStorage.removeItem('isEditState') |
| | | |
| | | render(Route) |
| | | |
| | | serviceWorker.unregister() |
| | |
| | | '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.password.maxlen': 'The maximum password length is 12 bits!', |
| | | 'header.password.diff': 'Two passwords that you enter is inconsistent!', |
| | | 'header.password.resetsuccess': 'Password modified successfully!', |
| | | 'header.login.develop': '登录开发机', |
| | | 'header.menu.close': 'Are you sure to delete the menu <<@M>> ?', |
| | | 'header.menu.update': 'Are you sure to modify the configuration information of the menu <<@M>> ?', |
| | | 'header.menu.presave': 'Menu order has been adjusted, Please save!', |
| | |
| | | 'header.form.grid': '表格', |
| | | 'header.form.intertype': '接口类型', |
| | | 'header.form.interface': '接口地址', |
| | | 'header.form.sysInterface': '系统接口', |
| | | 'header.form.interface.inner': '内部', |
| | | 'header.form.interface.outer': '外部', |
| | | 'header.form.pageTemplate': '页面模板', |
| | |
| | | 'header.password.maxlen': '最大密码长度为12位!', |
| | | 'header.password.diff': '两次输入密码不一致!', |
| | | 'header.password.resetsuccess': '密码修改成功!', |
| | | 'header.login.develop': '登录开发机', |
| | | 'header.menu.close': '确定删除《@M》菜单吗?', |
| | | 'header.menu.update': '确定修改菜单《@M》的配置信息吗?', |
| | | 'header.menu.presave': '菜单顺序已调整,请保存!', |
| | |
| | | // 系统配置 |
| | | export default { |
| | | AppId: '201912040924165801464FF1788654BC5AC73', |
| | | cloudServiceApi: 'http://qingqiumarket.cn/mkwms/webapi/dostar', |
| | | cloudDatabase: 'sqlserver', |
| | | localDatabase: 'mysql' |
| | | } |
| | |
| | | } |
| | | case Type.RESET_EDITSTATE: |
| | | // 重置编辑状态 |
| | | if (state.tabviews.length === 0 && !action.editState) { |
| | | if (action.editState) { |
| | | state.tabviews = [] |
| | | } else { |
| | | state.tabviews = [{ |
| | | MenuID: '1576117946681plembmkk9akkv8sn0vtdfdsfaf', |
| | | MenuName: '首页', |
| | |
| | | // 重置编辑级别 |
| | | return { |
| | | ...state, |
| | | editLevel: action.editLevel, |
| | | tabviews: [] |
| | | editLevel: action.editLevel |
| | | } |
| | | case Type.INIT_PERMISSION: |
| | | // 初始化按钮权限及创建存储过程可用字段 |
| | |
| | | |
| | | async loadmaindata (pageIndex = 1, pageSize = 10, orderColumn = '', orderType = '', search = '') { |
| | | // 获取列表数据 |
| | | let result = await Api.getMainTableData(this.props.MenuNo, pageIndex, pageSize, orderColumn, orderType, search) |
| | | if (result.status) { |
| | | this.setState({ |
| | | data: result.data.map((item, index) => { |
| | | item.key = index |
| | | item.rows = item.mkrows |
| | | return item |
| | | }), |
| | | total: result.total, |
| | | loading: false |
| | | }) |
| | | } |
| | | // let result = await Api.getMainTableData(this.props.MenuNo, pageIndex, pageSize, orderColumn, orderType, search) |
| | | // if (result.status) { |
| | | // this.setState({ |
| | | // data: result.data.map((item, index) => { |
| | | // item.key = index |
| | | // item.rows = item.mkrows |
| | | // return item |
| | | // }), |
| | | // total: result.total, |
| | | // loading: false |
| | | // }) |
| | | // } |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | |
| | | delete res.message |
| | | delete res.status |
| | | |
| | | res.rduri = btn.interface |
| | | if (btn.sysInterface === 'true') { |
| | | res.rduri = window.GLOB.mainSystemApi || window.GLOB.subSystemApi |
| | | } else { |
| | | res.rduri = btn.interface |
| | | } |
| | | // res.method = btn.method |
| | | if (btn.outerFunc) { |
| | | res.func = btn.outerFunc |
| | |
| | | }) |
| | | } else { |
| | | // 不存在内部函数时,生成外部请求参数 |
| | | param.rduri = btn.interface |
| | | if (btn.sysInterface === 'true') { |
| | | param.rduri = window.GLOB.mainSystemApi || window.GLOB.subSystemApi |
| | | } else { |
| | | param.rduri = btn.interface |
| | | } |
| | | // param.method = btn.method |
| | | if (btn.outerFunc) { |
| | | param.func = btn.outerFunc |
| | |
| | | delete res.message |
| | | delete res.status |
| | | |
| | | res.rduri = btn.interface |
| | | if (btn.sysInterface === 'true') { |
| | | res.rduri = window.GLOB.mainSystemApi || window.GLOB.subSystemApi |
| | | } else { |
| | | res.rduri = btn.interface |
| | | } |
| | | // res.method = btn.method |
| | | if (btn.outerFunc) { |
| | | res.func = btn.outerFunc |
| | |
| | | } else if (_opentype === 'outerpage') { // 新页面(外部),需要页面地址 |
| | | _options = ['label', 'Ot', 'OpenType', 'url', 'icon', 'class', 'position'] |
| | | } else if (_opentype === 'blank' || _opentype === 'tab') { // 新标签或当前页面替换 |
| | | _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position'] |
| | | _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabTemplate'] |
| | | } else if (_opentype === 'popview') { // 模态框标签页 |
| | | _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose'] |
| | | } else if (_opentype === 'excelIn' || _opentype === 'excelOut') { // 导入导出 |
| | | if (_intertype === 'outer') { |
| | | _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError', 'method'] |
| | | _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError', 'method'] |
| | | } else { |
| | | _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError'] |
| | | } |
| | | } 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', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'method'] |
| | | } else { |
| | | _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType'] |
| | | } |
| | |
| | | } else if (value === 'outerpage') { |
| | | _options = ['label', 'Ot', 'OpenType', 'url', 'icon', 'class', 'position'] |
| | | } else if (value === 'blank' || value === 'tab') { |
| | | _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position'] |
| | | _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabTemplate'] |
| | | } else if (value === 'popview') { |
| | | _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose'] |
| | | } else if (value === 'excelIn' || value === 'excelOut') { |
| | | if (this.state.interType === 'outer') { |
| | | _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError', 'method'] |
| | | _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError', 'method'] |
| | | } else { |
| | | _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError'] |
| | | } |
| | |
| | | if (this.state.interType === 'inner') { |
| | | _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType'] |
| | | } else { |
| | | _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'interface', 'outerFunc', 'callbackFunc', 'method'] |
| | | _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'method'] |
| | | } |
| | | } |
| | | this.setState({ |
| | |
| | | if (value === 'inner') { |
| | | _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType'] |
| | | } else { |
| | | _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'interface', 'outerFunc', 'callbackFunc', 'method'] |
| | | _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'method'] |
| | | } |
| | | this.setState({ |
| | | interType: value, |
| | | formlist: this.state.formlist.map(item => { |
| | | item.hidden = !_options.includes(item.key) |
| | | if (item.key === 'interface') { |
| | | item.readonly = false |
| | | } else if (item.key === 'sysInterface') { |
| | | item.initVal = 'false' |
| | | } |
| | | return item |
| | | }) |
| | | }) |
| | | } else if (key === 'sysInterface') { |
| | | if (value === 'true') { |
| | | this.props.form.setFieldsValue({ |
| | | interface: window.GLOB.mainSystemApi || window.GLOB.subSystemApi |
| | | }) |
| | | } |
| | | this.setState({ |
| | | interType: value, |
| | | formlist: this.state.formlist.map(item => { |
| | | if (item.key === 'interface' && value === 'true') { |
| | | item.readonly = true |
| | | } else if (item.key === 'interface') { |
| | | item.readonly = false |
| | | } |
| | | |
| | | return item |
| | | }) |
| | | }) |
| | |
| | | * @description 组件销毁,清除state更新 |
| | | */ |
| | | componentWillUnmount () { |
| | | this.setState = (state, callback) => { |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | } |
| | |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'interface', |
| | | label: this.state.dict['header.form.interface'], |
| | | initVal: card.interface, |
| | | type: 'radio', |
| | | key: 'sysInterface', |
| | | label: this.state.dict['header.form.sysInterface'], |
| | | initVal: card.sysInterface || 'false', |
| | | required: true, |
| | | readonly: false |
| | | options: [{ |
| | | value: 'true', |
| | | text: this.state.dict['header.form.true'] |
| | | }, { |
| | | value: 'false', |
| | | text: this.state.dict['header.form.false'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'outerFunc', |
| | | label: this.state.dict['header.form.outerFunc'], |
| | | initVal: card.outerFunc, |
| | | required: false, |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'interface', |
| | | label: this.state.dict['header.form.interface'], |
| | | initVal: card.sysInterface === 'true' ? (window.GLOB.mainSystemApi || window.GLOB.subSystemApi) : card.interface, |
| | | required: true, |
| | | readonly: card.sysInterface === 'true' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'callbackFunc', |
| | | label: this.state.dict['header.form.callbackFunc'], |
| | | initVal: card.callbackFunc, |
| | | required: false, |
| | | readonly: false |
| | | }, |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'callbackFunc', |
| | | label: this.state.dict['header.form.callbackFunc'], |
| | | initVal: card.callbackFunc, |
| | | required: false, |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'Ot', |
| | | label: this.state.dict['header.form.isRequired'], |
| | | initVal: card.Ot || 'requiredSgl', |
| | | required: true, |
| | | options: [] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'tabTemplate', |
| | | label: '标签模板', |
| | | initVal: card.tabTemplate || 'formTab', |
| | | required: true, |
| | | options: [{ |
| | | value: 'formTab', |
| | | text: '带标签表单' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | let _type = type |
| | | if (type === 'button' && btn.OpenType === 'popview') { |
| | | _type = 'tab' |
| | | } else if (type === 'button' && (btn.OpenType === 'tab' || btn.OpenType === 'blank')) { |
| | | _type = 'tabview' |
| | | } |
| | | |
| | | if (_type === 'button') { |
| | | uuid = btn.uuid |
| | | } else { |
| | | if (_type === 'tab') { |
| | | uuid = btn.linkTab |
| | | } else { |
| | | uuid = btn.uuid |
| | | } |
| | | |
| | | Api.getSystemConfig({ |
| | |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {interType !== 'outer' ? <Col span={24}> |
| | | <Form.Item help={'数据ID:' + menu.MenuID} label={ |
| | | {interType !== 'outer' ? <Col span={24} style={{paddingLeft: '7px'}}> |
| | | <Form.Item labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } help={'数据ID:' + menu.MenuID} label={ |
| | | <Tooltip placement="topLeft" title="使用系统函数时,需填写数据源,自定义函数时,可忽略。"> |
| | | <Icon type="question-circle" /> |
| | | {'数据源'} |
| | | </Tooltip> |
| | | } className="textarea"> |
| | | }> |
| | | {getFieldDecorator('dataresource', { |
| | | initialValue: data.dataresource |
| | | })(<TextArea rows={4} />)} |
File was renamed from src/templates/modalviewconfig/index.jsx |
| | |
| | | |
| | | class ComTableConfig extends Component { |
| | | static propTpyes = { |
| | | type: PropTypes.string, |
| | | menu: PropTypes.any, |
| | | reloadmenu: PropTypes.func, |
| | | editAction: PropTypes.object, |
| | | config: PropTypes.any, |
| | | handleConfig: PropTypes.func, |
| | | handleSubConfig: PropTypes.func, |
| | | supMenuList: PropTypes.array |
| | | handleSubConfig: PropTypes.func |
| | | } |
| | | |
| | | state = { |
| | |
| | | tables: [], // 可用表名 |
| | | selectedTables: [], // 已选表名 |
| | | originMenu: null, // 原始菜单 |
| | | originActions: null, // 原始按钮信息,使用已有用户模板 |
| | | delActions: [], // 删除按钮列表 |
| | | funcLoading: false, // 存储过程创建中 |
| | | showColumnName: false, // 显示列字段名控制 |
| | |
| | | * 2、设置操作类型、原始菜单信息(每次保存后重置)、已使用表及基本信息表单 |
| | | */ |
| | | UNSAFE_componentWillMount () { |
| | | const { menu } = this.props |
| | | const { menu, editAction, config } = this.props |
| | | |
| | | let _LongParam = menu.LongParam |
| | | console.log(menu) |
| | | console.log(editAction) |
| | | console.log(config) |
| | | let _config = '' |
| | | |
| | | if (!_LongParam) { |
| | | if (!config) { |
| | | _config = JSON.parse(JSON.stringify(Source.baseConfig)) |
| | | if (!menu.isSubtable) { // 不是选择主子表时,隐藏标签页 |
| | | _config.tabs = [] |
| | | } |
| | | } else { |
| | | _config = _LongParam |
| | | _config = config |
| | | } |
| | | |
| | | let _oriActions = [] |
| | | if (_config.type === 'user') { |
| | | _config.action = _config.action.map(item => { |
| | | let uuid = Utils.getuuid() |
| | | |
| | | if (item.OpenType === 'pop') { // 含有子配置项的按钮。。。 |
| | | _oriActions.push({ |
| | | prebtn: JSON.parse(JSON.stringify(item)), |
| | | curuuid: uuid, |
| | | Template: 'Modal' |
| | | }) |
| | | } |
| | | |
| | | item.uuid = uuid |
| | | |
| | | return item |
| | | }) |
| | | } |
| | | |
| | | _config.tabs = _config.tabs || [] |
| | | _config.tabgroups = _config.tabgroups || ['tabs'] |
| | | _config.setting.subtabs = _config.setting.subtabs || [] |
| | | // _config.action = _config.action.map(item => { |
| | | // item.uuid = Utils.getuuid() |
| | | // return item |
| | | // }) |
| | | |
| | | this.setState({ |
| | | config: _config, |
| | | originActions: _oriActions, |
| | | originMenu: JSON.parse(JSON.stringify(menu)), |
| | | selectedTables: _config.tables || [], |
| | | selectedTables: _config.tables, |
| | | menuformlist: [ |
| | | { |
| | | type: 'select', |
| | | key: 'parentId', |
| | | label: this.state.dict['header.menu.supMenu'], |
| | | initVal: menu.ParentID, |
| | | required: true, |
| | | readonly: false, |
| | | options: this.props.supMenuList |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'menuName', |
| | | label: this.state.dict['header.menu.menuName'], |
| | | initVal: menu.MenuName, |
| | | required: true, |
| | | readonly: false |
| | | readonly: true |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'menuNo', |
| | | label: this.state.dict['header.menu.menuNo'], |
| | | initVal: menu.MenuNo, |
| | | required: true, |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'opentype', |
| | | label: this.state.dict['header.menu.openType'], |
| | | initVal: menu.PageParam.OpenType, |
| | | required: true, |
| | | options: [{ |
| | | MenuID: 'newtab', |
| | | text: this.state.dict['header.form.tab'] |
| | | }, { |
| | | MenuID: 'newpage', |
| | | text: this.state.dict['header.form.newpage'] |
| | | }, { |
| | | MenuID: 'currenttab', |
| | | text: this.state.dict['header.form.currenttab'] |
| | | }] |
| | | key: 'actionName', |
| | | label: '按钮名称', |
| | | initVal: editAction.label, |
| | | readonly: true |
| | | } |
| | | ] |
| | | }) |
| | |
| | | * @description 组件销毁,清除state更新 |
| | | */ |
| | | componentWillUnmount () { |
| | | this.setState = (state, callback) => { |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | } |
| | |
| | | * @description 保存或修改菜单按钮 |
| | | */ |
| | | submitAction = (btnParam, tabParam) => { |
| | | const { config } = this.state |
| | | new Promise(resolve => { |
| | | // 内部请求 |
| | | if (this.state.delActions.length > 0) { |
| | |
| | | if (btnParam.LText) { |
| | | return Api.getSystemConfig(btnParam) |
| | | } else { |
| | | return 'copy' |
| | | return 'true' |
| | | } |
| | | }).then(response => { |
| | | if (response === false || response === 'copy') return response |
| | | if (response === false || response === 'true') return response |
| | | |
| | | if (response.status) { |
| | | return 'copy' |
| | | return 'true' |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | }) |
| | | return false |
| | | } |
| | | }).then(response => { |
| | | if (response === false) return response |
| | | |
| | | let oriActions = [] |
| | | this.state.originActions.forEach(item => { |
| | | let curBtn = config.action.filter(cell => item.curuuid === cell.uuid)[0] // 查看初始化按钮是否存在 |
| | | if (!curBtn) return |
| | | if (curBtn.OpenType !== item.prebtn.OpenType) return |
| | | |
| | | oriActions.push({ |
| | | prebtn: item.prebtn, |
| | | curBtn: curBtn |
| | | }) |
| | | }) |
| | | |
| | | if (oriActions.length === 0) return 'true' |
| | | |
| | | oriActions.forEach(action => { |
| | | Api.getSystemConfig({ |
| | | func: 'sPC_Get_LongParam', |
| | | MenuID: action.prebtn ? action.prebtn.uuid : '' |
| | | }).then(result => { |
| | | if (result.status && result.LongParam) { |
| | | let _LongParam = '' |
| | | |
| | | if (result.LongParam) { |
| | | _LongParam = window.decodeURIComponent(window.atob(result.LongParam)) |
| | | try { |
| | | _LongParam = JSON.parse(_LongParam) |
| | | } catch (e) { |
| | | _LongParam = '' |
| | | } |
| | | } |
| | | |
| | | if (_LongParam) { |
| | | let param = { |
| | | func: 'sPC_ButtonParam_AddUpt', |
| | | ParentID: this.props.menu.MenuID, |
| | | MenuID: action.curBtn.uuid, |
| | | MenuNo: this.props.menu.MenuNo, |
| | | Template: _LongParam.type, |
| | | MenuName: action.curBtn.label, |
| | | PageParam: JSON.stringify({Template: _LongParam.type}), |
| | | LongParam: result.LongParam |
| | | } |
| | | Api.getSystemConfig(param).then(() => {}) |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | return 'true' |
| | | }).then(response => { |
| | | if (response === 'true') { |
| | | notification.success({ |
| | |
| | | } |
| | | |
| | | render () { |
| | | const configAction = this.state.config.action.filter(_action => |
| | | !_action.origin && (_action.OpenType === 'pop' || _action.OpenType === 'popview' || _action.OpenType === 'blank' || _action.OpenType === 'tab') |
| | | ) |
| | | |
| | | let configTabs = [] |
| | | this.state.config.tabgroups.forEach(group => { |
| | | configTabs.push(...this.state.config[group]) |
| | |
| | | return (<SourceElement key={index} content={item}/>) |
| | | })} |
| | | </div> |
| | | {configAction.length > 0 ? |
| | | <p className="config-btn-title"> |
| | | <Tooltip placement="topLeft" title="点击按钮,可完成或查看按钮配置信息。"> |
| | | <Icon type="question-circle" /> |
| | | </Tooltip> |
| | | {this.state.dict['header.menu.action.configurable']} |
| | | </p> : null |
| | | } |
| | | {configAction.map((item, index) => { |
| | | return ( |
| | | <div key={index}> |
| | | <Button |
| | | icon={item.icon} |
| | | style={{marginBottom: '10px'}} |
| | | className={'config-button mk-btn mk-' + item.class} |
| | | onClick={() => this.setSubConfig(item, 'button')} |
| | | >{item.label}</Button> |
| | | </div> |
| | | ) |
| | | })} |
| | | </Panel> |
| | | {/* 添加显示列 */} |
| | | <Panel header={this.state.dict['header.menu.column']} key="3"> |
| | | <div className="search-element"> |
| | | {Source.columnItems.map((item, index) => { |
| | | return (<SourceElement key={index} content={item}/>) |
| | | })} |
| | | </div> |
| | | <Button type="primary" block onClick={() => this.queryField('columns')}>{this.state.dict['header.menu.column.add']}</Button> |
| | | </Panel> |
| | | {/* 添加标签 */} |
| | | <Panel header={this.state.dict['header.menu.tab']} key="4"> |
File was renamed from src/templates/modalviewconfig/source.jsx |
| | |
| | | |
| | | class CommonTableBaseData { |
| | | baseConfig = { |
| | | type: 'system', |
| | | type: 'formTab', |
| | | enabled: false, |
| | | setting: { |
| | | actionfixed: false, |
| | | columnfixed: false, |
| | | tableName: '', |
| | | tableType: 'checkbox', |
| | | primaryKey: '', |
| | | order: '', |
| | | dataresource: '', |
| | | interType: 'inner', |
| | | innerFunc: '', |
| | | interface: '', |
| | | outerFunc: '', |
| | | onload: 'true', |
| | | subtabs: [] |
| | | }, |
| | | tables: [], |
| | |
| | | verify: null |
| | | } |
| | | ], |
| | | columns: [ |
| | | { |
| | | origin: true, |
| | | uuid: Utils.getuuid(), |
| | | Align: 'left', |
| | | label: 'label', |
| | | field: '', |
| | | Hide: 'false', |
| | | IsSort: 'true', |
| | | type: 'text', |
| | | Width: 120 |
| | | }, { |
| | | origin: true, |
| | | uuid: Utils.getuuid(), |
| | | Align: 'left', |
| | | label: 'label', |
| | | field: '', |
| | | Hide: 'false', |
| | | IsSort: 'true', |
| | | type: 'text', |
| | | Width: 120 |
| | | }, { |
| | | origin: true, |
| | | uuid: Utils.getuuid(), |
| | | Align: 'left', |
| | | label: 'label', |
| | | field: '', |
| | | Hide: 'false', |
| | | IsSort: 'true', |
| | | type: 'text', |
| | | Width: 120 |
| | | }, { |
| | | origin: true, |
| | | uuid: Utils.getuuid(), |
| | | Align: 'left', |
| | | label: 'label', |
| | | field: '', |
| | | Hide: 'false', |
| | | IsSort: 'true', |
| | | type: 'text', |
| | | Width: 120 |
| | | } |
| | | ], |
| | | gridBtn: { |
| | | display: false, |
| | | Align: 'center', |
| | | IsSort: 'false', |
| | | uuid: Utils.getuuid(), |
| | | label: CommonDict['header.form.column.action'], |
| | | type: 'action', |
| | | style: 'button', |
| | | show: 'horizontal', |
| | | Width: 120 |
| | | }, |
| | | tabs: [ |
| | | { |
| | | origin: true, // 是否为示例 |
| | |
| | | type: 'action', |
| | | label: CommonDict['header.form.newpage.outer'], |
| | | subType: 'outerpage', |
| | | url: '' |
| | | } |
| | | ] |
| | | |
| | | columnItems = [ |
| | | { |
| | | type: 'columns', |
| | | label: CommonDict['header.form.text'], |
| | | subType: 'text', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'columns', |
| | | label: CommonDict['header.form.number'], |
| | | subType: 'number', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'columns', |
| | | label: CommonDict['header.form.picture'], |
| | | subType: 'picture', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'columns', |
| | | label: CommonDict['header.form.colspan'], |
| | | subType: 'colspan', |
| | | url: '' |
| | | } |
| | | ] |
| | |
| | | import './index.scss' |
| | | |
| | | const { MonthPicker } = DatePicker |
| | | const { TextArea } = Input |
| | | |
| | | const Card = ({ id, card, moveCard, findCard, editCard, closeCard, hasDrop }) => { |
| | | const originalIndex = findCard(id).index |
| | |
| | | } |
| | | {card.type === 'datetime' && |
| | | <DatePicker showTime defaultValue={card.initval ? moment().subtract(card.initval, 'days') : null} /> |
| | | // <DatePicker showTime defaultValue={card.initval ? moment(card.initval, 'YYYY-MM-DD HH:mm:ss') : null} /> |
| | | } |
| | | {card.type === 'textarea' && |
| | | <TextArea autoSize={{ minRows: 2, maxRows: 6 }} /> |
| | | } |
| | | {card.type === 'fileupload' && |
| | | <Button> |
| | |
| | | return ( |
| | | <div ref={drop} className="ant-row modal-fields-row"> |
| | | {cards.map(card => ( |
| | | <Col key={card.uuid} span={_cols}> |
| | | <Col key={card.uuid} span={card.type !== 'textarea' ? _cols : 24}> |
| | | <Card |
| | | id={`${card.uuid}`} |
| | | card={card} |
| | |
| | | value: 'datetime', |
| | | text: this.state.dict['header.form.datetime'] |
| | | }, { |
| | | value: 'textarea', |
| | | text: '多行文本' |
| | | }, { |
| | | value: 'funcvar', |
| | | text: '函数变量' |
| | | }] |
| | |
| | | } |
| | | |
| | | .modal-form { |
| | | padding: 0px 24px; |
| | | min-height: 87px; |
| | | .group-title { |
| | | position: relative; |
| | |
| | | _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose'] |
| | | } else if (_opentype === 'excelIn' || _opentype === 'excelOut') { |
| | | if (_intertype === 'outer') { |
| | | _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError', 'method'] |
| | | _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError', 'method'] |
| | | } else { |
| | | _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError'] |
| | | } |
| | | } 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', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'method'] |
| | | } else { |
| | | _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType'] |
| | | } |
| | |
| | | _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose'] |
| | | } else if (value === 'excelIn' || value === 'excelOut') { |
| | | if (this.state.interType === 'outer') { |
| | | _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError', 'method'] |
| | | _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError', 'method'] |
| | | } else { |
| | | _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError'] |
| | | } |
| | |
| | | if (this.state.interType === 'inner') { |
| | | _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType'] |
| | | } else { |
| | | _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'interface', 'outerFunc', 'callbackFunc', 'method'] |
| | | _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'method'] |
| | | } |
| | | } |
| | | |
| | |
| | | if (value === 'inner') { |
| | | _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType'] |
| | | } else { |
| | | _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'interface', 'outerFunc', 'callbackFunc', 'method'] |
| | | _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'method'] |
| | | } |
| | | this.setState({ |
| | | interType: value, |
| | | formlist: this.state.formlist.map(item => { |
| | | item.hidden = !_options.includes(item.key) |
| | | if (item.key === 'interface') { |
| | | item.readonly = false |
| | | } else if (item.key === 'sysInterface') { |
| | | item.initVal = 'false' |
| | | } |
| | | return item |
| | | }) |
| | | }) |
| | | } else if (key === 'sysInterface') { |
| | | if (value === 'true') { |
| | | this.props.form.setFieldsValue({ |
| | | interface: window.GLOB.mainSystemApi || window.GLOB.subSystemApi |
| | | }) |
| | | } |
| | | this.setState({ |
| | | interType: value, |
| | | formlist: this.state.formlist.map(item => { |
| | | if (item.key === 'interface' && value === 'true') { |
| | | item.readonly = true |
| | | } else if (item.key === 'interface') { |
| | | item.readonly = false |
| | | } |
| | | |
| | | return item |
| | | }) |
| | | }) |
| | |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'interface', |
| | | label: this.state.dict['header.form.interface'], |
| | | initVal: card.interface, |
| | | type: 'radio', |
| | | key: 'sysInterface', |
| | | label: this.state.dict['header.form.sysInterface'], |
| | | initVal: card.sysInterface || 'false', |
| | | required: true, |
| | | readonly: false |
| | | options: [{ |
| | | value: 'true', |
| | | text: this.state.dict['header.form.true'] |
| | | }, { |
| | | value: 'false', |
| | | text: this.state.dict['header.form.false'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'interface', |
| | | label: this.state.dict['header.form.interface'], |
| | | initVal: card.sysInterface === 'true' ? (window.GLOB.mainSystemApi || window.GLOB.subSystemApi) : card.interface, |
| | | required: true, |
| | | readonly: card.sysInterface === 'true' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'callbackFunc', |
| | | label: this.state.dict['header.form.callbackFunc'], |
| | | initVal: card.callbackFunc, |
| | |
| | | async loginsubmit (param) { |
| | | // 登录提交 |
| | | // let password = this.md5Password(param.password) |
| | | let password = param.password |
| | | let result = await Api.loginsystem(param.username, password) |
| | | let result = await Api.loginsystem(param.username, param.password) |
| | | if (!result.IsError) { |
| | | Api.getusermsg(param.username, password).then(res => { |
| | | Api.getusermsg(param.username, param.password).then(res => { |
| | | if (res.status) { |
| | | sessionStorage.setItem('UserID', res.UserID) |
| | | sessionStorage.setItem('SessionUid', Utils.getuuid()) |