Merge branch 'positec' into dms
| | |
| | | } |
| | | }, |
| | | "caniuse-lite": { |
| | | "version": "1.0.30001643", |
| | | "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001643.tgz", |
| | | "integrity": "sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg==" |
| | | "version": "1.0.30001690", |
| | | "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001690.tgz", |
| | | "integrity": "sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w==" |
| | | }, |
| | | "canvg": { |
| | | "version": "3.0.10", |
| | |
| | | } |
| | | |
| | | window.mkInfo = function(value, color = '') { |
| | | console.info(value, color) |
| | | if (color) { |
| | | console.info(value, color) |
| | | } else { |
| | | console.info(value) |
| | | } |
| | | } |
| | | </script> |
| | | </head> |
| | |
| | | "display": "standalone", |
| | | "theme_color": "#000000", |
| | | "background_color": "#ffffff", |
| | | "mk_version": "20241202" |
| | | "mk_version": "20250101" |
| | | } |
| | |
| | | window.GLOB.$error = false |
| | | |
| | | let service = window.GLOB.service ? '-' + window.GLOB.service.replace('/', '') : '' |
| | | let lang = sessionStorage.getItem('lang') !== 'zh-CN' ? sessionStorage.getItem('lang') : '' |
| | | let lang = sessionStorage.getItem('lang') || 'zh-CN' |
| | | lang = lang !== 'zh-CN' ? lang : '' |
| | | let db = `mkdb${service + lang}` |
| | | |
| | | if (window.indexedDB) { |
| | |
| | | if (res.mksqls) { |
| | | res.mksqls.forEach(n => { |
| | | n = n.replace(/(UNION ALL\s+)?SELECT obj_name='[\S\s]+sub_field=''\s+/ig, '') |
| | | window.mkInfo(n) |
| | | if (!res.status) { |
| | | window.mkInfo('%c' + n, 'color: #f5222d') |
| | | } else { |
| | | window.mkInfo(n) |
| | | } |
| | | }) |
| | | } |
| | | delete res.mksqls |
| | |
| | | if (res.mksqls) { |
| | | res.mksqls.forEach(n => { |
| | | n = n.replace(/(UNION ALL\s+)?SELECT obj_name='[\S\s]+sub_field=''\s+/ig, '') |
| | | window.mkInfo(n) |
| | | if (!res.status) { |
| | | window.mkInfo('%c' + n, 'color: #f5222d') |
| | | } else { |
| | | window.mkInfo(n) |
| | | } |
| | | }) |
| | | } |
| | | delete res.mksqls |
| | |
| | | } |
| | | } |
| | | |
| | | // 自定义滚动样式 |
| | | .mk-scrollbar { |
| | | overflow-y: auto; |
| | | } |
| | | .mk-scrollbar::-webkit-scrollbar { |
| | | width: 7px; |
| | | } |
| | | .mk-scrollbar::-webkit-scrollbar-thumb { |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13); |
| | | background: rgba(0, 0, 0, 0.13); |
| | | border-radius: 5px; |
| | | } |
| | | .mk-scrollbar::-webkit-scrollbar-track { |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); |
| | | border: 1px solid rgba(0, 0, 0, 0.07); |
| | | background: rgba(0, 0, 0, 0); |
| | | border-radius: 3px; |
| | | } |
| | | |
| | | .ant-modal { |
| | | .ant-radio-group { |
| | | white-space: nowrap; |
| | |
| | | |
| | | // geekblue |
| | | .background.geekblue-1 { |
| | | @include tableBackground(#f0f5ff); |
| | | @include tableBackground(#f0f6ff); |
| | | } |
| | | .background.geekblue-2 { |
| | | @include tableBackground(#d6e4ff); |
| | | @include tableBackground(#dee9ff); |
| | | } |
| | | .background.geekblue-3 { |
| | | @include tableBackground(#adc6ff); |
| | | @include tableBackground(#b5ccff); |
| | | } |
| | | .background.geekblue-4 { |
| | | @include tableBackground(#85a5ff); |
| | | @include tableBackground(#8cadff); |
| | | } |
| | | .background.geekblue-5 { |
| | | @include tableBackground(#597ef7); |
| | | @include tableBackground(#638aff); |
| | | } |
| | | .background.geekblue-6 { |
| | | @include tableBackground(#2f54eb, #ffffff); |
| | | @include tableBackground(#3860f4, #ffffff); |
| | | } |
| | | .background.geekblue-7 { |
| | | @include tableBackground(#1d39c4, #ffffff); |
| | | @include tableBackground(#2544cf, #ffffff); |
| | | } |
| | | .background.geekblue-8 { |
| | | @include tableBackground(#10239e, #ffffff); |
| | | @include tableBackground(#162ca8, #ffffff); |
| | | } |
| | | .background.geekblue-9 { |
| | | @include tableBackground(#061178, #ffffff); |
| | | @include tableBackground(#0a1882, #ffffff); |
| | | } |
| | | .background.geekblue-10 { |
| | | @include tableBackground(#030852, #ffffff); |
| | | @include tableBackground(#060e5c, #ffffff); |
| | | } |
| | | |
| | | // purple |
| | |
| | | |
| | | // geekblue |
| | | .font.geekblue-1 { |
| | | color: #f0f5ff; |
| | | color: #f0f6ff; |
| | | } |
| | | .font.geekblue-2 { |
| | | color: #d6e4ff; |
| | | color: #dee9ff; |
| | | } |
| | | .font.geekblue-3 { |
| | | color: #adc6ff; |
| | | color: #b5ccff; |
| | | } |
| | | .font.geekblue-4 { |
| | | color: #85a5ff; |
| | | color: #8cadff; |
| | | } |
| | | .font.geekblue-5 { |
| | | color: #597ef7; |
| | | color: #638aff; |
| | | } |
| | | .font.geekblue-6 { |
| | | color: #2f54eb; |
| | | color: #3860f4; |
| | | } |
| | | .font.geekblue-7 { |
| | | color: #1d39c4; |
| | | color: #2544cf; |
| | | } |
| | | .font.geekblue-8 { |
| | | color: #10239e; |
| | | color: #162ca8; |
| | | } |
| | | .font.geekblue-9 { |
| | | color: #061178; |
| | | color: #0a1882; |
| | | } |
| | | .font.geekblue-10 { |
| | | color: #030852; |
| | | color: #060e5c; |
| | | } |
| | | |
| | | // purple |
| | |
| | | @include viewstyle(#e6fffb, #b5f5ec, #87e8de, #5cdbd3, #36cfc9, #13c2c2); |
| | | } |
| | | |
| | | // body[class*='mk-blue-purple-'] { |
| | | // --mk-sys-color: #2f54eb; |
| | | // --mk-sys-color1: #f0f5ff; |
| | | // --mk-sys-color2: #d6e4ff; |
| | | // --mk-sys-color3: #adc6ff; |
| | | // --mk-sys-color4: #85a5ff; |
| | | // --mk-sys-color5: #597ef7; |
| | | // @include viewstyle(#f0f5ff, #d6e4ff, #adc6ff, #85a5ff, #597ef7, #2f54eb); |
| | | // } |
| | | body[class*='mk-blue-purple-'] { |
| | | --mk-sys-color: #2f54eb; |
| | | --mk-sys-color1: #f0f5ff; |
| | | --mk-sys-color2: #d6e4ff; |
| | | --mk-sys-color3: #adc6ff; |
| | | --mk-sys-color4: #85a5ff; |
| | | --mk-sys-color5: #597ef7; |
| | | @include viewstyle(#f0f5ff, #d6e4ff, #adc6ff, #85a5ff, #597ef7, #2f54eb); |
| | | --mk-sys-color: #3860f4; |
| | | --mk-sys-color1: #f0f6ff; |
| | | --mk-sys-color2: #dee9ff; |
| | | --mk-sys-color3: #b5ccff; |
| | | --mk-sys-color4: #8cadff; |
| | | --mk-sys-color5: #638aff; |
| | | @include viewstyle(#f0f6ff, #dee9ff, #b5ccff, #8cadff, #638aff, #3860f4); |
| | | } |
| | | |
| | | body[class*='mk-purple-'] { |
| | |
| | | import React, {Component} from 'react' |
| | | import React, { Component } from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Modal, notification } from 'antd' |
| | | import { SnippetsOutlined } from '@ant-design/icons' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import MenuUtils from '@/utils/utils-custom.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | |
| | | const PasteForm = asyncComponent(() => import('@/templates/zshare/pasteform')) |
| | |
| | | visible: false |
| | | } |
| | | |
| | | resetconfig = (item, appType) => { |
| | | if (item.copyType === 'action') { |
| | | MenuUtils.resetBtn(item, item.uuid) |
| | | } else if (item.copyType === 'cardcell') { |
| | | item.setting = item.setting || {} |
| | | item.setting.width = item.setting.width || 6 |
| | | delete item.$cardType |
| | | |
| | | if (item.elements) { |
| | | item.elements = item.elements.map(cell => { |
| | | cell.uuid = Utils.getuuid() |
| | | |
| | | if (cell.eleType === 'button') { |
| | | MenuUtils.resetBtn(cell, item.uuid) |
| | | } |
| | | return cell |
| | | }) |
| | | if (appType === 'mob') { |
| | | item.elements = item.elements.filter(cell => { |
| | | if (cell.eleType === 'button' && ['excelIn', 'tab'].includes(cell.OpenType)) { |
| | | return false |
| | | } |
| | | return true |
| | | }) |
| | | } |
| | | } |
| | | if (appType === 'mob') { |
| | | item.backElements = [] |
| | | } else if (item.backElements) { |
| | | item.backElements = item.backElements.map(cell => { |
| | | cell.uuid = Utils.getuuid() |
| | | |
| | | if (cell.eleType === 'button') { |
| | | MenuUtils.resetBtn(cell, item.uuid) |
| | | } |
| | | return cell |
| | | }) |
| | | } |
| | | } |
| | | |
| | | return item |
| | | } |
| | | |
| | | pasteSubmit = () => { |
| | | const { options } = this.props |
| | | this.pasteFormRef.handleConfirm().then(res => { |
| | |
| | | notification.warning({ top: 92, message: '配置信息格式错误!', duration: 5 }) |
| | | return |
| | | } |
| | | |
| | | let appType = sessionStorage.getItem('appType') |
| | | res.uuid = Utils.getuuid() |
| | | |
| | | res = this.resetconfig(res, appType) |
| | | |
| | | this.props.updateConfig(res, (result) => { |
| | | if (result.status) { |
| | | notification.success({ |
| | |
| | | |
| | | try { |
| | | _config = JSON.parse(window.decodeURIComponent(window.atob(_config))) |
| | | |
| | | if (typeof(_config) === 'object' && _config.$srcId) { |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid && _config.$srcId !== srcid) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '当前系统无权限使用此项配置!', |
| | | duration: 5 |
| | | }) |
| | | |
| | | _config = '' |
| | | } else { |
| | | delete _config.$srcId |
| | | } |
| | | } |
| | | } catch (e) { |
| | | // 通过sql语句添加字段集 |
| | | if (/[a-zA-Z0-9_]+\s+(nvarchar\(\d+\)|Decimal\(18,\d+\)|Int|datetime|date)/ig.test(config)) { |
| | |
| | | |
| | | GLOB.mainSystemApi = 'https://cloud.positecgroup.com/webapi/dostars' |
| | | |
| | | if (config.style_appkey) { |
| | | GLOB.style_appkey = config.style_appkey |
| | | } |
| | | |
| | | // GLOB.mainSystemApi = 'https://sso.mk9h.cn/cloud/webapi/dostars' |
| | | // if (!/^https/.test(window.location.protocol)) { // https转换 |
| | | // GLOB.mainSystemApi = 'http://sso.mk9h.cn/cloud/webapi/dostars' |
| | |
| | | MKEmitter.emit('cardAddElement', card.uuid, res) |
| | | } else { |
| | | res.eleType = 'button' |
| | | res.width = res.width || 12 |
| | | res.width = res.width || res.width === 0 ? res.width : 12 |
| | | MKEmitter.emit('cardAddElement', card.uuid, res) |
| | | } |
| | | resolve({status: true}) |
| | |
| | | let btnElement = null |
| | | let _style = resetStyle(card.style) |
| | | |
| | | if (_style.display === 'none') { |
| | | _style.display = 'block' |
| | | } |
| | | |
| | | if (card.OpenType === 'form') { |
| | | if (card.formType === 'switch') { |
| | | btnElement = (<Switch style={_style} className={card.size === 'large' ? 'ant-switch-large' : ''} size={card.size} checkedChildren={card.openText || ''} unCheckedChildren={card.closeText || ''}/>) |
| | |
| | | _style = {...card.style, opacity: isDragging ? 0.3 : 1} |
| | | _style = resetStyle(_style) |
| | | } |
| | | if (_style.display === 'none') { |
| | | _style.display = 'block' |
| | | } |
| | | if (card.eleType === 'picture' && card.maxWidth) { |
| | | _style.maxWidth = card.maxWidth |
| | | let left = _style.marginLeft || 'auto' |
| | |
| | | copycard.uuid = Utils.getuuid() |
| | | |
| | | try { |
| | | delete _val.$srcId |
| | | |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid) { |
| | | _val.$srcId = srcid |
| | | } |
| | | |
| | | _val = window.btoa(window.encodeURIComponent(JSON.stringify(_val))) |
| | | } catch (e) { |
| | | console.warn('Stringify Failure') |
| | |
| | | options = ['margin', 'float'] |
| | | } else { |
| | | options.push('width', 'minHeight', 'float') |
| | | if (element.OpenType !== 'form') { |
| | | options.push('display') |
| | | } |
| | | _style.minHeight = _style.minHeight || '28px' |
| | | _style.textAlign = _style.textAlign || 'center' |
| | | } |
| | |
| | | _card.innerHeight = _card.barHeight + (_card.displayValue === 'true' ? fontSize + 2 : 0) |
| | | } else if (_card.eleType === 'button') { // 拆分style |
| | | _card.style = fromJS(style).toJS() |
| | | |
| | | if (_card.OpenType === 'form') { |
| | | delete _card.style.display |
| | | } |
| | | |
| | | if (style.float) { |
| | | _card.wrapStyle = {textAlign: style.float} |
| | |
| | | if (cell.OpenType !== 'form') { |
| | | res.style = {} |
| | | } |
| | | |
| | | if (res.style) { |
| | | delete res.style.display |
| | | } |
| | | // } else if (res.class !== cell.class || res.show !== cell.show || !res.style) { |
| | | } else if (res.class !== cell.class || !res.style) { |
| | | if (res.class) { |
| | |
| | | |
| | | if (element.copyType === 'action') { |
| | | element.eleType = 'button' |
| | | element.width = element.width || 12 |
| | | element.width = element.width || element.width === 0 ? element.width : 12 |
| | | } |
| | | |
| | | element.uuid = _uuid |
| | |
| | | |
| | | if (element.copyType === 'action') { |
| | | element.eleType = 'button' |
| | | element.width = element.width || 12 |
| | | element.width = element.width || element.width === 0 ? element.width : 12 |
| | | } |
| | | |
| | | element.uuid = _uuid |
| | |
| | | yellow_green: '#a0d911', |
| | | green: '#52c41a', |
| | | cyan: '#13c2c2', |
| | | blue_purple: '#2f54eb', |
| | | blue_purple: '#3860f4', |
| | | purple: '#722ed1', |
| | | magenta: '#eb2f96', |
| | | grass_green: '#aeb303', |
| | |
| | | {value: 'no-border', label: '无边框'}, |
| | | {value: 'bold-border', label: '边框加粗'}, |
| | | {value: 'deep-border', label: '边框颜色加深'}, |
| | | {value: 'word-break', label: '强制换行'}, |
| | | ], |
| | | span: 24 |
| | | }, |
| | |
| | | let _val = fromJS(copycard).toJS() |
| | | |
| | | try { |
| | | delete _val.$srcId |
| | | |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid) { |
| | | _val.$srcId = srcid |
| | | } |
| | | |
| | | _val.uuid = Utils.getuuid() |
| | | _val = window.btoa(window.encodeURIComponent(JSON.stringify(_val))) |
| | | } catch (e) { |
| | |
| | | shows.push('execSuccess', 'execError', 'tipTitle') |
| | | } else if (_funcType === 'mkUnsubscribe' || _funcType === 'reAuth') { |
| | | shows.push('tipTitle') |
| | | } else if (_funcType === 'reSystem') { |
| | | shows.push('tipTitle', 'Ot') |
| | | reOptions.Ot = requireOptions.filter(op => op.value === 'requiredSgl') |
| | | } else if (_funcType === 'closetab') { |
| | | shows.push('refreshTab') |
| | | } else if (_funcType === 'scan') { |
| | |
| | | delete values.extraParam |
| | | } |
| | | |
| | | if (values.refreshTab && values.refreshTab.length && ['pop', 'prompt', 'exec'].includes(values.OpenType) && window.GLOB.customMenu) { |
| | | let id = values.refreshTab[values.refreshTab.length - 1] |
| | | if (id === window.GLOB.customMenu.uuid) { |
| | | if (values.execSuccess !== 'never' || (values.syncComponent && values.syncComponent.length)) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '按钮刷新菜单为当前菜单时,成功后的组件刷新(或关闭标签)将失效!', |
| | | duration: 5 |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | |
| | | resolve(values) |
| | | } else { |
| | | reject(err) |
| | |
| | | copycard.uuid = Utils.getuuid() |
| | | |
| | | try { |
| | | delete _val.$srcId |
| | | |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid) { |
| | | _val.$srcId = srcid |
| | | } |
| | | |
| | | _val = window.btoa(window.encodeURIComponent(JSON.stringify(_val))) |
| | | } catch (e) { |
| | | console.warn('Stringify Failure') |
| | |
| | | { value: 'mkBinding', text: '开通扫码登录' }, |
| | | { value: 'mkUnBinding', text: '用户解绑' }, |
| | | { value: 'mkUnsubscribe', text: '注销账户' }, |
| | | { value: 'reAuth', text: '切换系统(清空缓存-小程序)' }, |
| | | { value: 'reAuth', text: '切换授权码 / 小程序清空缓存' }, |
| | | { value: 'reSystem', text: '切换系统' }, |
| | | { value: 'clearCache', text: '清空本地配置' }, |
| | | { value: 'copyurl', text: '复制链接地址' }, |
| | | { value: 'expPdf', text: '导出PDF' }, |
| | |
| | | } |
| | | } |
| | | |
| | | if (card.syncComponents && card.syncComponents[0] && Array.isArray(card.syncComponents[0])) { |
| | | card.syncComponents = card.syncComponents.map((item, i) => { |
| | | return { |
| | | syncComId: item, |
| | | label: '', |
| | | uuid: 'fixed' + i |
| | | } |
| | | }) |
| | | } |
| | | |
| | | let forms = [ |
| | | { |
| | | type: 'select', |
| | |
| | | } |
| | | |
| | | btn.updateTime = moment().format('YYYY-MM-DD HH:mm') |
| | | |
| | | if (btn.style) { |
| | | delete btn.style.display |
| | | } |
| | | |
| | | return btn |
| | | } else { |
| | | return item |
| | |
| | | this.transConfig(_val, type) |
| | | |
| | | try { |
| | | delete _val.$srcId |
| | | |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid) { |
| | | _val.$srcId = srcid |
| | | } |
| | | |
| | | _val = window.btoa(window.encodeURIComponent(JSON.stringify(_val))) |
| | | } catch (e) { |
| | | console.warn(e) |
| | |
| | | import { SnippetsOutlined } from '@ant-design/icons' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import MenuUtils from '@/utils/utils-custom.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | // import './index.scss' |
| | | |
| | |
| | | } else if (col.type === 'custom' && col.elements) { |
| | | col.elements = col.elements.map(cell => { |
| | | cell.uuid = Utils.getuuid() |
| | | |
| | | if (cell.eleType === 'button') { |
| | | MenuUtils.resetBtn(cell, cell.uuid) |
| | | } |
| | | return cell |
| | | }) |
| | | } |
| | |
| | | |
| | | cell.uuid = _uuid |
| | | |
| | | MenuUtils.resetBtn(cell, cell.uuid) |
| | | |
| | | return cell |
| | | }) |
| | | |
| | |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import MenuUtils from '@/utils/utils-custom.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | // import './index.scss' |
| | | |
| | |
| | | item.uuid = _uuid |
| | | } |
| | | |
| | | if (item.copyType === 'cardcell' && config.subtype === 'datacard') { |
| | | if (item.copyType === 'action') { |
| | | MenuUtils.resetBtn(item, _uuid) |
| | | } else if (item.copyType === 'cardcell' && config.subtype === 'datacard') { |
| | | item.setting = item.setting || {} |
| | | item.$cardType = 'extendCard' |
| | | item.setting.width = item.setting.width || 6 |
| | |
| | | cell.datatype = 'static' |
| | | } |
| | | cell.uuid = Utils.getuuid() |
| | | |
| | | if (cell.eleType === 'button') { |
| | | MenuUtils.resetBtn(cell, _uuid) |
| | | } |
| | | return cell |
| | | }) |
| | | } |
| | |
| | | cell.datatype = 'static' |
| | | } |
| | | cell.uuid = Utils.getuuid() |
| | | |
| | | if (cell.eleType === 'button') { |
| | | MenuUtils.resetBtn(cell, _uuid) |
| | | } |
| | | return cell |
| | | }) |
| | | } |
| | |
| | | if (item.elements) { |
| | | item.elements = item.elements.map(cell => { |
| | | cell.uuid = Utils.getuuid() |
| | | if (cell.eleType === 'button') { |
| | | MenuUtils.resetBtn(cell, _uuid) |
| | | } |
| | | return cell |
| | | }) |
| | | } |
| | | if (item.backElements) { |
| | | item.backElements = item.backElements.map(cell => { |
| | | cell.uuid = Utils.getuuid() |
| | | if (cell.eleType === 'button') { |
| | | MenuUtils.resetBtn(cell, _uuid) |
| | | } |
| | | return cell |
| | | }) |
| | | } |
| | |
| | | } else if (col.type === 'custom' && col.elements) { |
| | | col.elements = col.elements.map(cell => { |
| | | cell.uuid = Utils.getuuid() |
| | | if (cell.eleType === 'button') { |
| | | MenuUtils.resetBtn(cell, _uuid) |
| | | } |
| | | return cell |
| | | }) |
| | | } |
| | |
| | | let _val = fromJS(copycard).toJS() |
| | | |
| | | try { |
| | | delete _val.$srcId |
| | | |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid) { |
| | | _val.$srcId = srcid |
| | | } |
| | | |
| | | _val.uuid = Utils.getuuid() |
| | | _val = window.btoa(window.encodeURIComponent(JSON.stringify(_val))) |
| | | } catch (e) { |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Radio, Modal } from 'antd' |
| | | import { PaperClipOutlined, DeleteOutlined } from '@ant-design/icons' |
| | | import { Radio, Modal, message } from 'antd' |
| | | import { PaperClipOutlined, DeleteOutlined, CopyOutlined } from '@ant-design/icons' |
| | | |
| | | import InputForm from './inputform' |
| | | import './index.scss' |
| | |
| | | this.props.onChange('') |
| | | } |
| | | |
| | | copyUrl = () => { |
| | | const { url } = this.state |
| | | |
| | | let oInput = document.createElement('input') |
| | | oInput.value = url |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | | document.execCommand('Copy') |
| | | document.body.removeChild(oInput) |
| | | message.success('复制成功。') |
| | | } |
| | | |
| | | handleChange = (key) => { |
| | | this.setState({visible: key}) |
| | | } |
| | |
| | | {url && type === 'video' ? <div className="mk-source-item-info"> |
| | | <PaperClipOutlined /> |
| | | <a target="_blank" rel="noopener noreferrer" href={url.replace(/@mywebsite@\//ig, window.GLOB.baseurl)}>{name}</a> |
| | | <CopyOutlined title="复制链接" onClick={this.copyUrl}/> |
| | | <DeleteOutlined title="删除文件" onClick={this.deleteUrl}/> |
| | | </div> : null} |
| | | {url && type !== 'video' && url !== '@icon@' ? <div className="mk-source-item-info picture"> |
| | | <img src={url.replace(/@mywebsite@\//ig, window.GLOB.baseurl)} alt="" /> |
| | | <a target="_blank" rel="noopener noreferrer" href={url.replace(/@mywebsite@\//ig, window.GLOB.baseurl)}>{name}</a> |
| | | <CopyOutlined title="复制链接" onClick={this.copyUrl}/> |
| | | <DeleteOutlined title="删除文件" onClick={this.deleteUrl}/> |
| | | </div> : null} |
| | | {url && type !== 'video' && url === '@icon@' ? <div className="mk-source-item-info avatar"> |
| | |
| | | </div> : null} |
| | | <Modal |
| | | visible={!!visible} |
| | | width={visible !== 'system' ? 650 : 1000} |
| | | width={visible !== 'system' ? 650 : 1200} |
| | | closable={false} |
| | | maskClosable={false} |
| | | centered={visible === 'system'} |
| | | okText="确定" |
| | | cancelText="取消" |
| | | onOk={this.popSubmit} |
| | |
| | | cursor: pointer; |
| | | display: none; |
| | | } |
| | | .anticon-copy { |
| | | position: absolute; |
| | | top: 3px; |
| | | right: 30px; |
| | | padding-right: 0px; |
| | | color: #26C281; |
| | | cursor: pointer; |
| | | display: none; |
| | | } |
| | | a { |
| | | display: inline-block; |
| | | width: 100%; |
| | | min-width: 60%; |
| | | max-width: calc(100% - 80px); |
| | | padding-left: 22px; |
| | | padding-right: 14px; |
| | | padding-right: 0px; |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | |
| | | height: 32px; |
| | | line-height: 32px; |
| | | } |
| | | .anticon-delete { |
| | | .anticon-delete, .anticon-copy { |
| | | top: 8px; |
| | | } |
| | | } |
| | | .mk-source-item-info.avatar { |
| | | display: flex; |
| | | top: 0px; |
| | | .anticon-delete { |
| | | .anticon-delete, .anticon-copy { |
| | | top: 8px; |
| | | } |
| | | } |
| | | .mk-source-item-info:hover { |
| | | background-color: #e6f7ff; |
| | | .anticon-delete { |
| | | .anticon-delete, .anticon-copy { |
| | | display: inline-block; |
| | | } |
| | | } |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Input, Form, Row, Col, Pagination, Empty, Button, Modal, notification } from 'antd' |
| | | import { Input, Form, Row, Col, Empty, Button, Modal, notification } from 'antd' |
| | | import { PlusOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | |
| | | const { Search } = Input |
| | | const FileUpload = asyncComponent(() => import('@/tabviews/zshare/fileupload')) |
| | | const Video = asyncComponent(() => import('@/menu/picturecontroller/video')) |
| | | const Image = asyncComponent(() => import('@/components/Image')) |
| | | const EditForm = asyncComponent(() => import('@/menu/picturecontroller/editform')) |
| | | |
| | | class PopSource extends Component { |
| | |
| | | |
| | | state = { |
| | | url: '', |
| | | originlist: [], |
| | | list: [], |
| | | pagelist: [], |
| | | icons: [], |
| | | searchKey: '', |
| | | pageSize: 12, |
| | | pageIndex: 1, |
| | | selectId: '', |
| | | editvisible: false, |
| | | card: null |
| | |
| | | } |
| | | |
| | | init = (originlist) => { |
| | | let list = originlist |
| | | let pagelist = list.filter((item, index) => index < this.state.pageSize) |
| | | const { type } = this.props |
| | | this.setState({list: originlist, icons: window.GLOB.sIcons || [], url: '', searchKey: ''}) |
| | | |
| | | this.setState({originlist, list, url: '', searchKey: '', pageIndex: 1, pagelist}) |
| | | } |
| | | if (type !== 'video' && !window.GLOB.sIcons && sessionStorage.getItem('getIcons') !== 'fail') { |
| | | fetch(window.GLOB.baseurl + 'Content/static/data.json') |
| | | .then(response => response.json()) |
| | | .catch(() => { |
| | | sessionStorage.setItem('getIcons', 'fail') |
| | | }) |
| | | .then(res => { |
| | | if (res && res.list) { |
| | | let icons = [] |
| | | res.list.forEach(item => { |
| | | if (!item.url) return |
| | | |
| | | changeSearch = () => { |
| | | const { originlist, pageSize, searchKey } = this.state |
| | | let list = originlist.filter(item => item.remark.indexOf(searchKey) > -1) |
| | | let pagelist = list.filter((item, index) => index < pageSize) |
| | | icons.push({ |
| | | linkurl: window.GLOB.baseurl + 'Content/static/' + item.url, |
| | | remark: item.remark || '', |
| | | id: Utils.getuuid() |
| | | }) |
| | | }) |
| | | |
| | | this.setState({list, pagelist, pageIndex: 1}) |
| | | window.GLOB.sIcons = icons |
| | | |
| | | this.setState({icons}) |
| | | } else { |
| | | sessionStorage.setItem('getIcons', 'fail') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | changeValue = (e) => { |
| | | this.setState({url: e.target.value}) |
| | | } |
| | | |
| | | changeSize = (page) => { |
| | | const { list, pageSize } = this.state |
| | | let pagelist = list.filter((item, index) => index < pageSize * page && index >= pageSize * (page - 1)) |
| | | this.setState({pageIndex: page, pagelist}) |
| | | } |
| | | |
| | | changeFile = (val) => { |
| | |
| | | } |
| | | |
| | | selectItem = (item) => { |
| | | const { type } = this.props |
| | | const { icons } = this.state |
| | | |
| | | if (item.linkurl) { |
| | | this.setState({url: item.linkurl, selectId: item.id}) |
| | | if (type !== 'video' && icons.findIndex(n => n.id === item.id) > -1) { |
| | | this.setState({url: item.linkurl.replace(window.GLOB.baseurl, '@mywebsite@/'), selectId: item.id}) |
| | | } else { |
| | | this.setState({url: item.linkurl, selectId: item.id}) |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | render () { |
| | | const { type, keyword } = this.props |
| | | const { list, url, pagelist, searchKey, pageIndex, pageSize, selectId, editvisible, card } = this.state |
| | | const { list, icons, url, searchKey, selectId, editvisible, card } = this.state |
| | | |
| | | return ( |
| | | <div className="mk-source-pop-wrap"> |
| | | {keyword === 'input' ? <Form.Item label="地址" help="可使用@mywebsite@代替域名(含虚拟目录),如:@mywebsite@/Content/images/xxx.jpg" labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={{xs: { span: 24 }, sm: { span: 20 }}}> |
| | | if (keyword === 'input') { |
| | | return <div className="mk-source-pop-wrap"> |
| | | <Form.Item label="地址" help="可使用@mywebsite@代替域名(含虚拟目录),如:@mywebsite@/Content/images/xxx.jpg" labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={{xs: { span: 24 }, sm: { span: 20 }}}> |
| | | <TextArea id="source-input" value={url} rows={4} onChange={this.changeValue}/> |
| | | </Form.Item> : null} |
| | | {keyword === 'upload' ? <Form.Item label="上传" labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={{xs: { span: 24 }, sm: { span: 20 }}}> |
| | | </Form.Item> |
| | | </div> |
| | | } else if (keyword === 'upload') { |
| | | return <div className="mk-source-pop-wrap"> |
| | | <Form.Item label="上传" labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={{xs: { span: 24 }, sm: { span: 20 }}}> |
| | | <FileUpload config={{ |
| | | initval: '', |
| | | suffix: type === 'video' ? '.mp4,.webm,.ogg' : '.jpg,.png,.gif,.pjp,.pjpeg,.jpeg,.jfif,.webp,.ico', |
| | | maxfile: 1, |
| | | fileType: type === 'video' ? 'text' : 'picture' |
| | | }} onChange={this.changeFile} /> |
| | | </Form.Item> : null} |
| | | {keyword === 'system' ? |
| | | <Search value={searchKey} placeholder="" onChange={(e) => this.setState({searchKey: e.target.value})} onSearch={this.changeSearch} enterButton/> : null} |
| | | {keyword === 'system' ? <Button className="picture-plus mk-green" onClick={() => this.handleSource({typecharone: type})}> |
| | | </Form.Item> |
| | | </div> |
| | | } |
| | | |
| | | let pagelist = list |
| | | let iconlist = icons |
| | | |
| | | if (searchKey) { |
| | | pagelist = list.filter(item => item.remark && item.remark.indexOf(searchKey) > -1) |
| | | iconlist = icons.filter(item => item.remark && item.remark.indexOf(searchKey) > -1) |
| | | } |
| | | |
| | | return ( |
| | | <div className="mk-source-pop-wrap"> |
| | | <Search value={searchKey} placeholder="" onChange={(e) => this.setState({searchKey: e.target.value})}/> |
| | | <Button className="picture-plus mk-green" onClick={() => this.handleSource({typecharone: type})}> |
| | | <PlusOutlined /> 添加 |
| | | </Button> : null} |
| | | {keyword === 'system' && list.length ? |
| | | <Row gutter={16} style={{minHeight: '250px'}}> |
| | | {pagelist.map(item => ( |
| | | <Col span={4} key={item.id}> |
| | | <div className={'image-video-box' + (selectId === item.id ? ' active' : '')} onClick={() => this.selectItem(item)}> |
| | | <div className="image-video-box-body"> |
| | | {type !== 'video' ? <Image url={item.linkurl} /> : null} |
| | | {type === 'video' ? <Video value={item.linkurl} /> : null} |
| | | </div> |
| | | </Button> |
| | | <Row gutter={16} className="mk-scrollbar"> |
| | | {pagelist.map(item => ( |
| | | <Col span={3} key={item.id}> |
| | | <div className={'image-video-box' + (selectId === item.id ? ' active' : '')} onClick={() => this.selectItem(item)}> |
| | | <div className="image-video-box-body"> |
| | | {type !== 'video' ? <img src={item.linkurl} alt=""/> : <Video value={item.linkurl} />} |
| | | </div> |
| | | </Col> |
| | | ))} |
| | | </Row> : null} |
| | | {keyword === 'system' && list.length === 0 ? <Empty description={null}/> : null} |
| | | {keyword === 'system' && list.length > pageSize ? <Pagination size="small" current={pageIndex} pageSize={pageSize} onChange={this.changeSize} total={list.length} /> : null} |
| | | </div> |
| | | </Col> |
| | | ))} |
| | | {iconlist.length ? <div className="static-source">静态资源</div> : null} |
| | | {iconlist.map(item => ( |
| | | <Col span={3} key={item.id}> |
| | | <div className={'image-video-box' + (selectId === item.id ? ' active' : '')} onClick={() => this.selectItem(item)}> |
| | | <div className="image-video-box-body"> |
| | | <img src={item.linkurl} alt=""/> |
| | | </div> |
| | | </div> |
| | | </Col> |
| | | ))} |
| | | {!pagelist.length && !iconlist.length ? <Empty description={null}/> : null} |
| | | </Row> |
| | | <Modal |
| | | title={'新建'} |
| | | title="新建" |
| | | wrapClassName="picture-edit-model" |
| | | visible={editvisible} |
| | | width={600} |
| | |
| | | .video-react-control-bar { |
| | | display: none; |
| | | } |
| | | img { |
| | | width: 100%; |
| | | height: 100%; |
| | | object-fit: contain; |
| | | object-position: center; |
| | | } |
| | | } |
| | | .image-video-box-body::after { |
| | | content: ''; |
| | |
| | | margin-top: 5px; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | .mk-scrollbar { |
| | | padding: 5px 0px; |
| | | min-height: 300px; |
| | | max-height: calc(100vh - 250px); |
| | | clear: both; |
| | | |
| | | .static-source { |
| | | clear: both; |
| | | padding-left: 10px; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | border-bottom: 1px solid rgba(0, 0, 0, 0.1); |
| | | margin-bottom: 10px; |
| | | } |
| | | } |
| | | } |
| | | .picture-edit-model { |
| | | .ant-modal { |
| | |
| | | if (!cell.eleType) { |
| | | if (cell.copyType === 'action') { |
| | | cell.eleType = 'button' |
| | | cell.width = cell.width || 12 |
| | | cell.width = cell.width || cell.width === 0 ? cell.width : 12 |
| | | } else { |
| | | cell.eleType = 'text' |
| | | } |
| | |
| | | let val = { |
| | | copyType: 'cols', |
| | | cols: columns.filter(col => !col.origin) |
| | | } |
| | | |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid) { |
| | | val.$srcId = srcid |
| | | } |
| | | |
| | | oInput.value = window.btoa(window.encodeURIComponent(JSON.stringify(val))) |
| | |
| | | cols: [column] |
| | | } |
| | | |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid) { |
| | | val.$srcId = srcid |
| | | } |
| | | |
| | | oInput.value = window.btoa(window.encodeURIComponent(JSON.stringify(val))) |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | |
| | | if (!cell.eleType) { |
| | | if (cell.copyType === 'action') { |
| | | cell.eleType = 'button' |
| | | cell.width = cell.width || 12 |
| | | cell.width = cell.width || cell.width === 0 ? cell.width : 12 |
| | | } else { |
| | | cell.eleType = 'text' |
| | | } |
| | |
| | | let val = { |
| | | copyType: 'editcols', |
| | | cols: columns.filter(col => !col.origin) |
| | | } |
| | | |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid) { |
| | | val.$srcId = srcid |
| | | } |
| | | |
| | | oInput.value = window.btoa(window.encodeURIComponent(JSON.stringify(val))) |
| | |
| | | cols: [column] |
| | | } |
| | | |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid) { |
| | | val.$srcId = srcid |
| | | } |
| | | |
| | | oInput.value = window.btoa(window.encodeURIComponent(JSON.stringify(val))) |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | |
| | | if (!cell.eleType) { |
| | | if (cell.copyType === 'action') { |
| | | cell.eleType = 'button' |
| | | cell.width = cell.width || 12 |
| | | cell.width = cell.width || cell.width === 0 ? cell.width : 12 |
| | | } else { |
| | | cell.eleType = 'text' |
| | | } |
| | |
| | | let val = { |
| | | copyType: 'cols', |
| | | cols: columns.filter(col => !col.origin) |
| | | } |
| | | |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid) { |
| | | val.$srcId = srcid |
| | | } |
| | | |
| | | oInput.value = window.btoa(window.encodeURIComponent(JSON.stringify(val))) |
| | |
| | | } |
| | | |
| | | let columns = [{ |
| | | Column: 'tb', |
| | | Text: '表名' |
| | | }, { |
| | | Column: 'label', |
| | | Text: '名称' |
| | | }, { |
| | |
| | | let _header = [] |
| | | let _topRow = {} |
| | | let colwidth = [] |
| | | let tbName = setting.tableName || '' |
| | | |
| | | if (window.GLOB.externalDatabase !== null) { |
| | | tbName = tbName.replace(/@db@/ig, window.GLOB.externalDatabase) |
| | | } |
| | | |
| | | columns.forEach(col => { |
| | | _header.push(col.Column) |
| | |
| | | let _row = {} |
| | | |
| | | columns.forEach((col) => { |
| | | let val = item[col.Column] |
| | | _row[col.Column] = val |
| | | if (col.Column === 'tb') { |
| | | _row[col.Column] = tbName |
| | | } else { |
| | | _row[col.Column] = item[col.Column] |
| | | } |
| | | }) |
| | | |
| | | table.push(_row) |
| | |
| | | const wb = XLSX.utils.book_new() |
| | | XLSX.utils.book_append_sheet(wb, ws, 'Sheet1') |
| | | |
| | | XLSX.writeFile(wb, `${setting.tableName || ''}${moment().format('YYYYMMDDHHmmss')}.xlsx`) |
| | | XLSX.writeFile(wb, `${tbName}${moment().format('YYYYMMDDHHmmss')}.xlsx`) |
| | | } |
| | | |
| | | render() { |
| | |
| | | |
| | | // 唯一性验证,必须存在表单(表单存在时,主键均为单值),必须填写数据源,多行拼接时不可用 |
| | | if (formdata && verify.uniques && verify.uniques.length > 0 && btn.Ot !== 'requiredOnce') { |
| | | let dateForms = [] |
| | | let numForms = [] |
| | | formdata.forEach(form => { |
| | | let _key = form.key.toLowerCase() |
| | | if (form.type === 'date') { |
| | | dateForms.push(_key) |
| | | } else if (form.type === 'number' || form.type === 'rate') { |
| | | numForms.push(_key) |
| | | } |
| | | }) |
| | | |
| | | verify.uniques.forEach(item => { |
| | | let _fieldValue = [] // 表单键值对field=value |
| | | let _value = [] // 表单值,用于错误提示 |
| | |
| | | item.field.split(',').forEach((_field, index) => { |
| | | let _key = _field.toLowerCase() |
| | | let _val = '' |
| | | let _val2 = '' |
| | | |
| | | arr.push(_key) |
| | | if (_key === 'bid') { // 表单中没有bid则使用系统bid变量 |
| | | _val = BID |
| | | } else if (numForms.includes(_key)) { |
| | | _val = '1' |
| | | } else if (dateForms.includes(_key)) { |
| | | _val = '1949-10-01' |
| | | if (_key === 'bid') { |
| | | _val = `'${BID}'` |
| | | } else { |
| | | _val = `@${_field}` |
| | | } |
| | | |
| | | _fieldValue.push(`${_key}='${_val}'`) |
| | | _value.push(`${_labels[index] || ''}:${_val || ''}`) |
| | | if (_key === 'bid') { |
| | | _val2 = BID |
| | | } else { |
| | | _val2 = `' + @${_field} + '` |
| | | } |
| | | |
| | | _fieldValue.push(`${_key}=${_val}`) |
| | | _value.push(`${_labels[index] || ''}:${_val2}`) |
| | | }) |
| | | |
| | | if (!arr.includes(primaryKey.toLowerCase())) { |
| | | if (!arr.includes(primaryKey.toLowerCase()) && btn.Ot !== 'notRequired') { |
| | | _fieldValue.push(`${primaryKey} !='${primaryId}'`) |
| | | } |
| | | |
| | |
| | | _sql += ` |
| | | /* 创建凭证 */ |
| | | exec s_BVoucher_Create |
| | | @Bill ='0', |
| | | @Bill = @${_voucher.linkField}, |
| | | @BVoucherType ='${_voucher.BVoucherType}', |
| | | @VoucherTypeOne ='${_voucher.VoucherTypeOne}', |
| | | @VoucherTypeTwo ='${_voucher.VoucherTypeTwo}', |
| | |
| | | { reg: /@datam@/ig, value: `''` }, |
| | | ] |
| | | |
| | | let process = this.props.config.process === 'true' |
| | | if (process) { |
| | | regs.push({ reg: /@works_flow_code@/ig, value: `'1949-10-01 15:00:00'` }) |
| | | } |
| | | |
| | | let sql = this.formatDataSource(item, regs) |
| | | |
| | | return sql |
| | |
| | | import { SnippetsOutlined } from '@ant-design/icons' |
| | | import md5 from 'md5' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import MenuUtils from '@/utils/utils-custom.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | // import './index.scss' |
| | |
| | | btn.anchors = this.modules[id] || this.modules[_id] || null |
| | | } |
| | | if (btn.syncComponent && btn.syncComponent[0] === 'multiComponent' && btn.syncComponents) { |
| | | if (btn.syncComponents[0] && Array.isArray(btn.syncComponents[0])) { // 兼容问题数据 |
| | | btn.syncComponents = btn.syncComponents.map((item, i) => { |
| | | return { |
| | | syncComId: item, |
| | | label: '', |
| | | uuid: 'fixed' + i |
| | | } |
| | | }) |
| | | } |
| | | |
| | | btn.syncComponents = btn.syncComponents.map(m => { |
| | | let id = m.syncComId[m.syncComId.length - 1] |
| | | let _id = md5(commonId + id) |
| | | |
| | | return this.modules[id] || this.modules[_id] || null |
| | | m.syncComId = this.modules[id] || this.modules[_id] || null |
| | | |
| | | return m.syncComId ? m : null |
| | | }) |
| | | btn.syncComponents = btn.syncComponents.filter(Boolean) |
| | | |
| | |
| | | } |
| | | |
| | | this.pasteFormRef.handleConfirm().then(res => { |
| | | if (!res.copyType) { |
| | | if (!res.copyType || (res.copyType === 'components' && this.props.vType !== res.type)) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '配置信息格式错误!', |
| | |
| | | |
| | | let menu = fromJS(window.GLOB.customMenu).toJS() |
| | | |
| | | if (res.copyType === 'components') { |
| | | let commonId = Utils.getuuid() |
| | | |
| | | res.interfaces = res.interfaces.map(inter => { |
| | | inter.uuid = md5(commonId + inter.uuid) |
| | | return inter |
| | | }) |
| | | |
| | | res.components = MenuUtils.resetConfig(res.components, commonId, true) |
| | | |
| | | if (menu.components.length) { |
| | | if ( |
| | | menu.components.findIndex(m => m.type === 'search' || (m.type === 'topbar' && m.wrap.type !== 'navbar')) > -1 && |
| | | res.components.findIndex(m => m.type === 'search' || (m.type === 'topbar' && m.wrap.type !== 'navbar')) > -1 |
| | | ) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '搜索条件不可重复添加!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | if ( |
| | | menu.components.findIndex(m => m.type === 'topbar') > -1 && |
| | | res.components.findIndex(m => m.type === 'topbar') > -1 |
| | | ) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '导航栏不可重复添加!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | } |
| | | |
| | | this.setState({visible: false}) |
| | | |
| | | this.props.insert(res) |
| | | |
| | | notification.success({ |
| | | top: 92, |
| | | message: '粘贴成功!', |
| | | duration: 2 |
| | | }) |
| | | |
| | | return |
| | | } |
| | | |
| | | if (!options.includes(res.copyType)) { |
| | | if (type && types[res.copyType]) { |
| | | notification.warning({ |
| | |
| | | |
| | | const EditForm = asyncComponent(() => import('./editform')) |
| | | const Video = asyncComponent(() => import('./video')) |
| | | const Image = asyncComponent(() => import('@/components/Image')) |
| | | |
| | | class SourceController extends Component { |
| | | state = { |
| | |
| | | <Col span={4} key={item.id}> |
| | | <div className="image-video-box"> |
| | | <div className="image-video-box-body"> |
| | | <Image url={item.linkurl.replace(/@mywebsite@\//ig, window.GLOB.baseurl)} /> |
| | | <img src={item.linkurl.replace(/@mywebsite@\//ig, window.GLOB.baseurl)} alt=""/> |
| | | </div> |
| | | <div className="image-video-control"> |
| | | <CopyOutlined onClick={() => this.copySource(item)}/> |
| | |
| | | .video-react-control-bar { |
| | | display: none; |
| | | } |
| | | img { |
| | | width: 100%; |
| | | height: 100%; |
| | | object-fit: contain; |
| | | object-position: center; |
| | | } |
| | | } |
| | | .image-video-control { |
| | | position: absolute; |
| | |
| | | labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } |
| | | > |
| | | <Radio.Group style={{whiteSpace: 'nowrap'}} defaultValue={card.display || 'block'} onChange={(e) => this.changeNormalStyle(e.target.value, 'display')}> |
| | | <Radio value="block">块级元素</Radio> |
| | | <Radio value="inline-block">行内块元素</Radio> |
| | | <Radio value="block">整行</Radio> |
| | | <Radio value="inline-block">自适应</Radio> |
| | | <Radio value="none">不显示</Radio> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | | </Col> |
| | |
| | | copy = (item) => { |
| | | let msg = { key: 'interface', type: 'line', data: item } |
| | | |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid) { |
| | | msg.$srcId = srcid |
| | | } |
| | | |
| | | try { |
| | | msg = window.btoa(window.encodeURIComponent(JSON.stringify(msg))) |
| | | } catch (e) { |
| | |
| | | import './index.scss' |
| | | |
| | | const presetColors = [ |
| | | '#1890ff', '#f5222d', '#fa541c', '#fa8c16', '#faad14', '#fadb14', '#a0d911', '#52c41a', '#13c2c2', '#2f54eb', '#722ed1', |
| | | '#1890ff', '#f5222d', '#fa541c', '#fa8c16', '#faad14', '#fadb14', '#a0d911', '#52c41a', '#13c2c2', '#3860f4', '#722ed1', |
| | | '#eb2f96', '#aeb303', '#c32539', '#1d3661', '#ffd591', '#ffe58f', '#fffb8f', '#eaff8f', '#b7eb8f', '#87e8de', '#91d5ff', |
| | | '#adc6ff', '#EBE9E9', '#d9d9d9', 'rgba(0, 0, 0, 0.65)', 'rgba(0, 0, 0, 0.85)', '#000000', '#ffffff', 'transparent' |
| | | ] |
| | |
| | | |
| | | _card.$copy = true |
| | | |
| | | delete val.$srcId |
| | | |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid) { |
| | | val.$srcId = srcid |
| | | } |
| | | |
| | | oInput.value = window.btoa(window.encodeURIComponent(JSON.stringify(val))) |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | |
| | | }} type={card.setting.icon || 'cloud'}/> |
| | | {card.setting.tip ? <sup className="am-badge-text"></sup> : null} |
| | | </div> : <div className="menu-sign"> |
| | | <img style={{width: card.setting.imgWidth, height: card.setting.imgWidth, borderRadius: card.setting.borderRadius || '15%'}} src={card.setting.url} alt=""/> |
| | | <img style={{width: card.setting.imgWidth, height: card.setting.imgWidth, borderRadius: card.setting.borderRadius || '15%'}} src={card.setting.url.replace(/@mywebsite@\//ig, window.GLOB.baseurl)} alt=""/> |
| | | {card.setting.tip ? <sup className="am-badge-text"></sup> : null} |
| | | </div>} |
| | | <div className="menu-name" style={{opacity: !card.setting.name ? 0 : 1}}>{card.setting.name || '明科'}</div> |
| | |
| | | render() { |
| | | const { card } = this.state |
| | | |
| | | if (!card.wrap) return null |
| | | |
| | | let _style = {...card.style} |
| | | _style.height = card.wrap.height |
| | | |
| | |
| | | label: '标题', |
| | | initval: wrap.title || '', |
| | | // tooltip: '使用搜索框时,标题用于搜索条件隐藏时(当启用黑名单,登录用户无权限时)显示。注:@username代表用户名,@fullname代表姓名。', |
| | | tooltip: '注:@username代表用户名,@fullname代表姓名。', |
| | | tooltip: '注:@username代表用户名,@fullname代表姓名,@appname代表应用名。', |
| | | required: false |
| | | }, |
| | | { |
| | |
| | | let val = JSON.parse(JSON.stringify(_card)) |
| | | val.copyType = 'search' |
| | | |
| | | delete val.$srcId |
| | | |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid) { |
| | | val.$srcId = srcid |
| | | } |
| | | |
| | | oInput.value = window.btoa(window.encodeURIComponent(JSON.stringify(val))) |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | |
| | | const RoleManage = asyncLoadComponent(() => import('@/views/rolemanage')) |
| | | const SystemFunc = asyncLoadComponent(() => import('@/views/systemfunc')) |
| | | const SystemProc = asyncLoadComponent(() => import('@/views/systemproc')) |
| | | // const SystemCheck = asyncLoadComponent(() => import('@/views/syscheck')) |
| | | const MkIframe = asyncLoadComponent(() => import('@/views/mkiframe')) |
| | | |
| | | const routers = [ |
| | |
| | | {path: '/iframe/:menuId/:loginUid/:bid', name: 'iframe', component: MkIframe}, |
| | | {path: '/view/:menuId', name: 'iframe', component: MkIframe}, |
| | | {path: '/view/:menuId/:bid', name: 'iframe', component: MkIframe}, |
| | | {path: '/interface', name: 'interface', component: Interface} |
| | | {path: '/interface', name: 'interface', component: Interface}, |
| | | // {path: '/syscheck', name: 'syscheck', component: SystemCheck} |
| | | ] |
| | | |
| | | export default class RouteConfig extends Component { |
| | |
| | | let keys = Object.keys(urlparam) |
| | | config.allSqls.forEach(item => { |
| | | item.id = md5(window.GLOB.appkey + item.v_id) |
| | | if (item.type === 'datasource' || item.type === 'excelOut') { |
| | | if (['datasource', 'interface', 'excelOut'].includes(item.type)) { |
| | | item.urlkeys = keys |
| | | item.urlparam = urlparam |
| | | if (config.flow_code) { |
| | |
| | | Utils.initSearchVal(item) |
| | | |
| | | if (urlparam.$searchkey) { |
| | | let reg = new RegExp('(^|,)' + urlparam.$searchkey + '($|,)', 'ig') |
| | | item.search.forEach(cell => { |
| | | if (urlparam.$searchkey === cell.field.toLowerCase() && ['text', 'select', 'link', 'checkcard'].includes(cell.type)) { |
| | | if (reg.test(cell.field) && ['text', 'select', 'link', 'checkcard'].includes(cell.type)) { |
| | | cell.initval = urlparam.$searchval |
| | | } |
| | | }) |
| | |
| | | } |
| | | } else if (cell.syncComponentId === 'multiComponent') { |
| | | let ids = cell.syncComponents.map(m => { |
| | | if (Array.isArray(m)) return m.pop() || '' |
| | | return m.syncComId.pop() || '' |
| | | }) |
| | | |
| | |
| | | |
| | | // 字段透视及必填标志 |
| | | config.search = config.search.map(item => { |
| | | if (['text', 'select', 'link', 'checkcard'].includes(item.type) && param && param.$searchkey === item.field.toLowerCase()) { |
| | | if (['text', 'select', 'link', 'checkcard'].includes(item.type) && param && param.$searchkey === item.field) { |
| | | item.initval = param.$searchval |
| | | } |
| | | return item |
| | |
| | | } |
| | | |
| | | if (card.field) { |
| | | __param.$searchkey = card.field.toLowerCase() |
| | | __param.$searchkey = card.field |
| | | __param.$searchval = data[card.field] || '' |
| | | } |
| | | |
| | |
| | | } |
| | | } else { |
| | | url = data[card.field] || '' |
| | | url = url.replace(/@mywebsite@\//ig, window.GLOB.baseurl) |
| | | } |
| | | |
| | | if (url === '' && card.noValue === 'hide') { // 空值隐藏 |
| | |
| | | |
| | | this.autoTimer && clearTimeout(this.autoTimer) |
| | | |
| | | if (btn) { |
| | | if (config.setting.supModule && config.wrap.datatype === 'static' && !data.$$BID) { |
| | | |
| | | } else if (btn) { |
| | | MKEmitter.emit('triggerBtnId', config.wrap.autoExec, data.$$empty ? [] : [data]) |
| | | } else if (!times || times < 20) { |
| | | times = times ? times + 1 : 1 |
| | |
| | | |
| | | this.setState({ |
| | | data: _data, |
| | | }, () => { |
| | | if (!btn) { |
| | | this.autoExec() |
| | | } |
| | | }) |
| | | |
| | | if (!btn) { |
| | | this.autoExec() |
| | | } |
| | | return |
| | | } else if (config.setting.supModule && !BID) { // BID 不存在时,不做查询 |
| | | this.setState({ |
| | |
| | | yellow_green: '#a0d911', |
| | | green: '#52c41a', |
| | | cyan: '#13c2c2', |
| | | blue_purple: '#2f54eb', |
| | | blue_purple: '#3860f4', |
| | | purple: '#722ed1', |
| | | magenta: '#eb2f96', |
| | | grass_green: '#aeb303', |
| | |
| | | yellow_green: '#a0d911', |
| | | green: '#52c41a', |
| | | cyan: '#13c2c2', |
| | | blue_purple: '#2f54eb', |
| | | blue_purple: '#3860f4', |
| | | purple: '#722ed1', |
| | | magenta: '#eb2f96', |
| | | grass_green: '#aeb303', |
| | |
| | | } |
| | | } |
| | | } |
| | | .custom-braft-editor-box.word-break { |
| | | .braft-content { |
| | | table { |
| | | td, th { |
| | | word-break: break-all!important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .custom-braft-editor-box.tb-flex { |
| | | .braft-content { |
| | | table { |
| | |
| | | } |
| | | |
| | | if (item.field) { |
| | | __param.$searchkey = item.field.toLowerCase() |
| | | __param.$searchkey = item.field |
| | | __param.$searchval = record[item.field] || '' |
| | | } |
| | | |
| | |
| | | let keys = Object.keys(urlparam) |
| | | config.allSqls.forEach(item => { |
| | | item.id = md5(window.GLOB.appkey + item.v_id) |
| | | if (item.type === 'datasource' || item.type === 'excelOut') { |
| | | if (['datasource', 'interface', 'excelOut'].includes(item.type)) { |
| | | item.urlkeys = keys |
| | | item.urlparam = urlparam |
| | | if (config.flow_code) { |
| | |
| | | Utils.initSearchVal(item) |
| | | |
| | | if (urlparam.$searchkey) { |
| | | let reg = new RegExp('(^|,)' + urlparam.$searchkey + '($|,)', 'ig') |
| | | item.search.forEach(cell => { |
| | | if (urlparam.$searchkey === cell.field.toLowerCase() && ['text', 'select', 'link', 'checkcard'].includes(cell.type)) { |
| | | if (reg.test(cell.field) && ['text', 'select', 'link', 'checkcard'].includes(cell.type)) { |
| | | cell.initval = urlparam.$searchval |
| | | } |
| | | }) |
| | |
| | | |
| | | group.subButton = this.resetButton(item, group.subButton) |
| | | |
| | | if (group.subButton.linkmenu) { |
| | | if (Array.isArray(group.subButton.linkmenu) && group.subButton.linkmenu.length > 0) { |
| | | group.subButton.openmenu = group.subButton.linkmenu |
| | | } |
| | | delete group.subButton.linkmenu |
| | | } |
| | | |
| | | if (item.$cache && item.$time) { // 表单缓存 |
| | | group.$cache = item.$cache |
| | | group.$time = item.$time |
| | |
| | | } |
| | | } else if (cell.syncComponentId === 'multiComponent') { |
| | | let ids = cell.syncComponents.map(m => { |
| | | if (Array.isArray(m)) return m.pop() || '' |
| | | return m.syncComId.pop() || '' |
| | | }) |
| | | |
| | |
| | | |
| | | group.subButton = this.resetButton(item, group.subButton, Tab) |
| | | |
| | | if (group.subButton.linkmenu) { |
| | | if (Array.isArray(group.subButton.linkmenu) && group.subButton.linkmenu.length > 0) { |
| | | group.subButton.openmenu = group.subButton.linkmenu |
| | | } |
| | | delete group.subButton.linkmenu |
| | | } |
| | | |
| | | group.fields = group.fields.map(cell => { |
| | | // 数据源sql语句,预处理,权限黑名单字段设置为隐藏表单 |
| | | if (['select', 'link', 'multiselect', 'radio', 'checkbox', 'checkcard'].includes(cell.type) && cell.resourceType === '1') { |
| | |
| | | } |
| | | } else if (cell.syncComponentId === 'multiComponent') { |
| | | let ids = cell.syncComponents.map(m => { |
| | | if (Array.isArray(m)) return m.pop() || '' |
| | | return m.syncComId.pop() || '' |
| | | }) |
| | | |
| | |
| | | |
| | | state = { |
| | | loading: true, |
| | | background: sessionStorage.getItem('home_background'), |
| | | background: sessionStorage.getItem('home_background') || 'unset', |
| | | waiting: true, |
| | | view: '' |
| | | } |
| | |
| | | } else { |
| | | let works_flow_countersign = '' |
| | | let works_flow_sign_values = '' |
| | | let works_flow_sign_field = '' |
| | | let works_flow_sign_field = 'statuscharone' |
| | | let works_flow_sign_label = '' |
| | | let works_begin_branch = '' |
| | | if (line.approvalMethod === 'countersign' && node.checkIds.length > 1) { |
| | |
| | | getSysDeclareSql = (btn, formdata, data, columns, BID = '') => { |
| | | const { submitType } = this.state |
| | | |
| | | let datavars = {} // 声明的变量,表单及显示列 |
| | | // 需要声明的变量集 |
| | | let _vars = ['tbid', 'errorcode', 'retmsg', 'billcode', 'bvoucher', 'fibvoucherdate', 'fiyear', 'username', 'fullname', 'modulardetailcode', 'roleid', 'mk_departmentcode', 'mk_organization', 'mk_user_type', 'mk_nation', 'mk_province', 'mk_city', 'mk_district', 'mk_address', 'mk_deleted', 'bid', 'mk_submit_type'] |
| | | |
| | |
| | | // 获取字段键值对 |
| | | formdata && formdata.forEach(form => { |
| | | let _key = form.key.toLowerCase() |
| | | datavars[_key] = form.value |
| | | |
| | | if (!_initvars.includes(_key)) { |
| | | _initvars.push(_key) |
| | |
| | | |
| | | // 添加数据中字段,表单值优先(按钮不选行或多行拼接时跳过) |
| | | if (data && btn.Ot !== 'notRequired' && columns && columns.length > 0) { |
| | | datavars = {..._data, ...datavars} |
| | | |
| | | const setField = (col) => { |
| | | if (!col.field) return |
| | | let _key = col.field.toLowerCase() |
| | | |
| | | if (!_initvars.includes(_key)) { |
| | | let _val = datavars.hasOwnProperty(_key) ? datavars[_key] : '' |
| | | let _val = _data.hasOwnProperty(_key) ? _data[_key] : '' |
| | | |
| | | if (col.datatype && /^date/ig.test(col.datatype) && !_val) { |
| | | _val = '1949-10-01' |
| | |
| | | } |
| | | |
| | | let tabId = '' |
| | | let menu = null |
| | | if (btn.refreshTab && btn.refreshTab.length > 0) { |
| | | tabId = btn.refreshTab[btn.refreshTab.length - 1] |
| | | } |
| | |
| | | this.clearBackSqlCache() |
| | | } |
| | | |
| | | if (btn.openmenu && Array.isArray(btn.openmenu) && btn.openmenu.length > 0 && sign !== '@no_target_menu@') { |
| | | let menuId = btn.openmenu.slice(-1)[0] |
| | | 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, |
| | | type: btn.tabType, |
| | | param: { $BID: id } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (tabId && btn.$MenuID === tabId) { // 刷新当前菜单时,停止其他操作 |
| | | MKEmitter.emit('reloadMenuView', tabId) |
| | | |
| | | if (menu) { |
| | | MKEmitter.emit('modifyTabs', menu, true) |
| | | } |
| | | return |
| | | } |
| | | |
| | |
| | | node && node.scrollIntoView({behavior: 'smooth', block: 'center', inline: 'nearest'}) |
| | | } |
| | | |
| | | if (btn.openmenu && Array.isArray(btn.openmenu) && btn.openmenu.length > 0 && sign !== '@no_target_menu@') { |
| | | let menuId = btn.openmenu.slice(-1)[0] |
| | | let menu = null |
| | | |
| | | 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, |
| | | type: btn.tabType, |
| | | param: { $BID: id } |
| | | } |
| | | } |
| | | |
| | | if (menu) { |
| | | MKEmitter.emit('modifyTabs', menu, true) |
| | | } |
| | | if (menu) { |
| | | MKEmitter.emit('modifyTabs', menu, true) |
| | | } |
| | | |
| | | if (btn.execSuccess === 'popclose' && btn.$tabId) { // 标签关闭刷新 |
| | |
| | | } else { |
| | | item.showValue = '' |
| | | } |
| | | if (window.backend && action.uuid) { |
| | | item.formSqlId = md5(action.uuid.replace(/_pop$/, '') + item.uuid) |
| | | } |
| | | } else if (item.type === 'brafteditor') { |
| | | if (window.backend && newval && /<\/span>/.test(newval) && item.encryption === 'true') { |
| | | try { |
| | |
| | | import './index.scss' |
| | | |
| | | const presetColors = [ |
| | | '#f5222d', '#fa541c', '#fa8c16', '#faad14', '#fadb14', '#a0d911', '#52c41a', '#13c2c2', '#1890ff', '#2f54eb', '#722ed1', |
| | | '#f5222d', '#fa541c', '#fa8c16', '#faad14', '#fadb14', '#a0d911', '#52c41a', '#13c2c2', '#1890ff', '#3860f4', '#722ed1', |
| | | '#eb2f96', '#595959', '#ffa39e', '#ffbb96', '#ffd591', '#ffe58f', '#fffb8f', '#eaff8f', '#b7eb8f', '#87e8de', '#91d5ff', |
| | | '#adc6ff', '#d3adf7', '#ffadd2', '#d9d9d9', '#434343', '#000000', '#ffffff', 'transparent' |
| | | ] |
| | |
| | | }) |
| | | |
| | | let param = null |
| | | if (window.backend && window.GLOB.CacheData.has('sql_' + config.uuid)) { |
| | | let ex = window.GLOB.CacheData.get('sql_' + config.uuid) |
| | | if (window.backend && window.GLOB.CacheData.has('sql_' + config.formSqlId)) { |
| | | let ex = window.GLOB.CacheData.get('sql_' + config.formSqlId) |
| | | let sysvals = { |
| | | time_id: Utils.getguid(), |
| | | mk_departmentcode: sessionStorage.getItem('departmentcode') || '', |
| | |
| | | } |
| | | |
| | | if (item.field) { |
| | | __param.$searchkey = item.field.toLowerCase() |
| | | __param.$searchkey = item.field |
| | | __param.$searchval = record[item.field] || '' |
| | | } |
| | | |
| | |
| | | |
| | | _card.$copy = true |
| | | |
| | | delete val.$srcId |
| | | |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid) { |
| | | val.$srcId = srcid |
| | | } |
| | | |
| | | oInput.value = window.btoa(window.encodeURIComponent(JSON.stringify(val))) |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | |
| | | delete _val.controlField |
| | | delete _val.controlVal |
| | | } |
| | | delete _val.$srcId |
| | | |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid) { |
| | | _val.$srcId = srcid |
| | | } |
| | | |
| | | _val.uuid = Utils.getuuid() |
| | | _val = window.btoa(window.encodeURIComponent(JSON.stringify(_val))) |
| | |
| | | columns: columnlist |
| | | } |
| | | |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid) { |
| | | val.$srcId = srcid |
| | | } |
| | | |
| | | oInput.value = window.btoa(window.encodeURIComponent(JSON.stringify(val))) |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | |
| | | let _val = fromJS(copycard).toJS() |
| | | |
| | | try { |
| | | delete _val.$srcId |
| | | |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid) { |
| | | _val.$srcId = srcid |
| | | } |
| | | |
| | | _val.uuid = Utils.getuuid() |
| | | _val = window.btoa(window.encodeURIComponent(JSON.stringify(_val))) |
| | | } catch (e) { |
| | |
| | | } |
| | | |
| | | try { |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid) { |
| | | msg.$srcId = srcid |
| | | } |
| | | |
| | | msg = window.btoa(window.encodeURIComponent(JSON.stringify(msg))) |
| | | } catch (e) { |
| | | console.warn('Stringify Failure') |
| | |
| | | } |
| | | try { |
| | | _config = JSON.parse(window.decodeURIComponent(window.atob(_config))) |
| | | |
| | | if (typeof(_config) === 'object' && _config.$srcId) { |
| | | let srcid = localStorage.getItem(window.GLOB.sysSign + 'srcId') |
| | | if (srcid && _config.$srcId !== srcid) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '当前系统无权限使用此项配置!', |
| | | duration: 5 |
| | | }) |
| | | |
| | | _config = '' |
| | | } else { |
| | | delete _config.$srcId |
| | | } |
| | | } |
| | | } catch (e) { |
| | | // 通过sql语句添加字段集 |
| | | if (/[a-zA-Z0-9_]+\s+(nvarchar\(\d+\)|Decimal\(18,\d+\)|Int|datetime|date)/ig.test(values.config)) { |
| | |
| | | }, () => { |
| | | this.props.form.setFieldsValue({ |
| | | field: record.field, |
| | | Type: record.Type || 4, |
| | | TypeCharOne: record.TypeCharOne, |
| | | ModularCode: record.ModularCode, |
| | | ModularDetailCode: _modularDetailCode, |
| | |
| | | |
| | | // 设置流水号位数 |
| | | let _detail = this.state.modularDetail.filter(item => item.ModularDetailCode === values.ModularDetailCode)[0] |
| | | values.Type = _detail.Type |
| | | values.Type = values.Type || _detail.Type |
| | | } else { |
| | | let _billField = billFields.filter(item => item.field === values.linkField)[0] |
| | | values.linkFieldName = _billField ? _billField.label : '' |
| | |
| | | })( |
| | | <Select> |
| | | {this.state.funFields.map(option => |
| | | <Select.Option title={option.label} id={option.uuid} key={option.uuid} value={option.field}> |
| | | {option.label} |
| | | <Select.Option key={option.uuid} value={option.field}> |
| | | {`${option.label}(${option.field})`} |
| | | </Select.Option> |
| | | )} |
| | | </Select> |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={7}> |
| | | <Form.Item label={'类型'}> |
| | | <Form.Item label="类型"> |
| | | {getFieldDecorator('TypeCharOne', { |
| | | initialValue: 'Lp', |
| | | rules: [ |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | {type === '1' ? <Col span={7}> |
| | | <Form.Item label={'关联字段'}> |
| | | <Form.Item label="关联字段"> |
| | | {getFieldDecorator('linkField', { |
| | | initialValue: '', |
| | | rules: [ |
| | |
| | | } |
| | | ] |
| | | })( |
| | | <Select> |
| | | <Select showSearch filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0}> |
| | | {this.state.billFields.map(option => |
| | | <Select.Option title={option.label} id={option.uuid} key={option.uuid} value={option.field}> |
| | | {option.label} |
| | | <Select.Option key={option.uuid} value={option.field}> |
| | | {`${option.label}(${option.field})`} |
| | | </Select.Option> |
| | | )} |
| | | </Select> |
| | |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {type === '2' ? <Col span={7}> |
| | | <Form.Item label={'凭证类型'}> |
| | | <Form.Item label="凭证类型"> |
| | | {getFieldDecorator('ModularCode', { |
| | | initialValue: this.props.modular[0] ? this.props.modular[0].ID : '', |
| | | rules: [ |
| | |
| | | onChange={(value) => {this.voucherChange(value)}} |
| | | > |
| | | {this.props.modular.map(option => |
| | | <Select.Option title={option.NameNO} id={option.ID} key={option.ID} value={option.ID}> |
| | | <Select.Option key={option.ID} value={option.ID}> |
| | | {option.NameNO} |
| | | </Select.Option> |
| | | )} |
| | |
| | | 保存 |
| | | </Button> |
| | | </Col> |
| | | {type === '1' ? <Col span={7}> |
| | | <Col span={7}> |
| | | <Form.Item label="位数"> |
| | | {getFieldDecorator('Type', { |
| | | initialValue: 4, |
| | |
| | | ] |
| | | })(<InputNumber min={1} max={10} precision={0} onPressEnter={this.handleConfirm}/>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Col> |
| | | {type === '2' ? <Col span={7}> |
| | | <Form.Item label="凭证标识"> |
| | | {getFieldDecorator('ModularDetailCode', { |
| | |
| | | filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | > |
| | | {this.state.modularDetail.map(option => |
| | | <Select.Option style={{whiteSpace: 'unset'}} title={option.CodeName} id={option.ModularDetailCode} key={option.ModularDetailCode} value={option.ModularDetailCode}> |
| | | <Select.Option style={{whiteSpace: 'unset'}} key={option.ModularDetailCode} value={option.ModularDetailCode}> |
| | | {option.CodeName} |
| | | </Select.Option> |
| | | )} |
| | |
| | | colfields: colfields.join(', '), |
| | | uniqueColumns: this.state.uniqueColumns.map(col => { |
| | | if (col.dataIndex === 'field') { |
| | | col.options = _fields |
| | | col.options = unionFields |
| | | } |
| | | return col |
| | | }), |
| | |
| | | item.field.split(',').forEach((_field, index) => { |
| | | let _key = _field.toLowerCase() |
| | | let _val = '' |
| | | let _val2 = '' |
| | | |
| | | arr.push(_key) |
| | | if (_key === 'bid') { // 表单中没有bid则使用系统bid变量 |
| | | _val = BID |
| | | } else if (numForms.includes(_key)) { |
| | | _val = '1' |
| | | } else if (dateForms.includes(_key)) { |
| | | _val = '1949-10-01' |
| | | if (_key === 'bid') { |
| | | _val = `'${BID}'` |
| | | } else { |
| | | _val = `@${_field}` |
| | | } |
| | | |
| | | _fieldValue.push(`${_key}='${_val}'`) |
| | | _value.push(`${_labels[index] || ''}:${_val || ''}`) |
| | | if (_key === 'bid') { |
| | | _val2 = BID |
| | | } else { |
| | | _val2 = `' + @${_field} + '` |
| | | } |
| | | |
| | | _fieldValue.push(`${_key}=${_val}`) |
| | | _value.push(`${_labels[index] || ''}:${_val2}`) |
| | | }) |
| | | |
| | | if (!arr.includes(primaryKey.toLowerCase())) { |
| | | if (!arr.includes(primaryKey.toLowerCase()) && btn.Ot !== 'notRequired') { |
| | | _fieldValue.push(`${primaryKey} !='${primaryId}'`) |
| | | } |
| | | |
| | |
| | | _sql += ` |
| | | /* 创建凭证 */ |
| | | exec s_BVoucher_Create |
| | | @Bill ='0', |
| | | @Bill = @${_voucher.linkField}, |
| | | @BVoucherType ='${_voucher.BVoucherType}', |
| | | @VoucherTypeOne ='${_voucher.VoucherTypeOne}', |
| | | @VoucherTypeTwo ='${_voucher.VoucherTypeTwo}', |
| | |
| | | |
| | | changeUniques = (uniques) => { |
| | | const { card } = this.props |
| | | const { verify, fields, columnsFields } = this.state |
| | | const { verify, unionFields, columnsFields } = this.state |
| | | |
| | | let _fields = [] |
| | | let change = {} |
| | | if (card.Ot !== 'requiredOnce') { |
| | | _fields = fields |
| | | _fields = unionFields |
| | | } else { |
| | | _fields = columnsFields |
| | | } |
| | |
| | | /> |
| | | <EditTable actions={['move']} data={verify.customverifys} columns={customColumns} onChange={(customverifys) => {this.setState({verify: {...verify, customverifys}})}}/> |
| | | </TabPane> : null} |
| | | {verifyInter === 'system' ? <TabPane tab={ |
| | | {verifyInter === 'system' && (['form', 'pop'].includes(card.OpenType) || !card.OpenType) ? <TabPane tab={ |
| | | <span> |
| | | 单号生成 |
| | | {verify.billcodes.length ? <span className="count-tip">{verify.billcodes.length}</span> : null} |
| | |
| | | /> |
| | | <EditTable actions={['move']} data={verify.billcodes} columns={orderColumns} onChange={(billcodes) => {this.setState({verify: {...verify, billcodes}})}}/> |
| | | </TabPane> : null} |
| | | {verifyInter === 'system' ? <TabPane tab={ |
| | | {verifyInter === 'system' && (card.Ot === 'requiredOnce' || (['form', 'pop'].includes(card.OpenType) || !card.OpenType)) ? <TabPane tab={ |
| | | <span> |
| | | {card.Ot !== 'requiredOnce' ? '唯一性验证' : '同类数据验证'} |
| | | {verify.uniques.length ? <span className="count-tip">{verify.uniques.length}</span> : null} |
| | |
| | | } key="uniques"> |
| | | <UniqueForm |
| | | btn={card} |
| | | fields={card.Ot !== 'requiredOnce' ? fields : columnsFields} |
| | | fields={card.Ot !== 'requiredOnce' ? unionFields : columnsFields} |
| | | uniqueChange={this.uniqueChange} |
| | | /> |
| | | <EditTable actions={['edit', 'move', 'del', 'status', 'sql']} data={verify.uniques} columns={card.Ot !== 'requiredOnce' ? uniqueColumns : onceUniqueColumns} onChange={this.changeUniques}/> |
| | | </TabPane> : null} |
| | | {verifyInter === 'system' ? <TabPane tab={ |
| | | <span> |
| | | <span title={card.Ot === 'requiredOnce' ? '多行拼接时不可用' : ''}> |
| | | 创建凭证 |
| | | {verify.voucher && verify.voucher.enabled ? <span className="count-tip">1</span> : null} |
| | | </span> |
| | | } key="voucher"> |
| | | } key="voucher" disabled={card.Ot === 'requiredOnce'}> |
| | | <VoucherForm |
| | | voucher={voucher} |
| | | columns={columns} |
| | |
| | | } |
| | | ] |
| | | })( |
| | | <Select |
| | | mode="multiple" |
| | | > |
| | | <Select mode="multiple"> |
| | | {fields.map(item => ( |
| | | <Select.Option key={item.uuid} value={item.field}>{item.label}</Select.Option> |
| | | <Select.Option key={item.uuid} value={item.field}>{`${item.label}(${item.field})`}</Select.Option> |
| | | ))} |
| | | </Select> |
| | | )} |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Form, Row, Col, Select, Switch, notification } from 'antd' |
| | | import { Form, Row, Col, Select, Switch, notification, Modal } from 'antd' |
| | | import { ConsoleSqlOutlined } from '@ant-design/icons' |
| | | // import './index.scss' |
| | | |
| | | class UniqueForm extends Component { |
| | |
| | | }) |
| | | } |
| | | |
| | | voucherSql = () => { |
| | | let BVoucherType = this.props.form.getFieldValue('BVoucherType') |
| | | let VoucherTypeOne = this.props.form.getFieldValue('VoucherTypeOne') |
| | | let linkField = this.props.form.getFieldValue('linkField') |
| | | |
| | | let _detail = this.state.voucherDetail.filter(item => item.ModularDetailCode === VoucherTypeOne)[0] |
| | | |
| | | if (!_detail) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '凭证类型或凭证标识不存在!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | let _sql = `/* 创建凭证 */ |
| | | exec s_BVoucher_Create |
| | | @Bill = @${linkField || ''}, |
| | | @BVoucherType ='${BVoucherType}', |
| | | @VoucherTypeOne ='${VoucherTypeOne}', |
| | | @VoucherTypeTwo ='${_detail.VoucherTypeTwo}', |
| | | @Type =${_detail.IDefine1}, |
| | | @UserID=@UserID@, |
| | | @Username=@Username, |
| | | @FullName=@FullName, |
| | | @BVoucher =@BVoucher OUTPUT , |
| | | @FIBVoucherDate =@FIBVoucherDate OUTPUT , |
| | | @FiYear =@FiYear OUTPUT , |
| | | @ErrorCode =@ErrorCode OUTPUT, |
| | | @retmsg=@retmsg OUTPUT |
| | | if @ErrorCode!='' |
| | | GOTO aaa |
| | | ` |
| | | |
| | | Modal.info({ |
| | | title: '', |
| | | width: 500, |
| | | className: 'sql-example', |
| | | icon: null, |
| | | content: _sql.split(/\n\s{6}/ig).map((n, index) => <div key={index} dangerouslySetInnerHTML={{ __html: n.replace(/\s/ig, ' ') }} style={{whiteSpace: 'nowrap'}}></div>) |
| | | }) |
| | | } |
| | | |
| | | render() { |
| | | const { getFieldDecorator } = this.props.form |
| | | const { voucherobj } = this.props |
| | |
| | | onChange={(value) => {this.voucherSChange(value)}} |
| | | > |
| | | {this.state.voucher.map(option => |
| | | <Select.Option title={option.NameNO} id={option.ID} key={option.ID} value={option.ID}> |
| | | <Select.Option key={option.ID} value={option.ID}> |
| | | {option.NameNO} |
| | | </Select.Option> |
| | | )} |
| | |
| | | onChange={this.contentChange} |
| | | > |
| | | {this.state.voucherDetail.map(option => |
| | | <Select.Option title={option.CodeName} id={option.ModularDetailCode} key={option.ModularDetailCode} value={option.ModularDetailCode}> |
| | | <Select.Option key={option.ModularDetailCode} value={option.ModularDetailCode}> |
| | | {option.CodeName} |
| | | </Select.Option> |
| | | )} |
| | |
| | | onChange={this.contentChange} |
| | | > |
| | | {columns.map((option, index) => |
| | | <Select.Option title={option.label} id={index + option.uuid} key={index + option.uuid} value={option.field}> |
| | | {option.label} |
| | | <Select.Option key={index + option.uuid} value={option.field}> |
| | | {`${option.label}(${option.field})`} |
| | | </Select.Option> |
| | | )} |
| | | </Select> |
| | |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={11}> |
| | | <Form.Item label={'是否启用'}> |
| | | <Form.Item label="是否启用"> |
| | | <Switch checkedChildren="启" unCheckedChildren="停" checked={voucherobj.enabled} onChange={this.onEnabledChange} /> |
| | | {voucherobj.enabled ? <ConsoleSqlOutlined style={{marginLeft: '20px', fontSize: '18px', color: '#1890ff', verticalAlign: 'middle'}} onClick={this.voucherSql}/> : null} |
| | | </Form.Item> |
| | | </Col> |
| | | </Row> |
| | |
| | | 'blue-8': '#0050b3', |
| | | 'blue-9': '#003a8c', |
| | | 'blue-10': '#002766', |
| | | 'geekblue-1': '#f0f5ff', |
| | | 'geekblue-2': '#d6e4ff', |
| | | 'geekblue-3': '#adc6ff', |
| | | 'geekblue-4': '#85a5ff', |
| | | 'geekblue-5': '#597ef7', |
| | | 'geekblue-6': '#2f54eb', |
| | | 'geekblue-7': '#1d39c4', |
| | | 'geekblue-8': '#10239e', |
| | | 'geekblue-9': '#061178', |
| | | 'geekblue-10': '#030852', |
| | | 'geekblue-1': '#f0f6ff', |
| | | 'geekblue-2': '#dee9ff', |
| | | 'geekblue-3': '#b5ccff', |
| | | 'geekblue-4': '#8cadff', |
| | | 'geekblue-5': '#638aff', |
| | | 'geekblue-6': '#3860f4', |
| | | 'geekblue-7': '#2544cf', |
| | | 'geekblue-8': '#162ca8', |
| | | 'geekblue-9': '#0a1882', |
| | | 'geekblue-10': '#060e5c', |
| | | 'purple-1': '#f9f0ff', |
| | | 'purple-2': '#efdbff', |
| | | 'purple-3': '#d3adf7', |
| | |
| | | card.elements = card.elements.map(cell => { |
| | | if (cell.eleType === 'button') { |
| | | cell.uuid = md5(commonId + cell.uuid) |
| | | if (clear && cell.pageTemplate === 'linkpage' && cell.linkmenu) { |
| | | cell.pageTemplate = '' |
| | | cell.linkmenu = '' |
| | | } |
| | | this.resetBtn(cell, commonId) |
| | | this.resetBtn(cell, commonId, clear) |
| | | } else { |
| | | cell.uuid = this.getuuid() |
| | | } |
| | |
| | | card.backElements = card.backElements.map(cell => { |
| | | if (cell.eleType === 'button') { |
| | | cell.uuid = md5(commonId + cell.uuid) |
| | | if (clear && cell.pageTemplate === 'linkpage' && cell.linkmenu) { |
| | | cell.pageTemplate = '' |
| | | cell.linkmenu = '' |
| | | } |
| | | this.resetBtn(cell, commonId) |
| | | this.resetBtn(cell, commonId, clear) |
| | | } else { |
| | | cell.uuid = this.getuuid() |
| | | } |
| | |
| | | item.elements = item.elements.map(cell => { |
| | | if (cell.eleType === 'button') { |
| | | cell.uuid = md5(commonId + cell.uuid) |
| | | if (clear && cell.pageTemplate === 'linkpage' && cell.linkmenu) { |
| | | cell.pageTemplate = '' |
| | | cell.linkmenu = '' |
| | | } |
| | | this.resetBtn(cell, commonId) |
| | | this.resetBtn(cell, commonId, clear) |
| | | } else { |
| | | cell.uuid = this.getuuid() |
| | | } |
| | |
| | | cell.uuid = md5(commonId + cell.uuid) |
| | | |
| | | if (cell.eleType === 'button') { |
| | | if (clear && cell.pageTemplate === 'linkpage' && cell.linkmenu) { |
| | | cell.pageTemplate = '' |
| | | cell.linkmenu = '' |
| | | } |
| | | |
| | | this.resetBtn(cell, commonId) |
| | | this.resetBtn(cell, commonId, clear) |
| | | } |
| | | |
| | | return cell |
| | |
| | | }) |
| | | |
| | | if (cell.subButton) { |
| | | this.resetBtn(cell.subButton, commonId) |
| | | this.resetBtn(cell.subButton, commonId, clear) |
| | | } |
| | | |
| | | return cell |
| | | }) |
| | | } else if (item.type === 'login') { |
| | | if (clear) { |
| | | item.wrap.linkmenu = '' |
| | | } |
| | | } |
| | | |
| | | if (item.btnlog) { |
| | |
| | | item.action = item.action.map(cell => { |
| | | cell.uuid = md5(commonId + cell.uuid) |
| | | |
| | | if (clear && cell.pageTemplate === 'linkpage' && cell.linkmenu) { |
| | | cell.pageTemplate = '' |
| | | cell.linkmenu = '' |
| | | } |
| | | |
| | | this.resetBtn(cell, commonId) |
| | | this.resetBtn(cell, commonId, clear) |
| | | |
| | | return cell |
| | | }) |
| | |
| | | /** |
| | | * @description 按钮重置 |
| | | */ |
| | | static resetBtn (btn, commonId) { |
| | | static resetBtn (btn, commonId, clear = false) { |
| | | if (btn.OpenType === 'pop' || (btn.OpenType === 'funcbutton' && btn.execMode === 'pop')) { |
| | | if (btn.modal && btn.modal.fields.length > 0) { |
| | | if (btn.modal && btn.modal.fields && btn.modal.fields.length > 0) { |
| | | btn.modal.fields = btn.modal.fields.map(m => { |
| | | m.uuid = this.getuuid() |
| | | return m |
| | | }) |
| | | } |
| | | } |
| | | |
| | | if (clear) { |
| | | if (btn.pageTemplate === 'linkpage') { |
| | | btn.pageTemplate = '' |
| | | } |
| | | delete btn.linkmenu |
| | | delete btn.openmenu |
| | | delete btn.refreshTab |
| | | } |
| | | |
| | | if (btn.switchTab && btn.switchTab.length > 0) { |
| | | btn.switchTab = btn.switchTab.map(m => md5(commonId + m)) |
| | | } |
| | |
| | | btn.anchors = btn.anchors.map(m => md5(commonId + m)) |
| | | } |
| | | if (btn.syncComponent && btn.syncComponent[0] === 'multiComponent' && btn.syncComponents) { |
| | | if (btn.syncComponents[0] && Array.isArray(btn.syncComponents[0])) { |
| | | btn.syncComponents = btn.syncComponents.map((item, i) => { |
| | | return { |
| | | syncComId: item, |
| | | label: '', |
| | | uuid: 'fixed' + i |
| | | } |
| | | }) |
| | | } |
| | | btn.syncComponents = btn.syncComponents.map(m => { |
| | | m.syncComId = m.syncComId.map(n => { |
| | | if (/\$focus/.test(n)) { |
| | |
| | | |
| | | return md5(commonId + m) |
| | | }) |
| | | } |
| | | |
| | | if (btn.OpenType === 'popview' && btn.config && btn.config.components) { |
| | | btn.config.components = this.resetConfig(btn.config.components, commonId) |
| | | } |
| | | } |
| | | |
| | |
| | | if (cell.eleType === 'button') { |
| | | cell.uuid = md5(commonId + cell.uuid) |
| | | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (cell.modal && cell.modal.fields.length > 0) { |
| | | cell.modal.fields = cell.modal.fields.map(m => { |
| | | m.uuid = this.getuuid() |
| | | return m |
| | | }) |
| | | } |
| | | } |
| | | this.resetBtn(cell, commonId) |
| | | } else { |
| | | cell.uuid = this.getuuid() |
| | | } |
| | |
| | | card.backElements = card.backElements.map(cell => { |
| | | if (cell.eleType === 'button') { |
| | | cell.uuid = md5(commonId + cell.uuid) |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (cell.modal && cell.modal.fields.length > 0) { |
| | | cell.modal.fields = cell.modal.fields.map(m => { |
| | | m.uuid = this.getuuid() |
| | | return m |
| | | }) |
| | | } |
| | | } |
| | | |
| | | this.resetBtn(cell, commonId) |
| | | } else { |
| | | cell.uuid = this.getuuid() |
| | | } |
| | |
| | | item.elements = item.elements.map(cell => { |
| | | if (cell.eleType === 'button') { |
| | | cell.uuid = md5(commonId + cell.uuid) |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (cell.modal && cell.modal.fields.length > 0) { |
| | | cell.modal.fields = cell.modal.fields.map(m => { |
| | | m.uuid = this.getuuid() |
| | | return m |
| | | }) |
| | | } |
| | | } |
| | | |
| | | this.resetBtn(cell, commonId) |
| | | } else { |
| | | cell.uuid = this.getuuid() |
| | | } |
| | |
| | | col.elements = col.elements.map(cell => { |
| | | cell.uuid = md5(commonId + cell.uuid) |
| | | if (cell.eleType === 'button') { |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (cell.modal && cell.modal.fields.length > 0) { |
| | | cell.modal.fields = cell.modal.fields.map(m => { |
| | | m.uuid = this.getuuid() |
| | | return m |
| | | }) |
| | | } |
| | | } |
| | | this.resetBtn(cell, commonId) |
| | | } |
| | | return cell |
| | | }) |
| | |
| | | } |
| | | item.action = item.action.map(cell => { |
| | | cell.uuid = md5(commonId + cell.uuid) |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (cell.modal && cell.modal.fields.length > 0) { |
| | | cell.modal.fields = cell.modal.fields.map(m => { |
| | | m.uuid = this.getuuid() |
| | | return m |
| | | }) |
| | | } |
| | | } |
| | | this.resetBtn(cell, commonId) |
| | | |
| | | return cell |
| | | }) |
| | |
| | | }) |
| | | } |
| | | let emptys = [] |
| | | if (cell.Ot !== 'notRequired') { |
| | | forms.push(...columns) |
| | | } |
| | | |
| | | cell.verify.uniques.forEach(m => { |
| | | if (m.status === 'false') return |
| | | |
| | |
| | | }) |
| | | |
| | | if (emptys.length) { |
| | | errors.push({ level: 0, detail: `按钮“${cell.label}”唯一性验证字段${emptys.join('、')},在表单中不存在!`}) |
| | | if (cell.Ot === 'notRequired') { |
| | | errors.push({ level: 0, detail: `按钮“${cell.label}”唯一性验证字段${emptys.join('、')},在表单中不存在!`}) |
| | | } else { |
| | | errors.push({ level: 0, detail: `按钮“${cell.label}”唯一性验证字段${emptys.join('、')},在表单与字段集中不存在!`}) |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } else if (form.type === 'popSelect') { |
| | | let msg = getPopSelectSql(form) |
| | | |
| | | sqls.push({uuid: form.uuid, type: 'popSource', ...msg}) |
| | | sqls.push({uuid: md5(cell.uuid + form.uuid), type: 'popSource', ...msg}) |
| | | } |
| | | }) |
| | | } |
| | |
| | | } else if (form.type === 'popSelect') { |
| | | let msg = getPopSelectSql(form) |
| | | |
| | | sqls.push({uuid: form.uuid, type: 'popSource', ...msg}) |
| | | sqls.push({uuid: md5(cell.uuid + form.uuid), type: 'popSource', ...msg}) |
| | | } |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | filterComponent(cell.config.components, _mainSearch, '-' + cell.label, true) |
| | | let label = (item.name ? '-' + item.name : '') + '-' + cell.label |
| | | |
| | | filterComponent(cell.config.components, _mainSearch, label, true) |
| | | } |
| | | } |
| | | } |
| | |
| | | let _val2 = '' |
| | | |
| | | arr.push(_key) |
| | | if (_key === 'bid') { // 表单中没有bid则使用系统bid变量 |
| | | if (_key === 'bid') { |
| | | _val = BID |
| | | } else { |
| | | _val = `'@mk_${_key}_mk@'` |
| | | // _val = `'@mk_${_key}_mk@'` |
| | | _val = `@${_field}` |
| | | } |
| | | |
| | | _fieldValue.push(`${_key}=${_val}`) |
| | | |
| | | if (_key === 'bid') { // 表单中没有bid则使用系统bid变量 |
| | | if (_key === 'bid') { |
| | | _val2 = `' + ${BID} + '` |
| | | } else { |
| | | _val2 = `@mk_${_key}_mk@` |
| | | // _val2 = `@mk_${_key}_mk@` |
| | | _val2 = `' + @${_field} + '` |
| | | } |
| | | |
| | | _value.push(`${_labels[index] || ''}:${_val2}`) |
| | | }) |
| | | |
| | | if (!arr.includes(primaryKey.toLowerCase())) { |
| | | if (!arr.includes(primaryKey.toLowerCase()) && btn.Ot !== 'notRequired') { |
| | | _fieldValue.push(`${primaryKey} !=${primaryId}`) |
| | | } |
| | | |
| | |
| | | _sql += ` |
| | | /* 创建凭证 */ |
| | | exec s_BVoucher_Create |
| | | @Bill ='0', |
| | | @Bill = @${_voucher.linkField}, |
| | | @BVoucherType ='${_voucher.BVoucherType}', |
| | | @VoucherTypeOne ='${_voucher.VoucherTypeOne}', |
| | | @VoucherTypeTwo ='${_voucher.VoucherTypeTwo}', |
| | |
| | | _sql += ` |
| | | /* 工作流异常sql */ |
| | | if @works_flow_error@ != '' |
| | | select @ErrorCode='E',@retmsg=@works_flow_error@ goto aaa |
| | | begin |
| | | select @ErrorCode='E',@retmsg=@works_flow_error@ goto aaa |
| | | end |
| | | |
| | | /* 工作流默认sql */ |
| | | insert into s_my_works_flow (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,work_group,works_flow_detail_id,work_grade,bid,createuserid,CreateUser,CreateStaff,upid) |
| | |
| | | _sql += ` |
| | | /* 工作流异常sql */ |
| | | if @works_flow_error@ != '' |
| | | select @ErrorCode='E',@retmsg=@works_flow_error@ goto aaa |
| | | begin |
| | | select @ErrorCode='E',@retmsg=@works_flow_error@ goto aaa |
| | | end |
| | | |
| | | if @works_flow_countersign@ = 'Y' |
| | | begin |
| | |
| | | sql += ` |
| | | /* 工作流异常sql */ |
| | | if @works_flow_error@ != '' |
| | | select @ErrorCode='E',@retmsg=@works_flow_error@ goto aaa |
| | | begin |
| | | select @ErrorCode='E',@retmsg=@works_flow_error@ goto aaa |
| | | end |
| | | |
| | | /* 工作流默认sql */ |
| | | insert into s_my_works_flow (works_flow_id,works_flow_code,works_flow_name,works_flow_param,status,statusname,work_group,works_flow_detail_id,work_grade,bid,createuserid,CreateUser,CreateStaff,upid) |
| | |
| | | |
| | | filterComponent(config.components, _mainSearch) |
| | | |
| | | let keys = sqls.map(item => item.uuid) |
| | | if (keys.length > Array.from(new Set(keys)).length) { |
| | | if (window.backend) { |
| | | let m = new Map() |
| | | let n = new Map() |
| | | sqls.forEach(item => { |
| | | if (m.has(item.uuid)) { |
| | | if (!n.has(item.uuid)) { |
| | | window.mkInfo(m.get(item.uuid)) |
| | | n.set(item.uuid, true) |
| | | } |
| | | window.mkInfo(item) |
| | | } else { |
| | | m.set(item.uuid, item) |
| | | } |
| | | }) |
| | | |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '存在重复的后端脚本ID!', |
| | | duration: 5 |
| | | }) |
| | | } |
| | | |
| | | return [] |
| | | } |
| | | |
| | | return sqls |
| | | } |
| | |
| | | let primaryId = param.ID |
| | | let BID = param.BID || '' |
| | | let verify = btn.verify || {} |
| | | let datavars = {} // 声明的变量,表单及显示列 |
| | | let _actionType = null |
| | | let _callbacksql = '' |
| | | |
| | |
| | | // 获取字段键值对 |
| | | formdata && formdata.forEach(form => { |
| | | let _key = form.key.toLowerCase() |
| | | datavars[_key] = form.value |
| | | |
| | | if (!_initvars.includes(_key)) { |
| | | _initvars.push(_key) |
| | |
| | | |
| | | // 添加数据中字段,表单值优先(按钮不选行或多行拼接时跳过) |
| | | if (data && btn.Ot !== 'notRequired' && columns && columns.length > 0) { |
| | | datavars = {..._data, ...datavars} |
| | | |
| | | const setField = (col) => { |
| | | if (!col.field) return |
| | | let _key = col.field.toLowerCase() |
| | | |
| | | if (!_initvars.includes(_key)) { |
| | | let _val = datavars.hasOwnProperty(_key) ? datavars[_key] : '' |
| | | let _val = _data.hasOwnProperty(_key) ? _data[_key] : '' |
| | | |
| | | if (col.datatype && /^date/ig.test(col.datatype) && !_val) { |
| | | _val = '1949-10-01' |
| | |
| | | |
| | | item.field.split(',').forEach((_field, index) => { |
| | | let _key = _field.toLowerCase() |
| | | let _val = datavars[_key] !== undefined ? datavars[_key] : '' |
| | | let _val = '' |
| | | let _val2 = '' |
| | | |
| | | arr.push(_key) |
| | | if (_key === 'bid' && !_val) { // 表单中没有bid则使用系统bid变量 |
| | | _val = BID |
| | | if (_key === 'bid') { |
| | | _val = `'${BID}'` |
| | | } else { |
| | | _val = `@${_field}` |
| | | } |
| | | |
| | | _fieldValue.push(`${_key}='${_val}'`) |
| | | _value.push(`${_labels[index] || ''}:${_val || ''}`) |
| | | |
| | | if (_key === 'bid') { |
| | | _val2 = BID |
| | | } else { |
| | | _val2 = `' + @${_field} + '` |
| | | } |
| | | |
| | | _fieldValue.push(`${_key}=${_val}`) |
| | | _value.push(`${_labels[index] || ''}:${_val2}`) |
| | | }) |
| | | |
| | | if (!arr.includes(primaryKey.toLowerCase())) { |
| | | if (!arr.includes(primaryKey.toLowerCase()) && btn.Ot !== 'notRequired') { |
| | | _fieldValue.push(`${primaryKey} !='${primaryId}'`) |
| | | } |
| | | |
| | |
| | | _sql += ` |
| | | /* 创建凭证 */ |
| | | exec s_BVoucher_Create |
| | | @Bill ='${_data[_voucher.linkField.toLowerCase()] || ''}', |
| | | @Bill = @${_voucher.linkField}, |
| | | @BVoucherType ='${_voucher.BVoucherType}', |
| | | @VoucherTypeOne ='${_voucher.VoucherTypeOne}', |
| | | @VoucherTypeTwo ='${_voucher.VoucherTypeTwo}', |
| | |
| | | bg_black_style_yellow_green: {name: '黄绿色', color: '#a0d911'}, |
| | | bg_black_style_green: {name: '绿色', color: '#52c41a'}, |
| | | bg_black_style_cyan: {name: '青色', color: '#13c2c2'}, |
| | | bg_black_style_blue_purple: {name: '蓝紫色', color: '#2f54eb'}, |
| | | bg_black_style_blue_purple: {name: '蓝紫色', color: '#3860f4'}, |
| | | bg_black_style_purple: {name: '紫色', color: '#722ed1'}, |
| | | bg_black_style_magenta: {name: '洋红色', color: '#eb2f96'}, |
| | | bg_black_style_grass_green: {name: '草绿色', color: '#aeb303'}, |
| | |
| | | bg_black_style_yellow_green: {name: '黄绿色', color: '#a0d911'}, |
| | | bg_black_style_green: {name: '绿色', color: '#52c41a'}, |
| | | bg_black_style_cyan: {name: '青色', color: '#13c2c2'}, |
| | | bg_black_style_blue_purple: {name: '蓝紫色', color: '#2f54eb'}, |
| | | bg_black_style_blue_purple: {name: '蓝紫色', color: '#3860f4'}, |
| | | bg_black_style_purple: {name: '紫色', color: '#722ed1'}, |
| | | bg_black_style_magenta: {name: '洋红色', color: '#eb2f96'}, |
| | | bg_black_style_grass_green: {name: '草绿色', color: '#aeb303'}, |
| | |
| | | <Select.Option value="bg_black_style_yellow_green"><span className="color-block" style={{background: '#a0d911'}}></span>黄绿色(#a0d911)</Select.Option> |
| | | <Select.Option value="bg_black_style_green"><span className="color-block" style={{background: '#52c41a'}}></span>绿色(#52c41a)</Select.Option> |
| | | <Select.Option value="bg_black_style_cyan"><span className="color-block" style={{background: '#13c2c2'}}></span>青色(#13c2c2)</Select.Option> |
| | | <Select.Option value="bg_black_style_blue_purple"><span className="color-block" style={{background: '#2f54eb'}}></span>蓝紫色(#2f54eb)</Select.Option> |
| | | <Select.Option value="bg_black_style_blue_purple"><span className="color-block" style={{background: '#3860f4'}}></span>蓝紫色(#3860f4)</Select.Option> |
| | | <Select.Option value="bg_black_style_purple"><span className="color-block" style={{background: '#722ed1'}}></span>紫色(#722ed1)</Select.Option> |
| | | <Select.Option value="bg_black_style_magenta"><span className="color-block" style={{background: '#eb2f96'}}></span>洋红色(#eb2f96)</Select.Option> |
| | | <Select.Option value="bg_black_style_grass_green"><span className="color-block" style={{background: '#aeb303'}}></span>草绿色(#aeb303)</Select.Option> |
| | |
| | | LText: `select '${window.GLOB.appkey}'`, |
| | | } |
| | | |
| | | if (window.GLOB.style_appkey) { |
| | | _param.style_appkey = window.GLOB.style_appkey |
| | | } |
| | | |
| | | _param.userid = result.UserID |
| | | _param.LoginUID = result.LoginUID |
| | | _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | |
| | | let keys = Object.keys(urlparam) |
| | | config.allSqls.forEach(item => { |
| | | item.id = md5(window.GLOB.appkey + item.v_id) |
| | | if (item.type === 'datasource' || item.type === 'excelOut') { |
| | | if (['datasource', 'interface', 'excelOut'].includes(item.type)) { |
| | | item.urlkeys = keys |
| | | item.urlparam = urlparam |
| | | if (config.flow_code) { |
| | |
| | | } |
| | | |
| | | if (res.query_address !== 'true') { |
| | | localStorage.setItem(_addressUrl, 'false') |
| | | localStorage.removeItem(_addressUrl) |
| | | } else { |
| | | localStorage.setItem(_addressUrl, 'true') |
| | | this.queryAddress() |
| | |
| | | TypeCharOne: 'PC', |
| | | LText: `select '${appkey}'`, |
| | | appkey: appkey |
| | | } |
| | | |
| | | if (window.GLOB.style_appkey) { |
| | | _param.style_appkey = window.GLOB.style_appkey |
| | | } |
| | | |
| | | _param.userid = result.UserID |
| | |
| | | |
| | | localStorage.setItem(window.GLOB.sysSign + 'pwdlevel', level) |
| | | |
| | | if (res.srcid) { |
| | | localStorage.setItem(window.GLOB.sysSign + 'srcId', res.srcid) |
| | | } else { |
| | | localStorage.removeItem(window.GLOB.sysSign + 'srcId') |
| | | } |
| | | |
| | | sessionStorage.setItem('home_background', res.index_background_color || '') |
| | | res.index_background_color && sessionStorage.setItem('home_background', res.index_background_color) |
| | | |
| | | let seconds = 0 |
| | | if (res.sys_datetime) { |
| | |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | let remember = true |
| | | |
| | | if (localStorage.getItem(window.location.href.split('#')[0] + 'users')) { // 过渡 |
| | | localStorage.setItem(window.GLOB.sysSign + 'users', localStorage.getItem(window.location.href.split('#')[0] + 'users')) |
| | | localStorage.setItem(window.GLOB.sysSign + 'remember', localStorage.getItem(window.location.href.split('#')[0] + 'remember')) |
| | | localStorage.removeItem(window.location.href.split('#')[0] + 'users') |
| | | } |
| | | |
| | | if (localStorage.getItem(window.GLOB.sysSign + 'remember') === 'false') { |
| | | remember = false |
| | |
| | | import { is, fromJS } from 'immutable' |
| | | import moment from 'moment' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { notification, Modal, Collapse, Card, Switch, Button, Typography, Spin } from 'antd' |
| | | import { DoubleLeftOutlined, DoubleRightOutlined, EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons' |
| | | import { notification, Modal, Collapse, Card, Switch, Button, Typography, Spin, message } from 'antd' |
| | | import { DoubleLeftOutlined, DoubleRightOutlined, EyeOutlined, EyeInvisibleOutlined, CopyOutlined } from '@ant-design/icons' |
| | | import html2canvas from 'html2canvas' |
| | | import md5 from 'md5' |
| | | |
| | |
| | | insert = (item) => { |
| | | let config = fromJS(this.state.config).toJS() |
| | | |
| | | config.components.push(item) |
| | | if (item.copyType === 'components') { |
| | | config.components.push(...item.components) |
| | | if (!config.interfaces) { |
| | | config.interfaces = item.interfaces |
| | | } else { |
| | | config.interfaces.push(...item.interfaces) |
| | | } |
| | | } else { |
| | | config.components.push(item) |
| | | } |
| | | |
| | | this.setState({config}) |
| | | window.GLOB.customMenu = config |
| | |
| | | const { oriConfig, config } = this.state |
| | | |
| | | return is(fromJS(oriConfig), fromJS(config)) |
| | | } |
| | | |
| | | copyMenu = () => { |
| | | const { config } = this.state |
| | | |
| | | if (!config.enabled) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '菜单未启用,不可复制。', |
| | | duration: 5 |
| | | }) |
| | | } else if (config.components.length === 0) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '未添加组件,不可复制。', |
| | | duration: 5 |
| | | }) |
| | | } else { |
| | | let msg = { copyType: 'components', type: 'admin' } |
| | | |
| | | msg.components = config.components || [] |
| | | msg.interfaces = config.interfaces || [] |
| | | |
| | | try { |
| | | msg = window.btoa(window.encodeURIComponent(JSON.stringify(msg))) |
| | | } catch (e) { |
| | | console.warn('Stringify Failure') |
| | | msg = '' |
| | | } |
| | | |
| | | let oInput = document.createElement('input') |
| | | oInput.value = msg |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | | document.execCommand('Copy') |
| | | document.body.removeChild(oInput) |
| | | message.success('复制成功。') |
| | | } |
| | | } |
| | | |
| | | updateLogConfig = (config) => { |
| | |
| | | /> |
| | | {/* 表名添加 */} |
| | | <TableComponent config={config} updatetable={this.updateConfig}/> |
| | | <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> |
| | | <Paragraph style={{padding: '15px 0px 0px 37px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> |
| | | <Paragraph style={{padding: '0px 0px 0px 18px'}}>菜单组件:<CopyOutlined onClick={this.copyMenu} style={{cursor: 'pointer', color: '#1890ff'}} /></Paragraph> |
| | | <NormalCss config={config} updateConfig={this.updateConfig}/> |
| | | </> : null} |
| | | </Panel> |
| | |
| | | <SysInterface config={config} updateConfig={this.updateConfig}/> |
| | | <PictureController/> |
| | | <StyleCombControlButton menu={config} /> |
| | | <PasteController insert={this.insert} /> |
| | | <PasteController vType="admin" insert={this.insert} /> |
| | | {config ? <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={config.enabled} onChange={this.onEnabledChange} /> : null} |
| | | <Button type="primary" id="save-config" disabled={!config} className={needUpdate ? 'update-tip' : ''} onClick={this.submitConfig} loading={menuloading}>保存</Button> |
| | | <Button type="default" disabled={menuloading} onClick={this.closeView}>关闭</Button> |
| | |
| | | import { is, fromJS } from 'immutable' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { notification, Modal, Collapse, Switch, Button, message, Spin, Typography } from 'antd' |
| | | import { DoubleLeftOutlined, DoubleRightOutlined, HomeOutlined, LoginOutlined, ArrowLeftOutlined, EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons' |
| | | import { DoubleLeftOutlined, DoubleRightOutlined, HomeOutlined, LoginOutlined, ArrowLeftOutlined, EyeOutlined, EyeInvisibleOutlined, CopyOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | import md5 from 'md5' |
| | | |
| | |
| | | } |
| | | |
| | | let subMenus = this.getSubMenus() |
| | | subMenus = subMenus.filter(item => item.MenuID !== config.uuid) |
| | | let menus_used_list = subMenus.map(m => `'${config.uuid}','${config.MenuName || ''}','${config.MenuNo || ''}','${m.MenuID}','${m.MenuName}'`).join(';') |
| | | menus_used_list = window.btoa(window.encodeURIComponent(menus_used_list || 'del')) |
| | | |
| | |
| | | let _config = fromJS(config).toJS() |
| | | let NavBar = null |
| | | _config.components = _config.components.map(item => { |
| | | if (item.type === 'navbar') { |
| | | if (item.type === 'navbar' && item.wrap) { |
| | | NavBar = fromJS(item).toJS() |
| | | return { |
| | | type: 'navbar', |
| | |
| | | } else if (item.type === 'group') { |
| | | check(item.components, level, sign) |
| | | return |
| | | } else if (item.type === 'navbar' && !item.wrap.MenuNo) { |
| | | } else if (item.type === 'navbar' && item.wrap && !item.wrap.MenuNo) { |
| | | error = `导航栏《${item.name}》未设置菜单参数!` |
| | | } else if (item.type === 'topbar') { |
| | | if (item.wrap.type === 'search' || item.wrap.type === 'searchIcon' || (item.wrap.type === 'navbar' && item.wrap.search === 'true')) { |
| | |
| | | insert = (item) => { |
| | | let config = fromJS(this.state.config).toJS() |
| | | |
| | | if (item.type === 'topbar' && !config.style.paddingTop) { |
| | | config.style.paddingTop = '50px' |
| | | if (item.copyType === 'components') { |
| | | if (item.components.findIndex(m => m.type === 'topbar') > -1 && !config.style.paddingTop) { |
| | | config.style.paddingTop = '50px' |
| | | } |
| | | config.components.push(...item.components) |
| | | if (!config.interfaces) { |
| | | config.interfaces = item.interfaces |
| | | } else { |
| | | config.interfaces.push(...item.interfaces) |
| | | } |
| | | } else { |
| | | if (item.type === 'topbar' && !config.style.paddingTop) { |
| | | config.style.paddingTop = '50px' |
| | | } |
| | | config.components.push(item) |
| | | } |
| | | |
| | | config.components.push(item) |
| | | |
| | | this.setState({config}) |
| | | window.GLOB.customMenu = config |
| | |
| | | return is(fromJS(oriConfig), fromJS(config)) |
| | | } |
| | | |
| | | copyMenu = () => { |
| | | const { config } = this.state |
| | | |
| | | if (!config.enabled) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '菜单未启用,不可复制。', |
| | | duration: 5 |
| | | }) |
| | | } else { |
| | | let msg = { copyType: 'components', type: 'mob' } |
| | | |
| | | msg.components = [] |
| | | msg.interfaces = config.interfaces || [] |
| | | |
| | | config.components.forEach(item => { |
| | | if (item.type === 'navbar') return |
| | | |
| | | msg.components.push(item) |
| | | }) |
| | | |
| | | if (msg.components.length === 0) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '未添加组件,不可复制。', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | try { |
| | | msg = window.btoa(window.encodeURIComponent(JSON.stringify(msg))) |
| | | } catch (e) { |
| | | console.warn('Stringify Failure') |
| | | msg = '' |
| | | } |
| | | |
| | | let oInput = document.createElement('input') |
| | | oInput.value = msg |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | | document.execCommand('Copy') |
| | | document.body.removeChild(oInput) |
| | | message.success('复制成功。') |
| | | } |
| | | } |
| | | |
| | | updateLogConfig = (config) => { |
| | | config.open_edition = this.state.config.open_edition || '' |
| | | |
| | |
| | | <UrlFieldComponent config={config} updateConfig={this.updateConfig}/> |
| | | {/* 表名添加 */} |
| | | <TableComponent config={config} updatetable={this.updateConfig}/> |
| | | <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> |
| | | <Paragraph style={{padding: '10px 0px 0px 18px'}} copyable={{ text: `${window.GLOB.baseurl}mob/index.html#/index/${sessionStorage.getItem('kei_no')}/${sessionStorage.getItem('typename')}/${sessionStorage.getItem('lang')}/${MenuId}/@BID@` }}>菜单链接</Paragraph> |
| | | <Paragraph style={{padding: '15px 0px 0px 37px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> |
| | | <Paragraph style={{padding: '0px 0px 0px 23px'}} copyable={{ text: `${window.GLOB.baseurl}mob/index.html#/index/${sessionStorage.getItem('kei_no')}/${sessionStorage.getItem('typename')}/${sessionStorage.getItem('lang')}/${MenuId}/@BID@` }}>菜单链接</Paragraph> |
| | | <Paragraph style={{padding: '0px 0px 0px 18px'}}>菜单组件:<CopyOutlined onClick={this.copyMenu} style={{cursor: 'pointer', color: '#1890ff'}} /></Paragraph> |
| | | <NormalCss config={config} updateConfig={this.updateConfig}/> |
| | | </> : null} |
| | | </Panel> |
| | |
| | | {config ? <Debug config={config}/> : null} |
| | | <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 组件名</Button> |
| | | <CreateView resetmenu={this.getAppMenus} /> |
| | | <PasteController insert={this.insert} /> |
| | | <PasteController vType="mob" insert={this.insert} /> |
| | | <TableNodes config={config} /> |
| | | <ViewNodes config={config} MenuId={MenuId}/> |
| | | <SysInterface config={config} updateConfig={this.updateConfig}/> |
| | |
| | | import { is, fromJS } from 'immutable' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { notification, Modal, Collapse, Switch, Button, message, Spin, Typography } from 'antd' |
| | | import { DoubleLeftOutlined, DoubleRightOutlined, HomeOutlined, LoginOutlined, ArrowLeftOutlined, EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons' |
| | | import { DoubleLeftOutlined, DoubleRightOutlined, HomeOutlined, LoginOutlined, ArrowLeftOutlined, EyeOutlined, EyeInvisibleOutlined, CopyOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | import md5 from 'md5' |
| | | |
| | |
| | | let roleParam = this.getMenuMessage(tbs) |
| | | |
| | | let subMenus = this.getSubMenus() |
| | | subMenus = subMenus.filter(item => item.MenuID !== config.uuid) |
| | | let menus_used_list = subMenus.map(m => `'${config.uuid}','${config.MenuName || ''}','${config.MenuNo || ''}','${m.MenuID}','${m.MenuName}'`).join(';') |
| | | menus_used_list = window.btoa(window.encodeURIComponent(menus_used_list || 'del')) |
| | | |
| | |
| | | let _config = fromJS(config).toJS() |
| | | let NavBar = null |
| | | _config.components = _config.components.map(item => { |
| | | if (item.type === 'navbar') { |
| | | if (item.type === 'navbar' && item.wrap) { |
| | | NavBar = fromJS(item).toJS() |
| | | return { |
| | | type: 'navbar', |
| | |
| | | insert = (item) => { |
| | | let config = fromJS(this.state.config).toJS() |
| | | |
| | | config.components.push(item) |
| | | if (item.copyType === 'components') { |
| | | config.components.push(...item.components) |
| | | if (!config.interfaces) { |
| | | config.interfaces = item.interfaces |
| | | } else { |
| | | config.interfaces.push(...item.interfaces) |
| | | } |
| | | } else { |
| | | config.components.push(item) |
| | | } |
| | | |
| | | this.setState({config}) |
| | | window.GLOB.customMenu = config |
| | |
| | | return is(fromJS(oriConfig), fromJS(config)) |
| | | } |
| | | |
| | | copyMenu = () => { |
| | | const { config } = this.state |
| | | |
| | | if (!config.enabled) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '菜单未启用,不可复制。', |
| | | duration: 5 |
| | | }) |
| | | } else { |
| | | let msg = { copyType: 'components', type: 'pc' } |
| | | |
| | | msg.components = [] |
| | | msg.interfaces = config.interfaces || [] |
| | | |
| | | config.components.forEach(item => { |
| | | if (item.type === 'navbar') return |
| | | |
| | | msg.components.push(item) |
| | | }) |
| | | |
| | | if (msg.components.length === 0) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '未添加组件,不可复制。', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | try { |
| | | msg = window.btoa(window.encodeURIComponent(JSON.stringify(msg))) |
| | | } catch (e) { |
| | | console.warn('Stringify Failure') |
| | | msg = '' |
| | | } |
| | | |
| | | let oInput = document.createElement('input') |
| | | oInput.value = msg |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | | document.execCommand('Copy') |
| | | document.body.removeChild(oInput) |
| | | message.success('复制成功。') |
| | | } |
| | | } |
| | | |
| | | updateLogConfig = (config) => { |
| | | config.open_edition = this.state.config.open_edition || '' |
| | | |
| | |
| | | <UrlFieldComponent config={config} updateConfig={this.updateConfig}/> |
| | | {/* 表名添加 */} |
| | | <TableComponent config={config} updatetable={this.updateConfig}/> |
| | | <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> |
| | | <Paragraph style={{padding: '15px 0px 0px 37px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> |
| | | <Paragraph style={{padding: '0px 0px 0px 18px'}}>菜单组件:<CopyOutlined onClick={this.copyMenu} style={{cursor: 'pointer', color: '#1890ff'}} /></Paragraph> |
| | | <NormalCss config={config} updateConfig={this.updateConfig}/> |
| | | </> : null} |
| | | </Panel> |
| | |
| | | {config ? <Debug config={config}/> : null} |
| | | <Button className="mk-border-purple" onClick={() => this.setState({eyeopen: !eyeopen})}>{!eyeopen ? <EyeOutlined /> : <EyeInvisibleOutlined />} 组件名</Button> |
| | | <CreateView resetmenu={this.getAppMenus} /> |
| | | <PasteController insert={this.insert} /> |
| | | <PasteController vType="pc" insert={this.insert} /> |
| | | <TableNodes config={config} /> |
| | | <ViewNodes config={config} MenuId={MenuId}/> |
| | | <SysInterface config={config} updateConfig={this.updateConfig}/> |
New file |
| | |
| | | import React, { Component } from 'react' |
| | | import { Button, notification, Modal, Table } from 'antd' |
| | | import moment from 'moment' |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | |
| | | // import './index.scss' |
| | | |
| | | const { confirm } = Modal |
| | | |
| | | class AppMenuFilter extends Component { |
| | | state = { |
| | | visible: false, |
| | | loading: false, |
| | | unUseMenus: [], |
| | | selectedRowKeys: [], |
| | | columns: [ |
| | | { |
| | | title: '菜单名称', dataIndex: 'MenuName', key: 'MenuName', align: 'center' |
| | | }, |
| | | { |
| | | title: '菜单参数', dataIndex: 'MenuNo', key: 'MenuNo', align: 'center' |
| | | }, |
| | | { |
| | | title: '修改时间', dataIndex: 'modifydate', key: 'modifydate', align: 'center' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | key: 'action', |
| | | align: 'center', |
| | | render: (text, record) => ( |
| | | <Button type="link" onClick={() => this.jumpApp(record)} style={{color: '#1890ff', marginLeft: '5px'}}>查看</Button> |
| | | ), |
| | | }, |
| | | ] |
| | | } |
| | | |
| | | menus = [] |
| | | unchecks = [] |
| | | allmenus = [] |
| | | |
| | | trigger = () => { |
| | | this.menus = [] |
| | | this.unchecks = [] |
| | | this.allmenus = [] |
| | | |
| | | this.setState({ |
| | | visible: true, |
| | | loading: true, |
| | | unUseMenus: [], |
| | | selectedRowKeys: [] |
| | | }) |
| | | |
| | | this.getAppViewList() |
| | | } |
| | | |
| | | jumpApp = (item) => { |
| | | const { app } = this.props |
| | | |
| | | let route = 'mobdesign' |
| | | if (app.typename === 'pc') { |
| | | route = 'pcdesign' |
| | | } |
| | | |
| | | if (item.menus_rolelist) { |
| | | item.type = 'view' |
| | | try { |
| | | let pageParam = JSON.parse(window.decodeURIComponent(window.atob(item.menus_rolelist))) |
| | | if (pageParam.type === 'navbar') { |
| | | item.type = 'navbar' |
| | | } |
| | | } catch(e) { |
| | | |
| | | } |
| | | } |
| | | |
| | | if (item.type === 'navbar') { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '导航栏不可单独打开,请在含有导航栏的页面中查看。', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | window.open(window.location.href.replace(/#.+/ig, `#/${route}/${window.btoa(window.encodeURIComponent(JSON.stringify({...app, MenuID: item.MenuID, type: 'app'})))}`)) |
| | | } |
| | | |
| | | getAppViewList = () => { |
| | | const { app } = this.props |
| | | |
| | | Api.getCloudConfig({ |
| | | func: 's_get_keyids', |
| | | bid: app.ID |
| | | }).then(result => { |
| | | if (!result.status) { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | let indexPage = '' |
| | | |
| | | result.data.forEach(item => { |
| | | if (item.keys_type === 'index') { |
| | | indexPage = item.keys_id |
| | | } |
| | | }) |
| | | |
| | | if (!indexPage) { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '应用未设置首页!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | this.unchecks.push(indexPage) |
| | | |
| | | if (app.user_binding === 'true' && app.userbind && indexPage !== app.userbind) { |
| | | this.unchecks.push(app.userbind) |
| | | } |
| | | |
| | | this.getMenuList() |
| | | }) |
| | | } |
| | | |
| | | getMenuList = () => { |
| | | const { app } = this.props |
| | | |
| | | let param = { |
| | | func: 's_get_app_menus', |
| | | TypeCharOne: app.kei_no, |
| | | typename: app.typename, |
| | | LText: `select '${window.GLOB.appkey}'`, |
| | | timestamp: moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | lang: app.lang |
| | | } |
| | | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | Api.getCloudConfig(param).then(result => { |
| | | if (result.status) { |
| | | this.setState({ |
| | | menulist: result.menus |
| | | }) |
| | | |
| | | this.allmenus = result.menus.map(item => item.MenuID) |
| | | |
| | | if (result.menus.length === 0) { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '子应用菜单为空!', |
| | | duration: 5 |
| | | }) |
| | | } else if (result.menus.findIndex(item => item.MenuID === this.unchecks[0]) === -1) { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '请设置应用首页!', |
| | | duration: 5 |
| | | }) |
| | | } else { |
| | | this.getMenuParam() |
| | | } |
| | | } else { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | getMenuParam = () => { |
| | | const { app } = this.props |
| | | const { visible } = this.state |
| | | |
| | | if (!visible) return |
| | | |
| | | let MenuID = this.unchecks.shift() |
| | | |
| | | let param = { |
| | | func: 'sPC_Get_LongParam', |
| | | MenuID: MenuID, |
| | | TypeCharOne: app.kei_no, |
| | | typename: app.typename, |
| | | lang: app.lang, |
| | | } |
| | | |
| | | Api.getCloudConfig(param).then(result => { |
| | | if (result.status) { |
| | | let config = null |
| | | |
| | | try { |
| | | config = result.LongParam ? JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) : null |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | config = null |
| | | } |
| | | |
| | | this.menus.push(MenuID) |
| | | if (config) { |
| | | let menus = [] |
| | | |
| | | if (config.type === 'navbar') { |
| | | config.menus.forEach(k => { |
| | | if (k.property === 'classify') { |
| | | k.sublist && k.sublist.forEach(m => { |
| | | if (m.property === 'classify') { |
| | | m.sublist && m.sublist.forEach(n => { |
| | | if (n.property === 'menu') { |
| | | menus.push(n.MenuID) |
| | | } else if (n.property === 'linkmenu') { |
| | | menus.push(n.linkMenuId) |
| | | } |
| | | }) |
| | | } else if (m.property === 'menu') { |
| | | menus.push(m.MenuID) |
| | | } else if (m.property === 'linkmenu') { |
| | | menus.push(m.linkMenuId) |
| | | } |
| | | }) |
| | | } else if (k.property === 'menu') { |
| | | menus.push(k.MenuID) |
| | | } else if (k.property === 'linkmenu') { |
| | | menus.push(k.linkMenuId) |
| | | } |
| | | }) |
| | | } |
| | | config.components && this.resetConfig(config.components, menus) |
| | | |
| | | menus = Array.from(new Set(menus)) |
| | | |
| | | menus.forEach(n => { |
| | | if (this.allmenus.includes(n) && !this.menus.includes(n)) { |
| | | this.unchecks.push(n) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | if (this.unchecks.length > 0) { |
| | | setTimeout(() => { |
| | | this.getMenuParam() |
| | | }, 200) |
| | | } else { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | |
| | | this.getUseMenus() |
| | | } |
| | | } else { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | resetConfig = (components, menus) => { |
| | | components.forEach(item => { |
| | | if (item.subtype === 'tablecard') { // 兼容 |
| | | item.type = 'card' |
| | | } |
| | | |
| | | if (item.type === 'navbar') { |
| | | menus.push(item.uuid) |
| | | } else if (item.type === 'tabs') { |
| | | item.subtabs.forEach(tab => { |
| | | this.resetConfig(tab.components, menus) |
| | | }) |
| | | } else if (item.type === 'group') { |
| | | this.resetConfig(item.components, menus) |
| | | } else if (item.type === 'menubar') { |
| | | item.subMenus.forEach(cell => { |
| | | if (cell.setting.type === 'linkmenu' && cell.setting.linkMenuId && typeof(cell.setting.linkMenuId) === 'string') { |
| | | menus.push(cell.setting.linkMenuId) |
| | | } else if (cell.setting.type === 'menu') { |
| | | menus.push(cell.uuid) |
| | | } |
| | | }) |
| | | } else if (['card', 'carousel', 'timeline'].includes(item.type)) { |
| | | if (item.subtype === 'propcard') { |
| | | if (item.wrap.jump === 'menu' && item.wrap.menu) { |
| | | menus.push(item.wrap.menu) |
| | | } |
| | | } |
| | | item.subcards.forEach(card => { |
| | | if (card.setting.click === 'menu' && typeof(card.setting.menu) === 'string') { |
| | | menus.push(card.setting.menu) |
| | | } else if (card.setting.click === 'menus') { |
| | | card.menus && card.menus.forEach(n => { |
| | | if (n.menu && typeof(n.menu) === 'string') { |
| | | menus.push(n.menu) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | card.elements && card.elements.forEach(cell => { |
| | | if (cell.eleType === 'button') { |
| | | if (cell.linkmenu && typeof(cell.linkmenu) === 'string') { |
| | | menus.push(cell.linkmenu) |
| | | } else if (cell.openmenu && typeof(cell.openmenu) === 'string') { |
| | | menus.push(cell.openmenu) |
| | | } |
| | | } |
| | | }) |
| | | card.backElements && card.backElements.forEach(cell => { |
| | | if (cell.eleType === 'button') { |
| | | if (cell.linkmenu && typeof(cell.linkmenu) === 'string') { |
| | | menus.push(cell.linkmenu) |
| | | } else if (cell.openmenu && typeof(cell.openmenu) === 'string') { |
| | | menus.push(cell.openmenu) |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | } else if (item.type === 'balcony') { |
| | | item.elements && item.elements.forEach(cell => { |
| | | if (cell.eleType === 'button') { |
| | | if (cell.linkmenu && typeof(cell.linkmenu) === 'string') { |
| | | menus.push(cell.linkmenu) |
| | | } else if (cell.openmenu && typeof(cell.openmenu) === 'string') { |
| | | menus.push(cell.openmenu) |
| | | } |
| | | } |
| | | }) |
| | | } else if (item.type === 'table') { |
| | | let loopCol = (cols) => { |
| | | cols.forEach(col => { |
| | | if (col.type === 'action') { |
| | | col.type = 'custom' |
| | | } |
| | | |
| | | if (col.type === 'colspan' && col.subcols) { |
| | | loopCol(col.subcols) |
| | | } else if (col.type === 'custom') { |
| | | col.elements && col.elements.forEach(cell => { |
| | | if (cell.eleType === 'button') { |
| | | if (cell.linkmenu && typeof(cell.linkmenu) === 'string') { |
| | | menus.push(cell.linkmenu) |
| | | } else if (cell.openmenu && typeof(cell.openmenu) === 'string') { |
| | | menus.push(cell.openmenu) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | item.cols && loopCol(item.cols) |
| | | } else if (item.type === 'form') { |
| | | item.subcards.forEach(cell => { |
| | | if (cell.subButton && cell.subButton.linkmenu && typeof(cell.subButton.linkmenu) === 'string') { |
| | | menus.push(cell.subButton.linkmenu) |
| | | } |
| | | }) |
| | | } else if (item.type === 'login') { |
| | | if (item.wrap.linkmenu && typeof(item.wrap.linkmenu) === 'string') { |
| | | menus.push(item.wrap.linkmenu) |
| | | } |
| | | } else if (item.type === 'topbar') { |
| | | if (item.wrap.linkmenu && typeof(item.wrap.linkmenu) === 'string') { |
| | | menus.push(item.wrap.linkmenu) |
| | | } |
| | | |
| | | item.wrap.menus && item.wrap.menus.forEach(cell => { |
| | | if (cell.menu && typeof(cell.menu) === 'string') { |
| | | menus.push(cell.menu) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | item.action && item.action.forEach(cell => { |
| | | if (cell.linkmenu && typeof(cell.linkmenu) === 'string') { |
| | | menus.push(cell.linkmenu) |
| | | } else if (cell.openmenu && typeof(cell.openmenu) === 'string') { |
| | | menus.push(cell.openmenu) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | getUseMenus = () => { |
| | | const { menulist } = this.state |
| | | |
| | | let unmenus = [] |
| | | |
| | | menulist.forEach(m => { |
| | | if (!this.menus.includes(m.MenuID)) { |
| | | unmenus.push(m) |
| | | } |
| | | }) |
| | | |
| | | this.setState({ |
| | | unUseMenus: unmenus |
| | | }) |
| | | } |
| | | |
| | | deletemenu = () => { |
| | | const { app, getMenuList } = this.props |
| | | const { selectedRowKeys, unUseMenus, loading } = this.state |
| | | |
| | | if (loading) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '菜单解析中,请稍后!', |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | if (unUseMenus.length === 0) { |
| | | this.setState({visible: false}) |
| | | } else if (selectedRowKeys.length === 0) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '请选择需要删除的菜单!', |
| | | duration: 5 |
| | | }) |
| | | } else { |
| | | let param = { |
| | | func: 'sPC_MainMenu_Del', |
| | | MenuID: selectedRowKeys.join(','), |
| | | TypeCharOne: app.kei_no, |
| | | typename: app.typename, |
| | | lang: app.lang |
| | | } |
| | | |
| | | const that = this |
| | | |
| | | confirm({ |
| | | content: '确定删除菜单吗?', |
| | | onOk() { |
| | | return new Promise(resolve => { |
| | | Api.getCloudConfig(param).then(result => { |
| | | if (result.status) { |
| | | notification.success({ |
| | | top: 92, |
| | | message: '删除成功!', |
| | | duration: 3 |
| | | }) |
| | | |
| | | that.setState({visible: false}) |
| | | getMenuList() |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | } |
| | | resolve() |
| | | }, () => { |
| | | resolve() |
| | | }) |
| | | }) |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | | } |
| | | } |
| | | |
| | | render () { |
| | | const { visible, loading, columns, unUseMenus, selectedRowKeys } = this.state |
| | | |
| | | return ( |
| | | <> |
| | | <Button className="mk-orange" onClick={this.trigger}>过滤菜单</Button> |
| | | <Modal |
| | | title="过滤菜单" |
| | | wrapClassName="mk-scroll-modal" |
| | | visible={visible} |
| | | width={800} |
| | | onOk={this.deletemenu} |
| | | onCancel={() => this.setState({visible: false, loading: false})} |
| | | destroyOnClose |
| | | > |
| | | <div style={{fontSize: '16px', position: 'relative', top: '-15px', color: '#1890ff'}}>系统将自动过滤无关联关系的菜单,选择需要删除的菜单,点击确定。</div> |
| | | <Table |
| | | rowKey="MenuID" |
| | | columns={columns} |
| | | dataSource={unUseMenus} |
| | | loading={loading} |
| | | rowSelection={{ |
| | | selectedRowKeys, |
| | | type: 'checkbox', |
| | | onChange: (keys) => this.setState({ selectedRowKeys: keys }) |
| | | }} |
| | | pagination={false} |
| | | /> |
| | | </Modal> |
| | | </> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default AppMenuFilter |
| | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | |
| | | import '@/assets/css/design.scss' |
| | | import './index.scss' |
| | | |
| | | const { confirm } = Modal |
| | |
| | | const { Search } = Input |
| | | |
| | | const Header = asyncComponent(() => import('./header')) |
| | | const FilterMenu = asyncComponent(() => import('./filtermenu')) |
| | | const TransferForm = asyncComponent(() => import('@/templates/zshare/basetransferform')) |
| | | |
| | | class RoleManage extends Component { |
| | |
| | | <div className="app-table"> |
| | | <div className="app-action"> |
| | | <Button className="mk-green" onClick={this.triggerThaw}>解冻菜单</Button> |
| | | <FilterMenu app={app} getMenuList={this.getMenuList}/> |
| | | <Search placeholder="综合搜索" onSearch={value => this.setState({ searchkey: value })} enterButton /> |
| | | </div> |
| | | <Table |
| | |
| | | LText: `select '${window.GLOB.appkey}'`, |
| | | } |
| | | |
| | | if (window.GLOB.style_appkey) { |
| | | _param.style_appkey = window.GLOB.style_appkey |
| | | } |
| | | |
| | | _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) |
| | | |
| | |
| | | |
| | | localStorage.setItem(window.GLOB.sysSign + 'pwdlevel', level) |
| | | |
| | | if (res.srcid) { |
| | | localStorage.setItem(window.GLOB.sysSign + 'srcId', res.srcid) |
| | | } else { |
| | | localStorage.removeItem(window.GLOB.sysSign + 'srcId') |
| | | } |
| | | |
| | | sessionStorage.setItem('home_background', res.index_background_color || '') |
| | | res.index_background_color && sessionStorage.setItem('home_background', res.index_background_color) |
| | | |
| | | let seconds = 0 |
| | | if (res.sys_datetime) { |
New file |
| | |
| | | import React, { Component } from 'react' |
| | | |
| | | import avatar from '@/assets/img/avatar.jpg' |
| | | import MainLogo from '@/assets/img/main-logo.png' |
| | | import './index.scss' |
| | | |
| | | class SysCheckHeader extends Component { |
| | | state = { |
| | | avatar: sessionStorage.getItem('CloudAvatar') || avatar, |
| | | userName: sessionStorage.getItem('CloudUserName'), |
| | | logo: sessionStorage.getItem('CloudLogo') || MainLogo |
| | | } |
| | | |
| | | render () { |
| | | const { logo } = this.state |
| | | |
| | | return ( |
| | | <header className="sys-header-container"> |
| | | <div className="header-logo"><img src={logo} alt=""/></div> |
| | | <div className="title"> |
| | | 系统检查 |
| | | </div> |
| | | <div className="header-user"> |
| | | <img src={this.state.avatar} alt=""/> |
| | | <span> |
| | | <span className="username">{this.state.userName}</span> |
| | | </span> |
| | | </div> |
| | | </header> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default SysCheckHeader |
New file |
| | |
| | | .sys-header-container { |
| | | width: 100%; |
| | | height: 48px; |
| | | color: rgba(255, 255, 255, 0.65); |
| | | position: fixed; |
| | | top: 0px; |
| | | z-index: 10; |
| | | padding-right: 0px; |
| | | left: 0; |
| | | |
| | | background: #001529; |
| | | border-bottom: 1px solid #000; |
| | | |
| | | .header-logo { |
| | | float: left; |
| | | width: 180px; |
| | | line-height: 48px; |
| | | text-align: center; |
| | | padding-left: 5px; |
| | | box-sizing: border-box; |
| | | opacity: 1; |
| | | img { |
| | | max-width: 100%; |
| | | max-height: 40px; |
| | | } |
| | | } |
| | | .header-user { |
| | | float: right; |
| | | line-height: 48px; |
| | | margin-right: 10px; |
| | | img { |
| | | width: 29px; |
| | | height: 29px; |
| | | border-radius: 30px; |
| | | margin-right: 7px; |
| | | } |
| | | span { |
| | | color: #ffffff; |
| | | font-size: 0.95rem; |
| | | .username { |
| | | display: inline-block; |
| | | height: 30px; |
| | | max-width: 95px; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | } |
| | | } |
| | | .title { |
| | | position: absolute; |
| | | left: calc(50% - 36px); |
| | | top: 10px; |
| | | color: #ffffff; |
| | | font-size: 18px; |
| | | } |
| | | } |
New file |
| | |
| | | import React, {Component} from 'react' |
| | | import { fromJS } from 'immutable' |
| | | import { Spin, notification, Button, Modal } from 'antd' |
| | | import { SwapOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | import md5 from 'md5' |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import './index.scss' |
| | | |
| | | const Header = asyncComponent(() => import('./header')) |
| | | const { confirm } = Modal |
| | | |
| | | class SysCheck extends Component { |
| | | state = { |
| | | stop: false, |
| | | loading: false, |
| | | menulist: [], |
| | | activeMenu: null, |
| | | remain: 0, |
| | | lackmenus: [], |
| | | lacklinks: [], |
| | | outmenus: [], |
| | | backmenus: [], |
| | | appbackmenus: [], |
| | | btnmenus: [], |
| | | appbtnmenus: [], |
| | | unablemenus: [], |
| | | } |
| | | |
| | | sqlmap = null |
| | | btnmap = null |
| | | allMenus = [] |
| | | appMenus = {} |
| | | |
| | | // delete _val.controlField 删除按钮控制字段 |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | document.body.className = '' |
| | | } |
| | | |
| | | componentDidMount() { |
| | | if (!sessionStorage.getItem('UserID')) { |
| | | this.props.history.replace('/login') |
| | | return |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description 组件销毁,清除state更新 |
| | | */ |
| | | componentWillUnmount () { |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | } |
| | | |
| | | getMenus = () => { |
| | | this.setState({ |
| | | stop: false, |
| | | activeMenu: null, |
| | | remain: 0, |
| | | menulist: [], |
| | | lackmenus: [], |
| | | lacklinks: [], |
| | | outmenus: [], |
| | | backmenus: [], |
| | | appbackmenus: [], |
| | | btnmenus: [], |
| | | appbtnmenus: [], |
| | | unablemenus: [], |
| | | loading: true |
| | | }) |
| | | |
| | | this.allMenus = [] |
| | | Api.getCloudConfig({func: 's_get_pc_menus', systemType: window.GLOB.sysType, debug: 'Y'}).then(result => { |
| | | if (result.status) { |
| | | let menulist = [] |
| | | result.fst_menu.forEach(fst => { |
| | | if (fst.snd_menu) { |
| | | fst.snd_menu.forEach(snd => { |
| | | if (snd.trd_menu) { |
| | | snd.trd_menu.forEach(trd => { |
| | | this.allMenus.push(trd.MenuID) |
| | | |
| | | if (trd.PageParam) { |
| | | let pass = false |
| | | try { |
| | | let PageParam = JSON.parse(trd.PageParam) |
| | | if (PageParam && PageParam.Template === 'RolePermission') { |
| | | pass = true |
| | | } |
| | | } catch (e) { |
| | | |
| | | } |
| | | if (pass) return |
| | | } |
| | | |
| | | menulist.push({ |
| | | MenuID: trd.MenuID, |
| | | MenuName: trd.MenuName, |
| | | MenuNo: trd.MenuNo, |
| | | pName: fst.MenuName + '-' + snd.MenuName, |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | if (menulist.length === 0) { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '未查询到菜单信息!', |
| | | duration: 5 |
| | | }) |
| | | } else { |
| | | this.sqlmap = new Map() |
| | | this.btnmap = new Map() |
| | | |
| | | let errlist = sessionStorage.getItem('syscheck_main') |
| | | errlist = errlist ? JSON.parse(errlist) : null |
| | | |
| | | if (!errlist) { |
| | | this.setState({ |
| | | menulist |
| | | }) |
| | | this.getMenuParam(fromJS(menulist).toJS()) |
| | | } else { |
| | | const that = this |
| | | confirm({ |
| | | title: '是否跳过检查合格菜单?', |
| | | content: '', |
| | | okText: '跳过', |
| | | cancelText: '不跳过', |
| | | onOk() { |
| | | menulist = menulist.filter(item => errlist.includes(item.MenuID)) |
| | | |
| | | that.setState({ |
| | | menulist |
| | | }) |
| | | that.getMenuParam(fromJS(menulist).toJS()) |
| | | }, |
| | | onCancel() { |
| | | that.setState({ |
| | | menulist |
| | | }) |
| | | that.getMenuParam(fromJS(menulist).toJS()) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } else { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | getAppList = () => { |
| | | let param = { |
| | | func: 's_get_kei' |
| | | } |
| | | |
| | | this.setState({ |
| | | stop: false, |
| | | activeMenu: null, |
| | | remain: 0, |
| | | menulist: [], |
| | | lackmenus: [], |
| | | lacklinks: [], |
| | | outmenus: [], |
| | | backmenus: [], |
| | | appbackmenus: [], |
| | | btnmenus: [], |
| | | appbtnmenus: [], |
| | | unablemenus: [], |
| | | loading: true |
| | | }) |
| | | |
| | | this.allMenus = [] |
| | | this.appMenus = {} |
| | | Api.getCloudConfig(param).then(result => { |
| | | if (result.status) { |
| | | let applist = [] |
| | | result.data.forEach(item => { |
| | | if (!item.data_detail) return |
| | | item.data_detail.forEach(cell => { |
| | | applist.push({ |
| | | ID: cell.d_id, |
| | | name: item.remark, |
| | | typename: cell.typename, |
| | | kei_no: item.kei_no, |
| | | lang: cell.lang, |
| | | menus: [] |
| | | }) |
| | | }) |
| | | }) |
| | | |
| | | if (applist.length === 0) { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '未查询到菜单信息!', |
| | | duration: 5 |
| | | }) |
| | | } else { |
| | | let deffers = applist.map((app, i) => |
| | | new Promise(resolve => { |
| | | let param = { |
| | | func: 's_get_app_menus', |
| | | TypeCharOne: app.kei_no, |
| | | typename: app.typename, |
| | | LText: `select '${window.GLOB.appkey}'`, |
| | | timestamp: moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | lang: app.lang |
| | | } |
| | | |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | setTimeout(() => { |
| | | Api.getCloudConfig(param).then(result => { |
| | | if (result.status) { |
| | | app.status = true |
| | | app.menus = [] |
| | | |
| | | this.appMenus[app.ID] = [] |
| | | |
| | | result.menus.forEach(m => { |
| | | this.appMenus[app.ID].push(m.MenuID) |
| | | |
| | | if (m.menus_rolelist) { |
| | | try { |
| | | let pageParam = JSON.parse(window.decodeURIComponent(window.atob(m.menus_rolelist))) |
| | | if (pageParam.type === 'navbar') { |
| | | m.type = pageParam.type |
| | | } |
| | | } catch(e) { |
| | | |
| | | } |
| | | if (m.type === 'navbar') return |
| | | } |
| | | delete m.menus_rolelist |
| | | m.$pid = app.ID |
| | | |
| | | app.menus.push(m) |
| | | }) |
| | | resolve(app) |
| | | } else { |
| | | resolve(result) |
| | | } |
| | | }) |
| | | }, 200 * i) |
| | | }) |
| | | ) |
| | | |
| | | Promise.all(deffers).then(response => { |
| | | let error = response.filter(cell => !cell.status) |
| | | if (error[0]) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: error[0].message, |
| | | duration: 5 |
| | | }) |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | } else { |
| | | let list = [] |
| | | response.forEach(item => { |
| | | item.menus.forEach(cell => { |
| | | list.push({ |
| | | ...cell, |
| | | lang: item.lang, |
| | | kei_no: item.kei_no, |
| | | typename: item.typename, |
| | | pName: `${item.name}(${item.typename} / ${item.lang})`, |
| | | }) |
| | | }) |
| | | }) |
| | | |
| | | if (list.length === 0) { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '未查询到菜单信息!', |
| | | duration: 5 |
| | | }) |
| | | } else { |
| | | this.sqlmap = new Map() |
| | | this.btnmap = new Map() |
| | | |
| | | let errlist = sessionStorage.getItem('syscheck_app') |
| | | errlist = errlist ? JSON.parse(errlist) : null |
| | | |
| | | if (!errlist) { |
| | | this.setState({ |
| | | menulist: list |
| | | }) |
| | | this.getMenuParam(fromJS(list).toJS()) |
| | | } else { |
| | | const that = this |
| | | confirm({ |
| | | title: '是否跳过检查合格菜单?', |
| | | content: '', |
| | | okText: '跳过', |
| | | cancelText: '不跳过', |
| | | onOk() { |
| | | list = list.filter(item => errlist.includes(item.MenuID)) |
| | | |
| | | that.setState({ |
| | | menulist: list |
| | | }) |
| | | that.getMenuParam(fromJS(list).toJS()) |
| | | }, |
| | | onCancel() { |
| | | that.setState({ |
| | | menulist: list |
| | | }) |
| | | that.getMenuParam(fromJS(list).toJS()) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | getMenuParam = (menus) => { |
| | | const { lackmenus, lacklinks, outmenus, unablemenus, backmenus, appbackmenus, btnmenus, appbtnmenus, stop } = this.state |
| | | |
| | | let menu = menus.shift() |
| | | |
| | | let param = { |
| | | func: 'sPC_Get_LongParam', |
| | | MenuID: menu.MenuID |
| | | } |
| | | |
| | | let appType = 'admin' |
| | | if (menu.kei_no) { |
| | | param.TypeCharOne = menu.kei_no |
| | | param.typename = menu.typename |
| | | param.lang = menu.lang |
| | | |
| | | appType = 'pc' |
| | | if (['pad', 'mob'].includes(menu.typename)) { |
| | | appType = 'mob' |
| | | } |
| | | |
| | | this.allMenus = this.appMenus[menu.$pid] || [] |
| | | } |
| | | |
| | | this.setState({ |
| | | activeMenu: menu, |
| | | remain: menus.length |
| | | }) |
| | | |
| | | Api.getCloudConfig(param).then(result => { |
| | | if (result.status) { |
| | | let config = null |
| | | |
| | | try { |
| | | config = result.LongParam ? JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) : null |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | config = null |
| | | } |
| | | |
| | | if (!config) { |
| | | this.setState({lackmenus: [...lackmenus, menu]}) |
| | | } else if (!menu.kei_no && !['CustomPage', 'BaseTable'].includes(config.Template)) { |
| | | this.setState({outmenus: [...outmenus, menu]}) |
| | | } else if (!menu.kei_no && config.Template === 'CustomPage' && config.version !== 2.0) { |
| | | menu.version = config.version |
| | | this.setState({outmenus: [...outmenus, menu]}) |
| | | } else if (!config.enabled) { |
| | | this.setState({unablemenus: [...unablemenus, menu]}) |
| | | } else { |
| | | let sqls = [] |
| | | let btns = [] |
| | | let links = [] |
| | | |
| | | this.getAllSqls(config, appType, sqls, btns, links) |
| | | |
| | | if (links.length) { |
| | | links.forEach(item => { |
| | | window.mkInfo(menu.pName + ':' + item) |
| | | }) |
| | | this.setState({lacklinks: [...lacklinks, menu]}) |
| | | } |
| | | |
| | | if (sqls.length) { |
| | | let keys = sqls.map(item => item.uuid) |
| | | |
| | | if (keys.length > Array.from(new Set(keys)).length) { |
| | | this.setState({backmenus: [...backmenus, menu]}) |
| | | } else { |
| | | let repeat = false |
| | | let premenu = null |
| | | sqls.forEach(item => { |
| | | if (this.sqlmap.has(item.uuid)) { |
| | | window.mkInfo(item) |
| | | if (repeat) return |
| | | repeat = true |
| | | premenu = this.sqlmap.get(item.uuid) |
| | | } else { |
| | | this.sqlmap.set(item.uuid, menu) |
| | | } |
| | | }) |
| | | if (premenu) { |
| | | this.setState({appbackmenus: [...appbackmenus, [premenu, menu]]}) |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (btns.length) { |
| | | let keys = btns.map(item => item.uuid) |
| | | if (keys.length > Array.from(new Set(keys)).length) { |
| | | this.setState({btnmenus: [...btnmenus, menu]}) |
| | | } else { |
| | | let repeat = false |
| | | let premenu = null |
| | | btns.forEach(item => { |
| | | if (this.btnmap.has(item.uuid)) { |
| | | window.mkInfo(item) |
| | | if (repeat) return |
| | | repeat = true |
| | | premenu = this.btnmap.get(item.uuid) |
| | | } else { |
| | | this.btnmap.set(item.uuid, menu) |
| | | } |
| | | }) |
| | | if (premenu) { |
| | | this.setState({appbtnmenus: [...appbtnmenus, [premenu, menu]]}) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (menus.length > 0 && !stop) { |
| | | setTimeout(() => { |
| | | this.getMenuParam(menus) |
| | | }, 200) |
| | | } else { |
| | | this.setState({ |
| | | loading: false |
| | | }, () => { |
| | | this.record(menu.kei_no ? 'app' : '') |
| | | }) |
| | | } |
| | | } else { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | getAllSqls = (config, appType, sqls, btns, links) => { |
| | | let filterComponent = (components, label = '') => { |
| | | components.forEach(item => { |
| | | item.$menuname = (config.MenuName || '') + label + '-' + (item.name || '') |
| | | |
| | | if (item.type === 'tabs') { |
| | | item.subtabs.forEach(tab => { |
| | | filterComponent(tab.components, label) |
| | | }) |
| | | } else if (item.type === 'group') { |
| | | filterComponent(item.components, label) |
| | | } else { |
| | | if (item.wrap && item.setting) { |
| | | if (item.wrap.datatype === 'public' || item.wrap.datatype === 'static') { |
| | | item.setting.interType = 'other' |
| | | } |
| | | } |
| | | |
| | | if (appType === 'mob' && item.type !== 'search' && item.type !== 'topbar' && item.search && item.search.length > 0) { |
| | | item.search = [] |
| | | } |
| | | if (appType !== 'mob' && item.search && item.search.length > 0) { |
| | | item.search.forEach(cell => { |
| | | if (['select', 'link', 'multiselect', 'checkcard', 'radio'].includes(cell.type) && cell.resourceType === '1' && cell.dataSource) { |
| | | sqls.push({uuid: md5(item.uuid + cell.uuid), type: 'sForm', LText: `${item.$menuname}-${cell.label}(搜索)`}) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | if (item.subtype === 'tablecard') { // 兼容 |
| | | item.type = 'card' |
| | | } |
| | | |
| | | if (item.setting && item.setting.interType === 'system') { |
| | | item.setting.$name = item.$menuname || '' |
| | | |
| | | sqls.push({uuid: item.uuid, type: 'datasource', LText: item.setting.$name}) |
| | | } |
| | | |
| | | item.action && item.action.forEach(cell => { |
| | | cell.logLabel = item.$menuname + '-' + cell.label |
| | | |
| | | btns.push({uuid: cell.uuid, label: cell.logLabel}) |
| | | |
| | | if (cell.hidden === 'true') return false |
| | | |
| | | resetButton(item, cell) |
| | | }) |
| | | |
| | | if (item.type === 'table') { |
| | | let getCols = (cols) => { |
| | | cols.forEach(col => { |
| | | if (col.type === 'action') { |
| | | col.type = 'custom' |
| | | } |
| | | if (col.type === 'colspan') { |
| | | getCols(col.subcols || []) |
| | | } else if (col.type === 'custom') { |
| | | col.elements.forEach(cell => { |
| | | if (cell.eleType !== 'button') { |
| | | resetElement(item, cell) |
| | | return |
| | | } |
| | | |
| | | cell.logLabel = item.$menuname + '-' + cell.label |
| | | |
| | | btns.push({uuid: cell.uuid, label: cell.logLabel}) |
| | | |
| | | if (cell.hidden === 'true') return |
| | | |
| | | resetButton(item, cell) |
| | | }) |
| | | } else if (item.subtype === 'editable' && col.editable === 'true') { |
| | | if (col.editType === 'select' && col.resourceType === '1') { |
| | | sqls.push({uuid: col.uuid, type: 'tbForm', LText: `${item.$menuname}-${col.label}(列表单)`}) |
| | | } else if (col.editType === 'popSelect') { |
| | | if (col.pops) { |
| | | col.pops.forEach(n => { |
| | | sqls.push({uuid: n.uuid, type: 'popSource', LText: `${item.$menuname}-${col.label}(列表单)`}) |
| | | }) |
| | | } else { |
| | | sqls.push({uuid: col.uuid, type: 'popSource', LText: `${item.$menuname}-${col.label}(列表单)`}) |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | getCols(item.cols) |
| | | |
| | | if (item.subtype === 'editable' && item.submit.intertype === 'system') { |
| | | item.submit.logLabel = item.$menuname + '-提交' |
| | | |
| | | sqls.push({uuid: 'submit_' + item.uuid, type: 'editable', LText: item.submit.logLabel}) |
| | | } |
| | | } else if (['card', 'carousel', 'timeline'].includes(item.type)) { |
| | | item.subcards && item.subcards.forEach(card => { |
| | | if (card.setting.click === 'menu' && card.setting.menu) { |
| | | if (appType === 'admin') { |
| | | if (!Array.isArray(card.setting.menu)) { |
| | | links.push(item.$menuname) |
| | | } else { |
| | | let menuId = card.setting.menu.slice(-1)[0] |
| | | if (!this.allMenus.includes(menuId)) { |
| | | links.push(item.$menuname) |
| | | } |
| | | } |
| | | } else { |
| | | if (typeof(card.setting.menu) !== 'string') { |
| | | links.push(item.$menuname) |
| | | } else if (!this.allMenus.includes(card.setting.menu)) { |
| | | links.push(item.$menuname) |
| | | } |
| | | } |
| | | } else if (card.setting.click === 'menus' && card.menus && card.menus.length > 0) { |
| | | if (appType === 'admin') { |
| | | card.menus.forEach(m => { |
| | | if (!m.MenuID || !this.allMenus.includes(m.MenuID)) { |
| | | links.push(item.$menuname) |
| | | } |
| | | }) |
| | | } else { |
| | | card.menus.forEach(m => { |
| | | if (typeof(m.menu) !== 'string' || !this.allMenus.includes(m.menu)) { |
| | | links.push(item.$menuname) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | card.elements && card.elements.forEach(cell => { |
| | | if (cell.eleType !== 'button') { |
| | | resetElement(item, cell) |
| | | return |
| | | } |
| | | |
| | | cell.logLabel = item.$menuname + '-' + cell.label |
| | | |
| | | btns.push({uuid: cell.uuid, label: cell.logLabel}) |
| | | |
| | | if (cell.hidden === 'true') return |
| | | |
| | | resetButton(item, cell) |
| | | }) |
| | | |
| | | if (!card.backElements || card.backElements.length === 0) return |
| | | |
| | | card.backElements.forEach(cell => { |
| | | if (cell.eleType !== 'button') { |
| | | resetElement(item, cell) |
| | | return |
| | | } |
| | | |
| | | cell.logLabel = item.$menuname + '-' + cell.label |
| | | |
| | | btns.push({uuid: cell.uuid, label: cell.logLabel}) |
| | | |
| | | if (cell.hidden === 'true') return |
| | | |
| | | resetButton(item, cell) |
| | | }) |
| | | }) |
| | | } else if (item.type === 'balcony') { |
| | | item.elements.forEach(cell => { |
| | | if (cell.eleType !== 'button') { |
| | | resetElement(item, cell) |
| | | return |
| | | } |
| | | |
| | | cell.logLabel = item.$menuname + '-' + cell.label |
| | | |
| | | btns.push({uuid: cell.uuid, label: cell.logLabel}) |
| | | |
| | | if (cell.hidden === 'true') return |
| | | |
| | | resetButton(item, cell) |
| | | }) |
| | | } else if (item.type === 'form') { |
| | | item.subcards.forEach(group => { |
| | | group.subButton.OpenType = 'formSubmit' |
| | | group.subButton.uuid = group.uuid |
| | | group.subButton.modal = { |
| | | fields: group.fields |
| | | } |
| | | |
| | | group.subButton.logLabel = item.$menuname + '-' + group.subButton.label |
| | | |
| | | btns.push({uuid: group.uuid, label: group.subButton.logLabel}) |
| | | |
| | | resetButton(item, group.subButton) |
| | | }) |
| | | } else if (item.type === 'module' && item.subtype === 'invoice') { |
| | | if (item.buyer.setting && item.buyer.setting.interType === 'system') { |
| | | sqls.push({uuid: item.uuid + 'buyer', type: 'datasource', LText: item.$menuname + '-buyer'}) |
| | | } |
| | | |
| | | if (item.detail.setting && item.detail.setting.interType === 'system') { |
| | | sqls.push({uuid: item.uuid + 'detail', type: 'datasource', LText: item.$menuname + '-detail'}) |
| | | } |
| | | |
| | | sqls.push({uuid: item.uuid + item.billSaveBtn.type, type: 'button', LText: item.$menuname + '-' + item.billSaveBtn.label}) |
| | | |
| | | sqls.push({uuid: item.uuid + item.billOutBtn.type, type: 'button', LText: item.$menuname + '-' + item.billOutBtn.label}) |
| | | |
| | | sqls.push({uuid: item.uuid + 'billback', type: 'btnCallBack', LText: item.$menuname + '-' + item.billOutBtn.label + '(回调)'}) |
| | | } else if (item.type === 'menubar') { |
| | | item.subMenus.forEach(cell => { |
| | | if (cell.setting.type === 'menu') { |
| | | if (!this.allMenus.includes(cell.uuid)) { |
| | | links.push(item.$menuname + '-' + cell.setting.name) |
| | | } |
| | | } else if (cell.setting.type === 'linkmenu') { |
| | | if (!this.allMenus.includes(cell.setting.linkMenuId)) { |
| | | links.push(item.$menuname + '-' + cell.setting.name) |
| | | } |
| | | } |
| | | }) |
| | | } else if (item.type === 'login') { |
| | | if (!item.wrap.linkmenu || !this.allMenus.includes(item.wrap.linkmenu)) { |
| | | links.push(item.$menuname) |
| | | } |
| | | } else if (item.type === 'topbar') { |
| | | if (item.wrap.menus) { |
| | | item.wrap.menus.forEach(m => { |
| | | if (!this.allMenus.includes(m.menu)) { |
| | | links.push(item.$menuname) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | let resetElement = (item, cell) => { |
| | | if (cell.linkmenu && cell.linkmenu.length) { |
| | | if (appType === 'admin') { |
| | | if (!Array.isArray(cell.linkmenu)) { |
| | | links.push(item.$menuname) |
| | | } else { |
| | | let menuId = cell.linkmenu.slice(-1)[0] |
| | | if (!this.allMenus.includes(menuId)) { |
| | | links.push(item.$menuname) |
| | | } |
| | | } |
| | | } else { |
| | | if (cell.linkmenu !== 'goback' && (typeof(cell.linkmenu) !== 'string' || !this.allMenus.includes(cell.linkmenu))) { |
| | | links.push(item.$menuname) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | let resetButton = (item, cell) => { |
| | | if (['exec', 'prompt', 'pop', 'form', 'formSubmit'].includes(cell.OpenType)) { |
| | | if (cell.intertype === 'system' || cell.procMode === 'system') { // 系统接口 |
| | | sqls.push({uuid: cell.uuid, type: 'button', LText: cell.logLabel}) |
| | | } |
| | | if (cell.callbackType === 'script' && cell.verify && cell.verify.cbScripts) { |
| | | sqls.push({uuid: 'back_' + cell.uuid, type: 'btnCallBack', LText: cell.logLabel}) |
| | | } |
| | | if (['pop', 'formSubmit'].includes(cell.OpenType) && cell.modal && cell.modal.fields) { |
| | | cell.modal.fields.forEach(form => { |
| | | // 数据源sql语句,预处理,权限黑名单字段设置为隐藏表单 |
| | | if (['select', 'link', 'multiselect', 'radio', 'checkbox', 'checkcard'].includes(form.type) && form.resourceType === '1') { |
| | | sqls.push({uuid: md5(cell.uuid + form.uuid), type: 'form', LText: `${cell.logLabel}-${form.label}(表单)`}) |
| | | } else if (form.type === 'popSelect') { |
| | | sqls.push({uuid: md5(cell.uuid + form.uuid), type: 'popSource', LText: `${cell.logLabel}-${form.label}(表单)`}) |
| | | } |
| | | }) |
| | | } |
| | | } else if (cell.OpenType === 'excelIn') { |
| | | if (cell.intertype === 'system') { |
| | | sqls.push({uuid: cell.uuid, type: 'excelIn', LText: cell.logLabel}) |
| | | } |
| | | } else if (cell.OpenType === 'excelOut') { |
| | | if (cell.intertype === 'system' && cell.verify && cell.verify.dataType === 'custom') { |
| | | sqls.push({uuid: cell.uuid, type: 'excelOut', LText: cell.logLabel || ''}) |
| | | } else if (cell.intertype === 'system' && cell.verify && item.setting && item.setting.interType === 'system') { |
| | | if (appType === 'mob') { |
| | | cell.pagination = 'false' |
| | | } |
| | | if (item.subtype === 'dualdatacard' || item.setting.laypage !== cell.pagination) { |
| | | sqls.push({uuid: cell.uuid, type: 'excelOut', LText: cell.logLabel || ''}) |
| | | } |
| | | } |
| | | } else if (cell.OpenType === 'funcbutton') { |
| | | if (cell.funcType === 'print') { |
| | | if (cell.intertype === 'system' && cell.verify && cell.verify.dataType === 'custom') { |
| | | sqls.push({uuid: cell.uuid, type: 'print', LText: cell.logLabel || ''}) |
| | | } |
| | | if (cell.execMode === 'pop' && cell.modal && cell.modal.fields) { |
| | | cell.modal.fields.forEach(form => { |
| | | // 数据源sql语句,预处理,权限黑名单字段设置为隐藏表单 |
| | | if (['select', 'link', 'multiselect', 'radio', 'checkbox', 'checkcard'].includes(form.type) && form.resourceType === '1') { |
| | | sqls.push({uuid: md5(cell.uuid + form.uuid), type: 'form', LText: `${cell.logLabel}-${form.label}(表单)`}) |
| | | } else if (form.type === 'popSelect') { |
| | | sqls.push({uuid: md5(cell.uuid + form.uuid), type: 'popSource', LText: `${cell.logLabel}-${form.label}(表单)`}) |
| | | } |
| | | }) |
| | | } |
| | | } else if ((cell.funcType === 'refund' || cell.funcType === 'pay') && cell.payMode === 'system') { |
| | | sqls.push({uuid: cell.uuid, type: 'pay', LText: cell.logLabel}) |
| | | } |
| | | } else if (cell.OpenType === 'innerpage' || cell.OpenType === 'outerpage') { |
| | | if (cell.pageTemplate === 'pay' && cell.payMode === 'system') { |
| | | sqls.push({uuid: cell.uuid, type: 'pay', LText: cell.logLabel}) |
| | | } |
| | | } else if (cell.OpenType === 'popview') { |
| | | if (cell.config && cell.config.components && cell.config.enabled) { |
| | | let label = (item.name ? '-' + item.name : '') + '-' + cell.label |
| | | |
| | | filterComponent(cell.config.components, label, true) |
| | | } |
| | | } |
| | | |
| | | if (appType === 'admin') { |
| | | if (cell.refreshTab && cell.refreshTab.length) { |
| | | let tabId = cell.refreshTab[cell.refreshTab.length - 1] |
| | | if (!this.allMenus.includes(tabId)) { |
| | | links.push(cell.logLabel) |
| | | } |
| | | } |
| | | if (cell.openmenu && cell.openmenu.length) { |
| | | if (!Array.isArray(cell.openmenu)) { |
| | | links.push(cell.logLabel) |
| | | } else { |
| | | let menuId = cell.openmenu.slice(-1)[0] |
| | | if (!this.allMenus.includes(menuId)) { |
| | | links.push(cell.logLabel) |
| | | } |
| | | } |
| | | } |
| | | if (cell.linkmenu && cell.linkmenu.length) { |
| | | if (!Array.isArray(cell.linkmenu)) { |
| | | links.push(cell.logLabel) |
| | | } else { |
| | | let menuId = cell.linkmenu.slice(-1)[0] |
| | | if (!this.allMenus.includes(menuId)) { |
| | | links.push(cell.logLabel) |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | if (cell.openmenu && cell.openmenu.length && cell.openmenu !== 'goback' && (typeof(cell.openmenu) !== 'string' || !this.allMenus.includes(cell.openmenu))) { |
| | | links.push(cell.logLabel) |
| | | } |
| | | if (cell.linkmenu && cell.linkmenu.length && cell.linkmenu !== 'goback' && (typeof(cell.linkmenu) !== 'string' || !this.allMenus.includes(cell.linkmenu))) { |
| | | links.push(cell.logLabel) |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (appType === 'mob') { |
| | | config.components.forEach(item => { |
| | | if (item.type === 'topbar' && item.wrap.type !== 'navbar' && item.search) { |
| | | let search = [] |
| | | search.push(...item.search.fields) |
| | | |
| | | item.search.groups.forEach(group => { |
| | | search.push(...group.fields) |
| | | }) |
| | | |
| | | if (search.length > 0) { |
| | | search.forEach(cell => { |
| | | if (['select', 'link', 'multiselect', 'checkcard', 'radio'].includes(cell.type) && cell.resourceType === '1' && cell.dataSource) { |
| | | sqls.push({uuid: cell.uuid, type: 'sForm', LText: `搜索栏-${cell.label}(表单)`}) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | if (config.interfaces && config.interfaces.length > 0) { |
| | | config.interfaces.forEach(m => { |
| | | if (m.status !== 'true' || m.setting.interType !== 'system') return false |
| | | |
| | | m.setting.$name = (config.MenuName || '') + '-' + (m.name || '') |
| | | |
| | | sqls.push({uuid: m.uuid, type: 'interface', LText: m.setting.$name}) |
| | | }) |
| | | } |
| | | |
| | | filterComponent(config.components) |
| | | } |
| | | |
| | | record = (type) => { |
| | | const { lackmenus, lacklinks, outmenus, unablemenus, backmenus, appbackmenus, btnmenus, appbtnmenus } = this.state |
| | | |
| | | let menus = [] |
| | | |
| | | lackmenus.forEach(item => { |
| | | menus.push(item.MenuID) |
| | | }) |
| | | lacklinks.forEach(item => { |
| | | menus.push(item.MenuID) |
| | | }) |
| | | outmenus.forEach(item => { |
| | | menus.push(item.MenuID) |
| | | }) |
| | | unablemenus.forEach(item => { |
| | | menus.push(item.MenuID) |
| | | }) |
| | | backmenus.forEach(item => { |
| | | menus.push(item.MenuID) |
| | | }) |
| | | appbackmenus.forEach(item => { |
| | | menus.push(item[0].MenuID) |
| | | menus.push(item[1].MenuID) |
| | | }) |
| | | btnmenus.forEach(item => { |
| | | menus.push(item.MenuID) |
| | | }) |
| | | appbtnmenus.forEach(item => { |
| | | menus.push(item[0].MenuID) |
| | | menus.push(item[1].MenuID) |
| | | }) |
| | | |
| | | menus = Array.from(new Set(menus)) |
| | | |
| | | if (type === 'app') { |
| | | if (menus.length) { |
| | | sessionStorage.setItem('syscheck_app', JSON.stringify(menus)) |
| | | } else { |
| | | sessionStorage.removeItem('syscheck_app') |
| | | } |
| | | } else { |
| | | if (menus.length) { |
| | | sessionStorage.setItem('syscheck_main', JSON.stringify(menus)) |
| | | } else { |
| | | sessionStorage.removeItem('syscheck_main') |
| | | } |
| | | } |
| | | } |
| | | |
| | | render () { |
| | | const { loading, activeMenu, menulist, remain, lackmenus, lacklinks, outmenus, unablemenus, backmenus, appbackmenus, btnmenus, appbtnmenus } = this.state |
| | | |
| | | if (!sessionStorage.getItem('UserID')) return null |
| | | |
| | | return ( |
| | | <div className="mk-app-check"> |
| | | <Header view="manage" /> |
| | | {loading ? <Spin size="large" /> : null} |
| | | <div className="view-wrap"> |
| | | <div className="action"> |
| | | <Button disabled={loading} style={{marginRight: '15px'}} onClick={this.getMenus}>检查管理系统菜单</Button> |
| | | <Button disabled={loading} style={{marginRight: '15px'}} onClick={this.getAppList}>检查子应用菜单</Button> |
| | | <Button onClick={() => this.setState({stop: true})}>停止</Button> |
| | | </div> |
| | | {activeMenu ? <div className="menu-msg">当前菜单:{activeMenu.MenuName} <span></span> {activeMenu.pName} <span></span> 进度({menulist.length - remain} / {menulist.length})</div> : null} |
| | | {lackmenus.length ? <div className="item-wrap"> |
| | | <div className="title">菜单配置不存在</div> |
| | | {lackmenus.map((item, i) => { |
| | | return <div key={i}>{item.MenuName} <span></span> {item.pName}</div> |
| | | })} |
| | | </div> : null} |
| | | {outmenus.length ? <div className="item-wrap"> |
| | | <div className="title">菜单配置需要升级</div> |
| | | {outmenus.map((item, i) => { |
| | | return <div key={i}>{item.MenuName} <span></span> {item.pName}</div> |
| | | })} |
| | | </div> : null} |
| | | {unablemenus.length ? <div className="item-wrap"> |
| | | <div className="title">菜单未启用</div> |
| | | {unablemenus.map((item, i) => { |
| | | return <div key={i}>{item.MenuName} <span></span> {item.pName}</div> |
| | | })} |
| | | </div> : null} |
| | | {lacklinks.length ? <div className="item-wrap"> |
| | | <div className="title">关联菜单不存在</div> |
| | | {lacklinks.map((item, i) => { |
| | | return <div key={i}>{item.MenuName} <span></span> {item.pName}</div> |
| | | })} |
| | | </div> : null} |
| | | {backmenus.length ? <div className="item-wrap"> |
| | | <div className="title">菜单后端脚本ID重复</div> |
| | | {backmenus.map((item, i) => { |
| | | return <div key={i}>{item.MenuName} <span></span> {item.pName}</div> |
| | | })} |
| | | </div> : null} |
| | | {appbackmenus.length ? <div className="item-wrap"> |
| | | <div className="title">菜单后端脚本ID重复(菜单间)</div> |
| | | {appbackmenus.map((item, i) => { |
| | | return <div key={i}>{item[0].MenuName} <span></span> {item[0].pName} <SwapOutlined /> {item[1].MenuName} <span></span> {item[1].pName}</div> |
| | | })} |
| | | </div> : null} |
| | | {btnmenus.length ? <div className="item-wrap"> |
| | | <div className="title">菜单按钮ID重复</div> |
| | | {btnmenus.map((item, i) => { |
| | | return <div key={i}>{item.MenuName} <span></span> {item.pName}</div> |
| | | })} |
| | | </div> : null} |
| | | {appbtnmenus.length ? <div className="item-wrap"> |
| | | <div className="title">菜单按钮ID重复(菜单间)</div> |
| | | {appbtnmenus.map((item, i) => { |
| | | return <div key={i}>{item[0].MenuName} <span></span> {item[0].pName} <SwapOutlined /> {item[1].MenuName} <span></span> {item[1].pName}</div> |
| | | })} |
| | | </div> : null} |
| | | </div> |
| | | </div> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default SysCheck |
New file |
| | |
| | | .mk-app-check { |
| | | background: #fff; |
| | | min-height: 100vh; |
| | | padding: 70px 30px; |
| | | |
| | | .ant-spin { |
| | | position: fixed; |
| | | z-index: 2; |
| | | left: calc(50% - 22px); |
| | | top: 50%; |
| | | } |
| | | .view-wrap { |
| | | width: 100%; |
| | | position: relative; |
| | | |
| | | .action { |
| | | .ant-btn { |
| | | color: #fff!important; |
| | | background-color: #1890ff!important; |
| | | border-color: #1890ff!important; |
| | | } |
| | | } |
| | | .menu-msg { |
| | | margin-top: 15px; |
| | | color: #1890ff; |
| | | span { |
| | | display: inline-block; |
| | | width: 20px; |
| | | height: 15px; |
| | | } |
| | | } |
| | | .item-wrap { |
| | | width: 50%; |
| | | display: inline-block; |
| | | margin-top: 30px; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | vertical-align: top; |
| | | .title { |
| | | color: #1890ff; |
| | | border-bottom: 1px solid rgba(0, 0, 0, 0.1); |
| | | margin-bottom: 10px; |
| | | margin-right: 20px; |
| | | padding-bottom: 5px; |
| | | } |
| | | span { |
| | | display: inline-block; |
| | | width: 20px; |
| | | height: 15px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | import { is, fromJS } from 'immutable' |
| | | import moment from 'moment' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { notification, Modal, Collapse, Card, Switch, Button, Typography } from 'antd' |
| | | import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons' |
| | | import { notification, Modal, Collapse, Card, Switch, Button, Typography, message } from 'antd' |
| | | import { DoubleLeftOutlined, DoubleRightOutlined, CopyOutlined } from '@ant-design/icons' |
| | | import md5 from 'md5' |
| | | |
| | | import Api from '@/api' |
| | |
| | | return is(fromJS(oriConfig), fromJS(config)) |
| | | } |
| | | |
| | | copyMenu = () => { |
| | | const { config } = this.state |
| | | |
| | | if (!config.enabled) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '菜单未启用,不可复制。', |
| | | duration: 5 |
| | | }) |
| | | } else { |
| | | let msg = { copyType: 'components', type: 'admin', interfaces: [] } |
| | | |
| | | msg.components = fromJS(config.components).toJS() |
| | | msg.components.forEach((item, i) => { |
| | | if (item.type === 'tabs') { |
| | | item.name = '标签组' + i |
| | | item.width = 24 |
| | | item.subtype = 'tabs' |
| | | item.setting = {autoSwitch: 'false', blacklist: [], name: item.name, position: 'top', supModule: [], tabStyle: 'line', width: 24} |
| | | |
| | | item.subtabs.forEach(tab => { |
| | | tab.components[0].subtype = 'normaltable' |
| | | tab.components[0].width = 24 |
| | | tab.components[0].wrap.width = 24 |
| | | tab.components[0].wrap.name = tab.components[0].name |
| | | |
| | | tab.components[0].action.forEach(btn => { |
| | | if (btn.OpenType === 'popview' && btn.config) { |
| | | btn.config.Template = 'CustomPage' |
| | | if (btn.config.components[0]) { |
| | | btn.config.components[0].subtype = 'normaltable' |
| | | } |
| | | } |
| | | }) |
| | | tab.components[0].cols = tab.components[0].cols.filter(col => !(col.field && col.Hide === 'true')) |
| | | tab.components[0].cols.forEach(col => { |
| | | if (col.type !== 'custom') return |
| | | col.elements.forEach(btn => { |
| | | if (btn.OpenType === 'popview' && btn.config) { |
| | | btn.config.Template = 'CustomPage' |
| | | if (btn.config.components[0]) { |
| | | btn.config.components[0].subtype = 'normaltable' |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | }) |
| | | } else { |
| | | item.subtype = 'normaltable' |
| | | item.width = 24 |
| | | item.wrap.width = 24 |
| | | item.wrap.name = item.name |
| | | item.action.forEach(btn => { |
| | | if (btn.OpenType === 'popview' && btn.config) { |
| | | btn.config.Template = 'CustomPage' |
| | | if (btn.config.components[0]) { |
| | | btn.config.components[0].subtype = 'normaltable' |
| | | } |
| | | } |
| | | }) |
| | | item.cols = item.cols.filter(col => !(col.field && col.Hide === 'true')) |
| | | item.cols.forEach(col => { |
| | | if (col.type !== 'custom') return |
| | | col.elements.forEach(btn => { |
| | | if (btn.OpenType === 'popview' && btn.config) { |
| | | btn.config.Template = 'CustomPage' |
| | | if (btn.config.components[0]) { |
| | | btn.config.components[0].subtype = 'normaltable' |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | if (msg.components[0].search && msg.components[0].search.length > 0) { |
| | | let cell = { |
| | | uuid: Utils.getuuid(), |
| | | type: 'search', |
| | | width: 24, |
| | | subtype: 'mainsearch', |
| | | name: '搜索', |
| | | search: msg.components[0].search, |
| | | style: {borderBottomColor: '#f0f0f0', borderBottomWidth: '1px'}, |
| | | wrap: {float: 'left', blacklist: [], name: '搜索', width: 24} |
| | | } |
| | | |
| | | cell.wrap.advanceType = msg.components[0].wrap.advanceType || 'modal' |
| | | cell.wrap.advanceWidth = msg.components[0].wrap.advanceWidth || 1000 |
| | | cell.wrap.searchLwidth = msg.components[0].wrap.searchLwidth || 33.3 |
| | | cell.wrap.searchRatio = msg.components[0].wrap.searchRatio || 6 |
| | | cell.wrap.resetContrl = msg.components[0].wrap.resetContrl || 'init' |
| | | cell.wrap.show = msg.components[0].wrap.show || 'true' |
| | | |
| | | if (cell.wrap.advanceType === 'drawer') { |
| | | cell.wrap.drawerPlacement = msg.components[0].wrap.drawerPlacement || 'left' |
| | | } |
| | | |
| | | msg.components[0].search = [] |
| | | msg.components[0].setting.useMSearch = 'true' |
| | | |
| | | msg.components.unshift(cell) |
| | | msg.components[0].$tables = getTables(msg.components[0]) |
| | | msg.components[1].$tables = getTables(msg.components[1]) |
| | | } |
| | | |
| | | try { |
| | | msg = window.btoa(window.encodeURIComponent(JSON.stringify(msg))) |
| | | } catch (e) { |
| | | console.warn('Stringify Failure') |
| | | msg = '' |
| | | } |
| | | |
| | | let oInput = document.createElement('input') |
| | | oInput.value = msg |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | | document.execCommand('Copy') |
| | | document.body.removeChild(oInput) |
| | | message.success('复制成功。') |
| | | } |
| | | } |
| | | |
| | | updateLogConfig = (config) => { |
| | | config.fstMenuId = this.state.config.fstMenuId || config.fstMenuId || '' |
| | | config.parentId = this.state.config.parentId || config.parentId || '' |
| | |
| | | {/* 表名添加 */} |
| | | <TableComponent config={config} updatetable={this.updateConfig}/> |
| | | <Paragraph style={{padding: '15px 0px 0px 18px'}} copyable={{ text: MenuId }}>菜单ID</Paragraph> |
| | | <Paragraph style={{padding: '0px 0px 0px 5px'}}>菜单组件 <CopyOutlined onClick={this.copyMenu} style={{marginLeft: '3px', cursor: 'pointer', color: '#1890ff'}} /></Paragraph> |
| | | </> : null} |
| | | </Panel> |
| | | <Panel header="搜索" key="search"> |
| | |
| | | <div className={'menu-view' + (menuloading ? ' saving' : '')}> |
| | | <Card bordered={false} extra={ |
| | | <div className="mk-opeartion-list"> |
| | | {/* <Dropdown overlay={ |
| | | <div className="mk-button-dropdown-wrap"> |
| | | <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> |
| | | </div> |
| | | } trigger={['click']} placement="bottomCenter"> |
| | | <Button className="mk-button-more">更多<DownOutlined/></Button> |
| | | </Dropdown> */} |
| | | {config ? <Debug config={config}/> : null} |
| | | {config ? <Transfer config={config}/> : null} |
| | | {config ? <Unattended config={config} updateConfig={this.updateConfig}/> : null} |