From fa76b73b7a1c9671a76c9821ed1a28e2f2b9e2b7 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 20 二月 2024 14:19:19 +0800 Subject: [PATCH] Merge branch 'positec' into dms --- src/tabviews/zshare/topSearch/index.jsx | 31 +++++++++++++++++++++++-------- 1 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx index c3cfc0b..4e6d329 100644 --- a/src/tabviews/zshare/topSearch/index.jsx +++ b/src/tabviews/zshare/topSearch/index.jsx @@ -22,6 +22,7 @@ const MKSelect = asyncComponent(() => import('./mkSelect')) const DateGroup = asyncComponent(() => import('./dategroup')) const MKDatePicker = asyncComponent(() => import('./mkDatePicker')) +const MKNumber = asyncComponent(() => import('./mkNumber')) class MainSearch extends Component { static propTpyes = { @@ -198,7 +199,7 @@ deForms.push({ ...item, arr_field: _option.field, - data_sql: Utils.formatOptions(_option.sql) + data_sql: Utils.formatOptions(_option.sql, window.GLOB.execType) }) } else { // 鍚堝苟璇锋眰锛屽尯鍒嗘湰鍦板強绯荤粺 if (item.database === 'sso') { @@ -305,7 +306,7 @@ deForms.push({ ...item, arr_field: item.arr_field, - data_sql: Utils.formatOptions(sql) + data_sql: Utils.formatOptions(sql, window.GLOB.execType) }) } else if (item.checkShift) { let d = '' @@ -408,9 +409,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) if (window.GLOB.mkHS) { // 浜戠鏁版嵁楠岃瘉 param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp) @@ -446,9 +451,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 @@ -501,8 +510,12 @@ param.BID = this.props.BID } + if (window.GLOB.execType === 'x') { + param.exec_type = 'x' + } + 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) if (item.database === 'sso' && window.GLOB.mainSystemApi) { param.rduri = window.GLOB.mainSystemApi @@ -700,6 +713,8 @@ content = <MKCheck config={item} onChange={(val) => this.recordChange(val, false, item)} /> } else if (item.type === 'switch') { content = <MKSwitch config={item} onChange={(val) => this.recordChange(val, false, item)} /> + } else if (item.type === 'range') { + content = <MKNumber config={item} onInputSubmit={this.handleSubmit} /> } if (content) { @@ -873,7 +888,7 @@ let searchlist = this.state.searchlist.map(item => { item.initval = item.oriInitval - if (setting.resetContrl === 'clear' && ['text', 'date', 'datemonth', 'dateweek', 'daterange'].includes(item.type)) { + if (setting.resetContrl === 'clear' && ['text', 'date', 'datemonth', 'dateweek', 'daterange', 'range'].includes(item.type)) { item.initval = '' } -- Gitblit v1.8.0