Merge branch 'master' into positec
| | |
| | | if (_vals.length === new Set(_vals).size) { |
| | | m.hidden = true |
| | | } |
| | | } else if (!p.values.includes(_val)) { |
| | | } else if (p.values && !p.values.includes(_val)) { |
| | | m.hidden = true |
| | | } |
| | | }) |
| | |
| | | required: false, |
| | | linkField: 'datatype', |
| | | options: [ |
| | | {ParentID: '', value: 'static', label: '静态值'}, |
| | | {ParentID: 'dynamic', value: 'dynamic', label: '动态值'}, |
| | | {ParentID: 'dynamic', value: 'joint', label: '拼接值'}, |
| | | {ParentID: 'public', value: 'dynamic', label: '动态值'}, |
| | | {ParentID: '', value: 'static', label: '静态值'}, |
| | | {ParentID: 'dynamic', value: 'joint', label: '拼接值'}, |
| | | {ParentID: 'public', value: 'joint', label: '拼接值'}, |
| | | ], |
| | | forbid: subtype !== 'propcard' |
| | |
| | | type: 'select', |
| | | field: 'selStyle', |
| | | label: '选中风格', |
| | | initval: wrap.selStyle || 'active', |
| | | initval: wrap.selStyle || 'none', |
| | | tooltip: '存在边框时,边框会使用系统色。', |
| | | required: false, |
| | | options: [ |
| | |
| | | name: card.name, |
| | | subtype: card.subtype, |
| | | setting: { interType: 'system' }, |
| | | wrap: { name: card.name, width: card.width || 24, title: '', datatype: 'static' }, |
| | | wrap: { name: card.name, width: card.width || 24, title: '', datatype: 'static', cardType: 'radio' }, |
| | | style: { marginLeft: '0px', marginRight: '0px', marginTop: '8px', marginBottom: '8px' }, |
| | | headerStyle: { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' }, |
| | | columns: [], |
| | |
| | | _fieldval.color = 'primary' |
| | | } |
| | | } |
| | | this.record.resetPageIndex = 'false' |
| | | if ([this.record.execSuccess, this.record.execError].includes('grid')) { |
| | | _fieldval.resetPageIndex = 'false' |
| | | } |
| | | } else if (value === 'audit') { |
| | | _fieldval.label = '审核' |
| | | _fieldval.Ot = 'required' |
| | |
| | | } else { |
| | | _fieldval.color = 'danger' |
| | | } |
| | | this.record.resetPageIndex = 'true' |
| | | if ([this.record.execSuccess, this.record.execError].includes('grid')) { |
| | | _fieldval.resetPageIndex = 'true' |
| | | } |
| | | } else if (value === 'custom') { |
| | | _fieldval.Ot = 'required' |
| | | } |
| | |
| | | field: 'selected', |
| | | label: '数据选中', |
| | | initval: wrap.selected || 'false', |
| | | tooltip: '初始化:数据加载时选中首行数据,仅执行一次。数据加载:每次数据加载时均选中首行(当按钮执行完成并返回主键值时,默认选中主键值对应行)。选中标记:返回数据中存在 selected 字段,且值为 true 的数据被选中。注:启用无人值守时无效。', |
| | | tooltip: '初始化:数据加载时选中首行数据,仅执行一次。数据加载:每次数据加载时均选中首行(当按钮执行完成并返回主键值时,默认选中主键值对应行)。选中标记:返回数据中存在 selected 字段,且值为 true 的数据被选中。本地记录:数据刷新时上次被选中的行将自动选中。注:启用无人值守时无效。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'false', label: '无'}, |
| | | {value: 'init', label: '初始化'}, |
| | | {value: 'always', label: '数据加载'}, |
| | | {value: 'sign', label: '选中标记'} |
| | | {value: 'sign', label: '选中标记'}, |
| | | {value: 'local', label: '本地记录'}, |
| | | ], |
| | | }, |
| | | { |
| | |
| | | |
| | | if (_card.mergeCol) { |
| | | let col = _card.cols[_card.mergeCol[0]] |
| | | _card.cols.splice(_card.mergeCol[0], 1, ...col.pops) |
| | | if (col.pops) { |
| | | _card.cols.splice(_card.mergeCol[0], 1, ...col.pops) |
| | | } |
| | | } |
| | | |
| | | if (_card.wrap.commit === 'simple') { |
| | |
| | | field: 'selected', |
| | | label: '数据选中', |
| | | initval: wrap.selected || 'false', |
| | | tooltip: '初始化:数据加载时选中首行数据,仅执行一次。数据加载:每次数据加载时均选中首行(当按钮执行完成并返回主键值时,默认选中主键值对应行)。选中标记:返回数据中存在 selected 字段,且值为 true 的数据被选中。', |
| | | tooltip: '初始化:数据加载时选中首行数据,仅执行一次。数据加载:每次数据加载时均选中首行(当按钮执行完成并返回主键值时,默认选中主键值对应行)。选中标记:返回数据中存在 selected 字段,且值为 true 的数据被选中。本地记录:数据刷新时上次被选中的行将自动选中。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'false', label: '无'}, |
| | | {value: 'init', label: '初始化'}, |
| | | {value: 'always', label: '数据加载'}, |
| | | {value: 'sign', label: '选中标记'} |
| | | {value: 'sign', label: '选中标记'}, |
| | | {value: 'local', label: '本地记录'}, |
| | | ], |
| | | }, |
| | | { |
| | |
| | | this.props.refreshdata({pageIndex}) |
| | | } |
| | | |
| | | mkCheckTopLine = (menuId, id, selected) => { |
| | | mkCheckTopLine = (menuId, id, selected, orikeys) => { |
| | | const { MenuID, data, setting } = this.props |
| | | |
| | | if (MenuID !== menuId) return |
| | |
| | | index = i |
| | | } |
| | | }) |
| | | } else if (selected === 'local') { |
| | | if (orikeys && orikeys.length) { |
| | | data.forEach((item, i) => { |
| | | if (!item.$disabled && orikeys.includes(item.$$uuid)) { |
| | | items.push(item) |
| | | keys.push(i) |
| | | index = i |
| | | } |
| | | }) |
| | | } |
| | | } else if (selected !== 'false') { |
| | | if (!data[0].$disabled) { |
| | | index = 0 |
| | |
| | | |
| | | let setting = {..._config.setting, ..._config.wrap} |
| | | |
| | | if (setting.selected !== 'always' && setting.selected !== 'init' && setting.selected !== 'sign') { |
| | | if (!['always', 'init', 'sign', 'local'].includes(setting.selected)) { |
| | | setting.selected = 'false' |
| | | } |
| | | |
| | |
| | | if (result.status) { |
| | | if (result.$requestId && this.requestId !== result.$requestId) return |
| | | |
| | | if (repage === 'false' && result.data.length === 0 && pageIndex > 1) { |
| | | if (result.data.length === 0 && pageIndex > 1) { |
| | | this.reloadIndex() |
| | | return |
| | | } |
| | |
| | | } |
| | | |
| | | if (data.length && (id || setting.selected !== 'false')) { |
| | | let keys = null |
| | | if (setting.selected === 'local') { |
| | | keys = this.state.selectedData.map(cell => cell.$$uuid) |
| | | } |
| | | setTimeout(() => { |
| | | MKEmitter.emit('mkCheckTopLine', config.uuid, id, setting.selected) |
| | | MKEmitter.emit('mkCheckTopLine', config.uuid, id, setting.selected, keys) |
| | | }, 200) |
| | | } else { |
| | | MKEmitter.emit('resetSelectLine', config.uuid, '', '') // 广播数据切换 |
| | |
| | | |
| | | let setting = {..._config.setting, ..._config.wrap} |
| | | |
| | | if (setting.selected !== 'always' && setting.selected !== 'init' && setting.selected !== 'sign') { |
| | | if (!['always', 'init', 'sign', 'local'].includes(setting.selected)) { |
| | | setting.selected = 'false' |
| | | } |
| | | |
| | |
| | | Api.writeCacheConfig(config.uuid, result.data || [], BID) |
| | | } |
| | | |
| | | if (repage === 'false' && result.data.length === 0 && pageIndex > 1) { |
| | | if (result.data.length === 0 && pageIndex > 1) { |
| | | this.reloadIndex() |
| | | return |
| | | } |
| | |
| | | } |
| | | |
| | | if (data.length && (id || setting.selected !== 'false')) { |
| | | let keys = null |
| | | if (setting.selected === 'local') { |
| | | keys = this.state.selectedData.map(cell => cell.$$uuid) |
| | | } |
| | | setTimeout(() => { |
| | | MKEmitter.emit('mkCheckTopLine', config.uuid, id, setting.selected) |
| | | MKEmitter.emit('mkCheckTopLine', config.uuid, id, setting.selected, keys) |
| | | }, 200) |
| | | } else { |
| | | MKEmitter.emit('resetSelectLine', config.uuid, '', '') // 广播数据切换 |