Merge branch 'master' into positec
| | |
| | | } |
| | | }, |
| | | "caniuse-lite": { |
| | | "version": "1.0.30001523", |
| | | "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001523.tgz", |
| | | "integrity": "sha512-I5q5cisATTPZ1mc588Z//pj/Ox80ERYDfR71YnvY7raS/NOk8xXlZcB0sF7JdqaV//kOaa6aus7lRfpdnt1eBA==" |
| | | "version": "1.0.30001588", |
| | | "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001588.tgz", |
| | | "integrity": "sha512-+hVY9jE44uKLkH0SrUTqxjxqNTOWHsbnQDIKjwkZ3lNTzUUVdBLBGXtj/q5Mp5u98r3droaZAewQuEDzjQdZlQ==" |
| | | }, |
| | | "canvg": { |
| | | "version": "3.0.10", |
| | |
| | | probation -- 试用期(YYYY-MM-DD),在正式系统中,试用期内调用系统接口的脚本会记录下来 |
| | | transfer -- 是否使用转接口,使用转接口时请设置为 true, 使用转接口时,外部接口调用前不会做登录验证 |
| | | keepPassword -- 记住密码,默认开启,当值为 false 时禁用 |
| | | execType -- 脚本传输方式,值为x时,启用AES加密 |
| | | updateStatus -- 是否更新开发状态,默认开启,当值为 false 时禁用 |
| | | forcedUpdate -- 传输号升级时,是否自动退出,格式为(YYYY-MM-DD),用于升级后刷新用户本地配置 |
| | | platforms -- 移动端可使用的平台类型,默认为 ["H5", "wechat", "android", "ios", "wxMiniProgram"] 分别代表H5页面、微信公众号、安卓APP、苹果APP、微信小程序 |
| | |
| | | "probation": "", |
| | | "transfer": "true", |
| | | "keepPassword": "true", |
| | | "execType": "x", |
| | | "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"], |
| | | "host": "http://bms-test.kresstools.cn", |
| | | "service": "oc/" |
| | |
| | | sDebug (sql, rduri = null) { |
| | | let param = { |
| | | func: 's_debug_sql', |
| | | exec_type: 'y', |
| | | exec_type: window.GLOB.execType || 'y', |
| | | timestamp: moment().format('YYYY-MM-DD HH:mm:ss'), |
| | | userid: sessionStorage.getItem('UserID') || '', |
| | | lang: sessionStorage.getItem('lang') || '', |
| | |
| | | |
| | | sql = sql.replace(/\n/ig, ' ') |
| | | |
| | | param.LText = Utils.formatOptions(sql) |
| | | param.LText = Utils.formatOptions(sql, param.exec_type) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | param = this.encryptParam(param) |
| | |
| | | |
| | | let param = { |
| | | func: 's_get_users_operation_log', |
| | | exec_type: 'y', |
| | | exec_type: window.GLOB.execType || 'y', |
| | | LText: LText.join(' union all '), |
| | | long_param: res.long_param |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, param.exec_type) |
| | | |
| | | Api.getSystemConfig(param).then(result => { |
| | | if (!result.status) { |
| | |
| | | func: 's_PwdUpt', |
| | | LText: `select '${res.originpwd}','${res.password}'` |
| | | } |
| | | |
| | | if (window.GLOB.execType === 'x') { |
| | | _param.exec_type = 'x' |
| | | } |
| | | |
| | | _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') // 时间戳 |
| | | _param.LText = Utils.formatOptions(_param.LText) // 关键字符替换,base64加密 |
| | | _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) // md5密钥 |
| | | _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | _param.LText = Utils.formatOptions(_param.LText, _param.exec_type) |
| | | _param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : _param.LText, _param.timestamp) |
| | | |
| | | Api.getSystemConfig(_param).then(result => { |
| | | if (result.status) { |
| | |
| | | mob: this.state.mob, |
| | | check_code: this.state.code |
| | | } |
| | | |
| | | if (window.GLOB.execType === 'x') { |
| | | _param.exec_type = 'x' |
| | | } |
| | | |
| | | _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') // 时间戳 |
| | | _param.LText = Utils.formatOptions(_param.LText) // 关键字符替换,base64加密 |
| | | _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) // md5密钥 |
| | | _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | _param.LText = Utils.formatOptions(_param.LText, _param.exec_type) |
| | | _param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : _param.LText, _param.timestamp) |
| | | |
| | | Api.getSystemConfig(_param).then(result => { |
| | | if (result.status) { |
| | |
| | | onOk={this.resetPwdSubmit} |
| | | onCancel={() => { this.setState({ visible: false })}} |
| | | okText={okText} |
| | | cancelText="取消" |
| | | confirmLoading={loading} |
| | | destroyOnClose |
| | | > |
| | |
| | | GLOB.WXAppID = config.WXAppID || '' |
| | | GLOB.WXminiAppID = config.WXminiAppID || '' |
| | | GLOB.WXNotice = config.WXNotice + '' === 'true' |
| | | GLOB.execType = config.execType === 'x' ? 'x' : '' |
| | | GLOB.accessToken = {} |
| | | GLOB.mkHS = false |
| | | GLOB.debugger = false |
| | |
| | | field: 'maxPageSize', |
| | | label: '每页最大数', |
| | | initval: wrap.maxPageSize || '', |
| | | tooltip: '分页时每页可显示的最大数量。', |
| | | min: 10, |
| | | max: 500, |
| | | precision: 0, |
| | |
| | | field: 'maxPageSize', |
| | | label: '每页最大数', |
| | | initval: wrap.maxPageSize || '', |
| | | tooltip: '分页时每页可显示的最大数量。', |
| | | min: 10, |
| | | max: 500, |
| | | precision: 0, |
| | |
| | | </Radio.Group>) |
| | | } else if (card.type === 'check') { |
| | | formItem = <Checkbox style={{lineHeight: '36px'}} checked={card.initval === card.openVal}>{card.checkTip || ''}</Checkbox> |
| | | } else if (card.type === 'range') { |
| | | let vals = card.initval.split(',') |
| | | formItem = (<> |
| | | <Input style={{marginTop: '4px'}} value={vals[0] || ''} /> |
| | | 至 |
| | | <Input style={{marginTop: '4px'}} value={vals[1] || ''} /> |
| | | </>) |
| | | } |
| | | |
| | | return ( |
| | |
| | | newcard.orderType = 'asc' |
| | | |
| | | let _match = 'like' |
| | | if (item.subType === 'select' || item.subType === 'link' || item.subType === 'checkcard') { |
| | | if (['select', 'link', 'checkcard'].includes(item.subType)) { |
| | | _match = '=' |
| | | } else if (item.subType === 'date' || item.subType === 'datemonth') { |
| | | } else if (['date', 'datemonth'].includes(item.subType)) { |
| | | _match = '>=' |
| | | } else if (item.subType === 'dateweek' || item.subType === 'daterange') { |
| | | } else if (['dateweek', 'daterange', 'range'].includes(item.subType)) { |
| | | _match = 'between' |
| | | } else if (item.subType === 'group') { |
| | | _match = 'between' |
| | |
| | | color: orange; |
| | | } |
| | | } |
| | | .page-card.range { |
| | | .ant-form-item-control-wrapper { |
| | | .ant-form-item-control { |
| | | .ant-form-item-children { |
| | | display: flex; |
| | | line-height: 40px; |
| | | .ant-input:first-child { |
| | | margin-right: 5px; |
| | | } |
| | | .ant-input:last-child { |
| | | margin-left: 5px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .page-card.no-query { |
| | | .ant-form-explain { |
| | | color: #13c2c2; |
| | |
| | | const MkEditIcon = asyncComponent(() => import('@/components/mkIcon')) |
| | | const MKTable = asyncComponent(() => import('@/components/normalform/modalform/mkTable')) |
| | | const acTyOptions = { |
| | | pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hidden', 'preButton', 'formCache'], |
| | | prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hidden', 'preButton', 'formCache'], |
| | | exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'hidden', 'preButton', 'formCache'], |
| | | pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hoverTitle', 'hidden', 'preButton', 'formCache'], |
| | | prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hoverTitle', 'hidden', 'preButton', 'formCache'], |
| | | exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'hoverTitle', 'hidden', 'preButton', 'formCache'], |
| | | excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'width', 'hidden'], |
| | | excelOut: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'pagination', 'search', 'width', 'hidden'], |
| | | popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'popClose', 'width', 'display', 'ratio', 'syncComponent', 'clickouter', 'maskStyle', 'closeButton', 'hidden'], |
| | |
| | | shows.push('resetPageIndex') |
| | | } |
| | | } else if (openType === 'tab') { |
| | | reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value)) |
| | | reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredSgl', 'requiredOnce'].includes(op.value)) |
| | | |
| | | reRequired.linkmenu = true |
| | | reTooltip.linkmenu = '' |
| | |
| | | getPrintTemp = () => { |
| | | let param = { |
| | | func: 'sPC_Get_SelectedList', |
| | | LText: Utils.formatOptions(queryPrintSql), |
| | | LText: Utils.formatOptions(queryPrintSql, 'x'), |
| | | obj_name: 'data', |
| | | arr_field: 'PN,ID,Images' |
| | | arr_field: 'PN,ID,Images', |
| | | exec_type: 'x' |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 云端数据验证 |
| | | |
| | | Api.getCloudConfig(param).then(res => { |
| | |
| | | key: 'execSuccess', |
| | | label: '成功后', |
| | | initVal: card.execSuccess || 'grid', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用);@no_target_menu@ 不执行打开菜单。' : '选择刷新行时,如果选择多条数据会刷新组件;选择刷新行 / 组件时,如果当前行数据不存在会刷新组件。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用);@no_target_menu@ 不执行打开菜单。', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮(弹窗按钮)中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用);@no_target_menu@ 不执行打开菜单。' : '选择刷新行时,如果选择多条数据会刷新组件;选择刷新行 / 组件时,如果当前行数据不存在会刷新组件。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用);@no_target_menu@ 不执行打开菜单。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | |
| | | key: 'execError', |
| | | label: '失败后', |
| | | initVal: card.execError || 'never', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用)。' : '选择刷新行时,如果选择多条数据会刷新组件;选择刷新行 / 组件时,如果当前行数据不存在会刷新组件。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用)。', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮(弹窗按钮)中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用)。' : '选择刷新行时,如果选择多条数据会刷新组件;选择刷新行 / 组件时,如果当前行数据不存在会刷新组件。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用)。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | |
| | | label: '确认提示', |
| | | initVal: card.tipTitle || '', |
| | | tooltip: '注:弹窗(表单)在显示为是否框时有效。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'hoverTitle', |
| | | label: '悬浮提示', |
| | | initVal: card.hoverTitle || '', |
| | | tooltip: '鼠标悬浮在按钮上方时的提示信息。', |
| | | forbid: appType === 'mob', |
| | | required: false |
| | | }, |
| | | { |
| | |
| | | key: 'execSuccess', |
| | | label: '成功后', |
| | | initVal: card.execSuccess || 'grid', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用);@no_target_menu@ 不执行打开菜单。' : '选择刷新行时,如果选择多条数据会刷新组件;选择刷新行 / 组件时,如果当前行数据不存在会刷新组件。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用);@no_target_menu@ 不执行打开菜单。', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮(弹窗按钮)中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用);@no_target_menu@ 不执行打开菜单。' : '选择刷新行时,如果选择多条数据会刷新组件;选择刷新行 / 组件时,如果当前行数据不存在会刷新组件。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用);@no_target_menu@ 不执行打开菜单。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | |
| | | key: 'execError', |
| | | label: '失败后', |
| | | initVal: card.execError || 'never', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新哪一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用)。' : '选择刷新行时,如果选择多条数据会刷新组件;选择刷新行 / 组件时,如果当前行数据不存在会刷新组件。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用)。', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮(弹窗按钮)中设置关闭后刷新哪一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用)。' : '选择刷新行时,如果选择多条数据会刷新组件;选择刷新行 / 组件时,如果当前行数据不存在会刷新组件。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用)。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'hoverTitle', |
| | | label: '悬浮提示', |
| | | initVal: card.hoverTitle || '', |
| | | tooltip: '鼠标悬浮在按钮上方时的提示信息。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'openTab', |
| | | label: '打开方式', |
| | |
| | | title: '对比方式', |
| | | dataIndex: 'match', |
| | | width: '18%', |
| | | render: text => { |
| | | return text === 'regexp' ? '正则表达式' : text |
| | | } |
| | | }, |
| | | { |
| | | title: '对比值', |
| | |
| | | |
| | | let cvalues = {} |
| | | let cols = config.cols.map(item => { |
| | | let types = {custom: '自定义列', colspan: '合并列'} |
| | | let label = types[item.type] ? `${item.label}(${types[item.type]})` : item.label |
| | | let label = item.label |
| | | if (item.type === 'colspan' && item.subcols && item.subcols.length > 0) { |
| | | label = `${item.label}(${item.subcols.map(cell => cell.label).join('、')})` |
| | | } |
| | | |
| | | cvalues[item.uuid] = label |
| | | |
| | |
| | | <Select.Option value="!="> != </Select.Option> |
| | | <Select.Option value=">"> > </Select.Option> |
| | | <Select.Option value="<"> < </Select.Option> |
| | | <Select.Option value="regexp"> 正则表达式 </Select.Option> |
| | | </Select> |
| | | )} |
| | | </Form.Item> |
| | |
| | | } |
| | | |
| | | let formItem = null |
| | | let type = '' |
| | | if (card.type === 'text') { |
| | | if (card.inputType !== 'search') { |
| | | formItem = <Input placeholder={card.label} value={card.initval} /> |
| | |
| | | formItem = (<Switch checkedChildren={card.openText || ''} unCheckedChildren={card.closeText || ''} style={{marginTop: '8px'}} checked={card.initval === card.openVal}/>) |
| | | } else if (card.type === 'check') { |
| | | formItem = <Checkbox style={{lineHeight: '36px'}} checked={card.initval === card.openVal}>{card.checkTip || ''}</Checkbox> |
| | | } else if (card.type === 'range') { |
| | | type = 'range-wrap' |
| | | let vals = card.initval.split(',') |
| | | formItem = (<> |
| | | <Input style={{marginTop: '4px'}} value={vals[0] || ''} /> |
| | | 至 |
| | | <Input style={{marginTop: '4px'}} value={vals[1] || ''} /> |
| | | </>) |
| | | } |
| | | |
| | | let labelwidth = card.labelwidth || 33.3 |
| | |
| | | <CloseOutlined className="close" title="删除" onClick={() => delCard(id)} /> |
| | | </div> |
| | | } trigger="hover"> |
| | | <div className={'page-card ' + (card.labelShow || '')} style={{ opacity: opacity}}> |
| | | <div className={`page-card ${type} ${card.labelShow || ''}`} style={{ opacity: opacity}}> |
| | | <div ref={node => drag(drop(node))}> |
| | | <Form.Item |
| | | labelCol={{style: {width: labelwidth + '%'}}} |
| | |
| | | newcard.orderType = 'asc' |
| | | |
| | | let _match = 'like' |
| | | if (item.subType === 'select' || item.subType === 'link' || item.subType === 'checkcard') { |
| | | if (['select', 'link', 'checkcard'].includes(item.subType)) { |
| | | _match = '=' |
| | | } else if (item.subType === 'date' || item.subType === 'datemonth') { |
| | | } else if (['date', 'datemonth'].includes(item.subType)) { |
| | | _match = '>=' |
| | | } else if (item.subType === 'dateweek' || item.subType === 'daterange') { |
| | | } else if (['dateweek', 'daterange', 'range'].includes(item.subType)) { |
| | | _match = 'between' |
| | | } else if (item.subType === 'group') { |
| | | _match = 'between' |
| | |
| | | float: left; |
| | | } |
| | | } |
| | | .page-card.range-wrap { |
| | | .ant-form-item-control-wrapper { |
| | | .ant-form-item-control { |
| | | .ant-form-item-children { |
| | | display: flex; |
| | | line-height: 40px; |
| | | .ant-input:first-child { |
| | | margin-right: 5px; |
| | | } |
| | | .ant-input:last-child { |
| | | margin-left: 5px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .page-card.false { |
| | | .ant-form-item-label { |
| | | display: none; |
| | |
| | | field: 'maxPageSize', |
| | | label: '每页最大数', |
| | | initval: wrap.maxPageSize || '', |
| | | tooltip: '分页时每页可显示的最大数量。', |
| | | min: 10, |
| | | max: 500, |
| | | precision: 0, |
| | |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'showField', |
| | | label: '显示字段', |
| | | initVal: card.showField || '', |
| | | tooltip: '用于控制单元格中的显示内容。', |
| | | required: false, |
| | | options: 'columns' |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'controlField', |
| | | label: '禁用字段', |
| | | initVal: card.controlField || '', |
| | |
| | | } else if (this.record.editType === 'date') { |
| | | _options.push('required', 'precision', 'enter', 'declareType') |
| | | } else if (this.record.editType === 'popSelect') { |
| | | _options.push('required', 'enter', 'linkSubField', 'columns', 'dataSource', 'primaryKey', 'order', 'controlField', 'searchKey', 'popWidth', 'laypage', 'cache', 'onload') |
| | | _options.push('required', 'enter', 'linkSubField', 'columns', 'dataSource', 'primaryKey', 'order', 'showField', 'controlField', 'searchKey', 'popWidth', 'laypage', 'cache', 'onload') |
| | | } else if (this.record.editType === 'select') { |
| | | _options.push('required', 'enter', 'resourceType', 'linkSubField', 'dropdown') |
| | | |
| | |
| | | return !is(fromJS(this.props.column), fromJS(nextProps.column)) || |
| | | !is(fromJS(this.props.fields), fromJS(nextProps.fields)) || |
| | | this.props.index !== nextProps.index || |
| | | window.GLOB.columnId === nextProps.column.uuid || window.GLOB.precolumnId === nextProps.column.uuid |
| | | (nextProps.className && this.props.className !== nextProps.className) || |
| | | window.GLOB.columnId === nextProps.column.uuid || |
| | | window.GLOB.precolumnId === nextProps.column.uuid |
| | | } |
| | | |
| | | render() { |
| | |
| | | |
| | | let _scriptSql = `Select distinct func+Remark as funcname,longparam, s.Sort from s_custom_script s inner join (select OpenID from sapp where ID=@Appkey@) p on s.openid = case when s.appkey='' then s.openid else p.OpenID end order by s.Sort` |
| | | |
| | | _scriptSql = Utils.formatOptions(_scriptSql) |
| | | _scriptSql = Utils.formatOptions(_scriptSql, 'x') |
| | | |
| | | let _sParam = { |
| | | func: 'sPC_Get_SelectedList', |
| | | LText: _scriptSql, |
| | | obj_name: 'data', |
| | | arr_field: 'funcname,longparam' |
| | | arr_field: 'funcname,longparam', |
| | | exec_type: 'x' |
| | | } |
| | | |
| | | _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) |
| | | |
| | | _sParam.secretkey = Utils.encrypt('', _sParam.timestamp) |
| | | _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 云端数据验证 |
| | | |
| | | Api.getCloudConfig(_sParam).then(res => { |
| | |
| | | field: 'maxPageSize', |
| | | label: '每页最大数', |
| | | initval: wrap.maxPageSize || '', |
| | | tooltip: '分页时每页可显示的最大数量。', |
| | | min: 10, |
| | | max: 500, |
| | | precision: 0, |
| | |
| | | return !is(fromJS(this.props.column), fromJS(nextProps.column)) || |
| | | !is(fromJS(this.props.fields), fromJS(nextProps.fields)) || |
| | | this.props.index !== nextProps.index || |
| | | window.GLOB.columnId === nextProps.column.uuid || window.GLOB.precolumnId === nextProps.column.uuid |
| | | (nextProps.className && this.props.className !== nextProps.className) || |
| | | window.GLOB.columnId === nextProps.column.uuid || |
| | | window.GLOB.precolumnId === nextProps.column.uuid |
| | | } |
| | | |
| | | render() { |
| | |
| | | field: 'maxPageSize', |
| | | label: '每页最大数', |
| | | initval: wrap.maxPageSize || '', |
| | | tooltip: '分页时每页可显示的最大数量。', |
| | | min: 10, |
| | | max: 500, |
| | | precision: 0, |
| | |
| | | import Toast from 'antd-mobile/es/components/toast' |
| | | import Dialog from 'antd-mobile/es/components/dialog' |
| | | |
| | | import { checkSQL } from '@/utils/utils-custom.js' |
| | | import { checkSQL, getSearchFields } from '@/utils/utils-custom.js' |
| | | import CodeMirror from '@/templates/zshare/codemirror' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | |
| | | UNSAFE_componentWillMount() { |
| | | const { searches } = this.props |
| | | |
| | | this.getSearchField(searches) |
| | | this.setState({ |
| | | usefulFields: getSearchFields(searches) |
| | | }) |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps (nextProps) { |
| | | if (!is(fromJS(this.props.searches), fromJS(nextProps.searches))) { |
| | | this.getSearchField(nextProps.searches) |
| | | this.setState({ |
| | | usefulFields: getSearchFields(nextProps.searches) |
| | | }) |
| | | } |
| | | } |
| | | |
| | | getSearchField = (searches) => { |
| | | let _usefulFields = [] |
| | | searches.forEach(item => { |
| | | if (item.type === 'dateweek') { |
| | | _usefulFields.push(item.key) |
| | | _usefulFields.push(item.key + '1') |
| | | } else if (item.type === 'datemonth') { |
| | | if (item.match === '=') { |
| | | _usefulFields.push(item.key) |
| | | } else { |
| | | _usefulFields.push(item.key) |
| | | _usefulFields.push(item.key + '1') |
| | | } |
| | | } else if (item.type === 'daterange') { |
| | | let _skey = item.key |
| | | let _ekey = item.key + '1' |
| | | |
| | | if (/,/.test(item.key)) { |
| | | _skey = item.key.split(',')[0] |
| | | _ekey = item.key.split(',')[1] |
| | | } |
| | | _usefulFields.push(_skey) |
| | | _usefulFields.push(_ekey) |
| | | } else if (item.type === 'date' && _usefulFields.includes(item.key)) { |
| | | _usefulFields.push(item.key + '1') |
| | | } else { |
| | | _usefulFields.push(item.key) |
| | | } |
| | | }) |
| | | |
| | | this.setState({ |
| | | usefulFields: _usefulFields.join(', ') |
| | | }) |
| | | } |
| | | |
| | | edit = (record) => { |
| | |
| | | |
| | | let _scriptSql = `Select distinct func+Remark as funcname,longparam, s.Sort from s_custom_script s inner join (select OpenID from sapp where ID=@Appkey@) p on s.openid = case when s.appkey='' then s.openid else p.OpenID end order by s.Sort` |
| | | |
| | | _scriptSql = Utils.formatOptions(_scriptSql) |
| | | _scriptSql = Utils.formatOptions(_scriptSql, 'x') |
| | | |
| | | let _sParam = { |
| | | func: 'sPC_Get_SelectedList', |
| | | LText: _scriptSql, |
| | | obj_name: 'data', |
| | | arr_field: 'funcname,longparam' |
| | | arr_field: 'funcname,longparam', |
| | | exec_type: 'x' |
| | | } |
| | | |
| | | _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) |
| | | |
| | | _sParam.secretkey = Utils.encrypt('', _sParam.timestamp) |
| | | _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 云端数据验证 |
| | | |
| | | Api.getCloudConfig(_sParam).then(res => { |
| | |
| | | func: 'sPC_Get_SelectedList', |
| | | LText: queryTableSql, |
| | | obj_name: 'data', |
| | | arr_field: 'TbName,Remark' |
| | | arr_field: 'TbName,Remark', |
| | | exec_type: 'x' |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, 'x') |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 云端数据验证 |
| | | |
| | | if (window.GLOB.cloudServiceApi) { // 且存在云端地址 |
| | |
| | | { subType: 'dateweek', text: '日期(周)', type: 'search' }, |
| | | { subType: 'datemonth', text: '日期(月)', type: 'search' }, |
| | | { subType: 'daterange', text: '日期(区间)', type: 'search' }, |
| | | { subType: 'group', text: '日期(组合)', type: 'search' } |
| | | { subType: 'group', text: '日期(组合)', type: 'search' }, |
| | | { subType: 'range', text: '数值(区间)', type: 'search' }, |
| | | { subType: 'switch', text: '开关', type: 'search' }, |
| | | { subType: 'radio', text: '单选框', type: 'search' }, |
| | | { subType: 'check', text: '勾选框', type: 'search' }, |
| | | ] |
| | | }, |
| | | { |
| | |
| | | func: 'sPC_Get_SelectedList', |
| | | LText: queryTableSql, |
| | | obj_name: 'data', |
| | | arr_field: 'TbName,Remark' |
| | | arr_field: 'TbName,Remark', |
| | | exec_type: 'x' |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, 'x') |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 云端数据验证 |
| | | |
| | | if (window.GLOB.cloudServiceApi) { // 且存在云端地址 |
| | |
| | | debug_md5: key, |
| | | debug_url: url, |
| | | debug_list: window.btoa(tbs), |
| | | LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(_config))) |
| | | LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(_config))), |
| | | LText: '' |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | Api.getCloudConfig(param).then(res => { |
| | | _resolve() |
| | |
| | | font-weight: inherit; |
| | | padding-left: 10px; |
| | | padding-top: 10px; |
| | | min-height: 15px; |
| | | border-bottom: 1px solid #e9e9e9; |
| | | } |
| | | .check-card-edit-box .card-cell span { |
| | |
| | | MKEmitter.addListener('reloadData', this.reloadData) |
| | | MKEmitter.addListener('mkFormSubmit', this.mkFormSubmit) |
| | | MKEmitter.addListener('resetSelectLine', this.resetParentParam) |
| | | MKEmitter.addListener('queryModuleParam', this.queryModuleParam) |
| | | MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult) |
| | | |
| | | if (config.setting.sync === 'true') { |
| | |
| | | MKEmitter.removeListener('searchRefresh', this.searchRefresh) |
| | | MKEmitter.removeListener('resetSelectLine', this.resetParentParam) |
| | | MKEmitter.removeListener('transferSyncData', this.transferSyncData) |
| | | MKEmitter.removeListener('queryModuleParam', this.queryModuleParam) |
| | | MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult) |
| | | } |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 获取组件搜索 |
| | | */ |
| | | queryModuleParam = (menuId, callback) => { |
| | | const { config } = this.state |
| | | |
| | | if (config.uuid !== menuId) return |
| | | |
| | | let searches = [] |
| | | if (config.setting.useMSearch) { // 主表搜索条件 |
| | | searches = window.GLOB.SearchBox.get(config.$searchId) || [] |
| | | } |
| | | |
| | | callback({ |
| | | search: searches |
| | | }) |
| | | } |
| | | |
| | | reloadData = (menuId, id) => { |
| | | const { config, group } = this.state |
| | | |
| | |
| | | MKEmitter.addListener('reloadData', this.reloadData) |
| | | MKEmitter.addListener('mkFormSubmit', this.mkFormSubmit) |
| | | MKEmitter.addListener('resetSelectLine', this.resetParentParam) |
| | | MKEmitter.addListener('queryModuleParam', this.queryModuleParam) |
| | | MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult) |
| | | |
| | | if (config.setting.sync === 'true') { |
| | |
| | | MKEmitter.removeListener('searchRefresh', this.searchRefresh) |
| | | MKEmitter.removeListener('resetSelectLine', this.resetParentParam) |
| | | MKEmitter.removeListener('transferSyncData', this.transferSyncData) |
| | | MKEmitter.removeListener('queryModuleParam', this.queryModuleParam) |
| | | MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult) |
| | | } |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 获取组件搜索 |
| | | */ |
| | | queryModuleParam = (menuId, callback) => { |
| | | const { config } = this.state |
| | | |
| | | if (config.uuid !== menuId) return |
| | | |
| | | let searches = [] |
| | | if (config.setting.useMSearch) { // 主表搜索条件 |
| | | searches = window.GLOB.SearchBox.get(config.$searchId) || [] |
| | | } |
| | | |
| | | callback({ |
| | | search: searches |
| | | }) |
| | | } |
| | | |
| | | reloadData = (menuId, id) => { |
| | | const { config } = this.state |
| | | |
| | |
| | | MKEmitter.addListener('reloadData', this.reloadData) |
| | | MKEmitter.addListener('mkFormSubmit', this.mkFormSubmit) |
| | | MKEmitter.addListener('resetSelectLine', this.resetParentParam) |
| | | MKEmitter.addListener('queryModuleParam', this.queryModuleParam) |
| | | MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult) |
| | | |
| | | if (config.setting.sync === 'true') { |
| | |
| | | MKEmitter.removeListener('searchRefresh', this.searchRefresh) |
| | | MKEmitter.removeListener('resetSelectLine', this.resetParentParam) |
| | | MKEmitter.removeListener('transferSyncData', this.transferSyncData) |
| | | MKEmitter.removeListener('queryModuleParam', this.queryModuleParam) |
| | | MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult) |
| | | } |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 获取组件搜索 |
| | | */ |
| | | queryModuleParam = (menuId, callback) => { |
| | | const { config } = this.state |
| | | |
| | | if (config.uuid !== menuId) return |
| | | |
| | | let searches = [] |
| | | if (config.setting.useMSearch) { // 主表搜索条件 |
| | | searches = window.GLOB.SearchBox.get(config.$searchId) || [] |
| | | } |
| | | |
| | | callback({ |
| | | search: searches |
| | | }) |
| | | } |
| | | |
| | | reloadData = (menuId, id) => { |
| | | const { config } = this.state |
| | | |
| | |
| | | LText: `delete tmp_session_show_key where createuserid='${userid}' and key_type='fcc_years' |
| | | insert into tmp_session_show_key ( key_id,key_type,createuserid,CreateUser,CreateStaff) |
| | | select '${item.id}','fcc_years','${userid}','${sid}','${sessionStorage.getItem('Full_Name') || ''}'`, |
| | | exec_type: 'y' |
| | | exec_type: window.GLOB.execType || 'y' |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, param.exec_type) |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | | if (!res.status) { |
| | |
| | | result = originVal === contrastVal |
| | | } else if (item.match === '!=') { |
| | | result = originVal !== contrastVal |
| | | } else if (item.match === 'regexp') { |
| | | let reg = new RegExp(item.contrastValue, 'ig') |
| | | result = reg.test(originVal) |
| | | } else { |
| | | originVal = isNaN(originVal) ? originVal : +originVal |
| | | contrastVal = isNaN(contrastVal) ? contrastVal : +contrastVal |
| | |
| | | top: -22px; |
| | | z-index: 2; |
| | | } |
| | | |
| | | .ant-table-placeholder { |
| | | border-top-color: var(--mk-table-border-color); |
| | | } |
| | | .normal-table-footer { |
| | | padding: 10px 0px; |
| | | color: rgba(0, 0, 0, 0.65); |
| | |
| | | } else if (content === config.closeVal) { |
| | | content = config.closeText |
| | | } |
| | | } else if (col.editType === 'popSelect') { |
| | | if (col.showField) { |
| | | content = record[col.showField] || content |
| | | } |
| | | } |
| | | |
| | | if (content !== '') { |
| | |
| | | <MkDatePicker config={col} lineId={record.$$uuid} defaultValue={_value || null} autoFocus={true} onChange={this.onColChange} onBlur={() => this.setState({editing: false})}/> |
| | | </td>) |
| | | } else if (col.editType === 'popSelect') { |
| | | let showValue = '' |
| | | if (col.showField) { |
| | | showValue = record[col.showField] || '' |
| | | } |
| | | |
| | | return (<td onClick={(e) => e.stopPropagation()} className="editing_table_cell"> |
| | | <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} BID={record.$$BID} autoFocus={true} onChange={this.onColChange} onBlur={() => this.setState({editing: false})}/> |
| | | <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} showValue={showValue} BID={record.$$BID} autoFocus={true} onChange={this.onColChange} onBlur={() => this.setState({editing: false})}/> |
| | | </td>) |
| | | } else { |
| | | return (<td onClick={(e) => e.stopPropagation()} className="editing_table_cell"> |
| | |
| | | <MkDatePicker config={col} lineId={record.$$uuid} defaultValue={_value || null} autoFocus={false} onChange={this.onColChange}/> |
| | | ) |
| | | } else if (col.editType === 'popSelect') { |
| | | let showValue = '' |
| | | if (col.showField) { |
| | | showValue = record[col.showField] || '' |
| | | } |
| | | |
| | | children = ( |
| | | <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} BID={record.$$BID} autoFocus={false} onChange={this.onColChange}/> |
| | | <MKPopSelect config={col} lineId={record.$$uuid} defaultValue={_value} showValue={showValue} BID={record.$$BID} autoFocus={false} onChange={this.onColChange}/> |
| | | ) |
| | | } else { |
| | | children = ( |
| | |
| | | content = config.openText |
| | | } else if (content === config.closeVal) { |
| | | content = config.closeText |
| | | } |
| | | } else if (col.editType === 'popSelect') { |
| | | if (col.showField) { |
| | | content = record[col.showField] || content |
| | | } |
| | | } |
| | | |
| | |
| | | result = originVal === contrastVal |
| | | } else if (item.match === '!=') { |
| | | result = originVal !== contrastVal |
| | | } else if (item.match === 'regexp') { |
| | | let reg = new RegExp(item.contrastValue, 'ig') |
| | | result = reg.test(originVal) |
| | | } else { |
| | | originVal = isNaN(originVal) ? originVal : +originVal |
| | | contrastVal = isNaN(contrastVal) ? contrastVal : +contrastVal |
| | |
| | | } |
| | | |
| | | if (param.LText) { |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | if (window.GLOB.execType === 'x') { |
| | | param.exec_type = 'x' |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText, param.exec_type) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : param.LText, param.timestamp) |
| | | |
| | | deffers.push( |
| | | new Promise(resolve => { |
| | |
| | | } |
| | | |
| | | if (mainparam.LText) { |
| | | mainparam.LText = Utils.formatOptions(mainparam.LText) |
| | | if (window.GLOB.execType === 'x') { |
| | | mainparam.exec_type = 'x' |
| | | } |
| | | |
| | | mainparam.LText = Utils.formatOptions(mainparam.LText, mainparam.exec_type) |
| | | mainparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | mainparam.secretkey = Utils.encrypt(mainparam.LText, mainparam.timestamp) |
| | | mainparam.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : mainparam.LText, mainparam.timestamp) |
| | | |
| | | if (window.GLOB.mainSystemApi) { |
| | | mainparam.rduri = window.GLOB.mainSystemApi |
| | |
| | | |
| | | delete param.excel_in |
| | | |
| | | param.exec_type = 'y' |
| | | param.LText = Utils.formatOptions(result.sql) |
| | | param.exec_type = window.GLOB.execType || 'y' |
| | | param.LText = Utils.formatOptions(result.sql, param.exec_type) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | |
| | | position: relative; |
| | | // z-index: 1; |
| | | } |
| | | .ant-table-placeholder { |
| | | border-top-color: var(--mk-table-border-color); |
| | | } |
| | | .ant-table { |
| | | color: inherit; |
| | | font-size: inherit; |
| | |
| | | let param = { |
| | | func: 'sPC_Get_TableData', |
| | | obj_name: 'data', |
| | | exec_type: 'y', |
| | | exec_type: window.GLOB.execType || 'y', |
| | | arr_field: config.arr_field, |
| | | default_sql: 'true', |
| | | custom_script: '', |
| | |
| | | DateCount && console.info(`/*${config.label} 总数查询*/\n` + DateCount.replace(/\n\s{6}/ig, '\n')) |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(sql) |
| | | param.DateCount = Utils.formatOptions(DateCount) |
| | | param.LText = Utils.formatOptions(sql, param.exec_type) |
| | | param.DateCount = Utils.formatOptions(DateCount, param.exec_type) |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | |
| | | |
| | | this.state = { |
| | | value: props.defaultValue, |
| | | showValue: props.showValue, |
| | | visible: false |
| | | } |
| | | } |
| | |
| | | const { config, lineId } = this.props |
| | | |
| | | let values = {[config.field]: record.$$uuid} |
| | | let showValue = '' |
| | | if (config.showField) { |
| | | showValue = record[config.showField] || '' |
| | | } |
| | | |
| | | if (config.linkSubField) { |
| | | config.linkSubField.forEach((m, i) => { |
| | |
| | | |
| | | this.props.onChange(values, record.$$uuid) |
| | | |
| | | this.setState({visible: false, value: record.$$uuid}) |
| | | this.setState({visible: false, value: record.$$uuid, showValue}) |
| | | |
| | | if (config.$ctrl) { |
| | | MKEmitter.emit('colBlur' + config.tableId, lineId, config.uuid) |
| | |
| | | } |
| | | |
| | | this.props.onChange(values, '') |
| | | this.setState({value: ''}) |
| | | this.setState({value: '', showValue: ''}) |
| | | |
| | | if (config.$ctrl) { |
| | | MKEmitter.emit('colBlur' + config.tableId, lineId, config.uuid) |
| | |
| | | |
| | | render() { |
| | | const { autoFocus, BID, lineId, config } = this.props |
| | | const { value, visible } = this.state |
| | | const { showValue, value, visible } = this.state |
| | | |
| | | return <> |
| | | {autoFocus ? <div className="mk-pop-select-mask" onClick={this.trigger}></div> : null} |
| | | <div className="mk-pop-select-wrap" onClick={this.trigger}> |
| | | {value} |
| | | {showValue || value} |
| | | {value && !autoFocus ? <CloseCircleFilled onClick={this.clear} /> : null} |
| | | <TableOutlined onClick={this.trigger}/> |
| | | </div> |
| | |
| | | delete param.excel_in |
| | | |
| | | // param.excel_in_type = 'true' |
| | | param.exec_type = 'y' |
| | | param.exec_type = window.GLOB.execType || 'y' |
| | | param.LText = result.sql |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | |
| | |
| | | param.LText = param.LText.replace(/\$check@|@check\$/ig, '') |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, param.exec_type) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | if (window.GLOB.mkHS) { // 云端验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | |
| | | |
| | | if (unCheckParam) { |
| | | unCheckParam.LText = unCheckParam.LText.replace(/\$check@/ig, '/*').replace(/@check\$/ig, '*/') |
| | | unCheckParam.LText = Utils.formatOptions(unCheckParam.LText) |
| | | unCheckParam.LText = Utils.formatOptions(unCheckParam.LText, unCheckParam.exec_type) |
| | | unCheckParam.secretkey = Utils.encrypt('', unCheckParam.timestamp) |
| | | unCheckParam.menuname = btn.logLabel |
| | | |
| | |
| | | } |
| | | |
| | | try { |
| | | if (imgCol) { |
| | | if (btn.verify.excelHandle === 'true') { |
| | | // eslint-disable-next-line |
| | | let func = new Function('XLSX', 'data', 'columns', 'callback', btn.verify.excel_func) |
| | | func(XLSX, data, columns, (res) => { |
| | | res = res || {ErrCode: ErrCode || 'S', message: msg || '导出成功!'} |
| | | this.execSuccess(res) |
| | | }) |
| | | } else if (imgCol) { |
| | | const column = columns.map(item => { |
| | | let col = { |
| | | title: item.Text, |
| | |
| | | this.execSuccess({ErrCode: ErrCode || 'S', message: msg || '导出成功!'}) |
| | | } |
| | | } catch (e) { |
| | | console.warn(e) |
| | | this.execError({ErrCode: 'N', message: 'Excel生成失败!'}) |
| | | } |
| | | } |
| | |
| | | getIpList = () => { |
| | | let _scriptSql = `select ID,data_code,data_name,Remark,face_ip,face_uname,face_pwd from bd_data where typecharone='face_device' and deleted=0` |
| | | |
| | | _scriptSql = Utils.formatOptions(_scriptSql) |
| | | |
| | | let _sParam = { |
| | | func: 'sPC_Get_SelectedList', |
| | | LText: _scriptSql, |
| | | obj_name: 'data', |
| | | arr_field: 'ID,data_code,data_name,Remark,face_ip,face_uname,face_pwd' |
| | | } |
| | | |
| | | if (window.GLOB.execType === 'x') { |
| | | _sParam.exec_type = 'x' |
| | | } |
| | | |
| | | _sParam.LText = Utils.formatOptions(_scriptSql, _sParam.exec_type) |
| | | _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) |
| | | _sParam.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : _sParam.LText, _sParam.timestamp) |
| | | |
| | | NApi.getSystemCacheConfig(_sParam).then(res => { |
| | | if (res.status) { |
| | |
| | | import moment from 'moment' |
| | | import qs from 'qs' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, Modal, notification, message, Drawer, Switch, Checkbox, Progress } from 'antd' |
| | | import { Button, Modal, notification, message, Popover, Drawer, Switch, Checkbox, Progress } from 'antd' |
| | | import md5 from 'md5' |
| | | |
| | | import Api from '@/api' |
| | |
| | | } |
| | | } |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.exec_type = window.GLOB.execType || 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | |
| | | param.LText = param.LText.replace(/\$check@|@check\$/ig, '') |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, param.exec_type) |
| | | } else if (btn.OpenType === 'pop' || btn.OpenType === 'formSubmit' || btn.OpenType === 'form') { // 表单 |
| | | if (btn.sqlType === 'insert') { // 系统函数添加时,生成uuid |
| | | primaryId = '' |
| | |
| | | } |
| | | } |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.exec_type = window.GLOB.execType || 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | |
| | | param.LText = param.LText.replace(/\$check@|@check\$/ig, '') |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, param.exec_type) |
| | | } else { |
| | | param.ID = primaryId |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.exec_type = window.GLOB.execType || 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | |
| | | param.LText = param.LText.replace(/\$check@|@check\$/ig, '') |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, param.exec_type) |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | if (param.$unCheckParam) { |
| | | param.$unCheckParam.LText = param.$unCheckParam.LText.replace(/\$check@/ig, '/*').replace(/@check\$/ig, '*/') |
| | | param.$unCheckParam.LText = Utils.formatOptions(param.$unCheckParam.LText) |
| | | param.$unCheckParam.LText = Utils.formatOptions(param.$unCheckParam.LText, param.exec_type) |
| | | param.$unCheckParam.menuname = btn.logLabel |
| | | |
| | | if (window.GLOB.probation) { |
| | |
| | | } |
| | | } |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.exec_type = window.GLOB.execType || 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | |
| | | param.LText = param.LText.replace(/\$check@|@check\$/ig, '') |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, param.exec_type) |
| | | } else if (btn.OpenType === 'pop') { // 表单 |
| | | if (index !== 0) { |
| | | let _cell = {} |
| | |
| | | } |
| | | } |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.exec_type = window.GLOB.execType || 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | |
| | | param.LText = param.LText.replace(/\$check@|@check\$/ig, '') |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, param.exec_type) |
| | | } else { |
| | | param.ID = primaryId |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.exec_type = window.GLOB.execType || 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | |
| | | param.LText = param.LText.replace(/\$check@|@check\$/ig, '') |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, param.exec_type) |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | if (param.$unCheckParam) { |
| | | param.$unCheckParam.LText = param.$unCheckParam.LText.replace(/\$check@/ig, '/*').replace(/@check\$/ig, '*/') |
| | | param.$unCheckParam.LText = Utils.formatOptions(param.$unCheckParam.LText) |
| | | param.$unCheckParam.LText = Utils.formatOptions(param.$unCheckParam.LText, param.exec_type) |
| | | param.$unCheckParam.menuname = btn.logLabel |
| | | |
| | | if (window.GLOB.probation) { |
| | |
| | | } |
| | | |
| | | param.LText = sql |
| | | param.exec_type = 'y' // 后台解码 |
| | | param.exec_type = window.GLOB.execType || 'y' // 后台解码 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, param.exec_type) |
| | | param.menuname = btn.logLabel |
| | | |
| | | if (window.GLOB.probation) { |
| | |
| | | upid: id |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(Utils.getuuid()) |
| | | param.LText = Utils.getuuid() |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | |
| | | msg_result: msg |
| | | } |
| | | |
| | | _p.LText = Utils.formatOptions(Utils.getuuid()) |
| | | _p.LText = Utils.getuuid() |
| | | _p.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | _p.secretkey = Utils.encrypt(_p.LText, _p.timestamp) |
| | | |
| | |
| | | upid: id |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(Utils.getuuid()) |
| | | param.LText = Utils.getuuid() |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | |
| | | upid: id |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(Utils.getuuid()) |
| | | param.LText = Utils.getuuid() |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | |
| | | label = (loadingNumber ? `(${loadingNumber})` : '') + btn.label |
| | | } |
| | | |
| | | let BTN = <Button |
| | | type={type} |
| | | icon={icon} |
| | | id={'button' + btn.uuid} |
| | | title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')} |
| | | loading={loading} |
| | | disabled={disabled} |
| | | style={btn.style} |
| | | className={className} |
| | | onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} |
| | | >{label}</Button> |
| | | |
| | | if (btn.hoverTitle) { |
| | | BTN = <Popover mouseLeaveDelay={0.3} mouseEnterDelay={0.3} content={btn.hoverTitle} trigger="hover"> |
| | | {BTN} |
| | | </Popover> |
| | | } |
| | | |
| | | return <> |
| | | <Button |
| | | type={type} |
| | | icon={icon} |
| | | id={'button' + btn.uuid} |
| | | title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')} |
| | | loading={loading} |
| | | disabled={disabled} |
| | | style={btn.style} |
| | | className={className} |
| | | onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} |
| | | >{label}</Button> |
| | | {BTN} |
| | | <span onClick={(e) => {e.stopPropagation()}}>{this.getModels()}</span> |
| | | {loadingTotal ? <Progress className="mk-button-progress" percent={(loadingTotal - loadingNumber) / loadingTotal * 100} size="small" showInfo={false} /> : null} |
| | | </> |
| | |
| | | let param = { |
| | | func: 'sPC_Get_TableData', |
| | | obj_name: 'data', |
| | | exec_type: 'y', |
| | | exec_type: window.GLOB.execType || 'y', |
| | | arr_field: arrFields, |
| | | default_sql: btn.verify.setting.defaultSql |
| | | } |
| | |
| | | param.menuname = btn.logLabel |
| | | } |
| | | |
| | | param.custom_script = Utils.formatOptions(_customScript) |
| | | param.LText = Utils.formatOptions(LText) |
| | | param.custom_script = Utils.formatOptions(_customScript, param.exec_type) |
| | | param.LText = Utils.formatOptions(LText, param.exec_type) |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | |
| | | |
| | | let data = record || selectedData || [] |
| | | |
| | | if (btn.Ot === 'requiredSgl' && data.length !== 1) { |
| | | if (btn.Ot !== 'notRequired' && data.length === 0) { |
| | | // 需要选择行时,校验数据 |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '请选择行!', |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } else if (btn.Ot === 'requiredSgl' && data.length !== 1) { |
| | | // 需要选择单行时,校验数据 |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | |
| | | if (btn.Ot === 'requiredSgl') { |
| | | primaryId = data[0].$$uuid || '' |
| | | } else if (btn.Ot === 'requiredOnce') { |
| | | let ids = data.map(d => (d.$$uuid || '')) |
| | | ids = ids.filter(Boolean) |
| | | primaryId = ids.join(',') |
| | | } else if (btn.Ot === 'notRequired' && BID) { |
| | | primaryId = BID |
| | | } |
| | |
| | | } |
| | | |
| | | formlist = formlist.filter(item => { |
| | | if (item.type === 'hint') { |
| | | if (item.field && data[item.field.toLowerCase()]) { |
| | | item.message = data[item.field.toLowerCase()] |
| | | } |
| | | delete item.field |
| | | } |
| | | |
| | | if (item.supField) { // 多层表单控制 |
| | | if (['hint', 'split', 'formula'].includes(item.type)) { |
| | | item.field = item.uuid |
| | | fieldMap.set(item.field, item) |
| | | } |
| | | let supvals = [] |
| | | if (item.supvalue) { |
| | | item.supvalue.split(',').forEach(val => { |
| | |
| | | } |
| | | } |
| | | |
| | | if (item.type === 'split' || item.type === 'formula') return true |
| | | if (item.type === 'hint') { |
| | | if (item.field && data[item.field.toLowerCase()]) { |
| | | item.message = data[item.field.toLowerCase()] |
| | | } |
| | | delete item.field |
| | | return true |
| | | } else if (item.type === 'date') { |
| | | if (['hint', 'split', 'formula'].includes(item.type)) return true |
| | | if (item.type === 'date') { |
| | | item.precision = item.precision || 'day' |
| | | } else if (item.type === 'datetime') { |
| | | item.type = 'date' |
| | |
| | | newval = item.openVal |
| | | } else { |
| | | newval = item.closeVal |
| | | } |
| | | } else if (item.type === 'popSelect') { |
| | | if (newval && newval !== '$empty') { |
| | | item.showValue = data[item.showField.toLowerCase()] || '' |
| | | } else { |
| | | item.showValue = '' |
| | | } |
| | | } |
| | | |
| | |
| | | cell.labelCol = {style: {width: cell.labelwidth + '%'}} |
| | | cell.wrapperCol = {style: {width: (100 - cell.labelwidth) + '%'}} |
| | | } |
| | | if (!cell.field || !fieldMap.has(cell.field)) return cell |
| | | if (!cell.field || !fieldMap.has(cell.field) || ['hint', 'split', 'formula'].includes(cell.type)) return cell |
| | | let item = fieldMap.get(cell.field) |
| | | |
| | | // 下级表单控制-字段写入 |
| | |
| | | } |
| | | |
| | | if (param.LText) { |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | if (window.GLOB.execType === 'x') { |
| | | param.exec_type = 'x' |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText, param.exec_type) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : param.LText, param.timestamp) |
| | | |
| | | if (window.GLOB.mkHS) { // 云端数据验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | |
| | | } |
| | | |
| | | if (mainparam.LText) { |
| | | mainparam.LText = Utils.formatOptions(mainparam.LText) |
| | | if (window.GLOB.execType === 'x') { |
| | | mainparam.exec_type = 'x' |
| | | } |
| | | |
| | | mainparam.LText = Utils.formatOptions(mainparam.LText, mainparam.exec_type) |
| | | mainparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | mainparam.secretkey = Utils.encrypt(mainparam.LText, mainparam.timestamp) |
| | | mainparam.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : mainparam.LText, mainparam.timestamp) |
| | | |
| | | if (window.GLOB.mainSystemApi) { |
| | | mainparam.rduri = window.GLOB.mainSystemApi |
| | |
| | | if (window.GLOB.debugger) { |
| | | console.info(param.LText) |
| | | } |
| | | |
| | | if (window.GLOB.execType === 'x') { |
| | | param.exec_type = 'x' |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, param.exec_type) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : param.LText, param.timestamp) |
| | | |
| | | if (form.database === 'sso' && window.GLOB.mainSystemApi) { |
| | | param.rduri = window.GLOB.mainSystemApi |
| | |
| | | let record = {...this.record, ...values} |
| | | |
| | | formlist.forEach(item => { |
| | | if (!item.field) return |
| | | if (!item.field || ['hint', 'split', 'formula'].includes(item.type)) return |
| | | |
| | | let _item = { |
| | | type: item.type, |
| | |
| | | options: [], |
| | | columns, |
| | | value, |
| | | showValue: config.showValue, |
| | | placeholder, |
| | | arr_field: arrfield.join(','), |
| | | searchKey: '', |
| | |
| | | let param = { |
| | | func: 'sPC_Get_TableData', |
| | | obj_name: 'data', |
| | | exec_type: 'y', |
| | | exec_type: window.GLOB.execType || 'y', |
| | | arr_field: arr_field, |
| | | default_sql: 'true', |
| | | custom_script: '', |
| | |
| | | DateCount && console.info(`/*${config.label} 总数查询*/\n` + DateCount.replace(/\n\s{6}/ig, '\n')) |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(sql) |
| | | param.DateCount = Utils.formatOptions(DateCount) |
| | | param.LText = Utils.formatOptions(sql, param.exec_type) |
| | | param.DateCount = Utils.formatOptions(DateCount, param.exec_type) |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | |
| | | |
| | | return item |
| | | }) |
| | | |
| | | let showValue = this.state.showValue |
| | | |
| | | if (showValue) { |
| | | if (options.findIndex(item => this.state.value === item.$$uuid) > -1) { |
| | | showValue = '' |
| | | } |
| | | } |
| | | |
| | | this.setState({ |
| | | showValue, |
| | | options: options, |
| | | total: result.total || 0, |
| | | loading: false |
| | |
| | | } |
| | | |
| | | this.props.onChange(val, other) |
| | | this.setState({value: val}, () => { |
| | | this.setState({value: val, showValue: ''}, () => { |
| | | if (config.enter === 'tab') { |
| | | MKEmitter.emit('mkFC', 'focus', config.tabUuid) |
| | | } else if (config.enter === 'sub') { |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { value, config, options, visible, loading, total, pageIndex, pageSize, columns, placeholder } = this.state |
| | | const { value, showValue, config, options, visible, loading, total, pageIndex, pageSize, columns, placeholder, searchKey } = this.state |
| | | |
| | | return <> |
| | | <Select |
| | | className="mk-pop-select" |
| | | showSearch={!!config.searchKey} |
| | | allowClear |
| | | value={value} |
| | | value={showValue || value} |
| | | onSearch={(val) => val && this.searchOption(val)} |
| | | filterOption={false} |
| | | onChange={(val) => this.selectChange(val === undefined ? '' : val)} |
| | |
| | | onCancel={() => this.setState({visible: false})} |
| | | destroyOnClose |
| | | > |
| | | {config.searchKey ? <Search placeholder={placeholder} onSearch={this.searchOption} enterButton /> : null} |
| | | {config.searchKey ? <Search placeholder={placeholder} defaultValue={searchKey} onSearch={this.searchOption} enterButton /> : null} |
| | | <Table |
| | | rowKey="$$uuid" |
| | | bordered={true} |
| | |
| | | const MKSwitch = asyncComponent(() => import('@/tabviews/zshare/mutilform/mkSwitch')) |
| | | const MKRadio = asyncComponent(() => import('../mkRadio')) |
| | | const MKDatePicker = asyncComponent(() => import('../mkDatePicker')) |
| | | const MKNumber = asyncComponent(() => import('../mkNumber')) |
| | | |
| | | class AdvanceSearch extends Component { |
| | | static propTpyes = { |
| | |
| | | content = <MKCheck config={item}/> |
| | | } else if (item.type === 'switch') { |
| | | content = <MKSwitch config={item}/> |
| | | } else if (item.type === 'range') { |
| | | content = <MKNumber config={item} onInputSubmit={this.handleSubmit} /> |
| | | } |
| | | |
| | | if (content) { |
| | |
| | | this.props.form.validateFields((err, values) => { |
| | | if (err) return |
| | | |
| | | this.props.advanceSubmit(values) |
| | | setTimeout(() => { |
| | | this.props.advanceSubmit(values) |
| | | }, 10) |
| | | }) |
| | | } |
| | | |
| | |
| | | const MKSelect = asyncComponent(() => import('./mkSelect')) |
| | | const DateGroup = asyncComponent(() => import('./dategroup')) |
| | | const MKDatePicker = asyncComponent(() => import('./mkDatePicker')) |
| | | const MKNumber = asyncComponent(() => import('./mkNumber')) |
| | | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | |
| | | deForms.push({ |
| | | ...item, |
| | | arr_field: _option.field, |
| | | data_sql: Utils.formatOptions(_option.sql) |
| | | data_sql: Utils.formatOptions(_option.sql, window.GLOB.execType) |
| | | }) |
| | | } else { // 合并请求,区分本地及系统 |
| | | if (item.database === 'sso') { |
| | |
| | | deForms.push({ |
| | | ...item, |
| | | arr_field: item.arr_field, |
| | | data_sql: Utils.formatOptions(sql) |
| | | data_sql: Utils.formatOptions(sql, window.GLOB.execType) |
| | | }) |
| | | } else if (item.checkShift) { |
| | | let d = '' |
| | |
| | | } |
| | | |
| | | if (param.LText) { |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | if (window.GLOB.execType === 'x') { |
| | | param.exec_type = 'x' |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText, param.exec_type) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : param.LText, param.timestamp) |
| | | |
| | | if (window.GLOB.mkHS) { // 云端数据验证 |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) |
| | |
| | | } |
| | | |
| | | if (mainparam.LText) { |
| | | mainparam.LText = Utils.formatOptions(mainparam.LText) |
| | | if (window.GLOB.execType === 'x') { |
| | | mainparam.exec_type = 'x' |
| | | } |
| | | |
| | | mainparam.LText = Utils.formatOptions(mainparam.LText, mainparam.exec_type) |
| | | mainparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | mainparam.secretkey = Utils.encrypt(mainparam.LText, mainparam.timestamp) |
| | | mainparam.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : mainparam.LText, mainparam.timestamp) |
| | | |
| | | if (window.GLOB.mainSystemApi) { |
| | | mainparam.rduri = window.GLOB.mainSystemApi |
| | |
| | | param.BID = this.props.BID |
| | | } |
| | | |
| | | if (window.GLOB.execType === 'x') { |
| | | param.exec_type = 'x' |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : param.LText, param.timestamp) |
| | | |
| | | if (item.database === 'sso' && window.GLOB.mainSystemApi) { |
| | | param.rduri = window.GLOB.mainSystemApi |
| | |
| | | content = <MKCheck config={item} onChange={(val) => this.recordChange(val, false, item)} /> |
| | | } else if (item.type === 'switch') { |
| | | content = <MKSwitch config={item} onChange={(val) => this.recordChange(val, false, item)} /> |
| | | } else if (item.type === 'range') { |
| | | content = <MKNumber config={item} onInputSubmit={this.handleSubmit} /> |
| | | } |
| | | |
| | | if (content) { |
| | |
| | | let searchlist = this.state.searchlist.map(item => { |
| | | item.initval = item.oriInitval |
| | | |
| | | if (setting.resetContrl === 'clear' && ['text', 'date', 'datemonth', 'dateweek', 'daterange'].includes(item.type)) { |
| | | if (setting.resetContrl === 'clear' && ['text', 'date', 'datemonth', 'dateweek', 'daterange', 'range'].includes(item.type)) { |
| | | item.initval = '' |
| | | } |
| | | |
| | |
| | | float: none; |
| | | vertical-align: top; |
| | | } |
| | | .ant-checkbox-wrapper { |
| | | color: rgba(0, 0, 0, 0.85); |
| | | } |
| | | .ant-form-item { |
| | | display: flex; |
| | | margin-bottom: 0px; |
New file |
| | |
| | | import React, {Component} from 'react' |
| | | import { is, fromJS } from 'immutable' |
| | | import { InputNumber } from 'antd' |
| | | |
| | | import './index.scss' |
| | | |
| | | class MKNumber extends Component { |
| | | constructor(props) { |
| | | super(props) |
| | | |
| | | const config = props.config |
| | | let vals = config.initval.split(',') |
| | | |
| | | this.state = { |
| | | minValue: vals[0] !== undefined && vals[0] !== '' ? +vals[0] : '', |
| | | maxValue: vals[1] !== undefined && vals[1] !== '' ? +vals[1] : '' |
| | | } |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | | |
| | | componentWillUnmount () { |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | } |
| | | |
| | | minChange = (val) => { |
| | | this.setState({minValue: val}, () => { |
| | | this.onChange() |
| | | }) |
| | | } |
| | | |
| | | maxChange = (val) => { |
| | | this.setState({maxValue: val}, () => { |
| | | this.onChange() |
| | | }) |
| | | } |
| | | |
| | | onChange = () => { |
| | | const { minValue, maxValue } = this.state |
| | | |
| | | let vals = [] |
| | | if ((!minValue && minValue !== 0) || isNaN(minValue)) { |
| | | vals.push('') |
| | | } else { |
| | | vals.push(minValue) |
| | | } |
| | | if ((!maxValue && maxValue !== 0) || isNaN(maxValue)) { |
| | | vals.push('') |
| | | } else { |
| | | vals.push(maxValue) |
| | | } |
| | | |
| | | vals = vals.join(',') |
| | | |
| | | if (vals === ',') { |
| | | vals = '' |
| | | } |
| | | |
| | | this.props.onChange(vals) |
| | | } |
| | | |
| | | render() { |
| | | const { minValue, maxValue } = this.state |
| | | |
| | | return ( |
| | | <div className="range-wrap"> |
| | | <InputNumber defaultValue={minValue} onPressEnter={this.props.onInputSubmit} onChange={this.minChange}/> |
| | | 至 |
| | | <InputNumber defaultValue={maxValue} onPressEnter={this.props.onInputSubmit} onChange={this.maxChange}/> |
| | | </div> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default MKNumber |
New file |
| | |
| | | .range-wrap { |
| | | display: flex; |
| | | line-height: 32px; |
| | | .ant-input-number:first-child { |
| | | margin-right: 5px; |
| | | .ant-input-number-handler-wrap { |
| | | display: none; |
| | | } |
| | | } |
| | | .ant-input-number:last-child { |
| | | margin-left: 5px; |
| | | .ant-input-number-handler-wrap { |
| | | display: none; |
| | | } |
| | | } |
| | | } |
| | |
| | | }, |
| | | { |
| | | type: 'search', |
| | | label: '数值(区间)', |
| | | subType: 'range', |
| | | url: '' |
| | | }, |
| | | { |
| | | type: 'search', |
| | | label: '日期(组合)', |
| | | subType: 'group', |
| | | url: '' |
| | |
| | | debug_md5: key, |
| | | debug_url: url, |
| | | debug_list: window.btoa(tbs), |
| | | LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))) |
| | | LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))), |
| | | LText: '' |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | let save = false |
| | | |
| | |
| | | color: #1890ff; |
| | | font-size: 15px; |
| | | padding-left: 10px; |
| | | min-height: 21px; |
| | | border-bottom: 1px solid #e9e9e9; |
| | | } |
| | | .ant-form-item.checkcard { |
| | |
| | | |
| | | let param = { |
| | | func: 'sPC_Get_SelectedList', |
| | | LText: Utils.formatOptions(_sql), |
| | | LText: Utils.formatOptions(_sql, 'x'), |
| | | obj_name: 'data', |
| | | arr_field: 'PN,ID,Images' |
| | | arr_field: 'PN,ID,Images', |
| | | exec_type: 'x' |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 云端数据验证 |
| | | |
| | | Api.getCloudConfig(param).then(res => { |
| | |
| | | |
| | | let _scriptSql = `Select distinct func+Remark as funcname,longparam, s.Sort from s_custom_script s inner join (select OpenID from sapp where ID=@Appkey@) p on s.openid = case when s.appkey='' then s.openid else p.OpenID end order by s.Sort` |
| | | |
| | | _scriptSql = Utils.formatOptions(_scriptSql) |
| | | _scriptSql = Utils.formatOptions(_scriptSql, 'x') |
| | | |
| | | let _sParam = { |
| | | func: 'sPC_Get_SelectedList', |
| | | LText: _scriptSql, |
| | | obj_name: 'data', |
| | | arr_field: 'funcname,longparam' |
| | | arr_field: 'funcname,longparam', |
| | | exec_type: 'x' |
| | | } |
| | | |
| | | _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) |
| | | _sParam.secretkey = Utils.encrypt('', _sParam.timestamp) |
| | | _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 云端数据验证 |
| | | |
| | | Api.getCloudConfig(_sParam).then(res => { |
| | |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | import { checkSQL } from '@/utils/utils-custom.js' |
| | | import { checkSQL, getSearchFields } from '@/utils/utils-custom.js' |
| | | import CodeMirror from '@/templates/zshare/codemirror' |
| | | // import './index.scss' |
| | | |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | | this.resetfield(this.props.searches) |
| | | this.setState({ |
| | | usefulfields: getSearchFields(this.props.searches) |
| | | }) |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps(nextProps) { |
| | | if (!is(fromJS(this.props.searches), fromJS(nextProps.searches))) { |
| | | this.resetfield(nextProps.searches) |
| | | this.setState({ |
| | | usefulfields: getSearchFields(nextProps.searches) |
| | | }) |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | let _scriptSql = `Select distinct func+Remark as funcname,longparam, s.Sort from s_custom_script s inner join (select OpenID from sapp where ID=@Appkey@) p on s.openid = case when s.appkey='' then s.openid else p.OpenID end order by s.Sort` |
| | | |
| | | _scriptSql = Utils.formatOptions(_scriptSql) |
| | | _scriptSql = Utils.formatOptions(_scriptSql, 'x') |
| | | |
| | | let _sParam = { |
| | | func: 'sPC_Get_SelectedList', |
| | | LText: _scriptSql, |
| | | obj_name: 'data', |
| | | arr_field: 'funcname,longparam' |
| | | arr_field: 'funcname,longparam', |
| | | exec_type: 'x' |
| | | } |
| | | |
| | | _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) |
| | | _sParam.secretkey = Utils.encrypt('', _sParam.timestamp) |
| | | _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 云端数据验证 |
| | | |
| | | Api.getCloudConfig(_sParam).then(res => { |
| | |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | resetfield = (searches) => { |
| | | let _usefulFields = [] |
| | | searches.forEach(item => { |
| | | if (!item.field) return |
| | | |
| | | if (item.type === 'group') { |
| | | _usefulFields.push(item.field) |
| | | _usefulFields.push(item.datefield) |
| | | _usefulFields.push(item.datefield + '1') |
| | | } else if (item.type === 'dateweek') { |
| | | _usefulFields.push(item.field) |
| | | _usefulFields.push(item.field + '1') |
| | | } else if (item.type === 'datemonth') { |
| | | if (item.match === '=') { |
| | | _usefulFields.push(item.field) |
| | | } else { |
| | | _usefulFields.push(item.field) |
| | | _usefulFields.push(item.field + '1') |
| | | } |
| | | } else if (item.type === 'daterange') { |
| | | let _skey = item.field |
| | | let _ekey = item.field + '1' |
| | | |
| | | if (/,/.test(item.field)) { |
| | | _skey = item.field.split(',')[0] |
| | | _ekey = item.field.split(',')[1] |
| | | } |
| | | _usefulFields.push(_skey) |
| | | _usefulFields.push(_ekey) |
| | | } else if (item.type === 'date' && _usefulFields.includes(item.field)) { |
| | | _usefulFields.push(item.field + '1') |
| | | } else { |
| | | _usefulFields.push(item.field) |
| | | } |
| | | }) |
| | | |
| | | this.setState({ |
| | | usefulfields: _usefulFields.join(', ') |
| | | }) |
| | | } |
| | | |
| | |
| | | |
| | | state = { |
| | | dataType: '', |
| | | defaultSql: 'true' |
| | | defaultSql: 'true', |
| | | excelHandle: 'false' |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | |
| | | |
| | | this.setState({ |
| | | dataType: btnType === 'print' ? 'custom' : setting.dataType, |
| | | defaultSql: setting.defaultSql || 'true' |
| | | defaultSql: setting.defaultSql || 'true', |
| | | excelHandle: setting.excelHandle || 'false' |
| | | }) |
| | | } |
| | | |
| | |
| | | render() { |
| | | const { setting, btnType } = this.props |
| | | const { getFieldDecorator } = this.props.form |
| | | const { dataType, defaultSql } = this.state |
| | | const { dataType, defaultSql, excelHandle } = this.state |
| | | |
| | | const formItemLayout = { |
| | | labelCol: { |
| | |
| | | </Col> : null} |
| | | {btnType !== 'print' ? <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topRight" title="自定义生成Excel,可用参数为 XLSX、data、columns、callback。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 导出格式 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('excelHandle', { |
| | | initialValue: excelHandle |
| | | })( |
| | | <Radio.Group onChange={(e) => this.setState({excelHandle: e.target.value})}> |
| | | <Radio value="false">默认</Radio> |
| | | <Radio value="true">自定义</Radio> |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {btnType !== 'print' && excelHandle === 'true' ? <Col span={24} style={{paddingLeft: '30px'}}> |
| | | <Form.Item wrapperCol={ {xs: { span: 24 }, sm: { span: 24 }} } label=""> |
| | | {getFieldDecorator('excel_func', { |
| | | initialValue: setting.excel_func || '', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请填写自定义逻辑!' |
| | | } |
| | | ] |
| | | })(<CodeMirror mode="text/javascript" theme="cobalt" />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {btnType !== 'print' && excelHandle !== 'true' ? <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="导出excel中工作表名称,默认为Sheet1。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 工作表 |
| | |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {btnType !== 'print' ? <Col span={8}> |
| | | {btnType !== 'print' && excelHandle !== 'true' ? <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="导出excel中的行高。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | |
| | | })(<InputNumber min={10} max={200} precision={0} />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {btnType !== 'print' ? <Col span={8}> |
| | | {btnType !== 'print' && excelHandle !== 'true' ? <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="请将需要合并的表头使用中横线分隔(如:商品-数量、商品-单价),前部分将作为主表头,后部分将作为子表头。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | |
| | | </Radio.Group>)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {btnType !== 'print' ? <Col span={8}> |
| | | {btnType !== 'print' && excelHandle !== 'true' ? <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="Excel内容区是否自动换行。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | |
| | | const { card } = this.props |
| | | const { activeKey, verify } = this.state |
| | | |
| | | if (card.intertype !== 'system' || verify.dataType !== 'custom') { |
| | | if (activeKey === 'setting') { |
| | | this.settingForm.handleConfirm().then(res => { |
| | | if (card.intertype !== 'system' || verify.dataType !== 'custom') { |
| | | this.setState({activeKey: val, verify: {...verify, ...res}}) |
| | | } else { |
| | | this.setState({ |
| | | verify: {...verify, ...res} |
| | | }, () => { |
| | | this.setState({loading: true}) |
| | | this.sqlverify(() => { // 验证成功 |
| | | this.setState({ |
| | | activeKey: val, |
| | | loading: false |
| | | }) |
| | | }, () => { // 验证失败 |
| | | this.setState({ |
| | | activeKey: val, |
| | | loading: false |
| | | }) |
| | | }, verify.scripts) |
| | | }) |
| | | } |
| | | }) |
| | | } else if (card.intertype !== 'system' || verify.dataType !== 'custom') { |
| | | this.setState({activeKey: val}) |
| | | return |
| | | } else if (activeKey === 'setting') { |
| | | this.settingForm.handleConfirm().then(res => { |
| | | this.setState({ |
| | | verify: {...verify, ...res} |
| | | }, () => { |
| | | this.setState({loading: true}) |
| | | this.sqlverify(() => { // 验证成功 |
| | | this.setState({ |
| | | activeKey: val, |
| | | loading: false |
| | | }) |
| | | }, () => { // 验证失败 |
| | | this.setState({ |
| | | activeKey: val, |
| | | loading: false |
| | | }) |
| | | }, verify.scripts) |
| | | }) |
| | | }) |
| | | } else if (activeKey === 'columns') { |
| | | if (this.columnRef && this.columnRef.state.editingKey) { |
| | | notification.warning({ |
| | |
| | | |
| | | let param = { |
| | | func: 'sPC_Get_SelectedList', |
| | | LText: Utils.formatOptions(_sql), |
| | | LText: Utils.formatOptions(_sql, 'x'), |
| | | obj_name: 'data', |
| | | arr_field: 'PN,PrintTempNO,Images' |
| | | arr_field: 'PN,PrintTempNO,Images', |
| | | exec_type: 'x' |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 云端数据验证 |
| | | |
| | | Api.getCloudConfig(param).then(res => { |
| | |
| | | </Radio.Group>) |
| | | } else if (card.type === 'check') { |
| | | formItem = <Checkbox style={{lineHeight: '36px'}} checked={card.initval === card.openVal}>{card.checkTip || ''}</Checkbox> |
| | | } else if (card.type === 'range') { |
| | | type = 'range-wrap' |
| | | let vals = card.initval.split(',') |
| | | formItem = (<> |
| | | <Input style={{marginTop: '4px'}} value={vals[0] || ''} /> |
| | | 至 |
| | | <Input style={{marginTop: '4px'}} value={vals[1] || ''} /> |
| | | </>) |
| | | } |
| | | |
| | | let labelwidth = card.labelwidth || 33.3 |
| | |
| | | newcard.orderType = 'asc' |
| | | |
| | | let _match = 'like' |
| | | if (item.subType === 'select' || item.subType === 'link' || item.subType === 'checkcard') { |
| | | if (['select', 'link', 'checkcard'].includes(item.subType)) { |
| | | _match = '=' |
| | | } else if (item.subType === 'date' || item.subType === 'datemonth') { |
| | | } else if (['date', 'datemonth'].includes(item.subType)) { |
| | | _match = '>=' |
| | | } else if (item.subType === 'dateweek' || item.subType === 'daterange') { |
| | | } else if (['dateweek', 'daterange', 'range'].includes(item.subType)) { |
| | | _match = 'between' |
| | | } else if (item.subType === 'group') { |
| | | _match = 'between' |
| | |
| | | } |
| | | } |
| | | } |
| | | .page-card.range-wrap { |
| | | .ant-form-item-control-wrapper { |
| | | .ant-form-item-control { |
| | | .ant-form-item-children { |
| | | display: flex; |
| | | .ant-input:first-child { |
| | | margin-right: 5px; |
| | | } |
| | | .ant-input:last-child { |
| | | margin-left: 5px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .page-card.advanced { |
| | | .ant-form-item-label label { |
| | | color: orange; |
| | |
| | | group: ['label', 'type', 'field', 'datefield', 'initval', 'blacklist', 'ratio', 'items', 'required', 'labelShow', 'query', 'labelwidth'], |
| | | switch: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'openVal', 'closeVal', 'openText', 'closeText', 'Hide', 'labelShow', 'advanced', 'query', 'labelwidth'], |
| | | check: ['label', 'field', 'initval', 'type', 'match', 'ratio', 'blacklist', 'openVal', 'closeVal', 'checkTip', 'Hide', 'labelShow', 'advanced', 'query', 'labelwidth'], |
| | | range: ['label', 'type', 'field', 'initval', 'match', 'blacklist', 'Hide', 'required', 'maxValue', 'minValue', 'step', 'labelShow', 'query', 'labelwidth'] |
| | | range: ['label', 'type', 'field', 'initval', 'match', 'ratio', 'blacklist', 'Hide', 'required', 'maxValue', 'minValue', 'step', 'labelShow', 'query', 'labelwidth', 'advanced'] |
| | | } |
| | | |
| | | class MainSearch extends Component { |
| | |
| | | reOptions.match = matchReg.class1 |
| | | } else if (type === 'switch' || type === 'check') { |
| | | reOptions.match = matchReg.class2 |
| | | if (type === 'switch') { |
| | | reLabel.openVal = '开启值' |
| | | reLabel.closeVal = '关闭值' |
| | | } else { |
| | | reLabel.openVal = '勾选值' |
| | | reLabel.closeVal = '不勾选值' |
| | | } |
| | | } else if (type === 'date') { |
| | | reOptions.match = matchReg.class4 |
| | | } else if (type === 'datemonth') { |
| | |
| | | |
| | | if (values.type === 'range') { |
| | | let error = '' |
| | | if (values.maxValue <= values.minValue) { |
| | | error = '最大值必须大于最小值' |
| | | } else if (values.step <= 0) { |
| | | error = '步长必须大于0' |
| | | } else { |
| | | let s = (values.maxValue - values.minValue) / values.step |
| | | if (s !== parseInt(s)) { |
| | | error = '步长必须被 (max - min) 整除' |
| | | if (sessionStorage.getItem('appType') === 'mob') { |
| | | if (values.maxValue <= values.minValue) { |
| | | error = '最大值必须大于最小值' |
| | | } else if (values.step <= 0) { |
| | | error = '步长必须大于0' |
| | | } else { |
| | | let s = (values.maxValue - values.minValue) / values.step |
| | | if (s !== parseInt(s)) { |
| | | error = '步长必须被 (max - min) 整除' |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (!error && values.initval) { |
| | | if (!error && values.initval) { |
| | | let vals = values.initval.split(',') |
| | | if (vals.length !== 2) { |
| | | error = '初始值设置错误!' |
| | | } else if (isNaN(parseFloat(vals[0])) || isNaN(parseFloat(vals[1]))) { |
| | | error = '初始值设置错误!' |
| | | } else { |
| | | let start = parseFloat(vals[0]) |
| | | let end = parseFloat(vals[1]) |
| | | let s = (values.maxValue - start) / values.step |
| | | let e = (values.maxValue - end) / values.step |
| | | if (start > end || start < values.minValue || end > values.maxValue) { |
| | | error = '初始值设置错误!' |
| | | } else if (s !== parseInt(s) || e !== parseInt(e)) { |
| | | error = '初始值设置错误!' |
| | | } |
| | | } |
| | | } |
| | | } else if (values.initval) { |
| | | let vals = values.initval.split(',') |
| | | if (vals.length !== 2) { |
| | | error = '初始值设置错误!' |
| | | } else if (isNaN(parseFloat(vals[0])) || isNaN(parseFloat(vals[1]))) { |
| | | error = '初始值设置错误!' |
| | | } else { |
| | | let start = parseFloat(vals[0]) |
| | | let end = parseFloat(vals[1]) |
| | | let s = (values.maxValue - start) / values.step |
| | | let e = (values.maxValue - end) / values.step |
| | | if (start > end || start < values.minValue || end > values.maxValue) { |
| | | error = '初始值设置错误!' |
| | | } else if (s !== parseInt(s) || e !== parseInt(e)) { |
| | | error = '初始值设置错误!' |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (error) { |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | func: 'sPC_Get_SelectedList', |
| | | LText: queryTableSql, |
| | | obj_name: 'data', |
| | | arr_field: 'TbName,Remark' |
| | | arr_field: 'TbName,Remark', |
| | | exec_type: 'x' |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, 'x') |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 云端数据验证 |
| | | |
| | | if (window.GLOB.cloudServiceApi) { // 且存在云端地址 |
| | |
| | | debug_md5: key, |
| | | debug_url: url, |
| | | debug_list: window.btoa(tbs), |
| | | LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))) |
| | | LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))), |
| | | LText: '' |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | let save = false |
| | | |
| | |
| | | // 删除存储过程 |
| | | let droparam = { |
| | | func: 'sPC_TableData_InUpDe', |
| | | LText: Utils.formatOptions(dropfunc), |
| | | LText: Utils.formatOptions(dropfunc, window.GLOB.execType || 'y'), |
| | | exec_type: window.GLOB.execType || 'y', |
| | | TypeCharOne: 'proc' // 删除或创建存储过程标志 |
| | | } |
| | | |
| | | droparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | droparam.secretkey = Utils.encrypt(droparam.LText, droparam.timestamp) |
| | | droparam.secretkey = Utils.encrypt('', droparam.timestamp) |
| | | droparam.open_key = Utils.encryptOpenKey(droparam.secretkey, droparam.timestamp) |
| | | |
| | | // 新建存储过程 |
| | | let _param = { |
| | | func: 'sPC_TableData_InUpDe', |
| | | LText: Utils.formatOptions(newLText), |
| | | LText: Utils.formatOptions(newLText, window.GLOB.execType || 'y'), |
| | | exec_type: window.GLOB.execType || 'y', |
| | | TypeCharOne: 'proc' |
| | | } |
| | | _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) |
| | | _param.secretkey = Utils.encrypt('', _param.timestamp) |
| | | _param.open_key = Utils.encryptOpenKey(_param.secretkey, _param.timestamp) |
| | | |
| | | let saveParam = { |
| | |
| | | _val = '' |
| | | } |
| | | |
| | | if (item.type === 'datemonth' || item.type === 'dateweek' || item.type === 'daterange') { |
| | | if (['datemonth', 'dateweek', 'daterange', 'range'].includes(item.type)) { |
| | | fields = [item.field, item.field] |
| | | } |
| | | |
| | |
| | | _fieldMap.set(item.field, true) |
| | | |
| | | searchText.push(item.field + ' ' + item.match + ' @' + _field + '@') |
| | | } else if (item.type === 'datemonth' || item.type === 'dateweek' || item.type === 'daterange') { |
| | | } else if (['datemonth', 'dateweek', 'daterange'].includes(item.type)) { |
| | | |
| | | searchText.push('(' + item.field + ' >= @' + item.field + '@ AND ' + item.field + ' < @' + item.field + '1@)') |
| | | } else if (item.type === 'range') { |
| | | |
| | | searchText.push('(' + item.field + ' >= @' + item.field + '@ AND ' + item.field + ' < @' + item.field + '1@)') |
| | | } else { |
| | |
| | | |
| | | import Utils from '@/utils/utils.js' |
| | | import Api from '@/api' |
| | | import { checkSQL } from '@/utils/utils-custom.js' |
| | | import { checkSQL, getSearchFields } from '@/utils/utils-custom.js' |
| | | import CodeMirror from '@/templates/zshare/codemirror' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import MKEmitter from '@/utils/events.js' |
| | |
| | | UNSAFE_componentWillMount() { |
| | | const { searches, scripts, urlFields } = this.props |
| | | |
| | | let _usefulFields = [] |
| | | searches.forEach(item => { |
| | | if (['dateweek', 'datemonth'].includes(item.type)) { |
| | | _usefulFields.push(item.key) |
| | | _usefulFields.push(item.key + '1') |
| | | } else if (item.type === 'daterange') { |
| | | let _skey = item.key |
| | | let _ekey = item.key + '1' |
| | | |
| | | if (/,/.test(item.key)) { |
| | | _skey = item.key.split(',')[0] |
| | | _ekey = item.key.split(',')[1] |
| | | } |
| | | _usefulFields.push(_skey) |
| | | _usefulFields.push(_ekey) |
| | | } else if (item.type === 'date' && _usefulFields.includes(item.key)) { |
| | | _usefulFields.push(item.key + '1') |
| | | } else { |
| | | _usefulFields.push(item.key.replace(/,/ig, ', ')) |
| | | } |
| | | }) |
| | | |
| | | this.setState({ |
| | | urlFields: urlFields ? urlFields.join(', ') : '', |
| | | usefulFields: _usefulFields.join(', '), |
| | | usefulFields: getSearchFields(searches), |
| | | scripts: fromJS(scripts).toJS() |
| | | }) |
| | | } |
| | |
| | | } |
| | | let _scriptSql = `Select distinct func+Remark as funcname,longparam, s.Sort from s_custom_script s inner join (select OpenID from sapp where ID=@Appkey@) p on s.openid = case when s.appkey='' then s.openid else p.OpenID end order by s.Sort` |
| | | |
| | | _scriptSql = Utils.formatOptions(_scriptSql) |
| | | _scriptSql = Utils.formatOptions(_scriptSql, 'x') |
| | | |
| | | let _sParam = { |
| | | func: 'sPC_Get_SelectedList', |
| | | LText: _scriptSql, |
| | | obj_name: 'data', |
| | | arr_field: 'funcname,longparam' |
| | | arr_field: 'funcname,longparam', |
| | | exec_type: 'x' |
| | | } |
| | | |
| | | _sParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp) |
| | | _sParam.secretkey = Utils.encrypt('', _sParam.timestamp) |
| | | _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 云端数据验证 |
| | | |
| | | Api.getCloudConfig(_sParam).then(res => { |
| | |
| | | value: 'group', |
| | | text: '日期(组合)' |
| | | }, { |
| | | value: 'range', |
| | | text: '数值(区间)' |
| | | }, { |
| | | value: 'switch', |
| | | text: '开关' |
| | | }, { |
| | |
| | | cascader: ['readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'place', 'splitline', 'marginTop', 'marginBottom', 'separator'], |
| | | color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'colorType', 'extra', 'marginTop', 'marginBottom'], |
| | | rate: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'splitline', 'tooltip', 'extra', 'marginTop', 'marginBottom', 'allowHalf', 'color', 'rateCount', 'character', 'place'], |
| | | hint: ['label', 'field', 'type', 'blacklist', 'message', 'span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], |
| | | split: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'splitctrl'], |
| | | formula: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'span', 'labelwidth', 'formula', 'eval', 'postfix'], |
| | | hint: ['label', 'field', 'type', 'blacklist', 'supField', 'message', 'span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], |
| | | split: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'splitctrl', 'supField'], |
| | | formula: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'supField', 'span', 'labelwidth', 'formula', 'eval', 'postfix'], |
| | | brafteditor: ['required', 'hidelabel', 'hidden', 'readin', 'fieldlength', 'readonly', 'span', 'labelwidth', 'tooltip', 'extra', 'encryption', 'marginTop', 'marginBottom'], |
| | | funcvar: ['span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], |
| | | linkMain: ['readonly', 'required', 'hidden','declare', 'span', 'labelwidth', 'tooltip', 'interception', 'extra', 'place', 'marginTop', 'marginBottom'], |
| | |
| | | reTooltip.initval = '使用$first表示默认选择第一项。' |
| | | } |
| | | |
| | | if (this.record.supField && !['hint', 'split', 'formula'].includes(type)) { |
| | | if (this.record.supField) { |
| | | shows.push('supvalue') |
| | | } |
| | | |
| | |
| | | LText: mutilForms.join(' union all '), |
| | | obj_name: '', |
| | | arr_field: '', |
| | | table_type: 'Y' |
| | | table_type: 'Y', |
| | | exec_type: 'x' |
| | | } |
| | | |
| | | mutilparam.LText = Utils.formatOptions(mutilparam.LText) |
| | | mutilparam.LText = Utils.formatOptions(mutilparam.LText, 'x') |
| | | mutilparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | mutilparam.secretkey = Utils.encrypt(mutilparam.LText, mutilparam.timestamp) |
| | | mutilparam.secretkey = Utils.encrypt('', mutilparam.timestamp) |
| | | mutilparam.open_key = Utils.encryptOpenKey(mutilparam.secretkey, mutilparam.timestamp) |
| | | |
| | | if (window.GLOB.cloudServiceApi) { // 云端请求 |
| | |
| | | } else { |
| | | let _param = { |
| | | func: 's_get_timers_role', |
| | | LText: `select '${window.GLOB.appkey || ''}','${uuid}'`, |
| | | LText: `select '${window.GLOB.appkey || ''}','${uuid}'`, // 只用做密钥验证,已无效 |
| | | timer_type: interval, |
| | | component_id: uuid |
| | | } |
| | | |
| | | if (window.GLOB.execType === 'x') { |
| | | _param.exec_type = 'x' |
| | | } |
| | | |
| | | _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') // 时间戳 |
| | | _param.LText = Utils.formatOptions(_param.LText) // 关键字符替换,base64加密 |
| | | _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) // md5密钥 |
| | | _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | _param.LText = Utils.formatOptions(_param.LText, _param.exec_type) |
| | | _param.secretkey = Utils.encrypt(window.GLOB.execType === 'x' ? '' : _param.LText, _param.timestamp) |
| | | |
| | | Api.getSystemConfig(_param).then(result => { |
| | | if (!result.status) { |
| | |
| | | forbid: item.query === 'false' |
| | | }) |
| | | } else { |
| | | let value = item.initval |
| | | let value = '0' |
| | | let type = item.type |
| | | |
| | | if (item.type === 'date') { |
| | |
| | | } else if (item.type === 'daterange') { |
| | | value = '1949-10-01 00:00:00.000,1949-10-02 00:00:00.000' |
| | | } else if (item.type === 'range') { |
| | | value = `${item.minValue},${item.maxValue}` |
| | | value = item.initval || `${item.minValue || '-999999'},${item.maxValue || '999999'}` |
| | | } else if (item.type === 'multiselect' || (item.type === 'checkcard' && item.multiple === 'true')) { |
| | | type = 'multi' |
| | | value = '0' |
| | | } else { |
| | | value = '0' |
| | | } |
| | | |
| | | newsearches.push({ |
| | | key: item.field, |
| | | match: item.match, |
| | |
| | | searchText.push(`('${item.value}' ${item.match} '%'+${item.key}+'%')`) |
| | | } else if (item.type === 'date') { |
| | | searchText.push('(' + item.key + ' ' + item.match + ' \'' + item.value + '\')') |
| | | } else if (item.type === 'dateweek' || item.type === 'range') { |
| | | } else if (item.type === 'dateweek') { |
| | | let val = item.value.split(',') |
| | | searchText.push('(' + item.key + ' >= \'' + val[0] + '\' AND ' + item.key + ' < \'' + val[1] + '\')') |
| | | } else if (item.type === 'range') { |
| | | let val = item.value.split(',') |
| | | searchText.push('(' + item.key + ' >= ' + (val[0] || -999999) + ' AND ' + item.key + ' < ' + (val[1] || 999999) + ')') |
| | | } else if (item.type === 'datemonth') { |
| | | if (item.match === '=') { |
| | | searchText.push('(' + item.key + ' = \'' + item.value + '\')') |
| | |
| | | }) |
| | | } |
| | | |
| | | } else if (['dateweek', 'range'].includes(item.type)) { |
| | | } else if (item.type === 'dateweek') { |
| | | let val = item.value.split(',') |
| | | options.push({ |
| | | reg: new RegExp('@' + item.key + '@', 'ig'), |
| | |
| | | }, { |
| | | reg: new RegExp('@' + item.key + '1@', 'ig'), |
| | | value: `'${val[1]}'` |
| | | }) |
| | | } else if (item.type === 'range') { |
| | | let val = item.value.split(',') |
| | | options.push({ |
| | | reg: new RegExp('@' + item.key + '@', 'ig'), |
| | | value: `${val[0] || -999999}` |
| | | }, { |
| | | reg: new RegExp('@' + item.key + '1@', 'ig'), |
| | | value: `${val[1] || 999999}` |
| | | }) |
| | | } else if (item.type === 'datemonth') { |
| | | if (item.match === '=') { |
| | |
| | | } |
| | | |
| | | /** |
| | | * @description 获取搜索字段 |
| | | */ |
| | | export function getSearchFields (searches) { |
| | | if (!searches) return '' |
| | | |
| | | let _usefulFields = [] |
| | | searches.forEach(item => { |
| | | let key = item.key || item.field |
| | | |
| | | if (!key) return |
| | | |
| | | if (item.type === 'group') { |
| | | _usefulFields.push(key) |
| | | if (item.datefield) { |
| | | _usefulFields.push(item.datefield) |
| | | _usefulFields.push(item.datefield + '1') |
| | | } |
| | | } else if (item.type === 'dateweek') { |
| | | _usefulFields.push(key) |
| | | _usefulFields.push(key + '1') |
| | | } else if (item.type === 'datemonth') { |
| | | if (item.match === '=') { |
| | | _usefulFields.push(key) |
| | | } else { |
| | | _usefulFields.push(key) |
| | | _usefulFields.push(key + '1') |
| | | } |
| | | } else if (item.type === 'range') { |
| | | _usefulFields.push(key) |
| | | _usefulFields.push(key + '1') |
| | | } else if (item.type === 'daterange') { |
| | | let _skey = key |
| | | let _ekey = key + '1' |
| | | |
| | | if (/,/.test(key)) { |
| | | _skey = key.split(',')[0] |
| | | _ekey = key.split(',')[1] |
| | | } |
| | | _usefulFields.push(_skey) |
| | | _usefulFields.push(_ekey) |
| | | } else if (item.type === 'date' && _usefulFields.includes(key)) { |
| | | _usefulFields.push(key + '1') |
| | | } else { |
| | | _usefulFields.push(key) |
| | | } |
| | | }) |
| | | |
| | | return _usefulFields.join(', ') |
| | | } |
| | | |
| | | /** |
| | | * @description 重置移动端style |
| | | * @return {Object} style |
| | | */ |
| | |
| | | let param = { |
| | | func: 'sPC_Get_TableData', |
| | | obj_name: 'data', |
| | | exec_type: 'y', |
| | | exec_type: window.GLOB.execType || 'y', |
| | | arr_field: setting.arr_field, |
| | | default_sql: setting.execute ? 'true' : 'false' |
| | | } |
| | |
| | | param.sub_field = setting.sub_field |
| | | } |
| | | |
| | | // exec_type: 'y' 解码字段:LText、LText1、LText2、custom_script、DateCount |
| | | // exec_type 解码字段:LText、LText1、LText2、custom_script、DateCount |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | |
| | | let param = { |
| | | func: 'sPC_Get_TableData', |
| | | obj_name: 'data', |
| | | exec_type: 'y', |
| | | exec_type: window.GLOB.execType || 'y', |
| | | arr_field: statFields.map(col => col.field).join(','), |
| | | default_sql: setting.execute ? 'true' : 'false' |
| | | } |
| | |
| | | param.menuname = setting.$name |
| | | } |
| | | |
| | | param.custom_script = Utils.formatOptions(_customScript) |
| | | param.LText = Utils.formatOptions(LText) |
| | | param.custom_script = Utils.formatOptions(_customScript, param.exec_type) |
| | | param.LText = Utils.formatOptions(LText, param.exec_type) |
| | | param.DateCount = '' |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | |
| | | param.menuname = config.MenuName |
| | | } |
| | | |
| | | param.exec_type = 'y' |
| | | param.LText = Utils.formatOptions(_LText.join(' union all ')) |
| | | param.custom_script = Utils.formatOptions(LText_field.join(' union all ')) |
| | | // param.LText1 = LText1 |
| | | // param.LText = LText |
| | | // param.LText2 = LText2 |
| | | // param.LText_field = Utils.formatOptions(param.LText_field) |
| | | param.exec_type = window.GLOB.execType || 'y' |
| | | param.LText = Utils.formatOptions(_LText.join(' union all '), param.exec_type) |
| | | param.custom_script = Utils.formatOptions(LText_field.join(' union all '), param.exec_type) |
| | | |
| | | if (config.cacheUseful === 'true') { |
| | | param.time_type = config.timeUnit |
| | |
| | | import React from 'react' |
| | | import moment from 'moment' |
| | | import md5 from 'md5' |
| | | // import NodeRSA from 'node-rsa' |
| | | import CryptoJS from 'crypto-js' |
| | | |
| | | const formatKeys = [ |
| | | { key: 'select', value: ' msltk ' }, |
| | |
| | | if (!value) return '' |
| | | |
| | | value = value.replace(/\n/ig, ' \n ') |
| | | // 替换关键字 |
| | | formatKeys.forEach(item => { |
| | | let reg = new RegExp('(^|\\s)' + item.key + '(\\s|$)', 'ig') |
| | | value = value.replace(reg, item.value) |
| | | }) |
| | | // 替换%符(数据库中解析后sql报错) |
| | | value = value.replace(/%/ig, ' mpercent ') |
| | | |
| | | // 外联数据库替换 |
| | | if (window.GLOB.externalDatabase !== null) { |
| | | value = value.replace(/@db@/ig, window.GLOB.externalDatabase) |
| | | } |
| | | |
| | | // if (exec_type === 'x') { |
| | | // // let publicKey = `-----BEGIN PUBLIC KEY----- |
| | | // // MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwGxFURiCrk5a2xfWuM3W |
| | | // // 2lkS3ioZhUFXpkK1inMivItsA/J8MTaBB3EAVxC29xdVCU+xOzs512PuD2b1sjzX |
| | | // // jwO6kx433NtB2okqGiP4RkzhEJHwdyc9dPUKdjirDznUWI9R7WayAf5Z4COhMsj2 |
| | | // // IbkyJgkb6Ivn0UgU0GSWc92HqJJmnb3Ti2gk6A2+oybz2RE3+xB/yOaNu3xav4yi |
| | | // // xxo6harVLNBiaU+D7aDed1W3kE20gLOnEAvcLMjpe3n/QvF5RtELsm3T+vH3TIT2 |
| | | // // GI9+8cT20NZ2d7i41+j/AQZiPJNS3MVmc3aIhuyCOsNPLmvbZZi1KPSJIqkCwdEg |
| | | // // mQIDAQAB |
| | | // // -----END PUBLIC KEY-----` |
| | | // 替换%符(数据库中解析后sql报错) |
| | | value = value.replace(/%/ig, ' mpercent ') |
| | | |
| | | // // let pubKey = new NodeRSA(publicKey, 'pkcs8-public') |
| | | if (exec_type === 'x') { |
| | | let key = CryptoJS.enc.Utf8.parse('D1185ED7B32568C9') |
| | | let iv = CryptoJS.enc.Utf8.parse('') |
| | | let srcs = CryptoJS.enc.Utf8.parse(value) |
| | | |
| | | // // value = window.encodeURIComponent(value) |
| | | // // value = pubKey.encrypt(value, 'base64') |
| | | let encrypted = CryptoJS.AES.encrypt(srcs, key, { iv: iv, mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 }) |
| | | value = encrypted.toString() |
| | | |
| | | // // const priKey = new NodeRSA(privateKey, 'pkcs8-private') |
| | | // // const res = priKey.decrypt(value, 'utf8') |
| | | // } else { |
| | | // let wordArray = CryptoJS.enc.Base64.parse(value) |
| | | // let decryptedWordArray = CryptoJS.AES.decrypt({ ciphertext: wordArray }, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 }) |
| | | // let decryptedText = CryptoJS.enc.Utf8.stringify(decryptedWordArray) |
| | | } else { |
| | | // 替换关键字 |
| | | formatKeys.forEach(item => { |
| | | let reg = new RegExp('(^|\\s)' + item.key + '(\\s|$)', 'ig') |
| | | value = value.replace(reg, item.value) |
| | | }) |
| | | // encode编码(中文字符超出base64加密范围) |
| | | // let str = window.encodeURIComponent(value) |
| | | |
| | | // if (str.length % 3 === 1) { |
| | | // str += '%2F*123*%2F' |
| | | // } else if (str.length % 3 === 2) { |
| | | // str += '%2F*12*%2F' |
| | | // } |
| | | |
| | | value = window.btoa(window.encodeURIComponent(value)) |
| | | // 插入字符 |
| | | let salt = 'minKe' // 盐值 |
| | |
| | | value = value.slice(0, index) + salt + value.slice(index) |
| | | // base64加密 |
| | | value = window.btoa(value) |
| | | // } |
| | | } |
| | | |
| | | return value |
| | | } |
| | |
| | | newsearches[item.key] = _startval |
| | | newsearches[item.key + '1'] = _endval |
| | | } |
| | | } else if (item.type === 'range') { |
| | | let val = item.value.split(',') |
| | | |
| | | newsearches[item.key] = val[0] || -999999 |
| | | newsearches[item.key + '1'] = val[1] || 999999 |
| | | } else if (item.type === 'dateweek') { |
| | | let _startval = '' |
| | | let _endval = '' |
| | |
| | | } else if (item.type === 'range') { |
| | | let val = item.value.split(',') |
| | | |
| | | searchText.push('(' + item.key + ' >= \'' + val[0] + '\' AND ' + item.key + ' < \'' + val[1] + '\')') |
| | | searchText.push('(' + item.key + ' >= ' + (val[0] || -999999) + ' AND ' + item.key + ' < ' + (val[1] || 999999) + ')') |
| | | } else { |
| | | searchText.push('(' + item.key + ' ' + item.match + ' \'' + item.value + '\')') |
| | | } |
| | |
| | | options.push(item) |
| | | options.push(copy) |
| | | } |
| | | } else if (item.type === 'range') { |
| | | let val = item.value.split(',') |
| | | |
| | | let copy = JSON.parse(JSON.stringify(item)) |
| | | copy.key = copy.key + '1' |
| | | copy.value = val[1] || 999999 |
| | | |
| | | item.value = val[0] || -999999 |
| | | |
| | | options.push(item) |
| | | options.push(copy) |
| | | } else if (item.type === 'dateweek') { |
| | | let _startval = item.value ? moment(item.value, 'YYYY-MM-DD').startOf('week').format('YYYY-MM-DD') + ' 00:00:00.000' : '1970-01-01 00:00:00.000' |
| | | let _endval = item.value ? moment(item.value, 'YYYY-MM-DD').endOf('week').add(1, 'days').format('YYYY-MM-DD') + ' 00:00:00.000' : '2050-01-01 00:00:00.000' |
| | |
| | | inner join (select openid from sapp where id='${window.GLOB.appkey}') b |
| | | on a.openid=b.openid` |
| | | |
| | | _sql = Utils.formatOptions(_sql) |
| | | _sql = Utils.formatOptions(_sql, 'x') |
| | | |
| | | let param = { |
| | | func: 'sPC_Get_SelectedList', |
| | | LText: _sql, |
| | | obj_name: 'data', |
| | | arr_field: 'ID,TemplateCode,SignName' |
| | | arr_field: 'ID,TemplateCode,SignName', |
| | | exec_type: 'x' |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 云端数据验证 |
| | | |
| | | Api.getCloudConfig(param).then(res => { |
| | |
| | | let param = { |
| | | func: 's_kei_addupt', |
| | | ID: selectApp.ID, |
| | | exec_type: 'y', |
| | | exec_type: 'x', |
| | | remark: selectApp.remark, |
| | | kei_no: selectApp.kei_no, |
| | | cus_param_type: 'A', |
| | | LText: '' |
| | | cus_param_type: 'A' |
| | | } |
| | | |
| | | param.del_typename = record.typename |
| | |
| | | // 子应用ID、typename、应用ID、CloudUserID、appkey、login_types(是否需要登录,已弃用)、link_type(是否使用短连接,已弃用)、role_type(是否使用角色管理)、lang、css(皮肤)、title(标题)、favicon(图标)、user_binding(用户绑定)、sms_id(短信模板ID)、自定义 |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', topHeight: item.topHeight || '', sysBgColor: item.sysBgColor || '#ffffff', direction: item.direction || 'vertical', adapter: item.adapter || '', share: item.share || '', share_des: item.share_des || '', share_url: item.share_url || '', share_link: item.share_link || ''})))}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, 'x') |
| | | |
| | | confirm({ |
| | | content: '确定删除该子应用吗?', |
| | |
| | | let param = { |
| | | func: 's_kei_addupt', |
| | | ID: ID, |
| | | exec_type: 'y', |
| | | exec_type: 'x', |
| | | remark: res.remark, |
| | | kei_no: res.kei_no, |
| | | cus_param_type: 'A', |
| | |
| | | |
| | | param.LText = selectApp.sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', topHeight: item.topHeight || '', sysBgColor: item.sysBgColor || '#ffffff', direction: item.direction || 'vertical', adapter: item.adapter || '', share: item.share || '', share_des: item.share_des || '', share_url: item.share_url || '', share_link: item.share_link || ''})))}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, 'x') |
| | | } |
| | | |
| | | Api.getCloudConfig(param).then(result => { |
| | |
| | | let param = { |
| | | func: 's_kei_addupt', |
| | | ID: selectApp.ID, |
| | | exec_type: 'y', |
| | | exec_type: 'x', |
| | | remark: selectApp.remark, |
| | | kei_no: selectApp.kei_no, |
| | | cus_param_type: 'A', |
| | |
| | | |
| | | param.LText = sublist.map(item => `select '${item.ID}','${item.typename}','${selectApp.ID}','${sessionStorage.getItem('CloudUserID') || ''}','${window.GLOB.appkey || ''}','false','false','${item.role_type || 'true'}','${item.lang || 'zh-CN'}','${item.css || ''}','${item.title || ''}','${item.favicon || ''}','${item.user_binding || 'false'}','','${window.btoa(window.encodeURIComponent(JSON.stringify({userbind: item.userbind || '', instantMessage: item.instantMessage || '', apptype: item.apptype || '', delay: item.delay || 0, statusBarColor: item.statusBarColor || 'black', topHeight: item.topHeight || '', sysBgColor: item.sysBgColor || '#ffffff', direction: item.direction || 'vertical', adapter: item.adapter || '', share: item.share || '', share_des: item.share_des || '', share_url: item.share_url || '', share_link: item.share_link || ''})))}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, 'x') |
| | | |
| | | Api.getCloudConfig(param).then(result => { |
| | | if (result.status) { |
| | |
| | | debug_md5: key, |
| | | debug_url: url, |
| | | debug_list: window.btoa(tbs), |
| | | LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))) |
| | | LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))), |
| | | LText: '' |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | Api.getCloudConfig(param).then(res => { |
| | | _resolve() |
| | |
| | | param.menuname = MenuName |
| | | } |
| | | |
| | | param.exec_type = 'y' |
| | | param.LText = Utils.formatOptions(LText.join(' union all ')) |
| | | param.custom_script = Utils.formatOptions(LText_field.join(' union all ')) |
| | | param.exec_type = window.GLOB.execType || 'y' |
| | | param.LText = Utils.formatOptions(LText.join(' union all '), param.exec_type) |
| | | param.custom_script = Utils.formatOptions(LText_field.join(' union all '), param.exec_type) |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | |
| | | if (type === 'confirm' && _menuchange) { |
| | | let param = { |
| | | func: 'sPC_Menu_SortUpt', |
| | | exec_type: 'x', |
| | | LText: this.state.menulist.map((item, index) => { |
| | | return 'select \'' + item.MenuID + '\' as Menuid,' + (index + 1) * 10 + ' as sort' |
| | | }) |
| | | } |
| | | |
| | | param.LText = param.LText.join(' union ') // sql拼接 |
| | | param.LText = Utils.formatOptions(param.LText) // 关键字符替换,base64加密 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') // 时间戳 |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) // md5密钥 |
| | | param.LText = param.LText.join(' union ') |
| | | param.LText = Utils.formatOptions(param.LText, 'x') |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | confirm({ |
| | | title: '确认调整菜单顺序吗?', |
| | |
| | | inner join (select openid from sapp where id='${window.GLOB.appkey}') b |
| | | on a.openid=b.openid` |
| | | |
| | | _sql = Utils.formatOptions(_sql) |
| | | _sql = Utils.formatOptions(_sql, 'x') |
| | | |
| | | let param = { |
| | | func: 'sPC_Get_SelectedList', |
| | | LText: _sql, |
| | | obj_name: 'data', |
| | | arr_field: 'ID,TemplateCode,SignName' |
| | | arr_field: 'ID,TemplateCode,SignName', |
| | | exec_type: 'x' |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) // 云端数据验证 |
| | | |
| | | Api.getCloudConfig(param).then(res => { |
| | |
| | | obj_name: 'data', |
| | | arr_field: 'ID,KeyWords,Remark,TypeName,Sort,SrcID', |
| | | BID: '', |
| | | exec_type: window.GLOB.execType || 'y' |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(sql) |
| | | param.LText = Utils.formatOptions(sql, param.exec_type) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | param.DateCount = '' |
| | | |
| | | Api.genericInterface(param).then(response => { |
| | |
| | | |
| | | let param = { |
| | | func: 'sPC_TableData_InUpDe', |
| | | exec_type: 'y', |
| | | exec_type: window.GLOB.execType || 'y', |
| | | ID: version.BID |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(sql) |
| | | param.LText = Utils.formatOptions(sql, param.exec_type) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | |
| | | if (type === 'confirm') { // 保存调整后的顺序 |
| | | let param = { |
| | | func: 'sPC_Menu_SortUpt', |
| | | exec_type: 'x', |
| | | LText: this.state.menulist.map((item, index) => { |
| | | return 'select \'' + item.MenuID + '\' as Menuid,' + (index + 1) * 10 + ' as sort' |
| | | }) |
| | | } |
| | | |
| | | param.LText = param.LText.join(' union ') // sql拼接 |
| | | param.LText = Utils.formatOptions(param.LText) // 关键字符替换,base64加密 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') // 时间戳 |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) // md5密钥 |
| | | param.LText = param.LText.join(' union ') |
| | | param.LText = Utils.formatOptions(param.LText, 'x') |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | confirm({ |
| | | title: '确认调整菜单顺序吗?', |
| | |
| | | if (type === 'confirm') { |
| | | let param = { |
| | | func: 'sPC_Menu_SortUpt', |
| | | exec_type: 'x', |
| | | LText: this.state.menulist.map((item, index) => { |
| | | return 'select \'' + item.MenuID + '\' as Menuid,' + (index + 1) * 10 + ' as sort' |
| | | }) |
| | | } |
| | | |
| | | param.LText = param.LText.join(' union ') // sql拼接 |
| | | param.LText = Utils.formatOptions(param.LText) // 关键字符替换,base64加密 |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') // 时间戳 |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) // md5密钥 |
| | | param.LText = param.LText.join(' union ') |
| | | param.LText = Utils.formatOptions(param.LText, 'x') |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | confirm({ |
| | | title: '确认调整菜单顺序吗?', |
| | |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | this.setState({ |
| | | confirmLoading: true |
| | |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | this.setState({ |
| | | loading: true |
| | |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | this.setState({ |
| | | loading: true |
| | |
| | | LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))) |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | let btnParam = { // 添加菜单按钮 |
| | | func: 'sPC_Button_AddUpt', |
| | |
| | | ParentID: config.uuid, |
| | | MenuNo: config.MenuNo, |
| | | Template: 'CustomPage', |
| | | button_proc_edition: 'Y' |
| | | button_proc_edition: 'Y', |
| | | exec_type: 'x' |
| | | } |
| | | |
| | | btnParam.LText = btns.join(' union all ') |
| | | |
| | | btnParam.LText = Utils.formatOptions(btnParam.LText) |
| | | btnParam.LText = Utils.formatOptions(btnParam.LText, 'x') |
| | | btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp) |
| | | btnParam.secretkey = Utils.encrypt('', btnParam.timestamp) |
| | | |
| | | new Promise(resolve => { |
| | | if (MenuType === 'billPrint') { // 打印生成页面效果图 |
| | |
| | | |
| | | if (window.GLOB.mkActions && window.GLOB.mkActions.loaded) { |
| | | this.setState({loading: false}) |
| | | } else { |
| | | } else if (sessionStorage.getItem('UserID')) { |
| | | this.getPermRole() |
| | | } else { |
| | | Api.getTouristMsg().then(res => { |
| | | if (res.status) { |
| | | sessionStorage.setItem('UserID', res.UserID) |
| | | sessionStorage.setItem('LoginUID', res.LoginUID) |
| | | sessionStorage.setItem('User_Name', res.UserName) |
| | | sessionStorage.setItem('Full_Name', res.FullName) |
| | | sessionStorage.setItem('avatar', res.icon || '') |
| | | sessionStorage.setItem('dataM', res.dataM ? 'true' : '') |
| | | sessionStorage.setItem('debug', res.debug || '') |
| | | 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 || '') |
| | | this.getPermRole() |
| | | } else { |
| | | sessionStorage.clear() |
| | | this.props.history.replace('/login') |
| | | } |
| | | }) |
| | | } |
| | | }, 20) |
| | | } else if (sessionStorage.getItem('UserID')) { |
| | |
| | | let param = { |
| | | func: 's_kei_link_keyids_addupt', |
| | | BID: sessionStorage.getItem('appId'), |
| | | exec_type: 'y', |
| | | exec_type: 'x', |
| | | LText: '' |
| | | } |
| | | |
| | |
| | | |
| | | param.LText = appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, 'x') |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | |
| | | let kparam = { |
| | | func: 's_kei_link_keyids_addupt', |
| | | BID: sessionStorage.getItem('appId'), |
| | | exec_type: 'y', |
| | | exec_type: 'x', |
| | | LText: '' |
| | | } |
| | | |
| | | kparam.LText = _appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) |
| | | kparam.LText = kparam.LText.join(' union all ') |
| | | kparam.LText = Utils.formatOptions(kparam.LText) |
| | | kparam.LText = Utils.formatOptions(kparam.LText, 'x') |
| | | |
| | | kparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | kparam.secretkey = Utils.encrypt('', kparam.timestamp) |
| | |
| | | let param = { |
| | | func: 's_kei_link_keyids_addupt', |
| | | BID: sessionStorage.getItem('appId'), |
| | | exec_type: 'y', |
| | | exec_type: 'x', |
| | | LText: '' |
| | | } |
| | | |
| | |
| | | |
| | | param.LText = appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, 'x') |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | |
| | | let param = { |
| | | func: 's_kei_link_keyids_addupt', |
| | | BID: sessionStorage.getItem('appId'), |
| | | exec_type: 'y', |
| | | exec_type: 'x', |
| | | LText: '' |
| | | } |
| | | |
| | |
| | | |
| | | param.LText = appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, 'x') |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | |
| | | let param = { |
| | | func: 's_kei_link_keyids_addupt', |
| | | BID: sessionStorage.getItem('appId'), |
| | | exec_type: 'y', |
| | | exec_type: 'x', |
| | | LText: '' |
| | | } |
| | | |
| | |
| | | |
| | | param.LText = appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, 'x') |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | |
| | | let kparam = { |
| | | func: 's_kei_link_keyids_addupt', |
| | | BID: sessionStorage.getItem('appId'), |
| | | exec_type: 'y', |
| | | exec_type: 'x', |
| | | LText: '' |
| | | } |
| | | |
| | | kparam.LText = _appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) |
| | | kparam.LText = kparam.LText.join(' union all ') |
| | | kparam.LText = Utils.formatOptions(kparam.LText) |
| | | kparam.LText = Utils.formatOptions(kparam.LText, 'x') |
| | | |
| | | kparam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | kparam.secretkey = Utils.encrypt('', kparam.timestamp) |
| | |
| | | let param = { |
| | | func: 's_kei_link_keyids_addupt', |
| | | BID: sessionStorage.getItem('appId'), |
| | | exec_type: 'y', |
| | | exec_type: 'x', |
| | | LText: '' |
| | | } |
| | | |
| | |
| | | |
| | | param.LText = appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, 'x') |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | |
| | | let param = { |
| | | func: 's_kei_link_keyids_addupt', |
| | | BID: sessionStorage.getItem('appId'), |
| | | exec_type: 'y', |
| | | exec_type: 'x', |
| | | LText: '' |
| | | } |
| | | |
| | |
| | | |
| | | param.LText = appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) |
| | | param.LText = param.LText.join(' union all ') |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.LText = Utils.formatOptions(param.LText, 'x') |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | |
| | | let _param = { |
| | | func: 's_kei_link_keyids_addupt', |
| | | BID: app.ID, |
| | | exec_type: 'y', |
| | | exec_type: 'x', |
| | | LText: '' |
| | | } |
| | | |
| | |
| | | if (appViewList.length !== _appViewList.length) { |
| | | _param.LText = _appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) |
| | | _param.LText = _param.LText.join(' union all ') |
| | | _param.LText = Utils.formatOptions(_param.LText) |
| | | _param.LText = Utils.formatOptions(_param.LText, 'x') |
| | | |
| | | _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | _param.secretkey = Utils.encrypt('', _param.timestamp) |
| | |
| | | |
| | | let dropParam = { |
| | | func: 'sPC_TableData_InUpDe', |
| | | LText: Utils.formatOptions(dropfunc), |
| | | LText: Utils.formatOptions(dropfunc, window.GLOB.execType || 'y'), |
| | | exec_type: window.GLOB.execType || 'y', |
| | | TypeCharOne: 'proc' // 删除存储过程 |
| | | } |
| | | |
| | | dropParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | dropParam.secretkey = Utils.encrypt(dropParam.LText, dropParam.timestamp) |
| | | dropParam.secretkey = Utils.encrypt('', dropParam.timestamp) |
| | | dropParam.open_key = Utils.encryptOpenKey(dropParam.secretkey, dropParam.timestamp) |
| | | |
| | | let createParam = { |
| | | func: 'sPC_TableData_InUpDe', |
| | | LText: Utils.formatOptions(createfunc), |
| | | LText: Utils.formatOptions(createfunc, window.GLOB.execType || 'y'), |
| | | exec_type: window.GLOB.execType || 'y', |
| | | TypeCharOne: 'proc' // 创建存储过程 |
| | | } |
| | | |
| | | createParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | createParam.secretkey = Utils.encrypt(createParam.LText, createParam.timestamp) |
| | | createParam.secretkey = Utils.encrypt('', createParam.timestamp) |
| | | createParam.open_key = Utils.encryptOpenKey(createParam.secretkey, createParam.timestamp) |
| | | |
| | | let saveParam = { |
| | |
| | | LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))) |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |
| | | let btnParam = { // 添加菜单按钮 |
| | | func: 'sPC_Button_AddUpt', |
| | |
| | | ParentID: config.uuid, |
| | | MenuNo: config.MenuNo, |
| | | Template: 'BaseTable', |
| | | button_proc_edition: 'Y' |
| | | button_proc_edition: 'Y', |
| | | exec_type: 'x' |
| | | } |
| | | |
| | | btnParam.LText = btns.join(' union all ') |
| | | |
| | | btnParam.LText = Utils.formatOptions(btnParam.LText) |
| | | btnParam.LText = Utils.formatOptions(btnParam.LText, 'x') |
| | | btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp) |
| | | btnParam.secretkey = Utils.encrypt('', btnParam.timestamp) |
| | | |
| | | new Promise(resolve => { |
| | | Api.getCloudConfig(param).then(res => { |
| | |
| | | type: 'search', |
| | | label: '日期(组合)', |
| | | subType: 'group' |
| | | }, |
| | | { |
| | | type: 'search', |
| | | label: '数值(区间)', |
| | | subType: 'range' |
| | | }, |
| | | { |
| | | type: 'search', |
| | | label: '开关', |
| | | subType: 'switch' |
| | | }, |
| | | { |
| | | type: 'search', |
| | | label: '单选框', |
| | | subType: 'radio' |
| | | }, |
| | | { |
| | | type: 'search', |
| | | label: '勾选框', |
| | | subType: 'check' |
| | | } |
| | | ], |
| | | actionItems: [ |