From a02fc6a77fa1b35c6516b2d37108d80e260c6c85 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 07 十一月 2024 22:05:08 +0800 Subject: [PATCH] 2024-11-07 --- src/utils/utils-custom.js | 35 ++ src/views/main/index.jsx | 22 src/menu/components/card/cardcellcomponent/elementform/index.jsx | 5 src/templates/sharecomponent/actioncomponent/verifypay/customscript/index.jsx | 2 src/templates/zshare/verifycard/customscript/index.jsx | 2 src/views/menudesign/homeform/index.jsx | 4 src/templates/treepageconfig/index.jsx | 1 src/views/menudesign/menuform/index.jsx | 4 public/options.json | 1 src/components/header/sysmessage/icon.jsx | 57 ++++ src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx | 2 src/views/pcdesign/index.scss | 29 ++ src/views/design/sidemenu/index.jsx | 4 public/README.txt | 1 src/views/mobdesign/index.jsx | 12 src/views/menudesign/index.jsx | 9 src/tabviews/custom/components/card/data-card/index.jsx | 12 src/components/header/sysmessage/index.jsx | 58 ++++ src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx | 2 src/menu/components/module/invoice/verifycard/customscript/index.jsx | 2 src/tabviews/custom/components/card/cardcellList/index.jsx | 67 ++- src/tabviews/custom/components/table/edit-table/normalTable/index.jsx | 18 + src/views/appmanage/index.jsx | 2 src/templates/sharecomponent/columncomponent/formconfig.jsx | 2 src/menu/components/table/normal-table/index.jsx | 4 src/menu/components/table/normal-table/columns/index.jsx | 2 src/views/design/sidemenu/thdmenuplus/index.jsx | 4 src/tabviews/sysmessage/index.jsx | 78 +++++ src/components/tabview/index.jsx | 10 src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx | 2 src/tabviews/custom/components/card/double-data-card/index.scss | 17 + src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx | 2 src/views/appcheck/index.jsx | 2 src/components/header/index.jsx | 6 src/tabviews/custom/components/card/double-data-card/index.jsx | 17 src/templates/zshare/verifycard/callbackcustomscript/index.jsx | 2 src/menu/datasource/verifycard/customscript/index.jsx | 2 src/templates/comtableconfig/index.jsx | 79 ----- src/menu/components/table/base-table/columns/editColumn/formconfig.jsx | 2 src/views/rolemanage/index.jsx | 7 src/templates/sharecomponent/fieldscomponent/index.jsx | 2 src/views/tabledesign/menuform/index.jsx | 4 src/templates/sharecomponent/columncomponent/dragcolumn/index.jsx | 2 src/tabviews/sysmessage/index.scss | 12 src/views/mobdesign/index.scss | 29 ++ src/tabviews/custom/components/share/normalTable/index.jsx | 9 src/menu/components/module/invoice/verifycard/callbackcustomscript/index.jsx | 2 src/tabviews/custom/components/card/data-card/index.scss | 11 src/menu/components/table/edit-table/index.jsx | 4 src/index.js | 1 src/views/sso/index.jsx | 12 src/views/interface/workspace/request/index.jsx | 2 public/manifest.json | 2 src/views/pcdesign/index.jsx | 12 src/components/header/sysmessage/index.scss | 82 +++++ src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx | 2 src/tabviews/custom/components/card/cardcellList/index.scss | 1 src/menu/components/table/base-table/index.jsx | 4 src/utils/option.js | 22 - 59 files changed, 592 insertions(+), 212 deletions(-) diff --git a/public/README.txt b/public/README.txt index d1ff2b5..50a4e1b 100644 --- a/public/README.txt +++ b/public/README.txt @@ -22,5 +22,6 @@ transfer -- 鏄惁浣跨敤杞帴鍙o紝浣跨敤杞帴鍙f椂璇疯缃负 true, 浣跨敤杞帴鍙f椂锛屽閮ㄦ帴鍙h皟鐢ㄥ墠涓嶄細鍋氱櫥褰曢獙璇� keepPwd -- 璁颁綇瀵嗙爜锛岄粯璁ゅ紑鍚紝褰撳�间负 false 鏃剁鐢紝褰撳�间负 invisible 鏃惰浣忓瘑鐮佷絾瀵嗙爜涓嶅彲鏌ョ湅 execType -- 鑴氭湰浼犺緭鏂瑰紡锛屽�间负x鏃讹紝鍚敤AES鍔犲瘑 +SysNotice -- 鏄惁寮�鍚郴缁熸秷鎭� updateStatus -- 鏄惁鏇存柊寮�鍙戠姸鎬侊紝榛樿寮�鍚紝褰撳�间负 false 鏃剁鐢� forcedUpdate -- 浼犺緭鍙峰崌绾ф椂锛屾槸鍚﹁嚜鍔ㄩ��鍑猴紝鏍煎紡涓猴紙YYYY-MM-DD锛夛紝鐢ㄤ簬鍗囩骇鍚庡埛鏂扮敤鎴锋湰鍦伴厤缃� \ No newline at end of file diff --git a/public/manifest.json b/public/manifest.json index 3027059..279e21d 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -6,5 +6,5 @@ "display": "standalone", "theme_color": "#000000", "background_color": "#ffffff", - "mk_version": "20241002" + "mk_version": "20241106" } diff --git a/public/options.json b/public/options.json index 35a9409..498e103 100644 --- a/public/options.json +++ b/public/options.json @@ -19,6 +19,7 @@ "probation": "", "transfer": "true", "keepPwd": "true", + "SysNotice": "false", "host": "http://dms-test.worx.cn", "service": "new/" } \ No newline at end of file diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx index 33f5af8..4dd6942 100644 --- a/src/components/header/index.jsx +++ b/src/components/header/index.jsx @@ -18,6 +18,7 @@ const Resetpwd = asyncComponent(() => import('@/components/resetPassword')) const QrCode = asyncComponent(() => import('@/components/qrcode')) const LoginForm = asyncSpinComponent(() => import('./loginform')) +const SysIcon = asyncComponent(() => import('./sysmessage/icon')) class Header extends Component { state = { @@ -331,7 +332,7 @@ ParentNames: [fst.MenuName, snd.MenuName], MenuNo: trd.MenuNo, EasyCode: trd.EasyCode, - type: 'CommonTable', + type: 'CustomPage', OpenType: 'newtab', hidden: 'false' } @@ -340,7 +341,7 @@ try { let PageParam = JSON.parse(trd.PageParam) - trdItem.type = PageParam.Template || 'CommonTable' + trdItem.type = PageParam.Template || 'CustomPage' trdItem.OpenType = PageParam.OpenType || 'newtab' trdItem.hidden = PageParam.hidden || 'false' trdItem.menuColor = PageParam.menuColor || '' @@ -787,6 +788,7 @@ <SearchOutlined className="search-menu" /> </Dropdown> : null } + {window.GLOB.SysNotice ? <SysIcon /> : null} {/* 澶村儚銆佺敤鎴峰悕 */} <Dropdown className="header-setting" overlay={menu}> <div> diff --git a/src/components/header/sysmessage/icon.jsx b/src/components/header/sysmessage/icon.jsx new file mode 100644 index 0000000..a60199f --- /dev/null +++ b/src/components/header/sysmessage/icon.jsx @@ -0,0 +1,57 @@ +import React, { Component } from 'react' +import { notification } from 'antd' +import { MessageFilled } from '@ant-design/icons' + +import Api from '@/api' +import MKEmitter from '@/utils/events.js' + +class SysIcon extends Component { + state = { + notices: [] + } + + componentDidMount () { + setTimeout(() => { + this.getMsgList() + }, 2000) + } + + getMsgList = () => { + let param = { + func: 's_get_kei' + } + + Api.getSystemConfig(param).then(result => { + if (result.status) { + let notices = result.data || [] + + this.setState({ notices }) + MKEmitter.emit('sysMessageChange', notices) + + setTimeout(() => { + this.getMsgList() + }, 600000) + } else { + notification.warning({ + top: 92, + message: result.message, + duration: 5 + }) + } + }) + } + + open = () => { + MKEmitter.emit('sysMessageOpen') + } + + render() { + const { notices } = this.state + + return ( + <MessageFilled className="mk-msg-icon" data-title={notices.length ? notices.length : ''} onClick={this.open} /> + ) + } +} + +export default SysIcon \ No newline at end of file diff --git a/src/components/header/sysmessage/index.jsx b/src/components/header/sysmessage/index.jsx new file mode 100644 index 0000000..2e444ab --- /dev/null +++ b/src/components/header/sysmessage/index.jsx @@ -0,0 +1,58 @@ +import React, { Component } from 'react' +import { CloseOutlined } from '@ant-design/icons' + +import MKEmitter from '@/utils/events.js' + +import './index.scss' + +class SysMessage extends Component { + state = { + visible: false, + notices: [] + } + + componentDidMount() { + MKEmitter.addListener('sysMessageChange', this.sysMessageChange) + MKEmitter.addListener('sysMessageOpen', this.sysMessageOpen) + } + + componentWillUnmount () { + this.setState = () => { + return + } + MKEmitter.removeListener('sysMessageChange', this.sysMessageChange) + MKEmitter.removeListener('sysMessageOpen', this.sysMessageOpen) + } + + sysMessageChange = (notices) => { + this.setState({ notices }) + } + + sysMessageOpen = () => { + this.setState({ visible: true }) + } + + close = () => { + this.setState({ visible: false }) + } + + render() { + const { visible, notices } = this.state + + return ( + <div className={'mk-msg-wrap' + (visible ? ' visible' : '')}> + <div className="title"> + 绯荤粺娑堟伅 + <CloseOutlined onClick={this.close}/> + </div> + <div className="msg-list">{notices.map((item, index) => { + return <div className="msg-item" key={index}> + {item.remark} + </div> + })}</div> + </div> + ) + } +} + +export default SysMessage \ No newline at end of file diff --git a/src/components/header/sysmessage/index.scss b/src/components/header/sysmessage/index.scss new file mode 100644 index 0000000..997c78e --- /dev/null +++ b/src/components/header/sysmessage/index.scss @@ -0,0 +1,82 @@ +.mk-msg-icon { + font-size: 16px; + margin-top: 17px; + margin-right: 20px; + margin-left: 0px; + color: #1CD66C; + cursor: pointer; +} +.mk-msg-icon[data-title] { + position: relative; + + &::before { + content: " "; + position: absolute; + top: 6px; + left: 2px; + z-index: -1; + width: 12px; + height: 3px; + display: block; + background: #fff; + } + &::after { + position: absolute; + top: -10px; + left: 15px; + color: #f5222d; + font-size: 12px; + line-height: 16px; + white-space: nowrap; + font-weight: 600; + content: attr(data-title); + } +} +.mk-msg-wrap { + position: fixed; + width: 200px; + height: 400px; + top: 92px; + right: 15px; + z-index: -1; + opacity: 0; + padding: 10px; + font-size: 13px; + background-color: #fff; + background-clip: padding-box; + color: rgba(0, 0, 0, 0.85); + border: 0; + border-radius: 4px; + -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + pointer-events: auto; + transition: all 0.2s; + + .title { + text-align: center; + + .anticon-close { + position: absolute; + right: 10px; + color: rgba(0, 0, 0, 0.45); + cursor: pointer; + transition: color 0.2s; + } + .anticon-close:hover { + color: rgba(0, 0, 0, 0.85); + } + } + .msg-list { + .msg-item { + height: 80px; + background: rgba(0, 0, 0, 0.05); + margin: 10px 0px; + padding: 5px; + border-radius: 2px; + } + } +} +.mk-msg-wrap.visible { + z-index: 3000; + opacity: 1; +} \ No newline at end of file diff --git a/src/components/tabview/index.jsx b/src/components/tabview/index.jsx index dc50560..f4a5dc0 100644 --- a/src/components/tabview/index.jsx +++ b/src/components/tabview/index.jsx @@ -276,18 +276,18 @@ selectcomponent = (view) => { // 鏍规嵁tab椤典腑鑿滃崟淇℃伅锛岄�夋嫨鎵�闇�鐨勭粍浠� - if (view.type === 'Home') { - return (<Home MenuID={view.MenuID} MenuName={view.MenuName}/>) - } else if (view.type === 'BaseTable') { + if (view.type === 'BaseTable') { return (<BaseTable MenuID={view.MenuID} MenuName={view.MenuName} param={view.param} changeTemp={this.changeTemp}/>) } else if (view.type === 'CustomPage') { return (<CustomPage MenuID={view.MenuID} MenuName={view.MenuName} param={view.param} changeTemp={this.changeTemp}/>) + } else if (view.type === 'Home') { + return (<Home MenuID={view.MenuID} MenuName={view.MenuName}/>) + } else if (view.type === 'RolePermission') { + return (<RoleManage MenuID={view.MenuID}/>) } else if (view.type === 'CommonTable') { return (<CommonTable MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} param={view.param} changeTemp={this.changeTemp}/>) } else if (view.type === 'TreePage') { return (<TreePage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} param={view.param}/>) - } else if (view.type === 'RolePermission') { - return (<RoleManage MenuID={view.MenuID}/>) } else if (view.type === 'iframe') { return (<Iframe MenuID={view.MenuID} title={view.MenuName} url={view.src}/>) } else { diff --git a/src/index.js b/src/index.js index d1d5fad..51ba874 100644 --- a/src/index.js +++ b/src/index.js @@ -65,6 +65,7 @@ GLOB.WXminiAppID = config.WXminiAppID || '' GLOB.WXMerchID = config.WXMerchID || '' GLOB.WXNotice = config.WXNotice + '' === 'true' + GLOB.SysNotice = config.SysNotice + '' === 'true' GLOB.execType = config.execType === 'x' ? 'x' : '' GLOB.mkHS = false GLOB.debugger = false diff --git a/src/menu/components/card/cardcellcomponent/elementform/index.jsx b/src/menu/components/card/cardcellcomponent/elementform/index.jsx index 1435179..9673341 100644 --- a/src/menu/components/card/cardcellcomponent/elementform/index.jsx +++ b/src/menu/components/card/cardcellcomponent/elementform/index.jsx @@ -228,13 +228,10 @@ } } else if (this.record.eleType === 'formula') { if (this.record.eval !== 'func') { - _options.push('prefix', 'postfix', 'fixStyle', 'alignItems', 'evalchars') + _options.push('link', 'prefix', 'postfix', 'fixStyle', 'alignItems', 'evalchars') } if (this.record.eval === 'true') { _options.push('decimal') - } - if (this.record.eval !== 'func') { - _options.push('link') } if (this.record.link && this.record.eval !== 'func') { _options.push('linkType') diff --git a/src/menu/components/module/invoice/verifycard/callbackcustomscript/index.jsx b/src/menu/components/module/invoice/verifycard/callbackcustomscript/index.jsx index 786f5c5..d18ce3e 100644 --- a/src/menu/components/module/invoice/verifycard/callbackcustomscript/index.jsx +++ b/src/menu/components/module/invoice/verifycard/callbackcustomscript/index.jsx @@ -71,7 +71,7 @@ let pass = checkSQL(values.sql, 'customscript') - if (!pass) return + if (!pass && !skip) return let sql = ` /* 绯荤粺瀛楁 */ diff --git a/src/menu/components/module/invoice/verifycard/customscript/index.jsx b/src/menu/components/module/invoice/verifycard/customscript/index.jsx index 8d848ce..1454d26 100644 --- a/src/menu/components/module/invoice/verifycard/customscript/index.jsx +++ b/src/menu/components/module/invoice/verifycard/customscript/index.jsx @@ -62,7 +62,7 @@ let pass = checkSQL(values.sql, 'customscript') - if (!pass) return + if (!pass && !skip) return let sql = ` /* 绯荤粺瀛楁 */ diff --git a/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx index 9c10aac..560835c 100644 --- a/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/base-table/columns/editColumn/formconfig.jsx @@ -139,7 +139,7 @@ type: 'radio', key: 'IsSort', label: '鎺掑簭', - initVal: card.IsSort || (card.isSub || card.type === 'custom' ? 'false' : 'true'), + initVal: card.IsSort || 'false', required: true, options: [{ value: 'true', diff --git a/src/menu/components/table/base-table/index.jsx b/src/menu/components/table/base-table/index.jsx index 4b4394e..f3983ea 100644 --- a/src/menu/components/table/base-table/index.jsx +++ b/src/menu/components/table/base-table/index.jsx @@ -60,8 +60,8 @@ columns: [], cols: [ { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label1', field: '', Hide: 'false', type: 'text', Width: 120 }, - { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label2', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 }, - { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label3', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 }, + { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label2', field: '', Hide: 'false', IsSort: 'false', type: 'text', Width: 120 }, + { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label3', field: '', Hide: 'false', IsSort: 'false', type: 'text', Width: 120 }, ], scripts: [], isNew: true diff --git a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx index b0b999e..aed839c 100644 --- a/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/edit-table/columns/editColumn/formconfig.jsx @@ -158,7 +158,7 @@ type: 'radio', key: 'IsSort', label: '鎺掑簭', - initVal: card.IsSort || (card.isSub || card.type === 'custom' ? 'false' : 'true'), + initVal: card.IsSort || 'false', required: true, options: [{ value: 'true', diff --git a/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx b/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx index 274f82e..0537dcf 100644 --- a/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx +++ b/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx @@ -97,7 +97,7 @@ let pass = checkSQL(values.sql, 'customscript') - if (!pass) return + if (!pass && !skip) return let sheet = btn.sheet.replace(/(.*)\.(.*)\.|@db@/ig, '') let tail = ` diff --git a/src/menu/components/table/edit-table/index.jsx b/src/menu/components/table/edit-table/index.jsx index 3e92baf..0e5e8d8 100644 --- a/src/menu/components/table/edit-table/index.jsx +++ b/src/menu/components/table/edit-table/index.jsx @@ -57,8 +57,8 @@ columns: [], cols: [ { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label1', field: '', Hide: 'false', type: 'text', Width: 120 }, - { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label2', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 }, - { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label3', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 }, + { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label2', field: '', Hide: 'false', IsSort: 'false', type: 'text', Width: 120 }, + { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label3', field: '', Hide: 'false', IsSort: 'false', type: 'text', Width: 120 }, ], scripts: [], submit: {intertype: 'system', default: 'true', innerFunc: '', execSuccess: 'grid', execError: 'never', scripts: [], uniques: []}, diff --git a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx index e5c2d75..5204751 100644 --- a/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx +++ b/src/menu/components/table/normal-table/columns/editColumn/formconfig.jsx @@ -138,7 +138,7 @@ type: 'radio', key: 'IsSort', label: '鎺掑簭', - initVal: card.IsSort || (card.isSub || card.type === 'custom' ? 'false' : 'true'), + initVal: card.IsSort || 'false', required: true, options: [{ value: 'true', diff --git a/src/menu/components/table/normal-table/columns/index.jsx b/src/menu/components/table/normal-table/columns/index.jsx index e6af839..1035dc6 100644 --- a/src/menu/components/table/normal-table/columns/index.jsx +++ b/src/menu/components/table/normal-table/columns/index.jsx @@ -579,7 +579,7 @@ fields.forEach(item => { if (keys.includes(item.field)) return - let cell = { uuid: Utils.getuuid(), label: item.label, field: item.field, Align: 'left', Hide: 'false', IsSort: 'true', Width: 120, blacklist: [], postfix: '', prefix: '', linkmenu: [], marks: [], perspective: 'linkmenu' } + let cell = { uuid: Utils.getuuid(), label: item.label, field: item.field, Align: 'left', Hide: 'false', IsSort: 'false', Width: 120, blacklist: [], postfix: '', prefix: '', linkmenu: [], marks: [], perspective: 'linkmenu' } if (/Nvarchar|date/ig.test(item.datatype)) { cell.type = 'text' diff --git a/src/menu/components/table/normal-table/index.jsx b/src/menu/components/table/normal-table/index.jsx index d53420d..ba1fc03 100644 --- a/src/menu/components/table/normal-table/index.jsx +++ b/src/menu/components/table/normal-table/index.jsx @@ -66,8 +66,8 @@ columns: [], cols: [ { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label1', field: '', Hide: 'false', type: 'text', Width: 120 }, - { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label2', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 }, - { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label3', field: '', Hide: 'false', IsSort: 'true', type: 'text', Width: 120 }, + { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label2', field: '', Hide: 'false', IsSort: 'false', type: 'text', Width: 120 }, + { origin: true, uuid: Utils.getuuid(), Align: 'left', label: 'label3', field: '', Hide: 'false', IsSort: 'false', type: 'text', Width: 120 }, ], scripts: [], isNew: true diff --git a/src/menu/datasource/verifycard/customscript/index.jsx b/src/menu/datasource/verifycard/customscript/index.jsx index d9e4d04..5b4c682 100644 --- a/src/menu/datasource/verifycard/customscript/index.jsx +++ b/src/menu/datasource/verifycard/customscript/index.jsx @@ -85,7 +85,7 @@ let pass = checkSQL(values.sql, 'customscript') - if (!pass) return + if (!pass && !skip) return if (skip) { this.setState({ diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index 085f046..7b5fffe 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -256,6 +256,7 @@ Object.keys(data).forEach(key => { if (/^\$/.test(key)) return + if (key === 'children') return let reg = new RegExp('@' + key + '@', 'ig') url = url.replace(reg, data[key]) }) @@ -960,35 +961,47 @@ val = '' } else if (data) { let _val = card.formula - - if (card.$keys && card.noValue === 'hide') { // 绌哄�奸殣钘� - let _data = {} - let empty = true - - Object.keys(data).forEach(key => { - _data[key.toLowerCase()] = data[key] - }) - _data.username = sessionStorage.getItem('User_Name') || '' - _data.fullname = sessionStorage.getItem('Full_Name') || '' - _data.bid = data.$$BID || '' - - card.$keys.forEach(key => { - if (!_data.hasOwnProperty(key)) { - empty = false - } else if (_data[key] && !/^1949-10-01/.test(_data[key])) { - empty = false - } - }) - - if (empty) return null - } - - if (/@username@|@fullName@|@bid@/ig.test(_val)) { - _val = _val.replace(/@username@/ig, sessionStorage.getItem('User_Name') || '').replace(/@fullName@/ig, sessionStorage.getItem('Full_Name') || '').replace(/@bid@/ig, data.$$BID || '') - } + let _data = {} Object.keys(data).forEach(key => { + if (/^\$/.test(key)) return + if (key === 'children') return + if (/^1949-10-01/.test(data[key])) { + _data[key.toLowerCase()] = '' + } else { + _data[key.toLowerCase()] = data[key] + } + }) + _data.username = sessionStorage.getItem('User_Name') || '' + _data.fullname = sessionStorage.getItem('Full_Name') || '' + _data.bid = data.$$BID || '' + + if (card.eval === 'false' && card.noValue === 'hide') { // 绌哄�奸殣钘� + if (card.$keys) { + let empty = true + + card.$keys.forEach(key => { + if (!_data.hasOwnProperty(key)) { + empty = false + } else if (_data[key]) { + empty = false + } + }) + + if (empty) return null + } + + Object.keys(_data).forEach(key => { + if (_data[key]) return + + _val = _val.replace(new RegExp('[^@]*@' + key + '@', 'ig'), '') + }) + + if (!_val) return null + } + + Object.keys(_data).forEach(key => { let reg = new RegExp('@' + key + '@', 'ig') - _val = _val.replace(reg, data[key]) + _val = _val.replace(reg, _data[key]) }) if (card.eval !== 'false') { diff --git a/src/tabviews/custom/components/card/cardcellList/index.scss b/src/tabviews/custom/components/card/cardcellList/index.scss index b13d11b..43459c0 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.scss +++ b/src/tabviews/custom/components/card/cardcellList/index.scss @@ -44,6 +44,7 @@ font-weight: inherit; text-decoration: inherit; font-family: inherit; + min-height: 1px; .sequence-wrap { display: inline-block; width: 21px; diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx index 92f4093..a8fb5a3 100644 --- a/src/tabviews/custom/components/card/data-card/index.jsx +++ b/src/tabviews/custom/components/card/data-card/index.jsx @@ -191,12 +191,16 @@ } if (_config.wrap.zHeight) { + _config.wrap.zoomStyle = {} if (_config.wrap.zHeight <= 100) { if (_config.wrap.zHeight < 0) { - _config.wrap.zHeight = `calc(100vh - ${-_config.wrap.zHeight}px)` + _config.wrap.zoomStyle.maxHeight = `calc(100vh - ${-_config.wrap.zHeight}px)` + _config.wrap.zoomStyle.minHeight = '100px' } else { - _config.wrap.zHeight = _config.wrap.zHeight + 'vh' + _config.wrap.zoomStyle.maxHeight = _config.wrap.zHeight + 'vh' } + } else { + _config.wrap.zoomStyle.maxHeight = _config.wrap.zHeight + 'px' } if (_config.style) { @@ -204,7 +208,7 @@ } _config.wrap.layout += ' fix-height' } else { - _config.wrap.zHeight = 'none' + _config.wrap.zoomStyle = null } this.setState({ @@ -1234,7 +1238,7 @@ {config.wrap.pickup === 'true' && this.state.data.length > 0 ? <div className="pickup-wrap"><Switch title="鏀惰捣" checkedChildren={window.GLOB.dict['open'] || '寮�'} unCheckedChildren={window.GLOB.dict['shut'] || '鍏�'} checked={pickup} onChange={this.pickupChange} /></div> : null} <div className={`data-zoom ${config.wrap.wrapClass}`}> {switchable ? <div className={'prev-page ' + (pageIndex === 1 ? 'disabled' : '')} onClick={this.prevPage}><div><div><img src={preImg} alt=""/></div></div></div> : null} - <Row className={'card-row-list ' + config.wrap.layout} style={{maxHeight: config.wrap.zHeight}}> + <Row className={'card-row-list ' + config.wrap.layout} style={config.wrap.zoomStyle}> {precards.map((item, index) => ( <Col key={'pre' + index} className="extend-card" style={item.wStyle} span={item.setting.width || 6}> {item.setting.cardRole === 'header' ? <TableHeader card={item} data={extendData} refresh={this.refreshByHeader}> diff --git a/src/tabviews/custom/components/card/data-card/index.scss b/src/tabviews/custom/components/card/data-card/index.scss index 7a3eefc..bbb850d 100644 --- a/src/tabviews/custom/components/card/data-card/index.scss +++ b/src/tabviews/custom/components/card/data-card/index.scss @@ -79,7 +79,16 @@ margin-bottom: 0!important; } } - div:last-child { + .extend-card:last-child:not(:only-child) { + position: sticky; + bottom: 0; + z-index: 1; + .card-item-box { + margin-top: 0!important; + margin-bottom: 0!important; + } + } + >div:last-child { .card-item-box { border-bottom: none!important; } diff --git a/src/tabviews/custom/components/card/double-data-card/index.jsx b/src/tabviews/custom/components/card/double-data-card/index.jsx index da1f7b4..90b5ea2 100644 --- a/src/tabviews/custom/components/card/double-data-card/index.jsx +++ b/src/tabviews/custom/components/card/double-data-card/index.jsx @@ -130,20 +130,23 @@ _config.wrap.wrapClass = `${_config.wrap.selStyle} ${_config.wrap.cardType || ''}` if (_config.wrap.zHeight || _config.wrap.minWidth) { + _config.wrap.zoomStyle = { + maxHeight: 'none', + '--mk-data-zoom-width': _config.wrap.minWidth ? _config.wrap.minWidth + 'px' : '100%' + } + if (_config.wrap.zHeight) { if (_config.wrap.zHeight <= 100) { if (_config.wrap.zHeight < 0) { - _config.wrap.zHeight = `calc(100vh - ${-_config.wrap.zHeight}px)` + _config.wrap.zoomStyle.maxHeight = `calc(100vh - ${-_config.wrap.zHeight}px)` + _config.wrap.zoomStyle.minHeight = '100px' } else { - _config.wrap.zHeight = _config.wrap.zHeight + 'vh' + _config.wrap.zoomStyle.maxHeight = _config.wrap.zHeight + 'vh' } + } else { + _config.wrap.zoomStyle.maxHeight = _config.wrap.zHeight + 'px' } _config.wrap.wrapClass += ' fix-height' - } - _config.wrap.minWidth = _config.wrap.minWidth ? _config.wrap.minWidth + 'px' : '100%' - _config.wrap.zoomStyle = { - maxHeight: _config.wrap.zHeight || 'none', - '--mk-data-zoom-width': _config.wrap.minWidth } } else { _config.wrap.zoomStyle = null diff --git a/src/tabviews/custom/components/card/double-data-card/index.scss b/src/tabviews/custom/components/card/double-data-card/index.scss index 07c69b2..1cac501 100644 --- a/src/tabviews/custom/components/card/double-data-card/index.scss +++ b/src/tabviews/custom/components/card/double-data-card/index.scss @@ -286,10 +286,21 @@ margin-bottom: 0!important; } } - div:last-child { + .extend-card:last-child:not(:only-child) { + position: sticky; + bottom: 0; + z-index: 1; + .card-item-box { + margin-top: 0!important; + margin-bottom: 0!important; + } + } + >div:last-child { .sub-card-wrap { - .card-item-box { - border-bottom: none!important; + >div:last-child { + .card-item-box { + border-bottom: none!important; + } } } } diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx index b01e03d..70809ce 100644 --- a/src/tabviews/custom/components/share/normalTable/index.jsx +++ b/src/tabviews/custom/components/share/normalTable/index.jsx @@ -418,6 +418,15 @@ content = '' } } else { + if (col.eval === 'false' && col.noValue === 'hide') { // 绌哄�奸殣钘� + Object.keys(record).forEach(key => { + if (/^\$/.test(key)) return + if (record[key]) return + + content = content.replace(new RegExp('[^@]*@' + key + '@', 'ig'), '') + }) + } + Object.keys(record).forEach(key => { let reg = new RegExp('@' + key + '@', 'ig') content = content.replace(reg, record[key]) diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx index c5678a8..e8b2a2b 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx @@ -964,6 +964,15 @@ content = '' } } else { + if (col.eval === 'false' && col.noValue === 'hide') { // 绌哄�奸殣钘� + Object.keys(record).forEach(key => { + if (/^\$/.test(key)) return + if (record[key]) return + + content = content.replace(new RegExp('[^@]*@' + key + '@', 'ig'), '') + }) + } + Object.keys(record).forEach(key => { let reg = new RegExp('@' + key + '@', 'ig') content = content.replace(reg, record[key]) @@ -1286,6 +1295,15 @@ content = '' } } else { + if (col.eval === 'false' && col.noValue === 'hide') { // 绌哄�奸殣钘� + Object.keys(record).forEach(key => { + if (/^\$/.test(key)) return + if (record[key]) return + + content = content.replace(new RegExp('[^@]*@' + key + '@', 'ig'), '') + }) + } + Object.keys(record).forEach(key => { let reg = new RegExp('@' + key + '@', 'ig') content = content.replace(reg, record[key]) diff --git a/src/tabviews/sysmessage/index.jsx b/src/tabviews/sysmessage/index.jsx new file mode 100644 index 0000000..b3124cc --- /dev/null +++ b/src/tabviews/sysmessage/index.jsx @@ -0,0 +1,78 @@ +import React, { Component } from 'react' +// import { is, fromJS } from 'immutable' +import { notification, Spin } from 'antd' +// import { BankOutlined } from '@ant-design/icons' + +import Api from '@/api' +import MKEmitter from '@/utils/events.js' +import './index.scss' + +export default class SysMessage extends Component { + state = { + loading: true + } + + getAppList = () => { + let param = { + func: 's_get_kei' + } + + Api.getSystemConfig(param).then(result => { + if (result.status) { + let applist = result.data.map(item => { + item.sublist = item.data_detail || [] + item.sublist = item.sublist.map(cell => { + cell.ID = cell.d_id + return cell + }) + + return item + }) + let selectApp = applist[0] || null + + this.setState({ applist, selectApp }) + } else { + notification.warning({ + top: 92, + message: result.message, + duration: 5 + }) + } + }) + } + + + reloadMenuView = (menuId) => { + if (menuId !== 'message_page_id') return + + this.getAppList() + } + + UNSAFE_componentWillMount () { + + } + + componentDidMount () { + MKEmitter.addListener('reloadMenuView', this.reloadMenuView) + } + + /** + * @description 缁勪欢閿�姣侊紝娓呴櫎state鏇存柊 + */ + componentWillUnmount () { + this.setState = () => { + return + } + MKEmitter.removeListener('reloadMenuView', this.reloadMenuView) + } + + render() { + const { loading, } = this.state + + return ( + <div className="mk-sys-message"> + {loading && <Spin />} + </div> + ) + } +} \ No newline at end of file diff --git a/src/tabviews/sysmessage/index.scss b/src/tabviews/sysmessage/index.scss new file mode 100644 index 0000000..faa3779 --- /dev/null +++ b/src/tabviews/sysmessage/index.scss @@ -0,0 +1,12 @@ +.mk-sys-message { + min-height: calc(100vh - 94px); + height: 100%; + position: relative; + padding: 15px; + + .ant-spin { + position: absolute; + top: calc(50vh - 100px); + left: calc(50vw - 12px); + } +} \ No newline at end of file diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx index 4768e78..97f340e 100644 --- a/src/templates/comtableconfig/index.jsx +++ b/src/templates/comtableconfig/index.jsx @@ -3,8 +3,8 @@ import { is, fromJS } from 'immutable' import { DndProvider } from 'react-dnd' import HTML5Backend from 'react-dnd-html5-backend' -import { Button, Card, Collapse, notification, Spin, Tooltip, Col } from 'antd' -import { QuestionCircleOutlined, RedoOutlined } from '@ant-design/icons' +import { Button, Card, Collapse, notification, Spin, Col } from 'antd' +import { RedoOutlined } from '@ant-design/icons' import Api from '@/api' import Utils from '@/utils/utils.js' @@ -16,21 +16,16 @@ import ColumnComponent from '@/templates/sharecomponent/columncomponent' import MenuForm from './menuform' -import SourceElement from '@/templates/zshare/dragsource' import Source from './source' import './index.scss' const { Panel } = Collapse -// const Versions = asyncComponent(() => import('@/menu/versions')) const UrlFieldComponent = asyncComponent(() => import('@/menu/urlfieldcomponent')) -// const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) const UpdateTable = asyncComponent(() => import('./updatetable')) const Unattended = asyncComponent(() => import('@/templates/zshare/unattended')) -// const EditComponent = asyncComponent(() => import('@/templates/zshare/editcomponent')) const SettingComponent = asyncComponent(() => import('@/templates/sharecomponent/settingcomponent')) const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent')) -const FieldsComponent = asyncComponent(() => import('@/templates/sharecomponent/fieldscomponent')) const ChartGroupComponent = asyncComponent(() => import('@/templates/sharecomponent/chartgroupcomponent')) const ChartComponent = asyncComponent(() => import('@/templates/sharecomponent/chartcomponent')) const CardComponent = asyncComponent(() => import('@/templates/sharecomponent/cardcomponent')) @@ -1076,8 +1071,6 @@ if (!config) return null - const confActions = config.action.filter(_action => !_action.origin && (['pop', 'popview'].includes(_action.OpenType) || (_action.OpenType === 'tab' && _action.tabTemplate === 'FormTab') || (_action.OpenType === 'funcbutton' && _action.execMode === 'pop'))) - let configTabs = [] config.tabgroups.forEach(group => { configTabs.push(...group.sublist) @@ -1107,74 +1100,6 @@ containerId="main-basedata" updatetable={this.updateconfig} /> - </Panel> - {/* 鎼滅储鏉′欢娣诲姞 */} - <Panel header="鎼滅储" key="1"> - <div className="search-element"> - {Source.searchItems.map((item, index) => (<SourceElement key={index} content={item}/>))} - </div> - <FieldsComponent config={config} type="search" /> - </Panel> - {/* 鎸夐挳娣诲姞 */} - <Panel header="鎸夐挳" key="2"> - <div className="search-element"> - {Source.actionItems.map((item, index) => (<SourceElement key={index} content={item}/>))} - </div> - <div className="config-btn"> - {confActions.length > 0 ? - <p className="config-btn-title"> - <Tooltip placement="topLeft" title="鐐瑰嚮鎸夐挳锛屽彲瀹屾垚鎴栨煡鐪嬫寜閽厤缃俊鎭��"> - <QuestionCircleOutlined className="mk-form-tip"/> - </Tooltip> - 鎸夐挳閰嶇疆 - </p> : null - } - </div> - {confActions.map((item, index) => { - return ( - <div key={index}> - <Button - icon={item.icon} - style={{marginBottom: '10px'}} - className={'config-button mk-btn mk-' + item.class} - onClick={() => this.setSubConfig(item, 'button')} - >{item.label}</Button> - </div> - ) - })} - </Panel> - {/* 娣诲姞鏄剧ず鍒� */} - <Panel header="鏄剧ず鍒�" key="3"> - <div className="search-element"> - {Source.columnItems.map((item, index) => (<SourceElement key={index} content={item}/>))} - </div> - <FieldsComponent config={config} type="columns"/> - </Panel> - {/* 娣诲姞鏍囩 */} - <Panel header="鏍囩椤�" key="4"> - <div className="search-element"> - {Source.tabItems.map((item, index) => (<SourceElement key={index} content={item}/>))} - </div> - {configTabs.length > 0 ? - <p className="config-btn-title"> - <Tooltip placement="topLeft" title="鐐瑰嚮鎸夐挳锛屽彲瀹屾垚鎴栨煡鐪嬫爣绛鹃厤缃俊鎭��"> - <QuestionCircleOutlined className="mk-form-tip"/> - </Tooltip> - 鏍囩閰嶇疆 - </p> : null - } - {configTabs.map((item, index) => { - return ( - <div key={index}> - <Button - className="config-button" - icon={item.icon} - style={{marginBottom: '10px'}} - onClick={() => this.setSubConfig(item, 'tab')} - >{item.label}</Button> - </div> - ) - })} </Panel> </Collapse> </div> diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx index bfc57cb..f2fc6c8 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx @@ -99,7 +99,7 @@ let pass = checkSQL(values.sql, 'customscript') - if (!pass) return + if (!pass && !skip) return let _initCustomScript = '' // 鍒濆鍖栬剼鏈� let _prevCustomScript = '' // 榛樿sql鍓嶆墽琛岃剼鏈� diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx index 36f6164..99135ce 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx @@ -122,7 +122,7 @@ let pass = checkSQL(values.sql, 'customscript') - if (!pass) return + if (!pass && !skip) return this.setState({ loading: true diff --git a/src/templates/sharecomponent/actioncomponent/verifypay/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifypay/customscript/index.jsx index 1704f52..a022ffa 100644 --- a/src/templates/sharecomponent/actioncomponent/verifypay/customscript/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifypay/customscript/index.jsx @@ -71,7 +71,7 @@ let pass = checkSQL(values.sql, 'customscript') - if (!pass) return + if (!pass && !skip) return let _scripts = fromJS(scripts).toJS() diff --git a/src/templates/sharecomponent/columncomponent/dragcolumn/index.jsx b/src/templates/sharecomponent/columncomponent/dragcolumn/index.jsx index 267c6c4..bb981ed 100644 --- a/src/templates/sharecomponent/columncomponent/dragcolumn/index.jsx +++ b/src/templates/sharecomponent/columncomponent/dragcolumn/index.jsx @@ -62,7 +62,7 @@ newcard.field = '' newcard.Hide = 'false' newcard.contrastType = 'static' - newcard.IsSort = 'true' + newcard.IsSort = 'false' newcard.type = item.subType newcard.Width = item.subType === 'number' ? 80 : 120 if (item.subType === 'colspan') { diff --git a/src/templates/sharecomponent/columncomponent/formconfig.jsx b/src/templates/sharecomponent/columncomponent/formconfig.jsx index ff5fb94..aa2d8c6 100644 --- a/src/templates/sharecomponent/columncomponent/formconfig.jsx +++ b/src/templates/sharecomponent/columncomponent/formconfig.jsx @@ -114,7 +114,7 @@ type: 'radio', key: 'IsSort', label: '鎺掑簭', - initVal: card.IsSort || 'true', + initVal: card.IsSort || 'false', required: true, options: [{ value: 'true', diff --git a/src/templates/sharecomponent/fieldscomponent/index.jsx b/src/templates/sharecomponent/fieldscomponent/index.jsx index 550b5f6..9db6d1e 100644 --- a/src/templates/sharecomponent/fieldscomponent/index.jsx +++ b/src/templates/sharecomponent/fieldscomponent/index.jsx @@ -244,7 +244,7 @@ label: item.label, field: item.field, Hide: 'false', - IsSort: 'true', + IsSort: 'false', type: item.type === 'number' ? 'number' : 'text', Width: item.type === 'number' ? 80 : 120 } diff --git a/src/templates/treepageconfig/index.jsx b/src/templates/treepageconfig/index.jsx index f6df00d..84da278 100644 --- a/src/templates/treepageconfig/index.jsx +++ b/src/templates/treepageconfig/index.jsx @@ -72,7 +72,6 @@ _config.MenuID = menu.MenuID || '' // 閰嶇疆榛樿鍊硷紝鍏煎 - // _config.Template = 'TreePage' _config.easyCode = _config.easyCode || '' if (_config.type === 'user') { diff --git a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx index 7a33ed3..1cd3231 100644 --- a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx +++ b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx @@ -75,7 +75,7 @@ let pass = checkSQL(values.sql, 'customscript') - if (!pass) return + if (!pass && !skip) return let tail = ` aaa: diff --git a/src/templates/zshare/verifycard/customscript/index.jsx b/src/templates/zshare/verifycard/customscript/index.jsx index 9e119a1..27d1107 100644 --- a/src/templates/zshare/verifycard/customscript/index.jsx +++ b/src/templates/zshare/verifycard/customscript/index.jsx @@ -76,7 +76,7 @@ let pass = checkSQL(values.sql, 'customscript') - if (!pass) return + if (!pass && !skip) return let tail = ` aaa: diff --git a/src/utils/option.js b/src/utils/option.js index 54180b1..c0016f4 100644 --- a/src/utils/option.js +++ b/src/utils/option.js @@ -42,13 +42,6 @@ // 绯荤粺妯℃澘 export const sysTemps = [ - // { - // title: '鍩虹琛ㄦ牸', - // type: 'CommonTable', - // url: nortable, - // baseconfig: '', - // isSystem: true - // }, { title: '鍩虹琛ㄦ牸', type: 'BaseTable', @@ -56,14 +49,6 @@ baseconfig: '', isSystem: true }, - // { - // title: '涓诲瓙琛ㄨ〃鏍�', - // type: 'CommonTable', - // url: mainsubtable, - // baseconfig: '', - // isSystem: true, - // isSubtable: true - // }, { title: '鑷畾涔�', type: 'CustomPage', @@ -71,13 +56,6 @@ baseconfig: '', isSystem: true }, - // { - // title: '鏍戝舰椤甸潰', - // type: 'TreePage', - // url: treepage, - // baseconfig: '', - // isSystem: true - // }, { title: '澶栭儴椤甸潰', type: 'NewPage', diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js index e34c81f..231ece6 100644 --- a/src/utils/utils-custom.js +++ b/src/utils/utils-custom.js @@ -1733,6 +1733,7 @@ if (config.interfaces) { config.interfaces.forEach(item => { + if (item.status !== 'true') return if (item.setting && item.setting.interType === 'outer' && item.setting.sysInterface !== 'true') { inters = 'true' } @@ -2196,6 +2197,40 @@ duration: 5 }) return false + } else if (/,\./ig.test(sql)) { + let lines = [] + sql.split(/\n/).forEach((s, i) => { + if (/,\./ig.test(s)) { + lines.push(i + 1) + } + }) + + lines = lines.join('銆�') + lines = lines ? '(绗�' + lines + '琛�)' : '' + + notification.warning({ + top: 92, + message: label + `${lines}锛屼笉鍙嚭鐜拌嫳鏂囬�楀彿,.`, + duration: 5 + }) + return false + } else if (/\.,/ig.test(sql)) { + let lines = [] + sql.split(/\n/).forEach((s, i) => { + if (/\.,/ig.test(s)) { + lines.push(i + 1) + } + }) + + lines = lines.join('銆�') + lines = lines ? '(绗�' + lines + '琛�)' : '' + + notification.warning({ + top: 92, + message: label + `${lines}锛屼笉鍙嚭鐜拌嫳鏂囬�楀彿.,`, + duration: 5 + }) + return false } else if (/鈥榺鈥�/ig.test(sql)) { let lines = [] sql.split(/\n/).forEach((s, i) => { diff --git a/src/views/appcheck/index.jsx b/src/views/appcheck/index.jsx index bb78f91..5e669d2 100644 --- a/src/views/appcheck/index.jsx +++ b/src/views/appcheck/index.jsx @@ -27,7 +27,7 @@ bg_black_style_magenta: {name: '娲嬬孩鑹�', color: '#eb2f96'}, bg_black_style_grass_green: {name: '鑽夌豢鑹�', color: '#aeb303'}, bg_black_style_deep_red: {name: '娣辩孩鑹�', color: '#c32539'}, - bg_black_style_deep_blue: {name: '娣辩孩鑹�', color: '#1d3661'} + bg_black_style_deep_blue: {name: '娣辫摑鑹�', color: '#1d3661'} } class AppCheck extends Component { diff --git a/src/views/appmanage/index.jsx b/src/views/appmanage/index.jsx index c352ad1..8781fbf 100644 --- a/src/views/appmanage/index.jsx +++ b/src/views/appmanage/index.jsx @@ -37,7 +37,7 @@ bg_black_style_magenta: {name: '娲嬬孩鑹�', color: '#eb2f96'}, bg_black_style_grass_green: {name: '鑽夌豢鑹�', color: '#aeb303'}, bg_black_style_deep_red: {name: '娣辩孩鑹�', color: '#c32539'}, - bg_black_style_deep_blue: {name: '娣辩孩鑹�', color: '#1d3661'} + bg_black_style_deep_blue: {name: '娣辫摑鑹�', color: '#1d3661'} } class AppManage extends Component { diff --git a/src/views/design/sidemenu/index.jsx b/src/views/design/sidemenu/index.jsx index 49a8a0d..897bd86 100644 --- a/src/views/design/sidemenu/index.jsx +++ b/src/views/design/sidemenu/index.jsx @@ -1,7 +1,7 @@ import React, {Component} from 'react' import { is, fromJS } from 'immutable' import { Menu, Popover, Modal, notification } from 'antd' -import { EditOutlined, PlusOutlined, SettingOutlined, ApiOutlined, SoundOutlined } from '@ant-design/icons' +import { EditOutlined, PlusOutlined, SettingOutlined, ApiOutlined, SoundOutlined, DatabaseOutlined } from '@ant-design/icons' import moment from 'moment' import asyncComponent from '@/utils/asyncComponent' @@ -330,7 +330,7 @@ {item.children.map(cell => { return ( <Menu.Item key={cell.MenuID}> - <span className={'editable-menu-item ' + (cell.up_action ? 'unupdate' : '') + (window.backend && window.GLOB.systemType !== 'production' && cell.PageParam.backend !== 'level1' ? ' unbackend' : '')} onDoubleClick={() => this.editmenu(cell)}>{cell.PageParam.interfaces === 'true' ? <ApiOutlined title="鑿滃崟涓娇鐢ㄤ簡澶栭儴鎺ュ彛" /> : null}{cell.PageParam.msg === 'true' ? <SoundOutlined title="鑿滃崟涓彂閫佷簡娑堟伅" /> : null}{cell.MenuName}</span> + <span className={'editable-menu-item ' + (cell.up_action ? 'unupdate' : '') + (window.backend && window.GLOB.systemType !== 'production' && cell.PageParam.backend !== 'level1' ? ' unbackend' : '')} onDoubleClick={() => this.editmenu(cell)}>{cell.PageParam.interfaces === 'true' ? <ApiOutlined title="鑿滃崟涓娇鐢ㄤ簡澶栭儴鎺ュ彛" /> : null}{cell.PageParam.msg === 'true' ? <SoundOutlined title="鑿滃崟涓彂閫佷簡娑堟伅" /> : null}{cell.MenuName}{cell.PageParam.pds === 'true' ? <DatabaseOutlined style={{marginLeft: '5px', color: 'inherit'}} title="鑿滃崟涓娇鐢ㄤ簡鍏叡鏁版嵁婧�" /> : null}</span> </Menu.Item> ) })} diff --git a/src/views/design/sidemenu/thdmenuplus/index.jsx b/src/views/design/sidemenu/thdmenuplus/index.jsx index e657796..2e6a887 100644 --- a/src/views/design/sidemenu/thdmenuplus/index.jsx +++ b/src/views/design/sidemenu/thdmenuplus/index.jsx @@ -14,8 +14,6 @@ import asyncComponent from '@/utils/asyncComponent' import mainsubtable from '@/assets/img/mainsubtable.jpg' -import treepage from '@/assets/img/treepage.jpg' -import calendar from '@/assets/img/calendar.jpg' import customImg from '@/assets/img/custom.jpg' import './index.scss' @@ -52,8 +50,6 @@ const illust = { // 妯℃澘鍥剧墖锛岀敤浜庡凡浣跨敤妯℃澘 BaseTable: mainsubtable, - TreePage: treepage, - CalendarPage: calendar, CustomPage: customImg } diff --git a/src/views/interface/workspace/request/index.jsx b/src/views/interface/workspace/request/index.jsx index a73885e..edce864 100644 --- a/src/views/interface/workspace/request/index.jsx +++ b/src/views/interface/workspace/request/index.jsx @@ -155,7 +155,7 @@ }, (err) => { this.handleResponse(err) }) - } else if (/dostars/ig.test(url)) { + } else if (/dostars|exstars/ig.test(url)) { if (n) { n = JSON.parse(n) diff --git a/src/views/main/index.jsx b/src/views/main/index.jsx index 8723ebc..82241b8 100644 --- a/src/views/main/index.jsx +++ b/src/views/main/index.jsx @@ -1,4 +1,4 @@ -import React, {Component} from 'react' +import React, { Component } from 'react' import asyncComponent from '@/utils/asyncComponent' import Header from '@/components/header' @@ -11,6 +11,7 @@ const Tabview = asyncComponent(() => import('@/components/tabview')) const Breadview = asyncComponent(() => import('@/components/breadview')) +const SysMessage = asyncComponent(() => import('@/components/header/sysmessage/index')) class Main extends Component { state = { @@ -72,15 +73,18 @@ if (!this.state.userId) return null return ( - <div className="mk-main-view"> - <Header key="header"/> - {navBar === 'shutter' ? <Sidemenu key="sidemenu"/> : null} - {navBar === 'shutter' || navBar === 'menu_board_navigation' ? - <Tabview key="tabview"/> : - <Breadview key="breadview"/>} + <> + <div className="mk-main-view"> + <Header key="header"/> + {navBar === 'shutter' ? <Sidemenu key="sidemenu"/> : null} + {navBar === 'shutter' || navBar === 'menu_board_navigation' ? + <Tabview key="tabview"/> : + <Breadview key="breadview"/>} + <ImgScale /> + </div> {window.GLOB.systemType === 'production' ? <QueryLog /> : null} - <ImgScale /> - </div> + {window.GLOB.SysNotice ? <SysMessage /> : null} + </> ) } } diff --git a/src/views/menudesign/homeform/index.jsx b/src/views/menudesign/homeform/index.jsx index 354951b..433e83a 100644 --- a/src/views/menudesign/homeform/index.jsx +++ b/src/views/menudesign/homeform/index.jsx @@ -58,14 +58,14 @@ EasyCode: trd.EasyCode, value: trd.MenuID, label: trd.MenuName, - type: 'CommonTable', + type: 'CustomPage', disabled: false } if (trd.PageParam) { try { trd.PageParam = JSON.parse(trd.PageParam) - trdItem.type = trd.PageParam.Template || 'CommonTable' + trdItem.type = trd.PageParam.Template || 'CustomPage' } catch (e) { } diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx index 83ff054..41ba0b2 100644 --- a/src/views/menudesign/index.jsx +++ b/src/views/menudesign/index.jsx @@ -907,6 +907,13 @@ let msg = getOutMessage(config) let urlFields = config.urlFields ? config.urlFields.join(',') : '' let langSql = getLangTrans(config) + let pds = 'false' + if (config.interfaces) { + config.interfaces.forEach(item => { + if (item.status !== 'true') return + pds = 'true' + }) + } let param = { func: 'sPC_TrdMenu_AddUpt', @@ -918,7 +925,7 @@ EasyCode: config.easyCode || '', Template: 'CustomPage', MenuName: config.MenuName || '', - PageParam: JSON.stringify({Template: 'CustomPage', OpenType: config.OpenType || 'newtab', hidden: config.hidden || 'false', menuColor: config.menuColor || '', interfaces, msg, backend: 'level1', urlFields}), + PageParam: JSON.stringify({Template: 'CustomPage', OpenType: config.OpenType || 'newtab', hidden: config.hidden || 'false', menuColor: config.menuColor || '', interfaces, msg, pds, backend: 'level1', urlFields}), open_edition: config.open_edition, long_data: long_data, debug_md5: key, diff --git a/src/views/menudesign/menuform/index.jsx b/src/views/menudesign/menuform/index.jsx index ab5ec39..d8b2366 100644 --- a/src/views/menudesign/menuform/index.jsx +++ b/src/views/menudesign/menuform/index.jsx @@ -125,14 +125,14 @@ EasyCode: trd.EasyCode, value: trd.MenuID, label: trd.MenuName, - type: 'CommonTable', + type: 'CustomPage', disabled: false } if (trd.PageParam) { try { trd.PageParam = JSON.parse(trd.PageParam) - trdItem.type = trd.PageParam.Template || 'CommonTable' + trdItem.type = trd.PageParam.Template || 'CustomPage' } catch (e) { } diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx index fac19ba..4a44a02 100644 --- a/src/views/mobdesign/index.jsx +++ b/src/views/mobdesign/index.jsx @@ -1629,6 +1629,14 @@ roleParam.msg = msg roleParam.backend = 'level1' let langSql = getLangTrans(config) + + roleParam.pds = 'false' + if (config.interfaces) { + config.interfaces.forEach(item => { + if (item.status !== 'true') return + roleParam.pds = 'true' + }) + } let param = { func: 'sPC_TrdMenu_AddUpt', @@ -2249,8 +2257,8 @@ <PictureController/> <Quotecomponent config={config} updateConfig={this.updateConfig}/> <StyleCombControlButton menu={config} /> - <Button className="mk-border-green set-home" disabled={MenuId === appHomeId} onClick={this.setHomeView}><HomeOutlined /> 璁句负棣栭〉</Button> - <Button className="mk-border-purple" disabled={MenuId === appLoginId} onClick={this.setLoginView}><LoginOutlined /> 璁句负鐧诲綍椤�</Button> + <Button className="mk-border-green set-home" disabled={MenuId === appHomeId} data-title="褰撳墠鑿滃崟涓哄簲鐢ㄩ椤�" onClick={this.setHomeView}><HomeOutlined /> 璁句负棣栭〉</Button> + <Button className="mk-border-purple" disabled={MenuId === appLoginId} data-title="褰撳墠鑿滃崟涓哄簲鐢ㄧ櫥褰曢〉" onClick={this.setLoginView}><LoginOutlined /> 璁句负鐧诲綍椤�</Button> <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> <Transfer MenuID={MenuId} /> {config ? <Versions MenuId={MenuId} Template="webPage" checklog={this.checklog} updateConfig={this.updateLogConfig}/> : null} diff --git a/src/views/mobdesign/index.scss b/src/views/mobdesign/index.scss index 6d6d812..ff5bcce 100644 --- a/src/views/mobdesign/index.scss +++ b/src/views/mobdesign/index.scss @@ -292,6 +292,35 @@ height: 20px; } } + + [data-title]:disabled { + position: relative; + &::after { + position: absolute; + z-index: 20; + top: -35px; + left: 50%; + pointer-events: none; + opacity: 0; + transform: translateX(-50%) translateY(-5px); + transition: opacity .3s, transform .3s; + padding: 8px; + background-color: #21242a; + border-radius: 4px; + box-shadow: 0 5px 15px rgba(#000, .2); + color: #fff; + font-size: 13px; + line-height: 16px; + white-space: nowrap; + content: attr(data-title); + } + &:hover { + &::after { + opacity: 1; + transform: translateX(-50%) translateY(0); + } + } + } } .mk-mob-view.userbind { diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx index a0cbab2..d3a7101 100644 --- a/src/views/pcdesign/index.jsx +++ b/src/views/pcdesign/index.jsx @@ -1311,6 +1311,14 @@ roleParam.backend = 'level1' let langSql = getLangTrans(config) + roleParam.pds = 'false' + if (config.interfaces) { + config.interfaces.forEach(item => { + if (item.status !== 'true') return + roleParam.pds = 'true' + }) + } + let param = { func: 'sPC_TrdMenu_AddUpt', FstID: 'mk_app', @@ -1872,8 +1880,8 @@ <PictureController/> <Quotecomponent config={config} updateConfig={this.updateConfig}/> <StyleCombControlButton menu={config} /> - <Button className="mk-border-green" disabled={MenuId === appHomeId} onClick={this.setHomeView}><HomeOutlined /> 璁句负棣栭〉</Button> - <Button className="mk-border-purple" disabled={MenuId === appLoginId} onClick={this.setLoginView}><LoginOutlined/> 璁句负鐧诲綍椤�</Button> + <Button className="mk-border-green" disabled={MenuId === appHomeId} data-title="褰撳墠鑿滃崟涓哄簲鐢ㄩ椤�" onClick={this.setHomeView}><HomeOutlined /> 璁句负棣栭〉</Button> + <Button className="mk-border-purple" disabled={MenuId === appLoginId} data-title="褰撳墠鑿滃崟涓哄簲鐢ㄧ櫥褰曢〉" onClick={this.setLoginView}><LoginOutlined/> 璁句负鐧诲綍椤�</Button> <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> <Transfer MenuID={MenuId} /> {config ? <Versions MenuId={MenuId} Template="webPage" checklog={this.checklog} updateConfig={this.updateLogConfig}/> : null} diff --git a/src/views/pcdesign/index.scss b/src/views/pcdesign/index.scss index 0d2b917..b9138e1 100644 --- a/src/views/pcdesign/index.scss +++ b/src/views/pcdesign/index.scss @@ -266,6 +266,35 @@ border: 1px solid rgba(0, 0, 0, 0.07); background: rgba(0, 0, 0, 0); } + + [data-title]:disabled { + position: relative; + &::after { + position: absolute; + z-index: 20; + top: -35px; + left: 50%; + pointer-events: none; + opacity: 0; + transform: translateX(-50%) translateY(-5px); + transition: opacity .3s, transform .3s; + padding: 8px; + background-color: #21242a; + border-radius: 4px; + box-shadow: 0 5px 15px rgba(#000, .2); + color: #fff; + font-size: 13px; + line-height: 16px; + white-space: nowrap; + content: attr(data-title); + } + &:hover { + &::after { + opacity: 1; + transform: translateX(-50%) translateY(0); + } + } + } } .mk-pc-view + .modal-form-board { padding-top: 0px; diff --git a/src/views/rolemanage/index.jsx b/src/views/rolemanage/index.jsx index bb9d731..2bd8b09 100644 --- a/src/views/rolemanage/index.jsx +++ b/src/views/rolemanage/index.jsx @@ -3,7 +3,7 @@ import { Spin, notification, Button, Table, Modal, Tree, Input, Empty } from 'antd' import moment from 'moment' import md5 from 'md5' -import { ApiOutlined, SoundOutlined } from '@ant-design/icons' +import { ApiOutlined, SoundOutlined, DatabaseOutlined } from '@ant-design/icons' import Api from '@/api' import Utils from '@/utils/utils.js' @@ -29,8 +29,8 @@ let className = window.backend && record.backend !== 'level1' ? 'unbackend' : '' if (record.extra || this.state.appKeys.includes(record.MenuID)) { return <span className={className} style={{color: '#1890ff'}}>{text}</span> - } else if (record.interfaces === 'true' || record.msg === 'true') { - return <span className={className}>{record.interfaces === 'true' ? <ApiOutlined style={{color: 'orange', marginRight: '5px'}} title="鑿滃崟涓娇鐢ㄤ簡澶栭儴鎺ュ彛" /> : null}{record.msg === 'true' ? <SoundOutlined style={{color: 'orange', marginRight: '5px'}} title="鑿滃崟涓彂閫佷簡娑堟伅" /> : null}{text}</span> + } else if (record.interfaces === 'true' || record.msg === 'true' || record.pds === 'true') { + return <span className={className}>{record.interfaces === 'true' ? <ApiOutlined style={{color: 'orange', marginRight: '5px'}} title="鑿滃崟涓娇鐢ㄤ簡澶栭儴鎺ュ彛" /> : null}{record.msg === 'true' ? <SoundOutlined style={{color: 'orange', marginRight: '5px'}} title="鑿滃崟涓彂閫佷簡娑堟伅" /> : null}{text}{record.pds === 'true' ? <DatabaseOutlined style={{marginLeft: '5px'}} title="鑿滃崟涓娇鐢ㄤ簡鍏叡鏁版嵁婧�" /> : null}</span> } return <span className={className}>{text}</span> } @@ -159,6 +159,7 @@ item.nodes = pageParam item.interfaces = pageParam.interfaces || 'false' item.msg = pageParam.msg || 'false' + item.pds = pageParam.pds || 'false' item.backend = pageParam.backend || '' if (pageParam.type) { diff --git a/src/views/sso/index.jsx b/src/views/sso/index.jsx index 007b51d..4db7c48 100644 --- a/src/views/sso/index.jsx +++ b/src/views/sso/index.jsx @@ -14,7 +14,7 @@ let _param = JSON.parse(window.decodeURIComponent(window.atob(this.props.match.params.param))) if (typeof(_param) === 'object') { - this.authLogin(_param.appid, _param.openid, _param.memberId, _param.key) + this.authLogin(_param.appid, _param.openid, _param.memberId, _param.key, _param.menuId || '') } else { this.props.history.replace('/login') } @@ -23,7 +23,7 @@ } } - authLogin = (appid, openid, memberid, scanId) => { + authLogin = (appid, openid, memberid, scanId, menuId) => { Api.getTouristMsg('mk', appid, openid, memberid, scanId).then(res => { if (res.status) { sessionStorage.setItem('UserID', res.UserID) @@ -38,7 +38,7 @@ sessionStorage.setItem('organization', res.organization || '') sessionStorage.setItem('mk_user_type', res.mk_user_type || '') - this.getMessage() + this.getMessage(menuId) } else { notification.warning({ top: 92, @@ -50,7 +50,7 @@ }) } - getMessage = () => { + getMessage = (menuId) => { let _param = { func: 's_Get_style', TypeCharOne: 'PC', @@ -144,6 +144,10 @@ document.getElementsByTagName('head')[0].appendChild(link) } + if (menuId) { + sessionStorage.setItem('ThirdMenu', menuId) + } + this.props.history.replace('/main') } else { notification.warning({ diff --git a/src/views/tabledesign/menuform/index.jsx b/src/views/tabledesign/menuform/index.jsx index 4efb09d..e5959cc 100644 --- a/src/views/tabledesign/menuform/index.jsx +++ b/src/views/tabledesign/menuform/index.jsx @@ -120,14 +120,14 @@ EasyCode: trd.EasyCode, value: trd.MenuID, label: trd.MenuName, - type: 'CommonTable', + type: 'CustomPage', disabled: false } if (trd.PageParam) { try { trd.PageParam = JSON.parse(trd.PageParam) - trdItem.type = trd.PageParam.Template || 'CommonTable' + trdItem.type = trd.PageParam.Template || 'CustomPage' } catch (e) { } -- Gitblit v1.8.0