| | |
| | | }) |
| | | |
| | | _config.subcards = null |
| | | |
| | | if (!_config.wrap.cardType) { |
| | | _config.wrap.selStyle = 'none' |
| | | _config.wrap.selected = 'false' |
| | | _config.wrap.pickup = 'false' |
| | | } |
| | | |
| | | let selected = 'false' |
| | | if (_config.wrap.selected === 'always' || _config.wrap.selected === 'init' || _config.wrap.selected === 'sign') { |
| | |
| | | _config.wrap.selected = 'false' |
| | | } |
| | | |
| | | _config.wrap.selStyle = _config.wrap.selStyle || 'active' |
| | | _config.wrap.selStyle = _config.wrap.selStyle || 'check' |
| | | _config.wrap.pagestyle = _config.wrap.pagestyle || 'page' |
| | | |
| | | _config.wrap.wrapClass = `${_config.wrap.selStyle} ${_config.wrap.cardType || ''}` |
| | | _config.wrap.wrapClass = `${_config.wrap.selStyle} ${_config.wrap.cardType || ''} ${config.wrap.empSign === 'hidden' ? 'mk-empty-hide' : ''}` |
| | | |
| | | if (_config.wrap.zHeight || _config.wrap.minWidth) { |
| | | _config.wrap.zoomStyle = { |
| | |
| | | }) |
| | | } |
| | | |
| | | _config.setting.sub_field = subconfig.columns.map(col => col.field).join(',') |
| | | _config.setting.all_field = _config.setting.arr_field + ',' + _config.setting.sub_field |
| | | if (_config.setting.subdata !== 'sub_data_string') { |
| | | _config.setting.sub_field = subconfig.columns.map(col => col.field).join(',') |
| | | _config.setting.all_field = _config.setting.arr_field + ',' + _config.setting.sub_field |
| | | } |
| | | |
| | | let pageOptions = ['10', '25', '50', '100', '500', '1000'] |
| | | |
| | |
| | | |
| | | delete item[config.setting.subdata] |
| | | |
| | | if (config.setting.subdata === 'sub_data_string') { |
| | | _children = this.parseSubData(_children) |
| | | } |
| | | |
| | | _children.forEach((cell, i) => { |
| | | cell.key = i |
| | | cell.$$uuid = cell[config.setting.subKey] || '' |
| | |
| | | this.loadData() |
| | | }, config.setting.delay || 0) |
| | | } |
| | | } |
| | | |
| | | parseSubData = (data) => { |
| | | try { |
| | | data = JSON.parse(data) |
| | | if (typeof(data) !== 'object') { |
| | | data = [] |
| | | } else if (!Array.isArray(data)) { |
| | | data = [data] |
| | | } |
| | | } catch(e) { |
| | | console.warn('Data parsing error.') |
| | | data = [] |
| | | } |
| | | return data |
| | | } |
| | | |
| | | autoExec = (times) => { |
| | |
| | | let _children = item[config.setting.subdata] |
| | | |
| | | delete item[config.setting.subdata] |
| | | |
| | | if (config.setting.subdata === 'sub_data_string') { |
| | | _children = this.parseSubData(_children) |
| | | } |
| | | |
| | | _children.forEach((cell, i) => { |
| | | cell.key = i |
| | |
| | | let _children = item[config.setting.subdata] |
| | | |
| | | delete item[config.setting.subdata] |
| | | |
| | | if (config.setting.subdata === 'sub_data_string') { |
| | | _children = this.parseSubData(_children) |
| | | } |
| | | |
| | | _children.forEach((cell, i) => { |
| | | cell.key = i |
| | |
| | | |
| | | delete _data[config.setting.subdata] |
| | | |
| | | if (config.setting.subdata === 'sub_data_string') { |
| | | _children = this.parseSubData(_children) |
| | | } |
| | | |
| | | _children.forEach((cell, i) => { |
| | | cell.key = i |
| | | cell.$$uuid = cell[config.setting.subKey] || '' |