Merge branch 'master' into positec
| | |
| | | * @description 游客登录 |
| | | */ |
| | | getTouristMsg (binding_type, appid, openid, memberid, scanId) { |
| | | let _SessionUid = localStorage.getItem('SessionUid') |
| | | |
| | | if (!_SessionUid) { // 手动清除SessionUid时,实时生成 |
| | | _SessionUid = Utils.getuuid() |
| | | localStorage.setItem('SessionUid', _SessionUid) |
| | | } |
| | | let _SessionUid = localStorage.getItem('SessionUid') || '' |
| | | |
| | | let param = { |
| | | func: 's_visitor_login', |
| | |
| | | // 鼠标悬浮增加下划线 |
| | | .mk-hover-underline:hover { |
| | | text-decoration: underline!important; |
| | | } |
| | | // 隐藏空值时的图标 |
| | | body .mk-empty-hide .ant-empty, body .mk-empty-hide + .ant-empty { |
| | | min-height: 50px; |
| | | padding-top: 0px; |
| | | margin: 0px; |
| | | .ant-empty-image, .ant-empty-description { |
| | | display: none; |
| | | } |
| | | } |
| | |
| | | import Utils from '@/utils/utils.js' |
| | | import avatar from '@/assets/img/avatar.jpg' |
| | | import wxicon from '@/assets/img/wx-icon.png' |
| | | import mkpublic from '@/assets/img/mkpublic.jpg' |
| | | import './index.scss' |
| | | |
| | | const { confirm } = Modal |
| | |
| | | fullName: '', |
| | | logourl: window.GLOB.mainlogo, |
| | | wxVisible: false, |
| | | wxStep: 1, |
| | | loginVisible: false, |
| | | loginLoading: false, |
| | | avatar: Utils.getrealurl(sessionStorage.getItem('avatar')), |
| | |
| | | <Menu.Item key="verup" onClick={this.verup}> |
| | | {dict['page_upd'] || '页面更新'} |
| | | </Menu.Item> |
| | | {window.GLOB.WXNotice ? <Menu.Item key="wxnotice" onClick={() => this.setState({wxVisible: true})}> |
| | | {window.GLOB.WXNotice ? <Menu.Item key="wxnotice" onClick={() => this.setState({wxVisible: true, wxStep: 1})}> |
| | | 微信消息 |
| | | </Menu.Item> : null} |
| | | {window.GLOB.appVersion ? <Menu.Item key="version" onClick={this.about}> |
| | |
| | | footer={null} |
| | | destroyOnClose |
| | | > |
| | | <div className="wx-sms-wrap"> |
| | | {this.state.wxStep !== 2 ? <div className="wx-sms-wrap"> |
| | | <img className="mk-img" src={mkpublic} alt=""/> |
| | | <div className="mk-tip"> |
| | | <span>微信扫码</span> |
| | | <span>关注公众号</span> |
| | | <span>关注公众号且授权后方可接收消息。</span> |
| | | <span onClick={() => this.setState({wxStep: 2})}>下一步</span> |
| | | </div> |
| | | </div> : <div className="wx-sms-wrap"> |
| | | <QrCode card={{qrWidth: 200, color: '#000000'}} value={window.GLOB.baseurl + 'mob/wxnotice.html?userid=' + sessionStorage.getItem('UserID') + '&loginuid=' + sessionStorage.getItem('LoginUID')}/> |
| | | <div className="tip"> |
| | | <img src={wxicon} alt=""/> |
| | | <span>微信扫码</span> |
| | | <span>关注公众号</span> |
| | | <span>获取用户授权</span> |
| | | </div> |
| | | </div> |
| | | </div>} |
| | | </Modal> |
| | | </header> |
| | | ) |
| | |
| | | } |
| | | .wx-sms-wrap { |
| | | text-align: center; |
| | | position: relative; |
| | | |
| | | .tip { |
| | | margin: 215px 15px 15px; |
| | |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | |
| | | .mk-img { |
| | | width: 258px; |
| | | height: 258px; |
| | | position: relative; |
| | | top: -15px; |
| | | } |
| | | .mk-tip { |
| | | margin: 0px 15px 15px; |
| | | position: relative; |
| | | top: -20px; |
| | | span { |
| | | font-size: 16px; |
| | | letter-spacing: 2px; |
| | | font-weight: 500; |
| | | color: #333; |
| | | } |
| | | span:nth-child(2) { |
| | | color: #45B449; |
| | | font-weight: bold; |
| | | } |
| | | span:nth-child(3) { |
| | | display: block; |
| | | font-size: 13px; |
| | | } |
| | | span:nth-child(4) { |
| | | display: block; |
| | | position: absolute; |
| | | right: -10px; |
| | | bottom: -25px; |
| | | padding: 0 5px; |
| | | font-size: 14px; |
| | | font-weight: 600; |
| | | cursor: pointer; |
| | | color: rgba(0, 0, 0, 0.65); |
| | | transition: color 0.2s; |
| | | } |
| | | span:nth-child(4):hover { |
| | | color: rgba(0, 0, 0, 0.85); |
| | | } |
| | | } |
| | | .qrcode-box + .tip { |
| | | margin-top: 15px; |
| | | } |
| | |
| | | import React, { Component } from 'react' |
| | | import { notification } from 'antd' |
| | | import { MessageFilled } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | |
| | | import Api from '@/api' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import url from './msg.png' |
| | | |
| | | class SysIcon extends Component { |
| | | state = { |
| | | notices: [] |
| | | notices: null |
| | | } |
| | | |
| | | componentDidMount () { |
| | |
| | | |
| | | getMsgList = () => { |
| | | let param = { |
| | | func: 's_get_kei' |
| | | func: 's_get_unread_oa_mail_v1' |
| | | } |
| | | |
| | | Api.getSystemConfig(param).then(result => { |
| | | Api.genericInterface(param).then(result => { |
| | | if (result.status) { |
| | | let notices = result.data || [] |
| | | notices.forEach(item => { |
| | | let time = new Date(item.submitdate).getTime() |
| | | let _val = item.submitdate |
| | | if (!isNaN(time)) { |
| | | time = parseInt(time / 60000) // 时间值 |
| | | let now = parseInt(new Date().getTime() / 60000) // 当前时间值 |
| | | let start = new Date(new Date().toDateString()).getTime() / 60000 // 今天零点时间值 |
| | | let split = now - time |
| | | |
| | | if (split < 0) { // 时间值在当前时间之后 |
| | | _val = moment(_val).format('MM月DD日 HH:mm') |
| | | } else if (split < 3) { |
| | | _val = '刚刚' |
| | | } else if (split < 5) { |
| | | _val = '3分钟前' |
| | | } else if (split < 10) { |
| | | _val = '5分钟前' |
| | | } else if (split < 20) { |
| | | _val = '10分钟前' |
| | | } else if (split < 30) { |
| | | _val = '20分钟前' |
| | | } else if (split < 60) { |
| | | _val = '30分钟前' |
| | | } else if (split < 420 || time > start) { // 7小时内或时间值在今天零点后 |
| | | _val = parseInt(split / 60) + '小时前' |
| | | } else { // 时间值在今天零点之前 |
| | | let _day = parseInt((start - time) / (24 * 60)) + 1 |
| | | if (_day === 1) { |
| | | _val = '昨天' |
| | | } else if (_day <= 30) { |
| | | _val = _day + '天前' |
| | | } else { |
| | | _val = moment(_val).format('MM月DD日 HH:mm') |
| | | } |
| | | } |
| | | } |
| | | item.time = _val |
| | | }) |
| | | |
| | | this.setState({ notices }) |
| | | MKEmitter.emit('sysMessageChange', notices) |
| | | |
| | | MKEmitter.emit('sysMessageChange', notices.slice(0, 5)) |
| | | |
| | | if (notices.length > 0) { |
| | | setTimeout(() => { |
| | | MKEmitter.emit('sysMessageOpen') |
| | | }, 50) |
| | | } |
| | | |
| | | setTimeout(() => { |
| | | this.getMsgList() |
| | |
| | | } |
| | | |
| | | open = () => { |
| | | MKEmitter.emit('sysMessageOpen') |
| | | const { notices } = this.state |
| | | |
| | | if (notices.length === 0) { |
| | | this.toMenu() |
| | | } else { |
| | | MKEmitter.emit('sysMessageOpen') |
| | | } |
| | | } |
| | | |
| | | toMenu = () => { |
| | | let menu = { |
| | | MenuID: '1731250110643ivgpv9gdgiif5lggh4e', |
| | | MenuName: '内部邮箱', |
| | | type: 'CustomPage', |
| | | param: {$BID: ''} |
| | | } |
| | | |
| | | if (window.GLOB.mkThdMenus.has(menu.MenuID)) { |
| | | menu.MenuName = window.GLOB.mkThdMenus.get(menu.MenuID).MenuName |
| | | } |
| | | |
| | | MKEmitter.emit('modifyTabs', menu) |
| | | } |
| | | |
| | | render() { |
| | | const { notices } = this.state |
| | | |
| | | if (!notices) return null |
| | | |
| | | return ( |
| | | <MessageFilled className="mk-msg-icon" data-title={notices.length ? notices.length : ''} onClick={this.open} /> |
| | | <span className="mk-msg-icon" onClick={this.open}> |
| | | <img src={url} alt=""/> |
| | | <span>{notices.length ? notices.length : ''}</span> |
| | | </span> |
| | | ) |
| | | } |
| | | } |
| | |
| | | import React, { Component } from 'react' |
| | | import { CloseOutlined } from '@ant-design/icons' |
| | | import { CloseOutlined, SoundOutlined } from '@ant-design/icons' |
| | | |
| | | import MKEmitter from '@/utils/events.js' |
| | | |
| | |
| | | |
| | | sysMessageChange = (notices) => { |
| | | this.setState({ notices }) |
| | | |
| | | if (notices.length === 0) { |
| | | this.setState({ visible: false }) |
| | | } |
| | | } |
| | | |
| | | sysMessageOpen = () => { |
| | |
| | | this.setState({ visible: false }) |
| | | } |
| | | |
| | | toMenu = () => { |
| | | let menu = { |
| | | MenuID: '1731250110643ivgpv9gdgiif5lggh4e', |
| | | MenuName: '内部邮箱', |
| | | type: 'CustomPage', |
| | | param: {$BID: ''} |
| | | } |
| | | |
| | | if (window.GLOB.mkThdMenus.has(menu.MenuID)) { |
| | | menu.MenuName = window.GLOB.mkThdMenus.get(menu.MenuID).MenuName |
| | | } |
| | | |
| | | MKEmitter.emit('modifyTabs', menu) |
| | | |
| | | this.setState({ visible: false }) |
| | | } |
| | | |
| | | render() { |
| | | const { visible, notices } = this.state |
| | | |
| | | return ( |
| | | <div className={'mk-msg-wrap' + (visible ? ' visible' : '')}> |
| | | <div className="title"> |
| | | 系统消息 |
| | | <SoundOutlined /> |
| | | <CloseOutlined onClick={this.close}/> |
| | | </div> |
| | | <div className="msg-list">{notices.map((item, index) => { |
| | | return <div className="msg-item" key={index}> |
| | | {item.remark} |
| | | return <div className={'msg-item ' + (item.urgent_type === 'Y' ? 'red' : '')} key={index} onClick={this.toMenu}> |
| | | <span>{item.createstaff}</span><span className="time">{item.time}</span> |
| | | <span>{item.title}</span> |
| | | </div> |
| | | })}</div> |
| | | <span className="jump" onClick={this.toMenu}>详情 ></span> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | .mk-msg-icon { |
| | | display: inline-block; |
| | | position: relative; |
| | | font-size: 16px; |
| | | margin-top: 17px; |
| | | margin-top: 12px; |
| | | 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; |
| | | img { |
| | | width: 22px; |
| | | height: 22px; |
| | | } |
| | | &::after { |
| | | span { |
| | | position: absolute; |
| | | top: -10px; |
| | | left: 15px; |
| | | top: -6px; |
| | | left: 19px; |
| | | color: #f5222d; |
| | | font-size: 12px; |
| | | line-height: 16px; |
| | | white-space: nowrap; |
| | | font-weight: 600; |
| | | content: attr(data-title); |
| | | } |
| | | } |
| | | // .mk-msg-icon[data-title] { |
| | | // position: relative; |
| | | |
| | | // &::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; |
| | | width: 300px; |
| | | top: 50px; |
| | | right: 120px; |
| | | z-index: -1; |
| | | opacity: 0; |
| | | padding: 10px; |
| | | padding: 7px 10px 24px; |
| | | font-size: 13px; |
| | | background-color: #fff; |
| | | background-color: var(--mk-sys-color1); |
| | | background-clip: padding-box; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | border: 0; |
| | |
| | | transition: all 0.2s; |
| | | |
| | | .title { |
| | | text-align: center; |
| | | position: relative; |
| | | text-align: left; |
| | | font-size: 14px; |
| | | |
| | | .anticon-close { |
| | | position: absolute; |
| | | right: 10px; |
| | | color: rgba(0, 0, 0, 0.45); |
| | | right: 5px; |
| | | top: 1px; |
| | | 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); |
| | | position: relative; |
| | | height: 55px; |
| | | background: #ffffff; |
| | | margin: 10px 0px; |
| | | padding: 5px; |
| | | border-radius: 2px; |
| | | padding: 8px; |
| | | border-radius: 4px; |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | span { |
| | | display: block; |
| | | overflow: hidden; |
| | | word-break: break-word; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | } |
| | | .msg-item:first-child { |
| | | margin-top: 7px; |
| | | } |
| | | .msg-item.red { |
| | | color: #C32539; |
| | | } |
| | | .time { |
| | | position: absolute; |
| | | top: 5px; |
| | | right: 8px; |
| | | font-size: 13px; |
| | | } |
| | | } |
| | | |
| | | .jump { |
| | | position: absolute; |
| | | right: 15px; |
| | | bottom: 7px; |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | color: #1890ff; |
| | | transition: color 0.2s; |
| | | } |
| | | .jump:hover { |
| | | color: #ffffff; |
| | | } |
| | | } |
| | | .mk-msg-wrap.visible { |
| | |
| | | |
| | | changeMenu = (record) => { |
| | | let MenuId = record.menu |
| | | if (MenuId === 'IM') { |
| | | if (!sessionStorage.getItem('instantMessage')) return |
| | | |
| | | let param = { |
| | | MenuID: sessionStorage.getItem('instantMessage'), |
| | | copyMenuId: '', |
| | | type: 'view' |
| | | } |
| | | |
| | | param = window.btoa(window.encodeURIComponent(JSON.stringify(param))) |
| | | |
| | | MKEmitter.emit('changeEditMenu', {routerUrl: '/imdesign/' + param}) |
| | | } else { |
| | | MKEmitter.emit('changeEditMenu', { ...record, MenuID: MenuId}) |
| | | } |
| | | MKEmitter.emit('changeEditMenu', { ...record, MenuID: MenuId}) |
| | | } |
| | | |
| | | isEditing = record => record.uuid === this.state.editingKey |
| | |
| | | import '@/assets/css/viewstyle.scss' |
| | | |
| | | if (!localStorage.getItem('SessionUid')) { |
| | | localStorage.setItem('SessionUid', (() => { |
| | | let sid = (() => { |
| | | let uuid = [] |
| | | let _options = '0123456789abcdefghigklmnopqrstuv' |
| | | for (let i = 0; i < 32; i++) { |
| | | uuid.push(_options.substr(Math.floor(Math.random() * 0x20), 1)) |
| | | } |
| | | return uuid.join('') |
| | | })()) |
| | | })() |
| | | |
| | | if (/_mk_sid=[0-9a-z]{32}/.test(document.cookie)) { |
| | | sid = document.cookie.match(/_mk_sid=[0-9a-z]{32}/)[0].split('=')[1] |
| | | } else { |
| | | document.cookie = '_mk_sid=' + sid |
| | | } |
| | | |
| | | localStorage.setItem('SessionUid', sid) |
| | | |
| | | } |
| | | |
| | | fetch('../options.json') |
| | |
| | | } else { |
| | | appMenus = [] |
| | | } |
| | | // if (appType === 'mob') { |
| | | // appMenus.push({value: 'sign', text: '签名(系统页)'}) |
| | | // } |
| | | appMenus.push({value: 'goback', text: '返回(上一页)'}) |
| | | } |
| | | |
| | |
| | | const { card, appType } = this.state |
| | | |
| | | if (card.setting.click === 'menu' && card.setting.menu) { |
| | | if (['IM'].includes(card.setting.menu)) { |
| | | if (!sessionStorage.getItem('instantMessage')) return |
| | | |
| | | let param = { |
| | | MenuID: sessionStorage.getItem('instantMessage'), |
| | | copyMenuId: '', |
| | | type: 'view' |
| | | } |
| | | |
| | | param = window.btoa(window.encodeURIComponent(JSON.stringify(param))) |
| | | |
| | | MKEmitter.emit('changeEditMenu', {routerUrl: '/imdesign/' + param}) |
| | | } else { |
| | | MKEmitter.emit('changeEditMenu', {MenuID: card.setting.menu}) |
| | | } |
| | | MKEmitter.emit('changeEditMenu', {MenuID: card.setting.menu}) |
| | | } else if (card.setting.click === 'menus' && card.menus && card.menus.length > 0 && cards.subtype === 'datacard' && appType) { |
| | | this.setState({visible: true}) |
| | | } |
| | | } |
| | | |
| | | changeMenu = (MenuId) => { |
| | | if (MenuId === 'IM') { |
| | | if (!sessionStorage.getItem('instantMessage')) return |
| | | |
| | | let param = { |
| | | MenuID: sessionStorage.getItem('instantMessage'), |
| | | copyMenuId: '', |
| | | type: 'view' |
| | | } |
| | | |
| | | param = window.btoa(window.encodeURIComponent(JSON.stringify(param))) |
| | | |
| | | MKEmitter.emit('changeEditMenu', {routerUrl: '/imdesign/' + param}) |
| | | } else { |
| | | MKEmitter.emit('changeEditMenu', {MenuID: MenuId}) |
| | | } |
| | | MKEmitter.emit('changeEditMenu', {MenuID: MenuId}) |
| | | } |
| | | |
| | | render() { |
| | |
| | | } else { |
| | | menulist = [] |
| | | } |
| | | if (appType === 'mob' && (subtype === 'datacard' || subtype === 'propcard') && cardType !== 'extendCard') { // 数据卡可打开即时通信 |
| | | menulist.push({ |
| | | value: 'IM', label: '即时通信(系统页)' |
| | | }) |
| | | } |
| | | // if (appType === 'mob' && (subtype === 'datacard' || subtype === 'propcard') && cardType !== 'extendCard') { // 数据卡可打开即时通信 |
| | | // menulist.push({ |
| | | // value: 'IM', label: '即时通信(系统页)' |
| | | // }) |
| | | // } |
| | | } else { |
| | | menulist = sessionStorage.getItem('fstMenuList') |
| | | if (menulist) { |
| | |
| | | {value: 'show', label: '否'}, |
| | | {value: 'hidden', label: '是'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'empSign', values: ['show']}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'empSign', |
| | | label: '空值图标', |
| | | initval: wrap.empSign || 'show', |
| | | tooltip: '当查询数据为空时,是否显示空值提示图标。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'show', label: '显示'}, |
| | | {value: 'hidden', label: '隐藏'}, |
| | | ], |
| | | forbid: subtype === 'propcard' |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | {value: 'show', label: '否'}, |
| | | {value: 'hidden', label: '是'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'empSign', values: ['show']}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'empSign', |
| | | label: '空值图标', |
| | | initval: wrap.empSign || 'show', |
| | | tooltip: '当查询数据为空时,是否显示空值提示图标。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'show', label: '显示'}, |
| | | {value: 'hidden', label: '隐藏'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | const { card } = this.state |
| | | |
| | | if (res.tbStyle) { |
| | | if (res.tbStyle.includes('no-border') && (res.tbStyle.includes('bold-border') || res.tbStyle.includes('deep-border'))) { |
| | | res.tbStyle = res.tbStyle.filter(item => item !== 'no-border') |
| | | } |
| | | res.tbStyle = res.tbStyle.join(' ') |
| | | } |
| | | |
| | |
| | | field: 'tbStyle', |
| | | label: '表格样式', |
| | | initval: wrap.tbStyle ? wrap.tbStyle.split(' ') : [], |
| | | tooltip: '富文本中表格的样式,注:选择“边框加粗”或“边框颜色加深”时“无边框”无效。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'th-light', label: '表头透明'}, |
| | | {value: 'no-border', label: '无边框'}, |
| | | {value: 'tb-flex', label: '列等宽'}, |
| | | ] |
| | | {value: 'no-border', label: '无边框'}, |
| | | {value: 'bold-border', label: '边框加粗'}, |
| | | {value: 'deep-border', label: '边框颜色加深'}, |
| | | ], |
| | | span: 24 |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | |
| | | const CodeMirror = asyncComponent(() => import('@/templates/zshare/codemirror')) |
| | | const MKTable = asyncComponent(() => import('@/components/normalform/modalform/mkTable')) |
| | | const acTyOptions = { |
| | | pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'hoverTitle', 'hidden', 'preButton'], |
| | | prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hoverTitle', 'hidden', 'preButton'], |
| | | exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'hoverTitle', 'hidden', 'preButton'], |
| | | pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'hoverTitle', 'hidden', 'preButton', 'extBtn', 'reload'], |
| | | prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hoverTitle', 'hidden', 'preButton', 'reload'], |
| | | exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'hoverTitle', 'hidden', 'preButton', 'reload'], |
| | | excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'width', 'hidden', 'refreshTab'], |
| | | excelOut: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'pagination', 'search', 'width', 'hidden', 'refreshTab'], |
| | | popview: ['label', 'Ot', 'OpenType', 'show', 'hover', 'icon', 'class', 'color', 'popClose', 'width', 'display', 'ratio', 'syncComponent', 'clickouter', 'maskStyle', 'closeButton', 'hidden'], |
| | | tab: ['label', 'Ot', 'OpenType', 'show', 'hover', 'icon', 'class', 'color', 'linkmenu', 'width', 'hidden', 'openTab'], |
| | | innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'width', 'hidden'], |
| | | funcbutton: ['label', 'OpenType', 'funcType', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'width', 'hidden'], |
| | | form: ['label', 'OpenType', 'formType', 'intertype', 'Ot', 'execSuccess', 'execError', 'syncComponent', 'width', 'openmenu', 'refreshTab', 'title', 'hidden'] |
| | | form: ['label', 'OpenType', 'formType', 'intertype', 'Ot', 'execSuccess', 'execError', 'syncComponent', 'width', 'openmenu', 'refreshTab', 'title', 'hidden', 'reload'] |
| | | } |
| | | |
| | | class ActionForm extends Component { |
| | |
| | | } else { |
| | | reOptions.sqlType = this.state.insertUpdateOptions |
| | | } |
| | | // if (this.record.execSuccess === 'goback') { |
| | | shows.push('reload') |
| | | // } |
| | | if (openType === 'pop') { |
| | | shows.push('extBtn') |
| | | if (this.record.extBtn === 'true') { |
| | | shows.push('extLabel', 'extStyle', 'confLabel', 'confStyle', 'extValue') |
| | | } |
| | | } |
| | | } else if (openType === 'form') { |
| | | let intertype = this.record.intertype |
| | | |
| | |
| | | shows.push('sql', 'sqlType', 'database') |
| | | } |
| | | |
| | | if (this.record.execSuccess === 'goback') { |
| | | shows.push('reload') |
| | | } |
| | | if (['grid'].includes(this.record.execSuccess) || ['grid'].includes(this.record.execError)) { |
| | | shows.push('resetPageIndex') |
| | | } |
| | |
| | | }] |
| | | } |
| | | } |
| | | } else if (item.key === 'extValue') { |
| | | rules.push( |
| | | { pattern: /^[0-9a-zA-Z_]*$/, message: '请使用字母、数字以及_' }, |
| | | { max: 50, message: '最多50个字符。' } |
| | | ) |
| | | } else { |
| | | rules.push({ max: formRule.input.max, message: formRule.input.message }) |
| | | } |
| | |
| | | if (values.outerBlacklist) { |
| | | values.outerBlacklist = values.outerBlacklist.replace(/\s/ig, '') |
| | | } |
| | | if (values.controlVal) { |
| | | values.controlVal = values.controlVal.replace(/\t+|\v+|\s+/g, '') |
| | | } |
| | | |
| | | if (values.openmenu && Array.isArray(values.openmenu) && values.openmenu.length > 0) { |
| | | let list = null |
| | |
| | | import React from 'react' |
| | | import { btnClasses } from '@/utils/option.js' |
| | | import { btnClasses, modalClasses } from '@/utils/option.js' |
| | | |
| | | /** |
| | | * @description 获取按钮表单配置信息 |
| | |
| | | } else { |
| | | appMenus = [] |
| | | } |
| | | // if (appType === 'mob') { |
| | | // appMenus.push({value: 'sign', text: '签名(系统页)'}) |
| | | // } |
| | | appMenus.push({value: 'goback', text: '返回(上一页)'}) |
| | | } else { |
| | | menulist = sessionStorage.getItem('fstMenuList') |
| | |
| | | { value: 'expPdf', text: '导出PDF' }, |
| | | { value: 'shareLink', text: '分享链接' }, |
| | | { value: 'openLocation', text: '打开地图'}, |
| | | { value: 'wxPublicAuth', text: '微信公众号授权'}, |
| | | { value: 'logout', text: '退出' }, |
| | | { value: 'goBack', text: '返回' }, |
| | | ] |
| | |
| | | initVal: card.reason || '', |
| | | required: false |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // key: 'formCache', |
| | | // label: '表单缓存', |
| | | // initVal: card.formCache || 'false', |
| | | // tooltip: '主要用于数据修改后,更新相关表单的选项,清空缓存后表单再次打开时数据会重新加载。', |
| | | // required: false, |
| | | // options: [{ |
| | | // value: 'false', |
| | | // text: '不清空' |
| | | // }, { |
| | | // value: 'clear', |
| | | // text: '清空' |
| | | // }] |
| | | // }, |
| | | { |
| | | type: 'radio', |
| | | key: 'hidden', |
| | |
| | | {value: 'false', text: '禁用'}, |
| | | ], |
| | | forbid: viewType === 'popview' |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'extBtn', |
| | | label: '扩展按钮', |
| | | initVal: card.extBtn || 'false', |
| | | tooltip: '点击扩展按钮时,变量 mk_submit_type 将被赋值。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', text: '启用'}, |
| | | {value: 'false', text: '禁用'}, |
| | | ], |
| | | forbid: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'extValue', |
| | | label: '扩展值', |
| | | initVal: card.extValue || '', |
| | | required: true, |
| | | readonly: false, |
| | | forbid: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'extLabel', |
| | | label: '扩展名称', |
| | | initVal: card.extLabel || '', |
| | | required: true, |
| | | readonly: false, |
| | | forbid: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'extStyle', |
| | | label: '扩展样式', |
| | | initVal: card.extStyle || '', |
| | | required: false, |
| | | options: modalClasses, |
| | | forbid: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'confLabel', |
| | | label: '确定名称', |
| | | initVal: card.confLabel || '', |
| | | required: false, |
| | | readonly: false, |
| | | forbid: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'confStyle', |
| | | label: '确定样式', |
| | | initVal: card.confStyle || '', |
| | | required: false, |
| | | options: modalClasses, |
| | | forbid: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'splitLine', |
| | |
| | | initVal: card.reason || '', |
| | | required: false |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // key: 'formCache', |
| | | // label: '表单缓存', |
| | | // initVal: card.formCache || 'false', |
| | | // tooltip: '主要用于数据修改后,更新相关表单的选项,清空缓存后表单再次打开时数据会重新加载。', |
| | | // required: false, |
| | | // options: [{ |
| | | // value: 'false', |
| | | // text: '不清空' |
| | | // }, { |
| | | // value: 'clear', |
| | | // text: '清空' |
| | | // }] |
| | | // }, |
| | | { |
| | | type: 'radio', |
| | | key: 'hidden', |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'extBtn', |
| | | label: '扩展按钮', |
| | | initVal: card.extBtn || 'false', |
| | | tooltip: '点击扩展按钮时,变量 mk_submit_type 将被赋值。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', text: '启用'}, |
| | | {value: 'false', text: '禁用'}, |
| | | ], |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'extValue', |
| | | label: '扩展值', |
| | | initVal: card.extValue || '', |
| | | required: true, |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'extLabel', |
| | | label: '扩展名称', |
| | | initVal: card.extLabel || '', |
| | | required: true, |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'extStyle', |
| | | label: '扩展样式', |
| | | initVal: card.extStyle || '', |
| | | required: false, |
| | | options: modalClasses |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'confLabel', |
| | | label: '确定名称', |
| | | initVal: card.confLabel || '', |
| | | required: false, |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'confStyle', |
| | | label: '确定样式', |
| | | initVal: card.confStyle || '', |
| | | required: false, |
| | | options: modalClasses |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'execType', |
| | | label: '请求方式', |
| | | initVal: card.execType || 'multi', |
| | |
| | | {value: 'show', label: '否'}, |
| | | {value: 'hidden', label: '是'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'empSign', values: ['show']}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'empSign', |
| | | label: '空值图标', |
| | | initval: wrap.empSign || 'show', |
| | | tooltip: '当查询数据为空时,是否显示空值提示图标。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'show', label: '显示'}, |
| | | {value: 'hidden', label: '隐藏'}, |
| | | ], |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | {value: 'show', label: '否'}, |
| | | {value: 'hidden', label: '是'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'empSign', values: ['show']}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'empSign', |
| | | label: '空值图标', |
| | | initval: wrap.empSign || 'show', |
| | | tooltip: '当查询数据为空时,是否显示空值提示图标。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'show', label: '显示'}, |
| | | {value: 'hidden', label: '隐藏'}, |
| | | ], |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | }) |
| | | |
| | | // 需要声明的变量集 |
| | | 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'] |
| | | 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'] |
| | | |
| | | // 主键字段 |
| | | let primaryKey = setting.primaryKey || 'id' |
| | |
| | | if (_declarefields) { |
| | | _declarefields = ',' + _declarefields |
| | | } |
| | | _sql = `Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50),@ModularDetailCode nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@mk_deleted int,@bid nvarchar(50)${_declarefields} |
| | | _sql = `Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50),@ModularDetailCode nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@mk_deleted int,@bid nvarchar(50),@mk_submit_type nvarchar(50)${_declarefields} |
| | | ` |
| | | |
| | | let userName = 'User_Name' |
| | |
| | | // 初始化凭证及用户信息字段 |
| | | _sql += ` |
| | | /* 凭证及用户信息初始化赋值 */ |
| | | select @BVoucher='',@FIBVoucherDate='',@FiYear='',@ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}', @mk_deleted=1, @bid='${BID}', @BillCode='', @ModularDetailCode='' |
| | | select @BVoucher='',@FIBVoucherDate='',@FiYear='',@ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}', @mk_deleted=1, @bid='${BID}', @mk_submit_type='', @BillCode='', @ModularDetailCode='' |
| | | ` |
| | | |
| | | // 表单变量赋值 |
| | |
| | | </div> |
| | | </div> |
| | | <div className="ant-modal-footer"> |
| | | <div> |
| | | {btn.extBtn === 'true' ? <div> |
| | | <button type="button" className="ant-btn"> |
| | | <span>取消</span> |
| | | </button> |
| | | <button type="button" className={'ant-btn extend-btn ' + (btn.extStyle || '')}> |
| | | <span>{btn.extLabel}</span> |
| | | </button> |
| | | <button type="button" className={'ant-btn confirm-btn ' + (btn.confStyle || '')}> |
| | | <span>{btn.confLabel || '确定'}</span> |
| | | </button> |
| | | </div> : <div> |
| | | <button type="button" className="ant-btn"> |
| | | <span>取消</span> |
| | | </button> |
| | | <button type="button" className="ant-btn ant-btn-primary"> |
| | | <span>确定</span> |
| | | </button> |
| | | </div> |
| | | </div>} |
| | | <div className="action-mask"></div> |
| | | </div> |
| | | </div> |
| | |
| | | .ant-modal-footer { |
| | | position: relative; |
| | | button { |
| | | opacity: 0.3; |
| | | opacity: 0.5; |
| | | } |
| | | .extend-btn { |
| | | color: var(--mk-sys-color)!important; |
| | | border-color: var(--mk-sys-color)!important; |
| | | background-color: #ffffff!important; |
| | | } |
| | | .confirm-btn { |
| | | background-color: var(--mk-sys-color)!important; |
| | | border-color: var(--mk-sys-color)!important; |
| | | color: #ffffff!important; |
| | | } |
| | | |
| | | .extend-btn.primary, .confirm-btn.primary { |
| | | background-color: #1890ff!important; |
| | | border-color: #1890ff!important; |
| | | color: #ffffff!important; |
| | | } |
| | | .extend-btn.yellow, .confirm-btn.yellow { |
| | | background-color: #fadb14!important; |
| | | border-color: #fadb14!important; |
| | | color: #ffffff!important; |
| | | } |
| | | .extend-btn.orange, .confirm-btn.orange { |
| | | background-color: #fa8c16!important; |
| | | border-color: #fa8c16!important; |
| | | color: #ffffff!important; |
| | | } |
| | | .extend-btn.danger, .confirm-btn.danger { |
| | | background-color: #f5222d!important; |
| | | border-color: #f5222d!important; |
| | | color: #ffffff!important; |
| | | } |
| | | .extend-btn.green, .confirm-btn.green { |
| | | background-color: #52c41a!important; |
| | | border-color: #52c41a!important; |
| | | color: #ffffff!important; |
| | | } |
| | | .extend-btn.purple, .confirm-btn.purple { |
| | | background-color: #722ed1!important; |
| | | border-color: #722ed1!important; |
| | | color: #ffffff!important; |
| | | } |
| | | |
| | | .extend-btn.border-primary, .confirm-btn.border-primary { |
| | | color: #1890ff!important; |
| | | border-color: #1890ff!important; |
| | | background-color: #ffffff!important; |
| | | } |
| | | .extend-btn.border-yellow, .confirm-btn.border-yellow { |
| | | color: #fadb14!important; |
| | | border-color: #fadb14!important; |
| | | background-color: #ffffff!important; |
| | | } |
| | | .extend-btn.border-orange, .confirm-btn.border-orange { |
| | | color: #fa8c16!important; |
| | | border-color: #fa8c16!important; |
| | | background-color: #ffffff!important; |
| | | } |
| | | .extend-btn.border-danger, .confirm-btn.border-danger { |
| | | color: #f5222d!important; |
| | | border-color: #f5222d!important; |
| | | background-color: #ffffff!important; |
| | | } |
| | | .extend-btn.border-green, .confirm-btn.border-green { |
| | | color: #52c41a!important; |
| | | border-color: #52c41a!important; |
| | | background-color: #ffffff!important; |
| | | } |
| | | .extend-btn.border-purple, .confirm-btn.border-purple { |
| | | color: #722ed1!important; |
| | | border-color: #722ed1!important; |
| | | background-color: #ffffff!important; |
| | | } |
| | | } |
| | | .action-mask { |
| | |
| | | extendName: 'MenuNo', |
| | | options: [ |
| | | ...menulist, |
| | | // {value: 'IM', label: '即时通信(系统页)'}, |
| | | {value: 'AIService', label: '智能客服(系统页)'} |
| | | ] |
| | | }, |
| | |
| | | option.props.extend.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | > |
| | | {appMenus.map(item => (<Select.Option key={item.MenuID} extend={item.MenuNo || ''} value={item.MenuID}>{item.MenuName}</Select.Option>))} |
| | | {/* <Select.Option key="IM" value="IM">即时通信(系统页)</Select.Option> */} |
| | | <Select.Option key="AIService" extend={''} value="AIService">智能客服(系统页)</Select.Option> |
| | | </Select> |
| | | )} |
| | |
| | | |
| | | if (id !== this.state.BID || id !== '') { |
| | | this.setState({ BID: id, BData: data }, () => { |
| | | this.loadData() |
| | | if (config.wrap.datatype !== 'public') { |
| | | this.loadData() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | _config.wrap.scale = _config.wrap.scale === 'true' ? 'scale' : '' |
| | | _config.wrap.layout = (_config.wrap.layout || 'grid') + '-layout float-' + (_config.wrap.cardFloat || 'left') |
| | | |
| | | _config.wrap.wrapClass = `${_config.wrap.selStyle} ${_config.wrap.cardType || ''} ${_config.wrap.scale} ${config.wrap.hover === 'true' ? 'mk-hover' : ''}` |
| | | _config.wrap.wrapClass = `${_config.wrap.selStyle} ${_config.wrap.cardType || ''} ${_config.wrap.scale} ${config.wrap.hover === 'true' ? 'mk-hover' : ''} ${config.wrap.empSign === 'hidden' ? 'mk-empty-hide' : ''}` |
| | | |
| | | if (_config.wrap.shifting === 'true') { |
| | | _config.wrap.shifting = 'shifting' |
| | |
| | | border-color: var(--mk-sys-color); |
| | | } |
| | | } |
| | | |
| | | .ant-empty-image svg { |
| | | max-width: 100%; |
| | | } |
| | | } |
| | | .custom-data-card-box.shifting { |
| | | .normal-header:not(.header-search) + .toolbar-button { |
| | |
| | | _config.wrap.selStyle = _config.wrap.selStyle || 'active' |
| | | _config.wrap.pagestyle = _config.wrap.pagestyle || 'page' |
| | | |
| | | _config.wrap.wrapClass = `${_config.wrap.selStyle} ${_config.wrap.cardType || ''}` |
| | | _config.wrap.wrapClass = `${_config.wrap.selStyle} ${_config.wrap.cardType || ''} ${config.wrap.empSign === 'hidden' ? 'mk-empty-hide' : ''}` |
| | | |
| | | if (_config.wrap.zHeight || _config.wrap.minWidth) { |
| | | _config.wrap.zoomStyle = { |
| | |
| | | border: 1px solid rgba(0, 0, 0, 0.07); |
| | | background: rgba(0, 0, 0, 0); |
| | | } |
| | | |
| | | .ant-empty-image svg { |
| | | max-width: 100%; |
| | | } |
| | | } |
| | | .double-data-card-box.shifting { |
| | | .normal-header:not(.header-search) + .toolbar-button { |
| | |
| | | |
| | | if (id !== this.state.BID || id !== '') { |
| | | this.setState({ BID: id, BData: data }, () => { |
| | | this.loadData() |
| | | if (config.wrap.datatype !== 'public') { |
| | | this.loadData() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | selectedData={[]} |
| | | /> : null |
| | | } |
| | | <Row className={`card-row-list ${config.wrap.hover === 'true' ? 'mk-hover' : ''}`} style={{height: config.wrap.contentHeight}}> |
| | | <Row className={`card-row-list ${config.wrap.hover === 'true' ? 'mk-hover' : ''} ${config.wrap.empSign === 'hidden' ? 'mk-empty-hide' : ''}`} style={{height: config.wrap.contentHeight}}> |
| | | {precards.map((item, index) => ( |
| | | <Col key={index} className="extend-card" span={24}> |
| | | <div className="card-item-box" style={item.style}> |
| | |
| | | height: 60px; |
| | | } |
| | | } |
| | | |
| | | .ant-empty-image svg { |
| | | max-width: 100%; |
| | | } |
| | | } |
| | | |
| | | .custom-card-box::after { |
| | |
| | | if (!config.setting.supModule || config.setting.supModule !== MenuID) return |
| | | if (id !== this.state.BID || id !== '') { |
| | | this.setState({ BID: id }, () => { |
| | | this.loadData() |
| | | if (config.wrap.datatype !== 'public') { |
| | | this.loadData() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | .custom-braft-editor-box.bold-border { |
| | | .braft-content { |
| | | table { |
| | | td, th { |
| | | border-width: 2px!important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .custom-braft-editor-box.deep-border { |
| | | .braft-content { |
| | | table { |
| | | td, th { |
| | | border-color: rgba(0, 0, 0, 0.85)!important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .custom-braft-editor-box.tb-flex { |
| | | .braft-content { |
| | | table { |
| | |
| | | }) |
| | | } else { |
| | | this.setState({ BID: id, BData: data }, () => { |
| | | this.loadData() |
| | | if (config.wrap.datatype !== 'public') { |
| | | this.loadData() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | }) |
| | | } else { |
| | | this.setState({ BID: id, BData: data }, () => { |
| | | this.loadData() |
| | | if (config.wrap.datatype !== 'public') { |
| | | this.loadData() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | }) |
| | | } else { |
| | | this.setState({ BID: id, BData: data }, () => { |
| | | this.loadData() |
| | | if (config.wrap.datatype !== 'public') { |
| | | this.loadData() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | const { BID } = this.state |
| | | |
| | | if (config.setting.supModule && !BID) { |
| | | MKEmitter.emit('mkPublicData', config.uuid, { $$empty: true, $$uuid: '' }) |
| | | MKEmitter.emit('resetSelectLine', config.uuid, '', { $$empty: true, $$uuid: '' }) |
| | | setTimeout(() => { |
| | | MKEmitter.emit('mkPublicData', config.uuid, { $$empty: true, $$uuid: '' }) |
| | | MKEmitter.emit('resetSelectLine', config.uuid, '', { $$empty: true, $$uuid: '' }) |
| | | }, 20) |
| | | this.loading = false |
| | | return |
| | | } |
| | |
| | | } |
| | | |
| | | return ( |
| | | <div className={`normal-custom-table ${setting.tableHeader || ''} ${setting.parity === 'true' ? 'mk-parity' : ''} ${height ? 'fixed-table-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || 'middle'} table-col-${columns.length} ${fixed}`} style={style}> |
| | | <div className={`normal-custom-table ${setting.tableHeader || ''} ${setting.parity === 'true' ? 'mk-parity' : ''} ${height ? 'fixed-table-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || 'middle'} table-col-${columns.length} ${fixed} ${setting.empSign === 'hidden' ? 'mk-empty-hide' : ''}`} style={style}> |
| | | {(setting.tableType === 'radio' || setting.tableType === 'checkbox') && data && data.length > 0 ? |
| | | <Switch title="收起" className="main-pickup" checkedChildren={window.GLOB.dict['open'] || '开'} unCheckedChildren={window.GLOB.dict['shut'] || '关'} checked={pickup} onChange={this.pickupChange} /> : null |
| | | } |
| | |
| | | {setting.hasSubmit && edData.length > 0 ? <div className="edit-custom-table-btn-wrap" style={submit.wrapStyle}> |
| | | <Button style={submit.style} onClick={() => setTimeout(() => {this.submit()}, 10)} loading={loading} className="submit-table" type="link">{dict['submit'] || '提交'}</Button> |
| | | </div> : null} |
| | | <div className={`edit-custom-table ${setting.tableHeader || ''} ${setting.parity === 'true' ? 'mk-parity' : ''} ${height ? 'fixed-table-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || ''} mk-edit-${setting.editType || 'simple'}`} style={style}> |
| | | <div className={`edit-custom-table ${setting.tableHeader || ''} ${setting.parity === 'true' ? 'mk-parity' : ''} ${height ? 'fixed-table-height' : ''} ${setting.mode || ''} table-vertical-${setting.vertical || ''} mk-edit-${setting.editType || 'simple'} ${setting.empSign === 'hidden' ? 'mk-empty-hide' : ''}`} style={style}> |
| | | <Table |
| | | rowKey="$$uuid" |
| | | components={components} |
| | |
| | | import MKEmitter from '@/utils/events.js' |
| | | import MkIcon from '@/components/mk-icon' |
| | | import MkCounter from './mkcounter' |
| | | // import './index.scss' |
| | | |
| | | import './index.scss' |
| | | |
| | | const MutilForm = asyncSpinComponent(() => import('@/tabviews/zshare/mutilform')) |
| | | const { confirm } = Modal |
| | |
| | | autoMatic: false, |
| | | check: false, |
| | | count: 0, |
| | | dict: window.GLOB.dict |
| | | dict: window.GLOB.dict, |
| | | submitType: '' |
| | | } |
| | | |
| | | preCallback = null |
| | |
| | | |
| | | getSystemParam = (data, formdata, retmsg) => { |
| | | const { setting, columns, btn } = this.props |
| | | const { submitType } = this.state |
| | | let _params = [] |
| | | |
| | | if ( btn.Ot === 'notRequired' || btn.Ot === 'requiredSgl' || btn.Ot === 'requiredOnce' ) { |
| | |
| | | param.ID = primaryId |
| | | |
| | | if (retmsg) { |
| | | const { sql, callbacksql } = getSysDefaultSql(btn, setting, '', param, data[0], columns, retmsg) // 数据源 |
| | | const { sql, callbacksql } = getSysDefaultSql(btn, setting, '', param, data[0], columns, retmsg, submitType) // 数据源 |
| | | param.LText = sql |
| | | param.$callbacksql = callbacksql |
| | | } else { |
| | | param.LText = getSysDefaultSql(btn, setting, '', param, data[0], columns, false) // 数据源 |
| | | param.LText = getSysDefaultSql(btn, setting, '', param, data[0], columns, false, submitType) // 数据源 |
| | | if (btn.output) { |
| | | param.key_back_type = 'Y' |
| | | } |
| | |
| | | param.ID = Utils.getguid() |
| | | |
| | | if (retmsg) { |
| | | const { sql, callbacksql } = getSysDefaultSql(btn, setting, formdata, param, data[0], columns, retmsg) // 数据源 |
| | | const { sql, callbacksql } = getSysDefaultSql(btn, setting, formdata, param, data[0], columns, retmsg, submitType) // 数据源 |
| | | param.LText = sql |
| | | param.$callbacksql = callbacksql |
| | | } else { |
| | | param.LText = getSysDefaultSql(btn, setting, formdata, param, data[0], columns, false) // 数据源 |
| | | param.LText = getSysDefaultSql(btn, setting, formdata, param, data[0], columns, false, submitType) // 数据源 |
| | | if (btn.output) { |
| | | param.key_back_type = 'Y' |
| | | } |
| | |
| | | param.ID = primaryId |
| | | |
| | | if (retmsg) { |
| | | const { sql, callbacksql } = getSysDefaultSql(btn, setting, formdata, param, data[0], columns, retmsg) // 数据源 |
| | | const { sql, callbacksql } = getSysDefaultSql(btn, setting, formdata, param, data[0], columns, retmsg, submitType) // 数据源 |
| | | param.LText = sql |
| | | param.$callbacksql = callbacksql |
| | | } else { |
| | | param.LText = getSysDefaultSql(btn, setting, formdata, param, data[0], columns, false) // 数据源 |
| | | param.LText = getSysDefaultSql(btn, setting, formdata, param, data[0], columns, false, submitType) // 数据源 |
| | | if (btn.output) { |
| | | param.key_back_type = 'Y' |
| | | } |
| | |
| | | param.ID = primaryId |
| | | |
| | | if (retmsg) { |
| | | const { sql, callbacksql } = getSysDefaultSql(btn, setting, '', param, cell, columns, retmsg) // 数据源 |
| | | const { sql, callbacksql } = getSysDefaultSql(btn, setting, '', param, cell, columns, retmsg, submitType) // 数据源 |
| | | param.LText = sql |
| | | param.$callbacksql = callbacksql |
| | | } else { |
| | | param.LText = getSysDefaultSql(btn, setting, '', param, cell, columns, false) // 数据源 |
| | | param.LText = getSysDefaultSql(btn, setting, '', param, cell, columns, false, submitType) // 数据源 |
| | | if (btn.output) { |
| | | param.key_back_type = 'Y' |
| | | } |
| | |
| | | param.ID = Utils.getguid() |
| | | |
| | | if (retmsg) { |
| | | const { sql, callbacksql } = getSysDefaultSql(btn, setting, formdata, param, cell, columns, retmsg) // 数据源 |
| | | const { sql, callbacksql } = getSysDefaultSql(btn, setting, formdata, param, cell, columns, retmsg, submitType) // 数据源 |
| | | param.LText = sql |
| | | param.$callbacksql = callbacksql |
| | | } else { |
| | | param.LText = getSysDefaultSql(btn, setting, formdata, param, cell, columns, false) // 数据源 |
| | | param.LText = getSysDefaultSql(btn, setting, formdata, param, cell, columns, false, submitType) // 数据源 |
| | | if (btn.output) { |
| | | param.key_back_type = 'Y' |
| | | } |
| | |
| | | param.ID = primaryId |
| | | |
| | | if (retmsg) { |
| | | const { sql, callbacksql } = getSysDefaultSql(btn, setting, formdata, param, cell, columns, retmsg) // 数据源 |
| | | const { sql, callbacksql } = getSysDefaultSql(btn, setting, formdata, param, cell, columns, retmsg, submitType) // 数据源 |
| | | param.LText = sql |
| | | param.$callbacksql = callbacksql |
| | | } else { |
| | | param.LText = getSysDefaultSql(btn, setting, formdata, param, cell, columns, false) // 数据源 |
| | | param.LText = getSysDefaultSql(btn, setting, formdata, param, cell, columns, false, submitType) // 数据源 |
| | | if (btn.output) { |
| | | param.key_back_type = 'Y' |
| | | } |
| | |
| | | |
| | | getExps = (ex, formdata, cell, id, process) => { |
| | | const { columns, BID, btn } = this.props |
| | | const { submitType } = this.state |
| | | |
| | | let exps = [] |
| | | let values = { |
| | | time_id: Utils.getguid(), |
| | |
| | | datam: sessionStorage.getItem('dataM') === 'true' ? 'Y' : '', |
| | | datam_begin: sessionStorage.getItem('dataM') === 'true' ? 'Y' : '', |
| | | datam_end: sessionStorage.getItem('dataM') === 'true' ? 'Y' : '', |
| | | mk_submit_type: submitType || '' |
| | | // mk_check_begin: '', |
| | | // mk_check_end: '' |
| | | } |
| | |
| | | |
| | | let formkeys = [] |
| | | formdata && formdata.forEach(form => { |
| | | // if (!ex.reps.includes(form.key)) return |
| | | |
| | | formkeys.push(form.key) |
| | | |
| | | let val = form.value |
| | |
| | | * @description 获取回调脚本的字段定义 |
| | | */ |
| | | 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'] |
| | | 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'] |
| | | |
| | | // sql语句 |
| | | let _sql = '' |
| | |
| | | _declarefields = ',' + _declarefields |
| | | } |
| | | _sql = `/* 系统生成 */ |
| | | Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50),@ModularDetailCode nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@mk_deleted int,@bid nvarchar(50)${_declarefields} |
| | | Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50),@ModularDetailCode nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@mk_deleted int,@bid nvarchar(50),@mk_submit_type nvarchar(50)${_declarefields} |
| | | ` |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | |
| | | // 初始化凭证及用户信息字段 |
| | | _sql += ` |
| | | /* 凭证及用户信息初始化赋值 */ |
| | | select @BVoucher='',@FIBVoucherDate='',@FiYear='',@ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}', @mk_deleted=1, @bid='${BID}', @BillCode='', @ModularDetailCode='' |
| | | select @BVoucher='',@FIBVoucherDate='',@FiYear='',@ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}', @mk_deleted=1, @bid='${BID}', @mk_submit_type='${submitType}', @BillCode='', @ModularDetailCode='' |
| | | ` |
| | | |
| | | // 表单变量赋值 |
| | |
| | | /** |
| | | * @description 模态框(表单),确认 |
| | | */ |
| | | handleOk = () => { |
| | | handleOk = (submitType = '') => { |
| | | if (!this.formRef) return |
| | | |
| | | this.formRef.handleConfirm().then(res => { |
| | | this.setState({ confirmLoading: true }) |
| | | this.setState({ confirmLoading: true, submitType: submitType }) |
| | | |
| | | this.execSubmit(this.state.selines, () => { this.setState({ confirmLoading: false }) }, res) |
| | | }) |
| | |
| | | this.setState({ |
| | | loading: false, |
| | | visible: false, |
| | | confirmLoading: false |
| | | confirmLoading: false, |
| | | submitType: '' |
| | | }) |
| | | |
| | | this.preCallback && this.preCallback() |
| | |
| | | */ |
| | | getModels = () => { |
| | | const { BID, btn, BData } = this.props |
| | | const { btnconfig, visible, dict } = this.state |
| | | const { btnconfig, visible, dict, confirmLoading, submitType } = this.state |
| | | |
| | | if (!btnconfig || !btnconfig.setting) return null |
| | | |
| | |
| | | <MutilForm |
| | | BID={BID} |
| | | action={btnconfig} |
| | | inputSubmit={this.handleOk} |
| | | inputSubmit={() => this.handleOk()} |
| | | data={this.state.selines[0]} |
| | | BData={BData} |
| | | wrappedComponentRef={(inst) => this.formRef = inst} |
| | | /> |
| | | <div className="ant-drawer-footer" style={{ position: 'absolute', zIndex: 1, right: 0, bottom: 0, width: '100%', borderTop: '1px solid #e9e9e9', padding: '10px 16px', background: '#fff', textAlign: 'right'}}> |
| | | {btnconfig.setting.formType === 'check' ? <div className="ant-drawer-footer" style={{ position: 'absolute', zIndex: 1, right: 0, bottom: 0, width: '100%', borderTop: '1px solid #e9e9e9', padding: '10px 16px', background: '#fff', textAlign: 'right'}}> |
| | | <Button onClick={this.handleCancel} style={{ marginRight: 8 }}> |
| | | {btnconfig.setting.formType !== 'check' ? dict['cancel'] || '取消' : dict['close'] || '关闭'} |
| | | {dict['close'] || '关闭'} |
| | | </Button> |
| | | {btnconfig.setting.formType !== 'check' ? <Button onClick={this.handleOk} loading={this.state.confirmLoading} type="primary"> |
| | | {dict['ok'] || '确定'} |
| | | </Button> : null} |
| | | </div> |
| | | </div> : <div className="ant-drawer-footer" style={{ position: 'absolute', zIndex: 1, right: 0, bottom: 0, width: '100%', borderTop: '1px solid #e9e9e9', padding: '10px 16px', background: '#fff', textAlign: 'right'}}> |
| | | <Button onClick={this.handleCancel} style={{ marginRight: 8 }}> |
| | | {dict['cancel'] || '取消'} |
| | | </Button> |
| | | {btn.extBtn === 'true' ? <Button className={'extend-btn ' + (btn.extStyle || '')} disabled={confirmLoading && submitType !== btn.extValue} loading={confirmLoading && submitType === btn.extValue} onClick={() => this.handleOk(btn.extValue)}>{btn.extLabel}</Button> : null} |
| | | {btn.extBtn === 'true' ? <Button className={'confirm-btn ' + (btn.confStyle || '')} disabled={confirmLoading && submitType !== ''} loading={confirmLoading && submitType === ''} onClick={() => this.handleOk()}>{btn.confLabel || dict['ok'] || '确定'}</Button> : null} |
| | | {btn.extBtn !== 'true' ? <Button type="primary" loading={confirmLoading} onClick={() => this.handleOk()}>{dict['ok'] || '确定'}</Button> : null} |
| | | </div>} |
| | | </Drawer> |
| | | ) |
| | | } else { |
| | |
| | | wrapClassName={'action-modal' + (btnconfig.setting.moveable === 'true' ? ' moveable-modal modal-' + btn.uuid : '')} |
| | | visible={visible} |
| | | width={width} |
| | | okText={dict['ok'] || '确定'} |
| | | cancelText={dict['cancel'] || '取消'} |
| | | onOk={this.handleOk} |
| | | maskStyle={btnconfig.setting.moveable === 'true' ? {backgroundColor: 'rgba(0, 0, 0, 0.15)'} : null} |
| | | confirmLoading={this.state.confirmLoading} |
| | | onCancel={this.handleCancel} |
| | | footer={[ |
| | | <Button key="cancel" onClick={this.handleCancel}>{dict['cancel'] || '取消'}</Button>, |
| | | btn.extBtn === 'true' ? <Button key="extend" className={'extend-btn ' + (btn.extStyle || '')} disabled={confirmLoading && submitType !== btn.extValue} loading={confirmLoading && submitType === btn.extValue} onClick={() => this.handleOk(btn.extValue)}>{btn.extLabel}</Button> : null, |
| | | btn.extBtn === 'true' ? <Button key="confirm" className={'confirm-btn ' + (btn.confStyle || '')} disabled={confirmLoading && submitType !== ''} loading={confirmLoading && submitType === ''} onClick={() => this.handleOk()}>{btn.confLabel || dict['ok'] || '确定'}</Button> : null, |
| | | btn.extBtn !== 'true' ? <Button key="confirm" type="primary" loading={confirmLoading} onClick={() => this.handleOk()}>{dict['ok'] || '确定'}</Button> : null |
| | | ]} |
| | | destroyOnClose |
| | | > |
| | | <MutilForm |
| | | BID={BID} |
| | | action={btnconfig} |
| | | inputSubmit={this.handleOk} |
| | | inputSubmit={() => this.handleOk()} |
| | | data={this.state.selines[0]} |
| | | BData={BData} |
| | | wrappedComponentRef={(inst) => this.formRef = inst} |
| | |
| | | .extend-btn { |
| | | color: var(--mk-sys-color)!important; |
| | | border-color: var(--mk-sys-color)!important; |
| | | background-color: #ffffff!important; |
| | | } |
| | | .confirm-btn { |
| | | background-color: var(--mk-sys-color)!important; |
| | | border-color: var(--mk-sys-color)!important; |
| | | color: #ffffff!important; |
| | | } |
| | | |
| | | .extend-btn.primary, .confirm-btn.primary { |
| | | background-color: #1890ff!important; |
| | | border-color: #1890ff!important; |
| | | color: #ffffff!important; |
| | | } |
| | | .extend-btn.yellow, .confirm-btn.yellow { |
| | | background-color: #fadb14!important; |
| | | border-color: #fadb14!important; |
| | | color: #ffffff!important; |
| | | } |
| | | .extend-btn.orange, .confirm-btn.orange { |
| | | background-color: #fa8c16!important; |
| | | border-color: #fa8c16!important; |
| | | color: #ffffff!important; |
| | | } |
| | | .extend-btn.danger, .confirm-btn.danger { |
| | | background-color: #f5222d!important; |
| | | border-color: #f5222d!important; |
| | | color: #ffffff!important; |
| | | } |
| | | .extend-btn.green, .confirm-btn.green { |
| | | background-color: #52c41a!important; |
| | | border-color: #52c41a!important; |
| | | color: #ffffff!important; |
| | | } |
| | | .extend-btn.purple, .confirm-btn.purple { |
| | | background-color: #722ed1!important; |
| | | border-color: #722ed1!important; |
| | | color: #ffffff!important; |
| | | } |
| | | |
| | | .extend-btn.border-primary, .confirm-btn.border-primary { |
| | | color: #1890ff!important; |
| | | border-color: #1890ff!important; |
| | | background-color: #ffffff!important; |
| | | } |
| | | .extend-btn.border-yellow, .confirm-btn.border-yellow { |
| | | color: #fadb14!important; |
| | | border-color: #fadb14!important; |
| | | background-color: #ffffff!important; |
| | | } |
| | | .extend-btn.border-orange, .confirm-btn.border-orange { |
| | | color: #fa8c16!important; |
| | | border-color: #fa8c16!important; |
| | | background-color: #ffffff!important; |
| | | } |
| | | .extend-btn.border-danger, .confirm-btn.border-danger { |
| | | color: #f5222d!important; |
| | | border-color: #f5222d!important; |
| | | background-color: #ffffff!important; |
| | | } |
| | | .extend-btn.border-green, .confirm-btn.border-green { |
| | | color: #52c41a!important; |
| | | border-color: #52c41a!important; |
| | | background-color: #ffffff!important; |
| | | } |
| | | .extend-btn.border-purple, .confirm-btn.border-purple { |
| | | color: #722ed1!important; |
| | | border-color: #722ed1!important; |
| | | background-color: #ffffff!important; |
| | | } |
| | |
| | | } else { |
| | | item.showValue = '' |
| | | } |
| | | } else if (item.type === 'brafteditor') { |
| | | if (window.backend && newval && /<\/span>/.test(newval) && item.encryption === 'true') { |
| | | try { |
| | | newval = window.btoa(window.encodeURIComponent(newval)) |
| | | } catch (e) { |
| | | newval = '' |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (newval !== '$empty') { |
| | |
| | | values.field = values.field.join(',') |
| | | } |
| | | |
| | | if (values.initval && ['text', 'select', 'radio', 'multiselect', 'link', 'checkcard'].includes(values.type)) { |
| | | values.initval = values.initval.replace(/^\s+|\s+$/ig, '') |
| | | } |
| | | |
| | | if (['select', 'link'].includes(values.type)) { |
| | | if (values.resourceType === '1') { |
| | | if (/\$first/.test(values.initval) && values.initval.replace(/\s/g, '') === '$first') { |
| | |
| | | {!type ? <Col span={24} className="sqlfield"> |
| | | <Form.Item label="可用字段"> |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, lang, time_id, typename, datam</span></Tooltip>, |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'系统变量,系统会定义变量并赋值。'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address, mk_deleted</span></Tooltip>, |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'系统变量,系统会定义变量并赋值。'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address, mk_deleted, mk_submit_type</span></Tooltip>, |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'系统变量,系统会定义变量并在单号生成或创建凭证时使用。'}><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip> |
| | | {formfields ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="表单变量,系统会定义变量并赋值。">, <span style={{color: '#8E44AD'}}>{formfields}</span></Tooltip> : ''} |
| | | {colfields ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="字段集变量,系统会定义变量并赋值。">, {colfields}</Tooltip> : ''} |
| | |
| | | <Col span={21} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, lang, time_id</span></Tooltip>, |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'系统变量,系统会定义变量并赋值。'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address, mk_deleted</span></Tooltip>, |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'系统变量,系统会定义变量并赋值。'}><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address, mk_deleted, mk_submit_type</span></Tooltip>, |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'系统变量,系统会定义变量并在单号生成或创建凭证时使用。'}><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip> |
| | | {formfields ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="表单变量,系统会定义变量并赋值。">, <span style={{color: '#8E44AD'}}>{formfields}</span></Tooltip> : ''} |
| | | {colfields ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="字段集变量,系统会定义变量并赋值。">, {colfields}</Tooltip> : ''} |
| | |
| | | <Form.Item label={'可用字段'}> |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="公共值,请按照@xxx@格式使用。"><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, lang, time_id, typename, datam</span></Tooltip>, |
| | | {window.GLOB.process && workFlow === 'true' ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={`工作流变量,请按照@xxx@格式使用${flowType !== 'start' ? ',works_flow_sign 为分支启用高级设置时的标记值' : ''}。`}><span style={{color: '#26C281'}}>works_flow_code, works_flow_name, works_flow_param, works_flow_detail_id, status, statusname, work_group, work_grade, {flowType === 'start' ? 'start_type,' : 'check_type, notice_type, check_userids, notice_userids, works_flow_sign,'} </span></Tooltip> : null} |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="系统变量,系统会定义变量并赋值。"><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address, mk_deleted</span></Tooltip>, |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="系统变量,系统会定义变量并赋值。"><span style={{color: '#fa8c16'}}>UserName, FullName, RoleID, mk_departmentcode, mk_organization, mk_user_type, mk_nation, mk_province, mk_city, mk_district, mk_address, mk_deleted, mk_submit_type</span></Tooltip>, |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="系统变量,系统会定义变量并在单号生成或创建凭证时使用。"><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip> |
| | | {formfields ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="表单变量,系统会定义变量并赋值。">, <span style={{color: '#8E44AD'}}>{formfields}</span></Tooltip> : ''} |
| | | {colfields ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title="字段集变量,系统会定义变量并赋值。">, {colfields}</Tooltip> : ''} |
| | |
| | | _fields = card.modal.fields || [] |
| | | } |
| | | |
| | | let sysfields = ['UserName', 'FullName', 'RoleID', 'mk_departmentcode', 'mk_organization', 'mk_user_type', 'mk_nation', 'mk_province', 'mk_city', 'mk_district', 'mk_address', 'BillCode', 'BVoucher', 'FIBVoucherDate', 'FiYear', 'ModularDetailCode', 'tbid', 'mk_deleted', 'bid'] |
| | | let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@RoleID nvarchar(512)', '@mk_departmentcode nvarchar(512)', '@mk_organization nvarchar(512)', '@mk_user_type nvarchar(20)', '@mk_nation nvarchar(50)', '@mk_province nvarchar(50)', '@mk_city nvarchar(50)', '@mk_district nvarchar(50)', '@mk_address nvarchar(100)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)', '@BillCode nvarchar(50)', '@BVoucher nvarchar(50)', '@FIBVoucherDate nvarchar(50)', '@FiYear nvarchar(50)', '@ModularDetailCode nvarchar(50)', '@bid nvarchar(50)', '@tbid nvarchar(50)', '@mk_deleted int'] |
| | | let _select = ['@UserName=\'\'', '@FullName=\'\'', '@RoleID=\'\'', '@mk_departmentcode=\'\'', '@mk_organization=\'\'', '@mk_user_type=\'\'', '@mk_nation=\'\'', '@mk_province=\'\'', '@mk_city=\'\'', '@mk_district=\'\'', '@mk_address=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\'', '@BillCode=\'\'', '@BVoucher=\'\'', '@FIBVoucherDate=\'\'', '@FiYear=\'\'', '@ModularDetailCode=\'\'', '@bid=\'\'', '@mk_deleted=1'] |
| | | let sysfields = ['UserName', 'FullName', 'RoleID', 'mk_departmentcode', 'mk_organization', 'mk_user_type', 'mk_nation', 'mk_province', 'mk_city', 'mk_district', 'mk_address', 'BillCode', 'BVoucher', 'FIBVoucherDate', 'FiYear', 'ModularDetailCode', 'tbid', 'mk_deleted', 'bid', 'mk_submit_type'] |
| | | let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@RoleID nvarchar(512)', '@mk_departmentcode nvarchar(512)', '@mk_organization nvarchar(512)', '@mk_user_type nvarchar(20)', '@mk_nation nvarchar(50)', '@mk_province nvarchar(50)', '@mk_city nvarchar(50)', '@mk_district nvarchar(50)', '@mk_address nvarchar(100)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)', '@BillCode nvarchar(50)', '@BVoucher nvarchar(50)', '@FIBVoucherDate nvarchar(50)', '@FiYear nvarchar(50)', '@ModularDetailCode nvarchar(50)', '@bid nvarchar(50)', '@tbid nvarchar(50)', '@mk_deleted int', '@mk_submit_type nvarchar(50)'] |
| | | let _select = ['@UserName=\'\'', '@FullName=\'\'', '@RoleID=\'\'', '@mk_departmentcode=\'\'', '@mk_organization=\'\'', '@mk_user_type=\'\'', '@mk_nation=\'\'', '@mk_province=\'\'', '@mk_city=\'\'', '@mk_district=\'\'', '@mk_address=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\'', '@BillCode=\'\'', '@BVoucher=\'\'', '@FIBVoucherDate=\'\'', '@FiYear=\'\'', '@ModularDetailCode=\'\'', '@bid=\'\'', '@mk_deleted=1', '@mk_submit_type=\'\''] |
| | | |
| | | let fieldArr = sysfields.map(_f => _f.toLowerCase()) |
| | | let hasBid = false |
| | |
| | | text: '白底紫框' |
| | | }] |
| | | |
| | | // 按钮颜色集 |
| | | export const modalClasses = [{ |
| | | value: 'primary', |
| | | text: '蓝色' |
| | | }, { |
| | | value: 'yellow', |
| | | text: '黄色' |
| | | }, { |
| | | value: 'orange', |
| | | text: '橙色' |
| | | }, { |
| | | value: 'danger', |
| | | text: '红色' |
| | | }, { |
| | | value: 'green', |
| | | text: '绿色' |
| | | }, { |
| | | value: 'purple', |
| | | text: '紫色' |
| | | }, { |
| | | value: 'border-primary', |
| | | text: '白底蓝框' |
| | | }, { |
| | | value: 'border-yellow', |
| | | text: '白底黄框' |
| | | }, { |
| | | value: 'border-orange', |
| | | text: '白底橙框' |
| | | }, { |
| | | value: 'border-danger', |
| | | text: '白底红框' |
| | | }, { |
| | | value: 'border-green', |
| | | text: '白底绿框' |
| | | }, { |
| | | value: 'border-purple', |
| | | text: '白底紫框' |
| | | }] |
| | | |
| | | export const calendarColors = [ |
| | | {name: 'red', value: '#d0021b'}, |
| | | {name: 'orange', value: '#f5a623'}, |
| | |
| | | sqls.push({uuid: cell.uuid, roleId: roleId, type: 'pay', ...msg}) |
| | | } |
| | | } else if (cell.OpenType === 'popview') { |
| | | if (cell.config && cell.config.components) { |
| | | if (cell.config && cell.config.components && cell.config.enabled) { |
| | | let _mainSearch = [] |
| | | |
| | | if (appType === 'mob') { |
| | |
| | | } |
| | | }) |
| | | |
| | | if (new RegExp('@mk_submit_type[^0-9a-z_]', 'ig').test(_sql)) { |
| | | decSql.push(`@mk_submit_type nvarchar(50)`) |
| | | secSql.push(`@mk_submit_type=@mk_submit_type@`) |
| | | reps.push('mk_submit_type') |
| | | } |
| | | |
| | | decSql = [...decSql, ..._declares] |
| | | |
| | | // INSERT INTO s_paas_api_log (appkey,api_name,api_count,menuname,createuserid,createuser,createstaff,cdefine1,cdefine2) |
| | |
| | | return true |
| | | }) |
| | | |
| | | reps.forEach(n => { |
| | | _sql = _sql.replace(new RegExp('@' + n + '@', 'ig'), `'@${n}@'`) |
| | | }) |
| | | |
| | | if (/\$@/ig.test(_sql)) { |
| | | _sql = _sql.replace(/\$@/ig, '@datam_begin@').replace(/@\$/ig, '@datam_end@') |
| | | _sql = _sql.replace(/\$@/ig, ' @datam_begin@ ').replace(/@\$/ig, ' @datam_end@ ') |
| | | reps.push('datam_begin', 'datam_end') |
| | | } |
| | | if (btn.procMode === 'system') { |
| | |
| | | } |
| | | } else { |
| | | if (/\$check@|@check\$/ig.test(_sql)) { |
| | | _sql = _sql.replace(/\$check@/ig, '@mk_check_begin@').replace(/@check\$/ig, '@mk_check_end@') |
| | | _sql = _sql.replace(/\$check@/ig, ' @mk_check_begin@ ').replace(/@check\$/ig, ' @mk_check_end@ ') |
| | | reps.push('mk_check_begin', 'mk_check_end') |
| | | } |
| | | } |
| | | reps.forEach(n => { |
| | | if (['datam_begin', 'datam_end', 'mk_check_begin', 'mk_check_end'].includes(n)) return |
| | | |
| | | _sql = _sql.replace(new RegExp('@' + n + '@', 'ig'), `'@${n}@'`) |
| | | }) |
| | | if (/@db@/ig.test(_sql)) { |
| | | reps.push('db') |
| | | } |
| | |
| | | } |
| | | }) |
| | | |
| | | if (new RegExp('@mk_submit_type[^0-9a-z_]', 'ig').test(_sql)) { |
| | | decSql.push(`@mk_submit_type nvarchar(50)`) |
| | | secSql.push(`@mk_submit_type=@mk_submit_type@`) |
| | | reps.push('mk_submit_type') |
| | | } |
| | | |
| | | decSql = [...decSql, ..._declares] |
| | | |
| | | _sql = `/* ${btn.logLabel}(回调) */ |
| | |
| | | return true |
| | | }) |
| | | |
| | | reps.forEach(n => { |
| | | _sql = _sql.replace(new RegExp('@' + n + '@', 'ig'), `'@${n}@'`) |
| | | }) |
| | | |
| | | if (/\$@/ig.test(_sql)) { |
| | | _sql = _sql.replace(/\$@/ig, '@datam_begin@').replace(/@\$/ig, '@datam_end@') |
| | | _sql = _sql.replace(/\$@/ig, ' @datam_begin@ ').replace(/@\$/ig, ' @datam_end@ ') |
| | | reps.push('datam_begin', 'datam_end') |
| | | } |
| | | reps.forEach(n => { |
| | | if (['datam_begin', 'datam_end'].includes(n)) return |
| | | |
| | | _sql = _sql.replace(new RegExp('@' + n + '@', 'ig'), `'@${n}@'`) |
| | | }) |
| | | if (/@db@/ig.test(_sql)) { |
| | | reps.push('db') |
| | | } |
| | |
| | | |
| | | return true |
| | | }) |
| | | |
| | | |
| | | if (/\$@/ig.test(sql)) { |
| | | sql = sql.replace(/\$@/ig, ' @datam_begin@ ').replace(/@\$/ig, ' @datam_end@ ') |
| | | reps.push('datam_begin', 'datam_end') |
| | | } |
| | | reps.forEach(n => { |
| | | if (['orderBy', 'pageSize', 'pageIndex'].includes(n)) return |
| | | if (['orderBy', 'pageSize', 'pageIndex', 'datam_begin', 'datam_end'].includes(n)) return |
| | | |
| | | sql = sql.replace(new RegExp('@' + n + '@', 'ig'), `'@${n}@'`) |
| | | }) |
| | | if (/\$@/ig.test(sql)) { |
| | | sql = sql.replace(/\$@/ig, '@datam_begin@').replace(/@\$/ig, '@datam_end@') |
| | | reps.push('datam_begin', 'datam_end') |
| | | } |
| | | if (/@db@/ig.test(sql)) { |
| | | reps.push('db') |
| | | } |
| | |
| | | return true |
| | | }) |
| | | |
| | | reps.forEach(n => { |
| | | sql = sql.replace(new RegExp('@' + n + '@', 'ig'), `'@${n}@'`) |
| | | }) |
| | | |
| | | if (/\$@/ig.test(sql)) { |
| | | sql = sql.replace(/\$@/ig, '@datam_begin@').replace(/@\$/ig, '@datam_end@') |
| | | sql = sql.replace(/\$@/ig, ' @datam_begin@ ').replace(/@\$/ig, ' @datam_end@ ') |
| | | reps.push('datam_begin', 'datam_end') |
| | | } |
| | | if (/\$check@|@check\$/ig.test(sql)) { |
| | | sql = sql.replace(/\$check@/ig, '@mk_check_begin@').replace(/@check\$/ig, '@mk_check_end@') |
| | | sql = sql.replace(/\$check@/ig, ' @mk_check_begin@ ').replace(/@check\$/ig, ' @mk_check_end@ ') |
| | | reps.push('mk_check_begin', 'mk_check_end') |
| | | } |
| | | reps.forEach(n => { |
| | | if (['datam_begin', 'datam_end', 'mk_check_begin', 'mk_check_end'].includes(n)) return |
| | | |
| | | sql = sql.replace(new RegExp('@' + n + '@', 'ig'), `'@${n}@'`) |
| | | }) |
| | | |
| | | if (/@db@/ig.test(sql)) { |
| | | reps.push('db') |
| | | } |
| | |
| | | return true |
| | | }) |
| | | |
| | | reps.forEach(n => { |
| | | sql = sql.replace(new RegExp('@' + n + '@', 'ig'), `'@${n}@'`) |
| | | }) |
| | | |
| | | if (/\$@/ig.test(sql)) { |
| | | sql = sql.replace(/\$@/ig, '@datam_begin@').replace(/@\$/ig, '@datam_end@') |
| | | sql = sql.replace(/\$@/ig, ' @datam_begin@ ').replace(/@\$/ig, ' @datam_end@ ') |
| | | reps.push('datam_begin', 'datam_end') |
| | | } |
| | | reps.forEach(n => { |
| | | if (['datam_begin', 'datam_end'].includes(n)) return |
| | | |
| | | sql = sql.replace(new RegExp('@' + n + '@', 'ig'), `'@${n}@'`) |
| | | }) |
| | | if (/@db@/ig.test(sql)) { |
| | | reps.push('db') |
| | | } |
| | |
| | | return true |
| | | }) |
| | | |
| | | reps.forEach(n => { |
| | | _sql = _sql.replace(new RegExp('@' + n + '@', 'ig'), `'@${n}@'`) |
| | | }) |
| | | |
| | | if (/\$@/ig.test(_sql)) { |
| | | _sql = _sql.replace(/\$@/ig, '@datam_begin@').replace(/@\$/ig, '@datam_end@') |
| | | _sql = _sql.replace(/\$@/ig, ' @datam_begin@ ').replace(/@\$/ig, ' @datam_end@ ') |
| | | reps.push('datam_begin', 'datam_end') |
| | | } |
| | | reps.forEach(n => { |
| | | if (['datam_begin', 'datam_end'].includes(n)) return |
| | | |
| | | _sql = _sql.replace(new RegExp('@' + n + '@', 'ig'), `'@${n}@'`) |
| | | }) |
| | | if (/@db@/ig.test(_sql)) { |
| | | reps.push('db') |
| | | } |
| | |
| | | |
| | | reps.push(...sysVars) |
| | | |
| | | reps.forEach(n => { |
| | | sql = sql.replace(new RegExp('@' + n + '@', 'ig'), `'@${n}@'`) |
| | | }) |
| | | |
| | | if (/\$@/ig.test(sql)) { |
| | | sql = sql.replace(/\$@/ig, '@datam_begin@').replace(/@\$/ig, '@datam_end@') |
| | | sql = sql.replace(/\$@/ig, ' @datam_begin@ ').replace(/@\$/ig, ' @datam_end@ ') |
| | | reps.push('datam_begin', 'datam_end') |
| | | } |
| | | reps.forEach(n => { |
| | | if (['datam_begin', 'datam_end'].includes(n)) return |
| | | |
| | | sql = sql.replace(new RegExp('@' + n + '@', 'ig'), `'@${n}@'`) |
| | | }) |
| | | if (/@db@/ig.test(sql)) { |
| | | reps.push('db') |
| | | } |
| | |
| | | return true |
| | | }) |
| | | |
| | | if (/\$@/ig.test(sql)) { |
| | | sql = sql.replace(/\$@/ig, ' @datam_begin@ ').replace(/@\$/ig, ' @datam_end@ ') |
| | | reps.push('datam_begin', 'datam_end') |
| | | } |
| | | reps.forEach(n => { |
| | | if (['orderBy', 'pageSize', 'pageIndex'].includes(n)) return |
| | | if (['orderBy', 'pageSize', 'pageIndex', 'datam_begin', 'datam_end'].includes(n)) return |
| | | |
| | | sql = sql.replace(new RegExp('@' + n + '@', 'ig'), `'@${n}@'`) |
| | | }) |
| | | if (/\$@/ig.test(sql)) { |
| | | sql = sql.replace(/\$@/ig, '@datam_begin@').replace(/@\$/ig, '@datam_end@') |
| | | reps.push('datam_begin', 'datam_end') |
| | | } |
| | | if (/@db@/ig.test(sql)) { |
| | | reps.push('db') |
| | | } |
| | |
| | | } |
| | | }) |
| | | |
| | | reps.forEach(n => { |
| | | _script = _script.replace(new RegExp('@' + n + '@', 'ig'), `'@${n}@'`) |
| | | }) |
| | | if (/\$@/ig.test(_script)) { |
| | | _script = _script.replace(/\$@/ig, '@datam_begin@').replace(/@\$/ig, '@datam_end@') |
| | | _script = _script.replace(/\$@/ig, ' @datam_begin@ ').replace(/@\$/ig, ' @datam_end@ ') |
| | | reps.push('datam_begin', 'datam_end') |
| | | } |
| | | reps.forEach(n => { |
| | | if (['datam_begin', 'datam_end'].includes(n)) return |
| | | |
| | | _script = _script.replace(new RegExp('@' + n + '@', 'ig'), `'@${n}@'`) |
| | | }) |
| | | if (/@db@/ig.test(_script)) { |
| | | reps.push('db') |
| | | } |
| | |
| | | } |
| | | }) |
| | | |
| | | if (/\$@/ig.test(testSql)) { |
| | | _prev = _prev.replace(/\$@/ig, ' @datam_begin@ ').replace(/@\$/ig, ' @datam_end@ ') |
| | | _back = _back.replace(/\$@/ig, ' @datam_begin@ ').replace(/@\$/ig, ' @datam_end@ ') |
| | | reps.push('datam_begin', 'datam_end') |
| | | } |
| | | reps.forEach(n => { |
| | | if (['datam_begin', 'datam_end'].includes(n)) return |
| | | |
| | | _prev = _prev.replace(new RegExp('@' + n + '@', 'ig'), `'@${n}@'`) |
| | | _back = _back.replace(new RegExp('@' + n + '@', 'ig'), `'@${n}@'`) |
| | | }) |
| | | if (/\$@/ig.test(testSql)) { |
| | | _prev = _prev.replace(/\$@/ig, '@datam_begin@').replace(/@\$/ig, '@datam_end@') |
| | | _back = _back.replace(/\$@/ig, '@datam_begin@').replace(/@\$/ig, '@datam_end@') |
| | | reps.push('datam_begin', 'datam_end') |
| | | } |
| | | if (/@db@/ig.test(testSql)) { |
| | | reps.push('db') |
| | | } |
| | |
| | | * @return {Array} columns 显示列 |
| | | * @return {Boolean} retmsg 是否需要数据返回 |
| | | */ |
| | | export function getSysDefaultSql (btn, setting, formdata, param, data, columns, retmsg = false) { |
| | | export function getSysDefaultSql (btn, setting, formdata, param, data, columns, retmsg = false, submitType = '') { |
| | | let primaryId = param.ID |
| | | let BID = param.BID || '' |
| | | let verify = btn.verify || {} |
| | |
| | | }) |
| | | |
| | | // 需要声明的变量集 |
| | | 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'] |
| | | 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'] |
| | | |
| | | // 主键字段 |
| | | let primaryKey = setting.primaryKey || 'id' |
| | |
| | | _declarefields = ',' + _declarefields |
| | | } |
| | | _sql = `/* 系统生成 */ |
| | | Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50),@ModularDetailCode nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@mk_deleted int,@bid nvarchar(50)${_declarefields} |
| | | Declare @tbid nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@BillCode nvarchar(50),@BVoucher nvarchar(50),@FIBVoucherDate nvarchar(50), @FiYear nvarchar(50),@ModularDetailCode nvarchar(50), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(512),@mk_organization nvarchar(512),@mk_user_type nvarchar(20),@mk_nation nvarchar(50),@mk_province nvarchar(50),@mk_city nvarchar(50),@mk_district nvarchar(50),@mk_address nvarchar(100),@mk_deleted int,@bid nvarchar(50),@mk_submit_type nvarchar(50)${_declarefields} |
| | | ` |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | |
| | | // 初始化凭证及用户信息字段 |
| | | _sql += ` |
| | | /* 凭证及用户信息初始化赋值 */ |
| | | select @BVoucher='',@FIBVoucherDate='',@FiYear='',@ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}', @mk_deleted=1, @bid='${BID}', @BillCode='', @ModularDetailCode='' |
| | | select @BVoucher='',@FIBVoucherDate='',@FiYear='',@ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @mk_user_type='${mk_user_type}', @mk_nation='${nation}', @mk_province='${province}', @mk_city='${city}', @mk_district='${district}', @mk_address='${address}', @mk_deleted=1, @bid='${BID}', @mk_submit_type='${submitType}', @BillCode='', @ModularDetailCode='' |
| | | ` |
| | | |
| | | // 表单变量赋值 |
| | |
| | | } |
| | | |
| | | cell.userbind = _param.userbind || '' |
| | | cell.instantMessage = _param.instantMessage || '' |
| | | } |
| | | |
| | | if (cell.user_binding !== 'true') { |
| | |
| | | sublist = sublist.map(item => { |
| | | if (item.typename !== 'pc') { |
| | | item.userbind = md5(selectApp.kei_no + item.typename + item.lang).replace(/^.{8}/, 'userbind') |
| | | item.instantMessage = md5(selectApp.kei_no + item.typename + item.lang).replace(/^.{14}/, 'instantmessage') |
| | | } |
| | | return item |
| | | }) |
| | |
| | | selectApp.sublist = selectApp.sublist.map(item => { |
| | | if (item.typename !== 'pc') { |
| | | item.userbind = md5(selectApp.kei_no + item.typename + item.lang).replace(/^.{8}/, 'userbind') |
| | | item.instantMessage = md5(selectApp.kei_no + item.typename + item.lang).replace(/^.{14}/, 'instantmessage') |
| | | } |
| | | return item |
| | | }) |
| | |
| | | } |
| | | if (item.userbind) { |
| | | _par.userbind = item.userbind |
| | | } |
| | | if (item.instantMessage) { |
| | | _par.instantMessage = item.instantMessage |
| | | } |
| | | if (item.apptype) { |
| | | _par.apptype = item.apptype |
| | |
| | | sublist = sublist.map(item => { |
| | | if (item.typename !== 'pc') { |
| | | item.userbind = md5(selectApp.kei_no + item.typename + item.lang).replace(/^.{8}/, 'userbind') |
| | | item.instantMessage = md5(selectApp.kei_no + item.typename + item.lang).replace(/^.{14}/, 'instantmessage') |
| | | } |
| | | return item |
| | | }) |
| | |
| | | if (result.status) { |
| | | let menus = [] |
| | | result.menus.forEach(item => { |
| | | if (zhApp.userbind === item.MenuID || zhApp.instantMessage === item.MenuID) return |
| | | if (zhApp.userbind === item.MenuID) return |
| | | |
| | | menus.push(item) |
| | | }) |
| | |
| | | {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}{cell.PageParam.pds === 'true' ? <DatabaseOutlined style={{marginLeft: '5px', color: 'inherit'}} title="菜单中使用了公共数据源" /> : null}</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: 'orange'}} title="菜单中使用了公共数据源" /> : null}</span> |
| | | </Menu.Item> |
| | | ) |
| | | })} |
| | |
| | | sessionStorage.setItem('sysBgColor', param.sysBgColor || '#ffffff') |
| | | sessionStorage.setItem('direction', param.direction || 'vertical') |
| | | sessionStorage.setItem('userbind', param.userbind || '') |
| | | sessionStorage.setItem('instantMessage', param.instantMessage || '') |
| | | |
| | | if (param.applangList) { |
| | | sessionStorage.setItem('applangList', param.applangList) |
| | |
| | | // if (sessionStorage.getItem('userbind')) { |
| | | // appIndeList = appIndeList + ',' + sessionStorage.getItem('userbind') |
| | | // } |
| | | if (sessionStorage.getItem('instantMessage')) { |
| | | appIndeList = appIndeList + ',' + sessionStorage.getItem('instantMessage') |
| | | } |
| | | |
| | | let menus = res.menus.filter(item => appIndeList.indexOf(item.MenuID) === -1) |
| | | menus = menus.map(item => { |
| | |
| | | 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' || 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}>{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={{color: 'orange', marginLeft: '5px'}} title="菜单中使用了公共数据源" /> : null}</span> |
| | | } |
| | | return <span className={className}>{text}</span> |
| | | } |
| | |
| | | Api.getCloudConfig(param).then(result => { |
| | | if (result.status) { |
| | | let ub = app.user_binding === 'true' && app.userbind ? false : true |
| | | let im = app.instantMessage ? false : true |
| | | |
| | | let menus = result.menus.map(item => { |
| | | item.nodes = '' |
| | |
| | | item.type = pageParam.type |
| | | } |
| | | |
| | | if (item.type === 'navbar' || item.type === 'im') { |
| | | if (item.type === 'navbar') { |
| | | item.backend = 'level1' |
| | | } |
| | | |
| | | if (pageParam.version !== '1.0') { |
| | | item.nodes = '' |
| | | } else if (pageParam.login || pageParam.pass) { |
| | | item.nodes = '' |
| | | } else if (pageParam.type === 'im') { |
| | | item.nodes = '' |
| | | } |
| | | } catch (e) { |
| | |
| | | item.extra = true |
| | | ub = true |
| | | } |
| | | if (app.instantMessage === item.MenuID) { |
| | | item.extra = true |
| | | im = true |
| | | } |
| | | |
| | | return item |
| | | }) |
| | | |
| | | if (!im) { |
| | | menus.push({nodes: '', type: 'none', backend: 'level1', extra: true, MenuID: app.instantMessage, MenuName: '即时通信'}) |
| | | } |
| | | if (!ub) { |
| | | menus.push({nodes: '', type: 'none', backend: 'level1', extra: true, MenuID: app.userbind, MenuName: '用户绑定'}) |
| | | } |
| | |
| | | item.nodes = '' |
| | | } else if (pageParam.login || pageParam.pass) { |
| | | item.nodes = '' |
| | | } else if (pageParam.type === 'im') { |
| | | item.nodes = '' |
| | | } |
| | | } catch (e) { |
| | | item.nodes = '' |
| | |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | if (app.instantMessage && item.MenuID === app.instantMessage) { |
| | | route = 'imdesign' |
| | | } |
| | | |
| | | window.open(window.location.href.replace(/#.+/ig, `#/${route}/${window.btoa(window.encodeURIComponent(JSON.stringify({...app, MenuID: item.MenuID, type: 'app'})))}`)) |