| | |
| | | defaultscript = `update ${config.setting.tableName || ''} set idefine5= idefine5+1 ,modifydate=getdate(),cdefine5='已导出',modifyuserid=@userid@ ${search}` |
| | | } |
| | | |
| | | let search = [] |
| | | let appType = sessionStorage.getItem('appType') |
| | | let searches = [] |
| | | |
| | | if (config.setting && config.setting.useMSearch === 'true' && window.GLOB.customMenu) { |
| | | if (appType === 'mob') { |
| | | let menu = fromJS(window.GLOB.customMenu).toJS() |
| | | let _search = null |
| | | let filterComponent = (box) => { |
| | | box.components.forEach(item => { |
| | | if (_search) return |
| | | let ms = null |
| | | let search = [] |
| | | menu.components.forEach(item => { |
| | | if (item.type === 'topbar' && item.wrap.type !== 'navbar' && item.search) { |
| | | ms = item.search |
| | | } else if (item.type === 'search' && item.wrap.field) { |
| | | search.push({ |
| | | type: 'text', |
| | | label: item.wrap.label, |
| | | field: item.wrap.field, |
| | | match: item.wrap.match, |
| | | required: item.wrap.required, |
| | | value: item.wrap.initval || '' |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | if (ms) { |
| | | if (ms.setting.type === 'search') { |
| | | search.push({ |
| | | type: 'text', |
| | | label: '搜索栏', |
| | | field: ms.setting.field, |
| | | match: ms.setting.match, |
| | | required: ms.setting.required, |
| | | value: ms.setting.initval || '' |
| | | }) |
| | | } |
| | | ms.fields.forEach(item => { |
| | | if (item.type === 'range') { |
| | | item.initval = `${item.minValue},${item.maxValue}` |
| | | } |
| | | search.push(item) |
| | | }) |
| | | |
| | | ms.groups.forEach(group => { |
| | | if (group.setting.type === 'search') { |
| | | search.push({ |
| | | type: 'text', |
| | | label: group.wrap.name, |
| | | field: group.setting.field, |
| | | match: group.setting.match, |
| | | required: group.setting.required, |
| | | value: group.setting.initval || '' |
| | | }) |
| | | } |
| | | |
| | | group.fields.forEach(item => { |
| | | if (item.type === 'range') { |
| | | item.initval = `${item.minValue},${item.maxValue}` |
| | | } |
| | | search.push(item) |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | searches = search |
| | | } else { |
| | | let search = [] |
| | | |
| | | if (item.type === 'search') { |
| | | box.slist = [...box.slist, item.search] |
| | | } else if (item.uuid === config.uuid) { |
| | | _search = box.slist.pop() |
| | | } else if (item.type === 'group') { |
| | | item.components.forEach(m => { |
| | | if (m.uuid !== config.uuid) return |
| | | if (config.setting && config.setting.useMSearch === 'true' && window.GLOB.customMenu) { |
| | | let menu = fromJS(window.GLOB.customMenu).toJS() |
| | | let _search = null |
| | | let filterComponent = (box) => { |
| | | box.components.forEach(item => { |
| | | if (_search) return |
| | | |
| | | if (item.type === 'search') { |
| | | box.slist = [...box.slist, item.search] |
| | | } else if (item.uuid === config.uuid) { |
| | | _search = box.slist.pop() |
| | | }) |
| | | } else if (item.type === 'tabs') { |
| | | item.subtabs.forEach(tab => { |
| | | tab.slist = [...box.slist] |
| | | filterComponent(tab) |
| | | }) |
| | | } else if (item.type === 'group') { |
| | | item.components.forEach(m => { |
| | | if (m.uuid !== config.uuid) return |
| | | _search = box.slist.pop() |
| | | }) |
| | | } else if (item.type === 'tabs') { |
| | | item.subtabs.forEach(tab => { |
| | | tab.slist = [...box.slist] |
| | | filterComponent(tab) |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | menu.slist = [] |
| | | filterComponent(menu) |
| | | |
| | | if (_search) { |
| | | search = _search |
| | | } else { |
| | | menu.components.forEach(item => { |
| | | if (item.type !== 'search') return |
| | | search = item.search |
| | | }) |
| | | } |
| | | } |
| | | |
| | | searches = fromJS(config.search || []).toJS() |
| | | |
| | | if (search.length > 0) { |
| | | let keys = searches.map(item => (item.field ? item.field.toLowerCase() : '')) |
| | | search.forEach(item => { |
| | | if (item.field && !keys.includes(item.field.toLowerCase())) { |
| | | searches.push(item) |
| | | } |
| | | }) |
| | | } |
| | | menu.slist = [] |
| | | filterComponent(menu) |
| | | |
| | | if (_search) { |
| | | search = _search |
| | | } else { |
| | | menu.components.forEach(item => { |
| | | if (item.type !== 'search') return |
| | | search = item.search |
| | | }) |
| | | } |
| | | } |
| | | |
| | | let searches = fromJS(config.search || []).toJS() |
| | | |
| | | if (search.length > 0) { |
| | | let keys = searches.map(item => (item.field ? item.field.toLowerCase() : '')) |
| | | search.forEach(item => { |
| | | if (item.field && !keys.includes(item.field.toLowerCase())) { |
| | | searches.push(item) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`) |
| | | |
| | | param.LText = param.LText.replace(/\n/g, ' ') |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.secretkey = Utils.encrypt('', param.timestamp) |
| | | |