| | |
| | | transfer -- 是否使用转接口,使用转接口时请设置为 true, 使用转接口时,外部接口调用前不会做登录验证 |
| | | keepPwd -- 记住密码,默认开启,当值为 false 时禁用,当值为 invisible 时记住密码但密码不可查看 |
| | | execType -- 脚本传输方式,值为x时,启用AES加密 |
| | | SysNotice -- 是否开启系统消息 |
| | | updateStatus -- 是否更新开发状态,默认开启,当值为 false 时禁用 |
| | | forcedUpdate -- 传输号升级时,是否自动退出,格式为(YYYY-MM-DD),用于升级后刷新用户本地配置 |
| | |
| | | "transfer": "false", |
| | | "keepPwd": "true", |
| | | "execType": "x", |
| | | "SysNotice": "false", |
| | | "host": "http://qingqiumarket.cn", |
| | | "service": "MKWMS/" |
| | | } |
| | |
| | | const TreePage = asyncComponent(() => import('@/tabviews/treepage')) |
| | | const Iframe = asyncComponent(() => import('@/tabviews/iframe')) |
| | | const RoleManage = asyncComponent(() => import('@/tabviews/rolemanage')) |
| | | const SysMessage = asyncComponent(() => import('@/tabviews/sysmessage')) |
| | | |
| | | if (sessionStorage.getItem('lang') === 'zh-CN') { |
| | | moment.locale('zh-cn') |
| | |
| | | return (<Home MenuID={view.MenuID} MenuName={view.MenuName}/>) |
| | | } else if (view.type === 'RolePermission') { |
| | | return (<RoleManage MenuID={view.MenuID}/>) |
| | | } else if (view.type === 'SysMessage') { |
| | | return (<SysMessage />) |
| | | } else if (view.type === 'CommonTable') { |
| | | return (<CommonTable MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} param={view.param} changeTemp={this.changeTemp}/>) |
| | | } else if (view.type === 'TreePage') { |
| | |
| | | const Resetpwd = asyncComponent(() => import('@/components/resetPassword')) |
| | | const QrCode = asyncComponent(() => import('@/components/qrcode')) |
| | | const LoginForm = asyncSpinComponent(() => import('./loginform')) |
| | | const SysMessage = asyncComponent(() => import('./sysmessage')) |
| | | |
| | | class Header extends Component { |
| | | state = { |
| | |
| | | ParentNames: [fst.MenuName, snd.MenuName], |
| | | MenuNo: trd.MenuNo, |
| | | EasyCode: trd.EasyCode, |
| | | type: 'CommonTable', |
| | | type: 'CustomPage', |
| | | OpenType: 'newtab', |
| | | hidden: 'false' |
| | | } |
| | |
| | | try { |
| | | let PageParam = JSON.parse(trd.PageParam) |
| | | |
| | | trdItem.type = PageParam.Template || 'CommonTable' |
| | | trdItem.type = PageParam.Template || 'CustomPage' |
| | | trdItem.OpenType = PageParam.OpenType || 'newtab' |
| | | trdItem.hidden = PageParam.hidden || 'false' |
| | | trdItem.menuColor = PageParam.menuColor || '' |
| | |
| | | <SearchOutlined className="search-menu" /> |
| | | </Dropdown> : null |
| | | } |
| | | {window.GLOB.SysNotice ? <SysMessage /> : null} |
| | | {/* 头像、用户名 */} |
| | | <Dropdown className="header-setting" overlay={menu}> |
| | | <div> |
| | |
| | | margin-top: 15px; |
| | | } |
| | | } |
| | | } |
| | | .mk-msg-icon { |
| | | font-size: 16px; |
| | | margin-top: 17px; |
| | | margin-right: 20px; |
| | | margin-left: 0px; |
| | | color: #1CD66C; |
| | | cursor: pointer; |
| | | } |
| | | .mk-msg-icon[data-title] { |
| | | position: relative; |
| | | |
| | | &::before { |
| | | content: " "; |
| | | position: absolute; |
| | | top: 6px; |
| | | left: 2px; |
| | | z-index: -1; |
| | | width: 12px; |
| | | height: 3px; |
| | | display: block; |
| | | background: #fff; |
| | | } |
| | | &::after { |
| | | position: absolute; |
| | | top: -10px; |
| | | left: 15px; |
| | | color: #f5222d; |
| | | font-size: 12px; |
| | | line-height: 16px; |
| | | white-space: nowrap; |
| | | font-weight: 600; |
| | | content: attr(data-title); |
| | | } |
| | | } |
New file |
| | |
| | | import React, { Component } from 'react' |
| | | import { MessageFilled } from '@ant-design/icons' |
| | | |
| | | import MKEmitter from '@/utils/events.js' |
| | | |
| | | class SysMessage extends Component { |
| | | state = { |
| | | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | |
| | | } |
| | | |
| | | open = () => { |
| | | let menu = { |
| | | MenuID: 'message_page_id', |
| | | MenuName: '系统消息', |
| | | type: 'SysMessage' |
| | | } |
| | | |
| | | MKEmitter.emit('modifyTabs', menu) |
| | | } |
| | | |
| | | render() { |
| | | return ( |
| | | <MessageFilled className="mk-msg-icon" data-title="23" onClick={this.open} /> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default SysMessage |
| | |
| | | const TreePage = asyncComponent(() => import('@/tabviews/treepage')) |
| | | const Iframe = asyncComponent(() => import('@/tabviews/iframe')) |
| | | const RoleManage = asyncComponent(() => import('@/tabviews/rolemanage')) |
| | | const SysMessage = asyncComponent(() => import('@/tabviews/sysmessage')) |
| | | |
| | | if (sessionStorage.getItem('lang') === 'zh-CN') { |
| | | moment.locale('zh-cn') |
| | |
| | | |
| | | selectcomponent = (view) => { |
| | | // 根据tab页中菜单信息,选择所需的组件 |
| | | if (view.type === 'Home') { |
| | | return (<Home MenuID={view.MenuID} MenuName={view.MenuName}/>) |
| | | } else if (view.type === 'BaseTable') { |
| | | if (view.type === 'BaseTable') { |
| | | return (<BaseTable MenuID={view.MenuID} MenuName={view.MenuName} param={view.param} changeTemp={this.changeTemp}/>) |
| | | } else if (view.type === 'CustomPage') { |
| | | return (<CustomPage MenuID={view.MenuID} MenuName={view.MenuName} param={view.param} changeTemp={this.changeTemp}/>) |
| | | } else if (view.type === 'Home') { |
| | | return (<Home MenuID={view.MenuID} MenuName={view.MenuName}/>) |
| | | } else if (view.type === 'RolePermission') { |
| | | return (<RoleManage MenuID={view.MenuID}/>) |
| | | } else if (view.type === 'SysMessage') { |
| | | return (<SysMessage />) |
| | | } else if (view.type === 'CommonTable') { |
| | | return (<CommonTable MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} param={view.param} changeTemp={this.changeTemp}/>) |
| | | } else if (view.type === 'TreePage') { |
| | | return (<TreePage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} param={view.param}/>) |
| | | } else if (view.type === 'RolePermission') { |
| | | return (<RoleManage MenuID={view.MenuID}/>) |
| | | } else if (view.type === 'iframe') { |
| | | return (<Iframe MenuID={view.MenuID} title={view.MenuName} url={view.src}/>) |
| | | } else { |
| | |
| | | GLOB.WXminiAppID = config.WXminiAppID || '' |
| | | GLOB.WXMerchID = config.WXMerchID || '' |
| | | GLOB.WXNotice = config.WXNotice + '' === 'true' |
| | | GLOB.SysNotice = config.SysNotice + '' === 'true' |
| | | GLOB.execType = config.execType === 'x' ? 'x' : '' |
| | | GLOB.mkHS = false |
| | | GLOB.debugger = false |
New file |
| | |
| | | import React, { Component } from 'react' |
| | | // import { is, fromJS } from 'immutable' |
| | | import { notification, Spin } from 'antd' |
| | | // import { BankOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | | |
| | | export default class SysMessage extends Component { |
| | | state = { |
| | | loading: true |
| | | } |
| | | |
| | | getAppList = () => { |
| | | let param = { |
| | | func: 's_get_kei' |
| | | } |
| | | |
| | | Api.getSystemConfig(param).then(result => { |
| | | if (result.status) { |
| | | let applist = result.data.map(item => { |
| | | item.sublist = item.data_detail || [] |
| | | item.sublist = item.sublist.map(cell => { |
| | | cell.ID = cell.d_id |
| | | return cell |
| | | }) |
| | | |
| | | return item |
| | | }) |
| | | let selectApp = applist[0] || null |
| | | |
| | | this.setState({ applist, selectApp }) |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | reloadMenuView = (menuId) => { |
| | | if (menuId !== 'message_page_id') return |
| | | |
| | | this.getAppList() |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | |
| | | } |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('reloadMenuView', this.reloadMenuView) |
| | | } |
| | | |
| | | /** |
| | | * @description 组件销毁,清除state更新 |
| | | */ |
| | | componentWillUnmount () { |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('reloadMenuView', this.reloadMenuView) |
| | | } |
| | | |
| | | render() { |
| | | const { loading, } = this.state |
| | | |
| | | return ( |
| | | <div className="mk-sys-message"> |
| | | {loading && <Spin />} |
| | | </div> |
| | | ) |
| | | } |
| | | } |
New file |
| | |
| | | .mk-sys-message { |
| | | min-height: calc(100vh - 94px); |
| | | height: 100%; |
| | | position: relative; |
| | | padding: 15px; |
| | | |
| | | .ant-spin { |
| | | position: absolute; |
| | | top: calc(50vh - 100px); |
| | | left: calc(50vw - 12px); |
| | | } |
| | | } |
| | |
| | | import { is, fromJS } from 'immutable' |
| | | import { DndProvider } from 'react-dnd' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { Button, Card, Collapse, notification, Spin, Tooltip, Col } from 'antd' |
| | | import { QuestionCircleOutlined, RedoOutlined } from '@ant-design/icons' |
| | | import { Button, Card, Collapse, notification, Spin, Col } from 'antd' |
| | | import { RedoOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | |
| | | import ColumnComponent from '@/templates/sharecomponent/columncomponent' |
| | | |
| | | import MenuForm from './menuform' |
| | | import SourceElement from '@/templates/zshare/dragsource' |
| | | import Source from './source' |
| | | import './index.scss' |
| | | |
| | | const { Panel } = Collapse |
| | | |
| | | // const Versions = asyncComponent(() => import('@/menu/versions')) |
| | | const UrlFieldComponent = asyncComponent(() => import('@/menu/urlfieldcomponent')) |
| | | // const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) |
| | | const UpdateTable = asyncComponent(() => import('./updatetable')) |
| | | const Unattended = asyncComponent(() => import('@/templates/zshare/unattended')) |
| | | // 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')) |
| | | const ChartGroupComponent = asyncComponent(() => import('@/templates/sharecomponent/chartgroupcomponent')) |
| | | const ChartComponent = asyncComponent(() => import('@/templates/sharecomponent/chartcomponent')) |
| | | const CardComponent = asyncComponent(() => import('@/templates/sharecomponent/cardcomponent')) |
| | |
| | | |
| | | if (!config) return null |
| | | |
| | | const confActions = config.action.filter(_action => !_action.origin && (['pop', 'popview'].includes(_action.OpenType) || (_action.OpenType === 'tab' && _action.tabTemplate === 'FormTab') || (_action.OpenType === 'funcbutton' && _action.execMode === 'pop'))) |
| | | |
| | | let configTabs = [] |
| | | config.tabgroups.forEach(group => { |
| | | configTabs.push(...group.sublist) |
| | |
| | | containerId="main-basedata" |
| | | updatetable={this.updateconfig} |
| | | /> |
| | | </Panel> |
| | | {/* 搜索条件添加 */} |
| | | <Panel header="搜索" key="1"> |
| | | <div className="search-element"> |
| | | {Source.searchItems.map((item, index) => (<SourceElement key={index} content={item}/>))} |
| | | </div> |
| | | <FieldsComponent config={config} type="search" /> |
| | | </Panel> |
| | | {/* 按钮添加 */} |
| | | <Panel header="按钮" key="2"> |
| | | <div className="search-element"> |
| | | {Source.actionItems.map((item, index) => (<SourceElement key={index} content={item}/>))} |
| | | </div> |
| | | <div className="config-btn"> |
| | | {confActions.length > 0 ? |
| | | <p className="config-btn-title"> |
| | | <Tooltip placement="topLeft" title="点击按钮,可完成或查看按钮配置信息。"> |
| | | <QuestionCircleOutlined className="mk-form-tip"/> |
| | | </Tooltip> |
| | | 按钮配置 |
| | | </p> : null |
| | | } |
| | | </div> |
| | | {confActions.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="显示列" key="3"> |
| | | <div className="search-element"> |
| | | {Source.columnItems.map((item, index) => (<SourceElement key={index} content={item}/>))} |
| | | </div> |
| | | <FieldsComponent config={config} type="columns"/> |
| | | </Panel> |
| | | {/* 添加标签 */} |
| | | <Panel header="标签页" key="4"> |
| | | <div className="search-element"> |
| | | {Source.tabItems.map((item, index) => (<SourceElement key={index} content={item}/>))} |
| | | </div> |
| | | {configTabs.length > 0 ? |
| | | <p className="config-btn-title"> |
| | | <Tooltip placement="topLeft" title="点击按钮,可完成或查看标签配置信息。"> |
| | | <QuestionCircleOutlined className="mk-form-tip"/> |
| | | </Tooltip> |
| | | 标签配置 |
| | | </p> : null |
| | | } |
| | | {configTabs.map((item, index) => { |
| | | return ( |
| | | <div key={index}> |
| | | <Button |
| | | className="config-button" |
| | | icon={item.icon} |
| | | style={{marginBottom: '10px'}} |
| | | onClick={() => this.setSubConfig(item, 'tab')} |
| | | >{item.label}</Button> |
| | | </div> |
| | | ) |
| | | })} |
| | | </Panel> |
| | | </Collapse> |
| | | </div> |
| | |
| | | _config.MenuID = menu.MenuID || '' |
| | | |
| | | // 配置默认值,兼容 |
| | | // _config.Template = 'TreePage' |
| | | _config.easyCode = _config.easyCode || '' |
| | | |
| | | if (_config.type === 'user') { |
| | |
| | | |
| | | // 系统模板 |
| | | export const sysTemps = [ |
| | | // { |
| | | // title: '基础表格', |
| | | // type: 'CommonTable', |
| | | // url: nortable, |
| | | // baseconfig: '', |
| | | // isSystem: true |
| | | // }, |
| | | { |
| | | title: '基础表格', |
| | | type: 'BaseTable', |
| | |
| | | baseconfig: '', |
| | | isSystem: true |
| | | }, |
| | | // { |
| | | // title: '主子表表格', |
| | | // type: 'CommonTable', |
| | | // url: mainsubtable, |
| | | // baseconfig: '', |
| | | // isSystem: true, |
| | | // isSubtable: true |
| | | // }, |
| | | { |
| | | title: '自定义', |
| | | type: 'CustomPage', |
| | |
| | | baseconfig: '', |
| | | isSystem: true |
| | | }, |
| | | // { |
| | | // title: '树形页面', |
| | | // type: 'TreePage', |
| | | // url: treepage, |
| | | // baseconfig: '', |
| | | // isSystem: true |
| | | // }, |
| | | { |
| | | title: '外部页面', |
| | | type: 'NewPage', |
| | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | |
| | | import mainsubtable from '@/assets/img/mainsubtable.jpg' |
| | | import treepage from '@/assets/img/treepage.jpg' |
| | | import calendar from '@/assets/img/calendar.jpg' |
| | | import customImg from '@/assets/img/custom.jpg' |
| | | |
| | | import './index.scss' |
| | |
| | | |
| | | const illust = { // 模板图片,用于已使用模板 |
| | | BaseTable: mainsubtable, |
| | | TreePage: treepage, |
| | | CalendarPage: calendar, |
| | | CustomPage: customImg |
| | | } |
| | | |
| | |
| | | }, (err) => { |
| | | this.handleResponse(err) |
| | | }) |
| | | } else if (/dostars/ig.test(url)) { |
| | | } else if (/dostars|exstars/ig.test(url)) { |
| | | if (n) { |
| | | n = JSON.parse(n) |
| | | |
| | |
| | | EasyCode: trd.EasyCode, |
| | | value: trd.MenuID, |
| | | label: trd.MenuName, |
| | | type: 'CommonTable', |
| | | type: 'CustomPage', |
| | | disabled: false |
| | | } |
| | | |
| | | if (trd.PageParam) { |
| | | try { |
| | | trd.PageParam = JSON.parse(trd.PageParam) |
| | | trdItem.type = trd.PageParam.Template || 'CommonTable' |
| | | trdItem.type = trd.PageParam.Template || 'CustomPage' |
| | | } catch (e) { |
| | | |
| | | } |
| | |
| | | EasyCode: trd.EasyCode, |
| | | value: trd.MenuID, |
| | | label: trd.MenuName, |
| | | type: 'CommonTable', |
| | | type: 'CustomPage', |
| | | disabled: false |
| | | } |
| | | |
| | | if (trd.PageParam) { |
| | | try { |
| | | trd.PageParam = JSON.parse(trd.PageParam) |
| | | trdItem.type = trd.PageParam.Template || 'CommonTable' |
| | | trdItem.type = trd.PageParam.Template || 'CustomPage' |
| | | } catch (e) { |
| | | |
| | | } |
| | |
| | | EasyCode: trd.EasyCode, |
| | | value: trd.MenuID, |
| | | label: trd.MenuName, |
| | | type: 'CommonTable', |
| | | type: 'CustomPage', |
| | | disabled: false |
| | | } |
| | | |
| | | if (trd.PageParam) { |
| | | try { |
| | | trd.PageParam = JSON.parse(trd.PageParam) |
| | | trdItem.type = trd.PageParam.Template || 'CommonTable' |
| | | trdItem.type = trd.PageParam.Template || 'CustomPage' |
| | | } catch (e) { |
| | | |
| | | } |