From c18f79e01a2705d34d5ac2923a26913dba07ea14 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 03 八月 2024 16:04:18 +0800 Subject: [PATCH] 2024-08-03 --- src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx | 25 +++++++++++++++---------- 1 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx index 47eb46b..6493202 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/normalTable/mkPopSelect/index.jsx @@ -44,7 +44,7 @@ let param = { func: 'sPC_Get_TableData', obj_name: 'data', - exec_type: 'y', + exec_type: window.GLOB.execType || 'y', arr_field: config.arr_field, default_sql: 'true', custom_script: '', @@ -84,12 +84,12 @@ // 娴嬭瘯绯荤粺鎵撳嵃鏌ヨ璇彞 if (window.GLOB.debugger === true) { - console.info(`/*${config.label} 鏁版嵁婧�*/\n` + sql.replace(/\n\s{6}/ig, '\n')) - DateCount && console.info(`/*${config.label} 鎬绘暟鏌ヨ*/\n` + DateCount.replace(/\n\s{6}/ig, '\n')) + window.mkInfo(`/*${config.label} 鏁版嵁婧�*/\n` + sql.replace(/\n\s{6}/ig, '\n')) + DateCount && window.mkInfo(`/*${config.label} 鎬绘暟鏌ヨ*/\n` + DateCount.replace(/\n\s{6}/ig, '\n')) } - param.LText = Utils.formatOptions(sql) - param.DateCount = Utils.formatOptions(DateCount) + param.LText = Utils.formatOptions(sql, param.exec_type) + param.DateCount = Utils.formatOptions(DateCount, param.exec_type) param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') param.secretkey = Utils.encrypt('', param.timestamp) @@ -234,6 +234,7 @@ this.state = { value: props.defaultValue, + showValue: props.showValue, visible: false } } @@ -275,6 +276,10 @@ const { config, lineId } = this.props let values = {[config.field]: record.$$uuid} + let showValue = '' + if (config.showField) { + showValue = record[config.showField] || '' + } if (config.linkSubField) { config.linkSubField.forEach((m, i) => { @@ -284,7 +289,7 @@ this.props.onChange(values, record.$$uuid) - this.setState({visible: false, value: record.$$uuid}) + this.setState({visible: false, value: record.$$uuid, showValue}) if (config.$ctrl) { MKEmitter.emit('colBlur' + config.tableId, lineId, config.uuid) @@ -292,7 +297,7 @@ this.props.onBlur && this.props.onBlur() - if (config.enter === '$noAct') return + if (/\$noAct/.test(config.enter)) return setTimeout(() => { if (/\$next/.test(config.enter)) { @@ -329,7 +334,7 @@ } this.props.onChange(values, '') - this.setState({value: ''}) + this.setState({value: '', showValue: ''}) if (config.$ctrl) { MKEmitter.emit('colBlur' + config.tableId, lineId, config.uuid) @@ -350,12 +355,12 @@ render() { const { autoFocus, BID, lineId, config } = this.props - const { value, visible } = this.state + const { showValue, value, visible } = this.state return <> {autoFocus ? <div className="mk-pop-select-mask" onClick={this.trigger}></div> : null} <div className="mk-pop-select-wrap" onClick={this.trigger}> - {value} + {showValue || value} {value && !autoFocus ? <CloseCircleFilled onClick={this.clear} /> : null} <TableOutlined onClick={this.trigger}/> </div> -- Gitblit v1.8.0