From a8736e84e62cae98c05b1cc6ac6992e4b31e7cf2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 13 一月 2020 00:48:31 +0800 Subject: [PATCH] 2020-01-13 --- src/templates/formtabconfig/index.jsx | 836 ++++++++++++++--------------------------------------------- 1 files changed, 200 insertions(+), 636 deletions(-) diff --git a/src/templates/formtabconfig/index.jsx b/src/templates/formtabconfig/index.jsx index 365fc19..c8e43f2 100644 --- a/src/templates/formtabconfig/index.jsx +++ b/src/templates/formtabconfig/index.jsx @@ -12,10 +12,7 @@ import TabDragElement from './tabdragelement' import Api from '@/api' import SearchForm from '@/templates/tableshare/searchform' -import ColumnForm from '@/templates/tableshare/columnform' -import DragElement from '@/templates/tableshare/dragelement' -import ColspanForm from '@/templates/tableshare/colspanform' -import GridBtnForm from '@/templates/tableshare/gridbtnform' +import DragElement from './dragelement' import EditCard from '@/templates/tableshare/editcard' import VerifyCard from '@/templates/tableshare/verifycard' import MenuForm from '@/templates/tableshare/menuform' @@ -67,7 +64,6 @@ originMenu: null, // 鍘熷鑿滃崟 delActions: [], // 鍒犻櫎鎸夐挳鍒楄〃 funcLoading: false, // 瀛樺偍杩囩▼鍒涘缓涓� - showColumnName: false, // 鏄剧ず鍒楀瓧娈靛悕鎺у埗 tabviews: [], // 鎵�鏈夋爣绛鹃〉 profileVisible: false // 楠岃瘉淇℃伅妯℃�佹 } @@ -244,7 +240,7 @@ } } - handleList = (type, list, card) => { + handleList = (type, list, card, groupId) => { const { config } = this.state if (type === 'tabs') { // 鏍囩椤佃皟鏁撮『搴忔垨娣诲姞鍏冪礌 @@ -264,31 +260,23 @@ } else { this.setState({config: {...config, [card.groupId]: list}}) } - } else { - if (list.length > config[type].length) { + } else if (type === 'action') { + if (list.length > config.action.length) { list = list.filter(item => !item.origin) this.setState({ - [type + 'loading']: true, - config: {...config, [type]: list } + actionloading: true, + config: {...config, action: list } }, () => { // 鍒锋柊瀵瑰簲鐨勯厤缃俊鎭� this.setState({ - [type + 'loading']: false + actionloading: false }) - if (type === 'search') { - this.handleSearch(card) - } else if (type === 'action') { - this.handleAction(card) - } else if (type === 'columns') { - this.handleColumn(card) - } else if (type === 'tabs') { - this.handleTab(card) - } + this.handleAction(card) }) } else { - this.setState({config: {...config, [type]: list}}) + this.setState({config: {...config, action: list}}) } } } @@ -509,69 +497,12 @@ initVal: card.OpenType, required: true, options: [{ - value: 'pop', - text: this.state.dict['header.form.popform'] - }, { value: 'prompt', text: this.state.dict['header.form.prompt'] }, { value: 'exec', text: this.state.dict['header.form.exec'] - }, { - value: 'excelIn', - text: this.state.dict['header.form.excelIn'] - }, { - value: 'excelOut', - text: this.state.dict['header.form.excelOut'] - }, { - value: 'popview', - text: this.state.dict['header.form.popview'] - }, { - value: 'tab', - text: this.state.dict['header.form.tab'] - }, { - value: 'blank', - text: this.state.dict['header.form.blank'] - }, { - value: 'innerpage', - text: this.state.dict['header.form.newpage.inner'] - }, { - value: 'outerpage', - text: this.state.dict['header.form.newpage.outer'] }] - }, { - type: 'select', - key: 'tabType', - label: this.state.dict['header.form.tabType'], - initVal: card.tabType || 'SubTable', - required: true, - options: [{ - value: 'SubTable', - text: this.state.dict['header.menu.tab.subtable'] - }] - }, - { - type: 'select', - key: 'linkTab', - label: '鍏宠仈鏍囩', - initVal: card.linkTab || '', - required: false, - options: [] - }, - { - type: 'select', - key: 'pageTemplate', - label: this.state.dict['header.form.pageTemplate'], - initVal: card.pageTemplate, - required: true, - options: [] - }, - { - type: 'text', - key: 'url', - label: this.state.dict['header.form.newpage.url'], - initVal: card.url || '', - required: true }, { type: 'radio', @@ -602,12 +533,18 @@ readonly: false }, { - type: 'text', - key: 'interface', - label: this.state.dict['header.form.interface'], - initVal: card.interface, + type: 'radio', + key: 'sysInterface', + label: this.state.dict['header.form.sysInterface'], + initVal: card.sysInterface || 'false', required: true, - readonly: false + options: [{ + value: 'true', + text: this.state.dict['header.form.true'] + }, { + value: 'false', + text: this.state.dict['header.form.false'] + }] }, { type: 'text', @@ -619,33 +556,19 @@ }, { type: 'text', + key: 'interface', + label: this.state.dict['header.form.interface'], + initVal: card.sysInterface === 'true' ? (window.GLOB.mainSystemApi || window.GLOB.subSystemApi) : card.interface, + required: true, + readonly: card.sysInterface === 'true' + }, + { + type: 'text', key: 'callbackFunc', label: this.state.dict['header.form.callbackFunc'], initVal: card.callbackFunc, required: false, readonly: false - }, - { - type: 'select', - key: 'position', - label: this.state.dict['header.form.position'], - initVal: card.position || 'toolbar', - required: true, - options: [{ - value: 'toolbar', - text: this.state.dict['header.form.toolbar'] - }, { - value: 'grid', - text: this.state.dict['header.form.grid'] - }] - }, - { - type: 'select', - key: 'Ot', - label: this.state.dict['header.form.isRequired'], - initVal: card.Ot || 'requiredSgl', - required: true, - options: [] }, { type: 'select', @@ -733,221 +656,6 @@ } ] }) - } - - handleColumn = (card) => { - if (card.type !== 'colspan') { - this.setState({ - visible: true, - formtemp: 'columns', - modalTitle: '缂栬緫-鏄剧ず鍒�', - card: card, - formlist: [ - { - type: 'text', - key: 'label', - label: this.state.dict['header.form.name'], - initVal: card.label, - required: true - }, - { - type: 'text', - key: 'field', - label: this.state.dict['header.form.field'], - initVal: card.field, - required: true, - readonly: false - }, - { - type: 'select', - key: 'type', - label: this.state.dict['header.form.type'], - initVal: card.type, - required: true, - options: [{ - value: 'text', - text: this.state.dict['header.form.text'] - }, { - value: 'number', - text: this.state.dict['header.form.number'] - }, { - value: 'picture', - text: this.state.dict['header.form.picture'] - }, { - value: 'textarea', - text: this.state.dict['header.form.textarea'] - }] - }, - { - type: 'select', - key: 'Align', - label: this.state.dict['header.form.align'], - initVal: card.Align, - required: true, - options: [{ - value: 'left', - text: this.state.dict['header.form.alignLeft'] - }, { - value: 'right', - text: this.state.dict['header.form.alignRight'] - }, { - value: 'center', - text: this.state.dict['header.form.alignCenter'] - }] - }, - { - type: 'radio', - key: 'Hide', - label: this.state.dict['header.form.Hide'], - initVal: card.Hide, - required: true, - options: [{ - value: 'true', - text: this.state.dict['header.form.true'] - }, { - value: 'false', - text: this.state.dict['header.form.false'] - }] - }, - { - type: 'radio', - key: 'IsSort', - label: this.state.dict['header.form.IsSort'], - initVal: card.IsSort, - required: true, - options: [{ - value: 'true', - text: this.state.dict['header.form.true'] - }, { - value: 'false', - text: this.state.dict['header.form.false'] - }] - }, - { - type: 'number', - key: 'Width', - min: 1, - max: 1000, - decimal: 0, - label: this.state.dict['header.form.columnWidth'], - initVal: card.Width, - required: true - }, - { - type: 'number', - key: 'decimal', - min: 0, - max: 18, - decimal: 0, - label: this.state.dict['header.form.decimal'], - initVal: card.decimal, - required: false - }, - { - type: 'select', - key: 'format', - label: this.state.dict['header.form.format'], - initVal: card.format || '', - options: [{ - value: '', - text: this.state.dict['header.form.empty'] - }, { - value: 'thdSeparator', - text: this.state.dict['header.form.thdSeparator'] - }], - required: false - }, - { - type: 'text', - key: 'prefix', - label: this.state.dict['header.form.prefix'], - initVal: card.prefix || '', - required: false, - readonly: false - }, - { - type: 'text', - key: 'postfix', - label: this.state.dict['header.form.postfix'], - initVal: card.postfix || '', - // tooltip: '鍚庣紑鍊艰缃负"\\n",琛ㄧず鎹㈣', - tooltipClass: 'middle', - required: false, - readonly: false - }, - { - type: 'select', - key: 'match', - label: this.state.dict['header.form.match'], - initVal: card.match || '', - options: [{ - value: '', - text: this.state.dict['header.form.empty'] - }, { - value: '>', - text: '>' - }, { - value: '<', - text: '<' - }, { - value: '>=', - text: '>=' - }, { - value: '<=', - text: '<=' - }], - required: false - }, - { - type: 'text', - key: 'matchVal', - min: -Infinity, - max: Infinity, - decimal: 0, - label: this.state.dict['header.form.matchVal'], - initVal: card.matchVal || '', - required: false, - readonly: false - }, - { - type: 'select', - key: 'color', - label: this.state.dict['header.form.color'], - initVal: card.color || '', - options: [{ - value: '', - text: this.state.dict['header.form.empty'] - }, { - value: 'red', - text: '绾㈣壊锛堝唴瀹癸級' - }, { - value: 'redbg', - text: '绾㈣壊锛堣儗鏅級' - }, { - value: 'orange', - text: '姗欒壊锛堝唴瀹癸級' - }, { - value: 'orangebg', - text: '姗欒壊锛堣儗鏅級' - }, { - value: 'green', - text: '缁胯壊锛堝唴瀹癸級' - }, { - value: 'greenbg', - text: '缁胯壊锛堣儗鏅級' - }], - required: false - } - ] - }) - } else { - this.setState({ - visible: true, - formtemp: 'columns', - modalTitle: '缂栬緫-鍚堝苟鍒�', - card: card - }) - } } handleTab = (card) => { @@ -1058,14 +766,6 @@ }) } - handleGridBtn = () => { - this.setState({ - visible: true, - formtemp: 'gridbtn', - modalTitle: '缂栬緫-鎿嶄綔鍒�', - }) - } - /** * @description 鎼滅储銆佹寜閽�佹樉绀哄垪淇敼鍚庢彁浜や繚瀛� * 1銆佹悳绱㈡潯浠朵繚瀛橈紝褰撶被鍨嬩负涓嬫媺妗嗕笖瀛樺湪鏁版嵁婧愭椂锛屽皢鏌ヨ鏉′欢鎷兼帴涓簊ql锛屽苟鐢╞ase64杞爜 @@ -1077,121 +777,84 @@ const { card } = this.state let _config = JSON.parse(JSON.stringify(this.state.config)) - if (this.state.formtemp !== 'gridbtn') { - this.formRef.handleConfirm().then(res => { - let isupdate = false + this.formRef.handleConfirm().then(res => { + let isupdate = false - if (res.type === 'action' && card.originCard && res.values.OpenType === 'pop') { - Api.getSystemConfig({ - func: 'sPC_Get_LongParam', - MenuID: card.originCard.uuid - }).then(result => { - if (result.status && result.LongParam) { - let param = { - func: 'sPC_ButtonParam_AddUpt', - ParentID: menu.MenuID, - MenuID: res.values.uuid, - MenuNo: menu.MenuNo, - Template: 'Modal', - MenuName: res.values.label, - PageParam: JSON.stringify({Template: 'Modal'}), - LongParam: result.LongParam + if (res.type === 'action' && card.originCard && res.values.OpenType === 'pop') { + Api.getSystemConfig({ + func: 'sPC_Get_LongParam', + MenuID: card.originCard.uuid + }).then(result => { + if (result.status && result.LongParam) { + let param = { + func: 'sPC_ButtonParam_AddUpt', + ParentID: menu.MenuID, + MenuID: res.values.uuid, + MenuNo: menu.MenuNo, + Template: 'Modal', + MenuName: res.values.label, + PageParam: JSON.stringify({Template: 'Modal'}), + LongParam: result.LongParam + } + Api.getSystemConfig(param).then(response => { + if (!response.status) { + notification.warning({ + top: 92, + message: response.message, + duration: 10 + }) } - Api.getSystemConfig(param).then(response => { - if (!response.status) { - notification.warning({ - top: 92, - message: response.message, - duration: 10 - }) - } - }) - } - }) - } - - if (res.type !== 'tabs') { - _config[res.type] = _config[res.type].map(item => { - if (item.uuid === res.values.uuid) { - isupdate = true - return res.values - } else { - return item - } - }) - _config[res.type] = _config[res.type].filter(item => !item.origin) - - if (!isupdate) { // 鎿嶄綔涓嶆槸淇敼锛屾坊鍔犲厓绱犺嚦鍒楄〃 - _config[res.type].push(res.values) + }) } - } else { // 鏍囩椤电殑娣诲姞涓庝慨鏀� - _config[res.values.groupId] = _config[res.values.groupId].map(item => { - if (item.uuid === res.values.uuid) { - isupdate = true - return res.values - } else { - return item - } - }) - _config[res.values.groupId] = _config[res.values.groupId].filter(item => !item.origin) - - if (!isupdate) { // 鎿嶄綔涓嶆槸淇敼锛屾坊鍔犲厓绱犺嚦鍒楄〃 - _config[res.values.groupId].push(res.values) - } - } - - - if (res.type === 'action') { - let gridbtn = _config.action.filter(act => act.position === 'grid') - let _display = false - - if (gridbtn.length > 0) { - _display = true - } - - if (_config.gridBtn) { - _config.gridBtn.display = _display + }) + } + + if (res.type !== 'tabs') { + _config[res.type] = _config[res.type].map(item => { + if (item.uuid === res.values.uuid) { + isupdate = true + return res.values } else { - _config.gridBtn = { - display: _display, - Align: 'center', - IsSort: 'false', - uuid: Utils.getuuid(), - label: this.state.dict['header.form.column.action'], - type: 'action', - style: 'button', - show: 'horizontal', - Width: 120 - } + return item } + }) + _config[res.type] = _config[res.type].filter(item => !item.origin) + + if (!isupdate) { // 鎿嶄綔涓嶆槸淇敼锛屾坊鍔犲厓绱犺嚦鍒楄〃 + _config[res.type].push(res.values) } + } else { // 鏍囩椤电殑娣诲姞涓庝慨鏀� + _config[res.values.groupId] = _config[res.values.groupId].map(item => { + if (item.uuid === res.values.uuid) { + isupdate = true + return res.values + } else { + return item + } + }) + _config[res.values.groupId] = _config[res.values.groupId].filter(item => !item.origin) + + if (!isupdate) { // 鎿嶄綔涓嶆槸淇敼锛屾坊鍔犲厓绱犺嚦鍒楄〃 + _config[res.values.groupId].push(res.values) + } + } + this.setState({ + config: _config, + searchloading: true, + actionloading: true, + columnsloading: true, + tabloading: true, + visible: false + }, () => { this.setState({ - config: _config, - searchloading: true, - actionloading: true, - columnsloading: true, - tabloading: true, - visible: false - }, () => { - this.setState({ - searchloading: false, - actionloading: false, - columnsloading: false, - tabloading: false - }) + searchloading: false, + actionloading: false, + columnsloading: false, + tabloading: false }) }) - } else { - this.formRef.handleConfirm().then(res => { - _config.gridBtn = res - - this.setState({ - config: _config, - visible: false - }) - }) - } + }) } /** @@ -1466,29 +1129,6 @@ if (!isupdate) { // 鎿嶄綔涓嶆槸淇敼锛屾坊鍔犲厓绱犺嚦鍒楄〃 _config.action.push(btn) - } - - let gridbtn = _config.action.filter(act => act.position === 'grid') - let _display = false - - if (gridbtn.length > 0) { - _display = true - } - - if (_config.gridBtn) { - _config.gridBtn.display = _display - } else { - _config.gridBtn = { - display: _display, - Align: 'center', - IsSort: 'false', - uuid: Utils.getuuid(), - label: this.state.dict['header.form.column.action'], - type: 'action', - style: 'button', - show: 'horizontal', - Width: 120 - } } this.setState({ @@ -1811,13 +1451,6 @@ } /** - * @description 涓夌骇鑿滃崟鍒囨崲妯℃澘 - */ - changeTemplate = () => { - this.props.handleConfig('template') - } - - /** * @description 涓夌骇鑿滃崟淇濆瓨 */ submitConfig = () => { @@ -1833,9 +1466,6 @@ } if (config.action[0] && config.action[0].origin) { config.action = config.action.filter(item => !item.origin) - } - if (config.columns[0] && config.columns[0].origin) { - config.columns = config.columns.filter(item => !item.origin) } if (config.tabs[0] && config.tabs[0].origin) { config.tabs = config.tabs.filter(item => !item.origin) @@ -2077,7 +1707,6 @@ if ( (config.search[0] && config.search[0].origin) || (config.action[0] && config.action[0].origin) || - (config.columns[0] && config.columns[0].origin) || (config.tabs[0] && config.tabs[0].origin) ) { isAdd = true @@ -2149,14 +1778,6 @@ columns.set(item.field, {...item, selected: true, datatype: _datatype}) } }) - } else if (type === 'columns') { - // 娣诲姞鏄剧ず鍒楋紝瀛楁闆嗕腑瀛樺湪鏄剧ず鍒楀瓧娈碉紝浣跨敤鏄剧ず鍒楀璞℃浛鎹㈠瓧娈甸泦锛岃缃暟鎹被鍨� - config.columns.forEach(item => { - if (columns.has(item.field)) { - let _datatype = columns.get(item.field).datatype - columns.set(item.field, {...item, selected: true, datatype: _datatype}) - } - }) } // 鏄剧ず瀛楁闆嗗脊绐� @@ -2204,106 +1825,72 @@ }) let items = [] - if (addType === 'search') { - config.search.forEach(item => { - if (columnsMap.has(item.field)) { - let cell = columnsMap.get(item.field) + config.search.forEach(item => { + if (columnsMap.has(item.field)) { + let cell = columnsMap.get(item.field) - if (cell.selected && cell.type === item.type) { // 鏁版嵁鏈慨鏀� - items.push(item) - } else if (cell.selected) { // 鏁版嵁绫诲瀷淇敼 - if (cell.type === 'text') { - item.match = textmatch[cell.datatype] - } else if (cell.type === 'select') { - item.match = selectmatch[cell.datatype] - } else if (cell.type === 'daterange') { - item.match = datematch[cell.datatype] - } else { - cell.type = 'text' - item.match = textmatch[cell.datatype] - } - - item.type = cell.type - item.initval = '' - items.push(item) - } - columnsMap.delete(item.field) - } else if (!item.origin) { + if (cell.selected && cell.type === item.type) { // 鏁版嵁鏈慨鏀� items.push(item) - } - }) - - let _columns = [...columnsMap.values()] - - _columns.forEach(item => { - if (item.selected) { - let _match = '' - if (item.type === 'text') { - _match = textmatch[item.datatype] - } else if (item.type === 'select') { - _match = selectmatch[item.datatype] - } else if (item.type === 'daterange') { - _match = datematch[item.datatype] + } else if (cell.selected) { // 鏁版嵁绫诲瀷淇敼 + if (cell.type === 'text') { + item.match = textmatch[cell.datatype] + } else if (cell.type === 'select') { + item.match = selectmatch[cell.datatype] + } else if (cell.type === 'daterange') { + item.match = datematch[cell.datatype] } else { - item.type = 'text' - _match = textmatch[item.datatype] + cell.type = 'text' + item.match = textmatch[cell.datatype] } - - let newcard = { - uuid: Utils.getuuid(), - label: item.label, - field: item.field, - initval: '', - type: item.type, - resourceType: '0', - setAll: 'false', - options: [], - dataSource: '', - linkField: '', - valueField: '', - valueText: '', - orderBy: '', - orderType: 'asc', - match: _match, - display: 'dropdown' - } - - items.push(newcard) - } - }) - } else { - config.columns.forEach(item => { - if (columnsMap.has(item.field)) { - let cell = columnsMap.get(item.field) - - if (cell.selected) { - items.push(item) - } - columnsMap.delete(item.field) - } else if (!item.origin) { + + item.type = cell.type + item.initval = '' items.push(item) } - }) + columnsMap.delete(item.field) + } else if (!item.origin) { + items.push(item) + } + }) - let _columns = [...columnsMap.values()] + let _columns = [...columnsMap.values()] - _columns.forEach(item => { - if (item.selected) { - let newcard = { - uuid: Utils.getuuid(), - Align: 'left', - label: item.label, - field: item.field, - Hide: 'false', - IsSort: item.type === 'picture' ? 'false' : 'true', - type: item.type, - Width: 120 - } - - items.push(newcard) + _columns.forEach(item => { + if (item.selected) { + let _match = '' + if (item.type === 'text') { + _match = textmatch[item.datatype] + } else if (item.type === 'select') { + _match = selectmatch[item.datatype] + } else if (item.type === 'daterange') { + _match = datematch[item.datatype] + } else { + item.type = 'text' + _match = textmatch[item.datatype] } - }) - } + + let newcard = { + uuid: Utils.getuuid(), + label: item.label, + field: item.field, + initval: '', + type: item.type, + resourceType: '0', + setAll: 'false', + options: [], + dataSource: '', + linkField: '', + valueField: '', + valueText: '', + orderBy: '', + orderType: 'asc', + match: _match, + display: 'dropdown' + } + + items.push(newcard) + } + }) this.setState({ [addType + 'loading']: true, @@ -2440,7 +2027,6 @@ if ( (config.search[0] && config.search[0].origin) || (config.action[0] && config.action[0].origin) || - (config.columns[0] && config.columns[0].origin) || (config.tabs[0] && config.tabs[0].origin) ) { isAdd = true @@ -2568,14 +2154,6 @@ } } - onColumnNameChange = () => { - const { showColumnName } = this.state - - this.setState({ - showColumnName: !showColumnName - }) - } - addTabGroup = () => { let _this = this let _config = JSON.parse(JSON.stringify(this.state.config)) @@ -2630,13 +2208,16 @@ } render () { + const { config } = this.state + let _length = config.groups.length + let configTabs = [] this.state.config.tabgroups.forEach(group => { configTabs.push(...this.state.config[group]) }) return ( - <div className="common-table-board"> + <div className="form-tab-board"> <DndProvider backend={HTML5Backend}> {/* 宸ュ叿鏍� */} <div className="tools"> @@ -2738,27 +2319,54 @@ <Card title={this.state.dict['header.menu.page.configurable']} bordered={false} extra={ <div> <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={this.state.config.enabled} onChange={this.onEnabledChange} /> - <Button type="primary" onClick={this.changeTemplate}>{this.state.dict['header.menu.template.change']}</Button> <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['header.save']}</Button> <Button onClick={this.cancelConfig}>{this.state.dict['header.return']}</Button> </div> } style={{ width: '100%' }}> <Icon type="setting" onClick={this.changeSetting} /> - <div className="search-list"> - <Tooltip placement="bottomLeft" overlayClassName="middle" title="鍦ㄥ乏渚у伐鍏锋爮銆婃悳绱€�嬩腑锛岄�夋嫨瀵瑰簲鎼滅储妗嗘嫋鑷虫澶勬坊鍔狅紱鎴栫偣鍑绘寜閽�婃坊鍔犳悳绱㈡潯浠躲�嬫壒閲忔坊鍔狅紝閫夋嫨鎵归噺娣诲姞鏃讹紝闇�鎻愬墠閫夋嫨浣跨敤琛ㄣ��"> - <Icon type="question-circle" /> - </Tooltip> - {!this.state.searchloading ? - <DragElement - type="search" - list={this.state.config.search} - handleList={this.handleList} - handleMenu={this.handleSearch} - deleteMenu={this.deleteElement} - placeholder={this.state.dict['header.form.search.placeholder']} - /> : null - } - </div> + <Tooltip placement="bottomLeft" overlayClassName="middle" title="鍦ㄥ乏渚у伐鍏锋爮銆婃悳绱€�嬩腑锛岄�夋嫨瀵瑰簲鎼滅储妗嗘嫋鑷虫澶勬坊鍔狅紱鎴栫偣鍑绘寜閽�婃坊鍔犳悳绱㈡潯浠躲�嬫壒閲忔坊鍔狅紝閫夋嫨鎵归噺娣诲姞鏃讹紝闇�鎻愬墠閫夋嫨浣跨敤琛ㄣ��"> + <Icon type="question-circle" /> + </Tooltip> + <Collapse + activeKey={config.groups.map(group => group.uuid)} + expandIconPosition={'right'} + > + {!this.state.searchloading && config.groups.map((group, index) => ( + <Panel showArrow={false} header={group.label} key={group.uuid} extra={( + <span> + {index === _length - 1 ? <Icon + type="plus" + onClick={event => { + event.stopPropagation() + }} + /> : null} + {_length > 1 && index !== _length - 1 ? <Icon + type="delete" + onClick={event => { + event.stopPropagation() + }} + /> : null} + <Icon + type="edit" + onClick={event => { + event.stopPropagation() + }} + /> + </span> + )}> + <DragElement + type="search" + groupId={group.uuid} + list={group.sublist} + handleList={this.handleList} + setting={config.setting} + handleMenu={this.handleSearch} + deleteMenu={this.deleteElement} + placeholder={this.state.dict['header.form.search.placeholder']} + /> + </Panel> + ))} + </Collapse> <div className="action-list"> <Tooltip placement="bottomLeft" overlayClassName="middle" title="鍦ㄥ乏渚у伐鍏锋爮銆婃寜閽�嬩腑锛岄�夋嫨瀵瑰簲绫诲瀷鐨勬寜閽嫋鑷虫澶勬坊鍔狅紝濡傞�夋嫨鎸夐挳绫诲瀷涓鸿〃鍗曘�佹柊鏍囩椤电瓑鍚湁閰嶇疆椤甸潰鐨勬寜閽紝鍙湪宸︿晶宸ュ叿鏍�-鎸夐挳-鍙厤缃寜閽锛岀偣鍑绘寜閽畬鎴愮浉鍏抽厤缃�傛敞锛氬綋璁剧疆鎸夐挳鏄剧ず浣嶇疆涓鸿〃鏍兼椂锛屾樉绀哄垪浼氬鍔犳搷浣滃垪銆�"> <Icon type="question-circle" /> @@ -2773,27 +2381,6 @@ deleteMenu={this.deleteElement} profileMenu={this.profileAction} placeholder={this.state.dict['header.form.action.placeholder']} - /> : null - } - </div> - {/* 鏄剧ず鍒� */} - <div className="column-list"> - <Tooltip placement="bottomLeft" overlayClassName="middle" title="鍦ㄥ乏渚у伐鍏锋爮銆婃樉绀哄垪銆嬩腑锛岄�夋嫨瀵瑰簲绫诲瀷鐨勬樉绀哄垪鎷栬嚦姝ゅ娣诲姞锛涙垨鐐瑰嚮銆婃坊鍔犳樉绀哄垪銆嬫寜閽壒閲忔坊鍔狅紝閫夋嫨鎵归噺娣诲姞鏃讹紝闇�鎻愬墠閫夋嫨浣跨敤琛ㄣ�傛敞锛氭坊鍔犲悎骞跺垪鏃讹紝闇�璁剧疆鍙�夊垪銆�"> - <Icon type="question-circle" /> - </Tooltip> - <Switch checkedChildren="寮�" unCheckedChildren="鍏�" defaultChecked={this.state.showColumnName} onChange={this.onColumnNameChange} /> - {!this.state.columnsloading ? - <DragElement - type="columns" - list={this.state.config.columns} - setting={this.state.config.setting} - gridBtn={this.state.config.gridBtn} - handleList={this.handleList} - handleMenu={this.handleColumn} - deleteMenu={this.deleteElement} - handleGridBtn={this.handleGridBtn} - showfield={this.state.showColumnName} - placeholder={this.state.dict['header.form.column.placeholder']} /> : null } </div> @@ -2848,29 +2435,6 @@ card={this.state.card} tabs={this.state.tabviews} formlist={this.state.formlist} - wrappedComponentRef={(inst) => this.formRef = inst} - /> : null - } - {this.state.formtemp === 'columns' && this.state.card.type !== 'colspan' ? - <ColumnForm - dict={this.state.dict} - card={this.state.card} - formlist={this.state.formlist} - wrappedComponentRef={(inst) => this.formRef = inst} - /> : null - } - {this.state.formtemp === 'columns' && this.state.card.type === 'colspan' ? - <ColspanForm - dict={this.state.dict} - card={this.state.card} - columns={this.state.config.columns} - wrappedComponentRef={(inst) => this.formRef = inst} - /> : null - } - {this.state.formtemp === 'gridbtn' ? - <GridBtnForm - dict={this.state.dict} - card={this.state.config.gridBtn} wrappedComponentRef={(inst) => this.formRef = inst} /> : null } -- Gitblit v1.8.0