Merge branch 'master' into positec
| | |
| | | if (e.key === 'getSessionStorage' && e.newValue === window.GLOB.appkey) { |
| | | localStorage.setItem('sessionStorage', JSON.stringify(sessionStorage)) |
| | | } else if (e.key === 'getSysPermission' && e.newValue === window.GLOB.appkey) { |
| | | localStorage.setItem('sysPermissions', JSON.stringify({mkThdMenus: window.GLOB.mkThdMenus, mkActions: window.GLOB.mkActions})) |
| | | localStorage.setItem('sysPermissions', JSON.stringify({mkThdMenus: this.state.thdMenuList, mkActions: window.GLOB.mkActions})) |
| | | } else if (e.key === 'menuUpdate') { |
| | | let vals = e.newValue.split(',') |
| | | let menuId = vals[1] |
| | |
| | | } |
| | | |
| | | window.GLOB.mainMenu = mainMenu |
| | | window.GLOB.mkThdMenus = [...thdMenuList, {MenuID: 'home_page_id', EasyCode: '', MenuName: 'home', type: 'CustomPage'}] |
| | | |
| | | thdMenuList.forEach(item => { |
| | | window.GLOB.mkThdMenus.set(item.MenuID, item) |
| | | }) |
| | | |
| | | window.GLOB.mkThdMenus.set('home_page_id', {MenuID: 'home_page_id', EasyCode: '', MenuName: 'home', type: 'CustomPage'}) |
| | | |
| | | MKEmitter.emit('mainMenuChange') |
| | | |
| | |
| | | let lang = localStorage.getItem(_href + 'lang') || (config.defaultLang !== 'en-US' ? 'zh-CN' : 'en-US') |
| | | sessionStorage.setItem('lang', lang) |
| | | |
| | | GLOB.mkThdMenus = [] // 三级菜单 |
| | | GLOB.mkActions = {} // 按钮权限集 |
| | | |
| | | Object.defineProperty(GLOB, 'appId', { |
| | |
| | | window.GLOB.CacheData = new Map() // 存储选中数据 |
| | | window.GLOB.SearchBox = new Map() // 存储搜索条件 |
| | | window.GLOB.SyncData = new Map() // 存储同步查询数据 |
| | | window.GLOB.mkThdMenus = new Map() // 三级菜单 |
| | | |
| | | render(Route) |
| | | }) |
| | |
| | | padding: 20px; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | |
| | | .loading-data { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 20px; |
| | | right: 20px; |
| | | bottom: 0; |
| | | z-index: 2; |
| | | opacity: 0.5; |
| | | background: #ffffff; |
| | | .ant-spin-spinning { |
| | | position: absolute; |
| | | left: 50%; |
| | | top: 270px; |
| | | } |
| | | } |
| | | .mk-calendar-control { |
| | | text-align: right; |
| | | .ant-select { |
| | |
| | | precision: 0, |
| | | required: true |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // field: 'layout', |
| | | // label: '卡片布局', |
| | | // initval: wrap.layout || 'grid', |
| | | // tooltip: appType === 'mob' ? '弹性布局时,滑动加载无效' : '', |
| | | // required: false, |
| | | // options: [ |
| | | // {value: 'grid', label: '栅格布局'}, |
| | | // {value: 'flex', label: '弹性布局'}, |
| | | // ], |
| | | // controlFields: [ |
| | | // {field: 'printHeight', values: ['flex']}, |
| | | // {field: 'cardFloat', values: ['grid']}, |
| | | // ] |
| | | // }, |
| | | { |
| | | type: 'radio', |
| | | field: 'pagestyle', |
| | |
| | | type: 'select', |
| | | field: 'selStyle', |
| | | label: '选中风格', |
| | | initval: wrap.selStyle || 'active', |
| | | tooltip: '存在边框时,边框会使用系统色。', |
| | | initval: wrap.selStyle || 'check', |
| | | // tooltip: '存在边框时,边框会使用系统色。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'none', label: '无'}, |
| | | {value: 'active', label: '外阴影'}, |
| | | {value: 'backFont', label: '背景+文字'}, |
| | | {value: 'font', label: '文字'}, |
| | | // {value: 'active', label: '外阴影'}, |
| | | // {value: 'backFont', label: '背景+文字'}, |
| | | // {value: 'font', label: '文字'}, |
| | | {value: 'check', label: '勾选(圆框)'}, |
| | | {value: 'check square', label: '勾选(方框)'} |
| | | ] |
| | |
| | | } trigger="hover"> |
| | | <ToolOutlined /> |
| | | </Popover> |
| | | {/* {group.setting && group.setting.print === 'true' ? <Button className="print-button" onClick={this.print}><PrinterOutlined /></Button> : null} */} |
| | | <GroupComponents config={group} handleList={this.updateComponent} deleteCard={this.deleteCard} /> |
| | | </div> |
| | | ) |
| | |
| | | padding: 5px; |
| | | background: rgba(255, 255, 255, 0.55); |
| | | } |
| | | .print-button, .print-button:hover, .print-button:focus, .print-button:active { |
| | | position: absolute; |
| | | right: 40px; |
| | | top: 0px; |
| | | border: 0; |
| | | background: transparent; |
| | | color: #bcbcbc; |
| | | } |
| | | } |
| | | .menu-group-edit-box.padding:before { |
| | | content: ' '; |
| | |
| | | addProcess = () => { |
| | | let _sql = this.props.form.getFieldValue('dataresource') |
| | | |
| | | _sql = _sql + `\n/* select a.*,case when isnull(w.remark,'')='' then a.remark else w.remark end as remark_w,case when isnull(w.statusname,'')='' then a.statusname else w.statusname end as statusname_w,w.status as status_w from 数据源 a left join (select * from s_my_works_flow where works_flow_code='流程编码' and deleted=0) w on a.id=w.works_flow_id where isnull(w.status,0)=0 */` |
| | | _sql = _sql + `\n/* select a.*, w.remark as remark_w, w.statusname as statusname_w,w.status as status_w from 数据源 a inner join (select * from s_my_works_flow where works_flow_code=@works_flow_code@ and status=0 and deleted=0) w on a.id=w.works_flow_id */` |
| | | |
| | | this.props.form.setFieldsValue({ |
| | | dataresource: _sql |
| | |
| | | _customScript = _customScript.replace(/@\$|\$@/ig, '') |
| | | _tailScript = _tailScript.replace(/@\$|\$@/ig, '') |
| | | |
| | | if (window.GLOB.process) { |
| | | _dataresource = _dataresource.replace(/@works_flow_code@/ig, `'${timestamp}'`) |
| | | _customScript = _customScript.replace(/@works_flow_code@/ig, `'${timestamp}'`) |
| | | _tailScript = _tailScript.replace(/@works_flow_code@/ig, `'${timestamp}'`) |
| | | } |
| | | |
| | | _dataresource = _dataresource.replace(/@select\$|\$select@/ig, '') |
| | | _customScript = _customScript.replace(/@select\$|\$select@/ig, '') |
| | | _customScript = _customScript.replace(/@sum\$|\$sum@/ig, '') |
| | |
| | | |
| | | if (col.linkmenu && col.linkmenu.length > 0) { |
| | | let menu_id = col.linkmenu.pop() |
| | | col.linkThdMenu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || '' |
| | | col.linkThdMenu = window.GLOB.mkThdMenus.get(menu_id) || '' |
| | | } else { |
| | | col.linkThdMenu = '' |
| | | } |
| | |
| | | |
| | | if (col.linkmenu && col.linkmenu.length > 0) { |
| | | let menu_id = col.linkmenu.slice(-1)[0] |
| | | col.linkThdMenu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || '' |
| | | col.linkThdMenu = window.GLOB.mkThdMenus.get(menu_id) || '' |
| | | } else { |
| | | col.linkThdMenu = '' |
| | | } |
| | |
| | | |
| | | MKEmitter.emit('modifyTabs', newtab, true) |
| | | } else if (config.wrap.click === 'menu') { |
| | | let menuId = config.wrap.MenuID || config.wrap.menu.slice(-1)[0] |
| | | let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0] |
| | | let menuId = config.wrap.menu.slice(-1)[0] |
| | | let menu = null |
| | | |
| | | if (!menu && config.wrap.MenuName && config.wrap.tabType) { |
| | | if (window.GLOB.mkThdMenus.has(menuId)) { |
| | | menu = {...window.GLOB.mkThdMenus.get(menuId)} |
| | | } else if (config.wrap.MenuID) { |
| | | menu = { |
| | | MenuID: menuId, |
| | | MenuID: config.wrap.MenuID, |
| | | MenuName: config.wrap.MenuName, |
| | | MenuNo: config.wrap.MenuNo || '', |
| | | type: config.wrap.tabType |
| | | } |
| | | } |
| | | |
| | | if (!menu) return |
| | | |
| | | let newtab = { |
| | | ...menu, |
| | | param: {$BID: data.$$uuid || ''} |
| | | } |
| | | menu.param = {$BID: data.$$uuid || ''} |
| | | |
| | | Object.keys(data).forEach(key => { |
| | | if (/^\$/.test(key)) return |
| | | newtab.param[key] = data[key] |
| | | menu.param[key] = data[key] |
| | | }) |
| | | |
| | | MKEmitter.emit('modifyTabs', newtab, true) |
| | | MKEmitter.emit('modifyTabs', menu, true) |
| | | } |
| | | } |
| | | |
| | |
| | | padding: 20px; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | |
| | | .loading-data { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 20px; |
| | | right: 20px; |
| | | bottom: 0; |
| | | z-index: 2; |
| | | opacity: 0.5; |
| | | background: #ffffff; |
| | | .ant-spin-spinning { |
| | | position: absolute; |
| | | left: 50%; |
| | | top: 270px; |
| | | } |
| | | } |
| | | .mk-calendar-control { |
| | | text-align: right; |
| | | .ant-select { |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { notification } from 'antd' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import MKEmitter from '@/utils/events.js' |
| | |
| | | card: PropTypes.object, // 卡片配置信息 |
| | | data: PropTypes.object, |
| | | } |
| | | |
| | | state = {} |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.props.data), fromJS(nextProps.data)) |
| | |
| | | let newtab = { |
| | | MenuID: menu.MenuID, |
| | | MenuName: menu.MenuName, |
| | | MenuNo: menu.MenuNo || '', |
| | | type: menu.tabType, |
| | | param: {} |
| | | } |
| | |
| | | |
| | | MKEmitter.emit('modifyTabs', newtab, true) |
| | | } else if (card.setting.click === 'menu') { |
| | | let menuId = card.setting.MenuID || card.setting.menu.slice(-1)[0] |
| | | let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0] |
| | | let menuId = card.setting.menu.slice(-1)[0] |
| | | let menu = null |
| | | |
| | | if (!menu && card.setting.MenuName && card.setting.tabType) { |
| | | if (window.GLOB.mkThdMenus.has(menuId)) { |
| | | menu = {...window.GLOB.mkThdMenus.get(menuId)} |
| | | } else if (card.setting.MenuID) { |
| | | menu = { |
| | | MenuID: menuId, |
| | | MenuID: card.setting.MenuID, |
| | | MenuName: card.setting.MenuName, |
| | | MenuNo: card.setting.MenuNo || '', |
| | | type: card.setting.tabType |
| | | } |
| | | } |
| | | |
| | | if (!menu) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '菜单已删除或没有访问权限!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | if (!menu) return |
| | | |
| | | let newtab = { |
| | | ...menu, |
| | | param: {} |
| | | } |
| | | menu.param = {} |
| | | |
| | | if (card.setting.joint === 'true') { |
| | | newtab.param.$BID = data.$$uuid || '' |
| | | menu.param.$BID = data.$$uuid || '' |
| | | |
| | | Object.keys(data).forEach(key => { |
| | | if (/^\$/.test(key)) return |
| | | if (key === 'children') return |
| | | newtab.param[key] = data[key] |
| | | menu.param[key] = data[key] |
| | | }) |
| | | } |
| | | |
| | | MKEmitter.emit('modifyTabs', newtab, true) |
| | | MKEmitter.emit('modifyTabs', menu, true) |
| | | } else if (card.setting.click === 'link') { |
| | | let src = card.setting.linkurl |
| | | |
| | |
| | | |
| | | if (subcard.setting.click || card.setting.position !== 'inner' || card.setting.click !== 'menu') return |
| | | |
| | | let menuId = card.setting.MenuID || card.setting.menu.slice(-1)[0] |
| | | let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0] |
| | | let menuId = card.setting.menu.slice(-1)[0] |
| | | let menu = null |
| | | |
| | | if (!menu && card.setting.MenuName && card.setting.tabType) { |
| | | if (window.GLOB.mkThdMenus.has(menuId)) { |
| | | menu = {...window.GLOB.mkThdMenus.get(menuId)} |
| | | } else if (card.setting.MenuID) { |
| | | menu = { |
| | | MenuID: menuId, |
| | | MenuID: card.setting.MenuID, |
| | | MenuName: card.setting.MenuName, |
| | | MenuNo: card.setting.MenuNo || '', |
| | | type: card.setting.tabType |
| | | } |
| | | } |
| | | |
| | | if (!menu) return |
| | | |
| | | let newtab = { |
| | | ...menu, |
| | | param: {} |
| | | } |
| | | menu.param = {} |
| | | |
| | | if (card.setting.joint === 'true') { |
| | | newtab.param.$BID = item.$$uuid || '' |
| | | menu.param.$BID = item.$$uuid || '' |
| | | |
| | | Object.keys(item).forEach(key => { |
| | | if (/^\$/.test(key)) return |
| | | if (key === 'children') return |
| | | newtab.param[key] = item[key] |
| | | menu.param[key] = item[key] |
| | | }) |
| | | } |
| | | |
| | | MKEmitter.emit('modifyTabs', newtab, true) |
| | | MKEmitter.emit('modifyTabs', menu, true) |
| | | } |
| | | |
| | | onDoubleClick = (i, subClass) => { |
| | |
| | | } |
| | | } |
| | | } |
| | | .data-zoom.scale { |
| | | .card-row-list { |
| | | .mk-card:hover { |
| | | >.card-item-box { |
| | | z-index: 1; |
| | | transform: scale(1.05); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .card-row-list { |
| | | flex: 10; |
| | | max-width: 100%; |
| | |
| | | >.ant-col { |
| | | width: 5%; |
| | | flex: 1; |
| | | } |
| | | } |
| | | .card-row-list.float-center { |
| | | text-align: center; |
| | | >.ant-col { |
| | | display: inline-block; |
| | | float: none; |
| | | text-align: left; |
| | | vertical-align: top; |
| | | } |
| | | } |
| | | .card-row-list.float-right { |
| | | text-align: right; |
| | | >.ant-col { |
| | | display: inline-block; |
| | | float: none; |
| | | text-align: left; |
| | | vertical-align: top; |
| | | } |
| | | } |
| | | .card-item-box { |
| | |
| | | openView = (card, data) => { |
| | | if (card.setting.click === 'menu' && card.setting.menu) { |
| | | let menuId = card.setting.menu.slice(-1)[0] |
| | | let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0] |
| | | let menu = null |
| | | |
| | | if (!menu && card.setting.MenuName && card.setting.MenuID) { |
| | | if (window.GLOB.mkThdMenus.has(menuId)) { |
| | | menu = {...window.GLOB.mkThdMenus.get(menuId)} |
| | | } else if (card.setting.MenuID) { |
| | | menu = { |
| | | MenuID: card.setting.MenuID, |
| | | MenuName: card.setting.MenuName, |
| | | MenuNo: card.setting.MenuNo || '', |
| | | type: card.setting.tabType |
| | | } |
| | | } |
| | | |
| | | if (!menu) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '菜单已删除或没有访问权限!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | if (!menu) return |
| | | |
| | | let newtab = { |
| | | ...menu, |
| | | param: {} |
| | | } |
| | | menu.param = {} |
| | | |
| | | if (card.setting.joint === 'true') { |
| | | newtab.param.$BID = data.$$uuid || '' |
| | | menu.param.$BID = data.$$uuid || '' |
| | | |
| | | Object.keys(data).forEach(key => { |
| | | if (/^\$/.test(key)) return |
| | | newtab.param[key] = data[key] |
| | | menu.param[key] = data[key] |
| | | }) |
| | | } |
| | | |
| | | MKEmitter.emit('modifyTabs', newtab, true) |
| | | MKEmitter.emit('modifyTabs', menu, true) |
| | | } else if (card.setting.click === 'link') { |
| | | let src = card.setting.linkurl |
| | | |
| | |
| | | data: PropTypes.object, |
| | | } |
| | | |
| | | state = { |
| | | card: null, // 卡片信息,包括正反面 |
| | | } |
| | | |
| | | /** |
| | | * @description 搜索条件初始化 |
| | | */ |
| | |
| | | |
| | | if (!card.setting.click || data.$disabled) return |
| | | |
| | | if (card.setting.click === 'menu' && card.setting.MenuID) { |
| | | let menu = { |
| | | if (card.setting.click === 'menu') { |
| | | let menuId = card.setting.menu.slice(-1)[0] |
| | | let menu = null |
| | | |
| | | if (window.GLOB.mkThdMenus.has(menuId)) { |
| | | menu = {...window.GLOB.mkThdMenus.get(menuId)} |
| | | } else if (card.setting.MenuID) { |
| | | menu = { |
| | | MenuID: card.setting.MenuID, |
| | | MenuName: card.setting.MenuName, |
| | | MenuNo: card.setting.MenuNo, |
| | | type: card.setting.tabType |
| | | } |
| | | |
| | | let newtab = { |
| | | ...menu, |
| | | param: {} |
| | | } |
| | | |
| | | if (!menu) return |
| | | |
| | | menu.param = {} |
| | | |
| | | if (card.setting.joint === 'true') { |
| | | newtab.param.$BID = data.$$uuid || '' |
| | | menu.param.$BID = data.$$uuid || '' |
| | | |
| | | Object.keys(data).forEach(key => { |
| | | if (/^\$/.test(key)) return |
| | | newtab.param[key] = data[key] |
| | | menu.param[key] = data[key] |
| | | }) |
| | | } |
| | | |
| | | MKEmitter.emit('modifyTabs', newtab, true) |
| | | MKEmitter.emit('modifyTabs', menu, true) |
| | | } else if (card.setting.click === 'link') { |
| | | let src = card.setting.linkurl |
| | | |
| | |
| | | |
| | | if (!_config.wrap.height) { // 兼容 |
| | | _config.wrap.height = _config.style.height || '300px' |
| | | delete _config.style.height |
| | | } |
| | | delete _config.style.height |
| | | |
| | | _card.style.height = _config.wrap.height |
| | | |
| | |
| | | |
| | | if (!_config.wrap.height) { // 兼容 |
| | | _config.wrap.height = _config.style.height || '300px' |
| | | delete _config.style.height |
| | | } |
| | | delete _config.style.height |
| | | |
| | | _config.subcards.forEach(card => { |
| | | card.style.height = _config.wrap.height |
| | |
| | | if (!data) return |
| | | |
| | | let menuId = plot.menu.slice(-1)[0] |
| | | let newtab = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0] |
| | | let menu = null |
| | | |
| | | if (!newtab && plot.MenuID) { |
| | | newtab = { |
| | | if (window.GLOB.mkThdMenus.has(menuId)) { |
| | | menu = {...window.GLOB.mkThdMenus.get(menuId)} |
| | | } else if (plot.MenuID) { |
| | | menu = { |
| | | MenuID: plot.MenuID, |
| | | MenuName: plot.MenuName, |
| | | MenuNo: plot.MenuNo, |
| | | type: plot.tabType |
| | | } |
| | | } else if (!newtab) { |
| | | return |
| | | } |
| | | |
| | | newtab = { |
| | | ...newtab, |
| | | param: {} |
| | | } |
| | | if (!menu) return |
| | | |
| | | menu.param = {} |
| | | |
| | | if (plot.joint === 'true') { |
| | | newtab.param.$BID = data.$$uuid || '' |
| | | menu.param.$BID = data.$$uuid || '' |
| | | |
| | | Object.keys(data).forEach(key => { |
| | | if (/^\$/.test(key)) return |
| | | newtab.param[key] = data[key] |
| | | menu.param[key] = data[key] |
| | | }) |
| | | } |
| | | |
| | | MKEmitter.emit('modifyTabs', newtab, true) |
| | | MKEmitter.emit('modifyTabs', menu, true) |
| | | } else { |
| | | if (data) { |
| | | this.selectedId = data.$$uuid || '' |
| | |
| | | MKEmitter.emit('modifyTabs', newtab, true) |
| | | } else if (plot.click === 'menu') { |
| | | let menuId = plot.menu.slice(-1)[0] |
| | | let newtab = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0] |
| | | let menu = null |
| | | |
| | | if (!newtab && plot.MenuID) { |
| | | newtab = { |
| | | if (window.GLOB.mkThdMenus.has(menuId)) { |
| | | menu = {...window.GLOB.mkThdMenus.get(menuId)} |
| | | } else if (plot.MenuID) { |
| | | menu = { |
| | | MenuID: plot.MenuID, |
| | | MenuName: plot.MenuName, |
| | | MenuNo: plot.MenuNo, |
| | | type: plot.tabType |
| | | } |
| | | } else if (!newtab) { |
| | | return |
| | | } |
| | | |
| | | MKEmitter.emit('modifyTabs', {...newtab, param: {$BID: sign}}, true) |
| | | if (!menu) return |
| | | |
| | | menu.param = {$BID: sign} |
| | | |
| | | MKEmitter.emit('modifyTabs', menu, true) |
| | | } else { |
| | | MKEmitter.emit('resetSelectLine', config.uuid, sign, {}) |
| | | } |
| | |
| | | MKEmitter.emit('modifyTabs', newtab, true) |
| | | } else if (plot.click === 'menu') { |
| | | let menuId = plot.menu.slice(-1)[0] |
| | | let newtab = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0] |
| | | let menu = null |
| | | |
| | | if (!newtab && plot.MenuID) { |
| | | newtab = { |
| | | if (window.GLOB.mkThdMenus.has(menuId)) { |
| | | menu = {...window.GLOB.mkThdMenus.get(menuId)} |
| | | } else if (plot.MenuID) { |
| | | menu = { |
| | | MenuID: plot.MenuID, |
| | | MenuName: plot.MenuName, |
| | | MenuNo: plot.MenuNo, |
| | | type: plot.tabType |
| | | } |
| | | } else if (!newtab) { |
| | | return |
| | | } |
| | | |
| | | newtab = { |
| | | ...newtab, |
| | | param: {} |
| | | } |
| | | if (!menu) return |
| | | |
| | | menu.param = {} |
| | | |
| | | if (plot.joint === 'true') { |
| | | newtab.param.$BID = data.$$uuid || '' |
| | | menu.param.$BID = data.$$uuid || '' |
| | | |
| | | Object.keys(data).forEach(key => { |
| | | if (/^\$/.test(key)) return |
| | | newtab.param[key] = data[key] |
| | | menu.param[key] = data[key] |
| | | }) |
| | | } |
| | | |
| | | MKEmitter.emit('modifyTabs', newtab, true) |
| | | MKEmitter.emit('modifyTabs', menu, true) |
| | | } else { |
| | | MKEmitter.emit('resetSelectLine', config.uuid, (data ? data.$$uuid : ''), data) |
| | | } |
| | |
| | | let menu_id = plot.linkmenu.slice(-1)[0] |
| | | |
| | | chart.on('element:dblclick', (ev) => { |
| | | let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || '' |
| | | let menu = window.GLOB.mkThdMenus.get(menu_id) || '' |
| | | |
| | | if (!menu) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '菜单已删除或没有访问权限!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | if (!menu) return |
| | | |
| | | try { |
| | | let data = ev.data.data |
| | |
| | | execSuccess = (btn, id) => { |
| | | if (btn.linkmenu && btn.linkmenu.length > 0) { |
| | | let menu_id = btn.linkmenu[btn.linkmenu.length - 1] |
| | | let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || '' |
| | | let menu = window.GLOB.mkThdMenus.get(menu_id) || '' |
| | | |
| | | if (!menu) return |
| | | |
| | |
| | | |
| | | if (btn.linkmenu && btn.linkmenu.length > 0) { |
| | | let menu_id = btn.linkmenu[btn.linkmenu.length - 1] |
| | | let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || '' |
| | | let menu = window.GLOB.mkThdMenus.get(menu_id) || '' |
| | | |
| | | if (!menu) return |
| | | |
| | |
| | | execSuccess = (btn, id) => { |
| | | if (btn.linkmenu && btn.linkmenu.length > 0) { |
| | | let menu_id = btn.linkmenu[btn.linkmenu.length - 1] |
| | | let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || '' |
| | | let menu = window.GLOB.mkThdMenus.get(menu_id) || '' |
| | | |
| | | if (!menu) return |
| | | |
| | |
| | | .normal-group-wrap { |
| | | .print-button, .print-button:hover, .print-button:focus, .print-button:active { |
| | | position: absolute; |
| | | right: 0px; |
| | | top: 0px; |
| | | z-index: 2; |
| | | border: 0; |
| | | background: transparent; |
| | | } |
| | | .print-button:hover, .print-button:focus, .print-button:active { |
| | | color: var(--mk-sys-color5); |
| | | } |
| | | |
| | | .group-header { |
| | | position: relative; |
| | | height: 45px; |
| | |
| | | addBook = () => { |
| | | const { config } = this.props |
| | | |
| | | let menuId = config.wrap.MenuID |
| | | let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0] |
| | | |
| | | if (!menu && config.wrap.MenuNo) { |
| | | menu = { |
| | | MenuID: menuId, |
| | | let menu = { |
| | | MenuID: config.wrap.MenuID, |
| | | MenuName: config.wrap.MenuName, |
| | | MenuNo: config.wrap.MenuNo || '', |
| | | type: config.wrap.tabType |
| | | } |
| | | } |
| | | |
| | | let newtab = { |
| | | ...menu, |
| | | type: config.wrap.tabType, |
| | | param: {} |
| | | } |
| | | |
| | | MKEmitter.emit('modifyTabs', newtab, true) |
| | | if (window.GLOB.mkThdMenus.has(config.wrap.MenuID)) { |
| | | menu = {...window.GLOB.mkThdMenus.get(config.wrap.MenuID), param: {}} |
| | | } |
| | | |
| | | MKEmitter.emit('modifyTabs', menu, true) |
| | | } |
| | | |
| | | render() { |
| | |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | let menuId = '16289973311406f3ko9nm8ehotdmu80o' |
| | | let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0] |
| | | let menu = window.GLOB.mkThdMenus.get(menuId) |
| | | |
| | | if (menu) { |
| | | let newtab = { |
| | | this.setState({menu: { |
| | | ...menu, |
| | | param: {} |
| | | } |
| | | |
| | | this.setState({menu: newtab}) |
| | | }}) |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | if (col.linkmenu && col.linkmenu.length > 0) { |
| | | let menu_id = col.linkmenu.pop() |
| | | col.linkThdMenu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || '' |
| | | col.linkThdMenu = window.GLOB.mkThdMenus.get(menu_id) || '' |
| | | } else { |
| | | col.linkThdMenu = '' |
| | | } |
| | |
| | | |
| | | if (col.linkmenu && col.linkmenu.length > 0) { |
| | | let menu_id = col.linkmenu.pop() |
| | | col.linkThdMenu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || '' |
| | | col.linkThdMenu = window.GLOB.mkThdMenus.get(menu_id) || '' |
| | | } else { |
| | | col.linkThdMenu = '' |
| | | } |
| | |
| | | check = (times) => { |
| | | times++ |
| | | |
| | | if ((window.GLOB.mkThdMenus.length > 0 && window.GLOB.mkActions.loaded) || times > 50) { |
| | | if ((window.GLOB.mkThdMenus.size > 0 && window.GLOB.mkActions.loaded) || times > 50) { |
| | | this.setState({ |
| | | waiting: false |
| | | }) |
| | |
| | | |
| | | if (col.linkmenu && col.linkmenu.length > 0) { |
| | | let menu_id = col.linkmenu.slice(-1)[0] |
| | | col.linkThdMenu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || '' |
| | | col.linkThdMenu = window.GLOB.mkThdMenus.get(menu_id) || '' |
| | | } else { |
| | | col.linkThdMenu = '' |
| | | } |
| | |
| | | |
| | | if (btn.openmenu && Array.isArray(btn.openmenu) && btn.openmenu.length > 0 && sign !== '@no_target_menu@') { |
| | | let menuId = btn.openmenu.slice(-1)[0] |
| | | let newtab = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0] |
| | | let menu = null |
| | | |
| | | if (!newtab && btn.MenuID) { |
| | | newtab = { |
| | | if (window.GLOB.mkThdMenus.has(menuId)) { |
| | | menu = {...window.GLOB.mkThdMenus.get(menuId), param: { $BID: id }} |
| | | } else if (btn.MenuID) { |
| | | menu = { |
| | | MenuID: btn.MenuID, |
| | | MenuName: btn.MenuName, |
| | | MenuNo: btn.MenuNo, |
| | | type: btn.tabType |
| | | type: btn.tabType, |
| | | param: { $BID: id } |
| | | } |
| | | } else if (!newtab) { |
| | | return |
| | | } |
| | | |
| | | newtab = {...newtab, param: { $BID: id }} |
| | | |
| | | MKEmitter.emit('modifyTabs', newtab, true) |
| | | if (menu) { |
| | | MKEmitter.emit('modifyTabs', menu, true) |
| | | } |
| | | } |
| | | |
| | | if (btn.execSuccess === 'popclose' && btn.$tabId) { // 标签关闭刷新 |
| | |
| | | } |
| | | } else if (btn.linkmenu && btn.linkmenu.length > 0) { |
| | | let menuId = btn.linkmenu.slice(-1)[0] |
| | | let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0] |
| | | let menu = null |
| | | |
| | | if (!menu && btn.MenuName && btn.MenuID) { |
| | | if (window.GLOB.mkThdMenus.has(menuId)) { |
| | | menu = {...window.GLOB.mkThdMenus.get(menuId), param: { $BID: primaryId }} |
| | | } else if (btn.MenuID) { |
| | | menu = { |
| | | MenuID: btn.MenuID, |
| | | MenuName: btn.MenuName, |
| | | MenuNo: btn.MenuNo, |
| | | type: btn.tabType |
| | | type: btn.tabType, |
| | | param: { $BID: primaryId } |
| | | } |
| | | } |
| | | |
| | |
| | | return |
| | | } |
| | | |
| | | newtab = { |
| | | ...menu, |
| | | param: { |
| | | $BID: primaryId |
| | | } |
| | | } |
| | | newtab = menu |
| | | } |
| | | |
| | | if (btn.openTab === 'view') { |
| | |
| | | const { verify } = this.state |
| | | |
| | | let _columns = JSON.parse(JSON.stringify(verify.columns)) |
| | | let _names = {} |
| | | let _cols = _columns.map(item => { |
| | | let key = item.Column.toLowerCase() |
| | | _names[key] = item.Text |
| | | |
| | | let _cols = _columns.map(col => col.Column) |
| | | return key |
| | | }) |
| | | let names = {$up: false} |
| | | |
| | | columns.forEach(col => { |
| | | if (col.field && !_cols.includes(col.field)) { |
| | | if (!col.field) return |
| | | let key = col.field.toLowerCase() |
| | | if (_cols.includes(key)) { |
| | | if (_names[key] !== col.label) { |
| | | names.$up = true |
| | | names[key] = col.label |
| | | } |
| | | return |
| | | } |
| | | |
| | | let _type = 'Nvarchar(50)' |
| | | let _limit = '50' |
| | | if (col.type === 'number' && !col.decimal) { |
| | |
| | | } |
| | | |
| | | _columns.push(_cell) |
| | | } |
| | | }) |
| | | |
| | | if (names.$up) { |
| | | const that = this |
| | | |
| | | confirm({ |
| | | content: '部分字段名称与显示列不一致,是否更新?', |
| | | onOk() { |
| | | _columns = _columns.map(item => { |
| | | let key = item.Column.toLowerCase() |
| | | |
| | | if (names[key]) { |
| | | item.Text = names[key] |
| | | } |
| | | |
| | | return item |
| | | }) |
| | | |
| | | that.setState({ |
| | | verify: { |
| | | ...verify, |
| | | columns: _columns |
| | | } |
| | | }, () => { |
| | | that.resetUniqueColumns() |
| | | }) |
| | | }, |
| | | onCancel() { |
| | | that.setState({ |
| | | verify: { |
| | | ...verify, |
| | | columns: _columns |
| | | } |
| | | }, () => { |
| | | that.resetUniqueColumns() |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | this.setState({ |
| | | verify: { |
| | | ...verify, |
| | |
| | | this.resetUniqueColumns() |
| | | }) |
| | | } |
| | | } |
| | | |
| | | clearField = () => { |
| | | const { verify } = this.state |
| | |
| | | const { verify } = this.state |
| | | |
| | | let columns = fromJS(verify.columns).toJS() |
| | | let fields = columns.map(item => item.Column) |
| | | let _names = {} |
| | | let fields = columns.map(item => { |
| | | let key = item.Column.toLowerCase() |
| | | _names[key] = item.Text |
| | | |
| | | return key |
| | | }) |
| | | let names = {$up: false} |
| | | |
| | | config.columns.forEach(item => { |
| | | if (fields.includes(item.field) || !item.field) return |
| | | fields.push(item.field) |
| | | if (!item.field) return |
| | | let key = item.field.toLowerCase() |
| | | if (fields.includes(key)) { |
| | | if (_names[key] !== item.label) { |
| | | names.$up = true |
| | | names[key] = item.label |
| | | } |
| | | return |
| | | } |
| | | |
| | | let cell = { |
| | | Column: item.field, |
| | |
| | | |
| | | if (config.subtype === 'dualdatacard') { |
| | | config.subColumns.forEach(item => { |
| | | if (fields.includes(item.field) || !item.field) return |
| | | fields.push(item.field) |
| | | if (!item.field) return |
| | | let key = item.field.toLowerCase() |
| | | if (fields.includes(key)) { |
| | | if (_names[key] !== item.label) { |
| | | names.$up = true |
| | | names[key] = item.label |
| | | } |
| | | return |
| | | } |
| | | |
| | | let cell = { |
| | | Column: item.field, |
| | |
| | | }) |
| | | } |
| | | |
| | | if (names.$up) { |
| | | const that = this |
| | | |
| | | confirm({ |
| | | content: '部分字段名称与显示列不一致,是否更新?', |
| | | onOk() { |
| | | columns = columns.map(item => { |
| | | let key = item.Column.toLowerCase() |
| | | |
| | | if (names[key]) { |
| | | item.Text = names[key] |
| | | } |
| | | |
| | | return item |
| | | }) |
| | | |
| | | that.setState({ |
| | | verify: {...verify, columns: columns} |
| | | }) |
| | | }, |
| | | onCancel() { |
| | | that.setState({ |
| | | verify: {...verify, columns: columns} |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | this.setState({ |
| | | verify: {...verify, columns: columns} |
| | | }) |
| | | } |
| | | } |
| | | |
| | | clearField = () => { |
| | | const { verify } = this.state |
| | |
| | | } |
| | | |
| | | handleConfirm = () => { |
| | | const { type } = this.props |
| | | const { type, workFlow } = this.props |
| | | const { editItem, skip } = this.state |
| | | // 表单提交时检查输入值是否正确 |
| | | this.props.form.validateFieldsAndScroll((err, values) => { |
| | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.LText = param.LText.replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id|datam|typename)@/ig, `'${param.timestamp}'`) |
| | | |
| | | if (window.GLOB.process && workFlow === 'true') { |
| | | param.LText = param.LText.replace(/@works_flow_code@/ig, `'${param.timestamp}'`) |
| | | param.LText = param.LText.replace(/@works_flow_name@/ig, `'${param.timestamp}'`) |
| | | param.LText = param.LText.replace(/@works_flow_param@/ig, `'${param.timestamp}'`) |
| | | param.LText = param.LText.replace(/@works_flow_detail_id@/ig, `'${param.timestamp}'`) |
| | | } |
| | | |
| | | console.info(`/* sql 验证 */\n${param.LText.replace(/\n\s{6,20}/ig, '\n')}`) |
| | | |
| | | param.LText = param.LText.replace(/\n/g, ' ') |
| | |
| | | } |
| | | |
| | | selectScript = (value, option) => { |
| | | // const { flowType } = this.props |
| | | const { flowType } = this.props |
| | | |
| | | if (!value || !option) return |
| | | |
| | |
| | | } |
| | | |
| | | if (value === 'flowSql') { |
| | | if (flowType === 'start') { |
| | | value = `insert into s_my_works_flow ( works_flow_id,works_flow_code,works_flow_param,work_group,works_flow_detail_id,work_grade,bid,createuserid,CreateUser,CreateStaff) |
| | | select @ID@,'流程编码','下一步要用到的参数串','职员分组','流程节点id','职员等级',@bid@,@UserID@,@UserName,@FullName` |
| | | select @ID@,@works_flow_code@,@works_flow_param@,'职员分组',@works_flow_detail_id@,'职员等级',@bid@,@UserID@,@UserName,@FullName |
| | | insert into s_my_works_flow_log (works_flow_id,works_flow_code,works_flow_name,status,statuscharone,statuschartwo,StatusCharThree,StatusCharFour,StatusCharFive,statusname,remark,CreateUserID,CreateUser,CreateStaff,works_flow_detail_id,sort,upid,work_group,work_grade,typecharone,deleted,statusname_suc,statusname_back )` |
| | | } else { |
| | | value = `insert into s_my_works_flow (works_flow_id,works_flow_code,works_flow_param,work_group,works_flow_detail_id,work_grade,bid,createuserid,CreateUser,CreateStaff) |
| | | select @ID@,@works_flow_code@,@works_flow_param@,'职员分组',@works_flow_detail_id@,'职员等级',@bid@,@UserID@,@UserName,@FullName` |
| | | } |
| | | |
| | | value = value.replace(/\n\s{8}/g, '\n') |
| | | } |
| | | |
| | | _sql = _sql.replace(/\s{6}$/, '') |
| | |
| | | |
| | | if (window.GLOB.process) { |
| | | _verify.workFlow = _verify.workFlow || 'false' |
| | | _verify.flowType = _verify.flowType || 'approval' |
| | | _verify.flowType = _verify.flowType || (card.sqlType === 'insert' ? 'start' : 'approval') |
| | | _verify.flowSql = _verify.flowSql || 'true' |
| | | } else { |
| | | delete _verify.workFlow |
| | |
| | | let values = event.newValue |
| | | values = JSON.parse(values) |
| | | |
| | | window.GLOB.mkThdMenus = values.mkThdMenus |
| | | window.GLOB.mkActions = values.mkActions |
| | | values.mkThdMenus && values.mkThdMenus.forEach(item => { |
| | | window.GLOB.mkThdMenus.set(item.MenuID, item) |
| | | }) |
| | | } else if (event.key === 'menuUpdate') { |
| | | let vals = event.newValue.split(',') |
| | | let MenuId = vals[1] |