| | |
| | | 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: '', |
| | |
| | | |
| | | // 测试系统打印查询语句 |
| | | 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) |
| | |
| | | |
| | | this.state = { |
| | | value: props.defaultValue, |
| | | showValue: props.showValue, |
| | | visible: false |
| | | } |
| | | } |
| | |
| | | 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) => { |
| | |
| | | |
| | | 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) |
| | |
| | | } |
| | | |
| | | this.props.onChange(values, '') |
| | | this.setState({value: ''}) |
| | | this.setState({value: '', showValue: ''}) |
| | | |
| | | if (config.$ctrl) { |
| | | MKEmitter.emit('colBlur' + config.tableId, lineId, config.uuid) |
| | |
| | | |
| | | 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> |