| | |
| | | * @description 获取下级模块 |
| | | * @return {String} selfId 当前组件id |
| | | */ |
| | | static getSubModules (components, selfId) { |
| | | static getSubModules (components, selfId, supId) { |
| | | let modules = components.map(item => { |
| | | if (item.uuid === selfId) { |
| | | if (item.uuid === selfId || item.type === 'navbar') { |
| | | return { |
| | | children: null |
| | | } |
| | | } else if (item.format) { // 数据格式,存在数据源 |
| | | return { |
| | | value: item.uuid, |
| | | label: item.name |
| | | label: item.name, |
| | | disabled: supId === item.uuid |
| | | } |
| | | } else if (item.type === 'tabs') { |
| | | let _item = { |
| | |
| | | return col |
| | | }) |
| | | } |
| | | } else if (item.type === 'form') { |
| | | item.subcards = item.subcards.map(cell => { |
| | | cell.uuid = this.getuuid() |
| | | |
| | | cell.fields = cell.fields.map(m => { |
| | | m.uuid = this.getuuid() |
| | | |
| | | return m |
| | | }) |
| | | return cell |
| | | }) |
| | | } |
| | | |
| | | if (item.btnlog) { |
| | |
| | | */ |
| | | export function resetStyle (style) { |
| | | if (!style) return {} |
| | | if (sessionStorage.getItem('appType') === 'mob') { |
| | | let _style = JSON.stringify(style) |
| | | |
| | | let _style = JSON.stringify(style) |
| | | _style = _style.replace(/@mywebsite@\//ig, window.GLOB.baseurl) |
| | | |
| | | if (sessionStorage.getItem('appType') === 'mob') { |
| | | // scaleview |
| | | _style = _style.replace(/\d+vw/ig, (word) => { |
| | | return parseFloat(word) * (window.GLOB.winWidth || 420) / 100 + 'px' |
| | |
| | | return parseFloat(word) * (window.GLOB.winHeight || 738) / 100 + 'px' |
| | | // return parseFloat(word) * 615 / 100 + 'px' |
| | | }) |
| | | |
| | | return JSON.parse(_style) |
| | | } |
| | | return JSON.parse(JSON.stringify(style)) |
| | | |
| | | return JSON.parse(_style) |
| | | } |