| | |
| | | background-color: transparent; |
| | | .ant-progress-bg { |
| | | height: 4px!important; |
| | | background-color: var(--antd-wave-shadow-color); |
| | | background-color: var(--mk-sys-color); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | body.mk-blue-black { |
| | | --antd-wave-shadow-color: #1890ff; |
| | | --mk-sys-color: #1890ff; |
| | | @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65), #e6f7ff, #bae7ff, #91d5ff, #69c0ff, #40a9ff, #1890ff, #096dd9, #0050b3, #003a8c, #002766); |
| | | @include bgblack(); |
| | | } |
| | | body.mk-blue-white { |
| | | --antd-wave-shadow-color: #1890ff; |
| | | --mk-sys-color: #1890ff; |
| | | @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #e6f7ff, #bae7ff, #91d5ff, #69c0ff, #40a9ff, #1890ff, #096dd9, #0050b3, #003a8c, #002766); |
| | | } |
| | | body.mk-red-black { |
| | | --antd-wave-shadow-color: #f5222d; |
| | | --mk-sys-color: #f5222d; |
| | | @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65), #fff1f0, #ffccc7, #ffa39e, #ff7875, #ff4d4f, #f5222d, #cf1322, #a8071a, #820014, #5c0011); |
| | | @include bgblack(); |
| | | } |
| | | body.mk-red-white { |
| | | --antd-wave-shadow-color: #f5222d; |
| | | --mk-sys-color: #f5222d; |
| | | @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fff1f0, #ffccc7, #ffa39e, #ff7875, #ff4d4f, #f5222d, #cf1322, #a8071a, #820014, #5c0011); |
| | | } |
| | | body.mk-orange-red-black { |
| | | --antd-wave-shadow-color: #fa541c; |
| | | --mk-sys-color: #fa541c; |
| | | @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65), #fff2e8, #ffd8bf, #ffbb96, #ff9c6e, #ff7a45, #fa541c, #d4380d, #ad2102, #871400, #610b00); |
| | | @include bgblack(); |
| | | } |
| | | body.mk-orange-red-white { |
| | | --antd-wave-shadow-color: #fa541c; |
| | | --mk-sys-color: #fa541c; |
| | | @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fff2e8, #ffd8bf, #ffbb96, #ff9c6e, #ff7a45, #fa541c, #d4380d, #ad2102, #871400, #610b00); |
| | | } |
| | | body.mk-orange-black { |
| | | --antd-wave-shadow-color: #fa8c16; |
| | | --mk-sys-color: #fa8c16; |
| | | @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65), #fff7e6, #ffe7ba, #ffd591, #ffc069, #ffa940, #fa8c16, #d46b08, #ad4e00, #873800, #612500); |
| | | @include bgblack(); |
| | | } |
| | | body.mk-orange-white { |
| | | --antd-wave-shadow-color: #fa8c16; |
| | | --mk-sys-color: #fa8c16; |
| | | @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fff7e6, #ffe7ba, #ffd591, #ffc069, #ffa940, #fa8c16, #d46b08, #ad4e00, #873800, #612500); |
| | | } |
| | | body.mk-orange-yellow-black { |
| | | --antd-wave-shadow-color: #faad14; |
| | | --mk-sys-color: #faad14; |
| | | @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#fffbe6, #fff1b8, #ffe58f, #ffd666, #ffc53d, #faad14, #d48806, #ad6800, #874d00, #613400); |
| | | @include bgblack(); |
| | | } |
| | | body.mk-orange-yellow-white { |
| | | --antd-wave-shadow-color: #faad14; |
| | | --mk-sys-color: #faad14; |
| | | @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fffbe6, #fff1b8, #ffe58f, #ffd666, #ffc53d, #faad14, #d48806, #ad6800, #874d00, #613400); |
| | | } |
| | | body.mk-yellow-black { |
| | | --antd-wave-shadow-color: #fadb14; |
| | | --mk-sys-color: #fadb14; |
| | | @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#feffe6, #ffffb8, #fffb8f, #fff566, #ffec3d, #fadb14, #d4b106, #ad8b00, #876800, #614700); |
| | | @include bgblack(); |
| | | } |
| | | body.mk-yellow-white { |
| | | --antd-wave-shadow-color: #fadb14; |
| | | --mk-sys-color: #fadb14; |
| | | @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #feffe6, #ffffb8, #fffb8f, #fff566, #ffec3d, #fadb14, #d4b106, #ad8b00, #876800, #614700); |
| | | } |
| | | body.mk-yellow-green-black { |
| | | --antd-wave-shadow-color: #a0d911; |
| | | --mk-sys-color: #a0d911; |
| | | @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#fcffe6, #f4ffb8, #eaff8f, #d3f261, #bae637, #a0d911, #7cb305, #5b8c00, #3f6600, #254000); |
| | | @include bgblack(); |
| | | } |
| | | body.mk-yellow-green-white { |
| | | --antd-wave-shadow-color: #a0d911; |
| | | --mk-sys-color: #a0d911; |
| | | @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fcffe6, #f4ffb8, #eaff8f, #d3f261, #bae637, #a0d911, #7cb305, #5b8c00, #3f6600, #254000); |
| | | } |
| | | body.mk-green-black { |
| | | --antd-wave-shadow-color: #52c41a; |
| | | --mk-sys-color: #52c41a; |
| | | @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#f6ffed, #d9f7be, #b7eb8f, #95de64, #73d13d, #52c41a, #389e0d, #237804, #135200, #092b00); |
| | | @include bgblack(); |
| | | } |
| | | body.mk-green-white { |
| | | --antd-wave-shadow-color: #52c41a; |
| | | --mk-sys-color: #52c41a; |
| | | @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #f6ffed, #d9f7be, #b7eb8f, #95de64, #73d13d, #52c41a, #389e0d, #237804, #135200, #092b00); |
| | | } |
| | | body.mk-cyan-black { |
| | | --antd-wave-shadow-color: #13c2c2; |
| | | --mk-sys-color: #13c2c2; |
| | | @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#e6fffb, #b5f5ec, #87e8de, #5cdbd3, #36cfc9, #13c2c2, #08979c, #006d75, #00474f, #002329); |
| | | @include bgblack(); |
| | | } |
| | | body.mk-cyan-white { |
| | | --antd-wave-shadow-color: #13c2c2; |
| | | --mk-sys-color: #13c2c2; |
| | | @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #e6fffb, #b5f5ec, #87e8de, #5cdbd3, #36cfc9, #13c2c2, #08979c, #006d75, #00474f, #002329); |
| | | } |
| | | body.mk-blue-purple-black { |
| | | --antd-wave-shadow-color: #2f54eb; |
| | | --mk-sys-color: #2f54eb; |
| | | @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#f0f5ff, #d6e4ff, #adc6ff, #85a5ff, #597ef7, #2f54eb, #1d39c4, #10239e, #061178, #030852); |
| | | @include bgblack(); |
| | | } |
| | | body.mk-blue-purple-white { |
| | | --antd-wave-shadow-color: #2f54eb; |
| | | --mk-sys-color: #2f54eb; |
| | | @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #f0f5ff, #d6e4ff, #adc6ff, #85a5ff, #597ef7, #2f54eb, #1d39c4, #10239e, #061178, #030852); |
| | | } |
| | | body.mk-purple-black { |
| | | --antd-wave-shadow-color: #722ed1; |
| | | --mk-sys-color: #722ed1; |
| | | @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#f9f0ff, #efdbff, #d3adf7, #b37feb, #9254de, #722ed1, #531dab, #391085, #22075e, #120338); |
| | | @include bgblack(); |
| | | } |
| | | body.mk-purple-white { |
| | | --antd-wave-shadow-color: #722ed1; |
| | | --mk-sys-color: #722ed1; |
| | | @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #f9f0ff, #efdbff, #d3adf7, #b37feb, #9254de, #722ed1, #531dab, #391085, #22075e, #120338); |
| | | } |
| | | body.mk-magenta-black { |
| | | --antd-wave-shadow-color: #eb2f96; |
| | | --mk-sys-color: #eb2f96; |
| | | @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#fff0f6, #ffd6e7, #ffadd2, #ff85c0, #f759ab, #eb2f96, #c41d7f, #9e1068, #780650, #520339); |
| | | @include bgblack(); |
| | | } |
| | | body.mk-magenta-white { |
| | | --antd-wave-shadow-color: #eb2f96; |
| | | --mk-sys-color: #eb2f96; |
| | | @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fff0f6, #ffd6e7, #ffadd2, #ff85c0, #f759ab, #eb2f96, #c41d7f, #9e1068, #780650, #520339); |
| | | } |
| | | body.mk-grass-green-black { |
| | | --antd-wave-shadow-color: #aeb303; |
| | | --mk-sys-color: #aeb303; |
| | | @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#f2efda, #e6de97, #d9d26c, #ccc845, #bfbf22, #aeb303, #838c00, #5c6600, #374000, #151a00); |
| | | @include bgblack(); |
| | | } |
| | | body.mk-grass-green-white { |
| | | --antd-wave-shadow-color: #aeb303; |
| | | --mk-sys-color: #aeb303; |
| | | @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #f2efda, #e6de97, #d9d26c, #ccc845, #bfbf22, #aeb303, #838c00, #5c6600, #374000, #151a00); |
| | | } |
| | | body.mk-deep-red-black { |
| | | --antd-wave-shadow-color: #c32539; |
| | | --mk-sys-color: #c32539; |
| | | @include viewstyle(#000000, #434343,rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65),#fff0f0, #f5cbcb, #e89b9e, #db7077, #cf4856, #c32539, #9c162c, #750b20, #4f0315, #29010c); |
| | | @include bgblack(); |
| | | } |
| | | body.mk-deep-red-white { |
| | | --antd-wave-shadow-color: #c32539; |
| | | --mk-sys-color: #c32539; |
| | | @include viewstyle(#ffffff, #ffffff, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.65), #fff0f0, #f5cbcb, #e89b9e, #db7077, #cf4856, #c32539, #9c162c, #750b20, #4f0315, #29010c); |
| | | } |
| | |
| | | min: 0, |
| | | label: '内容', |
| | | initVal: card.value || '', |
| | | tooltip: '文本类型,会替换内容中的@username@、@fullName@、@login_city@、@appname@。', |
| | | tooltip: '文本类型,会替换内容中的@username@、@fullName@、@mk_city@、@appname@。', |
| | | required: true |
| | | }, |
| | | { |
| | |
| | | border-radius: 2px; |
| | | margin-right: 2px; |
| | | padding: 2px 6px; |
| | | background: #ffffff; |
| | | } |
| | | .ant-tag-checkable-checked { |
| | | border-color: #1890ff; |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | const { value } = this.props |
| | | const { value, initialValue } = this.props |
| | | let val = '' |
| | | |
| | | if (value) { |
| | | val = value |
| | | } else if (initialValue) { |
| | | val = initialValue |
| | | } else if (this.props['data-__meta']) { |
| | | val = this.props['data-__meta'].initialValue || '' |
| | | } |
| | |
| | | </Col> |
| | | {usefulfields ? <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | BID, ID, LoginUID, SessionUid, UserID, Appkey, UserName, FullName, RoleID, mk_departmentcode, mk_organization, login_city, {usefulfields},data_type(注:jskey为主键值,新增时前端生成;data_type为操作类型,新增 - add、修改 - upt、删除 - del) |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey</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</span></Tooltip>, |
| | | {usefulfields},data_type(注:jskey为主键值,新增时前端生成;data_type为操作类型,新增 - add、修改 - upt、删除 - del) |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={8} style={{whiteSpace: 'nowrap'}}> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Form, Row, Col, Button, notification, Select } from 'antd' |
| | | import { Form, Row, Col, Button, notification, Select, Tooltip } from 'antd' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import CodeMirror from '@/templates/zshare/codemirror' |
| | |
| | | } |
| | | } |
| | | |
| | | let urlFields = window.GLOB.urlFields ? window.GLOB.urlFields.join(', ') : '' |
| | | |
| | | return ( |
| | | <Form {...formItemLayout} className="modal-menu-setting-script"> |
| | | <Row gutter={24}> |
| | |
| | | </Col> |
| | | <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, RoleID, mk_departmentcode, mk_organization, login_city, appkey, time_id, orderBy, pageSize, pageIndex{usefulFields ? ', ' + usefulFields : ''}{window.GLOB.urlFields && window.GLOB.urlFields.length > 0 ? ', ' + window.GLOB.urlFields.join(', ') : ''} |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, 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</span></Tooltip>, |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'排序、分页以及搜索条件变量,请按照@xxx@格式使用。'}>orderBy, pageSize, pageIndex{usefulFields ? ', ' + usefulFields : ''}</Tooltip> |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'url变量,请按照@xxx@格式使用。'}>{urlFields ? ', ' : ''}<span style={{color: '#13c2c2'}}>{urlFields}</span></Tooltip> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={10} style={{width: '43%'}}> |
| | |
| | | _dataresource = _dataresource.replace(/@sum\$/ig, '@sum$*/') |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | |
| | | |
| | | if (_customScript) { |
| | | _regoptions.push({ |
| | | reg: new RegExp('@login_city@', 'ig'), |
| | | }, { |
| | | reg: new RegExp('@orderBy@', 'ig'), |
| | | }, { |
| | | reg: new RegExp('@UserName@', 'ig'), |
| | |
| | | ` |
| | | } else { |
| | | sumSql = `/* sql sum验证 */ |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) select @ErrorCode='',@retmsg ='' |
| | | ${_sql}` |
| | | } |
| | | } |
| | |
| | | ` |
| | | } else { |
| | | sql = `/* sql 验证 */ |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) select @ErrorCode='',@retmsg ='' |
| | | ${_dataresource}` |
| | | } |
| | | sql = sql.replace(/\n\s{8}/ig, '\n') |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Form, Row, Col, Button, notification, Select, Popconfirm, Typography, Modal, Radio } from 'antd' |
| | | import { Form, Row, Col, Button, notification, Select, Popconfirm, Typography, Modal, Radio, Tooltip } from 'antd' |
| | | import { StopTwoTone, SwapOutlined, EditOutlined, CheckCircleTwoTone, DeleteOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | |
| | |
| | | </Col> |
| | | <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | bid, loginuid, sessionuid, userid, username, fullname, RoleID, mk_departmentcode, mk_organization, login_city, appkey, time_id |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, 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</span></Tooltip> |
| | | </Form.Item> |
| | | </Col> |
| | | {type === 'back' ? <Col span={8} style={{whiteSpace: 'nowrap'}}> |
| | |
| | | }) |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | | |
| | | _customScript = _customScript.replace(/@\$|\$@/ig, '') |
| | | _customScript = _customScript.replace(/@userName@|@fullName@|@login_city@/ig, `''`) |
| | | _customScript = _customScript.replace(/@userName@|@fullName@/ig, `''`) |
| | | // 外联数据库替换 |
| | | if (window.GLOB.externalDatabase !== null) { |
| | | _customScript = _customScript.replace(/@db@/ig, window.GLOB.externalDatabase) |
| | |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | |
| | | let regs = [ |
| | | { reg: /@userName@/ig, value: `'${userName}'` }, |
| | | { reg: /@fullName@/ig, value: `'${fullName}'` }, |
| | | { reg: /@login_city@/ig, value: `'${city}'` } |
| | | { reg: /@fullName@/ig, value: `'${fullName}'` } |
| | | ] |
| | | |
| | | regs.forEach(cell => { |
| | |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let departmentcode = sessionStorage.getItem('departmentcode') || '' |
| | | let organization = sessionStorage.getItem('organization') || '' |
| | | let mk_user_type = sessionStorage.getItem('mk_user_type') || '' |
| | | let nation = sessionStorage.getItem('nation') || '' |
| | | let province = sessionStorage.getItem('province') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | let district = sessionStorage.getItem('district') || '' |
| | | let address = sessionStorage.getItem('address') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | } |
| | | }) |
| | | regoptions.push({ |
| | | reg: new RegExp('@login_city@', 'ig'), |
| | | value: city |
| | | }, { |
| | | reg: new RegExp('@userName@', 'ig'), |
| | | value: userName |
| | | }, { |
| | |
| | | param.custom_script = param.custom_script.replace(item.reg, item.value) |
| | | }) |
| | | |
| | | param.custom_script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' |
| | | param.custom_script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) |
| | | Select @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}' |
| | | ${param.custom_script} |
| | | ` |
| | | |
| | |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | |
| | | let regs = [ |
| | | { reg: /@userName@/ig, value: `'${userName}'` }, |
| | | { reg: /@fullName@/ig, value: `'${fullName}'` }, |
| | | { reg: /@login_city@/ig, value: `'${city}'` } |
| | | { reg: /@fullName@/ig, value: `'${fullName}'` } |
| | | ] |
| | | |
| | | regs.forEach(cell => { |
| | |
| | | |
| | | if (card.datatype === 'static') { |
| | | val = card.value || '' |
| | | if (/@username@|@fullName@|@login_city@/ig.test(val)) { |
| | | if (/@username@|@fullName@|@mk_city@/ig.test(val)) { |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | val = val.replace(/@username@/ig, userName).replace(/@fullName@/ig, fullName).replace(/@login_city@/ig, city) |
| | | val = val.replace(/@username@/ig, userName).replace(/@fullName@/ig, fullName).replace(/@mk_city@/ig, city) |
| | | } |
| | | } else if (data.hasOwnProperty(card.field)) { |
| | | val = data[card.field] |
| | |
| | | text-decoration: inherit; |
| | | color: inherit; |
| | | .anticon-copy { |
| | | color: var(--antd-wave-shadow-color); |
| | | color: var(--mk-sys-color); |
| | | } |
| | | } |
| | | .ant-mk-text { |
| | |
| | | left: 0px; |
| | | right: 0px; |
| | | bottom: 0px; |
| | | border: 1px solid var(--antd-wave-shadow-color); |
| | | border: 1px solid var(--mk-sys-color); |
| | | height: auto; |
| | | border-radius: 0; |
| | | box-shadow: none!important; |
| | |
| | | left: 0px; |
| | | right: 0px; |
| | | bottom: 0px; |
| | | border: 1px solid var(--antd-wave-shadow-color); |
| | | border: 1px solid var(--mk-sys-color); |
| | | } |
| | | } |
| | | .anticon-exclamation-circle { |
| | |
| | | } |
| | | } |
| | | |
| | | .ant-timeline-item { |
| | | padding-bottom: 0px; |
| | | } |
| | | |
| | | .card-row-list { |
| | | overflow-y: auto; |
| | | padding: 15px; |
| | |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | |
| | | let regs = [ |
| | | { reg: /@userName@/ig, value: `'${userName}'` }, |
| | | { reg: /@fullName@/ig, value: `'${fullName}'` }, |
| | | { reg: /@login_city@/ig, value: `'${city}'` } |
| | | { reg: /@fullName@/ig, value: `'${fullName}'` } |
| | | ] |
| | | |
| | | if (window.GLOB.externalDatabase !== null) { |
| | |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | |
| | | let regs = [ |
| | | { reg: /@userName@/ig, value: `'${userName}'` }, |
| | | { reg: /@fullName@/ig, value: `'${fullName}'` }, |
| | | { reg: /@login_city@/ig, value: `'${city}'` } |
| | | { reg: /@fullName@/ig, value: `'${fullName}'` } |
| | | ] |
| | | |
| | | regs.forEach(cell => { |
| | |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | |
| | | let regs = [ |
| | | { reg: /@userName@/ig, value: `'${userName}'` }, |
| | | { reg: /@fullName@/ig, value: `'${fullName}'` }, |
| | | { reg: /@login_city@/ig, value: `'${city}'` } |
| | | { reg: /@fullName@/ig, value: `'${fullName}'` } |
| | | ] |
| | | |
| | | regs.forEach(cell => { |
| | |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | |
| | | let regs = [ |
| | | { reg: /@userName@/ig, value: `'${userName}'` }, |
| | | { reg: /@fullName@/ig, value: `'${fullName}'` }, |
| | | { reg: /@login_city@/ig, value: `'${city}'` } |
| | | { reg: /@fullName@/ig, value: `'${fullName}'` } |
| | | ] |
| | | |
| | | regs.forEach(cell => { |
| | |
| | | sessionStorage.setItem('role_id', res.role_id || '') |
| | | sessionStorage.setItem('departmentcode', res.departmentcode || '') |
| | | sessionStorage.setItem('organization', res.organization || '') |
| | | sessionStorage.setItem('mk_user_type', res.mk_user_type || '') |
| | | sessionStorage.setItem('localRole_id', res.role_id || '') |
| | | |
| | | sessionStorage.removeItem('CloudAvatar') |
| | |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let departmentcode = sessionStorage.getItem('departmentcode') || '' |
| | | let organization = sessionStorage.getItem('organization') || '' |
| | | let mk_user_type = sessionStorage.getItem('mk_user_type') || '' |
| | | let nation = sessionStorage.getItem('nation') || '' |
| | | let province = sessionStorage.getItem('province') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | let district = sessionStorage.getItem('district') || '' |
| | | let address = sessionStorage.getItem('address') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | }) |
| | | |
| | | regoptions.push({ |
| | | reg: new RegExp('@login_city@', 'ig'), |
| | | value: city |
| | | }, { |
| | | reg: new RegExp('@userName@', 'ig'), |
| | | value: userName |
| | | }, { |
| | |
| | | } |
| | | |
| | | if (param.custom_script) { |
| | | param.custom_script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' |
| | | param.custom_script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) select @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}' |
| | | ${param.custom_script} |
| | | ` |
| | | regoptions.forEach(item => { |
| | |
| | | ` |
| | | } |
| | | } else if (LText) { |
| | | LText = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' |
| | | LText = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) select @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}' |
| | | ${LText} |
| | | ` |
| | | } |
| | |
| | | } |
| | | } |
| | | .ip-item.active { |
| | | border-color: var(--antd-wave-shadow-color); |
| | | box-shadow: 0 0 2px var(--antd-wave-shadow-color); |
| | | border-color: var(--mk-sys-color); |
| | | box-shadow: 0 0 2px var(--mk-sys-color); |
| | | } |
| | | } |
| | |
| | | .ant-form-item { |
| | | display: flex; |
| | | } |
| | | .ant-form-item.checkcard, .ant-form-item.file-upload { |
| | | .ant-form-item.checkcard { |
| | | .ant-form-item-control { |
| | | line-height: 1; |
| | | } |
| | | } |
| | | .ant-form-item.file-upload { |
| | | margin-bottom: 10px; |
| | | .ant-form-item-control { |
| | | line-height: 1; |
| | |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Col, Row } from 'antd' |
| | | import { CheckOutlined } from '@ant-design/icons' |
| | | |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | const { config } = this.props |
| | | let config = fromJS(this.props.config).toJS() |
| | | |
| | | let selectKeys = config.initval |
| | | if (config.multiple === 'true') { |
| | | selectKeys = config.initval ? config.initval.split(',') : [] |
| | | } |
| | | |
| | | if (!config.selectStyle && config.backgroundColor) { |
| | | config.selectStyle = 'custom' |
| | | } else if (!config.selectStyle) { |
| | | config.selectStyle = 'background' |
| | | } |
| | | |
| | | if (config.display === 'picture' && !config.picratio) { // 兼容旧数据 |
| | | config.picratio = config.ratio || '1:1' |
| | | } |
| | | |
| | | config.selectClass = ` mk-${config.selectStyle} ` |
| | | config.fields = config.fields || [] |
| | | |
| | | this.setState({ |
| | | config: fromJS(config).toJS(), |
| | | config: config, |
| | | options: fromJS(config.options).toJS(), |
| | | selectKeys: selectKeys |
| | | }) |
| | |
| | | |
| | | getCards = () => { |
| | | const { selectKeys, options, config } = this.state |
| | | const { display, width, fields, ratio, multiple, backgroundColor, borderColor } = config |
| | | |
| | | let paddingTop = '100%' |
| | | if (ratio === '4:3') { |
| | | paddingTop = '75%' |
| | | } else if (ratio === '3:2') { |
| | | paddingTop = '66.7%' |
| | | } else if (ratio === '16:9') { |
| | | paddingTop = '56.25%' |
| | | } |
| | | |
| | | let style = borderColor ? {borderColor} : {} |
| | | let _style = backgroundColor ? {backgroundColor} : null |
| | | |
| | | if (!options || options.length === 0) { |
| | | const { display, width, fields, picratio, multiple, backgroundColor, selectStyle, selectClass } = config |
| | | |
| | | if (options.length === 0) { |
| | | return null |
| | | } else if (display !== 'picture') { |
| | | if (!fields || fields.length === 0) { |
| | | return null |
| | | } |
| | | } else if (display === 'color') { |
| | | return options.map(item => { |
| | | let _active = false |
| | | if (multiple === 'true' && selectKeys.includes(item.$value)) { |
| | | _active = true |
| | | } else if (multiple !== 'true' && selectKeys === item.$value) { |
| | | _active = true |
| | | if (multiple === 'true') { |
| | | _active = selectKeys.includes(item.$value) |
| | | } else { |
| | | _active = selectKeys === item.$value |
| | | } |
| | | |
| | | return <Col span={width} key={item.key}> |
| | | <div className={'card-cell' + (_active ? ' active' : '') + (_style ? ' bg-control' : '') + (item.$disabled ? ' disabled' : '')} style={style} onClick={() => this.changeCard(item)}> |
| | | <div className={'card-color-cell' + (_active ? ' active' : '') + (item.$disabled ? ' disabled' : '')} style={{background: item.$value}} onClick={() => this.changeCard(item)}> |
| | | {fields.map(col => { |
| | | return <span className="content-line" key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> |
| | | })} |
| | | <CheckOutlined /> |
| | | </div> |
| | | </Col> |
| | | }) |
| | | } else if (display !== 'picture') { |
| | | let _style = selectStyle === 'custom' ? {backgroundColor} : null |
| | | |
| | | return options.map(item => { |
| | | let _active = false |
| | | if (multiple === 'true') { |
| | | _active = selectKeys.includes(item.$value) |
| | | } else { |
| | | _active = selectKeys === item.$value |
| | | } |
| | | |
| | | return <Col span={width} key={item.key}> |
| | | <div className={'card-cell' + (_active ? ' active' : '') + selectClass + (item.$disabled ? ' disabled' : '')} onClick={() => this.changeCard(item)}> |
| | | <div className="bg-mask" style={_style}></div> |
| | | {fields.map(col => { |
| | | return <span key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> |
| | | return <span className="content-line" key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> |
| | | })} |
| | | </div> |
| | | </Col> |
| | | }) |
| | | } else { |
| | | let paddingTop = '100%' |
| | | if (picratio === '4:3') { |
| | | paddingTop = '75%' |
| | | } else if (picratio === '3:2') { |
| | | paddingTop = '66.7%' |
| | | } else if (picratio === '16:9') { |
| | | paddingTop = '56.25%' |
| | | } |
| | | |
| | | return options.map(item => { |
| | | let _active = false |
| | | if (multiple === 'true' && selectKeys.includes(item.$value)) { |
| | |
| | | } |
| | | |
| | | return <Col span={width} key={item.key}> |
| | | <div className={'card-pic-cell ' + (_active ? 'active' : '') + (item.$disabled ? ' disabled' : '')} onClick={() => this.changeCard(item)} style={{...style, paddingTop, backgroundImage: `url(${item.$url})`}}> |
| | | <div className={'card-pic-cell ' + (_active ? 'active' : '') + (item.$disabled ? ' disabled' : '')} onClick={() => this.changeCard(item)} style={{paddingTop, backgroundImage: `url(${item.$url})`}}> |
| | | <div className="content-wrap"> |
| | | <div className="content-center"> |
| | | {fields.map(col => { |
| | | return <span className="content-line" key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> |
| | | })} |
| | | </div> |
| | | <CheckOutlined /> |
| | | </div> |
| | | </div> |
| | | </Col> |
| | | }) |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { config } = this.state |
| | | const { config, options } = this.state |
| | | |
| | | let extend = config.readonly ? 'readonly' : '' |
| | | |
| | | if (options.length * config.width > 24) { |
| | | extend += ' mutile-line' |
| | | } |
| | | |
| | | return ( |
| | | <div className={'check-card-form-box' + (config.readonly ? ' readonly' : '')}> |
| | | <div className={'check-card-form-box ' + extend}> |
| | | <Row gutter={12}>{this.getCards()}</Row> |
| | | </div> |
| | | ) |
| | |
| | | .check-card-form-box { |
| | | margin-top: 5px; |
| | | // margin-bottom: -10px; |
| | | .card-cell { |
| | | position: relative; |
| | | border: 1px solid #bcbcbc; |
| | | background: #ffffff; |
| | | border-radius: 4px; |
| | | padding: 6px; |
| | | margin-bottom: 12px; |
| | | margin-bottom: 2px; |
| | | line-height: 1.5; |
| | | transition: all 0.3s; |
| | | cursor: pointer; |
| | | span { |
| | | display: block; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | position: relative; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .bg-mask { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | opacity: 0.5; |
| | | opacity: 0.6; |
| | | border-radius: 4px; |
| | | background-color: transparent; |
| | | transition: opacity 0.3s; |
| | | } |
| | | } |
| | | .card-cell:not(.bg-control).active { |
| | | border-color: #1890ff; |
| | | background: #1890ff; |
| | | |
| | | .content-line { |
| | | display: block; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | position: relative; |
| | | z-index: 1; |
| | | line-height: 1.5; |
| | | } |
| | | .card-cell.mk-background.active { |
| | | border-color: var(--mk-sys-color); |
| | | background: var(--mk-sys-color); |
| | | span { |
| | | color: #ffffff!important; |
| | | } |
| | | } |
| | | .card-cell.bg-control.active { |
| | | .bg-mask { |
| | | opacity: 1; |
| | | } |
| | | } |
| | | .card-pic-cell { |
| | | position: relative; |
| | | border: 1px solid #bcbcbc; |
| | | border-radius: 4px; |
| | | background-size: cover; |
| | | background-position: center; |
| | | margin-bottom: 12px; |
| | | line-height: 1.5; |
| | | cursor: pointer; |
| | | transition: all 0.3s; |
| | | } |
| | | .card-pic-cell.active { |
| | | border-color: #1890ff; |
| | | box-shadow: 0px 0px 4px #1890ff; |
| | | } |
| | | |
| | | .card-cell:not(.bg-control).active::after { |
| | | .card-cell.mk-background.active::after { |
| | | content: ' '; |
| | | position: absolute; |
| | | display: table; |
| | |
| | | height: 12px; |
| | | transform: rotate(45deg) scale(1) translate(-50%, -50%); |
| | | } |
| | | .card-cell.mk-font.active { |
| | | border-color: var(--mk-sys-color); |
| | | span { |
| | | color: var(--mk-sys-color)!important; |
| | | } |
| | | } |
| | | .card-cell.mk-custom { |
| | | border-color: transparent; |
| | | } |
| | | .card-cell.mk-custom.active { |
| | | .bg-mask { |
| | | opacity: 1; |
| | | } |
| | | } |
| | | .card-pic-cell { |
| | | position: relative; |
| | | border: 1px solid #e8e8e8; |
| | | border-radius: 4px; |
| | | background-size: cover; |
| | | background-position: center; |
| | | margin-bottom: 2px; |
| | | line-height: 1.5; |
| | | cursor: pointer; |
| | | transition: all 0.3s; |
| | | |
| | | .content-wrap { |
| | | position: absolute; |
| | | top: 6px; |
| | | left: 6px; |
| | | right: 6px; |
| | | bottom: 6px; |
| | | .content-center { |
| | | position: relative; |
| | | top: 50%; |
| | | transform: translate(0px, -50%); |
| | | } |
| | | } |
| | | .anticon-check { |
| | | display: none; |
| | | position: absolute; |
| | | color: #ffffff; |
| | | border-radius: 20px; |
| | | padding: 3px; |
| | | width: 18px; |
| | | height: 18px; |
| | | font-size: 12px; |
| | | right: -2px; |
| | | bottom: -2px; |
| | | background: var(--mk-sys-color); |
| | | } |
| | | } |
| | | |
| | | .card-color-cell { |
| | | position: relative; |
| | | border: 1px solid transparent; |
| | | border-radius: 4px; |
| | | padding: 6px; |
| | | margin-bottom: 2px; |
| | | min-height: 35px; |
| | | cursor: pointer; |
| | | |
| | | .anticon-check { |
| | | display: none; |
| | | position: absolute; |
| | | color: #ffffff; |
| | | border-radius: 20px; |
| | | padding: 3px; |
| | | width: 18px; |
| | | height: 18px; |
| | | font-size: 12px; |
| | | right: 0px; |
| | | bottom: 0px; |
| | | background: var(--mk-sys-color); |
| | | } |
| | | } |
| | | |
| | | .card-pic-cell.active, .card-color-cell.active { |
| | | .anticon-check { |
| | | display: inline-block; |
| | | } |
| | | } |
| | | |
| | | .card-cell.disabled { |
| | | cursor: not-allowed; |
| | | } |
| | | .card-color-cell.disabled { |
| | | cursor: not-allowed; |
| | | } |
| | | .card-pic-cell.disabled { |
| | |
| | | } |
| | | } |
| | | |
| | | .check-card-form-box.mutile-line { |
| | | .card-cell { |
| | | margin-bottom: 12px; |
| | | } |
| | | .card-pic-cell { |
| | | margin-bottom: 12px; |
| | | } |
| | | .card-color-cell { |
| | | margin-bottom: 12px; |
| | | } |
| | | } |
| | | |
| | | .check-card-form-box:not(.readonly) { |
| | | .card-cell:not(.bg-control):not(.disabled):hover { |
| | | border-color: #1890ff; |
| | | background: #1890ff; |
| | | .card-cell.mk-background:not(.disabled):hover { |
| | | border-color: var(--mk-sys-color); |
| | | background: var(--mk-sys-color); |
| | | span { |
| | | color: #ffffff!important; |
| | | } |
| | | } |
| | | .card-cell.bg-control:not(.active):not(.disabled):hover { |
| | | .card-cell.mk-font:not(.disabled):hover { |
| | | border-color: var(--mk-sys-color); |
| | | span { |
| | | color: var(--mk-sys-color)!important; |
| | | } |
| | | } |
| | | |
| | | .card-cell.mk-custom:not(.active):not(.disabled):hover { |
| | | .bg-mask { |
| | | opacity: 0.7; |
| | | opacity: 0.8; |
| | | } |
| | | } |
| | | .card-pic-cell:not(.disabled):hover { |
| | | border-color: #1890ff; |
| | | box-shadow: 0px 0px 4px #1890ff; |
| | | border-color: var(--mk-sys-color); |
| | | box-shadow: 0px 0px 4px var(--mk-sys-color); |
| | | } |
| | | } |
| | | .check-card-form-box.readonly { |
| | |
| | | border-radius: 2px; |
| | | margin-right: 2px; |
| | | padding: 2px 6px; |
| | | background: #ffffff; |
| | | } |
| | | .ant-tag-checkable:active { |
| | | background-color: #ffffff; |
| | |
| | | state = {} |
| | | |
| | | getCards = () => { |
| | | const { display, width, options, fields, ratio, picratio, backgroundColor, borderColor } = this.props.config |
| | | const { display, width, options, fields, ratio, picratio, backgroundColor } = this.props.config |
| | | |
| | | let _ratio = picratio || ratio |
| | | let _options = [] |
| | | let paddingTop = '100%' |
| | | if (_ratio === '4:3') { |
| | | paddingTop = '75%' |
| | | } else if (_ratio === '3:2') { |
| | | paddingTop = '66.7%' |
| | | } else if (_ratio === '16:9') { |
| | | paddingTop = '56.25%' |
| | | } |
| | | let _fields = fields || [] |
| | | |
| | | if (options) { |
| | | _options = options.filter(op => !op.Hide) |
| | | } |
| | | |
| | | let style = {} |
| | | |
| | | if (borderColor) { |
| | | style.borderColor = borderColor |
| | | let cls = '' |
| | | if (_options.length * width <= 24) { |
| | | cls = 'no-margin-bottom' |
| | | } |
| | | |
| | | if (display !== 'picture') { |
| | | let _style = backgroundColor ? {backgroundColor} : null |
| | | |
| | | if (display === 'picture') { |
| | | let _ratio = picratio || ratio |
| | | let paddingTop = '100%' |
| | | if (_ratio === '4:3') { |
| | | paddingTop = '75%' |
| | | } else if (_ratio === '3:2') { |
| | | paddingTop = '66.7%' |
| | | } else if (_ratio === '16:9') { |
| | | paddingTop = '56.25%' |
| | | } |
| | | if (_options.length === 0) { |
| | | return <Col span={width}> |
| | | <div className="card-cell" style={style}> |
| | | <div className="bg-mask" style={_style}></div> |
| | | {fields ? fields.map(col => { |
| | | return <span key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{col.field}</span> |
| | | }) : null} |
| | | {!fields || fields.length === 0 ? <span style={{color: '#000000', fontSize: '14px', height: '21px'}}>示例</span> : null} |
| | | <div className="card-pic-cell no-margin-bottom" style={{paddingTop, background: '#91d5ff'}}> |
| | | </div> |
| | | </Col> |
| | | } |
| | | return _options.map(item => { |
| | | return <Col span={width} key={item.key}> |
| | | <div className="card-cell" style={style}> |
| | | <div className="bg-mask" style={_style}></div> |
| | | {fields.map(col => { |
| | | return <span key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> |
| | | <div className={'card-pic-cell ' + cls} style={{paddingTop, backgroundImage: `url(${item.$url})`}}> |
| | | <div className="content-wrap"> |
| | | <div className="content-center"> |
| | | {_fields.map(col => { |
| | | return <span className="content-line" key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> |
| | | })} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </Col> |
| | | }) |
| | | } else if (display === 'color') { |
| | | if (_options.length === 0) { |
| | | return <Col span={width}> |
| | | <div className="card-color-cell no-margin-bottom" style={{background: '#1890ff'}}> |
| | | </div> |
| | | </Col> |
| | | } |
| | | return _options.map(item => { |
| | | return <Col span={width} key={item.key}> |
| | | <div className={'card-color-cell ' + cls} style={{background: item.$value}}> |
| | | {_fields.map(col => { |
| | | return <span className="content-line" key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> |
| | | })} |
| | | </div> |
| | | </Col> |
| | | }) |
| | | } else { |
| | | let _style = null |
| | | let style = null |
| | | |
| | | if (backgroundColor) { |
| | | _style = {backgroundColor} |
| | | style = {borderColor: 'transparent'} |
| | | } |
| | | |
| | | if (_options.length === 0) { |
| | | return <Col span={width}> |
| | | <div className="card-pic-cell" style={{...style, paddingTop, background: '#91d5ff'}}> |
| | | <div className="card-cell no-margin-bottom" style={style}> |
| | | <div className="bg-mask" style={_style}></div> |
| | | <span style={{color: '#000000', fontSize: '14px', height: '21px'}}>示例</span> |
| | | </div> |
| | | </Col> |
| | | } |
| | | return _options.map(item => { |
| | | return <Col span={width} key={item.key}> |
| | | <div className="card-pic-cell" style={{...style, paddingTop, backgroundImage: `url(${item.$url})`}}> |
| | | <div className={'card-cell ' + cls} style={style}> |
| | | <div className="bg-mask" style={_style}></div> |
| | | {_fields.map(col => { |
| | | return <span className="content-line" key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span> |
| | | })} |
| | | </div> |
| | | </Col> |
| | | }) |
| | |
| | | border-radius: 4px; |
| | | padding: 6px; |
| | | margin-bottom: 12px; |
| | | span { |
| | | display: block; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | position: relative; |
| | | z-index: 1; |
| | | } |
| | | |
| | | .bg-mask { |
| | | position: absolute; |
| | | top: 0; |
| | |
| | | } |
| | | } |
| | | .card-pic-cell { |
| | | border: 1px solid #bcbcbc; |
| | | position: relative; |
| | | border: 1px solid #e8e8e8; |
| | | border-radius: 4px; |
| | | background-size: cover; |
| | | background-position: center; |
| | | margin-bottom: 12px; |
| | | overflow: hidden; |
| | | |
| | | .content-wrap { |
| | | position: absolute; |
| | | top: 6px; |
| | | left: 6px; |
| | | right: 6px; |
| | | bottom: 6px; |
| | | .content-center { |
| | | position: relative; |
| | | top: 50%; |
| | | transform: translate(0px, -50%); |
| | | } |
| | | } |
| | | } |
| | | .card-color-cell { |
| | | border: 1px solid transparent; |
| | | border-radius: 4px; |
| | | padding: 6px; |
| | | background-size: cover; |
| | | background-position: center; |
| | | margin-bottom: 12px; |
| | | min-height: 35px; |
| | | } |
| | | |
| | | .content-line { |
| | | display: block; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | position: relative; |
| | | z-index: 1; |
| | | } |
| | | .no-margin-bottom { |
| | | margin-bottom: 2px; |
| | | } |
| | | } |
| | |
| | | scripts: PropTypes.array, // 自定义脚本列表 |
| | | usefulfields: PropTypes.any, // 可用字段 |
| | | systemScripts: PropTypes.array, // 系统脚本 |
| | | scriptsChange: PropTypes.func // 表单 |
| | | scriptsChange: PropTypes.func |
| | | } |
| | | |
| | | state = { |
| | |
| | | } |
| | | |
| | | let _sql = `Declare @${btn.sheet} table (${_dec}jskey nvarchar(50) ) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50), @retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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),@tbid Nvarchar(512) |
| | | Select @ErrorCode='', @retmsg='' |
| | | ` |
| | | |
| | |
| | | ErrorCode(增加后缀NT表示数据不回滚,如ENT、NNT、FNT、NMNT), retmsg |
| | | </Form.Item> |
| | | </Col> |
| | | {usefulfields ? <Col span={24} className="sqlfield"> |
| | | <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | BID, ID, LoginUID, SessionUid, UserID, Appkey, UserName, FullName, RoleID, mk_departmentcode, mk_organization, login_city, {usefulfields} |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey</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</span></Tooltip>, |
| | | {usefulfields} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Col> |
| | | <Col span={8} style={{whiteSpace: 'nowrap'}}> |
| | | <Form.Item style={{marginBottom: 0}} label={ |
| | | <Tooltip placement="bottomLeft" title={'自定义脚本与默认sql位置关系。'}> |
| | |
| | | columns = columns.filter(item => item.Column !== '$Index') |
| | | let fields = columns.map(item => item.Column) |
| | | |
| | | let _sql = `Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50), @retmsg nvarchar(4000) |
| | | let _sql = `Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) |
| | | ` |
| | | |
| | | this.setState({ |
| | |
| | | ErrorCode(增加后缀NT表示数据不回滚,如ENT、NNT、FNT、NMNT), retmsg |
| | | </Form.Item> |
| | | </Col> |
| | | {usefulfields ? <Col span={24} className="sqlfield"> |
| | | <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | BID, ID, LoginUID, SessionUid, UserID, Appkey, UserName, FullName, RoleID, mk_departmentcode, mk_organization, login_city, {usefulfields} |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey</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</span></Tooltip>, |
| | | {usefulfields} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Col> |
| | | <Col span={8} style={{whiteSpace: 'nowrap'}}> |
| | | <Form.Item style={{marginBottom: 0}} label={ |
| | | <Tooltip placement="bottomLeft" title={'自定义脚本与默认sql位置关系。'}> |
| | |
| | | }) |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | |
| | | }) |
| | | |
| | | _regoptions.push({ |
| | | reg: new RegExp('@login_city@', 'ig'), |
| | | value: `''` |
| | | }, { |
| | | reg: new RegExp('@userName@', 'ig'), |
| | | value: `''` |
| | | }, { |
| | |
| | | ` |
| | | } else { |
| | | sql = `/* sql 验证 */ |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) select @ErrorCode='',@retmsg ='' |
| | | ${_dataresource}` |
| | | } |
| | | sql = sql.replace(/\n\s{8}/ig, '\n') |
| | |
| | | border-radius: 2px; |
| | | margin-right: 2px; |
| | | padding: 2px 6px; |
| | | background: #ffffff; |
| | | } |
| | | .ant-tag-checkable-checked { |
| | | border-color: #1890ff; |
| | |
| | | openType: null, // 搜索条件显示类型 |
| | | resourceType: null, // 下拉搜索时,选项来源类型 |
| | | formlist: null, // 表单 |
| | | display: null, |
| | | cFields: [], |
| | | textTooltip: '字段名可以使用逗号分隔,进行综合搜索', |
| | | } |
| | |
| | | shows.push('dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database') |
| | | } |
| | | } else if (type === 'checkcard') { |
| | | reRequired.fields = false |
| | | if (this.record.display === 'picture') { |
| | | if (this.record.resourceType === '0') { // 自定义资源 |
| | | shows.push('options', 'picratio') |
| | | shows.push('options', 'fields', 'picratio') |
| | | } else if (this.record.resourceType === '1') { // 数据源 |
| | | shows.push('dataSource', 'cardValField', 'urlField', 'orderBy', 'orderType', 'database', 'picratio') |
| | | shows.push('dataSource', 'cardValField', 'fields', 'urlField', 'orderBy', 'orderType', 'database', 'picratio') |
| | | } |
| | | } else if (this.record.display === 'color') { |
| | | if (this.record.resourceType === '0') { // 自定义资源 |
| | | shows.push('options', 'fields') |
| | | } else if (this.record.resourceType === '1') { // 数据源 |
| | | shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'database') |
| | | } |
| | | } else { |
| | | reRequired.fields = true |
| | | if (this.record.resourceType === '0') { // 自定义资源 |
| | | shows.push('options', 'fields', 'backgroundColor', 'borderColor') |
| | | shows.push('options', 'fields', 'selectStyle') |
| | | } else if (this.record.resourceType === '1') { // 数据源 |
| | | shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'database', 'backgroundColor', 'borderColor') |
| | | shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'database', 'selectStyle') |
| | | } |
| | | if (this.record.selectStyle === 'custom') { |
| | | shows.push('backgroundColor') |
| | | } |
| | | } |
| | | shows.push('linkField') |
| | |
| | | { required: item.required, message: dict['form.required.select'] + item.label + '!' } |
| | | ] |
| | | |
| | | content = <Radio.Group onChange={(e) => {this.optionChange(item.key, e.target.value)}}> |
| | | content = <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => {this.optionChange(item.key, e.target.value)}}> |
| | | {item.options.map(option => { |
| | | return ( |
| | | <Radio key={option.value} value={option.value}>{option.text}</Radio> |
| | |
| | | span = 24 |
| | | className = 'text-area' |
| | | |
| | | rules = [ |
| | | { required: item.required, message: '请添加' + item.label + '!' } |
| | | ] |
| | | |
| | | content = <FieldsTable dict={dict} onChange={this.changeField}/> |
| | | } else if (item.type === 'checkbox') { |
| | | rules = [ |
| | |
| | | content = <Cascader options={item.options} placeholder="" /> |
| | | } else if (item.type === 'color') { |
| | | className = 'color-form-item' |
| | | rules = [ |
| | | { required: item.required, message: dict['form.required.select'] + item.label + '!' } |
| | | ] |
| | | |
| | | content = <ColorSketch allowClear={true}/> |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | .color-form-item { |
| | | margin-bottom: 24px; |
| | | .ant-form-item-control { |
| | | height: 40px; |
| | | .color-sketch-block { |
| | |
| | | } |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | |
| | | } |
| | | |
| | | _regoptions.push({ |
| | | reg: new RegExp('@login_city@', 'ig'), |
| | | value: `''` |
| | | }, { |
| | | reg: new RegExp('@userName@', 'ig'), |
| | | value: `''` |
| | | }, { |
| | |
| | | ` |
| | | } else { |
| | | sql = `/* sql 验证 */ |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) select @ErrorCode='',@retmsg ='' |
| | | ${_dataresource}` |
| | | } |
| | | sql = sql.replace(/\n\s{8}/ig, '\n') |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Form, Row, Col, Button, notification, Select, Popconfirm, Typography, Modal, Radio } from 'antd' |
| | | import { Form, Row, Col, Button, notification, Select, Popconfirm, Typography, Modal, Radio, Tooltip } from 'antd' |
| | | import { StopOutlined, CheckCircleOutlined, EditOutlined, SwapOutlined, DeleteOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | |
| | |
| | | editItem: null, |
| | | loading: false, |
| | | usefulFields: '', |
| | | urlFields: '', |
| | | systemScripts: [], |
| | | scriptsColumns: [ |
| | | { |
| | |
| | | |
| | | let _usefulFields = [] |
| | | let scriptsColumns = fromJS(this.state.scriptsColumns).toJS() |
| | | let _urlFields = '' |
| | | |
| | | if (searches) { |
| | | searches.forEach(item => { |
| | |
| | | } else if (_usefulFields.includes(item.field)) { |
| | | _usefulFields.push(item.field + '1') |
| | | } else { |
| | | _usefulFields.push(item.field) |
| | | _usefulFields.push(item.field.replace(/,/ig, ', ')) |
| | | } |
| | | }) |
| | | |
| | | if (urlFields) { |
| | | _usefulFields.push(...urlFields) |
| | | } |
| | | |
| | | _urlFields = urlFields ? urlFields.join(', ') : '' |
| | | _usefulFields = _usefulFields.join(', ') |
| | | scriptsColumns = scriptsColumns.filter(item => { |
| | | if (item.dataIndex === 'sql') { |
| | |
| | | } |
| | | |
| | | this.setState({ |
| | | urlFields: _urlFields, |
| | | usefulFields: _usefulFields, |
| | | scripts: fromJS(scripts).toJS(), |
| | | scriptsColumns |
| | |
| | | render() { |
| | | const { setting, scripts } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { usefulFields, scriptsColumns, systemScripts } = this.state |
| | | const { usefulFields, scriptsColumns, systemScripts, urlFields } = this.state |
| | | const formItemLayout = { |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | |
| | | ErrorCode(增加后缀NT表示数据不回滚,如ENT、NNT、FNT、NMNT), retmsg |
| | | </Form.Item> |
| | | </Col> |
| | | {usefulFields ? <Col span={24} className="sqlfield"> |
| | | <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, RoleID, mk_departmentcode, mk_organization, login_city, appkey, time_id{usefulFields ? ', ' + usefulFields : ''} |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, 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</span></Tooltip> |
| | | {usefulFields ? <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'搜索条件变量,请按照@xxx@格式使用。'}>, {usefulFields}</Tooltip> : ''} |
| | | {urlFields ?<Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'url变量,请按照@xxx@格式使用。'}>, <span style={{color: '#13c2c2'}}>{urlFields}</span></Tooltip> : ''} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {!usefulFields ? <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, RoleID, mk_departmentcode, mk_organization, login_city, appkey, time_id |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Col> |
| | | {!usefulFields ? <Col span={8} style={{whiteSpace: 'nowrap'}}> |
| | | <Form.Item style={{marginBottom: 0}} label="执行位置"> |
| | | {getFieldDecorator('position', { |
| | |
| | | }) |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | |
| | | }) |
| | | |
| | | _regoptions.push({ |
| | | reg: new RegExp('@login_city@', 'ig'), |
| | | value: `''` |
| | | }, { |
| | | reg: new RegExp('@userName@', 'ig'), |
| | | value: `''` |
| | | }, { |
| | |
| | | ` |
| | | } else { |
| | | sumSql = `/* sql sum验证 */ |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) select @ErrorCode='',@retmsg ='' |
| | | ${_sql}` |
| | | } |
| | | } |
| | |
| | | ` |
| | | } else { |
| | | sql = `/* sql 验证 */ |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) select @ErrorCode='',@retmsg ='' |
| | | ${_dataresource}` |
| | | } |
| | | sql = sql.replace(/\n\s{8}/ig, '\n') |
| | |
| | | }) |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | |
| | | } |
| | | |
| | | _customScript = _customScript.replace(/@\$|\$@/ig, '') |
| | | _customScript = _customScript.replace(/@userName@|@fullName@|@login_city@/ig, `''`) |
| | | _customScript = _customScript.replace(/@userName@|@fullName@/ig, `''`) |
| | | // 外联数据库替换 |
| | | if (window.GLOB.externalDatabase !== null) { |
| | | _customScript = _customScript.replace(/@db@/ig, window.GLOB.externalDatabase) |
| | |
| | | }) |
| | | |
| | | if (_customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) select @ErrorCode='',@retmsg ='' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | |
| | | ` |
| | | } else { |
| | | sql = `/* sql 验证 */ |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) select @ErrorCode='',@retmsg ='' |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) select @ErrorCode='',@retmsg ='' |
| | | ${_dataresource}` |
| | | } |
| | | sql = sql.replace(/\n\s{8}/ig, '\n') |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Form, Row, Col, Button, notification, Select, Popconfirm, Typography } from 'antd' |
| | | import { Form, Row, Col, Button, notification, Select, Popconfirm, Typography, Tooltip } from 'antd' |
| | | import { StopOutlined, CheckCircleOutlined, EditOutlined, SwapOutlined, DeleteOutlined } from '@ant-design/icons' |
| | | import moment from 'moment' |
| | | |
| | |
| | | editItem: null, |
| | | loading: false, |
| | | usefulFields: '', |
| | | urlFields: '', |
| | | systemScripts: [], |
| | | scriptsColumns: [ |
| | | { |
| | |
| | | } else if (_usefulFields.includes(item.field)) { |
| | | _usefulFields.push(item.field + '1') |
| | | } else { |
| | | _usefulFields.push(item.field) |
| | | _usefulFields.push(item.field.replace(/,/ig, ', ')) |
| | | } |
| | | }) |
| | | |
| | | if (urlFields) { |
| | | _usefulFields.push(...urlFields) |
| | | } |
| | | |
| | | this.setState({ |
| | | urlFields: urlFields ? urlFields.join(', ') : '', |
| | | usefulFields: _usefulFields.join(', '), |
| | | scripts: fromJS(scripts).toJS() |
| | | }) |
| | |
| | | render() { |
| | | const { setting, defaultSql, scripts } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { usefulFields, scriptsColumns, systemScripts } = this.state |
| | | const { usefulFields, scriptsColumns, systemScripts, urlFields } = this.state |
| | | const formItemLayout = { |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | |
| | | </Col> |
| | | <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | id, bid, loginuid, sessionuid, userid, username, fullname, RoleID, mk_departmentcode, mk_organization, login_city, appkey, time_id, orderBy{setting.laypage === 'true' ? ', pageSize, pageIndex': ''}{usefulFields ? ', ' + usefulFields : ''} |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey, 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</span></Tooltip>, |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'排序、分页以及搜索条件变量,请按照@xxx@格式使用。'}>orderBy{setting.laypage === 'true' ? ', pageSize, pageIndex': ''}{usefulFields ? ', ' + usefulFields : ''}</Tooltip> |
| | | {urlFields ?<Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'url变量,请按照@xxx@格式使用。'}>, <span style={{color: '#13c2c2'}}>{urlFields}</span></Tooltip> : ''} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={10} className="quick-add"> |
| | |
| | | }, { |
| | | value: 'picture', |
| | | text: '图片' |
| | | }, { |
| | | value: 'color', |
| | | text: '色块' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'selectStyle', |
| | | label: '选中效果', |
| | | tooltip: '背景及文字变化时会使用系统色。', |
| | | initVal: card.selectStyle || (card.backgroundColor ? 'custom' : 'background'), |
| | | options: [{ |
| | | value: 'background', |
| | | text: '背景变化' |
| | | }, { |
| | | value: 'font', |
| | | text: '文字变化' |
| | | }, { |
| | | value: 'custom', |
| | | text: '自定义' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'color', |
| | | key: 'backgroundColor', |
| | | label: '背景色', |
| | | initVal: card.backgroundColor || '', |
| | | tooltip: '设置背景色后,选中效果由背景颜色控制。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'color', |
| | | key: 'borderColor', |
| | | label: '边框颜色', |
| | | initVal: card.borderColor || '', |
| | | required: false |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | |
| | | }, { |
| | | value: 'picture', |
| | | text: '图片' |
| | | }, { |
| | | value: 'color', |
| | | text: '色块' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'ratio', |
| | | key: 'picratio', |
| | | label: '图片比例', |
| | | initVal: card.ratio || '1:1', |
| | | initVal: card.picratio || card.ratio || '1:1', |
| | | required: true, |
| | | options: [{ |
| | | value: '1:1', |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'selectStyle', |
| | | label: '选中效果', |
| | | tooltip: '背景及文字变化时会使用系统色。', |
| | | initVal: card.selectStyle || (card.backgroundColor ? 'custom' : 'background'), |
| | | options: [{ |
| | | value: 'background', |
| | | text: '背景变化' |
| | | }, { |
| | | value: 'font', |
| | | text: '文字变化' |
| | | }, { |
| | | value: 'custom', |
| | | text: '自定义' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'color', |
| | | key: 'backgroundColor', |
| | | label: '背景色', |
| | | initVal: card.backgroundColor || '', |
| | | tooltip: '设置背景色后,选中效果由背景颜色控制。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'color', |
| | | key: 'borderColor', |
| | | label: '边框颜色', |
| | | initVal: card.borderColor || '', |
| | | required: false |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | import { PlusOutlined, EditOutlined, DeleteOutlined, SwapOutlined } from '@ant-design/icons' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import FileUpload from '@/tabviews/zshare/fileupload' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | // import FileUpload from '@/tabviews/zshare/fileupload' |
| | | import './index.scss' |
| | | |
| | | const SourceComponent = asyncComponent(() => import('@/menu/components/share/sourcecomponent')) |
| | | const EditableContext = React.createContext() |
| | | let dragingIndex = -1 |
| | | |
| | |
| | | getInput = (form) => { |
| | | const { inputType, record } = this.props |
| | | if (inputType === 'file') { |
| | | return <FileUpload config={{ |
| | | initval: record ? (record.$url || '') : '', |
| | | suffix: '', |
| | | maxfile: 1, |
| | | fileType: 'picture-card' |
| | | }}/> |
| | | return <SourceComponent initialValue={record ? (record.$url || '') : ''} type="" placement="right"/> |
| | | // return <FileUpload config={{ |
| | | // initval: record ? (record.$url || '') : '', |
| | | // suffix: '', |
| | | // maxfile: 1, |
| | | // fileType: 'picture-card' |
| | | // }}/> |
| | | } else { |
| | | return <Input onPressEnter={() => this.getValue(form)} /> |
| | | } |
| | |
| | | return <span style={{display: 'block', width: '70px', height: '70px'}}><img style={{width: '100%', height: '100%'}} src={text} alt="" /></span> |
| | | } |
| | | }) |
| | | } else { |
| | | columns = fields.map(item => { |
| | | keys.push(item.field) |
| | | return { |
| | | title: item.field, |
| | | dataIndex: item.field, |
| | | editable: true, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | fields.forEach(item => { |
| | | keys.push(item.field) |
| | | columns.push({ |
| | | title: item.field, |
| | | dataIndex: item.field, |
| | | editable: true, |
| | | }) |
| | | }) |
| | | |
| | | if (linkSubFields.length > 0) { |
| | | linkSubFields.forEach(m => { |
| | |
| | | |
| | | if (display === 'picture') { |
| | | item.$url = '' |
| | | } else { |
| | | fields.forEach(f => { |
| | | item[f.field] = `${this.state.data.length + 1}` |
| | | }) |
| | | } |
| | | |
| | | fields.forEach(f => { |
| | | item[f.field] = `${this.state.data.length + 1}` |
| | | }) |
| | | |
| | | let data = [...this.state.data, item] |
| | | |
| | |
| | | }) |
| | | |
| | | let addable = false |
| | | if (this.props.display === 'picture') { |
| | | if (this.props.display === 'picture' || this.props.display === 'color') { |
| | | addable = true |
| | | } else if (this.props.fields && this.props.fields.length > 0) { |
| | | addable = true |
| | |
| | | tr.drop-over-upward td { |
| | | border-top: 2px dashed #1890ff; |
| | | } |
| | | .mk-source-wrap { |
| | | .ant-radio-button-wrapper + .ant-radio-button-wrapper { |
| | | border-radius: 0 4px 4px 0; |
| | | } |
| | | .ant-radio-button-wrapper:last-child { |
| | | display: none; |
| | | } |
| | | } |
| | | } |
| | |
| | | reRequired.linkField = false |
| | | } |
| | | } else if (type === 'checkcard') { |
| | | reRequired.fields = false |
| | | if (this.record.display === 'picture') { |
| | | if (this.record.resourceType === '0') { // 自定义资源 |
| | | shows.push('options', 'ratio') |
| | | shows.push('options', 'fields', 'picratio') |
| | | } else if (this.record.resourceType === '1') { // 数据源 |
| | | shows.push('dataSource', 'cardValField', 'urlField', 'orderBy', 'orderType', 'disableField', 'database', 'ratio') |
| | | shows.push('dataSource', 'cardValField', 'fields', 'urlField', 'orderBy', 'orderType', 'disableField', 'database', 'picratio') |
| | | } |
| | | } else if (this.record.display === 'color') { |
| | | if (this.record.resourceType === '0') { // 自定义资源 |
| | | shows.push('options', 'fields') |
| | | } else if (this.record.resourceType === '1') { // 数据源 |
| | | shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'database') |
| | | } |
| | | } else { |
| | | reRequired.fields = true |
| | | if (this.record.resourceType === '0') { // 自定义资源 |
| | | shows.push('options', 'fields', 'backgroundColor', 'borderColor') |
| | | shows.push('options', 'fields', 'selectStyle') |
| | | } else if (this.record.resourceType === '1') { // 数据源 |
| | | shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'disableField', 'database', 'backgroundColor', 'borderColor') |
| | | shows.push('dataSource', 'cardValField', 'fields', 'orderBy', 'orderType', 'disableField', 'database', 'selectStyle') |
| | | } |
| | | if (this.record.selectStyle === 'custom') { |
| | | shows.push('backgroundColor') |
| | | } |
| | | } |
| | | |
| | |
| | | ] |
| | | initVal = item.initVal |
| | | |
| | | content = <Radio.Group onChange={(e) => {this.optionChange(item.key, e.target.value)}}> |
| | | content = <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => {this.optionChange(item.key, e.target.value)}}> |
| | | {item.options.map(option => { |
| | | return ( |
| | | <Radio key={option.value} value={option.value}>{option.text}</Radio> |
| | |
| | | } else if (item.type === 'fields') { |
| | | span = 24 |
| | | className = 'text-area' |
| | | rules = [ |
| | | { required: item.required, message: '请添加' + item.label + '!' } |
| | | ] |
| | | |
| | | content = <FieldsTable dict={this.props.dict} onChange={this.changeField}/> |
| | | } else if (item.type === 'color') { |
| | | className = 'color-form-item' |
| | | rules = [ |
| | | { required: item.required, message: dict['form.required.select'] + item.label + '!' } |
| | | ] |
| | | |
| | | content = <ColorSketch allowClear={true}/> |
| | | } else if (item.type === 'icon') { |
| | |
| | | white-space: nowrap; |
| | | } |
| | | .color-form-item { |
| | | margin-bottom: 24px; |
| | | .ant-form-item-control { |
| | | height: 40px; |
| | | .color-sketch-block { |
| | |
| | | } |
| | | } |
| | | |
| | | let _usefulfields = usefulfields ? usefulfields.replace(/(BID|ID|LoginUID|SessionUid|UserID|Appkey|UserName|FullName|RoleID|mk_departmentcode|mk_organization|mk_nation|mk_province|mk_city|mk_district|mk_address|mk_user_type|BillCode|BVoucher|FIBVoucherDate|FiYear|ModularDetailCode),\s/ig, '') : null |
| | | |
| | | return ( |
| | | <Form {...formItemLayout} className="verify-form verify-custom-callback-scripts" id="verify-custom-callback-scripts"> |
| | | <Row gutter={24}> |
| | |
| | | </Col> |
| | | {usefulfields ? <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | {usefulfields} |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey</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</span></Tooltip>, |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'系统变量,系统会定义变量并在单号生成或创建凭证时使用。'}><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip>, |
| | | {_usefulfields} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={8} style={{whiteSpace: 'nowrap'}}> |
| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Input, Select, Button, notification, Modal } from 'antd' |
| | | import { Form, Row, Col, Input, Select, Button, notification, Modal, Tooltip } from 'antd' |
| | | import moment from 'moment' |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | |
| | | sm: { span: 16 } |
| | | } |
| | | } |
| | | |
| | | let _usefulfields = usefulfields ? usefulfields.replace(/(BID|ID|LoginUID|SessionUid|UserID|Appkey|UserName|FullName|RoleID|mk_departmentcode|mk_organization|mk_nation|mk_province|mk_city|mk_district|mk_address|mk_user_type|BillCode|BVoucher|FIBVoucherDate|FiYear|ModularDetailCode),\s/ig, '') : null |
| | | |
| | | return ( |
| | | <Form {...formItemLayout} className="verify-form" id="verifycard2"> |
| | | <Row gutter={24}> |
| | | {usefulfields ? <Col span={21} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | {usefulfields} |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey</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</span></Tooltip>, |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'系统变量,系统会定义变量并在单号生成或创建凭证时使用。'}><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip>, |
| | | {_usefulfields} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | <Col span={21} className="sql"> |
| | |
| | | } |
| | | |
| | | let _type = type || '' |
| | | let _usefulfields = usefulfields ? usefulfields.replace(/(BID|ID|LoginUID|SessionUid|UserID|Appkey|UserName|FullName|RoleID|mk_departmentcode|mk_organization|mk_nation|mk_province|mk_city|mk_district|mk_address|mk_user_type|BillCode|BVoucher|FIBVoucherDate|FiYear|ModularDetailCode),\s/ig, '') : null |
| | | |
| | | return ( |
| | | <Form {...formItemLayout} className="verify-form verify-custom-scripts" id={'verify-custom-scripts' + _type}> |
| | |
| | | </Col> : null} |
| | | {!_type && usefulfields ? <Col span={24} className="sqlfield"> |
| | | <Form.Item label={'可用字段'}> |
| | | {usefulfields} |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'公共值,请按照@xxx@格式使用。'}><span style={{color: '#1890ff'}}>BID, ID, LoginUID, SessionUid, UserID, Appkey</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</span></Tooltip>, |
| | | <Tooltip mouseLeaveDelay={0.3} mouseEnterDelay={0.3} placement="top" title={'系统变量,系统会定义变量并在单号生成或创建凭证时使用。'}><span style={{color: '#13c2c2'}}>BillCode, BVoucher, FIBVoucherDate, FiYear, ModularDetailCode</span></Tooltip>, |
| | | {_usefulfields} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {!_type ?<Col span={8} style={{whiteSpace: 'nowrap'}}> |
| | |
| | | resolve(_fields) |
| | | } |
| | | }).then(_fields => { |
| | | let _usefulfields = ['UserName', 'FullName', 'RoleID', 'mk_departmentcode', 'mk_organization', 'login_city', 'BillCode', 'BVoucher', 'FIBVoucherDate', 'FiYear', 'ModularDetailCode'] |
| | | let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@RoleID nvarchar(512)', '@mk_departmentcode nvarchar(50)', '@mk_organization nvarchar(50)', '@login_city nvarchar(50)', '@ErrorCode nvarchar(50)', '@retmsg nvarchar(4000)', '@BillCode nvarchar(50)', '@BVoucher nvarchar(50)', '@FIBVoucherDate nvarchar(50)', '@FiYear nvarchar(50)', '@ModularDetailCode nvarchar(50)', '@bid nvarchar(50)'] |
| | | let _select = ['@UserName=\'\'', '@FullName=\'\'', '@RoleID=\'\'', '@mk_departmentcode=\'\'', '@mk_organization=\'\'', '@login_city=\'\'', '@ErrorCode=\'\'', '@retmsg=\'\'', '@BillCode=\'\'', '@BVoucher=\'\'', '@FIBVoucherDate=\'\'', '@FiYear=\'\'', '@ModularDetailCode=\'\'', '@bid=\'\''] |
| | | let _usefulfields = ['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'] |
| | | let _declare = ['@UserName nvarchar(50)', '@FullName nvarchar(50)', '@RoleID nvarchar(512)', '@mk_departmentcode nvarchar(50)', '@mk_organization nvarchar(50)', '@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)'] |
| | | 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=\'\''] |
| | | let fieldArr = _usefulfields.map(_f => _f.toLowerCase()) |
| | | let hasBid = false |
| | | |
| | |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let departmentcode = sessionStorage.getItem('departmentcode') || '' |
| | | let organization = sessionStorage.getItem('organization') || '' |
| | | let mk_user_type = sessionStorage.getItem('mk_user_type') || '' |
| | | let nation = sessionStorage.getItem('nation') || '' |
| | | let province = sessionStorage.getItem('province') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | let district = sessionStorage.getItem('district') || '' |
| | | let address = sessionStorage.getItem('address') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | let _customScript = '' |
| | | |
| | | if (setting.customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) |
| | | Select @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}' |
| | | ${setting.customScript} |
| | | ` |
| | | } |
| | |
| | | ` |
| | | } |
| | | } else { |
| | | LText = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' |
| | | LText = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) |
| | | Select @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}' |
| | | ${LText} |
| | | ` |
| | | } |
| | |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let departmentcode = sessionStorage.getItem('departmentcode') || '' |
| | | let organization = sessionStorage.getItem('organization') || '' |
| | | let mk_user_type = sessionStorage.getItem('mk_user_type') || '' |
| | | let nation = sessionStorage.getItem('nation') || '' |
| | | let province = sessionStorage.getItem('province') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | let district = sessionStorage.getItem('district') || '' |
| | | let address = sessionStorage.getItem('address') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | } |
| | | |
| | | if (setting.customScript) { |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) |
| | | Select @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}' |
| | | ${setting.customScript} |
| | | ` |
| | | } |
| | |
| | | insert into tmp_err_retmsg (ID, ErrorCode, retmsg, CreateUserID) select @time_id@,@ErrorCode, @retmsg,@UserID@ |
| | | ` |
| | | } else { |
| | | LText = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' |
| | | LText = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) |
| | | Select @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}' |
| | | ${LText} |
| | | ` |
| | | } |
| | |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let departmentcode = sessionStorage.getItem('departmentcode') || '' |
| | | let organization = sessionStorage.getItem('organization') || '' |
| | | let mk_user_type = sessionStorage.getItem('mk_user_type') || '' |
| | | let nation = sessionStorage.getItem('nation') || '' |
| | | let province = sessionStorage.getItem('province') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | let district = sessionStorage.getItem('district') || '' |
| | | let address = sessionStorage.getItem('address') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | |
| | | if (sql) { |
| | | sql = `/*前置脚本*/ |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' |
| | | declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) |
| | | Select @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}' |
| | | ${sql} |
| | | aaa: |
| | | if @ErrorCode!='' |
| | |
| | | } |
| | | }) |
| | | regoptions.push({ |
| | | reg: new RegExp('@login_city@', 'ig'), |
| | | value: `'${city}'` |
| | | }, { |
| | | reg: new RegExp('@userName@', 'ig'), |
| | | value: `'${userName}'` |
| | | }, { |
| | |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let departmentcode = sessionStorage.getItem('departmentcode') || '' |
| | | let organization = sessionStorage.getItem('organization') || '' |
| | | let mk_user_type = sessionStorage.getItem('mk_user_type') || '' |
| | | let nation = sessionStorage.getItem('nation') || '' |
| | | let province = sessionStorage.getItem('province') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | let district = sessionStorage.getItem('district') || '' |
| | | let address = sessionStorage.getItem('address') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | | fullName = sessionStorage.getItem('CloudFullName') || '' |
| | | } |
| | | |
| | | let _prevCustomScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) |
| | | Select @ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' |
| | | let _prevCustomScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) |
| | | Select @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}' |
| | | ${errSql} |
| | | ` |
| | | let _backCustomScript = ` |
| | |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let departmentcode = sessionStorage.getItem('departmentcode') || '' |
| | | let organization = sessionStorage.getItem('organization') || '' |
| | | let mk_user_type = sessionStorage.getItem('mk_user_type') || '' |
| | | let nation = sessionStorage.getItem('nation') || '' |
| | | let province = sessionStorage.getItem('province') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | let district = sessionStorage.getItem('district') || '' |
| | | let address = sessionStorage.getItem('address') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | | fullName = sessionStorage.getItem('CloudFullName') || '' |
| | | } |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) |
| | | select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' |
| | | _customScript = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) |
| | | select @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}' |
| | | ${_customScript} |
| | | ` |
| | | } |
| | |
| | | let arrfield = [item.valueField, item.valueText] |
| | | |
| | | if (item.type === 'checkcard') { |
| | | arrfield = item.fields.map(f => f.field) |
| | | arrfield = item.fields ? item.fields.map(f => f.field) : [] |
| | | arrfield.push(item.cardValField) |
| | | if (item.urlField) { |
| | | arrfield.push(item.urlField) |
| | |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let departmentcode = sessionStorage.getItem('departmentcode') || '' |
| | | let organization = sessionStorage.getItem('organization') || '' |
| | | let mk_user_type = sessionStorage.getItem('mk_user_type') || '' |
| | | let nation = sessionStorage.getItem('nation') || '' |
| | | let province = sessionStorage.getItem('province') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | let district = sessionStorage.getItem('district') || '' |
| | | let address = sessionStorage.getItem('address') || '' |
| | | let _sheet = item.sheet |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | |
| | | _sql = ` |
| | | /* 系统生成 */ |
| | | declare @${sheet} table (${declarefields.join(',')},jskey nvarchar(50),BID nvarchar(50) ) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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),@tbid Nvarchar(512) |
| | | |
| | | Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' |
| | | Select @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}' |
| | | ${_initCustomScript} |
| | | ` |
| | | _sqlInsert = `Insert into @${sheet} (${fields},jskey,BID)` |
| | |
| | | _sql = ` |
| | | /* 系统生成 */ |
| | | declare @${sheet} table (jskey nvarchar(50)) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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),@tbid Nvarchar(512) |
| | | |
| | | Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' |
| | | Select @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}' |
| | | ` |
| | | } |
| | | |
| | |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let departmentcode = sessionStorage.getItem('departmentcode') || '' |
| | | let organization = sessionStorage.getItem('organization') || '' |
| | | let mk_user_type = sessionStorage.getItem('mk_user_type') || '' |
| | | let nation = sessionStorage.getItem('nation') || '' |
| | | let province = sessionStorage.getItem('province') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | let district = sessionStorage.getItem('district') || '' |
| | | let address = sessionStorage.getItem('address') || '' |
| | | |
| | | let _sheet = btn.sheet |
| | | let BID = data[0].$$BID || '' |
| | | |
| | |
| | | _sql = ` |
| | | /* 系统生成 */ |
| | | declare @${sheet} table (${declarefields.join(',')},jskey nvarchar(50),data_type nvarchar(50),BID nvarchar(50) ) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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),@tbid Nvarchar(512) |
| | | |
| | | Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' |
| | | Select @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}' |
| | | ${_initCustomScript} |
| | | ` |
| | | _sqlInsert = `Insert into @${sheet} (${fields},jskey,data_type,BID)` |
| | |
| | | _sql = ` |
| | | /* 系统生成 */ |
| | | declare @${sheet} table (jskey nvarchar(50)) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@ErrorCode nvarchar(50),@retmsg nvarchar(4000),@tbid Nvarchar(512) |
| | | Declare @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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),@tbid Nvarchar(512) |
| | | |
| | | Select @ErrorCode='', @retmsg='', @UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' |
| | | Select @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}' |
| | | ` |
| | | } |
| | | |
| | |
| | | }) |
| | | |
| | | // 需要声明的变量集 |
| | | let _vars = ['tbid', 'errorcode', 'retmsg', 'billcode', 'bvoucher', 'fibvoucherdate', 'fiyear', 'username', 'fullname', 'modulardetailcode', 'roleid', 'mk_departmentcode', 'mk_organization', 'login_city', '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', 'bid'] |
| | | |
| | | // 主键字段 |
| | | 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), @UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50),@bid nvarchar(50),@ModularDetailCode 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(50),@mk_organization nvarchar(50),@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),@bid nvarchar(50)${_declarefields} |
| | | ` |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let departmentcode = sessionStorage.getItem('departmentcode') || '' |
| | | let organization = sessionStorage.getItem('organization') || '' |
| | | let mk_user_type = sessionStorage.getItem('mk_user_type') || '' |
| | | let nation = sessionStorage.getItem('nation') || '' |
| | | let province = sessionStorage.getItem('province') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | let district = sessionStorage.getItem('district') || '' |
| | | let address = sessionStorage.getItem('address') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | // 初始化凭证及用户信息字段 |
| | | _sql += ` |
| | | /* 凭证及用户信息初始化赋值 */ |
| | | select @BVoucher='',@FIBVoucherDate='',@FiYear='',@ErrorCode='',@retmsg='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}', @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}', @BillCode='', @ModularDetailCode='' |
| | | ` |
| | | |
| | | // 表单变量赋值 |
| | |
| | | } |
| | | }) |
| | | regoptions.push({ |
| | | reg: new RegExp('@login_city@', 'ig'), |
| | | value: `'${city}'` |
| | | }, { |
| | | reg: new RegExp('@userName@', 'ig'), |
| | | value: `'${userName}'` |
| | | }, { |
| | |
| | | |
| | | let userName = sessionStorage.getItem('User_Name') || '' |
| | | let fullName = sessionStorage.getItem('Full_Name') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | |
| | | let regs = [ |
| | | { reg: /@userName@/ig, value: `'${userName}'` }, |
| | | { reg: /@fullName@/ig, value: `'${fullName}'` }, |
| | | { reg: /@login_city@/ig, value: `'${city}'` } |
| | | { reg: /@fullName@/ig, value: `'${fullName}'` } |
| | | ] |
| | | |
| | | if (window.GLOB.externalDatabase !== null) { |
| | |
| | | let RoleID = sessionStorage.getItem('role_id') || '' |
| | | let departmentcode = sessionStorage.getItem('departmentcode') || '' |
| | | let organization = sessionStorage.getItem('organization') || '' |
| | | let mk_user_type = sessionStorage.getItem('mk_user_type') || '' |
| | | let nation = sessionStorage.getItem('nation') || '' |
| | | let province = sessionStorage.getItem('province') || '' |
| | | let city = sessionStorage.getItem('city') || '' |
| | | let district = sessionStorage.getItem('district') || '' |
| | | let address = sessionStorage.getItem('address') || '' |
| | | |
| | | if (sessionStorage.getItem('isEditState') === 'true') { |
| | | userName = sessionStorage.getItem('CloudUserName') || '' |
| | |
| | | let _script = item.script |
| | | |
| | | if (index === 0) { |
| | | _script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@login_city nvarchar(50) |
| | | select @ErrorCode='',@retmsg ='',@UserName='${userName}', @FullName='${fullName}', @RoleID='${RoleID}', @mk_departmentcode='${departmentcode}', @mk_organization='${organization}', @login_city='${city}' |
| | | _script = `declare @ErrorCode nvarchar(50),@retmsg nvarchar(4000),@UserName nvarchar(50),@FullName nvarchar(50),@RoleID nvarchar(512),@mk_departmentcode nvarchar(50),@mk_organization nvarchar(50),@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) |
| | | select @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}' |
| | | ${_script} |
| | | ` |
| | | } |
| | |
| | | sessionStorage.setItem('role_id', res.role_id || '') |
| | | sessionStorage.setItem('departmentcode', res.departmentcode || '') |
| | | sessionStorage.setItem('organization', res.organization || '') |
| | | sessionStorage.setItem('mk_user_type', res.mk_user_type || '') |
| | | sessionStorage.setItem('localRole_id', res.role_id || '') |
| | | |
| | | localStorage.setItem(_href + 'lang', param.lang || 'zh-CN') |
| | |
| | | sessionStorage.setItem('role_id', res.role_id || '') |
| | | sessionStorage.setItem('departmentcode', res.departmentcode || '') |
| | | sessionStorage.setItem('organization', res.organization || '') |
| | | sessionStorage.setItem('mk_user_type', res.mk_user_type || '') |
| | | sessionStorage.setItem('localRole_id', res.role_id || '') |
| | | |
| | | localStorage.setItem(_href + 'lang', param.lang || 'zh-CN') |
| | |
| | | sessionStorage.setItem('role_id', res.role_id || '') |
| | | sessionStorage.setItem('departmentcode', res.departmentcode || '') |
| | | sessionStorage.setItem('organization', res.organization || '') |
| | | sessionStorage.setItem('mk_user_type', res.mk_user_type || '') |
| | | sessionStorage.setItem('localRole_id', res.role_id || '') |
| | | |
| | | sessionStorage.removeItem('visitorUserID') |
| | |
| | | |
| | | const _addressUrl = _href + 'queryAddress' |
| | | |
| | | if (localStorage.getItem(_addressUrl) !== 'true') { |
| | | sessionStorage.setItem('city', '') |
| | | sessionStorage.setItem('ipAddress', '') |
| | | } else { |
| | | if (localStorage.getItem(_addressUrl) === 'true') { |
| | | this.queryAddress() |
| | | } |
| | | |
| | |
| | | queryAddress = () => { |
| | | window.callbackFunction = (res) => { |
| | | if (res.result && res.result.ad_info) { |
| | | sessionStorage.setItem('city', res.result.ad_info.city) |
| | | sessionStorage.setItem('ipAddress', res.result.ip) |
| | | sessionStorage.setItem('nation', res.result.ad_info.nation || '') |
| | | sessionStorage.setItem('province', res.result.ad_info.province || '') |
| | | sessionStorage.setItem('city', res.result.ad_info.city || '') |
| | | sessionStorage.setItem('district', res.result.ad_info.district || '') |
| | | sessionStorage.setItem('address', res.result.ad_info.address || '') |
| | | sessionStorage.setItem('ipAddress', res.result.ip || '') |
| | | } |
| | | } |
| | | |
| | |
| | | sessionStorage.setItem('role_id', res.role_id || '') |
| | | sessionStorage.setItem('departmentcode', res.departmentcode || '') |
| | | sessionStorage.setItem('organization', res.organization || '') |
| | | sessionStorage.setItem('mk_user_type', res.mk_user_type || '') |
| | | sessionStorage.setItem('localRole_id', res.role_id || '') |
| | | |
| | | this.getMessage() |