| | |
| | | }) |
| | | } |
| | | |
| | | let closetab = [] |
| | | if (!appType && viewType !== 'popview') { |
| | | closetab = [{ |
| | | value: 'closetab', |
| | | text: '关闭标签' |
| | | }] |
| | | } |
| | | |
| | | let resets = [] |
| | | fields.forEach(item => { |
| | | if (item.hidden === 'true') return |
| | | if (item.type !== 'text' && item.type !== 'number') return |
| | | |
| | | resets.push({ |
| | | value: item.uuid, |
| | | text: item.label |
| | | }) |
| | | if (item.label !== item.field) { |
| | | resets.push({ |
| | | value: item.field, |
| | | text: item.label + ' (' + item.field + ')' |
| | | }) |
| | | } else { |
| | | resets.push({ |
| | | value: item.field, |
| | | text: item.label |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | if (card.resetForm && resets.findIndex(item => item.value === card.resetForm) === -1) { |
| | | card.resetForm = '' |
| | | } |
| | | |
| | | return [ |
| | | { |
| | |
| | | initVal: card.innerFunc || '', |
| | | tooltip: functip, |
| | | fields: usefulFields, |
| | | tooltipClass: 'middle', |
| | | toolWidth: 350, |
| | | required: true, |
| | | readonly: false |
| | | }, |
| | |
| | | }, { |
| | | value: 'mainline', |
| | | text: '刷新上级组件 - 行' |
| | | }, ...refresh] |
| | | }, { |
| | | value: 'maingrid', |
| | | text: '刷新上级组件' |
| | | }, ...closetab, ...refresh] |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | key: 'refreshTab', |
| | | label: '刷新菜单', |
| | | initVal: card.refreshTab || [], |
| | | tooltip: '执行成功后(或功能按钮中标签关闭类型),需要同步刷新的菜单', |
| | | required: false, |
| | | forbid: appType === 'pc' || appType === 'mob' || viewType === 'popview', |
| | | options: menulist |
| | | }, |
| | | { |
| | | type: (appType === 'pc' || appType === 'mob') ? 'select' : 'cascader', |
| | |
| | | options: modules |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'syncDelay', |
| | | label: '刷新延迟', |
| | | initVal: card.syncDelay, |
| | | tooltip: '同步刷新组件的延迟时间,单位毫秒。', |
| | | // placeholder: '单位毫秒', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | key: 'anchors', |
| | | label: '跳转锚点', |
| | |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'resetForm', |
| | | key: 'resetForms', |
| | | label: '重置表单', |
| | | tooltip: '按钮执行成功后需要重置的表单,表单会恢复默认值并聚焦。', |
| | | initVal: card.resetForm || '', |
| | | initVal: card.resetForms || [], |
| | | required: false, |
| | | allowClear: true, |
| | | mode: 'multiple', |
| | | options: resets |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'returnValue', |
| | | label: '更新表单', |
| | | initVal: card.returnValue || 'false', |
| | | tooltip: '与重置表单配合使用,开启时,必须在自定义脚本中返回数据,用于替换字段集和填充表单。', |
| | | options: [{ |
| | | value: 'false', |
| | | text: '禁用' |
| | | }, { |
| | | value: 'true', |
| | | text: '启用' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | value: 'true', |
| | | text: '刷新' |
| | | }] |
| | | }, |
| | | } |
| | | ] |
| | | } |