From 07acb5f4dc11e484801ccfcd95eee8845128c62a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 26 十一月 2019 22:41:29 +0800 Subject: [PATCH] 2019-11-26-01 --- src/templates/comtableconfig/index.jsx | 91 ++++++++++++++++++++++++++++++++++++--------- 1 files changed, 72 insertions(+), 19 deletions(-) diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx index e9c705f..aa3fd6a 100644 --- a/src/templates/comtableconfig/index.jsx +++ b/src/templates/comtableconfig/index.jsx @@ -457,7 +457,10 @@ required: true, options: [{ MenuID: 'pop', - text: this.state.dict['header.form.pop'] + text: this.state.dict['header.form.popform'] + }, { + MenuID: 'popview', + text: this.state.dict['header.form.popview'] }, { MenuID: 'prompt', text: this.state.dict['header.form.prompt'] @@ -473,20 +476,6 @@ }, { MenuID: 'newpage', text: this.state.dict['header.form.newpage'] - }] - }, - { - type: 'select', - key: 'position', - label: this.state.dict['header.form.position'], - initVal: card.position || 'toolbar', - required: true, - options: [{ - MenuID: 'toolbar', - text: this.state.dict['header.form.toolbar'] - }, { - MenuID: 'grid', - text: this.state.dict['header.form.grid'] }] }, { @@ -523,6 +512,37 @@ }, { MenuID: 'requiredOnce', text: this.state.dict['header.form.requiredOnce'] + }] + }, + { + type: 'select', + key: 'position', + label: this.state.dict['header.form.position'], + initVal: card.position || 'toolbar', + required: true, + options: [{ + MenuID: 'toolbar', + text: this.state.dict['header.form.toolbar'] + }, { + MenuID: 'grid', + text: this.state.dict['header.form.grid'] + }] + }, + { + type: 'select', + key: 'execSuccess', + label: this.state.dict['header.form.execSuccess'], + initVal: card.execSuccess || 'never', + required: true, + options: [{ + MenuID: 'never', + text: this.state.dict['header.form.refresh.never'] + }, { + MenuID: 'grid', + text: this.state.dict['header.form.refresh.grid'] + }, { + MenuID: 'view', + text: this.state.dict['header.form.refresh.view'] }] }, { @@ -578,7 +598,24 @@ initVal: card.callbackFunc, required: false, readonly: false - } + }, + { + type: 'select', + key: 'execError', + label: this.state.dict['header.form.execError'], + initVal: card.execError || 'never', + required: true, + options: [{ + MenuID: 'never', + text: this.state.dict['header.form.refresh.never'] + }, { + MenuID: 'grid', + text: this.state.dict['header.form.refresh.grid'] + }, { + MenuID: 'view', + text: this.state.dict['header.form.refresh.view'] + }] + }, ] }) } @@ -993,7 +1030,7 @@ datetime: 'equal', date: 'equal' } - const datematch = { // 閫夋嫨date鏃跺尮閰嶈鍒� + const datematch = { // 閫夋嫨dateRange鏃跺尮閰嶈鍒� text: 'between', number: 'between', datetime: 'between', @@ -1022,6 +1059,9 @@ 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 @@ -1047,6 +1087,9 @@ _match = selectmatch[item.datatype] } else if (item.type === 'daterange') { _match = datematch[item.datatype] + } else { + item.type = 'text' + _match = textmatch[item.datatype] } let newcard = { @@ -1198,7 +1241,12 @@ this.settingRef.handleConfirm().then(res => { this.setState({ config: {...config, setting: res}, - settingVisible: false + settingVisible: false, + columnsloading: true + }, () => { + this.setState({ + columnsloading: false + }) }) }) } @@ -1270,7 +1318,10 @@ } render () { - const configAction = this.state.config.action.filter(_action => !_action.origin && (_action.OpenType === 'pop')) + const configAction = this.state.config.action.filter(_action => + !_action.origin && (_action.OpenType === 'pop' || _action.OpenType === 'popview' || _action.OpenType === 'blank' || _action.OpenType === 'tab') + ) + return ( <div className="common-table-board"> <DndProvider backend={HTML5Backend}> @@ -1392,6 +1443,7 @@ {!this.state.columnsloading ? <DragElement list={this.state.config.columns} + setting={this.state.config.setting} type="columns" placeholder={this.state.dict['header.form.column.placeholder']} handleList={this.handleList} @@ -1478,6 +1530,7 @@ > <SettingForm data={this.state.config.setting} + columns={this.state.config.columns} dict={this.state.dict} wrappedComponentRef={(inst) => this.settingRef = inst} /> -- Gitblit v1.8.0