| | |
| | | ] |
| | | |
| | | let getTabs = (list) => { |
| | | return list.filter(item => { |
| | | if (item.type !== 'tabs') return false |
| | | let _list = [] |
| | | list.forEach(item => { |
| | | if (item.type !== 'tabs') return |
| | | |
| | | item.children = item.children.map(cell => { |
| | | cell.children = getTabs(cell.children) |
| | | return cell |
| | | _list.push({ |
| | | value: item.uuid, |
| | | label: item.name, |
| | | children: item.subtabs.map(cell => { |
| | | let children = getTabs(cell.components) |
| | | |
| | | if (children.length === 0) { |
| | | children = null |
| | | } |
| | | return { |
| | | value: cell.uuid, |
| | | label: cell.label, |
| | | children: children |
| | | } |
| | | }) |
| | | }) |
| | | return item |
| | | }) |
| | | return _list |
| | | } |
| | | |
| | | // if (type === 'editable') { |
| | |
| | | // } |
| | | // ] |
| | | // } |
| | | |
| | | let tabs = getTabs(JSON.parse(JSON.stringify(modules))) |
| | | let tabs = getTabs(JSON.parse(JSON.stringify(window.GLOB.customMenu.components))) |
| | | |
| | | let pageTemps = [ |
| | | { value: 'billprint', text: '单据打印' }, |
| | | { value: 'pay', text: Formdict['model.pay'] }, |
| | | { value: 'custom', text: Formdict['header.form.custom'] } |
| | | { value: 'pay', text: '支付' }, |
| | | { value: 'custom', text: '自定义' } |
| | | ] |
| | | const isApp = ['pc', 'mob'].includes(appType) |
| | | |
| | | let funTypes = [ |
| | | { value: 'changeuser', text: '切换用户' }, |
| | | { value: 'print', text: '标签打印' }, |
| | | { value: 'refund', text: '退款' }, |
| | | { value: 'closetab', text: '标签关闭' }, |
| | | { value: 'changeuser', text: '切换用户' }, |
| | | { value: 'megvii', text: '旷视面板机' }, |
| | | { value: 'filezip', text: '文件压缩包' }, |
| | | ] |
| | | |
| | | if (isApp) { |
| | |
| | | funTypes = [ |
| | | { value: 'scan', text: '扫码' }, |
| | | { value: 'pay', text: '支付' }, |
| | | { value: 'logout', text: '退出' }, |
| | | { value: 'refund', text: '退款' }, |
| | | { value: 'resetPwd', text: '修改密码'}, |
| | | { value: 'mkBinding', text: '开通扫码登录' }, |
| | | { value: 'mkUnBinding', text: '用户解绑' }, |
| | | { value: 'mkUnsubscribe', text: '注销账户' }, |
| | | { value: 'reAuth', text: '切换系统(清空缓存-小程序)' }, |
| | | { value: 'copyurl', text: '复制链接地址' }, |
| | | { value: 'logout', text: '退出' }, |
| | | { value: 'goBack', text: '返回' }, |
| | | ] |
| | | pageTemps = [ |
| | |
| | | } else if (appType === 'pc') { |
| | | opentypes = opentypes.filter(item => item.value !== 'tab') |
| | | funTypes = [ |
| | | { value: 'refund', text: '退款' }, |
| | | { value: 'changeuser', text: '切换用户' }, |
| | | ] |
| | | pageTemps = [ |
| | |
| | | options: opentypes |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'label', |
| | | label: '按钮名称', |
| | | initVal: card.label, |
| | | required: true, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'funcType', |
| | | label: '功能类型', |
| | |
| | | options: [] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'label', |
| | | label: '按钮名称', |
| | | initVal: card.label, |
| | | required: true, |
| | | }, |
| | | { |
| | | type: 'checkbox', |
| | | key: 'payType', |
| | | label: '支付方式', |
| | |
| | | type: 'radio', |
| | | key: 'procMode', |
| | | label: '参数处理', |
| | | initVal: card.procMode || 'system', |
| | | initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'), |
| | | required: true, |
| | | options: [{ |
| | | value: 'system', |
| | |
| | | }, { |
| | | value: 'inner', |
| | | text: '内部函数' |
| | | }, { |
| | | value: 'none', |
| | | text: '无' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | tooltip: functip, |
| | | fields: usefulFields, |
| | | required: false, |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'urlkey', |
| | | label: '地址字段', |
| | | initVal: card.urlkey || '', |
| | | tooltip: '图片(文件)链接的字段名。', |
| | | required: false, |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | type: 'radio', |
| | | key: 'callbackType', |
| | | label: '回调方式', |
| | | initVal: card.callbackType || 'script', |
| | | initVal: card.callbackType || (card.callbackFunc ? 'func' : 'none'), |
| | | tooltip: '使用后台脚本执行时,需要配合计划任务。', |
| | | required: true, |
| | | options: [{ |
| | |
| | | }, { |
| | | value: 'default', |
| | | text: '后台脚本' |
| | | }, { |
| | | value: 'func', |
| | | text: '回调函数' |
| | | }, { |
| | | value: 'none', |
| | | text: '无' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | key: 'callbackFunc', |
| | | label: Formdict['header.form.callbackFunc'], |
| | | initVal: card.callbackFunc || '', |
| | | required: false, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | key: 'syncComponent', |
| | | label: '刷新组件', |
| | | initVal: card.syncComponent || [], |
| | | tooltip: '执行成功后(或弹窗标签关闭时),需要同步刷新的组件。注:选择当前组件的上级组件无效。', |
| | | tooltip: '执行成功后(或弹窗标签关闭时),需要同步刷新的组件。注:选择当前组件的上级组件无效,刷新上级组件请选择成功后“刷新上级组件 - 行”。', |
| | | required: false, |
| | | options: modules |
| | | }, |
| | |
| | | type: 'text', |
| | | key: 'output', |
| | | label: '返回值', |
| | | tooltip: '执行成功后的返回值。例如:@id', |
| | | tooltip: '执行成功后的返回值。系统函数可指定返回的变量(以@符开头,如@id);自定义函数可指定返回字段(如id)。', |
| | | initVal: card.output || '', |
| | | required: false, |
| | | forbid: viewType === 'popview' |
| | |
| | | key: 'open', |
| | | label: '打开方式', |
| | | initVal: card.open || 'blank', |
| | | tooltip: '菜单打开方式。注:移动端只在小程序或app中有效。', |
| | | tooltip: '菜单打开方式。', |
| | | required: true, |
| | | forbid: appType !== 'pc' && appType !== 'mob', |
| | | options: [{ |
| | | value: 'blank', |
| | | text: '新窗口' |
| | | }, { |
| | | value: 'self', |
| | | text: '当前窗口' |
| | | }] |
| | | options: [ |
| | | {value: 'blank', text: appType !== 'mob' ? '新窗口' : '新页面'}, |
| | | {value: 'self', text: appType !== 'mob' ? '当前窗口' : '当前页面'}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |