From 2f952c67cb4eddd4ad916a8418b3aee4cae82111 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 02 十一月 2021 10:00:09 +0800 Subject: [PATCH] 2021-11-02 --- src/templates/sharecomponent/settingcomponent/index.jsx | 11 + src/templates/zshare/modalform/index.jsx | 40 ++-- src/tabviews/custom/components/chart/antv-scatter/index.jsx | 2 src/tabviews/custom/components/chart/antv-bar-line/index.jsx | 2 src/tabviews/custom/components/chart/antv-dashboard/index.jsx | 2 src/components/header/index.jsx | 12 + src/tabviews/custom/components/tree/antd-tree/index.jsx | 2 src/templates/zshare/unattended/index.jsx | 2 src/menu/datasource/index.jsx | 12 + src/tabviews/zshare/automatic/index.jsx | 21 + src/tabviews/custom/components/carousel/data-card/index.jsx | 2 src/tabviews/custom/components/table/edit-table/index.jsx | 2 src/tabviews/subtable/index.jsx | 7 src/locales/en-US/main.js | 9 - public/README.txt | 10 src/views/mobdesign/index.jsx | 3 src/tabviews/custom/components/chart/custom-chart/index.jsx | 2 src/tabviews/custom/components/card/data-card/index.jsx | 2 src/utils/utils.js | 10 + src/tabviews/custom/components/form/tab-form/index.jsx | 2 src/tabviews/custom/components/card/table-card/index.jsx | 2 src/tabviews/custom/components/card/prop-card/index.jsx | 2 src/mob/components/menubar/normal-menubar/menucomponent/index.jsx | 5 src/locales/zh-CN/main.js | 9 - src/templates/zshare/formconfig.jsx | 32 +++ src/menu/datasource/verifycard/settingform/index.jsx | 11 src/mob/components/menubar/normal-menubar/index.jsx | 18 ++ src/tabviews/custom/components/table/normal-table/index.jsx | 2 src/templates/zshare/unattended/settingform/index.jsx | 30 ++- src/templates/zshare/verifycard/index.jsx | 18 ++ src/mob/components/menubar/normal-menubar/menucomponent/options.jsx | 11 + src/tabviews/custom/components/chart/antv-pie/index.jsx | 2 src/tabviews/custom/components/form/normal-form/index.jsx | 2 src/components/header/resetpwd/index.jsx | 45 +++- src/mob/components/formdragelement/card.jsx | 3 src/mob/components/menubar/normal-menubar/options.jsx | 12 + src/mob/components/menubar/normal-menubar/index.scss | 9 + src/tabviews/custom/components/carousel/prop-card/index.jsx | 2 src/templates/zshare/createinterface/index.jsx | 5 src/tabviews/custom/components/card/balcony/index.jsx | 4 src/templates/sharecomponent/actioncomponent/dragaction/index.jsx | 3 src/views/login/index.jsx | 67 +++++++ 42 files changed, 330 insertions(+), 119 deletions(-) diff --git a/public/README.txt b/public/README.txt index 9d9efdf..70fe1db 100644 --- a/public/README.txt +++ b/public/README.txt @@ -2,14 +2,14 @@ appId -- 浜戠鐢熸垚鐨勫簲鐢↖D appkey -- 浜戠鐢熸垚鐨勫簲鐢ㄥ瘑閽� -mainSystemApi -- sso绯荤粺鐨勬帴鍙h矾寰勶紝娉細涓氬姟绯荤粺闇�瑕佸~鍐欙紝涓斿�间负閫氱敤鎺ュ彛鐨勫畬鏁磋矾寰� -systemType -- 鍒ゆ柇涓氬姟绯荤粺涓烘祴璇� (绌�) 鎴栨寮� (production) 锛屾寮忕郴缁熷紑鍙戞潈闄愬彧鍚湁绯荤粺鍗囩骇绛夐檺瀹氬姛鑳� +mainSystemApi -- 涓氬姟绯荤粺鐨勫崟鐐圭櫥褰曢摼鎺ュ湴鍧�锛屽紑鍙戠郴缁熷湴鍧�涓篽ttp://sso.mk9h.cn/cloud/webapi/dostars锛岀敓浜х郴缁熼渶瑕佷緷鎹惌寤虹殑鍗曠偣鐧诲綍绯荤粺鑷淇敼閰嶇疆 +systemType -- 绯荤粺绫诲瀷锛屾寮忕郴缁熸槸濉玴roduction锛屽紑鍙戠郴缁熶负绌猴紝寮�鍙戠郴缁熶細鏈変竴閮ㄥ垎鐨勬暟鎹ā绯婂寲 externalDatabase -- 澶栬仈搴擄紝涓嶄娇鐢ㄦ椂榛樿涓篺alse lineColor -- 鐧诲綍椤靛垎鍓茬嚎棰滆壊 filter -- 椤甸潰婊ら暅锛屽�间负'true'鏃讹紝椤甸潰鏄剧ず涓洪粦鐧借壊 -defaultApp -- 榛樿搴旂敤锛岀郴缁熼渶榛樿鎵撳紑鏌愪釜瀛愬簲鐢ㄦ椂闇�濉啓搴旂敤缂栫爜锛岀┖鍊兼椂璺宠浆鍒扮鐞嗗悗鍙� -defaultLang -- 榛樿鎵撳紑鐨勫瓙搴旂敤璇█绫诲瀷锛屽~鍏efaultApp鏃舵湁鏁� +defaultApp -- 榛樿搴旂敤锛岀郴缁熼粯璁ゆ墦寮�鏌愪釜瀛愬簲鐢ㄦ椂闇�濉啓搴旂敤缂栫爜 +defaultLang -- 鎵撳紑鐨勫瓙搴旂敤璇█绫诲瀷锛岄粯璁や负zh-CN WXAppID -- 浣跨敤鍏紬鍙锋椂锛岀粦瀹氱殑鍏紬鍙稩D -debugger -- debugger妯″紡鏄惁寮�鍚紝寮�鍚悗绉诲姩绔瓙搴旂敤涓細鏈夋帶鍒跺彴 +debugger -- 鍊间负true鏃跺紑鍚皟璇曟ā寮忥紝寮�鍚悗绉诲姩绔瓙搴旂敤涓細鏈夋帶鍒跺彴 licenseKey -- 璁稿彲瀵嗛挜锛屽湪鍐呴儴缃戠粶涓娇鐢ㄧ郴缁熸椂锛屼細璺宠繃epc楠岃瘉 probation -- 璇曠敤鏈燂紙YYYY-MM-DD锛夛紝鍦ㄦ寮忕郴缁熶腑锛岃瘯鐢ㄦ湡鍐呰皟鐢ㄧ郴缁熸帴鍙g殑鑴氭湰浼氳褰曚笅鏉� \ No newline at end of file diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx index 0c8f549..281b65e 100644 --- a/src/components/header/index.jsx +++ b/src/components/header/index.jsx @@ -13,6 +13,7 @@ initMenuPermission, logout } from '@/store/action' +import asyncComponent from '@/utils/asyncComponent' import Api from '@/api' import MKEmitter from '@/utils/events.js' import options from '@/store/options.js' @@ -20,12 +21,12 @@ import enUS from '@/locales/en-US/main.js' import Utils from '@/utils/utils.js' import avatar from '@/assets/img/avatar.jpg' -import Resetpwd from './resetpwd' -import LoginForm from './loginform' import './index.scss' const { confirm } = Modal const { Search } = Input +const Resetpwd = asyncComponent(() => import('./resetpwd')) +const LoginForm = asyncComponent(() => import('./loginform')) class Header extends Component { static propTpyes = { @@ -87,9 +88,14 @@ if (result.status) { notification.success({ top: 92, - message: this.state.dict['main.password.resetsuccess'], + message: '淇敼鎴愬姛锛岃閲嶆柊鐧诲綍銆�', duration: 2 }) + setTimeout(() => { + sessionStorage.clear() + this.props.logout() + this.props.history.replace('/login') + }, 2000) } else { notification.warning({ top: 92, diff --git a/src/components/header/resetpwd/index.jsx b/src/components/header/resetpwd/index.jsx index 2f3b63a..70a6cc2 100644 --- a/src/components/header/resetpwd/index.jsx +++ b/src/components/header/resetpwd/index.jsx @@ -1,15 +1,11 @@ import React, {Component} from 'react' -import PropTypes from 'prop-types' import { Form, Input } from 'antd' class Resetpwd extends Component { - static propTpyes = { - dict: PropTypes.object - } - state = { confirmDirty: false, - autoCompleteResult: [] + autoCompleteResult: [], + level: localStorage.getItem(window.location.href.split('#')[0] + 'pwdlevel') || '' } onEnterSubmit = (e) => { @@ -61,7 +57,7 @@ compareToFirstPassword = (rule, value, callback) => { const { form } = this.props if (value && value !== form.getFieldValue('password')) { - callback(this.props.dict['main.password.diff']) + callback('涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷达紒') } else { callback() } @@ -69,14 +65,24 @@ validateToNextPassword = (rule, value, callback) => { const { form } = this.props + const { level } = this.state + if (value && this.state.confirmDirty) { form.validateFields(['confirm'], { force: true }) } - callback() + + if (level === 'letter_num' && value && /^[0-9a-zA-Z!@#$%^&*()_]*$/.test(value) && /^([^0-9]*|[^a-zA-Z]*)$/.test(value)) { + callback('瀵嗙爜涓繀椤诲惈鏈夋暟瀛楀拰瀛楁瘝銆�') + } else if ((level === 'char_num' || level === 'char_num_90') && value && /^[0-9a-zA-Z!@#$%^&*()_]*$/.test(value) && /^([^0-9]*|[^a-zA-Z]*|[^!@#$%^&*()_]*)$/.test(value)) { + callback('瀵嗙爜涓繀椤诲惈鏈夋暟瀛椼�佸瓧姣嶅拰鐗规畩瀛楃銆�') + } else { + callback() + } } render() { const { getFieldDecorator } = this.props.form + const { level } = this.state const formItemLayout = { labelCol: { @@ -89,32 +95,41 @@ } } + let rules = [] + if (level) { + rules.push({ + min: 8, + message: '瀵嗙爜闀垮害涓嶅彲灏忎簬8浣嶏紒' + }) + } + return ( <Form {...formItemLayout} onKeyDown={this.onEnterSubmit} id="reset-password-form"> - <Form.Item label={this.props.dict['main.password.origin']}> + <Form.Item label="鍘熷瘑鐮�"> {getFieldDecorator('originpwd', { rules: [ { required: true, - message: this.props.dict['main.password.origin.required'] + message: '璇疯緭鍏ュ師瀵嗙爜锛�' } ] })(<Input.Password autoFocus/>)} </Form.Item> - <Form.Item label={this.props.dict['main.password.new']} hasFeedback> + <Form.Item label="鏂板瘑鐮�" hasFeedback> {getFieldDecorator('password', { rules: [ { required: true, - message: this.props.dict['main.password.new.required'] + message: '璇疯緭鍏ユ柊瀵嗙爜锛�' }, { pattern: /^[0-9a-zA-Z!@#$%^&*()_]*$/ig, message: '瀵嗙爜鍙厑璁稿寘鍚暟瀛椼�佸瓧姣嶄互鍙�!@#$%&*()_銆�' }, + ...rules, { max: 50, - message: this.props.dict['main.password.maxlen'] + message: '鏈�澶у瘑鐮侀暱搴︿负50浣嶏紒' }, { validator: this.validateToNextPassword @@ -122,12 +137,12 @@ ] })(<Input.Password />)} </Form.Item> - <Form.Item label={this.props.dict['main.password.confirm']} hasFeedback> + <Form.Item label="纭瀵嗙爜" hasFeedback> {getFieldDecorator('confirm', { rules: [ { required: true, - message: this.props.dict['main.password.confirm.required'] + message: '璇风‘璁ゅ瘑鐮侊紒' }, { validator: this.compareToFirstPassword diff --git a/src/locales/en-US/main.js b/src/locales/en-US/main.js index c5f9d09..173c4bb 100644 --- a/src/locales/en-US/main.js +++ b/src/locales/en-US/main.js @@ -13,15 +13,6 @@ 'main.logout.hint': 'Are you sure you want to log out?', 'main.verup': 'Version upgrade', 'main.password': 'Change the password', - 'main.password.origin': 'Original Password', - 'main.password.origin.required': 'Please input your original password!', - 'main.password.new': 'Password', - 'main.password.new.required': 'Please input your password!', - 'main.password.confirm': 'Confirm Password', - 'main.password.confirm.required': 'Please confirm your password!', - 'main.password.maxlen': 'The maximum password length is 12 bits!', - 'main.password.diff': 'Two passwords that you enter is inconsistent!', - 'main.password.resetsuccess': 'Password modified successfully!', 'main.login.develop': 'Login developer', 'main.revert.default': 'Restore default Settings', 'main.copy.success': 'Copy success', diff --git a/src/locales/zh-CN/main.js b/src/locales/zh-CN/main.js index 600ca52..b944342 100644 --- a/src/locales/zh-CN/main.js +++ b/src/locales/zh-CN/main.js @@ -13,15 +13,6 @@ 'main.logout.hint': '鎮ㄧ‘瀹氳閫�鍑哄悧?', 'main.verup': '鐗堟湰鍗囩骇', 'main.password': '淇敼瀵嗙爜', - 'main.password.origin': '鍘熷瘑鐮�', - 'main.password.origin.required': '璇疯緭鍏ュ師瀵嗙爜锛�', - 'main.password.new': '鏂板瘑鐮�', - 'main.password.new.required': '璇疯緭鍏ユ柊瀵嗙爜锛�', - 'main.password.confirm': '纭瀵嗙爜', - 'main.password.confirm.required': '璇风‘璁ゅ瘑鐮侊紒', - 'main.password.maxlen': '鏈�澶у瘑鐮侀暱搴︿负12浣嶏紒', - 'main.password.diff': '涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷达紒', - 'main.password.resetsuccess': '瀵嗙爜淇敼鎴愬姛锛�', 'main.login.develop': '鐧诲綍寮�鍙戞満', 'main.revert.default': '鎭㈠榛樿璁剧疆', 'main.copy.success': '澶嶅埗鎴愬姛', diff --git a/src/menu/datasource/index.jsx b/src/menu/datasource/index.jsx index 8115d65..96d7a6a 100644 --- a/src/menu/datasource/index.jsx +++ b/src/menu/datasource/index.jsx @@ -189,6 +189,8 @@ }) } + let maxScript = 0 + if (window.GLOB.funcs && window.GLOB.funcs.length > 0) { window.GLOB.funcs.forEach(m => { let reg = new RegExp('\\$ex@' + m.func_code + '@ex\\$', 'ig') @@ -197,10 +199,20 @@ } res.scripts.forEach(item => { item.sql = item.sql.replace(reg, `/*$ex@${m.func_code}-begin*/\n${m.key_sql}\n/*@ex$-end*/`) + + if (item.status === 'false') return + + if (/exec\s/ig.test(item.sql)) { + maxScript = 100 + } else if (item.sql.length > maxScript) { + maxScript = item.sql.length + } }) }) } + res.setting.maxScript = maxScript + this.setState({loading: false, visible: false}) this.props.updateConfig({...config, ...res}) }, () => { diff --git a/src/menu/datasource/verifycard/settingform/index.jsx b/src/menu/datasource/verifycard/settingform/index.jsx index abdd2ad..e61ed99 100644 --- a/src/menu/datasource/verifycard/settingform/index.jsx +++ b/src/menu/datasource/verifycard/settingform/index.jsx @@ -59,6 +59,7 @@ return new Promise((resolve, reject) => { this.props.form.validateFieldsAndScroll((err, values) => { if (!err) { + values.sync = values.sync || 'false' // 鏁版嵁婧愬墠绔獙璇� if (values.interType === 'system' && values.execute !== 'false' && !values.dataresource) { notification.warning({ @@ -369,7 +370,7 @@ </Radio.Group>)} </Form.Item> </Col> : null} - {config.type !== 'navbar' && config.type !== 'balcony' ? <Col span={8}> + {!['navbar', 'balcony', 'menubar'].includes(config.type) ? <Col span={8}> <Form.Item label={ <Tooltip placement="topLeft" title={'璇ョ粍浠跺鏋滃彈鍏朵粬缁勪欢鎺у埗锛岃閫夐」鐩稿簲鐨勭粍浠讹紝娌℃湁鏃堕�夆�滄棤鈥濄��'}> <Icon type="question-circle" /> @@ -420,7 +421,7 @@ </Form.Item> </Col> : null} {/* 1銆佷笉鍒嗛〉涓斾笉瀛樺湪涓婄骇妯″潡 */} - {config.type !== 'navbar' && (!config.pageable || (config.pageable && laypage === 'false')) && (!supModule || supModule.length === 0 || supModule[0] === 'empty') ? <Col span={8}> + {!['navbar', 'menubar'].includes(config.type) && (!config.pageable || (config.pageable && laypage === 'false')) && (!supModule || supModule.length === 0 || supModule[0] === 'empty') ? <Col span={8}> <Form.Item label={ <Tooltip placement="topLeft" title={'鍒濆鍖栧姞杞芥椂锛屾槸鍚︿笌鍏朵粬缁勪欢涓�鍚屽姞杞芥暟鎹紝娉細浠呭湪浣跨敤绯荤粺鍑芥暟锛屼笖鍒濆鍖栧姞杞芥暟鎹椂鏈夋晥锛屽垎椤佃姹傛椂鏃犳晥銆�'}> <Icon type="question-circle" /> @@ -437,7 +438,7 @@ )} </Form.Item> </Col> : null} - {config.type !== 'navbar' && config.type !== 'balcony' ? <Col span={8}> + {!['navbar', 'balcony', 'menubar'].includes(config.type) ? <Col span={8}> <Form.Item label={ <Tooltip placement="topLeft" title={'浼樺厛浣跨敤鍚岀骇鐨勬悳绱㈡潯浠剁粍浠讹紝鍚岀骇鎼滅储涓嶅瓨鍦ㄦ椂锛屼緷娆″悜涓婇�夊彇锛屼笌褰撳墠缁勪欢鐨勬悳绱㈡潯浠朵竴鍚岀敤浣滄暟鎹繃婊わ紙褰撳墠缁勪欢鐨勬悳绱㈡潯浠朵紭鍏堬級銆�'}> <Icon type="question-circle" /> @@ -454,7 +455,7 @@ )} </Form.Item> </Col> : null} - {config.type !== 'navbar' && config.type !== 'balcony' && useMSearch === 'true' ? <Col span={8}> + {!['navbar', 'balcony', 'menubar'].includes(config.type) && useMSearch === 'true' ? <Col span={8}> <Form.Item label={ <Tooltip placement="topLeft" title={'澶栧眰鎼滅储鏉′欢鏀瑰彉鏃讹紝鏄惁鍒锋柊褰撳墠缁勪欢鏁版嵁銆�'}> <Icon type="question-circle" /> @@ -482,7 +483,7 @@ </Radio.Group>)} </Form.Item> </Col> - {config.type !== 'navbar' && config.type !== 'balcony' ? <Col span={8}> + {!['navbar', 'balcony', 'menubar'].includes(config.type) ? <Col span={8}> <Form.Item label="鍒濆鍖栨暟鎹�"> {getFieldDecorator('onload', { initialValue: setting.onload || 'true' diff --git a/src/mob/components/formdragelement/card.jsx b/src/mob/components/formdragelement/card.jsx index 60de5ef..e7b3a6c 100644 --- a/src/mob/components/formdragelement/card.jsx +++ b/src/mob/components/formdragelement/card.jsx @@ -185,8 +185,9 @@ </div> } trigger="hover"> <div className="page-card" style={{ opacity: opacity}}> - <div ref={node => drag(drop(node))}> + <div ref={node => drag(drop(node))} style={{ border: '0.5px solid transparent'}}> {card.type === 'split' ? formItem : <Form.Item + style={{marginTop: card.marginTop || 0, marginBottom: card.marginBottom || 0}} className={'ant-form-item' + (card.required === 'true' ? ' required' : '') + (card.splitline === 'false' ? ' no-boder' : '')} > {formItem} diff --git a/src/mob/components/menubar/normal-menubar/index.jsx b/src/mob/components/menubar/normal-menubar/index.jsx index 95c3d50..43d1e85 100644 --- a/src/mob/components/menubar/normal-menubar/index.jsx +++ b/src/mob/components/menubar/normal-menubar/index.jsx @@ -19,6 +19,7 @@ const PasteComponent = asyncIconComponent(() => import('@/menu/components/share/pastecomponent')) const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent')) const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader')) +const SettingComponent = asyncIconComponent(() => import('@/menu/datasource')) const { confirm } = Modal @@ -45,10 +46,14 @@ floor: card.floor, tabId: '', parentId: '', + format: 'object', // 缁勪欢灞炴�� - 鏁版嵁鏍煎紡 + pageable: false, // 缁勪欢灞炴�� - 鏄惁鍙垎椤� + switchable: false, // 缁勪欢灞炴�� - 鏁版嵁鏄惁鍙垏鎹� dataName: card.dataName || '', width: card.width || 24, name: card.name, subtype: card.subtype, + setting: { interType: 'system' }, wrap: { name: card.name, width: card.width || 24, title: '' }, style: { marginLeft: '0px', marginRight: '0px', marginTop: '8px', marginBottom: '8px' }, headerStyle: { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' }, @@ -227,7 +232,16 @@ } updateWrap = (res) => { - this.updateComponent({...this.state.card, wrap: res}) + let card = {...this.state.card, wrap: res} + if (res.datatype === 'dynamic' && !card.format) { + card.format = 'object' + card.pageable = false + card.switchable = false + card.setting = { interType: 'system' } + card.columns = [] + card.scripts = [] + } + this.updateComponent(card) } clickComponent = (e) => { @@ -268,6 +282,8 @@ <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" /> <UserComponent config={card}/> <Icon className="close" title="鍒犻櫎缁勪欢" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> + {card.wrap.datatype === 'dynamic' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null} + {card.wrap.datatype !== 'dynamic' ? <Icon style={{color: '#eeeeee', cursor: 'not-allowed'}} type="setting"/> : null} </div> } trigger="hover"> <Icon type="tool" /> diff --git a/src/mob/components/menubar/normal-menubar/index.scss b/src/mob/components/menubar/normal-menubar/index.scss index 383a40c..0686562 100644 --- a/src/mob/components/menubar/normal-menubar/index.scss +++ b/src/mob/components/menubar/normal-menubar/index.scss @@ -41,6 +41,7 @@ text-overflow: ellipsis; } .menu-sign { + position: relative; text-align: center; .anticon { border-radius: 15%; @@ -48,6 +49,14 @@ img { border-radius: 15%; } + .am-badge-text { + position: absolute; + height: 8px; + width: 8px; + border-radius: 100%; + background: #ff5b05; + z-index: 1; + } } } } diff --git a/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx b/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx index 10225a8..4999373 100644 --- a/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx +++ b/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx @@ -80,9 +80,10 @@ } getSettingForms = () => { + const { cards } = this.props const { card } = this.state - return getSettingForm(card.setting) + return getSettingForm(card.setting, cards.columns || []) } updateSetting = (res) => { @@ -150,8 +151,10 @@ color: card.setting.color, borderRadius: card.setting.borderRadius || '15%' }} type={card.setting.icon}/> + {card.setting.tip ? <sup className="am-badge-text"></sup> : null} </div> : <div className="menu-sign"> <img style={{width: card.setting.imgWidth, height: card.setting.imgWidth, borderRadius: card.setting.borderRadius || '15%'}} src={card.setting.url} alt=""/> + {card.setting.tip ? <sup className="am-badge-text"></sup> : null} </div>} <div className="menu-name">{card.setting.name}</div> </div> diff --git a/src/mob/components/menubar/normal-menubar/menucomponent/options.jsx b/src/mob/components/menubar/normal-menubar/menucomponent/options.jsx index 79de0e1..00a1b26 100644 --- a/src/mob/components/menubar/normal-menubar/menucomponent/options.jsx +++ b/src/mob/components/menubar/normal-menubar/menucomponent/options.jsx @@ -1,7 +1,7 @@ /** * @description Setting琛ㄥ崟閰嶇疆淇℃伅 */ -export default function (setting) { +export default function (setting, columns) { let menulist = sessionStorage.getItem('appMenus') if (menulist) { @@ -180,6 +180,15 @@ precision: 0, required: false }, + { + type: 'select', + field: 'tip', + label: '鎻愮ず', + initval: setting.tip || '', + tooltip: '缁戝畾鎻愮ず瀛楁鍚庯紝浼氬湪鑿滃崟鍙充笂瑙掓樉绀虹孩鑹叉爣璁般��', + required: false, + options: columns + }, ] return menuWrapForm diff --git a/src/mob/components/menubar/normal-menubar/options.jsx b/src/mob/components/menubar/normal-menubar/options.jsx index c8d9f80..45e6b8a 100644 --- a/src/mob/components/menubar/normal-menubar/options.jsx +++ b/src/mob/components/menubar/normal-menubar/options.jsx @@ -28,6 +28,18 @@ max: 24, precision: 0, required: true + }, + { + type: 'radio', + field: 'datatype', + label: '鏁版嵁鏉ユ簮', + initval: wrap.datatype || 'static', + tooltip: '閫夋嫨闈欐�佸�硷紝鏃犻渶閰嶇疆鏁版嵁婧愩��', + required: false, + options: [ + {value: 'dynamic', label: '鍔ㄦ��'}, + {value: 'static', label: '闈欐��'}, + ] } ] diff --git a/src/tabviews/custom/components/card/balcony/index.jsx b/src/tabviews/custom/components/card/balcony/index.jsx index aec9138..d29d901 100644 --- a/src/tabviews/custom/components/card/balcony/index.jsx +++ b/src/tabviews/custom/components/card/balcony/index.jsx @@ -251,7 +251,7 @@ if (syncConfig) { if (!syncConfig.setting.supModule || syncConfig.setting.supModule !== MenuID) return - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ BID: id, BData: data }, () => { this.loadData() }) @@ -263,7 +263,7 @@ this.setState({ show: id ? true : false }) } - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ BID: id, BData: data }, () => { this.loadData() }) diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx index 83cd92d..8ee0d13 100644 --- a/src/tabviews/custom/components/card/data-card/index.jsx +++ b/src/tabviews/custom/components/card/data-card/index.jsx @@ -328,7 +328,7 @@ const { config } = this.state if (!config.setting.supModule || config.setting.supModule !== MenuID) return - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ BID: id, BData: data, pageIndex: 1 }, () => { this.loadData() }) diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx index 848a7f6..92d32a2 100644 --- a/src/tabviews/custom/components/card/prop-card/index.jsx +++ b/src/tabviews/custom/components/card/prop-card/index.jsx @@ -265,7 +265,7 @@ const { config } = this.state if (!config.setting || !config.setting.supModule || config.setting.supModule !== MenuID) return - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ BID: id, BData: data }, () => { this.loadData() }) diff --git a/src/tabviews/custom/components/card/table-card/index.jsx b/src/tabviews/custom/components/card/table-card/index.jsx index fc4ef0b..14107bf 100644 --- a/src/tabviews/custom/components/card/table-card/index.jsx +++ b/src/tabviews/custom/components/card/table-card/index.jsx @@ -183,7 +183,7 @@ const { config } = this.state if (!config.setting.supModule || config.setting.supModule !== MenuID) return - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ BID: id, BData: data, pageIndex: 1 }, () => { this.loadData() }) diff --git a/src/tabviews/custom/components/carousel/data-card/index.jsx b/src/tabviews/custom/components/carousel/data-card/index.jsx index c2740e4..7de4d1f 100644 --- a/src/tabviews/custom/components/carousel/data-card/index.jsx +++ b/src/tabviews/custom/components/carousel/data-card/index.jsx @@ -165,7 +165,7 @@ const { config } = this.state if (!config.setting.supModule || config.setting.supModule !== MenuID) return - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ BID: id, BData: data }, () => { this.loadData() }) diff --git a/src/tabviews/custom/components/carousel/prop-card/index.jsx b/src/tabviews/custom/components/carousel/prop-card/index.jsx index 5750796..a9622b8 100644 --- a/src/tabviews/custom/components/carousel/prop-card/index.jsx +++ b/src/tabviews/custom/components/carousel/prop-card/index.jsx @@ -171,7 +171,7 @@ const { config } = this.state if (config.wrap.datatype === 'static' || !config.setting.supModule || config.setting.supModule !== MenuID) return - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ BID: id, BData: data }, () => { this.loadData() }) diff --git a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx index 38d7af4..1c7f5cc 100644 --- a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx +++ b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx @@ -453,7 +453,7 @@ const { config } = this.state if (!config.setting.supModule || config.setting.supModule !== MenuID) return - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ BID: id }, () => { this.loadData() }) diff --git a/src/tabviews/custom/components/chart/antv-dashboard/index.jsx b/src/tabviews/custom/components/chart/antv-dashboard/index.jsx index 5f64a9e..df4fba4 100644 --- a/src/tabviews/custom/components/chart/antv-dashboard/index.jsx +++ b/src/tabviews/custom/components/chart/antv-dashboard/index.jsx @@ -234,7 +234,7 @@ const { config } = this.state if (!config.setting.supModule || config.setting.supModule !== MenuID) return - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ BID: id }, () => { this.loadData() }) diff --git a/src/tabviews/custom/components/chart/antv-pie/index.jsx b/src/tabviews/custom/components/chart/antv-pie/index.jsx index a660890..51eb7ce 100644 --- a/src/tabviews/custom/components/chart/antv-pie/index.jsx +++ b/src/tabviews/custom/components/chart/antv-pie/index.jsx @@ -187,7 +187,7 @@ const { config } = this.state if (!config.setting.supModule || config.setting.supModule !== MenuID) return - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ BID: id }, () => { this.loadData() }) diff --git a/src/tabviews/custom/components/chart/antv-scatter/index.jsx b/src/tabviews/custom/components/chart/antv-scatter/index.jsx index 54a3ed8..99fb8fb 100644 --- a/src/tabviews/custom/components/chart/antv-scatter/index.jsx +++ b/src/tabviews/custom/components/chart/antv-scatter/index.jsx @@ -205,7 +205,7 @@ const { config } = this.state if (!config.setting.supModule || config.setting.supModule !== MenuID) return - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ BID: id }, () => { this.loadData() }) diff --git a/src/tabviews/custom/components/chart/custom-chart/index.jsx b/src/tabviews/custom/components/chart/custom-chart/index.jsx index 9ae9cd1..f7d88bd 100644 --- a/src/tabviews/custom/components/chart/custom-chart/index.jsx +++ b/src/tabviews/custom/components/chart/custom-chart/index.jsx @@ -203,7 +203,7 @@ const { config } = this.state if (!config.setting.supModule || config.setting.supModule !== MenuID) return - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ BID: id }, () => { this.loadData() }) diff --git a/src/tabviews/custom/components/form/normal-form/index.jsx b/src/tabviews/custom/components/form/normal-form/index.jsx index 85fcccc..3d7cd2b 100644 --- a/src/tabviews/custom/components/form/normal-form/index.jsx +++ b/src/tabviews/custom/components/form/normal-form/index.jsx @@ -217,7 +217,7 @@ resetParentParam = (MenuID, id) => { const { config } = this.state if (config.wrap.datatype === 'static' || !config.setting.supModule || config.setting.supModule !== MenuID) return - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ BID: id }, () => { this.loadData() }) diff --git a/src/tabviews/custom/components/form/tab-form/index.jsx b/src/tabviews/custom/components/form/tab-form/index.jsx index 55a9f62..20cfcac 100644 --- a/src/tabviews/custom/components/form/tab-form/index.jsx +++ b/src/tabviews/custom/components/form/tab-form/index.jsx @@ -200,7 +200,7 @@ resetParentParam = (MenuID, id) => { const { config } = this.state if (config.wrap.datatype === 'static' || !config.setting.supModule || config.setting.supModule !== MenuID) return - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ BID: id }, () => { this.loadData() }) diff --git a/src/tabviews/custom/components/table/edit-table/index.jsx b/src/tabviews/custom/components/table/edit-table/index.jsx index 9d6eea6..0402567 100644 --- a/src/tabviews/custom/components/table/edit-table/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/index.jsx @@ -373,7 +373,7 @@ const { setting } = this.state if (!setting.supModule || setting.supModule !== MenuID) return - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ pageIndex: 1, BID: id, diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx index d1c9b60..3426437 100644 --- a/src/tabviews/custom/components/table/normal-table/index.jsx +++ b/src/tabviews/custom/components/table/normal-table/index.jsx @@ -485,7 +485,7 @@ const { setting } = this.state if (!setting.supModule || setting.supModule !== MenuID) return - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ pageIndex: 1, BID: id, diff --git a/src/tabviews/custom/components/tree/antd-tree/index.jsx b/src/tabviews/custom/components/tree/antd-tree/index.jsx index 889398a..0bd6242 100644 --- a/src/tabviews/custom/components/tree/antd-tree/index.jsx +++ b/src/tabviews/custom/components/tree/antd-tree/index.jsx @@ -170,7 +170,7 @@ const { config } = this.state if (!config.setting.supModule || config.setting.supModule !== MenuID) return - if (id !== this.state.BID) { + if (id !== this.state.BID || id !== '') { this.setState({ BID: id }, () => { this.loadData() }) diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx index e17dc76..3a843c5 100644 --- a/src/tabviews/subtable/index.jsx +++ b/src/tabviews/subtable/index.jsx @@ -373,7 +373,7 @@ return } } - + if (this.props.Tab.supMenu && !BID) { // 涓昏〃ID涓嶅瓨鍦ㄦ椂锛屼笉鏌ヨ瀛愯〃 this.setState({ data: [], @@ -916,12 +916,15 @@ changeTableLine = (ContainerId, tableId, id, data) => { const { Tab } = this.props + const { setting } = this.state if (!Tab.supMenu || tableId !== Tab.supMenu) return this.setState({BData: data, BID: id}) - if (id !== this.state.BID) { + if (!setting) return + + if (id !== this.state.BID || id !== '') { MKEmitter.emit('resetTable', this.props.Tab.uuid) // 鍒楄〃閲嶇疆 this.setState({ pageIndex: 1 diff --git a/src/tabviews/zshare/automatic/index.jsx b/src/tabviews/zshare/automatic/index.jsx index 8145aa3..1ebc33a 100644 --- a/src/tabviews/zshare/automatic/index.jsx +++ b/src/tabviews/zshare/automatic/index.jsx @@ -15,10 +15,18 @@ state = { running: false, line: 1, - init: true + gap: 2000 } timer = null + + UNSAFE_componentWillMount() { + const { autoMatic } = this.props + + if (autoMatic.gap && autoMatic.gap >= 1) { + this.setState({gap: autoMatic.gap * 1000}) + } + } componentDidMount () { MKEmitter.addListener('modifyTabs', this.breakOff) @@ -60,6 +68,7 @@ autoExecOver = (btnId, type) => { const { autoMatic, config } = this.props + const { gap } = this.state if (!this.state.running || btnId !== autoMatic.action) return @@ -70,12 +79,12 @@ this.setState({line: this.state.line + 1}, () => { setTimeout(() => { MKEmitter.emit('autoQueryData', config.MenuID, this.state.line) - }, 2000) + }, gap) }) } else if (autoMatic.onFail === 'stay') { setTimeout(() => { MKEmitter.emit('autoQueryData', config.MenuID, this.state.line) - }, 2000) + }, gap) } else { this.setState({running: false}) } @@ -84,12 +93,12 @@ this.setState({line: this.state.line + 1}, () => { setTimeout(() => { MKEmitter.emit('autoQueryData', config.MenuID, this.state.line) - }, 2000) + }, gap) }) } else if (autoMatic.onSuccess === 'stay') { setTimeout(() => { MKEmitter.emit('autoQueryData', config.MenuID, this.state.line) - }, 2000) + }, gap) } else { this.setState({running: false}) } @@ -104,7 +113,7 @@ setTimeout(() => { MKEmitter.emit('triggerBtnId', autoMatic.action, [data], 'autoMatic') if (['prompt', 'pop'].includes(autoMatic.OpenType)) { - let delay = this.state.init && autoMatic.OpenType === 'pop' ? 2000 : 200 + let delay = autoMatic.OpenType === 'pop' ? 2000 : 300 setTimeout(() => { if (autoMatic.OpenType === 'prompt') { diff --git a/src/templates/sharecomponent/actioncomponent/dragaction/index.jsx b/src/templates/sharecomponent/actioncomponent/dragaction/index.jsx index f775300..c956d28 100644 --- a/src/templates/sharecomponent/actioncomponent/dragaction/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/dragaction/index.jsx @@ -55,8 +55,7 @@ copycard.copyType = 'action' copycard.focus = true - copycard.originCard = card - copycard.originCard.appkey = window.GLOB.appkey + copycard.originCard = {...card, appkey: window.GLOB.appkey} if (copycard.OpenType === 'popview') { // 寰呭畬鍠� copycard.linkTab = '' diff --git a/src/templates/sharecomponent/settingcomponent/index.jsx b/src/templates/sharecomponent/settingcomponent/index.jsx index dfd1ac0..5bb9c2a 100644 --- a/src/templates/sharecomponent/settingcomponent/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/index.jsx @@ -120,12 +120,21 @@ resetSetting = (s) => { let setting = fromJS(s).toJS() + let maxScript = 0 if (window.GLOB.funcs && window.GLOB.funcs.length > 0) { window.GLOB.funcs.forEach(m => { let reg = new RegExp('\\$ex@' + m.func_code + '@ex\\$', 'ig') setting.scripts.forEach(item => { item.sql = item.sql.replace(reg, `/*$ex@${m.func_code}-begin*/\n${m.key_sql}\n/*@ex$-end*/`) + + if (item.status === 'false') return + + if (/exec\s/ig.test(item.sql)) { + maxScript = 100 + } else if (item.sql.length > maxScript) { + maxScript = item.sql.length + } }) setting.preScripts.forEach(item => { item.sql = item.sql.replace(reg, `/*$ex@${m.func_code}-begin*/\n${m.key_sql}\n/*@ex$-end*/`) @@ -139,6 +148,8 @@ }) } + setting.maxScript = maxScript + return setting } diff --git a/src/templates/zshare/createinterface/index.jsx b/src/templates/zshare/createinterface/index.jsx index 7f40704..9db5ce3 100644 --- a/src/templates/zshare/createinterface/index.jsx +++ b/src/templates/zshare/createinterface/index.jsx @@ -1010,6 +1010,9 @@ if (!_arr.includes('modifyuserid')) { _form.push('modifyuserid=@userid@') } + if (!_arr.includes('modifyuser')) { + _form.push('modifyuser=@username') + } if (hasvoucher) { if (!_arr.includes('bvoucher')) { _arr.push('bvoucher') @@ -1058,7 +1061,7 @@ } else if (_actionType === 'LogicDelete') { // 閫昏緫鍒犻櫎 _sql += ` /* 榛樿sql */ - update ${btn.sql} set deleted=1,modifydate=getdate(),modifyuserid=@userid@ where ${primaryKey}=@${primaryKey}@;` + update ${btn.sql} set deleted=1,modifydate=getdate(),modifyuser=@username,modifyuserid=@userid@ where ${primaryKey}=@${primaryKey}@;` } else if (_actionType === 'delete') { // 鐗╃悊鍒犻櫎 let _msg = '' diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index 1cc2fce..fbcc7db 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -874,6 +874,10 @@ }) } + if (card.OpenType === 'blank') { + card.OpenType = 'tab' + } + return [ { type: 'select', @@ -2739,11 +2743,11 @@ label: '鍏夋爣', initVal: card.cursor || 'left', options: [{ - value: 'right', - text: '鍙冲榻�' - }, { value: 'left', text: '宸﹀榻�' + }, { + value: 'right', + text: '鍙冲榻�' }], forbid: appType !== 'mob' }, @@ -3115,6 +3119,28 @@ options: inputfields }, { + type: 'number', + key: 'marginTop', + label: '涓婅竟璺濓紙px锛�', + initVal: card.marginTop || 0, + min: 0, + max: 1000, + precision: 0, + required: false, + forbid: appType !== 'mob' + }, + { + type: 'number', + key: 'marginBottom', + label: '涓嬭竟璺濓紙px锛�', + initVal: card.marginBottom || 0, + min: 0, + max: 1000, + precision: 0, + required: false, + forbid: appType !== 'mob' + }, + { type: 'multiselect', key: 'blacklist', label: Formdict['header.form.blacklist'], diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx index 5b399e6..8ce224c 100644 --- a/src/templates/zshare/modalform/index.jsx +++ b/src/templates/zshare/modalform/index.jsx @@ -16,26 +16,26 @@ const DataTable = asyncComponent(() => import('./datatable')) const modalTypeOptions = { - text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder', 'place'], - number: ['initval', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'splitline', 'place'], - select: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown'], - checkbox: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'arrange'], - radio: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'setAll', 'emptyText', 'splitline', 'arrange'], - checkcard: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'linkSubField', 'fieldlength', 'span', 'labelwidth', 'display', 'tooltip', 'extra', 'width', 'multiple', 'borderColor', 'splitline'], - multiselect: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra'], - link: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkField', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown'], - fileupload: ['readonly', 'required', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'compress', 'splitline'], - switch: ['initval', 'openVal', 'closeVal', 'openText', 'closeText', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline'], - date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline'], - datemonth: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'splitline'], - datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline'], - textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'span', 'labelwidth', 'maxRows', 'encryption', 'interception', 'tooltip', 'extra', 'count', 'placeholder'], - color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra'], - hint: ['label', 'type', 'blacklist', 'message', 'span', 'labelwidth', 'splitline'], - split: ['label', 'type'], - brafteditor: ['required', 'hidelabel', 'hidden', 'readin', 'fieldlength', 'readonly', 'span', 'labelwidth', 'tooltip', 'extra', 'encryption'], - funcvar: ['span', 'labelwidth', 'splitline'], - linkMain: ['readonly', 'required', 'hidden', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra'] + text: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'regular', 'interception', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'scan', 'splitline', 'placeholder', 'place', 'marginTop', 'marginBottom'], + number: ['initval', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'enter', 'cursor', 'splitline', 'place', 'marginTop', 'marginBottom'], + select: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom'], + checkbox: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'arrange', 'marginTop', 'marginBottom'], + radio: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'setAll', 'emptyText', 'splitline', 'arrange', 'marginTop', 'marginBottom'], + checkcard: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'linkSubField', 'fieldlength', 'span', 'labelwidth', 'display', 'tooltip', 'extra', 'width', 'multiple', 'borderColor', 'splitline', 'marginTop', 'marginBottom'], + multiselect: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom'], + link: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'setAll', 'linkField', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom'], + fileupload: ['readonly', 'required', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'compress', 'splitline', 'marginTop', 'marginBottom'], + switch: ['initval', 'openVal', 'closeVal', 'openText', 'closeText', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom'], + date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom'], + datemonth: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'splitline', 'marginTop', 'marginBottom'], + datetime: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom'], + textarea: ['initval', 'readonly', 'required', 'hidden', 'readin', 'fieldlength', 'span', 'labelwidth', 'maxRows', 'encryption', 'interception', 'tooltip', 'extra', 'count', 'placeholder', 'marginTop', 'marginBottom'], + color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom'], + hint: ['label', 'type', 'blacklist', 'message', 'span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], + split: ['label', 'type', 'marginTop', 'marginBottom'], + brafteditor: ['required', 'hidelabel', 'hidden', 'readin', 'fieldlength', 'readonly', 'span', 'labelwidth', 'tooltip', 'extra', 'encryption', 'marginTop', 'marginBottom'], + funcvar: ['span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], + linkMain: ['readonly', 'required', 'hidden', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom'] } class MainSearch extends Component { diff --git a/src/templates/zshare/unattended/index.jsx b/src/templates/zshare/unattended/index.jsx index 1ed4f34..2a5852a 100644 --- a/src/templates/zshare/unattended/index.jsx +++ b/src/templates/zshare/unattended/index.jsx @@ -61,7 +61,7 @@ title="鏃犱汉鍊煎畧" wrapClassName="unattended-field-modal" visible={visible} - width={600} + width={800} maskClosable={false} onOk={this.submit} onCancel={() => { this.setState({ visible: false })}} diff --git a/src/templates/zshare/unattended/settingform/index.jsx b/src/templates/zshare/unattended/settingform/index.jsx index 017efa0..2d44742 100644 --- a/src/templates/zshare/unattended/settingform/index.jsx +++ b/src/templates/zshare/unattended/settingform/index.jsx @@ -47,7 +47,7 @@ return ( <Form {...formItemLayout}> <Row gutter={24}> - <Col span={20}> + <Col span={12}> <Form.Item label="鏄惁鍚敤"> {getFieldDecorator('enable', { initialValue: autoMatic.enable, @@ -59,7 +59,7 @@ )} </Form.Item> </Col> - {enable === 'true' ? <Col span={20}> + {enable === 'true' ? <Col span={12}> <Form.Item label={ <Tooltip placement="topLeft" title="鐢ㄤ簬鑷姩鎵ц鐨勬寜閽��"> <Icon type="question-circle" style={{color: '#c49f47', marginRight: '3px'}} /> @@ -81,7 +81,7 @@ )} </Form.Item> </Col> : null} - {enable === 'true' ? <Col span={20}> + {enable === 'true' ? <Col span={12}> <Form.Item label={ <Tooltip placement="topLeft" title="鎸夐挳鎵ц鎴愬姛锛屽悗缁殑澶勭悊鏂瑰紡銆�"> <Icon type="question-circle" style={{color: '#c49f47', marginRight: '3px'}} /> @@ -98,7 +98,7 @@ )} </Form.Item> </Col> : null} - {enable === 'true' ? <Col span={20}> + {enable === 'true' ? <Col span={12}> <Form.Item label={ <Tooltip placement="topLeft" title="鎸夐挳鎵ц澶辫触鏃讹紝鍚庣画鐨勫鐞嗘柟寮忋��"> <Icon type="question-circle" style={{color: '#c49f47', marginRight: '3px'}} /> @@ -108,7 +108,7 @@ {getFieldDecorator('onFail', { initialValue: autoMatic.onFail || 'stop', })( - <Radio.Group> + <Radio.Group style={{whiteSpace: 'nowrap'}}> <Radio value="next">涓嬩竴琛�</Radio> <Radio value="stay">褰撳墠琛�</Radio> <Radio value="stop">鍋滄</Radio> @@ -116,7 +116,21 @@ )} </Form.Item> </Col> : null} - {enable === 'true' ? <Col span={20}> + {enable === 'true' ? <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="鐩搁偦涓ゆ潯鏁版嵁锛屾墽琛屾椂鐨勯棿闅旀椂闂达紝鏈�灏忎负1s銆�"> + <Icon type="question-circle" style={{color: '#c49f47', marginRight: '3px'}} /> + 鏁版嵁闂撮殧(s) + </Tooltip> + }> + {getFieldDecorator('gap', { + initialValue: autoMatic.gap || 2, + })( + <InputNumber style={{width: '100%'}} min={1} precision={0}/> + )} + </Form.Item> + </Col> : null} + {enable === 'true' ? <Col span={12}> <Form.Item label="瀹屾垚鍚�"> {getFieldDecorator('onFinish', { initialValue: autoMatic.onFinish || 'over', @@ -128,7 +142,7 @@ )} </Form.Item> </Col> : null} - {enable === 'true' && onFinish === 'restart' ? <Col span={20}> + {enable === 'true' && onFinish === 'restart' ? <Col span={12}> <Form.Item label="鍚姩闂撮殧(s)"> {getFieldDecorator('interval', { initialValue: autoMatic.interval === 0 ? 0 : (autoMatic.interval || 600), @@ -137,7 +151,7 @@ )} </Form.Item> </Col> : null} - {enable === 'true' && onFinish === 'restart' ? <Col span={20}> + {enable === 'true' && onFinish === 'restart' ? <Col span={12}> <Form.Item label="閲嶅惎鏃�"> {getFieldDecorator('restart', { initialValue: autoMatic.restart || 'first', diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx index 5b55948..2db3ea3 100644 --- a/src/templates/zshare/verifycard/index.jsx +++ b/src/templates/zshare/verifycard/index.jsx @@ -35,6 +35,7 @@ state = { initsql: '', // sql楠岃瘉鏃跺彉閲忓0鏄庡強璧嬪�� notes: [], // 鐭俊妯℃澘 + setting: null, verify: {}, fields: [], usefulfields: '', @@ -572,6 +573,7 @@ } this.setState({ + setting: config.setting || {}, verify: _verify }) @@ -806,9 +808,15 @@ if (!_arr.includes('submituserid')) { _form.push('submituserid=@userid@') } + if (!_arr.includes('submituser')) { + _form.push('submituser=@username') + } } else { if (!_arr.includes('modifydate')) { _form.push('modifydate=getdate()') + } + if (!_arr.includes('modifyuser')) { + _form.push('modifyuser=@username') } if (!_arr.includes('modifyuserid')) { _form.push('modifyuserid=@userid@') @@ -852,7 +860,7 @@ if (_verify.voucher && _verify.voucher.enabled) { _voucher = ',BVoucher=@BVoucher,FIBVoucherDate=@FIBVoucherDate,FiYear=@FiYear' } - _defaultsql = `update ${card.sql} set deleted=1,modifydate=getdate(),modifyuserid=@userid@${_voucher} where ${config.setting.primaryKey || 'id'}${card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID from dbo.SplitComma(@ID@))'};` + _defaultsql = `update ${card.sql} set deleted=1,modifydate=getdate(),modifyuser=@username,modifyuserid=@userid@${_voucher} where ${config.setting.primaryKey || 'id'}${card.Ot !== 'requiredOnce' ? '=@ID@' : ' in (select ID from dbo.SplitComma(@ID@))'};` } else if (card.sqlType === 'delete') { let _msg = '' if (columns && columns.length > 0 && card.Ot !== 'notRequired' && card.Ot !== 'requiredOnce') { @@ -1310,6 +1318,7 @@ handleConfirm = () => { const { card } = this.props + const { setting } = this.state let verify = fromJS(this.state.verify).toJS() // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭� @@ -1328,6 +1337,13 @@ duration: 5 }) return + } else if (verify.invalid === 'true' && setting.maxScript && setting.maxScript >= 100) { + notification.warning({ + top: 92, + message: '鏁版嵁婧愪腑鑷畾涔夎剼鏈繃浜庡鏉傦紝涓嶈兘浣跨敤澶辨晥楠岃瘉锛�', + duration: 5 + }) + return } let msg = '' diff --git a/src/utils/utils.js b/src/utils/utils.js index 44fdb03..86fd067 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -1899,9 +1899,15 @@ if (!_arr.includes('submituserid')) { _form.push('submituserid=@userid@') } + if (!_arr.includes('submituser')) { + _form.push('submituser=@username') + } } else { if (!_arr.includes('modifydate')) { _form.push('modifydate=getdate()') + } + if (!_arr.includes('modifyuser')) { + _form.push('modifyuser=@username') } if (!_arr.includes('modifyuserid')) { _form.push('modifyuserid=@userid@') @@ -1950,7 +1956,7 @@ _sql += ` /* 榛樿sql */ - update ${btn.sql} set deleted=1,modifydate=getdate(),modifyuserid=@userid@ where ${primaryKey}${_ID};` + update ${btn.sql} set deleted=1,modifydate=getdate(),modifyuser=@username,modifyuserid=@userid@ where ${primaryKey}${_ID};` } else if (_actionType === 'delete') { // 鐗╃悊鍒犻櫎 let _msg = '' @@ -2266,7 +2272,7 @@ form = ` insert into ${param.name} (${field1},createuserid) select ${field2},@UserID - update ${param.name} set ${field3},modifydate=getdate(),modifyuserid=@UserID + update ${param.name} set ${field3},modifydate=getdate(),modifyuser=@username,modifyuserid=@UserID ` } else if (btn.OpenType === 'prompt' || btn.OpenType === 'exec') { form = ` diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx index 8b82352..8eaa080 100644 --- a/src/views/login/index.jsx +++ b/src/views/login/index.jsx @@ -1,5 +1,5 @@ import React, { Component } from 'react' -import { message, Modal } from 'antd' +import { message, Modal, notification } from 'antd' import { connect } from 'react-redux' import md5 from 'md5' import moment from 'moment' @@ -9,12 +9,14 @@ import options, { styles } from '@/store/options.js' import zhCN from '@/locales/zh-CN/login.js' import enUS from '@/locales/en-US/login.js' +import asyncComponent from '@/utils/asyncComponent' import asyncLoadComponent from '@/utils/asyncLoadComponent' import { modifyMemberLevel } from '@/store/action' import './index.scss' const LoginForm = asyncLoadComponent(() => import('./loginform')) -const LoginCloudForm = asyncLoadComponent(() => import('./logincloudform')) +const Resetpwd = asyncLoadComponent(() => import('@/components/header/resetpwd')) +const LoginCloudForm = asyncComponent(() => import('./logincloudform')) const iszhCN = sessionStorage.getItem('lang') !== 'en-US' const _href = window.location.href.split('#')[0] @@ -42,7 +44,8 @@ loginWays: null, touristLogin: false, syncing: false, - visible: false + visible: false, + resetLoading: false } UNSAFE_componentWillMount() { @@ -466,7 +469,7 @@ app_version: res.app_version } - let level = res.pwd_level || 'char_num_90' + let level = res.pwd_level || '' if (level && !['letter_num', 'char_num', 'char_num_90'].includes(level)) { level = '' @@ -635,7 +638,6 @@ param.rduri = options.cloudServiceApi.replace('dostars', 'dostar') } - this.logincloudRef.handleConfirm().then(result => { param.UserName = result.cloudusername param.Password = result.cloudpassword @@ -678,6 +680,48 @@ } }) }) + } + + resetPwdSubmit = () => { + this.formRef.handleConfirm().then(res => { + this.setState({ + resetLoading: true + }) + + let _param = { + func: 's_PwdUpt', + LText: `select '${res.originpwd}','${res.password}'` + } + + _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') // 鏃堕棿鎴� + _param.LText = Utils.formatOptions(_param.LText) // 鍏抽敭瀛楃鏇挎崲锛宐ase64鍔犲瘑 + _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp) // md5瀵嗛挜 + + Api.getSystemConfig(_param).then(result => { + this.setState({ + visible: !result.status, + resetLoading: false + }) + + if (result.status) { + notification.success({ + top: 92, + message: '淇敼鎴愬姛锛岃閲嶆柊鐧诲綍銆�', + duration: 2 + }) + const input = document.getElementById('password') + if (input) { + input.select() + } + } else { + notification.warning({ + top: 92, + message: result.message, + duration: 5 + }) + } + }) + }, () => {}) } /** @@ -737,6 +781,19 @@ > <LoginCloudForm handleSubmit={() => this.syncSubmit()} wrappedComponentRef={(inst) => this.logincloudRef = inst}/> </Modal> + {/* 淇敼瀵嗙爜 */} + <Modal + title="淇敼瀵嗙爜" + okText={this.state.dict['login.ok']} + cancelText={this.state.dict['login.cancel']} + visible={this.state.visible} + onOk={this.resetPwdSubmit} + confirmLoading={this.state.resetLoading} + onCancel={() => this.setState({visible: false, resetLoading: false})} + destroyOnClose + > + <Resetpwd wrappedComponentRef={(inst) => this.formRef = inst} resetPwdSubmit={this.resetPwdSubmit}/> + </Modal> </div> ) } diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx index 3cc66e2..f2cef5a 100644 --- a/src/views/mobdesign/index.jsx +++ b/src/views/mobdesign/index.jsx @@ -1135,6 +1135,7 @@ if (['propcard', 'brafteditor', 'sandbox', 'tabbar', 'stepform', 'tabform'].includes(item.subtype) && item.wrap.datatype === 'static') return if (['balcony'].includes(item.type) && item.wrap.datatype === 'static') return + if (['menubar'].includes(item.type) && item.wrap.datatype !== 'dynamic') return if (item.setting) { if (item.setting.interType === 'system' && item.setting.execute !== 'false' && !item.setting.dataresource) { @@ -1143,7 +1144,7 @@ error = `缁勪欢銆�${item.name}銆嬫湭璁剧疆鏁版嵁婧愶紒` } else if (!item.setting.primaryKey) { error = `缁勪欢銆�${item.name}銆嬫湭璁剧疆涓婚敭锛乣 - } else if (!item.setting.supModule && item.type !== 'navbar' && item.type !== 'balcony') { + } else if (!item.setting.supModule && !['navbar', 'balcony', 'menubar'].includes(item.type)) { error = `缁勪欢銆�${item.name}銆嬫湭璁剧疆涓婄骇缁勪欢锛乣 } } -- Gitblit v1.8.0