| | |
| | | * @return {String} item 组件信息 |
| | | */ |
| | | static resetComponentConfig = (item, appType, commonId) => { |
| | | if (item.type === 'navbar') { |
| | | return item |
| | | } |
| | | |
| | | if (item.subtype === 'tablecard') { // 兼容 |
| | | item.type = 'card' |
| | | } |
| | |
| | | item.name = item.setting.name |
| | | } |
| | | |
| | | if (item.type === 'menubar') { |
| | | if (item.columns) { |
| | | item.columns = item.columns.map(cell => { |
| | | cell.uuid = this.getuuid() |
| | | return cell |
| | | }) |
| | | } |
| | | |
| | | if (item.type === 'navbar') { |
| | | if (appType === 'mob') { |
| | | item.menus.forEach(menu => { |
| | | menu.MenuID = this.getuuid() |
| | | }) |
| | | item.wrap.MenuNo = item.wrap.MenuNo + sign |
| | | } |
| | | return item |
| | | } else if (item.type === 'menubar') { |
| | | item.subMenus = item.subMenus.map(cell => { |
| | | cell.uuid = this.getuuid() |
| | | return cell |
| | |
| | | } |
| | | } else if (item.search) { |
| | | item.search = item.search.map(cell => { |
| | | cell.uuid = this.getuuid() |
| | | return cell |
| | | }) |
| | | } |
| | | if (item.columns) { |
| | | item.columns = item.columns.map(cell => { |
| | | cell.uuid = this.getuuid() |
| | | return cell |
| | | }) |
| | |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } else if (/\sdecimal\(8,/ig.test(sql)) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: `不可使用 decimal(8`, |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } else if (type === 'customscript' && /\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig.test(sql)) { |
| | | let list = sql.match(/\son\s+[a-z0-9_]+\.[a-z0-9_]+\s*=\s*[a-z0-9_]+\.[a-z0-9_]+/ig) |
| | | let errors = [] |