| | |
| | | */ |
| | | cacheInterface (param) { |
| | | param.appkey = window.GLOB.appkey || '' |
| | | param.userid = param.userid || sessionStorage.getItem('UserID') || '' |
| | | param.LoginUID = param.LoginUID || sessionStorage.getItem('LoginUID') || '' |
| | | |
| | | let url = '/webapi/excache' |
| | | if (param.rduri && !window.GLOB.transfer) { |
| | |
| | | const CodeMirror = asyncComponent(() => import('@/templates/zshare/codemirror')) |
| | | const MKTable = asyncComponent(() => import('@/components/normalform/modalform/mkTable')) |
| | | const acTyOptions = { |
| | | pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'hoverTitle', 'hidden', 'preButton'], |
| | | prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hoverTitle', 'hidden', 'preButton'], |
| | | exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'hoverTitle', 'hidden', 'preButton'], |
| | | pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'hoverTitle', 'hidden', 'preButton', 'excache'], |
| | | prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'position', 'tipTitle', 'hoverTitle', 'hidden', 'preButton', 'excache'], |
| | | exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'hover', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'anchors', 'width', 'openmenu', 'refreshTab', 'hoverTitle', 'hidden', 'preButton', 'excache'], |
| | | excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'width', 'hidden', 'refreshTab'], |
| | | excelOut: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'hover', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'pagination', 'search', 'width', 'hidden', 'refreshTab'], |
| | | popview: ['label', 'Ot', 'OpenType', 'show', 'hover', 'icon', 'class', 'color', 'popClose', 'width', 'display', 'ratio', 'syncComponent', 'clickouter', 'maskStyle', 'closeButton', 'hidden'], |
| | |
| | | forbid: viewType === 'popview' |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'excache', |
| | | label: '清除缓存', |
| | | initVal: card.excache || 'false', |
| | | tooltip: '在使用后端脚本时,是否清除后端缓存,注:需在操作用户或权限时开启。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', text: '开启'}, |
| | | {value: 'false', text: '关闭'}, |
| | | ], |
| | | forbid: appType === 'mob' || appType === 'pc' |
| | | }, |
| | | { |
| | | type: 'splitLine', |
| | | key: 'title', |
| | | label: '表单', |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'excache', |
| | | label: '清除缓存', |
| | | initVal: card.excache || 'false', |
| | | tooltip: '在使用后端脚本时,是否清除后端缓存,注:需在操作用户或权限时开启。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', text: '开启'}, |
| | | {value: 'false', text: '关闭'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'execType', |
| | | label: '请求方式', |
| | | initVal: card.execType || 'multi', |
| | |
| | | BData = window.GLOB.CacheData.get(_config.$pageId) |
| | | } |
| | | |
| | | let BID = BData ? (BData.$BID || '') : '' |
| | | |
| | | if (_config.setting.interType === 'system') { |
| | | if (/@mk_year@/ig.test(_config.setting.dataresource) || /@mk_year@/ig.test(_config.setting.customScript)) { |
| | | _config.setting.$re_year = true |
| | |
| | | _config.action = [] |
| | | } |
| | | |
| | | if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | this.setState({ |
| | | BID: BData ? (BData.$BID || '') : '', |
| | | BID: BID, |
| | | BData: BData, |
| | | config: _config, |
| | | search: _config.$searches |
| | |
| | | if (_config.wrap.datatype === 'dynamic') { |
| | | _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true' |
| | | |
| | | if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) { |
| | | _data = window.GLOB.SyncData.get(_config.dataName) || [] |
| | | |
| | |
| | | |
| | | window.GLOB.SyncData.delete(_config.dataName) |
| | | } |
| | | } else if (_config.setting.supModule && !BID && _config.wrap.supKey !== 'false') { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | if (_config.wrap.zHeight) { |
| | |
| | | } |
| | | } |
| | | |
| | | if (_config.setting.supModule && !BID && _config.wrap.supKey !== 'false') { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | this.setState({ |
| | | pageSize: _config.setting.pageSize || 10, |
| | | pageOptions, |
| | |
| | | if (_config.wrap.datatype === 'dynamic') { |
| | | _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true' |
| | | |
| | | if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) { |
| | | _data = window.GLOB.SyncData.get(_config.dataName) || [] |
| | | |
| | |
| | | |
| | | window.GLOB.SyncData.delete(_config.dataName) |
| | | } |
| | | } else if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | let precards = [] |
| | |
| | | |
| | | window.GLOB.SyncData.delete(_config.dataName) |
| | | } |
| | | } else if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | if (_card.setting.click) { |
| | |
| | | if (_config.wrap.datatype === 'dynamic') { |
| | | _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true' |
| | | |
| | | if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) { |
| | | _data = window.GLOB.SyncData.get(_config.dataName) || [] |
| | | |
| | |
| | | |
| | | window.GLOB.SyncData.delete(_config.dataName) |
| | | } |
| | | } else if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | _config.plot.height = Utils.getHeight(_config.plot.height) |
| | |
| | | |
| | | window.GLOB.SyncData.delete(_config.dataName) |
| | | } |
| | | } else if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | |
| | | window.GLOB.SyncData.delete(_config.dataName) |
| | | } |
| | | } else if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | if (_config.subtype !== 'ratioboard') { |
| | |
| | | |
| | | window.GLOB.SyncData.delete(_config.dataName) |
| | | } |
| | | } else if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | |
| | | window.GLOB.SyncData.delete(_config.dataName) |
| | | } |
| | | } else if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | |
| | | window.GLOB.SyncData.delete(_config.dataName) |
| | | } |
| | | } else if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | if (_config.wrap.datatype !== 'static') { |
| | | _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true' |
| | | |
| | | if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) { |
| | | _data = window.GLOB.SyncData.get(_config.dataName) || [] |
| | | |
| | |
| | | if (_config.wrap.datatype === 'dynamic') { |
| | | _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true' |
| | | |
| | | if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) { |
| | | _data = window.GLOB.SyncData.get(_config.dataName) || [] |
| | | _config.setting.sync = 'false' |
| | |
| | | if (_config.wrap.datatype === 'dynamic') { |
| | | _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true' |
| | | |
| | | if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) { |
| | | _data = window.GLOB.SyncData.get(_config.dataName) || [] |
| | | _data = _data[0] || {$$empty: true} |
| | |
| | | if (_config.wrap.datatype === 'dynamic') { |
| | | _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true' |
| | | |
| | | if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) { |
| | | _data = window.GLOB.SyncData.get(_config.dataName) || [] |
| | | _data = _data[0] || {$$empty: true} |
| | |
| | | if (_config.wrap.datatype === 'dynamic') { |
| | | _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true' |
| | | |
| | | if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) { |
| | | _data = window.GLOB.SyncData.get(_config.dataName) || [] |
| | | _data = _data[0] || {$$empty: true} |
| | |
| | | if (_config.wrap.datatype === 'dynamic') { |
| | | _config.setting.onload = _config.setting.sync === 'true' ? 'false' : 'true' |
| | | |
| | | if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | if (_config.setting.sync === 'true' && window.GLOB.SyncData.has(_config.dataName)) { |
| | | _data = window.GLOB.SyncData.get(_config.dataName) || [] |
| | | _data = _data[0] || {$$empty: true} |
| | |
| | | setting.selected = 'false' |
| | | } |
| | | |
| | | if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | _config.style = _config.style || {} |
| | | |
| | | this.setState({ |
| | |
| | | _config.colsCtrls = null |
| | | } |
| | | |
| | | if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | this.setState({ |
| | | pageSize: setting.pageSize || 10, |
| | | BID: BID || '', |
| | |
| | | |
| | | window.GLOB.SyncData.delete(_config.dataName) |
| | | } |
| | | } else if (_config.setting.supModule && !BID && _config.wrap.supKey !== 'false') { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | if (_config.wrap.collapse === 'true') { |
| | |
| | | |
| | | window.GLOB.SyncData.delete(_config.dataName) |
| | | } |
| | | } else if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | _config.search = [] |
| | |
| | | |
| | | window.GLOB.SyncData.delete(_config.dataName) |
| | | } |
| | | } else if (_config.setting.supModule && !BID) { |
| | | _config.setting.onload = 'false' |
| | | } |
| | | |
| | | let lineActions = [] |
| | |
| | | submitloading: false |
| | | }, () => { |
| | | this.getSelectMenuList() |
| | | this.clearBackSqlCache() |
| | | }) |
| | | if (window.GLOB.mainSystemApi) { |
| | | Api.genericInterface(localParam).then(res => { |
| | |
| | | }) |
| | | } |
| | | |
| | | clearBackSqlCache = () => { |
| | | if (!window.backend) return |
| | | |
| | | Api.cacheInterface({}).then(res => { |
| | | if (!res.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: res.message || '缓存清空失败!', |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 提交已选的权限 |
| | | */ |
| | |
| | | clearBackCache = () => { |
| | | if (!window.GLOB.backend) return |
| | | |
| | | Api.cacheInterface({userid: sessionStorage.getItem('UserID') || '', LoginUID: sessionStorage.getItem('LoginUID') || ''}).then(res => { |
| | | Api.cacheInterface({}).then(res => { |
| | | if (!res.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | tabId = btn.refreshTab[btn.refreshTab.length - 1] |
| | | } |
| | | |
| | | if (btn.excache === 'true') { |
| | | this.clearBackSqlCache() |
| | | } |
| | | |
| | | if (tabId && btn.$MenuID === tabId) { // 刷新当前菜单时,停止其他操作 |
| | | MKEmitter.emit('reloadMenuView', tabId) |
| | | return |
| | |
| | | } |
| | | } |
| | | |
| | | clearBackSqlCache = () => { |
| | | if (!window.backend) return |
| | | |
| | | Api.cacheInterface({}).then(res => { |
| | | if (!res.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: res.message || '缓存清空失败!', |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | triggerNote = (res, ID) => { |
| | | const { btn } = this.props |
| | | |
| | |
| | | item.setting.$name = item.$menuname || '' |
| | | |
| | | let msg = getDataSource(item, mainSearch) |
| | | let roleId = config.uuid |
| | | if (item.wrap && item.wrap.permission === 'false') { |
| | | roleId = '' |
| | | } else if (item.setting.database === 'sso') { |
| | | roleId = '' |
| | | } |
| | | |
| | | sqls.push({uuid: item.uuid, roleId: item.wrap && item.wrap.permission === 'false' ? '' : config.uuid, type: 'datasource', ...msg}) |
| | | sqls.push({uuid: item.uuid, roleId: roleId, type: 'datasource', ...msg}) |
| | | } else if (item.setting && item.setting.useMSearch === 'true') { |
| | | let searches = item.search || [] |
| | | if (mainSearch.length > 0) { |
| | |
| | | roleId = '' |
| | | } else if (cell.hidden === 'true' || cell.permission === 'false') { |
| | | roleId = '' |
| | | } else if (cell.database === 'sso') { |
| | | roleId = '' |
| | | } |
| | | |
| | | if (['exec', 'prompt', 'pop', 'form', 'formSubmit'].includes(cell.OpenType)) { |