| | |
| | | let linkTypes = [ |
| | | { value: 'tel', text: '电话' }, |
| | | { value: 'email', text: '邮箱' }, |
| | | { value: 'linkmenu', text: '关联菜单' }, |
| | | { value: 'download', text: '下载' }, |
| | | { value: 'other', text: '其他' } |
| | | ] |
| | |
| | | card.linkType = '' |
| | | card.linkurl = '' |
| | | } |
| | | } else if (card.linkType === 'linkmenu') { |
| | | if (appType !== 'mob' && appType !== 'pc') { |
| | | card.link = '' |
| | | card.linkType = '' |
| | | card.linkurl = '' |
| | | card.linkmenu = '' |
| | | // } else if (card.linkType === 'linkmenu') { |
| | | // if (appType !== 'mob' && appType !== 'pc') { |
| | | // card.link = '' |
| | | // card.linkType = '' |
| | | // card.linkurl = '' |
| | | // card.linkmenu = '' |
| | | // } |
| | | } |
| | | |
| | | let menulist = sessionStorage.getItem('fstMenuList') |
| | | |
| | | if (appType === '' && menulist) { |
| | | try { |
| | | menulist = JSON.parse(menulist) |
| | | } catch (e) { |
| | | menulist = [] |
| | | } |
| | | } else { |
| | | menulist = [] |
| | | } |
| | | |
| | | let appMenus = sessionStorage.getItem('appMenus') |
| | |
| | | { value: 'YYYY-MM', text: 'YYYY-MM' }, |
| | | { value: 'YYYY-MM-DD HH:mm', text: 'YYYY-MM-DD HH:mm' }, |
| | | { value: 'YYYY-MM-DD HH:mm:ss', text: 'YYYY-MM-DD HH:mm:ss' }, |
| | | { value: 'YYYY年MM月DD日', text: 'YYYY年MM月DD日' }, |
| | | ] |
| | | }, |
| | | { |
| | |
| | | key: 'link', |
| | | label: '链接', |
| | | initVal: card.link || '', |
| | | tooltip: '动态地址为绑定字段值。', |
| | | tooltip: '动态地址为绑定字段值。使用 动态-关联菜单 时,请在“链接地址”字段返回菜单ID。', |
| | | required: false, |
| | | options: [ |
| | | { value: '', text: '无' }, |
| | |
| | | forbid: isHeader |
| | | }, |
| | | { |
| | | type: linkTypes.length > 4 ? 'select' : 'radio', |
| | | type: 'select', |
| | | key: 'linkType', |
| | | label: '链接类型', |
| | | initVal: card.linkType || 'other', |
| | |
| | | required: true, |
| | | options: appMenus || [], |
| | | forbid: !['pc', 'mob'].includes(appType) |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | key: 'linkmenu', |
| | | label: '关联菜单', |
| | | initVal: card.linkmenu || [], |
| | | required: true, |
| | | options: menulist, |
| | | forbid: ['pc', 'mob'].includes(appType) |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'textarea', |
| | | type: 'codemirror', |
| | | key: 'formula', |
| | | label: '公式', |
| | | initVal: card.formula || '', |
| | | tooltip: '执行时会使用查询到的数据替换相应的字段,展示获得的结果,在不使用解析时换行符或空格会替换为页面元素。可使用JS的一些语法,如:三元表达式 @field1@ > @field2@ ? 0 : 1;Math对象,取绝对值 Math.abs(@field@)、四舍五入 Math.round(@field@)等', |
| | | tooltip: '执行时会使用查询到的数据替换相应的字段,展示获得的结果,在不使用解析时换行符或空格会替换为页面元素。可使用JS的一些语法,如:三元表达式 @field1@ > @field2@ ? 0 : 1;Math对象,取绝对值 Math.abs(@field@)、四舍五入 Math.round(@field@)等。注:会替换公式中的@username@、@fullName@、@bid@。', |
| | | placeholder: '例如:@price@ * @number@', |
| | | required: true |
| | | }, |