| | |
| | | loading: true |
| | | }) |
| | | |
| | | let param = { |
| | | let param = null |
| | | if (window.backend && window.GLOB.CacheData.has('sql_' + config.uuid)) { |
| | | let ex = window.GLOB.CacheData.get('sql_' + config.uuid) |
| | | let sysvals = { |
| | | time_id: Utils.getguid(), |
| | | mk_departmentcode: sessionStorage.getItem('departmentcode') || '', |
| | | mk_organization: sessionStorage.getItem('organization') || '', |
| | | mk_user_type: sessionStorage.getItem('mk_user_type') || '', |
| | | id: ID || '', |
| | | bid: BID || '', |
| | | datam: sessionStorage.getItem('dataM') === 'true' ? 'Y' : '', |
| | | datam_begin: sessionStorage.getItem('dataM') === 'true' ? 'Y' : '', |
| | | datam_end: sessionStorage.getItem('dataM') === 'true' ? 'Y' : '', |
| | | orderby: orderBy || config.order || '', |
| | | pagesize: config.laypage === 'true' ? pageSize : '9999', |
| | | pageindex: pageIndex |
| | | } |
| | | if (window.GLOB.externalDatabase !== null) { |
| | | sysvals.db = window.GLOB.externalDatabase |
| | | } |
| | | |
| | | let exps = [] |
| | | |
| | | if (config.searchKey) { |
| | | if (!searchKey) { |
| | | exps.push({ |
| | | key: 'mk_search', |
| | | value: [] |
| | | }) |
| | | } else { |
| | | exps.push({ |
| | | key: 'mk_search', |
| | | value: [{ |
| | | key: config.searchKey, |
| | | match: '01', |
| | | type: /,/.test(config.searchKey) ? 'text_or' : 'text', |
| | | value: searchKey |
| | | }] |
| | | }) |
| | | } |
| | | config.searchKey.split(',').forEach(key => { |
| | | sysvals[key.toLowerCase()] = searchKey || '' |
| | | }) |
| | | } |
| | | |
| | | ex.reps.forEach(n => { |
| | | let key = n.toLowerCase() |
| | | if (sysvals.hasOwnProperty(key)) { |
| | | exps.push({ |
| | | key: n, |
| | | value: sysvals[key] |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | param = { |
| | | $backend: true, |
| | | data: [{ |
| | | id: ex.id, |
| | | exps: exps, |
| | | menuname: '', |
| | | md5_id: '' |
| | | }] |
| | | } |
| | | } else { |
| | | param = { |
| | | func: 'sPC_Get_TableData', |
| | | obj_name: 'data', |
| | | exec_type: window.GLOB.execType || 'y', |
| | |
| | | |
| | | param.username = sessionStorage.getItem('User_Name') || '' |
| | | param.fullname = sessionStorage.getItem('Full_Name') || '' |
| | | } |
| | | |
| | | Api.getSystemCacheConfig(param, config.cache === 'true').then(result => { |
| | | if (result.status) { |