From c0e017668d780c40f85230f227ea0160b5d22d4d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 20 二月 2024 14:13:00 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/tabviews/custom/components/table/edit-table/normalTable/index.jsx | 45 +++++++++++++++++++++++++++++++++++++-------- 1 files changed, 37 insertions(+), 8 deletions(-) diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx index 57dba86..ee270d7 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx @@ -752,6 +752,10 @@ } else if (content === config.closeVal) { content = config.closeText } + } else if (col.editType === 'popSelect') { + if (col.showField) { + content = record[col.showField] || content + } } if (content !== '') { @@ -809,8 +813,13 @@ <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"> @@ -1056,8 +1065,13 @@ <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 = ( @@ -1077,6 +1091,10 @@ content = config.openText } else if (content === config.closeVal) { content = config.closeText + } + } else if (col.editType === 'popSelect') { + if (col.showField) { + content = record[col.showField] || content } } @@ -1682,6 +1700,9 @@ 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 @@ -1870,9 +1891,13 @@ } 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 => { @@ -1901,9 +1926,13 @@ } 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 @@ -2328,8 +2357,8 @@ 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) -- Gitblit v1.8.0