src/menu/datasource/verifycard/settingform/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/menudesign/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/mobdesign/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/pcdesign/index.jsx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/menu/datasource/verifycard/settingform/index.jsx
@@ -97,6 +97,10 @@ values.onload = 'true' } if (values.interType === 'system' && values.onload === 'false') { values.sync = 'false' } // 数据源前端验证 if (values.interType === 'system' && values.execute !== 'false' && values.dataresource) { let _quot = values.dataresource.match(/'{1}/g) @@ -460,9 +464,9 @@ </Form.Item> </Col> : null} {/* 1、不分页且不存在上级模块 */} {!['navbar', 'interface'].includes(config.type) && !['editable', 'basetable', 'dualdatacard'].includes(config.subtype) && (!config.pageable || (config.pageable && setting.laypage === 'false')) && (setting.supModule.length === 0 || setting.supModule[0] === 'empty') && setting.interType === 'system' ? <Col span={8}> {!['navbar', 'interface'].includes(config.type) && !['editable', 'basetable', 'dualdatacard'].includes(config.subtype) && (!config.pageable || (config.pageable && setting.laypage === 'false')) && (setting.supModule.length === 0 || setting.supModule[0] === 'empty') && setting.interType === 'system' && setting.onload !== 'false' ? <Col span={8}> <Form.Item label={ <Tooltip placement="topLeft" title={'初始化加载时,是否与其他组件一同加载数据,注:仅在使用系统函数,且初始化加载数据时有效,分页请求时无效。'}> <Tooltip placement="topLeft" title={'初始化加载时,是否与其他组件一同加载数据,注:如菜单未使用后端缓存,则查询语句大于8000字符时无效。'}> <QuestionCircleOutlined className="mk-form-tip" /> 同步查询 </Tooltip> @@ -516,7 +520,7 @@ {getFieldDecorator('onload', { initialValue: setting.onload || 'true' })( <Radio.Group> <Radio.Group onChange={(e) => {this.onOptionChange(e.target.value, 'onload')}}> <Radio value="true">加载</Radio> <Radio value="false">不加载</Radio> </Radio.Group> src/views/menudesign/index.jsx
@@ -758,6 +758,35 @@ return true } resetSyncQuery = (components) => { return components.map(item => { if (item.type === 'tabs') { item.subtabs.forEach(tab => { tab.components = this.resetSyncQuery(tab.components) }) } else if (item.type === 'group') { item.components = this.resetSyncQuery(item.components) } else if (item.setting && item.setting.interType === 'system' && item.setting.sync === 'true') { let sql = '' if (item.setting.execute !== 'false' && item.setting.dataresource) { sql = item.setting.dataresource } item.scripts && item.scripts.forEach(script => { if (script.status === 'false') return sql += script.sql }) if (sql.length > 8000) { item.setting.sync = 'false' } } return item }) } submitConfig = () => { const { MenuType } = this.state let config = fromJS(this.state.config).toJS() @@ -780,6 +809,10 @@ config.enabled = false } if (config.cacheUseful !== 'true') { config.components = this.resetSyncQuery(config.components) } let tbs = [] let btns = this.getMenuMessage(config, tbs) let arr = [] src/views/mobdesign/index.jsx
@@ -1333,6 +1333,35 @@ return _style } resetSyncQuery = (components) => { return components.map(item => { if (item.type === 'tabs') { item.subtabs.forEach(tab => { tab.components = this.resetSyncQuery(tab.components) }) } else if (item.type === 'group') { item.components = this.resetSyncQuery(item.components) } else if (item.setting && item.setting.interType === 'system' && item.setting.sync === 'true') { let sql = '' if (item.setting.execute !== 'false' && item.setting.dataresource) { sql = item.setting.dataresource } item.scripts && item.scripts.forEach(script => { if (script.status === 'false') return sql += script.sql }) if (sql.length > 8000) { item.setting.sync = 'false' } } return item }) } submitConfig = () => { const { adapters } = this.state let config = fromJS(this.state.config).toJS() @@ -1359,6 +1388,10 @@ config.enabled = false } if (config.cacheUseful !== 'true') { config.components = this.resetSyncQuery(config.components) } let tbs = [] let roleParam = {type: 'view', version: '1.0', key: config.uuid, title: config.MenuName, children: []} roleParam.children = this.getMenuMessage(tbs) src/views/pcdesign/index.jsx
@@ -1084,6 +1084,35 @@ return true } resetSyncQuery = (components) => { return components.map(item => { if (item.type === 'tabs') { item.subtabs.forEach(tab => { tab.components = this.resetSyncQuery(tab.components) }) } else if (item.type === 'group') { item.components = this.resetSyncQuery(item.components) } else if (item.setting && item.setting.interType === 'system' && item.setting.sync === 'true') { let sql = '' if (item.setting.execute !== 'false' && item.setting.dataresource) { sql = item.setting.dataresource } item.scripts && item.scripts.forEach(script => { if (script.status === 'false') return sql += script.sql }) if (sql.length > 8000) { item.setting.sync = 'false' } } return item }) } submitConfig = () => { let config = fromJS(this.state.config).toJS() @@ -1100,6 +1129,10 @@ config.enabled = false } if (config.cacheUseful !== 'true') { config.components = this.resetSyncQuery(config.components) } let tbs = [] let roleParam = this.getMenuMessage(tbs)